@bonesofspring/ai-rules 0.2.47 → 0.2.50
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 +60 -0
- package/README.md +12 -1
- package/docs/PRESET-CONTRIBUTION.md +17 -4
- package/package.json +5 -1
- package/presets/_shared/ai-local/scripts/derive-gate-signals.mjs +1 -0
- package/presets/_shared/ai-local/scripts/manifest.mjs +30 -9
- package/presets/_shared/ai-local/scripts/rule-improver.mjs +42 -7
- package/presets/_shared/ai-local/scripts/signals.mjs +7 -1
- package/presets/_shared/core/agent-team/agent-artifact-contracts.md +5 -2
- package/presets/_shared/core/agent-team/agent-team-orchestrator.md +1 -1
- package/presets/_shared/core/quality/code-quality-and-refactoring.md +4 -0
- package/presets/_shared/core/quality/interactive-questions.md +27 -0
- package/presets/_shared/core/review/technical-retro.md +2 -0
- package/presets/_shared/hooks/chain-team-phases.sh.tmpl +9 -0
- package/presets/claude/android-kotlin/agents/build-verifier.md +1 -1
- package/presets/claude/android-kotlin/agents/code-reviewer.md +1 -1
- package/presets/claude/android-kotlin/agents/debugger.md +1 -1
- package/presets/claude/android-kotlin/agents/feature-developer.md +1 -1
- package/presets/claude/android-kotlin/agents/qa-tester.md +1 -1
- package/presets/claude/android-kotlin/commands/technical-retro.md +1 -1
- package/presets/claude/android-kotlin/hooks/chain-team-phases.sh +9 -0
- package/presets/claude/android-kotlin/rules/README.md +1 -0
- package/presets/claude/android-kotlin/rules/tooling-and-review/agent-team-orchestrator.md +1 -1
- package/presets/claude/android-kotlin/rules/tooling-and-review/code-quality.md +4 -0
- package/presets/claude/android-kotlin/rules/tooling-and-review/interactive-questions.md +34 -0
- package/presets/claude/android-kotlin/rules/tooling-and-review/technical-retro.md +2 -0
- package/presets/claude/android-kotlin/skills/technical-retro/SKILL.md +1 -1
- package/presets/claude/go/agents/build-verifier.md +1 -1
- package/presets/claude/go/agents/code-reviewer.md +1 -1
- package/presets/claude/go/agents/debugger.md +1 -1
- package/presets/claude/go/agents/feature-developer.md +1 -1
- package/presets/claude/go/agents/qa-tester.md +1 -1
- package/presets/claude/go/commands/technical-retro.md +1 -1
- package/presets/claude/go/hooks/chain-team-phases.sh +9 -0
- package/presets/claude/go/rules/README.md +1 -0
- package/presets/claude/go/rules/tooling-and-review/agent-team-orchestrator.md +1 -1
- package/presets/claude/go/rules/tooling-and-review/code-quality.md +4 -0
- package/presets/claude/go/rules/tooling-and-review/interactive-questions.md +34 -0
- package/presets/claude/go/rules/tooling-and-review/technical-retro.md +2 -0
- package/presets/claude/go/skills/technical-retro/SKILL.md +1 -1
- package/presets/claude/ios-swift/agents/build-verifier.md +1 -1
- package/presets/claude/ios-swift/agents/code-reviewer.md +1 -1
- package/presets/claude/ios-swift/agents/debugger.md +1 -1
- package/presets/claude/ios-swift/agents/feature-developer.md +1 -1
- package/presets/claude/ios-swift/agents/qa-tester.md +1 -1
- package/presets/claude/ios-swift/commands/technical-retro.md +1 -1
- package/presets/claude/ios-swift/hooks/chain-team-phases.sh +9 -0
- package/presets/claude/ios-swift/rules/README.md +2 -0
- package/presets/claude/ios-swift/rules/tooling-and-review/agent-team-orchestrator.md +1 -1
- package/presets/claude/ios-swift/rules/tooling-and-review/code-quality.md +4 -0
- package/presets/claude/ios-swift/rules/tooling-and-review/interactive-questions.md +34 -0
- package/presets/claude/ios-swift/rules/tooling-and-review/technical-retro.md +2 -0
- package/presets/claude/ios-swift/skills/technical-retro/SKILL.md +1 -1
- package/presets/claude/java/agents/build-verifier.md +1 -1
- package/presets/claude/java/agents/code-reviewer.md +1 -1
- package/presets/claude/java/agents/debugger.md +1 -1
- package/presets/claude/java/agents/feature-developer.md +1 -1
- package/presets/claude/java/agents/qa-tester.md +1 -1
- package/presets/claude/java/commands/technical-retro.md +1 -1
- package/presets/claude/java/hooks/chain-team-phases.sh +9 -0
- package/presets/claude/java/rules/README.md +1 -0
- package/presets/claude/java/rules/tooling-and-review/agent-team-orchestrator.md +1 -1
- package/presets/claude/java/rules/tooling-and-review/code-quality.md +4 -0
- package/presets/claude/java/rules/tooling-and-review/interactive-questions.md +34 -0
- package/presets/claude/java/rules/tooling-and-review/technical-retro.md +2 -0
- package/presets/claude/java/skills/technical-retro/SKILL.md +1 -1
- package/presets/claude/mcp-ts/agents/build-verifier.md +1 -1
- package/presets/claude/mcp-ts/agents/feature-developer.md +1 -1
- package/presets/claude/mcp-ts/commands/technical-retro.md +1 -1
- package/presets/claude/mcp-ts/hooks/chain-team-phases.sh +9 -0
- package/presets/claude/mcp-ts/rules/README.md +1 -0
- package/presets/claude/mcp-ts/rules/tooling-and-review/agent-team-orchestrator.md +1 -1
- package/presets/claude/mcp-ts/rules/tooling-and-review/code-quality.md +4 -0
- package/presets/claude/mcp-ts/rules/tooling-and-review/interactive-questions.md +34 -0
- package/presets/claude/mcp-ts/rules/tooling-and-review/technical-retro.md +2 -0
- package/presets/claude/next/agents/build-verifier.md +1 -1
- package/presets/claude/next/agents/code-reviewer.md +1 -1
- package/presets/claude/next/agents/debugger.md +1 -1
- package/presets/claude/next/agents/feature-developer.md +1 -1
- package/presets/claude/next/agents/qa-tester.md +1 -1
- package/presets/claude/next/commands/technical-retro.md +1 -1
- package/presets/claude/next/hooks/chain-team-phases.sh +9 -0
- package/presets/claude/next/rules/README.md +3 -1
- package/presets/claude/next/rules/tooling-and-review/agent-team-orchestrator.md +1 -1
- package/presets/claude/next/rules/tooling-and-review/code-quality.md +4 -0
- package/presets/claude/next/rules/tooling-and-review/interactive-questions.md +34 -0
- package/presets/claude/next/rules/tooling-and-review/technical-retro.md +2 -0
- package/presets/claude/next/skills/technical-retro/SKILL.md +1 -1
- package/presets/claude/nuxt/agents/build-verifier.md +1 -1
- package/presets/claude/nuxt/agents/code-reviewer.md +1 -1
- package/presets/claude/nuxt/agents/debugger.md +1 -1
- package/presets/claude/nuxt/agents/feature-developer.md +1 -1
- package/presets/claude/nuxt/agents/qa-tester.md +1 -1
- package/presets/claude/nuxt/commands/technical-retro.md +1 -1
- package/presets/claude/nuxt/hooks/chain-team-phases.sh +9 -0
- package/presets/claude/nuxt/rules/README.md +2 -0
- package/presets/claude/nuxt/rules/tooling-and-review/agent-team-orchestrator.md +1 -1
- package/presets/claude/nuxt/rules/tooling-and-review/code-quality.md +4 -0
- package/presets/claude/nuxt/rules/tooling-and-review/interactive-questions.md +34 -0
- package/presets/claude/nuxt/rules/tooling-and-review/technical-retro.md +2 -0
- package/presets/claude/nuxt/skills/technical-retro/SKILL.md +1 -1
- package/presets/claude/php-hexagonal/agents/build-verifier.md +1 -1
- package/presets/claude/php-hexagonal/agents/code-reviewer.md +1 -1
- package/presets/claude/php-hexagonal/agents/debugger.md +1 -1
- package/presets/claude/php-hexagonal/agents/feature-developer.md +1 -1
- package/presets/claude/php-hexagonal/agents/qa-tester.md +1 -1
- package/presets/claude/php-hexagonal/commands/technical-retro.md +1 -1
- package/presets/claude/php-hexagonal/hooks/chain-team-phases.sh +9 -0
- package/presets/claude/php-hexagonal/rules/README.md +1 -0
- package/presets/claude/php-hexagonal/rules/tooling-and-review/agent-team-orchestrator.md +1 -1
- package/presets/claude/php-hexagonal/rules/tooling-and-review/code-quality.md +4 -0
- package/presets/claude/php-hexagonal/rules/tooling-and-review/interactive-questions.md +34 -0
- package/presets/claude/php-hexagonal/rules/tooling-and-review/technical-retro.md +2 -0
- package/presets/claude/php-hexagonal/skills/technical-retro/SKILL.md +1 -1
- package/presets/claude/php-laravel/agents/build-verifier.md +1 -1
- package/presets/claude/php-laravel/agents/code-reviewer.md +1 -1
- package/presets/claude/php-laravel/agents/debugger.md +1 -1
- package/presets/claude/php-laravel/agents/feature-developer.md +1 -1
- package/presets/claude/php-laravel/agents/qa-tester.md +1 -1
- package/presets/claude/php-laravel/commands/technical-retro.md +1 -1
- package/presets/claude/php-laravel/hooks/chain-team-phases.sh +9 -0
- package/presets/claude/php-laravel/rules/README.md +1 -0
- package/presets/claude/php-laravel/rules/tooling-and-review/agent-team-orchestrator.md +1 -1
- package/presets/claude/php-laravel/rules/tooling-and-review/code-quality.md +4 -0
- package/presets/claude/php-laravel/rules/tooling-and-review/interactive-questions.md +34 -0
- package/presets/claude/php-laravel/rules/tooling-and-review/technical-retro.md +2 -0
- package/presets/claude/php-laravel/skills/technical-retro/SKILL.md +1 -1
- package/presets/claude/svelte/agents/build-verifier.md +1 -1
- package/presets/claude/svelte/agents/code-reviewer.md +1 -1
- package/presets/claude/svelte/agents/debugger.md +1 -1
- package/presets/claude/svelte/agents/feature-developer.md +1 -1
- package/presets/claude/svelte/agents/qa-tester.md +1 -1
- package/presets/claude/svelte/commands/technical-retro.md +1 -1
- package/presets/claude/svelte/hooks/chain-team-phases.sh +9 -0
- package/presets/claude/svelte/rules/README.md +2 -0
- package/presets/claude/svelte/rules/tooling-and-review/agent-team-orchestrator.md +1 -1
- package/presets/claude/svelte/rules/tooling-and-review/code-quality.md +4 -0
- package/presets/claude/svelte/rules/tooling-and-review/interactive-questions.md +34 -0
- package/presets/claude/svelte/rules/tooling-and-review/technical-retro.md +2 -0
- package/presets/claude/svelte/skills/technical-retro/SKILL.md +1 -1
- package/presets/cursor/android-kotlin/agents/build-verifier.md +1 -1
- package/presets/cursor/android-kotlin/agents/code-reviewer.md +1 -1
- package/presets/cursor/android-kotlin/agents/debugger.md +1 -1
- package/presets/cursor/android-kotlin/agents/feature-developer.md +1 -1
- package/presets/cursor/android-kotlin/agents/qa-tester.md +1 -1
- package/presets/cursor/android-kotlin/commands/technical-retro.md +1 -1
- package/presets/cursor/android-kotlin/hooks/chain-team-phases.sh +9 -0
- package/presets/cursor/android-kotlin/rules/README.md +1 -0
- package/presets/cursor/android-kotlin/rules/code-quality-and-refactoring.mdc +4 -0
- package/presets/cursor/android-kotlin/rules/interactive-questions.mdc +34 -0
- package/presets/cursor/android-kotlin/rules/technical-retro.mdc +2 -0
- package/presets/cursor/android-kotlin/skills/technical-retro/SKILL.md +1 -1
- package/presets/cursor/go/agents/build-verifier.md +1 -1
- package/presets/cursor/go/agents/code-reviewer.md +1 -1
- package/presets/cursor/go/agents/debugger.md +1 -1
- package/presets/cursor/go/agents/feature-developer.md +1 -1
- package/presets/cursor/go/agents/qa-tester.md +1 -1
- package/presets/cursor/go/commands/technical-retro.md +1 -1
- package/presets/cursor/go/hooks/chain-team-phases.sh +9 -0
- package/presets/cursor/go/rules/README.md +2 -1
- package/presets/cursor/go/rules/code-quality-and-refactoring.mdc +4 -0
- package/presets/cursor/go/rules/interactive-questions.mdc +34 -0
- package/presets/cursor/go/rules/technical-retro.mdc +2 -0
- package/presets/cursor/go/skills/technical-retro/SKILL.md +1 -1
- package/presets/cursor/ios-swift/agents/build-verifier.md +1 -1
- package/presets/cursor/ios-swift/agents/code-reviewer.md +1 -1
- package/presets/cursor/ios-swift/agents/debugger.md +1 -1
- package/presets/cursor/ios-swift/agents/feature-developer.md +1 -1
- package/presets/cursor/ios-swift/agents/qa-tester.md +1 -1
- package/presets/cursor/ios-swift/commands/technical-retro.md +1 -1
- package/presets/cursor/ios-swift/hooks/chain-team-phases.sh +9 -0
- package/presets/cursor/ios-swift/rules/README.md +1 -0
- package/presets/cursor/ios-swift/rules/code-quality-and-refactoring.mdc +4 -0
- package/presets/cursor/ios-swift/rules/interactive-questions.mdc +34 -0
- package/presets/cursor/ios-swift/rules/technical-retro.mdc +2 -0
- package/presets/cursor/ios-swift/skills/technical-retro/SKILL.md +1 -1
- package/presets/cursor/java/agents/build-verifier.md +1 -1
- package/presets/cursor/java/agents/code-reviewer.md +1 -1
- package/presets/cursor/java/agents/debugger.md +1 -1
- package/presets/cursor/java/agents/feature-developer.md +1 -1
- package/presets/cursor/java/agents/qa-tester.md +1 -1
- package/presets/cursor/java/commands/technical-retro.md +1 -1
- package/presets/cursor/java/hooks/chain-team-phases.sh +9 -0
- package/presets/cursor/java/rules/README.md +2 -1
- package/presets/cursor/java/rules/code-quality-and-refactoring.mdc +4 -0
- package/presets/cursor/java/rules/interactive-questions.mdc +34 -0
- package/presets/cursor/java/rules/technical-retro.mdc +2 -0
- package/presets/cursor/java/skills/technical-retro/SKILL.md +1 -1
- package/presets/cursor/mcp-ts/agents/build-verifier.md +1 -1
- package/presets/cursor/mcp-ts/agents/feature-developer.md +1 -1
- package/presets/cursor/mcp-ts/commands/technical-retro.md +1 -1
- package/presets/cursor/mcp-ts/hooks/chain-team-phases.sh +9 -0
- package/presets/cursor/mcp-ts/rules/README.md +2 -1
- package/presets/cursor/mcp-ts/rules/code-quality-and-refactoring.mdc +4 -0
- package/presets/cursor/mcp-ts/rules/interactive-questions.mdc +34 -0
- package/presets/cursor/mcp-ts/rules/technical-retro.mdc +2 -0
- package/presets/cursor/next/agents/build-verifier.md +1 -1
- package/presets/cursor/next/agents/code-reviewer.md +1 -1
- package/presets/cursor/next/agents/debugger.md +1 -1
- package/presets/cursor/next/agents/feature-developer.md +1 -1
- package/presets/cursor/next/agents/qa-tester.md +1 -1
- package/presets/cursor/next/commands/technical-retro.md +1 -1
- package/presets/cursor/next/hooks/chain-team-phases.sh +9 -0
- package/presets/cursor/next/rules/README.md +2 -1
- package/presets/cursor/next/rules/code-quality-and-refactoring.mdc +4 -0
- package/presets/cursor/next/rules/interactive-questions.mdc +34 -0
- package/presets/cursor/next/rules/technical-retro.mdc +2 -0
- package/presets/cursor/next/skills/technical-retro/SKILL.md +1 -1
- package/presets/cursor/nuxt/agents/build-verifier.md +1 -1
- package/presets/cursor/nuxt/agents/code-reviewer.md +1 -1
- package/presets/cursor/nuxt/agents/debugger.md +1 -1
- package/presets/cursor/nuxt/agents/feature-developer.md +1 -1
- package/presets/cursor/nuxt/agents/qa-tester.md +1 -1
- package/presets/cursor/nuxt/commands/technical-retro.md +1 -1
- package/presets/cursor/nuxt/hooks/chain-team-phases.sh +9 -0
- package/presets/cursor/nuxt/rules/README.md +2 -1
- package/presets/cursor/nuxt/rules/code-quality-and-refactoring.mdc +4 -0
- package/presets/cursor/nuxt/rules/interactive-questions.mdc +34 -0
- package/presets/cursor/nuxt/rules/technical-retro.mdc +2 -0
- package/presets/cursor/nuxt/skills/technical-retro/SKILL.md +1 -1
- package/presets/cursor/php-hexagonal/agents/build-verifier.md +1 -1
- package/presets/cursor/php-hexagonal/agents/code-reviewer.md +1 -1
- package/presets/cursor/php-hexagonal/agents/debugger.md +1 -1
- package/presets/cursor/php-hexagonal/agents/feature-developer.md +1 -1
- package/presets/cursor/php-hexagonal/agents/qa-tester.md +1 -1
- package/presets/cursor/php-hexagonal/commands/technical-retro.md +1 -1
- package/presets/cursor/php-hexagonal/hooks/chain-team-phases.sh +9 -0
- package/presets/cursor/php-hexagonal/rules/README.md +2 -1
- package/presets/cursor/php-hexagonal/rules/code-quality-and-refactoring.mdc +4 -0
- package/presets/cursor/php-hexagonal/rules/interactive-questions.mdc +34 -0
- package/presets/cursor/php-hexagonal/rules/technical-retro.mdc +2 -0
- package/presets/cursor/php-hexagonal/skills/technical-retro/SKILL.md +1 -1
- package/presets/cursor/php-laravel/agents/build-verifier.md +1 -1
- package/presets/cursor/php-laravel/agents/code-reviewer.md +1 -1
- package/presets/cursor/php-laravel/agents/debugger.md +1 -1
- package/presets/cursor/php-laravel/agents/feature-developer.md +1 -1
- package/presets/cursor/php-laravel/agents/qa-tester.md +1 -1
- package/presets/cursor/php-laravel/commands/technical-retro.md +1 -1
- package/presets/cursor/php-laravel/hooks/chain-team-phases.sh +9 -0
- package/presets/cursor/php-laravel/rules/README.md +2 -1
- package/presets/cursor/php-laravel/rules/code-quality-and-refactoring.mdc +4 -0
- package/presets/cursor/php-laravel/rules/interactive-questions.mdc +34 -0
- package/presets/cursor/php-laravel/rules/technical-retro.mdc +2 -0
- package/presets/cursor/php-laravel/skills/technical-retro/SKILL.md +1 -1
- package/presets/cursor/svelte/agents/build-verifier.md +1 -1
- package/presets/cursor/svelte/agents/code-reviewer.md +1 -1
- package/presets/cursor/svelte/agents/debugger.md +1 -1
- package/presets/cursor/svelte/agents/feature-developer.md +1 -1
- package/presets/cursor/svelte/agents/qa-tester.md +1 -1
- package/presets/cursor/svelte/commands/technical-retro.md +1 -1
- package/presets/cursor/svelte/hooks/chain-team-phases.sh +9 -0
- package/presets/cursor/svelte/rules/README.md +2 -1
- package/presets/cursor/svelte/rules/code-quality-and-refactoring.mdc +4 -0
- package/presets/cursor/svelte/rules/interactive-questions.mdc +34 -0
- package/presets/cursor/svelte/rules/technical-retro.mdc +2 -0
- package/presets/cursor/svelte/skills/technical-retro/SKILL.md +1 -1
- package/presets/mavis/android-kotlin/adapter-map.json +10 -1
- package/presets/mavis/android-kotlin/agents/build-verifier.md +1 -1
- package/presets/mavis/android-kotlin/agents/code-reviewer.md +1 -1
- package/presets/mavis/android-kotlin/agents/debugger.md +1 -1
- package/presets/mavis/android-kotlin/agents/feature-developer.md +1 -1
- package/presets/mavis/android-kotlin/agents/qa-tester.md +1 -1
- package/presets/mavis/android-kotlin/commands/technical-retro.md +1 -1
- package/presets/mavis/android-kotlin/hooks/chain-team-phases.sh +9 -0
- package/presets/mavis/android-kotlin/rules/agent-team-orchestrator.md +1 -1
- package/presets/mavis/android-kotlin/rules/code-quality-and-refactoring.md +4 -0
- package/presets/mavis/android-kotlin/rules/interactive-questions.md +29 -0
- package/presets/mavis/android-kotlin/rules/technical-retro.md +2 -0
- package/presets/mavis/android-kotlin/skills/technical-retro/SKILL.md +1 -1
- package/presets/mavis/go/adapter-map.json +10 -1
- package/presets/mavis/go/agents/build-verifier.md +1 -1
- package/presets/mavis/go/agents/code-reviewer.md +1 -1
- package/presets/mavis/go/agents/debugger.md +1 -1
- package/presets/mavis/go/agents/feature-developer.md +1 -1
- package/presets/mavis/go/agents/qa-tester.md +1 -1
- package/presets/mavis/go/commands/technical-retro.md +1 -1
- package/presets/mavis/go/hooks/chain-team-phases.sh +9 -0
- package/presets/mavis/go/rules/agent-team-orchestrator.md +1 -1
- package/presets/mavis/go/rules/code-quality-and-refactoring.md +4 -0
- package/presets/mavis/go/rules/interactive-questions.md +29 -0
- package/presets/mavis/go/rules/technical-retro.md +2 -0
- package/presets/mavis/go/skills/technical-retro/SKILL.md +1 -1
- package/presets/mavis/ios-swift/adapter-map.json +10 -1
- package/presets/mavis/ios-swift/agents/build-verifier.md +1 -1
- package/presets/mavis/ios-swift/agents/code-reviewer.md +1 -1
- package/presets/mavis/ios-swift/agents/debugger.md +1 -1
- package/presets/mavis/ios-swift/agents/feature-developer.md +1 -1
- package/presets/mavis/ios-swift/agents/qa-tester.md +1 -1
- package/presets/mavis/ios-swift/commands/technical-retro.md +1 -1
- package/presets/mavis/ios-swift/hooks/chain-team-phases.sh +9 -0
- package/presets/mavis/ios-swift/rules/agent-team-orchestrator.md +1 -1
- package/presets/mavis/ios-swift/rules/code-quality-and-refactoring.md +4 -0
- package/presets/mavis/ios-swift/rules/interactive-questions.md +29 -0
- package/presets/mavis/ios-swift/rules/technical-retro.md +2 -0
- package/presets/mavis/ios-swift/skills/technical-retro/SKILL.md +1 -1
- package/presets/mavis/java/adapter-map.json +10 -1
- package/presets/mavis/java/agents/build-verifier.md +1 -1
- package/presets/mavis/java/agents/code-reviewer.md +1 -1
- package/presets/mavis/java/agents/debugger.md +1 -1
- package/presets/mavis/java/agents/feature-developer.md +1 -1
- package/presets/mavis/java/agents/qa-tester.md +1 -1
- package/presets/mavis/java/commands/technical-retro.md +1 -1
- package/presets/mavis/java/hooks/chain-team-phases.sh +9 -0
- package/presets/mavis/java/rules/agent-team-orchestrator.md +1 -1
- package/presets/mavis/java/rules/code-quality-and-refactoring.md +4 -0
- package/presets/mavis/java/rules/interactive-questions.md +29 -0
- package/presets/mavis/java/rules/technical-retro.md +2 -0
- package/presets/mavis/java/skills/technical-retro/SKILL.md +1 -1
- package/presets/mavis/mcp-ts/adapter-map.json +10 -1
- package/presets/mavis/mcp-ts/agents/build-verifier.md +1 -1
- package/presets/mavis/mcp-ts/agents/feature-developer.md +1 -1
- package/presets/mavis/mcp-ts/commands/technical-retro.md +1 -1
- package/presets/mavis/mcp-ts/hooks/chain-team-phases.sh +9 -0
- package/presets/mavis/mcp-ts/rules/agent-team-orchestrator.md +1 -1
- package/presets/mavis/mcp-ts/rules/code-quality-and-refactoring.md +4 -0
- package/presets/mavis/mcp-ts/rules/interactive-questions.md +29 -0
- package/presets/mavis/mcp-ts/rules/technical-retro.md +2 -0
- package/presets/mavis/next/adapter-map.json +10 -1
- package/presets/mavis/next/agents/build-verifier.md +1 -1
- package/presets/mavis/next/agents/code-reviewer.md +1 -1
- package/presets/mavis/next/agents/debugger.md +1 -1
- package/presets/mavis/next/agents/feature-developer.md +1 -1
- package/presets/mavis/next/agents/qa-tester.md +1 -1
- package/presets/mavis/next/commands/technical-retro.md +1 -1
- package/presets/mavis/next/hooks/chain-team-phases.sh +9 -0
- package/presets/mavis/next/rules/agent-team-orchestrator.md +1 -1
- package/presets/mavis/next/rules/code-quality-and-refactoring.md +4 -0
- package/presets/mavis/next/rules/interactive-questions.md +29 -0
- package/presets/mavis/next/rules/technical-retro.md +2 -0
- package/presets/mavis/next/skills/technical-retro/SKILL.md +1 -1
- package/presets/mavis/nuxt/adapter-map.json +10 -1
- package/presets/mavis/nuxt/agents/build-verifier.md +1 -1
- package/presets/mavis/nuxt/agents/code-reviewer.md +1 -1
- package/presets/mavis/nuxt/agents/debugger.md +1 -1
- package/presets/mavis/nuxt/agents/feature-developer.md +1 -1
- package/presets/mavis/nuxt/agents/qa-tester.md +1 -1
- package/presets/mavis/nuxt/commands/technical-retro.md +1 -1
- package/presets/mavis/nuxt/hooks/chain-team-phases.sh +9 -0
- package/presets/mavis/nuxt/rules/agent-team-orchestrator.md +1 -1
- package/presets/mavis/nuxt/rules/code-quality-and-refactoring.md +4 -0
- package/presets/mavis/nuxt/rules/interactive-questions.md +29 -0
- package/presets/mavis/nuxt/rules/technical-retro.md +2 -0
- package/presets/mavis/nuxt/skills/technical-retro/SKILL.md +1 -1
- package/presets/mavis/php-hexagonal/adapter-map.json +10 -1
- package/presets/mavis/php-hexagonal/agents/build-verifier.md +1 -1
- package/presets/mavis/php-hexagonal/agents/code-reviewer.md +1 -1
- package/presets/mavis/php-hexagonal/agents/debugger.md +1 -1
- package/presets/mavis/php-hexagonal/agents/feature-developer.md +1 -1
- package/presets/mavis/php-hexagonal/agents/qa-tester.md +1 -1
- package/presets/mavis/php-hexagonal/commands/technical-retro.md +1 -1
- package/presets/mavis/php-hexagonal/hooks/chain-team-phases.sh +9 -0
- package/presets/mavis/php-hexagonal/rules/agent-team-orchestrator.md +1 -1
- package/presets/mavis/php-hexagonal/rules/code-quality-and-refactoring.md +4 -0
- package/presets/mavis/php-hexagonal/rules/interactive-questions.md +29 -0
- package/presets/mavis/php-hexagonal/rules/technical-retro.md +2 -0
- package/presets/mavis/php-hexagonal/skills/technical-retro/SKILL.md +1 -1
- package/presets/mavis/php-laravel/adapter-map.json +10 -1
- package/presets/mavis/php-laravel/agents/build-verifier.md +1 -1
- package/presets/mavis/php-laravel/agents/code-reviewer.md +1 -1
- package/presets/mavis/php-laravel/agents/debugger.md +1 -1
- package/presets/mavis/php-laravel/agents/feature-developer.md +1 -1
- package/presets/mavis/php-laravel/agents/qa-tester.md +1 -1
- package/presets/mavis/php-laravel/commands/technical-retro.md +1 -1
- package/presets/mavis/php-laravel/hooks/chain-team-phases.sh +9 -0
- package/presets/mavis/php-laravel/rules/agent-team-orchestrator.md +1 -1
- package/presets/mavis/php-laravel/rules/code-quality-and-refactoring.md +4 -0
- package/presets/mavis/php-laravel/rules/interactive-questions.md +29 -0
- package/presets/mavis/php-laravel/rules/technical-retro.md +2 -0
- package/presets/mavis/php-laravel/skills/technical-retro/SKILL.md +1 -1
- package/presets/mavis/svelte/adapter-map.json +10 -1
- package/presets/mavis/svelte/agents/build-verifier.md +1 -1
- package/presets/mavis/svelte/agents/code-reviewer.md +1 -1
- package/presets/mavis/svelte/agents/debugger.md +1 -1
- package/presets/mavis/svelte/agents/feature-developer.md +1 -1
- package/presets/mavis/svelte/agents/qa-tester.md +1 -1
- package/presets/mavis/svelte/commands/technical-retro.md +1 -1
- package/presets/mavis/svelte/hooks/chain-team-phases.sh +9 -0
- package/presets/mavis/svelte/rules/agent-team-orchestrator.md +1 -1
- package/presets/mavis/svelte/rules/code-quality-and-refactoring.md +4 -0
- package/presets/mavis/svelte/rules/interactive-questions.md +29 -0
- package/presets/mavis/svelte/rules/technical-retro.md +2 -0
- package/presets/mavis/svelte/skills/technical-retro/SKILL.md +1 -1
- package/presets/opencode/android-kotlin/adapter-map.json +10 -1
- package/presets/opencode/android-kotlin/agents/build-verifier.md +1 -1
- package/presets/opencode/android-kotlin/agents/code-reviewer.md +1 -1
- package/presets/opencode/android-kotlin/agents/debugger.md +1 -1
- package/presets/opencode/android-kotlin/agents/feature-developer.md +1 -1
- package/presets/opencode/android-kotlin/agents/qa-tester.md +1 -1
- package/presets/opencode/android-kotlin/commands/technical-retro.md +1 -1
- package/presets/opencode/android-kotlin/hooks/chain-team-phases.sh +9 -0
- package/presets/opencode/android-kotlin/rules/agent-team-orchestrator.md +1 -1
- package/presets/opencode/android-kotlin/rules/code-quality-and-refactoring.md +4 -0
- package/presets/opencode/android-kotlin/rules/interactive-questions.md +29 -0
- package/presets/opencode/android-kotlin/rules/technical-retro.md +2 -0
- package/presets/opencode/android-kotlin/skills/technical-retro/SKILL.md +1 -1
- package/presets/opencode/go/adapter-map.json +10 -1
- package/presets/opencode/go/agents/build-verifier.md +1 -1
- package/presets/opencode/go/agents/code-reviewer.md +1 -1
- package/presets/opencode/go/agents/debugger.md +1 -1
- package/presets/opencode/go/agents/feature-developer.md +1 -1
- package/presets/opencode/go/agents/qa-tester.md +1 -1
- package/presets/opencode/go/commands/technical-retro.md +1 -1
- package/presets/opencode/go/hooks/chain-team-phases.sh +9 -0
- package/presets/opencode/go/rules/agent-team-orchestrator.md +1 -1
- package/presets/opencode/go/rules/code-quality-and-refactoring.md +4 -0
- package/presets/opencode/go/rules/interactive-questions.md +29 -0
- package/presets/opencode/go/rules/technical-retro.md +2 -0
- package/presets/opencode/go/skills/technical-retro/SKILL.md +1 -1
- package/presets/opencode/ios-swift/adapter-map.json +10 -1
- package/presets/opencode/ios-swift/agents/build-verifier.md +1 -1
- package/presets/opencode/ios-swift/agents/code-reviewer.md +1 -1
- package/presets/opencode/ios-swift/agents/debugger.md +1 -1
- package/presets/opencode/ios-swift/agents/feature-developer.md +1 -1
- package/presets/opencode/ios-swift/agents/qa-tester.md +1 -1
- package/presets/opencode/ios-swift/commands/technical-retro.md +1 -1
- package/presets/opencode/ios-swift/hooks/chain-team-phases.sh +9 -0
- package/presets/opencode/ios-swift/rules/agent-team-orchestrator.md +1 -1
- package/presets/opencode/ios-swift/rules/code-quality-and-refactoring.md +4 -0
- package/presets/opencode/ios-swift/rules/interactive-questions.md +29 -0
- package/presets/opencode/ios-swift/rules/technical-retro.md +2 -0
- package/presets/opencode/ios-swift/skills/technical-retro/SKILL.md +1 -1
- package/presets/opencode/java/adapter-map.json +10 -1
- package/presets/opencode/java/agents/build-verifier.md +1 -1
- package/presets/opencode/java/agents/code-reviewer.md +1 -1
- package/presets/opencode/java/agents/debugger.md +1 -1
- package/presets/opencode/java/agents/feature-developer.md +1 -1
- package/presets/opencode/java/agents/qa-tester.md +1 -1
- package/presets/opencode/java/commands/technical-retro.md +1 -1
- package/presets/opencode/java/hooks/chain-team-phases.sh +9 -0
- package/presets/opencode/java/rules/agent-team-orchestrator.md +1 -1
- package/presets/opencode/java/rules/code-quality-and-refactoring.md +4 -0
- package/presets/opencode/java/rules/interactive-questions.md +29 -0
- package/presets/opencode/java/rules/technical-retro.md +2 -0
- package/presets/opencode/java/skills/technical-retro/SKILL.md +1 -1
- package/presets/opencode/mcp-ts/adapter-map.json +10 -1
- package/presets/opencode/mcp-ts/agents/build-verifier.md +1 -1
- package/presets/opencode/mcp-ts/agents/feature-developer.md +1 -1
- package/presets/opencode/mcp-ts/commands/technical-retro.md +1 -1
- package/presets/opencode/mcp-ts/hooks/chain-team-phases.sh +9 -0
- package/presets/opencode/mcp-ts/rules/agent-team-orchestrator.md +1 -1
- package/presets/opencode/mcp-ts/rules/code-quality-and-refactoring.md +4 -0
- package/presets/opencode/mcp-ts/rules/interactive-questions.md +29 -0
- package/presets/opencode/mcp-ts/rules/technical-retro.md +2 -0
- package/presets/opencode/next/adapter-map.json +10 -1
- package/presets/opencode/next/agents/build-verifier.md +1 -1
- package/presets/opencode/next/agents/code-reviewer.md +1 -1
- package/presets/opencode/next/agents/debugger.md +1 -1
- package/presets/opencode/next/agents/feature-developer.md +1 -1
- package/presets/opencode/next/agents/qa-tester.md +1 -1
- package/presets/opencode/next/commands/technical-retro.md +1 -1
- package/presets/opencode/next/hooks/chain-team-phases.sh +9 -0
- package/presets/opencode/next/rules/agent-team-orchestrator.md +1 -1
- package/presets/opencode/next/rules/code-quality-and-refactoring.md +4 -0
- package/presets/opencode/next/rules/interactive-questions.md +29 -0
- package/presets/opencode/next/rules/technical-retro.md +2 -0
- package/presets/opencode/next/skills/technical-retro/SKILL.md +1 -1
- package/presets/opencode/nuxt/adapter-map.json +10 -1
- package/presets/opencode/nuxt/agents/build-verifier.md +1 -1
- package/presets/opencode/nuxt/agents/code-reviewer.md +1 -1
- package/presets/opencode/nuxt/agents/debugger.md +1 -1
- package/presets/opencode/nuxt/agents/feature-developer.md +1 -1
- package/presets/opencode/nuxt/agents/qa-tester.md +1 -1
- package/presets/opencode/nuxt/commands/technical-retro.md +1 -1
- package/presets/opencode/nuxt/hooks/chain-team-phases.sh +9 -0
- package/presets/opencode/nuxt/rules/agent-team-orchestrator.md +1 -1
- package/presets/opencode/nuxt/rules/code-quality-and-refactoring.md +4 -0
- package/presets/opencode/nuxt/rules/interactive-questions.md +29 -0
- package/presets/opencode/nuxt/rules/technical-retro.md +2 -0
- package/presets/opencode/nuxt/skills/technical-retro/SKILL.md +1 -1
- package/presets/opencode/php-hexagonal/adapter-map.json +10 -1
- package/presets/opencode/php-hexagonal/agents/build-verifier.md +1 -1
- package/presets/opencode/php-hexagonal/agents/code-reviewer.md +1 -1
- package/presets/opencode/php-hexagonal/agents/debugger.md +1 -1
- package/presets/opencode/php-hexagonal/agents/feature-developer.md +1 -1
- package/presets/opencode/php-hexagonal/agents/qa-tester.md +1 -1
- package/presets/opencode/php-hexagonal/commands/technical-retro.md +1 -1
- package/presets/opencode/php-hexagonal/hooks/chain-team-phases.sh +9 -0
- package/presets/opencode/php-hexagonal/rules/agent-team-orchestrator.md +1 -1
- package/presets/opencode/php-hexagonal/rules/code-quality-and-refactoring.md +4 -0
- package/presets/opencode/php-hexagonal/rules/interactive-questions.md +29 -0
- package/presets/opencode/php-hexagonal/rules/technical-retro.md +2 -0
- package/presets/opencode/php-hexagonal/skills/technical-retro/SKILL.md +1 -1
- package/presets/opencode/php-laravel/adapter-map.json +10 -1
- package/presets/opencode/php-laravel/agents/build-verifier.md +1 -1
- package/presets/opencode/php-laravel/agents/code-reviewer.md +1 -1
- package/presets/opencode/php-laravel/agents/debugger.md +1 -1
- package/presets/opencode/php-laravel/agents/feature-developer.md +1 -1
- package/presets/opencode/php-laravel/agents/qa-tester.md +1 -1
- package/presets/opencode/php-laravel/commands/technical-retro.md +1 -1
- package/presets/opencode/php-laravel/hooks/chain-team-phases.sh +9 -0
- package/presets/opencode/php-laravel/rules/agent-team-orchestrator.md +1 -1
- package/presets/opencode/php-laravel/rules/code-quality-and-refactoring.md +4 -0
- package/presets/opencode/php-laravel/rules/interactive-questions.md +29 -0
- package/presets/opencode/php-laravel/rules/technical-retro.md +2 -0
- package/presets/opencode/php-laravel/skills/technical-retro/SKILL.md +1 -1
- package/presets/opencode/svelte/adapter-map.json +10 -1
- package/presets/opencode/svelte/agents/build-verifier.md +1 -1
- package/presets/opencode/svelte/agents/code-reviewer.md +1 -1
- package/presets/opencode/svelte/agents/debugger.md +1 -1
- package/presets/opencode/svelte/agents/feature-developer.md +1 -1
- package/presets/opencode/svelte/agents/qa-tester.md +1 -1
- package/presets/opencode/svelte/commands/technical-retro.md +1 -1
- package/presets/opencode/svelte/hooks/chain-team-phases.sh +9 -0
- package/presets/opencode/svelte/rules/agent-team-orchestrator.md +1 -1
- package/presets/opencode/svelte/rules/code-quality-and-refactoring.md +4 -0
- package/presets/opencode/svelte/rules/interactive-questions.md +29 -0
- package/presets/opencode/svelte/rules/technical-retro.md +2 -0
- package/presets/opencode/svelte/skills/technical-retro/SKILL.md +1 -1
|
@@ -51,4 +51,4 @@ Coordinate with existing plans under `.ai.local/team/tasks/<slug>/`.
|
|
|
51
51
|
|
|
52
52
|
## Receipt binding
|
|
53
53
|
|
|
54
|
-
> **Receipt binding.** When writing the terminal receipt to `artifact-manifest.json`, set `entry.receipt.attemptId = <attemptId supplied by the orchestrator>` (the orchestrator provides this via `attemptId` on invocation). The hook at `chain-team-phases.sh:readBoundReceiptOutcome` rejects entries whose `attemptId` does not match the current attempt, or whose `Date.parse(timestamps.completedAt) < Date.parse(attemptStartedAt)`.
|
|
54
|
+
> **Receipt binding.** When writing the terminal receipt to `artifact-manifest.json`, set `entry.receipt.attemptId = <attemptId supplied by the orchestrator>` (the orchestrator provides this via `attemptId` on invocation). The hook at `chain-team-phases.sh:readBoundReceiptOutcome` rejects entries whose `attemptId` does not match the current attempt, or whose `Date.parse(timestamps.completedAt) < Date.parse(attemptStartedAt)`. A missing or stale attemptId causes `awaiting_artifact_receipt` stalls. Write the receipt as a whole-file merge — `node .ai.local/scripts/manifest.mjs upsert --slug <slug> --id <id> --producer <agent> --outcome <outcome> --attempt <attemptId> …` — and never patch the JSON with a fragment/replace edit: a foreign parallel write or a refreshed `updatedAt` breaks the match and aborts the receipt mid-task. If the merge or parse fails, re-read and merge again (at most twice), then report `blocked` with the error. <!-- shared-core: receipt-binding -->
|
|
@@ -81,7 +81,7 @@ When `metrics.json` exists, run the local aggregation script and report the coho
|
|
|
81
81
|
|
|
82
82
|
### Self-learning loop
|
|
83
83
|
|
|
84
|
-
In-task self-learning loop: run `node .ai.local/scripts/run.mjs` at the pre-receipt self-review when the engine exists; capture one wrong-turn with `node .ai.local/scripts/signals.mjs --append '<json>'` and inspect read-only with `node .ai.local/scripts/run.mjs --status`.
|
|
84
|
+
In-task self-learning loop: run `node .ai.local/scripts/run.mjs` at the pre-receipt self-review when the engine exists; capture one wrong-turn with `node .ai.local/scripts/signals.mjs --append '<json>'` and inspect read-only with `node .ai.local/scripts/run.mjs --status`. Every appended signal sets `finding_category` (`correctness` | `contract` | `perf` | `hygiene` | `process`).
|
|
85
85
|
|
|
86
86
|
Read `.ai.local/signals.jsonl` and `.ai.local/rule-changes.jsonl` before reconstructing themes; a second run
|
|
87
87
|
appends nothing (dedup).
|
|
@@ -219,6 +219,10 @@ const DEFAULT_ARTIFACT_OUTPUT_IDS = {
|
|
|
219
219
|
'integration-test-generator': 'integration-test-spec',
|
|
220
220
|
'integration-test-healer': 'integration-test-heal',
|
|
221
221
|
};
|
|
222
|
+
// Artifact status enum — mirrors the writer (`manifest.mjs`) and the schema
|
|
223
|
+
// table in agent-artifact-contracts.md. A receipt outcome is not a status.
|
|
224
|
+
const ARTIFACT_STATUSES = ['planned', 'in_progress', 'completed', 'blocked', 'superseded'];
|
|
225
|
+
const RECEIPT_OUTCOME_STATUS = { completed: 'completed', blocked: 'blocked', changes_requested: 'blocked', validation_failed: 'blocked' };
|
|
222
226
|
function artifactOutputIdFor(step, agent) {
|
|
223
227
|
if (step && typeof step.artifactOutputId === 'string') return step.artifactOutputId;
|
|
224
228
|
if (step?.artifactOutputIds && typeof step.artifactOutputIds[agent] === 'string') return step.artifactOutputIds[agent];
|
|
@@ -797,6 +801,11 @@ function readBoundReceiptOutcome(agent, step, resolved) {
|
|
|
797
801
|
process.stderr.write(`WARNING: ${manifestPath} receipt for producer "${agent}" id "${owned[0].id}" lacks entry.receipt.attemptId on a non-parallel step. The receipt is bound by output-id fallback; the agent should always include the attemptId the orchestrator provides. See agent-artifact-contracts.md (Receipt binding).` + '\n');
|
|
798
802
|
}
|
|
799
803
|
const outcome = owned[0]?.receipt?.outcome || null;
|
|
804
|
+
const bound = owned[0];
|
|
805
|
+
if (bound && typeof bound.status === 'string' && !ARTIFACT_STATUSES.includes(bound.status)) {
|
|
806
|
+
const expected = RECEIPT_OUTCOME_STATUS[bound.receipt.outcome] || 'blocked';
|
|
807
|
+
return { outcome: null, receiptRequired: true, stallMessage: `[chain-team-phases] ${slug}: receipt "${bound.id}" has artifact status "${bound.status}", which is not one of ${ARTIFACT_STATUSES.join(' | ')}. A receipt outcome is not a status — rewrite the entry with "node .ai.local/scripts/manifest.mjs upsert --slug ${slug} --id ${bound.id} --producer ${agent} --status ${expected} --outcome ${bound.receipt.outcome} --paths <artifact>.md", then resume with: /task-continue ${slug}` };
|
|
808
|
+
}
|
|
800
809
|
if (outcome === 'completed') {
|
|
801
810
|
const stallMessage = validateCompletedArtifact(owned[0]);
|
|
802
811
|
if (stallMessage) return { outcome: null, receiptRequired: true, stallMessage };
|
|
@@ -148,7 +148,7 @@ Replanning is a **named, auditable operation** — never a silent reorder. Trigg
|
|
|
148
148
|
|
|
149
149
|
## Context budget & checkpoint/resume
|
|
150
150
|
|
|
151
|
-
Work in bounded waves (one artifact class across the target surface). **Checkpoint** each completed wave to `.memlog.md` (`## <date>` + an `event:` line) and record the produced paths on the `implementation` manifest entry (`authoritativePaths`). That checkpoint is the hook `writeStatus` path: it rewrites `.ai.local/team/tasks/<slug>/focus.md`. `focus.md` is a view, not the system of record. It lists slug, pipeline step index, authoritative paths for incomplete manifest ids, the last `.memlog.md` `event:` line, the next gate, one decomposition ready-set line, and one archive index line, and it stays under 100 lines. `status.json`, `metrics.json`, `artifact-manifest.json`, and `.memlog.md` stay the system of record. A resumed run (`/task-continue`) reads `focus.md` first, then `artifact-manifest.json` and `.memlog.md`, and continues at the first stage whose exit criteria are unmet — never re-derive state from the chat. A completed manifest entry keeps id, status, and `authoritativePaths`, and the default resume read omits that entry's markdown body; closing it appends one new `.memlog.md` event: line, moves the bulky body to `.ai.local/team/tasks/<slug>/archive/YYYY-MM-DD/`, and leaves earlier memlog lines, the human-readable slug and artifact ids, and the manifest entry in place, with no Beads hash ids and no Taskmaster tags. Mechanical waves (generation, embed sync) are delegated to repo scripts. See **context-and-iteration** for the budget, checkpoint, resume, and refinement loop.
|
|
151
|
+
Work in bounded waves (one artifact class across the target surface). **Checkpoint** each completed wave to `.memlog.md` (`## <date>` + an `event:` line) and record the produced paths on the `implementation` manifest entry (`authoritativePaths`). That checkpoint is the hook `writeStatus` path: it rewrites `.ai.local/team/tasks/<slug>/focus.md`. `focus.md` is a view, not the system of record. It lists slug, pipeline step index, authoritative paths for incomplete manifest ids, the last `.memlog.md` `event:` line, the next gate, one decomposition ready-set line, and one archive index line, and it stays under 100 lines. `status.json`, `metrics.json`, `artifact-manifest.json`, and `.memlog.md` stay the system of record. A resumed run (`/task-continue`) reads `focus.md` first, then `artifact-manifest.json` and `.memlog.md`, and continues at the first stage whose exit criteria are unmet — never re-derive state from the chat. A completed manifest entry keeps id, status, and `authoritativePaths`, and the default resume read omits that entry's markdown body; closing it appends one new `.memlog.md` event: line, moves the bulky body to `.ai.local/team/tasks/<slug>/archive/YYYY-MM-DD/`, and leaves earlier memlog lines, the human-readable slug and artifact ids, and the manifest entry in place, with no Beads hash ids and no Taskmaster tags. Mechanical waves (generation, embed sync) are delegated to repo scripts. An **interrupted producer** (tool abort, killed session) is resumed, not restarted: run the stack's compile gate on the working tree first, and when it is red hand the failing output to the same producer with a `fix and finish` brief instead of starting a second parallel attempt. When the host runtime writes no `status.json` (manual-hook hosts such as OpenCode), the resume checkpoint is `artifact-manifest.json` + `.memlog.md`; never gate a resume on a file the runtime does not produce. See **context-and-iteration** for the budget, checkpoint, resume, and refinement loop.
|
|
152
152
|
|
|
153
153
|
## Self-review & context hygiene
|
|
154
154
|
|
|
@@ -60,6 +60,10 @@ Essentials below. Full procedural set (~17 rules) → load **`anti-sycophancy-di
|
|
|
60
60
|
- Urgency/authority: name the trade-off once, then comply — no apology loops.
|
|
61
61
|
- Match verification to risk; report by what was **verified**, not attempted.
|
|
62
62
|
|
|
63
|
+
## Questions to the user
|
|
64
|
+
|
|
65
|
+
**Interactive first.** A decision only the user can make goes through the host's interactive question tool (OpenCode `question`, Claude Code `AskUserQuestion`, a client dialog); prose is the fallback for a host without one. Load **`interactive-questions`** for the widget format and the free-form-answer rule.
|
|
66
|
+
|
|
63
67
|
Style enforcement (formatter / linter / post-change gate) lives in the **stack toolchain** — see each adapter’s **Stack notes**.
|
|
64
68
|
|
|
65
69
|
> Stack-specific lint gates, examples, and toolchain — in the preset adapter **Stack notes** section.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<!-- shared-core: quality/interactive-questions.md -->
|
|
2
|
+
|
|
3
|
+
# Interactive questions (requestable)
|
|
4
|
+
|
|
5
|
+
How to put a user-only decision to the user. Load when the answer blocks the work and the host offers an interactive question tool (OpenCode `question`, Claude Code `AskUserQuestion`, a client dialog). The always-on quality rule keeps the short preference; this file carries the full contract.
|
|
6
|
+
|
|
7
|
+
## When to ask
|
|
8
|
+
|
|
9
|
+
1. **Interactive first.** Ask through the host's interactive question tool and structure the question for that tool. Plain prose is the fallback for a host without one, a headless run, or an answer that cannot be enumerated.
|
|
10
|
+
2. **One decision per question.** Independent decisions go into separate entries so the host walks them as steps.
|
|
11
|
+
3. **Ask before the dependent work.** Never a screening question per option, and never a question the repository already answers.
|
|
12
|
+
|
|
13
|
+
## Widget format
|
|
14
|
+
|
|
15
|
+
4. **Header** → a short label (≤30 characters).
|
|
16
|
+
5. **Option label** → 1–5 words, in the user's terms.
|
|
17
|
+
6. **Option description** → the consequence or the trade-off, not a restatement of the label.
|
|
18
|
+
7. **Two to five options.** Put the option you recommend first and justify it in its description; do not pad the list with options you cannot defend.
|
|
19
|
+
8. **Multi-select** only when the choices are not mutually exclusive. The host's own free-form entry does not count toward the range.
|
|
20
|
+
|
|
21
|
+
## The free-form answer is mandatory, the option is not
|
|
22
|
+
|
|
23
|
+
9. OpenCode `question` and Claude Code `AskUserQuestion` append their own free-form entry for single and multi select. Never add an “other” option there: option values are labels, so a chosen “Other” returns that word, not the user’s text.
|
|
24
|
+
10. A host without that entry (a custom `dialog.select`, an MCP elicitation `enum`, a headless run) needs an explicit “Other” whose selection opens a text prompt — or prose when the answer cannot be enumerated.
|
|
25
|
+
|
|
26
|
+
## Fallback
|
|
27
|
+
|
|
28
|
+
11. **Prose.** With no question tool, ask in plain language with the same shape: the decision, the options, and the trade-off each option carries. One decision per message.
|
|
29
|
+
12. **Do not block.** When the answer is not needed for the next step, state the assumption, continue, and name what a different answer would change.
|
|
@@ -8,4 +8,6 @@ Full scenario (including the **“Agent work”** block for a slug from team tas
|
|
|
8
8
|
|
|
9
9
|
When a task has `metrics.json`, use the local aggregation script and state the cohort, sample size, incomplete artifacts, attribution confidence, active attempt duration, and human-gate wait separately. Do not score malformed artifacts or gate wait as agent work.
|
|
10
10
|
|
|
11
|
+
**Findings carry a category.** When a retro appends a signal it sets `finding_category` to one of `correctness` (wrong result, missed transition, bad math), `contract` (shape, route, param, enum drift), `perf` (budget, cost, unmeasured claim), `hygiene` (paths, dead code, artifacts), or `process` (sizing, ordering, gate choreography). Without the category, repeated `gate-changes-requested` rows cannot be turned into a rule: the signature only says that a gate rejected something. Gate-derived signals default to `process`; a retro that classifies a finding appends its own categorized row instead of rewriting the gate row.
|
|
12
|
+
|
|
11
13
|
Use this rule only if the command is unavailable. Do not duplicate the command contents in the response — follow the command file and skill `technical-retro`.
|
|
@@ -48,7 +48,7 @@ Severity: **high** (explicit correction / large waste) · **med** · **low**. Co
|
|
|
48
48
|
Read structured evidence before proposing changes: `.ai.local/signals.jsonl` (wrong-turn signals grouped by
|
|
49
49
|
`signature` — the machine-enforced Rule of Three: ≥2 distinct tasks → edit a local rule / `conventions.md` gotcha,
|
|
50
50
|
≥3 → new rule) and `.ai.local/rule-changes.jsonl` (applied and **staged** mutations with `before` snapshots).
|
|
51
|
-
Reconstruct issues from these ledgers, not free text.
|
|
51
|
+
Reconstruct issues from these ledgers, not free text. Every appended signal sets `finding_category` (`correctness` | `contract` | `perf` | `hygiene` | `process`) so the signature ledger can turn a repeated `gate-changes-requested` into a rule instead of only counting it.
|
|
52
52
|
|
|
53
53
|
If the same issue appeared in **2+** tasks (or **3+** for packaging a new rule/skill — Rule of Three), add section
|
|
54
54
|
**Preset updates**:
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"platform": "mavis",
|
|
4
4
|
"stack": "svelte",
|
|
5
5
|
"semanticSource": "cursor/svelte",
|
|
6
|
-
"sourceRevision": "
|
|
6
|
+
"sourceRevision": "6d1ebaedf4e24e632da82fafd599eb9dcb9dca3c96c30bc3eb6caaa759ea8096",
|
|
7
7
|
"entries": [
|
|
8
8
|
{
|
|
9
9
|
"source": "AGENTS.md",
|
|
@@ -494,6 +494,15 @@
|
|
|
494
494
|
"loadMode": "referenced",
|
|
495
495
|
"reason": "Requestable Cursor rule: referenced from entry files; not claimed as MiniMax auto-load"
|
|
496
496
|
},
|
|
497
|
+
{
|
|
498
|
+
"source": "rules/interactive-questions.mdc",
|
|
499
|
+
"target": "rules/interactive-questions.md",
|
|
500
|
+
"category": "rules",
|
|
501
|
+
"disposition": "transform",
|
|
502
|
+
"loadMode": "referenced",
|
|
503
|
+
"reason": "Requestable Cursor rule: referenced from entry files; not claimed as MiniMax auto-load",
|
|
504
|
+
"sharedCoreStem": "quality/interactive-questions.md"
|
|
505
|
+
},
|
|
497
506
|
{
|
|
498
507
|
"source": "rules/language-policy.mdc",
|
|
499
508
|
"target": "rules/language-policy.md",
|
|
@@ -89,7 +89,7 @@ Write the owned terminal receipt described under **Artifact contract**. If **FAI
|
|
|
89
89
|
|
|
90
90
|
Do not fix code — report only. Do not advance to code-reviewer until PASS.
|
|
91
91
|
|
|
92
|
-
**Receipt binding.** When writing the terminal receipt to `artifact-manifest.json`, set `entry.receipt.attemptId = <attemptId supplied by the orchestrator>` (the orchestrator provides this via `attemptId` on invocation). The hook at `chain-team-phases.sh:readBoundReceiptOutcome` rejects entries whose `attemptId` does not match the current attempt, or whose `Date.parse(timestamps.completedAt) < Date.parse(attemptStartedAt)`.
|
|
92
|
+
**Receipt binding.** When writing the terminal receipt to `artifact-manifest.json`, set `entry.receipt.attemptId = <attemptId supplied by the orchestrator>` (the orchestrator provides this via `attemptId` on invocation). The hook at `chain-team-phases.sh:readBoundReceiptOutcome` rejects entries whose `attemptId` does not match the current attempt, or whose `Date.parse(timestamps.completedAt) < Date.parse(attemptStartedAt)`. A missing or stale attemptId causes `awaiting_artifact_receipt` stalls. Write the receipt as a whole-file merge — `node .ai.local/scripts/manifest.mjs upsert --slug <slug> --id <id> --producer <agent> --outcome <outcome> --attempt <attemptId> …` — and never patch the JSON with a fragment/replace edit: a foreign parallel write or a refreshed `updatedAt` breaks the match and aborts the receipt mid-task. If the merge or parse fails, re-read and merge again (at most twice), then report `blocked` with the error. <!-- shared-core: receipt-binding -->
|
|
93
93
|
|
|
94
94
|
## Artifact contract
|
|
95
95
|
|
|
@@ -88,7 +88,7 @@ Write the owned terminal receipt described under **Artifact contract**. If **REQ
|
|
|
88
88
|
|
|
89
89
|
Do not mix this output with retrospective facilitation — keep review and retro separate.
|
|
90
90
|
|
|
91
|
-
**Receipt binding.** When writing the terminal receipt to `artifact-manifest.json`, set `entry.receipt.attemptId = <attemptId supplied by the orchestrator>` (the orchestrator provides this via `attemptId` on invocation). The hook at `chain-team-phases.sh:readBoundReceiptOutcome` rejects entries whose `attemptId` does not match the current attempt, or whose `Date.parse(timestamps.completedAt) < Date.parse(attemptStartedAt)`.
|
|
91
|
+
**Receipt binding.** When writing the terminal receipt to `artifact-manifest.json`, set `entry.receipt.attemptId = <attemptId supplied by the orchestrator>` (the orchestrator provides this via `attemptId` on invocation). The hook at `chain-team-phases.sh:readBoundReceiptOutcome` rejects entries whose `attemptId` does not match the current attempt, or whose `Date.parse(timestamps.completedAt) < Date.parse(attemptStartedAt)`. A missing or stale attemptId causes `awaiting_artifact_receipt` stalls. Write the receipt as a whole-file merge — `node .ai.local/scripts/manifest.mjs upsert --slug <slug> --id <id> --producer <agent> --outcome <outcome> --attempt <attemptId> …` — and never patch the JSON with a fragment/replace edit: a foreign parallel write or a refreshed `updatedAt` breaks the match and aborts the receipt mid-task. If the merge or parse fails, re-read and merge again (at most twice), then report `blocked` with the error. <!-- shared-core: receipt-binding -->
|
|
92
92
|
|
|
93
93
|
## Design guidance
|
|
94
94
|
|
|
@@ -132,4 +132,4 @@ Do not perform formal code review or write e2e plans — those are separate agen
|
|
|
132
132
|
|
|
133
133
|
## Receipt binding
|
|
134
134
|
|
|
135
|
-
> **Receipt binding.** When writing the terminal receipt to `artifact-manifest.json`, set `entry.receipt.attemptId = <attemptId supplied by the orchestrator>` (the orchestrator provides this via `attemptId` on invocation). The hook at `chain-team-phases.sh:readBoundReceiptOutcome` rejects entries whose `attemptId` does not match the current attempt, or whose `Date.parse(timestamps.completedAt) < Date.parse(attemptStartedAt)`.
|
|
135
|
+
> **Receipt binding.** When writing the terminal receipt to `artifact-manifest.json`, set `entry.receipt.attemptId = <attemptId supplied by the orchestrator>` (the orchestrator provides this via `attemptId` on invocation). The hook at `chain-team-phases.sh:readBoundReceiptOutcome` rejects entries whose `attemptId` does not match the current attempt, or whose `Date.parse(timestamps.completedAt) < Date.parse(attemptStartedAt)`. A missing or stale attemptId causes `awaiting_artifact_receipt` stalls. Write the receipt as a whole-file merge — `node .ai.local/scripts/manifest.mjs upsert --slug <slug> --id <id> --producer <agent> --outcome <outcome> --attempt <attemptId> …` — and never patch the JSON with a fragment/replace edit: a foreign parallel write or a refreshed `updatedAt` breaks the match and aborts the receipt mid-task. If the merge or parse fails, re-read and merge again (at most twice), then report `blocked` with the error. <!-- shared-core: receipt-binding -->
|
|
@@ -75,7 +75,7 @@ Emit the owned implementation receipt with outcome `completed`. Handoff: tasks d
|
|
|
75
75
|
|
|
76
76
|
Do not perform formal code review — that is the code-reviewer subagent's job.
|
|
77
77
|
|
|
78
|
-
**Receipt binding.** When writing the terminal receipt to `artifact-manifest.json`, set `entry.receipt.attemptId = <attemptId supplied by the orchestrator>` (the orchestrator provides this via `attemptId` on invocation). The hook at `chain-team-phases.sh:readBoundReceiptOutcome` rejects entries whose `attemptId` does not match the current attempt, or whose `Date.parse(timestamps.completedAt) < Date.parse(attemptStartedAt)`.
|
|
78
|
+
**Receipt binding.** When writing the terminal receipt to `artifact-manifest.json`, set `entry.receipt.attemptId = <attemptId supplied by the orchestrator>` (the orchestrator provides this via `attemptId` on invocation). The hook at `chain-team-phases.sh:readBoundReceiptOutcome` rejects entries whose `attemptId` does not match the current attempt, or whose `Date.parse(timestamps.completedAt) < Date.parse(attemptStartedAt)`. A missing or stale attemptId causes `awaiting_artifact_receipt` stalls. Write the receipt as a whole-file merge — `node .ai.local/scripts/manifest.mjs upsert --slug <slug> --id <id> --producer <agent> --outcome <outcome> --attempt <attemptId> …` — and never patch the JSON with a fragment/replace edit: a foreign parallel write or a refreshed `updatedAt` breaks the match and aborts the receipt mid-task. If the merge or parse fails, re-read and merge again (at most twice), then report `blocked` with the error. <!-- shared-core: receipt-binding -->
|
|
79
79
|
|
|
80
80
|
## Design guidance
|
|
81
81
|
|
|
@@ -77,4 +77,4 @@ Provide summary:
|
|
|
77
77
|
|
|
78
78
|
## Receipt binding
|
|
79
79
|
|
|
80
|
-
> **Receipt binding.** When writing the terminal receipt to `artifact-manifest.json`, set `entry.receipt.attemptId = <attemptId supplied by the orchestrator>` (the orchestrator provides this via `attemptId` on invocation). The hook at `chain-team-phases.sh:readBoundReceiptOutcome` rejects entries whose `attemptId` does not match the current attempt, or whose `Date.parse(timestamps.completedAt) < Date.parse(attemptStartedAt)`.
|
|
80
|
+
> **Receipt binding.** When writing the terminal receipt to `artifact-manifest.json`, set `entry.receipt.attemptId = <attemptId supplied by the orchestrator>` (the orchestrator provides this via `attemptId` on invocation). The hook at `chain-team-phases.sh:readBoundReceiptOutcome` rejects entries whose `attemptId` does not match the current attempt, or whose `Date.parse(timestamps.completedAt) < Date.parse(attemptStartedAt)`. A missing or stale attemptId causes `awaiting_artifact_receipt` stalls. Write the receipt as a whole-file merge — `node .ai.local/scripts/manifest.mjs upsert --slug <slug> --id <id> --producer <agent> --outcome <outcome> --attempt <attemptId> …` — and never patch the JSON with a fragment/replace edit: a foreign parallel write or a refreshed `updatedAt` breaks the match and aborts the receipt mid-task. If the merge or parse fails, re-read and merge again (at most twice), then report `blocked` with the error. <!-- shared-core: receipt-binding -->
|
|
@@ -81,7 +81,7 @@ When `metrics.json` exists, run the local aggregation script and report the coho
|
|
|
81
81
|
|
|
82
82
|
### Self-learning loop
|
|
83
83
|
|
|
84
|
-
In-task self-learning loop: run `node .ai.local/scripts/run.mjs` at the pre-receipt self-review when the engine exists; capture one wrong-turn with `node .ai.local/scripts/signals.mjs --append '<json>'` and inspect read-only with `node .ai.local/scripts/run.mjs --status`.
|
|
84
|
+
In-task self-learning loop: run `node .ai.local/scripts/run.mjs` at the pre-receipt self-review when the engine exists; capture one wrong-turn with `node .ai.local/scripts/signals.mjs --append '<json>'` and inspect read-only with `node .ai.local/scripts/run.mjs --status`. Every appended signal sets `finding_category` (`correctness` | `contract` | `perf` | `hygiene` | `process`).
|
|
85
85
|
|
|
86
86
|
Read `.ai.local/signals.jsonl` and `.ai.local/rule-changes.jsonl` before reconstructing themes; a second run
|
|
87
87
|
appends nothing (dedup).
|
|
@@ -219,6 +219,10 @@ const DEFAULT_ARTIFACT_OUTPUT_IDS = {
|
|
|
219
219
|
'playwright-test-generator': 'e2e-spec',
|
|
220
220
|
'playwright-test-healer': 'e2e-heal',
|
|
221
221
|
};
|
|
222
|
+
// Artifact status enum — mirrors the writer (`manifest.mjs`) and the schema
|
|
223
|
+
// table in agent-artifact-contracts.md. A receipt outcome is not a status.
|
|
224
|
+
const ARTIFACT_STATUSES = ['planned', 'in_progress', 'completed', 'blocked', 'superseded'];
|
|
225
|
+
const RECEIPT_OUTCOME_STATUS = { completed: 'completed', blocked: 'blocked', changes_requested: 'blocked', validation_failed: 'blocked' };
|
|
222
226
|
function artifactOutputIdFor(step, agent) {
|
|
223
227
|
if (step && typeof step.artifactOutputId === 'string') return step.artifactOutputId;
|
|
224
228
|
if (step?.artifactOutputIds && typeof step.artifactOutputIds[agent] === 'string') return step.artifactOutputIds[agent];
|
|
@@ -797,6 +801,11 @@ function readBoundReceiptOutcome(agent, step, resolved) {
|
|
|
797
801
|
process.stderr.write(`WARNING: ${manifestPath} receipt for producer "${agent}" id "${owned[0].id}" lacks entry.receipt.attemptId on a non-parallel step. The receipt is bound by output-id fallback; the agent should always include the attemptId the orchestrator provides. See agent-artifact-contracts.md (Receipt binding).` + '\n');
|
|
798
802
|
}
|
|
799
803
|
const outcome = owned[0]?.receipt?.outcome || null;
|
|
804
|
+
const bound = owned[0];
|
|
805
|
+
if (bound && typeof bound.status === 'string' && !ARTIFACT_STATUSES.includes(bound.status)) {
|
|
806
|
+
const expected = RECEIPT_OUTCOME_STATUS[bound.receipt.outcome] || 'blocked';
|
|
807
|
+
return { outcome: null, receiptRequired: true, stallMessage: `[chain-team-phases] ${slug}: receipt "${bound.id}" has artifact status "${bound.status}", which is not one of ${ARTIFACT_STATUSES.join(' | ')}. A receipt outcome is not a status — rewrite the entry with "node .ai.local/scripts/manifest.mjs upsert --slug ${slug} --id ${bound.id} --producer ${agent} --status ${expected} --outcome ${bound.receipt.outcome} --paths <artifact>.md", then resume with: /task-continue ${slug}` };
|
|
808
|
+
}
|
|
800
809
|
if (outcome === 'completed') {
|
|
801
810
|
const stallMessage = validateCompletedArtifact(owned[0]);
|
|
802
811
|
if (stallMessage) return { outcome: null, receiptRequired: true, stallMessage };
|
|
@@ -148,7 +148,7 @@ Replanning is a **named, auditable operation** — never a silent reorder. Trigg
|
|
|
148
148
|
|
|
149
149
|
## Context budget & checkpoint/resume
|
|
150
150
|
|
|
151
|
-
Work in bounded waves (one artifact class across the target surface). **Checkpoint** each completed wave to `.memlog.md` (`## <date>` + an `event:` line) and record the produced paths on the `implementation` manifest entry (`authoritativePaths`). That checkpoint is the hook `writeStatus` path: it rewrites `.ai.local/team/tasks/<slug>/focus.md`. `focus.md` is a view, not the system of record. It lists slug, pipeline step index, authoritative paths for incomplete manifest ids, the last `.memlog.md` `event:` line, the next gate, one decomposition ready-set line, and one archive index line, and it stays under 100 lines. `status.json`, `metrics.json`, `artifact-manifest.json`, and `.memlog.md` stay the system of record. A resumed run (`/task-continue`) reads `focus.md` first, then `artifact-manifest.json` and `.memlog.md`, and continues at the first stage whose exit criteria are unmet — never re-derive state from the chat. A completed manifest entry keeps id, status, and `authoritativePaths`, and the default resume read omits that entry's markdown body; closing it appends one new `.memlog.md` event: line, moves the bulky body to `.ai.local/team/tasks/<slug>/archive/YYYY-MM-DD/`, and leaves earlier memlog lines, the human-readable slug and artifact ids, and the manifest entry in place, with no Beads hash ids and no Taskmaster tags. Mechanical waves (generation, embed sync) are delegated to repo scripts. See **context-and-iteration** for the budget, checkpoint, resume, and refinement loop.
|
|
151
|
+
Work in bounded waves (one artifact class across the target surface). **Checkpoint** each completed wave to `.memlog.md` (`## <date>` + an `event:` line) and record the produced paths on the `implementation` manifest entry (`authoritativePaths`). That checkpoint is the hook `writeStatus` path: it rewrites `.ai.local/team/tasks/<slug>/focus.md`. `focus.md` is a view, not the system of record. It lists slug, pipeline step index, authoritative paths for incomplete manifest ids, the last `.memlog.md` `event:` line, the next gate, one decomposition ready-set line, and one archive index line, and it stays under 100 lines. `status.json`, `metrics.json`, `artifact-manifest.json`, and `.memlog.md` stay the system of record. A resumed run (`/task-continue`) reads `focus.md` first, then `artifact-manifest.json` and `.memlog.md`, and continues at the first stage whose exit criteria are unmet — never re-derive state from the chat. A completed manifest entry keeps id, status, and `authoritativePaths`, and the default resume read omits that entry's markdown body; closing it appends one new `.memlog.md` event: line, moves the bulky body to `.ai.local/team/tasks/<slug>/archive/YYYY-MM-DD/`, and leaves earlier memlog lines, the human-readable slug and artifact ids, and the manifest entry in place, with no Beads hash ids and no Taskmaster tags. Mechanical waves (generation, embed sync) are delegated to repo scripts. An **interrupted producer** (tool abort, killed session) is resumed, not restarted: run the stack's compile gate on the working tree first, and when it is red hand the failing output to the same producer with a `fix and finish` brief instead of starting a second parallel attempt. When the host runtime writes no `status.json` (manual-hook hosts such as OpenCode), the resume checkpoint is `artifact-manifest.json` + `.memlog.md`; never gate a resume on a file the runtime does not produce. See **context-and-iteration** for the budget, checkpoint, resume, and refinement loop.
|
|
152
152
|
|
|
153
153
|
## Self-review & context hygiene
|
|
154
154
|
|
|
@@ -60,6 +60,10 @@ Essentials below. Full procedural set (~17 rules) → load **`anti-sycophancy-di
|
|
|
60
60
|
- Urgency/authority: name the trade-off once, then comply — no apology loops.
|
|
61
61
|
- Match verification to risk; report by what was **verified**, not attempted.
|
|
62
62
|
|
|
63
|
+
## Questions to the user
|
|
64
|
+
|
|
65
|
+
**Interactive first.** A decision only the user can make goes through the host's interactive question tool (OpenCode `question`, Claude Code `AskUserQuestion`, a client dialog); prose is the fallback for a host without one. Load **`interactive-questions`** for the widget format and the free-form-answer rule.
|
|
66
|
+
|
|
63
67
|
Style enforcement (formatter / linter / post-change gate) lives in the **stack toolchain** — see each adapter’s **Stack notes**.
|
|
64
68
|
|
|
65
69
|
> Stack-specific lint gates, examples, and toolchain — in the preset adapter **Stack notes** section.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<!-- shared-core: quality/interactive-questions.md -->
|
|
2
|
+
|
|
3
|
+
# Interactive questions (requestable)
|
|
4
|
+
|
|
5
|
+
How to put a user-only decision to the user. Load when the answer blocks the work and the host offers an interactive question tool (OpenCode `question`, Claude Code `AskUserQuestion`, a client dialog). The always-on quality rule keeps the short preference; this file carries the full contract.
|
|
6
|
+
|
|
7
|
+
## When to ask
|
|
8
|
+
|
|
9
|
+
1. **Interactive first.** Ask through the host's interactive question tool and structure the question for that tool. Plain prose is the fallback for a host without one, a headless run, or an answer that cannot be enumerated.
|
|
10
|
+
2. **One decision per question.** Independent decisions go into separate entries so the host walks them as steps.
|
|
11
|
+
3. **Ask before the dependent work.** Never a screening question per option, and never a question the repository already answers.
|
|
12
|
+
|
|
13
|
+
## Widget format
|
|
14
|
+
|
|
15
|
+
4. **Header** → a short label (≤30 characters).
|
|
16
|
+
5. **Option label** → 1–5 words, in the user's terms.
|
|
17
|
+
6. **Option description** → the consequence or the trade-off, not a restatement of the label.
|
|
18
|
+
7. **Two to five options.** Put the option you recommend first and justify it in its description; do not pad the list with options you cannot defend.
|
|
19
|
+
8. **Multi-select** only when the choices are not mutually exclusive. The host's own free-form entry does not count toward the range.
|
|
20
|
+
|
|
21
|
+
## The free-form answer is mandatory, the option is not
|
|
22
|
+
|
|
23
|
+
9. OpenCode `question` and Claude Code `AskUserQuestion` append their own free-form entry for single and multi select. Never add an “other” option there: option values are labels, so a chosen “Other” returns that word, not the user’s text.
|
|
24
|
+
10. A host without that entry (a custom `dialog.select`, an MCP elicitation `enum`, a headless run) needs an explicit “Other” whose selection opens a text prompt — or prose when the answer cannot be enumerated.
|
|
25
|
+
|
|
26
|
+
## Fallback
|
|
27
|
+
|
|
28
|
+
11. **Prose.** With no question tool, ask in plain language with the same shape: the decision, the options, and the trade-off each option carries. One decision per message.
|
|
29
|
+
12. **Do not block.** When the answer is not needed for the next step, state the assumption, continue, and name what a different answer would change.
|
|
@@ -8,4 +8,6 @@ Full scenario (including the **“Agent work”** block for a slug from team tas
|
|
|
8
8
|
|
|
9
9
|
When a task has `metrics.json`, use the local aggregation script and state the cohort, sample size, incomplete artifacts, attribution confidence, active attempt duration, and human-gate wait separately. Do not score malformed artifacts or gate wait as agent work.
|
|
10
10
|
|
|
11
|
+
**Findings carry a category.** When a retro appends a signal it sets `finding_category` to one of `correctness` (wrong result, missed transition, bad math), `contract` (shape, route, param, enum drift), `perf` (budget, cost, unmeasured claim), `hygiene` (paths, dead code, artifacts), or `process` (sizing, ordering, gate choreography). Without the category, repeated `gate-changes-requested` rows cannot be turned into a rule: the signature only says that a gate rejected something. Gate-derived signals default to `process`; a retro that classifies a finding appends its own categorized row instead of rewriting the gate row.
|
|
12
|
+
|
|
11
13
|
Use this rule only if the command is unavailable. Do not duplicate the command contents in the response — follow the command file and skill `technical-retro`.
|
|
@@ -48,7 +48,7 @@ Severity: **high** (explicit correction / large waste) · **med** · **low**. Co
|
|
|
48
48
|
Read structured evidence before proposing changes: `.ai.local/signals.jsonl` (wrong-turn signals grouped by
|
|
49
49
|
`signature` — the machine-enforced Rule of Three: ≥2 distinct tasks → edit a local rule / `conventions.md` gotcha,
|
|
50
50
|
≥3 → new rule) and `.ai.local/rule-changes.jsonl` (applied and **staged** mutations with `before` snapshots).
|
|
51
|
-
Reconstruct issues from these ledgers, not free text.
|
|
51
|
+
Reconstruct issues from these ledgers, not free text. Every appended signal sets `finding_category` (`correctness` | `contract` | `perf` | `hygiene` | `process`) so the signature ledger can turn a repeated `gate-changes-requested` into a rule instead of only counting it.
|
|
52
52
|
|
|
53
53
|
If the same issue appeared in **2+** tasks (or **3+** for packaging a new rule/skill — Rule of Three), add section
|
|
54
54
|
**Preset updates**:
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"platform": "opencode",
|
|
4
4
|
"stack": "android-kotlin",
|
|
5
5
|
"semanticSource": "cursor/android-kotlin",
|
|
6
|
-
"sourceRevision": "
|
|
6
|
+
"sourceRevision": "24a04dd1c3cfa3f733031ad57f9955c7da91140e4f8b2a7eec967ddfd2591af9",
|
|
7
7
|
"entries": [
|
|
8
8
|
{
|
|
9
9
|
"source": "AGENTS.md",
|
|
@@ -494,6 +494,15 @@
|
|
|
494
494
|
"loadMode": "referenced",
|
|
495
495
|
"reason": "Requestable Cursor rule: lazy Read from .opencode/rules; not auto-loaded"
|
|
496
496
|
},
|
|
497
|
+
{
|
|
498
|
+
"source": "rules/interactive-questions.mdc",
|
|
499
|
+
"target": "rules/interactive-questions.md",
|
|
500
|
+
"category": "rules",
|
|
501
|
+
"disposition": "transform",
|
|
502
|
+
"loadMode": "referenced",
|
|
503
|
+
"reason": "Requestable Cursor rule: lazy Read from .opencode/rules; not auto-loaded",
|
|
504
|
+
"sharedCoreStem": "quality/interactive-questions.md"
|
|
505
|
+
},
|
|
497
506
|
{
|
|
498
507
|
"source": "rules/kotlin-anti-hallucination.mdc",
|
|
499
508
|
"target": "rules/kotlin-anti-hallucination.md",
|
|
@@ -81,7 +81,7 @@ Write `.ai.local/team/tasks/<slug>/validation-report.md` with verdict, commands,
|
|
|
81
81
|
|
|
82
82
|
Write the owned validation receipt (`completed` or `validation_failed`). Do not fix code — report only.
|
|
83
83
|
|
|
84
|
-
**Receipt binding.** When writing the terminal receipt to `artifact-manifest.json`, set `entry.receipt.attemptId = <attemptId supplied by the orchestrator>` (the orchestrator provides this via `attemptId` on invocation). The hook at `chain-team-phases.sh:readBoundReceiptOutcome` rejects entries whose `attemptId` does not match the current attempt, or whose `Date.parse(timestamps.completedAt) < Date.parse(attemptStartedAt)`.
|
|
84
|
+
**Receipt binding.** When writing the terminal receipt to `artifact-manifest.json`, set `entry.receipt.attemptId = <attemptId supplied by the orchestrator>` (the orchestrator provides this via `attemptId` on invocation). The hook at `chain-team-phases.sh:readBoundReceiptOutcome` rejects entries whose `attemptId` does not match the current attempt, or whose `Date.parse(timestamps.completedAt) < Date.parse(attemptStartedAt)`. A missing or stale attemptId causes `awaiting_artifact_receipt` stalls. Write the receipt as a whole-file merge — `node .ai.local/scripts/manifest.mjs upsert --slug <slug> --id <id> --producer <agent> --outcome <outcome> --attempt <attemptId> …` — and never patch the JSON with a fragment/replace edit: a foreign parallel write or a refreshed `updatedAt` breaks the match and aborts the receipt mid-task. If the merge or parse fails, re-read and merge again (at most twice), then report `blocked` with the error. <!-- shared-core: receipt-binding -->
|
|
85
85
|
|
|
86
86
|
## Artifact contract
|
|
87
87
|
|
|
@@ -109,7 +109,7 @@ Write the owned terminal receipt described under **Artifact contract**. If **REQ
|
|
|
109
109
|
|
|
110
110
|
Do not mix this output with retrospective facilitation — keep review and retro separate.
|
|
111
111
|
|
|
112
|
-
**Receipt binding.** When writing the terminal receipt to `artifact-manifest.json`, set `entry.receipt.attemptId = <attemptId supplied by the orchestrator>` (the orchestrator provides this via `attemptId` on invocation). The hook at `chain-team-phases.sh:readBoundReceiptOutcome` rejects entries whose `attemptId` does not match the current attempt, or whose `Date.parse(timestamps.completedAt) < Date.parse(attemptStartedAt)`.
|
|
112
|
+
**Receipt binding.** When writing the terminal receipt to `artifact-manifest.json`, set `entry.receipt.attemptId = <attemptId supplied by the orchestrator>` (the orchestrator provides this via `attemptId` on invocation). The hook at `chain-team-phases.sh:readBoundReceiptOutcome` rejects entries whose `attemptId` does not match the current attempt, or whose `Date.parse(timestamps.completedAt) < Date.parse(attemptStartedAt)`. A missing or stale attemptId causes `awaiting_artifact_receipt` stalls. Write the receipt as a whole-file merge — `node .ai.local/scripts/manifest.mjs upsert --slug <slug> --id <id> --producer <agent> --outcome <outcome> --attempt <attemptId> …` — and never patch the JSON with a fragment/replace edit: a foreign parallel write or a refreshed `updatedAt` breaks the match and aborts the receipt mid-task. If the merge or parse fails, re-read and merge again (at most twice), then report `blocked` with the error. <!-- shared-core: receipt-binding -->
|
|
113
113
|
|
|
114
114
|
## Design guidance
|
|
115
115
|
|
|
@@ -91,7 +91,7 @@ fixApplied: false
|
|
|
91
91
|
|
|
92
92
|
Write the owned terminal receipt described under **Artifact contract**.
|
|
93
93
|
|
|
94
|
-
**Receipt binding.** When writing the terminal receipt to `artifact-manifest.json`, set `entry.receipt.attemptId = <attemptId supplied by the orchestrator>` (the orchestrator provides this via `attemptId` on invocation). The hook at `chain-team-phases.sh:readBoundReceiptOutcome` rejects entries whose `attemptId` does not match the current attempt, or whose `Date.parse(timestamps.completedAt) < Date.parse(attemptStartedAt)`.
|
|
94
|
+
**Receipt binding.** When writing the terminal receipt to `artifact-manifest.json`, set `entry.receipt.attemptId = <attemptId supplied by the orchestrator>` (the orchestrator provides this via `attemptId` on invocation). The hook at `chain-team-phases.sh:readBoundReceiptOutcome` rejects entries whose `attemptId` does not match the current attempt, or whose `Date.parse(timestamps.completedAt) < Date.parse(attemptStartedAt)`. A missing or stale attemptId causes `awaiting_artifact_receipt` stalls. Write the receipt as a whole-file merge — `node .ai.local/scripts/manifest.mjs upsert --slug <slug> --id <id> --producer <agent> --outcome <outcome> --attempt <attemptId> …` — and never patch the JSON with a fragment/replace edit: a foreign parallel write or a refreshed `updatedAt` breaks the match and aborts the receipt mid-task. If the merge or parse fails, re-read and merge again (at most twice), then report `blocked` with the error. <!-- shared-core: receipt-binding -->
|
|
95
95
|
|
|
96
96
|
## 3-fix architecture gate
|
|
97
97
|
|
|
@@ -82,7 +82,7 @@ When copying from `next` into `android-kotlin` (or another stack):
|
|
|
82
82
|
|
|
83
83
|
Emit the owned implementation receipt with outcome `completed`. Handoff by layer + gaps for verifier/reviewer. No formal code review.
|
|
84
84
|
|
|
85
|
-
**Receipt binding.** When writing the terminal receipt to `artifact-manifest.json`, set `entry.receipt.attemptId = <attemptId supplied by the orchestrator>` (the orchestrator provides this via `attemptId` on invocation). The hook at `chain-team-phases.sh:readBoundReceiptOutcome` rejects entries whose `attemptId` does not match the current attempt, or whose `Date.parse(timestamps.completedAt) < Date.parse(attemptStartedAt)`.
|
|
85
|
+
**Receipt binding.** When writing the terminal receipt to `artifact-manifest.json`, set `entry.receipt.attemptId = <attemptId supplied by the orchestrator>` (the orchestrator provides this via `attemptId` on invocation). The hook at `chain-team-phases.sh:readBoundReceiptOutcome` rejects entries whose `attemptId` does not match the current attempt, or whose `Date.parse(timestamps.completedAt) < Date.parse(attemptStartedAt)`. A missing or stale attemptId causes `awaiting_artifact_receipt` stalls. Write the receipt as a whole-file merge — `node .ai.local/scripts/manifest.mjs upsert --slug <slug> --id <id> --producer <agent> --outcome <outcome> --attempt <attemptId> …` — and never patch the JSON with a fragment/replace edit: a foreign parallel write or a refreshed `updatedAt` breaks the match and aborts the receipt mid-task. If the merge or parse fails, re-read and merge again (at most twice), then report `blocked` with the error. <!-- shared-core: receipt-binding -->
|
|
86
86
|
|
|
87
87
|
## Design guidance
|
|
88
88
|
|
|
@@ -73,7 +73,7 @@ When the task is mostly UI e2e, prefer `instrumentation-test-planner`, `instrume
|
|
|
73
73
|
|
|
74
74
|
Write the owned terminal receipt described under **Artifact contract**.
|
|
75
75
|
|
|
76
|
-
**Receipt binding.** When writing the terminal receipt to `artifact-manifest.json`, set `entry.receipt.attemptId = <attemptId supplied by the orchestrator>` (the orchestrator provides this via `attemptId` on invocation). The hook at `chain-team-phases.sh:readBoundReceiptOutcome` rejects entries whose `attemptId` does not match the current attempt, or whose `Date.parse(timestamps.completedAt) < Date.parse(attemptStartedAt)`.
|
|
76
|
+
**Receipt binding.** When writing the terminal receipt to `artifact-manifest.json`, set `entry.receipt.attemptId = <attemptId supplied by the orchestrator>` (the orchestrator provides this via `attemptId` on invocation). The hook at `chain-team-phases.sh:readBoundReceiptOutcome` rejects entries whose `attemptId` does not match the current attempt, or whose `Date.parse(timestamps.completedAt) < Date.parse(attemptStartedAt)`. A missing or stale attemptId causes `awaiting_artifact_receipt` stalls. Write the receipt as a whole-file merge — `node .ai.local/scripts/manifest.mjs upsert --slug <slug> --id <id> --producer <agent> --outcome <outcome> --attempt <attemptId> …` — and never patch the JSON with a fragment/replace edit: a foreign parallel write or a refreshed `updatedAt` breaks the match and aborts the receipt mid-task. If the merge or parse fails, re-read and merge again (at most twice), then report `blocked` with the error. <!-- shared-core: receipt-binding -->
|
|
77
77
|
|
|
78
78
|
## Artifact contract
|
|
79
79
|
|
|
@@ -89,7 +89,7 @@ When `metrics.json` exists, run the local aggregation script and report the coho
|
|
|
89
89
|
|
|
90
90
|
### Self-learning loop
|
|
91
91
|
|
|
92
|
-
In-task self-learning loop: run `node .ai.local/scripts/run.mjs` at the pre-receipt self-review when the engine exists; capture one wrong-turn with `node .ai.local/scripts/signals.mjs --append '<json>'` and inspect read-only with `node .ai.local/scripts/run.mjs --status`.
|
|
92
|
+
In-task self-learning loop: run `node .ai.local/scripts/run.mjs` at the pre-receipt self-review when the engine exists; capture one wrong-turn with `node .ai.local/scripts/signals.mjs --append '<json>'` and inspect read-only with `node .ai.local/scripts/run.mjs --status`. Every appended signal sets `finding_category` (`correctness` | `contract` | `perf` | `hygiene` | `process`).
|
|
93
93
|
|
|
94
94
|
Read `.ai.local/signals.jsonl` and `.ai.local/rule-changes.jsonl` before reconstructing themes; a second run
|
|
95
95
|
appends nothing (dedup).
|
|
@@ -219,6 +219,10 @@ const DEFAULT_ARTIFACT_OUTPUT_IDS = {
|
|
|
219
219
|
'instrumentation-test-generator': 'instr-test-spec',
|
|
220
220
|
'instrumentation-test-healer': 'instr-test-heal',
|
|
221
221
|
};
|
|
222
|
+
// Artifact status enum — mirrors the writer (`manifest.mjs`) and the schema
|
|
223
|
+
// table in agent-artifact-contracts.md. A receipt outcome is not a status.
|
|
224
|
+
const ARTIFACT_STATUSES = ['planned', 'in_progress', 'completed', 'blocked', 'superseded'];
|
|
225
|
+
const RECEIPT_OUTCOME_STATUS = { completed: 'completed', blocked: 'blocked', changes_requested: 'blocked', validation_failed: 'blocked' };
|
|
222
226
|
function artifactOutputIdFor(step, agent) {
|
|
223
227
|
if (step && typeof step.artifactOutputId === 'string') return step.artifactOutputId;
|
|
224
228
|
if (step?.artifactOutputIds && typeof step.artifactOutputIds[agent] === 'string') return step.artifactOutputIds[agent];
|
|
@@ -797,6 +801,11 @@ function readBoundReceiptOutcome(agent, step, resolved) {
|
|
|
797
801
|
process.stderr.write(`WARNING: ${manifestPath} receipt for producer "${agent}" id "${owned[0].id}" lacks entry.receipt.attemptId on a non-parallel step. The receipt is bound by output-id fallback; the agent should always include the attemptId the orchestrator provides. See agent-artifact-contracts.md (Receipt binding).` + '\n');
|
|
798
802
|
}
|
|
799
803
|
const outcome = owned[0]?.receipt?.outcome || null;
|
|
804
|
+
const bound = owned[0];
|
|
805
|
+
if (bound && typeof bound.status === 'string' && !ARTIFACT_STATUSES.includes(bound.status)) {
|
|
806
|
+
const expected = RECEIPT_OUTCOME_STATUS[bound.receipt.outcome] || 'blocked';
|
|
807
|
+
return { outcome: null, receiptRequired: true, stallMessage: `[chain-team-phases] ${slug}: receipt "${bound.id}" has artifact status "${bound.status}", which is not one of ${ARTIFACT_STATUSES.join(' | ')}. A receipt outcome is not a status — rewrite the entry with "node .ai.local/scripts/manifest.mjs upsert --slug ${slug} --id ${bound.id} --producer ${agent} --status ${expected} --outcome ${bound.receipt.outcome} --paths <artifact>.md", then resume with: /task-continue ${slug}` };
|
|
808
|
+
}
|
|
800
809
|
if (outcome === 'completed') {
|
|
801
810
|
const stallMessage = validateCompletedArtifact(owned[0]);
|
|
802
811
|
if (stallMessage) return { outcome: null, receiptRequired: true, stallMessage };
|
|
@@ -148,7 +148,7 @@ Replanning is a **named, auditable operation** — never a silent reorder. Trigg
|
|
|
148
148
|
|
|
149
149
|
## Context budget & checkpoint/resume
|
|
150
150
|
|
|
151
|
-
Work in bounded waves (one artifact class across the target surface). **Checkpoint** each completed wave to `.memlog.md` (`## <date>` + an `event:` line) and record the produced paths on the `implementation` manifest entry (`authoritativePaths`). That checkpoint is the hook `writeStatus` path: it rewrites `.ai.local/team/tasks/<slug>/focus.md`. `focus.md` is a view, not the system of record. It lists slug, pipeline step index, authoritative paths for incomplete manifest ids, the last `.memlog.md` `event:` line, the next gate, one decomposition ready-set line, and one archive index line, and it stays under 100 lines. `status.json`, `metrics.json`, `artifact-manifest.json`, and `.memlog.md` stay the system of record. A resumed run (`/task-continue`) reads `focus.md` first, then `artifact-manifest.json` and `.memlog.md`, and continues at the first stage whose exit criteria are unmet — never re-derive state from the chat. A completed manifest entry keeps id, status, and `authoritativePaths`, and the default resume read omits that entry's markdown body; closing it appends one new `.memlog.md` event: line, moves the bulky body to `.ai.local/team/tasks/<slug>/archive/YYYY-MM-DD/`, and leaves earlier memlog lines, the human-readable slug and artifact ids, and the manifest entry in place, with no Beads hash ids and no Taskmaster tags. Mechanical waves (generation, embed sync) are delegated to repo scripts. See **context-and-iteration** for the budget, checkpoint, resume, and refinement loop.
|
|
151
|
+
Work in bounded waves (one artifact class across the target surface). **Checkpoint** each completed wave to `.memlog.md` (`## <date>` + an `event:` line) and record the produced paths on the `implementation` manifest entry (`authoritativePaths`). That checkpoint is the hook `writeStatus` path: it rewrites `.ai.local/team/tasks/<slug>/focus.md`. `focus.md` is a view, not the system of record. It lists slug, pipeline step index, authoritative paths for incomplete manifest ids, the last `.memlog.md` `event:` line, the next gate, one decomposition ready-set line, and one archive index line, and it stays under 100 lines. `status.json`, `metrics.json`, `artifact-manifest.json`, and `.memlog.md` stay the system of record. A resumed run (`/task-continue`) reads `focus.md` first, then `artifact-manifest.json` and `.memlog.md`, and continues at the first stage whose exit criteria are unmet — never re-derive state from the chat. A completed manifest entry keeps id, status, and `authoritativePaths`, and the default resume read omits that entry's markdown body; closing it appends one new `.memlog.md` event: line, moves the bulky body to `.ai.local/team/tasks/<slug>/archive/YYYY-MM-DD/`, and leaves earlier memlog lines, the human-readable slug and artifact ids, and the manifest entry in place, with no Beads hash ids and no Taskmaster tags. Mechanical waves (generation, embed sync) are delegated to repo scripts. An **interrupted producer** (tool abort, killed session) is resumed, not restarted: run the stack's compile gate on the working tree first, and when it is red hand the failing output to the same producer with a `fix and finish` brief instead of starting a second parallel attempt. When the host runtime writes no `status.json` (manual-hook hosts such as OpenCode), the resume checkpoint is `artifact-manifest.json` + `.memlog.md`; never gate a resume on a file the runtime does not produce. See **context-and-iteration** for the budget, checkpoint, resume, and refinement loop.
|
|
152
152
|
|
|
153
153
|
## Self-review & context hygiene
|
|
154
154
|
|
|
@@ -60,6 +60,10 @@ Essentials below. Full procedural set (~17 rules) → load **`anti-sycophancy-di
|
|
|
60
60
|
- Urgency/authority: name the trade-off once, then comply — no apology loops.
|
|
61
61
|
- Match verification to risk; report by what was **verified**, not attempted.
|
|
62
62
|
|
|
63
|
+
## Questions to the user
|
|
64
|
+
|
|
65
|
+
**Interactive first.** A decision only the user can make goes through the host's interactive question tool (OpenCode `question`, Claude Code `AskUserQuestion`, a client dialog); prose is the fallback for a host without one. Load **`interactive-questions`** for the widget format and the free-form-answer rule.
|
|
66
|
+
|
|
63
67
|
Style enforcement (formatter / linter / post-change gate) lives in the **stack toolchain** — see each adapter’s **Stack notes**.
|
|
64
68
|
|
|
65
69
|
> Stack-specific lint gates, examples, and toolchain — in the preset adapter **Stack notes** section.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<!-- shared-core: quality/interactive-questions.md -->
|
|
2
|
+
|
|
3
|
+
# Interactive questions (requestable)
|
|
4
|
+
|
|
5
|
+
How to put a user-only decision to the user. Load when the answer blocks the work and the host offers an interactive question tool (OpenCode `question`, Claude Code `AskUserQuestion`, a client dialog). The always-on quality rule keeps the short preference; this file carries the full contract.
|
|
6
|
+
|
|
7
|
+
## When to ask
|
|
8
|
+
|
|
9
|
+
1. **Interactive first.** Ask through the host's interactive question tool and structure the question for that tool. Plain prose is the fallback for a host without one, a headless run, or an answer that cannot be enumerated.
|
|
10
|
+
2. **One decision per question.** Independent decisions go into separate entries so the host walks them as steps.
|
|
11
|
+
3. **Ask before the dependent work.** Never a screening question per option, and never a question the repository already answers.
|
|
12
|
+
|
|
13
|
+
## Widget format
|
|
14
|
+
|
|
15
|
+
4. **Header** → a short label (≤30 characters).
|
|
16
|
+
5. **Option label** → 1–5 words, in the user's terms.
|
|
17
|
+
6. **Option description** → the consequence or the trade-off, not a restatement of the label.
|
|
18
|
+
7. **Two to five options.** Put the option you recommend first and justify it in its description; do not pad the list with options you cannot defend.
|
|
19
|
+
8. **Multi-select** only when the choices are not mutually exclusive. The host's own free-form entry does not count toward the range.
|
|
20
|
+
|
|
21
|
+
## The free-form answer is mandatory, the option is not
|
|
22
|
+
|
|
23
|
+
9. OpenCode `question` and Claude Code `AskUserQuestion` append their own free-form entry for single and multi select. Never add an “other” option there: option values are labels, so a chosen “Other” returns that word, not the user’s text.
|
|
24
|
+
10. A host without that entry (a custom `dialog.select`, an MCP elicitation `enum`, a headless run) needs an explicit “Other” whose selection opens a text prompt — or prose when the answer cannot be enumerated.
|
|
25
|
+
|
|
26
|
+
## Fallback
|
|
27
|
+
|
|
28
|
+
11. **Prose.** With no question tool, ask in plain language with the same shape: the decision, the options, and the trade-off each option carries. One decision per message.
|
|
29
|
+
12. **Do not block.** When the answer is not needed for the next step, state the assumption, continue, and name what a different answer would change.
|
|
@@ -8,4 +8,6 @@ Full scenario (including the **“Agent work”** block for a slug from team tas
|
|
|
8
8
|
|
|
9
9
|
When a task has `metrics.json`, use the local aggregation script and state the cohort, sample size, incomplete artifacts, attribution confidence, active attempt duration, and human-gate wait separately. Do not score malformed artifacts or gate wait as agent work.
|
|
10
10
|
|
|
11
|
+
**Findings carry a category.** When a retro appends a signal it sets `finding_category` to one of `correctness` (wrong result, missed transition, bad math), `contract` (shape, route, param, enum drift), `perf` (budget, cost, unmeasured claim), `hygiene` (paths, dead code, artifacts), or `process` (sizing, ordering, gate choreography). Without the category, repeated `gate-changes-requested` rows cannot be turned into a rule: the signature only says that a gate rejected something. Gate-derived signals default to `process`; a retro that classifies a finding appends its own categorized row instead of rewriting the gate row.
|
|
12
|
+
|
|
11
13
|
Use this rule only if the command is unavailable. Do not duplicate the command contents in the response — follow the command file and skill `technical-retro`.
|
|
@@ -53,7 +53,7 @@ Severity: **high** (explicit correction / large waste) · **med** · **low**. Co
|
|
|
53
53
|
Read structured evidence before proposing changes: `.ai.local/signals.jsonl` (wrong-turn signals grouped by
|
|
54
54
|
`signature` — the machine-enforced Rule of Three: ≥2 distinct tasks → edit a local rule / `conventions.md` gotcha,
|
|
55
55
|
≥3 → new rule) and `.ai.local/rule-changes.jsonl` (applied and **staged** mutations with `before` snapshots).
|
|
56
|
-
Reconstruct issues from these ledgers, not free text.
|
|
56
|
+
Reconstruct issues from these ledgers, not free text. Every appended signal sets `finding_category` (`correctness` | `contract` | `perf` | `hygiene` | `process`) so the signature ledger can turn a repeated `gate-changes-requested` into a rule instead of only counting it.
|
|
57
57
|
|
|
58
58
|
If the same issue appeared in **2+** tasks (or **3+** for packaging a new rule/skill — Rule of Three), add section
|
|
59
59
|
**Preset updates**:
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"platform": "opencode",
|
|
4
4
|
"stack": "go",
|
|
5
5
|
"semanticSource": "cursor/go",
|
|
6
|
-
"sourceRevision": "
|
|
6
|
+
"sourceRevision": "71359979de98b65d290753b19e23a6e0953cbbdb7ee07a2f6219b68760798c6a",
|
|
7
7
|
"entries": [
|
|
8
8
|
{
|
|
9
9
|
"source": "AGENTS.md",
|
|
@@ -532,6 +532,15 @@
|
|
|
532
532
|
"loadMode": "referenced",
|
|
533
533
|
"reason": "Requestable Cursor rule: lazy Read from .opencode/rules; not auto-loaded"
|
|
534
534
|
},
|
|
535
|
+
{
|
|
536
|
+
"source": "rules/interactive-questions.mdc",
|
|
537
|
+
"target": "rules/interactive-questions.md",
|
|
538
|
+
"category": "rules",
|
|
539
|
+
"disposition": "transform",
|
|
540
|
+
"loadMode": "referenced",
|
|
541
|
+
"reason": "Requestable Cursor rule: lazy Read from .opencode/rules; not auto-loaded",
|
|
542
|
+
"sharedCoreStem": "quality/interactive-questions.md"
|
|
543
|
+
},
|
|
535
544
|
{
|
|
536
545
|
"source": "rules/language-policy.mdc",
|
|
537
546
|
"target": "rules/language-policy.md",
|
|
@@ -74,4 +74,4 @@ A self-review defect that changes the output appends one `review-ledger.md` row
|
|
|
74
74
|
|
|
75
75
|
## Receipt binding
|
|
76
76
|
|
|
77
|
-
> **Receipt binding.** When writing the terminal receipt to `artifact-manifest.json`, set `entry.receipt.attemptId = <attemptId supplied by the orchestrator>` (the orchestrator provides this via `attemptId` on invocation). The hook at `chain-team-phases.sh:readBoundReceiptOutcome` rejects entries whose `attemptId` does not match the current attempt, or whose `Date.parse(timestamps.completedAt) < Date.parse(attemptStartedAt)`.
|
|
77
|
+
> **Receipt binding.** When writing the terminal receipt to `artifact-manifest.json`, set `entry.receipt.attemptId = <attemptId supplied by the orchestrator>` (the orchestrator provides this via `attemptId` on invocation). The hook at `chain-team-phases.sh:readBoundReceiptOutcome` rejects entries whose `attemptId` does not match the current attempt, or whose `Date.parse(timestamps.completedAt) < Date.parse(attemptStartedAt)`. A missing or stale attemptId causes `awaiting_artifact_receipt` stalls. Write the receipt as a whole-file merge — `node .ai.local/scripts/manifest.mjs upsert --slug <slug> --id <id> --producer <agent> --outcome <outcome> --attempt <attemptId> …` — and never patch the JSON with a fragment/replace edit: a foreign parallel write or a refreshed `updatedAt` breaks the match and aborts the receipt mid-task. If the merge or parse fails, re-read and merge again (at most twice), then report `blocked` with the error. <!-- shared-core: receipt-binding -->
|
|
@@ -95,4 +95,4 @@ Write `.ai.local/team/tasks/<slug>/review.md` with verdict APPROVE | REQUEST_CHA
|
|
|
95
95
|
|
|
96
96
|
## Receipt binding
|
|
97
97
|
|
|
98
|
-
> **Receipt binding.** When writing the terminal receipt to `artifact-manifest.json`, set `entry.receipt.attemptId = <attemptId supplied by the orchestrator>` (the orchestrator provides this via `attemptId` on invocation). The hook at `chain-team-phases.sh:readBoundReceiptOutcome` rejects entries whose `attemptId` does not match the current attempt, or whose `Date.parse(timestamps.completedAt) < Date.parse(attemptStartedAt)`.
|
|
98
|
+
> **Receipt binding.** When writing the terminal receipt to `artifact-manifest.json`, set `entry.receipt.attemptId = <attemptId supplied by the orchestrator>` (the orchestrator provides this via `attemptId` on invocation). The hook at `chain-team-phases.sh:readBoundReceiptOutcome` rejects entries whose `attemptId` does not match the current attempt, or whose `Date.parse(timestamps.completedAt) < Date.parse(attemptStartedAt)`. A missing or stale attemptId causes `awaiting_artifact_receipt` stalls. Write the receipt as a whole-file merge — `node .ai.local/scripts/manifest.mjs upsert --slug <slug> --id <id> --producer <agent> --outcome <outcome> --attempt <attemptId> …` — and never patch the JSON with a fragment/replace edit: a foreign parallel write or a refreshed `updatedAt` breaks the match and aborts the receipt mid-task. If the merge or parse fails, re-read and merge again (at most twice), then report `blocked` with the error. <!-- shared-core: receipt-binding -->
|