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
|
@@ -8,26 +8,25 @@
|
|
|
8
8
|
* Story #1848 so the verb-family split (`reads` / `state` / `bulk`) is
|
|
9
9
|
* complete and the parent collapses to a pure re-export facade.
|
|
10
10
|
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
11
|
+
* Story #3995 — the single-ticket mutators (`transitionTicketState`,
|
|
12
|
+
* `toggleTasklistCheckbox`, `postStructuredComment`) moved to the leaf
|
|
13
|
+
* `./transition.js`, so this module now depends **downward** on
|
|
14
|
+
* `transition.js` and the former `state.js ↔ bulk.js` import cycle is
|
|
15
|
+
* gone. `cascadeCompletion` still recursively transitions parents via
|
|
16
|
+
* the imported `transitionTicketState`; the reverse call
|
|
17
|
+
* (`transitionTicketState → cascadeParentState`) is injected into
|
|
18
|
+
* `transition.js` by `state.js` via `registerCascadeRunner` rather than
|
|
19
|
+
* imported, which is what keeps the graph acyclic.
|
|
16
20
|
*/
|
|
17
21
|
|
|
18
22
|
import { Logger } from '../../Logger.js';
|
|
19
23
|
import { TYPE_LABELS } from '../../label-constants.js';
|
|
20
|
-
import { dispatchCascadeGroups, groupByAncestor } from '../cascade-grouping.js';
|
|
21
24
|
import { ALL_STATES, STATE_LABELS } from './reads.js';
|
|
22
25
|
import {
|
|
23
26
|
postStructuredComment,
|
|
24
27
|
toggleTasklistCheckbox,
|
|
25
28
|
transitionTicketState,
|
|
26
|
-
} from './
|
|
27
|
-
|
|
28
|
-
// Re-export `groupByAncestor` so external callers that imported it from
|
|
29
|
-
// the ticketing facade continue to work after the verb-family split.
|
|
30
|
-
export { groupByAncestor };
|
|
29
|
+
} from './transition.js';
|
|
31
30
|
|
|
32
31
|
/**
|
|
33
32
|
* Retry budget for transient `gh` failures (rate limit, secondary rate limit,
|
|
@@ -217,9 +216,8 @@ export function logCascadePartialFailures(ticketId, cascade) {
|
|
|
217
216
|
|
|
218
217
|
/**
|
|
219
218
|
* Per-parent body of {@link cascadeCompletion}. Pulled out so the outer
|
|
220
|
-
*
|
|
221
|
-
*
|
|
222
|
-
* log output across serial and parallel execution paths.
|
|
219
|
+
* walk stays a thin sequential loop while the per-parent work runs under
|
|
220
|
+
* the per-parent cascade lock.
|
|
223
221
|
*
|
|
224
222
|
* @param {import('../../ITicketingProvider.js').ITicketingProvider} provider
|
|
225
223
|
* @param {number} ticketId - The ticket whose `agent::done` transition
|
|
@@ -293,7 +291,7 @@ async function processCascadeParentLocked(
|
|
|
293
291
|
if (!allDone) return { cascadedTo, failed };
|
|
294
292
|
|
|
295
293
|
// EXCLUSION: Epics do not auto-close via cascade. Epics close via
|
|
296
|
-
// formal /
|
|
294
|
+
// formal /deliver (its own machinery handles branch merges,
|
|
297
295
|
// PR-driven `Closes #N` auto-close, and a recovery transition in
|
|
298
296
|
// `epic-deliver-finalize.js`).
|
|
299
297
|
//
|
|
@@ -307,13 +305,6 @@ async function processCascadeParentLocked(
|
|
|
307
305
|
// defense-in-depth path when a Story's tasklist references a
|
|
308
306
|
// planning ticket directly.
|
|
309
307
|
//
|
|
310
|
-
// Features auto-close via cascade. A Feature is a purely
|
|
311
|
-
// hierarchical grouping — no standalone branch, no merge step.
|
|
312
|
-
// When its last child Story closes, the Feature is complete by
|
|
313
|
-
// definition. Operators who need Feature-level AC verification
|
|
314
|
-
// should encode it in the final child Story, not rely on a manual
|
|
315
|
-
// close step.
|
|
316
|
-
//
|
|
317
308
|
// Reuse the parentSnapshot from the idempotency check above — it is
|
|
318
309
|
// a fresh read (cache was invalidated before the getTicket call) and
|
|
319
310
|
// the parent's type label is invariant within a single cascade lock
|
|
@@ -372,19 +363,13 @@ async function processCascadeParentLocked(
|
|
|
372
363
|
* Then checks if parent's sub-tickets are ALL DONE.
|
|
373
364
|
* If yes, transitions parent to DONE and cascades up.
|
|
374
365
|
*
|
|
375
|
-
* Parents
|
|
376
|
-
*
|
|
377
|
-
*
|
|
378
|
-
*
|
|
379
|
-
*
|
|
380
|
-
*
|
|
381
|
-
*
|
|
382
|
-
*
|
|
383
|
-
* Log output is captured per parent into a buffered logger and flushed
|
|
384
|
-
* to the real {@link Logger} after all groups resolve, in the original
|
|
385
|
-
* `parsedParents` order. The visible log stream is therefore
|
|
386
|
-
* byte-identical to a serial baseline; only the I/O between parents in
|
|
387
|
-
* disjoint groups overlaps.
|
|
366
|
+
* Parents run strictly sequentially in input order (Story #4017 —
|
|
367
|
+
* fan-out is <= 1 under the 2-tier hierarchy, so the former
|
|
368
|
+
* shared-ancestor grouping / parallel dispatch was deleted); concurrent
|
|
369
|
+
* transitions against a shared ancestor would race the "all children
|
|
370
|
+
* done?" check. Within each parent, sibling reads fan out via
|
|
371
|
+
* `getSubTickets(parentId, { fresh: true })` with the concurrency cap
|
|
372
|
+
* (8) applied inside `getSubTickets`.
|
|
388
373
|
*
|
|
389
374
|
* Per-parent errors are isolated: a failure updating one parent (network,
|
|
390
375
|
* permission, stale ticket) never discards progress on sibling parents.
|
|
@@ -423,7 +408,7 @@ export async function cascadeCompletion(provider, ticketId, opts = {}) {
|
|
|
423
408
|
// resume reconciler can strip the `parent: #N` orchestrator footer
|
|
424
409
|
// from a Story body (see Issue 2 in #2982); without the body marker
|
|
425
410
|
// the cascade silently returned `{ cascadedTo: [], failed: [] }` and
|
|
426
|
-
// left intermediate
|
|
411
|
+
// left intermediate parent tickets stranded OPEN. The native link is
|
|
427
412
|
// independent of body text, so consult it when the first two
|
|
428
413
|
// strategies came back empty.
|
|
429
414
|
if (
|
|
@@ -450,26 +435,19 @@ export async function cascadeCompletion(provider, ticketId, opts = {}) {
|
|
|
450
435
|
return { cascadedTo: [], failed: [] };
|
|
451
436
|
}
|
|
452
437
|
|
|
453
|
-
//
|
|
454
|
-
//
|
|
455
|
-
//
|
|
456
|
-
//
|
|
457
|
-
//
|
|
458
|
-
|
|
459
|
-
const results = await dispatchCascadeGroups({
|
|
460
|
-
parsedParents,
|
|
461
|
-
groups,
|
|
462
|
-
flushLogger: opts._logger ?? Logger,
|
|
463
|
-
processParent: (parentId, logger) =>
|
|
464
|
-
processCascadeParent(provider, ticketId, parentId, {
|
|
465
|
-
notify: opts.notify,
|
|
466
|
-
_logger: logger,
|
|
467
|
-
}),
|
|
468
|
-
});
|
|
469
|
-
|
|
438
|
+
// Story #4017 — under the 2-tier hierarchy a ticket has at most one
|
|
439
|
+
// parent, so the shared-ancestor grouping / parallel-group dispatch
|
|
440
|
+
// machinery was deleted. Parents (fan-out <= 1
|
|
441
|
+
// in practice; the loop stays general for the body-reference fallback)
|
|
442
|
+
// run strictly sequentially, which trivially preserves the
|
|
443
|
+
// shared-ancestor safety invariant the grouping used to enforce.
|
|
470
444
|
const cascadedTo = [];
|
|
471
445
|
const failed = [];
|
|
472
|
-
for (const
|
|
446
|
+
for (const parentId of parsedParents) {
|
|
447
|
+
const r = await processCascadeParent(provider, ticketId, parentId, {
|
|
448
|
+
notify: opts.notify,
|
|
449
|
+
_logger: opts._logger,
|
|
450
|
+
});
|
|
473
451
|
cascadedTo.push(...r.cascadedTo);
|
|
474
452
|
failed.push(...r.failed);
|
|
475
453
|
}
|
|
@@ -530,12 +508,11 @@ export function deriveParentState(siblings) {
|
|
|
530
508
|
* recursive cascade" progress comment, Epic exclusion) are preserved
|
|
531
509
|
* verbatim.
|
|
532
510
|
*
|
|
533
|
-
* Resilience matches {@link cascadeCompletion}:
|
|
534
|
-
*
|
|
535
|
-
*
|
|
536
|
-
*
|
|
537
|
-
*
|
|
538
|
-
* discard work on the others.
|
|
511
|
+
* Resilience matches {@link cascadeCompletion}: parents run
|
|
512
|
+
* sequentially; the per-parent lock from {@link withParentCascadeLock}
|
|
513
|
+
* prevents races on shared ancestors; and per-parent errors are
|
|
514
|
+
* isolated so a sibling parent's failure does not discard work on the
|
|
515
|
+
* others.
|
|
539
516
|
*
|
|
540
517
|
* @param {import('../../ITicketingProvider.js').ITicketingProvider} provider
|
|
541
518
|
* @param {number} ticketId
|
|
@@ -572,21 +549,15 @@ export async function cascadeParentState(provider, ticketId, opts = {}) {
|
|
|
572
549
|
const parsedParents = await resolveParentIds(provider, ticket, ticketId);
|
|
573
550
|
if (parsedParents.length === 0) return { cascadedTo: [], failed: [] };
|
|
574
551
|
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
parsedParents,
|
|
578
|
-
groups,
|
|
579
|
-
flushLogger: opts._logger ?? Logger,
|
|
580
|
-
processParent: (parentId, logger) =>
|
|
581
|
-
processStateCascadeParent(provider, parentId, {
|
|
582
|
-
notify: opts.notify,
|
|
583
|
-
_logger: logger,
|
|
584
|
-
}),
|
|
585
|
-
});
|
|
586
|
-
|
|
552
|
+
// Story #4017 — sequential per-parent walk (fan-out <= 1 under the
|
|
553
|
+
// 2-tier hierarchy); see cascadeCompletion for the rationale.
|
|
587
554
|
const cascadedTo = [];
|
|
588
555
|
const failed = [];
|
|
589
|
-
for (const
|
|
556
|
+
for (const parentId of parsedParents) {
|
|
557
|
+
const r = await processStateCascadeParent(provider, parentId, {
|
|
558
|
+
notify: opts.notify,
|
|
559
|
+
_logger: opts._logger,
|
|
560
|
+
});
|
|
590
561
|
cascadedTo.push(...r.cascadedTo);
|
|
591
562
|
failed.push(...r.failed);
|
|
592
563
|
}
|
|
@@ -76,8 +76,8 @@ export const STRUCTURED_COMMENT_TYPES = Object.freeze([
|
|
|
76
76
|
// downstream workflow steps don't have to infer install state from
|
|
77
77
|
// node_modules presence.
|
|
78
78
|
'story-init',
|
|
79
|
-
// Story #908 — /
|
|
80
|
-
// on each Story per Task transition. The /
|
|
79
|
+
// Story #908 — /deliver upserts a `story-run-progress` snapshot
|
|
80
|
+
// on each Story per Task transition. The /deliver aggregator and
|
|
81
81
|
// the epic-runner progress reporter both read this comment to derive
|
|
82
82
|
// Story-level state without re-fetching ticket labels.
|
|
83
83
|
'story-run-progress',
|
|
@@ -98,7 +98,7 @@ export const STRUCTURED_COMMENT_TYPES = Object.freeze([
|
|
|
98
98
|
// operator can correct drift before Phase 8 decomposes from a stale
|
|
99
99
|
// spec. Advisory: the run continues regardless of the report contents.
|
|
100
100
|
'spec-freshness',
|
|
101
|
-
// Story #2681 — `/
|
|
101
|
+
// Story #2681 — `/deliver` Phase 4 epic-audit helper upserts an
|
|
102
102
|
// `audit-results` comment on the Epic listing the per-lens findings
|
|
103
103
|
// returned by the change-set audit pass. The marker was prescribed by
|
|
104
104
|
// `helpers/epic-audit.md` Step 4 long before it was added to this
|
|
@@ -126,7 +126,7 @@ export const STRUCTURED_COMMENT_TYPES = Object.freeze([
|
|
|
126
126
|
'epic-handoff',
|
|
127
127
|
// Story #2899 (Epic #2880, F13) — `epic-deliver-preflight.js` upserts a
|
|
128
128
|
// `delivery-preflight` comment on the Epic at the start of
|
|
129
|
-
// /
|
|
129
|
+
// /deliver Phase 1, surfacing estimated story count, install cost,
|
|
130
130
|
// wave count, GitHub API request volume, Claude quota burn, and any
|
|
131
131
|
// threshold breaches against `delivery.preflight.max*`. One entry per
|
|
132
132
|
// Epic; re-runs replace prior content.
|
|
@@ -137,7 +137,7 @@ export const STRUCTURED_COMMENT_TYPES = Object.freeze([
|
|
|
137
137
|
// `close-validate.end`. One entry per Epic; re-ticks with the same
|
|
138
138
|
// findings upsert in place (`upsertStructuredComment` diffs by body).
|
|
139
139
|
'recurring-failure-class',
|
|
140
|
-
// Story #3061 (Epic #3051) — the /
|
|
140
|
+
// Story #3061 (Epic #3051) — the /deliver §2e Idle Watchdog
|
|
141
141
|
// subsection instructs the parent host LLM to upsert a `wave-stall`
|
|
142
142
|
// comment on the Epic whenever an in-flight Story has been silent for
|
|
143
143
|
// longer than the configured cadence. `wave-tick.js --check-idle`
|
|
@@ -151,6 +151,15 @@ export const STRUCTURED_COMMENT_TYPES = Object.freeze([
|
|
|
151
151
|
// from it (`deriveRiskEnvelope`). One entry per Epic; re-plans upsert in
|
|
152
152
|
// place. Schema: `.agents/schemas/risk-verdict.schema.json`.
|
|
153
153
|
'risk-verdict',
|
|
154
|
+
// Story #4019 — `epic-plan-lease-guard.js` upserts a `plan-lease`
|
|
155
|
+
// comment on the Epic at lease-acquire time, recording the claiming
|
|
156
|
+
// operator and the claim timestamp. `/plan` emits no
|
|
157
|
+
// `story.heartbeat`, so this claim-time is the liveness signal that
|
|
158
|
+
// makes the documented `--steal` contract decidable: a foreign claim
|
|
159
|
+
// older than the lease TTL is reclaimed automatically; a fresh one
|
|
160
|
+
// refuses with the claim age. One entry per Epic; re-acquires upsert
|
|
161
|
+
// in place.
|
|
162
|
+
'plan-lease',
|
|
154
163
|
]);
|
|
155
164
|
|
|
156
165
|
export const WAVE_TYPE_PATTERN = WAVE_MARKER_RE;
|
|
@@ -259,8 +268,8 @@ export const _structuredCommentCache = new WeakMap();
|
|
|
259
268
|
/**
|
|
260
269
|
* Build a well-formed ticket snapshot for a Story that has zero child
|
|
261
270
|
* Tasks. Story #3097 (Wave-0 additive, Epic #3078 Strategy B) — the
|
|
262
|
-
*
|
|
263
|
-
* Epic →
|
|
271
|
+
* 2-tier hierarchy collapses Epic → Story → Task into
|
|
272
|
+
* Epic → Story, so a Story may legitimately have no Task
|
|
264
273
|
* children. Read-side callers that expect a `subTickets` array on the
|
|
265
274
|
* Story can route through this helper to materialise an empty-children
|
|
266
275
|
* snapshot without paying a provider round-trip and without risk of
|