session-orchestrator 3.22.0 → 3.23.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 (268) 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/.cursor/commands/autopilot-multi.md +14 -0
  5. package/.cursor/commands/autopilot.md +14 -0
  6. package/.cursor/commands/bootstrap.md +14 -0
  7. package/.cursor/commands/brainstorm.md +14 -0
  8. package/.cursor/commands/close.md +13 -0
  9. package/.cursor/commands/contract-version-bump.md +14 -0
  10. package/.cursor/commands/debug.md +14 -0
  11. package/.cursor/commands/discovery.md +14 -0
  12. package/.cursor/commands/dispatcher.md +14 -0
  13. package/.cursor/commands/eli5.md +14 -0
  14. package/.cursor/commands/eval.md +14 -0
  15. package/.cursor/commands/evolve.md +14 -0
  16. package/.cursor/commands/go.md +14 -0
  17. package/.cursor/commands/grill.md +14 -0
  18. package/.cursor/commands/harness-audit.md +13 -0
  19. package/.cursor/commands/journey-audit.md +14 -0
  20. package/.cursor/commands/memory-cleanup.md +14 -0
  21. package/.cursor/commands/persona-panel.md +14 -0
  22. package/.cursor/commands/plan.md +14 -0
  23. package/.cursor/commands/portfolio.md +14 -0
  24. package/.cursor/commands/reconcile.md +14 -0
  25. package/.cursor/commands/release.md +14 -0
  26. package/.cursor/commands/repo-audit.md +13 -0
  27. package/.cursor/commands/session.md +14 -0
  28. package/.cursor/commands/spinout.md +14 -0
  29. package/.cursor/commands/sunset-review.md +14 -0
  30. package/.cursor/commands/templates-ack.md +14 -0
  31. package/.cursor/commands/test.md +14 -0
  32. package/.cursor/hooks.json +60 -0
  33. package/.cursor/rules/000-session-orchestrator.mdc +8 -0
  34. package/.cursor/rules/010-session-workflow.mdc +9 -1
  35. package/.cursor/rules/020-quality-gates.mdc +1 -1
  36. package/.cursor/rules/030-wave-execution.mdc +1 -1
  37. package/.cursor/rules/050-plan.mdc +2 -2
  38. package/.cursor/rules/070-gitlab-ops.mdc +73 -57
  39. package/.cursor/rules/080-ecosystem-health.mdc +7 -7
  40. package/.cursor/skills/architecture/SKILL.md +13 -0
  41. package/.cursor/skills/autopilot/SKILL.md +12 -0
  42. package/.cursor/skills/bootstrap/SKILL.md +12 -0
  43. package/.cursor/skills/brainstorm/SKILL.md +13 -0
  44. package/.cursor/skills/claude-md-drift-check/SKILL.md +13 -0
  45. package/.cursor/skills/contract-version-bump/SKILL.md +12 -0
  46. package/.cursor/skills/convergence-monitoring/SKILL.md +12 -0
  47. package/.cursor/skills/daily/SKILL.md +12 -0
  48. package/.cursor/skills/debug/SKILL.md +13 -0
  49. package/.cursor/skills/discovery/SKILL.md +13 -0
  50. package/.cursor/skills/dispatcher/SKILL.md +13 -0
  51. package/.cursor/skills/docs-orchestrator/SKILL.md +13 -0
  52. package/.cursor/skills/domain-model/SKILL.md +13 -0
  53. package/.cursor/skills/ecosystem-health/SKILL.md +13 -0
  54. package/.cursor/skills/eli5/SKILL.md +13 -0
  55. package/.cursor/skills/eval/SKILL.md +12 -0
  56. package/.cursor/skills/evolve/SKILL.md +13 -0
  57. package/.cursor/skills/frontmatter-guard/SKILL.md +13 -0
  58. package/.cursor/skills/gitlab-ops/SKILL.md +13 -0
  59. package/.cursor/skills/gitlab-portfolio/SKILL.md +13 -0
  60. package/.cursor/skills/grill/SKILL.md +13 -0
  61. package/.cursor/skills/hook-development/SKILL.md +13 -0
  62. package/.cursor/skills/journey-audit/SKILL.md +13 -0
  63. package/.cursor/skills/mcp-builder/SKILL.md +13 -0
  64. package/.cursor/skills/memory-cleanup/SKILL.md +12 -0
  65. package/.cursor/skills/mode-selector/SKILL.md +13 -0
  66. package/.cursor/skills/npm-publish/SKILL.md +12 -0
  67. package/.cursor/skills/peekaboo-driver/SKILL.md +13 -0
  68. package/.cursor/skills/persona-panel/SKILL.md +12 -0
  69. package/.cursor/skills/plan/SKILL.md +13 -0
  70. package/.cursor/skills/playwright-driver/SKILL.md +13 -0
  71. package/.cursor/skills/quality-gates/SKILL.md +13 -0
  72. package/.cursor/skills/reconcile/SKILL.md +12 -0
  73. package/.cursor/skills/repo-audit/SKILL.md +13 -0
  74. package/.cursor/skills/session-end/SKILL.md +13 -0
  75. package/.cursor/skills/session-plan/SKILL.md +13 -0
  76. package/.cursor/skills/session-start/SKILL.md +13 -0
  77. package/.cursor/skills/skill-creator/SKILL.md +13 -0
  78. package/.cursor/skills/spinout/SKILL.md +12 -0
  79. package/.cursor/skills/sunset-review/SKILL.md +13 -0
  80. package/.cursor/skills/test-runner/SKILL.md +13 -0
  81. package/.cursor/skills/tmux-layout/SKILL.md +13 -0
  82. package/.cursor/skills/ubiquitous-language/SKILL.md +13 -0
  83. package/.cursor/skills/using-orchestrator/SKILL.md +13 -0
  84. package/.cursor/skills/vault-mirror/SKILL.md +13 -0
  85. package/.cursor/skills/vault-sync/SKILL.md +13 -0
  86. package/.cursor/skills/wave-executor/SKILL.md +13 -0
  87. package/.cursor/skills/write-executable-plan/SKILL.md +13 -0
  88. package/.mcp.json +4 -1
  89. package/CHANGELOG.md +168 -0
  90. package/README.md +18 -15
  91. package/agents/AGENTS.md +23 -4
  92. package/agents/code-implementer.md +2 -1
  93. package/agents/db-specialist.md +2 -1
  94. package/agents/docs-writer.md +3 -1
  95. package/agents/eval-judge.md +1 -1
  96. package/agents/session-reviewer.md +7 -1
  97. package/agents/test-writer.md +2 -1
  98. package/agents/ui-developer.md +2 -1
  99. package/commands/bootstrap.md +2 -2
  100. package/commands/close.md +3 -1
  101. package/commands/go.md +1 -1
  102. package/commands/journey-audit.md +43 -0
  103. package/docs/USER-GUIDE.md +2 -2
  104. package/docs/ci-setup.md +14 -0
  105. package/docs/codex-setup.md +64 -0
  106. package/docs/components.md +6 -6
  107. package/docs/cursor-setup.md +26 -47
  108. package/docs/events-schema.md +76 -4
  109. package/docs/github-mirror-protection.md +197 -0
  110. package/docs/pi-setup.md +2 -0
  111. package/docs/rule-authoring.md +3 -1
  112. package/docs/scope-collision-guard.md +49 -2
  113. package/docs/session-config-reference.md +26 -4
  114. package/docs/session-config-template.md +4 -3
  115. package/docs/telemetry.md +22 -0
  116. package/hooks/_lib/lock-bootstrap.mjs +8 -4
  117. package/hooks/_lib/vcs-create-matcher.mjs +397 -38
  118. package/hooks/enforce-scope.mjs +64 -0
  119. package/hooks/hooks-codex.json +1 -1
  120. package/hooks/hooks-cursor.json +201 -20
  121. package/hooks/hooks-pi.json +1 -1
  122. package/hooks/hooks.json +2 -2
  123. package/hooks/on-session-end.mjs +211 -10
  124. package/hooks/on-session-start.mjs +214 -11
  125. package/hooks/on-stop.mjs +48 -9
  126. package/hooks/post-subagent-discovery-validator.mjs +34 -3
  127. package/hooks/post-tool-batch-wave-signal.mjs +11 -2
  128. package/hooks/pre-bash-issue-budget.mjs +117 -4
  129. package/hooks/pre-bash-sessions-ledger-guard.mjs +159 -0
  130. package/hooks/pre-bash-staging-fence.mjs +4 -0
  131. package/hooks/pre-task-scope-disjoint.mjs +368 -35
  132. package/hooks/skill-invocation-telemetry.mjs +21 -10
  133. package/monitors/monitors.json +6 -0
  134. package/package.json +1 -1
  135. package/pi/prompts/journey-audit.md +12 -0
  136. package/rules/_index.md +9 -1
  137. package/rules/always-on/ask-via-tool.md +62 -0
  138. package/rules/always-on/bash-harness-pitfalls.md +168 -0
  139. package/rules/always-on/build-value.md +47 -0
  140. package/rules/always-on/cross-session-messaging.md +59 -0
  141. package/rules/always-on/loop-and-monitor.md +221 -0
  142. package/rules/always-on/parallel-sessions.md +142 -12
  143. package/rules/always-on/receiving-review.md +108 -0
  144. package/rules/always-on/test-value.md +40 -0
  145. package/rules/always-on/verification-before-completion.md +77 -0
  146. package/scripts/archive-closed-prds.mjs +258 -18
  147. package/scripts/autopilot.mjs +5 -0
  148. package/scripts/backfill-evidence-digest.mjs +376 -0
  149. package/scripts/cursor-install.mjs +89 -48
  150. package/scripts/export-hw-learnings.mjs +143 -2
  151. package/scripts/express-path.mjs +299 -0
  152. package/scripts/generate-cursor-adapter.mjs +253 -0
  153. package/scripts/github-protection-audit.mjs +358 -0
  154. package/scripts/lib/autopilot/worktree-pipeline.mjs +240 -16
  155. package/scripts/lib/build-live-signals.mjs +24 -5
  156. package/scripts/lib/ci-status-banner.mjs +158 -11
  157. package/scripts/lib/command-blocker.mjs +70 -0
  158. package/scripts/lib/config/reconcile.mjs +79 -4
  159. package/scripts/lib/config/section-extractor.mjs +235 -36
  160. package/scripts/lib/config-schema.mjs +9 -1
  161. package/scripts/lib/config.mjs +57 -6
  162. package/scripts/lib/convergence-monitor.mjs +13 -2
  163. package/scripts/lib/cursor-hook-bridge.mjs +443 -0
  164. package/scripts/lib/dispatcher/cli.mjs +2 -2
  165. package/scripts/lib/express-path.mjs +327 -0
  166. package/scripts/lib/file-lock.mjs +22 -4
  167. package/scripts/lib/gates/gate-full.mjs +81 -8
  168. package/scripts/lib/gates/gate-helpers.mjs +76 -15
  169. package/scripts/lib/git-config-drift.mjs +134 -5
  170. package/scripts/lib/host-identity.mjs +247 -2
  171. package/scripts/lib/instruction-budget-guard.mjs +31 -1
  172. package/scripts/lib/issue-budget.mjs +229 -30
  173. package/scripts/lib/learnings/io.mjs +55 -10
  174. package/scripts/lib/learnings/schema.mjs +95 -28
  175. package/scripts/lib/lock-reaper.mjs +7 -1
  176. package/scripts/lib/locks/staging-fence-lock.mjs +5 -1
  177. package/scripts/lib/locks/state-md-lock.mjs +8 -1
  178. package/scripts/lib/memory-banner.mjs +5 -2
  179. package/scripts/lib/memory-paths.mjs +15 -6
  180. package/scripts/lib/mode-selector/scoring.mjs +53 -6
  181. package/scripts/lib/platform.mjs +72 -9
  182. package/scripts/lib/plugin-root.mjs +143 -19
  183. package/scripts/lib/project-hygiene.mjs +43 -3
  184. package/scripts/lib/quality-gate.mjs +271 -13
  185. package/scripts/lib/reconcile/emitter.mjs +87 -19
  186. package/scripts/lib/reconcile/engine.mjs +281 -13
  187. package/scripts/lib/reconcile/idempotency.mjs +102 -1
  188. package/scripts/lib/reconcile/renderer.mjs +148 -3
  189. package/scripts/lib/reconcile/sanitize.mjs +40 -17
  190. package/scripts/lib/reconcile/writer.mjs +415 -84
  191. package/scripts/lib/rule-loader.mjs +37 -2
  192. package/scripts/lib/rules-sync.mjs +51 -8
  193. package/scripts/lib/scope-gate.mjs +90 -0
  194. package/scripts/lib/session-close-backfill.mjs +369 -28
  195. package/scripts/lib/session-discovery.mjs +13 -3
  196. package/scripts/lib/session-end/phase-skip.mjs +37 -4
  197. package/scripts/lib/session-end/worktree-cleanup.mjs +154 -7
  198. package/scripts/lib/session-id.mjs +30 -14
  199. package/scripts/lib/session-identity/own-session.mjs +159 -0
  200. package/scripts/lib/session-lock.mjs +85 -30
  201. package/scripts/lib/session-schema/normalizer.mjs +70 -3
  202. package/scripts/lib/session-schema/validator.mjs +40 -0
  203. package/scripts/lib/session-start-probes.mjs +608 -0
  204. package/scripts/lib/session-transition.mjs +277 -0
  205. package/scripts/lib/sessions-staleness-banner.mjs +124 -57
  206. package/scripts/lib/spiral-carryover.mjs +90 -9
  207. package/scripts/lib/state-md/frontmatter-mutators.mjs +41 -8
  208. package/scripts/lib/state-md/mission-status.mjs +350 -52
  209. package/scripts/lib/state-md/yaml-parser.mjs +145 -16
  210. package/scripts/lib/state-md.mjs +12 -2
  211. package/scripts/lib/telemetry/sync.mjs +46 -8
  212. package/scripts/lib/validate/check-agents.mjs +66 -0
  213. package/scripts/lib/validate/check-cursor-adapter.mjs +102 -0
  214. package/scripts/lib/validate/check-dead-bridge.mjs +24 -2
  215. package/scripts/lib/validate/check-doc-cli-commands.mjs +16 -32
  216. package/scripts/lib/validate/check-hooks-symmetry.mjs +29 -63
  217. package/scripts/lib/validate/check-playwright-mcp-canary.mjs +13 -22
  218. package/scripts/lib/validate/check-plugin-monitors.mjs +10 -4
  219. package/scripts/lib/validate/check-test-value-bans.mjs +165 -17
  220. package/scripts/lib/validate/check-unwired-features.mjs +340 -32
  221. package/scripts/lib/validate/repo-files.mjs +275 -0
  222. package/scripts/lib/validate-vendored-rules.mjs +229 -7
  223. package/scripts/lib/vault-mirror/process.mjs +99 -43
  224. package/scripts/lib/vault-mirror/telemetry.mjs +210 -0
  225. package/scripts/lib/vault-staleness-banner.mjs +76 -6
  226. package/scripts/lib/vault-status/board-writer.mjs +211 -10
  227. package/scripts/lib/vault-status/narrative-mirror.mjs +188 -8
  228. package/scripts/lib/wave-executor/foreign-dispatch.mjs +832 -0
  229. package/scripts/lib/wave-transcript-tail.mjs +869 -0
  230. package/scripts/materialize-wave-scope.mjs +209 -12
  231. package/scripts/mcp-server.sh +11 -2
  232. package/scripts/parse-config.mjs +65 -0
  233. package/scripts/token-audit.sh +9 -2
  234. package/scripts/validate-plugin.mjs +3 -0
  235. package/scripts/validate-wave-scope.mjs +67 -0
  236. package/scripts/vault-mirror.mjs +203 -34
  237. package/skills/_shared/monitor-patterns.md +31 -5
  238. package/skills/_shared/parallel-aware-auq.md +1 -1
  239. package/skills/_shared/parallel-aware-preamble.md +4 -2
  240. package/skills/_shared/platform-tools.md +11 -5
  241. package/skills/_shared/state-ownership.md +29 -2
  242. package/skills/autopilot/SKILL.md +5 -1
  243. package/skills/bootstrap/SKILL.md +3 -3
  244. package/skills/bootstrap/_shared-template.md +18 -10
  245. package/skills/bootstrap/deep-template.md +10 -6
  246. package/skills/bootstrap/fast-template.md +15 -8
  247. package/skills/bootstrap/standard-template.md +10 -6
  248. package/skills/claude-md-drift-check/checker.mjs +39 -11
  249. package/skills/dispatcher/SKILL.md +1 -1
  250. package/skills/journey-audit/SKILL.md +269 -0
  251. package/skills/peekaboo-driver/SKILL.md +15 -3
  252. package/skills/persona-panel/SKILL.md +1 -1
  253. package/skills/reconcile/SKILL.md +41 -1
  254. package/skills/session-end/SKILL.md +17 -4
  255. package/skills/session-end/metrics-collection.md +7 -4
  256. package/skills/session-end/phase-3-6-tail.md +11 -3
  257. package/skills/session-end/phase-3-7a-recommendations.md +16 -2
  258. package/skills/session-plan/SKILL.md +6 -1
  259. package/skills/session-plan/wave-template.md +1 -0
  260. package/skills/session-start/SKILL.md +30 -16
  261. package/skills/session-start/phase-7-5-mode-selector.md +15 -3
  262. package/skills/session-start/phase-8-5-express-path.md +77 -12
  263. package/skills/vault-sync/validator.mjs +31 -0
  264. package/skills/wave-executor/SKILL.md +4 -2
  265. package/skills/wave-executor/circuit-breaker.md +34 -9
  266. package/skills/wave-executor/wave-loop.md +102 -19
  267. package/templates/_shared/journey-manifest.md +110 -0
  268. package/templates/_shared/rules/parallel-sessions.md +0 -77
