generated from coulomb/repo-seed
Replace the accept-anything recommendations.items ({type: object}) with a strict
per-item contract (required [rank, candidate, action, why] + typed wsjf) and a
maxItems:7 hint. Strict item structure is what lets the T03 boundary parser
validate each recommendation independently and quarantine only malformed ones.
maxItems is a producer hint (prompt + llm-connect json_schema + T03 mitigation),
NOT a hard reject — a hard maxItems reject would discard a whole 16-item report,
the blast-radius bug WP-0016 removes. DEPLOY COUPLING: the strict schema is also
consumed by the current whole-doc validator, so it must ship with T03's per-item
quarantine parser; until then it increases whole-doc hard-fails. Prompt + max_tokens
headroom + NDJSON framing are documented as a runtime-bundle handoff.
Updated four tests to the strict contract; the forwarded-schema test now reads the
live schema file instead of hard-coding it. Full suite: 213 passed, 1 skipped.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
37 lines
1.8 KiB
JSON
37 lines
1.8 KiB
JSON
{
|
|
"$comment": "ACTIVITY-WP-0016-T02. Strict, bounded contract for the daily WSJF triage report. The per-item 'recommendations' schema is intentionally strict on STRUCTURE (types + required keys) so the T03 boundary parser can validate each recommendation independently and quarantine only the malformed ones. 'maxItems' is a producer hint (honoured by llm-connect constrained decoding and by the prompt); it is deliberately NOT hard-enforced by the in-repo validator, because rejecting a whole report for having too many items would reproduce the monolithic-failure bug WP-0016 exists to remove. Over-count is mitigated in T03 (keep top-N by rank, quarantine the rest). Value-domain vocabularies (action/confidence) are documented in the prompt and enforced by T04 guardrails with mitigation, not as brittle hard-fail enums here.",
|
|
"type": "object",
|
|
"required": ["summary", "recommendations"],
|
|
"properties": {
|
|
"summary": {
|
|
"type": "string"
|
|
},
|
|
"recommendations": {
|
|
"type": "array",
|
|
"maxItems": 7,
|
|
"items": {
|
|
"type": "object",
|
|
"required": ["rank", "candidate", "action", "why"],
|
|
"properties": {
|
|
"rank": { "type": "integer" },
|
|
"candidate": { "type": "string" },
|
|
"action": { "type": "string" },
|
|
"why": { "type": "string" },
|
|
"confidence": { "type": "string" },
|
|
"wsjf": {
|
|
"type": "object",
|
|
"properties": {
|
|
"score": { "type": "number" },
|
|
"strategic_value": { "type": "number" },
|
|
"time_criticality": { "type": "number" },
|
|
"risk_reduction": { "type": "number" },
|
|
"opportunity_enablement": { "type": "number" },
|
|
"job_size": { "type": "number" }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|