session-orchestrator 3.16.0 → 3.17.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.
Files changed (52) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/.codex-plugin/plugin.json +1 -1
  4. package/CHANGELOG.md +25 -0
  5. package/README.md +13 -11
  6. package/docs/README.md +2 -1
  7. package/docs/components.md +2 -2
  8. package/docs/pi-setup.md +1 -1
  9. package/docs/session-config-reference.md +65 -0
  10. package/docs/session-config-template.md +27 -0
  11. package/docs/telemetry/telemetry-claims.md +204 -0
  12. package/docs/telemetry.md +158 -0
  13. package/hooks/hooks-codex.json +1 -1
  14. package/hooks/hooks.json +1 -1
  15. package/hooks/skill-invocation-telemetry.mjs +109 -10
  16. package/package.json +12 -2
  17. package/scripts/compute-grounding-injection.sh +18 -3
  18. package/scripts/dialectic-deriver.mjs +7 -2
  19. package/scripts/lib/auto-dialectic.mjs +11 -2
  20. package/scripts/lib/auto-dream.mjs +16 -5
  21. package/scripts/lib/build-live-signals.mjs +7 -4
  22. package/scripts/lib/config/context-coverage.mjs +82 -0
  23. package/scripts/lib/config/moc-staleness.mjs +98 -0
  24. package/scripts/lib/config/worktree-orphans.mjs +138 -0
  25. package/scripts/lib/config.mjs +15 -0
  26. package/scripts/lib/context-coverage-banner.mjs +223 -0
  27. package/scripts/lib/dispatcher/enumerate.mjs +151 -31
  28. package/scripts/lib/dispatcher/rank.mjs +22 -8
  29. package/scripts/lib/evolve/autonomy-verdict.mjs +5 -0
  30. package/scripts/lib/evolve/autopilot-effectiveness.mjs +54 -7
  31. package/scripts/lib/harness-audit/categories/category4.mjs +13 -2
  32. package/scripts/lib/moc-staleness-banner.mjs +267 -0
  33. package/scripts/lib/session-end/worktree-orphan-sweep.mjs +252 -0
  34. package/scripts/lib/session-schema/filters.mjs +88 -0
  35. package/scripts/lib/session-schema.mjs +1 -0
  36. package/scripts/lib/skill-health/join.mjs +35 -9
  37. package/scripts/lib/telemetry/anon-id.mjs +141 -0
  38. package/scripts/lib/telemetry/consent.mjs +299 -0
  39. package/scripts/lib/telemetry/paths.mjs +27 -0
  40. package/scripts/lib/telemetry/queue.mjs +287 -0
  41. package/scripts/lib/telemetry/schema.mjs +384 -0
  42. package/scripts/lib/telemetry/sync.mjs +312 -0
  43. package/scripts/lib/vault-status/board-writer.mjs +63 -5
  44. package/scripts/lib/vault-status/narrative-mirror.mjs +13 -7
  45. package/scripts/mcp-server.sh +15 -3
  46. package/scripts/telemetry.mjs +250 -0
  47. package/skills/npm-publish/SKILL.md +81 -0
  48. package/skills/session-end/SKILL.md +74 -1
  49. package/skills/session-start/SKILL.md +77 -1
  50. package/skills/vault-sync/SKILL.md +1 -1
  51. package/skills/vault-sync/package-lock.json +3 -3
  52. package/skills/vault-sync/validator.mjs +121 -34
@@ -7,7 +7,7 @@
7
7
  },
8
8
  "metadata": {
9
9
  "description": "Loop engineering for AI coding agents — turn ad-hoc sessions into a repeatable research → plan → wave-execute → close loop with verification gates. Runs on Claude Code, Codex CLI, Cursor, and Pi.",
10
- "version": "3.16.0"
10
+ "version": "3.17.0"
11
11
  },
