feat(boss): bolder autonomous /boss — grounding-PASS auto-sign, rollback sandbox, reference issue
Retire the obligatory five-lens spec-skeptic auto-sign panel (worst case 18 agent runs per spec under /boss). The autonomous signature is now the Step-5 grounding-check PASS alone — an independent fresh-context agent's verdict against currently-green tests; a no-override BLOCK/INFRA_ERROR routes to the human sign-off pause. The judgement the panel applied moves upstream into specify Step 1.5, whose stance inverts: a load-bearing fork the orchestrator can DERIVE an answer for (sources, code, consistency, risk) is decided boldly and recorded on the run's reference issue; only a pure-preference fork bounces. spec-skeptic survives as an optional ad-hoc bias-breaker the orchestrator pulls when unsure whether its leaning is judgement or bias — not a gate, not a veto. Every /boss run carries a mandatory reference issue (created if the cycle had none): the fork-decision log, the orchestrator's cross-run memory, and the only surviving trace of a hard-dropped attempt. Relax main-sacrosanct below the session anchor: within an autonomous run the orchestrator may git reset --hard its OWN UNPUSHED commits above the anchor on a dead end — never below the anchor, never a pushed commit (forward-only/revert). Discarded attempts are hard-dropped, no parking. Verified across the 9 edited files by a 4-lens adversarial review (retired-panel residue, cross-file contracts, rollback-boundary safety, stance coherence): unanimous SOUND. Baseline tagged pre-autosign-rework. closes #8
This commit is contained in:
+140
-73
@@ -65,7 +65,11 @@ language, RED-first for bugs) come from the project's `CLAUDE.md`
|
||||
layer above it, loaded in every session. Both bind regardless of
|
||||
mode; autonomy does not lift a user-level constraint (e.g. an
|
||||
external-service-consent rule that names `/boss` explicitly). This
|
||||
skill does not restate them.
|
||||
skill does not restate them — with one deliberate local refinement:
|
||||
`main`-is-sacrosanct holds **below the session anchor**, and the
|
||||
rollback sandbox (§ Direction freedom) is the one narrow `/boss`
|
||||
exception, letting the orchestrator wind back its *own* unpushed
|
||||
autonomous commits above that anchor.
|
||||
|
||||
## The Process
|
||||
|
||||
@@ -168,9 +172,9 @@ route(task):
|
||||
fallback for prose-design work the sources already settle (an
|
||||
exhaustive issue body, a long in-context discussion). `specify` is
|
||||
bounded (no interview); dispatch it autonomously and it signs through
|
||||
its own Step-6 auto-sign gate, escalating to a user-review pause (a
|
||||
problem-state notify, not a pre-dispatch checkpoint) only when the
|
||||
gate cannot clear.
|
||||
its own Step-6 gate — the Step-5 `grounding-check` `PASS` — escalating
|
||||
to a user-review pause (a problem-state notify, not a pre-dispatch
|
||||
checkpoint) only when grounding blocks with no human to override it.
|
||||
|
||||
**The straddle rule (a rule, not an example).** "Add an enum variant"
|
||||
straddles the compiler-driven and the tdd/spec arms. Decide by what the
|
||||
@@ -190,19 +194,21 @@ context budget: the four are bounded (no open Q&A; `compiler-driven` and
|
||||
`debug` self-settle on a run), whereas a fresh `brainstorm` is
|
||||
high-context discovery the orchestrator cannot compact on its own (see
|
||||
trigger 4). `specify` dispatched in `/boss` signs through its own Step-6
|
||||
auto-sign gate: a spec that clears all objective gates AND a unanimous
|
||||
adversarial `spec-skeptic` panel is signed by the orchestrator without
|
||||
pausing, and the run continues to `planner` — see §"Spec auto-sign"
|
||||
below. A spec that cannot clear the gate escalates to the user-review
|
||||
pause (a final-sign-off notify, not a pre-dispatch checkpoint). The gate
|
||||
is built so the orchestrator's own confidence is never what signs. Do not let the asymmetry harden into a
|
||||
reflex of routing borderline items to `brainstorm` "to be safe" — that
|
||||
is the exact bias this reflection exists to break; walk the cascade
|
||||
honestly each time. The one principled tilt is two-sided and lives
|
||||
*inside* the test: genuine doubt about whether the sources (or one
|
||||
assertion) can pin the design *is itself* the design-fork signal, so it
|
||||
resolves to `brainstorm` — not because `brainstorm` is preferred, but
|
||||
because unresolved ambiguity is a fork by definition. The lighter arms
|
||||
gate — the Step-5 `grounding-check` `PASS`, an independent agent's
|
||||
verdict against currently-green tests, not the orchestrator's confidence;
|
||||
the run then continues to `planner` without pausing. A no-override
|
||||
grounding `BLOCK` escalates to the user-review pause (a final-sign-off
|
||||
notify, not a pre-dispatch checkpoint). The judgement that used to gate
|
||||
the sign now lives inside `specify` Step 1.5, which decides derivable
|
||||
forks boldly — see §"Spec auto-sign" below. Do not let the asymmetry
|
||||
harden into a reflex of routing borderline items to `brainstorm` "to be
|
||||
safe" — that is the exact bias this reflection exists to break; walk the
|
||||
cascade honestly each time. The one principled tilt is two-sided: a fork
|
||||
`specify` can *derive* an answer for (from the sources, the code,
|
||||
consistency, risk) is spec-driven work, decided inside `specify` (Step
|
||||
1.5), **not** a `brainstorm` bounce; only a fork that needs genuine
|
||||
discovery, or that hangs on a user preference no source settles,
|
||||
resolves to `brainstorm`. The lighter arms
|
||||
also bounce reactively: a `specify` or `tdd` that later reports the
|
||||
design was not settled / not test-specifiable, or a `compiler-driven`
|
||||
run that hits a hole, escalates — `specify` / `tdd` to `brainstorm` (a
|
||||
@@ -253,19 +259,76 @@ Run the procedure named in "Done-state notifications" below.
|
||||
## Direction freedom
|
||||
|
||||
The orchestrator has authority to choose the next iteration,
|
||||
refactor, or feature without asking. Wrong calls are contained,
|
||||
not recovered: only the orchestrator commits, and only when the
|
||||
working-tree state is consistent — so bad work doesn't reach
|
||||
main in the first place. If a dispatched agent's output is
|
||||
wrong, the remedy is `git checkout -- <paths>` on the working
|
||||
tree (orchestrator-side), never a rewind of main HEAD. main is
|
||||
forward-only.
|
||||
refactor, or feature without asking — and, under the bold stance, to
|
||||
*decide* a load-bearing design fork it can derive an answer for rather
|
||||
than bounce it (see `../specify/SKILL.md` Step 1.5). Wrong calls are
|
||||
**contained or recovered**, not avoided by timidity: bad work is either
|
||||
discarded before it reaches `main` (`git checkout -- <paths>` on the
|
||||
working tree), or — once it is autonomous, committed, unpushed work — wound
|
||||
back inside the rollback sandbox below. Being wrong is allowed; the cost
|
||||
of a wrong call is bounded, and a bounded cost is cheaper than the
|
||||
context-switch of asking.
|
||||
|
||||
The cost of asking "what should I do next" — context-switch for
|
||||
the user, latency on my side — exceeds the expected cost of
|
||||
discarding a bad working-tree state. So when the queue is
|
||||
discarding or rolling back a bad state. So when the queue is
|
||||
non-empty and the path is clear, just pick and proceed.
|
||||
|
||||
### The reference issue (mandatory)
|
||||
|
||||
Every `/boss` run is anchored to a tracker issue — the one that seeded
|
||||
the cycle, or one `specify` creates when the work was settled in pure
|
||||
chat with no prior issue (`../specify/SKILL.md` Step 1.5). The run always
|
||||
has exactly one such reference issue, and the orchestrator **comments its
|
||||
fork decisions there as it goes**: each load-bearing fork it derives, the
|
||||
chosen option, and the rationale (or, for a user decision minuted from
|
||||
the discussion, the provenance). It is the run's decision log — three
|
||||
things at once:
|
||||
|
||||
- the **user's after-the-fact audit**: how the orchestrator decided what
|
||||
it decided without them, in one auditable thread they can veto from;
|
||||
- the orchestrator's **cross-run "issue memory"**: a later run reads the
|
||||
thread to see what was already tried and why;
|
||||
- the **only surviving trace of an abandoned attempt** — because a
|
||||
rollback hard-drops the commits (below), the issue thread is what
|
||||
remains of the dead-ended line.
|
||||
|
||||
A run that reaches a fork decision without a reference issue to record it
|
||||
on is a bug: create the seeding issue first (Step 1.5 mechanic), then
|
||||
decide.
|
||||
|
||||
### The rollback sandbox
|
||||
|
||||
`main` stays sacrosanct **below the session anchor**. At the start of an
|
||||
autonomous run the orchestrator notes the current `main` HEAD — the last
|
||||
user-ratified state — as the **session anchor**. Everything it then
|
||||
commits autonomously, this run, and has **not pushed**, is its own
|
||||
sandbox above that anchor.
|
||||
|
||||
Inside the sandbox, and only there, the forward-only rule is relaxed:
|
||||
when the orchestrator runs itself into a dead end — `implement` stays
|
||||
`BLOCKED` after its re-loops, `audit` or `fieldtest` exposes that an
|
||||
earlier derived fork was wrong, a line of work is not salvageable
|
||||
forward — it MAY `git reset --hard` back toward the anchor, to the point
|
||||
before the wrong turn, and try again differently. The boundaries are
|
||||
hard:
|
||||
|
||||
- **Never below the anchor.** The anchor is the floor. User-ratified
|
||||
history is never rewound; the sandbox is only the orchestrator's own
|
||||
autonomous commits.
|
||||
- **Never a pushed commit.** Pushing hands work to the outside; a pushed
|
||||
commit leaves the sandbox and reverts to forward-only (`git revert`),
|
||||
never `reset`. In practice the orchestrator does not push autonomously,
|
||||
so the sandbox is local.
|
||||
- **Hard-drop, no parking.** A discarded attempt is gone — no
|
||||
`attempt-N` branch or tag is kept. The reference-issue thread is its
|
||||
trace; the transcript holds the rest. (The user's standing preference:
|
||||
what the orchestrator threw away, the user does not want to see.)
|
||||
- **Rollback is an escalation response, not a reflex.** It is for a genuine
|
||||
dead end, not for flinching at the first agent that returns
|
||||
`DONE_WITH_CONCERNS`. Reach for it when forward correction is clearly
|
||||
more expensive or less safe than winding back and re-deciding.
|
||||
|
||||
Bounce back to the user only when:
|
||||
|
||||
- A queued option requires a real design judgement I have not
|
||||
@@ -389,40 +452,37 @@ actionable ask, not a wrap-up summary.
|
||||
## Spec auto-sign
|
||||
|
||||
Under `/boss`, the orchestrator signs a spec in the user's place
|
||||
through `specify`'s Step-6 auto-sign gate, which is owned and defined
|
||||
there. (Outside `/boss`, the user signs every spec directly; there is
|
||||
no gate to run.) A spec that cannot clear the gate escalates to the
|
||||
human sign-off pause. The boss-side contract is just this:
|
||||
through `specify`'s Step-6 gate, which is owned and defined there.
|
||||
(Outside `/boss`, the user signs every spec directly; there is no gate
|
||||
to run.) A spec the gate cannot clear escalates to the human sign-off
|
||||
pause. The boss-side contract is just this:
|
||||
|
||||
- **The gate is not the orchestrator's judgement.** Signing requires
|
||||
every objective gate green (precondition, parse, a `grounding-check`
|
||||
`PASS` that needed no human override) AND a unanimous five-lens
|
||||
`spec-skeptic` panel returning `SOUND`. "The spec looks good to me" is
|
||||
never a signature; that confidence is the exact signal the gate
|
||||
refuses to trust.
|
||||
- **A `BLOCK` is repaired or escalated, never signed over.** The gate
|
||||
splits the five lenses by what a `BLOCK` means. An *editorial* `BLOCK`
|
||||
(`criterion` / `ambiguity` / `plan-readiness` — the spec is
|
||||
under-articulated) the orchestrator may repair in a bounded loop:
|
||||
edit, re-run the objective gates, re-dispatch all five lenses, up to
|
||||
2 rounds. A *design* `BLOCK` (`scope-fork` / `grounding` — the ground
|
||||
is not settled), an `INFRA_ERROR`, any objective gate not green, or an
|
||||
exhausted 2-round budget routes the spec to the human sign-off pause
|
||||
it would have hit anyway. The orchestrator never settles a design
|
||||
question in the user's place; the full re-panel each round is what
|
||||
stops an editorial repair from laundering one in. The gate owns this
|
||||
loop (`../specify/SKILL.md` Step 6) — boss only enforces the notify.
|
||||
One upstream detail matters here: a fork settled in-context may be
|
||||
invisible to the `scope-fork` juror, which reads the seeding issue.
|
||||
`specify` Step 1.5 gives it an auditable source either way — when a
|
||||
seeding issue exists but still lists the fork open, it posts a
|
||||
provenance-bearing reconciliation comment; when there is *no* seeding
|
||||
issue (design settled in pure chat), it creates one that records the
|
||||
resolution with provenance and becomes the cycle's seeding issue.
|
||||
Both record a *user* decision; neither lets the orchestrator certify
|
||||
its own — no real user statement is a Step-1.5 bounce, not an artefact
|
||||
to manufacture. The orchestrator writes the record; the juror checks
|
||||
the provenance.
|
||||
- **The signature is the `grounding-check` `PASS`, not the
|
||||
orchestrator's judgement.** Under `/boss` the autonomous signature is
|
||||
the Step-5 `grounding-check` returning `PASS` — an independent
|
||||
fresh-context agent's verdict against currently-green tests. "The spec
|
||||
looks good to me" is never a signature; that confidence is the exact
|
||||
signal the gate refuses to trust. The former obligatory five-lens
|
||||
`spec-skeptic` panel is **retired** (baseline tag
|
||||
`pre-autosign-rework`); the judgement it used to apply now lives
|
||||
upstream, in `specify` Step 1.5's bold-decide stance.
|
||||
- **A no-override grounding `BLOCK` is never signed over.** With no human
|
||||
in the loop, a grounding `BLOCK` (or `INFRA_ERROR`) cannot be
|
||||
overridden, so it routes the spec to the human sign-off pause it would
|
||||
have hit anyway. That is the one objective denial of an autonomous
|
||||
sign.
|
||||
- **Forks are decided upstream, boldly, and recorded.** `specify` Step
|
||||
1.5 decides every load-bearing fork it can *derive* an answer for
|
||||
(sources, code, existing-design consistency, risk) — pulling an ad-hoc
|
||||
`spec-skeptic` lens as a bias-breaker when it is unsure whether its
|
||||
leaning is judgement or bias — and records each decision in the run's
|
||||
**reference issue** (see § Direction freedom). Only a *pure-preference*
|
||||
fork, one only the user's taste can settle, bounces to the human. So a
|
||||
spec reaching the sign gate carries no unresolved judgement; the only
|
||||
thing the sign verifies is the objective grounding the check already
|
||||
verifies. Editorial roughness the old panel would have caught is let
|
||||
through deliberately — cheap to patch inline downstream, never worth an
|
||||
obligatory five-juror panel on every spec.
|
||||
- **On a clean sign, do not stop.** Commit the spec (the auto-sign
|
||||
commit subject carries `(boss-signed)` so the act is auditable in
|
||||
history), fire the auto-sign notify, and continue to `planner` in
|
||||
@@ -436,13 +496,15 @@ human sign-off pause. The boss-side contract is just this:
|
||||
reply vetoes. One example shape: "Signed off the spec for <plain
|
||||
capability> myself and started the implementation plan — reply to
|
||||
veto." No internals, but enough identity to act on.
|
||||
- **A veto is a forward correction.** If the user vetoes after the
|
||||
fact, the signed spec is already a commit on `main` (forward-only).
|
||||
Undo it forward — revert the spec commit, discard the downstream
|
||||
working-tree work with `git checkout`, file the redirection — never
|
||||
a history rewind. This is the same containment as any other
|
||||
orchestrator call (§"Direction freedom"): bad calls are contained on
|
||||
the forward edge, not recovered by rewinding HEAD.
|
||||
- **A veto is a forward correction — or, within the run, a rollback.**
|
||||
If the user vetoes a spec already committed on `main`, undo it forward
|
||||
— revert the spec commit, discard the downstream working-tree work with
|
||||
`git checkout`, file the redirection. *Within* the autonomous run, the
|
||||
rollback sandbox (§ Direction freedom) is the additional remedy: the
|
||||
orchestrator may hard-reset its own unpushed `(boss-signed)` commit and
|
||||
the work built on it back toward the session anchor when it judges the
|
||||
fork was wrong — its own work only, never below the anchor, never a
|
||||
pushed commit.
|
||||
|
||||
## Common Rationalisations
|
||||
|
||||
@@ -461,8 +523,9 @@ human sign-off pause. The boss-side contract is just this:
|
||||
| "It's a bug but the fix is a one-line type edit — route it `compiler-driven`" | No. An observed bug is first in the cascade → `debug`, RED-first, regardless of how mechanical the fix looks. The bug-gate sits before the type-edit arm precisely so a regression cannot launder itself around RED-first. |
|
||||
| "The issue is exhaustive but it's a new cycle, so bounce to the user before `specify`" | `specify` direct-entry is bounded and autonomously dispatchable — it is NOT the high-context `brainstorm` cycle that trigger 4 reserves for the user. Dispatch it; it will pause at its own user-review gate for sign-off. The pre-dispatch bounce is for an *open* design that needs discovery, not for a settled one that needs only production. |
|
||||
| "`tdd` is the secondary skill, `brainstorm` is the real entry" | All entry paths are always available. The choice among them is the cascade, walked per item — not a habit of treating `brainstorm` as primary and the lighter arms as exceptions. The lighter arms exist to be reached; reaching past them by elimination is the failure the verification axis was added to prevent. |
|
||||
| "This spec is clearly good — I'll sign it and skip the panel" | The panel IS how a spec gets signed under `/boss`; there is no signing on judgement. Your sense that it is clearly good is the precise signal the gate is built not to trust. Run the objective gates, dispatch the five jurors, require unanimity. |
|
||||
| "Four jurors said SOUND, one blocked on something I think is wrong — I'll sign" | Unanimous-or-nothing. You never sign over a `BLOCK`. If it is an editorial lens, repair it and re-run the whole panel (≤ 2 rounds); if it is a design lens or the budget is spent, it routes to the human sign-off it would have had anyway. Signing because *you* think the juror is wrong is overruling the panel — confidence by the back door. |
|
||||
| "This spec is clearly good — I'll sign it on my judgement" | Your judgement is not the signature; the Step-5 `grounding-check` `PASS` is. Run grounding and sign on the PASS. A no-override grounding `BLOCK` routes to the human — never signed over on confidence. (The old unanimous `spec-skeptic` panel is retired; do not re-introduce it as a gate.) |
|
||||
| "There's an open fork — I'll bounce to `brainstorm` to be safe" | If you can *derive* an answer (sources, code, consistency, risk), decide it boldly and record it in the reference issue. Only a *pure-preference* fork bounces. Bouncing a derivable fork is exactly the timidity the bold stance retired; unsure if your leaning is bias, pull one ad-hoc `spec-skeptic` lens, then decide. |
|
||||
| "I derived a fork but didn't bother logging it on the issue" | The reference-issue comment is mandatory. It is the user's only window into a call made without them — and, because a rollback hard-drops the commits, the only surviving trace of the attempt. No reference issue, no fork decision: create the seeding issue first. |
|
||||
| "Auto-sign let me continue, so I don't need to notify — it's just progress" | The auto-sign notify is mandatory and carries a decision (the user's veto over a signature made without them). It is the one sanctioned mid-flow notify precisely because it is not progress — it is the audit trail for a delegated gate. |
|
||||
|
||||
## Red Flags — STOP
|
||||
@@ -477,8 +540,11 @@ human sign-off pause. The boss-side contract is just this:
|
||||
- About to route an observed bug to the `compiler-driven` arm because "the fix is mechanical" — a regression is `debug`, RED-first; the bug-gate is first in the cascade for exactly this reason.
|
||||
- About to route a behaviour-encoding change to `compiler-driven` because it "looks mechanical" — apply the straddle rule: if the change encodes new behaviour it is `tdd` / `spec-driven`, and doubt means it carries behaviour.
|
||||
- About to accept a `compiler-driven` edit on a clean build without confirming the suite is green *unchanged* — the conjunction is the done-signal; a green-but-wrong change builds clean.
|
||||
- About to sign a spec under auto-sign on confidence — without all objective gates green and a unanimous `spec-skeptic` panel; signing over any `BLOCK`; self-correcting a *design*-lens (`scope-fork` / `grounding`) `BLOCK` instead of escalating; or looping past the 2-round budget. The gate exists so the orchestrator's confidence never signs.
|
||||
- About to run the auto-sign path outside a `/boss` session, or to skip the mandatory auto-sign notify after signing.
|
||||
- About to sign a spec under auto-sign on confidence rather than on the Step-5 `grounding-check` `PASS` that is the autonomous signature; or signing over a no-override grounding `BLOCK` / `INFRA_ERROR` instead of routing it to the human sign-off pause.
|
||||
- About to re-introduce the retired `spec-skeptic` panel as a sign gate (a unanimous five-juror pass as a precondition) — it is now only the optional Step-1.5 bias-breaker; or to run any auto-sign path outside a `/boss` session, or to skip the mandatory auto-sign notify after signing.
|
||||
- About to *decide* a fork that hangs on pure user preference (no derivable better) instead of bouncing it — or its inverse, bouncing a *derivable* fork to `brainstorm` out of timidity.
|
||||
- About to make a fork decision without recording it on the run's reference issue, or to run autonomously with no reference issue at all.
|
||||
- About to `git reset` below the session anchor, or to `reset` a commit that has been pushed — the rollback sandbox is the orchestrator's *own unpushed* commits above the anchor only; user-ratified and pushed history is forward-only (`git revert`).
|
||||
|
||||
## Cross-references
|
||||
|
||||
@@ -495,10 +561,11 @@ human sign-off pause. The boss-side contract is just this:
|
||||
facts name the repo slug, the browsable URL, and the list command.
|
||||
- **Glossary write-rule:** `../docs/glossary-convention.md` —
|
||||
record-reality discipline for the only autonomous glossary writer.
|
||||
- **Spec auto-sign gate:** owned by `../specify` Step 6; the
|
||||
adversarial juror is `../specify/agents/spec-skeptic.md` (dispatched
|
||||
five times, one per lens). Runs under `/boss` — see
|
||||
`../docs/conventions.md`.
|
||||
- **Spec auto-sign gate:** owned by `../specify` Step 6 — under `/boss`
|
||||
the autonomous signature is the Step-5 `grounding-check` `PASS`. The
|
||||
former obligatory `spec-skeptic` panel is retired; that agent
|
||||
(`../specify/agents/spec-skeptic.md`) survives as the optional
|
||||
Step-1.5 bias-breaker. See `../docs/conventions.md`.
|
||||
- **Downstream skills dispatched:** `../brainstorm`,
|
||||
`../specify` (spec-production core; autonomously dispatchable for a
|
||||
settled design), `../planner`, `../implement`, `../audit`,
|
||||
|
||||
Reference in New Issue
Block a user