Repository navigation
feat(gate)!: ship the verification-v2 contract - #21
Merged
Merged
Conversation
…design Add the 2026-07-30 root-cause analysis of the 2.5x per-Feature cycle slowdown (measured 109 -> 276 min medians across consuming repos), its independent Codex cross-review reconciliation, and the corpus evidence that 97% of 86 real specs classified T3 from prose keyword scanning alone - with the workflow's own mandated "CI passes green" phrase as the single largest trigger. Add the merged verification-v2 design (authoritative), produced from two independent designs (Claude / Codex) written against the same brief, with the owner decision log D1-D6: two risk profiles from declared signals and deterministic diff facts, an executable 2-round budget, honesty sections instead of coverage set-equality, round-numbered reports, typed human-decision ledger events, and a closed human-stop list. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Replace the audit-tier cost model with the verification-v2 contract (docs/design/verification-v2.md). The three-layer skeleton is unchanged: deterministic L1 before any dispatch, two fresh independent L2 reviewers, mechanical worst-of L3 over station-fixed inputs, freshness binding, PRD-only product authority, append-only ledger. Gate (specter-gate.sh v4.0.0): - risk profile (ordinary|high-risk) computed in-gate from the declared 8-signal "### Verification signals" table and deterministic changed-file facts (migration dirs, auth/secret paths, CI/workflow files, gate machinery, DDL/destructive statements in added diff lines) - never prose scanning, never a cross-phase floor - executable round budget: aggregate refuses --round 3+ before reading any report unless a typed authorize-round decision event is recorded - new subcommands: digest (input identity), validate-report (format-retry lane: a malformed report costs one same-agent retry, never a round), decide (typed human-decision ledger events; named-class acks surface as required_acks on the review receipt) - round-numbered report inputs (*.rN.md), single station receipt at .specify/verification-v2/<station>-<scope>.json - deleted: manifest/continuity subcommands, coverage set-equality and lineage validation, immutable round archives, tier receipt handshake Retired: classify_audit_tier.py, audit-tier-policy.json (and their sync manifest entries), the T1/T2/T3 tiers, the 5 reclassification boundaries, warn-ack files, REVERSAL/COVERAGE_BREACH machinery, the D-ID entailment gate test (owner decision D3 - D-IDs are references; scope-justifying D-IDs are ordinary blocking findings). Commands/skills: ms.verify, ms.analyze, ms.review, ms.pre-verify rewired to the v2 report schema and budget; classifier steps removed from ms.checklist, ms.specify, ms.clarify, ms.plan, ms.implement, ms.specter, ms.featuremap (now authors the 8-signal table), ms.init, ms.sync; specter-agent-protocols SKILL sections 3-8 rewritten. Tests: new seeded-defect suite tests/specter/test_specter_gate_v2.py (47 cases: over-budget refusal incl. round 28, false prose triggers staying ordinary, diff-fact escalation, digest staleness, degrade placeholders, ack roundtrip); four obsolete v1 suites retired. Full suite: 161 passed. Net -4,347 lines. Migration: legacy .specify/audit-tiers/ and .specify/continuity/ state is read-only evidence, never reinterpreted; in-flight Features re-check once under v2 at their current station; legacy signals tables run high-risk until replaced (fail-safe). Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
beomeodev
force-pushed
the
feat/verification-v2
branch
from
July 30, 2026 06:25
5c18434 to
f2bb7dc
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The 2026-07-18..07-27 gate changes slowed the per-Feature cycle 2.5x in consuming repos (median 109 -> 276 min; /ms.review completions 5.3/day -> 1.3/day). The joint root-cause audit (this PR,
docs/audits/2026-07-30-verification-slowdown-analysis.md, independently cross-reviewed by Codex) found:aggregate --round 28returned a clean PASS (reproduced on a fixture; observed in the wild)Patching was rejected as patchwork risk; a blanket rollback would discard unrelated integrity fixes. This PR ships the contained redesign instead.
What
Design (merged from two independent designs written against the same brief; owner decisions D1–D6 recorded):
docs/design/verification-v2.md.Kept unchanged: L1 deterministic structure before any dispatch, two fresh independent L2 reviewers, mechanical worst-of L3 over station-fixed inputs, freshness binding, PRD-only product authority, append-only ledger with verbatim
caught.Replaced:
ordinary/high-risk) computed in-gate from the declared 8-signal### Verification signalstable + deterministic changed-file facts. No prose scanning, no cross-phase floor, no separate classifier process (retiresclassify_audit_tier.py+audit-tier-policy.json).--round 3+refused before reading reports without a typedauthorize-roundledger decision.*.rN.md).specter-gate.sh decide), closed human-stop list; ordinary WARN records and advances.Cost model target: a clean ordinary Feature runs 6 dispatches, 3 rounds, 0 human stops; genuinely high-risk work deliberately stays near v1 cost.
Validation
tests/specter/test_specter_gate_v2.py(47 cases): over-budget refusal incl. r28, false prose triggers (CI,retry,source of truth) staying ordinary, diff-fact escalation (migration/DDL/gate-machinery), digest staleness, degrade placeholders, ack roundtrip, ported v1 regressions (octal feature numbers, split-slate maps).Migration
Legacy
.specify/audit-tiers//.specify/continuity/state is read-only evidence, never reinterpreted. In-flight Features re-check once under v2 at their current station. Legacy signals tables run high-risk until replaced (fail-safe)./ms.syncbroadcast is a separate follow-up after a real-repo shakedown cycle.🤖 Generated with Claude Code