mandrel 1.59.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 +14 -14
- package/.agents/docs/SDLC.md +129 -134
- package/.agents/docs/configuration.md +16 -16
- package/.agents/docs/workflows.md +6 -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/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 +1 -1
- package/.agents/scripts/acceptance-spec-reconciler.js +2 -2
- 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 +1 -1
- package/.agents/scripts/lib/bootstrap/commit-push.js +2 -2
- 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/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/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/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 +3 -8
- 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/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/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 +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 +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/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/onboard.md +17 -17
- 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 +4 -12
- 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 +31 -29
- package/lib/cli/update.js +413 -52
- package/package.json +2 -1
- package/.agents/scripts/lib/orchestration/reconciler.js +0 -137
|
@@ -28,8 +28,8 @@ import { calculateAll, scanDirectory } from './maintainability-utils.js';
|
|
|
28
28
|
* baseline-snapshot.js — per-Epic baseline lifecycle helpers.
|
|
29
29
|
*
|
|
30
30
|
* Story #1396 (Epic #1386). The Epic-snapshot scheme freezes the maintainability
|
|
31
|
-
* and crap baselines at /
|
|
32
|
-
* at /
|
|
31
|
+
* and crap baselines at /plan time and reconciles them back to `main`
|
|
32
|
+
* at /deliver time. Two helpers, both pure-ish (deterministic given the
|
|
33
33
|
* working tree + injected I/O):
|
|
34
34
|
*
|
|
35
35
|
* - forkMainToEpic({ epicId, cwd }) — copies the tracked main baselines
|
|
@@ -37,20 +37,20 @@ import { calculateAll, scanDirectory } from './maintainability-utils.js';
|
|
|
37
37
|
* source content produces the same destination bytes (no fs churn). When
|
|
38
38
|
* the source baseline is missing, emits a warn through the injected
|
|
39
39
|
* logger and returns `{ written: false, reason: 'source-missing' }` for
|
|
40
|
-
* that file — callers (e.g. /
|
|
40
|
+
* that file — callers (e.g. /plan Phase 7) treat the absence as
|
|
41
41
|
* non-fatal and stay in `--full-scope` mode.
|
|
42
42
|
*
|
|
43
43
|
* - regenerateMainFromTree({ cwd }) — re-scores maintainability + crap
|
|
44
44
|
* against the current working tree and writes the result to the tracked
|
|
45
45
|
* main baseline paths. Returns `{ didChange, paths }` where `didChange`
|
|
46
46
|
* is true iff any baseline file's content differs from what's already on
|
|
47
|
-
* disk. Callers in /
|
|
47
|
+
* disk. Callers in /deliver use `didChange === false` to skip the
|
|
48
48
|
* `baseline-refresh: epic-<id>` commit.
|
|
49
49
|
*
|
|
50
50
|
* Lifecycle note (Story #1467): per-epic ratchet snapshots are ephemeral
|
|
51
51
|
* scratch state under the `temp/epic-<id>/baselines/` namespace, NOT committed
|
|
52
52
|
* artifacts. They inherit the existing per-epic temp-tree cleanup contract —
|
|
53
|
-
* `/
|
|
53
|
+
* `/deliver` reaps the parent `temp/epic-<id>/` directory on merge, so
|
|
54
54
|
* no manual prune is required. Earlier versions of this module wrote under
|
|
55
55
|
* `baselines/epic/<id>/`, which committed them to git and accumulated obsolete
|
|
56
56
|
* snapshots forever.
|
|
@@ -103,7 +103,7 @@ export function epicSnapshotPathFor({ epicId, kind, cwd = process.cwd() }) {
|
|
|
103
103
|
* - Source baseline missing → returned per-file `{ written: false,
|
|
104
104
|
* reason: 'source-missing' }`. Logger warn fires once per missing file.
|
|
105
105
|
* Caller stays in `--full-scope` mode.
|
|
106
|
-
* - Source unreadable / not parseable → throws. Re-running /
|
|
106
|
+
* - Source unreadable / not parseable → throws. Re-running /plan
|
|
107
107
|
* with `--force` after fixing the source recovers.
|
|
108
108
|
*
|
|
109
109
|
* @param {{
|
|
@@ -428,7 +428,7 @@ export function commitSnapshotsToEpicBranch({
|
|
|
428
428
|
* via `delivery.quality.gates.crap.coveragePath`. When coverage is missing and
|
|
429
429
|
* `requireCoverage` is true, the crap regeneration is skipped (didChange stays
|
|
430
430
|
* false for that file) and a warn is emitted — the operator is expected to run
|
|
431
|
-
* `npm run test:coverage` before /
|
|
431
|
+
* `npm run test:coverage` before /deliver if a refresh is anticipated.
|
|
432
432
|
*
|
|
433
433
|
* @param {{
|
|
434
434
|
* cwd?: string,
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* The verification is **static**: we inspect `package.json` for a known BDD
|
|
14
14
|
* runner dependency, and consult a small lookup table of which runners
|
|
15
15
|
* support which pending/skip tag. We do not boot the runner. This keeps
|
|
16
|
-
* `/
|
|
16
|
+
* `/plan` Phase 7 hermetic and offline.
|
|
17
17
|
*
|
|
18
18
|
* **Workspace awareness (Story #2956).** In a pnpm / npm / yarn monorepo the
|
|
19
19
|
* BDD runner is rarely a root devDependency — it lives in the workspace
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* bdd-scenario-scanner.js — Gherkin scenario index for /
|
|
2
|
+
* bdd-scenario-scanner.js — Gherkin scenario index for /plan Phase 7.
|
|
3
3
|
*
|
|
4
4
|
* Story #2637 (sibling to #2634 codebase-snapshot, #2635 spec-freshness,
|
|
5
5
|
* #2636 file-assumption gate). The Acceptance Engineer step of
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* alone — it never inspects the consumer project's existing `.feature`
|
|
8
8
|
* files. Planned ACs frequently duplicate scenarios that already exist or
|
|
9
9
|
* re-specify behaviour the codebase already proves; the duplication is
|
|
10
|
-
* only discovered (at best) during `/
|
|
10
|
+
* only discovered (at best) during `/deliver` or (at worst) after
|
|
11
11
|
* a redundant PR ships.
|
|
12
12
|
*
|
|
13
13
|
* `scanBddScenarios` walks every configured feature root, parses each
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
* have a matching scenario.
|
|
21
21
|
*
|
|
22
22
|
* Determinism is load-bearing: the matcher is keyword-based, not
|
|
23
|
-
* embedding-based, so re-running `/
|
|
23
|
+
* embedding-based, so re-running `/plan` against the same
|
|
24
24
|
* acceptance spec produces the same disposition annotations.
|
|
25
25
|
*/
|
|
26
26
|
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
*
|
|
16
16
|
* All three shapes are relocated under `<repoRoot>/temp/epic/<id>/baselines/`,
|
|
17
17
|
* where they inherit the existing per-epic temp-tree cleanup contract:
|
|
18
|
-
* `/
|
|
18
|
+
* `/deliver` reaps `temp/epic/<id>/` on merge, so the ratchet snapshots
|
|
19
19
|
* are ephemeral scratch state — never committed, no manual prune.
|
|
20
20
|
*
|
|
21
21
|
* The main-tracked `baselines/{maintainability,crap}.json` files are NOT
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* - `enforce_admins: true` — admins do not bypass the prGate suite.
|
|
8
8
|
* - `required_pull_request_reviews.required_approving_review_count: 0` —
|
|
9
9
|
* CI is the gate; the operator monitors and iterates the open PR
|
|
10
|
-
* to green via `/
|
|
10
|
+
* to green via `/deliver`'s Phase 7 watch loop.
|
|
11
11
|
*
|
|
12
12
|
* Behaviour rules
|
|
13
13
|
* ---------------
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* `--full-scope` so a self-diff doesn't degrade to "no files in diff".
|
|
15
15
|
*
|
|
16
16
|
* 2. **Pass `--epic-ref` where the firing site is Epic-aware.** Inside
|
|
17
|
-
* `/
|
|
17
|
+
* `/deliver` the close-validation chain already threads
|
|
18
18
|
* `--epic-ref epic/<id>`; on CI the equivalent surface is the PR's
|
|
19
19
|
* base branch. The template wires `--epic-ref ${EPIC_REF}` through an
|
|
20
20
|
* env var the workflow computes from `github.head_ref` (story-N
|
|
@@ -112,8 +112,8 @@ export function buildManualInstructions({ stagePaths, baseBranch }) {
|
|
|
112
112
|
` git push -u origin ${baseBranch}`,
|
|
113
113
|
'',
|
|
114
114
|
'Story delivery runs in git worktrees that check out tracked files only,',
|
|
115
|
-
'so the .agents/ wiring MUST be committed before any /
|
|
116
|
-
'/
|
|
115
|
+
'so the .agents/ wiring MUST be committed before any /deliver or',
|
|
116
|
+
'/deliver run — otherwise the worktree has no scripts and breaks.',
|
|
117
117
|
].join('\n');
|
|
118
118
|
}
|
|
119
119
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* codebase-snapshot.js — Bounded structural view of the consumer repo.
|
|
3
3
|
*
|
|
4
|
-
* Story #2634 (sibling to #2635 spec-freshness). `/
|
|
4
|
+
* Story #2634 (sibling to #2635 spec-freshness). `/plan` Phase 7
|
|
5
5
|
* authors PRD + Tech Spec from documentation alone — `architecture.md`,
|
|
6
6
|
* `data-dictionary.md`, `decisions.md`, `patterns.md`. When those docs
|
|
7
7
|
* drift from the real source tree, the Architect persona cites modules
|
|
@@ -113,7 +113,7 @@ const KEY_MEANINGS = Object.freeze({
|
|
|
113
113
|
|
|
114
114
|
// planning.*
|
|
115
115
|
'planning.maxTickets':
|
|
116
|
-
'Upper bound on tickets a single /
|
|
116
|
+
'Upper bound on tickets a single /plan run may create.',
|
|
117
117
|
'planning.context.maxBytes':
|
|
118
118
|
'Byte budget for the planning-context payload before summary mode kicks in.',
|
|
119
119
|
'planning.context.summaryMode':
|
|
@@ -29,7 +29,7 @@ export const DEFAULT_DECOMPOSER = Object.freeze({
|
|
|
29
29
|
* host has adequate parallel-agent quota, operators should raise
|
|
30
30
|
* `delivery.deliverRunner.concurrencyCap` — wall-clock time falls
|
|
31
31
|
* proportionally to the extra concurrency. The safe default is a tuning
|
|
32
|
-
* knob, not a performance ceiling. See `epic
|
|
32
|
+
* knob, not a performance ceiling. See `helpers/deliver-epic.md` § Phase 2b and
|
|
33
33
|
* `agentrc-reference.json` `delivery.deliverRunner.concurrencyCap` for details.
|
|
34
34
|
*
|
|
35
35
|
* **`verifyConcurrencyCap`** (Epic #3019 Tech Spec §1.4 / Story #3024) is a
|
|
@@ -44,7 +44,7 @@ const DEFAULT_DELIVER_RUNNER = Object.freeze({
|
|
|
44
44
|
});
|
|
45
45
|
|
|
46
46
|
/**
|
|
47
|
-
* Default auto-fix loop ceilings for /
|
|
47
|
+
* Default auto-fix loop ceilings for /deliver Phase 4 (epic-audit)
|
|
48
48
|
* and Phase 5 (code-review). Operators override via
|
|
49
49
|
* `delivery.epicAudit.*` and `delivery.codeReview.*` in `.agentrc.json`
|
|
50
50
|
* (Story #2611, Epic #2586).
|
|
@@ -77,7 +77,7 @@ export function resolveWorkingPath({
|
|
|
77
77
|
|
|
78
78
|
/**
|
|
79
79
|
* One-shot environment-aware runtime resolution. Returns the trio of runtime
|
|
80
|
-
* signals consumed across `/
|
|
80
|
+
* signals consumed across `/deliver`: whether worktree isolation is on
|
|
81
81
|
* for this process, the session id for claim labels, and whether we're in a
|
|
82
82
|
* Claude Code web session. Each signal also records its **source** so the
|
|
83
83
|
* `story-init` startup log can name why the value is what it is.
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
* parent of `git rev-parse --git-common-dir`) rather than `process.cwd()`.
|
|
45
45
|
* Without this, a story child that `cd`s into `.worktrees/story-<id>/` before
|
|
46
46
|
* calling `story-phase.js` would append `story.heartbeat` records to
|
|
47
|
-
* `<worktree>/temp/epic-N/lifecycle.ndjson`, while the `/
|
|
47
|
+
* `<worktree>/temp/epic-N/lifecycle.ndjson`, while the `/deliver` host
|
|
48
48
|
* (running from the main checkout) reads the main-checkout copy — so the
|
|
49
49
|
* idle-watchdog never sees heartbeats and the Epic-lease guard silently
|
|
50
50
|
* reclaims live foreign claims (the audit-#3513 bug class). Anchoring the
|
|
@@ -335,7 +335,7 @@ export const epicPerfReportPath = (eid, config) =>
|
|
|
335
335
|
|
|
336
336
|
/**
|
|
337
337
|
* `temp/epic-<eid>/epic-perf-report.json` — canonical JSON snapshot of
|
|
338
|
-
* the `epic-perf-report` payload persisted at /
|
|
338
|
+
* the `epic-perf-report` payload persisted at /deliver close
|
|
339
339
|
* (Epic #3019 / Story #3029 / Task #3040). When present alongside the
|
|
340
340
|
* `epic-perf-report` structured comment, the report is discoverable
|
|
341
341
|
* from the file system without round-tripping the ticketing provider,
|
|
@@ -203,7 +203,7 @@ const MERGE_WATCH_SCHEMA = {
|
|
|
203
203
|
};
|
|
204
204
|
|
|
205
205
|
/**
|
|
206
|
-
* `delivery.epicAudit` — bounded-retry knobs for /
|
|
206
|
+
* `delivery.epicAudit` — bounded-retry knobs for /deliver Phase 4
|
|
207
207
|
* (epic-audit). `maxFixAttempts` caps how many times the auto-fix loop
|
|
208
208
|
* retries a single finding (Story #2611, Epic #2586). `maxFixScopeFiles`
|
|
209
209
|
* caps how many files a single auto-fix may touch before escalating to
|
|
@@ -237,7 +237,7 @@ const CI_DELIVERY_SCHEMA = {
|
|
|
237
237
|
// Story #2899 (Epic #2880) — `delivery.preflight.*` thresholds consumed
|
|
238
238
|
// by `epic-deliver-preflight.js`. When any value is exceeded the CLI
|
|
239
239
|
// surfaces a breach in its envelope and the workflow flips the Epic to
|
|
240
|
-
// `agent::blocked` (see /
|
|
240
|
+
// `agent::blocked` (see /deliver Phase 1 prelude).
|
|
241
241
|
const PREFLIGHT_SCHEMA = {
|
|
242
242
|
type: 'object',
|
|
243
243
|
properties: {
|
|
@@ -102,7 +102,7 @@ export const QUALITY_SCHEMA = {
|
|
|
102
102
|
|
|
103
103
|
/**
|
|
104
104
|
* `delivery.codeReview` — sibling to `delivery.epicAudit`. Same bounded
|
|
105
|
-
* retry + scope cap, applied to /
|
|
105
|
+
* retry + scope cap, applied to /deliver Phase 5 (code-review).
|
|
106
106
|
*/
|
|
107
107
|
export const CODE_REVIEW_SCHEMA = {
|
|
108
108
|
type: 'object',
|
|
@@ -205,7 +205,7 @@ const GITHUB_SCHEMA = {
|
|
|
205
205
|
};
|
|
206
206
|
|
|
207
207
|
// ---------------------------------------------------------------------------
|
|
208
|
-
// planning.* — inputs to /
|
|
208
|
+
// planning.* — inputs to /plan
|
|
209
209
|
// ---------------------------------------------------------------------------
|
|
210
210
|
|
|
211
211
|
/**
|
|
@@ -224,7 +224,7 @@ const PLANNING_CONTEXT_SCHEMA = {
|
|
|
224
224
|
|
|
225
225
|
/**
|
|
226
226
|
* Story #2634 — `planning.codebaseSnapshot` controls the structural
|
|
227
|
-
* view of the consumer repo threaded into `/
|
|
227
|
+
* view of the consumer repo threaded into `/plan` Phase 7 spec
|
|
228
228
|
* authoring. Absent / partial entries resolve to defaults inside
|
|
229
229
|
* `lib/codebase-snapshot.js#resolveSnapshotConfig` — the schema only
|
|
230
230
|
* enforces shape (correct enum value, well-formed glob arrays).
|
|
@@ -287,7 +287,7 @@ const PLANNING_SCHEMA = {
|
|
|
287
287
|
};
|
|
288
288
|
|
|
289
289
|
// ---------------------------------------------------------------------------
|
|
290
|
-
// delivery.* — /
|
|
290
|
+
// delivery.* — /deliver + story-deliver consume. The full block of
|
|
291
291
|
// per-key sub-schemas lives in `config-settings-schema-delivery.js` (refs
|
|
292
292
|
// #3457); DELIVERY_SCHEMA is imported above and referenced unchanged below.
|
|
293
293
|
// ---------------------------------------------------------------------------
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* duplicate-search.js — Cross-Epic Duplicate Detection
|
|
3
3
|
*
|
|
4
|
-
* Used by `/
|
|
4
|
+
* Used by `/plan` Phase 2 (s-plan-ideation) to surface open Epics
|
|
5
5
|
* whose scope overlaps with a sharpened one-pager before a new Epic is
|
|
6
6
|
* created. Returns ranked candidates with an overlap score and URL so
|
|
7
7
|
* the host LLM can pause for HITL confirmation.
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
*
|
|
27
27
|
* Both paths MUST emit the identical per-lens report contract
|
|
28
28
|
* (`{{auditOutputDir}}/<lens>-results.md`), so downstream consumers
|
|
29
|
-
* (`/
|
|
29
|
+
* (`/deliver` Phase 4 epic-audit, `audit-to-stories`) are agnostic to
|
|
30
30
|
* which path produced it.
|
|
31
31
|
*
|
|
32
32
|
* ## Why this is capability-degradation, not a contract shim
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Verdict rule: `clear` requires **both** (a) ≥ 4 of 5 canonical sections
|
|
11
11
|
* present, **and** (b) the **Acceptance Criteria** section present. The
|
|
12
12
|
* Acceptance-Criteria requirement is load-bearing: a downstream
|
|
13
|
-
* `/
|
|
13
|
+
* `/deliver` start gate and the close-time acceptance-spec reconciler
|
|
14
14
|
* both assume the Epic carries acceptance criteria, so a gate that passed an
|
|
15
15
|
* Epic with no Acceptance Criteria (the pre-Story-#3910 `≥ 4 of 5` behaviour)
|
|
16
16
|
* advertised a clarity guarantee it did not provide. AC is now a required
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* memory-freshness.js — walker + verifier for the `/
|
|
2
|
+
* memory-freshness.js — walker + verifier for the `/plan` Phase 0
|
|
3
3
|
* memory-freshness pre-flight. Story #2557 / Epic #2547. Tech Spec #2550.
|
|
4
4
|
*
|
|
5
5
|
* Walks every `.md` file under a memory directory (typically
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* prior-feedback-fetcher.js — gh-CLI-backed fetcher for open meta feedback
|
|
3
|
-
* issues that feed the `/
|
|
3
|
+
* issues that feed the `/plan` Phase 0 planner context.
|
|
4
4
|
*
|
|
5
5
|
* Story #2554 / Epic #2547. Tech Spec #2550 specifies that the fetcher MUST
|
|
6
6
|
* return open issues carrying the `meta::framework-gap` and
|
|
@@ -51,7 +51,7 @@ export const FINDING_CLASSES = Object.freeze([
|
|
|
51
51
|
/**
|
|
52
52
|
* Class → label-set routing table. Each class maps to exactly one label set.
|
|
53
53
|
* `tooling-dx` is the framework-gap path: it carries `meta::framework-gap` so
|
|
54
|
-
* the `/
|
|
54
|
+
* the `/plan` Phase 0 feedback fetcher surfaces it to the planner.
|
|
55
55
|
*/
|
|
56
56
|
const CLASS_TO_LABELS = Object.freeze({
|
|
57
57
|
'product-bug': [FOCUS_LABELS.PRODUCT],
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* tail of the exploratory-QA Triage path: once an operator has dispositioned a
|
|
6
6
|
* session's ledger items (see `.agents/schemas/qa-ledger.schema.json` and
|
|
7
7
|
* `lib/qa/qa-session.js`), the still-untriaged backlog is clustered and each
|
|
8
|
-
* cluster is promoted to a follow-up ticket — a single Story (via `/
|
|
9
|
-
* for a tight, one-deliverable cluster, or an Epic (via `/
|
|
8
|
+
* cluster is promoted to a follow-up ticket — a single Story (via `/plan`)
|
|
9
|
+
* for a tight, one-deliverable cluster, or an Epic (via `/plan --idea`) for
|
|
10
10
|
* a broad cluster that spans multiple coverage surfaces. Each contributing
|
|
11
11
|
* ledger item then has the resulting `routedTo` issue link written back onto it
|
|
12
12
|
* so a resume run sees the item as filed rather than re-promoting it.
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
* Pure orchestration: **no network I/O lives here.** Every GitHub side-effect
|
|
24
24
|
* (issue search, ticket creation) flows through INJECTED PORTS so the unit test
|
|
25
25
|
* runs with no network. Production wires the ports to the GitHub provider /
|
|
26
|
-
* `/
|
|
26
|
+
* `/plan` / `/plan` surfaces; tests pass in-memory stubs.
|
|
27
27
|
*/
|
|
28
28
|
|
|
29
29
|
import { fingerprintFinding, routeFinding } from './route-finding.js';
|
|
@@ -40,8 +40,8 @@ export const PROMOTION_TARGETS = Object.freeze({
|
|
|
40
40
|
|
|
41
41
|
/**
|
|
42
42
|
* A cluster of more than this many distinct coverage surfaces is broad enough
|
|
43
|
-
* to warrant an Epic (`/
|
|
44
|
-
* (`/
|
|
43
|
+
* to warrant an Epic (`/plan --idea`) rather than a single Story
|
|
44
|
+
* (`/plan`). One or two surfaces is a tight, single-deliverable cluster.
|
|
45
45
|
*/
|
|
46
46
|
const EPIC_COVERAGE_THRESHOLD = 2;
|
|
47
47
|
|
|
@@ -159,8 +159,8 @@ export function clusterLedgerItems(items) {
|
|
|
159
159
|
/**
|
|
160
160
|
* Decide a cluster's promotion target. A cluster that spans more than
|
|
161
161
|
* {@link EPIC_COVERAGE_THRESHOLD} distinct coverage surfaces is broad enough to
|
|
162
|
-
* warrant an Epic (`/
|
|
163
|
-
* Story (`/
|
|
162
|
+
* warrant an Epic (`/plan --idea`); otherwise it is a single-deliverable
|
|
163
|
+
* Story (`/plan`).
|
|
164
164
|
*
|
|
165
165
|
* @param {{ coverages: string[] }} cluster
|
|
166
166
|
* @returns {'story'|'epic'}
|
|
@@ -233,7 +233,7 @@ function routedToLink(issue, kind) {
|
|
|
233
233
|
* shared `routeFinding` against existing Issues (via the injected search
|
|
234
234
|
* port). This dedups against work already filed.
|
|
235
235
|
* 2. On a `new` decision, open the follow-up ticket through the injected
|
|
236
|
-
* `createStory` (`/
|
|
236
|
+
* `createStory` (`/plan`) or `createEpic` (`/plan --idea`) port,
|
|
237
237
|
* chosen by {@link targetForCluster}. On any other decision, link back to
|
|
238
238
|
* the matched Issue rather than creating a duplicate.
|
|
239
239
|
* 3. Stamp the resolved `routedTo` link onto every contributing ledger item
|
|
@@ -250,9 +250,9 @@ function routedToLink(issue, kind) {
|
|
|
250
250
|
* @param {(finding: object) => Promise<Array<{ number: number, state: string, title?: string, body?: string }>>} [ports.searchCandidates]
|
|
251
251
|
* Optional semantic candidate search, forwarded to `routeFinding`.
|
|
252
252
|
* @param {(cluster: object) => Promise<{ number: number, url?: string }>} ports.createStory
|
|
253
|
-
* Opens a single Story (`/
|
|
253
|
+
* Opens a single Story (`/plan`) for a tight cluster.
|
|
254
254
|
* @param {(cluster: object) => Promise<{ number: number, url?: string }>} ports.createEpic
|
|
255
|
-
* Opens an Epic (`/
|
|
255
|
+
* Opens an Epic (`/plan --idea`) for a broad cluster.
|
|
256
256
|
* @returns {Promise<{
|
|
257
257
|
* promotions: Array<{
|
|
258
258
|
* clusterKey: string,
|
|
@@ -76,7 +76,6 @@ export function isValidTransition(fromState, toState) {
|
|
|
76
76
|
|
|
77
77
|
export const TYPE_LABELS = {
|
|
78
78
|
EPIC: 'type::epic',
|
|
79
|
-
FEATURE: 'type::feature',
|
|
80
79
|
STORY: 'type::story',
|
|
81
80
|
};
|
|
82
81
|
|
|
@@ -104,7 +103,7 @@ export const CONTEXT_LABELS = {
|
|
|
104
103
|
export const CONTEXT_ACCEPTANCE_SPEC = CONTEXT_LABELS.ACCEPTANCE_SPEC;
|
|
105
104
|
|
|
106
105
|
/**
|
|
107
|
-
* Acceptance-axis labels for opt-out signalling on Stories
|
|
106
|
+
* Acceptance-axis labels for opt-out signalling on Stories that
|
|
108
107
|
* intentionally have no acceptance-spec coverage. Separate namespace from
|
|
109
108
|
* `context::` because it expresses absence rather than a linked context
|
|
110
109
|
* ticket.
|
|
@@ -120,7 +119,7 @@ export const ACCEPTANCE_NA = ACCEPTANCE_LABELS.N_A;
|
|
|
120
119
|
* loop). `meta::framework-gap` is applied to issues that surface a defect or
|
|
121
120
|
* missing capability in the framework itself; `meta::consumer-improvement`
|
|
122
121
|
* is applied to issues that surface improvements to a consumer project
|
|
123
|
-
* (workflow tweaks, ergonomic asks, doc polish). The `/
|
|
122
|
+
* (workflow tweaks, ergonomic asks, doc polish). The `/plan` Phase 0
|
|
124
123
|
* fetcher (see `lib/feedback-loop/prior-feedback-fetcher.js`) reads open
|
|
125
124
|
* issues carrying either label and surfaces them to the planner so retro
|
|
126
125
|
* signals are routed into durable substrates rather than lost in chat.
|
|
@@ -133,7 +132,7 @@ export const META_LABELS = {
|
|
|
133
132
|
/**
|
|
134
133
|
* Planning-axis labels (Epic #2880 F7). Currently scoped to the
|
|
135
134
|
* `planning::healthcheck-waived` operator-applied waiver, which is the
|
|
136
|
-
* documented escape hatch for the `/
|
|
135
|
+
* documented escape hatch for the `/plan` Phase 10 readiness
|
|
137
136
|
* healthcheck (`epic-plan-healthcheck.js`). The persist half of
|
|
138
137
|
* `epic-plan-decompose.js` refuses to flip an Epic to `agent::ready`
|
|
139
138
|
* when the healthcheck returned `ok: false` unless this label is
|
|
@@ -53,15 +53,10 @@ export const LABEL_TAXONOMY = [
|
|
|
53
53
|
color: LABEL_COLORS.TYPE,
|
|
54
54
|
description: 'Epic-level work item',
|
|
55
55
|
},
|
|
56
|
-
{
|
|
57
|
-
name: TYPE_LABELS.FEATURE,
|
|
58
|
-
color: LABEL_COLORS.TYPE,
|
|
59
|
-
description: 'Feature under an Epic',
|
|
60
|
-
},
|
|
61
56
|
{
|
|
62
57
|
name: TYPE_LABELS.STORY,
|
|
63
58
|
color: LABEL_COLORS.TYPE,
|
|
64
|
-
description: 'User story under
|
|
59
|
+
description: 'User story under an Epic',
|
|
65
60
|
},
|
|
66
61
|
|
|
67
62
|
// Agent State
|
|
@@ -75,7 +70,7 @@ export const LABEL_TAXONOMY = [
|
|
|
75
70
|
name: AGENT_LABELS.READY,
|
|
76
71
|
color: LABEL_COLORS.AGENT,
|
|
77
72
|
description:
|
|
78
|
-
'Parking state — frozen dispatch manifest exists; awaiting local /
|
|
73
|
+
'Parking state — frozen dispatch manifest exists; awaiting local /deliver',
|
|
79
74
|
},
|
|
80
75
|
{
|
|
81
76
|
name: AGENT_LABELS.EXECUTING,
|
|
@@ -120,7 +115,7 @@ export const LABEL_TAXONOMY = [
|
|
|
120
115
|
description: 'Acceptance Specification (Gherkin scenarios)',
|
|
121
116
|
},
|
|
122
117
|
|
|
123
|
-
// Acceptance axis — explicit opt-out signal for Stories
|
|
118
|
+
// Acceptance axis — explicit opt-out signal for Stories that
|
|
124
119
|
// intentionally have no acceptance-spec coverage.
|
|
125
120
|
{
|
|
126
121
|
name: ACCEPTANCE_LABELS.N_A,
|
|
@@ -152,7 +152,7 @@ export function decideAcceptanceEval({ verdict, maxRounds, round: roundIn }) {
|
|
|
152
152
|
/**
|
|
153
153
|
* Build the per-criterion acceptance-eval signal payload for the retro /
|
|
154
154
|
* feedback substrate. Carries which acceptance items needed rework and the
|
|
155
|
-
* round count so `/
|
|
155
|
+
* round count so `/plan` Phase 0 feedback fetch and the retro can
|
|
156
156
|
* surface acceptance churn. PII-free by construction — it carries only
|
|
157
157
|
* acceptance-item indices, verdicts, and the terminal decision.
|
|
158
158
|
*
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Story #1155 (Epic #1142, 5.40.0) — extracted the helper-driven
|
|
5
5
|
* `epic-code-review` invocation into a callable module so the
|
|
6
|
-
* `/
|
|
6
|
+
* `/deliver` runner can run Phase D without spawning a child
|
|
7
7
|
* process or routing through an LLM-driven helper.
|
|
8
8
|
*
|
|
9
9
|
* Story #2831 (Epic #2815, Pluggable Code Review) — refactored to load
|
|
@@ -25,11 +25,11 @@
|
|
|
25
25
|
* - Always posts the structured `code-review` comment on the Epic
|
|
26
26
|
* issue (the adapter never posts; the orchestrator owns persistence).
|
|
27
27
|
* - Treats severity.critical > 0 as a halting blocker — the merged
|
|
28
|
-
* `/
|
|
28
|
+
* `/deliver` runner consults `halted` and refuses to advance
|
|
29
29
|
* to Phase E (retro) when set.
|
|
30
30
|
*
|
|
31
31
|
* Halting on critical findings is the in-process replacement for the
|
|
32
|
-
* helper's "operator must remediate before /
|
|
32
|
+
* helper's "operator must remediate before /deliver" gate.
|
|
33
33
|
*/
|
|
34
34
|
|
|
35
35
|
import { resolveConfig } from '../config-resolver.js';
|
|
@@ -116,7 +116,7 @@ function resolveTaskSizing(config) {
|
|
|
116
116
|
*
|
|
117
117
|
* Best-effort and total: a missing/unparseable checkpoint, an absent
|
|
118
118
|
* `planningRisk` field, a read failure, or a malformed `overallLevel` all
|
|
119
|
-
* degrade to `standard` (never throws). So an Epic that skipped `/
|
|
119
|
+
* degrade to `standard` (never throws). So an Epic that skipped `/plan`
|
|
120
120
|
* (no checkpoint) still gets a passing `standard` review with no new failure
|
|
121
121
|
* mode. The producer resolves depth from the judged risk alone (the diff is
|
|
122
122
|
* not yet enumerated at this point); the full risk + diff-width combination is
|
|
@@ -401,7 +401,7 @@ function resolveScopeEnvelope(opts, config) {
|
|
|
401
401
|
}
|
|
402
402
|
|
|
403
403
|
/**
|
|
404
|
-
* In-process wrapper that the `/
|
|
404
|
+
* In-process wrapper that the `/deliver` runner and the
|
|
405
405
|
* `/single-story-deliver` close path consume.
|
|
406
406
|
*
|
|
407
407
|
* Story #2252 — emits `code-review.start` immediately on entry and
|
|
@@ -163,7 +163,7 @@ function getVersion() {
|
|
|
163
163
|
/**
|
|
164
164
|
* Parse the work-breakdown hierarchy from a Task ticket body.
|
|
165
165
|
*
|
|
166
|
-
* Looks for patterns like: `Epic: #1`, `
|
|
166
|
+
* Looks for patterns like: `Epic: #1`, `Story: #3`,
|
|
167
167
|
* `PRD: #4`, `Tech Spec: #5`.
|
|
168
168
|
*
|
|
169
169
|
* @param {string} body
|
|
@@ -177,7 +177,7 @@ export function parseHierarchy(body) {
|
|
|
177
177
|
for (const match of matches) {
|
|
178
178
|
const key = match[1].trim().toLowerCase().replace(/\s+/g, '');
|
|
179
179
|
const val = Number.parseInt(match[2], 10);
|
|
180
|
-
result[key] = val; // e.g. { epic: 1,
|
|
180
|
+
result[key] = val; // e.g. { epic: 1, story: 3, prd: 4, techspec: 5 }
|
|
181
181
|
}
|
|
182
182
|
return result;
|
|
183
183
|
}
|
|
@@ -217,9 +217,9 @@ function extractSectionList(body, heading) {
|
|
|
217
217
|
|
|
218
218
|
/**
|
|
219
219
|
* Extract the inline `## Acceptance` / `## Acceptance Criteria` and
|
|
220
|
-
* `## Verify` checklists from a Story body. Used by
|
|
220
|
+
* `## Verify` checklists from a Story body. Used by 2-tier hydration to
|
|
221
221
|
* populate the `acceptanceCriteria` and `verificationCommands` envelope
|
|
222
|
-
* sections directly from the dispatched Story ticket — under
|
|
222
|
+
* sections directly from the dispatched Story ticket — under 2-tier the
|
|
223
223
|
* Story IS the unit of execution and carries acceptance/verify inline
|
|
224
224
|
* (no child tickets to walk).
|
|
225
225
|
*
|
|
@@ -235,18 +235,18 @@ export function extractStorySections(body) {
|
|
|
235
235
|
}
|
|
236
236
|
|
|
237
237
|
/**
|
|
238
|
-
* Detect whether the dispatched unit is a
|
|
238
|
+
* Detect whether the dispatched unit is a 2-tier Story (Story is the
|
|
239
239
|
* leaf, carries inline acceptance/verify) vs. a 4-tier Task (Task is
|
|
240
240
|
* the leaf, Story is one level up). The decision is made off the
|
|
241
241
|
* `type::*` label the dispatcher already stamps on every ticket; it
|
|
242
242
|
* does not depend on `planning.hierarchy`, so this engine
|
|
243
|
-
* stays correct even when a 4-tier Epic ships in a
|
|
243
|
+
* stays correct even when a 4-tier Epic ships in a 2-tier-default repo
|
|
244
244
|
* (or vice versa) during the Epic #3078 dual-shape window.
|
|
245
245
|
*
|
|
246
246
|
* @param {object} task
|
|
247
247
|
* @returns {boolean}
|
|
248
248
|
*/
|
|
249
|
-
function
|
|
249
|
+
function isTwoTierStoryTask(task) {
|
|
250
250
|
const labels = task?.labels ?? [];
|
|
251
251
|
return labels.includes('type::story');
|
|
252
252
|
}
|
|
@@ -355,7 +355,6 @@ async function buildHierarchySections(task, provider, epicId, agentSettings) {
|
|
|
355
355
|
idsToFetch.push({ key: 'Epic', id: epicId || hierarchyKeys.epic });
|
|
356
356
|
idsToFetch.push({ key: 'PRD', id: hierarchyKeys.prd });
|
|
357
357
|
idsToFetch.push({ key: 'Tech Spec', id: hierarchyKeys.techspec });
|
|
358
|
-
idsToFetch.push({ key: 'Feature', id: hierarchyKeys.feature });
|
|
359
358
|
idsToFetch.push({ key: 'Story', id: hierarchyKeys.story });
|
|
360
359
|
} else if (depth === 'standard') {
|
|
361
360
|
idsToFetch.push({ key: 'Epic', id: epicId || hierarchyKeys.epic });
|
|
@@ -475,7 +474,7 @@ function buildStaticSections(
|
|
|
475
474
|
}
|
|
476
475
|
}
|
|
477
476
|
|
|
478
|
-
if (
|
|
477
|
+
if (isTwoTierStoryTask(task)) {
|
|
479
478
|
const { acceptance, verify } = extractStorySections(task.body ?? '');
|
|
480
479
|
if (acceptance.length > 0) {
|
|
481
480
|
sections.push({
|
|
@@ -6,8 +6,8 @@ import { assignLayers, detectCycle } from '../Graph.js';
|
|
|
6
6
|
*
|
|
7
7
|
* Sources of story dependencies:
|
|
8
8
|
* 1. **Implicit (cross-story tasks)**: Task T in Story A depends on Task T'
|
|
9
|
-
* in Story B → Story A depends on Story B. Under the
|
|
10
|
-
* (Epic →
|
|
9
|
+
* in Story B → Story A depends on Story B. Under the 2-tier hierarchy
|
|
10
|
+
* (Epic → Story) Stories carry no child Tasks, so this source
|
|
11
11
|
* is empty in practice; it is retained for callers that adapt a
|
|
12
12
|
* task-bearing shape into `storyGroups`.
|
|
13
13
|
* 2. **Explicit (story body)**: Story A body contains `blocked by #B` →
|
|
@@ -18,7 +18,7 @@ import { assignLayers, detectCycle } from '../Graph.js';
|
|
|
18
18
|
* > **Focus-overlap engine removed (Story #3906).** A third source — a
|
|
19
19
|
* > focus-area overlap engine that rolled task-level `focusAreas` / `scope`
|
|
20
20
|
* > up to the Story level and serialized "overlapping" Stories — was deleted
|
|
21
|
-
* > because Task deletion in the
|
|
21
|
+
* > because Task deletion in the 2-tier migration left every Story's task
|
|
22
22
|
* > list empty, so the rollup produced empty focus bags and the engine added
|
|
23
23
|
* > **zero** edges on every real plan. It advertised file-contention
|
|
24
24
|
* > serialization it never delivered. Cross-Story prerequisites are carried
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
* (`detectors: rework=N retry=M`) is the only stdout signal — one
|
|
30
30
|
* line per Story rather than two per detector + N per event.
|
|
31
31
|
*
|
|
32
|
-
* - **
|
|
33
|
-
* empty (the
|
|
32
|
+
* - **2-tier (Storyless) closure (Story #3127).** When `tasks` is
|
|
33
|
+
* empty (the 2-tier hierarchy shape), `resolveLastTaskId` returns
|
|
34
34
|
* `null` and both detectors run with `taskId: null`. The detector
|
|
35
35
|
* modules already accept a nullable `taskId` (see
|
|
36
36
|
* `lib/signals/detectors/{rework,retry}.js`), so no branching on
|