@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.
- package/dist/__tests__/agents-md-canonicalization.test.js +31 -1
- package/dist/__tests__/agents-md-canonicalization.test.js.map +1 -1
- package/dist/__tests__/behavioral-extraction.test.js +50 -0
- package/dist/__tests__/behavioral-extraction.test.js.map +1 -1
- package/dist/__tests__/bootstrap-behavioral-contract.test.js +6 -3
- package/dist/__tests__/bootstrap-behavioral-contract.test.js.map +1 -1
- package/dist/__tests__/bundle-config.test.js +28 -2
- package/dist/__tests__/bundle-config.test.js.map +1 -1
- package/dist/__tests__/catalog-interaction.test.d.ts +25 -0
- package/dist/__tests__/catalog-interaction.test.d.ts.map +1 -0
- package/dist/__tests__/catalog-interaction.test.js +269 -0
- package/dist/__tests__/catalog-interaction.test.js.map +1 -0
- package/dist/__tests__/catalog-named-memories.test.d.ts +2 -0
- package/dist/__tests__/catalog-named-memories.test.d.ts.map +1 -0
- package/dist/__tests__/catalog-named-memories.test.js +204 -0
- package/dist/__tests__/catalog-named-memories.test.js.map +1 -0
- package/dist/__tests__/catalog-origin-main.test.d.ts +15 -0
- package/dist/__tests__/catalog-origin-main.test.d.ts.map +1 -0
- package/dist/__tests__/catalog-origin-main.test.js +296 -0
- package/dist/__tests__/catalog-origin-main.test.js.map +1 -0
- package/dist/__tests__/catalog.test.d.ts +2 -0
- package/dist/__tests__/catalog.test.d.ts.map +1 -0
- package/dist/__tests__/catalog.test.js +131 -0
- package/dist/__tests__/catalog.test.js.map +1 -0
- package/dist/__tests__/claude-local-sanitizer.test.d.ts +24 -0
- package/dist/__tests__/claude-local-sanitizer.test.d.ts.map +1 -0
- package/dist/__tests__/claude-local-sanitizer.test.js +906 -0
- package/dist/__tests__/claude-local-sanitizer.test.js.map +1 -0
- package/dist/__tests__/cli-build-integration.test.d.ts +2 -0
- package/dist/__tests__/cli-build-integration.test.d.ts.map +1 -0
- package/dist/__tests__/cli-build-integration.test.js +64 -0
- package/dist/__tests__/cli-build-integration.test.js.map +1 -0
- package/dist/__tests__/cli-build.test.d.ts +2 -0
- package/dist/__tests__/cli-build.test.d.ts.map +1 -0
- package/dist/__tests__/cli-build.test.js +640 -0
- package/dist/__tests__/cli-build.test.js.map +1 -0
- package/dist/__tests__/codex-deploy-config.test.js +60 -0
- package/dist/__tests__/codex-deploy-config.test.js.map +1 -1
- package/dist/__tests__/completion-rows-discriminate.test.d.ts +20 -0
- package/dist/__tests__/completion-rows-discriminate.test.d.ts.map +1 -0
- package/dist/__tests__/completion-rows-discriminate.test.js +481 -0
- package/dist/__tests__/completion-rows-discriminate.test.js.map +1 -0
- package/dist/__tests__/config-fidelity-archived-symlinks.test.d.ts +2 -0
- package/dist/__tests__/config-fidelity-archived-symlinks.test.d.ts.map +1 -0
- package/dist/__tests__/config-fidelity-archived-symlinks.test.js +127 -0
- package/dist/__tests__/config-fidelity-archived-symlinks.test.js.map +1 -0
- package/dist/__tests__/config-fidelity-display.test.d.ts +2 -0
- package/dist/__tests__/config-fidelity-display.test.d.ts.map +1 -0
- package/dist/__tests__/config-fidelity-display.test.js +77 -0
- package/dist/__tests__/config-fidelity-display.test.js.map +1 -0
- package/dist/__tests__/config-fidelity.test.js +166 -33
- package/dist/__tests__/config-fidelity.test.js.map +1 -1
- package/dist/__tests__/config-generation-gate.test.js +78 -0
- package/dist/__tests__/config-generation-gate.test.js.map +1 -1
- package/dist/__tests__/config-sync.test.js +89 -1
- package/dist/__tests__/config-sync.test.js.map +1 -1
- package/dist/__tests__/coordination-401-production-wiring.test.js +12 -7
- package/dist/__tests__/coordination-401-production-wiring.test.js.map +1 -1
- package/dist/__tests__/coordination-401-recovery.test.js +39 -32
- package/dist/__tests__/coordination-401-recovery.test.js.map +1 -1
- package/dist/__tests__/coordination-brief-pin.test.js +21 -8
- package/dist/__tests__/coordination-brief-pin.test.js.map +1 -1
- package/dist/__tests__/coordination-client.test.js +316 -3
- package/dist/__tests__/coordination-client.test.js.map +1 -1
- package/dist/__tests__/coordination-credential-endpoint.test.d.ts +24 -0
- package/dist/__tests__/coordination-credential-endpoint.test.d.ts.map +1 -0
- package/dist/__tests__/coordination-credential-endpoint.test.js +1290 -0
- package/dist/__tests__/coordination-credential-endpoint.test.js.map +1 -0
- package/dist/__tests__/coordination-memory.test.js +20 -4
- package/dist/__tests__/coordination-memory.test.js.map +1 -1
- package/dist/__tests__/coordination-provision.test.js +22 -14
- package/dist/__tests__/coordination-provision.test.js.map +1 -1
- package/dist/__tests__/coordination-status-registration.test.d.ts +16 -0
- package/dist/__tests__/coordination-status-registration.test.d.ts.map +1 -0
- package/dist/__tests__/coordination-status-registration.test.js +480 -0
- package/dist/__tests__/coordination-status-registration.test.js.map +1 -0
- package/dist/__tests__/coordination-token-multitenant.test.js +24 -24
- package/dist/__tests__/coordination-token-multitenant.test.js.map +1 -1
- package/dist/__tests__/coordination-token.test.js +35 -28
- package/dist/__tests__/coordination-token.test.js.map +1 -1
- package/dist/__tests__/creation-pr-class-check.test.d.ts +17 -0
- package/dist/__tests__/creation-pr-class-check.test.d.ts.map +1 -0
- package/dist/__tests__/creation-pr-class-check.test.js +346 -0
- package/dist/__tests__/creation-pr-class-check.test.js.map +1 -0
- package/dist/__tests__/decision-check.test.d.ts +2 -0
- package/dist/__tests__/decision-check.test.d.ts.map +1 -0
- package/dist/__tests__/decision-check.test.js +105 -0
- package/dist/__tests__/decision-check.test.js.map +1 -0
- package/dist/__tests__/digest-team-omission.test.d.ts +15 -0
- package/dist/__tests__/digest-team-omission.test.d.ts.map +1 -0
- package/dist/__tests__/digest-team-omission.test.js +247 -0
- package/dist/__tests__/digest-team-omission.test.js.map +1 -0
- package/dist/__tests__/doctor-worktree-path.test.d.ts +17 -0
- package/dist/__tests__/doctor-worktree-path.test.d.ts.map +1 -0
- package/dist/__tests__/doctor-worktree-path.test.js +158 -0
- package/dist/__tests__/doctor-worktree-path.test.js.map +1 -0
- package/dist/__tests__/fleet-data.test.js +40 -7
- package/dist/__tests__/fleet-data.test.js.map +1 -1
- package/dist/__tests__/fleet-tmux.test.js +2 -2
- package/dist/__tests__/fleet-tmux.test.js.map +1 -1
- package/dist/__tests__/generate-claude.test.js +137 -3
- package/dist/__tests__/generate-claude.test.js.map +1 -1
- package/dist/__tests__/git-env.test.d.ts +14 -0
- package/dist/__tests__/git-env.test.d.ts.map +1 -0
- package/dist/__tests__/git-env.test.js +131 -0
- package/dist/__tests__/git-env.test.js.map +1 -0
- package/dist/__tests__/git-identity-isolation.test.d.ts +33 -0
- package/dist/__tests__/git-identity-isolation.test.d.ts.map +1 -0
- package/dist/__tests__/git-identity-isolation.test.js +626 -0
- package/dist/__tests__/git-identity-isolation.test.js.map +1 -0
- package/dist/__tests__/harness-extract.test.d.ts +19 -0
- package/dist/__tests__/harness-extract.test.d.ts.map +1 -0
- package/dist/__tests__/harness-extract.test.js +566 -0
- package/dist/__tests__/harness-extract.test.js.map +1 -0
- package/dist/__tests__/harness-wiring.test.d.ts +16 -0
- package/dist/__tests__/harness-wiring.test.d.ts.map +1 -0
- package/dist/__tests__/harness-wiring.test.js +469 -0
- package/dist/__tests__/harness-wiring.test.js.map +1 -0
- package/dist/__tests__/hook-heal.test.js +17 -0
- package/dist/__tests__/hook-heal.test.js.map +1 -1
- package/dist/__tests__/init-coordination-url.test.d.ts +11 -0
- package/dist/__tests__/init-coordination-url.test.d.ts.map +1 -0
- package/dist/__tests__/init-coordination-url.test.js +114 -0
- package/dist/__tests__/init-coordination-url.test.js.map +1 -0
- package/dist/__tests__/memory-autocreate.test.js +574 -8
- package/dist/__tests__/memory-autocreate.test.js.map +1 -1
- package/dist/__tests__/memory-log-result.test.d.ts +13 -0
- package/dist/__tests__/memory-log-result.test.d.ts.map +1 -0
- package/dist/__tests__/memory-log-result.test.js +113 -0
- package/dist/__tests__/memory-log-result.test.js.map +1 -0
- package/dist/__tests__/memory-named-exists.test.d.ts +16 -0
- package/dist/__tests__/memory-named-exists.test.d.ts.map +1 -0
- package/dist/__tests__/memory-named-exists.test.js +288 -0
- package/dist/__tests__/memory-named-exists.test.js.map +1 -0
- package/dist/__tests__/mx-agent-cli-pin-validation.test.js +23 -47
- package/dist/__tests__/mx-agent-cli-pin-validation.test.js.map +1 -1
- package/dist/__tests__/mx-agent-cli-version-pin.test.js +34 -88
- package/dist/__tests__/mx-agent-cli-version-pin.test.js.map +1 -1
- package/dist/__tests__/new-project-first-team.test.d.ts +15 -0
- package/dist/__tests__/new-project-first-team.test.d.ts.map +1 -0
- package/dist/__tests__/new-project-first-team.test.js +263 -0
- package/dist/__tests__/new-project-first-team.test.js.map +1 -0
- package/dist/__tests__/otel-env.test.d.ts +2 -0
- package/dist/__tests__/otel-env.test.d.ts.map +1 -0
- package/dist/__tests__/otel-env.test.js +127 -0
- package/dist/__tests__/otel-env.test.js.map +1 -0
- package/dist/__tests__/project-config.test.js +283 -1
- package/dist/__tests__/project-config.test.js.map +1 -1
- package/dist/__tests__/provision-behavioral-contract.test.js +96 -4
- package/dist/__tests__/provision-behavioral-contract.test.js.map +1 -1
- package/dist/__tests__/provision-catalog-precondition.test.d.ts +26 -0
- package/dist/__tests__/provision-catalog-precondition.test.d.ts.map +1 -0
- package/dist/__tests__/provision-catalog-precondition.test.js +620 -0
- package/dist/__tests__/provision-catalog-precondition.test.js.map +1 -0
- package/dist/__tests__/provision-completion-rows.test.d.ts +17 -0
- package/dist/__tests__/provision-completion-rows.test.d.ts.map +1 -0
- package/dist/__tests__/provision-completion-rows.test.js +3187 -0
- package/dist/__tests__/provision-completion-rows.test.js.map +1 -0
- package/dist/__tests__/provision-identity-gate.test.d.ts +20 -0
- package/dist/__tests__/provision-identity-gate.test.d.ts.map +1 -0
- package/dist/__tests__/provision-identity-gate.test.js +600 -0
- package/dist/__tests__/provision-identity-gate.test.js.map +1 -0
- package/dist/__tests__/provision-resume.test.d.ts +26 -0
- package/dist/__tests__/provision-resume.test.d.ts.map +1 -0
- package/dist/__tests__/provision-resume.test.js +1164 -0
- package/dist/__tests__/provision-resume.test.js.map +1 -0
- package/dist/__tests__/provision-roleguide-anchors.test.d.ts +27 -0
- package/dist/__tests__/provision-roleguide-anchors.test.d.ts.map +1 -0
- package/dist/__tests__/provision-roleguide-anchors.test.js +747 -0
- package/dist/__tests__/provision-roleguide-anchors.test.js.map +1 -0
- package/dist/__tests__/provision-skeleton-fill.test.d.ts +16 -0
- package/dist/__tests__/provision-skeleton-fill.test.d.ts.map +1 -0
- package/dist/__tests__/provision-skeleton-fill.test.js +488 -0
- package/dist/__tests__/provision-skeleton-fill.test.js.map +1 -0
- package/dist/__tests__/provision-teambuilder-flow.test.js +93 -7
- package/dist/__tests__/provision-teambuilder-flow.test.js.map +1 -1
- package/dist/__tests__/repo-guard-wiring.test.d.ts +21 -0
- package/dist/__tests__/repo-guard-wiring.test.d.ts.map +1 -0
- package/dist/__tests__/repo-guard-wiring.test.js +638 -0
- package/dist/__tests__/repo-guard-wiring.test.js.map +1 -0
- package/dist/__tests__/report-format.test.d.ts +2 -0
- package/dist/__tests__/report-format.test.d.ts.map +1 -0
- package/dist/__tests__/report-format.test.js +219 -0
- package/dist/__tests__/report-format.test.js.map +1 -0
- package/dist/__tests__/row15-detail-sanitizer.test.d.ts +20 -0
- package/dist/__tests__/row15-detail-sanitizer.test.d.ts.map +1 -0
- package/dist/__tests__/row15-detail-sanitizer.test.js +61 -0
- package/dist/__tests__/row15-detail-sanitizer.test.js.map +1 -0
- package/dist/__tests__/runtime-codex-gateway-pilot.test.d.ts +2 -0
- package/dist/__tests__/runtime-codex-gateway-pilot.test.d.ts.map +1 -0
- package/dist/__tests__/runtime-codex-gateway-pilot.test.js +309 -0
- package/dist/__tests__/runtime-codex-gateway-pilot.test.js.map +1 -0
- package/dist/__tests__/runtime-codex-gateway-provider.test.d.ts +2 -0
- package/dist/__tests__/runtime-codex-gateway-provider.test.d.ts.map +1 -0
- package/dist/__tests__/runtime-codex-gateway-provider.test.js +163 -0
- package/dist/__tests__/runtime-codex-gateway-provider.test.js.map +1 -0
- package/dist/__tests__/runtime-identity.test.d.ts +2 -0
- package/dist/__tests__/runtime-identity.test.d.ts.map +1 -0
- package/dist/__tests__/runtime-identity.test.js +117 -0
- package/dist/__tests__/runtime-identity.test.js.map +1 -0
- package/dist/__tests__/session-pause-provisioning.test.js +6 -1
- package/dist/__tests__/session-pause-provisioning.test.js.map +1 -1
- package/dist/__tests__/session-record-disclosure.test.d.ts +24 -0
- package/dist/__tests__/session-record-disclosure.test.d.ts.map +1 -0
- package/dist/__tests__/session-record-disclosure.test.js +494 -0
- package/dist/__tests__/session-record-disclosure.test.js.map +1 -0
- package/dist/__tests__/session.test.js +35 -0
- package/dist/__tests__/session.test.js.map +1 -1
- package/dist/__tests__/slug-validation.test.js +27 -21
- package/dist/__tests__/slug-validation.test.js.map +1 -1
- package/dist/__tests__/standards-injection.test.d.ts +2 -0
- package/dist/__tests__/standards-injection.test.d.ts.map +1 -0
- package/dist/__tests__/standards-injection.test.js +179 -0
- package/dist/__tests__/standards-injection.test.js.map +1 -0
- package/dist/__tests__/start-interactive-role.test.d.ts +22 -0
- package/dist/__tests__/start-interactive-role.test.d.ts.map +1 -0
- package/dist/__tests__/start-interactive-role.test.js +204 -0
- package/dist/__tests__/start-interactive-role.test.js.map +1 -0
- package/dist/__tests__/start-team-identity.test.d.ts +25 -0
- package/dist/__tests__/start-team-identity.test.d.ts.map +1 -0
- package/dist/__tests__/start-team-identity.test.js +307 -0
- package/dist/__tests__/start-team-identity.test.js.map +1 -0
- package/dist/__tests__/team-memory-commands.test.js +142 -19
- package/dist/__tests__/team-memory-commands.test.js.map +1 -1
- package/dist/__tests__/template-sync.test.d.ts +19 -0
- package/dist/__tests__/template-sync.test.d.ts.map +1 -0
- package/dist/__tests__/template-sync.test.js +270 -0
- package/dist/__tests__/template-sync.test.js.map +1 -0
- package/dist/__tests__/test-project.test.d.ts +18 -0
- package/dist/__tests__/test-project.test.d.ts.map +1 -0
- package/dist/__tests__/test-project.test.js +465 -0
- package/dist/__tests__/test-project.test.js.map +1 -0
- package/dist/__tests__/usage-per-call-grouping.test.d.ts +25 -0
- package/dist/__tests__/usage-per-call-grouping.test.d.ts.map +1 -0
- package/dist/__tests__/usage-per-call-grouping.test.js +952 -0
- package/dist/__tests__/usage-per-call-grouping.test.js.map +1 -0
- package/dist/__tests__/verify-hooks-check-all.test.d.ts +32 -0
- package/dist/__tests__/verify-hooks-check-all.test.d.ts.map +1 -0
- package/dist/__tests__/verify-hooks-check-all.test.js +553 -0
- package/dist/__tests__/verify-hooks-check-all.test.js.map +1 -0
- package/dist/__tests__/worktree-sync-fixture.test.d.ts +17 -0
- package/dist/__tests__/worktree-sync-fixture.test.d.ts.map +1 -0
- package/dist/__tests__/worktree-sync-fixture.test.js +519 -0
- package/dist/__tests__/worktree-sync-fixture.test.js.map +1 -0
- package/dist/__tests__/worktree-sync-hardening.test.d.ts +13 -0
- package/dist/__tests__/worktree-sync-hardening.test.d.ts.map +1 -0
- package/dist/__tests__/worktree-sync-hardening.test.js +919 -0
- package/dist/__tests__/worktree-sync-hardening.test.js.map +1 -0
- package/dist/__tests__/worktree-sync-shell-free.test.d.ts +25 -0
- package/dist/__tests__/worktree-sync-shell-free.test.d.ts.map +1 -0
- package/dist/__tests__/worktree-sync-shell-free.test.js +185 -0
- package/dist/__tests__/worktree-sync-shell-free.test.js.map +1 -0
- package/dist/__tests__/worktree.test.js +75 -1
- package/dist/__tests__/worktree.test.js.map +1 -1
- package/dist/agent-config/.mx-config-generation.json +2 -2
- package/dist/agent-config/AGENTS.md.template +2 -2
- package/dist/agent-config/agents/bar-raiser.md +34 -1
- package/dist/agent-config/agents/red-team.md +34 -1
- package/dist/agent-config/agents/security-reviewer.md +22 -1
- package/dist/agent-config/claude-md/CLAUDE.core.md +6 -1
- package/dist/agent-config/claude-md/CLAUDE.overlay.memnexus.md +1 -3
- package/dist/agent-config/coordination-rosters.generated.json +10 -0
- package/dist/agent-config/hooks/HOOK-TIMEOUTS.md +27 -1
- package/dist/agent-config/hooks/OR-TRUE-AUDIT.md +8 -8
- package/dist/agent-config/hooks/auto-capture-precompact.sh +180 -83
- package/dist/agent-config/hooks/auto-capture-session-end.sh +216 -87
- package/dist/agent-config/hooks/auto-checkpoint.sh +75 -5
- package/dist/agent-config/hooks/coordination-brief.sh +290 -245
- package/dist/agent-config/hooks/deploy-verification-reminder.sh +359 -22
- package/dist/agent-config/hooks/git-mutation-guard.sh +85 -13
- package/dist/agent-config/hooks/observability-sync.sh +46 -9
- package/dist/agent-config/hooks/session-idle-gate.sh +177 -12
- package/dist/agent-config/hooks/subagent-write-guard.sh +670 -0
- package/dist/agent-config/hooks/worktree-guard.sh +36 -7
- package/dist/agent-config/settings.json +15 -2
- package/dist/agent-config/shared/creation-pr-review-checklist.md +317 -0
- package/dist/commands/bootstrap.d.ts.map +1 -1
- package/dist/commands/bootstrap.js +22 -10
- package/dist/commands/bootstrap.js.map +1 -1
- package/dist/commands/config-sync.d.ts +37 -0
- package/dist/commands/config-sync.d.ts.map +1 -1
- package/dist/commands/config-sync.js +36 -18
- package/dist/commands/config-sync.js.map +1 -1
- package/dist/commands/config.d.ts.map +1 -1
- package/dist/commands/config.js +28 -1
- package/dist/commands/config.js.map +1 -1
- package/dist/commands/coordination.d.ts +150 -8
- package/dist/commands/coordination.d.ts.map +1 -1
- package/dist/commands/coordination.js +524 -25
- package/dist/commands/coordination.js.map +1 -1
- package/dist/commands/create.d.ts +922 -1
- package/dist/commands/create.d.ts.map +1 -1
- package/dist/commands/create.js +4934 -345
- package/dist/commands/create.js.map +1 -1
- package/dist/commands/dashboard.d.ts.map +1 -1
- package/dist/commands/dashboard.js +10 -2
- package/dist/commands/dashboard.js.map +1 -1
- package/dist/commands/decision.d.ts +20 -0
- package/dist/commands/decision.d.ts.map +1 -0
- package/dist/commands/decision.js +54 -0
- package/dist/commands/decision.js.map +1 -0
- package/dist/commands/digest.d.ts.map +1 -1
- package/dist/commands/digest.js +91 -7
- package/dist/commands/digest.js.map +1 -1
- package/dist/commands/fleet-tmux.js +1 -1
- package/dist/commands/fleet-tmux.js.map +1 -1
- package/dist/commands/init.d.ts +8 -0
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +26 -1
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/list.d.ts +32 -1
- package/dist/commands/list.d.ts.map +1 -1
- package/dist/commands/list.js +98 -5
- package/dist/commands/list.js.map +1 -1
- package/dist/commands/monitor.d.ts.map +1 -1
- package/dist/commands/monitor.js +8 -2
- package/dist/commands/monitor.js.map +1 -1
- package/dist/commands/new.d.ts +2 -0
- package/dist/commands/new.d.ts.map +1 -1
- package/dist/commands/new.js +114 -21
- package/dist/commands/new.js.map +1 -1
- package/dist/commands/report.d.ts +33 -0
- package/dist/commands/report.d.ts.map +1 -0
- package/dist/commands/report.js +73 -0
- package/dist/commands/report.js.map +1 -0
- package/dist/commands/session.js +1 -1
- package/dist/commands/session.js.map +1 -1
- package/dist/commands/start.d.ts +42 -0
- package/dist/commands/start.d.ts.map +1 -1
- package/dist/commands/start.js +183 -8
- package/dist/commands/start.js.map +1 -1
- package/dist/commands/sync.d.ts +57 -0
- package/dist/commands/sync.d.ts.map +1 -1
- package/dist/commands/sync.js +117 -3
- package/dist/commands/sync.js.map +1 -1
- package/dist/commands/update.d.ts +13 -1
- package/dist/commands/update.d.ts.map +1 -1
- package/dist/commands/update.js +50 -1
- package/dist/commands/update.js.map +1 -1
- package/dist/commands/usage.d.ts +64 -0
- package/dist/commands/usage.d.ts.map +1 -1
- package/dist/commands/usage.js +96 -3
- package/dist/commands/usage.js.map +1 -1
- package/dist/commands/verify-hooks.d.ts +37 -1
- package/dist/commands/verify-hooks.d.ts.map +1 -1
- package/dist/commands/verify-hooks.js +114 -2
- package/dist/commands/verify-hooks.js.map +1 -1
- package/dist/commands/window.d.ts +10 -0
- package/dist/commands/window.d.ts.map +1 -0
- package/dist/commands/window.js +265 -0
- package/dist/commands/window.js.map +1 -0
- package/dist/commands/worktree-sync.d.ts +54 -0
- package/dist/commands/worktree-sync.d.ts.map +1 -0
- package/dist/commands/worktree-sync.js +135 -0
- package/dist/commands/worktree-sync.js.map +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +189 -14
- package/dist/index.js.map +1 -1
- package/dist/lib/agent-session.d.ts +12 -0
- package/dist/lib/agent-session.d.ts.map +1 -1
- package/dist/lib/agent-session.js +189 -42
- package/dist/lib/agent-session.js.map +1 -1
- package/dist/lib/behavioral-injection.d.ts +9 -0
- package/dist/lib/behavioral-injection.d.ts.map +1 -1
- package/dist/lib/behavioral-injection.js +10 -1
- package/dist/lib/behavioral-injection.js.map +1 -1
- package/dist/lib/catalog.d.ts +321 -2
- package/dist/lib/catalog.d.ts.map +1 -1
- package/dist/lib/catalog.js +490 -11
- package/dist/lib/catalog.js.map +1 -1
- package/dist/lib/claude.d.ts +113 -23
- package/dist/lib/claude.d.ts.map +1 -1
- package/dist/lib/claude.js +498 -32
- package/dist/lib/claude.js.map +1 -1
- package/dist/lib/cli-build.d.ts +172 -0
- package/dist/lib/cli-build.d.ts.map +1 -0
- package/dist/lib/cli-build.js +654 -0
- package/dist/lib/cli-build.js.map +1 -0
- package/dist/lib/code-context-file.d.ts +109 -0
- package/dist/lib/code-context-file.d.ts.map +1 -0
- package/dist/lib/code-context-file.js +219 -0
- package/dist/lib/code-context-file.js.map +1 -0
- package/dist/lib/code-context-file.test.d.ts +19 -0
- package/dist/lib/code-context-file.test.d.ts.map +1 -0
- package/dist/lib/code-context-file.test.js +202 -0
- package/dist/lib/code-context-file.test.js.map +1 -0
- package/dist/lib/config-fidelity.d.ts +40 -20
- package/dist/lib/config-fidelity.d.ts.map +1 -1
- package/dist/lib/config-fidelity.js +144 -56
- package/dist/lib/config-fidelity.js.map +1 -1
- package/dist/lib/coordination-client.d.ts +101 -0
- package/dist/lib/coordination-client.d.ts.map +1 -1
- package/dist/lib/coordination-client.js +232 -8
- package/dist/lib/coordination-client.js.map +1 -1
- package/dist/lib/coordination-token.d.ts +333 -6
- package/dist/lib/coordination-token.d.ts.map +1 -1
- package/dist/lib/coordination-token.js +875 -52
- package/dist/lib/coordination-token.js.map +1 -1
- package/dist/lib/decision-check.d.ts +48 -0
- package/dist/lib/decision-check.d.ts.map +1 -0
- package/dist/lib/decision-check.js +149 -0
- package/dist/lib/decision-check.js.map +1 -0
- package/dist/lib/fleet-data.d.ts +34 -0
- package/dist/lib/fleet-data.d.ts.map +1 -1
- package/dist/lib/fleet-data.js +37 -9
- package/dist/lib/fleet-data.js.map +1 -1
- package/dist/lib/fleet-render.js +1 -1
- package/dist/lib/fleet-render.js.map +1 -1
- package/dist/lib/git-identity.d.ts +302 -0
- package/dist/lib/git-identity.d.ts.map +1 -0
- package/dist/lib/git-identity.js +546 -0
- package/dist/lib/git-identity.js.map +1 -0
- package/dist/lib/harness/console/announce.d.ts +45 -0
- package/dist/lib/harness/console/announce.d.ts.map +1 -0
- package/dist/lib/harness/console/announce.js +48 -0
- package/dist/lib/harness/console/announce.js.map +1 -0
- package/dist/lib/harness/console/announce.test.d.ts +2 -0
- package/dist/lib/harness/console/announce.test.d.ts.map +1 -0
- package/dist/lib/harness/console/announce.test.js +104 -0
- package/dist/lib/harness/console/announce.test.js.map +1 -0
- package/dist/lib/harness/console/by-session.d.ts +50 -0
- package/dist/lib/harness/console/by-session.d.ts.map +1 -0
- package/dist/lib/harness/console/by-session.js +83 -0
- package/dist/lib/harness/console/by-session.js.map +1 -0
- package/dist/lib/harness/console/by-session.test.d.ts +2 -0
- package/dist/lib/harness/console/by-session.test.d.ts.map +1 -0
- package/dist/lib/harness/console/by-session.test.js +86 -0
- package/dist/lib/harness/console/by-session.test.js.map +1 -0
- package/dist/lib/harness/console/console.d.ts +67 -0
- package/dist/lib/harness/console/console.d.ts.map +1 -0
- package/dist/lib/harness/console/console.js +373 -0
- package/dist/lib/harness/console/console.js.map +1 -0
- package/dist/lib/harness/console/console.test.d.ts +2 -0
- package/dist/lib/harness/console/console.test.d.ts.map +1 -0
- package/dist/lib/harness/console/console.test.js +269 -0
- package/dist/lib/harness/console/console.test.js.map +1 -0
- package/dist/lib/harness/console/decision-request.d.ts +32 -0
- package/dist/lib/harness/console/decision-request.d.ts.map +1 -0
- package/dist/lib/harness/console/decision-request.js +112 -0
- package/dist/lib/harness/console/decision-request.js.map +1 -0
- package/dist/lib/harness/console/decision-request.test.d.ts +2 -0
- package/dist/lib/harness/console/decision-request.test.d.ts.map +1 -0
- package/dist/lib/harness/console/decision-request.test.js +75 -0
- package/dist/lib/harness/console/decision-request.test.js.map +1 -0
- package/dist/lib/harness/console/fixtures.d.ts +16 -0
- package/dist/lib/harness/console/fixtures.d.ts.map +1 -0
- package/dist/lib/harness/console/fixtures.js +49 -0
- package/dist/lib/harness/console/fixtures.js.map +1 -0
- package/dist/lib/harness/console/index.d.ts +15 -0
- package/dist/lib/harness/console/index.d.ts.map +1 -0
- package/dist/lib/harness/console/index.js +14 -0
- package/dist/lib/harness/console/index.js.map +1 -0
- package/dist/lib/harness/console/rank.d.ts +73 -0
- package/dist/lib/harness/console/rank.d.ts.map +1 -0
- package/dist/lib/harness/console/rank.js +113 -0
- package/dist/lib/harness/console/rank.js.map +1 -0
- package/dist/lib/harness/console/rank.test.d.ts +2 -0
- package/dist/lib/harness/console/rank.test.d.ts.map +1 -0
- package/dist/lib/harness/console/rank.test.js +124 -0
- package/dist/lib/harness/console/rank.test.js.map +1 -0
- package/dist/lib/harness/console/render.d.ts +22 -0
- package/dist/lib/harness/console/render.d.ts.map +1 -0
- package/dist/lib/harness/console/render.js +65 -0
- package/dist/lib/harness/console/render.js.map +1 -0
- package/dist/lib/harness/console/render.test.d.ts +2 -0
- package/dist/lib/harness/console/render.test.d.ts.map +1 -0
- package/dist/lib/harness/console/render.test.js +96 -0
- package/dist/lib/harness/console/render.test.js.map +1 -0
- package/dist/lib/harness/console/replay-cli.test.d.ts +2 -0
- package/dist/lib/harness/console/replay-cli.test.d.ts.map +1 -0
- package/dist/lib/harness/console/replay-cli.test.js +96 -0
- package/dist/lib/harness/console/replay-cli.test.js.map +1 -0
- package/dist/lib/harness/console/replay.d.ts +36 -0
- package/dist/lib/harness/console/replay.d.ts.map +1 -0
- package/dist/lib/harness/console/replay.js +59 -0
- package/dist/lib/harness/console/replay.js.map +1 -0
- package/dist/lib/harness/console/replay.test.d.ts +2 -0
- package/dist/lib/harness/console/replay.test.d.ts.map +1 -0
- package/dist/lib/harness/console/replay.test.js +81 -0
- package/dist/lib/harness/console/replay.test.js.map +1 -0
- package/dist/lib/harness/console/turn-reader.d.ts +50 -0
- package/dist/lib/harness/console/turn-reader.d.ts.map +1 -0
- package/dist/lib/harness/console/turn-reader.js +184 -0
- package/dist/lib/harness/console/turn-reader.js.map +1 -0
- package/dist/lib/harness/console/turn-reader.test.d.ts +2 -0
- package/dist/lib/harness/console/turn-reader.test.d.ts.map +1 -0
- package/dist/lib/harness/console/turn-reader.test.js +108 -0
- package/dist/lib/harness/console/turn-reader.test.js.map +1 -0
- package/dist/lib/harness/console/types.d.ts +109 -0
- package/dist/lib/harness/console/types.d.ts.map +1 -0
- package/dist/lib/harness/console/types.js +2 -0
- package/dist/lib/harness/console/types.js.map +1 -0
- package/dist/lib/harness/contract.d.ts +229 -0
- package/dist/lib/harness/contract.d.ts.map +1 -0
- package/dist/lib/harness/contract.js +22 -0
- package/dist/lib/harness/contract.js.map +1 -0
- package/dist/lib/harness/credential.d.ts +23 -0
- package/dist/lib/harness/credential.d.ts.map +1 -0
- package/dist/lib/harness/credential.js +81 -0
- package/dist/lib/harness/credential.js.map +1 -0
- package/dist/lib/harness/credential.test.d.ts +2 -0
- package/dist/lib/harness/credential.test.d.ts.map +1 -0
- package/dist/lib/harness/credential.test.js +74 -0
- package/dist/lib/harness/credential.test.js.map +1 -0
- package/dist/lib/harness/evaluate.d.ts +390 -0
- package/dist/lib/harness/evaluate.d.ts.map +1 -0
- package/dist/lib/harness/evaluate.js +988 -0
- package/dist/lib/harness/evaluate.js.map +1 -0
- package/dist/lib/harness/evaluate.test.d.ts +2 -0
- package/dist/lib/harness/evaluate.test.d.ts.map +1 -0
- package/dist/lib/harness/evaluate.test.js +621 -0
- package/dist/lib/harness/evaluate.test.js.map +1 -0
- package/dist/lib/harness/extract.d.ts +152 -0
- package/dist/lib/harness/extract.d.ts.map +1 -0
- package/dist/lib/harness/extract.js +1601 -0
- package/dist/lib/harness/extract.js.map +1 -0
- package/dist/lib/harness/gate.d.ts +48 -0
- package/dist/lib/harness/gate.d.ts.map +1 -0
- package/dist/lib/harness/gate.js +60 -0
- package/dist/lib/harness/gate.js.map +1 -0
- package/dist/lib/harness/gate.test.d.ts +2 -0
- package/dist/lib/harness/gate.test.d.ts.map +1 -0
- package/dist/lib/harness/gate.test.js +111 -0
- package/dist/lib/harness/gate.test.js.map +1 -0
- package/dist/lib/harness/self-check.d.ts +59 -0
- package/dist/lib/harness/self-check.d.ts.map +1 -0
- package/dist/lib/harness/self-check.js +56 -0
- package/dist/lib/harness/self-check.js.map +1 -0
- package/dist/lib/harness/self-check.test.d.ts +2 -0
- package/dist/lib/harness/self-check.test.d.ts.map +1 -0
- package/dist/lib/harness/self-check.test.js +43 -0
- package/dist/lib/harness/self-check.test.js.map +1 -0
- package/dist/lib/harness/transcript.d.ts +65 -0
- package/dist/lib/harness/transcript.d.ts.map +1 -0
- package/dist/lib/harness/transcript.js +144 -0
- package/dist/lib/harness/transcript.js.map +1 -0
- package/dist/lib/harness/transcript.test.d.ts +2 -0
- package/dist/lib/harness/transcript.test.d.ts.map +1 -0
- package/dist/lib/harness/transcript.test.js +118 -0
- package/dist/lib/harness/transcript.test.js.map +1 -0
- package/dist/lib/harness-wiring.d.ts +145 -0
- package/dist/lib/harness-wiring.d.ts.map +1 -0
- package/dist/lib/harness-wiring.js +280 -0
- package/dist/lib/harness-wiring.js.map +1 -0
- package/dist/lib/hook-staleness.d.ts +95 -0
- package/dist/lib/hook-staleness.d.ts.map +1 -0
- package/dist/lib/hook-staleness.js +304 -0
- package/dist/lib/hook-staleness.js.map +1 -0
- package/dist/lib/jsonl.d.ts +270 -2
- package/dist/lib/jsonl.d.ts.map +1 -1
- package/dist/lib/jsonl.js +472 -76
- package/dist/lib/jsonl.js.map +1 -1
- package/dist/lib/memory.d.ts +350 -23
- package/dist/lib/memory.d.ts.map +1 -1
- package/dist/lib/memory.js +751 -38
- package/dist/lib/memory.js.map +1 -1
- package/dist/lib/otel-env.d.ts +90 -0
- package/dist/lib/otel-env.d.ts.map +1 -0
- package/dist/lib/otel-env.js +98 -0
- package/dist/lib/otel-env.js.map +1 -0
- package/dist/lib/project-config.d.ts +167 -0
- package/dist/lib/project-config.d.ts.map +1 -1
- package/dist/lib/project-config.js +321 -5
- package/dist/lib/project-config.js.map +1 -1
- package/dist/lib/projects-registry.d.ts +82 -0
- package/dist/lib/projects-registry.d.ts.map +1 -0
- package/dist/lib/projects-registry.js +145 -0
- package/dist/lib/projects-registry.js.map +1 -0
- package/dist/lib/projects-registry.test.d.ts +2 -0
- package/dist/lib/projects-registry.test.d.ts.map +1 -0
- package/dist/lib/projects-registry.test.js +176 -0
- package/dist/lib/projects-registry.test.js.map +1 -0
- package/dist/lib/repo-guard-scope.d.ts +126 -0
- package/dist/lib/repo-guard-scope.d.ts.map +1 -0
- package/dist/lib/repo-guard-scope.js +249 -0
- package/dist/lib/repo-guard-scope.js.map +1 -0
- package/dist/lib/report-format.d.ts +132 -0
- package/dist/lib/report-format.d.ts.map +1 -0
- package/dist/lib/report-format.js +317 -0
- package/dist/lib/report-format.js.map +1 -0
- package/dist/lib/roster.d.ts +99 -0
- package/dist/lib/roster.d.ts.map +1 -0
- package/dist/lib/roster.js +336 -0
- package/dist/lib/roster.js.map +1 -0
- package/dist/lib/roster.test.d.ts +15 -0
- package/dist/lib/roster.test.d.ts.map +1 -0
- package/dist/lib/roster.test.js +299 -0
- package/dist/lib/roster.test.js.map +1 -0
- package/dist/lib/runtime/codex-adapter.d.ts.map +1 -1
- package/dist/lib/runtime/codex-adapter.js +5 -0
- package/dist/lib/runtime/codex-adapter.js.map +1 -1
- package/dist/lib/runtime/codex-config.d.ts +129 -0
- package/dist/lib/runtime/codex-config.d.ts.map +1 -1
- package/dist/lib/runtime/codex-config.js +225 -0
- package/dist/lib/runtime/codex-config.js.map +1 -1
- package/dist/lib/runtime/identity.d.ts +72 -0
- package/dist/lib/runtime/identity.d.ts.map +1 -0
- package/dist/lib/runtime/identity.js +128 -0
- package/dist/lib/runtime/identity.js.map +1 -0
- package/dist/lib/standards.d.ts +99 -0
- package/dist/lib/standards.d.ts.map +1 -0
- package/dist/lib/standards.js +201 -0
- package/dist/lib/standards.js.map +1 -0
- package/dist/lib/team-identity.d.ts +134 -0
- package/dist/lib/team-identity.d.ts.map +1 -0
- package/dist/lib/team-identity.js +193 -0
- package/dist/lib/team-identity.js.map +1 -0
- package/dist/lib/templates.d.ts +29 -2
- package/dist/lib/templates.d.ts.map +1 -1
- package/dist/lib/templates.js +1042 -82
- package/dist/lib/templates.js.map +1 -1
- package/dist/lib/terminal-ui.d.ts.map +1 -1
- package/dist/lib/terminal-ui.js +12 -1
- package/dist/lib/terminal-ui.js.map +1 -1
- package/dist/lib/test-project.d.ts +95 -0
- package/dist/lib/test-project.d.ts.map +1 -0
- package/dist/lib/test-project.js +103 -0
- package/dist/lib/test-project.js.map +1 -0
- package/dist/lib/vault.d.ts +60 -0
- package/dist/lib/vault.d.ts.map +1 -0
- package/dist/lib/vault.js +102 -0
- package/dist/lib/vault.js.map +1 -0
- package/dist/lib/vault.test.d.ts +17 -0
- package/dist/lib/vault.test.d.ts.map +1 -0
- package/dist/lib/vault.test.js +169 -0
- package/dist/lib/vault.test.js.map +1 -0
- package/dist/lib/window-view.d.ts +63 -0
- package/dist/lib/window-view.d.ts.map +1 -0
- package/dist/lib/window-view.js +217 -0
- package/dist/lib/window-view.js.map +1 -0
- package/dist/lib/window-view.test.d.ts +2 -0
- package/dist/lib/window-view.test.d.ts.map +1 -0
- package/dist/lib/window-view.test.js +168 -0
- package/dist/lib/window-view.test.js.map +1 -0
- package/dist/lib/worktree-sync.d.ts +439 -0
- package/dist/lib/worktree-sync.d.ts.map +1 -0
- package/dist/lib/worktree-sync.js +1167 -0
- package/dist/lib/worktree-sync.js.map +1 -0
- package/dist/lib/worktree.d.ts +58 -1
- package/dist/lib/worktree.d.ts.map +1 -1
- package/dist/lib/worktree.js +91 -4
- package/dist/lib/worktree.js.map +1 -1
- package/dist/standards/decision-request.md +98 -0
- package/dist/standards/fail-loud-standard.md +495 -0
- package/dist/standards/po-communication-standard.md +126 -0
- package/dist/standards/report-format.md +128 -0
- package/dist/standards/writing-standard.md +382 -0
- package/package.json +3 -2
- package/scripts/generate-claude.mjs +119 -46
|
@@ -0,0 +1,495 @@
|
|
|
1
|
+
# Fail-Loud Coding Standard
|
|
2
|
+
|
|
3
|
+
> **Status:** Draft (v2.73 Deliverable 2 — tracking issue #4645)
|
|
4
|
+
> **Date:** 2026-07-27 (created) · 2026-07-27 (last updated)
|
|
5
|
+
> **Owner:** agent-platform team lead
|
|
6
|
+
> **Co-owner / reviewers:** DevOps Pipeline team, security-reviewer teammate
|
|
7
|
+
> **Substrate:** lessons memory `d788d10e-923e-44e5-a730-cb8ee2a9bbe1`; COE nomination PR #4628
|
|
8
|
+
> **Related:** #4639 (diagnostic), #4610 (PO decision, open), #4626, #4640, #4643, #4500
|
|
9
|
+
|
|
10
|
+
## Governing principle
|
|
11
|
+
|
|
12
|
+
**A failure must never render identically to a legitimate empty result. A scanner
|
|
13
|
+
must not report clean when it could not scan.**
|
|
14
|
+
|
|
15
|
+
The axis is **loud vs. silent**, not open vs. closed. Fail-closed-and-loud is
|
|
16
|
+
acceptable. Fail-open-and-loud is acceptable where the blast radius justifies it.
|
|
17
|
+
**Fail-open-and-silent is the worst case and is prohibited by this standard.**
|
|
18
|
+
|
|
19
|
+
Three outcomes must stay distinct everywhere in platform-owned code: **pass**,
|
|
20
|
+
**fail**, **could-not-run**. Collapsing the third into either of the other two is the
|
|
21
|
+
defect this document exists to prevent. The #4639 diagnostic counted 47 false-green
|
|
22
|
+
and 65 silent-suppression patterns in this codebase — this corrects current practice,
|
|
23
|
+
it does not warn about a hypothetical.
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## Part 1 — The named failure shapes
|
|
28
|
+
|
|
29
|
+
Each shape below is a prohibition. Each cites the incident that produced it.
|
|
30
|
+
|
|
31
|
+
### FL-1 — silent-empty: an error must not render as a legitimate zero result
|
|
32
|
+
|
|
33
|
+
A code path that catches an error and returns "nothing found" destroys the reader's
|
|
34
|
+
ability to tell failure from emptiness. **Rule:** an error path must produce output
|
|
35
|
+
textually distinct from the empty-success path, and a non-zero exit status or an
|
|
36
|
+
explicit error field.
|
|
37
|
+
|
|
38
|
+
*Incident (KI-FAILURE-MUST-NOT-RENDER-AS-EMPTY-RESULT):* `mx memories get NAME` on
|
|
39
|
+
the auto-detect path converts **any** error into `No memory found`, exit 0 — while
|
|
40
|
+
the explicit `--name` path does not swallow. `mx memories search` prints a green
|
|
41
|
+
check, `Found 0 results`, exit 0 while the backend returns HTTP 502. Three of seven
|
|
42
|
+
fusion branches catch to empty with no log; `build_context` runs six sources each
|
|
43
|
+
catching to empty.
|
|
44
|
+
|
|
45
|
+
*Consequence to internalise:* every measurement taken through such a client is
|
|
46
|
+
unreliable **retroactively** — there was never a way to tell failure from emptiness.
|
|
47
|
+
This retracted our own issue #4637.
|
|
48
|
+
|
|
49
|
+
### FL-2 — false-green: success must not be asserted without being checked
|
|
50
|
+
|
|
51
|
+
A success banner, checkmark, or "OK" line must be emitted only downstream of a
|
|
52
|
+
predicate that could have returned false. **Rule:** if no code path exists in which
|
|
53
|
+
the line is not printed, the line is a decoration, not a status, and must be deleted
|
|
54
|
+
or made conditional.
|
|
55
|
+
|
|
56
|
+
*Incident (KI-UNCONDITIONAL-BANNER-CLAIMS):*
|
|
57
|
+
`mx-agent-system/cli/src/commands/start.ts` (≈ lines 1082–1088) prints
|
|
58
|
+
`Isolation Enabled:` and three `✓` lines unconditionally. The checkmark is a literal
|
|
59
|
+
character inside a template string; nothing is verified. This is worse than a silent
|
|
60
|
+
gap — it is a false green asserted directly to the operator. **Not yet fixed; top
|
|
61
|
+
platform must-fix item (see FL-17).**
|
|
62
|
+
|
|
63
|
+
### FL-3 — error-reshaped-as-success: captured error text must not be re-emitted through a success-shaped presentation path
|
|
64
|
+
|
|
65
|
+
`|| true` after a command whose stderr was captured with `2>&1` does not lose the
|
|
66
|
+
error — it converts the error into an artifact formatted exactly like a successful
|
|
67
|
+
result and delivers it where the reviewer looks for the answer. **Rule:** when
|
|
68
|
+
command output is rendered into a summary, comment, or report, the render must be
|
|
69
|
+
gated on the command's exit status, and the failure render must be visually and
|
|
70
|
+
textually different from the success render.
|
|
71
|
+
|
|
72
|
+
*Incident (COE nomination, PR #4628; `.github/workflows/infra-provision.yml:174` on
|
|
73
|
+
`main` — line corrected from 152 after the pipeline team verified against the file):*
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
RESULT=$(az deployment sub what-if ... --no-pretty-print 2>&1) || true
|
|
77
|
+
echo "$RESULT" >> "$GITHUB_STEP_SUMMARY" # fenced block — same rendering as a real preview
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
Every Bicep PR merged under this condition carried a check that validated nothing.
|
|
81
|
+
Silence is beaten by asking "has this ever fired?" — this is not, because the answer
|
|
82
|
+
is yes and the output is right there. It is beaten only by asking whether the
|
|
83
|
+
artifact is the **kind** of thing it is presented as.
|
|
84
|
+
|
|
85
|
+
### FL-4 — vacuous success: a validator that validated zero items must not report PASS
|
|
86
|
+
|
|
87
|
+
**Rule:** every validator counts what it examined. A count of zero is not a pass. It
|
|
88
|
+
exits with the could-not-validate status (FL-14), names the count, and says why the
|
|
89
|
+
count was zero.
|
|
90
|
+
|
|
91
|
+
*Incident (KI-VACUOUS-SUCCESS-EXIT-ZERO):*
|
|
92
|
+
`dev-tools/scripts/validate-roleguide-behavioral-markers.sh` previously printed
|
|
93
|
+
`0 active team(s) OK` and exited 0 when every team was skipped. It now refuses:
|
|
94
|
+
|
|
95
|
+
```
|
|
96
|
+
roleguide-markers: NO active teams were validated — refusing to report success.
|
|
97
|
+
N team(s) in <dir> were skipped as retired: ...
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
exiting **2**, not 1 — nothing failed validation; the run was not meaningful.
|
|
101
|
+
|
|
102
|
+
### FL-5 — clean-when-could-not-scan: a scanner that could not scan must not report no findings
|
|
103
|
+
|
|
104
|
+
**Rule:** for any matcher, enumerate the statuses that mean *the scan completed*.
|
|
105
|
+
Every other status — including statuses you did not anticipate, and including
|
|
106
|
+
**status 0 with no output** — is a failed scan. On an egress or safety path, a failed
|
|
107
|
+
scan blocks and names the stage and the exit status.
|
|
108
|
+
|
|
109
|
+
*Incident (KI-SCANNER-MUST-NOT-REPORT-CLEAN-WHEN-IT-COULD-NOT-SCAN):* both grep
|
|
110
|
+
pipelines in `dev-tools/scripts/codex-review-memlib.sh` ended in `|| true`. `grep`
|
|
111
|
+
exits 1 for no-match but 2 for error, 126/127 when it cannot be executed, 128+N when
|
|
112
|
+
killed — all flattened onto "clean". Reproduced worse case: grep exits **0 with a
|
|
113
|
+
match**, bash cannot allocate the command-substitution buffer under memory pressure,
|
|
114
|
+
the empty capture is read as clean, and a real AWS-key-shaped string would have
|
|
115
|
+
egressed.
|
|
116
|
+
|
|
117
|
+
**Reference implementation of the fix pattern: PR #4640** (commit `3c3ffd9b9`),
|
|
118
|
+
`codex_grep_first_line` / `codex_grep_status_ok` / `codex_scan_failed_hit`. Replicate
|
|
119
|
+
its four properties:
|
|
120
|
+
|
|
121
|
+
1. Only statuses `0|1` count as a completed scan; empty or non-numeric is a failure.
|
|
122
|
+
2. `status 0 with no captured output` is explicitly a failure, not a clean.
|
|
123
|
+
3. The status is carried **out of the subshell** behind a marker byte (`\034`),
|
|
124
|
+
because `$?` on `x="$(a | b)"` is `b`'s status and `PIPESTATUS` is not visible
|
|
125
|
+
outside the substitution.
|
|
126
|
+
4. The refusal names the stage and the status:
|
|
127
|
+
`SECRET SCAN FAILED (stage 1, pattern: ...): the matcher exited '2', so this body
|
|
128
|
+
was NOT scanned. Refusing to send ... (fail-closed).`
|
|
129
|
+
|
|
130
|
+
---
|
|
131
|
+
|
|
132
|
+
## Part 2 — Positive controls
|
|
133
|
+
|
|
134
|
+
### FL-6 — every monitoring rule, scan, or gate ships with a known-healthy control signal in the same rule set
|
|
135
|
+
|
|
136
|
+
**Rule:** a zero proves nothing unless the same query, in the same rule set, also
|
|
137
|
+
reads a signal known to be non-zero when the system is healthy. If **every** signal
|
|
138
|
+
in the set reads zero, the rule set treats that as an instrument fault and alerts on
|
|
139
|
+
the sampler, not on the subject.
|
|
140
|
+
|
|
141
|
+
*Incident (KI-POSITIVE-CONTROL-OR-THE-ZERO-IS-VACUOUS):* a production scan keyed on
|
|
142
|
+
`embeddingStatus='completed'` would have reported "clean" — that value is never
|
|
143
|
+
written in prod. The step-5 control returned 0 HEALTHY rows, which invalidated steps
|
|
144
|
+
1–2 rather than confirming them.
|
|
145
|
+
|
|
146
|
+
### FL-7 — a control keys on the artifact, not on a marker that claims the artifact exists
|
|
147
|
+
|
|
148
|
+
**Rule:** select on the thing you care about (an embedding vector, a file, a
|
|
149
|
+
response body). Use status fields, labels, and markers **only as exclusions**.
|
|
150
|
+
|
|
151
|
+
*Incident (KI-CONTROL-MUST-KEY-ON-ARTIFACT-NOT-MARKER):* pipeline alert #4643 —
|
|
152
|
+
commissioned specifically to catch controls that report healthy while doing nothing —
|
|
153
|
+
was first keyed on `status='queued'` and would have reported backlog 0 while 413/413
|
|
154
|
+
prod rows were missing embeddings. It broke its own rule one file below where the
|
|
155
|
+
rule was written. In prod, 359 of 408 rows carry a real embedding and **no status
|
|
156
|
+
field at all**. Fixed by keying on the missing artifact.
|
|
157
|
+
|
|
158
|
+
### FL-8 — ask "has this counter ever been non-zero", not "does this control exist"
|
|
159
|
+
|
|
160
|
+
**Rule:** a new or reviewed control must be able to answer, from a recorded artifact,
|
|
161
|
+
when it last fired. A control with no block-path artifact cannot be audited and is
|
|
162
|
+
treated as unproven.
|
|
163
|
+
|
|
164
|
+
*Incident (KI-ASK-HAS-IT-EVER-FIRED / #4639):* 8 of 11 gates could not prove they had
|
|
165
|
+
ever fired — none writes anything on the block path. Also found: branch protection
|
|
166
|
+
requiring nothing, a stale guard that could not block, a secret scanner idle on PRs
|
|
167
|
+
since 2026-03-03.
|
|
168
|
+
|
|
169
|
+
### FL-9 — an existence check cannot see a broken control
|
|
170
|
+
|
|
171
|
+
**Rule:** presence-on-disk plus registration is not verification. Any check of a
|
|
172
|
+
deployed guard compares the deployed artifact against its source (freshness), or
|
|
173
|
+
probes its behaviour (FL-15).
|
|
174
|
+
|
|
175
|
+
*Incidents:* `checkHookCompleteness` passes a stale-but-present guard
|
|
176
|
+
(KI-EXISTENCE-CHECK-CANNOT-SEE-A-BROKEN-CONTROL). `syncClaudeConfig` overwrites
|
|
177
|
+
unconditionally and reports the write's exit code, so nothing records that a session
|
|
178
|
+
ran on stale guardrails (KI-REPAIR-IS-NOT-VERIFICATION).
|
|
179
|
+
|
|
180
|
+
---
|
|
181
|
+
|
|
182
|
+
## Part 3 — Operator-override reconciliation (mandatory)
|
|
183
|
+
|
|
184
|
+
A guard that blocks too much gets switched off — fail-open by a slower route, and a
|
|
185
|
+
worse end state than a loud non-blocking signal because the disabling goes unrecorded.
|
|
186
|
+
|
|
187
|
+
### FL-10 — choose hard-block vs. loud-signal by irreversibility, never by convenience
|
|
188
|
+
|
|
189
|
+
| Condition | Required behaviour |
|
|
190
|
+
|---|---|
|
|
191
|
+
| Irreversible harm on the wrong answer (credential egress, prod deploy, data delete) | **Hard block**, fail-closed, with an FL-11 override (out-of-band in an agent runtime) |
|
|
192
|
+
| Reversible harm; the wrong answer is caught downstream | **Fail loud** to an always-on visible channel + auto-created escalation; do not block |
|
|
193
|
+
| Instrument fault (could-not-run) on a reversible path | **Fail loud**, record `could-not-run` in the verification artifact, do not report pass |
|
|
194
|
+
| Instrument fault on an irreversible path | **Hard block** (FL-5) |
|
|
195
|
+
|
|
196
|
+
"Fail loud" means all three: (a) a message on a channel the operator sees without
|
|
197
|
+
opting in; (b) a `could-not-run` or `fail` record in the gate verification artifact
|
|
198
|
+
(Part 6); (c) an auto-created escalation via `mx-agent escalate` at the priority the
|
|
199
|
+
owning team set — not a log line nobody reads.
|
|
200
|
+
|
|
201
|
+
**Loud-channel constraints (all mandatory):**
|
|
202
|
+
|
|
203
|
+
- **No recursion.** Failure of the escalation channel itself is recorded to the
|
|
204
|
+
verification artifact and stderr, and must never trigger a further escalation.
|
|
205
|
+
- **Dedupe and rate limit.** Each rule carries a stable `rule_id`; at most one
|
|
206
|
+
escalation per `rule_id` per hour, carrying an occurrence count for the suppressed
|
|
207
|
+
duplicates. Bodies are length-capped.
|
|
208
|
+
- **Output by reference, never inline.** Captured command output goes into an
|
|
209
|
+
escalation body as an artifact reference or base64, never as inline prose, and
|
|
210
|
+
fence-marker patterns are escaped before rendering. Inlining raw captured output is
|
|
211
|
+
how FL-3 recurs inside the alerting path.
|
|
212
|
+
|
|
213
|
+
*Incident (KI-GUARD-THAT-BLOCKS-EVERYTHING-GETS-SWITCHED-OFF):* the first cut of the
|
|
214
|
+
#4640 hardening refused **every** review — `set -e` inherited into subshells killed
|
|
215
|
+
the process before the status marker was written, and a missing marker read as a
|
|
216
|
+
failed scan. Test fail-closed hardening in **both** directions: it must block the bad
|
|
217
|
+
input **and** pass the good input.
|
|
218
|
+
|
|
219
|
+
### FL-11 — every hard block carries a reachable, logged override — reachable by *whom* depends on reversibility
|
|
220
|
+
|
|
221
|
+
An override must be (a) named at the point of refusal, (b) actually obtainable by the
|
|
222
|
+
principal entitled to grant it, and (c) recorded — who, when, which rule, why — in the
|
|
223
|
+
same artifact stream as the block. **Who may invoke it is set by FL-10's reversibility
|
|
224
|
+
axis, not by convenience:**
|
|
225
|
+
|
|
226
|
+
| FL-10 row | Override form |
|
|
227
|
+
|---|---|
|
|
228
|
+
| Reversible harm | **Self-service, logged.** The refusal states the command; the operator runs it; the use is recorded |
|
|
229
|
+
| **Irreversible harm** (credential egress, prod deploy, data delete) in an **agent runtime** | **Out-of-band only.** The refusal states *that* an override exists and *who* can grant it — PO, human operator, or a separately-held token deliberately absent from the session environment. It must **not** state a command the blocked agent can run, and the granting credential must not be reachable from the session |
|
|
230
|
+
|
|
231
|
+
> **An override that the blocked principal can invoke unilaterally is not an override,
|
|
232
|
+
> it is an off switch. Where the blocked principal is an autonomous agent session,
|
|
233
|
+
> irreversible-path overrides are out-of-band by construction.**
|
|
234
|
+
|
|
235
|
+
An agent blocked on an irreversible path has exactly one in-session move: **FL-12** —
|
|
236
|
+
record `could-not-run` and stop. It does not hand-edit past the guard, and it does not
|
|
237
|
+
search for a bypass.
|
|
238
|
+
|
|
239
|
+
*Incident (KI-GUARD-OVERRIDE-UNREACHABLE, #4500):* an advertised override the runtime
|
|
240
|
+
cannot deliver makes the guard dishonest — the operator's only remaining move is to
|
|
241
|
+
disable the guard entirely. That is why reversible-path overrides must be genuinely
|
|
242
|
+
reachable. It is not a licence to make irreversible-path overrides reachable by the
|
|
243
|
+
blocked agent; there, "reachable" means reachable by the human who can grant it.
|
|
244
|
+
|
|
245
|
+
**Trust properties of the override log (v1, stated so nobody over-reads it):** the
|
|
246
|
+
local override record is written by the same principal performing the override. It is
|
|
247
|
+
not tamper-evident and is not an access-control boundary — it is a guardrail and a
|
|
248
|
+
counting mechanism, consistent with standing policy on bypassable hooks. Acceptable
|
|
249
|
+
for v1 **provided** override counts used for any decision are reconciled server-side
|
|
250
|
+
from synced telemetry, never read from the local file.
|
|
251
|
+
|
|
252
|
+
### FL-12 — when the gate itself cannot run, record it; never hand-edit past it
|
|
253
|
+
|
|
254
|
+
*Incident (KI-SECRET-GUARD-BLOCKS-ITS-OWN-TESTS):* secret-detection tests must
|
|
255
|
+
contain credential-shaped fixtures, so the guard blocks Codex review of any PR
|
|
256
|
+
touching them (PR #4640). This is structural and permanent. The correct response is
|
|
257
|
+
to record that the gate could not run. Do **not** edit the diff to satisfy the gate.
|
|
258
|
+
|
|
259
|
+
---
|
|
260
|
+
|
|
261
|
+
## Part 4 — Concrete code patterns
|
|
262
|
+
|
|
263
|
+
### FL-13 — capture status explicitly under `set -e` / trap-ERR
|
|
264
|
+
|
|
265
|
+
Bare assignment from a command substitution inside an ERR-trapped or `set -e` script
|
|
266
|
+
either aborts before your handling runs, or silently discards the status. Use:
|
|
267
|
+
|
|
268
|
+
```bash
|
|
269
|
+
RC=0; OUT="$(some_command 2>&1)" || RC=$?
|
|
270
|
+
if [ "$RC" -ne 0 ]; then
|
|
271
|
+
printf 'stage X FAILED (exit %d):\n%s\n' "$RC" "$OUT" >&2
|
|
272
|
+
exit 1 # or exit 2 — see FL-14
|
|
273
|
+
fi
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
Prohibited: `OUT="$(cmd)" || true`, and any bare `OUT="$(cmd)"` whose failure path is
|
|
277
|
+
unhandled. For pipelines, capture `PIPESTATUS[n]` **inside** the subshell (FL-5,
|
|
278
|
+
point 3) — the outer `$?` is the last stage's status.
|
|
279
|
+
|
|
280
|
+
*Incident (KI-CIVALIDATE-ERRTRAP-SWALLOWS-FAILURES):* the v2.72 marker CI gate used
|
|
281
|
+
the trap-ERR bash-hook shape, failed three security review rounds without
|
|
282
|
+
convergence, and was descoped. The shape is a named anti-pattern; do not reintroduce
|
|
283
|
+
it.
|
|
284
|
+
|
|
285
|
+
### FL-14 — exit codes distinguish "failed validation" from "could not validate"
|
|
286
|
+
|
|
287
|
+
Standard convention for platform scripts (as implemented in
|
|
288
|
+
`validate-roleguide-behavioral-markers.sh`):
|
|
289
|
+
|
|
290
|
+
| Code | Meaning |
|
|
291
|
+
|---|---|
|
|
292
|
+
| 0 | Ran, examined ≥ 1 item, all passed |
|
|
293
|
+
| 1 | Ran, examined ≥ 1 item, at least one **failed** — name each failure on stderr |
|
|
294
|
+
| 2 | **Could not validate**: usage/environment error, or zero items examined |
|
|
295
|
+
|
|
296
|
+
Two further rules close the gaps this table leaves open:
|
|
297
|
+
|
|
298
|
+
- **Any status outside {0, 1, 2} is could-not-validate and fails.** 126/127 (cannot
|
|
299
|
+
execute), 128+N (killed), and any status a future edit invents are never a pass.
|
|
300
|
+
Callers must not collapse 1 and 2, and must not treat an unrecognised status as 0.
|
|
301
|
+
- **Exit 0 alone is not a pass.** A validator's `0` counts as a pass only alongside a
|
|
302
|
+
verification record satisfying requirement **R1** of the gate verification-artifact
|
|
303
|
+
contract (FL-19). An exit code with no record is an unproven claim (FL-8).
|
|
304
|
+
|
|
305
|
+
**Scope — this table governs validators and scanners, not PreToolUse/PostToolUse hooks.**
|
|
306
|
+
The Claude Code hook runtime defines **exit 2 = BLOCK**; that is the runtime's contract, not a
|
|
307
|
+
local choice (`mx-agent-system/agent-config/hooks/git-mutation-guard.sh:6` documents it, and
|
|
308
|
+
`worktree-guard.sh` exits 2 at five sites). Applied to a hook, the table above would classify a
|
|
309
|
+
correct block as "could not validate." **Hook-runtime gates therefore declare an `exit_map` in
|
|
310
|
+
`mx-agent-system/gates/registry.yml`** — §2.2.2 of the gate verification-artifact contract — and
|
|
311
|
+
readers evaluate their codes through that map. The map does not weaken this rule: its lists must
|
|
312
|
+
be disjoint, `pass` and `block` non-empty, **any code the map does not list is still
|
|
313
|
+
could-not-validate**, and widening it is a monotonicity violation in the contract. For everything
|
|
314
|
+
that is not a hook, the 0/1/2 convention above is the default and needs no declaration.
|
|
315
|
+
Found by the pipeline team's buildability review of PR #4649: without this, no hook could satisfy
|
|
316
|
+
the contract's positive-control criterion, which is 8 of the 11 gates in the retrofit.
|
|
317
|
+
|
|
318
|
+
### FL-15 — path matching against git output uses `core.quotePath=false`
|
|
319
|
+
|
|
320
|
+
**Rule:** any changed-files gate reads paths with
|
|
321
|
+
`git -c core.quotePath=false diff --name-only ...` (equivalently for `ls-files`,
|
|
322
|
+
`show --name-only`).
|
|
323
|
+
|
|
324
|
+
*Incident (KI-CHANGEDFILES-GIT-QUOTEPATH):* by default git renders non-ASCII bytes in
|
|
325
|
+
path names as octal escapes inside double quotes. A gate matching those paths misses
|
|
326
|
+
the file and reports "no relevant files changed" — a silent-empty (FL-1) produced by
|
|
327
|
+
the tool's default rendering rather than by any error.
|
|
328
|
+
|
|
329
|
+
---
|
|
330
|
+
|
|
331
|
+
## Part 5 — Verification
|
|
332
|
+
|
|
333
|
+
### FL-16 — a fail-loud claim is verified only by re-running the original reproduction or injecting the fault
|
|
334
|
+
|
|
335
|
+
**Rule:** a fix to any shape in Part 1 ships with a test that **injects the fault**
|
|
336
|
+
(non-zero matcher status, empty capture, backend error, zero-item input) and asserts
|
|
337
|
+
the loud outcome. Running the tool and observing that it did not complain is not
|
|
338
|
+
verification.
|
|
339
|
+
|
|
340
|
+
*Incidents:* KI-REMEDIATION-UNVERIFIED-UNTIL-REPRO-RERUN;
|
|
341
|
+
KI-VERIFY-BY-PROBE-NOT-BY-HAVING-RUN-SOMETHING — seven teams were told to restart
|
|
342
|
+
their container to refresh a stale worktree guard, but `post-start.sh` resolves the
|
|
343
|
+
repo root to `/workspace` and never iterates worktrees, so the remedy changed
|
|
344
|
+
nothing. File size tells you which build you have; only a behavioural probe tells you
|
|
345
|
+
what it does.
|
|
346
|
+
|
|
347
|
+
### FL-17 — a comment claiming a protection covers a defect is an assertion, not evidence
|
|
348
|
+
|
|
349
|
+
**Rule:** for every such comment there is a test that **fails when the protection is
|
|
350
|
+
removed**. Without it, delete the claim rather than leave an unverified one.
|
|
351
|
+
`codex-review-memlib.test.sh` (PR #4640) is the reference: it drives the failed-scan
|
|
352
|
+
and empty-capture paths directly.
|
|
353
|
+
|
|
354
|
+
---
|
|
355
|
+
|
|
356
|
+
## Part 6 — Scope, compliance, and grandfathering
|
|
357
|
+
|
|
358
|
+
### FL-18 — binding scope
|
|
359
|
+
|
|
360
|
+
This standard binds all platform-owned surfaces:
|
|
361
|
+
|
|
362
|
+
- `.claude/hooks/**` and any guard script
|
|
363
|
+
- `dev-tools/scripts/**` (CI scripts, validators, review tooling)
|
|
364
|
+
- `mx-agent-system/cli/**` (`mx-agent` CLI error and status paths)
|
|
365
|
+
- Monitoring and alert rule definitions owned by platform
|
|
366
|
+
- Workflow steps that render command output into summaries, comments, or artifacts
|
|
367
|
+
|
|
368
|
+
New code must comply at review. Modified code must bring the touched paths into
|
|
369
|
+
compliance.
|
|
370
|
+
|
|
371
|
+
### FL-19 — compliance is recorded through the gate verification-artifact contract
|
|
372
|
+
|
|
373
|
+
Compliance is not self-attested in a PR description. Each gate emits **pass / fail /
|
|
374
|
+
could-not-run** as three distinct recorded outcomes into the shared
|
|
375
|
+
verification-artifact contract being designed in parallel as v2.73 Deliverable 1
|
|
376
|
+
(#4645). That document owns the artifact schema, the positive-control acceptance test
|
|
377
|
+
per gate, the always-runs companion job, and the rollback runbook. This standard does
|
|
378
|
+
not duplicate it; a gate that satisfies FL-6/FL-8 does so by writing to that contract.
|
|
379
|
+
|
|
380
|
+
**Two checks with different enforcement levels, registered on the day this standard
|
|
381
|
+
lands. Do not conflate them.**
|
|
382
|
+
|
|
383
|
+
| Check | Level on day one | What it does |
|
|
384
|
+
|---|---|---|
|
|
385
|
+
| `fail-loud-lint` — **pattern** scan | **Advisory** (non-blocking) | Greps for `\|\| true`, `2>/dev/null` in a status-bearing position, `trap ... ERR`, `continue-on-error:`. Runs against every changed file, so it is noisy and could hang PRs; it starts the compliance counter before enforcement. Promotion to blocking is FL-21 question 1 |
|
|
386
|
+
| `fail-loud-inventory` — **no-added-rows** check | **BLOCKING at the gate-report level, from the day gate-report exists** | Fails any PR whose diff **adds** a row to `fail-loud-grandfathered.tsv` (FL-20 clause 3) |
|
|
387
|
+
|
|
388
|
+
**"Blocking" means what the repository can actually enforce — corrected after co-owner review.**
|
|
389
|
+
An earlier draft said this check blocks "from day one." That claim did not survive contact with
|
|
390
|
+
#4610: `main` currently has **no required status checks**, so no check in this repository blocks
|
|
391
|
+
anything, and a check registered today turns a PR red without preventing its merge. The honest
|
|
392
|
+
sequence, matching FR-3 of the gate verification-artifact contract:
|
|
393
|
+
|
|
394
|
+
1. **Before `gate-report` exists and before the #4610 ruling** — `fail-loud-inventory` is
|
|
395
|
+
**advisory**. It runs, it reports, it emits its verification record, and it cannot prevent a
|
|
396
|
+
merge. Describing it as blocking in this window would repeat the exact error #4610 documents:
|
|
397
|
+
calling a detective control preventive.
|
|
398
|
+
2. **Once `gate-report` is the required check** — the inventory check becomes a registry gate
|
|
399
|
+
whose FAIL makes `gate-report` red, and `gate-report` is what branch protection requires. It
|
|
400
|
+
blocks then, through that single required check, and not before.
|
|
401
|
+
|
|
402
|
+
Its scope argument is unaffected and still holds: it can only fail a PR that modifies
|
|
403
|
+
`fail-loud-grandfathered.tsv`, so making it enforcing carries none of the deadlock risk in
|
|
404
|
+
FL-21 question 1. Leaving it advisory **permanently** would make the inventory a
|
|
405
|
+
**self-deregistration surface** — a PR could add its own grandfather row and merge over a
|
|
406
|
+
non-blocking warning, which is exactly the exemption route FL-20 clause 2 exists to close. That
|
|
407
|
+
is an argument for enforcing it as early as the mechanism allows, not for claiming it already
|
|
408
|
+
does.
|
|
409
|
+
|
|
410
|
+
Both emit to the same verification-artifact contract, so FL-8 can answer "has it ever
|
|
411
|
+
fired" for each from the first week.
|
|
412
|
+
|
|
413
|
+
### FL-20 — grandfathering is inventory-based and default-deny
|
|
414
|
+
|
|
415
|
+
Grandfathering is **not** a date claim. Code written after this standard lands cannot
|
|
416
|
+
argue for it, because eligibility is membership in a fixed inventory:
|
|
417
|
+
|
|
418
|
+
1. **Inventory file.** `mx-agent-system/standards/fail-loud-grandfathered.tsv`,
|
|
419
|
+
generated **once** before the standard binds. One row per occurrence, tab-separated:
|
|
420
|
+
`path`, `line`, `shape_id` (FL-1..FL-5), `context_sha256` (SHA-256 of the five
|
|
421
|
+
surrounding source lines, the occurrence line ± 2).
|
|
422
|
+
2. **Default-deny.** Any occurrence not present in the inventory is a violation,
|
|
423
|
+
regardless of the date it was claimed to be written. There is no other route to
|
|
424
|
+
grandfathered status.
|
|
425
|
+
3. **Removal-only, enforced by a blocking check.** The `fail-loud-inventory` check
|
|
426
|
+
(FL-19) rejects any diff that **adds** a row. It is **enforcing as soon as the mechanism
|
|
427
|
+
exists** — advisory until `gate-report` is the required check, blocking through it thereafter
|
|
428
|
+
(FL-19, and FR-3 of the gate verification-artifact contract). It is never left advisory as a
|
|
429
|
+
settled state. Entries are deleted as occurrences are fixed; the row count is a
|
|
430
|
+
burn-down and must be monotonically non-increasing. This check is deliberately
|
|
431
|
+
narrower than the pattern lint: it fires only on diffs touching this file, so
|
|
432
|
+
making it blocking cannot hang an unrelated PR. If it were advisory, a PR could
|
|
433
|
+
register its own exemption and merge past the warning.
|
|
434
|
+
4. **De-grandfathering unit** — an entry lapses when its unit is modified:
|
|
435
|
+
TypeScript/JavaScript/Python, the **enclosing function**; YAML/JSON, the **enclosing
|
|
436
|
+
job or top-level key**; shell with functions, the **enclosing function**; shell
|
|
437
|
+
without functions, the **whole file**. Independently, a `context_sha256` mismatch
|
|
438
|
+
de-grandfathers the entry **even at an unchanged line number** — the surrounding
|
|
439
|
+
code moved under it, so the review that granted the exemption no longer applies.
|
|
440
|
+
5. **Sequence.** The inventory lands **first**, in its own PR. The standard binds
|
|
441
|
+
**second**. Binding before the inventory exists makes every pre-existing occurrence
|
|
442
|
+
a violation on day one and guarantees the standard is switched off
|
|
443
|
+
(KI-GUARD-THAT-BLOCKS-EVERYTHING-GETS-SWITCHED-OFF).
|
|
444
|
+
|
|
445
|
+
**Named items:**
|
|
446
|
+
|
|
447
|
+
| Status | Code |
|
|
448
|
+
|---|---|
|
|
449
|
+
| **Must-fix, platform-owned, tracked** | `mx-agent-system/cli/src/commands/start.ts` ≈ 1082–1088 unconditional `Isolation Enabled` banner (KI-UNCONDITIONAL-BANNER-CLAIMS) — issue **#4646 (filed 2026-07-27)**. Top platform item; it asserts a false green directly to the operator |
|
|
450
|
+
| **PROPOSED — pending DevOps Pipeline acknowledgment** | `.github/workflows/infra-provision.yml` — **six occurrences, not one**, enumerated below after the pipeline team's verification. The `\|\| true` of #4626/#4628 is at **:174, not :152**. Ordering constraint from the nomination is unchanged: bump the retired AKS API version **first**, accepting on an actual `what-if` resource-change preview and **not** on the job being green; then remove `\|\| true`. Reversing the order reds every Bicep PR in the fleet with no fix available |
|
|
451
|
+
|
|
452
|
+
**`infra-provision.yml` occurrence set (FL-20 clause 1 rows).** Recorded in full because clause 1
|
|
453
|
+
hashes the occurrence line ± 2: **a wrong line number produces a `context_sha256` over the wrong
|
|
454
|
+
five lines**, so the entry either fails to match a real occurrence or grandfathers a different one.
|
|
455
|
+
A single mis-recorded line poisons the inventory entry it was meant to create.
|
|
456
|
+
|
|
457
|
+
| Line | Shape | Note |
|
|
458
|
+
|---|---|---|
|
|
459
|
+
| :103 | `\|\| true` on `git diff --name-only` capture | empty result is indistinguishable from failure |
|
|
460
|
+
| :106 | `\|\| true` on `git diff --name-only` capture | same shape as :103 |
|
|
461
|
+
| :110 | `\|\| true` with `2>/dev/null` on `ls` | two suppressions on one status-bearing line |
|
|
462
|
+
| :174 | `\|\| true` on `az deployment sub what-if` capture | **the #4626/#4628 occurrence** — previously recorded as :152 |
|
|
463
|
+
| :254 | `az ... 2>&1 \| tee -a "$GITHUB_STEP_SUMMARY"` with **no `pipefail`** | pipeline status is `tee`'s, so an `az` failure on the **deploy path** is invisible. No `set -o pipefail` anywhere in the file and no `shell:` override, so the default `bash -e` does not cover it |
|
|
464
|
+
| :266 | `az ... \| tee /tmp/deploy-output.json` | the one occurrence already handled — `exit ${PIPESTATUS[0]}` at :269 recovers the real status |
|
|
465
|
+
|
|
466
|
+
:254 is the material addition: the original single-row entry covered a `what-if` preview, while
|
|
467
|
+
the unguarded `az \| tee` on the deploy path was not recorded at all.
|
|
468
|
+
| **PROPOSED — pending owning-team acknowledgment** | `mx memories get NAME` auto-detect and `mx memories search` silent-empty paths (FL-1) |
|
|
469
|
+
| **Fixed — reference implementations** | `dev-tools/scripts/codex-review-memlib.sh` (PR #4640); `dev-tools/scripts/validate-roleguide-behavioral-markers.sh` (FL-4, FL-14) |
|
|
470
|
+
|
|
471
|
+
Platform does not bind another team's code unilaterally. The two **PROPOSED** rows
|
|
472
|
+
become must-fix only when the owning team acknowledges them; coordination escalations
|
|
473
|
+
go out when this document ships. Until acknowledged they are recorded findings, not
|
|
474
|
+
obligations, and neither team's PRs are gated on them.
|
|
475
|
+
|
|
476
|
+
### FL-21 — open questions
|
|
477
|
+
|
|
478
|
+
1. **When does the `fail-loud-lint` PATTERN scan go from advisory to blocking?** This
|
|
479
|
+
question covers the pattern scan only — the `fail-loud-inventory` no-added-rows
|
|
480
|
+
check is enforcing as soon as `gate-report` exists and is not in scope here (FL-19). Options: (a)
|
|
481
|
+
pattern scan stays advisory this iteration; (b) block on `could-not-run` outcomes
|
|
482
|
+
only; (c) full gate. *Recommendation:* (a) — it ships advisory so the counter
|
|
483
|
+
starts, and promotion waits for the PO's #4610 ruling plus the always-runs
|
|
484
|
+
companion job, without which a pattern scan over every changed file hangs
|
|
485
|
+
path-filtered PRs. *Blocking:* no.
|
|
486
|
+
2. **Who owns the always-on "loud" channel in FL-10?** Options: coordination-queue
|
|
487
|
+
escalation only, or a dedicated alert channel. *Recommendation:* coordination
|
|
488
|
+
queue via `mx-agent escalate` — it exists, is drained at session start, and needs
|
|
489
|
+
no new infrastructure. *Blocking:* no.
|
|
490
|
+
3. **Cross-session fault signal (KI-INCIDENT-INVISIBLE-FROM-INSIDE-ONE-SESSION).**
|
|
491
|
+
MemNexus degraded ~40 minutes on 2026-07-27; three agents hit it and none
|
|
492
|
+
escalated, because the "is this an incident" threshold cannot be evaluated from
|
|
493
|
+
inside one session. FL-10's escalation requirement does not solve this.
|
|
494
|
+
*Recommendation:* a cheap shared fault counter, scoped to a follow-on iteration.
|
|
495
|
+
*Blocking:* no.
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
# How to talk to the product owner
|
|
2
|
+
|
|
3
|
+
Written by the bootstrap lead on the product owner's direct instruction, 2026-09-05, in his own
|
|
4
|
+
words. Standards content is normally `product`'s to own; `product` is notified and may revise this.
|
|
5
|
+
|
|
6
|
+
Scope and precedence are stated inside the marked block below, so every agent reads them with the
|
|
7
|
+
rules they qualify.
|
|
8
|
+
|
|
9
|
+
<!-- behavioral-start -->
|
|
10
|
+
|
|
11
|
+
## What these rules govern
|
|
12
|
+
|
|
13
|
+
These rules apply to every message you send the product owner: quick replies, questions, progress
|
|
14
|
+
updates, and final reports. Not just written summaries. If you are responding to him, you follow
|
|
15
|
+
these rules.
|
|
16
|
+
|
|
17
|
+
**They override the report format and the writing standard wherever they disagree, for messages
|
|
18
|
+
addressed to him.**
|
|
19
|
+
|
|
20
|
+
They do not apply to agent-to-agent content. Teammate briefs, teammate reports, iteration-log
|
|
21
|
+
rows, GitHub issue bodies, PR bodies, and memory content keep the seven-section report format and
|
|
22
|
+
the writing standard.
|
|
23
|
+
|
|
24
|
+
`AGENTS.md` disagrees: its line 11 lists "PR summaries" among the messages written for the
|
|
25
|
+
product owner, and its lines 20 to 24 give a different four-part shape. #416 asks `product` to
|
|
26
|
+
reconcile them. Until `product` rules, these rules govern the format and register of any message
|
|
27
|
+
addressed to the product owner. `AGENTS.md` governs the format and register of every other
|
|
28
|
+
message. A PR body is the one case both documents name. Until #416 is decided, it follows the
|
|
29
|
+
seven-section report format, the more specific rule and the one this team applies on every PR.
|
|
30
|
+
|
|
31
|
+
These rules settle format and register only. They suspend no other rule in `AGENTS.md`. Its
|
|
32
|
+
safety rules apply to every message whatever the audience, including the no-echo rule on
|
|
33
|
+
credentials and the rule against attesting to work you did not witness. Neither is about message
|
|
34
|
+
shape, and a message to the product owner is not an exception to either.
|
|
35
|
+
|
|
36
|
+
`AGENTS.md` is `product`'s file, not this team's, generated from
|
|
37
|
+
`mx-agent-system/agent-config/AGENTS.md.template`, so file the reconciliation with `product`
|
|
38
|
+
rather than deciding it here.
|
|
39
|
+
|
|
40
|
+
`mx-agent report check` governs the seven-section report format for agent-to-agent reports. Do
|
|
41
|
+
not run it against a message written to the product owner in this format: it reads these four
|
|
42
|
+
headings as seven absent sections and refuses. No check enforces this format.
|
|
43
|
+
|
|
44
|
+
## The four headings
|
|
45
|
+
|
|
46
|
+
Structure every response with these four headings, in this order:
|
|
47
|
+
|
|
48
|
+
**What we did.** One or two sentences. Name the task and what you changed. For a short reply, this
|
|
49
|
+
can be one line.
|
|
50
|
+
|
|
51
|
+
**What happened.** The result. Include the numbers: tests passed, failed and could not run, files
|
|
52
|
+
changed, issues filed.
|
|
53
|
+
|
|
54
|
+
**Good or bad.** Say plainly whether this is the outcome we wanted. If mixed, say which parts are
|
|
55
|
+
good and which are bad.
|
|
56
|
+
|
|
57
|
+
**What I need from you.** List each decision or action you need from him. If there are none, write
|
|
58
|
+
"Nothing."
|
|
59
|
+
|
|
60
|
+
If a response has no work to report, for example you are only asking a question, skip the headings
|
|
61
|
+
and ask the question in one or two plain sentences. Everything else here still applies.
|
|
62
|
+
|
|
63
|
+
Put any extra detail after these four sections under a heading "Details" so he can skip it.
|
|
64
|
+
|
|
65
|
+
Keep the four sections under 200 words total. Short tasks get short responses.
|
|
66
|
+
|
|
67
|
+
## Language rules
|
|
68
|
+
|
|
69
|
+
- Use active voice. Write "The test failed," not "A failure was observed."
|
|
70
|
+
- Lead with the conclusion. Do not build up to it.
|
|
71
|
+
- Use plain words. "Check" not "validate." "Reused" not "reclaimed." "Bug" not "defect."
|
|
72
|
+
- No metaphors or figurative language. Do not write "paid the gate," "north star," or "the
|
|
73
|
+
instrument degrades." Say what literally happened.
|
|
74
|
+
- Cut adjectives and adverbs unless removing them changes the meaning.
|
|
75
|
+
- One idea per sentence. Keep most sentences under 20 words.
|
|
76
|
+
- Name things directly (PR #407, start.ts line 1490) and keep using the same name. Do not switch to
|
|
77
|
+
a descriptive label like "the artifact" or "the instrument."
|
|
78
|
+
- Define any tool, term, or ticket number the first time you use it, in a few words.
|
|
79
|
+
- Every PR or issue number is a markdown link to its GitHub page. Write
|
|
80
|
+
`[#407](https://github.com/memnexus-ai/mx-agent-framework/pull/407)` for PRs and
|
|
81
|
+
`[#411](https://github.com/memnexus-ai/mx-agent-framework/issues/411)` for issues. Link it every
|
|
82
|
+
time it appears, not just the first time. If you do not know whether a number is a PR or an issue,
|
|
83
|
+
check before linking. The default repo is `memnexus-ai/mx-agent-framework`. When you reference a
|
|
84
|
+
PR or issue in another repo, use that repo's URL.
|
|
85
|
+
- Do not narrate your reasoning or describe what you decided not to do, unless it affects a decision
|
|
86
|
+
he needs to make.
|
|
87
|
+
- Write for a smart 18-year-old who has never seen this codebase.
|
|
88
|
+
|
|
89
|
+
## Terms of art this bans, and what to say instead
|
|
90
|
+
|
|
91
|
+
The no-metaphor rule reaches this project's own vocabulary. Translate, every time:
|
|
92
|
+
|
|
93
|
+
| Do not write | Write |
|
|
94
|
+
|---|---|
|
|
95
|
+
| north star, the north-star metric | the repair-rate number |
|
|
96
|
+
| rehearsal, rehearsal creation | the end-to-end test that creates a team |
|
|
97
|
+
| the instrument | the end-to-end test |
|
|
98
|
+
| paid the gate, the gate is unpaid | the check ran and passed, the check has not run |
|
|
99
|
+
| blast radius | how many teams a change affects |
|
|
100
|
+
| the surface | the code this team owns |
|
|
101
|
+
|
|
102
|
+
<!-- behavioral-end -->
|
|
103
|
+
|
|
104
|
+
## Worked example
|
|
105
|
+
|
|
106
|
+
**What we did**
|
|
107
|
+
Ran the end-to-end test that creates a team, to check PR
|
|
108
|
+
[#407](https://github.com/memnexus-ai/mx-agent-framework/pull/407).
|
|
109
|
+
|
|
110
|
+
**What happened**
|
|
111
|
+
9 of 15 checks passed, 3 failed, 3 could not run. Row 7, the check
|
|
112
|
+
[#407](https://github.com/memnexus-ai/mx-agent-framework/pull/407) fixes, passed. The run also
|
|
113
|
+
confirmed bug [#410](https://github.com/memnexus-ai/mx-agent-framework/issues/410) is in start.ts
|
|
114
|
+
line 1490, not create.ts. The 3 failures are a new problem: the test reuses one fixed team but never
|
|
115
|
+
clears that team's memories in MemNexus, so rows 3 to 5 will fail on every run after the first. I
|
|
116
|
+
filed this as [#411](https://github.com/memnexus-ai/mx-agent-framework/issues/411).
|
|
117
|
+
|
|
118
|
+
**Good or bad**
|
|
119
|
+
Good for [#407](https://github.com/memnexus-ai/mx-agent-framework/pull/407): the fix works. Bad for
|
|
120
|
+
the test: 5 of 15 rows now give the same result no matter what the code does, so the test cannot be
|
|
121
|
+
trusted until [#411](https://github.com/memnexus-ai/mx-agent-framework/issues/411) is fixed. I left
|
|
122
|
+
the stale memories in place so
|
|
123
|
+
[#411](https://github.com/memnexus-ai/mx-agent-framework/issues/411) can be reproduced.
|
|
124
|
+
|
|
125
|
+
**What I need from you**
|
|
126
|
+
Nothing right now. The red-team decides whether this closes their Finding 1.
|