@memnexus-ai/mx-agent-cli 0.1.294 → 0.1.296-next.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 (649) hide show
  1. package/dist/__tests__/agents-md-canonicalization.test.js +31 -1
  2. package/dist/__tests__/agents-md-canonicalization.test.js.map +1 -1
  3. package/dist/__tests__/behavioral-extraction.test.js +50 -0
  4. package/dist/__tests__/behavioral-extraction.test.js.map +1 -1
  5. package/dist/__tests__/bootstrap-behavioral-contract.test.js +6 -3
  6. package/dist/__tests__/bootstrap-behavioral-contract.test.js.map +1 -1
  7. package/dist/__tests__/bundle-config.test.js +28 -2
  8. package/dist/__tests__/bundle-config.test.js.map +1 -1
  9. package/dist/__tests__/catalog-interaction.test.d.ts +25 -0
  10. package/dist/__tests__/catalog-interaction.test.d.ts.map +1 -0
  11. package/dist/__tests__/catalog-interaction.test.js +269 -0
  12. package/dist/__tests__/catalog-interaction.test.js.map +1 -0
  13. package/dist/__tests__/catalog-named-memories.test.d.ts +2 -0
  14. package/dist/__tests__/catalog-named-memories.test.d.ts.map +1 -0
  15. package/dist/__tests__/catalog-named-memories.test.js +204 -0
  16. package/dist/__tests__/catalog-named-memories.test.js.map +1 -0
  17. package/dist/__tests__/catalog-origin-main.test.d.ts +15 -0
  18. package/dist/__tests__/catalog-origin-main.test.d.ts.map +1 -0
  19. package/dist/__tests__/catalog-origin-main.test.js +296 -0
  20. package/dist/__tests__/catalog-origin-main.test.js.map +1 -0
  21. package/dist/__tests__/catalog.test.d.ts +2 -0
  22. package/dist/__tests__/catalog.test.d.ts.map +1 -0
  23. package/dist/__tests__/catalog.test.js +131 -0
  24. package/dist/__tests__/catalog.test.js.map +1 -0
  25. package/dist/__tests__/claude-local-sanitizer.test.d.ts +24 -0
  26. package/dist/__tests__/claude-local-sanitizer.test.d.ts.map +1 -0
  27. package/dist/__tests__/claude-local-sanitizer.test.js +906 -0
  28. package/dist/__tests__/claude-local-sanitizer.test.js.map +1 -0
  29. package/dist/__tests__/cli-build-integration.test.d.ts +2 -0
  30. package/dist/__tests__/cli-build-integration.test.d.ts.map +1 -0
  31. package/dist/__tests__/cli-build-integration.test.js +64 -0
  32. package/dist/__tests__/cli-build-integration.test.js.map +1 -0
  33. package/dist/__tests__/cli-build.test.d.ts +2 -0
  34. package/dist/__tests__/cli-build.test.d.ts.map +1 -0
  35. package/dist/__tests__/cli-build.test.js +640 -0
  36. package/dist/__tests__/cli-build.test.js.map +1 -0
  37. package/dist/__tests__/codex-deploy-config.test.js +60 -0
  38. package/dist/__tests__/codex-deploy-config.test.js.map +1 -1
  39. package/dist/__tests__/completion-rows-discriminate.test.d.ts +20 -0
  40. package/dist/__tests__/completion-rows-discriminate.test.d.ts.map +1 -0
  41. package/dist/__tests__/completion-rows-discriminate.test.js +481 -0
  42. package/dist/__tests__/completion-rows-discriminate.test.js.map +1 -0
  43. package/dist/__tests__/config-fidelity-archived-symlinks.test.d.ts +2 -0
  44. package/dist/__tests__/config-fidelity-archived-symlinks.test.d.ts.map +1 -0
  45. package/dist/__tests__/config-fidelity-archived-symlinks.test.js +127 -0
  46. package/dist/__tests__/config-fidelity-archived-symlinks.test.js.map +1 -0
  47. package/dist/__tests__/config-fidelity-display.test.d.ts +2 -0
  48. package/dist/__tests__/config-fidelity-display.test.d.ts.map +1 -0
  49. package/dist/__tests__/config-fidelity-display.test.js +77 -0
  50. package/dist/__tests__/config-fidelity-display.test.js.map +1 -0
  51. package/dist/__tests__/config-fidelity.test.js +166 -33
  52. package/dist/__tests__/config-fidelity.test.js.map +1 -1
  53. package/dist/__tests__/config-generation-gate.test.js +78 -0
  54. package/dist/__tests__/config-generation-gate.test.js.map +1 -1
  55. package/dist/__tests__/config-sync.test.js +89 -1
  56. package/dist/__tests__/config-sync.test.js.map +1 -1
  57. package/dist/__tests__/coordination-401-production-wiring.test.js +12 -7
  58. package/dist/__tests__/coordination-401-production-wiring.test.js.map +1 -1
  59. package/dist/__tests__/coordination-401-recovery.test.js +39 -32
  60. package/dist/__tests__/coordination-401-recovery.test.js.map +1 -1
  61. package/dist/__tests__/coordination-brief-pin.test.js +21 -8
  62. package/dist/__tests__/coordination-brief-pin.test.js.map +1 -1
  63. package/dist/__tests__/coordination-client.test.js +316 -3
  64. package/dist/__tests__/coordination-client.test.js.map +1 -1
  65. package/dist/__tests__/coordination-credential-endpoint.test.d.ts +24 -0
  66. package/dist/__tests__/coordination-credential-endpoint.test.d.ts.map +1 -0
  67. package/dist/__tests__/coordination-credential-endpoint.test.js +1290 -0
  68. package/dist/__tests__/coordination-credential-endpoint.test.js.map +1 -0
  69. package/dist/__tests__/coordination-memory.test.js +20 -4
  70. package/dist/__tests__/coordination-memory.test.js.map +1 -1
  71. package/dist/__tests__/coordination-provision.test.js +22 -14
  72. package/dist/__tests__/coordination-provision.test.js.map +1 -1
  73. package/dist/__tests__/coordination-status-registration.test.d.ts +16 -0
  74. package/dist/__tests__/coordination-status-registration.test.d.ts.map +1 -0
  75. package/dist/__tests__/coordination-status-registration.test.js +480 -0
  76. package/dist/__tests__/coordination-status-registration.test.js.map +1 -0
  77. package/dist/__tests__/coordination-token-multitenant.test.js +24 -24
  78. package/dist/__tests__/coordination-token-multitenant.test.js.map +1 -1
  79. package/dist/__tests__/coordination-token.test.js +35 -28
  80. package/dist/__tests__/coordination-token.test.js.map +1 -1
  81. package/dist/__tests__/creation-pr-class-check.test.d.ts +17 -0
  82. package/dist/__tests__/creation-pr-class-check.test.d.ts.map +1 -0
  83. package/dist/__tests__/creation-pr-class-check.test.js +346 -0
  84. package/dist/__tests__/creation-pr-class-check.test.js.map +1 -0
  85. package/dist/__tests__/decision-check.test.d.ts +2 -0
  86. package/dist/__tests__/decision-check.test.d.ts.map +1 -0
  87. package/dist/__tests__/decision-check.test.js +105 -0
  88. package/dist/__tests__/decision-check.test.js.map +1 -0
  89. package/dist/__tests__/digest-team-omission.test.d.ts +15 -0
  90. package/dist/__tests__/digest-team-omission.test.d.ts.map +1 -0
  91. package/dist/__tests__/digest-team-omission.test.js +247 -0
  92. package/dist/__tests__/digest-team-omission.test.js.map +1 -0
  93. package/dist/__tests__/doctor-worktree-path.test.d.ts +17 -0
  94. package/dist/__tests__/doctor-worktree-path.test.d.ts.map +1 -0
  95. package/dist/__tests__/doctor-worktree-path.test.js +158 -0
  96. package/dist/__tests__/doctor-worktree-path.test.js.map +1 -0
  97. package/dist/__tests__/fleet-data.test.js +40 -7
  98. package/dist/__tests__/fleet-data.test.js.map +1 -1
  99. package/dist/__tests__/fleet-tmux.test.js +2 -2
  100. package/dist/__tests__/fleet-tmux.test.js.map +1 -1
  101. package/dist/__tests__/generate-claude.test.js +137 -3
  102. package/dist/__tests__/generate-claude.test.js.map +1 -1
  103. package/dist/__tests__/git-env.test.d.ts +14 -0
  104. package/dist/__tests__/git-env.test.d.ts.map +1 -0
  105. package/dist/__tests__/git-env.test.js +131 -0
  106. package/dist/__tests__/git-env.test.js.map +1 -0
  107. package/dist/__tests__/git-identity-isolation.test.d.ts +33 -0
  108. package/dist/__tests__/git-identity-isolation.test.d.ts.map +1 -0
  109. package/dist/__tests__/git-identity-isolation.test.js +626 -0
  110. package/dist/__tests__/git-identity-isolation.test.js.map +1 -0
  111. package/dist/__tests__/harness-extract.test.d.ts +19 -0
  112. package/dist/__tests__/harness-extract.test.d.ts.map +1 -0
  113. package/dist/__tests__/harness-extract.test.js +566 -0
  114. package/dist/__tests__/harness-extract.test.js.map +1 -0
  115. package/dist/__tests__/harness-wiring.test.d.ts +16 -0
  116. package/dist/__tests__/harness-wiring.test.d.ts.map +1 -0
  117. package/dist/__tests__/harness-wiring.test.js +469 -0
  118. package/dist/__tests__/harness-wiring.test.js.map +1 -0
  119. package/dist/__tests__/hook-heal.test.js +17 -0
  120. package/dist/__tests__/hook-heal.test.js.map +1 -1
  121. package/dist/__tests__/init-coordination-url.test.d.ts +11 -0
  122. package/dist/__tests__/init-coordination-url.test.d.ts.map +1 -0
  123. package/dist/__tests__/init-coordination-url.test.js +114 -0
  124. package/dist/__tests__/init-coordination-url.test.js.map +1 -0
  125. package/dist/__tests__/memory-autocreate.test.js +574 -8
  126. package/dist/__tests__/memory-autocreate.test.js.map +1 -1
  127. package/dist/__tests__/memory-log-result.test.d.ts +13 -0
  128. package/dist/__tests__/memory-log-result.test.d.ts.map +1 -0
  129. package/dist/__tests__/memory-log-result.test.js +113 -0
  130. package/dist/__tests__/memory-log-result.test.js.map +1 -0
  131. package/dist/__tests__/memory-named-exists.test.d.ts +16 -0
  132. package/dist/__tests__/memory-named-exists.test.d.ts.map +1 -0
  133. package/dist/__tests__/memory-named-exists.test.js +288 -0
  134. package/dist/__tests__/memory-named-exists.test.js.map +1 -0
  135. package/dist/__tests__/mx-agent-cli-pin-validation.test.js +23 -47
  136. package/dist/__tests__/mx-agent-cli-pin-validation.test.js.map +1 -1
  137. package/dist/__tests__/mx-agent-cli-version-pin.test.js +34 -88
  138. package/dist/__tests__/mx-agent-cli-version-pin.test.js.map +1 -1
  139. package/dist/__tests__/new-project-first-team.test.d.ts +15 -0
  140. package/dist/__tests__/new-project-first-team.test.d.ts.map +1 -0
  141. package/dist/__tests__/new-project-first-team.test.js +263 -0
  142. package/dist/__tests__/new-project-first-team.test.js.map +1 -0
  143. package/dist/__tests__/otel-env.test.d.ts +2 -0
  144. package/dist/__tests__/otel-env.test.d.ts.map +1 -0
  145. package/dist/__tests__/otel-env.test.js +127 -0
  146. package/dist/__tests__/otel-env.test.js.map +1 -0
  147. package/dist/__tests__/project-config.test.js +283 -1
  148. package/dist/__tests__/project-config.test.js.map +1 -1
  149. package/dist/__tests__/provision-behavioral-contract.test.js +96 -4
  150. package/dist/__tests__/provision-behavioral-contract.test.js.map +1 -1
  151. package/dist/__tests__/provision-catalog-precondition.test.d.ts +26 -0
  152. package/dist/__tests__/provision-catalog-precondition.test.d.ts.map +1 -0
  153. package/dist/__tests__/provision-catalog-precondition.test.js +620 -0
  154. package/dist/__tests__/provision-catalog-precondition.test.js.map +1 -0
  155. package/dist/__tests__/provision-completion-rows.test.d.ts +17 -0
  156. package/dist/__tests__/provision-completion-rows.test.d.ts.map +1 -0
  157. package/dist/__tests__/provision-completion-rows.test.js +3187 -0
  158. package/dist/__tests__/provision-completion-rows.test.js.map +1 -0
  159. package/dist/__tests__/provision-identity-gate.test.d.ts +20 -0
  160. package/dist/__tests__/provision-identity-gate.test.d.ts.map +1 -0
  161. package/dist/__tests__/provision-identity-gate.test.js +600 -0
  162. package/dist/__tests__/provision-identity-gate.test.js.map +1 -0
  163. package/dist/__tests__/provision-resume.test.d.ts +26 -0
  164. package/dist/__tests__/provision-resume.test.d.ts.map +1 -0
  165. package/dist/__tests__/provision-resume.test.js +1164 -0
  166. package/dist/__tests__/provision-resume.test.js.map +1 -0
  167. package/dist/__tests__/provision-roleguide-anchors.test.d.ts +27 -0
  168. package/dist/__tests__/provision-roleguide-anchors.test.d.ts.map +1 -0
  169. package/dist/__tests__/provision-roleguide-anchors.test.js +747 -0
  170. package/dist/__tests__/provision-roleguide-anchors.test.js.map +1 -0
  171. package/dist/__tests__/provision-skeleton-fill.test.d.ts +16 -0
  172. package/dist/__tests__/provision-skeleton-fill.test.d.ts.map +1 -0
  173. package/dist/__tests__/provision-skeleton-fill.test.js +488 -0
  174. package/dist/__tests__/provision-skeleton-fill.test.js.map +1 -0
  175. package/dist/__tests__/provision-teambuilder-flow.test.js +93 -7
  176. package/dist/__tests__/provision-teambuilder-flow.test.js.map +1 -1
  177. package/dist/__tests__/repo-guard-wiring.test.d.ts +21 -0
  178. package/dist/__tests__/repo-guard-wiring.test.d.ts.map +1 -0
  179. package/dist/__tests__/repo-guard-wiring.test.js +638 -0
  180. package/dist/__tests__/repo-guard-wiring.test.js.map +1 -0
  181. package/dist/__tests__/report-format.test.d.ts +2 -0
  182. package/dist/__tests__/report-format.test.d.ts.map +1 -0
  183. package/dist/__tests__/report-format.test.js +219 -0
  184. package/dist/__tests__/report-format.test.js.map +1 -0
  185. package/dist/__tests__/row15-detail-sanitizer.test.d.ts +20 -0
  186. package/dist/__tests__/row15-detail-sanitizer.test.d.ts.map +1 -0
  187. package/dist/__tests__/row15-detail-sanitizer.test.js +61 -0
  188. package/dist/__tests__/row15-detail-sanitizer.test.js.map +1 -0
  189. package/dist/__tests__/runtime-codex-gateway-pilot.test.d.ts +2 -0
  190. package/dist/__tests__/runtime-codex-gateway-pilot.test.d.ts.map +1 -0
  191. package/dist/__tests__/runtime-codex-gateway-pilot.test.js +309 -0
  192. package/dist/__tests__/runtime-codex-gateway-pilot.test.js.map +1 -0
  193. package/dist/__tests__/runtime-codex-gateway-provider.test.d.ts +2 -0
  194. package/dist/__tests__/runtime-codex-gateway-provider.test.d.ts.map +1 -0
  195. package/dist/__tests__/runtime-codex-gateway-provider.test.js +163 -0
  196. package/dist/__tests__/runtime-codex-gateway-provider.test.js.map +1 -0
  197. package/dist/__tests__/runtime-identity.test.d.ts +2 -0
  198. package/dist/__tests__/runtime-identity.test.d.ts.map +1 -0
  199. package/dist/__tests__/runtime-identity.test.js +117 -0
  200. package/dist/__tests__/runtime-identity.test.js.map +1 -0
  201. package/dist/__tests__/session-pause-provisioning.test.js +6 -1
  202. package/dist/__tests__/session-pause-provisioning.test.js.map +1 -1
  203. package/dist/__tests__/session-record-disclosure.test.d.ts +24 -0
  204. package/dist/__tests__/session-record-disclosure.test.d.ts.map +1 -0
  205. package/dist/__tests__/session-record-disclosure.test.js +494 -0
  206. package/dist/__tests__/session-record-disclosure.test.js.map +1 -0
  207. package/dist/__tests__/session.test.js +35 -0
  208. package/dist/__tests__/session.test.js.map +1 -1
  209. package/dist/__tests__/slug-validation.test.js +27 -21
  210. package/dist/__tests__/slug-validation.test.js.map +1 -1
  211. package/dist/__tests__/standards-injection.test.d.ts +2 -0
  212. package/dist/__tests__/standards-injection.test.d.ts.map +1 -0
  213. package/dist/__tests__/standards-injection.test.js +179 -0
  214. package/dist/__tests__/standards-injection.test.js.map +1 -0
  215. package/dist/__tests__/start-interactive-role.test.d.ts +22 -0
  216. package/dist/__tests__/start-interactive-role.test.d.ts.map +1 -0
  217. package/dist/__tests__/start-interactive-role.test.js +204 -0
  218. package/dist/__tests__/start-interactive-role.test.js.map +1 -0
  219. package/dist/__tests__/start-team-identity.test.d.ts +25 -0
  220. package/dist/__tests__/start-team-identity.test.d.ts.map +1 -0
  221. package/dist/__tests__/start-team-identity.test.js +307 -0
  222. package/dist/__tests__/start-team-identity.test.js.map +1 -0
  223. package/dist/__tests__/team-memory-commands.test.js +142 -19
  224. package/dist/__tests__/team-memory-commands.test.js.map +1 -1
  225. package/dist/__tests__/template-sync.test.d.ts +19 -0
  226. package/dist/__tests__/template-sync.test.d.ts.map +1 -0
  227. package/dist/__tests__/template-sync.test.js +270 -0
  228. package/dist/__tests__/template-sync.test.js.map +1 -0
  229. package/dist/__tests__/test-project.test.d.ts +18 -0
  230. package/dist/__tests__/test-project.test.d.ts.map +1 -0
  231. package/dist/__tests__/test-project.test.js +465 -0
  232. package/dist/__tests__/test-project.test.js.map +1 -0
  233. package/dist/__tests__/usage-per-call-grouping.test.d.ts +25 -0
  234. package/dist/__tests__/usage-per-call-grouping.test.d.ts.map +1 -0
  235. package/dist/__tests__/usage-per-call-grouping.test.js +952 -0
  236. package/dist/__tests__/usage-per-call-grouping.test.js.map +1 -0
  237. package/dist/__tests__/verify-hooks-check-all.test.d.ts +32 -0
  238. package/dist/__tests__/verify-hooks-check-all.test.d.ts.map +1 -0
  239. package/dist/__tests__/verify-hooks-check-all.test.js +553 -0
  240. package/dist/__tests__/verify-hooks-check-all.test.js.map +1 -0
  241. package/dist/__tests__/worktree-sync-fixture.test.d.ts +17 -0
  242. package/dist/__tests__/worktree-sync-fixture.test.d.ts.map +1 -0
  243. package/dist/__tests__/worktree-sync-fixture.test.js +519 -0
  244. package/dist/__tests__/worktree-sync-fixture.test.js.map +1 -0
  245. package/dist/__tests__/worktree-sync-hardening.test.d.ts +13 -0
  246. package/dist/__tests__/worktree-sync-hardening.test.d.ts.map +1 -0
  247. package/dist/__tests__/worktree-sync-hardening.test.js +919 -0
  248. package/dist/__tests__/worktree-sync-hardening.test.js.map +1 -0
  249. package/dist/__tests__/worktree-sync-shell-free.test.d.ts +25 -0
  250. package/dist/__tests__/worktree-sync-shell-free.test.d.ts.map +1 -0
  251. package/dist/__tests__/worktree-sync-shell-free.test.js +185 -0
  252. package/dist/__tests__/worktree-sync-shell-free.test.js.map +1 -0
  253. package/dist/__tests__/worktree.test.js +75 -1
  254. package/dist/__tests__/worktree.test.js.map +1 -1
  255. package/dist/agent-config/.mx-config-generation.json +2 -2
  256. package/dist/agent-config/AGENTS.md.template +2 -2
  257. package/dist/agent-config/agents/bar-raiser.md +34 -1
  258. package/dist/agent-config/agents/red-team.md +34 -1
  259. package/dist/agent-config/agents/security-reviewer.md +22 -1
  260. package/dist/agent-config/claude-md/CLAUDE.core.md +6 -1
  261. package/dist/agent-config/claude-md/CLAUDE.overlay.memnexus.md +1 -3
  262. package/dist/agent-config/coordination-rosters.generated.json +10 -0
  263. package/dist/agent-config/hooks/HOOK-TIMEOUTS.md +27 -1
  264. package/dist/agent-config/hooks/OR-TRUE-AUDIT.md +8 -8
  265. package/dist/agent-config/hooks/auto-capture-precompact.sh +180 -83
  266. package/dist/agent-config/hooks/auto-capture-session-end.sh +216 -87
  267. package/dist/agent-config/hooks/auto-checkpoint.sh +75 -5
  268. package/dist/agent-config/hooks/coordination-brief.sh +290 -245
  269. package/dist/agent-config/hooks/deploy-verification-reminder.sh +359 -22
  270. package/dist/agent-config/hooks/git-mutation-guard.sh +85 -13
  271. package/dist/agent-config/hooks/observability-sync.sh +46 -9
  272. package/dist/agent-config/hooks/session-idle-gate.sh +177 -12
  273. package/dist/agent-config/hooks/subagent-write-guard.sh +670 -0
  274. package/dist/agent-config/hooks/worktree-guard.sh +36 -7
  275. package/dist/agent-config/settings.json +15 -2
  276. package/dist/agent-config/shared/creation-pr-review-checklist.md +317 -0
  277. package/dist/commands/bootstrap.d.ts.map +1 -1
  278. package/dist/commands/bootstrap.js +22 -10
  279. package/dist/commands/bootstrap.js.map +1 -1
  280. package/dist/commands/config-sync.d.ts +37 -0
  281. package/dist/commands/config-sync.d.ts.map +1 -1
  282. package/dist/commands/config-sync.js +36 -18
  283. package/dist/commands/config-sync.js.map +1 -1
  284. package/dist/commands/config.d.ts.map +1 -1
  285. package/dist/commands/config.js +28 -1
  286. package/dist/commands/config.js.map +1 -1
  287. package/dist/commands/coordination.d.ts +150 -8
  288. package/dist/commands/coordination.d.ts.map +1 -1
  289. package/dist/commands/coordination.js +524 -25
  290. package/dist/commands/coordination.js.map +1 -1
  291. package/dist/commands/create.d.ts +922 -1
  292. package/dist/commands/create.d.ts.map +1 -1
  293. package/dist/commands/create.js +4934 -345
  294. package/dist/commands/create.js.map +1 -1
  295. package/dist/commands/dashboard.d.ts.map +1 -1
  296. package/dist/commands/dashboard.js +10 -2
  297. package/dist/commands/dashboard.js.map +1 -1
  298. package/dist/commands/decision.d.ts +20 -0
  299. package/dist/commands/decision.d.ts.map +1 -0
  300. package/dist/commands/decision.js +54 -0
  301. package/dist/commands/decision.js.map +1 -0
  302. package/dist/commands/digest.d.ts.map +1 -1
  303. package/dist/commands/digest.js +91 -7
  304. package/dist/commands/digest.js.map +1 -1
  305. package/dist/commands/fleet-tmux.js +1 -1
  306. package/dist/commands/fleet-tmux.js.map +1 -1
  307. package/dist/commands/init.d.ts +8 -0
  308. package/dist/commands/init.d.ts.map +1 -1
  309. package/dist/commands/init.js +26 -1
  310. package/dist/commands/init.js.map +1 -1
  311. package/dist/commands/list.d.ts +32 -1
  312. package/dist/commands/list.d.ts.map +1 -1
  313. package/dist/commands/list.js +98 -5
  314. package/dist/commands/list.js.map +1 -1
  315. package/dist/commands/monitor.d.ts.map +1 -1
  316. package/dist/commands/monitor.js +8 -2
  317. package/dist/commands/monitor.js.map +1 -1
  318. package/dist/commands/new.d.ts +2 -0
  319. package/dist/commands/new.d.ts.map +1 -1
  320. package/dist/commands/new.js +114 -21
  321. package/dist/commands/new.js.map +1 -1
  322. package/dist/commands/report.d.ts +33 -0
  323. package/dist/commands/report.d.ts.map +1 -0
  324. package/dist/commands/report.js +73 -0
  325. package/dist/commands/report.js.map +1 -0
  326. package/dist/commands/session.js +1 -1
  327. package/dist/commands/session.js.map +1 -1
  328. package/dist/commands/start.d.ts +42 -0
  329. package/dist/commands/start.d.ts.map +1 -1
  330. package/dist/commands/start.js +183 -8
  331. package/dist/commands/start.js.map +1 -1
  332. package/dist/commands/sync.d.ts +57 -0
  333. package/dist/commands/sync.d.ts.map +1 -1
  334. package/dist/commands/sync.js +117 -3
  335. package/dist/commands/sync.js.map +1 -1
  336. package/dist/commands/update.d.ts +13 -1
  337. package/dist/commands/update.d.ts.map +1 -1
  338. package/dist/commands/update.js +50 -1
  339. package/dist/commands/update.js.map +1 -1
  340. package/dist/commands/usage.d.ts +64 -0
  341. package/dist/commands/usage.d.ts.map +1 -1
  342. package/dist/commands/usage.js +96 -3
  343. package/dist/commands/usage.js.map +1 -1
  344. package/dist/commands/verify-hooks.d.ts +37 -1
  345. package/dist/commands/verify-hooks.d.ts.map +1 -1
  346. package/dist/commands/verify-hooks.js +114 -2
  347. package/dist/commands/verify-hooks.js.map +1 -1
  348. package/dist/commands/window.d.ts +10 -0
  349. package/dist/commands/window.d.ts.map +1 -0
  350. package/dist/commands/window.js +265 -0
  351. package/dist/commands/window.js.map +1 -0
  352. package/dist/commands/worktree-sync.d.ts +54 -0
  353. package/dist/commands/worktree-sync.d.ts.map +1 -0
  354. package/dist/commands/worktree-sync.js +135 -0
  355. package/dist/commands/worktree-sync.js.map +1 -0
  356. package/dist/index.d.ts.map +1 -1
  357. package/dist/index.js +189 -14
  358. package/dist/index.js.map +1 -1
  359. package/dist/lib/agent-session.d.ts +12 -0
  360. package/dist/lib/agent-session.d.ts.map +1 -1
  361. package/dist/lib/agent-session.js +189 -42
  362. package/dist/lib/agent-session.js.map +1 -1
  363. package/dist/lib/behavioral-injection.d.ts +9 -0
  364. package/dist/lib/behavioral-injection.d.ts.map +1 -1
  365. package/dist/lib/behavioral-injection.js +10 -1
  366. package/dist/lib/behavioral-injection.js.map +1 -1
  367. package/dist/lib/catalog.d.ts +321 -2
  368. package/dist/lib/catalog.d.ts.map +1 -1
  369. package/dist/lib/catalog.js +490 -11
  370. package/dist/lib/catalog.js.map +1 -1
  371. package/dist/lib/claude.d.ts +113 -23
  372. package/dist/lib/claude.d.ts.map +1 -1
  373. package/dist/lib/claude.js +498 -32
  374. package/dist/lib/claude.js.map +1 -1
  375. package/dist/lib/cli-build.d.ts +172 -0
  376. package/dist/lib/cli-build.d.ts.map +1 -0
  377. package/dist/lib/cli-build.js +654 -0
  378. package/dist/lib/cli-build.js.map +1 -0
  379. package/dist/lib/code-context-file.d.ts +109 -0
  380. package/dist/lib/code-context-file.d.ts.map +1 -0
  381. package/dist/lib/code-context-file.js +219 -0
  382. package/dist/lib/code-context-file.js.map +1 -0
  383. package/dist/lib/code-context-file.test.d.ts +19 -0
  384. package/dist/lib/code-context-file.test.d.ts.map +1 -0
  385. package/dist/lib/code-context-file.test.js +202 -0
  386. package/dist/lib/code-context-file.test.js.map +1 -0
  387. package/dist/lib/config-fidelity.d.ts +40 -20
  388. package/dist/lib/config-fidelity.d.ts.map +1 -1
  389. package/dist/lib/config-fidelity.js +144 -56
  390. package/dist/lib/config-fidelity.js.map +1 -1
  391. package/dist/lib/coordination-client.d.ts +101 -0
  392. package/dist/lib/coordination-client.d.ts.map +1 -1
  393. package/dist/lib/coordination-client.js +232 -8
  394. package/dist/lib/coordination-client.js.map +1 -1
  395. package/dist/lib/coordination-token.d.ts +333 -6
  396. package/dist/lib/coordination-token.d.ts.map +1 -1
  397. package/dist/lib/coordination-token.js +875 -52
  398. package/dist/lib/coordination-token.js.map +1 -1
  399. package/dist/lib/decision-check.d.ts +48 -0
  400. package/dist/lib/decision-check.d.ts.map +1 -0
  401. package/dist/lib/decision-check.js +149 -0
  402. package/dist/lib/decision-check.js.map +1 -0
  403. package/dist/lib/fleet-data.d.ts +34 -0
  404. package/dist/lib/fleet-data.d.ts.map +1 -1
  405. package/dist/lib/fleet-data.js +37 -9
  406. package/dist/lib/fleet-data.js.map +1 -1
  407. package/dist/lib/fleet-render.js +1 -1
  408. package/dist/lib/fleet-render.js.map +1 -1
  409. package/dist/lib/git-identity.d.ts +302 -0
  410. package/dist/lib/git-identity.d.ts.map +1 -0
  411. package/dist/lib/git-identity.js +546 -0
  412. package/dist/lib/git-identity.js.map +1 -0
  413. package/dist/lib/harness/console/announce.d.ts +45 -0
  414. package/dist/lib/harness/console/announce.d.ts.map +1 -0
  415. package/dist/lib/harness/console/announce.js +48 -0
  416. package/dist/lib/harness/console/announce.js.map +1 -0
  417. package/dist/lib/harness/console/announce.test.d.ts +2 -0
  418. package/dist/lib/harness/console/announce.test.d.ts.map +1 -0
  419. package/dist/lib/harness/console/announce.test.js +104 -0
  420. package/dist/lib/harness/console/announce.test.js.map +1 -0
  421. package/dist/lib/harness/console/by-session.d.ts +50 -0
  422. package/dist/lib/harness/console/by-session.d.ts.map +1 -0
  423. package/dist/lib/harness/console/by-session.js +83 -0
  424. package/dist/lib/harness/console/by-session.js.map +1 -0
  425. package/dist/lib/harness/console/by-session.test.d.ts +2 -0
  426. package/dist/lib/harness/console/by-session.test.d.ts.map +1 -0
  427. package/dist/lib/harness/console/by-session.test.js +86 -0
  428. package/dist/lib/harness/console/by-session.test.js.map +1 -0
  429. package/dist/lib/harness/console/console.d.ts +67 -0
  430. package/dist/lib/harness/console/console.d.ts.map +1 -0
  431. package/dist/lib/harness/console/console.js +373 -0
  432. package/dist/lib/harness/console/console.js.map +1 -0
  433. package/dist/lib/harness/console/console.test.d.ts +2 -0
  434. package/dist/lib/harness/console/console.test.d.ts.map +1 -0
  435. package/dist/lib/harness/console/console.test.js +269 -0
  436. package/dist/lib/harness/console/console.test.js.map +1 -0
  437. package/dist/lib/harness/console/decision-request.d.ts +32 -0
  438. package/dist/lib/harness/console/decision-request.d.ts.map +1 -0
  439. package/dist/lib/harness/console/decision-request.js +112 -0
  440. package/dist/lib/harness/console/decision-request.js.map +1 -0
  441. package/dist/lib/harness/console/decision-request.test.d.ts +2 -0
  442. package/dist/lib/harness/console/decision-request.test.d.ts.map +1 -0
  443. package/dist/lib/harness/console/decision-request.test.js +75 -0
  444. package/dist/lib/harness/console/decision-request.test.js.map +1 -0
  445. package/dist/lib/harness/console/fixtures.d.ts +16 -0
  446. package/dist/lib/harness/console/fixtures.d.ts.map +1 -0
  447. package/dist/lib/harness/console/fixtures.js +49 -0
  448. package/dist/lib/harness/console/fixtures.js.map +1 -0
  449. package/dist/lib/harness/console/index.d.ts +15 -0
  450. package/dist/lib/harness/console/index.d.ts.map +1 -0
  451. package/dist/lib/harness/console/index.js +14 -0
  452. package/dist/lib/harness/console/index.js.map +1 -0
  453. package/dist/lib/harness/console/rank.d.ts +73 -0
  454. package/dist/lib/harness/console/rank.d.ts.map +1 -0
  455. package/dist/lib/harness/console/rank.js +113 -0
  456. package/dist/lib/harness/console/rank.js.map +1 -0
  457. package/dist/lib/harness/console/rank.test.d.ts +2 -0
  458. package/dist/lib/harness/console/rank.test.d.ts.map +1 -0
  459. package/dist/lib/harness/console/rank.test.js +124 -0
  460. package/dist/lib/harness/console/rank.test.js.map +1 -0
  461. package/dist/lib/harness/console/render.d.ts +22 -0
  462. package/dist/lib/harness/console/render.d.ts.map +1 -0
  463. package/dist/lib/harness/console/render.js +65 -0
  464. package/dist/lib/harness/console/render.js.map +1 -0
  465. package/dist/lib/harness/console/render.test.d.ts +2 -0
  466. package/dist/lib/harness/console/render.test.d.ts.map +1 -0
  467. package/dist/lib/harness/console/render.test.js +96 -0
  468. package/dist/lib/harness/console/render.test.js.map +1 -0
  469. package/dist/lib/harness/console/replay-cli.test.d.ts +2 -0
  470. package/dist/lib/harness/console/replay-cli.test.d.ts.map +1 -0
  471. package/dist/lib/harness/console/replay-cli.test.js +96 -0
  472. package/dist/lib/harness/console/replay-cli.test.js.map +1 -0
  473. package/dist/lib/harness/console/replay.d.ts +36 -0
  474. package/dist/lib/harness/console/replay.d.ts.map +1 -0
  475. package/dist/lib/harness/console/replay.js +59 -0
  476. package/dist/lib/harness/console/replay.js.map +1 -0
  477. package/dist/lib/harness/console/replay.test.d.ts +2 -0
  478. package/dist/lib/harness/console/replay.test.d.ts.map +1 -0
  479. package/dist/lib/harness/console/replay.test.js +81 -0
  480. package/dist/lib/harness/console/replay.test.js.map +1 -0
  481. package/dist/lib/harness/console/turn-reader.d.ts +50 -0
  482. package/dist/lib/harness/console/turn-reader.d.ts.map +1 -0
  483. package/dist/lib/harness/console/turn-reader.js +184 -0
  484. package/dist/lib/harness/console/turn-reader.js.map +1 -0
  485. package/dist/lib/harness/console/turn-reader.test.d.ts +2 -0
  486. package/dist/lib/harness/console/turn-reader.test.d.ts.map +1 -0
  487. package/dist/lib/harness/console/turn-reader.test.js +108 -0
  488. package/dist/lib/harness/console/turn-reader.test.js.map +1 -0
  489. package/dist/lib/harness/console/types.d.ts +109 -0
  490. package/dist/lib/harness/console/types.d.ts.map +1 -0
  491. package/dist/lib/harness/console/types.js +2 -0
  492. package/dist/lib/harness/console/types.js.map +1 -0
  493. package/dist/lib/harness/contract.d.ts +229 -0
  494. package/dist/lib/harness/contract.d.ts.map +1 -0
  495. package/dist/lib/harness/contract.js +22 -0
  496. package/dist/lib/harness/contract.js.map +1 -0
  497. package/dist/lib/harness/credential.d.ts +23 -0
  498. package/dist/lib/harness/credential.d.ts.map +1 -0
  499. package/dist/lib/harness/credential.js +81 -0
  500. package/dist/lib/harness/credential.js.map +1 -0
  501. package/dist/lib/harness/credential.test.d.ts +2 -0
  502. package/dist/lib/harness/credential.test.d.ts.map +1 -0
  503. package/dist/lib/harness/credential.test.js +74 -0
  504. package/dist/lib/harness/credential.test.js.map +1 -0
  505. package/dist/lib/harness/evaluate.d.ts +390 -0
  506. package/dist/lib/harness/evaluate.d.ts.map +1 -0
  507. package/dist/lib/harness/evaluate.js +988 -0
  508. package/dist/lib/harness/evaluate.js.map +1 -0
  509. package/dist/lib/harness/evaluate.test.d.ts +2 -0
  510. package/dist/lib/harness/evaluate.test.d.ts.map +1 -0
  511. package/dist/lib/harness/evaluate.test.js +621 -0
  512. package/dist/lib/harness/evaluate.test.js.map +1 -0
  513. package/dist/lib/harness/extract.d.ts +152 -0
  514. package/dist/lib/harness/extract.d.ts.map +1 -0
  515. package/dist/lib/harness/extract.js +1601 -0
  516. package/dist/lib/harness/extract.js.map +1 -0
  517. package/dist/lib/harness/gate.d.ts +48 -0
  518. package/dist/lib/harness/gate.d.ts.map +1 -0
  519. package/dist/lib/harness/gate.js +60 -0
  520. package/dist/lib/harness/gate.js.map +1 -0
  521. package/dist/lib/harness/gate.test.d.ts +2 -0
  522. package/dist/lib/harness/gate.test.d.ts.map +1 -0
  523. package/dist/lib/harness/gate.test.js +111 -0
  524. package/dist/lib/harness/gate.test.js.map +1 -0
  525. package/dist/lib/harness/self-check.d.ts +59 -0
  526. package/dist/lib/harness/self-check.d.ts.map +1 -0
  527. package/dist/lib/harness/self-check.js +56 -0
  528. package/dist/lib/harness/self-check.js.map +1 -0
  529. package/dist/lib/harness/self-check.test.d.ts +2 -0
  530. package/dist/lib/harness/self-check.test.d.ts.map +1 -0
  531. package/dist/lib/harness/self-check.test.js +43 -0
  532. package/dist/lib/harness/self-check.test.js.map +1 -0
  533. package/dist/lib/harness/transcript.d.ts +65 -0
  534. package/dist/lib/harness/transcript.d.ts.map +1 -0
  535. package/dist/lib/harness/transcript.js +144 -0
  536. package/dist/lib/harness/transcript.js.map +1 -0
  537. package/dist/lib/harness/transcript.test.d.ts +2 -0
  538. package/dist/lib/harness/transcript.test.d.ts.map +1 -0
  539. package/dist/lib/harness/transcript.test.js +118 -0
  540. package/dist/lib/harness/transcript.test.js.map +1 -0
  541. package/dist/lib/harness-wiring.d.ts +145 -0
  542. package/dist/lib/harness-wiring.d.ts.map +1 -0
  543. package/dist/lib/harness-wiring.js +280 -0
  544. package/dist/lib/harness-wiring.js.map +1 -0
  545. package/dist/lib/hook-staleness.d.ts +95 -0
  546. package/dist/lib/hook-staleness.d.ts.map +1 -0
  547. package/dist/lib/hook-staleness.js +304 -0
  548. package/dist/lib/hook-staleness.js.map +1 -0
  549. package/dist/lib/jsonl.d.ts +270 -2
  550. package/dist/lib/jsonl.d.ts.map +1 -1
  551. package/dist/lib/jsonl.js +472 -76
  552. package/dist/lib/jsonl.js.map +1 -1
  553. package/dist/lib/memory.d.ts +350 -23
  554. package/dist/lib/memory.d.ts.map +1 -1
  555. package/dist/lib/memory.js +751 -38
  556. package/dist/lib/memory.js.map +1 -1
  557. package/dist/lib/otel-env.d.ts +90 -0
  558. package/dist/lib/otel-env.d.ts.map +1 -0
  559. package/dist/lib/otel-env.js +98 -0
  560. package/dist/lib/otel-env.js.map +1 -0
  561. package/dist/lib/project-config.d.ts +167 -0
  562. package/dist/lib/project-config.d.ts.map +1 -1
  563. package/dist/lib/project-config.js +321 -5
  564. package/dist/lib/project-config.js.map +1 -1
  565. package/dist/lib/projects-registry.d.ts +82 -0
  566. package/dist/lib/projects-registry.d.ts.map +1 -0
  567. package/dist/lib/projects-registry.js +145 -0
  568. package/dist/lib/projects-registry.js.map +1 -0
  569. package/dist/lib/projects-registry.test.d.ts +2 -0
  570. package/dist/lib/projects-registry.test.d.ts.map +1 -0
  571. package/dist/lib/projects-registry.test.js +176 -0
  572. package/dist/lib/projects-registry.test.js.map +1 -0
  573. package/dist/lib/repo-guard-scope.d.ts +126 -0
  574. package/dist/lib/repo-guard-scope.d.ts.map +1 -0
  575. package/dist/lib/repo-guard-scope.js +249 -0
  576. package/dist/lib/repo-guard-scope.js.map +1 -0
  577. package/dist/lib/report-format.d.ts +132 -0
  578. package/dist/lib/report-format.d.ts.map +1 -0
  579. package/dist/lib/report-format.js +317 -0
  580. package/dist/lib/report-format.js.map +1 -0
  581. package/dist/lib/roster.d.ts +99 -0
  582. package/dist/lib/roster.d.ts.map +1 -0
  583. package/dist/lib/roster.js +336 -0
  584. package/dist/lib/roster.js.map +1 -0
  585. package/dist/lib/roster.test.d.ts +15 -0
  586. package/dist/lib/roster.test.d.ts.map +1 -0
  587. package/dist/lib/roster.test.js +299 -0
  588. package/dist/lib/roster.test.js.map +1 -0
  589. package/dist/lib/runtime/codex-adapter.d.ts.map +1 -1
  590. package/dist/lib/runtime/codex-adapter.js +5 -0
  591. package/dist/lib/runtime/codex-adapter.js.map +1 -1
  592. package/dist/lib/runtime/codex-config.d.ts +129 -0
  593. package/dist/lib/runtime/codex-config.d.ts.map +1 -1
  594. package/dist/lib/runtime/codex-config.js +225 -0
  595. package/dist/lib/runtime/codex-config.js.map +1 -1
  596. package/dist/lib/runtime/identity.d.ts +72 -0
  597. package/dist/lib/runtime/identity.d.ts.map +1 -0
  598. package/dist/lib/runtime/identity.js +128 -0
  599. package/dist/lib/runtime/identity.js.map +1 -0
  600. package/dist/lib/standards.d.ts +99 -0
  601. package/dist/lib/standards.d.ts.map +1 -0
  602. package/dist/lib/standards.js +201 -0
  603. package/dist/lib/standards.js.map +1 -0
  604. package/dist/lib/team-identity.d.ts +134 -0
  605. package/dist/lib/team-identity.d.ts.map +1 -0
  606. package/dist/lib/team-identity.js +193 -0
  607. package/dist/lib/team-identity.js.map +1 -0
  608. package/dist/lib/templates.d.ts +29 -2
  609. package/dist/lib/templates.d.ts.map +1 -1
  610. package/dist/lib/templates.js +1042 -82
  611. package/dist/lib/templates.js.map +1 -1
  612. package/dist/lib/terminal-ui.d.ts.map +1 -1
  613. package/dist/lib/terminal-ui.js +12 -1
  614. package/dist/lib/terminal-ui.js.map +1 -1
  615. package/dist/lib/test-project.d.ts +95 -0
  616. package/dist/lib/test-project.d.ts.map +1 -0
  617. package/dist/lib/test-project.js +103 -0
  618. package/dist/lib/test-project.js.map +1 -0
  619. package/dist/lib/vault.d.ts +60 -0
  620. package/dist/lib/vault.d.ts.map +1 -0
  621. package/dist/lib/vault.js +102 -0
  622. package/dist/lib/vault.js.map +1 -0
  623. package/dist/lib/vault.test.d.ts +17 -0
  624. package/dist/lib/vault.test.d.ts.map +1 -0
  625. package/dist/lib/vault.test.js +169 -0
  626. package/dist/lib/vault.test.js.map +1 -0
  627. package/dist/lib/window-view.d.ts +63 -0
  628. package/dist/lib/window-view.d.ts.map +1 -0
  629. package/dist/lib/window-view.js +217 -0
  630. package/dist/lib/window-view.js.map +1 -0
  631. package/dist/lib/window-view.test.d.ts +2 -0
  632. package/dist/lib/window-view.test.d.ts.map +1 -0
  633. package/dist/lib/window-view.test.js +168 -0
  634. package/dist/lib/window-view.test.js.map +1 -0
  635. package/dist/lib/worktree-sync.d.ts +439 -0
  636. package/dist/lib/worktree-sync.d.ts.map +1 -0
  637. package/dist/lib/worktree-sync.js +1167 -0
  638. package/dist/lib/worktree-sync.js.map +1 -0
  639. package/dist/lib/worktree.d.ts +58 -1
  640. package/dist/lib/worktree.d.ts.map +1 -1
  641. package/dist/lib/worktree.js +91 -4
  642. package/dist/lib/worktree.js.map +1 -1
  643. package/dist/standards/decision-request.md +98 -0
  644. package/dist/standards/fail-loud-standard.md +495 -0
  645. package/dist/standards/po-communication-standard.md +126 -0
  646. package/dist/standards/report-format.md +128 -0
  647. package/dist/standards/writing-standard.md +382 -0
  648. package/package.json +3 -2
  649. package/scripts/generate-claude.mjs +119 -46
