mandrel 1.59.0 → 1.61.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 +86 -44
- package/.agents/docs/SDLC.md +135 -141
- package/.agents/docs/configuration.md +77 -20
- package/.agents/docs/quality-gates.md +796 -0
- package/.agents/docs/workflows.md +6 -9
- package/.agents/instructions.md +12 -11
- package/.agents/personas/architect.md +1 -1
- package/.agents/personas/product.md +1 -1
- package/.agents/personas/project-manager.md +14 -14
- package/.agents/personas/technical-writer.md +1 -1
- package/.agents/rules/changelog-style.md +5 -5
- package/.agents/rules/git-conventions.md +3 -3
- package/.agents/runtime-deps.json +2 -2
- package/.agents/schemas/agentrc.schema.json +3 -3
- package/.agents/schemas/dispatch-manifest.json +4 -4
- package/.agents/schemas/epic-spec.schema.json +15 -45
- package/.agents/schemas/lifecycle/README.md +1 -1
- package/.agents/schemas/lifecycle/story.dispatch.end.schema.json +1 -1
- package/.agents/schemas/lifecycle/story.dispatch.start.schema.json +1 -1
- package/.agents/schemas/lifecycle/story.heartbeat.schema.json +1 -1
- package/.agents/schemas/validation-evidence.schema.json +1 -1
- package/.agents/scripts/README.md +2 -2
- package/.agents/scripts/acceptance-eval.js +1 -1
- package/.agents/scripts/acceptance-spec-reconciler.js +2 -2
- package/.agents/scripts/agents-bootstrap-github.js +23 -119
- package/.agents/scripts/analyze-execution.js +2 -2
- package/.agents/scripts/audit-to-stories.js +1 -1
- package/.agents/scripts/check-doc-links.js +2 -3
- package/.agents/scripts/diagnose-friction.js +1 -1
- package/.agents/scripts/dispatcher.js +2 -2
- package/.agents/scripts/drain-pending-cleanup.js +1 -1
- package/.agents/scripts/epic-audit-prepare.js +3 -3
- package/.agents/scripts/epic-deliver-note-intervention.js +2 -2
- package/.agents/scripts/epic-deliver-preflight.js +6 -6
- package/.agents/scripts/epic-deliver-prepare.js +1 -1
- package/.agents/scripts/epic-execute-record-wave.js +4 -4
- package/.agents/scripts/epic-plan-healthcheck.js +6 -10
- package/.agents/scripts/epic-plan-spec-validate.js +1 -1
- package/.agents/scripts/epic-reconcile.js +11 -29
- package/.agents/scripts/evidence-gate.js +1 -1
- package/.agents/scripts/generate-workflows-doc.js +1 -1
- package/.agents/scripts/hierarchy-gate.js +7 -11
- package/.agents/scripts/lib/ITicketingProvider.js +1 -1
- package/.agents/scripts/lib/audit-suite/selector.js +1 -1
- package/.agents/scripts/lib/audit-to-stories/seed-epic-from-findings.js +2 -2
- package/.agents/scripts/lib/baseline-snapshot.js +7 -7
- package/.agents/scripts/lib/bdd-runner-detect.js +1 -1
- package/.agents/scripts/lib/bdd-scenario-scanner.js +3 -3
- package/.agents/scripts/lib/bootstrap/baselines-layout-migration.js +1 -1
- package/.agents/scripts/lib/bootstrap/branch-protection.js +1 -1
- package/.agents/scripts/lib/bootstrap/ci-workflow-template.js +47 -1
- package/.agents/scripts/lib/bootstrap/commit-push.js +2 -2
- package/.agents/scripts/lib/bootstrap/gh-preflight.js +7 -9
- package/.agents/scripts/lib/bootstrap/manifest.js +21 -1
- package/.agents/scripts/lib/bootstrap/merge-methods.js +31 -16
- package/.agents/scripts/lib/bootstrap/project-bootstrap.js +32 -11
- package/.agents/scripts/lib/codebase-snapshot.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/sync-agentrc.js +1 -1
- package/.agents/scripts/lib/config/temp-paths.js +2 -2
- package/.agents/scripts/lib/config-settings-schema-delivery.js +2 -2
- package/.agents/scripts/lib/config-settings-schema-quality.js +1 -1
- package/.agents/scripts/lib/config-settings-schema.js +3 -3
- package/.agents/scripts/lib/detect-package-manager.js +72 -0
- package/.agents/scripts/lib/duplicate-search.js +1 -1
- package/.agents/scripts/lib/dynamic-workflow/capability.js +1 -1
- package/.agents/scripts/lib/epic-plan-clarity.js +1 -1
- package/.agents/scripts/lib/epic-plan-ideation.js +1 -1
- package/.agents/scripts/lib/errors/index.js +4 -4
- package/.agents/scripts/lib/feedback-loop/memory-freshness.js +1 -1
- package/.agents/scripts/lib/feedback-loop/prior-feedback-fetcher.js +1 -1
- package/.agents/scripts/lib/findings/classify-finding.js +1 -1
- package/.agents/scripts/lib/findings/promote-finding.js +10 -10
- package/.agents/scripts/lib/label-constants.js +3 -4
- package/.agents/scripts/lib/label-taxonomy.js +5 -10
- package/.agents/scripts/lib/onboard/detect-stack.js +10 -10
- package/.agents/scripts/lib/onboard/init-tail.js +218 -0
- package/.agents/scripts/lib/onboard/scaffold-docs.js +18 -3
- package/.agents/scripts/lib/orchestration/acceptance-eval-decision.js +1 -1
- package/.agents/scripts/lib/orchestration/code-review.js +5 -5
- package/.agents/scripts/lib/orchestration/context-hydration-engine.js +8 -9
- package/.agents/scripts/lib/orchestration/dependency-analyzer.js +3 -3
- package/.agents/scripts/lib/orchestration/detectors-phase.js +2 -2
- package/.agents/scripts/lib/orchestration/dispatch-engine.js +30 -38
- package/.agents/scripts/lib/orchestration/dispatch-pipeline.js +9 -25
- package/.agents/scripts/lib/orchestration/epic-cleanup.js +1 -1
- package/.agents/scripts/lib/orchestration/epic-deliver-lease-guard.js +8 -8
- package/.agents/scripts/lib/orchestration/epic-plan-decompose/phases/creation.js +1 -1
- package/.agents/scripts/lib/orchestration/epic-plan-decompose/phases/dag.js +7 -21
- package/.agents/scripts/lib/orchestration/epic-plan-decompose/phases/diagnostics.js +3 -3
- package/.agents/scripts/lib/orchestration/epic-plan-lease-guard.js +26 -13
- package/.agents/scripts/lib/orchestration/epic-plan-spec/phases/plan-epic.js +1 -1
- package/.agents/scripts/lib/orchestration/epic-plan-spec/phases/prompts.js +1 -1
- package/.agents/scripts/lib/orchestration/epic-plan-spec/phases/run-spec-phase.js +2 -2
- package/.agents/scripts/lib/orchestration/epic-plan-state-store.js +1 -1
- package/.agents/scripts/lib/orchestration/epic-run-state-store.js +3 -3
- package/.agents/scripts/lib/orchestration/epic-runner/concurrency-gate.js +4 -4
- package/.agents/scripts/lib/orchestration/epic-runner/deliver-phases.js +3 -3
- package/.agents/scripts/lib/orchestration/epic-runner/phases/build-wave-dag.js +6 -21
- package/.agents/scripts/lib/orchestration/epic-runner/phases/snapshot.js +7 -7
- package/.agents/scripts/lib/orchestration/epic-runner/progress-reporter/composition.js +1 -1
- package/.agents/scripts/lib/orchestration/epic-runner/progress-reporter/signals.js +2 -2
- package/.agents/scripts/lib/orchestration/epic-runner/progress-reporter/transport.js +4 -4
- package/.agents/scripts/lib/orchestration/epic-runner/story-launcher.js +4 -4
- package/.agents/scripts/lib/orchestration/epic-runner/story-run-progress-writer.js +8 -8
- package/.agents/scripts/lib/orchestration/epic-runner/sub-agent-return.js +4 -4
- package/.agents/scripts/lib/orchestration/epic-spec-reconciler-apply.js +7 -15
- package/.agents/scripts/lib/orchestration/epic-spec-reconciler-diff.js +72 -41
- package/.agents/scripts/lib/orchestration/epic-spec-reconciler-ops.js +2 -4
- package/.agents/scripts/lib/orchestration/file-assumptions.js +2 -2
- package/.agents/scripts/lib/orchestration/finalize/close-planning-tickets.js +1 -1
- package/.agents/scripts/lib/orchestration/finalize/open-or-locate-pr.js +2 -2
- package/.agents/scripts/lib/orchestration/finalize/sanitize-skip-ci.js +1 -1
- package/.agents/scripts/lib/orchestration/lease-guard-shared.js +3 -3
- package/.agents/scripts/lib/orchestration/lifecycle/emit-story-dispatch-end.js +1 -1
- package/.agents/scripts/lib/orchestration/lifecycle/emit-story-heartbeat.js +1 -1
- package/.agents/scripts/lib/orchestration/lifecycle/listeners/README.md +1 -1
- package/.agents/scripts/lib/orchestration/lifecycle/listeners/automerge-armer.js +1 -1
- package/.agents/scripts/lib/orchestration/lifecycle/listeners/automerge-predicate.js +1 -1
- package/.agents/scripts/lib/orchestration/lifecycle/listeners/branch-cleaner.js +1 -1
- package/.agents/scripts/lib/orchestration/lifecycle/listeners/finalizer.js +1 -1
- package/.agents/scripts/lib/orchestration/lifecycle/listeners/index.js +1 -1
- package/.agents/scripts/lib/orchestration/lifecycle/listeners/merge-watcher.js +1 -1
- package/.agents/scripts/lib/orchestration/lifecycle/listeners/notify-dispatcher.js +1 -1
- package/.agents/scripts/lib/orchestration/lifecycle/listeners/watcher.js +1 -1
- package/.agents/scripts/lib/orchestration/manifest-builder.js +5 -5
- package/.agents/scripts/lib/orchestration/parked-follow-ons.js +2 -2
- package/.agents/scripts/lib/orchestration/plan-runner/plan-router.js +5 -5
- package/.agents/scripts/lib/orchestration/post-merge/phases/ticket-closure.js +3 -3
- package/.agents/scripts/lib/orchestration/preflight-cache.js +1 -1
- package/.agents/scripts/lib/orchestration/recurring-failure-detector.js +1 -1
- package/.agents/scripts/lib/orchestration/retro/phases/compose-body.js +1 -1
- package/.agents/scripts/lib/orchestration/retro/phases/gather-signals.js +2 -2
- package/.agents/scripts/lib/orchestration/retro-runner.js +3 -3
- package/.agents/scripts/lib/orchestration/review-depth.js +1 -1
- package/.agents/scripts/lib/orchestration/single-story-close/phases/wrong-tree-guard.js +1 -1
- package/.agents/scripts/lib/orchestration/spec-freshness.js +1 -1
- package/.agents/scripts/lib/orchestration/spec-renderer.js +36 -73
- package/.agents/scripts/lib/orchestration/spec-section-validator.js +1 -1
- package/.agents/scripts/lib/orchestration/story-close/baseline-friction-body.js +1 -1
- package/.agents/scripts/lib/orchestration/story-close/phases/locked-pipeline.js +2 -2
- package/.agents/scripts/lib/orchestration/task-body-validator.js +6 -6
- package/.agents/scripts/lib/orchestration/ticket-lease.js +1 -1
- package/.agents/scripts/lib/orchestration/ticket-validator-conflicts.js +2 -2
- package/.agents/scripts/lib/orchestration/ticket-validator-sizing.js +1 -10
- package/.agents/scripts/lib/orchestration/ticket-validator.js +25 -70
- package/.agents/scripts/lib/orchestration/ticketing/bulk.js +5 -12
- package/.agents/scripts/lib/orchestration/ticketing/reads.js +8 -8
- package/.agents/scripts/lib/orchestration/ticketing/state.js +3 -3
- package/.agents/scripts/lib/orchestration/wave-record-notifications.js +2 -2
- package/.agents/scripts/lib/orchestration/wave-record-projection.js +1 -1
- package/.agents/scripts/lib/plan-phase-cleanup.js +1 -1
- package/.agents/scripts/lib/preflight-runner.js +1 -1
- package/.agents/scripts/lib/presentation/dispatch-manifest-render.js +4 -5
- package/.agents/scripts/lib/presentation/manifest-builder.js +28 -34
- package/.agents/scripts/lib/presentation/manifest-formatter.js +3 -4
- package/.agents/scripts/lib/presentation/manifest-helpers.js +1 -1
- package/.agents/scripts/lib/presentation/manifest-procedures.js +4 -4
- package/.agents/scripts/lib/presentation/manifest-render-waves.js +4 -23
- package/.agents/scripts/lib/presentation/manifest-renderer.js +1 -1
- package/.agents/scripts/lib/presentation/manifest-story-views.js +2 -11
- package/.agents/scripts/lib/runtime-deps/preflight.js +6 -6
- package/.agents/scripts/lib/signals/schema.js +1 -1
- package/.agents/scripts/lib/spec/index.js +1 -1
- package/.agents/scripts/lib/spec/loader.js +2 -2
- package/.agents/scripts/lib/spec/state.js +7 -16
- package/.agents/scripts/lib/story-init/context-resolver.js +3 -3
- package/.agents/scripts/lib/story-init/state-transitioner.js +2 -2
- package/.agents/scripts/lib/story-init/task-graph-builder.js +7 -7
- package/.agents/scripts/lib/story-lifecycle.js +8 -8
- package/.agents/scripts/lib/story-plan.js +1 -1
- package/.agents/scripts/lib/templates/decomposer-prompts.js +59 -52
- package/.agents/scripts/lib/wave-runner/tick.js +1 -1
- package/.agents/scripts/lib/worktree/node-modules-strategy.js +5 -2
- package/.agents/scripts/lifecycle-emit-story-dispatch.js +1 -1
- package/.agents/scripts/lifecycle-emit.js +1 -1
- package/.agents/scripts/providers/github/board-add.js +1 -1
- package/.agents/scripts/providers/github/errors.js +1 -1
- package/.agents/scripts/providers/github/mappers.js +2 -2
- package/.agents/scripts/providers/github/tickets.js +4 -4
- package/.agents/scripts/resync-status-column.js +1 -1
- package/.agents/scripts/retro-run.js +2 -2
- package/.agents/scripts/run-lint.js +1 -1
- package/.agents/scripts/single-story-init.js +1 -1
- package/.agents/scripts/stories-wave-tick.js +5 -5
- package/.agents/scripts/story-close.js +1 -1
- package/.agents/scripts/story-init.js +13 -16
- package/.agents/scripts/story-phase.js +5 -5
- package/.agents/scripts/story-plan.js +3 -3
- package/.agents/scripts/sync-branch-from-base.js +1 -1
- package/.agents/scripts/validate-docs-freshness.js +1 -1
- package/.agents/scripts/wave-tick.js +1 -1
- package/.agents/skills/core/analyze-execution/SKILL.md +2 -2
- package/.agents/skills/core/epic-plan-consolidate/SKILL.md +21 -26
- package/.agents/skills/core/epic-plan-decompose-author/SKILL.md +23 -56
- package/.agents/skills/core/epic-plan-spec-author/SKILL.md +4 -4
- package/.agents/skills/core/hydrate-context/SKILL.md +2 -2
- package/.agents/skills/core/idea-refinement/SKILL.md +4 -4
- package/.agents/skills/core/knowledge-transfer/SKILL.md +2 -2
- package/.agents/skills/core/planning-and-task-breakdown/SKILL.md +1 -1
- package/.agents/skills/core/scope-triage/SKILL.md +9 -10
- package/.agents/skills/core/using-agent-skills/SKILL.md +1 -1
- package/.agents/skills/skills.index.json +7 -7
- package/.agents/templates/agent-protocol.md +2 -2
- package/.agents/workflows/agents-update.md +16 -31
- package/.agents/workflows/audit-architecture.md +2 -2
- package/.agents/workflows/audit-clean-code.md +2 -2
- package/.agents/workflows/audit-dependencies.md +1 -1
- package/.agents/workflows/audit-devops.md +1 -1
- package/.agents/workflows/audit-documentation.md +2 -2
- package/.agents/workflows/audit-lighthouse.md +1 -1
- package/.agents/workflows/audit-performance.md +2 -2
- package/.agents/workflows/audit-privacy.md +1 -1
- package/.agents/workflows/audit-quality.md +2 -2
- package/.agents/workflows/audit-security.md +2 -2
- package/.agents/workflows/audit-seo.md +1 -1
- package/.agents/workflows/audit-sre.md +1 -1
- package/.agents/workflows/audit-to-stories.md +10 -10
- package/.agents/workflows/audit-ux-ui.md +1 -1
- package/.agents/workflows/deliver.md +85 -0
- package/.agents/workflows/explain.md +3 -3
- package/.agents/workflows/git-merge-pr.md +1 -1
- package/.agents/workflows/git-pr-all.md +13 -10
- package/.agents/workflows/git-push.md +6 -3
- package/.agents/workflows/helpers/_merge-conflict-template.md +1 -1
- package/.agents/workflows/helpers/acceptance-self-eval.md +1 -1
- package/.agents/workflows/helpers/agents-sync-config.md +3 -2
- package/.agents/workflows/helpers/code-review.md +5 -5
- package/.agents/workflows/{epic-deliver.md → helpers/deliver-epic.md} +43 -43
- package/.agents/workflows/{story-deliver.md → helpers/deliver-stories.md} +25 -25
- package/.agents/workflows/helpers/diagnose.md +1 -1
- package/.agents/workflows/helpers/epic-audit.md +6 -6
- package/.agents/workflows/helpers/epic-deliver-story.md +13 -13
- package/.agents/workflows/helpers/epic-plan-decompose.md +23 -23
- package/.agents/workflows/helpers/epic-plan-spec.md +6 -6
- package/.agents/workflows/helpers/epic-testing.md +3 -3
- package/.agents/workflows/helpers/parallel-tooling.md +1 -1
- package/.agents/workflows/{epic-plan.md → helpers/plan-epic.md} +84 -84
- package/.agents/workflows/{story-plan.md → helpers/plan-story.md} +43 -43
- package/.agents/workflows/helpers/signals.md +1 -1
- package/.agents/workflows/helpers/single-story-deliver.md +11 -11
- package/.agents/workflows/helpers/worktree-lifecycle.md +18 -18
- package/.agents/workflows/plan.md +131 -0
- package/.agents/workflows/qa-explore.md +1 -1
- package/.agents/workflows/qa-run-harness.md +1 -1
- package/README.md +19 -39
- package/bin/mandrel.js +235 -16
- package/docs/CHANGELOG.md +1173 -0
- package/lib/cli/doctor.js +45 -3
- package/lib/cli/init.js +97 -36
- package/lib/cli/registry.js +41 -145
- package/lib/cli/sync.js +122 -23
- package/lib/cli/uninstall.js +42 -7
- package/lib/cli/update.js +524 -210
- package/lib/cli/version-helpers.js +59 -0
- package/package.json +7 -6
- package/.agents/scripts/lib/orchestration/reconciler.js +0 -137
- package/.agents/workflows/onboard.md +0 -208
- package/lib/cli/__tests__/migrate.test.js +0 -268
- package/lib/cli/__tests__/sync-local-zone.test.js +0 -247
- package/lib/cli/__tests__/sync.test.js +0 -372
- package/lib/cli/__tests__/update-major.test.js +0 -217
- package/lib/cli/__tests__/update.test.js +0 -696
- package/lib/cli/__tests__/version-check.test.js +0 -398
- package/lib/migrations/__tests__/index.test.js +0 -216
|
@@ -6,46 +6,46 @@ description:
|
|
|
6
6
|
/single-story-deliver.
|
|
7
7
|
---
|
|
8
8
|
|
|
9
|
-
# /story-plan
|
|
9
|
+
# helpers/plan-story — standalone-Story planning path (invoked by /plan)
|
|
10
10
|
|
|
11
11
|
## Overview
|
|
12
12
|
|
|
13
|
-
`/
|
|
14
|
-
[`/
|
|
13
|
+
`/plan` is the standalone counterpart to
|
|
14
|
+
[`/plan`](plan-epic.md) for Stories that are **not** attached to an
|
|
15
15
|
Epic. It closes the gap between "one-line idea" and "well-formed
|
|
16
|
-
standalone Story body ready for [`/single-story-deliver`](
|
|
16
|
+
standalone Story body ready for [`/single-story-deliver`](single-story-deliver.md)"
|
|
17
17
|
using the same `host LLM authors + Node wrapper persists` split as
|
|
18
|
-
`/
|
|
18
|
+
`/plan`.
|
|
19
19
|
|
|
20
20
|
```text
|
|
21
|
-
/
|
|
21
|
+
/plan --idea "<seed>"
|
|
22
22
|
→ story-plan.js --emit-context (envelope: seed, template, dup candidates)
|
|
23
23
|
→ host LLM authors a draft Story body (in chat, using the envelope)
|
|
24
24
|
→ operator confirms (HITL)
|
|
25
25
|
→ story-plan.js --body <file> (validate, gh issue create)
|
|
26
|
-
→ "Next: /
|
|
26
|
+
→ "Next: /deliver <id>"
|
|
27
27
|
```
|
|
28
28
|
|
|
29
|
-
**
|
|
29
|
+
**The two paths of `/plan` — when each applies:**
|
|
30
30
|
|
|
31
|
-
| Trait |
|
|
31
|
+
| Trait | Standalone-Story path (this helper) | Epic decomposition path (`helpers/plan-epic.md`) |
|
|
32
32
|
| -------------------- | ------------------------------------------ | -------------------------------------------- |
|
|
33
|
-
| Output | One standalone Story Issue |
|
|
33
|
+
| Output | One standalone Story Issue | Epic with child Stories |
|
|
34
34
|
| Parent Epic | None (no `Epic: #N` in body) | Required |
|
|
35
|
-
| Downstream workflow | `/
|
|
36
|
-
| Replan surface | Out of scope (recreate manually if needed) | `/
|
|
37
|
-
| Inbound route |
|
|
38
|
-
| Outbound route | Phase 2 may **escalate** an epic-sized draft to
|
|
35
|
+
| Downstream workflow | `/deliver <storyId>` | `/deliver <epicId>` |
|
|
36
|
+
| Replan surface | Out of scope (recreate manually if needed) | `/plan <epicId> --force` regenerates the backlog |
|
|
37
|
+
| Inbound route | `--idea` with a `story` triage verdict, `--body`, **or** a scope-triage handoff from the Epic path | Direct (`<epicId>`, or `--idea` with an `epic` verdict) |
|
|
38
|
+
| Outbound route | Phase 2 may **escalate** an epic-sized draft to the Epic path (internal branch switch) | The story-sized advisory may **convert** a one-Story Epic to this path |
|
|
39
39
|
|
|
40
|
-
If a Story-under-Epic needs replanning, use `/
|
|
40
|
+
If a Story-under-Epic needs replanning, use `/plan <epicId> --force`. If you
|
|
41
41
|
have a refactor, framework-maintenance idea, or any standalone unit of
|
|
42
42
|
work, use this workflow.
|
|
43
43
|
|
|
44
|
-
**Inbound from `/
|
|
45
|
-
[`core/scope-triage`](
|
|
44
|
+
**Inbound from `/plan` scope triage.** `/plan` Phase 1.5 runs the
|
|
45
|
+
[`core/scope-triage`](../../skills/core/scope-triage/SKILL.md) rubric over the
|
|
46
46
|
sharpened one-pager. On a `story` / `borderline` verdict the operator may route
|
|
47
|
-
the work here via `/
|
|
48
|
-
**scope-triage handoff** — the triage decision is already made, so `/
|
|
47
|
+
the work here via `/plan --from-notes <path>`. That invocation is a
|
|
48
|
+
**scope-triage handoff** — the triage decision is already made, so `/plan`
|
|
49
49
|
MUST NOT re-triage it (the no-re-triage rule in the skill); it proceeds straight
|
|
50
50
|
to authoring the standalone Story body from the handed-off one-pager.
|
|
51
51
|
|
|
@@ -54,20 +54,20 @@ to authoring the standalone Story body from the handed-off one-pager.
|
|
|
54
54
|
1. `GITHUB_TOKEN` or `gh auth status` clean — `gh issue create` runs at
|
|
55
55
|
persist time.
|
|
56
56
|
2. The `type::story` label and the chosen `persona::*` label exist in the
|
|
57
|
-
repo. Run [`agents-bootstrap-github.js`](
|
|
57
|
+
repo. Run [`agents-bootstrap-github.js`](../../scripts/agents-bootstrap-github.js)
|
|
58
58
|
once to provision them.
|
|
59
59
|
|
|
60
60
|
## Invocation shapes
|
|
61
61
|
|
|
62
62
|
```bash
|
|
63
63
|
# Seed from an inline string:
|
|
64
|
-
/
|
|
64
|
+
/plan --idea "rip out the unused TaskBodyMigrator export"
|
|
65
65
|
|
|
66
66
|
# Seed from a notes file:
|
|
67
|
-
/
|
|
67
|
+
/plan --from-notes temp/single-story-2293-notes.md
|
|
68
68
|
|
|
69
69
|
# Inspect the draft body without creating an Issue:
|
|
70
|
-
/
|
|
70
|
+
/plan --dry-run --body temp/single-story-draft.md
|
|
71
71
|
```
|
|
72
72
|
|
|
73
73
|
## Phase 1 — Emit Context
|
|
@@ -102,8 +102,8 @@ Envelope fields (`kind: "story-plan-context"`, `version: 1`):
|
|
|
102
102
|
`refine.refine` is `true` when the seed is shorter than 200 characters
|
|
103
103
|
(or empty). Pass `--refine` / `--no-refine` to override. When the
|
|
104
104
|
envelope advises refinement, activate the
|
|
105
|
-
[`core/idea-refinement`](
|
|
106
|
-
before drafting the body — same skill `/
|
|
105
|
+
[`core/idea-refinement`](../../skills/core/idea-refinement/SKILL.md) skill
|
|
106
|
+
before drafting the body — same skill `/plan` Phase 1 drives.
|
|
107
107
|
|
|
108
108
|
## Phase 2 — Host LLM Authors a Draft Body
|
|
109
109
|
|
|
@@ -120,19 +120,19 @@ Using the envelope above, draft a Story body that:
|
|
|
120
120
|
|
|
121
121
|
Write the draft to `temp/single-story-draft.md`.
|
|
122
122
|
|
|
123
|
-
### Scope-triage escalation gate (symmetric counterpart to `/
|
|
123
|
+
### Scope-triage escalation gate (symmetric counterpart to `/plan` Phase 1.5)
|
|
124
124
|
|
|
125
125
|
Once the draft body exists — and **only** then, because the seed alone is not
|
|
126
126
|
an honest basis for a sizing judgment — run the
|
|
127
|
-
[`core/scope-triage`](
|
|
127
|
+
[`core/scope-triage`](../../skills/core/scope-triage/SKILL.md) rubric over the
|
|
128
128
|
**drafted Story body** to catch an Epic-sized scope before it is persisted as a
|
|
129
|
-
standalone Story. This is the outbound mirror of `/
|
|
129
|
+
standalone Story. This is the outbound mirror of `/plan` Phase 1.5's
|
|
130
130
|
inbound downgrade gate: the two planning entry points route toward each other
|
|
131
131
|
instead of each silently accepting wrong-sized work.
|
|
132
132
|
|
|
133
|
-
**Skip the gate entirely when `/
|
|
134
|
-
handoff** — i.e. from `/
|
|
135
|
-
`/
|
|
133
|
+
**Skip the gate entirely when `/plan` was entered via a scope-triage
|
|
134
|
+
handoff** — i.e. from `/plan` Phase 1.5 (the inbound route above) or the
|
|
135
|
+
`/plan` Phase 5.5 existing-Epic conversion path. A handoff is a triage
|
|
136
136
|
decision already made; re-running the rubric here would re-litigate a settled
|
|
137
137
|
call and risk a ping-pong between the two workflows (the skill's no-re-triage
|
|
138
138
|
rule).
|
|
@@ -141,7 +141,7 @@ Otherwise, activate the skill **by reference** — read its `SKILL.md` via the
|
|
|
141
141
|
`Read` tool and apply its rubric; do **not** restate its sizing thresholds or
|
|
142
142
|
copy its verdict prose here. The skill anchors its sizing judgment to
|
|
143
143
|
`DELIVERABLE_GRANULARITY_GUIDANCE` / `DEFAULT_TASK_SIZING` in
|
|
144
|
-
[`ticket-validator-sizing.js`](
|
|
144
|
+
[`ticket-validator-sizing.js`](../../scripts/lib/orchestration/ticket-validator-sizing.js)
|
|
145
145
|
and emits one verdict — `epic` | `story` | `borderline`. The verdict is
|
|
146
146
|
host-LLM judgment: there is **no `--flag`**, no scorer, no schema, and no label
|
|
147
147
|
transition behind it. (The `refine` heuristic in `story-plan.js` is unchanged —
|
|
@@ -153,7 +153,7 @@ add a second stop.
|
|
|
153
153
|
|
|
154
154
|
Display the draft to the operator and **STOP**. Do not call the persist phase
|
|
155
155
|
until the operator explicitly confirms the draft. This mirrors the HITL gate
|
|
156
|
-
`/
|
|
156
|
+
`/plan` Phase 3 enforces before opening the Epic Issue. The scope-triage
|
|
157
157
|
verdict folds into this same stop:
|
|
158
158
|
|
|
159
159
|
- **`story` verdict (or gate skipped via handoff)** → no extra prompt. The
|
|
@@ -162,12 +162,12 @@ verdict folds into this same stop:
|
|
|
162
162
|
- **`epic` verdict** (multiple independent capabilities, a plausible
|
|
163
163
|
sizing-ceiling breach, or a real dependency structure) → the confirmation
|
|
164
164
|
prompt presents a **three-way operator choice**:
|
|
165
|
-
- **Recommended: escalate to `/
|
|
165
|
+
- **Recommended: escalate to `/plan --idea`** (with the triage
|
|
166
166
|
rationale) — persist the notes/draft to a notes file and hand off to
|
|
167
|
-
`/
|
|
168
|
-
as a **scope-triage handoff** so `/
|
|
167
|
+
`/plan --idea` (or `--from-notes <path>`), identifying the invocation
|
|
168
|
+
as a **scope-triage handoff** so `/plan` skips its own Phase 1.5 gate
|
|
169
169
|
(the skill's no-re-triage rule). Then **abandon the draft and exit
|
|
170
|
-
`/
|
|
170
|
+
`/plan`** — no standalone Story is created.
|
|
171
171
|
- **Persist as a standalone Story anyway** — ignore the recommendation and
|
|
172
172
|
proceed to Phase 3 with the draft unchanged. Being wrong in the `epic`
|
|
173
173
|
direction is cheap to tolerate: if the operator persists an oversized Story,
|
|
@@ -212,22 +212,22 @@ exact `gh issue create` shape that would run.
|
|
|
212
212
|
|
|
213
213
|
- **No `Epic: #N` references.** This is the standalone contract; persist
|
|
214
214
|
fails fast if one is present. To attach a Story to an Epic, use
|
|
215
|
-
`/
|
|
215
|
+
`/plan` Phase 8 instead.
|
|
216
216
|
- **No external LLM APIs.** Mirrors the v5.6 contract: the host LLM does
|
|
217
217
|
the authoring; the Node wrapper does the I/O.
|
|
218
218
|
- **Idempotent.** Re-running `--emit-context` is safe. Re-running
|
|
219
219
|
`--body` opens a new Issue (it is not aware of prior runs); use
|
|
220
220
|
`--dry-run` first when iterating on the draft.
|
|
221
|
-
- **Atomic by contract.** A Story is the leaf of the
|
|
221
|
+
- **Atomic by contract.** A Story is the leaf of the 2-tier hierarchy — it
|
|
222
222
|
has no child tickets. Its acceptance criteria and verification steps live
|
|
223
223
|
inline on the Story body
|
|
224
|
-
([`single-story-deliver.md`](
|
|
224
|
+
([`single-story-deliver.md`](single-story-deliver.md)).
|
|
225
225
|
|
|
226
226
|
## See also
|
|
227
227
|
|
|
228
|
-
- [`/single-story-deliver`](
|
|
228
|
+
- [`/single-story-deliver`](single-story-deliver.md) — the consumer
|
|
229
229
|
workflow that picks the Story up after this one creates it.
|
|
230
|
-
- [`/
|
|
230
|
+
- [`/plan`](plan-epic.md) — the Epic-tier equivalent. Phases 1–4
|
|
231
231
|
inspired the seed-capture + envelope-emit pattern used here.
|
|
232
|
-
- [`core/idea-refinement`](
|
|
232
|
+
- [`core/idea-refinement`](../../skills/core/idea-refinement/SKILL.md) —
|
|
233
233
|
optional pre-authoring skill activated when the seed is short.
|
|
@@ -12,7 +12,7 @@ description: >-
|
|
|
12
12
|
> **Helper, not a slash command.** Files under `workflows/helpers/` are not
|
|
13
13
|
> projected into the mandrel plugin command tree. The signals subsystem itself
|
|
14
14
|
> (`lib/signals/`, writer, schema, detectors, NDJSON listeners) runs as
|
|
15
|
-
> part of the normal `/
|
|
15
|
+
> part of the normal `/deliver` machinery — this viewer is for
|
|
16
16
|
> ad-hoc debugging when you need to inspect the span-tree directly.
|
|
17
17
|
> Invoke the backing script: `node .agents/scripts/signals-view.js <epic-id> [--story <id>]`.
|
|
18
18
|
|
|
@@ -10,7 +10,7 @@ description:
|
|
|
10
10
|
## Overview
|
|
11
11
|
|
|
12
12
|
`/single-story-deliver` is the standalone counterpart to
|
|
13
|
-
[`/
|
|
13
|
+
[`/deliver`](deliver-stories.md). Use it for a Story that is **not**
|
|
14
14
|
attached to an Epic — refactors carved out of closed Epics, framework
|
|
15
15
|
maintenance, or any work small enough that the Epic-Centric ceremony
|
|
16
16
|
(PRD + Tech Spec + decomposition + dispatch manifest + cascade) would be
|
|
@@ -25,19 +25,19 @@ overhead rather than help.
|
|
|
25
25
|
→ single-story-confirm-merge.js (PR merged → agent::done, issue closes)
|
|
26
26
|
```
|
|
27
27
|
|
|
28
|
-
**When to use `/single-story-deliver` vs. `/
|
|
28
|
+
**When to use `/single-story-deliver` vs. `/deliver`:**
|
|
29
29
|
|
|
30
|
-
| Trait | `/single-story-deliver` | `/
|
|
30
|
+
| Trait | `/single-story-deliver` | `/deliver` |
|
|
31
31
|
| ----------------------------- | ---------------------------------------------------- | ------------------------------------------------------- |
|
|
32
32
|
| Parent Epic | None (no `Epic: #N` in body) | Required (`Epic: #N` in body) |
|
|
33
33
|
| Branch base | `project.baseBranch` (default `main`) | `epic/<epicId>` |
|
|
34
34
|
| Merge target | `main` via PR | `epic/<epicId>` via `--no-ff` merge |
|
|
35
|
-
|
|
|
35
|
+
| Epic-branch integration | No | Yes — merged into `epic/<epicId>` at close |
|
|
36
36
|
| Dispatch manifest interaction | None | Read at init, regenerated at close |
|
|
37
37
|
| Story scope | Inline `acceptance[]` / `verify[]` on the Story body | Inline `acceptance[]` / `verify[]` on the Story body |
|
|
38
38
|
|
|
39
|
-
If the Story has an `Epic: #N` reference, use `/
|
|
40
|
-
doesn't, use this workflow (or `/
|
|
39
|
+
If the Story has an `Epic: #N` reference, use `/deliver`. If it
|
|
40
|
+
doesn't, use this workflow (or `/deliver` for several standalone
|
|
41
41
|
Stories at once).
|
|
42
42
|
|
|
43
43
|
## Prerequisites
|
|
@@ -82,7 +82,7 @@ the Story to `agent::executing`.
|
|
|
82
82
|
> is the only guard against a concurrent `single-story-init` clobbering an
|
|
83
83
|
> in-flight run.
|
|
84
84
|
>
|
|
85
|
-
> **Fail-closed (audit #3513).** Unlike `/
|
|
85
|
+
> **Fail-closed (audit #3513).** Unlike `/deliver`, the standalone path
|
|
86
86
|
> has **no Epic-scoped lifecycle ledger** to read a per-owner
|
|
87
87
|
> `story.heartbeat` from, so there is no live-heartbeat source to decide
|
|
88
88
|
> whether a foreign claim is stale. Rather than silently reclaim every
|
|
@@ -290,7 +290,7 @@ The script:
|
|
|
290
290
|
`gh pr merge <prNumber> --auto --squash --delete-branch`. Once CI's
|
|
291
291
|
required checks turn green, GitHub squash-merges the PR and deletes
|
|
292
292
|
the source branch — the operator does not need to babysit the merge
|
|
293
|
-
button. Mirrors the `/
|
|
293
|
+
button. Mirrors the `/deliver` finalize path. Failure is
|
|
294
294
|
non-fatal: the operator retains the manual merge surface in the
|
|
295
295
|
GitHub UI. Pass `--no-auto-merge` to opt out when the PR needs a
|
|
296
296
|
pre-merge eyeball.
|
|
@@ -614,7 +614,7 @@ safe.
|
|
|
614
614
|
invoking from inside a worktree (worktree-local branch deletion fails
|
|
615
615
|
when run from inside the worktree).
|
|
616
616
|
- **Handoff discipline — report state, not process.** When you hand back to
|
|
617
|
-
your caller (the `/
|
|
617
|
+
your caller (the `/deliver` aggregator or the interactive operator),
|
|
618
618
|
report essential terminal state only: the Story branch, the closing commit
|
|
619
619
|
SHA, what changed, and what was verified. Mirror the fields the close
|
|
620
620
|
pipeline already emits (`single-story-close.js` / `story-phase.js`
|
|
@@ -632,6 +632,6 @@ safe.
|
|
|
632
632
|
|
|
633
633
|
## See also
|
|
634
634
|
|
|
635
|
-
- [`/
|
|
635
|
+
- [`/deliver`](deliver-stories.md) — several standalone Stories at
|
|
636
636
|
once (dependency-aware waves).
|
|
637
|
-
- [`/
|
|
637
|
+
- [`/deliver`](deliver-epic.md) — full Epic wave loop.
|
|
@@ -14,7 +14,7 @@ into the wrong commit. Epic #229 moves each dispatched story into its own
|
|
|
14
14
|
activity are isolated per-story. The main checkout stays quiet.
|
|
15
15
|
|
|
16
16
|
This document is the operator and reviewer reference. See
|
|
17
|
-
[`epic-deliver`](
|
|
17
|
+
[`epic-deliver`](deliver-epic.md) and [`story-deliver`](deliver-stories.md)
|
|
18
18
|
for the broader execution flow and the Epic-229 Tech Spec for
|
|
19
19
|
architectural rationale.
|
|
20
20
|
|
|
@@ -47,10 +47,10 @@ are all rejected at config-load time.
|
|
|
47
47
|
|
|
48
48
|
| Phase | When | What happens |
|
|
49
49
|
| --------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
50
|
-
| **Sweep** | Dispatch-manifest build (`/
|
|
51
|
-
| **GC** | Dispatch-manifest build (`/
|
|
52
|
-
| **Force-drain** | `/
|
|
53
|
-
| **Ensure** | `story-init` (entry for `/
|
|
50
|
+
| **Sweep** | Dispatch-manifest build (`/plan`) and `/deliver` | Stale `*.lock` files under `.git/` (older than 5 min) are removed before GC. |
|
|
51
|
+
| **GC** | Dispatch-manifest build (`/plan`) and `/deliver` | Orphan `.worktrees/story-*` whose stories are closed are reaped if clean. |
|
|
52
|
+
| **Force-drain** | `/plan` boot (`worktree-sweep.js` via `drainPendingCleanupAtBoot`), `story-close` post-merge (`forceDrainPendingCleanup`), `/deliver` Phase 7 | Retries `.worktrees/.pending-cleanup.json` (`git worktree remove` then `fs.rm`); Windows-only escalation enumerates user-mode handle holders and `taskkill`s them before re-trying. |
|
|
53
|
+
| **Ensure** | `story-init` (entry for `/deliver`) | `git worktree add .worktrees/story-<id>/` on the `story-<id>` branch. |
|
|
54
54
|
| **Run** | During story execution | Agent runs inside the worktree; HEAD/reflog activity is isolated. |
|
|
55
55
|
| **Reap** | After successful story merge (in `story-close`) | `git worktree remove` — refuses to delete dirty trees or unmerged branches. |
|
|
56
56
|
|
|
@@ -79,23 +79,23 @@ entry points (see table below).
|
|
|
79
79
|
### Sweep & GC entry points
|
|
80
80
|
|
|
81
81
|
Sweep and GC do **not** run at every Epic entry point — in particular,
|
|
82
|
-
`story-init` (the entry for `/
|
|
82
|
+
`story-init` (the entry for `/deliver`) does not invoke them. The full
|
|
83
83
|
set of callers is:
|
|
84
84
|
|
|
85
85
|
| Entry point | Script / caller | Runs sweep? | Runs GC? | Force-drain? | Notes |
|
|
86
86
|
| --------------------------------------------------------------------- | --------------------------------------------------------- | ----------- | -------- | ------------ | --------------------------------------------------------------------------------------------------- |
|
|
87
|
-
| Dispatch manifest build (`/
|
|
88
|
-
| Spec / decompose CLI boot (`/
|
|
89
|
-
| Story merge (`/
|
|
87
|
+
| Dispatch manifest build (`/plan` Phase 9) | `lib/orchestration/dispatch-pipeline.js::runWorktreeGc` | ✅ Yes | ✅ Yes | ✅ Yes | Called from `dispatch-engine.js::dispatch()`. Scoped to the epic being dispatched. |
|
|
88
|
+
| Spec / decompose CLI boot (`/plan` helpers) | `drainPendingCleanupAtBoot` → `worktree-sweep.js` | ✅ Yes* | ❌ No | ✅ Yes | \*Drains the pending ledger then reaps `git worktree list` entries for done/closed Stories (`--force`). |
|
|
89
|
+
| Story merge (`/deliver` close) | `story-close.js` (`drainPendingCleanupAfterClose`) | ❌ No | ❌ No | ✅ Yes | Runs after the post-merge pipeline when worktree isolation is enabled. |
|
|
90
90
|
| Story close | `epic-deliver runner` (invoked by `story-close.js`) | ✅ Yes | ✅ Yes | ✅ Yes | Runs before branch deletion so reaping cannot collide with `git branch -D`. |
|
|
91
|
-
| Story init (`/
|
|
92
|
-
| Epic deliver wave loop (`/
|
|
93
|
-
| Drain pending-cleanup (operator-driven) | `drain-pending-cleanup.js` (run directly — see below) | n/a | n/a | ✅ Yes | Manual escape hatch; same drain + Windows escalation as the `/
|
|
91
|
+
| Story init (`/deliver <storyId>`) | `story-init.js` | ❌ No | ❌ No | ❌ No | Story execution relies on the dispatch/close pair to clean up; it only creates its own worktree. |
|
|
92
|
+
| Epic deliver wave loop (`/deliver`) | `/deliver` slash command + `lib/orchestration/epic-runner/*` | ❌ No | ❌ No | ❌ No | Does not call `sweepStaleLocks` or `gc` directly; cleanup still flows through dispatch + close. |
|
|
93
|
+
| Drain pending-cleanup (operator-driven) | `drain-pending-cleanup.js` (run directly — see below) | n/a | n/a | ✅ Yes | Manual escape hatch; same drain + Windows escalation as the `/plan` and `/deliver` paths. |
|
|
94
94
|
|
|
95
95
|
Operator takeaway: if you need to force a sweep/GC without closing a story,
|
|
96
|
-
the most direct path is re-running `/
|
|
96
|
+
the most direct path is re-running `/plan` (or rebuilding the dispatch
|
|
97
97
|
manifest via `dispatcher.js`) against the active epic. Running
|
|
98
|
-
`/
|
|
98
|
+
`/deliver <storyId>` on its own does **not** clean up orphan worktrees
|
|
99
99
|
or stale locks.
|
|
100
100
|
|
|
101
101
|
## Draining the pending-cleanup ledger
|
|
@@ -116,7 +116,7 @@ PowerShell `Get-CimInstance Win32_Process`, terminating them with
|
|
|
116
116
|
> `/drain-pending-cleanup` slash command — it was demoted to a
|
|
117
117
|
> directly-runnable script (Story #3706, overturning the
|
|
118
118
|
> `docs/decisions.md` matrix row that originally kept it as a command).
|
|
119
|
-
> The three automatic callers — `/
|
|
119
|
+
> The three automatic callers — `/deliver` runner Phase 7,
|
|
120
120
|
> `story-close.js`, and `worktree-sweep.js` — invoke
|
|
121
121
|
> `drain-pending-cleanup.js` **directly**, so the demotion does not touch
|
|
122
122
|
> them. The manual path survives unchanged as
|
|
@@ -126,8 +126,8 @@ PowerShell `Get-CimInstance Win32_Process`, terminating them with
|
|
|
126
126
|
|
|
127
127
|
| Trigger | Caller |
|
|
128
128
|
| ---------------- | ---------------------------------------------------------------------------- |
|
|
129
|
-
| `/
|
|
130
|
-
| `/
|
|
129
|
+
| `/deliver` | [`Cleaner` lifecycle listener](../../scripts/lib/orchestration/lifecycle/listeners/cleaner.js) at the close-tail cleanup phase (before `wm.gc()`) |
|
|
130
|
+
| `/plan` | [`drainPendingCleanupAtBoot`](../../scripts/epic-plan-spec.js) → [`worktree-sweep.js`](../../scripts/lib/orchestration/plan-runner/worktree-sweep.js) |
|
|
131
131
|
| Story merge close | [`story-close.js`](../../scripts/story-close.js) (`drainPendingCleanupAfterClose`) |
|
|
132
132
|
|
|
133
133
|
All automatic paths call `forceDrainPendingCleanup()` (or are folded into
|
|
@@ -312,6 +312,6 @@ Human reviewers should **keep using the main checkout** — not a worktree:
|
|
|
312
312
|
`git worktree remove --force <path>`. Confirm there is no uncommitted work
|
|
313
313
|
first.
|
|
314
314
|
- **Disable temporarily**: flip `enabled: false` in `.agentrc.json`. The next
|
|
315
|
-
`/
|
|
315
|
+
`/deliver` skips worktree creation entirely.
|
|
316
316
|
- **Inspect live worktrees**: `git worktree list --porcelain` on the main
|
|
317
317
|
checkout. Each block shows `worktree <path>` / `branch refs/heads/story-<id>`.
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
---
|
|
2
|
+
description:
|
|
3
|
+
Unified planning entry point. Routes a seed idea (via scope triage) or an
|
|
4
|
+
existing Epic ID to the right planning path — the full Epic pipeline
|
|
5
|
+
(PRD, Tech Spec, Acceptance Spec, decomposition) or the standalone-Story
|
|
6
|
+
authoring path — and absorbs every planning flag.
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# /plan [Epic ID] | --idea "<seed>" | --from-notes <path>
|
|
10
|
+
|
|
11
|
+
## Role
|
|
12
|
+
|
|
13
|
+
Router. `/plan` owns argument parsing and path selection only — all phase
|
|
14
|
+
content lives in the two path helpers:
|
|
15
|
+
|
|
16
|
+
- [`helpers/plan-epic.md`](helpers/plan-epic.md) — the full Epic planning
|
|
17
|
+
pipeline (PRD, Tech Spec, Acceptance Spec, work breakdown, healthcheck,
|
|
18
|
+
handoff).
|
|
19
|
+
- [`helpers/plan-story.md`](helpers/plan-story.md) — the standalone-Story
|
|
20
|
+
authoring path (context envelope → host-LLM draft → HITL → issue create).
|
|
21
|
+
|
|
22
|
+
The existing **scope-triage skill**
|
|
23
|
+
([`core/scope-triage`](../skills/core/scope-triage/SKILL.md), verdicts
|
|
24
|
+
`epic | story | borderline`) is the router's classifier on the `--idea`
|
|
25
|
+
path; no new classification machinery exists.
|
|
26
|
+
|
|
27
|
+
## Inputs
|
|
28
|
+
|
|
29
|
+
| Invocation | Behavior |
|
|
30
|
+
| --- | --- |
|
|
31
|
+
| `/plan --idea "<seed>"` | Ideation → **scope triage**. Verdict `epic` → run [`helpers/plan-epic.md`](helpers/plan-epic.md) from Phase 1 (Idea Refinement). Verdict `story` → run [`helpers/plan-story.md`](helpers/plan-story.md) Phases 1–3. Verdict `borderline` → present both options and let the operator choose. |
|
|
32
|
+
| `/plan <epicId>` | Existing-Epic path — run [`helpers/plan-epic.md`](helpers/plan-epic.md) from Phase 5. When the helper's story-sized advisory fires (the Epic is really one Story), convert **internally** by switching to [`helpers/plan-story.md`](helpers/plan-story.md) — do not re-triage and do not hop commands. |
|
|
33
|
+
| `/plan --from-notes <path>` | Internal handoff target (e.g. from `/audit-to-stories`). The notes file already encodes the path decision; do **not** re-run scope triage. Route per the notes' declared shape. |
|
|
34
|
+
|
|
35
|
+
## Flags
|
|
36
|
+
|
|
37
|
+
`/plan` absorbs every flag the two retired planning commands accepted and
|
|
38
|
+
forwards them to the active path helper:
|
|
39
|
+
|
|
40
|
+
| Flag | Path | Meaning |
|
|
41
|
+
| --- | --- | --- |
|
|
42
|
+
| `--idea "<seed>"` | both | Seed text; triggers scope triage. |
|
|
43
|
+
| `--from-notes <path>` | both | Pre-triaged handoff notes; skips triage. |
|
|
44
|
+
| `--force` | Epic | Close + recreate an existing ticket tree on re-plan. |
|
|
45
|
+
| `--force-review` | Epic | Force the operator review gate even when risk routing would skip it. |
|
|
46
|
+
| `--allow-over-budget` | Epic | Permit a decomposition that exceeds `planning.maxTickets`. |
|
|
47
|
+
| `--steal` | Epic | Forcibly transfer a foreign Epic-lease. |
|
|
48
|
+
| `--dry-run` | both | Author + validate without GitHub writes. |
|
|
49
|
+
| `--body <path>` | Story | Pre-authored Story body file; validate (and create, unless `--dry-run`) without re-authoring. |
|
|
50
|
+
| `--persona <name>` | Story | Override the persona label on the drafted Story. |
|
|
51
|
+
| `--refine` / `--no-refine` | Story | Toggle the draft refinement loop. |
|
|
52
|
+
|
|
53
|
+
**Cross-path flags are no-ops with a warning.** An Epic-only flag passed on
|
|
54
|
+
the story path (or vice versa) is reported once
|
|
55
|
+
(`[plan] --force has no effect on the story path`) and ignored — never an
|
|
56
|
+
error. The historical bidirectional escalation between the two planning
|
|
57
|
+
commands (story-sized Epic ↘ Story; epic-sized Story draft ↗ Epic) is now
|
|
58
|
+
an **internal branch switch** inside this router: same skills, same
|
|
59
|
+
helpers, no command hop and no operator re-entry.
|
|
60
|
+
|
|
61
|
+
## First-run preflight
|
|
62
|
+
|
|
63
|
+
Before routing to a path helper, run a **first-run preflight** to catch
|
|
64
|
+
common day-0 issues that would silently degrade every downstream task.
|
|
65
|
+
|
|
66
|
+
### When the preflight fires
|
|
67
|
+
|
|
68
|
+
The preflight runs when **any** of these is true:
|
|
69
|
+
|
|
70
|
+
1. One or more `project.docsContextFiles` entries are absent under the
|
|
71
|
+
configured `docsRoot`.
|
|
72
|
+
2. One or more present `docsContextFiles` still carry the
|
|
73
|
+
`<!-- MANDREL:STUB -->` marker (i.e. they are un-edited scaffolded stubs).
|
|
74
|
+
3. The last `mandrel doctor` verdict cached in `temp/doctor-result.json`
|
|
75
|
+
records `"verdict": "unready"`. An **absent** cache file is no signal —
|
|
76
|
+
doctor may simply never have run; only an explicit recorded unready
|
|
77
|
+
verdict fires this signal.
|
|
78
|
+
|
|
79
|
+
### Preflight procedure
|
|
80
|
+
|
|
81
|
+
1. **Detect the condition.** Check the three signals above. When none is
|
|
82
|
+
true, skip the preflight entirely — no operator interaction, no delay.
|
|
83
|
+
2. **Offer to flesh out docs.** Summarize the found condition to the
|
|
84
|
+
operator (e.g. "3 docsContextFiles are missing" or "architecture.md
|
|
85
|
+
still carries the stub marker") and ask:
|
|
86
|
+
> *Do you want to flesh out these docs from the codebase before planning?
|
|
87
|
+
> [y/N]*
|
|
88
|
+
3. **On acceptance.** Walk through each affected file, read relevant
|
|
89
|
+
codebase artifacts (source files, README, existing docs), and write real
|
|
90
|
+
content to replace the stub. Then re-run `mandrel doctor` to confirm
|
|
91
|
+
readiness. If doctor passes, proceed to routing.
|
|
92
|
+
4. **On decline.** Log one line:
|
|
93
|
+
> *[plan] Proceeding with degraded doc context — planning quality may be
|
|
94
|
+
> reduced.*
|
|
95
|
+
Then continue to the normal routing procedure below.
|
|
96
|
+
|
|
97
|
+
The preflight is **never a hard stop** — declining continues planning with a
|
|
98
|
+
noted degradation. It only fires when there is a genuine signal (missing or
|
|
99
|
+
stubbed docs, or an unready doctor verdict).
|
|
100
|
+
|
|
101
|
+
## Procedure
|
|
102
|
+
|
|
103
|
+
1. **Parse args.** Exactly one of `<epicId>`, `--idea`, `--from-notes`, or
|
|
104
|
+
`--body` must be present; anything else is a usage error naming the four
|
|
105
|
+
forms. A `--body` invocation routes to the story path (no triage).
|
|
106
|
+
2. **First-run preflight.** Run the preflight above. Skip when all signals
|
|
107
|
+
are clear (healthy project).
|
|
108
|
+
3. **Triage (idea path only).** Run the
|
|
109
|
+
[`core/scope-triage`](../skills/core/scope-triage/SKILL.md) skill on the
|
|
110
|
+
seed. Record the verdict in chat (one line).
|
|
111
|
+
4. **Delegate.** Read the selected path helper **in full** and execute it
|
|
112
|
+
from its entry phase, forwarding the absorbed flags. The helper's phase
|
|
113
|
+
numbering, HITL gates, and scripts are unchanged — this router adds no
|
|
114
|
+
phase content.
|
|
115
|
+
5. **Internal returns.** When a path helper would historically have handed
|
|
116
|
+
off to the other planning command, switch helpers in-place and continue;
|
|
117
|
+
surface the switch to the operator as a one-line note.
|
|
118
|
+
|
|
119
|
+
## Constraints
|
|
120
|
+
|
|
121
|
+
- The plan→deliver boundary stays a hard stop: `/plan` never starts
|
|
122
|
+
delivery. It ends by naming the follow-up — `/deliver <epicId>` for a
|
|
123
|
+
planned Epic, `/deliver <storyId>` for a standalone Story.
|
|
124
|
+
- The router never calls planning scripts directly; the path helpers own
|
|
125
|
+
every script invocation.
|
|
126
|
+
|
|
127
|
+
## See also
|
|
128
|
+
|
|
129
|
+
- [`/deliver`](deliver.md) — the unified delivery entry point.
|
|
130
|
+
- [`helpers/plan-epic.md`](helpers/plan-epic.md) /
|
|
131
|
+
[`helpers/plan-story.md`](helpers/plan-story.md) — the path helpers.
|
|
@@ -33,7 +33,7 @@ resolution, redaction, coverage verdict, missing-test proposal, classification,
|
|
|
33
33
|
and dedup/route decisions. The agent never invents those decisions in prose.
|
|
34
34
|
|
|
35
35
|
> **When to run**: ad-hoc agent-driven exploration of a freshly delivered Story
|
|
36
|
-
> or Feature, a regression sweep over a risky surface before `/
|
|
36
|
+
> or Feature, a regression sweep over a risky surface before `/deliver`, or
|
|
37
37
|
> a structured agent-driven bug-hunt the operator wants captured into a
|
|
38
38
|
> triageable ledger.
|
|
39
39
|
>
|
|
@@ -22,7 +22,7 @@ console filtering.
|
|
|
22
22
|
|
|
23
23
|
> **When to run**: During sprint testing to exercise a targeted slice of the
|
|
24
24
|
> acceptance suite (a feature, a tag expression, or a domain), for regression
|
|
25
|
-
> passes before `/
|
|
25
|
+
> passes before `/deliver`, or on demand while debugging a Story's
|
|
26
26
|
> user-visible behavior in a live browser.
|
|
27
27
|
>
|
|
28
28
|
> **Persona**: `qa-engineer` · **Skills**: `stack/qa/gherkin-authoring`,
|
package/README.md
CHANGED
|
@@ -25,37 +25,31 @@ provisions both as part of a cold start (`git init` → `gh repo create --push`
|
|
|
25
25
|
provisioning, grant the scope with `gh auth refresh -s project` (re-auth
|
|
26
26
|
in the browser when prompted) before running `bootstrap.js`.
|
|
27
27
|
|
|
28
|
-
See the [Compatibility matrix](docs/upgrade-major.md#compatibility-matrix)
|
|
29
|
-
section of `docs/upgrade-major.md` for the supported OS / Node /
|
|
30
|
-
package-manager combinations.
|
|
31
|
-
|
|
32
28
|
## Quickstart
|
|
33
29
|
|
|
34
|
-
The canonical cold-start path is one command, then
|
|
35
|
-
commands inside Claude Code:
|
|
30
|
+
The canonical cold-start path is one command, then one slash command:
|
|
36
31
|
|
|
37
32
|
```bash
|
|
38
|
-
npx mandrel init # install mandrel → sync → prompt → bootstrap
|
|
33
|
+
npx mandrel init # install mandrel → sync → prompt → bootstrap → onboarding tail → /plan handoff
|
|
39
34
|
```
|
|
40
35
|
|
|
41
36
|
```text
|
|
42
37
|
# then, inside Claude Code (commands load from .claude/commands/):
|
|
43
|
-
/
|
|
44
|
-
/epic-plan # ideation -> PRD/Tech Spec -> Epic/Feature/Story hierarchy
|
|
38
|
+
/plan # ideation -> PRD/Tech Spec -> Epic with child Stories
|
|
45
39
|
```
|
|
46
40
|
|
|
47
41
|
`npx mandrel init` installs `mandrel` (when `./.agents/` is absent),
|
|
48
42
|
materializes it via `mandrel sync`, then asks whether to **configure now**
|
|
49
|
-
(option 1 → runs `
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
review → retro → open PR).
|
|
43
|
+
(option 1 → runs `bootstrap.js`, then the onboarding tail: stack detection,
|
|
44
|
+
docs scaffolding offer, `mandrel doctor` readiness gate, and a `/plan`
|
|
45
|
+
handoff) or stop at **just the files** (option 2 → re-run `mandrel init`
|
|
46
|
+
any time to configure). Pass `--assume-yes` for a non-interactive run that
|
|
47
|
+
proceeds straight to configure (and forwards the flag to bootstrap). When
|
|
48
|
+
`./.agents/` is already present (you ran `npm install mandrel` first), `init`
|
|
49
|
+
skips the install/sync and goes straight to the prompt. Once `mandrel init`
|
|
50
|
+
completes, you land at the `/plan` handoff — run `/plan --idea "<seed>"` to
|
|
51
|
+
start planning your first Epic, then deliver it with `/deliver <id>` (wave
|
|
52
|
+
loop → validation → review → retro → open PR).
|
|
59
53
|
|
|
60
54
|
### Manual equivalent
|
|
61
55
|
|
|
@@ -108,29 +102,23 @@ npx mandrel update
|
|
|
108
102
|
|
|
109
103
|
1. **Resolve** the newest published version (a `npm view mandrel
|
|
110
104
|
version` registry probe) and the currently installed version.
|
|
111
|
-
2. **
|
|
112
|
-
|
|
113
|
-
[`docs/upgrade-major.md`](docs/upgrade-major.md), and exits non-zero
|
|
114
|
-
without touching anything. Re-run with `--major` to apply it.
|
|
115
|
-
3. **No-op short-circuit** — already on the newest version ⇒ nothing to do.
|
|
116
|
-
4. **Install** the target version with the project's package manager —
|
|
105
|
+
2. **No-op short-circuit** — already on the newest version ⇒ nothing to do.
|
|
106
|
+
3. **Install** the target version with the project's package manager —
|
|
117
107
|
auto-detected from the lockfile (`pnpm-lock.yaml` ⇒ pnpm, `yarn.lock` ⇒
|
|
118
108
|
yarn, otherwise npm) so the bump lands in your real lockfile. The
|
|
119
109
|
dependency bump is left **staged** on disk — `mandrel update` performs no
|
|
120
110
|
`git add` / `git commit`, so you review and commit the lockfile change
|
|
121
111
|
yourself.
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
112
|
+
4. **Sync** — re-materialize `./.agents/` from the freshly installed payload.
|
|
113
|
+
5. **Migrate** — apply version-keyed migration steps for the crossed range.
|
|
114
|
+
6. **Doctor** — run the check registry to verify the resulting install.
|
|
115
|
+
7. **Surface** the target changelog section.
|
|
126
116
|
|
|
127
117
|
### Flags
|
|
128
118
|
|
|
129
119
|
- `--dry-run` — print the resolved target version and the ordered step
|
|
130
120
|
plan, then exit. No dependency is bumped, no file is written, no seam
|
|
131
121
|
runs.
|
|
132
|
-
- `--major` — apply a major-version crossing that the gate would otherwise
|
|
133
|
-
refuse. Review [`docs/upgrade-major.md`](docs/upgrade-major.md) first.
|
|
134
122
|
- `--install-cmd "<cmd>"` — override the auto-detected install command. The
|
|
135
123
|
package manager is normally detected from your lockfile
|
|
136
124
|
(`pnpm-lock.yaml` ⇒ `pnpm add -D …`, `yarn.lock` ⇒ `yarn add -D …`,
|
|
@@ -150,14 +138,6 @@ npx mandrel sync # re-materialize ./.agents/
|
|
|
150
138
|
npx mandrel doctor # verify the install
|
|
151
139
|
```
|
|
152
140
|
|
|
153
|
-
### Migrating from `@mandrelai/agents`
|
|
154
|
-
|
|
155
|
-
The framework package was renamed from the scoped `@mandrelai/agents` to the
|
|
156
|
-
unscoped `mandrel`. Already on the old name? `mandrel update` does **not**
|
|
157
|
-
auto-migrate (it resolves the package by name), so make the one-time manual
|
|
158
|
-
hop documented in
|
|
159
|
-
[`docs/migrate-mandrelai-to-mandrel.md`](docs/migrate-mandrelai-to-mandrel.md).
|
|
160
|
-
|
|
161
141
|
## Contributors
|
|
162
142
|
|
|
163
143
|
Only `.agents/` is distributed to consumers — it ships inside the
|