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
package/docs/README.md
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
This directory holds three distinct classes of document. Knowing which class a
|
|
4
4
|
file belongs to tells you whether to trust it as current, read it as history,
|
|
5
|
-
or look for it in the (private) Meta-Vault instead.
|
|
6
|
-
(Epic #774)
|
|
5
|
+
or look for it in the (private) Meta-Vault instead. The archived, private PRD `docs/prd/2026-07-08-docs-public-split.md` <!-- path-check: historical -->
|
|
6
|
+
(Epic #774) records the sanitation project that established this split; it is kept in the private Meta-Vault.
|
|
7
7
|
|
|
8
8
|
## The three classes
|
|
9
9
|
|
|
@@ -100,11 +100,11 @@ Two things worth knowing about this split:
|
|
|
100
100
|
|
|
101
101
|
### Superseded design notes
|
|
102
102
|
|
|
103
|
-
Because `docs/specs/` is gitignored, a correction written INTO a spec can never be committed — so the correction lives here instead. `docs/specs/2026-05-26-parallel-aware-sessions-design.md` (parallel-aware sessions) specifies PID-based lock liveness (`stale-pid-dead`). That is **superseded**: liveness is heartbeat-age based since #1137 (`isLockLive`; `acquire()` knows only `stale-heartbeat`), and the recorded PID is consulted nowhere since #1151 — it was the PID of the short-lived subprocess that wrote the lock, dead within a second. Read the local spec only with that correction applied.
|
|
103
|
+
Because `docs/specs/` is gitignored, a correction written INTO a spec can never be committed — so the correction lives here instead. `docs/specs/2026-05-26-parallel-aware-sessions-design.md` (parallel-aware sessions) specifies PID-based lock liveness (`stale-pid-dead`). That is **superseded**: liveness is heartbeat-age based since #1137 (`isLockLive`; `acquire()` knows only `stale-heartbeat`), and the recorded PID is consulted nowhere since #1151 — it was the PID of the short-lived subprocess that wrote the lock, dead within a second. Read the local spec only with that correction applied. <!-- path-check: historical -->
|
|
104
104
|
|
|
105
105
|
## See Also
|
|
106
106
|
|
|
107
|
-
- `docs/prd/2026-07-08-docs-public-split.md` — the epic that established this split (S1–S8, issues #775–#782).
|
|
107
|
+
- `docs/prd/2026-07-08-docs-public-split.md` — archived in the private Meta-Vault; the epic that established this split (S1–S8, issues #775–#782). <!-- path-check: historical -->
|
|
108
108
|
- `docs/session-config-reference.md` — full Session Config field reference, including the two guards named above.
|
|
109
109
|
- `docs/pm-skills-marketplace.md` — when to install `phuryn/pm-skills` alongside this plugin, and the overlap table against `/grill`, `/brainstorm`, `/plan`, `/discovery`.
|
|
110
110
|
- `README.md` — top-level project overview; links into this router for anything docs-specific.
|
package/docs/USER-GUIDE.md
CHANGED
|
@@ -96,7 +96,7 @@ enforcement: warn
|
|
|
96
96
|
vcs: github
|
|
97
97
|
```
|
|
98
98
|
|
|
99
|
-
If you skip this step, the plugin uses sensible defaults: `feature` type, 6 agents per wave,
|
|
99
|
+
If you skip this step, the plugin uses sensible defaults: `feature` type (a fixed 3-wave shape — see [`docs/session-config-reference.md`](session-config-reference.md#session-shapes) § Session Shapes for the full per-type wave/agent-cap table), 6 agents per wave, and auto-detected VCS. See [`docs/session-config-template.md`](session-config-template.md) for the full field walkthrough.
|
|
100
100
|
|
|
101
101
|
### Run your first session
|
|
102
102
|
|
|
@@ -198,6 +198,22 @@ You can also run the bootstrap flow explicitly, outside of any session:
|
|
|
198
198
|
|
|
199
199
|
`--retroactive` is the recommended path for existing repos that predate the Bootstrap Gate — it adds the missing `CLAUDE.md` structure and lock file without touching your existing code or configuration.
|
|
200
200
|
|
|
201
|
+
### Use a configured baseline
|
|
202
|
+
|
|
203
|
+
Standard and Deep bootstrap can read the validated archetype contract from your
|
|
204
|
+
configured local baseline. Existing project markers select a matching archetype;
|
|
205
|
+
an empty or unrecognized project presents the baseline's available choices.
|
|
206
|
+
The selected contract supplies templates, runtime and package-manager versions,
|
|
207
|
+
commands, CI expectations, and required rules. Existing project files are
|
|
208
|
+
preserved and reported for review.
|
|
209
|
+
|
|
210
|
+
Configuration resolves from `SO_BASELINE_PATH`, a matching named baseline,
|
|
211
|
+
`owner.yaml` paths, then the project's `plan-baseline-path`. Lookup is offline
|
|
212
|
+
and does not install packages. An absent baseline uses the bundled public
|
|
213
|
+
templates; an invalid configured contract stops before writing files. Missing
|
|
214
|
+
quality gates are reported as unavailable. See [Baseline integration](baseline.md)
|
|
215
|
+
for the contract and configuration details.
|
|
216
|
+
|
|
201
217
|
### Anti-bureaucracy promise
|
|
202
218
|
|
|
203
219
|
- **Normal flow:** exactly 1 question (tier confirmation)
|
|
@@ -285,29 +301,47 @@ Structured requirement gathering, PRD generation, and issue creation. Accepts on
|
|
|
285
301
|
|
|
286
302
|
**Optional:** `plan-baseline-path` in Session Config (for `/plan new` repo scaffolding from your own baseline). When absent, `/bootstrap` falls back to plugin-bundled minimal templates. Not required for `/plan feature` or `/plan retro`.
|
|
287
303
|
|
|
304
|
+
**Optional private capability context:** For new-project or session planning, you can
|
|
305
|
+
supply a small catalog excerpt or authorize a particular offline, read-only local
|
|
306
|
+
catalog lookup and state that its planning destination is private/internal. The
|
|
307
|
+
planner uses at most five matches to explain reuse alternatives and remaining
|
|
308
|
+
contract checks. Existing authorization carries forward. Missing or unsuitable
|
|
309
|
+
context leaves ordinary planning available; a match does not authorize adoption.
|
|
310
|
+
Private findings stay out of public output and generated repositories. This needs
|
|
311
|
+
no new Session Config key; see the [shared procedure](../skills/_shared/private-capability-context.md).
|
|
312
|
+
|
|
288
313
|
---
|
|
289
314
|
|
|
290
315
|
## 4. Session Types
|
|
291
316
|
|
|
292
|
-
|
|
317
|
+
Wave count, roles, and per-wave agent caps are resolved by one module — `scripts/lib/session-shape.mjs` — not derived by hand from `waves`/`agents-per-wave`. Run the CLI yourself to see exactly what a given mode resolves to before starting a session:
|
|
318
|
+
|
|
319
|
+
```
|
|
320
|
+
node scripts/session-shape.mjs --repo-root "$PWD" --session-type <housekeeping|feature|deep> \
|
|
321
|
+
[--profile ultradeep] [--known-scope true|false] --no-event
|
|
322
|
+
```
|
|
323
|
+
|
|
324
|
+
It prints one JSON line (`totalWaves`, `waves[]` with each wave's `role`/`agentCap`/`maxTurns`/`verification`, `discovery`, `wavesConfigHonored`, `notes`) and, without `--no-event`, records `orchestrator.session.shape_resolved` to `.orchestrator/metrics/events.jsonl`.
|
|
325
|
+
|
|
326
|
+
### Housekeeping — the maintenance loop
|
|
293
327
|
|
|
294
328
|
Best for: git cleanup, SSOT refresh, CI fixes, branch merges, documentation updates.
|
|
295
329
|
|
|
296
|
-
- **Execution model:**
|
|
297
|
-
- **Agents:**
|
|
330
|
+
- **Execution model:** **1 coordinator-direct wave.** Housekeeping *is* the maintenance loop: drift-check → expired-learnings sweep → `/evolve analyze` → `/reconcile` → `/evolve dialectic` → `/memory-cleanup`, then any operator-selected housekeeping issues appended in the order picked. No wave-executor dispatch for the loop itself — most of those steps are `AskUserQuestion`-gated, and AUQ does not exist inside a dispatched subagent.
|
|
331
|
+
- **Agents:** 0 dispatched for the loop (the coordinator runs it directly); the dialectic step dispatches the read-only `dialectic-deriver` subagent.
|
|
298
332
|
- **Typical duration:** Short
|
|
299
|
-
- **Use when:** Your repo needs maintenance, not new features
|
|
333
|
+
- **Use when:** Your repo needs maintenance, not new features — or when the session-start `maintenance-due` banner tells you it's overdue.
|
|
300
334
|
|
|
301
335
|
```
|
|
302
336
|
/session housekeeping
|
|
303
337
|
```
|
|
304
338
|
|
|
305
|
-
### Feature
|
|
339
|
+
### Feature — 3 waves
|
|
306
340
|
|
|
307
341
|
Best for: frontend/backend feature work, implementing issues, standard development.
|
|
308
342
|
|
|
309
|
-
- **Execution model:**
|
|
310
|
-
- **Agents:** 4
|
|
343
|
+
- **Execution model:** 3 waves — Impl-Core → Impl-Polish+Quality → Finalization.
|
|
344
|
+
- **Agents:** capped at 4 / 4 / 2 respectively (subject to `agents-per-wave`).
|
|
311
345
|
- **Typical duration:** Medium
|
|
312
346
|
- **Use when:** You have feature issues to implement
|
|
313
347
|
|
|
@@ -315,12 +349,12 @@ Best for: frontend/backend feature work, implementing issues, standard developme
|
|
|
315
349
|
/session feature
|
|
316
350
|
```
|
|
317
351
|
|
|
318
|
-
### Deep
|
|
352
|
+
### Deep — 5 waves (4 when scope is already known)
|
|
319
353
|
|
|
320
354
|
Best for: complex backend work, security audits, database refactoring, architecture changes.
|
|
321
355
|
|
|
322
|
-
- **Execution model:** 5 waves
|
|
323
|
-
- **Agents:**
|
|
356
|
+
- **Execution model:** 5 waves — Discovery → Impl-Core → Impl-Polish → Quality → Finalization. When the agreed scope is already fully known (`--known-scope true`), Discovery is dropped and the rest renumbered to 4 waves.
|
|
357
|
+
- **Agents:** capped at 8 / 10 / 8 / 6 / 4 per wave respectively (subject to `agents-per-wave`).
|
|
324
358
|
- **Typical duration:** Longer
|
|
325
359
|
- **Use when:** The work requires extensive discovery, testing, or touches critical systems
|
|
326
360
|
|
|
@@ -328,6 +362,19 @@ Best for: complex backend work, security audits, database refactoring, architect
|
|
|
328
362
|
/session deep
|
|
329
363
|
```
|
|
330
364
|
|
|
365
|
+
### Ultradeep — 7 fixed waves (a profile over `deep`)
|
|
366
|
+
|
|
367
|
+
Best for: sessions that outgrow 5 waves — large audits, work needing web research before implementation, or a release that benefits from an independent review panel.
|
|
368
|
+
|
|
369
|
+
- **Execution model:** a **fixed 7-wave shape** — Research+Code-Discovery → Synthesis-Gate (coordinator-direct, 0 agents, blocking `AskUserQuestion`) → Impl-Core → Impl-Polish → Review-Panel (read-only) → Quality → Release/Finalization. It IGNORES the `waves` Session Config value outright (`wavesConfigHonored: false`) — there is no "waves < 7 is an error" check; the profile just reports that it ignored the configured number.
|
|
370
|
+
- **Agents:** capped at 18 / 0 / 8 / 8 / 3 / 6 / 4 per wave respectively; `max-turns` is set PER WAVE (40 / — / 25 / 25 / 25 / 25 / 15), not one flat number.
|
|
371
|
+
- **Typical duration:** Longest
|
|
372
|
+
- **Use when:** `/session deep` would work but the scope needs research first, or you want a dedicated review panel before Quality.
|
|
373
|
+
|
|
374
|
+
```
|
|
375
|
+
/session deep --profile ultradeep # or the /session ultradeep alias, per commands/session.md
|
|
376
|
+
```
|
|
377
|
+
|
|
331
378
|
---
|
|
332
379
|
|
|
333
380
|
## 5. Session Config Reference
|
|
@@ -372,8 +419,8 @@ Add a `## Session Config` section to your project's Session Config host file to
|
|
|
372
419
|
|
|
373
420
|
| Field | Type | Default | Description |
|
|
374
421
|
|-------|------|---------|-------------|
|
|
375
|
-
| `agents-per-wave` | integer | `6` | Maximum number of parallel subagents per wave. Higher values increase parallelism but use more resources. |
|
|
376
|
-
| `waves` | integer | `5` |
|
|
422
|
+
| `agents-per-wave` | integer | `6` | Maximum number of parallel subagents per wave. Higher values increase parallelism but use more resources. Supports the per-type override syntax `6 (deep: 18)` — see [§ 4 Session Types](#4-session-types). |
|
|
423
|
+
| `waves` | integer | `5` | Base wave count. The wave count actually used is resolved per session type by `scripts/session-shape.mjs` (see [§ 4 Session Types](#4-session-types)) — `feature` and `deep` each have one natural shape and ignore a disagreeing `waves` value; the `ultradeep` profile ignores it outright. |
|
|
377
424
|
| `pencil` | string | none | Path to a `.pen` design file (relative to project root). Enables design-code alignment reviews after Impl-Core and Impl-Polish waves. |
|
|
378
425
|
| `cross-repos` | list | none | Related repositories under `~/Projects/`. The orchestrator checks their git state and critical issues during session start. |
|
|
379
426
|
| `ssot-files` | list | none | Single Source of Truth files to track for freshness (e.g., `STATUS.md`, `STATE.md`). Flagged if older than 5 days. |
|
|
@@ -392,7 +439,7 @@ Add a `## Session Config` section to your project's Session Config host file to
|
|
|
392
439
|
| `issue-limit` | integer | `50` | Maximum issues to fetch when querying VCS during session start. |
|
|
393
440
|
| `stale-branch-days` | integer | `7` | Days of inactivity before a branch is flagged as stale. |
|
|
394
441
|
| `stale-issue-days` | integer | `30` | Days without progress before an issue is flagged for triage. |
|
|
395
|
-
| `discovery-on-close` | boolean | `
|
|
442
|
+
| `discovery-on-close` | boolean | `true` | Run discovery probes automatically during `/close`. `auto` or an absent key means `true`; set `false` explicitly for a faster close. |
|
|
396
443
|
| `discovery-probes` | list | `[all]` | Probe categories to run: `all`, `code`, `infra`, `ui`, `arch`, `session`, `audit`, `vault`, `feature`. |
|
|
397
444
|
| `discovery-exclude-paths` | list | `[]` | Glob patterns to exclude from discovery scanning (e.g., `vendor/**`, `dist/**`). |
|
|
398
445
|
| `discovery-severity-threshold` | string | `low` | Minimum severity for reported findings: `critical`, `high`, `medium`, `low`. |
|
|
@@ -414,7 +461,7 @@ Add a `## Session Config` section to your project's Session Config host file to
|
|
|
414
461
|
| `cold-start.silence-after-sessions` | integer | `1` | Consecutive silent sessions (no commits, no learnings) before the cold-start detector fires a nudge. PRD F1.3 / issue #500. |
|
|
415
462
|
| `enforcement` | string | `warn` | Hook enforcement level for scope and command restrictions: `strict`, `warn`, or `off`. |
|
|
416
463
|
| `isolation` | string | `auto` | Agent isolation mode: `worktree`, `none`, or `auto`. `auto` resolves per-wave via the graduated default (#194): ≤2 agents → `none`, 3–4 agents on feature/deep → `worktree`, ≥5 agents → `worktree`, housekeeping 3–4 → `none`. See Section 15 "Isolation Graduation" below. |
|
|
417
|
-
| `max-turns` | integer or string | `auto` | Max agent turns before PARTIAL. Auto: housekeeping
|
|
464
|
+
| `max-turns` | integer or string | `auto` | Max agent turns before PARTIAL. Auto-resolves per session shape (`scripts/lib/session-shape.mjs`): 8 for housekeeping, 15 for feature, 25 for deep — applied to every wave. The `ultradeep` profile sets it PER WAVE instead (40 for Research+Code-Discovery, 25 for Impl-Core/Impl-Polish/Quality, 15 for Release/Finalization). See [§ 4 Session Types](#4-session-types). |
|
|
418
465
|
|
|
419
466
|
> **Security:** Do not embed credentials, API keys, or auth tokens in Session Config fields — especially `health-endpoints` URLs. These values are stored in your config host file (`CLAUDE.md` / `AGENTS.md`) which may be committed to version control. Use header-based auth or separate secret management instead.
|
|
420
467
|
|
|
@@ -434,7 +481,7 @@ See [examples](examples/) for project-specific configurations (Next.js, Express
|
|
|
434
481
|
|
|
435
482
|
## 6. The Wave Pattern
|
|
436
483
|
|
|
437
|
-
Feature and deep sessions execute work in structured waves
|
|
484
|
+
Feature and deep sessions execute work in structured waves drawn from the same 5 named roles (some combined into one wave, depending on session type — see [§ 4 Session Types](#4-session-types)). Each wave has a specific purpose, and agents within a wave run in parallel.
|
|
438
485
|
|
|
439
486
|
### Wave Structure
|
|
440
487
|
|
|
@@ -448,14 +495,15 @@ Feature and deep sessions execute work in structured waves, each assigned one of
|
|
|
448
495
|
|
|
449
496
|
### Role-to-Wave Mapping
|
|
450
497
|
|
|
451
|
-
|
|
498
|
+
**As of 2026-09-09, this mapping is resolved by `scripts/session-shape.mjs` per session type — it is no longer a function of the `waves` config value.** The former table (`waves: 3/4/5/6+` → a re-combined role mapping) is retired; a `waves` value that disagrees with a type's natural shape is now IGNORED and reported in the shape's `notes`, never used to re-combine roles. See [§ 4 Session Types](#4-session-types) for the CLI, and the per-type wave lists there:
|
|
452
499
|
|
|
453
|
-
|
|
|
454
|
-
|
|
455
|
-
|
|
|
456
|
-
|
|
|
457
|
-
| 5 |
|
|
458
|
-
|
|
|
500
|
+
| Session type | Waves | Roles |
|
|
501
|
+
|---|---|---|
|
|
502
|
+
| `housekeeping` | 1 | Housekeeping (coordinator-direct maintenance loop) |
|
|
503
|
+
| `feature` | 3 | Impl-Core → Impl-Polish+Quality → Finalization |
|
|
504
|
+
| `deep` (scope not yet known) | 5 | Discovery → Impl-Core → Impl-Polish → Quality → Finalization |
|
|
505
|
+
| `deep` (scope known) | 4 | Impl-Core → Impl-Polish → Quality → Finalization |
|
|
506
|
+
| `deep` + `ultradeep` profile | 7 (fixed, ignores `waves`) | Research+Code-Discovery → Synthesis-Gate → Impl-Core → Impl-Polish → Review-Panel → Quality → Release/Finalization |
|
|
459
507
|
|
|
460
508
|
### Wave Details
|
|
461
509
|
|
|
@@ -476,13 +524,15 @@ One or two agents update SSOT files, close or update issues, write session hando
|
|
|
476
524
|
|
|
477
525
|
### Agent Counts by Session Type
|
|
478
526
|
|
|
527
|
+
These are the shape table's RAW per-wave ceilings (`agentCapRaw` in the `scripts/session-shape.mjs` JSON) — not a range the orchestrator picks within by feel:
|
|
528
|
+
|
|
479
529
|
| Session Type | Discovery | Impl-Core | Impl-Polish | Quality | Finalization |
|
|
480
530
|
|-------------|-----------|-----------|-------------|---------|-------------|
|
|
481
|
-
| housekeeping |
|
|
482
|
-
| feature |
|
|
483
|
-
| deep |
|
|
531
|
+
| housekeeping | — | — (0, coordinator-direct) | — | — | — |
|
|
532
|
+
| feature | — | 4 | 4 (combined w/ Quality) | *(combined)* | 2 |
|
|
533
|
+
| deep | 8 | 10 | 8 | 6 | 4 |
|
|
484
534
|
|
|
485
|
-
The `agents-per-wave` config
|
|
535
|
+
**The number actually used (`agentCap`) is `min(raw, agents-per-wave)`.** With the documented default `agents-per-wave: 6`, a `deep` session's Discovery/Impl-Core/Impl-Polish waves are clipped DOWN to 6 — the 8/10/8 above only apply once you raise the cap for that type, e.g. `agents-per-wave: 6 (deep: 18)` (this plugin's own committed config). `feature`'s 4/4/2 already sit under the default 6 and are unaffected by it. These are still ceilings, not targets — the orchestrator adjusts DOWN based on task complexity, per the tier guidance below.
|
|
486
536
|
|
|
487
537
|
The **Quality column is a cap, not a target**: since this version, test-writing capacity is need-gated on measured demand — roughly one test-writer per three HIGH/MED gaps the review panel actually found, capped by the number above. If no gaps were measured, the Quality wave writes no tests and is skipped (the read-only review panel still runs); with no measurement signal at all, the orchestrator allocates a conservative 1-2 rather than the full cap.
|
|
488
538
|
|
|
@@ -546,18 +596,21 @@ After you choose a direction, the orchestrator decomposes the work into a role-b
|
|
|
546
596
|
```
|
|
547
597
|
## Wave Plan (Session: feature)
|
|
548
598
|
|
|
549
|
-
|
|
550
|
-
- Agent 1: Audit API endpoint structure → src/api/ → map current routes
|
|
551
|
-
- Agent 2: Verify database schema → prisma/schema.prisma → check relations
|
|
552
|
-
...
|
|
599
|
+
A `feature` session resolves to 3 waves — no Discovery wave; see [§ 4 Session Types](#4-session-types).
|
|
553
600
|
|
|
554
|
-
### Wave
|
|
601
|
+
### Wave 1: Impl-Core (4 agents)
|
|
555
602
|
- Agent 1: Implement new API route → src/api/users.ts → endpoint returns 200
|
|
603
|
+
- Agent 2: Add database migration → prisma/schema.prisma → check relations
|
|
604
|
+
...
|
|
605
|
+
|
|
606
|
+
### Wave 2: Impl-Polish+Quality (4 agents)
|
|
607
|
+
- Agent 1: Build frontend form component → src/components/ → wired to the new route
|
|
608
|
+
- Agent 2: Write and run tests → tests/api/users.test.mjs → passing
|
|
556
609
|
...
|
|
557
610
|
|
|
558
611
|
### Inter-Wave Checkpoints
|
|
559
612
|
- After Impl-Core: Design review (Pencil configured)
|
|
560
|
-
- After Quality: Full quality gate
|
|
613
|
+
- After Impl-Polish+Quality: Full quality gate
|
|
561
614
|
|
|
562
615
|
Ready to execute? Use /go to begin.
|
|
563
616
|
```
|
|
@@ -573,13 +626,12 @@ You can request changes to the plan. When satisfied:
|
|
|
573
626
|
Waves execute automatically. Agents within each wave run in parallel. Between waves, the orchestrator reviews results, runs checks, and adapts the plan if needed. You see progress updates after each wave:
|
|
574
627
|
|
|
575
628
|
```
|
|
576
|
-
## Wave
|
|
629
|
+
## Wave 1 (Impl-Core) Complete ✓
|
|
577
630
|
- Agent 1: done — API route implemented, returns correct schema
|
|
578
631
|
- Agent 2: done — Database migration created
|
|
579
|
-
- Agent 3: done — Frontend form component built
|
|
580
632
|
- Tests: 3 new passing | TypeScript: 0 errors
|
|
581
633
|
- Design: ALIGNED
|
|
582
|
-
- Adaptations for Impl-Polish: none
|
|
634
|
+
- Adaptations for Impl-Polish+Quality: none
|
|
583
635
|
```
|
|
584
636
|
|
|
585
637
|
### Step 5: Close the session
|
|
@@ -875,7 +927,7 @@ The `/discovery` command runs systematic quality probes to find issues that don'
|
|
|
875
927
|
|
|
876
928
|
### Embedded Mode
|
|
877
929
|
|
|
878
|
-
|
|
930
|
+
Discovery runs automatically during `/close` by default (`discovery-on-close` absent, `true`, or `auto`); set `discovery-on-close: false` in Session Config to skip it. In embedded mode, critical/high findings become issues; medium/low are listed in the session report.
|
|
879
931
|
|
|
880
932
|
### Confidence Scoring
|
|
881
933
|
|
|
@@ -954,7 +1006,7 @@ Session Orchestrator persists session state so you can resume after crashes, pau
|
|
|
954
1006
|
|
|
955
1007
|
### STATE.md
|
|
956
1008
|
|
|
957
|
-
Lives at `.claude/STATE.md` in your project. Contains YAML frontmatter (`session-type`, `branch`, `issues`, `started`, `status`, `current-wave`, `total-waves`) and a Markdown body tracking the Current Wave, Wave History, and any Deviations from the plan. Written by the wave-executor after each wave; read by session-start on the next `/session` invocation.
|
|
1009
|
+
Lives at `.claude/STATE.md` in your project. Contains YAML frontmatter (`session-type`, `branch`, `issues`, `started`, `status`, `current-wave`, `total-waves`) and a Markdown body tracking the Current Wave, Wave History, and any Deviations from the plan. Written by the wave-executor after each wave; read by session-start on the next `/session` invocation. <!-- path-check: example -->
|
|
958
1010
|
|
|
959
1011
|
### Session Continuity
|
|
960
1012
|
|
|
@@ -1163,7 +1215,7 @@ Read-only display of all active learnings with confidence scores and expiry date
|
|
|
1163
1215
|
|
|
1164
1216
|
## 18. Adaptive Wave Sizing
|
|
1165
1217
|
|
|
1166
|
-
Instead of
|
|
1218
|
+
Instead of always dispatching a wave's full agent-cap ceiling, the orchestrator scores session complexity and relaxes agent allocation downward when the briefed work does not need the full cap.
|
|
1167
1219
|
|
|
1168
1220
|
### Complexity Scoring
|
|
1169
1221
|
Three factors are scored (0-2 points each):
|
|
@@ -1177,18 +1229,11 @@ Three factors are scored (0-2 points each):
|
|
|
1177
1229
|
### Complexity Tiers
|
|
1178
1230
|
- **Simple** (0-1 points): fewer agents per wave
|
|
1179
1231
|
- **Moderate** (2-3 points): standard allocation
|
|
1180
|
-
- **Complex** (4-6 points):
|
|
1232
|
+
- **Complex** (4-6 points): up to the wave's cap
|
|
1181
1233
|
|
|
1182
|
-
|
|
1183
|
-
After each wave, agent count is adjusted based on performance:
|
|
1184
|
-
- All agents fast + no issues → reduce next wave
|
|
1185
|
-
- Failures or broken code → add fix agents
|
|
1186
|
-
- Scope expansion → scale up
|
|
1187
|
-
- Quality regressions → targeted fix agents
|
|
1234
|
+
The tier score relaxes agent count **downward only** — a simple-tier session may plan fewer agents than the wave's `agentCap` where the briefed work does not fill it. It never raises the count above that cap; a moderate or complex tier does not scale it up. The cap itself comes from the resolved session shape (`waves[].agentCap`, see [`docs/session-config-reference.md`](session-config-reference.md#session-shapes) § Session Shapes) — it is not derived from the tier, and the `agents-per-wave` config value is the ceiling that cap was already built against.
|
|
1188
1235
|
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
> **Note:** Housekeeping sessions skip complexity scoring and use fixed counts.
|
|
1236
|
+
> **Note:** Housekeeping has no tier at all — it is a single coordinator-direct wave (0 dispatched agents) running the fixed maintenance loop, not a scored/scaled wave.
|
|
1192
1237
|
|
|
1193
1238
|
---
|
|
1194
1239
|
|
|
@@ -1281,7 +1326,7 @@ Yes. Between each wave, the orchestrator reviews results and can adapt the plan.
|
|
|
1281
1326
|
|
|
1282
1327
|
### How many agents run in parallel?
|
|
1283
1328
|
|
|
1284
|
-
This is controlled by the `agents-per-wave` setting in your Session Config
|
|
1329
|
+
This is controlled by the `agents-per-wave` setting in your Session Config, using the override form `6 (deep: 18)` to raise the ceiling for deep sessions specifically — see [`docs/session-config-reference.md`](session-config-reference.md#session-shapes) § Session Shapes for the full per-wave cap table. Note that a plain `deep` session's own raw wave caps top out at 10 (the Impl-Core wave) regardless of the override value configured; an override of 18 only actually binds under the `ultradeep` profile (`/session ultradeep`), whose Research+Code-Discovery wave is the one wave sized at 18. All agents within a single wave run in parallel; the orchestrator waits for all of them to complete before starting the next wave.
|
|
1285
1330
|
|
|
1286
1331
|
### Do I need Pencil?
|
|
1287
1332
|
|
|
@@ -1377,6 +1422,28 @@ If agents consistently time out during wave execution:
|
|
|
1377
1422
|
- Switch from `deep` to `feature` session type if you do not need the extra agent count
|
|
1378
1423
|
- Check that your machine has sufficient resources for parallel agent execution
|
|
1379
1424
|
|
|
1425
|
+
### Import-probe warnings and missing ESLint
|
|
1426
|
+
|
|
1427
|
+
The post-edit import probe checks edited `.mjs`, `.js`, and `.cjs` files only when the path is listed in the project's `hooks/_lib/hook-import-set.json` and the hook is enabled. It reports likely hook breakage as a warning and always exits 0. Its two checks have different coverage:
|
|
1428
|
+
|
|
1429
|
+
- **C1 — ESLint:** reports `no-undef` and fatal/parse errors. Install ESLint with the project's package manager and enable `no-undef` in the **project's ESLint configuration**; the probe does not enable that rule itself. Other lint rules remain the full lint command's responsibility.
|
|
1430
|
+
- **C2 — import:** loads allowlisted files under `scripts/lib/**` in a child process to detect errors during module loading. It does not import hook entrypoints or call exported functions. An undefined identifier reached only when a function runs can therefore escape C2 even when importing the module succeeds.
|
|
1431
|
+
|
|
1432
|
+
ESLint lookup tries these paths in order: the project's `node_modules/.bin/eslint`, the project's `node_modules/eslint/bin/eslint.js`, then the same two paths under the plugin root. A consumer installation may have no plugin development dependencies, so the project's ESLint installation matters. `SO_IMPORT_PROBE_ESLINT` overrides this search with an explicit script path; use an absolute path to the ESLint entry script. An empty or nonexistent override disables C1 **without falling back** to either installation.
|
|
1433
|
+
|
|
1434
|
+
When no ESLint is available, C1 is normally silent and only eligible C2 checks remain. For an edit that reaches the checks, `SO_IMPORT_PROBE_TRACE=1` writes `probe:eslint-unavailable` to stderr when ESLint cannot be located. This trace diagnoses unavailable ESLint; it does not diagnose every timeout or configuration failure. A timed-out ESLint or an unreadable/non-JSON report is skipped, so silence does not prove that C1 ran successfully.
|
|
1435
|
+
|
|
1436
|
+
The shipped event wiring is:
|
|
1437
|
+
|
|
1438
|
+
| Harness | Import-probe event |
|
|
1439
|
+
|---------|--------------------|
|
|
1440
|
+
| Claude Code | `PostToolUse` for edit/write tools |
|
|
1441
|
+
| Cursor | `postToolUse` and `afterFileEdit` |
|
|
1442
|
+
| Pi | `tool_result` for edit/write tools |
|
|
1443
|
+
| Codex | **Unwired:** the current Codex hook manifest has no import-probe handler |
|
|
1444
|
+
|
|
1445
|
+
Codex does not currently run this probe automatically, and reinstalling the same bundle does not add that missing handler. Use the project's normal lint and tests for verification there. Implementation: [`hooks/post-edit-import-probe.mjs`](../hooks/post-edit-import-probe.mjs); event manifests: [Claude Code](../hooks/hooks.json), [Cursor](../hooks/hooks-cursor.json), [Pi](../hooks/hooks-pi.json), [Codex](../hooks/hooks-codex.json).
|
|
1446
|
+
|
|
1380
1447
|
### Design review skipped unexpectedly
|
|
1381
1448
|
|
|
1382
1449
|
If you configured `pencil` but design reviews are not running:
|
package/docs/agent-authoring.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!-- Moved in v4.0.0 from `agents/AGENTS.md` (audit 2026-09-06 § 5A). It never was an agent: Claude Code's plugin loader registers every `agents/*.md` by directory convention and the manifest's `agents` key is additive-only, so no manifest entry could exclude it — only pseudo-frontmatter (`name: agents-authoring-spec`, `tools: Read`) kept the false registration bounded. Living under `docs/` removes the registration instead of bounding it. -->
|
|
1
|
+
<!-- Moved in v4.0.0 from `agents/AGENTS.md` (audit 2026-09-06 § 5A). It never was an agent: Claude Code's plugin loader registers every `agents/*.md` by directory convention and the manifest's `agents` key is additive-only, so no manifest entry could exclude it — only pseudo-frontmatter (`name: agents-authoring-spec`, `tools: Read`) kept the false registration bounded. Living under `docs/` removes the registration instead of bounding it. --> <!-- path-check: historical -->
|
|
2
2
|
|
|
3
3
|
# Sub-Agent Authoring Conventions (`agents/**`)
|
|
4
4
|
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
> plugin loader registers every `agents/*.md` as a dispatchable agent by
|
|
12
12
|
> directory convention, and the manifest's `agents` key is documented as
|
|
13
13
|
> *additive* ("in addition to those in the `agents/` directory"), so it cannot
|
|
14
|
-
> exclude a path. As `agents/AGENTS.md` this file was therefore a registered
|
|
14
|
+
> exclude a path. As `agents/AGENTS.md` this file was therefore a registered <!-- path-check: historical -->
|
|
15
15
|
> agent — first an unnamed one with **full tool access**, later a contained one
|
|
16
16
|
> whose pseudo-frontmatter capped `tools` at `Read`. Moving it out of the
|
|
17
17
|
> directory removes the registration rather than bounding it. The same applies
|
package/docs/baseline.md
CHANGED
|
@@ -19,7 +19,61 @@ A separate git repository (not vendored, not a submodule, not on npm) carrying:
|
|
|
19
19
|
rules are read **from the baseline**, not from this plugin, so the plugin had to
|
|
20
20
|
learn the baseline's frontmatter convention rather than the other way round.
|
|
21
21
|
|
|
22
|
-
## How
|
|
22
|
+
## How bootstrap finds it
|
|
23
|
+
|
|
24
|
+
Bootstrap resolves only explicit local configuration, in this order:
|
|
25
|
+
|
|
26
|
+
1. `SO_BASELINE_PATH`
|
|
27
|
+
2. A matching entry in the host-local `owner.yaml` `baselines` list
|
|
28
|
+
3. `owner.yaml` `paths.baseline-path`
|
|
29
|
+
4. `plan-baseline-path` in the repository's Session Config
|
|
30
|
+
|
|
31
|
+
`scripts/baseline-archetypes.mjs --repo <repo>` reuses the existing configuration
|
|
32
|
+
resolvers. Their diagnostics are contained in a bounded local process so paths
|
|
33
|
+
and private match names cannot leak through the bootstrap CLI. An absent or
|
|
34
|
+
missing directory keeps the public fallback. An existing directory with a
|
|
35
|
+
missing producer, unsupported schema, invalid metadata or unsafe source is an
|
|
36
|
+
explicit error; bootstrap does not silently switch to a public default.
|
|
37
|
+
|
|
38
|
+
The local producer is the baseline's `archetype-manifest.mjs export` CLI. Its reduced v1
|
|
39
|
+
JSON owns IDs, ordering, declarative detection signals, runtimes, package
|
|
40
|
+
managers, UI/API/deploy metadata, command documentation, quality gates, CI,
|
|
41
|
+
browser automation, and rule targets. No private package inventory or source
|
|
42
|
+
evidence is imported into the plugin. Marker inference uses exported priorities;
|
|
43
|
+
an unknown result is `insufficient-evidence`, requiring a selection from the
|
|
44
|
+
returned catalog for Standard/Deep. `--archetype <id>` validates an explicit ID.
|
|
45
|
+
|
|
46
|
+
The CLI is read-only, offline and dependency-free without a baseline. Commands
|
|
47
|
+
in its JSON are data and are never evaluated. Only the explicit scaffold action
|
|
48
|
+
in [`private-contract.md`](../skills/bootstrap/private-contract.md) invokes the
|
|
49
|
+
configured baseline's local renderer, into temporary staging. It preserves
|
|
50
|
+
existing destination files and excludes staged rules. Deep retains baseline CI
|
|
51
|
+
and its exemption/requirement instead of generating a public Node pipeline.
|
|
52
|
+
New instruction-file command slots come from exactly matching declared gate
|
|
53
|
+
IDs. Missing test/typecheck/lint gates are reported as unavailable and use
|
|
54
|
+
`false` placeholders, never inferred npm commands. Private verification reports
|
|
55
|
+
declared gates separately from unavailable slots; the generic quality runner
|
|
56
|
+
is unchanged and an unavailable slot must not be reported as a passed check.
|
|
57
|
+
|
|
58
|
+
S99 recomputes the complete exported rule union after rendering, including
|
|
59
|
+
dependency-conditional targets, and validates the baseline's local `rules`
|
|
60
|
+
projection against it. Sources must stay under `.claude/rules/` or
|
|
61
|
+
`templates/shared/.claude/rules/`, with no symlinks. All basenames owned by
|
|
62
|
+
`rules/_index.md` are excluded, including scoped entries: `rules-sync.mjs` remains
|
|
63
|
+
their sole writer. `syncBootstrapRules` passes the contract's required plugin
|
|
64
|
+
basenames to that writer after validating the local export, so a public scope
|
|
65
|
+
tag cannot silently omit a private requirement. Private S99 adds missing local rules and preserves existing
|
|
66
|
+
ones; the public opt-in fetch retains its existing remote behavior with the
|
|
67
|
+
same plugin-ownership exclusion. No baseline is downloaded or located by
|
|
68
|
+
guessing sibling/private host paths.
|
|
69
|
+
|
|
70
|
+
New private quality policies use the same exact `test`, `typecheck`, and `lint`
|
|
71
|
+
gate IDs as new Session Config blocks. Missing slots use `false` with an
|
|
72
|
+
unavailable explanation; existing owner policies remain unchanged. Bootstrap
|
|
73
|
+
accumulates actual created relative paths through inherited tiers and stages
|
|
74
|
+
those files individually.
|
|
75
|
+
|
|
76
|
+
## Legacy vault and maintenance resolution
|
|
23
77
|
|
|
24
78
|
Never by a hardcoded path. Resolution is host-local, most specific first:
|
|
25
79
|
|
package/docs/ci-setup.md
CHANGED
|
@@ -123,7 +123,7 @@ jobs, so a half-revert or a template refresh flipping one site back to
|
|
|
123
123
|
check diffs real content rather than passing on a broken comparison.
|
|
124
124
|
|
|
125
125
|
Per `.claude/rules/security.md` § SEC-005, this token's lifecycle belongs in
|
|
126
|
-
`.claude/docs/SECRETS-INVENTORY.md` once one exists — that file is not present
|
|
126
|
+
`.claude/docs/SECRETS-INVENTORY.md` once one exists — that file is not present <!-- path-check: example -->
|
|
127
127
|
in this repo (measured 2026-09-02: no `.claude/docs/` directory tracked), so
|
|
128
128
|
the inventory is not adopted here and this section remains the sole record.
|
|
129
129
|
|
package/docs/codex-setup.md
CHANGED
|
@@ -88,6 +88,14 @@ Every installer run executes `codex plugin marketplace add` and `codex plugin ad
|
|
|
88
88
|
|
|
89
89
|
After either refresh path, confirm the installed version with `codex plugin list --available --json` and start a fresh task. Reopen the skill picker and search for `go` or `close`; if the updated entries are still missing, fully restart Codex. Editing the source clone or regenerating skills alone does not refresh the installed bundle.
|
|
90
90
|
|
|
91
|
+
### Command entry points missing after an update (GH#68)
|
|
92
|
+
|
|
93
|
+
**Symptom:** the skill picker shows `session-start` but not `session`, `go`, or `close`.
|
|
94
|
+
|
|
95
|
+
**Cause:** Codex caches a plugin snapshot at install time; in our 0.153.x probes, running `codex plugin update` alone did not refresh `.codex-plugin/skills/`.
|
|
96
|
+
|
|
97
|
+
**Fix:** remove the plugin, then re-add it (the refresh steps above); verify with `codex plugin list --json` that the installed version is ≥ 4.0.1 and carries 51 skill entries. 4.0.1+ ships the generated entrypoints (`scripts/generate-codex-skills.mjs`).
|
|
98
|
+
|
|
91
99
|
The tracked Codex manifest uses a version such as `3.14.0+codex.20260717175716`. The base must match `package.json`; the `+codex.<YYYYMMDDHHmmss>` UTC suffix is the repository's explicit invalidation marker. When a shipped bundle needs a new cache identity, maintainers commit a new timestamp in `.codex-plugin/plugin.json`. The installer validates that committed value and never mutates the tracked manifest.
|
|
92
100
|
|
|
93
101
|
## Configuration
|
|
@@ -255,6 +263,7 @@ codex plugin list --available --json
|
|
|
255
263
|
- **The `kanevry` marketplace points at another source:** confirm the conflict with `codex plugin marketplace list --json`, run `codex plugin marketplace remove kanevry`, then rerun the installer from the intended clone so it performs the public marketplace add and plugin add lifecycle.
|
|
256
264
|
- **`go` or `close` is missing from the skill picker:** follow [the refresh steps](#refresh-and-explicit-cache-invalidation), verify the installed version, and restart Codex if reopening the picker does not load the new entries. Use the namespaced skill form from [Usage](#usage), rather than selecting the unrelated native Goal command.
|
|
257
265
|
- **Plugin is installed and enabled but hooks do not fire:** start a fresh task or fully restart Codex, run `/hooks`, and review the trust state. Installation does not imply hook approval.
|
|
266
|
+
- **No import-probe warning after an edit:** the post-edit import probe is currently **unwired in Codex**. Reinstalling the same bundle does not add it. Use normal project lint and tests; see [the probe's harness wiring and ESLint requirements](USER-GUIDE.md#import-probe-warnings-and-missing-eslint).
|
|
258
267
|
- **Other pre-public plugin/config/cache/hook-state residue is suspected:** this state is unsupported. Do not modify private Codex files. File an issue with `codex --version`, `codex plugin list --available --json`, and `codex plugin marketplace list --json` output so the public recovery path can be diagnosed.
|
|
259
268
|
- **Agent dispatch fails:** verify Codex multi-agent support and inspect the bundled or project-level role TOMLs.
|
|
260
269
|
- **Hooks report that Node is unavailable:** expose Node 24+ on the Codex hook PATH or set `SO_NODE_BIN` to the absolute Node executable.
|
package/docs/components.md
CHANGED
|
@@ -7,8 +7,8 @@ Detailed component inventory and architecture reference for Session Orchestrator
|
|
|
7
7
|
```mermaid
|
|
8
8
|
flowchart LR
|
|
9
9
|
USER([Operator]) -->|invokes /session| COORD[Coordinator]
|
|
10
|
-
COORD -->|reads| SK[Skills<br/>
|
|
11
|
-
COORD -->|invokes| CMD[Commands<br/>
|
|
10
|
+
COORD -->|reads| SK[Skills<br/>44 user-facing]
|
|
11
|
+
COORD -->|invokes| CMD[Commands<br/>26 slash-cmds]
|
|
12
12
|
COORD -->|dispatches| AG[Agents<br/>14 typed sub-agents]
|
|
13
13
|
AG -.->|parallel waves| W1[code-implementer]
|
|
14
14
|
AG -.-> W2[test-writer]
|
|
@@ -18,7 +18,7 @@ flowchart LR
|
|
|
18
18
|
COORD -->|writes| METRIC[.orchestrator/metrics/<br/>sessions · learnings · events]
|
|
19
19
|
```
|
|
20
20
|
|
|
21
|
-
## Skills (
|
|
21
|
+
## Skills (44 user-facing)
|
|
22
22
|
|
|
23
23
|
- **Lifecycle:** `session-start`, `session-plan`, `wave-executor`, `session-end`, `quality-gates`, `using-orchestrator`
|
|
24
24
|
- **Authoring:** `mcp-builder`, `hook-development`, `frontmatter-guard`
|
|
@@ -27,14 +27,14 @@ flowchart LR
|
|
|
27
27
|
- **Cross-session:** `evolve`, `convergence-monitoring`, `memory-cleanup`, `reconcile`, `sunset-review`, `eval`
|
|
28
28
|
- **Vault & docs:** `vault-sync`, `vault-mirror`, `docs-orchestrator`
|
|
29
29
|
- **Ecosystem:** `bootstrap`, `gitlab-ops`, `gitlab-portfolio`, `ecosystem-health`, `mode-selector`, `autopilot`, `dispatcher`, `remote-offload`, `spinout`, `npm-publish`
|
|
30
|
-
- **Testing:** `test-runner`, `playwright-driver`, `peekaboo-driver`
|
|
30
|
+
- **Testing:** `test-runner`, `playwright-driver`, `peekaboo-driver`, `ux-grill`
|
|
31
31
|
- **Content review:** `persona-panel`
|
|
32
32
|
- **Operator ergonomics:** `eli5` (plain-language restatement of the last answer)
|
|
33
33
|
- **Visualization:** `tmux-layout` (opt-in operator side-channel — [ADR-0007](adr/0007-tmux-visualization-substrate.md))
|
|
34
34
|
|
|
35
|
-
## Commands (
|
|
35
|
+
## Commands (26)
|
|
36
36
|
|
|
37
|
-
`/session`, `/go`, `/close`, `/discovery`, `/plan`, `/evolve`, `/bootstrap`, `/harness-audit`, `/autopilot`, `/repo-audit`, `/test`, `/memory-cleanup`, `/portfolio`, `/brainstorm`, `/debug`, `/persona-panel`, `/grill`, `/sunset-review`, `/templates-ack`, `/dispatcher`, `/reconcile`, `/spinout`, `/eval`, `/release`, `/eli5`.
|
|
37
|
+
`/session`, `/go`, `/close`, `/discovery`, `/plan`, `/evolve`, `/bootstrap`, `/harness-audit`, `/autopilot`, `/repo-audit`, `/test`, `/memory-cleanup`, `/portfolio`, `/brainstorm`, `/debug`, `/persona-panel`, `/grill`, `/sunset-review`, `/templates-ack`, `/dispatcher`, `/reconcile`, `/spinout`, `/eval`, `/release`, `/eli5`, `/ux-grill`.
|
|
38
38
|
|
|
39
39
|
## Agents (14 typed sub-agents)
|
|
40
40
|
|
|
@@ -56,7 +56,7 @@ Codex uses the curated six-event project subset `SessionStart`, `PreToolUse`, `P
|
|
|
56
56
|
- **Cursor:** `.cursor-plugin/plugin.json` registers canonical skills and `.mcp.json` using Cursor's native manifest format. Additional native component discovery is explicitly disabled; `scripts/cursor-install.mjs` supplies the existing command and hook adapters. The former standard root manifest was moved to prevent [Codex manifest interception](codex-setup.md#manifest-compatibility).
|
|
57
57
|
- **Pi:** `package.json` `pi` manifest, `pi/extensions/session-orchestrator.ts` bridge, `hooks/hooks-pi.json`, `scripts/pi-install.mjs`.
|
|
58
58
|
- **Portable cross-harness surface (generated, never hand-edited):** root `AGENTS.md` (byte-identical copy of `CLAUDE.md`) and `.agents/skills/<name>/SKILL.md` — mirrors carrying only spec-legal frontmatter plus a pointer body. These two surfaces are written by `scripts/generate-agents-skills.mjs` and drift-checked via its `--check` form inside `scripts/validate-plugin.mjs`. Native plugin manifests are maintained separately, with versions updated by `scripts/release.mjs`.
|
|
59
|
-
- **Scripts:** deterministic CLI tools (parse-config, run-quality-gate, validate-wave-scope, validate-plugin, token-audit, autopilot) plus shared lib under `scripts/lib/*.mjs
|
|
59
|
+
- **Scripts:** deterministic CLI tools (parse-config, run-quality-gate, validate-wave-scope, validate-plugin, token-audit, autopilot, session-shape) plus shared lib under `scripts/lib/*.mjs` — e.g. `session-shape.mjs` (the one wave-shape resolver for `/session` mode + `--profile`), `maintenance-due-banner.mjs` (the single session-start probe for the whole maintenance loop), `session-end/tail-runner.mjs` (the mechanical apply-half of Phase 3.6.4's Expired-Learnings Sweep), `issue-budget-reconcile.mjs` (close-time recorded-vs-charged cross-check), and `telemetry/pricing.mjs` (per-model USD-per-token rates for cost estimation) — all covered by the vitest suite.
|
|
60
60
|
|
|
61
61
|
## `/harness-audit` — Anthropic large-codebase rubric
|
|
62
62
|
|
|
@@ -72,7 +72,7 @@ Surface counts measured 2026-09-06 by this repo's 360° ecosystem probe (`docs/a
|
|
|
72
72
|
|
|
73
73
|
| Axis | session-orchestrator | `open-gsd/gsd-core` |
|
|
74
74
|
|---|---|---|
|
|
75
|
-
| Commands / skills / agents |
|
|
75
|
+
| Commands / skills / agents | 26 / 44 / 14 | 70 / 71 / 35 |
|
|
76
76
|
| Hook guards | 27 hook files, 10 event types | 28 hooks, incl. write / read / prompt / workflow / secret-read / agent-isolation / worktree-path guards |
|
|
77
77
|
| Cross-session learning | `/evolve` + confidence-scored `learnings.jsonl`; reconcile turns eligible learnings into PROPOSED rules an operator approves one by one | `gsd-extract-learnings`, `gsd-mempalace-*` |
|
|
78
78
|
| Harness coverage | Claude Code, Codex CLI, Cursor IDE, Pi (4) | 44 `capabilities/` directories (pi, hermes, kimi, windsurf, opencode, ollama, …) |
|
|
@@ -88,7 +88,7 @@ Both [`maestro-orchestrate`](https://github.com/josstei/maestro-orchestrate) and
|
|
|
88
88
|
|
|
89
89
|
| Axis | session-orchestrator | maestro-orchestrate |
|
|
90
90
|
|---|---|---|
|
|
91
|
-
| Execution model |
|
|
91
|
+
| Execution model | typed waves resolved from the session mode by `scripts/session-shape.mjs` (housekeeping 1 · feature 3 · deep 5 · ultradeep 7) with inter-wave quality gates and confidence-scored session-reviewer | 4-phase sequential model with parallel subagents |
|
|
92
92
|
| Runtime coverage | Claude Code + Codex CLI + Cursor IDE + Pi (4) | Gemini CLI + Claude Code + Codex + Qwen Code (4) |
|
|
93
93
|
| VCS integration | GitLab + GitHub (auto-detected); hook events + commands wire to both | Runtime-agnostic; VCS work delegated to user |
|
|
94
94
|
| Cross-session learning | Confidence-scored entries surfaced at session-start; opt-in `/evolve` review | Session archival without explicit learning extraction |
|
package/docs/cursor-setup.md
CHANGED
|
@@ -96,5 +96,6 @@ Switch freely between Claude Code, Codex, and Cursor on the same project — all
|
|
|
96
96
|
- **`/session` missing**: Confirm `.cursor/commands/session.md` exists. Reload Cursor. If this is another project, re-run `node scripts/cursor-install.mjs .`
|
|
97
97
|
- **Rules not loading**: Ensure `.cursor/rules/` exists with `.mdc` files; `000-session-orchestrator.mdc` has `alwaysApply: true`
|
|
98
98
|
- **Hooks not firing**: Confirm `.cursor/hooks.json` exists. Open Cursor Settings → Hooks. Restart Cursor if it was open during install.
|
|
99
|
+
- **No import-probe warning after an edit**: Cursor wires the probe through `postToolUse` and `afterFileEdit`; it still needs an eligible file and ESLint with the project's `no-undef` rule enabled for C1. See [import-probe coverage and ESLint troubleshooting](USER-GUIDE.md#import-probe-warnings-and-missing-eslint).
|
|
99
100
|
- **`'node' not found` in hook PATH**: See README troubleshooting. `hooks/run-node.sh` resolves Homebrew/nvm Node.
|
|
100
101
|
- **State files not created**: Check `.cursor/` is writable
|