Spaces:
Sleeping
Sleeping
| """Structured-output contract for the Commit-time adaptation reviewer. | |
| See docs/commit-memory-adaptation-architecture.md. The LLM only proposes — | |
| candidate_id, recurrence_key, novelty_key, and authoritative attribution are | |
| all derived deterministically in application code (commit_candidate_adapters.py), | |
| never trusted from model output. | |
| """ | |
| from __future__ import annotations | |
| from typing import Literal | |
| from pydantic import BaseModel, ConfigDict, Field | |
| class InteractionQuote(BaseModel): | |
| model_config = ConfigDict(strict=True, extra="forbid") | |
| interaction_id: str | |
| quote: str | |
| class MemoryProposal(BaseModel): | |
| model_config = ConfigDict(strict=True, extra="forbid") | |
| proposal_id: str | |
| destination: Literal["project", "student"] | |
| kind: str | |
| statement: str | |
| interaction_ids: list[str] | |
| evidence_quotes: list[InteractionQuote] | |
| confidence: float = Field(ge=0.0, le=1.0) | |
| class CommitAdaptationReview(BaseModel): | |
| model_config = ConfigDict(strict=True, extra="forbid") | |
| memory_proposals: list[MemoryProposal] | |
| inferred_persona_text: str | |