session-orchestrator 3.19.0 → 3.21.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 +1 -1
- package/.claude-plugin/plugin.json +1 -1
- package/.codex-plugin/plugin.json +1 -1
- package/.cursor/rules/030-wave-execution.mdc +10 -8
- package/CHANGELOG.md +494 -0
- package/README.md +16 -11
- package/agents/analyst.md +1 -1
- package/agents/architect-reviewer.md +1 -1
- package/agents/code-implementer.md +4 -2
- package/agents/db-specialist.md +1 -1
- package/agents/dialectic-deriver.md +1 -1
- package/agents/docs-writer.md +1 -1
- package/agents/memory-proposal-collector.md +1 -1
- package/agents/qa-strategist.md +1 -1
- package/agents/security-reviewer.md +1 -1
- package/agents/session-reviewer.md +42 -1
- package/agents/skill-applied-judge.md +1 -1
- package/agents/test-writer.md +1 -1
- package/agents/ui-developer.md +1 -1
- package/agents/ux-evaluator.md +1 -1
- package/commands/release.md +60 -0
- package/commands/session.md +6 -2
- package/docs/USER-GUIDE.md +1 -1
- package/docs/instruction-delivery.md +350 -0
- package/docs/migration-v3.md +9 -6
- package/docs/persona-panel.md +3 -1
- package/docs/scope-collision-guard.md +167 -0
- package/docs/session-config-reference.md +1 -41
- package/docs/session-config-template.md +0 -23
- package/hooks/_lib/guard-source-loader.mjs +304 -91
- package/hooks/enforce-commands.mjs +216 -17
- package/hooks/enforce-scope.mjs +236 -12
- package/hooks/hooks-codex.json +1 -1
- package/hooks/hooks.json +11 -1
- package/hooks/on-session-end.mjs +52 -5
- package/hooks/on-session-start.mjs +7 -4
- package/hooks/on-stop.mjs +127 -12
- package/hooks/post-bash-write-verify.mjs +8 -32
- package/hooks/pre-bash-destructive-guard.mjs +146 -59
- package/hooks/pre-bash-sessions-ledger-guard.mjs +493 -66
- package/hooks/pre-task-scope-disjoint.mjs +1042 -0
- package/package.json +2 -2
- package/pi/prompts/release.md +12 -0
- package/scripts/autopilot.mjs +3 -1
- package/scripts/backfill-learnings-from-vault.mjs +967 -0
- package/scripts/emit-session.mjs +45 -40
- package/scripts/export-hw-learnings.mjs +61 -2
- package/scripts/lib/autopilot/worktree-pipeline.mjs +5 -5
- package/scripts/lib/backlog-scan.mjs +106 -15
- package/scripts/lib/build-live-signals.mjs +7 -3
- package/scripts/lib/ci-status-banner.mjs +207 -23
- package/scripts/lib/command-blocker.mjs +322 -62
- package/scripts/lib/git-config-drift.mjs +471 -0
- package/scripts/lib/hardening.mjs +9 -9
- package/scripts/lib/harness-audit/categories/category6.mjs +65 -12
- package/scripts/lib/io.mjs +193 -7
- package/scripts/lib/learnings/affinity.mjs +434 -0
- package/scripts/lib/learnings/candidates.mjs +736 -0
- package/scripts/lib/learnings/expiry-sweep.mjs +408 -53
- package/scripts/lib/learnings/judgment.mjs +782 -0
- package/scripts/lib/learnings/kebab.mjs +128 -0
- package/scripts/lib/learnings/select.mjs +704 -0
- package/scripts/lib/memory-cleanup-stamp.mjs +132 -8
- package/scripts/lib/mirror-issues-banner.mjs +266 -0
- package/scripts/lib/named-vault-resolver.mjs +105 -16
- package/scripts/lib/peer-cards/schema.mjs +6 -2
- package/scripts/lib/reconcile/emitter.mjs +107 -22
- package/scripts/lib/reconcile/engine.mjs +9 -15
- package/scripts/lib/reconcile/renderer.mjs +141 -25
- package/scripts/lib/reconcile/sanitize.mjs +518 -0
- package/scripts/lib/reconcile/writer.mjs +134 -1
- package/scripts/lib/redact-spans.mjs +89 -0
- package/scripts/lib/scope-baseline.mjs +77 -17
- package/scripts/lib/scope-gate.mjs +852 -72
- package/scripts/lib/secret-masker.mjs +262 -0
- package/scripts/lib/session-close-backfill.mjs +2 -2
- package/scripts/lib/session-lock.mjs +34 -10
- package/scripts/lib/session-record-repair.mjs +551 -0
- package/scripts/lib/session-registry.mjs +9 -1
- package/scripts/lib/session-schema/serializer.mjs +54 -0
- package/scripts/lib/session-schema.mjs +1 -0
- package/scripts/lib/session-token-rollup.mjs +68 -6
- package/scripts/lib/soul-resolve.mjs +12 -0
- package/scripts/lib/state-md/mission-status.mjs +21 -12
- package/scripts/lib/tmux-layout/telemetry.mjs +43 -10
- package/scripts/lib/tmux-layout/vcs-detector.mjs +108 -4
- package/scripts/lib/validate/check-agents.mjs +77 -5
- package/scripts/lib/validate/check-banner-parity.mjs +376 -0
- package/scripts/lib/validate/check-commands.mjs +2 -20
- package/scripts/lib/validate/check-doc-cli-commands.mjs +514 -0
- package/scripts/lib/validate/check-guard-requires-parity.mjs +1148 -0
- package/scripts/lib/validate/check-hooks-symmetry.mjs +18 -0
- package/scripts/lib/validate/check-learning-provenance.mjs +511 -0
- package/scripts/lib/validate/check-owner-leakage.mjs +188 -20
- package/scripts/lib/validate/check-rules.mjs +31 -5
- package/scripts/lib/validate/check-skills.mjs +191 -0
- package/scripts/lib/validate/check-test-git-config-target.mjs +665 -0
- package/scripts/lib/validate/check-unicode-safety.mjs +22 -2
- package/scripts/lib/validate/check-untracked-test-deps.mjs +925 -0
- package/scripts/lib/validate/check-unwired-features.mjs +757 -0
- package/scripts/lib/validate/check-vcs-repo-flag.mjs +965 -0
- package/scripts/lib/validate/frontmatter-block.mjs +61 -0
- package/scripts/lib/validate/tier-inference.mjs +46 -8
- package/scripts/lib/vault-mirror/namespace.mjs +146 -1
- package/scripts/lib/vault-mirror/process.mjs +264 -31
- package/scripts/lib/vault-mirror/render-sessions.mjs +115 -4
- package/scripts/lib/vault-status/board-writer.mjs +300 -56
- package/scripts/lib/vault-status/narrative-mirror.mjs +119 -5
- package/scripts/lib/vcs-repo-spec.mjs +500 -19
- package/scripts/print-applicable-rules.mjs +170 -7
- package/scripts/print-learnings-index.mjs +501 -0
- package/scripts/release.mjs +616 -61
- package/scripts/repair-invalid-sessions.mjs +209 -0
- package/scripts/site-numbers.mjs +1049 -0
- package/scripts/sweep-expired-learnings.mjs +192 -32
- package/scripts/validate-plugin.mjs +82 -0
- package/scripts/validate-wave-scope.mjs +281 -12
- package/scripts/vault-mirror.mjs +26 -1
- package/skills/_shared/monitor-patterns.md +24 -4
- package/skills/_shared/state-ownership.md +17 -0
- package/skills/brainstorm/soul.md +47 -1
- package/skills/claude-md-drift-check/SKILL.md +9 -1
- package/skills/debug/SKILL.md +4 -1
- package/skills/discovery/issue-templates.md +4 -4
- package/skills/discovery/probes-code.md +2 -2
- package/skills/discovery/probes-feature.md +6 -6
- package/skills/discovery/probes-infra.md +2 -2
- package/skills/discovery/probes-session.md +5 -5
- package/skills/dispatcher/SKILL.md +10 -1
- package/skills/evolve/SKILL.md +116 -18
- package/skills/frontmatter-guard/SKILL.md +9 -1
- package/skills/gitlab-ops/SKILL.md +54 -39
- package/skills/gitlab-portfolio/SKILL.md +10 -1
- package/skills/grill/soul.md +44 -1
- package/skills/memory-cleanup/SKILL.md +18 -5
- package/skills/npm-publish/SKILL.md +22 -50
- package/skills/persona-panel/SKILL.md +3 -1
- package/skills/plan/mode-new.md +23 -5
- package/skills/plan/soul.md +46 -3
- package/skills/repo-audit/SKILL.md +10 -1
- package/skills/session-end/SKILL.md +45 -26
- package/skills/session-end/metrics-collection.md +1 -1
- package/skills/session-end/phase-3-6-tail.md +30 -1
- package/skills/session-end/plan-verification.md +1 -5
- package/skills/session-end/session-metrics-write.md +6 -10
- package/skills/session-plan/SKILL.md +2 -2
- package/skills/session-plan/wave-template.md +1 -1
- package/skills/session-start/SKILL.md +15 -1
- package/skills/session-start/soul.md +41 -1
- package/skills/spinout/SKILL.md +5 -1
- package/skills/sunset-review/SKILL.md +11 -1
- package/skills/tmux-layout/SKILL.md +7 -2
- package/skills/vault-mirror/SKILL.md +10 -1
- package/skills/vault-sync/SKILL.md +10 -1
- package/skills/vault-sync/validator.mjs +55 -6
- package/skills/wave-executor/SKILL.md +1 -5
- package/skills/wave-executor/wave-loop.md +77 -82
- package/scripts/lib/mission-status-schema.mjs +0 -114
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Mission-Status Enum + Transition Validator (issue #340).
|
|
3
|
-
*
|
|
4
|
-
* Pure ESM, no I/O, no external dependencies. All functions are deterministic.
|
|
5
|
-
*
|
|
6
|
-
* Five-state lifecycle for wave-plan items:
|
|
7
|
-
*
|
|
8
|
-
* brainstormed → validated → in-dev → testing → completed
|
|
9
|
-
*
|
|
10
|
-
* Rollbacks to `brainstormed` are permitted from any state (user can reset scope).
|
|
11
|
-
* Idempotent self-transitions are always allowed.
|
|
12
|
-
* All other transitions are rejected.
|
|
13
|
-
*/
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* Canonical ordered list of valid mission-status values.
|
|
17
|
-
*
|
|
18
|
-
* @type {readonly string[]}
|
|
19
|
-
*/
|
|
20
|
-
export const MISSION_STATUS_VALUES = Object.freeze([
|
|
21
|
-
'brainstormed',
|
|
22
|
-
'validated',
|
|
23
|
-
'in-dev',
|
|
24
|
-
'testing',
|
|
25
|
-
'completed',
|
|
26
|
-
]);
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* Allowed forward transitions (excluding self-transitions and rollback to
|
|
30
|
-
* 'brainstormed', which are handled separately in isValidMissionStatusTransition).
|
|
31
|
-
*
|
|
32
|
-
* @type {ReadonlyMap<string, string>}
|
|
33
|
-
*/
|
|
34
|
-
const FORWARD_TRANSITIONS = new Map([
|
|
35
|
-
['brainstormed', 'validated'],
|
|
36
|
-
['validated', 'in-dev'],
|
|
37
|
-
['in-dev', 'testing'],
|
|
38
|
-
['testing', 'completed'],
|
|
39
|
-
]);
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* Returns true when `value` is one of the five canonical status strings.
|
|
43
|
-
*
|
|
44
|
-
* @param {unknown} value
|
|
45
|
-
* @returns {boolean}
|
|
46
|
-
*/
|
|
47
|
-
export function isValidMissionStatus(value) {
|
|
48
|
-
return typeof value === 'string' && MISSION_STATUS_VALUES.includes(value);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
/**
|
|
52
|
-
* Returns true when the transition from `from` → `to` is permitted.
|
|
53
|
-
*
|
|
54
|
-
* Allowed transitions:
|
|
55
|
-
* - Forward: brainstormed→validated, validated→in-dev, in-dev→testing, testing→completed
|
|
56
|
-
* - Idempotent: any state → itself
|
|
57
|
-
* - Rollback: any state → brainstormed
|
|
58
|
-
*
|
|
59
|
-
* All other transitions return false.
|
|
60
|
-
*
|
|
61
|
-
* @param {string} from - current status value
|
|
62
|
-
* @param {string} to - target status value
|
|
63
|
-
* @returns {boolean}
|
|
64
|
-
*/
|
|
65
|
-
export function isValidMissionStatusTransition(from, to) {
|
|
66
|
-
if (!isValidMissionStatus(from) || !isValidMissionStatus(to)) return false;
|
|
67
|
-
// Idempotent self-transition
|
|
68
|
-
if (from === to) return true;
|
|
69
|
-
// Rollback to brainstormed from any state
|
|
70
|
-
if (to === 'brainstormed') return true;
|
|
71
|
-
// Forward transition
|
|
72
|
-
return FORWARD_TRANSITIONS.get(from) === to;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
/**
|
|
76
|
-
* Validates a mission-status entry object.
|
|
77
|
-
*
|
|
78
|
-
* Expected shape:
|
|
79
|
-
* { id: string, task: string, wave: number, status: <MISSION_STATUS_VALUES> }
|
|
80
|
-
*
|
|
81
|
-
* @param {unknown} obj
|
|
82
|
-
* @returns {{ ok: boolean, errors: string[] }}
|
|
83
|
-
*/
|
|
84
|
-
export function validateMissionStatusEntry(obj) {
|
|
85
|
-
const errors = [];
|
|
86
|
-
if (obj === null || typeof obj !== 'object' || Array.isArray(obj)) {
|
|
87
|
-
return { ok: false, errors: ['entry must be a non-null, non-array object'] };
|
|
88
|
-
}
|
|
89
|
-
const entry = /** @type {Record<string, unknown>} */ (obj);
|
|
90
|
-
|
|
91
|
-
// id — non-empty string
|
|
92
|
-
if (typeof entry.id !== 'string' || entry.id.trim() === '') {
|
|
93
|
-
errors.push('id must be a non-empty string');
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
// task — non-empty string
|
|
97
|
-
if (typeof entry.task !== 'string' || entry.task.trim() === '') {
|
|
98
|
-
errors.push('task must be a non-empty string');
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
// wave — integer >= 1
|
|
102
|
-
if (!Number.isInteger(entry.wave) || /** @type {number} */ (entry.wave) < 1) {
|
|
103
|
-
errors.push('wave must be a positive integer');
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
// status — one of MISSION_STATUS_VALUES
|
|
107
|
-
if (!isValidMissionStatus(entry.status)) {
|
|
108
|
-
errors.push(
|
|
109
|
-
`status must be one of [${MISSION_STATUS_VALUES.join(', ')}], got: ${JSON.stringify(entry.status)}`,
|
|
110
|
-
);
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
return { ok: errors.length === 0, errors };
|
|
114
|
-
}
|