@bonesofspring/ai-rules 0.2.28 → 0.2.29
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/CHANGELOG.md +7 -0
- package/README.md +1 -1
- package/docs/MAVIS-COMPATIBILITY.md +10 -6
- package/docs/MAVIS.md +15 -6
- package/docs/OPENCODE-COMPATIBILITY.md +2 -2
- package/docs/OPENCODE.md +1 -1
- package/package.json +1 -1
- package/presets/_shared/core/meta/preset-pr-checklist.md +2 -2
- package/presets/claude/android-kotlin/CLAUDE.md +3 -1
- package/presets/claude/android-kotlin/REPO_AGENTS.md +1 -1
- package/presets/claude/android-kotlin/hooks/README.md +6 -5
- package/presets/claude/android-kotlin/hooks/chain-team-phases.sh +18 -0
- package/presets/claude/android-kotlin/hooks/examples/README.md +2 -0
- package/presets/claude/android-kotlin/hooks/guard-shell-command.sh +32 -9
- package/presets/claude/android-kotlin/rules/README.md +1 -1
- package/presets/claude/android-kotlin/rules/tooling-and-review/ai-local-overlay.md +0 -5
- package/presets/claude/android-kotlin/rules/tooling-and-review/preset-pr-checklist.md +2 -2
- package/presets/claude/android-kotlin/settings.json +23 -0
- package/presets/claude/go/CLAUDE.md +3 -1
- package/presets/claude/go/REPO_AGENTS.md +1 -1
- package/presets/claude/go/hooks/README.md +6 -5
- package/presets/claude/go/hooks/chain-team-phases.sh +18 -0
- package/presets/claude/go/hooks/examples/README.md +2 -0
- package/presets/claude/go/hooks/guard-shell-command.sh +32 -9
- package/presets/claude/go/rules/README.md +1 -1
- package/presets/claude/go/rules/tooling-and-review/ai-local-overlay.md +0 -5
- package/presets/claude/go/rules/tooling-and-review/preset-pr-checklist.md +2 -2
- package/presets/claude/go/settings.json +23 -0
- package/presets/claude/ios-swift/CLAUDE.md +3 -1
- package/presets/claude/ios-swift/REPO_AGENTS.md +1 -1
- package/presets/claude/ios-swift/hooks/README.md +6 -5
- package/presets/claude/ios-swift/hooks/chain-team-phases.sh +18 -0
- package/presets/claude/ios-swift/hooks/examples/README.md +2 -0
- package/presets/claude/ios-swift/hooks/guard-shell-command.sh +32 -9
- package/presets/claude/ios-swift/rules/README.md +1 -1
- package/presets/claude/ios-swift/rules/tooling-and-review/ai-local-overlay.md +0 -5
- package/presets/claude/ios-swift/rules/tooling-and-review/preset-pr-checklist.md +2 -2
- package/presets/claude/ios-swift/settings.json +23 -0
- package/presets/claude/java/CLAUDE.md +3 -1
- package/presets/claude/java/REPO_AGENTS.md +1 -1
- package/presets/claude/java/hooks/README.md +6 -5
- package/presets/claude/java/hooks/chain-team-phases.sh +18 -0
- package/presets/claude/java/hooks/examples/README.md +2 -0
- package/presets/claude/java/hooks/guard-shell-command.sh +32 -9
- package/presets/claude/java/rules/README.md +1 -1
- package/presets/claude/java/rules/tooling-and-review/ai-local-overlay.md +0 -5
- package/presets/claude/java/rules/tooling-and-review/preset-pr-checklist.md +2 -2
- package/presets/claude/java/settings.json +23 -0
- package/presets/claude/mcp-ts/CLAUDE.md +3 -1
- package/presets/claude/mcp-ts/REPO_AGENTS.md +1 -1
- package/presets/claude/mcp-ts/hooks/README.md +8 -3
- package/presets/claude/mcp-ts/hooks/chain-team-phases.sh +18 -0
- package/presets/claude/mcp-ts/hooks/examples/README.md +5 -0
- package/presets/claude/mcp-ts/hooks/guard-shell-command.sh +32 -9
- package/presets/claude/mcp-ts/rules/README.md +1 -1
- package/presets/claude/mcp-ts/rules/tooling-and-review/ai-local-overlay.md +0 -5
- package/presets/claude/mcp-ts/rules/tooling-and-review/preset-pr-checklist.md +2 -2
- package/presets/claude/mcp-ts/settings.json +23 -0
- package/presets/claude/next/CLAUDE.md +3 -1
- package/presets/claude/next/REPO_AGENTS.md +1 -1
- package/presets/claude/next/hooks/README.md +10 -1
- package/presets/claude/next/hooks/chain-team-phases.sh +18 -0
- package/presets/claude/next/hooks/examples/README.md +2 -0
- package/presets/claude/next/hooks/guard-shell-command.sh +32 -9
- package/presets/claude/next/rules/README.md +1 -1
- package/presets/claude/next/rules/tooling-and-review/ai-local-overlay.md +0 -5
- package/presets/claude/next/rules/tooling-and-review/preset-pr-checklist.md +2 -2
- package/presets/claude/next/settings.json +23 -0
- package/presets/claude/nuxt/CLAUDE.md +3 -1
- package/presets/claude/nuxt/REPO_AGENTS.md +1 -1
- package/presets/claude/nuxt/hooks/README.md +7 -4
- package/presets/claude/nuxt/hooks/chain-team-phases.sh +18 -0
- package/presets/claude/nuxt/hooks/examples/README.md +2 -0
- package/presets/claude/nuxt/hooks/guard-shell-command.sh +32 -9
- package/presets/claude/nuxt/rules/README.md +1 -1
- package/presets/claude/nuxt/rules/tooling-and-review/ai-local-overlay.md +0 -5
- package/presets/claude/nuxt/rules/tooling-and-review/preset-pr-checklist.md +2 -2
- package/presets/claude/nuxt/settings.json +23 -0
- package/presets/claude/php-hexagonal/CLAUDE.md +3 -1
- package/presets/claude/php-hexagonal/REPO_AGENTS.md +1 -1
- package/presets/claude/php-hexagonal/hooks/README.md +6 -5
- package/presets/claude/php-hexagonal/hooks/chain-team-phases.sh +18 -0
- package/presets/claude/php-hexagonal/hooks/examples/README.md +3 -1
- package/presets/claude/php-hexagonal/hooks/guard-shell-command.sh +32 -9
- package/presets/claude/php-hexagonal/rules/README.md +1 -1
- package/presets/claude/php-hexagonal/rules/tooling-and-review/ai-local-overlay.md +0 -5
- package/presets/claude/php-hexagonal/rules/tooling-and-review/preset-pr-checklist.md +2 -2
- package/presets/claude/php-hexagonal/settings.json +23 -0
- package/presets/claude/php-laravel/CLAUDE.md +6 -0
- package/presets/claude/php-laravel/REPO_AGENTS.md +1 -1
- package/presets/claude/php-laravel/hooks/README.md +6 -5
- package/presets/claude/php-laravel/hooks/chain-team-phases.sh +18 -0
- package/presets/claude/php-laravel/hooks/examples/README.md +3 -1
- package/presets/claude/php-laravel/hooks/guard-shell-command.sh +32 -9
- package/presets/claude/php-laravel/rules/README.md +1 -1
- package/presets/claude/php-laravel/rules/tooling-and-review/ai-local-overlay.md +0 -5
- package/presets/claude/php-laravel/rules/tooling-and-review/preset-pr-checklist.md +2 -2
- package/presets/claude/php-laravel/settings.json +23 -0
- package/presets/claude/svelte/CLAUDE.md +3 -1
- package/presets/claude/svelte/REPO_AGENTS.md +1 -1
- package/presets/claude/svelte/hooks/README.md +7 -4
- package/presets/claude/svelte/hooks/chain-team-phases.sh +18 -0
- package/presets/claude/svelte/hooks/examples/README.md +2 -0
- package/presets/claude/svelte/hooks/guard-shell-command.sh +32 -9
- package/presets/claude/svelte/rules/README.md +1 -1
- package/presets/claude/svelte/rules/tooling-and-review/ai-local-overlay.md +0 -5
- package/presets/claude/svelte/rules/tooling-and-review/preset-pr-checklist.md +2 -2
- package/presets/claude/svelte/settings.json +23 -0
- package/presets/cursor/android-kotlin/REPO_AGENTS.md +1 -1
- package/presets/cursor/android-kotlin/rules/preset-pr-checklist.mdc +2 -2
- package/presets/cursor/go/REPO_AGENTS.md +1 -1
- package/presets/cursor/go/rules/preset-pr-checklist.mdc +2 -2
- package/presets/cursor/ios-swift/REPO_AGENTS.md +1 -1
- package/presets/cursor/ios-swift/rules/preset-pr-checklist.mdc +2 -2
- package/presets/cursor/java/REPO_AGENTS.md +1 -1
- package/presets/cursor/java/rules/preset-pr-checklist.mdc +2 -2
- package/presets/cursor/mcp-ts/REPO_AGENTS.md +1 -1
- package/presets/cursor/mcp-ts/rules/preset-pr-checklist.mdc +2 -2
- package/presets/cursor/next/REPO_AGENTS.md +1 -1
- package/presets/cursor/next/rules/preset-pr-checklist.mdc +2 -2
- package/presets/cursor/nuxt/REPO_AGENTS.md +1 -1
- package/presets/cursor/nuxt/rules/preset-pr-checklist.mdc +2 -2
- package/presets/cursor/php-hexagonal/REPO_AGENTS.md +1 -1
- package/presets/cursor/php-hexagonal/rules/preset-pr-checklist.mdc +2 -2
- package/presets/cursor/php-laravel/REPO_AGENTS.md +1 -1
- package/presets/cursor/php-laravel/rules/preset-pr-checklist.mdc +2 -2
- package/presets/cursor/svelte/REPO_AGENTS.md +1 -1
- package/presets/cursor/svelte/rules/preset-pr-checklist.mdc +2 -2
- package/presets/mavis/README.md +2 -0
- package/presets/mavis/android-kotlin/MAVIS.md +10 -1
- package/presets/mavis/android-kotlin/REPO_AGENTS.md +1 -1
- package/presets/mavis/android-kotlin/adapter-map.json +1 -1
- package/presets/mavis/android-kotlin/rules/preset-pr-checklist.md +2 -2
- package/presets/mavis/go/MAVIS.md +10 -1
- package/presets/mavis/go/REPO_AGENTS.md +1 -1
- package/presets/mavis/go/adapter-map.json +1 -1
- package/presets/mavis/go/rules/preset-pr-checklist.md +2 -2
- package/presets/mavis/ios-swift/MAVIS.md +10 -1
- package/presets/mavis/ios-swift/REPO_AGENTS.md +1 -1
- package/presets/mavis/ios-swift/adapter-map.json +1 -1
- package/presets/mavis/ios-swift/rules/preset-pr-checklist.md +2 -2
- package/presets/mavis/java/MAVIS.md +10 -1
- package/presets/mavis/java/REPO_AGENTS.md +1 -1
- package/presets/mavis/java/adapter-map.json +1 -1
- package/presets/mavis/java/rules/preset-pr-checklist.md +2 -2
- package/presets/mavis/mcp-ts/MAVIS.md +10 -1
- package/presets/mavis/mcp-ts/REPO_AGENTS.md +1 -1
- package/presets/mavis/mcp-ts/adapter-map.json +1 -1
- package/presets/mavis/mcp-ts/rules/preset-pr-checklist.md +2 -2
- package/presets/mavis/next/MAVIS.md +10 -1
- package/presets/mavis/next/REPO_AGENTS.md +1 -1
- package/presets/mavis/next/adapter-map.json +1 -1
- package/presets/mavis/next/rules/preset-pr-checklist.md +2 -2
- package/presets/mavis/nuxt/MAVIS.md +10 -1
- package/presets/mavis/nuxt/REPO_AGENTS.md +1 -1
- package/presets/mavis/nuxt/adapter-map.json +1 -1
- package/presets/mavis/nuxt/rules/preset-pr-checklist.md +2 -2
- package/presets/mavis/php-hexagonal/MAVIS.md +10 -1
- package/presets/mavis/php-hexagonal/REPO_AGENTS.md +1 -1
- package/presets/mavis/php-hexagonal/adapter-map.json +1 -1
- package/presets/mavis/php-hexagonal/rules/preset-pr-checklist.md +2 -2
- package/presets/mavis/php-laravel/MAVIS.md +10 -1
- package/presets/mavis/php-laravel/REPO_AGENTS.md +1 -1
- package/presets/mavis/php-laravel/adapter-map.json +1 -1
- package/presets/mavis/php-laravel/rules/preset-pr-checklist.md +2 -2
- package/presets/mavis/platform-contract.json +4 -4
- package/presets/mavis/svelte/MAVIS.md +10 -1
- package/presets/mavis/svelte/REPO_AGENTS.md +1 -1
- package/presets/mavis/svelte/adapter-map.json +1 -1
- package/presets/mavis/svelte/rules/preset-pr-checklist.md +2 -2
- package/presets/opencode/README.md +1 -1
- package/presets/opencode/android-kotlin/OPENCODE.md +8 -1
- package/presets/opencode/android-kotlin/REPO_AGENTS.md +1 -1
- package/presets/opencode/android-kotlin/adapter-map.json +1 -1
- package/presets/opencode/android-kotlin/rules/preset-pr-checklist.md +2 -2
- package/presets/opencode/go/OPENCODE.md +8 -1
- package/presets/opencode/go/REPO_AGENTS.md +1 -1
- package/presets/opencode/go/adapter-map.json +1 -1
- package/presets/opencode/go/rules/preset-pr-checklist.md +2 -2
- package/presets/opencode/ios-swift/OPENCODE.md +8 -1
- package/presets/opencode/ios-swift/REPO_AGENTS.md +1 -1
- package/presets/opencode/ios-swift/adapter-map.json +1 -1
- package/presets/opencode/ios-swift/rules/preset-pr-checklist.md +2 -2
- package/presets/opencode/java/OPENCODE.md +8 -1
- package/presets/opencode/java/REPO_AGENTS.md +1 -1
- package/presets/opencode/java/adapter-map.json +1 -1
- package/presets/opencode/java/rules/preset-pr-checklist.md +2 -2
- package/presets/opencode/mcp-ts/OPENCODE.md +8 -1
- package/presets/opencode/mcp-ts/REPO_AGENTS.md +1 -1
- package/presets/opencode/mcp-ts/adapter-map.json +1 -1
- package/presets/opencode/mcp-ts/rules/preset-pr-checklist.md +2 -2
- package/presets/opencode/next/OPENCODE.md +8 -1
- package/presets/opencode/next/REPO_AGENTS.md +1 -1
- package/presets/opencode/next/adapter-map.json +1 -1
- package/presets/opencode/next/rules/preset-pr-checklist.md +2 -2
- package/presets/opencode/nuxt/OPENCODE.md +8 -1
- package/presets/opencode/nuxt/REPO_AGENTS.md +1 -1
- package/presets/opencode/nuxt/adapter-map.json +1 -1
- package/presets/opencode/nuxt/rules/preset-pr-checklist.md +2 -2
- package/presets/opencode/php-hexagonal/OPENCODE.md +8 -1
- package/presets/opencode/php-hexagonal/REPO_AGENTS.md +1 -1
- package/presets/opencode/php-hexagonal/adapter-map.json +1 -1
- package/presets/opencode/php-hexagonal/rules/preset-pr-checklist.md +2 -2
- package/presets/opencode/php-laravel/OPENCODE.md +8 -1
- package/presets/opencode/php-laravel/REPO_AGENTS.md +1 -1
- package/presets/opencode/php-laravel/adapter-map.json +1 -1
- package/presets/opencode/php-laravel/rules/preset-pr-checklist.md +2 -2
- package/presets/opencode/platform-contract.json +1 -1
- package/presets/opencode/svelte/OPENCODE.md +8 -1
- package/presets/opencode/svelte/REPO_AGENTS.md +1 -1
- package/presets/opencode/svelte/adapter-map.json +1 -1
- package/presets/opencode/svelte/rules/preset-pr-checklist.md +2 -2
- package/scripts/check-local-overlay.sh +40 -4
- package/scripts/check-mavis-local-overlay.mjs +23 -0
- package/scripts/check-mavis-platform-contract.mjs +5 -2
- package/scripts/check-opencode-local-overlay.mjs +19 -0
- package/scripts/check-opencode-platform-contract.mjs +5 -2
- package/scripts/check-preset-token-budget.sh +7 -0
- package/scripts/fixtures/cli-golden/claude/next.json +10 -10
- package/scripts/fixtures/cli-golden/cursor/next.json +2 -2
- package/scripts/fixtures/cli-golden/mavis/android-kotlin.json +3 -3
- package/scripts/fixtures/cli-golden/mavis/go.json +3 -3
- package/scripts/fixtures/cli-golden/mavis/ios-swift.json +3 -3
- package/scripts/fixtures/cli-golden/mavis/java.json +3 -3
- package/scripts/fixtures/cli-golden/mavis/mcp-ts.json +3 -3
- package/scripts/fixtures/cli-golden/mavis/next.json +3 -3
- package/scripts/fixtures/cli-golden/mavis/nuxt.json +3 -3
- package/scripts/fixtures/cli-golden/mavis/php-hexagonal.json +3 -3
- package/scripts/fixtures/cli-golden/mavis/php-laravel.json +3 -3
- package/scripts/fixtures/cli-golden/mavis/svelte.json +3 -3
- package/scripts/fixtures/cli-golden/opencode/android-kotlin.json +3 -3
- package/scripts/fixtures/cli-golden/opencode/go.json +3 -3
- package/scripts/fixtures/cli-golden/opencode/ios-swift.json +3 -3
- package/scripts/fixtures/cli-golden/opencode/java.json +3 -3
- package/scripts/fixtures/cli-golden/opencode/mcp-ts.json +3 -3
- package/scripts/fixtures/cli-golden/opencode/next.json +3 -3
- package/scripts/fixtures/cli-golden/opencode/nuxt.json +3 -3
- package/scripts/fixtures/cli-golden/opencode/php-hexagonal.json +3 -3
- package/scripts/fixtures/cli-golden/opencode/php-laravel.json +3 -3
- package/scripts/fixtures/cli-golden/opencode/svelte.json +3 -3
- package/scripts/lib/generate-mavis-adapter.mjs +10 -1
- package/scripts/lib/generate-opencode-adapter.mjs +8 -1
- package/scripts/sync-claude-settings.mjs +25 -0
- package/scripts/sync-dogfood-claude.sh +62 -0
- package/scripts/test-mavis-orchestration.mjs +3 -2
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
".ai.local/team/fixtures/mockup-review-standalone.json": "edda49b1298e94f9a33496317e9f6ccbbb047659e044e05ba35669bfe800eda6",
|
|
23
23
|
".ai.local/team/fixtures/ux-design-standalone.json": "528aeb9db4c310d1b5e3eacae0ad39a4fd1dd49c04154b064e7027981488a07a",
|
|
24
24
|
".ai.local/team/tasks/.gitkeep": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
|
|
25
|
-
".opencode/AGENTS.md": "
|
|
25
|
+
".opencode/AGENTS.md": "e52d6380b1d7c33dc0c819eb88b535ec28c4376016e0751e91877313de6bd0a2",
|
|
26
26
|
".opencode/MCP.md": "3a27ce1483e2c6df44a531556738558898f50a20e16450bea02f620c0ad84b54",
|
|
27
27
|
".opencode/agents/README.md": "8a9a4307b5326db65490cd73ff1e309d9bc8a678477d51b358b86dbc388d9b61",
|
|
28
28
|
".opencode/agents/accessibility-reviewer.md": "d659f901142486a3240262571f63ab1991565ab6d360f61efaf64028b4134a20",
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
".opencode/rules/post-change-lint.md": "3781dff4d33b8e9d6c34e0f027450c3d5f8c25a69a67a2e002552ab452bdbd69",
|
|
83
83
|
".opencode/rules/preset-layering.md": "c63d6b6aa921b70c6c9b531e9d9bcb8b3d81b6a6354da9e4109b5149f5cb8a73",
|
|
84
84
|
".opencode/rules/preset-no-cross-stack-leakage.md": "8933a929a78af3585c7b546736dc8d068bf9ff2f925c9fccbbdcf82d624d20a0",
|
|
85
|
-
".opencode/rules/preset-pr-checklist.md": "
|
|
85
|
+
".opencode/rules/preset-pr-checklist.md": "014c6bfb23b3db0ec5f46b5cbff8effe7126a1e680103f8e3cdbfaba280eabd3",
|
|
86
86
|
".opencode/rules/preset-token-budget.md": "d539545f8ab0dc6117f87c76c044fce9a01256d8cdea8a63b69ff48ccb8b7ac0",
|
|
87
87
|
".opencode/rules/preset-twin-sync.md": "b3061cbb09ff75ecb47e98b7f7fa351240866ee8962a1d128b7c15206ef89dee",
|
|
88
88
|
".opencode/rules/product-specs-authoring.md": "e355387117e689cd957ec02a0c7c306014f7a21cdcaf0e85f57858c12ad0911e",
|
|
@@ -116,7 +116,7 @@
|
|
|
116
116
|
".opencode/skills/unit-testing/SKILL.md": "c70f54921d0d90bd4d0f5305317e80dd3517a60b05f3fbc31dc8527eaf75d19d",
|
|
117
117
|
".opencode/skills/ux-design/SKILL.md": "dcfd7714f6e203eba18b14b334baa872696141ca257c87a72e8a7a45c4f4c91a",
|
|
118
118
|
".opencode/skills/write-adr/SKILL.md": "3daf61c8d97a7e868e5fe5323f1cfa76dd5b298ea5cb110a9da83884d8d602da",
|
|
119
|
-
"AGENTS.md": "
|
|
119
|
+
"AGENTS.md": "0f30e6c4a6c5d3b6cf6460e0e04f2f0c5af780dd98cf04b8e710f98321a87aac",
|
|
120
120
|
"docs/specs/INDEX.md": "cab59f2093e6aaa376246a56d53e4268cb59070a6b10e87a94895192c35f422d",
|
|
121
121
|
"docs/specs/_templates/feature.md": "83c47b90334c555fb5144749837e2ddfe1cae5bb89031f885ba98671075d59e7",
|
|
122
122
|
"docs/specs/_templates/page.md": "a668c584e28edd52afaf3f9f8f898a75e43cb82fa12822c7a016033441e12e54",
|
|
@@ -166,13 +166,20 @@ Do not write \`~/.minimax/**\`.
|
|
|
166
166
|
- Roles: \`mcode exec --file .mavis/agents/<role>.md --output-format json\`.
|
|
167
167
|
- Commands: natural-language procedures in \`.mavis/commands/\`, or
|
|
168
168
|
\`mcode exec --file .mavis/commands/task.md "<task>"\`.
|
|
169
|
-
- After a producer receipt, run \`
|
|
169
|
+
- After a producer receipt, run the chain by hand (\`projectHooks\` is \`manual\`, not auto-registered):
|
|
170
|
+
\`printf '%s\\n' '{"status":"completed"}' | bash .mavis/hooks/chain-team-phases.sh\`.
|
|
171
|
+
Procedures: \`mcode exec --file .mavis/commands/<name>.md\`. Roles: \`mcode exec --file .mavis/agents/<role>.md\`.
|
|
170
172
|
Agents must not write lifecycle fields in \`status.json\` / \`metrics.json\`.
|
|
171
173
|
|
|
172
174
|
## Essential rules (read every turn)
|
|
173
175
|
|
|
174
176
|
${essential}
|
|
175
177
|
|
|
178
|
+
Every turn, probe \`ls -la .ai.local\`, then apply \`.ai.local/rules/*.md\` and
|
|
179
|
+
\`.ai.local/conventions.md\`. Acknowledge \`Using .ai.local: <rule-name>\`.
|
|
180
|
+
Guide: \`docs/LOCAL-OVERLAY.md\`. These essential rules are a prompt contract.
|
|
181
|
+
\`nativeProjectRules\` is \`unknown\` — do not claim engine \`alwaysApply\`.
|
|
182
|
+
|
|
176
183
|
See \`.mavis/rules/README.md\` for the full catalog and loading strategy.
|
|
177
184
|
|
|
178
185
|
## Harness wiring
|
|
@@ -203,6 +210,8 @@ npx @bonesofspring/ai-rules init mavis --preset ${stack}
|
|
|
203
210
|
Copies rules, commands, agents, hooks, skills, \`MAVIS.md\` → \`.mavis/AGENTS.md\`,
|
|
204
211
|
\`MCP.md\`, \`mcp.json\` → \`.mavis/mcp.json\`, plus \`REPO_AGENTS.md\` → root \`AGENTS.md\`.
|
|
205
212
|
Seeds \`.ai.local/team/\`.
|
|
213
|
+
\`freshInit\` is \`unknown\`: \`mcode init\` is TTY-only and a live first \`init mavis\` is not verified.
|
|
214
|
+
MCP mode is \`fallback-manual-import\`: import \`.mavis/mcp.json\` in the MiniMax Code UI. Do not write \`~/.minimax/**\`.
|
|
206
215
|
${skillsLine}
|
|
207
216
|
`;
|
|
208
217
|
}
|
|
@@ -272,13 +272,20 @@ Root \`AGENTS.md\` is native always-on. Read it first, then this file.
|
|
|
272
272
|
- Other rules: lazy \`Read\` \`.opencode/rules/<stem>.md\` when the task matches.
|
|
273
273
|
- Agents: native \`@name\` / Task from \`.opencode/agents/\`.
|
|
274
274
|
- Commands: native \`/task\` from \`.opencode/commands/\`.
|
|
275
|
-
- After a producer receipt, run \`
|
|
275
|
+
- After a producer receipt, run the chain by hand (\`projectHooks\` is \`manual\`; this preset ships no plugin):
|
|
276
|
+
\`printf '%s\\n' '{"status":"completed"}' | bash .opencode/hooks/chain-team-phases.sh\`.
|
|
277
|
+
Slash commands are native (\`/task\` from \`.opencode/commands/\`). Do not assume \`SubagentStop\` auto-chain.
|
|
276
278
|
Agents must not write lifecycle fields in \`status.json\` / \`metrics.json\`.
|
|
277
279
|
|
|
278
280
|
## Essential rules (read every turn)
|
|
279
281
|
|
|
280
282
|
${essential}
|
|
281
283
|
|
|
284
|
+
Every turn, probe \`ls -la .ai.local\`, then apply \`.ai.local/rules/*.md\` and
|
|
285
|
+
\`.ai.local/conventions.md\`. Acknowledge \`Using .ai.local: <rule-name>\`.
|
|
286
|
+
Guide: \`docs/LOCAL-OVERLAY.md\`. These essential rules are a prompt contract.
|
|
287
|
+
\`nativeProjectRules\` is \`no-equivalent\` — do not claim engine \`alwaysApply\`.
|
|
288
|
+
|
|
282
289
|
See \`.opencode/rules/README.md\` for the full catalog and loading strategy.
|
|
283
290
|
|
|
284
291
|
## Harness wiring
|
|
@@ -37,9 +37,34 @@ function buildClaudePermissions(bashPermission) {
|
|
|
37
37
|
function sync(stack) {
|
|
38
38
|
const profile = getStackProfile(stack);
|
|
39
39
|
const permissions = buildClaudePermissions(profile.bashPermission);
|
|
40
|
+
const hookCommand = (script) =>
|
|
41
|
+
`\${CLAUDE_PROJECT_DIR}/.claude/hooks/${script}`;
|
|
40
42
|
const settings = {
|
|
41
43
|
$schema: 'https://json.schemastore.org/claude-code-settings.json',
|
|
42
44
|
permissions,
|
|
45
|
+
hooks: {
|
|
46
|
+
PreToolUse: [
|
|
47
|
+
{
|
|
48
|
+
matcher: 'Bash',
|
|
49
|
+
hooks: [
|
|
50
|
+
{
|
|
51
|
+
type: 'command',
|
|
52
|
+
command: hookCommand('guard-shell-command.sh'),
|
|
53
|
+
},
|
|
54
|
+
],
|
|
55
|
+
},
|
|
56
|
+
],
|
|
57
|
+
SubagentStop: [
|
|
58
|
+
{
|
|
59
|
+
hooks: [
|
|
60
|
+
{
|
|
61
|
+
type: 'command',
|
|
62
|
+
command: hookCommand('chain-team-phases.sh'),
|
|
63
|
+
},
|
|
64
|
+
],
|
|
65
|
+
},
|
|
66
|
+
],
|
|
67
|
+
},
|
|
43
68
|
};
|
|
44
69
|
const dest = path.join(presetsRoot, 'claude', stack, 'settings.json');
|
|
45
70
|
fs.mkdirSync(path.dirname(dest), { recursive: true });
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Sync monorepo dogfood root `.claude/` from Claude next preset (packages SoT).
|
|
3
|
+
# Also syncs repo-root AGENTS.md from REPO_AGENTS.md and project `.mcp.json`.
|
|
4
|
+
# Usage (from repo root or any cwd):
|
|
5
|
+
# ./packages/ai-rules/scripts/sync-dogfood-claude.sh
|
|
6
|
+
# AI_RULES_DOGFOOD_PRESET=ios-swift ./packages/ai-rules/scripts/sync-dogfood-claude.sh
|
|
7
|
+
#
|
|
8
|
+
# Note: this monorepo dogfood stays `next` (do not sync other released stacks here).
|
|
9
|
+
set -euo pipefail
|
|
10
|
+
|
|
11
|
+
ROOT="$(cd "$(dirname "$0")/../../.." && pwd)"
|
|
12
|
+
PRESET_NAME="${AI_RULES_DOGFOOD_PRESET:-next}"
|
|
13
|
+
SRC="$ROOT/packages/ai-rules/presets/claude/$PRESET_NAME"
|
|
14
|
+
DST="$ROOT/.claude"
|
|
15
|
+
|
|
16
|
+
if [[ ! -d "$SRC" ]]; then
|
|
17
|
+
echo "error: preset not found: $SRC" >&2
|
|
18
|
+
exit 1
|
|
19
|
+
fi
|
|
20
|
+
|
|
21
|
+
echo "Dogfood sync: $SRC → $DST (preset=$PRESET_NAME)"
|
|
22
|
+
|
|
23
|
+
mkdir -p "$DST"
|
|
24
|
+
|
|
25
|
+
for f in CLAUDE.md MCP.md settings.json README.md; do
|
|
26
|
+
if [[ -f "$SRC/$f" ]]; then
|
|
27
|
+
cp "$SRC/$f" "$DST/$f"
|
|
28
|
+
fi
|
|
29
|
+
done
|
|
30
|
+
|
|
31
|
+
if [[ -f "$SRC/REPO_AGENTS.md" ]]; then
|
|
32
|
+
cp "$SRC/REPO_AGENTS.md" "$ROOT/AGENTS.md"
|
|
33
|
+
echo "Copied REPO_AGENTS.md → $ROOT/AGENTS.md"
|
|
34
|
+
fi
|
|
35
|
+
|
|
36
|
+
# Claude init copies mcp.json to the project-root `.mcp.json` (not under .claude/).
|
|
37
|
+
if [[ -f "$SRC/mcp.json" ]]; then
|
|
38
|
+
cp "$SRC/mcp.json" "$ROOT/.mcp.json"
|
|
39
|
+
echo "Copied mcp.json → $ROOT/.mcp.json"
|
|
40
|
+
fi
|
|
41
|
+
|
|
42
|
+
for dir in agents commands hooks rules skills; do
|
|
43
|
+
if [[ -d "$SRC/$dir" ]]; then
|
|
44
|
+
mkdir -p "$DST/$dir"
|
|
45
|
+
rsync -a --delete "$SRC/$dir/" "$DST/$dir/"
|
|
46
|
+
fi
|
|
47
|
+
done
|
|
48
|
+
|
|
49
|
+
if [[ -f "$DST/hooks/chain-team-phases.sh" ]]; then
|
|
50
|
+
chmod +x "$DST/hooks/chain-team-phases.sh"
|
|
51
|
+
fi
|
|
52
|
+
if [[ -f "$DST/hooks/guard-shell-command.sh" ]]; then
|
|
53
|
+
chmod +x "$DST/hooks/guard-shell-command.sh"
|
|
54
|
+
fi
|
|
55
|
+
|
|
56
|
+
node -e "
|
|
57
|
+
const { seedAiLocalTeam } = require(process.argv[1]);
|
|
58
|
+
seedAiLocalTeam({ cwd: process.argv[2], presetTeamSrc: process.argv[3] });
|
|
59
|
+
" "$ROOT/packages/ai-rules/bin/lib/seed-ai-local-team.js" "$ROOT" "$SRC/team"
|
|
60
|
+
|
|
61
|
+
echo "Done. Review: git status -- .claude/ AGENTS.md .mcp.json .ai.local/team"
|
|
62
|
+
echo "Tip: run packages/ai-rules/scripts/check-shared-core-drift.sh after core edits."
|
|
@@ -33,9 +33,10 @@ assert.equal(
|
|
|
33
33
|
false,
|
|
34
34
|
'Mavis must not ship hooks.json',
|
|
35
35
|
);
|
|
36
|
-
assert.equal(contract.nativeCapabilities.projectHooks.status, '
|
|
36
|
+
assert.equal(contract.nativeCapabilities.projectHooks.status, 'manual');
|
|
37
|
+
assert.equal(contract.nativeCapabilities.freshInit.status, 'unknown');
|
|
37
38
|
assert.equal(contract.mcp.mode, 'fallback-manual-import');
|
|
38
|
-
console.log('ok P3 semi-auto: projectHooks unknown, no hooks.json');
|
|
39
|
+
console.log('ok P3 semi-auto: projectHooks manual, freshInit unknown, no hooks.json');
|
|
39
40
|
|
|
40
41
|
function readJson(filePath) {
|
|
41
42
|
return JSON.parse(fs.readFileSync(filePath, 'utf8'));
|