SpecRouteCapability class
The SPEC committee's route (beads pow-7nm + pow-ui8) — the spec-side
counterpart of the code committee's CodeRouteCapability, with a THIRD arm
between advance and a human gate. It assembles ONE fresh lane vector at
entry — the GATING lane's grade off the ambient SiblingView (the effect
verb — never a subscription/re-query, D-5), and each JUDGEMENT lane's grade
- rationale off that lane's CURRENT-ROUND verdict artifact on disk
(currentVerdictFromFile; a lane with no current-round artifact does not
join — bead
pow-96s) — applies the deterministic decideSpecRoute matrix over it, and:
- SpecAdvance ⇒
Advancewith the SAME provenance payload the code route emits (verdict/grades/spread/rule), and the guidance ledger is DELETED (a later rework round must never re-inject a stale spec correction). When the advance CARRIES a single finding (beadpow-bhm, ratified 2026-07-18) the payload also names it (fix_in_flight+fix_in_flight_finding) and the carry is WRITTEN into the worktree at fixInFlightPath for the build brief to embed — a write that cannot land throws a RouteFailure, LOUD, because an advance whose one known defect silently evaporated is exactly what "every catch keeps its value" forbids. The arm still carries NOgradekey, so an advancing round invalidates nothing.
On EVERY arm the route also surfaces the REFINEMENT FLAG (bead pow-bhm):
each lane's non-grading BEAD-GRAPH observations, read off the
kVerdictRefinementKey verdict column, written to refinementFlagPath,
named on the result payload, and appended to an escalate's gate reason. NO
arm reads them — tracker state is never the spec author's defect.
- SpecRespec ⇒ the ledger is WRITTEN into the worktree, then an
Advancecarrying the INVALIDATING stampgrade: 'F'on this route's OWN result. This step declaresvalidates:kSpecifyStep, so the engine DERIVES the wave off that edge the moment the stamp lands on a positively-terminal source:specify∪ everything downstream of it ∪ this route re-mint as successor incarnations, the committee re-runs VIRGIN in the SAME session, and the next specify ride reads the ledger back as its correction guidance. NO human, no gate bead, no session re-mint. A ledger write that cannot land throws a RouteFailure — LOUD, never a respec whose guidance silently never arrives. - SpecEscalate ⇒
Escalate— the human flare (a structural F, a critic F, a rationale-less fail, or the round cap) — and the guidance ledger is DELETED. The flare hands the bead to a human, so the AUTOMATIC counter is spent: a gate-resolve re-arm decides on the CURRENT join alone instead of re-reading the consumed round and re-flaring forever (beadpow-p8w).
Offline/dry-run posture: an absent Workspace, or a workspace directory that
does not exist on disk (the synthetic /grid/worktrees/... an offline suite
mounts), skips the ledger I/O entirely — the same no-op posture
ClearCritiqueCapability takes. The verdict and engine-injected circuit
round are unchanged.
Constructors
- SpecRouteCapability({Duration lanePoll = const Duration(seconds: 15), Duration laneWaitBudget = const Duration(minutes: 60)})
-
Creates the spec route, optionally over its mid-wave WAIT tuning: the
lanePollinterval between join re-reads, and thelaneWaitBudgetafter which a still-incomplete current-round join fails LOUD (RouteFailure). The defaults cover a full derived wave (a frontier-tier specify re-ride plus four critics) with margin; tests inject millisecond values.const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- lanePoll → Duration
-
How often the WAIT re-reads the join (see route).
final
- laneWaitBudget → Duration
-
How long the WAIT may last before the route refuses LOUDLY.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
createAllocation(
AllocationContext ctx) → Allocation -
The default
Allocationfor a route (ADR-0009 Decision 4/6) —RouteAllocation.inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
route(
TreeContext context, StepArgs args) → Future< RouteVerdict> -
Decides the verdict. Read ambient values from
contextat ENTRY (the effect verb —getInheritedSeedOfExactType); after every await, checkStepArgs.cancelbefore touching the context again. A THROWING body routes to supervision as aFailed(the per-work fail-closed posture, ADR-0008 Decision 10) — never an unhandled zone error. -
supervisionPolicy(
StepArgs args) → SupervisionPolicy -
This capability's per-kind supervision declaration.
inherited
-
teardown(
StepArgs args) → Future< void> -
Idempotent cleanup on unmount. Defaults to a no-op. Dispose-path: NO tree
context (a lookup there would throw).
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited