Add token budgets, telemetry and delta verification

This commit is contained in:
Emil Shanaty
2026-10-27 19:36:02 +03:00
parent 74fdfa458c
commit c3f58ceb40
9 changed files with 152 additions and 17 deletions
+5
View File
@@ -41,6 +41,11 @@ Scope is checked by the lead with the skill's `scripts/audit-scope.mjs`; workers
- {{Generated files, migrations, flaky tests, shared ports, secrets, caches.}}
- {{Generated or vendored paths that must not be edited.}}
## Token / effort budget
- Hard budget: {{tokens or n/a}}; reserve {{20–30%}} for verification and integration.
- Prefer vertical slices and files under ~800 lines.
- Workers read the listed inputs/ranges, not the whole repository.
## Frozen contracts
See `.swarm/contracts.md`. Do not change an interface without returning `blocked`.
+3
View File
@@ -28,6 +28,8 @@ Role: worker | Wave: {{n}} | Depends on: {{ids or —}} | Effort: {{S/M/L}}
## Constraints
- {{No new dependencies, style, performance, compatibility.}}
- Context budget: read only the inputs above; if you need more than {{N}} additional files, return `blocked` instead of exploring the whole repo.
- Do not run the full test suite unless the card explicitly asks; run targeted checks.
## Acceptance (re-runnable)
1. `{{command or artifact path}}` → {{expected result/state}}
@@ -36,6 +38,7 @@ Role: worker | Wave: {{n}} | Depends on: {{ids or —}} | Effort: {{S/M/L}}
## Report
`.swarm/reports/{{ID}}.json` per `.swarm/report.schema.json`; status `done|partial|blocked|failed`.
Keep the report to summary + evidence lines; raw logs go to `.swarm/tmp/{{ID}}/`.
## Stop conditions
- Time box: 25 minutes for S/M, 45–60 minutes for L, or 3 failed attempts at the same step.
+1
View File
@@ -34,6 +34,7 @@ Computer-use (mouse/keyboard) is an optional last-resort tier: one agent, dispos
`pass` / `pass_with_risks` / `fail` — with the top risks and exact repro commands.
## Report
Keep the review to findings + commands + evidence (target 5–8k tokens); raw logs stay in `.swarm/tmp/`. Review the diff and affected checks, not the whole repository.
FIRST write the full review to `.swarm/reviews/{{ID}}.md`. Then return only the minimal structured verdict:
`{task_id, verdict, summary, review_file}` per `.swarm/verdict.schema.json`.
The review file is the source of truth; it must exist even if the structured reply is lost. Do not return a long findings array in the workflow schema.