@@ -0,0 +1,128 @@
1
+ # Report format
2
+
3
+ **Status:** Active. Injected into every team's `CLAUDE.local.md` on every conversation turn.
4
+ **Enforced by:** `mx-agent report check`, which refuses a report missing a section.
5
+ **Skeleton:** `mx-agent report new`, which writes the seven headings for you.
6
+
7
+ ## Why this file exists
8
+
9
+ Across 12 real sessions and 190 moments where an agent needed the operator, 3 reached him.
10
+ 25 of the 28 moments classed as an explicit question were agents writing that they needed a
11
+ decision, in prose, into a channel nobody reads. The source is
12
+ `docs/fleet-behavior-from-transcripts.md` finding 3c.
13
+
14
+ The same repository gained roughly forty commits and nine documents in two days, and the
15
+ person it was written for asked four times what the work was. Volume is not legibility. The
16
+ defect is the format, so the format is the fix.
17
+
18
+ Two sections do most of the work. Section 3 makes a finding challengeable, because it
19
+ states the command a reader can re-run. Section 5 makes a wrong finding cheap to overturn,
20
+ because it tells the reader where to poke first. This repository arrived at section 3 by
21
+ accident, after publishing eight figures in one week that were correct against the wrong
22
+ thing.
23
+
24
+ ---
25
+
26
+ ## The seven sections
27
+
28
+ The block below is the text injected into every conversation turn.
29
+
30
+ <!-- behavioral-start -->
31
+
32
+ Every report answers these seven, in this order, with these headings. The framework refuses
33
+ a report that omits one or leaves one empty.
34
+
35
+ **1. What I was asked.** One sentence, plus the rung of the goal ladder it serves. Name
36
+ Level 1, Level 2 or Level 3 from `.mx-agent/goals.md`. An agent that cannot name its rung
37
+ has an assignment nobody can evaluate, and that is a reason to stop and ask.
38
+
39
+ **2. What I did.** The actions, not the reasoning. What you ran, read, wrote and changed.
40
+
41
+ **3. What I found.** Each claim states the command, the file and line, or the query that
42
+ produced it. A claim with no source is an opinion and belongs in section 4. This is the
43
+ section that makes a finding challengeable, and it is the one that catches your own errors
44
+ before a reader does.
45
+
46
+ Copy the headline claim of this section into your leader-state memory as a
47
+ `Last finding:` line in the Async Status Block, alongside `Decision needed:`. One line, and
48
+ the claim rather than the topic: "the gate refuses 62.9% of the 2,043-command corpus", not
49
+ "looked at gate coverage". This is the only part of a report that reaches the operator
50
+ without them opening the session. `mx-agent window` reads that line, and nothing else knows
51
+ your finding exists. Write `none` when the iteration produced no finding worth acting on,
52
+ because an absent line and a quiet iteration have to be told apart.
53
+
54
+ **4. What I am not sure about.** State it rather than omitting it. Passed, failed and
55
+ could-not-run are three outcomes, and anything you could not run belongs here by name.
56
+
57
+ **5. What would change my mind.** The specific observation that would overturn each
58
+ finding. Not "more data". Name the file, the run, or the number that would do it. A finding
59
+ with nothing in this section is a finding nobody can cheaply check.
60
+
61
+ **6. What I need from you.** A decision, or the word Nothing. Do not write a question into
62
+ prose elsewhere and hope it is read. This section is the channel.
63
+
64
+ **7. What I would do next.** What you would pick up, and why that and not something else.
65
+
66
+ Write to `mx-agent-system/standards/writing-standard.md` while filling these in. Both are
67
+ injected together and they apply to the same text.
68
+
69
+ <!-- behavioral-end -->
70
+
71
+ ---
72
+
73
+ ## What the framework checks
74
+
75
+ `mx-agent report check <file>` refuses when any of these hold. It mirrors the provisioning
76
+ refusal for a roleguide with no behavioral block: the check runs at the moment a person is
77
+ looking, and it refuses rather than warns.
78
+
79
+ | Check | Refuses when |
80
+ |---|---|
81
+ | Section present | One of the seven headings is absent |
82
+ | Section order | The headings appear out of order |
83
+ | Section non-empty | A heading has no body under it |
84
+ | Goal rung | Section 1 names no level from `.mx-agent/goals.md` |
85
+ | Evidence | Section 3 states no command, path or `file:line` |
86
+ | Duplicates | A heading appears more than once |
87
+
88
+ The check reads headings tolerantly. Any heading level works, the leading number is
89
+ optional, and matching ignores case and trailing punctuation. A report is refused for
90
+ missing a section, never for formatting one.
91
+
92
+ ### What it does not check
93
+
94
+ It cannot tell whether a command in section 3 is the command that produced the number. That
95
+ is the failure mode `.mx-agent/lessons.md` L2 records, and only re-running catches it.
96
+
97
+ It cannot tell whether section 5 names a real disconfirming observation or a placeholder. A
98
+ reader can, in one glance, which is the point of putting it in a fixed position.
99
+
100
+ It does not read your prose for the writing standard. Nothing counts em dashes or banned
101
+ verbs at check time.
102
+
103
+ ---
104
+
105
+ ## The skeleton
106
+
107
+ `mx-agent report new` writes the seven headings with a one-line prompt under each. The
108
+ headings come from one list in `mx-agent-system/cli/src/lib/report-format.ts`, and a test
109
+ asserts this document names the same seven, so the two cannot drift.
110
+
111
+ ---
112
+
113
+ ## Worked example of section 3
114
+
115
+ Weak, and it would pass the check while failing the reader:
116
+
117
+ > The guards refuse most of what they should.
118
+
119
+ Strong:
120
+
121
+ > The guards refuse 28.6% of the commands they exist to refuse: 502 of 1,756, net of 287
122
+ > `GIT_EXPERT=1` overrides. Zero could not run.
123
+ > `node evidence-tools/guard-replay/summary.mjs "$STAGE"`
124
+ > Method and full tables in `docs/guard-coverage.md`.
125
+
126
+ The second version states the number, the denominator, what was excluded from it, the
127
+ command, and where the method is written down. It also separates could-not-run from
128
+ refused. A reader who doubts it has five ways in. A reader of the first has none.
@@ -0,0 +1,382 @@
1
+ # Writing standard
2
+
3
+ **Status:** Active. Injected into every team's `CLAUDE.local.md` on every conversation turn.
4
+ **Owner:** the product owner of this repository.
5
+ **Applies to:** every document, report, commit message and pull request body an agent writes.
6
+
7
+ ## Why this file exists
8
+
9
+ These rules ran on one person's memory until 2026-08-18. Agents learned them by being
10
+ corrected during conversation. Every new agent then rediscovered them the same way, and
11
+ the corrections cost a turn each.
12
+
13
+ The measured case for writing them down is in this repository's own history. The four
14
+ documents written after the rules were stated contain zero em dashes. The markdown written
15
+ before them contains 647, and 39 uses of the five banned verbs survive today.
16
+
17
+ ```sh
18
+ grep -ro "—" --include=*.md docs product .mx-agent proof-of-concepts | wc -l # 647
19
+ grep -rowE "arrives|carries|sits|lands|flows" --include=*.md \
20
+ docs product .mx-agent proof-of-concepts | wc -l # 39
21
+ grep -c "—" docs/legibility-plan.md .mx-agent/goals.md .mx-agent/lessons.md \
22
+ product/mx-agent-prd.md # 0 each
23
+ ```
24
+
25
+ Run on 2026-08-18 at commit `817a4ef`.
26
+
27
+ A rule nobody applies twice is an opinion. `product/mx-agent-prd.md:268`, "When we built a
28
+ mechanism, teams followed the practice", records the pattern, and adds that teams stopped
29
+ when we only wrote a rule. So this file is injected rather than filed.
30
+
31
+ ---
32
+
33
+ ## The rules
34
+
35
+ The block below is the text injected into every conversation turn. It starts at the marker
36
+ so that the injected copy states the rules and nothing else.
37
+
38
+ <!-- behavioral-start -->
39
+
40
+ **1. No em dashes.** Use a comma, a colon, or two sentences.
41
+
42
+ **2. No metaphor. A noun must be able to do the verb.** Ask whether the subject could
43
+ perform the action. A finding cannot carry. A limit cannot sit. A message cannot land.
44
+
45
+ **3. No motion or possession verbs for things that cannot move or hold.** The five that
46
+ recur here are `arrives`, `carries`, `sits`, `lands`, `flows`. Replace with what is true:
47
+ is, holds, states, records, bundles, stays, exists, reads.
48
+
49
+ **4. Name the thing rather than foreshadowing it.** Do not write "there is a problem here"
50
+ before the problem. State it, then explain it. Delete every sentence whose only job is to
51
+ announce the next one.
52
+
53
+ **5. No meta-commentary.** Do not describe the document inside the document. Do not defend
54
+ choices nobody questioned. Do not say what you are about to do.
55
+
56
+ **6. Active voice.** Name the actor. "Nothing fences pull request content" beats "pull
57
+ request content arrives unfenced". If the actor is unknown, that absence is the finding.
58
+
59
+ **7. Few adjectives.** An adjective that survives is one a reader could disagree with and
60
+ check. Cut the rest. Prefer the number to the adjective.
61
+
62
+ **8. Data before anecdote.** Lead with the measurement. The story explains the number, and
63
+ it never stands in for one.
64
+
65
+ **9. Every figure states a referenceable source.** A number publishes with the command, the
66
+ file and line, or the query that produced it. Eight figures in this repository were correct
67
+ against the wrong thing in one week, and the source line is what made them findable.
68
+ See `.mx-agent/lessons.md` L2. Rule 15 states the form any cross-file citation takes, and
69
+ it adds to this rule rather than relaxing it.
70
+
71
+ **10. No weasel words.** Ban `essentially`, `arguably`, `fairly`, `quite`, `somewhat`,
72
+ `it seems`, `it appears`, `in some sense`, `a number of`. State the claim, or state the
73
+ uncertainty as its own sentence with a reason.
74
+
75
+ **11. Never disparage another company, product or person.** Describe what a system does and
76
+ what it does not do. Comparison is allowed. Contempt is not.
77
+
78
+ **12. Assume internal writing becomes external.** A customer, an auditor or a court may
79
+ read it. That changes nothing you would write honestly, and it removes everything you would
80
+ not defend out loud.
81
+
82
+ **13. Around 14 words per sentence.** Long sentences hide the actor and the claim. A
83
+ sentence over 25 words is usually two sentences.
84
+
85
+ **14. Report could-not-run as its own outcome.** Passed, failed and could-not-run are three
86
+ results. Collapsing the third into either of the others is the defect in
87
+ `mx-agent-system/standards/fail-loud-standard.md`.
88
+
89
+ **15. A stale line citation still resolves.** It points at other content, and the reader
90
+ gets no signal. A citation names four things: the file, the line, an anchor, and the tree it
91
+ resolved against. The anchor is a heading or a short quoted phrase. The tree is a commit
92
+ SHA, or a branch name with the SHA or the date beside it. State it once per citation or once
93
+ per document. A branch name alone names no tree, because the branch moves.
94
+ `` `product/mx-agent-prd.md:1091`, "bootstrap also owns the shared framework core", resolved
95
+ against `origin/main` at `5d2bdb8` ``. Write every part, never fewer. A citation you quote
96
+ as an example, or list in a resolution record, names the file and the line only. A citation
97
+ that supports a claim names all four. A bare `` `:629` `` names no file and can pick up the
98
+ wrong one. The anchor is the text at the cited line. When the two disagree the anchor is
99
+ authoritative: re-resolve it and update the line, except inside a record. State the tree
100
+ only if you resolved the citation against it. A reviewer states the tree the review ran
101
+ against. Code is the exception: `file:line` stays, re-derived when you write it. Records are
102
+ dev-logs, outcome records, interview notes and merge comments. A memory is a record when it
103
+ states what was true at a time rather than what is true now. Never repair a citation inside
104
+ one, which would make the record claim an accuracy it did not have. Leave the original and
105
+ add a dated correction beside it. A new citation written into a record follows this rule in
106
+ full. This rule makes staleness loud rather than absent, and no check verifies that a
107
+ citation supports its claim.
108
+
109
+ <!-- behavioral-end -->
110
+
111
+ ---
112
+
113
+ ## Corrections from this repository
114
+
115
+ Each pair below is a real commit on `docs/mx-agent-prd`. The rule is abstract and the
116
+ correction is not, so read these first.
117
+
118
+ Rule 15 applies to this document, so here is what was resolved rather than a blanket claim.
119
+ Product resolved these against `origin/main` at `5d2bdb8` on 2026-09-02: the two
120
+ `product/mx-agent-prd.md` citations at `:268` and `:1091`, the `:609` and `:639` pair below,
121
+ `product-leader.md:323` with `product/mx-agent-prd.md:1004`, and the four
122
+ `team-builder.md` and `create.ts` citations. Bootstrap resolved its own figures against
123
+ `HEAD` at `49fa76d`, which is bootstrap's measurement and not product's. The
124
+ `mx-agent-system/cli/src/lib/jsonl.ts` pair below names a form and no line, so nothing there
125
+ resolves.
126
+
127
+ ### Rule 3, possession verbs
128
+
129
+ | | |
130
+ |---|---|
131
+ | Before | `node_modules` **carries** Linux bindings |
132
+ | After | `node_modules` **holds** Linux bindings |
133
+ | Commit | `817a4ef`, `.mx-agent/lessons.md` |
134
+
135
+ | | |
136
+ |---|---|
137
+ | Before | What share of findings **carry** a re-runnable source |
138
+ | After | What share of findings **state** a re-runnable source |
139
+ | Commit | `452c786`, `docs/legibility-plan.md` |
140
+
141
+ | | |
142
+ |---|---|
143
+ | Before | the half that runs on every session, and it **carries none of it** |
144
+ | After | the half that runs on every session, and it **records none of that** |
145
+ | Commit | `0101a4a`, `docs/outcomes-from-git.md` |
146
+
147
+ | | |
148
+ |---|---|
149
+ | Before | SDK version tracks the build it **carries** |
150
+ | After | SDK version tracks the build it **bundles** |
151
+ | Commit | `a03426d`, `proof-of-concepts/poc-1b-current-sdk.md` |
152
+
153
+ The replacement is never one word for all four. Each takes the verb that is literally true
154
+ of that subject. A directory holds, a finding states, a capture records, a package bundles.
155
+
156
+ ### Rule 3, motion verbs
157
+
158
+ | | |
159
+ |---|---|
160
+ | Before | Review comments hold the sharpest reasoning and **sit the furthest** from the code |
161
+ | After | Review comments hold the sharpest reasoning and **are the furthest** from the code |
162
+ | Commit | `7849351`, `product/mx-agent-prd.md` |
163
+
164
+ | | |
165
+ |---|---|
166
+ | Before | text planted once can **sit unused** and then steer a session weeks later |
167
+ | After | text planted once can **stay unused** and then steer a session weeks later |
168
+ | Commit | `7849351`, `product/mx-agent-prd.md` |
169
+
170
+ | | |
171
+ |---|---|
172
+ | Before | the limit **sits** far below what the hardware can handle |
173
+ | After | the limit **is** far below what the hardware can handle |
174
+ | Commit | `99c1197`, `product/mx-agent-prd.md` |
175
+
176
+ ### Rule 2, metaphor
177
+
178
+ | | |
179
+ |---|---|
180
+ | Before | Memory is not one feature **sitting next to** the others. It **sits underneath** them. |
181
+ | After | Memory is not one feature **among** the others. **The others depend on it.** |
182
+ | Commit | `99c1197`, `product/mx-agent-prd.md` |
183
+
184
+ | | |
185
+ |---|---|
186
+ | Before | an unusual rule can **carry a decision written as code** |
187
+ | After | an unusual rule can **express its decision as code** |
188
+ | Commit | `99c1197`, `product/mx-agent-prd.md` |
189
+
190
+ | | |
191
+ |---|---|
192
+ | Before | Sorting them by whether they have to **sit in the path of** an action and refuse it |
193
+ | After | Sorting them by whether they have to **intercept** an action and refuse it |
194
+ | Commit | `7849351`, `product/mx-agent-prd.md` |
195
+
196
+ The last pair shows why the rule pays. The metaphor took five words and the accurate verb
197
+ took one, and the accurate verb is also the word the code uses.
198
+
199
+ ### Rule 6, active voice
200
+
201
+ | | |
202
+ |---|---|
203
+ | Before | **Issue, pull-request, and dependency content arrive unfenced.** |
204
+ | After | **Nothing fences issue, pull-request, or dependency content.** |
205
+ | Commit | `99c1197`, `product/mx-agent-prd.md` |
206
+
207
+ | | |
208
+ |---|---|
209
+ | Before | so the delegation limits, the prior-art requirement, and the decision authority **arrive with every turn** |
210
+ | After | so **the model reads** the delegation limits, the prior-art requirement, and the decision authority **on every turn** |
211
+ | Commit | `99c1197`, `product/mx-agent-prd.md` |
212
+
213
+ Both corrections replace a motion verb and name an actor at the same time. That is the
214
+ usual case. A sentence that needs `arrives` is usually a sentence with no subject in it.
215
+
216
+ | | |
217
+ |---|---|
218
+ | Before | 13 agent definitions that each **carry** their own tool limits |
219
+ | After | 13 agent definitions that each **declare** their own tool limits |
220
+ | Commit | `99c1197`, `product/mx-agent-prd.md` |
221
+
222
+ ### Rule 5, meta-commentary
223
+
224
+ | | |
225
+ |---|---|
226
+ | Before | None of these were silently copied in to make the dependency "work," and none were silently broken. They are recorded here as split points. |
227
+ | After | They are recorded here as split points. |
228
+ | Commit | `99c1197`, `COUPLINGS.md` |
229
+
230
+ The deleted sentence answered an accusation nobody made. It also used scare quotes, which
231
+ are rule 10 wearing punctuation.
232
+
233
+ ### Rule 9, every figure states a source
234
+
235
+ The strongest example is a failure rather than a correction. Transcript size was published
236
+ as 138 MB because `find -exec du -cb | tail -1` returns the last batch instead of the sum.
237
+ The real figure is 2.26 GB. A write count inflated fivefold because a regex counted
238
+ `2>/dev/null` as a write.
239
+
240
+ Both were found by re-running the command next to the number. Neither was findable from the
241
+ number alone. `.mx-agent/lessons.md` L2 holds the full list.
242
+
243
+ ### Rule 15, a stale line citation still resolves
244
+
245
+ One edit to `product/mx-agent-prd.md` in PR #331 invalidated at least 88 `file:line`
246
+ citations across at least 16 live files and all four teams. Repository-wide, at least 54
247
+ files hold at least 166 citations into that one document, and at least 118 of the 130
248
+ distinct ones went stale. The product team measured this and caused it; issue #343 holds the
249
+ method and the reproduction.
250
+
251
+ Every figure above is a floor rather than a count. The search used one pattern, which
252
+ matches a citation naming its file. Gateway found a second form that names the file through
253
+ an earlier citation in the same paragraph, as a bare `` `:609` ``. That form occurs 108
254
+ times in `mx-agent-system/`, `product/` and `docs/`, and the first pattern did not see any
255
+ of them.
256
+
257
+ ```sh
258
+ grep -rnE '`:[0-9]+' --include=*.md mx-agent-system/ product/ docs/ | wc -l # 108
259
+ ```
260
+
261
+ Resolved against `origin/main` at `5d2bdb8` on 2026-09-02. This document adds seven matching
262
+ lines of its own, and the same command returns 115 in the working tree that produced this
263
+ paragraph. The command counts lines rather than occurrences, so the seven lines it counts
264
+ hold ten citations. State the limit of a method next to the number it produced, which is rule 9
265
+ applied to the measurement itself.
266
+
267
+ | | |
268
+ |---|---|
269
+ | Before | the same-function rule is at `product/mx-agent-prd.md:609` |
270
+ | After | the same-function rule is at `` `product/mx-agent-prd.md:639`, "An answer a command already computes is rendered from that same function" `` |
271
+ | Source | issue #343, resolved against `origin/main` at `5d2bdb8` on 2026-09-02 |
272
+
273
+ The before line still resolves. After the edit, `:609` holds a paragraph about Electron
274
+ install size and renderer sandboxing, which is real and plausible content, and five files
275
+ cited `:609` as the standing architecture constraint
276
+ (`git grep -lE 'mx-agent-prd\.md:609' 5d2bdb8 -- '*.md'`). A dead link returns an error and
277
+ a stale line citation returns prose.
278
+
279
+ That figure of five went stale during this document's own security review. PR #340 repaired
280
+ three of the files, and the same command returns 2 at `origin/main`, which was `1f510eb` at
281
+ that point. The original sentence stands because it names its tree. The two that remain are
282
+ a dev-log and a set of draft notes, which rule 15 tells nobody to repair.
283
+
284
+ | | |
285
+ |---|---|
286
+ | Before | an approved roleguide correction cites two lines of `mx-agent-system/cli/src/lib/jsonl.ts` |
287
+ | After | the same two citations, plus "resolved against `origin/main` at `<sha>`, `<time>`" |
288
+ | Source | gateway, in coordination with bootstrap and product, 2026-09-02. PR #325 added 1,757 lines, 467 of them in `jsonl.ts` (`gh pr view 325 --json additions,files`, run 2026-09-02) |
289
+
290
+ The citations keep their line numbers because they name code. Gateway gave the reason: a
291
+ reader opens a source file in an editor that jumps to a line, and one expression can appear
292
+ many times in one file, so a quoted expression locates nothing. An edit shifts prose as a
293
+ block and a code citation names one expression, which is the distinction the rule draws.
294
+
295
+ PR #325 merged hours after that review approved the citations. Gateway stated the general
296
+ case: a review is valid against the tree it was performed on, and nothing in the artifact
297
+ records which tree that was. Bootstrap and product then resolved the same citation to two
298
+ different line numbers on the same day, because bootstrap held unpushed work. Neither team
299
+ was wrong, and the artifact could not say so.
300
+
301
+ | | |
302
+ |---|---|
303
+ | Before | a dev-log cites `product/mx-agent-prd.md:609`, and someone repairs it to `:639` |
304
+ | After | the dev-log keeps `:609`, unchanged |
305
+ | Source | bootstrap's exclusion, adopted in issue #343 |
306
+
307
+ The repair looks like maintenance and falsifies the record. A dev-log states what its author
308
+ resolved at the time. Rule 15 prohibits the repair rather than exempting the record.
309
+
310
+ The strongest case for reaching templates is bootstrap's, and product did not reproduce it.
311
+ Bootstrap resolved `mx-agent-system/templates/roleguide-skeleton.md` and
312
+ `mx-agent-system/roleguides/team-builder.md` against `HEAD` at `49fa76d` on
313
+ 2026-09-02T11:38Z. The skeleton holds zero `file:line` citations. `team-builder.md` holds
314
+ four, of which one is stale: `` `team-builder.md:365`, "the write opens" `` cites
315
+ `create.ts:1367-1376` for a file open, that range now holds CRLF normalisation code, and the
316
+ open is at `create.ts:283`. One of the other three is worse than a stale document citation.
317
+ It is inside a template block at `` `team-builder.md:783`, "Named memories cap near 2000
318
+ words" `` that provisioning writes verbatim into every new team's iteration-log memory
319
+ content. It resolves today. When it drifts, it reaches every team
320
+ created after that, and nothing in a memory prompts a reader to re-resolve it. A stale
321
+ citation in a document is read by whoever opens the document. A stale citation in a template
322
+ is copied.
323
+
324
+ ### Rule 15, why the rule states a form rather than asking people to look
325
+
326
+ Product counted 46 stale citations in surface-owned files. Surface fixed 3 of them on the
327
+ day the problem was raised, which is 6.5%, while a surface engineer was actively working on
328
+ this problem (issue #350, PRs #340 and #341). A rule that depends on someone looking is not
329
+ a control, and that figure is the whole argument for stating a form instead.
330
+
331
+ Surface then repointed 34 citations across 8 files in PR #348 and reported five failure
332
+ modes (`gh pr view 348 --json title,files`, run 2026-09-02). Three of them are quotations
333
+ that are accurate and still do not resolve: a quote that runs past a bold span, a quote
334
+ containing an ellipsis, and a quote that tidies a path in the source. Accuracy and
335
+ resolvability are different properties.
336
+
337
+ ### Rule 15, what the rule does not do
338
+
339
+ A quoted phrase resolves only until someone rewords it. Surface asked for this limit to be
340
+ stated so that nobody expects more from the rule than it gives.
341
+
342
+ A check resolves a citation and cannot verify that the citation supports the claim.
343
+ Product's own roleguide holds the example.
344
+ `mx-agent-system/roleguides/product-leader.md:323`, "Build-list components with a
345
+ first-release disposition", cites `product/mx-agent-prd.md:1004` for the count 0 of 23. That
346
+ line exists and holds a component-state table row about a self-measurement harness. The
347
+ phrase "first-release disposition" appears zero times in the cited document, and so does "0
348
+ of 23" (`grep -c "first-release disposition" product/mx-agent-prd.md`, run 2026-09-02
349
+ against `origin/main` at `5d2bdb8`). This example is preserved as it stood at that tree, and
350
+ nobody updates it when the citation is repaired. The citation resolves, and the claim it
351
+ supports appears nowhere in what it cites. A checker built on rule 15 passes it. Resolving a
352
+ citation and verifying that it supports a claim are two checks, and only the first one is
353
+ mechanisable.
354
+
355
+ ---
356
+
357
+ ## How to apply rule 2 in one step
358
+
359
+ Read your sentence and ask whether the subject could do the verb if you filmed it.
360
+
361
+ - "The finding carries the evidence." A finding has no hands. Fails.
362
+ - "The console records the decision." A program writes a record. Passes.
363
+ - "The cost sits at $15.51." A number does not sit. Fails.
364
+ - "The cost is $15.51." Passes.
365
+
366
+ The test takes two seconds and catches rules 2, 3 and 6 together.
367
+
368
+ ---
369
+
370
+ ## What this standard does not cover
371
+
372
+ It says nothing about document structure. The seven-section report format is a separate
373
+ artifact, `mx-agent-system/standards/report-format.md`, and the framework enforces that one
374
+ by refusing a report rather than by injection alone.
375
+
376
+ It says nothing about code comments. The 647 em dashes measured above are mostly in source
377
+ comments and in documents written before 2026-08-18. Nothing sweeps them, and this standard
378
+ does not ask you to. Apply it to what you write.
379
+
380
+ It sets no target for how often the operator asks for something in plainer language.
381
+ `docs/legibility-plan.md` names that as the measure and records three requests in one
382
+ session on 2026-08-18. Nothing collects it yet.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@memnexus-ai/mx-agent-cli",
3
- "version": "0.1.294",
3
+ "version": "0.1.296-next.0",
4
4
  "description": "CLI for creating and managing AI agent teams",
5
5
  "type": "module",
6
6
  "bin": {
@@ -12,7 +12,8 @@
12
12
  "start": "node dist/index.js",
13
13
  "prepublishOnly": "npm run build",
14
14
  "test": "vitest run",
15
- "test:watch": "vitest"
15
+ "test:watch": "vitest",
16
+ "prepare": "node scripts/install-hooks.mjs"
16
17
  },
17
18
  "files": [
18
19
  "dist/",