@memnexus-ai/mx-agent-cli 0.1.296 → 0.1.297
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commands/create.d.ts +36 -0
- package/dist/commands/create.d.ts.map +1 -1
- package/dist/commands/create.js +85 -8
- package/dist/commands/create.js.map +1 -1
- package/dist/standards/decision-request.md +6 -57
- package/dist/standards/po-communication-standard.md +0 -34
- package/dist/standards/report-format.md +0 -90
- package/dist/standards/writing-standard.md +0 -312
- package/package.json +3 -1
- package/dist/__tests__/agent-attribution.test.d.ts +0 -16
- package/dist/__tests__/agent-attribution.test.d.ts.map +0 -1
- package/dist/__tests__/agent-attribution.test.js +0 -250
- package/dist/__tests__/agent-attribution.test.js.map +0 -1
- package/dist/__tests__/agents-md-canonicalization.test.d.ts +0 -23
- package/dist/__tests__/agents-md-canonicalization.test.d.ts.map +0 -1
- package/dist/__tests__/agents-md-canonicalization.test.js +0 -319
- package/dist/__tests__/agents-md-canonicalization.test.js.map +0 -1
- package/dist/__tests__/behavioral-compliance.test.d.ts +0 -8
- package/dist/__tests__/behavioral-compliance.test.d.ts.map +0 -1
- package/dist/__tests__/behavioral-compliance.test.js +0 -226
- package/dist/__tests__/behavioral-compliance.test.js.map +0 -1
- package/dist/__tests__/behavioral-extraction.test.d.ts +0 -12
- package/dist/__tests__/behavioral-extraction.test.d.ts.map +0 -1
- package/dist/__tests__/behavioral-extraction.test.js +0 -330
- package/dist/__tests__/behavioral-extraction.test.js.map +0 -1
- package/dist/__tests__/behavioral-git-read.test.d.ts +0 -21
- package/dist/__tests__/behavioral-git-read.test.d.ts.map +0 -1
- package/dist/__tests__/behavioral-git-read.test.js +0 -955
- package/dist/__tests__/behavioral-git-read.test.js.map +0 -1
- package/dist/__tests__/behavioral-injection.test.d.ts +0 -13
- package/dist/__tests__/behavioral-injection.test.d.ts.map +0 -1
- package/dist/__tests__/behavioral-injection.test.js +0 -384
- package/dist/__tests__/behavioral-injection.test.js.map +0 -1
- package/dist/__tests__/binary-smoke.test.d.ts +0 -12
- package/dist/__tests__/binary-smoke.test.d.ts.map +0 -1
- package/dist/__tests__/binary-smoke.test.js +0 -88
- package/dist/__tests__/binary-smoke.test.js.map +0 -1
- package/dist/__tests__/bootstrap-behavioral-contract.test.d.ts +0 -18
- package/dist/__tests__/bootstrap-behavioral-contract.test.d.ts.map +0 -1
- package/dist/__tests__/bootstrap-behavioral-contract.test.js +0 -104
- package/dist/__tests__/bootstrap-behavioral-contract.test.js.map +0 -1
- package/dist/__tests__/bundle-config.test.d.ts +0 -18
- package/dist/__tests__/bundle-config.test.d.ts.map +0 -1
- package/dist/__tests__/bundle-config.test.js +0 -123
- package/dist/__tests__/bundle-config.test.js.map +0 -1
- package/dist/__tests__/catalog-interaction.test.d.ts +0 -25
- package/dist/__tests__/catalog-interaction.test.d.ts.map +0 -1
- package/dist/__tests__/catalog-interaction.test.js +0 -269
- package/dist/__tests__/catalog-interaction.test.js.map +0 -1
- package/dist/__tests__/catalog-named-memories.test.d.ts +0 -2
- package/dist/__tests__/catalog-named-memories.test.d.ts.map +0 -1
- package/dist/__tests__/catalog-named-memories.test.js +0 -204
- package/dist/__tests__/catalog-named-memories.test.js.map +0 -1
- package/dist/__tests__/catalog-origin-main.test.d.ts +0 -15
- package/dist/__tests__/catalog-origin-main.test.d.ts.map +0 -1
- package/dist/__tests__/catalog-origin-main.test.js +0 -305
- package/dist/__tests__/catalog-origin-main.test.js.map +0 -1
- package/dist/__tests__/catalog.test.d.ts +0 -2
- package/dist/__tests__/catalog.test.d.ts.map +0 -1
- package/dist/__tests__/catalog.test.js +0 -131
- package/dist/__tests__/catalog.test.js.map +0 -1
- package/dist/__tests__/claude-local-sanitizer.test.d.ts +0 -24
- package/dist/__tests__/claude-local-sanitizer.test.d.ts.map +0 -1
- package/dist/__tests__/claude-local-sanitizer.test.js +0 -906
- package/dist/__tests__/claude-local-sanitizer.test.js.map +0 -1
- package/dist/__tests__/claude-md-compose.test.d.ts +0 -17
- package/dist/__tests__/claude-md-compose.test.d.ts.map +0 -1
- package/dist/__tests__/claude-md-compose.test.js +0 -119
- package/dist/__tests__/claude-md-compose.test.js.map +0 -1
- package/dist/__tests__/claude-sync.test.d.ts +0 -2
- package/dist/__tests__/claude-sync.test.d.ts.map +0 -1
- package/dist/__tests__/claude-sync.test.js +0 -571
- package/dist/__tests__/claude-sync.test.js.map +0 -1
- package/dist/__tests__/cli-build-integration.test.d.ts +0 -2
- package/dist/__tests__/cli-build-integration.test.d.ts.map +0 -1
- package/dist/__tests__/cli-build-integration.test.js +0 -64
- package/dist/__tests__/cli-build-integration.test.js.map +0 -1
- package/dist/__tests__/cli-build.test.d.ts +0 -2
- package/dist/__tests__/cli-build.test.d.ts.map +0 -1
- package/dist/__tests__/cli-build.test.js +0 -640
- package/dist/__tests__/cli-build.test.js.map +0 -1
- package/dist/__tests__/codex-agent-gate.test.d.ts +0 -2
- package/dist/__tests__/codex-agent-gate.test.d.ts.map +0 -1
- package/dist/__tests__/codex-agent-gate.test.js +0 -480
- package/dist/__tests__/codex-agent-gate.test.js.map +0 -1
- package/dist/__tests__/codex-deploy-config.test.d.ts +0 -2
- package/dist/__tests__/codex-deploy-config.test.d.ts.map +0 -1
- package/dist/__tests__/codex-deploy-config.test.js +0 -1230
- package/dist/__tests__/codex-deploy-config.test.js.map +0 -1
- package/dist/__tests__/codex-trust-keys.test.d.ts +0 -2
- package/dist/__tests__/codex-trust-keys.test.d.ts.map +0 -1
- package/dist/__tests__/codex-trust-keys.test.js +0 -731
- package/dist/__tests__/codex-trust-keys.test.js.map +0 -1
- package/dist/__tests__/codex-write-race.test.d.ts +0 -2
- package/dist/__tests__/codex-write-race.test.d.ts.map +0 -1
- package/dist/__tests__/codex-write-race.test.js +0 -2253
- package/dist/__tests__/codex-write-race.test.js.map +0 -1
- package/dist/__tests__/completion-rows-discriminate.test.d.ts +0 -20
- package/dist/__tests__/completion-rows-discriminate.test.d.ts.map +0 -1
- package/dist/__tests__/completion-rows-discriminate.test.js +0 -481
- package/dist/__tests__/completion-rows-discriminate.test.js.map +0 -1
- package/dist/__tests__/config-command.test.d.ts +0 -9
- package/dist/__tests__/config-command.test.d.ts.map +0 -1
- package/dist/__tests__/config-command.test.js +0 -75
- package/dist/__tests__/config-command.test.js.map +0 -1
- package/dist/__tests__/config-fidelity-archived-symlinks.test.d.ts +0 -2
- package/dist/__tests__/config-fidelity-archived-symlinks.test.d.ts.map +0 -1
- package/dist/__tests__/config-fidelity-archived-symlinks.test.js +0 -127
- package/dist/__tests__/config-fidelity-archived-symlinks.test.js.map +0 -1
- package/dist/__tests__/config-fidelity-display.test.d.ts +0 -2
- package/dist/__tests__/config-fidelity-display.test.d.ts.map +0 -1
- package/dist/__tests__/config-fidelity-display.test.js +0 -77
- package/dist/__tests__/config-fidelity-display.test.js.map +0 -1
- package/dist/__tests__/config-fidelity-unreadable-fixture.d.ts +0 -32
- package/dist/__tests__/config-fidelity-unreadable-fixture.d.ts.map +0 -1
- package/dist/__tests__/config-fidelity-unreadable-fixture.js +0 -37
- package/dist/__tests__/config-fidelity-unreadable-fixture.js.map +0 -1
- package/dist/__tests__/config-fidelity.test.d.ts +0 -16
- package/dist/__tests__/config-fidelity.test.d.ts.map +0 -1
- package/dist/__tests__/config-fidelity.test.js +0 -2679
- package/dist/__tests__/config-fidelity.test.js.map +0 -1
- package/dist/__tests__/config-generation-gate.test.d.ts +0 -46
- package/dist/__tests__/config-generation-gate.test.d.ts.map +0 -1
- package/dist/__tests__/config-generation-gate.test.js +0 -435
- package/dist/__tests__/config-generation-gate.test.js.map +0 -1
- package/dist/__tests__/config-generation.test.d.ts +0 -7
- package/dist/__tests__/config-generation.test.d.ts.map +0 -1
- package/dist/__tests__/config-generation.test.js +0 -141
- package/dist/__tests__/config-generation.test.js.map +0 -1
- package/dist/__tests__/config-sync.test.d.ts +0 -10
- package/dist/__tests__/config-sync.test.d.ts.map +0 -1
- package/dist/__tests__/config-sync.test.js +0 -268
- package/dist/__tests__/config-sync.test.js.map +0 -1
- package/dist/__tests__/coordination-401-production-wiring.test.d.ts +0 -19
- package/dist/__tests__/coordination-401-production-wiring.test.d.ts.map +0 -1
- package/dist/__tests__/coordination-401-production-wiring.test.js +0 -286
- package/dist/__tests__/coordination-401-production-wiring.test.js.map +0 -1
- package/dist/__tests__/coordination-401-recovery.test.d.ts +0 -22
- package/dist/__tests__/coordination-401-recovery.test.d.ts.map +0 -1
- package/dist/__tests__/coordination-401-recovery.test.js +0 -601
- package/dist/__tests__/coordination-401-recovery.test.js.map +0 -1
- package/dist/__tests__/coordination-brief-pin.test.d.ts +0 -20
- package/dist/__tests__/coordination-brief-pin.test.d.ts.map +0 -1
- package/dist/__tests__/coordination-brief-pin.test.js +0 -66
- package/dist/__tests__/coordination-brief-pin.test.js.map +0 -1
- package/dist/__tests__/coordination-brief.test.d.ts +0 -9
- package/dist/__tests__/coordination-brief.test.d.ts.map +0 -1
- package/dist/__tests__/coordination-brief.test.js +0 -290
- package/dist/__tests__/coordination-brief.test.js.map +0 -1
- package/dist/__tests__/coordination-client.test.d.ts +0 -9
- package/dist/__tests__/coordination-client.test.d.ts.map +0 -1
- package/dist/__tests__/coordination-client.test.js +0 -517
- package/dist/__tests__/coordination-client.test.js.map +0 -1
- package/dist/__tests__/coordination-command.test.d.ts +0 -9
- package/dist/__tests__/coordination-command.test.d.ts.map +0 -1
- package/dist/__tests__/coordination-command.test.js +0 -1082
- package/dist/__tests__/coordination-command.test.js.map +0 -1
- package/dist/__tests__/coordination-credential-endpoint.test.d.ts +0 -24
- package/dist/__tests__/coordination-credential-endpoint.test.d.ts.map +0 -1
- package/dist/__tests__/coordination-credential-endpoint.test.js +0 -1292
- package/dist/__tests__/coordination-credential-endpoint.test.js.map +0 -1
- package/dist/__tests__/coordination-expected-team.test.d.ts +0 -19
- package/dist/__tests__/coordination-expected-team.test.d.ts.map +0 -1
- package/dist/__tests__/coordination-expected-team.test.js +0 -423
- package/dist/__tests__/coordination-expected-team.test.js.map +0 -1
- package/dist/__tests__/coordination-fallback.test.d.ts +0 -9
- package/dist/__tests__/coordination-fallback.test.d.ts.map +0 -1
- package/dist/__tests__/coordination-fallback.test.js +0 -192
- package/dist/__tests__/coordination-fallback.test.js.map +0 -1
- package/dist/__tests__/coordination-file-guards.test.d.ts +0 -29
- package/dist/__tests__/coordination-file-guards.test.d.ts.map +0 -1
- package/dist/__tests__/coordination-file-guards.test.js +0 -380
- package/dist/__tests__/coordination-file-guards.test.js.map +0 -1
- package/dist/__tests__/coordination-history.test.d.ts +0 -8
- package/dist/__tests__/coordination-history.test.d.ts.map +0 -1
- package/dist/__tests__/coordination-history.test.js +0 -447
- package/dist/__tests__/coordination-history.test.js.map +0 -1
- package/dist/__tests__/coordination-memory.test.d.ts +0 -14
- package/dist/__tests__/coordination-memory.test.d.ts.map +0 -1
- package/dist/__tests__/coordination-memory.test.js +0 -401
- package/dist/__tests__/coordination-memory.test.js.map +0 -1
- package/dist/__tests__/coordination-mode.test.d.ts +0 -13
- package/dist/__tests__/coordination-mode.test.d.ts.map +0 -1
- package/dist/__tests__/coordination-mode.test.js +0 -180
- package/dist/__tests__/coordination-mode.test.js.map +0 -1
- package/dist/__tests__/coordination-plain-shell-commands.test.d.ts +0 -22
- package/dist/__tests__/coordination-plain-shell-commands.test.d.ts.map +0 -1
- package/dist/__tests__/coordination-plain-shell-commands.test.js +0 -1875
- package/dist/__tests__/coordination-plain-shell-commands.test.js.map +0 -1
- package/dist/__tests__/coordination-provision.test.d.ts +0 -12
- package/dist/__tests__/coordination-provision.test.d.ts.map +0 -1
- package/dist/__tests__/coordination-provision.test.js +0 -103
- package/dist/__tests__/coordination-provision.test.js.map +0 -1
- package/dist/__tests__/coordination-render.test.d.ts +0 -9
- package/dist/__tests__/coordination-render.test.d.ts.map +0 -1
- package/dist/__tests__/coordination-render.test.js +0 -335
- package/dist/__tests__/coordination-render.test.js.map +0 -1
- package/dist/__tests__/coordination-setup.test.d.ts +0 -6
- package/dist/__tests__/coordination-setup.test.d.ts.map +0 -1
- package/dist/__tests__/coordination-setup.test.js +0 -448
- package/dist/__tests__/coordination-setup.test.js.map +0 -1
- package/dist/__tests__/coordination-status-plain-shell.test.d.ts +0 -19
- package/dist/__tests__/coordination-status-plain-shell.test.d.ts.map +0 -1
- package/dist/__tests__/coordination-status-plain-shell.test.js +0 -332
- package/dist/__tests__/coordination-status-plain-shell.test.js.map +0 -1
- package/dist/__tests__/coordination-status-registration.test.d.ts +0 -16
- package/dist/__tests__/coordination-status-registration.test.d.ts.map +0 -1
- package/dist/__tests__/coordination-status-registration.test.js +0 -480
- package/dist/__tests__/coordination-status-registration.test.js.map +0 -1
- package/dist/__tests__/coordination-token-multitenant.test.d.ts +0 -11
- package/dist/__tests__/coordination-token-multitenant.test.d.ts.map +0 -1
- package/dist/__tests__/coordination-token-multitenant.test.js +0 -106
- package/dist/__tests__/coordination-token-multitenant.test.js.map +0 -1
- package/dist/__tests__/coordination-token.test.d.ts +0 -11
- package/dist/__tests__/coordination-token.test.d.ts.map +0 -1
- package/dist/__tests__/coordination-token.test.js +0 -201
- package/dist/__tests__/coordination-token.test.js.map +0 -1
- package/dist/__tests__/coordination-wiring.test.d.ts +0 -11
- package/dist/__tests__/coordination-wiring.test.d.ts.map +0 -1
- package/dist/__tests__/coordination-wiring.test.js +0 -43
- package/dist/__tests__/coordination-wiring.test.js.map +0 -1
- package/dist/__tests__/creation-pr-class-check.test.d.ts +0 -17
- package/dist/__tests__/creation-pr-class-check.test.d.ts.map +0 -1
- package/dist/__tests__/creation-pr-class-check.test.js +0 -346
- package/dist/__tests__/creation-pr-class-check.test.js.map +0 -1
- package/dist/__tests__/creation-step6a-push-check.test.d.ts +0 -15
- package/dist/__tests__/creation-step6a-push-check.test.d.ts.map +0 -1
- package/dist/__tests__/creation-step6a-push-check.test.js +0 -150
- package/dist/__tests__/creation-step6a-push-check.test.js.map +0 -1
- package/dist/__tests__/decision-check.test.d.ts +0 -2
- package/dist/__tests__/decision-check.test.d.ts.map +0 -1
- package/dist/__tests__/decision-check.test.js +0 -105
- package/dist/__tests__/decision-check.test.js.map +0 -1
- package/dist/__tests__/digest-fail-closed.test.d.ts +0 -16
- package/dist/__tests__/digest-fail-closed.test.d.ts.map +0 -1
- package/dist/__tests__/digest-fail-closed.test.js +0 -248
- package/dist/__tests__/digest-fail-closed.test.js.map +0 -1
- package/dist/__tests__/digest-team-omission.test.d.ts +0 -15
- package/dist/__tests__/digest-team-omission.test.d.ts.map +0 -1
- package/dist/__tests__/digest-team-omission.test.js +0 -247
- package/dist/__tests__/digest-team-omission.test.js.map +0 -1
- package/dist/__tests__/doctor-config-fidelity.test.d.ts +0 -19
- package/dist/__tests__/doctor-config-fidelity.test.d.ts.map +0 -1
- package/dist/__tests__/doctor-config-fidelity.test.js +0 -324
- package/dist/__tests__/doctor-config-fidelity.test.js.map +0 -1
- package/dist/__tests__/doctor-framework-version.test.d.ts +0 -2
- package/dist/__tests__/doctor-framework-version.test.d.ts.map +0 -1
- package/dist/__tests__/doctor-framework-version.test.js +0 -146
- package/dist/__tests__/doctor-framework-version.test.js.map +0 -1
- package/dist/__tests__/doctor-worktree-path.test.d.ts +0 -17
- package/dist/__tests__/doctor-worktree-path.test.d.ts.map +0 -1
- package/dist/__tests__/doctor-worktree-path.test.js +0 -158
- package/dist/__tests__/doctor-worktree-path.test.js.map +0 -1
- package/dist/__tests__/doctor.test.d.ts +0 -20
- package/dist/__tests__/doctor.test.d.ts.map +0 -1
- package/dist/__tests__/doctor.test.js +0 -849
- package/dist/__tests__/doctor.test.js.map +0 -1
- package/dist/__tests__/event-shipper.test.d.ts +0 -16
- package/dist/__tests__/event-shipper.test.d.ts.map +0 -1
- package/dist/__tests__/event-shipper.test.js +0 -287
- package/dist/__tests__/event-shipper.test.js.map +0 -1
- package/dist/__tests__/fleet-data.test.d.ts +0 -2
- package/dist/__tests__/fleet-data.test.d.ts.map +0 -1
- package/dist/__tests__/fleet-data.test.js +0 -501
- package/dist/__tests__/fleet-data.test.js.map +0 -1
- package/dist/__tests__/fleet-devpod.test.d.ts +0 -12
- package/dist/__tests__/fleet-devpod.test.d.ts.map +0 -1
- package/dist/__tests__/fleet-devpod.test.js +0 -260
- package/dist/__tests__/fleet-devpod.test.js.map +0 -1
- package/dist/__tests__/fleet-tmux.test.d.ts +0 -2
- package/dist/__tests__/fleet-tmux.test.d.ts.map +0 -1
- package/dist/__tests__/fleet-tmux.test.js +0 -289
- package/dist/__tests__/fleet-tmux.test.js.map +0 -1
- package/dist/__tests__/fleet.test.d.ts +0 -16
- package/dist/__tests__/fleet.test.d.ts.map +0 -1
- package/dist/__tests__/fleet.test.js +0 -75
- package/dist/__tests__/fleet.test.js.map +0 -1
- package/dist/__tests__/generate-claude.test.d.ts +0 -18
- package/dist/__tests__/generate-claude.test.d.ts.map +0 -1
- package/dist/__tests__/generate-claude.test.js +0 -1015
- package/dist/__tests__/generate-claude.test.js.map +0 -1
- package/dist/__tests__/gh-remote.test.d.ts +0 -2
- package/dist/__tests__/gh-remote.test.d.ts.map +0 -1
- package/dist/__tests__/gh-remote.test.js +0 -136
- package/dist/__tests__/gh-remote.test.js.map +0 -1
- package/dist/__tests__/git-env.test.d.ts +0 -14
- package/dist/__tests__/git-env.test.d.ts.map +0 -1
- package/dist/__tests__/git-env.test.js +0 -131
- package/dist/__tests__/git-env.test.js.map +0 -1
- package/dist/__tests__/git-identity-isolation.test.d.ts +0 -33
- package/dist/__tests__/git-identity-isolation.test.d.ts.map +0 -1
- package/dist/__tests__/git-identity-isolation.test.js +0 -626
- package/dist/__tests__/git-identity-isolation.test.js.map +0 -1
- package/dist/__tests__/harness-extract.test.d.ts +0 -19
- package/dist/__tests__/harness-extract.test.d.ts.map +0 -1
- package/dist/__tests__/harness-extract.test.js +0 -566
- package/dist/__tests__/harness-extract.test.js.map +0 -1
- package/dist/__tests__/harness-wiring.test.d.ts +0 -16
- package/dist/__tests__/harness-wiring.test.d.ts.map +0 -1
- package/dist/__tests__/harness-wiring.test.js +0 -469
- package/dist/__tests__/harness-wiring.test.js.map +0 -1
- package/dist/__tests__/hook-completeness.test.d.ts +0 -13
- package/dist/__tests__/hook-completeness.test.d.ts.map +0 -1
- package/dist/__tests__/hook-completeness.test.js +0 -238
- package/dist/__tests__/hook-completeness.test.js.map +0 -1
- package/dist/__tests__/hook-heal.test.d.ts +0 -8
- package/dist/__tests__/hook-heal.test.d.ts.map +0 -1
- package/dist/__tests__/hook-heal.test.js +0 -156
- package/dist/__tests__/hook-heal.test.js.map +0 -1
- package/dist/__tests__/human-turn-classifier.test.d.ts +0 -17
- package/dist/__tests__/human-turn-classifier.test.d.ts.map +0 -1
- package/dist/__tests__/human-turn-classifier.test.js +0 -311
- package/dist/__tests__/human-turn-classifier.test.js.map +0 -1
- package/dist/__tests__/init-coordination-url.test.d.ts +0 -11
- package/dist/__tests__/init-coordination-url.test.d.ts.map +0 -1
- package/dist/__tests__/init-coordination-url.test.js +0 -217
- package/dist/__tests__/init-coordination-url.test.js.map +0 -1
- package/dist/__tests__/isolation-probe.test.d.ts +0 -15
- package/dist/__tests__/isolation-probe.test.d.ts.map +0 -1
- package/dist/__tests__/isolation-probe.test.js +0 -611
- package/dist/__tests__/isolation-probe.test.js.map +0 -1
- package/dist/__tests__/leader-lock.test.d.ts +0 -12
- package/dist/__tests__/leader-lock.test.d.ts.map +0 -1
- package/dist/__tests__/leader-lock.test.js +0 -293
- package/dist/__tests__/leader-lock.test.js.map +0 -1
- package/dist/__tests__/memory-archive-checks.test.d.ts +0 -22
- package/dist/__tests__/memory-archive-checks.test.d.ts.map +0 -1
- package/dist/__tests__/memory-archive-checks.test.js +0 -748
- package/dist/__tests__/memory-archive-checks.test.js.map +0 -1
- package/dist/__tests__/memory-archive-prep.test.d.ts +0 -8
- package/dist/__tests__/memory-archive-prep.test.d.ts.map +0 -1
- package/dist/__tests__/memory-archive-prep.test.js +0 -524
- package/dist/__tests__/memory-archive-prep.test.js.map +0 -1
- package/dist/__tests__/memory-autocreate.test.d.ts +0 -10
- package/dist/__tests__/memory-autocreate.test.d.ts.map +0 -1
- package/dist/__tests__/memory-autocreate.test.js +0 -709
- package/dist/__tests__/memory-autocreate.test.js.map +0 -1
- package/dist/__tests__/memory-log-result.test.d.ts +0 -13
- package/dist/__tests__/memory-log-result.test.d.ts.map +0 -1
- package/dist/__tests__/memory-log-result.test.js +0 -149
- package/dist/__tests__/memory-log-result.test.js.map +0 -1
- package/dist/__tests__/memory-named-exists.test.d.ts +0 -16
- package/dist/__tests__/memory-named-exists.test.d.ts.map +0 -1
- package/dist/__tests__/memory-named-exists.test.js +0 -288
- package/dist/__tests__/memory-named-exists.test.js.map +0 -1
- package/dist/__tests__/message-bus.test.d.ts +0 -10
- package/dist/__tests__/message-bus.test.d.ts.map +0 -1
- package/dist/__tests__/message-bus.test.js +0 -526
- package/dist/__tests__/message-bus.test.js.map +0 -1
- package/dist/__tests__/monitor.test.d.ts +0 -6
- package/dist/__tests__/monitor.test.d.ts.map +0 -1
- package/dist/__tests__/monitor.test.js +0 -458
- package/dist/__tests__/monitor.test.js.map +0 -1
- package/dist/__tests__/mx-agent-cli-pin-validation.test.d.ts +0 -2
- package/dist/__tests__/mx-agent-cli-pin-validation.test.d.ts.map +0 -1
- package/dist/__tests__/mx-agent-cli-pin-validation.test.js +0 -232
- package/dist/__tests__/mx-agent-cli-pin-validation.test.js.map +0 -1
- package/dist/__tests__/mx-agent-cli-version-pin.test.d.ts +0 -2
- package/dist/__tests__/mx-agent-cli-version-pin.test.d.ts.map +0 -1
- package/dist/__tests__/mx-agent-cli-version-pin.test.js +0 -236
- package/dist/__tests__/mx-agent-cli-version-pin.test.js.map +0 -1
- package/dist/__tests__/new-project-first-team.test.d.ts +0 -15
- package/dist/__tests__/new-project-first-team.test.d.ts.map +0 -1
- package/dist/__tests__/new-project-first-team.test.js +0 -444
- package/dist/__tests__/new-project-first-team.test.js.map +0 -1
- package/dist/__tests__/otel-env.test.d.ts +0 -2
- package/dist/__tests__/otel-env.test.d.ts.map +0 -1
- package/dist/__tests__/otel-env.test.js +0 -127
- package/dist/__tests__/otel-env.test.js.map +0 -1
- package/dist/__tests__/pager-fail-closed.test.d.ts +0 -19
- package/dist/__tests__/pager-fail-closed.test.d.ts.map +0 -1
- package/dist/__tests__/pager-fail-closed.test.js +0 -229
- package/dist/__tests__/pager-fail-closed.test.js.map +0 -1
- package/dist/__tests__/pr-set-body.test.d.ts +0 -29
- package/dist/__tests__/pr-set-body.test.d.ts.map +0 -1
- package/dist/__tests__/pr-set-body.test.js +0 -314
- package/dist/__tests__/pr-set-body.test.js.map +0 -1
- package/dist/__tests__/prior-sync-failure.test.d.ts +0 -2
- package/dist/__tests__/prior-sync-failure.test.d.ts.map +0 -1
- package/dist/__tests__/prior-sync-failure.test.js +0 -81
- package/dist/__tests__/prior-sync-failure.test.js.map +0 -1
- package/dist/__tests__/project-config.test.d.ts +0 -2
- package/dist/__tests__/project-config.test.d.ts.map +0 -1
- package/dist/__tests__/project-config.test.js +0 -458
- package/dist/__tests__/project-config.test.js.map +0 -1
- package/dist/__tests__/provision-behavioral-contract.test.d.ts +0 -13
- package/dist/__tests__/provision-behavioral-contract.test.d.ts.map +0 -1
- package/dist/__tests__/provision-behavioral-contract.test.js +0 -548
- package/dist/__tests__/provision-behavioral-contract.test.js.map +0 -1
- package/dist/__tests__/provision-catalog-precondition.test.d.ts +0 -26
- package/dist/__tests__/provision-catalog-precondition.test.d.ts.map +0 -1
- package/dist/__tests__/provision-catalog-precondition.test.js +0 -622
- package/dist/__tests__/provision-catalog-precondition.test.js.map +0 -1
- package/dist/__tests__/provision-completion-rows.test.d.ts +0 -17
- package/dist/__tests__/provision-completion-rows.test.d.ts.map +0 -1
- package/dist/__tests__/provision-completion-rows.test.js +0 -3473
- package/dist/__tests__/provision-completion-rows.test.js.map +0 -1
- package/dist/__tests__/provision-copy-containment.test.d.ts +0 -19
- package/dist/__tests__/provision-copy-containment.test.d.ts.map +0 -1
- package/dist/__tests__/provision-copy-containment.test.js +0 -187
- package/dist/__tests__/provision-copy-containment.test.js.map +0 -1
- package/dist/__tests__/provision-identity-gate.test.d.ts +0 -20
- package/dist/__tests__/provision-identity-gate.test.d.ts.map +0 -1
- package/dist/__tests__/provision-identity-gate.test.js +0 -602
- package/dist/__tests__/provision-identity-gate.test.js.map +0 -1
- package/dist/__tests__/provision-resume.test.d.ts +0 -26
- package/dist/__tests__/provision-resume.test.d.ts.map +0 -1
- package/dist/__tests__/provision-resume.test.js +0 -1344
- package/dist/__tests__/provision-resume.test.js.map +0 -1
- package/dist/__tests__/provision-roleguide-anchors.test.d.ts +0 -27
- package/dist/__tests__/provision-roleguide-anchors.test.d.ts.map +0 -1
- package/dist/__tests__/provision-roleguide-anchors.test.js +0 -747
- package/dist/__tests__/provision-roleguide-anchors.test.js.map +0 -1
- package/dist/__tests__/provision-row12-stub-server.test.d.ts +0 -21
- package/dist/__tests__/provision-row12-stub-server.test.d.ts.map +0 -1
- package/dist/__tests__/provision-row12-stub-server.test.js +0 -264
- package/dist/__tests__/provision-row12-stub-server.test.js.map +0 -1
- package/dist/__tests__/provision-skeleton-fill.test.d.ts +0 -16
- package/dist/__tests__/provision-skeleton-fill.test.d.ts.map +0 -1
- package/dist/__tests__/provision-skeleton-fill.test.js +0 -490
- package/dist/__tests__/provision-skeleton-fill.test.js.map +0 -1
- package/dist/__tests__/provision-step8-commit.test.d.ts +0 -40
- package/dist/__tests__/provision-step8-commit.test.d.ts.map +0 -1
- package/dist/__tests__/provision-step8-commit.test.js +0 -529
- package/dist/__tests__/provision-step8-commit.test.js.map +0 -1
- package/dist/__tests__/provision-teambuilder-flow.test.d.ts +0 -22
- package/dist/__tests__/provision-teambuilder-flow.test.d.ts.map +0 -1
- package/dist/__tests__/provision-teambuilder-flow.test.js +0 -253
- package/dist/__tests__/provision-teambuilder-flow.test.js.map +0 -1
- package/dist/__tests__/provision-write-integrity.test.d.ts +0 -18
- package/dist/__tests__/provision-write-integrity.test.d.ts.map +0 -1
- package/dist/__tests__/provision-write-integrity.test.js +0 -141
- package/dist/__tests__/provision-write-integrity.test.js.map +0 -1
- package/dist/__tests__/repo-guard-wiring.test.d.ts +0 -21
- package/dist/__tests__/repo-guard-wiring.test.d.ts.map +0 -1
- package/dist/__tests__/repo-guard-wiring.test.js +0 -638
- package/dist/__tests__/repo-guard-wiring.test.js.map +0 -1
- package/dist/__tests__/report-format.test.d.ts +0 -2
- package/dist/__tests__/report-format.test.d.ts.map +0 -1
- package/dist/__tests__/report-format.test.js +0 -219
- package/dist/__tests__/report-format.test.js.map +0 -1
- package/dist/__tests__/row15-detail-sanitizer.test.d.ts +0 -20
- package/dist/__tests__/row15-detail-sanitizer.test.d.ts.map +0 -1
- package/dist/__tests__/row15-detail-sanitizer.test.js +0 -61
- package/dist/__tests__/row15-detail-sanitizer.test.js.map +0 -1
- package/dist/__tests__/rows-9-10-zero-remotes.test.d.ts +0 -32
- package/dist/__tests__/rows-9-10-zero-remotes.test.d.ts.map +0 -1
- package/dist/__tests__/rows-9-10-zero-remotes.test.js +0 -203
- package/dist/__tests__/rows-9-10-zero-remotes.test.js.map +0 -1
- package/dist/__tests__/runtime-claude-adapter.test.d.ts +0 -2
- package/dist/__tests__/runtime-claude-adapter.test.d.ts.map +0 -1
- package/dist/__tests__/runtime-claude-adapter.test.js +0 -70
- package/dist/__tests__/runtime-claude-adapter.test.js.map +0 -1
- package/dist/__tests__/runtime-codex-adapter.test.d.ts +0 -2
- package/dist/__tests__/runtime-codex-adapter.test.d.ts.map +0 -1
- package/dist/__tests__/runtime-codex-adapter.test.js +0 -558
- package/dist/__tests__/runtime-codex-adapter.test.js.map +0 -1
- package/dist/__tests__/runtime-codex-config.test.d.ts +0 -2
- package/dist/__tests__/runtime-codex-config.test.d.ts.map +0 -1
- package/dist/__tests__/runtime-codex-config.test.js +0 -1421
- package/dist/__tests__/runtime-codex-config.test.js.map +0 -1
- package/dist/__tests__/runtime-codex-gateway-pilot.test.d.ts +0 -2
- package/dist/__tests__/runtime-codex-gateway-pilot.test.d.ts.map +0 -1
- package/dist/__tests__/runtime-codex-gateway-pilot.test.js +0 -309
- package/dist/__tests__/runtime-codex-gateway-pilot.test.js.map +0 -1
- package/dist/__tests__/runtime-codex-gateway-provider.test.d.ts +0 -2
- package/dist/__tests__/runtime-codex-gateway-provider.test.d.ts.map +0 -1
- package/dist/__tests__/runtime-codex-gateway-provider.test.js +0 -163
- package/dist/__tests__/runtime-codex-gateway-provider.test.js.map +0 -1
- package/dist/__tests__/runtime-codex-guard-proof.test.d.ts +0 -2
- package/dist/__tests__/runtime-codex-guard-proof.test.d.ts.map +0 -1
- package/dist/__tests__/runtime-codex-guard-proof.test.js +0 -822
- package/dist/__tests__/runtime-codex-guard-proof.test.js.map +0 -1
- package/dist/__tests__/runtime-codex-version-pin.test.d.ts +0 -2
- package/dist/__tests__/runtime-codex-version-pin.test.d.ts.map +0 -1
- package/dist/__tests__/runtime-codex-version-pin.test.js +0 -86
- package/dist/__tests__/runtime-codex-version-pin.test.js.map +0 -1
- package/dist/__tests__/runtime-identity.test.d.ts +0 -2
- package/dist/__tests__/runtime-identity.test.d.ts.map +0 -1
- package/dist/__tests__/runtime-identity.test.js +0 -117
- package/dist/__tests__/runtime-identity.test.js.map +0 -1
- package/dist/__tests__/runtime-resolve.test.d.ts +0 -2
- package/dist/__tests__/runtime-resolve.test.d.ts.map +0 -1
- package/dist/__tests__/runtime-resolve.test.js +0 -172
- package/dist/__tests__/runtime-resolve.test.js.map +0 -1
- package/dist/__tests__/security-posture.test.d.ts +0 -8
- package/dist/__tests__/security-posture.test.d.ts.map +0 -1
- package/dist/__tests__/security-posture.test.js +0 -82
- package/dist/__tests__/security-posture.test.js.map +0 -1
- package/dist/__tests__/session-model.test.d.ts +0 -2
- package/dist/__tests__/session-model.test.d.ts.map +0 -1
- package/dist/__tests__/session-model.test.js +0 -74
- package/dist/__tests__/session-model.test.js.map +0 -1
- package/dist/__tests__/session-pause-provisioning.test.d.ts +0 -19
- package/dist/__tests__/session-pause-provisioning.test.d.ts.map +0 -1
- package/dist/__tests__/session-pause-provisioning.test.js +0 -115
- package/dist/__tests__/session-pause-provisioning.test.js.map +0 -1
- package/dist/__tests__/session-reclamation.test.d.ts +0 -15
- package/dist/__tests__/session-reclamation.test.d.ts.map +0 -1
- package/dist/__tests__/session-reclamation.test.js +0 -73
- package/dist/__tests__/session-reclamation.test.js.map +0 -1
- package/dist/__tests__/session-record-disclosure.test.d.ts +0 -24
- package/dist/__tests__/session-record-disclosure.test.d.ts.map +0 -1
- package/dist/__tests__/session-record-disclosure.test.js +0 -494
- package/dist/__tests__/session-record-disclosure.test.js.map +0 -1
- package/dist/__tests__/session-status.test.d.ts +0 -11
- package/dist/__tests__/session-status.test.d.ts.map +0 -1
- package/dist/__tests__/session-status.test.js +0 -76
- package/dist/__tests__/session-status.test.js.map +0 -1
- package/dist/__tests__/session.test.d.ts +0 -15
- package/dist/__tests__/session.test.d.ts.map +0 -1
- package/dist/__tests__/session.test.js +0 -366
- package/dist/__tests__/session.test.js.map +0 -1
- package/dist/__tests__/shim-deploy-safety.test.d.ts +0 -24
- package/dist/__tests__/shim-deploy-safety.test.d.ts.map +0 -1
- package/dist/__tests__/shim-deploy-safety.test.js +0 -174
- package/dist/__tests__/shim-deploy-safety.test.js.map +0 -1
- package/dist/__tests__/slug-validation.test.d.ts +0 -13
- package/dist/__tests__/slug-validation.test.d.ts.map +0 -1
- package/dist/__tests__/slug-validation.test.js +0 -202
- package/dist/__tests__/slug-validation.test.js.map +0 -1
- package/dist/__tests__/standards-injection.test.d.ts +0 -2
- package/dist/__tests__/standards-injection.test.d.ts.map +0 -1
- package/dist/__tests__/standards-injection.test.js +0 -179
- package/dist/__tests__/standards-injection.test.js.map +0 -1
- package/dist/__tests__/start-config-conflict.test.d.ts +0 -17
- package/dist/__tests__/start-config-conflict.test.d.ts.map +0 -1
- package/dist/__tests__/start-config-conflict.test.js +0 -101
- package/dist/__tests__/start-config-conflict.test.js.map +0 -1
- package/dist/__tests__/start-interactive-role.test.d.ts +0 -22
- package/dist/__tests__/start-interactive-role.test.d.ts.map +0 -1
- package/dist/__tests__/start-interactive-role.test.js +0 -204
- package/dist/__tests__/start-interactive-role.test.js.map +0 -1
- package/dist/__tests__/start-rebase-never-ran.test.d.ts +0 -25
- package/dist/__tests__/start-rebase-never-ran.test.d.ts.map +0 -1
- package/dist/__tests__/start-rebase-never-ran.test.js +0 -227
- package/dist/__tests__/start-rebase-never-ran.test.js.map +0 -1
- package/dist/__tests__/start-report-generation-capture.test.d.ts +0 -17
- package/dist/__tests__/start-report-generation-capture.test.d.ts.map +0 -1
- package/dist/__tests__/start-report-generation-capture.test.js +0 -127
- package/dist/__tests__/start-report-generation-capture.test.js.map +0 -1
- package/dist/__tests__/start-report-integration.test.d.ts +0 -12
- package/dist/__tests__/start-report-integration.test.d.ts.map +0 -1
- package/dist/__tests__/start-report-integration.test.js +0 -138
- package/dist/__tests__/start-report-integration.test.js.map +0 -1
- package/dist/__tests__/start-runtime-wiring.test.d.ts +0 -31
- package/dist/__tests__/start-runtime-wiring.test.d.ts.map +0 -1
- package/dist/__tests__/start-runtime-wiring.test.js +0 -735
- package/dist/__tests__/start-runtime-wiring.test.js.map +0 -1
- package/dist/__tests__/start-stash.test.d.ts +0 -2
- package/dist/__tests__/start-stash.test.d.ts.map +0 -1
- package/dist/__tests__/start-stash.test.js +0 -131
- package/dist/__tests__/start-stash.test.js.map +0 -1
- package/dist/__tests__/start-sync-hardstop.test.d.ts +0 -15
- package/dist/__tests__/start-sync-hardstop.test.d.ts.map +0 -1
- package/dist/__tests__/start-sync-hardstop.test.js +0 -280
- package/dist/__tests__/start-sync-hardstop.test.js.map +0 -1
- package/dist/__tests__/start-team-identity.test.d.ts +0 -25
- package/dist/__tests__/start-team-identity.test.d.ts.map +0 -1
- package/dist/__tests__/start-team-identity.test.js +0 -307
- package/dist/__tests__/start-team-identity.test.js.map +0 -1
- package/dist/__tests__/startup-health-render.test.d.ts +0 -11
- package/dist/__tests__/startup-health-render.test.d.ts.map +0 -1
- package/dist/__tests__/startup-health-render.test.js +0 -60
- package/dist/__tests__/startup-health-render.test.js.map +0 -1
- package/dist/__tests__/startup-policy.test.d.ts +0 -2
- package/dist/__tests__/startup-policy.test.d.ts.map +0 -1
- package/dist/__tests__/startup-policy.test.js +0 -27
- package/dist/__tests__/startup-policy.test.js.map +0 -1
- package/dist/__tests__/startup-report.test.d.ts +0 -13
- package/dist/__tests__/startup-report.test.d.ts.map +0 -1
- package/dist/__tests__/startup-report.test.js +0 -278
- package/dist/__tests__/startup-report.test.js.map +0 -1
- package/dist/__tests__/startup-shipper.test.d.ts +0 -13
- package/dist/__tests__/startup-shipper.test.d.ts.map +0 -1
- package/dist/__tests__/startup-shipper.test.js +0 -149
- package/dist/__tests__/startup-shipper.test.js.map +0 -1
- package/dist/__tests__/stream-input-controller.test.d.ts +0 -10
- package/dist/__tests__/stream-input-controller.test.d.ts.map +0 -1
- package/dist/__tests__/stream-input-controller.test.js +0 -167
- package/dist/__tests__/stream-input-controller.test.js.map +0 -1
- package/dist/__tests__/team-memory-commands.test.d.ts +0 -11
- package/dist/__tests__/team-memory-commands.test.d.ts.map +0 -1
- package/dist/__tests__/team-memory-commands.test.js +0 -240
- package/dist/__tests__/team-memory-commands.test.js.map +0 -1
- package/dist/__tests__/team-name-propagation.test.d.ts +0 -13
- package/dist/__tests__/team-name-propagation.test.d.ts.map +0 -1
- package/dist/__tests__/team-name-propagation.test.js +0 -198
- package/dist/__tests__/team-name-propagation.test.js.map +0 -1
- package/dist/__tests__/team-token-probe.test.d.ts +0 -16
- package/dist/__tests__/team-token-probe.test.d.ts.map +0 -1
- package/dist/__tests__/team-token-probe.test.js +0 -295
- package/dist/__tests__/team-token-probe.test.js.map +0 -1
- package/dist/__tests__/template-budget.test.d.ts +0 -2
- package/dist/__tests__/template-budget.test.d.ts.map +0 -1
- package/dist/__tests__/template-budget.test.js +0 -119
- package/dist/__tests__/template-budget.test.js.map +0 -1
- package/dist/__tests__/template-sync.test.d.ts +0 -19
- package/dist/__tests__/template-sync.test.d.ts.map +0 -1
- package/dist/__tests__/template-sync.test.js +0 -480
- package/dist/__tests__/template-sync.test.js.map +0 -1
- package/dist/__tests__/test-project.test.d.ts +0 -18
- package/dist/__tests__/test-project.test.d.ts.map +0 -1
- package/dist/__tests__/test-project.test.js +0 -465
- package/dist/__tests__/test-project.test.js.map +0 -1
- package/dist/__tests__/tracked-instruction-files.test.d.ts +0 -21
- package/dist/__tests__/tracked-instruction-files.test.d.ts.map +0 -1
- package/dist/__tests__/tracked-instruction-files.test.js +0 -489
- package/dist/__tests__/tracked-instruction-files.test.js.map +0 -1
- package/dist/__tests__/unlock.test.d.ts +0 -11
- package/dist/__tests__/unlock.test.d.ts.map +0 -1
- package/dist/__tests__/unlock.test.js +0 -100
- package/dist/__tests__/unlock.test.js.map +0 -1
- package/dist/__tests__/usage-per-call-grouping.test.d.ts +0 -25
- package/dist/__tests__/usage-per-call-grouping.test.d.ts.map +0 -1
- package/dist/__tests__/usage-per-call-grouping.test.js +0 -952
- package/dist/__tests__/usage-per-call-grouping.test.js.map +0 -1
- package/dist/__tests__/usage-pricing.test.d.ts +0 -20
- package/dist/__tests__/usage-pricing.test.d.ts.map +0 -1
- package/dist/__tests__/usage-pricing.test.js +0 -176
- package/dist/__tests__/usage-pricing.test.js.map +0 -1
- package/dist/__tests__/usage-subagent-discovery.test.d.ts +0 -17
- package/dist/__tests__/usage-subagent-discovery.test.d.ts.map +0 -1
- package/dist/__tests__/usage-subagent-discovery.test.js +0 -213
- package/dist/__tests__/usage-subagent-discovery.test.js.map +0 -1
- package/dist/__tests__/verify-hooks-check-all.test.d.ts +0 -32
- package/dist/__tests__/verify-hooks-check-all.test.d.ts.map +0 -1
- package/dist/__tests__/verify-hooks-check-all.test.js +0 -563
- package/dist/__tests__/verify-hooks-check-all.test.js.map +0 -1
- package/dist/__tests__/verify-hooks-heal-log.test.d.ts +0 -11
- package/dist/__tests__/verify-hooks-heal-log.test.d.ts.map +0 -1
- package/dist/__tests__/verify-hooks-heal-log.test.js +0 -172
- package/dist/__tests__/verify-hooks-heal-log.test.js.map +0 -1
- package/dist/__tests__/worker-cap.test.d.ts +0 -14
- package/dist/__tests__/worker-cap.test.d.ts.map +0 -1
- package/dist/__tests__/worker-cap.test.js +0 -97
- package/dist/__tests__/worker-cap.test.js.map +0 -1
- package/dist/__tests__/worktree-link-repair.test.d.ts +0 -2
- package/dist/__tests__/worktree-link-repair.test.d.ts.map +0 -1
- package/dist/__tests__/worktree-link-repair.test.js +0 -471
- package/dist/__tests__/worktree-link-repair.test.js.map +0 -1
- package/dist/__tests__/worktree-sync-fixture.test.d.ts +0 -17
- package/dist/__tests__/worktree-sync-fixture.test.d.ts.map +0 -1
- package/dist/__tests__/worktree-sync-fixture.test.js +0 -519
- package/dist/__tests__/worktree-sync-fixture.test.js.map +0 -1
- package/dist/__tests__/worktree-sync-hardening.test.d.ts +0 -13
- package/dist/__tests__/worktree-sync-hardening.test.d.ts.map +0 -1
- package/dist/__tests__/worktree-sync-hardening.test.js +0 -919
- package/dist/__tests__/worktree-sync-hardening.test.js.map +0 -1
- package/dist/__tests__/worktree-sync-shell-free.test.d.ts +0 -25
- package/dist/__tests__/worktree-sync-shell-free.test.d.ts.map +0 -1
- package/dist/__tests__/worktree-sync-shell-free.test.js +0 -185
- package/dist/__tests__/worktree-sync-shell-free.test.js.map +0 -1
- package/dist/__tests__/worktree.test.d.ts +0 -2
- package/dist/__tests__/worktree.test.d.ts.map +0 -1
- package/dist/__tests__/worktree.test.js +0 -168
- package/dist/__tests__/worktree.test.js.map +0 -1
- package/dist/lib/code-context-file.test.d.ts +0 -19
- package/dist/lib/code-context-file.test.d.ts.map +0 -1
- package/dist/lib/code-context-file.test.js +0 -202
- package/dist/lib/code-context-file.test.js.map +0 -1
- package/dist/lib/harness/console/announce.test.d.ts +0 -2
- package/dist/lib/harness/console/announce.test.d.ts.map +0 -1
- package/dist/lib/harness/console/announce.test.js +0 -104
- package/dist/lib/harness/console/announce.test.js.map +0 -1
- package/dist/lib/harness/console/by-session.test.d.ts +0 -2
- package/dist/lib/harness/console/by-session.test.d.ts.map +0 -1
- package/dist/lib/harness/console/by-session.test.js +0 -86
- package/dist/lib/harness/console/by-session.test.js.map +0 -1
- package/dist/lib/harness/console/console.test.d.ts +0 -2
- package/dist/lib/harness/console/console.test.d.ts.map +0 -1
- package/dist/lib/harness/console/console.test.js +0 -269
- package/dist/lib/harness/console/console.test.js.map +0 -1
- package/dist/lib/harness/console/decision-request.test.d.ts +0 -2
- package/dist/lib/harness/console/decision-request.test.d.ts.map +0 -1
- package/dist/lib/harness/console/decision-request.test.js +0 -75
- package/dist/lib/harness/console/decision-request.test.js.map +0 -1
- package/dist/lib/harness/console/rank.test.d.ts +0 -2
- package/dist/lib/harness/console/rank.test.d.ts.map +0 -1
- package/dist/lib/harness/console/rank.test.js +0 -124
- package/dist/lib/harness/console/rank.test.js.map +0 -1
- package/dist/lib/harness/console/render.test.d.ts +0 -2
- package/dist/lib/harness/console/render.test.d.ts.map +0 -1
- package/dist/lib/harness/console/render.test.js +0 -96
- package/dist/lib/harness/console/render.test.js.map +0 -1
- package/dist/lib/harness/console/replay-cli.test.d.ts +0 -2
- package/dist/lib/harness/console/replay-cli.test.d.ts.map +0 -1
- package/dist/lib/harness/console/replay-cli.test.js +0 -96
- package/dist/lib/harness/console/replay-cli.test.js.map +0 -1
- package/dist/lib/harness/console/replay.test.d.ts +0 -2
- package/dist/lib/harness/console/replay.test.d.ts.map +0 -1
- package/dist/lib/harness/console/replay.test.js +0 -81
- package/dist/lib/harness/console/replay.test.js.map +0 -1
- package/dist/lib/harness/console/turn-reader.test.d.ts +0 -2
- package/dist/lib/harness/console/turn-reader.test.d.ts.map +0 -1
- package/dist/lib/harness/console/turn-reader.test.js +0 -108
- package/dist/lib/harness/console/turn-reader.test.js.map +0 -1
- package/dist/lib/harness/credential.test.d.ts +0 -2
- package/dist/lib/harness/credential.test.d.ts.map +0 -1
- package/dist/lib/harness/credential.test.js +0 -74
- package/dist/lib/harness/credential.test.js.map +0 -1
- package/dist/lib/harness/evaluate.test.d.ts +0 -2
- package/dist/lib/harness/evaluate.test.d.ts.map +0 -1
- package/dist/lib/harness/evaluate.test.js +0 -621
- package/dist/lib/harness/evaluate.test.js.map +0 -1
- package/dist/lib/harness/gate.test.d.ts +0 -2
- package/dist/lib/harness/gate.test.d.ts.map +0 -1
- package/dist/lib/harness/gate.test.js +0 -111
- package/dist/lib/harness/gate.test.js.map +0 -1
- package/dist/lib/harness/self-check.test.d.ts +0 -2
- package/dist/lib/harness/self-check.test.d.ts.map +0 -1
- package/dist/lib/harness/self-check.test.js +0 -43
- package/dist/lib/harness/self-check.test.js.map +0 -1
- package/dist/lib/harness/transcript.test.d.ts +0 -2
- package/dist/lib/harness/transcript.test.d.ts.map +0 -1
- package/dist/lib/harness/transcript.test.js +0 -118
- package/dist/lib/harness/transcript.test.js.map +0 -1
- package/dist/lib/projects-registry.test.d.ts +0 -2
- package/dist/lib/projects-registry.test.d.ts.map +0 -1
- package/dist/lib/projects-registry.test.js +0 -176
- package/dist/lib/projects-registry.test.js.map +0 -1
- package/dist/lib/roster.test.d.ts +0 -15
- package/dist/lib/roster.test.d.ts.map +0 -1
- package/dist/lib/roster.test.js +0 -299
- package/dist/lib/roster.test.js.map +0 -1
- package/dist/lib/vault.test.d.ts +0 -17
- package/dist/lib/vault.test.d.ts.map +0 -1
- package/dist/lib/vault.test.js +0 -169
- package/dist/lib/vault.test.js.map +0 -1
- package/dist/lib/window-view.test.d.ts +0 -2
- package/dist/lib/window-view.test.d.ts.map +0 -1
- package/dist/lib/window-view.test.js +0 -168
- package/dist/lib/window-view.test.js.map +0 -1
- package/dist/standards/fail-loud-standard.md +0 -495
- package/dist/standards/known-issues-standard.md +0 -380
- package/dist/standards/rulings.md +0 -104
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
import { describe, it, expect } from 'vitest';
|
|
2
|
-
import { readFileSync, readdirSync } from 'fs';
|
|
3
|
-
import { join } from 'path';
|
|
4
|
-
const AGENT_CONFIG_DIR = join(__dirname, '..', '..', '..', 'agent-config');
|
|
5
|
-
const ROLEGUIDES_DIR = join(__dirname, '..', '..', '..', 'roleguides');
|
|
6
|
-
// Phase 0 (#4227): AGENTS.md.template is the canonical instruction file loaded
|
|
7
|
-
// every session. PR-B flipped CLAUDE.md.template to a one-line `@AGENTS.md`
|
|
8
|
-
// import shim, so the budget applies to the canonical file and the shim carries
|
|
9
|
-
// no instruction content — asserted below.
|
|
10
|
-
const CANONICAL_TEMPLATE_PATH = join(AGENT_CONFIG_DIR, 'AGENTS.md.template');
|
|
11
|
-
const SHIM_TEMPLATE_PATH = join(AGENT_CONFIG_DIR, 'CLAUDE.md.template');
|
|
12
|
-
const CLAUDE_MD_MAX_LINES = 200;
|
|
13
|
-
// A shim is an import line plus a provenance comment. The cap exists so
|
|
14
|
-
// instruction content cannot quietly reappear here and diverge from the
|
|
15
|
-
// canonical source — two instruction files is the state Phase 0 removed.
|
|
16
|
-
const SHIM_MAX_BYTES = 600;
|
|
17
|
-
const ROLEGUIDE_MAX_LINES = 1500;
|
|
18
|
-
/**
|
|
19
|
-
* Whole-shape whitelist for the shim (PR-B security review, Should Fix 2).
|
|
20
|
-
*
|
|
21
|
-
* The first cut used a denylist (no known headings) plus a 600-byte cap. That left
|
|
22
|
-
* 245 bytes of headroom and admitted a SECOND import line:
|
|
23
|
-
* `@AGENTS.md\n@.claude/local-overrides.md` passed every pin while adding a live
|
|
24
|
-
* instruction source no CI check knew about. A denylist enumerates what you thought
|
|
25
|
-
* of; this whitelist enumerates what is allowed and rejects everything else.
|
|
26
|
-
*
|
|
27
|
-
* Allowed shape, exactly: the import line, a blank line, and one HTML comment.
|
|
28
|
-
*/
|
|
29
|
-
const SHIM_SHAPE_RE = /^@AGENTS\.md\n\n<!--\n(?:(?!-->)[\s\S])*\n-->\n$/;
|
|
30
|
-
describe('CLAUDE.md.template is an @AGENTS.md shim (PR-B, #4227)', () => {
|
|
31
|
-
it('matches the exact allowed shim shape (import line + provenance comment only)', () => {
|
|
32
|
-
const content = readFileSync(SHIM_TEMPLATE_PATH, 'utf-8');
|
|
33
|
-
expect(SHIM_SHAPE_RE.test(content)).toBe(true);
|
|
34
|
-
});
|
|
35
|
-
it('contains exactly ONE import line', () => {
|
|
36
|
-
// A second `@`-import is a second instruction source. The shape regex already
|
|
37
|
-
// rejects it; this asserts the property directly so the failure names the cause.
|
|
38
|
-
const importLines = readFileSync(SHIM_TEMPLATE_PATH, 'utf-8')
|
|
39
|
-
.split('\n')
|
|
40
|
-
.filter((l) => l.startsWith('@'));
|
|
41
|
-
expect(importLines).toEqual(['@AGENTS.md']);
|
|
42
|
-
});
|
|
43
|
-
it('has `@AGENTS.md` as its exact first line', () => {
|
|
44
|
-
const first = readFileSync(SHIM_TEMPLATE_PATH, 'utf-8').split('\n')[0];
|
|
45
|
-
expect(first).toBe('@AGENTS.md');
|
|
46
|
-
});
|
|
47
|
-
it(`is under ${SHIM_MAX_BYTES} bytes (no instruction content)`, () => {
|
|
48
|
-
const bytes = Buffer.byteLength(readFileSync(SHIM_TEMPLATE_PATH));
|
|
49
|
-
expect(bytes).toBeLessThan(SHIM_MAX_BYTES);
|
|
50
|
-
});
|
|
51
|
-
it('rejects the shapes the previous denylist admitted', () => {
|
|
52
|
-
// Pinned as a unit test on the matcher so the bypass class stays closed even
|
|
53
|
-
// if the on-disk file changes.
|
|
54
|
-
const rejected = [
|
|
55
|
-
'@AGENTS.md\n@.claude/local-overrides.md\n', // second import
|
|
56
|
-
'@AGENTS.md\n\n<!--\nok\n-->\n@evil.md\n', // import after the comment
|
|
57
|
-
'@AGENTS.md\n\n## Cross-team communication\n', // instruction content
|
|
58
|
-
'@evil.md\n\n<!--\nok\n-->\n', // wrong import target
|
|
59
|
-
'@AGENTS.md\n', // no provenance comment
|
|
60
|
-
];
|
|
61
|
-
for (const bad of rejected) {
|
|
62
|
-
expect(SHIM_SHAPE_RE.test(bad), `should reject: ${JSON.stringify(bad)}`).toBe(false);
|
|
63
|
-
}
|
|
64
|
-
});
|
|
65
|
-
});
|
|
66
|
-
describe('AGENTS.md template budget', () => {
|
|
67
|
-
it(`must be ≤${CLAUDE_MD_MAX_LINES} lines (loaded every session across all teams)`, () => {
|
|
68
|
-
const content = readFileSync(CANONICAL_TEMPLATE_PATH, 'utf-8');
|
|
69
|
-
const lineCount = content.split('\n').length;
|
|
70
|
-
if (lineCount > CLAUDE_MD_MAX_LINES) {
|
|
71
|
-
throw new Error(`AGENTS.md template is ${lineCount} lines — exceeds the ${CLAUDE_MD_MAX_LINES}-line budget.\n` +
|
|
72
|
-
`Every line costs tokens × sessions × teams. To fix:\n` +
|
|
73
|
-
` 1. Move reference material to \`mx agent-help\` (CLI help)\n` +
|
|
74
|
-
` 2. Move team-specific content to roleguides or .ai/ instructions\n` +
|
|
75
|
-
` 3. Shorten code examples\n` +
|
|
76
|
-
` 4. Consolidate overlapping sections\n` +
|
|
77
|
-
`See: product/dev-log/platform-team/v1.57-claude-md-re-shrinkage.md`);
|
|
78
|
-
}
|
|
79
|
-
expect(lineCount).toBeLessThanOrEqual(CLAUDE_MD_MAX_LINES);
|
|
80
|
-
});
|
|
81
|
-
it('canonical template file exists and is not empty', () => {
|
|
82
|
-
const content = readFileSync(CANONICAL_TEMPLATE_PATH, 'utf-8');
|
|
83
|
-
expect(content.length).toBeGreaterThan(0);
|
|
84
|
-
expect(content.split('\n').length).toBeGreaterThan(10);
|
|
85
|
-
});
|
|
86
|
-
});
|
|
87
|
-
describe('roleguide size budget', () => {
|
|
88
|
-
it(`all roleguides must be ≤${ROLEGUIDE_MAX_LINES} lines (loaded once per session)`, () => {
|
|
89
|
-
let files;
|
|
90
|
-
try {
|
|
91
|
-
files = readdirSync(ROLEGUIDES_DIR).filter(f => f.endsWith('.md'));
|
|
92
|
-
}
|
|
93
|
-
catch {
|
|
94
|
-
// Roleguides dir may not exist in test environment
|
|
95
|
-
return;
|
|
96
|
-
}
|
|
97
|
-
const oversize = [];
|
|
98
|
-
for (const file of files) {
|
|
99
|
-
const content = readFileSync(join(ROLEGUIDES_DIR, file), 'utf-8');
|
|
100
|
-
const lineCount = content.split('\n').length;
|
|
101
|
-
if (lineCount > ROLEGUIDE_MAX_LINES) {
|
|
102
|
-
oversize.push({ file, lines: lineCount });
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
if (oversize.length > 0) {
|
|
106
|
-
const details = oversize
|
|
107
|
-
.map(({ file, lines }) => ` - ${file}: ${lines} lines (${Math.round((lines / ROLEGUIDE_MAX_LINES - 1) * 100)}% over)`)
|
|
108
|
-
.join('\n');
|
|
109
|
-
// Warn but don't block — roleguide content is owned by consumer teams.
|
|
110
|
-
// Platform team flags oversize roleguides in known issues.
|
|
111
|
-
console.warn(`⚠ ${oversize.length} roleguide(s) exceed the ${ROLEGUIDE_MAX_LINES}-line budget:\n${details}\n` +
|
|
112
|
-
`Action: flag to respective teams to move details to named memories or appendices.`);
|
|
113
|
-
}
|
|
114
|
-
// Hard gate only for extreme violations (>20% over budget)
|
|
115
|
-
const extremeOversize = oversize.filter(({ lines }) => lines > ROLEGUIDE_MAX_LINES * 1.2);
|
|
116
|
-
expect(extremeOversize).toHaveLength(0);
|
|
117
|
-
});
|
|
118
|
-
});
|
|
119
|
-
//# sourceMappingURL=template-budget.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"template-budget.test.js","sourceRoot":"","sources":["../../src/__tests__/template-budget.test.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The embedded team-builder roleguide must equal the file it claims to copy (#34).
|
|
3
|
-
*
|
|
4
|
-
* `mx-agent new project` writes `TEAM_BUILDER_ROLEGUIDE` into every project it
|
|
5
|
-
* creates (`new.ts:174-176`), and creation-time template strings reach nothing
|
|
6
|
-
* afterwards: `config-sync` writes only under `configSource`, so nothing repairs
|
|
7
|
-
* the copy later, and `bootstrap.ts` deliberately never overwrites an existing
|
|
8
|
-
* roleguide. The literal IS the roleguide a new project gets.
|
|
9
|
-
*
|
|
10
|
-
* It had drifted by 215 lines. This repository's roleguide carried the twelve-row
|
|
11
|
-
* completion contract; the embedded copy carried eight, missing exactly the four
|
|
12
|
-
* coordination rows, so a team-builder in any created project reported teams
|
|
13
|
-
* complete while four rows went unchecked. `templates.ts` asked a human to keep a
|
|
14
|
-
* 25 KB string literal in sync with a file. That is not a mechanism.
|
|
15
|
-
*
|
|
16
|
-
* This is the mechanism (#34 acceptance row 1).
|
|
17
|
-
*/
|
|
18
|
-
export {};
|
|
19
|
-
//# sourceMappingURL=template-sync.test.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"template-sync.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/template-sync.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG"}
|
|
@@ -1,480 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The embedded team-builder roleguide must equal the file it claims to copy (#34).
|
|
3
|
-
*
|
|
4
|
-
* `mx-agent new project` writes `TEAM_BUILDER_ROLEGUIDE` into every project it
|
|
5
|
-
* creates (`new.ts:174-176`), and creation-time template strings reach nothing
|
|
6
|
-
* afterwards: `config-sync` writes only under `configSource`, so nothing repairs
|
|
7
|
-
* the copy later, and `bootstrap.ts` deliberately never overwrites an existing
|
|
8
|
-
* roleguide. The literal IS the roleguide a new project gets.
|
|
9
|
-
*
|
|
10
|
-
* It had drifted by 215 lines. This repository's roleguide carried the twelve-row
|
|
11
|
-
* completion contract; the embedded copy carried eight, missing exactly the four
|
|
12
|
-
* coordination rows, so a team-builder in any created project reported teams
|
|
13
|
-
* complete while four rows went unchecked. `templates.ts` asked a human to keep a
|
|
14
|
-
* 25 KB string literal in sync with a file. That is not a mechanism.
|
|
15
|
-
*
|
|
16
|
-
* This is the mechanism (#34 acceptance row 1).
|
|
17
|
-
*/
|
|
18
|
-
import { describe, it, expect, beforeAll, afterAll } from 'vitest';
|
|
19
|
-
import { mkdirSync, mkdtempSync, readFileSync, readdirSync, rmSync, statSync, writeFileSync } from 'fs';
|
|
20
|
-
import { spawnSync } from 'child_process';
|
|
21
|
-
import { tmpdir } from 'os';
|
|
22
|
-
import { join, dirname, relative } from 'path';
|
|
23
|
-
import { fileURLToPath } from 'url';
|
|
24
|
-
import { TEAM_BUILDER_ROLEGUIDE, ROLEGUIDE_SKELETON, newProjectGitignoreTemplate, } from '../lib/templates.js';
|
|
25
|
-
import { __testing } from '../commands/create.js';
|
|
26
|
-
import { extractMarkerBlock, BEHAVIORAL_START_MARKER, BEHAVIORAL_END_MARKER, } from '../lib/behavioral-injection.js';
|
|
27
|
-
import { RUNTIME_FILENAME } from '../lib/runtime/resolve.js';
|
|
28
|
-
import { FALLBACK_FILENAME, LEASE_FILENAME, CORRUPT_FILENAME } from '../lib/coordination-fallback.js';
|
|
29
|
-
import { AGENTS_OVERRIDE_FILENAME, CODEX_DIR, CODEX_CONFIG_FILENAME, CODEX_HOOKS_FILENAME, } from '../lib/runtime/codex-config.js';
|
|
30
|
-
import { LOCK_FILENAME } from '../lib/leader-lock.js';
|
|
31
|
-
import { CODE_CONTEXT_FILENAME } from '../lib/code-context-file.js';
|
|
32
|
-
import { COORDINATION_MARKER_FILE, COORDINATION_CACHE_PREFIX } from '../lib/coordination-worktree.js';
|
|
33
|
-
import { FRAMEWORK_AGENTS_FILENAME } from '../lib/instruction-files.js';
|
|
34
|
-
import { GENERATION_FILE, SYNC_STATE_FILE } from '../lib/bundled-config.js';
|
|
35
|
-
const ROLEGUIDE_PATH = join(dirname(fileURLToPath(import.meta.url)), '..', '..', '..', 'roleguides', 'team-builder.md');
|
|
36
|
-
const SKELETON_PATH = join(dirname(fileURLToPath(import.meta.url)), '..', '..', '..', 'templates', 'roleguide-skeleton.md');
|
|
37
|
-
const REGENERATE = 'node scripts/sync-team-builder-roleguide.mjs';
|
|
38
|
-
/**
|
|
39
|
-
* The 1-based line of the first difference, or 0 when the two are identical.
|
|
40
|
-
*
|
|
41
|
-
* Extracted so the one-character case is asserted on the comparison itself. A
|
|
42
|
-
* suite that only compares the shipped pair proves the pair matches today; it
|
|
43
|
-
* does not prove the comparison would notice if it stopped matching, and that is
|
|
44
|
-
* the claim this file exists to make (#83 B1).
|
|
45
|
-
*/
|
|
46
|
-
function firstDifferingLine(embedded, onDisk) {
|
|
47
|
-
if (embedded === onDisk)
|
|
48
|
-
return 0;
|
|
49
|
-
const a = embedded.split('\n');
|
|
50
|
-
const b = onDisk.split('\n');
|
|
51
|
-
for (let i = 0; i < Math.max(a.length, b.length); i++) {
|
|
52
|
-
if (a[i] !== b[i])
|
|
53
|
-
return i + 1;
|
|
54
|
-
}
|
|
55
|
-
return 0;
|
|
56
|
-
}
|
|
57
|
-
describe('TEAM_BUILDER_ROLEGUIDE is the roleguide file (#34)', () => {
|
|
58
|
-
it('equals mx-agent-system/roleguides/team-builder.md byte for byte', () => {
|
|
59
|
-
const onDisk = readFileSync(ROLEGUIDE_PATH, 'utf-8');
|
|
60
|
-
if (TEAM_BUILDER_ROLEGUIDE !== onDisk) {
|
|
61
|
-
const embedded = TEAM_BUILDER_ROLEGUIDE.split('\n');
|
|
62
|
-
const file = onDisk.split('\n');
|
|
63
|
-
const firstDiff = file.findIndex((line, i) => embedded[i] !== line);
|
|
64
|
-
throw new Error(`The embedded team-builder roleguide has drifted from the file.\n` +
|
|
65
|
-
` file: ${file.length} lines, ${onDisk.length} characters\n` +
|
|
66
|
-
` embedded: ${embedded.length} lines, ${TEAM_BUILDER_ROLEGUIDE.length} characters\n` +
|
|
67
|
-
` first differing line: ${firstDiff + 1}\n` +
|
|
68
|
-
`Every project created from the embedded copy receives it verbatim and nothing\n` +
|
|
69
|
-
`repairs it afterwards (#34). Regenerate and commit both files:\n` +
|
|
70
|
-
` ${REGENERATE}`);
|
|
71
|
-
}
|
|
72
|
-
expect(TEAM_BUILDER_ROLEGUIDE).toBe(onDisk);
|
|
73
|
-
});
|
|
74
|
-
it('carries the fifteen-row completion contract, not an older count', () => {
|
|
75
|
-
// The four rows a created project used to lose are the coordination rows.
|
|
76
|
-
// The count moved from twelve to fourteen when row 0 (identity) and row 13
|
|
77
|
-
// (placeholders) joined the table (#83 B4), and to fifteen when row 14 (the
|
|
78
|
-
// CLI built in the worktree) joined it (#123). The three older counts are
|
|
79
|
-
// pinned as absent, because a project created from a stale constant is the
|
|
80
|
-
// defect this file exists for (#34).
|
|
81
|
-
expect(TEAM_BUILDER_ROLEGUIDE).toContain('all fifteen rows are Yes');
|
|
82
|
-
expect(TEAM_BUILDER_ROLEGUIDE).not.toContain('all fourteen rows are Yes');
|
|
83
|
-
expect(TEAM_BUILDER_ROLEGUIDE).not.toContain('all twelve rows are Yes');
|
|
84
|
-
expect(TEAM_BUILDER_ROLEGUIDE).not.toContain('all eight rows are Yes');
|
|
85
|
-
expect(TEAM_BUILDER_ROLEGUIDE).toContain('.mx-coordination-team');
|
|
86
|
-
expect(TEAM_BUILDER_ROLEGUIDE).toContain('coordination brief');
|
|
87
|
-
});
|
|
88
|
-
it('states the generate-then-fill order in step 5, which row 13 enforces', () => {
|
|
89
|
-
// Step 5 used to say "WRITE — Save the roleguide", and every creation so far
|
|
90
|
-
// hand-wrote one. The embedded copy is the step every created project reads,
|
|
91
|
-
// so the order lives or dies here (#83 B4).
|
|
92
|
-
expect(TEAM_BUILDER_ROLEGUIDE).toContain('Step 5: GENERATE');
|
|
93
|
-
expect(TEAM_BUILDER_ROLEGUIDE).toContain('Do not hand-write the roleguide');
|
|
94
|
-
expect(TEAM_BUILDER_ROLEGUIDE).toContain('row 13');
|
|
95
|
-
});
|
|
96
|
-
it('states the same order in the session-flow diagram, which step 5 contradicted', () => {
|
|
97
|
-
// The diagram still read `5. WRITE - Save roleguide to ...` after step 5
|
|
98
|
-
// became GENERATE, so the first thing a builder reads told it to hand-write
|
|
99
|
-
// the file (#71, red-team finding 6). A reader who stops at the diagram is
|
|
100
|
-
// the reader this line protects.
|
|
101
|
-
expect(TEAM_BUILDER_ROLEGUIDE).toContain('5. GENERATE');
|
|
102
|
-
expect(TEAM_BUILDER_ROLEGUIDE).not.toContain('5. WRITE');
|
|
103
|
-
expect(TEAM_BUILDER_ROLEGUIDE).not.toContain('written in Step 5');
|
|
104
|
-
});
|
|
105
|
-
it('sends the step 3 draft to the notes file, not to the path step 5a generates', () => {
|
|
106
|
-
// Step 3 wrote its checkpoint to `<slug>-leader.md`, which is the path the
|
|
107
|
-
// generator creates exclusively. A project created from a stale constant
|
|
108
|
-
// would keep sending drafts there (#71, findings 1 and 4).
|
|
109
|
-
expect(TEAM_BUILDER_ROLEGUIDE).toContain('<team-slug>-leader.draft-notes.md');
|
|
110
|
-
expect(TEAM_BUILDER_ROLEGUIDE).toContain('The final path must not exist before this run');
|
|
111
|
-
expect(TEAM_BUILDER_ROLEGUIDE).toContain('when the git state is unclear');
|
|
112
|
-
});
|
|
113
|
-
it('still holds the draft marker byte for byte, which row 13 refuses', () => {
|
|
114
|
-
// `create.ts` matches this literal. The constant and the markdown are two
|
|
115
|
-
// copies of one string, so a reworded marker fails here rather than in a
|
|
116
|
-
// creation months later.
|
|
117
|
-
expect(TEAM_BUILDER_ROLEGUIDE).toMatch(__testing.DRAFT_MARKER_RE);
|
|
118
|
-
expect(TEAM_BUILDER_ROLEGUIDE).toContain('<!-- DRAFT \u2014 pending review \u2014 do not use until approved -->');
|
|
119
|
-
});
|
|
120
|
-
it('passes the provisioning identity gate, which every new project runs first', () => {
|
|
121
|
-
// `new project` step 8 provisions team-builder from this string. A foreign
|
|
122
|
-
// memory prefix here refuses the first team of every project (#39, #48).
|
|
123
|
-
expect(__testing.checkRoleguideIdentity(TEAM_BUILDER_ROLEGUIDE, 'team-builder', 'mx-agent', true)).toEqual([]);
|
|
124
|
-
});
|
|
125
|
-
it('still yields a non-empty behavioral block after the copy', () => {
|
|
126
|
-
const result = extractMarkerBlock(TEAM_BUILDER_ROLEGUIDE, 'TEAM_BUILDER_ROLEGUIDE');
|
|
127
|
-
expect(result.ok).toBe(true);
|
|
128
|
-
expect(result.content).not.toBe('');
|
|
129
|
-
expect(TEAM_BUILDER_ROLEGUIDE).toContain(BEHAVIORAL_START_MARKER);
|
|
130
|
-
expect(TEAM_BUILDER_ROLEGUIDE).toContain(BEHAVIORAL_END_MARKER);
|
|
131
|
-
});
|
|
132
|
-
});
|
|
133
|
-
/**
|
|
134
|
-
* The embedded skeleton must equal the file it claims to copy (#83 B1).
|
|
135
|
-
*
|
|
136
|
-
* `mx-agent provision` generates a team's first roleguide from
|
|
137
|
-
* `ROLEGUIDE_SKELETON` when no roleguide exists at the expected path, and it
|
|
138
|
-
* fills the identity slice into that copy. Every judgement placeholder in the
|
|
139
|
-
* generated file, every section heading, and the two behavioral markers come
|
|
140
|
-
* from this constant, so a constant that drifts from the file writes a shape
|
|
141
|
-
* nobody in this repository edited into every team created afterwards. The
|
|
142
|
-
* team-builder embed had already drifted by 215 lines before anyone noticed
|
|
143
|
-
* (#34); the same mechanism covers both.
|
|
144
|
-
*/
|
|
145
|
-
describe('ROLEGUIDE_SKELETON is the skeleton file (#83 B1)', () => {
|
|
146
|
-
it('equals mx-agent-system/templates/roleguide-skeleton.md byte for byte', () => {
|
|
147
|
-
const onDisk = readFileSync(SKELETON_PATH, 'utf-8');
|
|
148
|
-
if (ROLEGUIDE_SKELETON !== onDisk) {
|
|
149
|
-
throw new Error(`The embedded roleguide skeleton has drifted from the file.\n` +
|
|
150
|
-
` file: ${onDisk.split('\n').length} lines, ${onDisk.length} characters\n` +
|
|
151
|
-
` embedded: ${ROLEGUIDE_SKELETON.split('\n').length} lines, ${ROLEGUIDE_SKELETON.length} characters\n` +
|
|
152
|
-
` first differing line: ${firstDifferingLine(ROLEGUIDE_SKELETON, onDisk)}\n` +
|
|
153
|
-
`Every roleguide provision generates starts from the embedded copy and nothing\n` +
|
|
154
|
-
`repairs it afterwards (#83 B2). Regenerate and commit both files:\n` +
|
|
155
|
-
` ${REGENERATE}`);
|
|
156
|
-
}
|
|
157
|
-
expect(ROLEGUIDE_SKELETON).toBe(onDisk);
|
|
158
|
-
});
|
|
159
|
-
it('reports a one-character edit to the skeleton as a difference', () => {
|
|
160
|
-
// Acceptance row 4 of #83: the test fails on a one-character edit made
|
|
161
|
-
// without regenerating. Asserted on the comparison, against the real file,
|
|
162
|
-
// without editing the shipped one.
|
|
163
|
-
const onDisk = readFileSync(SKELETON_PATH, 'utf-8');
|
|
164
|
-
const oneCharacterEdit = `${onDisk.slice(0, 1)}X${onDisk.slice(1)}`;
|
|
165
|
-
expect(firstDifferingLine(ROLEGUIDE_SKELETON, onDisk)).toBe(0);
|
|
166
|
-
expect(firstDifferingLine(oneCharacterEdit, onDisk)).toBe(1);
|
|
167
|
-
expect(ROLEGUIDE_SKELETON).not.toBe(oneCharacterEdit);
|
|
168
|
-
});
|
|
169
|
-
it('keeps the two behavioral markers, which provision refuses a roleguide without', () => {
|
|
170
|
-
const result = extractMarkerBlock(ROLEGUIDE_SKELETON, 'ROLEGUIDE_SKELETON');
|
|
171
|
-
expect(result.ok).toBe(true);
|
|
172
|
-
expect(result.content).not.toBe('');
|
|
173
|
-
expect(ROLEGUIDE_SKELETON).toContain(BEHAVIORAL_START_MARKER);
|
|
174
|
-
expect(ROLEGUIDE_SKELETON).toContain(BEHAVIORAL_END_MARKER);
|
|
175
|
-
});
|
|
176
|
-
it('spells its named memories with the project placeholder, never a project name', () => {
|
|
177
|
-
// The skeleton travels between projects the way team-builder.md does, so its
|
|
178
|
-
// memory names must name no project at all (#39). The generator replaces the
|
|
179
|
-
// placeholder with this project's slug; a hardcoded prefix here would survive
|
|
180
|
-
// that replacement and reach the identity gate as another project's name.
|
|
181
|
-
expect(ROLEGUIDE_SKELETON).toContain('<PROJECT_SLUG>-<TEAM>-leader-state');
|
|
182
|
-
expect(ROLEGUIDE_SKELETON).not.toContain('memnexus-<TEAM>-');
|
|
183
|
-
});
|
|
184
|
-
});
|
|
185
|
-
/**
|
|
186
|
-
* The embed escaping, proved rather than asserted (security pre-ruling B-2,
|
|
187
|
-
* #83 comment 5380868449).
|
|
188
|
-
*
|
|
189
|
-
* Byte equality between constant and file passes today partly by luck: the
|
|
190
|
-
* skeleton holds 0 occurrences of `${` and 0 backslashes. The first `${TEAM}`
|
|
191
|
-
* someone writes into either source file would turn the generated constant into
|
|
192
|
-
* a live interpolation, and the outcome ranges from a build error to a runtime
|
|
193
|
-
* value substituted into every roleguide the CLI generates. The order of the
|
|
194
|
-
* three replacements is what prevents it, so the order is what is tested.
|
|
195
|
-
*/
|
|
196
|
-
describe('escapeForTemplateLiteral round-trips every sequence that matters', () => {
|
|
197
|
-
/** All three sequences, including the two that only order gets right. */
|
|
198
|
-
const FIXTURE = [
|
|
199
|
-
'a backtick: `',
|
|
200
|
-
'an interpolation opener: ${TEAM}',
|
|
201
|
-
'a lone dollar: $TEAM and $ alone',
|
|
202
|
-
'a backslash: \\',
|
|
203
|
-
'a backslash then a backtick: \\`',
|
|
204
|
-
'a backslash then an opener: \\${TEAM}',
|
|
205
|
-
].join('\n');
|
|
206
|
-
/** Non-literal specifier: the script is JavaScript, and this test needs its export. */
|
|
207
|
-
const SCRIPT = new URL('../../scripts/sync-team-builder-roleguide.mjs', import.meta.url).href;
|
|
208
|
-
async function escape() {
|
|
209
|
-
const mod = await import(SCRIPT);
|
|
210
|
-
return mod.escapeForTemplateLiteral;
|
|
211
|
-
}
|
|
212
|
-
it('produces a literal that evaluates back to the original bytes', async () => {
|
|
213
|
-
const escapeForTemplateLiteral = await escape();
|
|
214
|
-
// The proof: parse the escaped text AS a template literal, the way the
|
|
215
|
-
// TypeScript compiler will parse templates.ts, and compare with the input.
|
|
216
|
-
const evaluated = new Function(`return \`${escapeForTemplateLiteral(FIXTURE)}\`;`)();
|
|
217
|
-
expect(evaluated).toBe(FIXTURE);
|
|
218
|
-
});
|
|
219
|
-
it('escapes the backslash first, so an escape is never re-escaped', async () => {
|
|
220
|
-
const escapeForTemplateLiteral = await escape();
|
|
221
|
-
// Input is two characters, a backslash and a backtick. Correct output is
|
|
222
|
-
// four: an escaped backslash, then an escaped backtick.
|
|
223
|
-
expect(escapeForTemplateLiteral('\\`')).toBe('\\\\\\`');
|
|
224
|
-
});
|
|
225
|
-
it('fails to round-trip when the order is reversed, which is why the order is fixed', async () => {
|
|
226
|
-
const escapeForTemplateLiteral = await escape();
|
|
227
|
-
const wrongOrder = (text) => text.replace(/`/g, '\\`').replace(/\\/g, '\\\\').replace(/\$\{/g, '\\${');
|
|
228
|
-
// The negative control. Without it, the test above would pass for an
|
|
229
|
-
// implementation that happens to work on this fixture for another reason.
|
|
230
|
-
expect(wrongOrder('\\`')).not.toBe(escapeForTemplateLiteral('\\`'));
|
|
231
|
-
expect(() => new Function(`return \`${wrongOrder(FIXTURE)}\`;`)()).toThrow();
|
|
232
|
-
});
|
|
233
|
-
it('importing the script rewrites nothing', async () => {
|
|
234
|
-
// The export exists because the test needs it. A script that did its work at
|
|
235
|
-
// import time would rewrite templates.ts whenever this suite ran.
|
|
236
|
-
const before = readFileSync(join(dirname(fileURLToPath(import.meta.url)), '..', 'lib', 'templates.ts'), 'utf-8');
|
|
237
|
-
await import(SCRIPT);
|
|
238
|
-
const after = readFileSync(join(dirname(fileURLToPath(import.meta.url)), '..', 'lib', 'templates.ts'), 'utf-8');
|
|
239
|
-
expect(after).toBe(before);
|
|
240
|
-
});
|
|
241
|
-
});
|
|
242
|
-
describe('the placeholder scan narrows without hiding a real placeholder (#83 B3)', () => {
|
|
243
|
-
it('names no prose metavariable that the skeleton also ships', () => {
|
|
244
|
-
// Row 13 skips `<N>`, `<X>` and `<YYYYMMDD>` because this repository's
|
|
245
|
-
// finished roleguides use them as prose. If the skeleton ever ships one of
|
|
246
|
-
// those names as a real placeholder, the skip would hide it, so the two sets
|
|
247
|
-
// are asserted disjoint here rather than trusted to stay that way.
|
|
248
|
-
const shipped = __testing.SKELETON_PLACEHOLDERS;
|
|
249
|
-
const prose = [...__testing.PROSE_METAVARIABLES];
|
|
250
|
-
expect(prose.filter((token) => shipped.has(token))).toEqual([]);
|
|
251
|
-
});
|
|
252
|
-
});
|
|
253
|
-
/**
|
|
254
|
-
* The .gitignore every new project starts with (#107).
|
|
255
|
-
*
|
|
256
|
-
* `newProjectGitignoreTemplate()` wrote `/.claude/`, `.worktrees/` and
|
|
257
|
-
* `.mx-code-context.json` and stopped there. The coordination client caches a Key
|
|
258
|
-
* Vault bearer token at `.mx-coordination-token--<project>--<team>`
|
|
259
|
-
* (`lib/coordination-token.ts:100`, mode 0600), so every project created from the
|
|
260
|
-
* template held a live credential untracked at each worktree root, one
|
|
261
|
-
* `git add -A` from a commit. This repository fixed the same defect for itself at
|
|
262
|
-
* `.gitignore:39-43` under #28; the template never got the line.
|
|
263
|
-
*/
|
|
264
|
-
describe('newProjectGitignoreTemplate ignores the coordination token cache (#107)', () => {
|
|
265
|
-
it('ignores the bearer-token cache, and says why in a comment', () => {
|
|
266
|
-
const written = newProjectGitignoreTemplate();
|
|
267
|
-
expect(written).toContain('.mx-coordination-token--*');
|
|
268
|
-
expect(written).toMatch(/Never\n# commit it|Never commit it/);
|
|
269
|
-
});
|
|
270
|
-
it('keeps every line it already wrote, and adds the other worktree runtime files', () => {
|
|
271
|
-
const written = newProjectGitignoreTemplate();
|
|
272
|
-
for (const line of ['/.claude/', '.worktrees/', '.mx-code-context.json', 'node_modules/']) {
|
|
273
|
-
expect(written.split('\n')).toContain(line);
|
|
274
|
-
}
|
|
275
|
-
for (const line of ['.mx-coordination-team', '.mx-leader.lock', '.mx-escalations/']) {
|
|
276
|
-
expect(written.split('\n')).toContain(line);
|
|
277
|
-
}
|
|
278
|
-
});
|
|
279
|
-
});
|
|
280
|
-
/**
|
|
281
|
-
* Every runtime path the CLI and the hooks write into a project root or a team
|
|
282
|
-
* worktree is ignored by the template a new project starts with (#539 part 1).
|
|
283
|
-
*
|
|
284
|
-
* The #107 pin above is a hand-written list of lines, and it is the weakness this
|
|
285
|
-
* block replaces: the template ignored 6 runtime paths and the code wrote at least
|
|
286
|
-
* 15, so `.mx-hook-timing/`, `.mx-runtime` and the coordination fallback queue
|
|
287
|
-
* were one `git add -A` from a commit in every new project. Here each path is
|
|
288
|
-
* built from the constant the writer uses, where one is exported, and `git
|
|
289
|
-
* check-ignore` decides, against the template written into a real repository.
|
|
290
|
-
*
|
|
291
|
-
* The grep guard below closes the other half: a new `.mx-` path literal in
|
|
292
|
-
* `cli/src` or `agent-config/hooks` fails this file until someone either covers
|
|
293
|
-
* it here or puts it on the exclusion list with the reason it never lands in a
|
|
294
|
-
* tree.
|
|
295
|
-
*/
|
|
296
|
-
const SRC_ROOT = join(dirname(fileURLToPath(import.meta.url)), '..');
|
|
297
|
-
const HOOKS_ROOT = join(SRC_ROOT, '..', '..', 'agent-config', 'hooks');
|
|
298
|
-
/**
|
|
299
|
-
* Each `.mx-` token found in the scanned sources that lands in a project root or
|
|
300
|
-
* worktree, mapped to a root-relative path the template must ignore. A token is
|
|
301
|
-
* the literal up to the first character that is not a name character, so
|
|
302
|
-
* `.mx-coordination-token--${project}--${team}` reads as `.mx-coordination-token--`.
|
|
303
|
-
*/
|
|
304
|
-
const COVERED_TOKENS = {
|
|
305
|
-
[RUNTIME_FILENAME]: RUNTIME_FILENAME,
|
|
306
|
-
[FALLBACK_FILENAME]: FALLBACK_FILENAME,
|
|
307
|
-
[LEASE_FILENAME]: LEASE_FILENAME,
|
|
308
|
-
[CORRUPT_FILENAME]: CORRUPT_FILENAME,
|
|
309
|
-
[LOCK_FILENAME]: LOCK_FILENAME,
|
|
310
|
-
[CODE_CONTEXT_FILENAME]: CODE_CONTEXT_FILENAME,
|
|
311
|
-
[COORDINATION_MARKER_FILE]: COORDINATION_MARKER_FILE,
|
|
312
|
-
[COORDINATION_CACHE_PREFIX]: `${COORDINATION_CACHE_PREFIX}some-project--some-team`,
|
|
313
|
-
[`${COORDINATION_CACHE_PREFIX}*`]: `${COORDINATION_CACHE_PREFIX}some-project--some-team`,
|
|
314
|
-
[FRAMEWORK_AGENTS_FILENAME]: FRAMEWORK_AGENTS_FILENAME,
|
|
315
|
-
// The 16 hooks' shared timing probe: "$root/.mx-hook-timing" (worktree-guard.sh).
|
|
316
|
-
'.mx-hook-timing': '.mx-hook-timing/h07.log',
|
|
317
|
-
// Named in the templates.ts instructions agents follow.
|
|
318
|
-
'.mx-drafts': '.mx-drafts/draft.md',
|
|
319
|
-
'.mx-escalations': '.mx-escalations/incident.md',
|
|
320
|
-
'.mx-validation-request.md': '.mx-validation-request.md',
|
|
321
|
-
// A body file named in a comment in lib/memory.ts; the /.mx-*.md class.
|
|
322
|
-
'.mx-qa-report-28.md': '.mx-qa-report-28.md',
|
|
323
|
-
'.mx-*.md': '.mx-body-file.md',
|
|
324
|
-
'.mx-*.json': '.mx-readback.json',
|
|
325
|
-
// codex-config.ts writeFileEnsuringDir: `${absPath}.mx-tmp-<pid>-<hex>` beside the
|
|
326
|
-
// artifact, which is AGENTS.override.md at the root or a file under .codex/.
|
|
327
|
-
'.mx-tmp-': `${AGENTS_OVERRIDE_FILENAME}.mx-tmp-4242-0123456789ab`,
|
|
328
|
-
'.mx-tmp-*': `${CODEX_CONFIG_FILENAME}.mx-tmp-4242-0123456789ab`,
|
|
329
|
-
// create.ts: `${worktreePath}.mx-provision.lock`, a sibling of the worktree
|
|
330
|
-
// inside the worktree directory, which `.worktrees/` already ignores.
|
|
331
|
-
'.mx-provision.lock': '.worktrees/team-builder-20260101.mx-provision.lock',
|
|
332
|
-
// Scratch and completion-gate capture directories agents write at the root (#213).
|
|
333
|
-
'.mx-tmp': '.mx-tmp/close-190.md',
|
|
334
|
-
'.mx-gate-evidence': '.mx-gate-evidence/capture.txt',
|
|
335
|
-
};
|
|
336
|
-
/**
|
|
337
|
-
* Tokens that never name a file in a project root or worktree, each with the
|
|
338
|
-
* reason. A token here is not checked against the template.
|
|
339
|
-
*/
|
|
340
|
-
const EXCLUDED_TOKENS = {
|
|
341
|
-
// ~/.mx-agent/ (lib/config.ts) is the operator's directory under $HOME; a
|
|
342
|
-
// tracked `.mx-agent/` docs directory is source, not runtime output.
|
|
343
|
-
'.mx-agent': 'operator directory under $HOME, or a tracked documents directory',
|
|
344
|
-
// /tmp state files the hooks write, outside any tree.
|
|
345
|
-
'.mx-checkpoint-counter-': '/tmp state file (memory-checkpoint-reminder.sh)',
|
|
346
|
-
'.mx-checkpoint-counter-*.session-*': '/tmp state file (memory-checkpoint-reminder.sh)',
|
|
347
|
-
'.mx-deploy-pending-': '/tmp state file (deploy-verification-reminder.sh)',
|
|
348
|
-
'.mx-session-capture-': '/tmp state file (auto-capture-session-end.sh)',
|
|
349
|
-
// Written under configSource by config-sync, and COMMITTED by `new project`
|
|
350
|
-
// (new.ts, the `git add -A` after config-sync). Asserted NOT ignored below:
|
|
351
|
-
// ignoring them would leave the generation stamp out of the initial commit.
|
|
352
|
-
[GENERATION_FILE]: 'tracked, under configSource; must stay unignored',
|
|
353
|
-
[SYNC_STATE_FILE]: 'tracked, under configSource; must stay unignored',
|
|
354
|
-
// Prose in coordination-worktree.ts naming a `!.mx-*` negation line.
|
|
355
|
-
'.mx-*': 'a gitignore pattern quoted in prose, not a path',
|
|
356
|
-
};
|
|
357
|
-
/** Root-relative paths outside the `.mx-` class the template must also ignore. */
|
|
358
|
-
const OTHER_RUNTIME_PATHS = [
|
|
359
|
-
'CLAUDE.local.md',
|
|
360
|
-
// Generated in each team worktree by deployClaudeMd (claude.ts) when the project
|
|
361
|
-
// does not track it; `new project` never commits one (lead decision, v42).
|
|
362
|
-
'AGENTS.md',
|
|
363
|
-
AGENTS_OVERRIDE_FILENAME,
|
|
364
|
-
CODEX_CONFIG_FILENAME,
|
|
365
|
-
CODEX_HOOKS_FILENAME,
|
|
366
|
-
`${CODEX_DIR}/sessions/rollout.jsonl`,
|
|
367
|
-
'.claude/settings.json',
|
|
368
|
-
];
|
|
369
|
-
/** Paths a new project commits, which the template must NOT ignore. */
|
|
370
|
-
const MUST_STAY_UNIGNORED = [
|
|
371
|
-
'CLAUDE.md',
|
|
372
|
-
`mx-agent-system/agent-config/${GENERATION_FILE}`,
|
|
373
|
-
`mx-agent-system/agent-config/${SYNC_STATE_FILE}`,
|
|
374
|
-
// The first team's catalog entry, which provisioning commits on a project with
|
|
375
|
-
// zero remotes (#607). Ignored, `git add` would refuse it and step 8 would fall
|
|
376
|
-
// back to an uncommitted entry (v42 bar-raiser SF-4).
|
|
377
|
-
'mx-agent-system/teams/team-builder.md',
|
|
378
|
-
];
|
|
379
|
-
const MX_TOKEN = /\.mx-[A-Za-z0-9_*-]+(?:\.[A-Za-z0-9_*-]+)*/g;
|
|
380
|
-
/** Every `.mx-` token in `text`, deduplicated. */
|
|
381
|
-
function mxTokens(text) {
|
|
382
|
-
return [...new Set(text.match(MX_TOKEN) ?? [])];
|
|
383
|
-
}
|
|
384
|
-
/** Tokens in `texts` that are neither covered nor excluded, sorted. */
|
|
385
|
-
function unclassifiedTokens(texts) {
|
|
386
|
-
const known = new Set([...Object.keys(COVERED_TOKENS), ...Object.keys(EXCLUDED_TOKENS)]);
|
|
387
|
-
return [...new Set(texts.flatMap(mxTokens))].filter((t) => !known.has(t)).sort();
|
|
388
|
-
}
|
|
389
|
-
/** Non-test source files under `root`, recursively. Tests write temp fixtures, not runtime state. */
|
|
390
|
-
function scannedFiles(root) {
|
|
391
|
-
const out = [];
|
|
392
|
-
for (const name of readdirSync(root)) {
|
|
393
|
-
const p = join(root, name);
|
|
394
|
-
if (statSync(p).isDirectory()) {
|
|
395
|
-
if (name === '__tests__' || name === 'node_modules')
|
|
396
|
-
continue;
|
|
397
|
-
out.push(...scannedFiles(p));
|
|
398
|
-
}
|
|
399
|
-
else if (!/\.test\.[a-z]+$/.test(name)) {
|
|
400
|
-
out.push(p);
|
|
401
|
-
}
|
|
402
|
-
}
|
|
403
|
-
return out;
|
|
404
|
-
}
|
|
405
|
-
/** git with no user or system excludes, so only the repository's .gitignore decides. */
|
|
406
|
-
function gitIn(repo, args) {
|
|
407
|
-
const r = spawnSync('git', ['-c', 'core.excludesFile=/dev/null', ...args], {
|
|
408
|
-
cwd: repo,
|
|
409
|
-
encoding: 'utf-8',
|
|
410
|
-
env: { ...process.env, GIT_CONFIG_NOSYSTEM: '1' },
|
|
411
|
-
});
|
|
412
|
-
return { status: r.status, stdout: r.stdout ?? '' };
|
|
413
|
-
}
|
|
414
|
-
/** Write `gitignore` into a fresh repository, create every path, return those git does NOT ignore. */
|
|
415
|
-
function unignored(repo, gitignore, paths) {
|
|
416
|
-
writeFileSync(join(repo, '.gitignore'), gitignore);
|
|
417
|
-
for (const p of paths) {
|
|
418
|
-
mkdirSync(dirname(join(repo, p)), { recursive: true });
|
|
419
|
-
writeFileSync(join(repo, p), 'runtime\n');
|
|
420
|
-
}
|
|
421
|
-
// `git check-ignore` exits 0 when the path is ignored and 1 when it is not.
|
|
422
|
-
return paths.filter((p) => gitIn(repo, ['check-ignore', '-q', '--', p]).status !== 0);
|
|
423
|
-
}
|
|
424
|
-
describe('newProjectGitignoreTemplate ignores every runtime path the CLI and hooks write (#539)', () => {
|
|
425
|
-
let tmp;
|
|
426
|
-
let n = 0;
|
|
427
|
-
const freshRepo = () => {
|
|
428
|
-
const repo = join(tmp, `repo-${n++}`);
|
|
429
|
-
mkdirSync(repo);
|
|
430
|
-
expect(gitIn(repo, ['init', '-q']).status).toBe(0);
|
|
431
|
-
return repo;
|
|
432
|
-
};
|
|
433
|
-
beforeAll(() => {
|
|
434
|
-
tmp = mkdtempSync(join(tmpdir(), 'mx-gitignore-pin-'));
|
|
435
|
-
});
|
|
436
|
-
afterAll(() => {
|
|
437
|
-
rmSync(tmp, { recursive: true, force: true });
|
|
438
|
-
});
|
|
439
|
-
it('git check-ignore matches every covered runtime path, built from the writers\' constants', () => {
|
|
440
|
-
const paths = [...new Set([...Object.values(COVERED_TOKENS), ...OTHER_RUNTIME_PATHS])];
|
|
441
|
-
expect(unignored(freshRepo(), newProjectGitignoreTemplate(), paths)).toEqual([]);
|
|
442
|
-
});
|
|
443
|
-
it('does NOT ignore CLAUDE.md, the committed config-sync files or the catalog entry, and says why', () => {
|
|
444
|
-
const repo = freshRepo();
|
|
445
|
-
const written = newProjectGitignoreTemplate();
|
|
446
|
-
expect(unignored(repo, written, MUST_STAY_UNIGNORED)).toEqual(MUST_STAY_UNIGNORED);
|
|
447
|
-
expect(written.split('\n')).not.toContain('/CLAUDE.md');
|
|
448
|
-
expect(written).toMatch(/CLAUDE\.md is not ignored/);
|
|
449
|
-
});
|
|
450
|
-
it('ignores the root AGENTS.md only, and says how to track one', () => {
|
|
451
|
-
const written = newProjectGitignoreTemplate();
|
|
452
|
-
expect(written.split('\n')).toContain('/AGENTS.md');
|
|
453
|
-
expect(written).toMatch(/does not untrack a committed AGENTS\.md/);
|
|
454
|
-
expect(unignored(freshRepo(), written, ['AGENTS.md', 'docs/AGENTS.md'])).toEqual(['docs/AGENTS.md']);
|
|
455
|
-
});
|
|
456
|
-
it('the pin fails on a copy of the template missing one line', () => {
|
|
457
|
-
const bad = newProjectGitignoreTemplate()
|
|
458
|
-
.split('\n')
|
|
459
|
-
.filter((l) => l !== RUNTIME_FILENAME)
|
|
460
|
-
.join('\n');
|
|
461
|
-
expect(unignored(freshRepo(), bad, [RUNTIME_FILENAME, CODE_CONTEXT_FILENAME])).toEqual([RUNTIME_FILENAME]);
|
|
462
|
-
});
|
|
463
|
-
it('grep guard: every .mx- literal in cli/src and agent-config/hooks is covered or excluded', () => {
|
|
464
|
-
const files = [...scannedFiles(SRC_ROOT), ...scannedFiles(HOOKS_ROOT)];
|
|
465
|
-
const offenders = files.flatMap((f) => unclassifiedTokens([readFileSync(f, 'utf-8')]).map((t) => `${relative(join(SRC_ROOT, '..', '..'), f)}: ${t}`));
|
|
466
|
-
// A failure names the file and the token. Fix: add the token to COVERED_TOKENS
|
|
467
|
-
// with a path the template must ignore (and add the template line), or to
|
|
468
|
-
// EXCLUDED_TOKENS with the reason it never lands in a project tree.
|
|
469
|
-
expect(files.length).toBeGreaterThan(100);
|
|
470
|
-
expect(offenders).toEqual([]);
|
|
471
|
-
});
|
|
472
|
-
it('grep guard fails on a bad copy: a new uncovered .mx- literal is reported', () => {
|
|
473
|
-
const badCopy = "const STATE = join(worktreePath, '.mx-new-runtime-state.jsonl');\n// see .mx-runtime\n";
|
|
474
|
-
expect(unclassifiedTokens([badCopy])).toEqual(['.mx-new-runtime-state.jsonl']);
|
|
475
|
-
});
|
|
476
|
-
it('the two token tables do not overlap', () => {
|
|
477
|
-
expect(Object.keys(COVERED_TOKENS).filter((t) => t in EXCLUDED_TOKENS)).toEqual([]);
|
|
478
|
-
});
|
|
479
|
-
});
|
|
480
|
-
//# sourceMappingURL=template-sync.test.js.map
|