mandrel 1.58.0 → 1.60.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 +100 -98
- package/.agents/docs/SDLC.md +140 -141
- package/.agents/docs/configuration.md +16 -16
- package/.agents/docs/workflows.md +7 -8
- 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/schemas/agentrc.schema.json +3 -3
- package/.agents/schemas/audit-rules.json +20 -0
- 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 +1 -1
- package/.agents/scripts/acceptance-eval.js +21 -4
- package/.agents/scripts/acceptance-spec-reconciler.js +2 -2
- package/.agents/scripts/analyze-execution.js +2 -2
- package/.agents/scripts/assert-branch.js +1 -3
- package/.agents/scripts/audit-to-stories.js +1 -1
- package/.agents/scripts/bootstrap.js +1 -1
- package/.agents/scripts/check-arch-cycles.js +360 -0
- package/.agents/scripts/check-doc-links.js +2 -3
- package/.agents/scripts/coverage-capture.js +24 -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 +11 -9
- package/.agents/scripts/epic-deliver-prepare.js +13 -5
- package/.agents/scripts/epic-execute-record-wave.js +5 -5
- 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 +2 -2
- package/.agents/scripts/generate-workflows-doc.js +1 -1
- package/.agents/scripts/git-rebase-and-resolve.js +1 -1
- package/.agents/scripts/hierarchy-gate.js +40 -24
- 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/baselines/kinds/coverage.js +33 -149
- package/.agents/scripts/lib/baselines/kinds/duplication.js +27 -116
- package/.agents/scripts/lib/baselines/kinds/kind-factory.js +192 -0
- package/.agents/scripts/lib/baselines/kinds/lighthouse.js +34 -133
- package/.agents/scripts/lib/baselines/kinds/maintainability.js +31 -124
- package/.agents/scripts/lib/baselines/kinds/mutation.js +25 -111
- package/.agents/scripts/lib/baselines/maintainability-baseline-io.js +59 -0
- package/.agents/scripts/lib/baselines/maintainability-baseline-save.js +37 -0
- package/.agents/scripts/lib/baselines/writer.js +1 -1
- 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 +1 -1
- package/.agents/scripts/lib/bootstrap/commit-push.js +2 -2
- package/.agents/scripts/lib/close-validation/commands.js +188 -0
- package/.agents/scripts/lib/close-validation/gates.js +235 -0
- package/.agents/scripts/lib/close-validation/process.js +101 -0
- package/.agents/scripts/lib/close-validation/projections/maintainability.js +1 -1
- package/.agents/scripts/lib/close-validation/runner.js +325 -0
- package/.agents/scripts/lib/close-validation/telemetry.js +70 -0
- package/.agents/scripts/lib/codebase-snapshot.js +1 -1
- package/.agents/scripts/lib/config/explain.js +1 -1
- package/.agents/scripts/lib/config/quality.js +6 -6
- 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-resolver.js +2 -5
- 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/coverage-capture.js +147 -4
- package/.agents/scripts/lib/cpu-pool.js +14 -0
- package/.agents/scripts/lib/crap-utils.js +6 -11
- package/.agents/scripts/lib/duplicate-search.js +1 -1
- package/.agents/scripts/lib/dynamic-workflow/capability.js +1 -1
- package/.agents/scripts/lib/dynamic-workflow/documentation-report-contract.js +87 -0
- package/.agents/scripts/lib/epic-plan-clarity.js +1 -1
- package/.agents/scripts/lib/epic-plan-ideation.js +1 -1
- 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/git-utils.js +24 -22
- package/.agents/scripts/lib/label-constants.js +3 -4
- package/.agents/scripts/lib/label-taxonomy.js +3 -8
- package/.agents/scripts/lib/maintainability-engine.js +1 -1
- package/.agents/scripts/lib/maintainability-utils.js +4 -187
- package/.agents/scripts/lib/observability/perf-report-readers.js +32 -23
- package/.agents/scripts/lib/orchestration/acceptance-eval-decision.js +81 -7
- package/.agents/scripts/lib/orchestration/code-review.js +95 -82
- 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 +14 -37
- package/.agents/scripts/lib/orchestration/epic-cleanup.js +1 -1
- package/.agents/scripts/lib/orchestration/epic-deliver-lease-guard.js +22 -22
- 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-decompose/phases/planning-artifacts.js +2 -2
- package/.agents/scripts/lib/orchestration/epic-plan-lease-guard.js +206 -58
- package/.agents/scripts/lib/orchestration/epic-plan-spec/phases/drain.js +1 -1
- package/.agents/scripts/lib/orchestration/epic-plan-spec/phases/plan-epic.js +27 -3
- 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 +28 -8
- 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 +13 -41
- package/.agents/scripts/lib/orchestration/epic-runner/phases/snapshot.js +7 -7
- package/.agents/scripts/lib/orchestration/epic-runner/progress-reporter/composition.js +2 -3
- package/.agents/scripts/lib/orchestration/epic-runner/progress-reporter/signals.js +2 -8
- package/.agents/scripts/lib/orchestration/epic-runner/progress-reporter/transport.js +4 -4
- package/.agents/scripts/lib/orchestration/epic-runner/progress-signals/component-drift.js +103 -0
- package/.agents/scripts/lib/orchestration/epic-runner/progress-signals/crap-drift.js +22 -64
- package/.agents/scripts/lib/orchestration/epic-runner/progress-signals/maintainability-drift.js +38 -76
- package/.agents/scripts/lib/orchestration/epic-runner/story-launcher.js +4 -4
- package/.agents/scripts/lib/orchestration/epic-runner/story-run-progress-writer.js +10 -10
- package/.agents/scripts/lib/orchestration/epic-runner/sub-agent-return.js +8 -20
- 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 +6 -5
- 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 +144 -0
- package/.agents/scripts/lib/orchestration/lifecycle/emit-story-dispatch-end.js +1 -1
- package/.agents/scripts/lib/orchestration/lifecycle/emit-story-heartbeat.js +3 -3
- 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 +8 -8
- 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/notification.js +3 -3
- package/.agents/scripts/lib/orchestration/post-merge/phases/ticket-closure.js +3 -3
- package/.agents/scripts/lib/orchestration/post-merge/phases/worktree-reap.js +7 -7
- package/.agents/scripts/lib/orchestration/preflight-cache.js +36 -13
- 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/review-providers/codex.js +5 -60
- package/.agents/scripts/lib/orchestration/review-providers/native.js +7 -6
- package/.agents/scripts/lib/orchestration/review-providers/parse-findings.js +105 -0
- package/.agents/scripts/lib/orchestration/review-providers/security-review.js +7 -59
- package/.agents/scripts/lib/orchestration/single-story-close/phases/close-validation.js +2 -4
- package/.agents/scripts/lib/orchestration/single-story-close/phases/options.js +1 -1
- package/.agents/scripts/lib/orchestration/single-story-close/phases/wrong-tree-guard.js +1 -1
- package/.agents/scripts/lib/orchestration/single-story-close/runner.js +2 -4
- package/.agents/scripts/lib/orchestration/single-story-lease-guard.js +32 -35
- package/.agents/scripts/lib/orchestration/skill-capsule-loader.js +1 -2
- 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/auto-refresh-runner.js +451 -503
- package/.agents/scripts/lib/orchestration/story-close/baseline-attribution/phases/pre-merge-attribution.js +8 -2
- package/.agents/scripts/lib/orchestration/story-close/baseline-attribution/phases/refresh-commit.js +47 -2
- package/.agents/scripts/lib/orchestration/story-close/baseline-attribution/phases/regression-projection.js +2 -2
- package/.agents/scripts/lib/orchestration/story-close/baseline-friction-body.js +1 -1
- package/.agents/scripts/lib/orchestration/story-close/format-autofix.js +358 -54
- package/.agents/scripts/lib/orchestration/story-close/phases/close.js +1 -1
- package/.agents/scripts/lib/orchestration/story-close/phases/gates.js +3 -2
- package/.agents/scripts/lib/orchestration/story-close/phases/locked-pipeline.js +32 -5
- package/.agents/scripts/lib/orchestration/story-close/post-merge-close.js +5 -18
- package/.agents/scripts/lib/orchestration/story-close/pre-merge-validation.js +3 -3
- package/.agents/scripts/lib/orchestration/story-close-recovery.js +33 -16
- package/.agents/scripts/lib/orchestration/story-reachability.js +47 -0
- 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 +4 -35
- 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 +44 -73
- package/.agents/scripts/lib/orchestration/ticketing/reads.js +16 -7
- package/.agents/scripts/lib/orchestration/ticketing/state.js +53 -439
- package/.agents/scripts/lib/orchestration/ticketing/transition.js +471 -0
- package/.agents/scripts/lib/orchestration/ticketing.js +0 -1
- package/.agents/scripts/lib/orchestration/wave-record-notifications.js +3 -3
- package/.agents/scripts/lib/orchestration/wave-record-projection.js +2 -8
- 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/project-root.js +17 -0
- 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-adjacency.js +76 -0
- 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 +9 -9
- package/.agents/scripts/lib/story-plan.js +1 -1
- package/.agents/scripts/lib/templates/decomposer-prompts.js +59 -52
- package/.agents/scripts/lib/transpile.js +93 -0
- package/.agents/scripts/lib/wave-runner/tick.js +4 -153
- package/.agents/scripts/lib/workers/crap-worker.js +1 -1
- package/.agents/scripts/lib/workers/maintainability-report-worker.js +1 -1
- package/.agents/scripts/lib/worktree/lifecycle/creation.js +20 -2
- package/.agents/scripts/lib/worktree/lifecycle/force-drain.js +90 -0
- package/.agents/scripts/lib/worktree/lifecycle/reap.js +26 -8
- package/.agents/scripts/lib/worktree/node-modules-strategy.js +74 -0
- 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 +114 -10
- package/.agents/scripts/resync-status-column.js +1 -1
- package/.agents/scripts/retro-run.js +2 -2
- package/.agents/scripts/run-lint.js +10 -1
- package/.agents/scripts/run-tests.js +24 -4
- package/.agents/scripts/single-story-init.js +1 -1
- package/.agents/scripts/stories-wave-tick.js +13 -10
- package/.agents/scripts/story-close.js +1 -1
- package/.agents/scripts/story-init.js +162 -26
- package/.agents/scripts/story-phase.js +5 -5
- package/.agents/scripts/story-plan.js +3 -3
- package/.agents/scripts/sync-branch-from-base.js +2 -2
- 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/skills/stack/qa/lighthouse-baseline/SKILL.md +1 -1
- package/.agents/templates/agent-protocol.md +2 -2
- package/.agents/workflows/agents-update.md +2 -2
- 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 +226 -0
- 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/code-review.md +5 -5
- package/.agents/workflows/{epic-deliver.md → helpers/deliver-epic.md} +59 -66
- 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 +28 -39
- 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 +12 -11
- package/.agents/workflows/helpers/worktree-lifecycle.md +18 -18
- package/.agents/workflows/onboard.md +21 -20
- package/.agents/workflows/plan.md +89 -0
- package/.agents/workflows/qa-explore.md +1 -1
- package/.agents/workflows/qa-run-harness.md +1 -1
- package/README.md +17 -20
- package/docs/CHANGELOG.md +1149 -0
- package/lib/cli/__tests__/update-changelog-surface.test.js +357 -0
- package/lib/cli/__tests__/update-reexec.test.js +513 -0
- package/lib/cli/init.js +338 -0
- package/lib/cli/update.js +413 -52
- package/package.json +3 -1
- package/.agents/scripts/lib/auto-refresh-baselines.js +0 -308
- package/.agents/scripts/lib/close-validation.js +0 -897
- package/.agents/scripts/lib/orchestration/cascade-grouping.js +0 -275
- package/.agents/scripts/lib/orchestration/epic-runner/progress-reporter.js +0 -69
- package/.agents/scripts/lib/orchestration/reconciler.js +0 -137
- package/.agents/scripts/lib/orchestration/story-close/format-autofix-scoped.js +0 -221
- package/.agents/scripts/lib/orchestration/story-close/format-autofix-shared.js +0 -123
- package/.agents/scripts/lib/task-utils.js +0 -26
- package/.agents/scripts/story-deliver-prepare.js +0 -267
|
@@ -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,5 +632,6 @@ safe.
|
|
|
632
632
|
|
|
633
633
|
## See also
|
|
634
634
|
|
|
635
|
-
- [`/
|
|
636
|
-
|
|
635
|
+
- [`/deliver`](deliver-stories.md) — several standalone Stories at
|
|
636
|
+
once (dependency-aware waves).
|
|
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>`.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
description: >-
|
|
3
3
|
Guided first-run onboarding for a freshly installed Mandrel. Detects the
|
|
4
4
|
consumer stack, offers to scaffold any missing docsContextFiles, runs
|
|
5
|
-
`mandrel doctor` as a readiness gate, and hands off to a started /
|
|
5
|
+
`mandrel doctor` as a readiness gate, and hands off to a started /plan.
|
|
6
6
|
The whole path is designed to take about 15 minutes from a clean checkout to
|
|
7
7
|
a planned Epic.
|
|
8
8
|
---
|
|
@@ -14,7 +14,7 @@ description: >-
|
|
|
14
14
|
Onboarding guide. You walk a first-time operator from a freshly installed
|
|
15
15
|
Mandrel to their first planned Epic, composing the building blocks shipped by
|
|
16
16
|
the guided-onboard Feature (#3514): stack detection, docs scaffolding, the
|
|
17
|
-
`mandrel doctor` readiness check, and a started `/
|
|
17
|
+
`mandrel doctor` readiness check, and a started `/plan` handoff.
|
|
18
18
|
|
|
19
19
|
## Overview
|
|
20
20
|
|
|
@@ -27,7 +27,7 @@ block, then hands the operator off to planning:
|
|
|
27
27
|
→ Phase 1 — Detect stack (lib/onboard/detect-stack.js#detectStack)
|
|
28
28
|
→ Phase 2 — Offer docs scaffolding (lib/onboard/scaffold-docs.js#scaffoldDocs)
|
|
29
29
|
→ Phase 3 — Readiness gate (mandrel doctor → lib/cli/doctor.js)
|
|
30
|
-
→ Phase 4 — Handoff to /
|
|
30
|
+
→ Phase 4 — Handoff to /plan (started, not auto-run)
|
|
31
31
|
```
|
|
32
32
|
|
|
33
33
|
Each phase is **advisory and resumable**: re-running `/onboard` on an
|
|
@@ -40,15 +40,16 @@ genuinely missing, and `mandrel doctor` is read-only).
|
|
|
40
40
|
| Scenario | Command |
|
|
41
41
|
| --- | --- |
|
|
42
42
|
| First run after installing Mandrel into a project | `/onboard` |
|
|
43
|
-
| Plan a new Epic once onboarded | `/
|
|
44
|
-
| Deliver Epic-attached Stories | `/
|
|
43
|
+
| Plan a new Epic once onboarded | `/plan <epicId>` or `/plan --idea "<seed>"` |
|
|
44
|
+
| Deliver Epic-attached Stories | `/deliver <epicId>` |
|
|
45
45
|
|
|
46
46
|
## Prerequisites
|
|
47
47
|
|
|
48
48
|
1. Mandrel installed and bootstrapped into the project. The zero-to-installed
|
|
49
|
-
path is `npx
|
|
50
|
-
package, runs `mandrel sync` to materialize the `.agents/`
|
|
51
|
-
|
|
49
|
+
path is `npx mandrel init`, which installs the `mandrel`
|
|
50
|
+
package (when absent), runs `mandrel sync` to materialize the `.agents/`
|
|
51
|
+
bundle, and then — on the **configure now** prompt option — execs
|
|
52
|
+
`.agents/scripts/bootstrap.js` to provision the project (labels,
|
|
52
53
|
board, `.agentrc.json` seed). `/onboard` runs **after** that bootstrap
|
|
53
54
|
completes — it does not invoke `bootstrap.js` itself, so the coupling is
|
|
54
55
|
indirect: bootstrap owns first-time provisioning, `/onboard` owns the
|
|
@@ -67,7 +68,7 @@ planned Epic in roughly **15 minutes**. The budget breaks down as:
|
|
|
67
68
|
| Detect the stack and confirm the report | Phase 1 | ~1 min |
|
|
68
69
|
| Review the missing-docs offer and accept the scaffold | Phase 2 | ~3 min |
|
|
69
70
|
| Run `mandrel doctor` and clear any ✘ checks | Phase 3 | ~5 min |
|
|
70
|
-
| Start `/
|
|
71
|
+
| Start `/plan` and describe the first Epic idea | Phase 4 | ~6 min |
|
|
71
72
|
|
|
72
73
|
If any single phase blows its budget — most often a Phase 3 remedy such as
|
|
73
74
|
authenticating `gh` or installing runtime deps — clear that one check and
|
|
@@ -160,45 +161,45 @@ the command exits:
|
|
|
160
161
|
through the `→` remedies (e.g. authenticate `gh`, set `GITHUB_TOKEN`,
|
|
161
162
|
install runtime deps), then re-run `mandrel doctor` until it is green.
|
|
162
163
|
|
|
163
|
-
Do **not** hand off to `/
|
|
164
|
+
Do **not** hand off to `/plan` while the doctor is red — planning needs a
|
|
164
165
|
working `gh` / `GITHUB_TOKEN` and a materialized `.agents/` bundle, exactly
|
|
165
166
|
what the gate verifies. The `github-token` check never echoes the token value
|
|
166
167
|
(security baseline § Secrets Management).
|
|
167
168
|
|
|
168
|
-
## Phase 4 — Handoff to a started `/
|
|
169
|
+
## Phase 4 — Handoff to a started `/plan`
|
|
169
170
|
|
|
170
171
|
With a green readiness gate, hand the operator off to planning. `/onboard`
|
|
171
172
|
**starts** the handoff — it surfaces the entry point and the idea-refinement
|
|
172
|
-
path — but does **not** auto-run `/
|
|
173
|
+
path — but does **not** auto-run `/plan`, because Epic planning authors
|
|
173
174
|
GitHub artifacts and must stay under explicit operator control.
|
|
174
175
|
|
|
175
|
-
Present the operator with the two `/
|
|
176
|
+
Present the operator with the two `/plan` entry shapes:
|
|
176
177
|
|
|
177
178
|
- **From an idea** (no Epic exists yet):
|
|
178
179
|
|
|
179
180
|
```text
|
|
180
|
-
/
|
|
181
|
+
/plan --idea "<one-line description of the first thing to build>"
|
|
181
182
|
```
|
|
182
183
|
|
|
183
|
-
This enters [`/
|
|
184
|
+
This enters [`/plan`](helpers/plan-epic.md) at Phase 1 (Idea Refinement),
|
|
184
185
|
which refines the seed into a PRD, Tech Spec, and a decomposed
|
|
185
|
-
Epic →
|
|
186
|
+
Epic → Story backlog.
|
|
186
187
|
|
|
187
188
|
- **From an existing Epic** (a `type::epic` issue already exists):
|
|
188
189
|
|
|
189
190
|
```text
|
|
190
|
-
/
|
|
191
|
+
/plan <epicId>
|
|
191
192
|
```
|
|
192
193
|
|
|
193
|
-
Stop here and let the operator invoke `/
|
|
194
|
-
a planned Epic, the natural next step is `/
|
|
194
|
+
Stop here and let the operator invoke `/plan` themselves. Once they have
|
|
195
|
+
a planned Epic, the natural next step is `/deliver <epicId>` to execute
|
|
195
196
|
it — but that is beyond the onboarding path.
|
|
196
197
|
|
|
197
198
|
## Constraints
|
|
198
199
|
|
|
199
200
|
- **Read-before-write.** Phases 1 and 3 are read-only; Phase 2 writes only
|
|
200
201
|
files that are genuinely missing and only on explicit operator acceptance.
|
|
201
|
-
- **Do not auto-run `/
|
|
202
|
+
- **Do not auto-run `/plan`.** Phase 4 starts the handoff; the operator
|
|
202
203
|
invokes planning. Planning authors GitHub artifacts and stays under human
|
|
203
204
|
control.
|
|
204
205
|
- **Never echo secrets.** The `github-token` check and any token-related
|
|
@@ -0,0 +1,89 @@
|
|
|
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
|
+
## Procedure
|
|
62
|
+
|
|
63
|
+
1. **Parse args.** Exactly one of `<epicId>`, `--idea`, `--from-notes`, or
|
|
64
|
+
`--body` must be present; anything else is a usage error naming the four
|
|
65
|
+
forms. A `--body` invocation routes to the story path (no triage).
|
|
66
|
+
2. **Triage (idea path only).** Run the
|
|
67
|
+
[`core/scope-triage`](../skills/core/scope-triage/SKILL.md) skill on the
|
|
68
|
+
seed. Record the verdict in chat (one line).
|
|
69
|
+
3. **Delegate.** Read the selected path helper **in full** and execute it
|
|
70
|
+
from its entry phase, forwarding the absorbed flags. The helper's phase
|
|
71
|
+
numbering, HITL gates, and scripts are unchanged — this router adds no
|
|
72
|
+
phase content.
|
|
73
|
+
4. **Internal returns.** When a path helper would historically have handed
|
|
74
|
+
off to the other planning command, switch helpers in-place and continue;
|
|
75
|
+
surface the switch to the operator as a one-line note.
|
|
76
|
+
|
|
77
|
+
## Constraints
|
|
78
|
+
|
|
79
|
+
- The plan→deliver boundary stays a hard stop: `/plan` never starts
|
|
80
|
+
delivery. It ends by naming the follow-up — `/deliver <epicId>` for a
|
|
81
|
+
planned Epic, `/deliver <storyId>` for a standalone Story.
|
|
82
|
+
- The router never calls planning scripts directly; the path helpers own
|
|
83
|
+
every script invocation.
|
|
84
|
+
|
|
85
|
+
## See also
|
|
86
|
+
|
|
87
|
+
- [`/deliver`](deliver.md) — the unified delivery entry point.
|
|
88
|
+
- [`helpers/plan-epic.md`](helpers/plan-epic.md) /
|
|
89
|
+
[`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`,
|