12
12
  "plugins": [
13
13
  {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/claude-code-plugin-manifest.json",
3
3
  "name": "session-orchestrator",
4
- "version": "3.16.0",
4
+ "version": "3.17.0",
5
5
  "description": "Loop engineering for AI coding agents — turn ad-hoc sessions into a repeatable research → plan → wave-execute → close loop with verification gates. Runs on Claude Code, Codex CLI, Cursor, and Pi.",
6
6
  "author": {
7
7
  "name": "Bernhard Goetzendorfer",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "session-orchestrator",
3
- "version": "3.16.0+codex.20260719182053",
3
+ "version": "3.17.0+codex.20260721060103",
4
4
  "description": "Loop engineering for AI coding agents — turn ad-hoc sessions into a repeatable research → plan → wave-execute → close loop with verification gates. Runs on Claude Code, Codex CLI, Cursor, and Pi.",
5
5
  "keywords": [
6
6
  "session",
package/CHANGELOG.md CHANGED
@@ -5,6 +5,31 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [3.17.0] - 2026-07-21
9
+
10
+ Telemetry & curation release. Headline: **opt-in anonymous usage telemetry** (#841) — a
11
+ consent-gated client with anonymous IDs, a local queue, and a record_kind-generic ingest
12
+ path, off by default — alongside the **vault-curation probe trio** (#831 B2/B4/B5), the
13
+ completed abandoned-session sweep, and a review-panel/gates hardening pass. The npm
14
+ distribution line is complete: this release ships the `npm-publish` token-runbook skill
15
+ distilled from the v3.16.0 first publish (#825) plus broadened registry metadata.
16
+
17
+ ### Added
18
+
19
+ - **Opt-in anonymous usage telemetry (#841)** — `scripts/lib/telemetry/` (`anon-id`, `consent`, `queue`, `schema`, `sync`): consent-gated client with anonymous IDs and a local queue, record_kind-generic ingest, `flush()` with `ownerConfig` injection for hermetic tests. Off by default; PRD at `docs/prd/2026-07-20-anonymous-usage-telemetry.md`.
20
+ - **Vault-curation probes B2/B4/B5 (#831)** — `moc-staleness` (frontmatter-`updated:` MOC banner), `context-coverage` (registered projects missing `context.md`/`_passive.md`), `worktree-orphans` (candidates-only sweep — never deletes, PSA-003) — all opt-in via Session Config; abandoned-session sweep completed.
21
+ - **`skills/npm-publish/`** — token-based publish runbook (granular-token requirements, temp-userconfig flow, leakage gates, failure-mode table) distilled from the v3.16.0 first publish (#825).
22
+
23
+ ### Fixed
24
+
25
+ - **Review-panel findings** — base-branch injection in diff-range resolution, fail-open quality gates, torn-write `jq` invocation, inert analyzer wiring.
26
+ - **vault-sync register/mode + abandoned-session signal integrity** — register/mode vocabulary alignment, enumerate scan depth, signal-integrity guards on the abandoned-session sweep.
27
+ - **Telemetry `flush()`** — accepts `ownerConfig` injection so hermetic tests never read the host `owner.yaml`.
28
+
29
+ ### Changed
30
+
31
+ - **npm discoverability** — broadened `keywords` + explicit `bugs` field in `package.json`.
32
+
8
33
  ## [3.16.0] - 2026-07-19
9
34
 
10
35
  Hardening release. Headline: the **bold-key parser fix goes class-wide** — a shared
package/README.md CHANGED
@@ -1,7 +1,8 @@
1
1
  # Session Orchestrator
2
2
 
3
3
  [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
4
- [![Version](https://img.shields.io/badge/version-3.16.0-blue.svg)](CHANGELOG.md)
4
+ [![Version](https://img.shields.io/badge/version-3.17.0-blue.svg)](CHANGELOG.md)
5
+ [![npm](https://img.shields.io/npm/v/session-orchestrator.svg)](https://www.npmjs.com/package/session-orchestrator)
5
6
  [![Tests](https://img.shields.io/badge/tests-10%2C000%2B-brightgreen.svg)](docs/telemetry/telemetry-claims.md)
6
7
 
7
8
  Loop engineering for AI coding agents — turn ad-hoc sessions into a repeatable research → plan → wave-execute → close loop with verification gates. Runs on **Claude Code, Codex CLI, Cursor, and [Pi](docs/pi-setup.md)**.
@@ -17,7 +18,7 @@ The same skills and commands run across all four, with platform-adapted hooks an
17
18
  | **Claude Code** | `/plugin marketplace add Kanevry/session-orchestrator` then `/plugin install session-orchestrator@kanevry` (run both inside Claude Code). Also listed on the official community catalog: `/plugin install session-orchestrator@claude-community` (that catalog can lag HEAD). |
18
19
  | **Codex CLI** | `git clone https://github.com/Kanevry/session-orchestrator.git ~/Projects/session-orchestrator && cd ~/Projects/session-orchestrator && npm install && node scripts/codex-install.mjs` |
19
20
  | **Cursor IDE** | `git clone https://github.com/Kanevry/session-orchestrator.git ~/Projects/session-orchestrator && cd ~/Projects/session-orchestrator && npm install && node scripts/cursor-install.mjs /path/to/your/project` |
20
- | **Pi** | `git clone https://github.com/Kanevry/session-orchestrator.git ~/Projects/session-orchestrator && cd ~/Projects/session-orchestrator && npm install && node scripts/pi-install.mjs /path/to/your/project --settings-only` (npm path `pi install npm:session-orchestrator` lands once published — not yet available) |
21
+ | **Pi** | `pi install npm:session-orchestrator` — or dev-fallback: `git clone https://github.com/Kanevry/session-orchestrator.git ~/Projects/session-orchestrator && cd ~/Projects/session-orchestrator && npm install && node scripts/pi-install.mjs /path/to/your/project --settings-only` |
21
22
 
22
23
  For Claude Code, also install Node dependencies **once** (hooks import `zx`) and restart Claude Code:
23
24
 
@@ -65,7 +66,7 @@ Everything else is opt-in. See [`docs/session-config-template.md`](docs/session-
65
66
 
66
67
  ## What you get
67
68
 
68
- - **44 skills** for the session lifecycle (start, plan, execute, close, evolve), discovery, vault sync, MCP authoring, debugging, brainstorming, plan grilling, persona panels, cross-repo dispatch, learning→rule reconciliation, session-process eval, audits, and more
69
+ - **45 skills** for the session lifecycle (start, plan, execute, close, evolve), discovery, vault sync, MCP authoring, debugging, brainstorming, plan grilling, persona panels, cross-repo dispatch, learning→rule reconciliation, session-process eval, audits, and more
69
70
  - **24 slash commands** (`/session`, `/go`, `/close`, `/discovery`, `/plan`, `/grill`, `/evolve`, `/autopilot`, `/dispatcher`, `/reconcile`, `/eval`, `/test`, `/debug`, …)
70
71
  - **15 typed subagents** (code-implementer, test-writer, security-reviewer, session-reviewer, qa-strategist, architect-reviewer, …)
71
72
  - **10 hook event types** enforcing scope, blocking destructive commands, gating templates-first, capturing telemetry — full on Claude Code; experimental, post-hoc, or bridged on the other platforms ([Platform support](#platform-support))
@@ -126,16 +127,16 @@ The system is markdown-driven config plus a thin Node runtime — skills, comman
126
127
  - **Cross-session learning is opt-in and inspectable.** Every session writes a record; after 5+ sessions `/evolve analyze` extracts confidence-scored patterns you can read and prune. Nothing is hidden.
127
128
  - **VCS dual support, no lock-in.** Auto-detects GitLab or GitHub from your remote and drives the full lifecycle for both.
128
129
 
129
- ## Recent highlights (v3.16.0)
130
+ ## Recent highlights (v3.17.0)
130
131
 
131
- Every release is additive and backward-compatible. Highlights of the v3.16.0 line:
132
+ Every release is additive and backward-compatible. Highlights of the v3.17.0 line:
132
133
 
133
- - **Class-wide bold-key parser fix (`matchBlockHeader`)** — the `- **key:**` blind spot #823 fixed for one parser is now closed across all 34 Session-Config block parsers via a shared zero-import helper, with the inline-comment gotcha and drift-check raw-parity preserved.
134
- - **Vault-namespace de-collapse (`VAULT_CLEAR_SLUGS`)** — already-public repo slugs regain distinct vault namespaces (no more shared `redacted-repo/` bucket) while the public-mirror tracked-file scanner keeps blocking all private slugs.
135
- - **Vault board TTL self-healing** — preserved in-progress rows past the heartbeat TTL now flip to `force-closed`; narrative folders loose-match existing `01-projects/` folders instead of minting duplicates.
136
- - **Actionable freshness remediation (`/bootstrap --refresh-lock`)** — reason-aware banners plus a provenance-honest lock refresher (only two refresh fields written, original bootstrap provenance byte-identical).
134
+ - **Opt-in anonymous usage telemetry (#841)** — consent-gated client (`scripts/lib/telemetry/`) with anonymous IDs, a local queue, and record_kind-generic ingest. Off by default; nothing leaves the machine without explicit opt-in.
135
+ - **Vault-curation probes (#831 B2/B4/B5)** — MOC-staleness banner, context-coverage line, and a candidates-only worktree-orphan sweep (never deletes PSA-003), plus the completed abandoned-session sweep.
136
+ - **Review-panel & gates hardening** — base-branch injection, fail-open quality gates, torn-write `jq`, vault-sync register/mode vocabulary, and enumerate scan depth fixed in one pass.
137
+ - **npm distribution line complete** — first publish shipped (v3.16.0 on npm, #825); this line adds the `npm-publish` token-runbook skill and broadened registry metadata.
137
138
 
138
- Previous line (v3.15.0): `/eval` session-process evaluation (standard v1), out-of-scope shell-write guard, per-context `baselines:` in owner.yaml, `bash-harness-pitfalls` rule, distribution foundation (landing page + submission kit), parser/config hardening bundle.
139
+ Previous line (v3.16.0): class-wide bold-key parser fix (`matchBlockHeader`), vault-namespace de-collapse (`VAULT_CLEAR_SLUGS`), vault-board TTL self-healing, provenance-honest `/bootstrap --refresh-lock`.
139
140
 
140
141
  Full version history: [CHANGELOG.md](CHANGELOG.md).
141
142
 
@@ -208,7 +209,7 @@ What it is **not**:
208
209
 
209
210
  - **Not an official product of any agent vendor.** An independent, community-maintained project — not affiliated with, endorsed by, or sponsored by Anthropic, OpenAI, Cursor, or any agent it integrates with. (It is distributed through the Claude Code plugin marketplace, but is not an Anthropic product.)
210
211
  - **Not a replacement** for Claude Code / Codex CLI / Cursor / Pi. It is a workflow layer that runs *on top of* your existing agent — you still need one of those installed.
211
- - **Not a hosted service.** Runs locally — no server, account, or cloud component.
212
+ - **Local by default.** Runs locally — no account required. Optional, strictly opt-in anonymous usage telemetry (off until you consent; see [docs/telemetry.md](docs/telemetry.md)).
212
213
  - **No guarantee that telemetry numbers transfer to your repo.** Reported test counts and metrics describe *this* repository under its own conditions ([details](docs/telemetry/telemetry-claims.md)). Your results will vary by stack, project size, and configuration.
213
214
 
214
215
  ## Documentation
@@ -218,6 +219,7 @@ What it is **not**:
218
219
  - [Components & Reference](docs/components.md) — full skill/command/agent/hook inventory, repository anatomy, comparisons
219
220
  - [Plugin Architecture (v3)](docs/plugin-architecture-v3.md) — contributor guide, layering, hook anatomy, testing
220
221
  - [Migration to v3](docs/migration-v3.md) — upgrade path from v2.x, known issues, rollback
222
+ - [Telemetry](docs/telemetry.md) — what the optional opt-in usage telemetry collects, and how to turn it off
221
223
  - [Telemetry claims](docs/telemetry/telemetry-claims.md) — how reported metrics are measured, and why they may not transfer
222
224
  - [Example Configs](docs/examples/) — Session Config examples for Next.js, Express, Swift
223
225
  - [CHANGELOG.md](CHANGELOG.md) — version history
package/docs/README.md CHANGED
@@ -91,7 +91,8 @@ Two things worth knowing about this split:
91
91
  | `docs/examples/` | Living reference | Example Session Config blocks per project shape (Express API, integration test, Next.js, Swift/iOS). |
92
92
  | `docs/recipes/` | Living reference | Narrow how-to write-ups for a specific recurring pattern (e.g. the quality-gate container test-runner pattern). |
93
93
  | `docs/templates/` | Living reference | Copy-paste config snippets referenced directly by the setup guides (e.g. the `AGENTS.md` Session Config template). |
94
- | `docs/telemetry/` | Living reference | `telemetry-claims.md` provenance/methodology notes for cross-repo telemetry numbers cited elsewhere in the docs. |
94
+ | `docs/telemetry.md` (root) | Living reference | Public transparency page for the opt-in usage-telemetry client exact field list, kill switches, consent precedence, retention. |
95
+ | `docs/telemetry/` | Living reference | `telemetry-claims.md` — provenance/methodology notes for cross-repo telemetry numbers cited elsewhere in the docs (a separate, local-corpus data flow from the opt-in client telemetry above). |
95
96
  | `docs/adr/` | Public decision history | Architecture Decision Records — permanent, never archived, cited externally. |
96
97
  | `docs/prd/` | Active work document | PRDs of currently open epics only. Auto-archived to the Meta-Vault on epic close. |
97
98
  | `docs/plans/` | Active work document | `/write-executable-plan` artifacts for in-progress work. May not exist when nothing is mid-plan. |
@@ -18,7 +18,7 @@ flowchart LR
18
18
  COORD -->|writes| METRIC[.orchestrator/metrics/<br/>sessions · learnings · events]
19
19
  ```
20
20
 
21
- ## Skills (44 user-facing)
21
+ ## Skills (45 user-facing)
22
22
 
23
23
  - **Lifecycle:** `session-start`, `session-plan`, `wave-executor`, `session-end`, `quality-gates`, `using-orchestrator`
24
24
  - **Authoring:** `skill-creator`, `mcp-builder`, `hook-development`, `frontmatter-guard`
@@ -26,7 +26,7 @@ flowchart LR
26
26
  - **Architecture:** `architecture`, `domain-model`, `ubiquitous-language`
27
27
  - **Cross-session:** `evolve`, `convergence-monitoring`, `memory-cleanup`, `reconcile`, `sunset-review`, `eval`
28
28
  - **Vault & docs:** `vault-sync`, `vault-mirror`, `daily`, `docs-orchestrator`
29
- - **Ecosystem:** `bootstrap`, `gitlab-ops`, `gitlab-portfolio`, `ecosystem-health`, `mode-selector`, `autopilot`, `dispatcher`, `spinout`
29
+ - **Ecosystem:** `bootstrap`, `gitlab-ops`, `gitlab-portfolio`, `ecosystem-health`, `mode-selector`, `autopilot`, `dispatcher`, `spinout`, `npm-publish`
30
30
  - **Testing:** `test-runner`, `playwright-driver`, `peekaboo-driver`
31
31
  - **Content review:** `persona-panel`
32
32
  - **Visualization:** `tmux-layout` (opt-in operator side-channel — [ADR-0007](adr/0007-tmux-visualization-substrate.md))
package/docs/pi-setup.md CHANGED
@@ -16,7 +16,7 @@ Guide for using Session Orchestrator with [Pi](https://pi.dev/docs/latest).
16
16
  pi install npm:session-orchestrator
17
17
  ```
18
18
 
19
- This is the primary install path once the package has been published to npm and indexed by the [Pi packages gallery](https://pi.dev/packages) via its `pi-package` keyword — no local checkout required. Not yet available: the package has not been published to npm yet (see `docs/distribution/npm-publish-checklist.md` for the operator publish runbook). Until then, use one of the dev-fallback options below.
19
+ This is the primary install path the package is published to npm (since v3.16.0, 2026-07-19) and carries the `pi-package` keyword for the [Pi packages gallery](https://pi.dev/packages) index; no local checkout required. The dev-fallback options below remain available for working against a local checkout.
20
20
 
21
21
  ### Option 2: Project-local registration (dev fallback)
22
22
 
@@ -785,6 +785,71 @@ docs-staleness:
785
785
 
786
786
  **Used by:** `skills/discovery/probes/docs-staleness.mjs` (`runProbe`), `scripts/lib/config/docs-staleness.mjs` (`_parseDocsStaleness`). Writes one JSONL summary record per run to `.orchestrator/metrics/docs-staleness.jsonl`. See `docs/README.md` for the living-vs-archived docs classification this probe enforces.
787
787
 
788
+ ## MOC Staleness (#831/B2)
789
+
790
+ Opt-in session-start banner probe for Obsidian "map of content" index notes — `<vault>/08-topics/*-moc.md` whose frontmatter `updated:` is older than the threshold. Complements `vault-staleness` (which covers project narratives) by covering the topic index layer. Rendered at session-start Phase 4 alongside the other banners; never blocks a session.
791
+
792
+ ```yaml
793
+ moc-staleness:
794
+ # Parser gotcha: this key line must carry NO inline comment.
795
+ enabled: false # opt-in
796
+ thresholds:
797
+ moc: 90 # days — frontmatter `updated:` staleness threshold
798
+ mode: warn # warn | off
799
+ ```
800
+
801
+ | Field | Type | Default | Description |
802
+ |-------|------|---------|-------------|
803
+ | `moc-staleness.enabled` | boolean | `false` | Must be explicitly `true` to activate. The gate fails CLOSED — a missing block, a missing `enabled` key, or an omitted `config` argument all return `null` before any filesystem I/O. |
804
+ | `moc-staleness.thresholds.moc` | integer (days) | `90` | Age threshold measured against frontmatter `updated:`. Non-numeric or non-positive values fall back to the default. |
805
+ | `moc-staleness.mode` | string | `warn` | `warn` \| `off`. A malformed value falls back to `warn`. |
806
+
807
+ A MOC whose `updated:` is **missing or unparseable is deliberately EXCLUDED**, not reported as stale — the corrective action there is "fix the frontmatter", not the banner's own hint. Same rule as `scripts/lib/peer-cards/staleness-banner.mjs`.
808
+
809
+ **Used by:** `scripts/lib/moc-staleness-banner.mjs` (`checkMocStaleness`), `scripts/lib/config/moc-staleness.mjs` (`_parseMocStaleness`). Wired at `skills/session-start/SKILL.md` Phase 4.
810
+
811
+ ## Context Coverage (#831/B4)
812
+
813
+ Opt-in session-start coverage banner: registered `<vault>/01-projects/<slug>/` folders that carry **neither** `context.md` nor `_passive.md`. A project counts as *registered* iff its folder contains `_overview.md` — the same convention `discoverVaultRepos()` uses (`scripts/lib/gitlab-portfolio/vcs-detect.mjs`). Folders lacking `_overview.md` are never counted and never reported as gaps.
814
+
815
+ ```yaml
816
+ context-coverage:
817
+ # Parser gotcha: this key line must carry NO inline comment.
818
+ enabled: false # opt-in
819
+ mode: warn # warn | off
820
+ ```
821
+
822
+ | Field | Type | Default | Description |
823
+ |-------|------|---------|-------------|
824
+ | `context-coverage.enabled` | boolean | `false` | Must be explicitly `true` to activate. Fails CLOSED, as above. |
825
+ | `context-coverage.mode` | string | `warn` | `warn` \| `off`. A malformed value falls back to `warn`. |
826
+
827
+ **Used by:** `scripts/lib/context-coverage-banner.mjs` (`checkContextCoverage`), `scripts/lib/config/context-coverage.mjs` (`_parseContextCoverage`). Wired at `skills/session-start/SKILL.md` Phase 4.
828
+
829
+ ## Worktree Orphans (#831/B5)
830
+
831
+ Opt-in session-end sweep (Phase 4b) identifying git worktree branches with **0 commits ahead of the base branch** — leftovers from finished sessions. The module **proposes; it never disposes**: it returns `candidates` and the coordinator renders the removal AUQ. Nothing is removed without explicit operator confirmation (PSA-003).
832
+
833
+ ```yaml
834
+ worktree-orphans:
835
+ # Parser gotcha: this key line must carry NO inline comment.
836
+ enabled: false # opt-in
837
+ base-branch: main # ref the ahead-count is measured against
838
+ mode: warn # warn | off
839
+ ```
840
+
841
+ | Field | Type | Default | Description |
842
+ |-------|------|---------|-------------|
843
+ | `worktree-orphans.enabled` | boolean | `false` | Must be explicitly `true` to activate. Fails CLOSED — a repo that never opted in pays no git invocation. |
844
+ | `worktree-orphans.base-branch` | string | `main` | Ref the ahead-count is measured against. **Validated:** a value beginning with `-`, or containing whitespace or shell metacharacters, is rejected and falls back to `main`. |
845
+ | `worktree-orphans.mode` | string | `warn` | `warn` \| `off`. A malformed value falls back to `warn`. |
846
+
847
+ **Why `base-branch` is validated rather than passed through.** It reaches an argv position in `git rev-list --count <base>..<branch>`. A value shaped like a git flag (e.g. `--glob=refs/heads/*`) is parsed as an OPTION rather than a revision range, exits 0, and prints `0` — silently marking **every** worktree as a 0-ahead orphan and offering the operator a deletion prompt for worktrees full of live work. The conservative default does not catch it, because `0` parses fine. Defence is two-layer: the parser rejects leading-dash values, and the sink passes `--end-of-options` so any surviving payload becomes a hard git error. This makes `base-branch` a **fifth command-influencing Session Config surface** beyond the four listed in `.claude/rules/security.md` § "Session Config Command Trust" — and unlike those, no attacker is required: a typo reaches the same outcome.
848
+
849
+ A worktree holding uncommitted, staged or untracked work is **never** a candidate — `isWorktreeClean()` (the Phase 4a helper) is consulted first, and any git error while checking excludes the worktree conservatively.
850
+
851
+ **Used by:** `scripts/lib/session-end/worktree-orphan-sweep.mjs` (`checkWorktreeOrphans`), `scripts/lib/config/worktree-orphans.mjs` (`_parseWorktreeOrphans`, `_isSafeBaseBranch`). Wired at `skills/session-end/SKILL.md` Phase 4b.
852
+
788
853
  ## Docs Orchestrator
789
854
 
790
855
  Opt-in configuration for the `docs-orchestrator` skill, which generates audience-split documentation (User / Dev / Vault) within sessions (see `skills/docs-orchestrator/SKILL.md`). When enabled, session-start runs a Phase 2.5 docs-context step, session-plan assigns a Docs role, and session-end runs a Phase 3.2 gap-reporting step. The `docs-writer` agent is made available automatically when `enabled: true`.
@@ -466,6 +466,21 @@ docs-staleness:
466
466
  mode: warn # strict | warn | off
467
467
  thresholds:
468
468
  living: 90 # days — single tier; severity escalates at 1×/2×/3× threshold
469
+ moc-staleness:
470
+ # Parser gotcha: this key line must carry NO inline comment.
471
+ enabled: false # opt-in — <vault>/08-topics/*-moc.md staleness banner (session-start Phase 4)
472
+ thresholds:
473
+ moc: 90 # days — frontmatter `updated:` threshold; missing/unparseable is EXCLUDED, not reported
474
+ mode: warn # warn | off
475
+ context-coverage:
476
+ # Parser gotcha: this key line must carry NO inline comment.
477
+ enabled: false # opt-in — registered 01-projects/ folders lacking context.md AND _passive.md
478
+ mode: warn # warn | off
479
+ worktree-orphans:
480
+ # Parser gotcha: this key line must carry NO inline comment.
481
+ enabled: false # opt-in — session-end Phase 4b sweep; CANDIDATES ONLY, never auto-deletes (PSA-003)
482
+ base-branch: main # validated — a leading-dash value is rejected and falls back to main
483
+ mode: warn # warn | off
469
484
  ```
470
485
 
471
486
  Read by: `skills/discovery/probes/docs-staleness.mjs`, `scripts/lib/config/docs-staleness.mjs`.
@@ -820,6 +835,18 @@ docs-staleness:
820
835
  mode: warn
821
836
  thresholds:
822
837
  living: 90
838
+ moc-staleness:
839
+ enabled: false
840
+ thresholds:
841
+ moc: 90
842
+ mode: warn
843
+ context-coverage:
844
+ enabled: false
845
+ mode: warn
846
+ worktree-orphans:
847
+ enabled: false
848
+ base-branch: main
849
+ mode: warn
823
850
 
824
851
  # CLAUDE.md drift check
825
852
  drift-check:
@@ -0,0 +1,204 @@
1
+ # Telemetry Claims — Provenance & Methodology
2
+
3
+ > **Not the opt-in usage-telemetry client.** This document explains the
4
+ > methodology behind the maintainer's **local, private** metrics aggregates
5
+ > (`.orchestrator/metrics/*.jsonl`, gitignored by design) used in marketing
6
+ > copy such as "645 orchestrated sessions." It is a separate data flow from
7
+ > the plugin's optional, strictly opt-in anonymous usage-telemetry client —
8
+ > see [docs/telemetry.md](../telemetry.md) for what that client collects,
9
+ > its kill switches, and where the data goes.
10
+
11
+ > Cross-repo aggregate over the maintainer's private session corpus as of 2026-06.
12
+ > Not independently auditable: the per-session records this aggregate is computed
13
+ > from are gitignored (privacy by default). This is a **snapshot, not a live
14
+ > counter** — re-running the math on a later date yields different numbers.
15
+
16
+ _As-of: 2026-06 (maintainer-reported)_
17
+
18
+ This document explains the telemetry figures used in public-facing material (e.g.
19
+ agenticbuilders.at) so the claim is verifiable in *method* even though the
20
+ absolute owner numbers cannot be reproduced from any public artifact. No marketing
21
+ copy lives here — only what each number means, where it comes from, and how it is
22
+ derived.
23
+
24
+ ---
25
+
26
+ ## Headline claim
27
+
28
+ > **645 orchestrated sessions · 1,680 documented learnings · 7,700+ agent runs
29
+ > (98.8% cleanly completed) · up to 34 parallel agents · 17 repos · as of 2026-06**
30
+
31
+ Every figure above is a **cross-repo aggregate** computed over the local,
32
+ **gitignored** JSONL metric files of several of the maintainer's private repos:
33
+
34
+ ```
35
+ .orchestrator/metrics/sessions.jsonl
36
+ .orchestrator/metrics/learnings.jsonl
37
+ .orchestrator/metrics/subagents.jsonl
38
+ .orchestrator/metrics/events.jsonl
39
+ ```
40
+
41
+ These files are listed in `.gitignore` by design (privacy by default). No public
42
+ commit, release, or CI artifact contains them, so the headline totals are
43
+ **maintainer-reported** and not independently auditable. What *is* reproducible is
44
+ the measurement recipe — see [Reproduce it yourself](#reproduce-it-yourself).
45
+
46
+ ---
47
+
48
+ ## Claims table
49
+
50
+ | Claim | Source file | What one record means | How aggregated | As-of |
51
+ | --- | --- | --- | --- | --- |
52
+ | 645 orchestrated sessions | `sessions.jsonl` | 1 line = 1 complete `/session` -> `/close` cycle | `wc -l` summed across all contributing repos | 2026-06 |
53
+ | 1,680 documented learnings | `learnings.jsonl` | 1 line = 1 extracted, confidence-scored learning (written by `/evolve`) | `wc -l` summed across repos | 2026-06 |
54
+ | 7,700+ agent runs | `subagents.jsonl` | 1 dispatched subagent run (see note below on `start`/`stop` pairing) | `wc -l` (or `start`-event count) summed across repos | 2026-06 |
55
+ | 98.8% cleanly completed | `subagents.jsonl` (+ `events.jsonl`) | completion status of a dispatched run | completed runs / total dispatched runs — *maintainer-reported, see methodology* | 2026-06 |
56
+ | up to 34 parallel agents | `subagents.jsonl` / `events.jsonl` | peak count of agents dispatched concurrently | max over time-windowed `start`/`stop` overlap | 2026-06 |
57
+ | 17 repos | n/a (corpus scope) | a repo that contributed at least one `sessions.jsonl` line | count of contributing repos | 2026-06 |
58
+
59
+ ---
60
+
61
+ ## In-repo test suite — the "10,000+ tests" badge
62
+
63
+ Distinct from the private-corpus figures above, the README **Tests** badge and the
64
+ "10,000+ vitest tests run on every commit" line count **this repository's own test
65
+ suite** — a **public, CI-verifiable** number, not a maintainer-reported aggregate.
66
+
67
+ | Claim | What it counts | How measured | As-of |
68
+ | --- | --- | --- | --- |
69
+ | 10,000+ vitest tests | executed test cases across `tests/**/*.test.mjs` | `npm test` prints the exact runtime total; the static floor is countable without running the suite (below) | 2026-06 |
70
+
71
+ Both numbers reproduce in a fresh checkout:
72
+
73
+ ```bash
74
+ find tests -name '*.test.mjs' | wc -l # test files -> 475
75
+ grep -rohE '\b(it|test)\(' tests | wc -l # static test defs -> ~9,871
76
+ grep -rohE '\b(it|test|describe)\.each\b' tests | wc -l # parameterized blocks -> 93
77
+ ```
78
+
79
+ The static `it(` / `test(` count (~9,871 across 475 files) is a **floor**: the 93
80
+ `it.each` / `test.each` parameterized blocks each expand to multiple executed cases
81
+ at runtime, so the **case count vitest reports on `npm test` is 10,000+**. Unlike the
82
+ private-corpus figures above, this one is fully auditable — run `npm test` in this
83
+ checkout and read vitest's summary line.
84
+
85
+ ## Methodology
86
+
87
+ ### Session / learning / agent-run counts
88
+
89
+ Each total is the sum of `wc -l` over the corresponding JSONL file across every
90
+ contributing repo:
91
+
92
+ ```bash
93
+ # per repo, then summed by hand across the corpus
94
+ wc -l .orchestrator/metrics/sessions.jsonl # -> orchestrated sessions
95
+ wc -l .orchestrator/metrics/learnings.jsonl # -> documented learnings
96
+ wc -l .orchestrator/metrics/subagents.jsonl # -> agent-run records
97
+ ```
98
+
99
+ The JSONL format is append-only (one JSON object per line), so a line count is a
100
+ faithful event count. There is no de-duplication step across repos — each repo
101
+ contributes its own disjoint slice.
102
+
103
+ ### "Up to 34 parallel agents"
104
+
105
+ This is the **peak** number of agents dispatched at the same time, not an average.
106
+ It is read off the time windows in `subagents.jsonl` / `events.jsonl`: each agent
107
+ run has a `start` and a `stop` record with timestamps; the peak is the maximum
108
+ number of runs whose `[start, stop]` intervals overlap at any instant. Structurally
109
+ this equals `agents-per-wave x concurrently-running waves` at the busiest moment of
110
+ the busiest session. The session config governing fan-out (`agents-per-wave`,
111
+ `waves`) lives in each repo's `CLAUDE.md` Session Config block.
112
+
113
+ > **Note (2026-07-03, refs #724):** the small-batch dispatch default (3–4 `Agent()`
114
+ > calls per message, `wave-loop.md § Dispatch Agents`) structurally lowers future
115
+ > instantaneous peaks — agents within a wave now start in staggered batches rather
116
+ > than a single simultaneous fan-out, so the overlapping-interval peak trends below
117
+ > the historical `agents-per-wave × waves` ceiling this figure was read off.
118
+
119
+ ### "98.8% cleanly completed"
120
+
121
+ Defined as **runs that completed cleanly / all dispatched runs**, where a clean
122
+ completion is a run that reached its terminal `stop` with a `complete` status (as
123
+ opposed to `spiral`- or `failed`-classified outcomes the orchestrator records for
124
+ runs that loop or error out). This ratio is **maintainer-reported**: it is computed
125
+ over the owner's full private corpus, and the exact per-run status classification
126
+ is not present in every repo's local slice.
127
+
128
+ > **Caveat (verified against this repo's own slice):** in *this* public repo,
129
+ > `subagents.jsonl` records only `event: "start"` / `event: "stop"` markers (no
130
+ > per-run `status` field). The completion percentage therefore cannot be
131
+ > re-derived from this repo alone; it is an attribute of the owner's larger
132
+ > private corpus and is labelled maintainer-reported accordingly.
133
+
134
+ ---
135
+
136
+ ## Reproduce it yourself
137
+
138
+ Skeptics cannot reproduce the *owner's absolute totals* (the source records are
139
+ gitignored), but the **measurement pattern is fully reproducible** on your own
140
+ machine. After running N of your own sessions:
141
+
142
+ ```bash
143
+ wc -l .orchestrator/metrics/sessions.jsonl # your orchestrated sessions
144
+ wc -l .orchestrator/metrics/learnings.jsonl # your documented learnings
145
+ wc -l .orchestrator/metrics/subagents.jsonl # your agent runs
146
+ ```
147
+
148
+ Each command returns *your* numbers using the exact same definitions in the claims
149
+ table above. As a worked example, this very repo's local slice at the time of
150
+ writing reports:
151
+
152
+ ```
153
+ 29 .orchestrator/metrics/sessions.jsonl
154
+ 97 .orchestrator/metrics/learnings.jsonl
155
+ 1796 .orchestrator/metrics/subagents.jsonl
156
+ ```
157
+
158
+ (maintainer-reported, verifiable by running the commands above in this checkout).
159
+ The point is that the *method* is transparent and runs identically everywhere; only
160
+ the maintainer's aggregate magnitude stays private.
161
+
162
+ ---
163
+
164
+ ## Framing & limits
165
+
166
+ These figures are the **maintainer's own telemetry**. They are **not** Anthropic
167
+ benchmarks, not Anthropic-published limits, and not a claim about what Claude or any
168
+ model "can do" in general. They describe how this orchestrator was operated across
169
+ one maintainer's private repos.
170
+
171
+ In particular, **Anthropic does not document a hard parallel-agent limit**; the
172
+ "up to 34 parallel agents" figure is an observed peak of *this* tooling's fan-out,
173
+ not a platform ceiling. For readers who want vendor-side context on multi-agent
174
+ cost and design (cited only for orientation, not as a source for the numbers
175
+ above):
176
+
177
+ - Multi-agent token cost — "agents typically use about 4x more tokens than chat
178
+ interactions, and multi-agent systems use about 15x more tokens." Anthropic,
179
+ *How we built our multi-agent research system* (2025-06-13).
180
+ <https://www.anthropic.com/engineering/built-multi-agent-research-system>
181
+ - The orchestrator-workers pattern this tool implements is described in Anthropic,
182
+ *Building effective agents* (2024-12-19).
183
+ <https://www.anthropic.com/engineering/building-effective-agents>
184
+
185
+ No other Anthropic claims are made or implied here.
186
+
187
+ ---
188
+
189
+ ## Privacy
190
+
191
+ What is **never published** from the source corpus:
192
+
193
+ - Absolute filesystem paths
194
+ - Hostnames (`.local` / `.lan` / `.internal`, etc.)
195
+ - Repository names and VCS URLs (org/repo paths)
196
+ - Prompts, session contents, or any free-form text
197
+ - Emails, git-author identities, tokens, IP addresses
198
+
199
+ Only aggregate counts and definitions leave the private corpus. This mirrors the
200
+ anonymization pattern already enforced for shared learnings by
201
+ `scripts/export-hw-learnings.mjs` (see also hardware-patterns; vault-archived; regenerated via `npm run share:hw-learnings`),
202
+ which strips paths, IPs, VCS URLs, hostnames, emails, git authors, and token-shaped
203
+ strings, and exports only structured fields — never free-form user text. The same
204
+ "counts out, records stay home" principle applies to every figure in this document.