Spec Kit and concurrent proof-governed work¶
Research date: 2026-11-09. Scope: official documentation and source inspection; no Spec Kit runtime benchmark, container campaign, state mutation, or publication. Spec Kit source inspected at 08252af8c5fb1c68135768fde2049d6578fa46c3 (resolved with git ls-remote). Documentation URLs can move independently of that source pin.
Recommendation: borrow batch authorization, resumable occurrence identities, and independently verifiable results. Keep Anvil's authoritative state engine. Do not make writing or reading more specifications the throughput control mechanism. A thousand concurrent tasks is an engineering target, not a result established by this research.
What current Spec Kit actually provides¶
| Verified capability | Consequence for Anvil |
|---|---|
| Current Spec Kit extends beyond Markdown templates: agent integrations, extensions, presets, workflow automation, overlays, and bundles. SDD is one process; bugfix and assessment are separate extensions. | Evaluate reusable mechanisms without adopting SDD as the governing methodology. Current README |
| Its bundled SDD workflow runs specify → human spec gate → plan → human plan gate → tasks → implement. | Approval is currently part of a workflow definition, so its placement determines whether work pauses. Bundled workflow example |
Native workflow fan-out runs items concurrently when max_concurrency exceeds its default of one, with isolated item contexts and ordered results. Fan-in collects them. A gate can consume a declared verdict input without prompting. The docs explicitly place batch approval before fan-out or aggregate review after fan-in; verdict-input gates inside fan-out are unsupported because state represents one paused gate. |
The useful pattern already exists: authorize a bounded batch once, execute independently, aggregate proof later. Anvil needs explicit authority and scope binding around that pattern. Step semantics |
| Runs persist inputs, outputs, progress, an append-only log, and frozen workflow definitions. Resume replays completed occurrences rather than re-running their implementations. Definitions/expansions are frozen; referenced resources and step implementations are not. | Stable execution identities and resumable records are useful. Frozen configuration alone does not prove the executed code or environment. Execution/state contract |
The implement prompt stops for unchecked requirements-quality checklists, then follows dependency phases and [P] markers; tasks sharing files run sequentially. Completion is recorded with task checkboxes. |
Copying these prompts unchanged would retain awkward approval pauses and shared-file contention. Checklists and task text are planning aids, not the authoritative completion ledger. Implement template |
Task generation makes tests optional unless requested, and [P] primarily means different files and no incomplete dependency. Converge rechecks current code against intent, appends gap tasks, and deliberately does not inspect Git history. |
Useful decomposition and gap detection, but Anvil must retain mandatory proof profiles and claim/source binding. Different files do not prove absence of database, deployment, or resource conflicts. Task template, Converge template |
Two source-level performance observations matter. The fan-out implementation uses a process-local ThreadPoolExecutor. It consumes futures in item order and only then submits the replacement at index + workers; a slow early item can therefore leave other available slots idle. This head-of-line effect is a source-based inference, not a measured benchmark. Anvil should replenish from completed items while separately preserving presentation order. Pinned executor
Run state takes an in-process lock while serializing the full state to JSON and atomically replacing files. That protects same-process readers/writers from partial snapshots but does not demonstrate distributed claim fencing or scalable high-rate ingestion. Its growing snapshot cost is another benchmark hypothesis. Pinned persistence implementation
Relevant primary-source patterns¶
- Temporal: separate worker capacity from durable coordination. Workers poll only with spare capacity; queues distribute tasks and can throttle activity dispatch. Workflow/activity tasks remain queued through worker failure. This supports independently bounded execution and verifier pools. It does not establish Anvil capacity or require adopting Temporal. Task queues
- Temporal: retries require idempotency. A worker can finish an external action and crash before reporting it; the action may execute again. Idempotency keys must be enforced at the mutation owner. Anvil should deduplicate claim renewals, evidence ingestion, and verdict submission by stable operation identity, not assume delivery exactly once. Activity semantics
- GitHub Actions: gate the privileged boundary. Environment rules pass before the protected job reaches a runner, and environment secrets arrive afterward. For Anvil, sandboxed execution can proceed under an approved scope while promotion or privileged actions retain a separate gate. Deployment environments
- SLSA/in-toto: proofs need a subject and verifier expectations. in-toto statements identify immutable artifact subjects by digest. SLSA verification checks trusted builder identity, signature, subject digest, and expected build parameters. Adapt these principles to tests and reviews; a signed statement alone does not prove task correctness. Statement schema, Verification guidance
Proposed Anvil direction — design recommendations, not implemented facts¶
- Record one bounded campaign authorization. Bind an immutable scope/version to allowed task classes, repositories/resources, risk limits, budget, expiry, proof profile, and prohibited operations. A UI bulk approval references that scope. A task outside it returns to the decision queue; unrelated authorized tasks continue.
- Separate execution permission, proof verification, and acceptance. Permission lets workers perform authorized work. Verifiers evaluate each exact attempt and source/artifact digest. Acceptance is a separate disposition with recorded actor and authority. Existing human-only acceptance cannot silently become automatic: a new explicitly approved delegation policy would be required.
- Use independent durable queues and bounded pools. Task execution, proof verification, and human exceptions should not occupy one global serial loop. Keep authoritative claim/state mutations brief, add version/lease fencing, and make retries idempotent. Put full output artifacts outside the transactional hot path; ledger their hashes and receipt identities.
- Provide a supported noninteractive continuation path. Workers use the native API/CLI with the same policy and evidence checks as the UI. During transient read-model or UI failure, authorized workers continue. During ledger unavailability, only previously authorized isolated work may continue, retaining durable receipts for idempotent reconciliation; acceptance/promotion stays unconfirmed until the ledger acknowledges it. This requires a bounded outbox and expiry policy, not silent state bypass.
- Make review a queue of exceptions and coherent batches. Show policy failures, missing proof, stale scope, conflicts, and requested privileged changes distinctly. A task can await human acceptance without consuming an executor or preventing other ready tasks from running. Preserve terminal dispositions such as duplicate/cancelled separately from evidence-backed completion.
Validation required before claiming scale¶
Run a repeatable simulator at 1/10/100/1,000 logical workers, then staged real-container tests within available resources. Measure successful transitions/second, p50/p95/p99 latency, lock wait, event lag, queue age, verifier throughput, memory, and proof completeness. Include disjoint tasks, heavy contention on one task, duplicate messages, stale leases, scope changes, revocation, process death before/after ledger acknowledgment, corrupted evidence, slow early items, and a stalled human review queue. Assert that every accepted result has valid source/attempt/policy bindings, no task gains two current owners, and one pending review does not halt unrelated authorized work.
Unknowns: no inspected source demonstrates Spec Kit coordinating a distributed thousand-container fleet with Anvil-equivalent claim/proof/acceptance guarantees; no performance result from this research establishes such capacity for either project. The findings justify a bounded concurrency prototype and fault tests, not a replacement engine or a scale claim.