session-orchestrator 4.1.0 → 5.0.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/skills/session-plan/SKILL.md +1 -1
- package/.agents/skills/session-start/SKILL.md +1 -1
- package/.agents/skills/ux-grill/SKILL.md +22 -0
- package/.claude-plugin/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +3 -2
- package/.codex-plugin/plugin.json +1 -1
- package/.codex-plugin/skills/session-plan/SKILL.md +1 -1
- package/.codex-plugin/skills/session-start/SKILL.md +1 -1
- package/.codex-plugin/skills/ux-grill/SKILL.md +21 -0
- package/.codex-plugin/skills/ux-grill/agents/openai.yaml +5 -0
- package/.cursor/commands/ux-grill.md +14 -0
- package/.cursor/skills/session-plan/SKILL.md +1 -1
- package/.cursor/skills/session-start/SKILL.md +1 -1
- package/.cursor/skills/ux-grill/SKILL.md +13 -0
- package/.cursor-plugin/plugin.json +1 -1
- package/AGENTS.md +2 -1
- package/CHANGELOG.md +128 -1
- package/README.md +98 -86
- package/agents/dialectic-deriver.md +11 -0
- package/agents/ux-evaluator.md +1 -1
- package/commands/close.md +3 -3
- package/commands/go.md +2 -0
- package/commands/memory-cleanup.md +4 -3
- package/commands/persona-panel.md +1 -1
- package/commands/session.md +3 -2
- package/commands/ux-grill.md +51 -0
- package/docs/README.md +4 -4
- package/docs/USER-GUIDE.md +117 -50
- package/docs/agent-authoring.md +2 -2
- package/docs/baseline.md +55 -1
- package/docs/ci-setup.md +1 -1
- package/docs/codex-setup.md +9 -0
- package/docs/components.md +9 -9
- package/docs/cursor-setup.md +1 -0
- package/docs/events-schema.md +13 -6
- package/docs/github-mirror-protection.md +61 -20
- package/docs/instruction-delivery.md +1 -1
- package/docs/memory-proposal-flow.md +3 -3
- package/docs/migration-v4.md +2 -2
- package/docs/migration-v5.md +62 -0
- package/docs/owner-config-schema.md +74 -90
- package/docs/persona-panel.md +4 -4
- package/docs/pi-setup.md +1 -0
- package/docs/rule-authoring.md +13 -6
- package/docs/scope-collision-guard.md +16 -0
- package/docs/session-config-reference.md +55 -22
- package/docs/session-config-template.md +9 -5
- package/docs/vault-docs-architecture.md +4 -2
- package/hooks/_lib/hook-import-set.json +70 -3
- package/hooks/_lib/lock-bootstrap.mjs +84 -1
- package/hooks/_lib/vcs-create-matcher.mjs +401 -16
- package/hooks/enforce-scope.mjs +201 -0
- package/hooks/hooks-codex.json +1 -1
- package/hooks/hooks-cursor.json +5 -0
- package/hooks/hooks.json +7 -2
- package/hooks/on-session-start.mjs +171 -49
- package/hooks/post-bash-issue-budget-refund.mjs +375 -0
- package/hooks/pre-auq-clarity.mjs +70 -18
- package/hooks/pre-bash-issue-budget.mjs +170 -26
- package/hooks/subagent-telemetry.mjs +106 -20
- package/package.json +5 -4
- package/pi/prompts/ux-grill.md +12 -0
- package/scripts/baseline-archetypes.mjs +28 -0
- package/scripts/ci/assert-vitest-green.mjs +4 -2
- package/scripts/dialectic-deriver.mjs +32 -8
- package/scripts/emit-session.mjs +72 -1
- package/scripts/lib/agent-status.mjs +441 -9
- package/scripts/lib/auq/schema.mjs +10 -3
- package/scripts/lib/auto-dialectic.mjs +0 -68
- package/scripts/lib/baseline-archetypes.mjs +439 -0
- package/scripts/lib/build-live-signals.mjs +5 -6
- package/scripts/lib/ci-status-banner.mjs +29 -6
- package/scripts/lib/claude-md-budget-lint.mjs +52 -2
- package/scripts/lib/config/issue-budget.mjs +68 -8
- package/scripts/lib/config/private-config-dir.mjs +3 -2
- package/scripts/lib/config/remote-hosts.mjs +2 -2
- package/scripts/lib/config-schema.mjs +79 -0
- package/scripts/lib/config.mjs +12 -1
- package/scripts/lib/eval/engine.mjs +7 -1
- package/scripts/lib/file-lock.mjs +151 -8
- package/scripts/lib/git-porcelain.mjs +113 -0
- package/scripts/lib/instruction-budget-guard.mjs +415 -47
- package/scripts/lib/io.mjs +29 -4
- package/scripts/lib/issue-budget-reconcile.mjs +392 -0
- package/scripts/lib/issue-budget.mjs +412 -9
- package/scripts/lib/learnings/evolve-telemetry.mjs +1 -2
- package/scripts/lib/learnings/sizing-subject.mjs +44 -0
- package/scripts/lib/locks/staging-fence-lock.mjs +19 -38
- package/scripts/lib/locks/state-md-lock.mjs +19 -41
- package/scripts/lib/maintenance-due-banner.mjs +450 -0
- package/scripts/lib/owner-config.example.yaml +29 -46
- package/scripts/lib/owner-yaml.mjs +14 -13
- package/scripts/lib/peer-cards/merger.mjs +143 -0
- package/scripts/lib/pre-dispatch-check.mjs +20 -14
- package/scripts/lib/project-hygiene.mjs +81 -30
- package/scripts/lib/quality-gate.mjs +27 -71
- package/scripts/lib/reconcile/engine.mjs +19 -1
- package/scripts/lib/reconcile/writer.mjs +278 -11
- package/scripts/lib/resource-probe/evaluate.mjs +19 -21
- package/scripts/lib/rules-sync.mjs +34 -4
- package/scripts/lib/scope-echo.mjs +346 -0
- package/scripts/lib/session-close-backfill.mjs +182 -40
- package/scripts/lib/session-end/phase-skip.mjs +85 -86
- package/scripts/lib/session-end/tail-runner.mjs +178 -0
- package/scripts/lib/session-lock.mjs +62 -2
- package/scripts/lib/session-record-repair.mjs +91 -0
- package/scripts/lib/session-schema/constants.mjs +6 -0
- package/scripts/lib/session-schema/filters.mjs +26 -1
- package/scripts/lib/session-schema/validator.mjs +20 -0
- package/scripts/lib/session-shape.mjs +558 -0
- package/scripts/lib/session-start-probes.mjs +429 -56
- package/scripts/lib/session-token-rollup.mjs +95 -10
- package/scripts/lib/state-md/frontmatter-mutators.mjs +22 -34
- package/scripts/lib/state-md.mjs +1 -0
- package/scripts/lib/subagents-schema.mjs +77 -9
- package/scripts/lib/telemetry/pricing.mjs +197 -0
- package/scripts/lib/telemetry/sync.mjs +50 -1
- package/scripts/lib/test-runner/artifact-paths.mjs +30 -5
- package/scripts/lib/test-runner/issue-reconcile.mjs +45 -8
- package/scripts/lib/tmux-layout/layouts.mjs +62 -4
- package/scripts/lib/ux-grill/collect.mjs +1163 -0
- package/scripts/lib/ux-grill/compare.mjs +285 -0
- package/scripts/lib/ux-grill/manifest.mjs +618 -0
- package/scripts/lib/ux-grill/measures.mjs +431 -0
- package/scripts/lib/ux-grill/paths.mjs +224 -0
- package/scripts/lib/ux-grill/pencil-coverage.mjs +284 -0
- package/scripts/lib/ux-grill/reconcile.mjs +344 -0
- package/scripts/lib/ux-grill/run-record.mjs +316 -0
- package/scripts/lib/ux-grill/schema.mjs +321 -0
- package/scripts/lib/validate/check-skill-script-paths.mjs +33 -10
- package/scripts/lib/validate/check-untracked-test-deps.mjs +33 -19
- package/scripts/lib/validate/check-unwired-features.mjs +56 -27
- package/scripts/lib/vault-mirror/process.mjs +2 -1
- package/scripts/lib/vault-status/board-lock.mjs +18 -0
- package/scripts/lib/vault-status/board-writer.mjs +8 -0
- package/scripts/lib/vault-status/narrative-mirror.mjs +4 -4
- package/scripts/lib/wave-resource-gate.mjs +23 -27
- package/scripts/lib/wave-sizing.mjs +10 -3
- package/scripts/materialize-wave-scope.mjs +68 -14
- package/scripts/mcp-server.sh +16 -1
- package/scripts/print-applicable-rules.mjs +7 -6
- package/scripts/print-learnings-index.mjs +3 -2
- package/scripts/release.mjs +7 -2
- package/scripts/session-shape.mjs +266 -0
- package/skills/_shared/config-reading.md +15 -9
- package/skills/_shared/private-capability-context.md +89 -0
- package/skills/bootstrap/SKILL.md +60 -209
- package/skills/bootstrap/_shared-template.md +99 -14
- package/skills/bootstrap/deep-template.md +36 -26
- package/skills/bootstrap/fast-template.md +44 -8
- package/skills/bootstrap/intensity-heuristic.md +10 -4
- package/skills/bootstrap/private-contract.md +119 -0
- package/skills/bootstrap/public-fallback.md +30 -18
- package/skills/bootstrap/references/bootstrap-ecosystem-health-flow.md +48 -0
- package/skills/bootstrap/references/bootstrap-refresh-lock-flow.md +37 -0
- package/skills/bootstrap/references/bootstrap-retroactive-flow.md +108 -0
- package/skills/bootstrap/references/bootstrap-rules-fetch-bridge.md +64 -0
- package/skills/bootstrap/standard-template.md +39 -24
- package/skills/claude-md-drift-check/SKILL.md +9 -2
- package/skills/claude-md-drift-check/checker.mjs +213 -21
- package/skills/discovery/SKILL.md +6 -173
- package/skills/discovery/probes/vault-staleness.mjs +35 -5
- package/skills/discovery/probes-docs.md +8 -4
- package/skills/discovery/probes-supply-chain.md +4 -2
- package/skills/discovery/probes-ui.md +8 -4
- package/skills/discovery/probes-vault.md +12 -4
- package/skills/discovery/references/discovery-interactive-triage.md +139 -0
- package/skills/discovery/references/discovery-triage-state.md +54 -0
- package/skills/docs-orchestrator/audience-mapping.md +1 -1
- package/skills/eval/rubric-v1.md +13 -0
- package/skills/evolve/SKILL.md +2 -458
- package/skills/evolve/references/evolve-analyze-mode.md +360 -0
- package/skills/evolve/references/evolve-dialectic-mode.md +139 -0
- package/skills/gitlab-ops/SKILL.md +3 -3
- package/skills/grill/SKILL.md +1 -1
- package/skills/memory-cleanup/SKILL.md +2 -2
- package/skills/plan/mode-new.md +9 -0
- package/skills/plan/mode-retro.md +4 -3
- package/skills/reconcile/SKILL.md +11 -1
- package/skills/session-end/SKILL.md +3 -2
- package/skills/session-end/drift-operations.md +20 -5
- package/skills/session-end/metrics-collection.md +1 -0
- package/skills/session-end/phase-3-2-docs-verification.md +1 -1
- package/skills/session-end/phase-3-6-tail.md +27 -67
- package/skills/session-end/phase-3-7a-recommendations.md +2 -2
- package/skills/session-end/references/phase-2-quality-gate.md +3 -3
- package/skills/session-end/references/phase-3-documentation-updates.md +8 -6
- package/skills/session-end/references/phase-5-issue-cleanup.md +32 -1
- package/skills/session-end/session-metrics-write.md +33 -12
- package/skills/session-plan/SKILL.md +46 -180
- package/skills/session-plan/references/session-plan-task-classification.md +152 -0
- package/skills/session-plan/wave-template.md +8 -15
- package/skills/session-start/SKILL.md +41 -7
- package/skills/session-start/phase-2-5-docs-planning.md +1 -1
- package/skills/session-start/phase-8-5-express-path.md +12 -9
- package/skills/session-start/references/operations-contract.md +114 -0
- package/skills/session-start/references/phase-1-5-session-continuity.md +2 -0
- package/skills/session-start/references/phase-4-ssot-environment-check.md +42 -24
- package/skills/session-start/references/phase-6-7-memory-banner-telemetry-consent.md +3 -1
- package/skills/session-start/soul.md +2 -2
- package/skills/test-runner/SKILL.md +1 -1
- package/skills/test-runner/rubric-v1.md +2 -2
- package/skills/tmux-layout/SKILL.md +3 -1
- package/skills/ux-grill/SKILL.md +211 -0
- package/skills/ux-grill/rubric-v2.md +201 -0
- package/skills/ux-grill/soul.md +76 -0
- package/skills/wave-executor/SKILL.md +32 -127
- package/skills/wave-executor/circuit-breaker.md +3 -1
- package/skills/wave-executor/references/wave-executor-quality-gate.md +61 -0
- package/skills/wave-executor/references/wave-executor-state-init.md +86 -0
- package/skills/wave-executor/references/wave-loop-dispatch.md +12 -2
- package/skills/wave-executor/references/wave-loop-review.md +19 -6
- package/skills/wave-executor/references/wave-loop-scope-manifest.md +6 -2
- package/templates/_shared/ux-manifest.template.md +149 -0
- package/templates/nextjs-minimal/package.json +1 -1
- package/templates/node-minimal/package.json +1 -1
- package/scripts/lib/multi-provider-build/providers.mjs +0 -64
- package/scripts/lib/multi-provider-build/templating.mjs +0 -130
- package/scripts/lib/owner-config/coerce.mjs +0 -29
- package/scripts/lib/owner-config/constants.mjs +0 -21
- package/scripts/lib/owner-config/defaults.mjs +0 -50
- package/scripts/lib/owner-config/error.mjs +0 -19
- package/scripts/lib/owner-config/index.mjs +0 -13
- package/scripts/lib/owner-config/merge.mjs +0 -52
- package/scripts/lib/owner-config/validate.mjs +0 -259
- package/scripts/lib/owner-config-loader.mjs +0 -170
- package/scripts/lib/owner-config.mjs +0 -28
- package/scripts/lib/soul-resolve.mjs +0 -130
- package/scripts/lib/vault-mirror/render.mjs +0 -8
- package/templates/_shared/journey-manifest.md +0 -114
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* git-porcelain.mjs — the ONE parser for `git status --porcelain -z` output.
|
|
3
|
+
*
|
|
4
|
+
* Three consumers used to hand-roll this: `quality-gate.mjs` (hardened),
|
|
5
|
+
* `project-hygiene.mjs` (inline, R/C-aware) and `pre-dispatch-check.mjs`
|
|
6
|
+
* (non-`-z`, hand-unquoting only `\"` and `\\`, so any path carrying a TAB or a
|
|
7
|
+
* non-ASCII byte resolved to a NON-EXISTENT path — #1354). They now share this
|
|
8
|
+
* module.
|
|
9
|
+
*
|
|
10
|
+
* `-z` is not a convenience flag here — it is the only shape of this command
|
|
11
|
+
* whose paths are unambiguous. Measured 2026-08-23 (git 2.53.0) on a fixture
|
|
12
|
+
* carrying a space, a non-ASCII name, a literal `"` and a rename:
|
|
13
|
+
*
|
|
14
|
+
* ```
|
|
15
|
+
* git status --porcelain git status --porcelain -z
|
|
16
|
+
* ------------------------------ ---------------------------------
|
|
17
|
+
* M "scripts/lib/old name.mjs" M scripts/lib/old name.mjs
|
|
18
|
+
* M "scripts/lib/\303\274ml.mjs" M scripts/lib/üml.mjs
|
|
19
|
+
* ?? "scripts/lib/quo\"te.mjs" ?? scripts/lib/quo"te.mjs
|
|
20
|
+
* R old.mjs -> new.mjs R new.mjs \0 old.mjs
|
|
21
|
+
* ```
|
|
22
|
+
*
|
|
23
|
+
* The non-`-z` form C-quotes any path containing a space, a `"` or — under the
|
|
24
|
+
* default `core.quotePath=true` — a non-ASCII byte. `-c core.quotePath=false`
|
|
25
|
+
* repairs only the non-ASCII third of that (measured: the space and the `"`
|
|
26
|
+
* stayed quoted). A field-splitting parser over the non-`-z` form fails three
|
|
27
|
+
* separate ways on one input — measured `awk '{print $2}'` output for the four
|
|
28
|
+
* lines above: `"scripts/lib/old` (truncated at the space), the undecoded
|
|
29
|
+
* `\303\274` octal escape, and `old.mjs` (the PRE-rename path) for the `R`
|
|
30
|
+
* line. `-z` emits every path verbatim, so there is no unquoting step to get
|
|
31
|
+
* wrong.
|
|
32
|
+
*
|
|
33
|
+
* Rename/copy entries carry their ORIGINAL path as the NEXT NUL field, with NO
|
|
34
|
+
* `XY ` prefix. Consuming that extra field is mandatory, not optional: a naive
|
|
35
|
+
* per-field `slice(3)` would emit `.mjs`-suffixed garbage (`d.mjs` for
|
|
36
|
+
* `old.mjs`) as if it were a real path. `R`/`C` are checked in BOTH status
|
|
37
|
+
* columns because git-status(1) documents `R `/`C ` (renamed/copied in index)
|
|
38
|
+
* as well as ` R`/` C` (renamed/copied in work tree).
|
|
39
|
+
*
|
|
40
|
+
* Ceiling (BV-004): this parses **porcelain v1** (`--porcelain` / `--porcelain=v1`)
|
|
41
|
+
* with `-z`, as emitted by git ≥ 2.x — the `XY <path>` entry shape plus the
|
|
42
|
+
* bare original-path field for `R`/`C`. It also accepts the `!!` entries that
|
|
43
|
+
* `--ignored` adds and the individual-file entries `-uall` produces. It does
|
|
44
|
+
* NOT parse porcelain **v2** (`--porcelain=v2`), whose entries are
|
|
45
|
+
* space-delimited records beginning with `1`/`2`/`u`/`?`/`!`, and it does not
|
|
46
|
+
* decode C-quoting, because `-z` never emits any. Revisit trigger: the first
|
|
47
|
+
* caller that needs v2's per-entry metadata (mode bits, object ids, submodule
|
|
48
|
+
* state) or that must parse output produced without `-z`.
|
|
49
|
+
*/
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* @typedef {Object} PorcelainEntry
|
|
53
|
+
* @property {string} x first status column (index)
|
|
54
|
+
* @property {string} y second status column (work tree)
|
|
55
|
+
* @property {string} status both columns, e.g. `??`, `!!`, `R `, ` M`
|
|
56
|
+
* @property {string} path path as git emitted it (verbatim, never quoted)
|
|
57
|
+
* @property {string|null} original source path for a rename/copy, else `null`
|
|
58
|
+
*/
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Parse `git status --porcelain -z` stdout into structured entries.
|
|
62
|
+
*
|
|
63
|
+
* Malformed fields are DROPPED rather than guessed at: `XY P` is the shortest
|
|
64
|
+
* well-formed entry, so anything shorter — including the empty trailing field
|
|
65
|
+
* `split` always produces — is not an entry header, and the `[2] === ' '`
|
|
66
|
+
* check rejects a stray original-path field that a malformed stream could
|
|
67
|
+
* leave unconsumed.
|
|
68
|
+
*
|
|
69
|
+
* @param {string} raw — raw stdout of `git status --porcelain -z …`.
|
|
70
|
+
* @returns {PorcelainEntry[]} entries, in git's emission order.
|
|
71
|
+
*/
|
|
72
|
+
export function parsePorcelainEntries(raw) {
|
|
73
|
+
const fields = String(raw ?? '').split('\0');
|
|
74
|
+
/** @type {PorcelainEntry[]} */
|
|
75
|
+
const entries = [];
|
|
76
|
+
for (let i = 0; i < fields.length; i += 1) {
|
|
77
|
+
const entry = fields[i];
|
|
78
|
+
if (typeof entry !== 'string' || entry.length < 4 || entry[2] !== ' ') continue;
|
|
79
|
+
const x = entry[0];
|
|
80
|
+
const y = entry[1];
|
|
81
|
+
let original = null;
|
|
82
|
+
if (x === 'R' || x === 'C' || y === 'R' || y === 'C') {
|
|
83
|
+
i += 1;
|
|
84
|
+
const src = fields[i];
|
|
85
|
+
if (typeof src === 'string' && src) original = src;
|
|
86
|
+
}
|
|
87
|
+
entries.push({ x, y, status: `${x}${y}`, path: entry.slice(3), original });
|
|
88
|
+
}
|
|
89
|
+
return entries;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Parse `git status --porcelain -z` stdout into repo-root-relative paths.
|
|
94
|
+
*
|
|
95
|
+
* Both halves of a rename/copy are kept — a file moved OUT of a watched
|
|
96
|
+
* directory is as much a touch as one moved in, and a fixer needs the old path
|
|
97
|
+
* to make sense of the new one.
|
|
98
|
+
*
|
|
99
|
+
* Untracked DIRECTORIES are not a case this function has to handle when the
|
|
100
|
+
* caller passes `-uall`, which expands them to individual files (measured:
|
|
101
|
+
* `?? nd/` became `?? nd/a.mjs` + `?? nd/b.mjs`).
|
|
102
|
+
*
|
|
103
|
+
* @param {string} raw — raw stdout of `git status --porcelain -z …`.
|
|
104
|
+
* @returns {string[]} repo-root-relative paths, in git's emission order.
|
|
105
|
+
*/
|
|
106
|
+
export function parsePorcelainZ(raw) {
|
|
107
|
+
const paths = [];
|
|
108
|
+
for (const entry of parsePorcelainEntries(raw)) {
|
|
109
|
+
if (entry.path) paths.push(entry.path);
|
|
110
|
+
if (entry.original) paths.push(entry.original);
|
|
111
|
+
}
|
|
112
|
+
return paths;
|
|
113
|
+
}
|