@@ -0,0 +1,110 @@
1
+ <!-- source: session-orchestrator plugin (canonical: templates/_shared/journey-manifest.md) -->
2
+ <!--
3
+ Copy to `.orchestrator/journey-manifest.md` in the target repo and fill in every
4
+ section. `/journey-audit` REFUSES to run without this file.
5
+
6
+ The `## SAFETY` block is what gates R5 (the real end-to-end run against
7
+ production with a real account). Absent or empty → R5 is not dispatched and the
8
+ audit runs as a dry-run (R1–R4 + R7). Nothing else in this file can substitute
9
+ for it: the skill reads THIS heading, not your intent.
10
+
11
+ Credentials: env-var NAMES only, never values. A value pasted here is a secret
12
+ in a tracked file.
13
+ -->
14
+
15
+ # Journey Manifest — <REPO NAME>
16
+
17
+ > Per-repo input for `/journey-audit`. Product truth, not code structure.
18
+ > Last verified: <YYYY-MM-DD> by <operator>
19
+
20
+ ## Personas & Einstiegspunkte
21
+
22
+ | Persona | Ziel | Einstiegspunkt (URL/Route) | Erfolg heißt |
23
+ |---------|------|---------------------------|--------------|
24
+ | <anonymer Besucher> | <was er will> | `<https://…/>` | <messbarer Endzustand> |
25
+ | <zahlender Kunde> | | | |
26
+ | <Owner/Admin> | | | |
27
+
28
+ List every entry point a real user can reach — including the ones marketing links
29
+ to but the app never surfaces. A feature with no entry point is exactly the defect
30
+ class this audit exists to find.
31
+
32
+ ## Wahrheits-SSOTs
33
+
34
+ Where the truth about the product lives in code. R3 compares every claim against
35
+ THESE files, not against other prose.
36
+
37
+ | Gegenstand | SSOT-Datei/Konstante |
38
+ |-----------|----------------------|
39
+ | Preise / Pläne / Limits | `<src/config/plans.ts>` |
40
+ | Feature-Flags | `<…>` |
41
+ | Währung / Steuer / Region | `<…>` |
42
+ | Quota / Kontingente | `<…>` |
43
+ | i18n-Namespaces (Marketing, FAQ, Mail) | `<…>` |
44
+ | Chat-/Bot-Faktenquelle | `<…>` |
45
+
46
+ ## Outbound-Touchpoints (Input für R1/R2)
47
+
48
+ - Template-Verzeichnis: `<…>`
49
+ - Send-Pfad / Provider-Adapter: `<…>`
50
+ - Cron-/Scheduler-Quellen: `<…>`
51
+ - Render-Idiom + Beispiel-Props für R2: `<z. B. react-email, props aus …>`
52
+
53
+ ## Chat-Interview (Frage → Soll-Antwort)
54
+
55
+ R4 asks these verbatim and scores the answer against the expected one. The expected
56
+ answer must be derivable from a Wahrheits-SSOT above — otherwise it is a second
57
+ claim, not a truth key.
58
+
59
+ | # | Frage (wörtlich) | Soll-Antwort (Kern-Fakt) | SSOT |
60
+ |---|------------------|--------------------------|------|
61
+ | 1 | <"Was kostet …?"> | <"…"> | `<datei>` |
62
+ | 2 | | | |
63
+ | 3 | | | |
64
+
65
+ ## SAFETY
66
+
67
+ **MANDATORY for R5. Without this block filled in, R5 is not dispatched.**
68
+
69
+ - **Erlaubte Konten:** `<test-account@…>` — and no other. Never a real customer account.
70
+ - **Erlaubte Events/Objekte:** `<z. B. nur Events mit Präfix AUDIT-…>`
71
+ - **No-Go-Aktionen:** <Löschen fremder Daten · Mailversand an echte Empfänger · Plan-Downgrade · Refunds · Webhook-Replays gegen Prod>
72
+ - **Checkout-Grenze:** `<max. EUR X, Testkarte …, Live-Zahlungen verboten>`
73
+ - **Cleanup-Regel:** <was nach dem Durchstich wieder entfernt wird, von wem, woran man erkennt dass es weg ist>
74
+ - **Abbruchbedingung:** <woran R5 sofort stoppt und meldet statt weiterzumachen>
75
+
76
+ ## Credential-Quellen (env-Namen, NIE Werte)
77
+
78
+ | Zweck | Env-Variable | Bezugsquelle |
79
+ |-------|--------------|--------------|
80
+ | Prod-Login R5 | `<AUDIT_TEST_ACCOUNT_EMAIL>` | `<1Password-Item / .env.local>` |
81
+ | DB read-only R6 | `<AUDIT_DB_READONLY_URL>` | `<…>` |
82
+ | Mail-Provider-API R6 | `<…>` | `<…>` |
83
+ | Plattform-CLI R7 | `<…>` | `<…>` |
84
+
85
+ ## Realdaten-Queries (R6, read-only)
86
+
87
+ Only `SELECT`. A query that writes does not belong in this file.
88
+
89
+ ```sql
90
+ -- Funnel: Registrierung → Aktivierung → Zahlung
91
+ SELECT …;
92
+ ```
93
+
94
+ - Identitäts-Regeln: <wie ein Nutzer über Tabellen hinweg identifiziert wird>
95
+ - Nicht messbar (bewusst benennen): <was die Daten NICHT hergeben>
96
+
97
+ ## Plattform-Erwartung (R7)
98
+
99
+ - CLI-Logins: `<vercel · supabase · cloudflare · …>`
100
+ - Erwarteter Plan/Tier je Dienst: `<…>`
101
+ - Offene Perf-/Kosten-Issues: `<#…>`
102
+
103
+ ## Bekannte Ausnahmen
104
+
105
+ Findings that are known and deliberately accepted — with the reason and a revisit
106
+ trigger. R1–R7 report them as `known-exception`, never as new findings.
107
+
108
+ | Befund | Warum akzeptiert | Revisit-Trigger |
109
+ |--------|------------------|-----------------|
110
+ | <…> | <…> | <…> |
@@ -1,77 +0,0 @@
1
- # Parallel Session Awareness (Always-on)
2
-
3
- Multiple Claude Code sessions may be active in the same working directory simultaneously. Another agent may be editing files, creating commits, or running builds right now. Treat the repo as a shared workspace, not a private sandbox.
4
-
5
- ## PSA Scope Axes — Operator-Session vs In-Run
6
-
7
- PSA rules span two distinct axes. Naming them keeps the durable moat clear when
8
- native multi-agent primitives (the experimental `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS`)
9
- overlap parts of this surface.
10
-
11
- - **Operator-session axis (the durable moat):** independent parallel operator /
12
- Claude sessions in the **same working copy**. PSA-001..004, plus the per-repo
13
- session lock (`scripts/lib/session-lock.mjs` `acquire()` / `session.lock`,
14
- heartbeat-liveness schema v2), guard this domain. **Agent Teams structurally
15
- cannot enter it** — Teams is per-process / in-run only ("one team per
16
- session"), NOT per-repo. Its graduation to native affects **only the in-run
17
- multi-agent coordination slice**, never the operator-session slice.
18
- - **In-run axis:** multiple agents coordinated inside a single session/run. Even
19
- here our own machinery remains necessary because Agent Teams provides **no
20
- automatic isolation**: file-scope deconfliction (`skills/session-plan/SKILL.md` —
21
- "verify that NO two agents in the same wave modify the same file") plus
22
- `withStateMdLock` STATE.md serialization still do the work Teams does not.
23
-
24
- PSA-005 spans **both** axes; only its session-lock half is purely
25
- operator-scoped. PSA-006 is **orthogonal** to both (Discovery grep-discipline).
26
- See ADR-0010 § Native-Overlap Refresh (Agent Teams = Adapter; PSA re-scoped).
27
-
28
- ## Recognizing Parallel Work (PSA-001: Detect Before Acting)
29
-
30
- *Axis: operator-session safety — the durable moat Agent Teams structurally cannot enter (per-process / in-run only).*
31
-
32
- - **Unexpected git status changes:** Files modified or staged that are not part of your current task likely belong to another session.
33
- - **Unfamiliar commits:** New entries in `git log` that you did not create mean another agent (or the user manually) committed work.
34
- - **Spontaneous errors:** Build failures, type errors, or test failures in code you did not touch may be in-progress work from another session — not pre-existing bugs.
35
- - **Files changed between reads:** If a file's content differs from what you read moments ago, another session likely edited it.
36
- - **New untracked files:** Files appearing in `git status` that you did not create belong to someone else's work.
37
-
38
- ## Behavioral Guidance (PSA-002: Ask, Don't Assume)
39
-
40
- *Axis: operator-session safety — the durable moat Agent Teams structurally cannot enter (per-process / in-run only).*
41
-
42
- - **When you detect signs of parallel work, stop and ask the user:** "I notice changes I didn't make (e.g., modified files in git status, new commits). Is another session active?"
43
- - **Never "fix" code outside your task scope.** Errors in files you are not working on may be intentional intermediate states from another session.
44
- - **Stay in your lane.** Only read, create, modify, and delete files directly relevant to your assigned task.
45
- - **If blocked by external changes, ask the user** rather than reverting, resetting, or working around them.
46
- - **Track your own footprint.** Be aware of which files you have created or modified. Your commits should contain only your changes.
47
-
48
- ## Destructive Action Safeguards (PSA-003: Never Destroy What You Didn't Create)
49
-
50
- *Axis: operator-session safety — the durable moat Agent Teams structurally cannot enter (per-process / in-run only).*
51
-
52
- These commands require explicit user confirmation even in normal operation. When parallel work is suspected, they are **forbidden** without user approval:
53
- - **`git reset` (any form)** — destroys staged or committed work that may belong to another session.
54
- - **`git checkout -- <file>`** — discards uncommitted changes another session is actively building.
55
- - **`git clean -f`** — deletes untracked files another session created.
56
- - **`git stash`** — captures another session's changes into a stash they cannot find.
57
- - **`rm` / delete of files you did not create** — may remove work-in-progress from another session.
58
- - **`git revert` of commits you did not make** — undoes another session's completed work.
59
- - **`git push --force`** — rewrites shared history (dangerous even without parallel sessions).
60
-
61
- Before running any of the above, ask: "Did I create this file/commit/change? If not, it is not mine to touch."
62
-
63
- ## Commit Discipline (PSA-004: Isolate Your Changes)
64
-
65
- *Axis: operator-session safety — the durable moat Agent Teams structurally cannot enter (per-process / in-run only).*
66
-
67
- - **Stage files individually** (`git add <file>`) rather than `git add .` or `git add -A`, which may sweep in another session's work.
68
- - **Review `git diff --cached` before committing** to verify every staged change is yours.
69
- - **If you see unfamiliar changes in the diff, unstage them** and ask the user.
70
- - **Never amend a commit you did not create.**
71
-
72
- ## Anti-Patterns
73
- - Seeing unfamiliar changes and assuming they are "leftover mess" to clean up — they are likely active work.
74
- - Running `git reset --hard` to "start fresh" — this destroys all uncommitted work across all sessions.
75
- - Fixing type errors or lint issues in files outside your scope — the other session will handle their own files.
76
- - Using `git add .` in a shared workspace — you will commit another session's partial work.
77
- - Reverting "broken" commits without asking — another session may have intentionally pushed incremental progress.