todo2code

Ticket 073: Define analysis budget DSL

Goal and scope

Define a strict, canonical t2c.analysis-policy/v1 DSL that lets todo2code bound semantic-analysis cost without replacing semantic reasoning with a deterministic approximation. Deterministic signals select the necessary LLM stages and evidence slices; each selected stage retains explicit request, token and elapsed-time ceilings, exact-evidence cache identity and fail-closed provider policy. Every request ceiling includes retries and response-repair calls.

This ticket supplies the dependency-free core contract, canonical parser/renderer, deterministic stage selection and budget calculation. Runtime, CLI and provider wiring remain a separate workstream so the contract can be reviewed before it controls live calls.

Acceptance criteria

Participants

Approval gate

The plan and intent were committed independently as f2e68ae before any source change. The user’s instruction kontynuuj followed the concrete recommendation for this bounded cost-analysis DSL and authorizes the transition to IN_PROGRESS / EDIT on 2026-08-12. Protected exact-head review was subsequently obtained before publication.

Non-goals

Verification and measured LLM evidence

Publication evidence

Protected PR #86 passed Koru, hosted verify, required JDK, Docker smoke and review-triggered governance. Independent validator-agent run 31580896098 reviewed exact head 5b61cb8b0cc2a0dd65abf9073f4b60243461a845 in four chunks; both the deterministic authority and openrouter/z-ai/glm-5.2 returned APPROVE with no findings. The PR was squash-merged as main@f0df52cae41c99151419554363f1e1393c300b10, and post-merge CI run 31581196362 passed verify, Docker smoke, governance and required Java.