session-orchestrator 5.11.0 → 5.13.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/.claude-plugin/marketplace.json +12 -1
- package/.claude-plugin/plugin.json +4 -1
- package/.codex-plugin/agents/explorer.toml +1 -1
- package/.codex-plugin/agents/session-reviewer.toml +2 -2
- package/.codex-plugin/agents/wave-worker.toml +1 -1
- package/.codex-plugin/plugin.json +1 -1
- package/.cursor-plugin/plugin.json +1 -1
- package/.orchestrator/policy/blocked-commands.json +8 -0
- package/.orchestrator/policy/public-export.json +30 -0
- package/CHANGELOG.md +180 -3
- package/README.md +126 -117
- package/agents/analyst.md +7 -2
- package/agents/architect-reviewer.md +7 -2
- package/agents/code-implementer.md +4 -2
- package/agents/db-specialist.md +9 -2
- package/agents/dialectic-deriver.md +9 -3
- package/agents/docs-writer.md +7 -2
- package/agents/eval-judge.md +7 -1
- package/agents/qa-strategist.md +7 -2
- package/agents/security-reviewer.md +9 -2
- package/agents/session-reviewer.md +18 -2
- package/agents/skill-applied-judge.md +7 -1
- package/agents/test-writer.md +9 -2
- package/agents/ui-developer.md +9 -2
- package/agents/ux-evaluator.md +6 -1
- package/commands/session.md +4 -2
- package/commands/templates-ack.md +89 -18
- package/docs/agent-authoring.md +30 -11
- package/docs/ci-setup.md +38 -2
- package/docs/codex-setup.md +33 -9
- package/docs/components.md +13 -2
- package/docs/cursor-setup.md +3 -3
- package/docs/events-schema.md +5 -4
- package/docs/evidence-candidates.md +63 -0
- package/docs/fleet-checkin-audit.md +7 -4
- package/docs/github-mirror-protection.md +150 -3
- package/docs/install.md +102 -25
- package/docs/instruction-delivery.md +1 -1
- package/docs/migration-v4.md +2 -2
- package/docs/mods.md +118 -0
- package/docs/owner-config-schema.md +1 -0
- package/docs/plugin-architecture-v3.md +1 -1
- package/docs/pm-skills-marketplace.md +4 -3
- package/docs/rule-authoring.md +24 -13
- package/docs/scope-collision-guard.md +2 -1
- package/docs/session-config-reference.md +55 -21
- package/docs/session-config-template.md +32 -24
- package/docs/sessions-ledger-repair.md +137 -0
- package/docs/vault-docs-architecture.md +1 -1
- package/hooks/_lib/hook-import-set.json +406 -73
- package/hooks/_lib/hook-root.mjs +301 -0
- package/hooks/_lib/lock-bootstrap.mjs +434 -4
- package/hooks/_lib/orchestrator-ignore.mjs +3 -0
- package/hooks/_lib/subagent-transcript.mjs +2 -2
- package/hooks/_lib/vcs-create-matcher.mjs +13 -17
- package/hooks/cwd-change-restore.mjs +5 -1
- package/hooks/enforce-commands.mjs +4 -3
- package/hooks/enforce-scope.mjs +11 -1
- package/hooks/hooks-codex.json +48 -2
- package/hooks/hooks.json +31 -31
- package/hooks/on-session-end.mjs +38 -15
- package/hooks/on-session-start.mjs +158 -59
- package/hooks/on-stop.mjs +11 -6
- package/hooks/post-bash-issue-budget-refund.mjs +6 -1
- package/hooks/post-bash-write-verify.mjs +8 -4
- package/hooks/post-edit-validate.mjs +45 -52
- package/hooks/post-subagent-discovery-validator.mjs +2 -2
- package/hooks/post-tool-batch-wave-signal.mjs +8 -4
- package/hooks/post-tool-failure-corrective-context.mjs +5 -1
- package/hooks/pre-bash-destructive-guard.mjs +220 -8
- package/hooks/pre-bash-issue-budget.mjs +6 -1
- package/hooks/pre-bash-sessions-ledger-guard.mjs +691 -123
- package/hooks/pre-bash-staging-fence.mjs +258 -14
- package/hooks/pre-bash-templates-first.mjs +28 -27
- package/hooks/run-node.sh +1 -1
- package/hooks/skill-invocation-telemetry.mjs +15 -8
- package/hooks/subagent-telemetry.mjs +77 -14
- package/hooks/wave-scope-commit-guard.mjs +143 -14
- package/mods/so-hud/.claude-plugin/plugin.json +11 -0
- package/mods/so-hud/README.md +57 -0
- package/mods/so-hud/hooks/beacon-io.mjs +101 -0
- package/mods/so-hud/hooks/heredoc-scan.ts +394 -0
- package/mods/so-hud/hooks/hooks.json +1 -0
- package/mods/so-hud/hooks/logic.ts +182 -0
- package/mods/so-hud/hooks/register.tsx +670 -0
- package/mods/so-hud/hooks/rules.ts +2998 -0
- package/mods/so-hud/tsconfig.json +8 -0
- package/mods/so-hud/types/index.d.ts +36 -0
- package/package.json +4 -3
- package/rules/_index.md +1 -1
- package/rules/always-on/ask-via-tool.md +1 -1
- package/rules/always-on/loop-and-monitor.md +17 -194
- package/rules/always-on/parallel-sessions.md +3 -1
- package/rules/opt-in-stack/backend-data.md +1 -1
- package/rules/opt-in-stack/backend.md +1 -1
- package/rules/opt-in-stack/security-web.md +5 -1
- package/scripts/agent-usage-census.mjs +79 -0
- package/scripts/apply-session-learnings.mjs +34 -6
- package/scripts/archive-closed-prds.mjs +21 -5
- package/scripts/autopilot.mjs +11 -5
- package/scripts/backfill-abandoned-sessions.mjs +13 -3
- package/scripts/backfill-evidence-digest.mjs +2 -1
- package/scripts/backfill-learnings-from-vault.mjs +61 -6
- package/scripts/backfill-sessions.mjs +16 -2
- package/scripts/check-package-manager.mjs +26 -8
- package/scripts/check-sessions-integrity.mjs +4 -1
- package/scripts/ci/assert-vitest-green.mjs +3 -0
- package/scripts/ci/windows-smoke.mjs +201 -0
- package/scripts/close-precheck.mjs +55 -0
- package/scripts/dialectic-deriver.mjs +20 -12
- package/scripts/emit-event.mjs +2 -2
- package/scripts/emit-session.mjs +239 -20
- package/scripts/eval-session.mjs +17 -3
- package/scripts/export-hw-learnings.mjs +29 -2
- package/scripts/fleet-checkin-audit.mjs +8 -4
- package/scripts/fleet-checkin.mjs +73 -3
- package/scripts/gc-stale-worktrees.mjs +6 -1
- package/scripts/github-export.mjs +128 -0
- package/scripts/github-protection-audit.mjs +3 -1
- package/scripts/handover-queue-check.mjs +209 -0
- package/scripts/harness-audit.mjs +6 -4
- package/scripts/lib/agent-frontmatter.mjs +57 -10
- package/scripts/lib/agent-status.mjs +125 -7
- package/scripts/lib/agent-usage-census.mjs +394 -0
- package/scripts/lib/auto-dialectic.mjs +17 -10
- package/scripts/lib/auto-dream.mjs +22 -14
- package/scripts/lib/autopilot/loop.mjs +3 -1
- package/scripts/lib/autopilot/recent-runs.mjs +4 -2
- package/scripts/lib/autopilot/stall-sampler.mjs +2 -1
- package/scripts/lib/autopilot/telemetry.mjs +5 -1
- package/scripts/lib/autopilot/worktree-pipeline.mjs +5 -5
- package/scripts/lib/baseline-archetypes.mjs +10 -2
- package/scripts/lib/blocked-commands-policy.mjs +4 -3
- package/scripts/lib/build-live-signals.mjs +13 -9
- package/scripts/lib/ci-status-banner.mjs +329 -24
- package/scripts/lib/codex/plugin-contract.mjs +8 -0
- package/scripts/lib/cold-start-detector.mjs +5 -2
- package/scripts/lib/command-blocker.mjs +603 -43
- package/scripts/lib/common.mjs +3 -2
- package/scripts/lib/config/cross-repo.mjs +74 -7
- package/scripts/lib/config/host-paths.mjs +6 -2
- package/scripts/lib/config/remote-hosts.mjs +2 -2
- package/scripts/lib/config/section-extractor.mjs +65 -11
- package/scripts/lib/config/template-keys.mjs +153 -0
- package/scripts/lib/config/vault-integration.mjs +1 -0
- package/scripts/lib/config.mjs +3 -3
- package/scripts/lib/coordinator-snapshot.mjs +1 -1
- package/scripts/lib/discovery/triage-state.mjs +2 -1
- package/scripts/lib/dispatcher/rank.mjs +5 -7
- package/scripts/lib/ecosystem-health.mjs +2 -2
- package/scripts/lib/eval/engine.mjs +3 -2
- package/scripts/lib/eval/session-resolve.mjs +6 -2
- package/scripts/lib/eval/sink.mjs +4 -3
- package/scripts/lib/events-retention-banner.mjs +3 -2
- package/scripts/lib/events-schema.mjs +10 -0
- package/scripts/lib/events.mjs +23 -12
- package/scripts/lib/evolve/autonomy-verdict.mjs +4 -9
- package/scripts/lib/evolve/autopilot-effectiveness.mjs +8 -18
- package/scripts/lib/fleet-protocol.mjs +21 -0
- package/scripts/lib/gates/gate-full.mjs +172 -11
- package/scripts/lib/gates/gate-helpers.mjs +236 -23
- package/scripts/lib/git-config-drift.mjs +141 -7
- package/scripts/lib/github-export.mjs +447 -0
- package/scripts/lib/gitlab-portfolio/cli.mjs +16 -5
- package/scripts/lib/handover-queue-marks.mjs +159 -0
- package/scripts/lib/hardware-pattern-detector.mjs +103 -13
- package/scripts/lib/harness-audit/categories/category1.mjs +16 -4
- package/scripts/lib/harness-audit/categories/category4.mjs +11 -8
- package/scripts/lib/harness-audit/categories/category6.mjs +25 -5
- package/scripts/lib/harness-audit/categories/category9.mjs +10 -4
- package/scripts/lib/host-identity.mjs +9 -5
- package/scripts/lib/http-request.mjs +64 -0
- package/scripts/lib/instruction-budget-guard.mjs +30 -22
- package/scripts/lib/io.mjs +6 -3
- package/scripts/lib/issue-budget-reconcile.mjs +3 -2
- package/scripts/lib/issue-budget.mjs +36 -7
- package/scripts/lib/learnings/evidence-candidates.mjs +154 -0
- package/scripts/lib/learnings/expiry-sweep.mjs +99 -7
- package/scripts/lib/learnings/io.mjs +289 -15
- package/scripts/lib/learnings/select.mjs +53 -4
- package/scripts/lib/learnings/store-role.mjs +209 -0
- package/scripts/lib/learnings/surface.mjs +46 -7
- package/scripts/lib/ledger-path.mjs +113 -0
- package/scripts/lib/maintenance-due-banner.mjs +63 -12
- package/scripts/lib/memory-banner.mjs +5 -6
- package/scripts/lib/memory-proposals/collector.mjs +5 -2
- package/scripts/lib/memory-proposals/sink.mjs +7 -4
- package/scripts/lib/memory-proposals/store.mjs +22 -5
- package/scripts/lib/mode-selector-accuracy.mjs +2 -1
- package/scripts/lib/no-follow-open.mjs +57 -0
- package/scripts/lib/orphan-reaper/reaper-audit.mjs +4 -2
- package/scripts/lib/own-lock-root.mjs +95 -0
- package/scripts/lib/owner-interview.mjs +2 -1
- package/scripts/lib/owner-yaml.mjs +70 -7
- package/scripts/lib/platform.mjs +161 -9
- package/scripts/lib/plugin-update-banner.mjs +15 -11
- package/scripts/lib/pre-push-local-partial.mjs +117 -0
- package/scripts/lib/pre-push-remote-gate.mjs +151 -25
- package/scripts/lib/process-group.mjs +270 -34
- package/scripts/lib/project-hygiene.mjs +28 -0
- package/scripts/lib/quality-gate.mjs +33 -9
- package/scripts/lib/reconcile/backlog.mjs +29 -15
- package/scripts/lib/reconcile/engine.mjs +26 -2
- package/scripts/lib/reconcile/idempotency.mjs +65 -3
- package/scripts/lib/reconcile/rule-expiry-sweep.mjs +53 -12
- package/scripts/lib/reconcile/verdict-ledger.mjs +224 -0
- package/scripts/lib/reconcile-nudge-banner.mjs +40 -6
- package/scripts/lib/resource-probe/evaluate.mjs +32 -9
- package/scripts/lib/resource-probe/probe-platform.mjs +3 -1
- package/scripts/lib/rule-loader.mjs +20 -10
- package/scripts/lib/scope-baseline.mjs +123 -8
- package/scripts/lib/scope-echo.mjs +5 -2
- package/scripts/lib/scope-gate.mjs +55 -20
- package/scripts/lib/session-close-backfill.mjs +75 -7
- package/scripts/lib/session-end/close-precheck.mjs +151 -0
- package/scripts/lib/session-end/phase-skip.mjs +8 -7
- package/scripts/lib/session-end/tail-runner.mjs +7 -2
- package/scripts/lib/session-end/vault-orphans.mjs +205 -0
- package/scripts/lib/session-id.mjs +9 -1
- package/scripts/lib/session-identity/own-session.mjs +63 -0
- package/scripts/lib/session-invocation.mjs +14 -3
- package/scripts/lib/session-lock.mjs +114 -0
- package/scripts/lib/session-record-repair.mjs +245 -35
- package/scripts/lib/session-registry.mjs +85 -12
- package/scripts/lib/session-schema/constants.mjs +9 -0
- package/scripts/lib/session-schema/filters.mjs +56 -1
- package/scripts/lib/session-schema/validator.mjs +15 -5
- package/scripts/lib/session-start-probes.mjs +149 -22
- package/scripts/lib/session-token-rollup.mjs +2 -1
- package/scripts/lib/session-work-trees.mjs +166 -0
- package/scripts/lib/sessions-canonical.mjs +61 -3
- package/scripts/lib/sessions-integrity-banner.mjs +17 -39
- package/scripts/lib/sessions-staleness-banner.mjs +8 -5
- package/scripts/lib/sh-quote.mjs +1 -0
- package/scripts/lib/skill-evidence-window.mjs +5 -1
- package/scripts/lib/skill-health/join.mjs +10 -9
- package/scripts/lib/skill-invocations-schema.mjs +13 -0
- package/scripts/lib/skill-judgments-schema.mjs +6 -2
- package/scripts/lib/snapshot-probe.mjs +414 -0
- package/scripts/lib/so-hud/collect.mjs +174 -0
- package/scripts/lib/so-hud/runtime.mjs +87 -0
- package/scripts/lib/spiral-carryover.mjs +8 -1
- package/scripts/lib/state-md/frontmatter-mutators.mjs +266 -8
- package/scripts/lib/state-md/idle-reset.mjs +248 -0
- package/scripts/lib/state-md/mission-status.mjs +5 -1
- package/scripts/lib/state-md/recommendations.mjs +26 -4
- package/scripts/lib/state-md-peer-guard.mjs +2 -0
- package/scripts/lib/state-md.mjs +31 -8
- package/scripts/lib/sunset/walker.mjs +4 -3
- package/scripts/lib/telemetry/consent.mjs +4 -2
- package/scripts/lib/telemetry/queue.mjs +3 -3
- package/scripts/lib/telemetry/sync.mjs +45 -9
- package/scripts/lib/test-runner/artifact-paths.mjs +10 -2
- package/scripts/lib/tmux-layout/layouts.mjs +20 -3
- package/scripts/lib/ux-grill/paths.mjs +5 -1
- package/scripts/lib/validate/check-agents.mjs +37 -6
- package/scripts/lib/validate/check-component-paths.mjs +25 -1
- package/scripts/lib/validate/check-guard-requires-parity.mjs +3 -3
- package/scripts/lib/validate/check-hooks-symmetry.mjs +53 -32
- package/scripts/lib/validate/check-json-files.mjs +3 -1
- package/scripts/lib/validate/check-learning-provenance.mjs +3 -2
- package/scripts/lib/validate/check-learnings-shell-writes.mjs +10 -4
- package/scripts/lib/validate/check-metrics-ledger-root.mjs +234 -0
- package/scripts/lib/validate/check-owner-leakage.mjs +159 -11
- package/scripts/lib/validate/check-test-posix-shell.mjs +246 -0
- package/scripts/lib/validate/check-unwired-features.mjs +4 -2
- package/scripts/lib/validate/check-vcs-repo-flag-positional.mjs +58 -0
- package/scripts/lib/validate/check-vcs-repo-flag.mjs +259 -73
- package/scripts/lib/validate/check-workflow-continue-on-error.mjs +63 -0
- package/scripts/lib/validate/confidential-names.mjs +3 -1
- package/scripts/lib/vault-mirror/migrate-ids.mjs +321 -0
- package/scripts/lib/vault-mirror/namespace.mjs +22 -9
- package/scripts/lib/vault-mirror/process.mjs +197 -65
- package/scripts/lib/vault-mirror/prune.mjs +5 -2
- package/scripts/lib/vault-mirror/render-learnings.mjs +8 -7
- package/scripts/lib/vault-mirror/render-sessions.mjs +36 -53
- package/scripts/lib/vault-mirror/retention.mjs +2 -2
- package/scripts/lib/vault-mirror/utils.mjs +106 -13
- package/scripts/lib/vault-staleness-banner.mjs +4 -7
- package/scripts/lib/vault-status/board-writer.mjs +34 -5
- package/scripts/lib/vault-status/narrative-mirror.mjs +66 -7
- package/scripts/lib/wave-executor/foreign-dispatch.mjs +20 -0
- package/scripts/lib/win-process-tree.mjs +137 -0
- package/scripts/lib/workspace.mjs +1 -1
- package/scripts/lib/worktree/constants.mjs +1 -1
- package/scripts/lib/worktree/lifecycle.mjs +1 -1
- package/scripts/lib/worktree/listing.mjs +1 -1
- package/scripts/lib/zx.mjs +50 -0
- package/scripts/mcp-server.mjs +16 -7
- package/scripts/mcp-server.sh +13 -83
- package/scripts/measure-policy-cache-effectiveness.mjs +7 -5
- package/scripts/memory-propose.mjs +10 -3
- package/scripts/migrate-cold-start-seed.mjs +7 -0
- package/scripts/migrate-legacy-learnings.sh +22 -0
- package/scripts/migrate-sessions-jsonl.mjs +16 -2
- package/scripts/migrate-vault-paths.mjs +29 -13
- package/scripts/parse-config.mjs +71 -14
- package/scripts/print-learnings-index.mjs +25 -2
- package/scripts/release-session-lock.mjs +94 -7
- package/scripts/release.mjs +451 -24
- package/scripts/relocate-vault-corpus.mjs +11 -7
- package/scripts/repair-invalid-sessions.mjs +68 -3
- package/scripts/resolve-session-invocation.mjs +57 -8
- package/scripts/run-migrate-v2-cross-repo.mjs +56 -1
- package/scripts/run-quality-gate.mjs +33 -7
- package/scripts/self-update.mjs +56 -7
- package/scripts/session-commit-files.mjs +133 -0
- package/scripts/site-numbers.mjs +52 -9
- package/scripts/snapshot-probe.mjs +156 -0
- package/scripts/so-hud.mjs +68 -0
- package/scripts/state-md-idle-reset.mjs +82 -0
- package/scripts/sweep-expired-learnings.mjs +54 -6
- package/scripts/sweep-expired-rules.mjs +4 -1
- package/scripts/validate-plugin.mjs +22 -0
- package/scripts/vault-integration-watcher.mjs +54 -6
- package/scripts/vault-mirror.mjs +9 -0
- package/scripts/vault-orphans.mjs +171 -0
- package/skills/_shared/fleet-protocol.md +166 -3
- package/skills/_shared/instruction-file-resolution.md +1 -1
- package/skills/_shared/monitor-patterns.md +44 -25
- package/skills/_shared/platform-tools.md +7 -0
- package/skills/_shared/state-ownership.md +5 -4
- package/skills/architecture/references/domain-model.md +1 -1
- package/skills/autopilot/SKILL.md +3 -2
- package/skills/bootstrap/SKILL.md +3 -1
- package/skills/bootstrap/_shared-template.md +4 -4
- package/skills/bootstrap/fast-template.md +1 -1
- package/skills/bootstrap/private-contract.md +1 -1
- package/skills/bootstrap/references/bootstrap-retroactive-flow.md +17 -9
- package/skills/bootstrap/templates/agents/project-code-review.md +5 -1
- package/skills/bootstrap/templates/agents/project-discovery.md +5 -1
- package/skills/bootstrap/templates/agents/project-quality-gate.md +5 -1
- package/skills/claude-md-drift-check/SKILL.md +3 -3
- package/skills/claude-md-drift-check/checker.mjs +61 -101
- package/skills/close/SKILL.md +20 -7
- package/skills/discovery/probes/docs-staleness.mjs +7 -5
- package/skills/discovery/probes/frontend-slop.mjs +7 -3
- package/skills/discovery/probes/ssot-code-diff.mjs +5 -3
- package/skills/discovery/probes/supply-chain-slopcheck.mjs +10 -8
- package/skills/discovery/probes/vault-narrative-staleness.mjs +30 -10
- package/skills/discovery/probes/vault-staleness.mjs +5 -3
- package/skills/discovery/probes-session.md +3 -0
- package/skills/discovery/probes-vault.md +2 -0
- package/skills/dispatcher/SKILL.md +1 -1
- package/skills/eval/SKILL.md +3 -1
- package/skills/evolve/SKILL.md +2 -0
- package/skills/evolve/references/evolve-analyze-mode.md +3 -3
- package/skills/evolve/references/evolve-dialectic-mode.md +1 -1
- package/skills/gitlab-ops/SKILL.md +7 -6
- package/skills/gitlab-portfolio/SKILL.md +2 -2
- package/skills/go/SKILL.md +13 -1
- package/skills/npm-publish/SKILL.md +5 -2
- package/skills/plan/SKILL.md +23 -10
- package/skills/plan/mode-feature.md +13 -8
- package/skills/plan/mode-new.md +6 -14
- package/skills/plan/prd-feature-template.md +19 -0
- package/skills/plan/prd-full-template.md +12 -5
- package/skills/plan/prd-premortem-panel.md +48 -0
- package/skills/plan/prd-reviewer-prompt.md +11 -3
- package/skills/plan/soul.md +1 -1
- package/skills/portfolio/SKILL.md +5 -6
- package/skills/quality-gates/SKILL.md +2 -4
- package/skills/reconcile/SKILL.md +27 -4
- package/skills/release/SKILL.md +16 -8
- package/skills/session-end/SKILL.md +97 -13
- package/skills/session-end/phase-3-2-docs-verification.md +1 -0
- package/skills/session-end/phase-3-6-tail.md +11 -7
- package/skills/session-end/phase-3-7a-recommendations.md +9 -2
- package/skills/session-end/plan-verification.md +16 -1
- package/skills/session-end/references/phase-3-7e-vault-orphans.md +63 -0
- package/skills/session-end/references/phase-3-documentation-updates.md +25 -13
- package/skills/session-end/references/phase-5-issue-cleanup.md +1 -1
- package/skills/session-end/references/session-summary-template.md +8 -0
- package/skills/session-end/session-metrics-write.md +7 -4
- package/skills/session-plan/SKILL.md +5 -3
- package/skills/session-start/SKILL.md +10 -4
- package/skills/session-start/phase-4-5-resource-health.md +11 -5
- package/skills/session-start/phase-7-5-mode-selector.md +3 -1
- package/skills/session-start/phase-8-5-express-path.md +4 -3
- package/skills/session-start/references/phase-1-2-session-lock.md +7 -5
- package/skills/session-start/references/phase-1-5-session-continuity.md +13 -5
- package/skills/session-start/references/phase-1-7-vault-status-board.md +1 -1
- package/skills/session-start/references/phase-4-ssot-environment-check.md +3 -2
- package/skills/tmux-layout/SKILL.md +2 -2
- package/skills/vault-sync/validator.mjs +3 -2
- package/skills/wave-executor/SKILL.md +5 -4
- package/skills/wave-executor/references/wave-executor-state-init.md +3 -3
- package/skills/wave-executor/references/wave-loop-dispatch.md +11 -5
- package/skills/wave-executor/references/wave-loop-review.md +13 -5
- package/skills/wave-executor/references/wave-loop-scope-manifest.md +1 -1
- package/AGENTS.md +0 -207
- package/assets/og-card.png +0 -0
- package/assets/og-card.svg +0 -47
- package/assets/wave-lifecycle.svg +0 -98
package/skills/plan/mode-new.md
CHANGED
|
@@ -97,10 +97,10 @@ Agent({ subagent_type: "Explore", description: "Research success benchmarks",
|
|
|
97
97
|
**Questions:**
|
|
98
98
|
|
|
99
99
|
1. **MVP scope** — Shape Up appetite: 1 week / 2 weeks / 6 weeks. Frame trade-offs for each.
|
|
100
|
-
2. **Success criteria** — SMART format (Specific, Measurable, Achievable, Relevant, Time-bound). Claude proposes draft from research, user refines.
|
|
100
|
+
2. **Success criteria** — SMART format (Specific, Measurable, Achievable, Relevant, Time-bound), each with a measured baseline (or "none yet") and an oracle other than the author. Claude proposes the draft from research, the user refines it.
|
|
101
101
|
3. **Known risks and mitigations** — Present common risks from agent research. User confirms, removes, or adds.
|
|
102
102
|
4. **Post-launch plan** — Monitoring strategy, rollback plan, feedback channels.
|
|
103
|
-
5. **Ecosystem dependencies** — Other repos in the
|
|
103
|
+
5. **Ecosystem dependencies** — Other repos in the ecosystem (count them, never assume a number) this project depends on or integrates with. Agent verifies compatibility.
|
|
104
104
|
|
|
105
105
|
---
|
|
106
106
|
|
|
@@ -118,7 +118,8 @@ Agent({ subagent_type: "Explore", description: "Research success benchmarks",
|
|
|
118
118
|
- **Section 7 (Risks & Dependencies):** From Wave 3 Q3 + Q5. Table format: Risk | Probability | Impact | Mitigation.
|
|
119
119
|
- **Section 8 (Post-Launch Plan):** From Wave 3 Q4. Monitoring, rollback, feedback channels.
|
|
120
120
|
3. Save PRD to `{plan-prd-location}/YYYY-MM-DD-{project-name}.md`.
|
|
121
|
-
4.
|
|
121
|
+
4. **Pre-Mortem Panel:** dispatch the Refute and Deepen briefs per `SKILL.md` § Phase 4.5 and `prd-premortem-panel.md`, then merge into Sections 5, 5.A (Oracle lines), External Acceptance and 7.
|
|
122
|
+
5. Dispatch reviewer per `prd-reviewer-prompt.md`. Max 3 iterations. Surface unresolved issues to user.
|
|
122
123
|
|
|
123
124
|
---
|
|
124
125
|
|
|
@@ -213,7 +214,7 @@ Choose the project-instruction file appropriate to the platform that will operat
|
|
|
213
214
|
|
|
214
215
|
### Step 6: Commit PRD
|
|
215
216
|
|
|
216
|
-
|
|
217
|
+
Copy the approved PRD from the path saved in Phase 2 into the new repo's `docs/prd/`, then commit it there. This step meets the PRD Commit Gate for `/plan new` (`SKILL.md` § Phase 5.5); run its § 5.5.2 checks in the new repo before Phase 4. Use a descriptive commit message:
|
|
217
218
|
|
|
218
219
|
```bash
|
|
219
220
|
git add docs/prd/YYYY-MM-DD-{project-name}.md
|
|
@@ -268,16 +269,7 @@ Source: PRD Section 4 (Solution & Scope).
|
|
|
268
269
|
|
|
269
270
|
### Step 2: Auto-prioritize
|
|
270
271
|
|
|
271
|
-
Score each issue
|
|
272
|
-
|
|
273
|
-
1. **Technical dependencies (highest weight):**
|
|
274
|
-
- DB schema before API, API before frontend, shared libs before consumers.
|
|
275
|
-
- Issues that block others → `priority::critical` or `priority::high`.
|
|
276
|
-
2. **Business value (medium weight):**
|
|
277
|
-
- Core MVP features → `priority::high`.
|
|
278
|
-
- Nice-to-haves → `priority::medium` or `priority::low`.
|
|
279
|
-
3. **Risk (tiebreaker):**
|
|
280
|
-
- Issues with identified risks from PRD Section 7 → bump up one level.
|
|
272
|
+
Score each issue per `SKILL.md` § 6.2 Auto-Prioritize (technical dependencies, business value, and the Impact × Risk 2×2 triage), with risks taken from PRD Section 7. Add one `[Abnahme]` issue per External Acceptance row (`SKILL.md` § 6.1).
|
|
281
273
|
|
|
282
274
|
### Step 3: Apply labels
|
|
283
275
|
|
|
@@ -25,6 +25,13 @@
|
|
|
25
25
|
### Who
|
|
26
26
|
{{Target users — existing personas or new audience — from Wave 1 Q3}}
|
|
27
27
|
|
|
28
|
+
### Evidence Baseline
|
|
29
|
+
> The premise, measured. One row per claim the plan rests on. A claim that did not reproduce stays here, marked `hypothesis`.
|
|
30
|
+
|
|
31
|
+
| Claim | Command | Result | Measured (date / SHA) |
|
|
32
|
+
|-------|---------|--------|-----------------------|
|
|
33
|
+
| {{premise}} | `{{command}}` | {{result}} | {{YYYY-MM-DD @ sha}} |
|
|
34
|
+
|
|
28
35
|
## 2. Solution & Scope
|
|
29
36
|
|
|
30
37
|
### In-Scope
|
|
@@ -36,6 +43,9 @@
|
|
|
36
43
|
- {{excluded-1 — why}}
|
|
37
44
|
- {{excluded-2 — why}}
|
|
38
45
|
|
|
46
|
+
### First Real Use / Kill
|
|
47
|
+
{{The first use outside tests, who triggers it and by when (e.g. "first committed manifest in a consumer repo by YYYY-MM-DD"). If it has not happened by then: re-shape or kill (mvp-scope Circuit Breaker), never silent carry-over.}}
|
|
48
|
+
|
|
39
49
|
## User Stories
|
|
40
50
|
|
|
41
51
|
> Optional intent layer — emitted only when the Wave-1 story toggle is "yes". Leave blank or delete this section if §3/§3.A acceptance criteria already capture the intent. Stories are the "who/why"; acceptance criteria are the "verify".
|
|
@@ -77,6 +87,15 @@ When {{action}}
|
|
|
77
87
|
Then {{graceful handling}}
|
|
78
88
|
```
|
|
79
89
|
|
|
90
|
+
> Under every scenario block, add one line `Oracle: {{who or what other than the author shows it holds — the installed artifact read back, the platform's own output, an independent process, a calibration fixture with known answers, a consumer-repo run}}`. Use `Oracle: n/a — {{reason}}` only when no such judge exists. The author's unit test against a fake is not an oracle.
|
|
91
|
+
|
|
92
|
+
### External Acceptance
|
|
93
|
+
> Criteria whose oracle cannot run inside the implementing session. Each row becomes its own `[Abnahme]` issue (SKILL.md § 6.1), which the implementing issue does not close.
|
|
94
|
+
|
|
95
|
+
| Criterion | Oracle | Owner | Not before | Pass condition | Fallback if it cannot run |
|
|
96
|
+
|-----------|--------|-------|------------|----------------|---------------------------|
|
|
97
|
+
| {{AC ref}} | {{command / observation}} | {{owner}} | {{YYYY-MM-DD}} | {{pass}} | {{fallback}} |
|
|
98
|
+
|
|
80
99
|
## 3.A Acceptance Criteria (EARS)
|
|
81
100
|
|
|
82
101
|
> Optional companion to Section 3 — translates each Feature Area's acceptance criteria into EARS-shaped statements for deterministic vitest stub generation by `/write-executable-plan`. Leave blank if Section 3's narrative Gherkin suffices.
|
|
@@ -27,6 +27,7 @@
|
|
|
27
27
|
|
|
28
28
|
### Current State
|
|
29
29
|
{{How users currently solve this problem. Pain points.}}
|
|
30
|
+
{{Measured: one line per premise, `command` → result (date / SHA). A premise nobody measured is labelled `hypothesis`.}}
|
|
30
31
|
|
|
31
32
|
## 3. Target Audience & Personas
|
|
32
33
|
|
|
@@ -66,11 +67,17 @@
|
|
|
66
67
|
|
|
67
68
|
## 5. Success Criteria
|
|
68
69
|
|
|
69
|
-
| Metric | Target | Measurement Method | Deadline |
|
|
70
|
-
|
|
71
|
-
| {{metric-1}} | {{specific target}} | {{how to measure}} | {{date}} |
|
|
72
|
-
| {{metric-2}} | {{specific target}} | {{how to measure}} | {{date}} |
|
|
73
|
-
|
|
70
|
+
| Metric | Baseline (measured) | Target | Measurement Method (the oracle, not the author) | Owner | Deadline |
|
|
71
|
+
|--------|---------------------|--------|-------------------------------------------------|-------|----------|
|
|
72
|
+
| {{metric-1}} | {{value + command, or "none yet"}} | {{specific target}} | {{how to measure}} | {{owner}} | {{date}} |
|
|
73
|
+
| {{metric-2}} | {{value + command, or "none yet"}} | {{specific target}} | {{how to measure}} | {{owner}} | {{date}} |
|
|
74
|
+
|
|
75
|
+
### External Acceptance
|
|
76
|
+
> Criteria whose oracle cannot run inside the implementing session. Each row becomes its own `[Abnahme]` issue (SKILL.md § 6.1).
|
|
77
|
+
|
|
78
|
+
| Criterion | Oracle | Owner | Not before | Pass condition | Fallback if it cannot run |
|
|
79
|
+
|-----------|--------|-------|------------|----------------|---------------------------|
|
|
80
|
+
| {{AC ref}} | {{command / observation}} | {{owner}} | {{YYYY-MM-DD}} | {{pass}} | {{fallback}} |
|
|
74
81
|
|
|
75
82
|
## 5.A Acceptance Criteria (EARS)
|
|
76
83
|
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# PRD Pre-Mortem Panel — Two Subagent Briefs
|
|
2
|
+
|
|
3
|
+
> Dispatched by SKILL.md Phase 4.5, after the PRD draft and before the PRD reviewer (Phase 5). Two read-only agents, one message, in parallel. Each receives its brief below verbatim plus the PRD path; neither sees the other's output.
|
|
4
|
+
|
|
5
|
+
## Why two briefs
|
|
6
|
+
|
|
7
|
+
Back-test 2026-10-19: three committed PRDs replayed in history-truncated clones against 43 surprises their later history recorded. The PRDs as shipped anticipated 0 of 43 (15 partially). A refute brief and a deepening brief each hit 7–8; together 11, because they find different classes. The refute brief hit security and structure (an unbounded command surface, generated mirrors missing from the file list). The deepening brief hit oracle gaps: a package census that was not the installed artifact, a run that was never measured and read as fixed, a lifecycle never exercised. Neither brief prevents the most frequent class on its own. Real-world acceptance stayed undone in 3 of 3 PRDs, so it is carried as structure (template § External Acceptance, SKILL.md § 6.1), not as a prediction.
|
|
8
|
+
|
|
9
|
+
**Relation to `/grill`:** `/grill` is the interactive counterpart, one question per turn with the operator defending the plan (`skills/grill/soul.md` Tactics 5–6). This panel is the non-interactive pass `/plan` always runs. A prediction the merge cannot settle without the operator is a `/grill` candidate, not a silent drop.
|
|
10
|
+
|
|
11
|
+
## Shared rules (both briefs)
|
|
12
|
+
|
|
13
|
+
- Read-only. No edits, commits, network writes, or issue comments. Read the code the PRD touches, and run cheap local commands (grep, the repo's own scripts, `--help`, `ps`).
|
|
14
|
+
- Every claim carries one evidence pointer: `file:line`, a command and its result, or the word `inference`. Never pass an inference off as a measurement (`skills/_shared/research-evidence.md` § Basis).
|
|
15
|
+
- At most 20 predictions, P1..P20, each ≤2 sentences, concrete and checkable: what will go wrong, which assumption fails, what work will be missing, or what will be found later. No generic advice.
|
|
16
|
+
- Return one Markdown report as your final message.
|
|
17
|
+
|
|
18
|
+
## Brief A — Refute
|
|
19
|
+
|
|
20
|
+
You review the PRD at `<path>` as the engineer who will be paged when it fails. Assume it ships exactly as written. Find what breaks, using the repository rather than the text. In particular:
|
|
21
|
+
|
|
22
|
+
1. **Live path:** is the code path the PRD changes the one that runs in production? Census the callers and quote the grep.
|
|
23
|
+
2. **Input surfaces:** every value read from a file, manifest, register or argument that reaches `exec`, `kill`, the filesystem, a URL or argv. Ask what a hostile or corrupt value does.
|
|
24
|
+
3. **Declared-unchanged modules:** read each module the PRD calls "unchanged" or "reused" for the invariants the plan relies on.
|
|
25
|
+
4. **Consumers and mirrors:** who reads the new signal (events, rubrics, telemetry, reports), and which generated mirrors, inventories or counts must move with it.
|
|
26
|
+
5. **States:** for every read, what happens when the input is missing, unreadable or half-written, as distinct from empty.
|
|
27
|
+
|
|
28
|
+
Output: `## Predictions` (P1..P20).
|
|
29
|
+
|
|
30
|
+
## Brief B — Deepen
|
|
31
|
+
|
|
32
|
+
The operator wants a deeper version of these tasks, not bigger ones. Work the four steps against the actual material, and do each step rather than only naming it:
|
|
33
|
+
|
|
34
|
+
1. **Practice:** what would a top professional in this field do here that the PRD does not ask for? Name the field first.
|
|
35
|
+
2. **Raw material:** what is the rawest material they would start from instead of what has already been digested (the issue text, docs, a summary)? That means the installed artifact, the platform binary or contract, live process or event data, a real run's output, the git history of the area. Open it where it is reachable and report what it shows.
|
|
36
|
+
3. **Methods and tools:** name the specific methods and tools they would use, and apply them where it is cheap.
|
|
37
|
+
4. **Oracle:** what, other than the author or the operator, would show the result is right? For each acceptance criterion, name that judge and say whether the PRD uses it. The author's own unit test against a fake does not count.
|
|
38
|
+
|
|
39
|
+
Then rewrite the acceptance criteria to ask for exactly that: same scope, each criterion bound to its oracle. Name the criteria whose oracle cannot run inside an implementing session.
|
|
40
|
+
|
|
41
|
+
Output: `## (1) Practice` · `## (2) Raw material` · `## (3) Methods` · `## (4) Oracle` · `## Rewritten acceptance criteria` · `## Predictions` (P1..P20).
|
|
42
|
+
|
|
43
|
+
## Coordinator merge (SKILL.md Phase 4.5)
|
|
44
|
+
|
|
45
|
+
1. **Predictions:** a prediction with an observed pointer that the coordinator re-checks in one command enters § Risks with its pointer and a Triage value. A prediction resting on `inference` enters as `unverified`, or is dropped with a one-line reason. Duplicates across briefs merge. Re-check before adopting (RCR-003); a brief's word is a claim, not a measurement.
|
|
46
|
+
2. **Oracles:** every acceptance criterion gets an `Oracle:` line taken from Brief B, or `Oracle: n/a — <reason>`. A criterion whose oracle cannot run in the implementing session moves to § External Acceptance with an owner, a not-before date, a pass condition and a fallback.
|
|
47
|
+
3. **Premise:** a Brief B raw-material finding that contradicts § 1 goes to the operator via AUQ before the reviewer runs. It is a premise change, not a risk.
|
|
48
|
+
4. **Budget:** the panel deepens, it does not widen. A prediction that would add scope goes to Out-of-Scope or a follow-up, never silently into In-Scope.
|
|
@@ -10,7 +10,7 @@ You are a PRD reviewer. Your job is to ensure the PRD is complete, consistent, a
|
|
|
10
10
|
|
|
11
11
|
## Review Criteria
|
|
12
12
|
|
|
13
|
-
Evaluate the PRD against these
|
|
13
|
+
Evaluate the PRD against these 8 criteria. For each, report **PASS** or **FAIL** with specific feedback.
|
|
14
14
|
|
|
15
15
|
### 1. Completeness
|
|
16
16
|
- All sections are filled — no `{{placeholder}}`, `TBD`, `TODO`, or empty sections
|
|
@@ -62,6 +62,13 @@ Evaluate the PRD against these 7 criteria. For each, report **PASS** or **FAIL**
|
|
|
62
62
|
- (c) each story links at least one acceptance criterion via a `↳ AC:` pointer to §3/§3.A (feature PRD) or §5/§5.A (full PRD).
|
|
63
63
|
- Do NOT apply INVEST (Independent / Negotiable / Estimable) checks — only the present/form/link checks above.
|
|
64
64
|
|
|
65
|
+
### 8. Verifiability
|
|
66
|
+
- Every acceptance criterion carries an `Oracle:` line naming who or what other than the author shows it holds: the installed artifact read back, the platform's own output, an independent process, a calibration fixture with known answers, or a consumer-repo run.
|
|
67
|
+
- The author's own unit test against a fake is not an oracle. A criterion verified only that way FAILs unless its `Oracle: n/a` gives a reason.
|
|
68
|
+
- Every External Acceptance row names an owner, a not-before date, a pass condition and a fallback.
|
|
69
|
+
- The Evidence Baseline (feature PRD § 1) or the Current State measurement (full PRD § 2) quotes the command behind each premise, or labels the premise `hypothesis`.
|
|
70
|
+
- **FAIL if:** any criterion lacks an oracle line, any External Acceptance row lacks an owner or date, or a premise is stated as fact without a measurement.
|
|
71
|
+
|
|
65
72
|
## Output Format
|
|
66
73
|
|
|
67
74
|
```
|
|
@@ -76,6 +83,7 @@ Evaluate the PRD against these 7 criteria. For each, report **PASS** or **FAIL**
|
|
|
76
83
|
| YAGNI | PASS/FAIL | {{specific feedback}} |
|
|
77
84
|
| SMART Metrics | PASS/FAIL/SKIP | {{specific feedback}} |
|
|
78
85
|
| User Stories | PASS/FAIL/SKIP | {{specific feedback}} |
|
|
86
|
+
| Verifiability | PASS/FAIL | {{specific feedback}} |
|
|
79
87
|
|
|
80
88
|
### Issues to Fix
|
|
81
89
|
1. {{specific issue with location in PRD and suggested fix}}
|
|
@@ -89,7 +97,7 @@ Evaluate the PRD against these 7 criteria. For each, report **PASS** or **FAIL**
|
|
|
89
97
|
## Iteration Protocol
|
|
90
98
|
|
|
91
99
|
1. SKILL.md dispatches you with the PRD content.
|
|
92
|
-
2. You review against all
|
|
100
|
+
2. You review against all 8 criteria.
|
|
93
101
|
3. If all PASS -> return APPROVED verdict.
|
|
94
102
|
4. If any FAIL -> return REVISE verdict with specific issues.
|
|
95
103
|
5. SKILL.md revises the PRD and re-dispatches you.
|
|
@@ -98,6 +106,6 @@ Evaluate the PRD against these 7 criteria. For each, report **PASS** or **FAIL**
|
|
|
98
106
|
## What You Are NOT
|
|
99
107
|
|
|
100
108
|
- Not a copy editor — don't flag grammar or style (unless it causes ambiguity)
|
|
101
|
-
- Not a
|
|
109
|
+
- Not speculative — a risk you raise carries an evidence pointer (file:line or a command result); the pre-mortem against the code already ran in Phase 4.5, so judge the PRD, do not redo the panel
|
|
102
110
|
- Not a maximalist — don't request more sections or detail than the template requires
|
|
103
111
|
- Focus on: can this PRD be implemented as written? If yes -> PASS.
|
package/skills/plan/soul.md
CHANGED
|
@@ -30,7 +30,7 @@ You answer in the operator's language: `owner.language` in `~/.config/session-or
|
|
|
30
30
|
### Drive convergence
|
|
31
31
|
- Each wave narrows the solution space. Start broad, end specific.
|
|
32
32
|
- Wave 1 defines the problem. Wave 2 shapes the solution. Wave 3 locks the scope.
|
|
33
|
-
- If alignment is reached early, stop early.
|
|
33
|
+
- If alignment is reached early, stop early. The wave cap in SKILL.md § 3.3 is the max, not the target.
|
|
34
34
|
- Progress means fewer open questions, not more.
|
|
35
35
|
|
|
36
36
|
## Output Levels
|
|
@@ -32,11 +32,11 @@ Then continue with the remaining valid arguments.
|
|
|
32
32
|
|
|
33
33
|
## Behavior
|
|
34
34
|
|
|
35
|
-
1. **Config gate** —
|
|
35
|
+
1. **Config gate** — The CLI reads the `gitlab-portfolio:` block from Session Config. Only `enabled: true` activates it: an absent block parses to the default `enabled: false` (`scripts/lib/config/gitlab-portfolio.mjs`), and in both cases the CLI prints `gitlab-portfolio: disabled (set gitlab-portfolio.enabled: true in Session Config)` and exits 0.
|
|
36
36
|
|
|
37
|
-
2. **Mode gate** — If `mode: off`, the command is a
|
|
37
|
+
2. **Mode gate** — If `mode: off`, the command is a no-op: the CLI checks it before vault resolution and any repo scan, prints `gitlab-portfolio: mode: off — skipped (set gitlab-portfolio.mode: warn|strict to run)` and exits 0 (#1619). Dispatch as usual; under `strict`, repo fetch failures exit 2.
|
|
38
38
|
|
|
39
|
-
3. **Vault resolution** —
|
|
39
|
+
3. **Vault resolution** — The CLI takes `--vault-dir`, else `vault-integration.vault-dir` from Session Config (resolved host-locally). If neither yields a path it prints `gitlab-portfolio: vault-integration.vault-dir not configured in Session Config` and exits 2. `vault-integration.enabled` is not checked: a configured `vault-dir` is used even when vault integration is disabled.
|
|
40
40
|
|
|
41
41
|
4. **Dispatch** — Invoke `scripts/lib/gitlab-portfolio/cli.mjs` with the resolved arguments:
|
|
42
42
|
|
|
@@ -90,9 +90,8 @@ Behaviour is governed by the `mode` config field:
|
|
|
90
90
|
| Code | Meaning |
|
|
91
91
|
|---|---|
|
|
92
92
|
| `0` | Success (or `mode: off` / `enabled: false` no-op) |
|
|
93
|
-
| `1` | User
|
|
94
|
-
| `2` | System error (vault-dir
|
|
95
|
-
| `3` | Repo fetch failures in `strict` mode |
|
|
93
|
+
| `1` | User error (bad arguments, `--repo` names no discovered repo) |
|
|
94
|
+
| `2` | System error (Session Config unreadable, no `vault-dir` configured, `vault-dir` outside the home directory, repo discovery or fetch crashed, write failed, repo fetch failures in `strict` mode) |
|
|
96
95
|
|
|
97
96
|
Exit codes follow `.claude/rules/cli-design.md` conventions.
|
|
98
97
|
|
|
@@ -147,11 +147,9 @@ its review output.
|
|
|
147
147
|
|
|
148
148
|
## Graceful Degradation
|
|
149
149
|
|
|
150
|
-
Handle missing tools without
|
|
150
|
+
Handle missing tools without aborting the session; a missing configured command is still reported as a failed check:
|
|
151
151
|
|
|
152
|
-
- If
|
|
153
|
-
- If `{test-command}` fails with "command not found" → skip tests, note "No test runner configured".
|
|
154
|
-
- If `{lint-command}` fails with "command not found" → skip lint, note "No linter configured".
|
|
152
|
+
- If a configured typecheck, test or lint command fails with "command not found", report `fail` (exit 127; on Windows `cmd.exe` exits 1, so it is a plain `fail`). Correct the command or explicitly set it to `skip` in Session Config.
|
|
155
153
|
- Non-TypeScript projects should set `typecheck-command: skip` in Session Config.
|
|
156
154
|
|
|
157
155
|
Always continue with the remaining checks — never abort a variant because one tool is missing.
|
|
@@ -55,6 +55,25 @@ any file is written. Advisory-only — rules are NEVER auto-applied.
|
|
|
55
55
|
their findings to `docs/reconcile/<date>-<topic>.md`, never into the store. (Since
|
|
56
56
|
2026-07-31 a read-side shape guard drops records lacking `learning_key`/`created_at` and
|
|
57
57
|
`mergeCandidates` reports the count as `skipped` — that guard is a backstop, not a licence.)
|
|
58
|
+
- **Verdicts outlive the checkout in an append-only ledger** (#1710).
|
|
59
|
+
`.orchestrator/metrics/reconcile-verdicts.jsonl` resolves against the MAIN checkout
|
|
60
|
+
(`resolveEventsLedgerRoot`) and sits beside `learnings.jsonl`, so it shares that file's
|
|
61
|
+
tracking (vault: tracked, needs `merge=union`; this repo: host-local). Verdict lines come
|
|
62
|
+
from `mergeCandidates`, once per terminal DECISION (`rejected`, `expired-swept`), and from
|
|
63
|
+
`markCandidateProcessed` when a decision is stamped over a kept `written` /
|
|
64
|
+
`already-on-disk` record (the merge keeps that record, so it cannot mirror the decision); the
|
|
65
|
+
branch-scoped `written` / `already-on-disk` / outcome-less records stay out, because the
|
|
66
|
+
tracked rule file's provenance marker already witnesses them across trees. After a non-dry
|
|
67
|
+
merge the engine appends one run line with the learnings count it loaded; run recency comes
|
|
68
|
+
from run lines only. A learning is terminal when the sidecar OR the ledger OR a
|
|
69
|
+
`.claude/rules/` provenance marker says so. Code never rewrites the ledger; the only
|
|
70
|
+
sanctioned hand edit is a deliberate re-open of a declined learning, and it must cover
|
|
71
|
+
EVERY checkout: remove the learning's verdict lines from the ledger in the main checkout
|
|
72
|
+
AND its record from the sidecar of the main checkout and of every linked worktree —
|
|
73
|
+
otherwise the next merge in a worktree whose sidecar still holds the terminal `rejected`
|
|
74
|
+
record appends it to the ledger again (backfill). Ceiling: a `/reconcile` in a linked
|
|
75
|
+
worktree of the vault appends to the main checkout's tracked ledger — an uncommitted
|
|
76
|
+
change there, committed by the vault's replica sync.
|
|
58
77
|
- **Same pipeline as session-end Phase 3.6.8.** This skill uses the identical engine and
|
|
59
78
|
writer seams as the automatic session-end reconciliation phase — operator experience is
|
|
60
79
|
consistent, and any fixes to the engine benefit both paths.
|
|
@@ -396,9 +415,11 @@ consolidation survives the next `/reconcile`:
|
|
|
396
415
|
latest: it must not outlive its shortest-lived content.
|
|
397
416
|
- **An EXPIRED file no longer dedupes** (#1387): the provenance reader skips it
|
|
398
417
|
whole, so its learnings become re-proposable — fail-open on an unparseable
|
|
399
|
-
date. Two known limits, measured 2026-09-18: this
|
|
400
|
-
(79 of this repo's 92
|
|
401
|
-
|
|
418
|
+
date. Two known limits, measured 2026-09-18: this covers only the on-disk
|
|
419
|
+
source, not the sidecar or the verdict ledger (79 of this repo's 92
|
|
420
|
+
provenance keys are ALSO sidecar-terminal, so just 13 return; the ledger
|
|
421
|
+
carries decisions only, never a rule's own `written` verdict), and a file the
|
|
422
|
+
sweep cannot split or cannot read
|
|
402
423
|
(`no-1to1-mapping`, `no-provenance-block`, `unreadable`, and since GH#70
|
|
403
424
|
`no-counter-sentence` — the fail-closed branch that touches such a file not
|
|
404
425
|
at all, deletion included; none in the live tree today, `skipped: []` over 7
|
|
@@ -412,7 +433,9 @@ consolidation survives the next `/reconcile`:
|
|
|
412
433
|
repoRoot })` from `scripts/lib/reconcile/idempotency.mjs` — the ONLY
|
|
413
434
|
sanctioned writer of `.orchestrator/runtime/reconcile-candidates.jsonl`
|
|
414
435
|
(never append to that file by hand; the read-side shape guard drops foreign
|
|
415
|
-
records and `mergeCandidates` rewrites the store in full).
|
|
436
|
+
records and `mergeCandidates` rewrites the store in full). A `rejected` stamp
|
|
437
|
+
also reaches the verdict ledger, so the drop holds in fresh worktrees (and on
|
|
438
|
+
other hosts only where `.orchestrator/metrics/` is tracked).
|
|
416
439
|
|
|
417
440
|
**Verify a consolidation with a dry run**, not by eye: `alreadyMaterialized`
|
|
418
441
|
must equal absorbed + dropped. If it equals only the absorbed count, the drops
|
package/skills/release/SKILL.md
CHANGED
|
@@ -19,6 +19,7 @@ The user wants to cut a release of this package. Optional argument — the targe
|
|
|
19
19
|
The flags this repo's release path uses — the operator-facing entry points, in the order they run:
|
|
20
20
|
|
|
21
21
|
- `node scripts/release.mjs --set-version X.Y.Z` — rewrite every version surface and sync `package-lock.json`.
|
|
22
|
+
- `node scripts/snapshot-probe.mjs --host win-wsl --json` — under `mirror: curated`, run the suite on the exported tree of the release commit before anything is pushed; `--check` requires its receipt.
|
|
22
23
|
- `node scripts/release.mjs --check --json` — the preflight gate; every row must be green.
|
|
23
24
|
- `node scripts/release.mjs --publish` — the irreversible step; give it ≥600 s of wall clock.
|
|
24
25
|
|
|
@@ -40,17 +41,21 @@ The same reading shows the other half: the GitHub releases for 3.15/3.18/3.19/3.
|
|
|
40
41
|
|
|
41
42
|
## The order
|
|
42
43
|
|
|
43
|
-
1. **Preconditions.** Working tree clean, on `main`,
|
|
44
|
+
1. **Preconditions.** Working tree clean, on `main`, `origin/main` level with `HEAD`, and the GitHub mirror current. The mirror is checked because the site deploy hangs off `github`, not `origin`. What "current" means follows Session Config `mirror` (`--check` row `github-mirror-mode` names it): under `mirror: github` (or unset), `github/main` equals `HEAD`; under `mirror: curated` (#1645), GitHub never receives `HEAD` — `github/main` is a squash snapshot whose `Source-Commit:` trailer must name `HEAD` (publish it with `/close` on `main`, session-end § 4.4). `docs/github-mirror-protection.md` § Releases under `mirror: curated`.
|
|
44
45
|
2. **Set the version.** `node scripts/release.mjs --set-version X.Y.Z` — rewrites every version surface, syncs `package-lock.json`, re-stamps the measured census on the site.
|
|
45
46
|
3. **Write the editorial half.** The dated `## [X.Y.Z] - YYYY-MM-DD` CHANGELOG entry, `[Unreleased]` folded, README highlights. The script does not write these; `--check` enforces them.
|
|
46
|
-
4. **Gate, commit
|
|
47
|
-
5. **
|
|
48
|
-
|
|
49
|
-
|
|
47
|
+
4. **Gate, commit.** Full quality gate, then commit. Do not push yet.
|
|
48
|
+
5. **Probe the export (under `mirror: curated`), before the push.** `node scripts/snapshot-probe.mjs --host win-wsl --json` — builds the curated tree of `HEAD` (the release commit), runs validate-plugin on it locally and the full suite on it remotely (the pre-push router's gate on that host). It needs no remote and no pushed commit. Run it here, not after the push: 5.13.0 found three blockers only after its first curated push (#1712), when the release commit was already on `main`, and the fixes took two more MRs (!223, !224). A red probe here is fixed before anything leaves this machine.
|
|
49
|
+
- **Host:** `win-wsl` is where the 5.13.0 red-proof and the green probe ran (#1712); the m5 gate timed out during that release. A host that is unknown, not ready or falls back exits 2 and writes no receipt. If win-wsl is asleep, run `node scripts/snapshot-probe.mjs --host m5-remote --json` only while the offload banner shows m5 without load. `--local` only with the owner's explicit consent: full suites do not run on the M4.
|
|
50
|
+
- **Receipt:** only a run with a suite step writes one, at `.orchestrator/tmp/snapshot-probe/<tree>.json`. It is keyed by the snapshot **tree**: a commit that changes only excluded files keeps it valid; any change to a public file, a test or the export policy invalidates it. `--check` row `snapshot-probe` reads it and never runs the suite itself.
|
|
51
|
+
6. **Push** to **both** remotes — under `mirror: curated` the second "push" is the curated snapshot from `/close`, never a plain push of `main` (session-end § 4.4 refuses it).
|
|
52
|
+
7. **CI green — on the commit that will be published, on BOTH platforms.** Not on its predecessor: a green pipeline from before step 4's commit is evidence about a different tree. And not on GitLab alone — `--check` carries two CI rows, `ci-green-on-head` (GitLab, via `origin`) and `ci-green-on-head-github` (the mirror). The GitLab pipeline is Linux-only; the **macOS** matrix leg exists solely in `.github/workflows/test.yml`, i.e. on the operator's own platform. The github row self-disables (`skipped — no github remote`) in a checkout without a mirror, and fails on `unknown`/`degraded` exactly like the GitLab one — "could not read the mirror" is not "the mirror is green".
|
|
53
|
+
8. **Preflight.** `node scripts/release.mjs --check --json` — every row green. Run this after the release commit is pushed and its CI succeeds: the preflight requires a clean working tree, HEAD parity on both remotes (on GitHub under `mirror: curated`: the snapshot's `Source-Commit` trailer, row `head-pushed-github`) and green CI on that commit (on GitHub under `mirror: curated`: on the snapshot). It derives its target from `package.json`, so checking the pre-bump version instead produces registry- and tag-collision failures.
|
|
54
|
+
9. **Publish.** `node scripts/release.mjs --publish` — **give it ≥600 s of wall clock, or run it in the background.** The script sets no spawn timeout on purpose (a kill mid-`npm publish` or mid-push is the very failure the receipt boundary exists to avoid), and the tail is slow by construction: each of the two `git push` remotes re-runs the husky pre-push full gate, plus up to 120 s of live-site polling. A 3-minute default command timeout kills it mid-tail.
|
|
50
55
|
|
|
51
|
-
The target-confirmed npm receipt is the irreversible boundary. Before that receipt, any failure aborts normally. After it, never rerun `--publish`: the script writes the publish proof `.orchestrator/runtime/release-<target>.json` (checked archive sha256 + sha512 integrity, receipt time, commit, tag), and a registry availability timeout/query/wait failure is reconciliation while the script still tags, pushes `main` + tag to both remotes, handles the GitHub release, and polls the live site. If tag/push fails after the receipt, the dependent GitHub-release and site steps are skipped and the script returns structured reconciliation guidance instead. Add the GitHub release for the new tag (`gh release create`) as part of this step, not "later" — "later" is what produced the three-second backfill above.
|
|
56
|
+
The target-confirmed npm receipt is the irreversible boundary. Before that receipt, any failure aborts normally. After it, never rerun `--publish`: the script writes the publish proof `.orchestrator/runtime/release-<target>.json` (checked archive sha256 + sha512 integrity, receipt time, commit, tag), and a registry availability timeout/query/wait failure is reconciliation while the script still tags, pushes `main` + tag to both remotes (under `mirror: curated`: `main` + tag to `origin`, the verified snapshot + a tag on that snapshot to `github`), handles the GitHub release, and polls the live site. If tag/push fails after the receipt, the dependent GitHub-release and site steps are skipped and the script returns structured reconciliation guidance instead. Add the GitHub release for the new tag (`gh release create`) as part of this step, not "later" — "later" is what produced the three-second backfill above.
|
|
52
57
|
|
|
53
|
-
Steps 2–
|
|
58
|
+
Steps 2–9 are one continuous act. A release left parked between step 6 and step 9 is exactly the `3.18.0` state: every surface says released, the registry disagrees.
|
|
54
59
|
|
|
55
60
|
## Abort criteria
|
|
56
61
|
|
|
@@ -59,8 +64,11 @@ Steps 2–7 are one continuous act. A release left parked between step 4 and ste
|
|
|
59
64
|
| Signal | Why it stops the release |
|
|
60
65
|
|---|---|
|
|
61
66
|
| Any red row in `--check` | The preflight is the gate. A red row is a fact about this tree, not a formality. |
|
|
62
|
-
| `github/main` behind `origin/main` or `HEAD` | The mirror carries the site deploy and the GitHub release. Publishing over a lagging mirror is how the site falls a release behind. |
|
|
67
|
+
| `github/main` behind `origin/main` or `HEAD` (under `mirror: curated`: its `Source-Commit` trailer is not `HEAD`, or it carries none) | The mirror carries the site deploy and the GitHub release. Publishing over a lagging mirror is how the site falls a release behind. |
|
|
68
|
+
| `github-push-url` red: the push URL of `github` differs from its fetch URL (`pushurl`/`pushInsteadOf`, e.g. the #1631 push lock) | Every github check reads the fetch URL; the push would go elsewhere. The publish tail refuses it too, but only after npm publish — unrecoverable then. |
|
|
69
|
+
| `snapshot-probe` red: no receipt for `HEAD`'s export tree, a red step, or no suite step (`test`/`remote-gate`) | The exported tree differs from the private one; only a suite run on it proves the public mirror is green. A validate-plugin-only receipt ran no test. The detail names the fix: `node scripts/snapshot-probe.mjs --host <alias>`. |
|
|
63
70
|
| `npm whoami` returns nothing or non-zero | The token is dead or absent. Publishing proceeds far enough to fail loudly *after* surfaces are committed. |
|
|
71
|
+
| `npm-token-publish` red: the token in use lacks Bypass-2FA, write, scope or has expired (read from `npm token list`) | `whoami` was green for 5.13.0 and publish still died with EOTP. See `skills/npm-publish/SKILL.md` § Token requirements. |
|
|
64
72
|
| CI not green on the exact commit being published (`ci-green-on-head`) | Green-on-the-previous-commit is the silent-regression class this repo exists to catch. |
|
|
65
73
|
| GitHub mirror CI not green (`ci-green-on-head-github`) | The GitLab pipeline is Linux-only; the macOS matrix leg runs only on the mirror, and macOS is the operator's own platform. An `unknown`/`degraded` reading stops the release too — it means the mirror was never read. Only a checkout with no `github` remote passes this row, as `skipped`. |
|
|
66
74
|
| `--skip-ci` together with `--publish` | **Refused by the script** (`validateFlags`), not merely discouraged. `--skip-ci` marks the CI row green without checking anything; a green tick that verified nothing must never authorise an irreversible publish. It is an inspection aid for `--check`, never a release path. |
|