mandrel 2.37.0 → 2.39.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agents/README.md +61 -24
- package/.agents/agents/plan-critic.md +1 -1
- package/.agents/docs/SDLC.md +40 -40
- package/.agents/docs/agentrc-reference.json +1 -4
- package/.agents/docs/configuration.md +18 -18
- package/.agents/docs/execution-reference.md +3 -3
- package/.agents/docs/quality-gates.md +2 -2
- package/.agents/docs/workflows.md +6 -6
- package/.agents/instructions.md +5 -5
- package/.agents/rules/changelog-style.md +3 -3
- package/.agents/rules/ci-remediation.md +1 -1
- package/.agents/rules/git-conventions-reference.md +4 -4
- package/.agents/schemas/agentrc.schema.json +15 -16
- package/.agents/schemas/story-deliver-terminal.schema.json +2 -2
- package/.agents/schemas/validation-evidence.schema.json +1 -1
- package/.agents/scripts/acceptance-eval.js +1 -1
- package/.agents/scripts/apply-quality-bootstrap.js +1 -1
- package/.agents/scripts/audit-to-stories.js +2 -2
- package/.agents/scripts/check-doc-links.js +32 -4
- package/.agents/scripts/check-test-temp-hygiene.js +1 -1
- package/.agents/scripts/check-workflow-cli-lint.js +1 -1
- package/.agents/scripts/deliver-light.js +10 -10
- package/.agents/scripts/deliver-recover.js +1 -1
- package/.agents/scripts/drain-pending-cleanup.js +1 -1
- package/.agents/scripts/evidence-gate.js +1 -1
- package/.agents/scripts/generate-skills-index.js +158 -75
- package/.agents/scripts/generate-workflows-doc.js +1 -1
- package/.agents/scripts/lib/audit-suite/selector.js +1 -1
- package/.agents/scripts/lib/audit-to-stories/audit-label-taxonomy.js +1 -1
- package/.agents/scripts/lib/audit-to-stories/build-story-body.js +1 -1
- package/.agents/scripts/lib/audit-to-stories/seed-from-findings.js +5 -5
- package/.agents/scripts/lib/audit-to-stories/wire-dependencies.js +1 -1
- package/.agents/scripts/lib/bdd-runner-detect.js +1 -1
- package/.agents/scripts/lib/bdd-scenario-budget.js +1 -1
- package/.agents/scripts/lib/bdd-scenario-scanner.js +3 -3
- package/.agents/scripts/lib/bdd-step-index.js +1 -1
- package/.agents/scripts/lib/bootstrap/branch-protection.js +1 -1
- package/.agents/scripts/lib/bootstrap/commit-push.js +2 -2
- package/.agents/scripts/lib/bootstrap/issue-forms-template.js +1 -1
- package/.agents/scripts/lib/changed-files.js +100 -9
- package/.agents/scripts/lib/checks/core-bare-clean.js +1 -1
- package/.agents/scripts/lib/checks/story-init-not-backgrounded.js +1 -1
- package/.agents/scripts/lib/cli-args.js +1 -1
- package/.agents/scripts/lib/command-header.js +1 -1
- package/.agents/scripts/lib/config/delivery-routing.js +1 -1
- package/.agents/scripts/lib/config/explain.js +1 -1
- package/.agents/scripts/lib/config/runners.js +2 -2
- package/.agents/scripts/lib/config/runtime.js +1 -1
- package/.agents/scripts/lib/config/temp-paths.js +2 -2
- package/.agents/scripts/lib/config-settings-schema-delivery.js +3 -3
- package/.agents/scripts/lib/config-settings-schema-quality.js +6 -6
- package/.agents/scripts/lib/config-settings-schema.js +28 -10
- package/.agents/scripts/lib/duplicate-search.js +1 -1
- package/.agents/scripts/lib/feedback-loop/prior-feedback-fetcher.js +4 -4
- package/.agents/scripts/lib/feedback-loop/retro-proposals-graduator.js +1 -1
- package/.agents/scripts/lib/findings/classify-finding.js +1 -1
- package/.agents/scripts/lib/findings/promote-finding.js +12 -12
- package/.agents/scripts/lib/findings/route-finding.js +2 -2
- package/.agents/scripts/lib/generated/agentrc-validator.js +1 -1
- package/.agents/scripts/lib/git-branch-lifecycle.js +2 -2
- package/.agents/scripts/lib/label-constants.js +2 -2
- package/.agents/scripts/lib/label-taxonomy.js +1 -1
- package/.agents/scripts/lib/onboard/init-tail.js +4 -4
- package/.agents/scripts/lib/onboard/scaffold-docs.js +2 -2
- package/.agents/scripts/lib/orchestration/acceptance-eval-decision.js +1 -1
- package/.agents/scripts/lib/orchestration/code-review.js +4 -4
- package/.agents/scripts/lib/orchestration/complexity-gate.js +5 -5
- package/.agents/scripts/lib/orchestration/deliver-recover.js +3 -3
- package/.agents/scripts/lib/orchestration/docs-digest.js +3 -3
- package/.agents/scripts/lib/orchestration/lease-guard-shared.js +2 -2
- package/.agents/scripts/lib/orchestration/light-backstop.js +1 -1
- package/.agents/scripts/lib/orchestration/light-escalation.js +6 -6
- package/.agents/scripts/lib/orchestration/light-suitability.js +19 -19
- package/.agents/scripts/lib/orchestration/plan-context.js +4 -4
- package/.agents/scripts/lib/orchestration/plan-critic-conditions.js +2 -2
- package/.agents/scripts/lib/orchestration/plan-critics-evaluate.js +2 -2
- package/.agents/scripts/lib/orchestration/plan-metrics.js +1 -1
- package/.agents/scripts/lib/orchestration/plan-persist/persist-helpers.js +1 -1
- package/.agents/scripts/lib/orchestration/plan-persist/plan-context-source.js +3 -3
- package/.agents/scripts/lib/orchestration/plan-persist/run-plan-persist.js +6 -6
- package/.agents/scripts/lib/orchestration/plan-persist/story-ops.js +16 -16
- package/.agents/scripts/lib/orchestration/plan-persist/summary.js +3 -3
- package/.agents/scripts/lib/orchestration/plan-persist/supersede-ops.js +6 -6
- package/.agents/scripts/lib/orchestration/planning/authoring-context.js +7 -7
- package/.agents/scripts/lib/orchestration/planning/decomposer-context.js +1 -1
- package/.agents/scripts/lib/orchestration/planning/memory-pool-advisory.js +3 -3
- package/.agents/scripts/lib/orchestration/remote-verifier.js +2 -2
- package/.agents/scripts/lib/orchestration/resolve-stories.js +4 -4
- package/.agents/scripts/lib/orchestration/run-epilogue.js +2 -2
- package/.agents/scripts/lib/orchestration/single-story-close/phases/base-sync.js +2 -2
- package/.agents/scripts/lib/orchestration/single-story-close/phases/conventional-subject.js +1 -1
- package/.agents/scripts/lib/orchestration/single-story-close/phases/normalize-pr-title.js +5 -1
- package/.agents/scripts/lib/orchestration/single-story-close/phases/review-block.js +1 -1
- package/.agents/scripts/lib/orchestration/single-story-close/phases/wrong-tree-guard.js +3 -3
- package/.agents/scripts/lib/orchestration/single-story-close/runner.js +2 -2
- package/.agents/scripts/lib/orchestration/single-story-lease-guard.js +1 -1
- package/.agents/scripts/lib/orchestration/story-deliver-terminal.js +14 -12
- package/.agents/scripts/lib/orchestration/ticket-validator.js +1 -1
- package/.agents/scripts/lib/orchestration/ticketing/reads.js +3 -3
- package/.agents/scripts/lib/plan-phase-cleanup.js +1 -1
- package/.agents/scripts/lib/qa/resolve-qa-contract.js +58 -6
- package/.agents/scripts/lib/signals/schema.js +1 -1
- package/.agents/scripts/lib/skills/skills-index.js +168 -0
- package/.agents/scripts/lib/skills/walk-skill-files.js +133 -9
- package/.agents/scripts/lib/story-adjacency.js +2 -2
- package/.agents/scripts/lib/templates/decomposer-prompts.js +1 -1
- package/.agents/scripts/lib/ticket-body-sections.js +1 -1
- package/.agents/scripts/lib/util/concurrent-map.js +1 -1
- package/.agents/scripts/lib/util/parse-id-list.js +1 -1
- package/.agents/scripts/lib/wave-runner/live-probe.js +4 -4
- package/.agents/scripts/lib/wave-runner/ready-set.js +1 -1
- package/.agents/scripts/lib/workflow-closure.js +1 -1
- package/.agents/scripts/lib/worktree/lifecycle/pending-cleanup.js +2 -2
- package/.agents/scripts/lint-issue-body.js +3 -3
- package/.agents/scripts/plan-context.js +4 -4
- package/.agents/scripts/plan-critics.js +2 -2
- package/.agents/scripts/plan-persist.js +2 -2
- package/.agents/scripts/plan-run-epilogue.js +2 -2
- package/.agents/scripts/providers/github/board-add.js +1 -1
- package/.agents/scripts/providers/github/errors.js +1 -1
- package/.agents/scripts/providers/github/tickets.js +6 -6
- package/.agents/scripts/quality-preview.js +50 -9
- package/.agents/scripts/resolve-stories.js +3 -3
- package/.agents/scripts/resync-status-column.js +1 -1
- package/.agents/scripts/run-lint.js +1 -1
- package/.agents/scripts/single-story-close.js +2 -2
- package/.agents/scripts/single-story-init.js +5 -5
- package/.agents/scripts/stories-wave-tick.js +8 -8
- package/.agents/scripts/validate-skills.js +53 -66
- package/.agents/skills/core/idea-refinement/SKILL.md +5 -5
- package/.agents/skills/core/scope-triage/SKILL.md +3 -3
- package/.agents/skills/skills.index.json +1 -1
- package/.agents/skills/stack/qa/qa-harness/SKILL.md +1 -1
- package/.agents/workflows/audit-data-model.md +1 -1
- package/.agents/workflows/audit-documentation.md +2 -2
- package/.agents/workflows/audit-to-stories.md +11 -11
- package/.agents/workflows/git-deliver.md +4 -4
- package/.agents/workflows/helpers/_merge-conflict-template.md +1 -1
- package/.agents/workflows/helpers/audit-lens-core.md +1 -1
- package/.agents/workflows/helpers/code-review.md +4 -4
- package/.agents/workflows/helpers/deliver-light.md +26 -26
- package/.agents/workflows/helpers/deliver-reference.md +15 -7
- package/.agents/workflows/helpers/deliver-story-reference.md +9 -4
- package/.agents/workflows/helpers/deliver-story.md +6 -7
- package/.agents/workflows/helpers/diagnose.md +2 -2
- package/.agents/workflows/helpers/parallel-tooling.md +1 -1
- package/.agents/workflows/helpers/plan-reference.md +9 -9
- package/.agents/workflows/helpers/qa-core.md +8 -8
- package/.agents/workflows/helpers/worktree-lifecycle.md +6 -6
- package/.agents/workflows/{deliver.md → mandrel-deliver.md} +15 -19
- package/.agents/workflows/{plan.md → mandrel-plan.md} +9 -9
- package/.agents/workflows/memory-consolidate.md +4 -4
- package/.agents/workflows/prototype.md +3 -3
- package/.agents/workflows/qa-assist.md +12 -12
- package/.agents/workflows/qa-explore.md +6 -6
- package/.agents/workflows/qa-run.md +14 -6
- package/README.md +7 -7
- package/docs/CHANGELOG.md +23 -0
- package/lib/cli/doctor.js +1 -1
- package/lib/cli/init.js +1 -1
- package/lib/migrations/steps/2.2.0-retire-epic-ac-tags.js +1 -1
- package/package.json +1 -1
|
@@ -16,7 +16,7 @@ compose. This file is only for "which command does X?" lookups.
|
|
|
16
16
|
Every command file lives at `.agents/workflows/<name>.md` and is projected
|
|
17
17
|
into a flat `.claude/commands/` tree by `npm run sync:commands` (kept
|
|
18
18
|
current at install time and on every `mandrel sync`/`update`) so it shows
|
|
19
|
-
up as a bare `/<name>` slash command (e.g. `/deliver`). The projection
|
|
19
|
+
up as a bare `/<name>` slash command (e.g. `/mandrel-deliver`). The projection
|
|
20
20
|
writes only `.claude/commands/<name>.md` — there is no plugin manifest and no
|
|
21
21
|
marketplace listing. The commands load in every Claude Code environment.
|
|
22
22
|
|
|
@@ -52,16 +52,16 @@ description, edit the workflow file’s front-matter and regenerate.
|
|
|
52
52
|
| `/audit-security` | Audit dependency CVEs, input-validation gaps, secrets handling, and auth boundaries; emit a structured High/Medium/Low findings report. |
|
|
53
53
|
| `/audit-seo` | Audit SEO fundamentals and Generative Engine Optimization signals (meta, structured data, crawlability); only relevant for web targets. |
|
|
54
54
|
| `/audit-sre` | "Audit production-readiness for a release candidate: SLOs, observability, runbooks, error budgets, and rollback paths." |
|
|
55
|
-
| `/audit-to-stories` | Convert findings produced by the audit-\* workflows into actionable GitHub Stories. Reads temp/audits/audit-\*-results.md, groups findings cross-audit, deduplicates against existing Issues by fingerprint, and either chains into /plan --seed-file or opens standalone Stories. |
|
|
55
|
+
| `/audit-to-stories` | Convert findings produced by the audit-\* workflows into actionable GitHub Stories. Reads temp/audits/audit-\*-results.md, groups findings cross-audit, deduplicates against existing Issues by fingerprint, and either chains into /mandrel-plan --seed-file or opens standalone Stories. |
|
|
56
56
|
| `/audit-ux-ui` | Audit UX/UI consistency and design system adherence |
|
|
57
|
-
| `/deliver` | Unified delivery entry point. Takes Story ids or a plain-language prompt, derives which path the work belongs on, and lands it via the single deliver-story engine — story-<id> → PR → main. |
|
|
58
57
|
| `/git-cleanup` | Tidy the local checkout in four phases: fast-forward `main`, prune stale remote-tracking refs, sweep merged branches (squash-aware), and triage `git stash` entries — each step gated by operator confirmation. |
|
|
59
58
|
| `/git-deliver` | Single ad-hoc delivery command for working-tree changes. Detects the git setup and escalates to the right terminal step — commit only, commit + push, or commit + push + open a PR with native auto-merge — picking the default from observable state and letting flags pin any level explicitly. Replaces the retired git-commit-all, git-push, and git-pr-all trio. |
|
|
59
|
+
| `/mandrel-deliver` | Unified delivery entry point. Takes Story ids or a plain-language prompt, derives which path the work belongs on, and lands it via the single deliver-story engine — story-<id> → PR → main. |
|
|
60
|
+
| `/mandrel-plan` | Unified planning entry point. Interrogate → author → persist. Emits one Story by default; splits into N>1 only under the default-single split policy. |
|
|
60
61
|
| `/mandrel-update` | npm-era upgrade wraparound for a Mandrel consumer. Runs `npx mandrel update` (resolve newest published version → install → re-materialize `.agents/` → migrate → doctor → surface changelog) as the single mechanical step, then walks the operator through the judgment wraparound the CLI deliberately leaves unowned: reconcile `.agentrc.json`, install the stabilized quality-gate surface, refresh the harness permission allowlist, reconcile the consumer's `AGENTS.md` / runbooks against the surfaced changelog, and stage + commit the staged lockfile bump. |
|
|
61
|
-
| `/memory-consolidate` | Attended consolidation pass over this project's agent memory pool — merge duplicates, verify claims against the current tree, prune with operator confirmation, rewrite the index, and stamp the pool so the /plan advisory goes quiet. |
|
|
62
|
-
| `/plan` | Unified planning entry point. Interrogate → author → persist. Emits one Story by default; splits into N>1 only under the default-single split policy. |
|
|
62
|
+
| `/memory-consolidate` | Attended consolidation pass over this project's agent memory pool — merge duplicates, verify claims against the current tree, prune with operator confirmation, rewrite the index, and stamp the pool so the /mandrel-plan advisory goes quiet. |
|
|
63
63
|
| `/prototype` | Operator-invoked UI prototype pass. Discovers the consumer's design-system SSOT first, then — only after the operator confirms — writes exactly one self-contained HTML file under the gitignored workspace-root temp tree, so a layout can be reviewed before its UI acceptance criteria are authored. |
|
|
64
|
-
| `/qa-assist` | Human-led QA assist loop — set up, then ride a rolling multi-observation intake session. The operator reports observations in any order; the agent enriches each (repro + root-cause file:line + coverage verdict for bugs; analysis + options + recommendation for enhancements), asks clarifying questions only when ambiguous, and appends a redacted ledger item — recording, never planning — to a persistent, resumable session under temp/qa/. Only when the operator says they are done does it review the full ledger and hand off to /plan. |
|
|
64
|
+
| `/qa-assist` | Human-led QA assist loop — set up, then ride a rolling multi-observation intake session. The operator reports observations in any order; the agent enriches each (repro + root-cause file:line + coverage verdict for bugs; analysis + options + recommendation for enhancements), asks clarifying questions only when ambiguous, and appends a redacted ledger item — recording, never planning — to a persistent, resumable session under temp/qa/. Only when the operator says they are done does it review the full ledger and hand off to /mandrel-plan. |
|
|
65
65
|
| `/qa-explore` | Agent-led exploratory-QA loop — the agent Plans a surface with an explicit static-vs-drive method choice, drives it (browser MCP or static), and captures ledger items read-only, then Triages — a bounded per-surface session, HITL-gated at every phase transition, routed through the shared dedup/coverage/classification/missing-test/redaction/session core under temp/qa/ |
|
|
66
66
|
| `/qa-run` | Drive Gherkin scenarios through a real browser as an agent-driven QA sweep |
|
|
67
67
|
|
package/.agents/instructions.md
CHANGED
|
@@ -114,7 +114,7 @@ always wins regardless of tier.
|
|
|
114
114
|
## 2. FinOps & Token Budgeting (Economic Guardrails)
|
|
115
115
|
|
|
116
116
|
Mandrel does not enforce live LLM spend; your host owns session quota.
|
|
117
|
-
Fixed framework ceilings (the `/plan` context envelope, plan-time Story
|
|
117
|
+
Fixed framework ceilings (the `/mandrel-plan` context envelope, plan-time Story
|
|
118
118
|
sizing) **fail closed** naming what to trim:
|
|
119
119
|
[`docs/execution-reference.md`](docs/execution-reference.md#finops--token-budgeting-economic-guardrails).
|
|
120
120
|
|
|
@@ -132,7 +132,7 @@ sizing) **fail closed** naming what to trim:
|
|
|
132
132
|
`acceptance[]` / `verify[]`); prefer targeted retrieval over broad
|
|
133
133
|
reads.
|
|
134
134
|
2. **Plan First.** For non-trivial tasks (3+ steps or architectural
|
|
135
|
-
decisions), update the Story's `## Spec` via `/plan` before code.
|
|
135
|
+
decisions), update the Story's `## Spec` via `/mandrel-plan` before code.
|
|
136
136
|
3. **Artifacts over Chat.** Write test/build/debug output to log
|
|
137
137
|
files, not into chat.
|
|
138
138
|
4. **Idempotency.** Scripts must be safe to run repeatedly.
|
|
@@ -174,10 +174,10 @@ prompted.
|
|
|
174
174
|
The v2 ticket model is Story-only: `acceptance[]` / `verify[]` live
|
|
175
175
|
inline plus the folded Tech Spec in `## Spec` (over-budget Specs fail
|
|
176
176
|
closed — split or tighten; never write Specs under `docs/`). Optional
|
|
177
|
-
`depends_on` edges order rare multi-Story runs, resolved by `/deliver`
|
|
177
|
+
`depends_on` edges order rare multi-Story runs, resolved by `/mandrel-deliver`
|
|
178
178
|
from live state; the `plan-run::<id>` label is filter metadata only.
|
|
179
179
|
Commit subjects reference the Story via `(refs #<storyId>)`. There is no
|
|
180
|
-
`type::epic` / `type::task` label; `/deliver` refuses tickets carrying an
|
|
180
|
+
`type::epic` / `type::task` label; `/mandrel-deliver` refuses tickets carrying an
|
|
181
181
|
`Epic: #N` footer.
|
|
182
182
|
|
|
183
183
|
---
|
|
@@ -192,7 +192,7 @@ anything under it.
|
|
|
192
192
|
|
|
193
193
|
## 7. Complexity-Aware Execution
|
|
194
194
|
|
|
195
|
-
`/plan` sizes each Story as a **capability slice a frontier model
|
|
195
|
+
`/mandrel-plan` sizes each Story as a **capability slice a frontier model
|
|
196
196
|
delivers and self-verifies in one pass** — a broad footprint is normal
|
|
197
197
|
when the change is cohesive (backstop: `DEFAULT_MODEL_CAPACITY` in
|
|
198
198
|
`ticket-validator-sizing.js`); do not re-slice it into per-module
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
This rule governs the shape of per-release entries in the project CHANGELOG
|
|
4
4
|
(typically `docs/CHANGELOG.md` or `CHANGELOG.md`). It applies whenever a
|
|
5
5
|
release entry is authored or edited — most commonly inside Story #N's
|
|
6
|
-
docs sweep before `/deliver` opens the release PR.
|
|
6
|
+
docs sweep before `/mandrel-deliver` opens the release PR.
|
|
7
7
|
|
|
8
8
|
The contract is **guidance-tier**: no automated gate fails a close when an
|
|
9
9
|
entry drifts off-template. It still binds every author.
|
|
@@ -152,12 +152,12 @@ worktree cleanup.
|
|
|
152
152
|
- **Shared-store worktrees.** Per-story worktrees link a shared
|
|
153
153
|
`node_modules` store, so parallel waves no longer duplicate installs
|
|
154
154
|
or leave residue that blocks reap.
|
|
155
|
-
- **`/deliver` auto-invokes pre-merge gates** (code review, retro)
|
|
155
|
+
- **`/mandrel-deliver` auto-invokes pre-merge gates** (code review, retro)
|
|
156
156
|
inline. `--skip-code-review` is available as an override.
|
|
157
157
|
- **Closure sweep covers Epic Health tickets** in addition to PRD and
|
|
158
158
|
Tech Spec tickets.
|
|
159
159
|
- **Stale-lock sweep** on the shared `.git/` directory runs at
|
|
160
|
-
`/deliver` start, clearing lock files left behind by interrupted
|
|
160
|
+
`/mandrel-deliver` start, clearing lock files left behind by interrupted
|
|
161
161
|
operations.
|
|
162
162
|
```
|
|
163
163
|
|
|
@@ -31,7 +31,7 @@ exactly one of two ways, and no others:
|
|
|
31
31
|
delivery's scope — a pre-existing flaky test, a runner/infra weakness, a
|
|
32
32
|
framework-level environment gap. Open the issue with the `meta::framework-gap`
|
|
33
33
|
label (see [`git-conventions.md`](git-conventions.md)) carrying **the run
|
|
34
|
-
link and the failure signature** so a later `/plan` Phase 0 sweep can act on
|
|
34
|
+
link and the failure signature** so a later `/mandrel-plan` Phase 0 sweep can act on
|
|
35
35
|
it. Remediate this delivery only if the pre-existing defect is genuinely
|
|
36
36
|
blocking it.
|
|
37
37
|
|
|
@@ -95,7 +95,7 @@ signature is worth naming:
|
|
|
95
95
|
**Invariant (stated in the core): the delivering flow owns tidying the local
|
|
96
96
|
checkout — reaping its own merged refs and fast-forwarding the base branch.
|
|
97
97
|
`/git-cleanup` is a recovery tool, not a routine chore.** The outcome every
|
|
98
|
-
delivering flow (`/deliver`, `/git-deliver`) guarantees, with the mechanics
|
|
98
|
+
delivering flow (`/mandrel-deliver`, `/git-deliver`) guarantees, with the mechanics
|
|
99
99
|
owned by `boot-sweep.js` / `git-cleanup.js`:
|
|
100
100
|
|
|
101
101
|
- **`main` is fast-forwarded** by the flow itself in its cleanup phase, so the
|
|
@@ -104,7 +104,7 @@ owned by `boot-sweep.js` / `git-cleanup.js`:
|
|
|
104
104
|
- **Merged local refs are reaped** at the next workflow boot's protected sweep
|
|
105
105
|
(`boot-sweep.js`) — every local branch whose PR is already merged, skipping
|
|
106
106
|
any candidate with unpushed work, a dirty worktree, or a still-open parent
|
|
107
|
-
ticket. `/plan` and `/git-deliver` widen the sweep's `--include` scope beyond
|
|
107
|
+
ticket. `/mandrel-plan` and `/git-deliver` widen the sweep's `--include` scope beyond
|
|
108
108
|
the default `story-*` to their own branch namespaces at their boot call site.
|
|
109
109
|
- **Content-merged branches are report-only.** A branch detected only via the
|
|
110
110
|
weaker content-equivalence signal (`detectedBy: 'content-merged'` — content
|
|
@@ -149,13 +149,13 @@ different hazards:
|
|
|
149
149
|
- **Recognition signature**: close aborts naming stray files in the main
|
|
150
150
|
checkout that intersect the Story's diff. **Resolution**: relocate those
|
|
151
151
|
edits under the worktree, restore the main checkout
|
|
152
|
-
(`git -C <main-repo> checkout -- <files>`), then re-run `/deliver <storyId>`.
|
|
152
|
+
(`git -C <main-repo> checkout -- <files>`), then re-run `/mandrel-deliver <storyId>`.
|
|
153
153
|
Never `git reset --hard` or `git checkout --force` to clear the way.
|
|
154
154
|
|
|
155
155
|
## Meta Labels (Retrospective Signal Routing)
|
|
156
156
|
|
|
157
157
|
Two `meta::*` labels route retrospective signals into durable substrates so
|
|
158
|
-
the `/plan` Phase 0 fetcher (see
|
|
158
|
+
the `/mandrel-plan` Phase 0 fetcher (see
|
|
159
159
|
[`prior-feedback-fetcher.js`](../scripts/lib/feedback-loop/prior-feedback-fetcher.js))
|
|
160
160
|
can surface open feedback issues to the planner. Both labels live in
|
|
161
161
|
[`label-constants.js`](../scripts/lib/label-constants.js) under the
|
|
@@ -298,7 +298,7 @@
|
|
|
298
298
|
},
|
|
299
299
|
"planning": {
|
|
300
300
|
"type": "object",
|
|
301
|
-
"description": "Inputs to `/plan`: risk escalation heuristics, ceremony-lite routing, and the cross-Story conflict-finding severity gates.",
|
|
301
|
+
"description": "Inputs to `/mandrel-plan`: risk escalation heuristics, ceremony-lite routing, and the cross-Story conflict-finding severity gates.",
|
|
302
302
|
"properties": {
|
|
303
303
|
"riskHeuristics": {
|
|
304
304
|
"oneOf": [
|
|
@@ -440,7 +440,7 @@
|
|
|
440
440
|
},
|
|
441
441
|
"delivery": {
|
|
442
442
|
"type": "object",
|
|
443
|
-
"description": "Everything `/deliver` and `single-story-close` consume: execution timeouts, worktree isolation, runner concurrency, docs freshness, signals, quality gates, merge/CI watch, review ceremony, and the feedback loop.",
|
|
443
|
+
"description": "Everything `/mandrel-deliver` and `single-story-close` consume: execution timeouts, worktree isolation, runner concurrency, docs freshness, signals, quality gates, merge/CI watch, review ceremony, and the feedback loop.",
|
|
444
444
|
"properties": {
|
|
445
445
|
"execution": {
|
|
446
446
|
"type": "object",
|
|
@@ -521,12 +521,12 @@
|
|
|
521
521
|
},
|
|
522
522
|
"deliverRunner": {
|
|
523
523
|
"type": "object",
|
|
524
|
-
"description": "Bounded-concurrency knob for the /deliver fan-out.",
|
|
524
|
+
"description": "Bounded-concurrency knob for the /mandrel-deliver fan-out.",
|
|
525
525
|
"properties": {
|
|
526
526
|
"concurrencyCap": {
|
|
527
527
|
"type": "integer",
|
|
528
528
|
"minimum": 1,
|
|
529
|
-
"description": "Maximum ready Stories dispatched by /deliver at once. Default 3. Moderate by design — keeps host-quota consumption predictable while allowing a small ready-set fan-out. Set 1 for strictly sequential delivery; raise further on hosts with adequate parallel-agent quota. See deliver.md for the sequencing model and throughput tradeoff.",
|
|
529
|
+
"description": "Maximum ready Stories dispatched by /mandrel-deliver at once. Default 3. Moderate by design — keeps host-quota consumption predictable while allowing a small ready-set fan-out. Set 1 for strictly sequential delivery; raise further on hosts with adequate parallel-agent quota. See deliver.md for the sequencing model and throughput tradeoff.",
|
|
530
530
|
"default": 3
|
|
531
531
|
},
|
|
532
532
|
"footprintGuard": {
|
|
@@ -1628,7 +1628,7 @@
|
|
|
1628
1628
|
},
|
|
1629
1629
|
"navigability": {
|
|
1630
1630
|
"type": "object",
|
|
1631
|
-
"description": "Navigability lens + journey-suite config (Epic #4131, F2/F3/F1/F4). Read by audit-suite/selector.js (route globs) and /deliver's per-Story ceremony (journey suite). Opt-in: absent or empty routeGlobs degrades to a silent no-op.",
|
|
1631
|
+
"description": "Navigability lens + journey-suite config (Epic #4131, F2/F3/F1/F4). Read by audit-suite/selector.js (route globs) and /mandrel-deliver's per-Story ceremony (journey suite). Opt-in: absent or empty routeGlobs degrades to a silent no-op.",
|
|
1632
1632
|
"properties": {
|
|
1633
1633
|
"routeGlobs": {
|
|
1634
1634
|
"type": "array",
|
|
@@ -1648,7 +1648,7 @@
|
|
|
1648
1648
|
},
|
|
1649
1649
|
"journeySuite": {
|
|
1650
1650
|
"type": "string",
|
|
1651
|
-
"description": "Path or command for the per-persona journey suite /deliver's per-Story ceremony runs."
|
|
1651
|
+
"description": "Path or command for the per-persona journey suite /mandrel-deliver's per-Story ceremony runs."
|
|
1652
1652
|
}
|
|
1653
1653
|
},
|
|
1654
1654
|
"additionalProperties": false
|
|
@@ -1692,7 +1692,7 @@
|
|
|
1692
1692
|
},
|
|
1693
1693
|
"codeReview": {
|
|
1694
1694
|
"type": "object",
|
|
1695
|
-
"description": "Review-provider chain plus bounded-retry knobs for the /deliver code-review ceremony.",
|
|
1695
|
+
"description": "Review-provider chain plus bounded-retry knobs for the /mandrel-deliver code-review ceremony.",
|
|
1696
1696
|
"properties": {
|
|
1697
1697
|
"providers": {
|
|
1698
1698
|
"type": "array",
|
|
@@ -1780,7 +1780,7 @@
|
|
|
1780
1780
|
"maxFixAttempts": {
|
|
1781
1781
|
"type": "integer",
|
|
1782
1782
|
"minimum": 0,
|
|
1783
|
-
"description": "Maximum auto-fix retry attempts per finding in /deliver Phase 5 (code-review). 0 disables auto-fix. Default 3.",
|
|
1783
|
+
"description": "Maximum auto-fix retry attempts per finding in /mandrel-deliver Phase 5 (code-review). 0 disables auto-fix. Default 3.",
|
|
1784
1784
|
"default": 3
|
|
1785
1785
|
},
|
|
1786
1786
|
"maxFixScopeFiles": {
|
|
@@ -1792,7 +1792,7 @@
|
|
|
1792
1792
|
"autoFixSeverity": {
|
|
1793
1793
|
"type": "string",
|
|
1794
1794
|
"enum": ["high", "medium"],
|
|
1795
|
-
"description": "Severity threshold for on-branch remediation in /deliver Phase 5 (code-review). `medium` (default) routes 🔴/🟠/🟡 findings into the host-LLM focused-fix routing (Mediums batched per lens: one commit per lens, a single validation + rescan at the end) while 🟢 suggestions still graduate to follow-up issues; `high` reproduces the pre-4399 Critical/High-only routing. Hard cutover — no back-compat flag.",
|
|
1795
|
+
"description": "Severity threshold for on-branch remediation in /mandrel-deliver Phase 5 (code-review). `medium` (default) routes 🔴/🟠/🟡 findings into the host-LLM focused-fix routing (Mediums batched per lens: one commit per lens, a single validation + rescan at the end) while 🟢 suggestions still graduate to follow-up issues; `high` reproduces the pre-4399 Critical/High-only routing. Hard cutover — no back-compat flag.",
|
|
1796
1796
|
"default": "medium"
|
|
1797
1797
|
}
|
|
1798
1798
|
},
|
|
@@ -1921,7 +1921,9 @@
|
|
|
1921
1921
|
},
|
|
1922
1922
|
"advisoryAllowlist": {
|
|
1923
1923
|
"type": "array",
|
|
1924
|
-
"items": {
|
|
1924
|
+
"items": {
|
|
1925
|
+
"type": "string"
|
|
1926
|
+
},
|
|
1925
1927
|
"description": "Story #5096. Check-run names exempt from blockOnAdvisoryFailure — a red run whose name matches exactly never blocks arming. Matching is exact; an unnamed run can never match and always blocks.",
|
|
1926
1928
|
"default": []
|
|
1927
1929
|
}
|
|
@@ -1985,7 +1987,7 @@
|
|
|
1985
1987
|
},
|
|
1986
1988
|
"environments": {
|
|
1987
1989
|
"type": "object",
|
|
1988
|
-
"description": "Deployment targets the QA harness can run against (Epic #4326). A map keyed by environment name (e.g. `local`, `staging`), each carrying its own `baseUrl`,
|
|
1990
|
+
"description": "Deployment targets the QA harness can run against (Epic #4326). A map keyed by environment name (e.g. `local`, `staging`), each carrying its own `baseUrl`, an optional per-environment sign-in seam, and an optional `allowWrites` gate. `signInSeam` is the union `{ urlTemplate }` (a dev impersonation route) or `{ skill }` (a skill id such as `stack/qa/acme-sso`, resolved against `.agents/skills/` then the consumer-writable `.agents/local/skills/` zone, and rejected loudly by resolveQaEnvironment when it resolves under neither); omit it entirely for a target with no sign-in seam. resolveQaEnvironment selects one environment per invocation by name or by raw-URL origin match against `baseUrl`; `allowWrites` defaults to true only for the `local` environment. Replaces the retired top-level single `signInSeam`.",
|
|
1989
1991
|
"default": {
|
|
1990
1992
|
"local": {
|
|
1991
1993
|
"baseUrl": "http://localhost:3000",
|
|
@@ -1995,9 +1997,6 @@
|
|
|
1995
1997
|
},
|
|
1996
1998
|
"staging": {
|
|
1997
1999
|
"baseUrl": "https://staging.example.test",
|
|
1998
|
-
"signInSeam": {
|
|
1999
|
-
"skill": "stack/qa/sign-in"
|
|
2000
|
-
},
|
|
2001
2000
|
"allowWrites": false
|
|
2002
2001
|
}
|
|
2003
2002
|
},
|
|
@@ -2048,7 +2047,7 @@
|
|
|
2048
2047
|
"type": "boolean"
|
|
2049
2048
|
}
|
|
2050
2049
|
},
|
|
2051
|
-
"required": ["baseUrl"
|
|
2050
|
+
"required": ["baseUrl"],
|
|
2052
2051
|
"additionalProperties": false
|
|
2053
2052
|
}
|
|
2054
2053
|
},
|
|
@@ -2059,7 +2058,7 @@
|
|
|
2059
2058
|
"credentialRef": "QA_ADMIN_CREDENTIAL"
|
|
2060
2059
|
},
|
|
2061
2060
|
"member": {
|
|
2062
|
-
"
|
|
2061
|
+
"credentialRef": "QA_MEMBER_CREDENTIAL"
|
|
2063
2062
|
}
|
|
2064
2063
|
},
|
|
2065
2064
|
"oneOf": [
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
},
|
|
22
22
|
"status": {
|
|
23
23
|
"type": "string",
|
|
24
|
-
"description": "landed — the PR merged, the Story is agent::done, and the post-land tail was attempted. pending — a bounded wait expired with the PR still in flight; NO label was mutated and no merge.unlanded event was emitted, so the run is resumable via nextCommand. blocked — a classified hard block; the Story carries agent::blocked and blocked.blockClass names the class. failed — a phase crashed; phase names which one. escalated — the /deliver-light suitability gate refused an over-scope prompt under --yes; nothing was created and the session ENDS here, nextCommand naming the /plan invocation that owns the work instead.",
|
|
24
|
+
"description": "landed — the PR merged, the Story is agent::done, and the post-land tail was attempted. pending — a bounded wait expired with the PR still in flight; NO label was mutated and no merge.unlanded event was emitted, so the run is resumable via nextCommand. blocked — a classified hard block; the Story carries agent::blocked and blocked.blockClass names the class. failed — a phase crashed; phase names which one. escalated — the /deliver-light suitability gate refused an over-scope prompt under --yes; nothing was created and the session ENDS here, nextCommand naming the /mandrel-plan invocation that owns the work instead.",
|
|
25
25
|
"enum": ["landed", "pending", "blocked", "failed", "escalated"]
|
|
26
26
|
},
|
|
27
27
|
"phase": {
|
|
@@ -173,7 +173,7 @@
|
|
|
173
173
|
},
|
|
174
174
|
"nextCommand": {
|
|
175
175
|
"type": ["string", "null"],
|
|
176
|
-
"description": "The single command that advances this work from where it stopped, or null when status === \"landed\" and nothing remains. Shares its vocabulary with deliver-recover.js so recovery and normal resumption speak one language. For status escalated it is the /plan invocation the operator runs in a FRESH session — the one case where the command is a slash command rather than a script, because the work needs planning, not resumption.",
|
|
176
|
+
"description": "The single command that advances this work from where it stopped, or null when status === \"landed\" and nothing remains. Shares its vocabulary with deliver-recover.js so recovery and normal resumption speak one language. For status escalated it is the /mandrel-plan invocation the operator runs in a FRESH session — the one case where the command is a slash command rather than a script, because the work needs planning, not resumption.",
|
|
177
177
|
"minLength": 1
|
|
178
178
|
},
|
|
179
179
|
"elapsedSeconds": { "type": "number", "minimum": 0 },
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"$id": "validation-evidence",
|
|
4
4
|
"title": "Validation Evidence",
|
|
5
|
-
"description": "Per-scope record of which validation gates have passed against which commit SHA. Written by lib/validation-evidence.js under the per-Epic temp tree at temp/run-<id>/validation-evidence.json (Epic-scoped) or temp/run-<id>/stories/story-<storyId>/validation-evidence.json (Story-scoped). Standalone Stories (no parent Epic) use a storyId-anchored keyspace at temp/standalone/stories/story-<storyId>/validation-evidence.json. All paths are gitignored via temp/. Consumed by close-validation, epic-code-review, the acceptance self-eval critic, and /deliver Phase 3 (close-validation) to skip identical re-runs against an already-validated tree. The `storyId` field carries the scope id and equals the epic id for Epic-scoped records.",
|
|
5
|
+
"description": "Per-scope record of which validation gates have passed against which commit SHA. Written by lib/validation-evidence.js under the per-Epic temp tree at temp/run-<id>/validation-evidence.json (Epic-scoped) or temp/run-<id>/stories/story-<storyId>/validation-evidence.json (Story-scoped). Standalone Stories (no parent Epic) use a storyId-anchored keyspace at temp/standalone/stories/story-<storyId>/validation-evidence.json. All paths are gitignored via temp/. Consumed by close-validation, epic-code-review, the acceptance self-eval critic, and /mandrel-deliver Phase 3 (close-validation) to skip identical re-runs against an already-validated tree. The `storyId` field carries the scope id and equals the epic id for Epic-scoped records.",
|
|
6
6
|
"type": "object",
|
|
7
7
|
"required": ["storyId", "schemaVersion", "records"],
|
|
8
8
|
"properties": {
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
* and the resolved, undisableable round cap
|
|
21
21
|
* (`delivery.acceptanceEval.maxRounds`, clamped to `[1, ceiling]`).
|
|
22
22
|
* 3. Emit one per-criterion `acceptance-eval` signal into the retro /
|
|
23
|
-
* feedback substrate so the retro and `/plan` Phase 0 feedback
|
|
23
|
+
* feedback substrate so the retro and `/mandrel-plan` Phase 0 feedback
|
|
24
24
|
* fetch can see which acceptance items needed rework and the round
|
|
25
25
|
* count.
|
|
26
26
|
* 4. Print a single JSON envelope and exit:
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
*
|
|
21
21
|
* Story #5007 retired the second step. `migrateBaselinesLayout` relocated
|
|
22
22
|
* per-Epic ratchet snapshots into `temp/epic/<id>/baselines/` on the contract
|
|
23
|
-
* that `/deliver` reaps that namespace on merge — a mechanism the Story-only
|
|
23
|
+
* that `/mandrel-deliver` reaps that namespace on merge — a mechanism the Story-only
|
|
24
24
|
* v2 model deleted, so the migration moved dead data into a namespace no code
|
|
25
25
|
* path writes, reads, or reaps. Its one residual hygiene value (getting the
|
|
26
26
|
* committed `baselines/epic/` tree out of version control) survives as
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* stdout when --json is set).
|
|
14
14
|
*
|
|
15
15
|
* --emit-plan-seed --plan <plan.json> --out <path>
|
|
16
|
-
* Read the plan envelope from disk, render the `/plan --seed`
|
|
16
|
+
* Read the plan envelope from disk, render the `/mandrel-plan --seed`
|
|
17
17
|
* seed markdown, persist to --out.
|
|
18
18
|
*
|
|
19
19
|
* --emit-stories --plan <plan.json>
|
|
@@ -844,7 +844,7 @@ runAsCli(import.meta.url, main, {
|
|
|
844
844
|
flags: [
|
|
845
845
|
['--scan', 'Print the grouped, deduplicated plan as JSON.'],
|
|
846
846
|
['--auto', 'Run the full scan → file pipeline and print the summary.'],
|
|
847
|
-
['--emit-plan-seed', 'Emit a /plan --seed-file document.'],
|
|
847
|
+
['--emit-plan-seed', 'Emit a /mandrel-plan --seed-file document.'],
|
|
848
848
|
['--emit-stories', 'Emit the Story drafts as JSON.'],
|
|
849
849
|
[
|
|
850
850
|
'--wire-edges',
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
//
|
|
20
20
|
// 3. No active doc mentions any retired slash command. The retired-command
|
|
21
21
|
// blocklist is seeded with `agents-bootstrap-github`,
|
|
22
|
-
// `single-story-plan` (renamed to `/plan`), and `mandrel`
|
|
22
|
+
// `single-story-plan` (renamed to `/mandrel-plan`), and `mandrel`
|
|
23
23
|
// (retired in favor of the generated `.agents/docs/workflows.md`
|
|
24
24
|
// catalog) and takes precedence over the workflow-resolution check —
|
|
25
25
|
// a retired token is always a non-zero exit even if a stale workflow
|
|
@@ -61,6 +61,18 @@ export const RETIRED_COMMANDS = new Set([
|
|
|
61
61
|
'git-merge-pr',
|
|
62
62
|
]);
|
|
63
63
|
|
|
64
|
+
// Command spellings a *historical* record may still name, keyed by the file
|
|
65
|
+
// allowed to name them. A decisions log that cannot quote the name a command
|
|
66
|
+
// had is a broken record: an ADR describes the world as it was, so freezing
|
|
67
|
+
// its prose is the point. Scoped per-file and per-token rather than
|
|
68
|
+
// allowlisted globally — everywhere else these are simply wrong, and a typo
|
|
69
|
+
// like `/mandrl-plan` must still fail here. Story #5126 renamed `/plan` →
|
|
70
|
+
// `/mandrel-plan` and `/deliver` → `/mandrel-deliver`; the ADRs that decided
|
|
71
|
+
// the Story-only model still name them as they were called then.
|
|
72
|
+
export const SUPERSEDED_COMMAND_SPELLINGS = new Map([
|
|
73
|
+
['docs/decisions.md', new Set(['plan', 'deliver'])],
|
|
74
|
+
]);
|
|
75
|
+
|
|
64
76
|
// Tokens that look like `/foo` in prose but are not slash commands. Tokens
|
|
65
77
|
// are stored WITHOUT the leading slash. The list focuses on common URL path
|
|
66
78
|
// fragments and on-disk path roots that appear in tutorial prose. The
|
|
@@ -379,6 +391,20 @@ export function extractSlashTokens(masked) {
|
|
|
379
391
|
|
|
380
392
|
// --- Per-file check --------------------------------------------------------
|
|
381
393
|
|
|
394
|
+
/**
|
|
395
|
+
* The slash tokens `relFile` may name without resolving to a workflow: the
|
|
396
|
+
* global allowlist, plus any superseded spelling this particular file is
|
|
397
|
+
* allowed to quote.
|
|
398
|
+
*
|
|
399
|
+
* @param {string} relFile Repo-relative path of the file being checked.
|
|
400
|
+
* @returns {Set<string>} Tokens to skip, stored without the leading slash.
|
|
401
|
+
*/
|
|
402
|
+
function slashAllowlistFor(relFile) {
|
|
403
|
+
const superseded = SUPERSEDED_COMMAND_SPELLINGS.get(relFile);
|
|
404
|
+
if (!superseded) return SLASH_ALLOWLIST;
|
|
405
|
+
return new Set([...SLASH_ALLOWLIST, ...superseded]);
|
|
406
|
+
}
|
|
407
|
+
|
|
382
408
|
export function checkFile(absPath, repoRoot) {
|
|
383
409
|
const violations = [];
|
|
384
410
|
const source = fs.readFileSync(absPath, 'utf8');
|
|
@@ -454,14 +480,16 @@ export function checkFile(absPath, repoRoot) {
|
|
|
454
480
|
}
|
|
455
481
|
}
|
|
456
482
|
|
|
457
|
-
// 3. Slash-command resolution. Skip retired hits (already reported)
|
|
458
|
-
// allowlisted tokens
|
|
483
|
+
// 3. Slash-command resolution. Skip retired hits (already reported),
|
|
484
|
+
// allowlisted tokens, and a superseded spelling in the one file allowed
|
|
485
|
+
// to quote it (SUPERSEDED_COMMAND_SPELLINGS). A command is valid if it resolves to a top-level
|
|
459
486
|
// workflow file OR to a helpers/ module (helpers are not projected into
|
|
460
487
|
// the `.claude/commands/` tree but are still legitimate named workflows
|
|
461
488
|
// that parent workflows invoke by prose reference).
|
|
489
|
+
const slashAllowlist = slashAllowlistFor(relFile);
|
|
462
490
|
for (const { token, line } of slashTokens) {
|
|
463
491
|
if (RETIRED_COMMANDS.has(token)) continue;
|
|
464
|
-
if (
|
|
492
|
+
if (slashAllowlist.has(token)) continue;
|
|
465
493
|
// Namespaced loop commands (`/loops:<name>`, Story #4289) resolve to a
|
|
466
494
|
// loop unit under `.agents/workflows/loops/<name>.md`. Split on the `:`
|
|
467
495
|
// and resolve the namespaced path rather than a flat `loops:<name>.md`.
|
|
@@ -422,7 +422,7 @@ export function findReservedIdStreamFiles(tempDir) {
|
|
|
422
422
|
* the **repository-root** temp tree (Story #4892).
|
|
423
423
|
*
|
|
424
424
|
* Resolution matters more than it looks: every writer anchors a relative
|
|
425
|
-
* `tempRoot` to the *main checkout* (so a Story worktree and its `/deliver`
|
|
425
|
+
* `tempRoot` to the *main checkout* (so a Story worktree and its `/mandrel-deliver`
|
|
426
426
|
* host converge on one ledger), so a guard that scanned `cwd` would scan an
|
|
427
427
|
* empty worktree tree and pass vacuously on the very tree it is meant to
|
|
428
428
|
* protect. `resolveRoot` is the injection seam for tests.
|
|
@@ -136,7 +136,7 @@ export function toParagraphs(lines) {
|
|
|
136
136
|
* heading (inclusive) — i.e. the section is *about* that script, so the
|
|
137
137
|
* table is restating its surface.
|
|
138
138
|
*
|
|
139
|
-
* A slash command's own argument table (`/plan`, `/deliver`) has no script
|
|
139
|
+
* A slash command's own argument table (`/mandrel-plan`, `/mandrel-deliver`) has no script
|
|
140
140
|
* behind it — nothing owns those flags but the workflow prose itself — so
|
|
141
141
|
* condition 2 leaves it alone by design.
|
|
142
142
|
*
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*
|
|
6
6
|
* A **thin entry point, not a second delivery engine.** It runs the
|
|
7
7
|
* suitability gate, authors a minimal receipt `type::story`, and then hands off
|
|
8
|
-
* to the SAME engine scripts `/deliver` uses:
|
|
8
|
+
* to the SAME engine scripts `/mandrel-deliver` uses:
|
|
9
9
|
*
|
|
10
10
|
* suitability gate → inline receipt Story → single-story-init.js
|
|
11
11
|
* → (agent implements + self-evals) → diff backstop
|
|
@@ -38,9 +38,9 @@
|
|
|
38
38
|
* envelope with status `escalated` and **ends the session**. Before that it was
|
|
39
39
|
* an ordinary gate envelope plus exit 2 — a warning a caller could walk past,
|
|
40
40
|
* and one mandrel-bench 2.13.0 light-arm run did exactly that: it read the
|
|
41
|
-
* escalation, invoked `/plan` in the same session, and delivered. In-session
|
|
41
|
+
* escalation, invoked `/mandrel-plan` in the same session, and delivered. In-session
|
|
42
42
|
* planning under-decomposed (ONE Story against the scenario's 3-5 contract,
|
|
43
|
-
* where a fresh `/plan` session on the identical seed authored four), so
|
|
43
|
+
* where a fresh `/mandrel-plan` session on the identical seed authored four), so
|
|
44
44
|
* escalation silently produced the outcome the guard exists to prevent.
|
|
45
45
|
* {@link module:lib/orchestration/story-deliver-terminal.buildEscalationTerminal}
|
|
46
46
|
* carries the guarantees the schema then enforces.
|
|
@@ -88,7 +88,7 @@ Usage:
|
|
|
88
88
|
deliver-light.js --backstop --story <id>
|
|
89
89
|
|
|
90
90
|
The thin /deliver-light entry point: suitability gate → inline receipt Story →
|
|
91
|
-
the same single-story-init.js / single-story-close.js engine /deliver uses.
|
|
91
|
+
the same single-story-init.js / single-story-close.js engine /mandrel-deliver uses.
|
|
92
92
|
|
|
93
93
|
The gate judges EFFORT and RISK, not artifact counts: N instances of one
|
|
94
94
|
mechanical edit is one kind at N sites. It rejects only clearly-epic work; the
|
|
@@ -102,9 +102,9 @@ Gate options:
|
|
|
102
102
|
--kinds <csv> Distinct KINDS of change (default: one per assumption, so
|
|
103
103
|
N same-shaped edits count once).
|
|
104
104
|
--magnitude <m> Coarse effort bucket: trivial | moderate | substantial
|
|
105
|
-
(default moderate; substantial routes to /plan).
|
|
105
|
+
(default moderate; substantial routes to /mandrel-plan).
|
|
106
106
|
--uncertainty <u> determined (the request fixes the shape) | needs-design
|
|
107
|
-
(default determined; needs-design routes to /plan).
|
|
107
|
+
(default determined; needs-design routes to /mandrel-plan).
|
|
108
108
|
--route <r> Ledgered model verdict route: lite | full.
|
|
109
109
|
--reason <text> Recorded reason for a lite verdict (required for lite).
|
|
110
110
|
--amends <#id> Mark this as an amendment of an existing issue.
|
|
@@ -125,7 +125,7 @@ Backstop options:
|
|
|
125
125
|
change's IMPLEMENTATION half by magnitude (changed lines +
|
|
126
126
|
file sprawl); test/doc/baseline companions are exempt from
|
|
127
127
|
the counts but still matched for sensitive paths. A block
|
|
128
|
-
emits a nextCommand recycling the receipt through /plan.
|
|
128
|
+
emits a nextCommand recycling the receipt through /mandrel-plan.
|
|
129
129
|
--story <id> Story issue number whose story-<id> branch to diff.
|
|
130
130
|
|
|
131
131
|
--pretty Pretty-print the JSON envelope.
|
|
@@ -280,7 +280,7 @@ export async function createLightReceipt({
|
|
|
280
280
|
}
|
|
281
281
|
|
|
282
282
|
/**
|
|
283
|
-
* The engine hand-off — the SAME scripts `/deliver` uses. Named here as
|
|
283
|
+
* The engine hand-off — the SAME scripts `/mandrel-deliver` uses. Named here as
|
|
284
284
|
* commands, never reimplemented: this is the whole of deliver-light's
|
|
285
285
|
* relationship to worktree/branch/lease/PR/merge mechanics.
|
|
286
286
|
*
|
|
@@ -397,7 +397,7 @@ export async function runGateMode(values, deps = {}) {
|
|
|
397
397
|
if (values.yes === true && hasOperatorOverride(values)) {
|
|
398
398
|
process.stderr.write(HELP);
|
|
399
399
|
throw new Error(
|
|
400
|
-
'[deliver-light] --operator-proceed-light is attended-only and cannot be combined with --yes: an unattended run has no operator whose answer this is, and over-scope must fail closed to /plan',
|
|
400
|
+
'[deliver-light] --operator-proceed-light is attended-only and cannot be combined with --yes: an unattended run has no operator whose answer this is, and over-scope must fail closed to /mandrel-plan',
|
|
401
401
|
);
|
|
402
402
|
}
|
|
403
403
|
|
|
@@ -423,7 +423,7 @@ export async function runGateMode(values, deps = {}) {
|
|
|
423
423
|
});
|
|
424
424
|
emitTerminalFn(envelope);
|
|
425
425
|
Logger.warn(
|
|
426
|
-
`[deliver-light] ESCALATED to /plan — this session ENDS here; run ${envelope.nextCommand} in a FRESH session: ${gate.outcome.reasons.join('; ')}`,
|
|
426
|
+
`[deliver-light] ESCALATED to /mandrel-plan — this session ENDS here; run ${envelope.nextCommand} in a FRESH session: ${gate.outcome.reasons.join('; ')}`,
|
|
427
427
|
);
|
|
428
428
|
return exitCodeForTerminal(envelope);
|
|
429
429
|
}
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* is the thing they cannot act on.
|
|
13
13
|
*
|
|
14
14
|
* The strand this exists for above all others is the **merged-but-label-stale**
|
|
15
|
-
* Story: a `/deliver` re-run refuses it outright, because
|
|
15
|
+
* Story: a `/mandrel-deliver` re-run refuses it outright, because
|
|
16
16
|
* `single-story-init.js` hard-errors on an already-closed Story. Before this
|
|
17
17
|
* surface, that Story had no automated way back.
|
|
18
18
|
*
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* any still-stuck entries by enumerating the processes holding handles
|
|
9
9
|
* inside the worktree path and terminating them.
|
|
10
10
|
*
|
|
11
|
-
* Invoked by `/deliver` and `/plan`
|
|
11
|
+
* Invoked by `/mandrel-deliver` and `/mandrel-plan`
|
|
12
12
|
* (via `drainPendingCleanupAtBoot` → `worktree-sweep.js`), and
|
|
13
13
|
* `story-close` so the pending-cleanup ledger drains automatically
|
|
14
14
|
* across the sprint lifecycle. Operators can also run it standalone:
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* evidence-gate.js — evidence-aware wrapper around a single shell gate.
|
|
5
5
|
*
|
|
6
|
-
* Tech Spec #819 §"Evidence record (Story 7)" — `/deliver` Phase 3
|
|
6
|
+
* Tech Spec #819 §"Evidence record (Story 7)" — `/mandrel-deliver` Phase 3
|
|
7
7
|
* (close-validation) runs `npm run lint` and `npm test` against the Epic
|
|
8
8
|
* branch before opening the PR.
|
|
9
9
|
* If the same gate has already passed against the current `git rev-parse
|