M0.3: Contract v1 Pydantic models #2

Merged
archeious merged 1 commit from feat/contract-models into main 2026-04-08 20:14:46 +00:00
Collaborator

Summary

Implements all Research Contract v1 types as Pydantic models with full test coverage.

  • ResearchConstraints — input knobs (iterations, token budget, max sources)
  • Citation with raw_excerpt — verbatim source evidence
  • GapCategory enum (5 categories) + Gap — categorized unresolved topics
  • DiscoveryEvent — lateral findings for other researchers
  • ConfidenceFactors — auditable scoring inputs
  • CostMetadata with model_id — resource tracking per model tier
  • ResearchResult — top-level contract container

32 tests: validation, bounds, required fields, serialization roundtrips, JSON structure compliance.

Refs: #1

## Summary Implements all Research Contract v1 types as Pydantic models with full test coverage. - `ResearchConstraints` — input knobs (iterations, token budget, max sources) - `Citation` with `raw_excerpt` — verbatim source evidence - `GapCategory` enum (5 categories) + `Gap` — categorized unresolved topics - `DiscoveryEvent` — lateral findings for other researchers - `ConfidenceFactors` — auditable scoring inputs - `CostMetadata` with `model_id` — resource tracking per model tier - `ResearchResult` — top-level contract container 32 tests: validation, bounds, required fields, serialization roundtrips, JSON structure compliance. Refs: #1
claude-code added 1 commit 2026-04-08 20:14:32 +00:00
All Research Contract types as Pydantic models:
- ResearchConstraints (input)
- Citation with raw_excerpt (output)
- GapCategory enum (5 categories)
- Gap with structured category (output)
- DiscoveryEvent (lateral findings)
- ConfidenceFactors (auditable scoring inputs)
- CostMetadata with model_id (resource tracking)
- ResearchResult (top-level contract)

32 tests: validation, bounds checking, serialization roundtrips,
JSON structure verification against contract spec.

Refs: archeious/marchwarden#1

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
archeious merged commit 8930f4486a into main 2026-04-08 20:14:46 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: archeious/marchwarden#2
No description provided.