@bonesofspring/ai-rules 0.2.20 → 0.2.21
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 +28 -0
- package/README.md +17 -2
- package/bin/cli.js +83 -6
- package/package.json +5 -2
- package/presets/_shared/README.md +2 -1
- package/presets/_shared/assets/docs-specs/INDEX.md +4 -1
- package/presets/_shared/core/agent-team/agent-artifact-contracts.md +13 -0
- package/presets/_shared/core/agent-team/agent-task-metrics.md +1 -1
- package/presets/_shared/core/agent-team/agent-team-orchestrator.md +1 -3
- package/presets/_shared/core/meta/preset-pr-checklist.md +5 -1
- package/presets/_shared/core/meta/preset-token-budget.md +7 -3
- package/presets/_shared/core/meta/preset-twin-sync.md +2 -0
- package/presets/_shared/core/testing/testing-principles.md +70 -0
- package/presets/claude/android-kotlin/agents/README.md +2 -1
- package/presets/claude/android-kotlin/agents/feature-developer.md +1 -1
- package/presets/claude/android-kotlin/agents/openspec-author.md +163 -0
- package/presets/claude/android-kotlin/agents/task-analyst.md +1 -1
- package/presets/claude/android-kotlin/agents/task-router.md +5 -1
- package/presets/claude/android-kotlin/agents/tech-writer.md +4 -0
- package/presets/claude/android-kotlin/commands/README.md +0 -2
- package/presets/claude/android-kotlin/commands/task-continue.md +1 -1
- package/presets/claude/android-kotlin/commands/task.md +1 -5
- package/presets/claude/android-kotlin/commands/technical-retro.md +2 -2
- package/presets/claude/android-kotlin/hooks/chain-team-phases.sh +54 -2
- package/presets/claude/android-kotlin/rules/README.md +1 -0
- package/presets/claude/android-kotlin/rules/tooling-and-review/agent-team-orchestrator.md +7 -4
- package/presets/claude/android-kotlin/rules/tooling-and-review/ai-local-overlay.md +48 -0
- package/presets/claude/android-kotlin/rules/tooling-and-review/preset-pr-checklist.md +5 -1
- package/presets/claude/android-kotlin/rules/tooling-and-review/preset-token-budget.md +7 -3
- package/presets/claude/android-kotlin/rules/tooling-and-review/preset-twin-sync.md +2 -0
- package/presets/claude/go/README.md +1 -1
- package/presets/claude/go/agents/README.md +3 -2
- package/presets/claude/go/agents/openspec-author.md +163 -0
- package/presets/claude/go/agents/task-router.md +5 -1
- package/presets/claude/go/agents/tech-writer.md +4 -0
- package/presets/claude/go/commands/README.md +0 -2
- package/presets/claude/go/commands/task-continue.md +1 -1
- package/presets/claude/go/commands/task.md +1 -4
- package/presets/claude/go/hooks/chain-team-phases.sh +54 -3
- package/presets/claude/go/rules/README.md +1 -0
- package/presets/claude/go/rules/tooling-and-review/agent-team-orchestrator.md +2 -4
- package/presets/claude/go/rules/tooling-and-review/ai-local-overlay.md +48 -0
- package/presets/claude/go/rules/tooling-and-review/preset-pr-checklist.md +5 -1
- package/presets/claude/go/rules/tooling-and-review/preset-token-budget.md +7 -3
- package/presets/claude/go/rules/tooling-and-review/preset-twin-sync.md +2 -0
- package/presets/claude/ios-swift/agents/README.md +3 -2
- package/presets/claude/ios-swift/agents/feature-developer.md +1 -1
- package/presets/claude/ios-swift/agents/openspec-author.md +163 -0
- package/presets/claude/ios-swift/agents/task-analyst.md +1 -1
- package/presets/claude/ios-swift/agents/task-router.md +5 -1
- package/presets/claude/ios-swift/agents/tech-writer.md +4 -0
- package/presets/claude/ios-swift/commands/README.md +0 -2
- package/presets/claude/ios-swift/commands/task-continue.md +1 -1
- package/presets/claude/ios-swift/commands/task.md +1 -5
- package/presets/claude/ios-swift/commands/technical-retro.md +2 -2
- package/presets/claude/ios-swift/hooks/chain-team-phases.sh +54 -2
- package/presets/claude/ios-swift/rules/README.md +1 -0
- package/presets/claude/ios-swift/rules/tooling-and-review/agent-team-orchestrator.md +7 -4
- package/presets/claude/ios-swift/rules/tooling-and-review/ai-local-overlay.md +48 -0
- package/presets/claude/ios-swift/rules/tooling-and-review/preset-pr-checklist.md +5 -1
- package/presets/claude/ios-swift/rules/tooling-and-review/preset-token-budget.md +7 -3
- package/presets/claude/ios-swift/rules/tooling-and-review/preset-twin-sync.md +2 -0
- package/presets/claude/java/CLAUDE.md +1 -1
- package/presets/claude/java/agents/README.md +3 -2
- package/presets/claude/java/agents/openspec-author.md +163 -0
- package/presets/claude/java/agents/task-router.md +5 -1
- package/presets/claude/java/agents/tech-writer.md +4 -0
- package/presets/claude/java/commands/README.md +0 -2
- package/presets/claude/java/commands/task-continue.md +1 -1
- package/presets/claude/java/commands/task.md +1 -4
- package/presets/claude/java/hooks/chain-team-phases.sh +54 -3
- package/presets/claude/java/rules/README.md +1 -0
- package/presets/claude/java/rules/tooling-and-review/agent-team-orchestrator.md +2 -4
- package/presets/claude/java/rules/tooling-and-review/ai-local-overlay.md +48 -0
- package/presets/claude/java/rules/tooling-and-review/preset-pr-checklist.md +5 -1
- package/presets/claude/java/rules/tooling-and-review/preset-token-budget.md +7 -3
- package/presets/claude/java/rules/tooling-and-review/preset-twin-sync.md +2 -0
- package/presets/claude/mcp-ts/agents/task-analyst.md +1 -1
- package/presets/claude/mcp-ts/commands/README.md +0 -2
- package/presets/claude/mcp-ts/commands/task-continue.md +1 -1
- package/presets/claude/mcp-ts/commands/task.md +1 -4
- package/presets/claude/mcp-ts/commands/technical-retro.md +2 -2
- package/presets/claude/mcp-ts/hooks/chain-team-phases.sh +40 -9
- package/presets/claude/mcp-ts/rules/README.md +1 -0
- package/presets/claude/mcp-ts/rules/tooling-and-review/agent-team-orchestrator.md +2 -4
- package/presets/claude/mcp-ts/rules/tooling-and-review/ai-local-overlay.md +48 -0
- package/presets/claude/mcp-ts/rules/tooling-and-review/preset-pr-checklist.md +5 -1
- package/presets/claude/mcp-ts/rules/tooling-and-review/preset-token-budget.md +7 -3
- package/presets/claude/mcp-ts/rules/tooling-and-review/preset-twin-sync.md +2 -0
- package/presets/claude/next/README.md +1 -0
- package/presets/claude/next/agents/README.md +2 -2
- package/presets/claude/next/agents/build-verifier.md +11 -1
- package/presets/claude/next/agents/feature-developer.md +1 -1
- package/presets/claude/next/agents/openspec-author.md +163 -0
- package/presets/claude/next/agents/task-analyst.md +1 -1
- package/presets/claude/next/agents/task-router.md +5 -1
- package/presets/claude/next/agents/tech-writer.md +4 -0
- package/presets/claude/next/commands/README.md +0 -2
- package/presets/claude/next/commands/task-continue.md +1 -1
- package/presets/claude/next/commands/task.md +1 -4
- package/presets/claude/next/hooks/chain-team-phases.sh +54 -2
- package/presets/claude/next/rules/README.md +1 -0
- package/presets/claude/next/rules/testing/README.md +6 -0
- package/presets/claude/next/rules/testing/tests-e2e-structure.md +84 -48
- package/presets/claude/next/rules/testing/tests-unit.md +79 -50
- package/presets/claude/next/rules/tooling-and-review/agent-team-orchestrator.md +3 -4
- package/presets/claude/next/rules/tooling-and-review/ai-local-overlay.md +48 -0
- package/presets/claude/next/rules/tooling-and-review/preset-pr-checklist.md +5 -1
- package/presets/claude/next/rules/tooling-and-review/preset-token-budget.md +7 -3
- package/presets/claude/next/rules/tooling-and-review/preset-twin-sync.md +2 -0
- package/presets/claude/next/team/README.md +0 -3
- package/presets/claude/nuxt/agents/README.md +1 -1
- package/presets/claude/nuxt/agents/feature-developer.md +1 -1
- package/presets/claude/nuxt/agents/openspec-author.md +163 -0
- package/presets/claude/nuxt/agents/task-analyst.md +1 -1
- package/presets/claude/nuxt/agents/task-router.md +5 -1
- package/presets/claude/nuxt/agents/tech-writer.md +4 -0
- package/presets/claude/nuxt/commands/README.md +0 -2
- package/presets/claude/nuxt/commands/task-continue.md +1 -1
- package/presets/claude/nuxt/commands/task.md +1 -5
- package/presets/claude/nuxt/commands/technical-retro.md +2 -2
- package/presets/claude/nuxt/hooks/chain-team-phases.sh +54 -2
- package/presets/claude/nuxt/rules/README.md +1 -0
- package/presets/claude/nuxt/rules/testing/README.md +6 -0
- package/presets/claude/nuxt/rules/testing/tests-e2e-structure.md +86 -43
- package/presets/claude/nuxt/rules/testing/tests-unit.md +58 -45
- package/presets/claude/nuxt/rules/tooling-and-review/agent-team-orchestrator.md +8 -5
- package/presets/claude/nuxt/rules/tooling-and-review/ai-local-overlay.md +48 -0
- package/presets/claude/nuxt/rules/tooling-and-review/preset-pr-checklist.md +5 -1
- package/presets/claude/nuxt/rules/tooling-and-review/preset-token-budget.md +7 -3
- package/presets/claude/nuxt/rules/tooling-and-review/preset-twin-sync.md +2 -0
- package/presets/claude/nuxt/team/README.md +0 -3
- package/presets/claude/php-hexagonal/CLAUDE.md +1 -1
- package/presets/claude/php-hexagonal/agents/README.md +3 -2
- package/presets/claude/php-hexagonal/agents/openspec-author.md +163 -0
- package/presets/claude/php-hexagonal/agents/task-router.md +5 -1
- package/presets/claude/php-hexagonal/agents/tech-writer.md +4 -0
- package/presets/claude/php-hexagonal/commands/README.md +0 -2
- package/presets/claude/php-hexagonal/commands/task-continue.md +1 -1
- package/presets/claude/php-hexagonal/commands/task.md +1 -4
- package/presets/claude/php-hexagonal/hooks/chain-team-phases.sh +54 -3
- package/presets/claude/php-hexagonal/rules/README.md +1 -0
- package/presets/claude/php-hexagonal/rules/tooling-and-review/agent-team-orchestrator.md +2 -4
- package/presets/claude/php-hexagonal/rules/tooling-and-review/ai-local-overlay.md +48 -0
- package/presets/claude/php-hexagonal/rules/tooling-and-review/preset-pr-checklist.md +5 -1
- package/presets/claude/php-hexagonal/rules/tooling-and-review/preset-token-budget.md +7 -3
- package/presets/claude/php-hexagonal/rules/tooling-and-review/preset-twin-sync.md +2 -0
- package/presets/claude/php-laravel/agents/README.md +3 -2
- package/presets/claude/php-laravel/agents/openspec-author.md +163 -0
- package/presets/claude/php-laravel/agents/task-router.md +5 -1
- package/presets/claude/php-laravel/agents/tech-writer.md +4 -0
- package/presets/claude/php-laravel/commands/README.md +0 -2
- package/presets/claude/php-laravel/commands/task-continue.md +1 -1
- package/presets/claude/php-laravel/commands/task.md +1 -4
- package/presets/claude/php-laravel/hooks/chain-team-phases.sh +54 -3
- package/presets/claude/php-laravel/rules/README.md +1 -0
- package/presets/claude/php-laravel/rules/tooling-and-review/agent-team-orchestrator.md +2 -4
- package/presets/claude/php-laravel/rules/tooling-and-review/ai-local-overlay.md +48 -0
- package/presets/claude/php-laravel/rules/tooling-and-review/preset-pr-checklist.md +5 -1
- package/presets/claude/php-laravel/rules/tooling-and-review/preset-token-budget.md +7 -3
- package/presets/claude/php-laravel/rules/tooling-and-review/preset-twin-sync.md +2 -0
- package/presets/claude/svelte/agents/README.md +1 -1
- package/presets/claude/svelte/agents/feature-developer.md +1 -1
- package/presets/claude/svelte/agents/openspec-author.md +163 -0
- package/presets/claude/svelte/agents/task-analyst.md +1 -1
- package/presets/claude/svelte/agents/task-router.md +5 -1
- package/presets/claude/svelte/agents/tech-writer.md +4 -0
- package/presets/claude/svelte/commands/README.md +0 -2
- package/presets/claude/svelte/commands/task-continue.md +1 -1
- package/presets/claude/svelte/commands/task.md +1 -5
- package/presets/claude/svelte/commands/technical-retro.md +2 -2
- package/presets/claude/svelte/hooks/chain-team-phases.sh +54 -2
- package/presets/claude/svelte/rules/README.md +1 -0
- package/presets/claude/svelte/rules/testing/README.md +6 -0
- package/presets/claude/svelte/rules/testing/tests-e2e-structure.md +87 -45
- package/presets/claude/svelte/rules/testing/tests-unit.md +70 -23
- package/presets/claude/svelte/rules/tooling-and-review/agent-team-orchestrator.md +8 -5
- package/presets/claude/svelte/rules/tooling-and-review/ai-local-overlay.md +48 -0
- package/presets/claude/svelte/rules/tooling-and-review/preset-pr-checklist.md +5 -1
- package/presets/claude/svelte/rules/tooling-and-review/preset-token-budget.md +7 -3
- package/presets/claude/svelte/rules/tooling-and-review/preset-twin-sync.md +2 -0
- package/presets/claude/svelte/team/README.md +0 -3
- package/presets/cursor/android-kotlin/agents/README.md +2 -1
- package/presets/cursor/android-kotlin/agents/feature-developer.md +1 -1
- package/presets/cursor/android-kotlin/agents/openspec-author.md +164 -0
- package/presets/cursor/android-kotlin/agents/task-analyst.md +1 -1
- package/presets/cursor/android-kotlin/agents/task-router.md +5 -1
- package/presets/cursor/android-kotlin/agents/tech-writer.md +4 -0
- package/presets/cursor/android-kotlin/commands/README.md +0 -2
- package/presets/cursor/android-kotlin/commands/task-continue.md +1 -1
- package/presets/cursor/android-kotlin/commands/task.md +1 -5
- package/presets/cursor/android-kotlin/commands/technical-retro.md +2 -2
- package/presets/cursor/android-kotlin/hooks/chain-team-phases.sh +54 -2
- package/presets/cursor/android-kotlin/rules/agent-team-orchestrator.mdc +7 -4
- package/presets/cursor/android-kotlin/rules/ai-local-overlay.mdc +43 -0
- package/presets/cursor/android-kotlin/rules/preset-pr-checklist.mdc +5 -1
- package/presets/cursor/android-kotlin/rules/preset-token-budget.mdc +7 -3
- package/presets/cursor/android-kotlin/rules/preset-twin-sync.mdc +2 -0
- package/presets/cursor/go/README.md +6 -6
- package/presets/cursor/go/agents/README.md +3 -2
- package/presets/cursor/go/agents/openspec-author.md +164 -0
- package/presets/cursor/go/agents/task-router.md +5 -1
- package/presets/cursor/go/agents/tech-writer.md +4 -0
- package/presets/cursor/go/commands/README.md +0 -2
- package/presets/cursor/go/commands/task-continue.md +1 -1
- package/presets/cursor/go/commands/task.md +1 -4
- package/presets/cursor/go/commands/technical-retro.md +2 -2
- package/presets/cursor/go/hooks/chain-team-phases.sh +54 -3
- package/presets/cursor/go/rules/agent-team-orchestrator.mdc +2 -4
- package/presets/cursor/go/rules/ai-local-overlay.mdc +43 -0
- package/presets/cursor/go/rules/preset-pr-checklist.mdc +5 -1
- package/presets/cursor/go/rules/preset-token-budget.mdc +7 -3
- package/presets/cursor/go/rules/preset-twin-sync.mdc +2 -0
- package/presets/cursor/ios-swift/README.md +6 -6
- package/presets/cursor/ios-swift/agents/README.md +3 -2
- package/presets/cursor/ios-swift/agents/feature-developer.md +1 -1
- package/presets/cursor/ios-swift/agents/openspec-author.md +164 -0
- package/presets/cursor/ios-swift/agents/task-analyst.md +1 -1
- package/presets/cursor/ios-swift/agents/task-router.md +5 -1
- package/presets/cursor/ios-swift/agents/tech-writer.md +4 -0
- package/presets/cursor/ios-swift/commands/README.md +1 -3
- package/presets/cursor/ios-swift/commands/task-continue.md +1 -1
- package/presets/cursor/ios-swift/commands/task.md +1 -5
- package/presets/cursor/ios-swift/commands/technical-retro.md +2 -2
- package/presets/cursor/ios-swift/hooks/chain-team-phases.sh +54 -2
- package/presets/cursor/ios-swift/rules/agent-team-orchestrator.mdc +7 -4
- package/presets/cursor/ios-swift/rules/ai-local-overlay.mdc +43 -0
- package/presets/cursor/ios-swift/rules/preset-pr-checklist.mdc +5 -1
- package/presets/cursor/ios-swift/rules/preset-token-budget.mdc +7 -3
- package/presets/cursor/ios-swift/rules/preset-twin-sync.mdc +2 -0
- package/presets/cursor/java/AGENTS.md +1 -1
- package/presets/cursor/java/agents/README.md +3 -2
- package/presets/cursor/java/agents/openspec-author.md +164 -0
- package/presets/cursor/java/agents/task-router.md +5 -1
- package/presets/cursor/java/agents/tech-writer.md +4 -0
- package/presets/cursor/java/commands/README.md +0 -2
- package/presets/cursor/java/commands/task-continue.md +1 -1
- package/presets/cursor/java/commands/task.md +1 -4
- package/presets/cursor/java/commands/technical-retro.md +2 -2
- package/presets/cursor/java/hooks/chain-team-phases.sh +54 -3
- package/presets/cursor/java/rules/agent-team-orchestrator.mdc +2 -4
- package/presets/cursor/java/rules/ai-local-overlay.mdc +43 -0
- package/presets/cursor/java/rules/preset-pr-checklist.mdc +5 -1
- package/presets/cursor/java/rules/preset-token-budget.mdc +7 -3
- package/presets/cursor/java/rules/preset-twin-sync.mdc +2 -0
- package/presets/cursor/mcp-ts/agents/task-analyst.md +1 -1
- package/presets/cursor/mcp-ts/commands/README.md +0 -2
- package/presets/cursor/mcp-ts/commands/task-continue.md +1 -1
- package/presets/cursor/mcp-ts/commands/task.md +1 -4
- package/presets/cursor/mcp-ts/commands/technical-retro.md +2 -2
- package/presets/cursor/mcp-ts/hooks/chain-team-phases.sh +40 -9
- package/presets/cursor/mcp-ts/rules/agent-team-orchestrator.mdc +2 -4
- package/presets/cursor/mcp-ts/rules/ai-local-overlay.mdc +43 -0
- package/presets/cursor/mcp-ts/rules/preset-pr-checklist.mdc +5 -1
- package/presets/cursor/mcp-ts/rules/preset-token-budget.mdc +7 -3
- package/presets/cursor/mcp-ts/rules/preset-twin-sync.mdc +2 -0
- package/presets/cursor/next/README.md +8 -6
- package/presets/cursor/next/REPO_AGENTS.md +8 -0
- package/presets/cursor/next/agents/README.md +2 -2
- package/presets/cursor/next/agents/build-verifier.md +11 -1
- package/presets/cursor/next/agents/feature-developer.md +1 -1
- package/presets/cursor/next/agents/openspec-author.md +164 -0
- package/presets/cursor/next/agents/task-analyst.md +1 -1
- package/presets/cursor/next/agents/task-router.md +5 -1
- package/presets/cursor/next/agents/tech-writer.md +4 -0
- package/presets/cursor/next/commands/README.md +0 -2
- package/presets/cursor/next/commands/task-continue.md +1 -1
- package/presets/cursor/next/commands/task.md +1 -4
- package/presets/cursor/next/commands/technical-retro.md +2 -2
- package/presets/cursor/next/hooks/chain-team-phases.sh +54 -2
- package/presets/cursor/next/rules/README.md +6 -3
- package/presets/cursor/next/rules/agent-team-orchestrator.mdc +7 -5
- package/presets/cursor/next/rules/ai-local-overlay.mdc +43 -0
- package/presets/cursor/next/rules/preset-pr-checklist.mdc +5 -1
- package/presets/cursor/next/rules/preset-token-budget.mdc +7 -3
- package/presets/cursor/next/rules/preset-twin-sync.mdc +2 -0
- package/presets/cursor/next/rules/tests-e2e-structure.mdc +83 -43
- package/presets/cursor/next/rules/tests-unit.mdc +78 -45
- package/presets/cursor/next/team/README.md +0 -3
- package/presets/cursor/nuxt/README.md +6 -6
- package/presets/cursor/nuxt/agents/README.md +1 -1
- package/presets/cursor/nuxt/agents/feature-developer.md +1 -1
- package/presets/cursor/nuxt/agents/openspec-author.md +164 -0
- package/presets/cursor/nuxt/agents/task-analyst.md +1 -1
- package/presets/cursor/nuxt/agents/task-router.md +5 -1
- package/presets/cursor/nuxt/agents/tech-writer.md +4 -0
- package/presets/cursor/nuxt/commands/README.md +0 -2
- package/presets/cursor/nuxt/commands/task-continue.md +1 -1
- package/presets/cursor/nuxt/commands/task.md +1 -5
- package/presets/cursor/nuxt/commands/technical-retro.md +2 -2
- package/presets/cursor/nuxt/hooks/chain-team-phases.sh +54 -2
- package/presets/cursor/nuxt/rules/README.md +3 -1
- package/presets/cursor/nuxt/rules/agent-team-orchestrator.mdc +8 -5
- package/presets/cursor/nuxt/rules/ai-local-overlay.mdc +43 -0
- package/presets/cursor/nuxt/rules/preset-pr-checklist.mdc +5 -1
- package/presets/cursor/nuxt/rules/preset-token-budget.mdc +7 -3
- package/presets/cursor/nuxt/rules/preset-twin-sync.mdc +2 -0
- package/presets/cursor/nuxt/rules/tests-e2e-structure.mdc +87 -43
- package/presets/cursor/nuxt/rules/tests-unit.mdc +62 -47
- package/presets/cursor/nuxt/team/README.md +0 -3
- package/presets/cursor/php-hexagonal/AGENTS.md +1 -1
- package/presets/cursor/php-hexagonal/agents/README.md +3 -2
- package/presets/cursor/php-hexagonal/agents/openspec-author.md +164 -0
- package/presets/cursor/php-hexagonal/agents/task-router.md +5 -1
- package/presets/cursor/php-hexagonal/agents/tech-writer.md +4 -0
- package/presets/cursor/php-hexagonal/commands/README.md +0 -2
- package/presets/cursor/php-hexagonal/commands/task-continue.md +1 -1
- package/presets/cursor/php-hexagonal/commands/task.md +1 -4
- package/presets/cursor/php-hexagonal/commands/technical-retro.md +2 -2
- package/presets/cursor/php-hexagonal/hooks/chain-team-phases.sh +54 -3
- package/presets/cursor/php-hexagonal/rules/agent-team-orchestrator.mdc +2 -4
- package/presets/cursor/php-hexagonal/rules/ai-local-overlay.mdc +43 -0
- package/presets/cursor/php-hexagonal/rules/preset-pr-checklist.mdc +5 -1
- package/presets/cursor/php-hexagonal/rules/preset-token-budget.mdc +7 -3
- package/presets/cursor/php-hexagonal/rules/preset-twin-sync.mdc +2 -0
- package/presets/cursor/php-laravel/AGENTS.md +1 -1
- package/presets/cursor/php-laravel/agents/README.md +3 -2
- package/presets/cursor/php-laravel/agents/openspec-author.md +164 -0
- package/presets/cursor/php-laravel/agents/task-router.md +5 -1
- package/presets/cursor/php-laravel/agents/tech-writer.md +4 -0
- package/presets/cursor/php-laravel/commands/README.md +0 -2
- package/presets/cursor/php-laravel/commands/task-continue.md +1 -1
- package/presets/cursor/php-laravel/commands/task.md +1 -4
- package/presets/cursor/php-laravel/commands/technical-retro.md +2 -2
- package/presets/cursor/php-laravel/hooks/chain-team-phases.sh +54 -3
- package/presets/cursor/php-laravel/rules/agent-team-orchestrator.mdc +2 -4
- package/presets/cursor/php-laravel/rules/ai-local-overlay.mdc +43 -0
- package/presets/cursor/php-laravel/rules/preset-pr-checklist.mdc +5 -1
- package/presets/cursor/php-laravel/rules/preset-token-budget.mdc +7 -3
- package/presets/cursor/php-laravel/rules/preset-twin-sync.mdc +2 -0
- package/presets/cursor/svelte/README.md +6 -6
- package/presets/cursor/svelte/agents/README.md +1 -1
- package/presets/cursor/svelte/agents/feature-developer.md +1 -1
- package/presets/cursor/svelte/agents/openspec-author.md +164 -0
- package/presets/cursor/svelte/agents/task-analyst.md +1 -1
- package/presets/cursor/svelte/agents/task-router.md +5 -1
- package/presets/cursor/svelte/agents/tech-writer.md +4 -0
- package/presets/cursor/svelte/commands/README.md +0 -2
- package/presets/cursor/svelte/commands/task-continue.md +1 -1
- package/presets/cursor/svelte/commands/task.md +1 -5
- package/presets/cursor/svelte/commands/technical-retro.md +2 -2
- package/presets/cursor/svelte/hooks/chain-team-phases.sh +54 -2
- package/presets/cursor/svelte/rules/README.md +3 -1
- package/presets/cursor/svelte/rules/agent-team-orchestrator.mdc +8 -5
- package/presets/cursor/svelte/rules/ai-local-overlay.mdc +43 -0
- package/presets/cursor/svelte/rules/preset-pr-checklist.mdc +5 -1
- package/presets/cursor/svelte/rules/preset-token-budget.mdc +7 -3
- package/presets/cursor/svelte/rules/preset-twin-sync.mdc +2 -0
- package/presets/cursor/svelte/rules/tests-e2e-structure.mdc +87 -43
- package/presets/cursor/svelte/rules/tests-unit.mdc +72 -23
- package/presets/cursor/svelte/team/README.md +0 -3
- package/scripts/_lib/embed-stems.json +31 -0
- package/scripts/aggregate-agent-task-metrics.mjs +23 -0
- package/scripts/check-chain-hook-coverage.sh +109 -0
- package/scripts/check-local-overlay.sh +136 -0
- package/scripts/check-preset-i18n.sh +2 -2
- package/scripts/check-preset-leakage.sh +4 -1
- package/scripts/check-preset-structure.sh +21 -1
- package/scripts/check-preset-token-budget.sh +20 -10
- package/scripts/check-rule-eval.mjs +16 -0
- package/scripts/check-shared-core-drift.sh +10 -32
- package/scripts/close-agent-task-human-gate.mjs +22 -5
- package/scripts/sync-shared-core-embeds.sh +9 -20
- package/scripts/test-agent-task-metrics-hooks.mjs +1 -1
- package/scripts/test-chain-team-phases-coverage.mjs +411 -0
- package/presets/claude/android-kotlin/commands/feature-continue.md +0 -23
- package/presets/claude/android-kotlin/commands/feature-start.md +0 -41
- package/presets/claude/go/commands/feature-continue.md +0 -23
- package/presets/claude/go/commands/feature-start.md +0 -38
- package/presets/claude/ios-swift/commands/feature-continue.md +0 -23
- package/presets/claude/ios-swift/commands/feature-start.md +0 -41
- package/presets/claude/java/commands/feature-continue.md +0 -23
- package/presets/claude/java/commands/feature-start.md +0 -38
- package/presets/claude/mcp-ts/commands/feature-continue.md +0 -23
- package/presets/claude/mcp-ts/commands/feature-start.md +0 -41
- package/presets/claude/next/commands/feature-continue.md +0 -23
- package/presets/claude/next/commands/feature-start.md +0 -38
- package/presets/claude/nuxt/commands/feature-continue.md +0 -23
- package/presets/claude/nuxt/commands/feature-start.md +0 -41
- package/presets/claude/php-hexagonal/commands/feature-continue.md +0 -23
- package/presets/claude/php-hexagonal/commands/feature-start.md +0 -38
- package/presets/claude/php-laravel/commands/feature-continue.md +0 -23
- package/presets/claude/php-laravel/commands/feature-start.md +0 -38
- package/presets/claude/svelte/commands/feature-continue.md +0 -23
- package/presets/claude/svelte/commands/feature-start.md +0 -41
- package/presets/cursor/android-kotlin/commands/feature-continue.md +0 -23
- package/presets/cursor/android-kotlin/commands/feature-start.md +0 -41
- package/presets/cursor/go/commands/feature-continue.md +0 -23
- package/presets/cursor/go/commands/feature-start.md +0 -41
- package/presets/cursor/ios-swift/commands/feature-continue.md +0 -23
- package/presets/cursor/ios-swift/commands/feature-start.md +0 -41
- package/presets/cursor/java/commands/feature-continue.md +0 -23
- package/presets/cursor/java/commands/feature-start.md +0 -41
- package/presets/cursor/mcp-ts/commands/feature-continue.md +0 -23
- package/presets/cursor/mcp-ts/commands/feature-start.md +0 -41
- package/presets/cursor/next/commands/feature-continue.md +0 -23
- package/presets/cursor/next/commands/feature-start.md +0 -41
- package/presets/cursor/nuxt/commands/feature-continue.md +0 -23
- package/presets/cursor/nuxt/commands/feature-start.md +0 -41
- package/presets/cursor/php-hexagonal/commands/feature-continue.md +0 -23
- package/presets/cursor/php-hexagonal/commands/feature-start.md +0 -41
- package/presets/cursor/php-laravel/commands/feature-continue.md +0 -23
- package/presets/cursor/php-laravel/commands/feature-start.md +0 -41
- package/presets/cursor/svelte/commands/feature-continue.md +0 -23
- package/presets/cursor/svelte/commands/feature-start.md +0 -41
|
@@ -1,53 +1,89 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
description: E2E test and plan structure (Playwright)
|
|
3
|
+
paths: app/__tests__/e2e/**
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
#
|
|
6
|
+
# Testing principles
|
|
7
7
|
|
|
8
|
+
Stack-agnostic; concrete paths, runners, and selectors live in the stack adapter (`## Stack notes`).
|
|
9
|
+
|
|
10
|
+
## Behavior vs. implementation
|
|
11
|
+
|
|
12
|
+
- Verify **behavior and business rules**, not implementation or internal details.
|
|
13
|
+
|
|
14
|
+
## File naming
|
|
15
|
+
|
|
16
|
+
- For **new** tests use `*.spec.ts` / `*.spec.tsx`. Do not rename existing `*.test.ts` / `*.test.tsx` without a separate task (legacy).
|
|
17
|
+
|
|
18
|
+
## Runner and matchers
|
|
19
|
+
|
|
20
|
+
- Use the project's runner (Jest or Vitest are common); components — the project's Testing Library integration. Reuse existing matchers — no new micro-framework.
|
|
21
|
+
|
|
22
|
+
## Test title locale
|
|
23
|
+
|
|
24
|
+
- Consumer apps **may use the project locale** (often Russian) — clear business phrases stating what is checked and the expected outcome.
|
|
25
|
+
- When ESLint enforces the locale (e.g. `jest/valid-title`): each sentence must start with a **capital letter** (including after `.`, `!`, `?`); a space after `.` followed by a lowercase letter is forbidden ("capital after period" violation).
|
|
26
|
+
|
|
27
|
+
Good (Russian locale in consumer app):
|
|
28
|
+
|
|
29
|
+
- `it('Возвращает пустой список. Пользователь не авторизован', () => {})` <!-- i18n-keep: E5 --> (Returns empty list. User is not authorized)
|
|
30
|
+
|
|
31
|
+
Bad (no capital after period; or wrong locale for configured ESLint):
|
|
32
|
+
|
|
33
|
+
- `it('Возвращает пустой список. пользователь не авторизован', () => {})` <!-- i18n-keep: E5 -->
|
|
34
|
+
- `it('Returns empty list when user is guest', () => {})` (wrong locale if ESLint enforces Russian)
|
|
35
|
+
|
|
36
|
+
## Isolation and mocks
|
|
37
|
+
|
|
38
|
+
- Mock at the **public-contract boundary**; use the project's accepted HTTP/API/store mock approach. Do not mock what is part of the feature's public contract if that breaks the test's meaning.
|
|
39
|
+
|
|
40
|
+
## Coverage of cross-cutting modules
|
|
41
|
+
|
|
42
|
+
- When changing a **shared cross-cutting module** (e.g. HTTP client body parsing, headers, error / auth handling) — **update or add behavior tests** covering success, error, and edge branches relevant to the module under change.
|
|
43
|
+
|
|
44
|
+
## Data transformation coverage
|
|
45
|
+
|
|
46
|
+
- Data transformation functions with computed fields and branches must have unit tests covering edge cases (boundary values, missing fields, unexpected value combinations).
|
|
47
|
+
|
|
48
|
+
## Reuse fixtures over ad-hoc random data
|
|
49
|
+
|
|
50
|
+
- Prefer shared fixtures / handlers from the project's accepted mocks module; do not duplicate interfaces in tests. Use the API response types (DTO types) and the **target domain types** from the project's public type surface.
|
|
51
|
+
|
|
52
|
+
## E2E: one canonical scenario plan per feature
|
|
53
|
+
|
|
54
|
+
- For each feature keep a **single canonical scenario plan** (distinct from implementation specs; the stack adapter names the file — typically `*.cases.md`).
|
|
55
|
+
|
|
56
|
+
## E2E: scenario ↔ test traceability
|
|
57
|
+
|
|
58
|
+
- Every scenario has a corresponding test. **Do not weaken** assertions to match an outdated implementation — tests must reflect business expectations from the plan. Colocate plan and executable tests in the same directory.
|
|
59
|
+
|
|
60
|
+
## E2E: page objects / shared helpers
|
|
61
|
+
|
|
62
|
+
- Prefer page objects and shared helpers over scattered selectors and per-test setup duplication.
|
|
63
|
+
|
|
64
|
+
## E2E: stable identifiers (PREFIX-XXX)
|
|
65
|
+
|
|
66
|
+
- When scenarios need stable IDs, prefix the title with `PREFIX-XXX`: `PREFIX` = first letters of words in the entity under test (Latin uppercase); `XXX` = sequential number with three digits and leading zeros. Within one `PREFIX`, numbers must form a consistent sequence with no duplicates.
|
|
67
|
+
- Example: `test('OH-001 Отображается список заказов', async ({ page }) => { ... })` <!-- i18n-keep: E5 --> (Order list is displayed)
|
|
68
|
+
|
|
69
|
+
## E2E: selector priority
|
|
70
|
+
|
|
71
|
+
- Prefer role/label selectors for accessibility and forms; fall back to `data-testid` for stable elements. Use a **hierarchical naming convention** on page roots and key interactive elements (stack adapter defines the scheme — typically `{parent}__{element}`).
|
|
72
|
+
|
|
73
|
+
## E2E: keep plans and selectors in sync with UI
|
|
74
|
+
|
|
75
|
+
- When changing UI: update selectors in page objects and cross-check with the scenario plan. When adding/changing tests: read the matching plan and sync scenario titles first.
|
|
76
|
+
|
|
77
|
+
## Stack notes
|
|
78
|
+
|
|
79
|
+
- Runner: Playwright (`@playwright/test`).
|
|
8
80
|
- E2E folder: `app/__tests__/e2e/**`.
|
|
9
|
-
- Scenario plans:
|
|
10
|
-
|
|
11
|
-
-
|
|
12
|
-
|
|
13
|
-
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
- Every scenario from `*.cases.md` must have a corresponding test (or set of tests).
|
|
19
|
-
- **Do not** weaken assertions in tests if that contradicts business expectations from the plans.
|
|
20
|
-
- Prefer:
|
|
21
|
-
- page objects (for example, `OrderHistoryPage.ts`);
|
|
22
|
-
- shared helpers from `_shared`.
|
|
23
|
-
|
|
24
|
-
# E2E test naming
|
|
25
|
-
|
|
26
|
-
- Language:
|
|
27
|
-
- in consumer apps, `test` / `it`, `describe` block titles, and steps in `*.cases.md` **may use the project locale** (often Russian) — phrasing behavior and expected outcome;
|
|
28
|
-
- when the repo ESLint or team convention requires Russian titles, follow that; otherwise use clear English business phrases.
|
|
29
|
-
- E2E test title format (`test(...)` / `it(...)`):
|
|
30
|
-
- before the scenario description, include a **numbered prefix** in the form: `PREFIX-XXX Scenario description`.
|
|
31
|
-
- `PREFIX` — abbreviation from the **first letters of words** in the entity under test, written **in Latin uppercase**.
|
|
32
|
-
- example: `OrderHistory` → `OH`, `BillingReport` → `BR`.
|
|
33
|
-
- `XXX` — sequential test number **with three digits and leading zeros**: `001`, `002`, `010`, `123`, etc.
|
|
34
|
-
- full e2e test title example (Russian locale in consumer app):
|
|
35
|
-
- `test('OH-001 Отображается список заказов', async ({ page }) => { ... })` <!-- i18n-keep: E5 --> (Order list is displayed)
|
|
36
|
-
- within one entity (`PREFIX`), test numbers must form a **consistent sequence** with no duplicate numbers.
|
|
37
|
-
|
|
38
|
-
# data-testid for e2e
|
|
39
|
-
|
|
40
|
-
- **Selector priority:** `data-testid` for stable elements; `getByRole` and `getByLabel` for forms and accessible elements.
|
|
41
|
-
- **Naming:** `{parent}__{element}` scheme (for example, `history-page__title`, `history-page__recognition-banner__attach-files-button`).
|
|
42
|
-
- **Where to add:** on page root containers and key interactive elements (buttons, links, fields) that page objects target.
|
|
43
|
-
- **When changing UI:** update data-testid in components and matching selectors in page objects; cross-check with `*.cases.md`.
|
|
44
|
-
|
|
45
|
-
# Agent requirement
|
|
46
|
-
|
|
47
|
-
When adding/changing e2e tests:
|
|
48
|
-
|
|
49
|
-
- First read the matching `*.cases.md` and sync scenario titles.
|
|
50
|
-
- Place specs next to plans in the same directory.
|
|
51
|
-
- Reuse shared page objects and helpers instead of copying selectors directly into every test.
|
|
52
|
-
|
|
53
|
-
See also **`testing/playwright-agents.md`** for planner/generator/healer.
|
|
81
|
+
- Scenario plans: `*.cases.md` files — canonical source of scenarios.
|
|
82
|
+
- Tests: `*.spec.ts` files — Playwright scenario implementations.
|
|
83
|
+
- Shared utilities and abstractions: `app/__tests__/e2e/**/_shared/**` — constants, fluent interfaces, helpers.
|
|
84
|
+
- `data-testid` naming scheme: `{parent}__{element}` — example `history-page__title`, `history-page__recognition-banner__attach-files-button`.
|
|
85
|
+
- `PREFIX-XXX` example: `OrderHistory` → `OH`, `BillingReport` → `BR`; Russian example — `test('OH-001 Отображается список заказов', async ({ page }) => { ... })` <!-- i18n-keep: E5 --> (Order list is displayed).
|
|
86
|
+
- Page object example filename: `OrderHistoryPage.ts` (the seed test pointer lives at `app/__tests__/e2e/seed.spec.ts`).
|
|
87
|
+
- `## Stack notes` content is stripped by `scripts/check-shared-core-drift.sh` before byte-comparing this file against `_shared/core/testing/testing-principles.md`; keep prose above (core content) verbatim against the core file.
|
|
88
|
+
|
|
89
|
+
See also **`testing/playwright-agents.md`** for planner/generator/healer.
|
|
@@ -1,83 +1,112 @@
|
|
|
1
1
|
---
|
|
2
|
+
description: Unit and integration tests (Testing Library and project runner)
|
|
2
3
|
paths:
|
|
3
|
-
- app/src/**/*.spec.ts
|
|
4
|
-
- app/src/**/*.
|
|
5
|
-
- app/
|
|
6
|
-
- app/
|
|
4
|
+
- app/src/**/*.spec.{ts,tsx}
|
|
5
|
+
- app/src/**/*.test.{ts,tsx}
|
|
6
|
+
- app/__tests__/unit/**/*.spec.{ts,tsx}
|
|
7
|
+
- app/__tests__/unit/**/*.test.{ts,tsx}
|
|
7
8
|
impact: MEDIUM
|
|
8
9
|
---
|
|
9
10
|
|
|
10
|
-
#
|
|
11
|
+
# Testing principles
|
|
11
12
|
|
|
12
|
-
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
- **
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
13
|
+
Stack-agnostic; concrete paths, runners, and selectors live in the stack adapter (`## Stack notes`).
|
|
14
|
+
|
|
15
|
+
## Behavior vs. implementation
|
|
16
|
+
|
|
17
|
+
- Verify **behavior and business rules**, not implementation or internal details.
|
|
18
|
+
|
|
19
|
+
## File naming
|
|
20
|
+
|
|
21
|
+
- For **new** tests use `*.spec.ts` / `*.spec.tsx`. Do not rename existing `*.test.ts` / `*.test.tsx` without a separate task (legacy).
|
|
22
|
+
|
|
23
|
+
## Runner and matchers
|
|
24
|
+
|
|
25
|
+
- Use the project's runner (Jest or Vitest are common); components — the project's Testing Library integration. Reuse existing matchers — no new micro-framework.
|
|
26
|
+
|
|
27
|
+
## Test title locale
|
|
28
|
+
|
|
29
|
+
- Consumer apps **may use the project locale** (often Russian) — clear business phrases stating what is checked and the expected outcome.
|
|
30
|
+
- When ESLint enforces the locale (e.g. `jest/valid-title`): each sentence must start with a **capital letter** (including after `.`, `!`, `?`); a space after `.` followed by a lowercase letter is forbidden ("capital after period" violation).
|
|
20
31
|
|
|
21
32
|
Good (Russian locale in consumer app):
|
|
22
33
|
|
|
23
34
|
- `it('Возвращает пустой список. Пользователь не авторизован', () => {})` <!-- i18n-keep: E5 --> (Returns empty list. User is not authorized)
|
|
24
|
-
- `it('При ошибке сети показывается сообщение об ошибке', () => {})` <!-- i18n-keep: E5 --> (On network error, an error message is shown)
|
|
25
35
|
|
|
26
36
|
Bad (no capital after period; or wrong locale for configured ESLint):
|
|
27
37
|
|
|
28
38
|
- `it('Возвращает пустой список. пользователь не авторизован', () => {})` <!-- i18n-keep: E5 -->
|
|
29
|
-
- `it('Returns empty list when user is guest', () => {})`
|
|
39
|
+
- `it('Returns empty list when user is guest', () => {})` (wrong locale if ESLint enforces Russian)
|
|
40
|
+
|
|
41
|
+
## Isolation and mocks
|
|
42
|
+
|
|
43
|
+
- Mock at the **public-contract boundary**; use the project's accepted HTTP/API/store mock approach. Do not mock what is part of the feature's public contract if that breaks the test's meaning.
|
|
44
|
+
|
|
45
|
+
## Coverage of cross-cutting modules
|
|
46
|
+
|
|
47
|
+
- When changing a **shared cross-cutting module** (e.g. HTTP client body parsing, headers, error / auth handling) — **update or add behavior tests** covering success, error, and edge branches relevant to the module under change.
|
|
48
|
+
|
|
49
|
+
## Data transformation coverage
|
|
30
50
|
|
|
31
|
-
|
|
51
|
+
- Data transformation functions with computed fields and branches must have unit tests covering edge cases (boundary values, missing fields, unexpected value combinations).
|
|
32
52
|
|
|
33
|
-
|
|
34
|
-
- Assertions:
|
|
35
|
-
- DOM matchers for Testing Library as wired in the project (`toBeInTheDocument`, `toHaveTextContent`, etc.).
|
|
36
|
-
- Interactions:
|
|
37
|
-
- `userEvent` from `@testing-library/user-event`.
|
|
53
|
+
## Reuse fixtures over ad-hoc random data
|
|
38
54
|
|
|
39
|
-
|
|
55
|
+
- Prefer shared fixtures / handlers from the project's accepted mocks module; do not duplicate interfaces in tests. Use the API response types (DTO types) and the **target domain types** from the project's public type surface.
|
|
40
56
|
|
|
41
|
-
|
|
42
|
-
- mock the store (via test-store) or use the project's accepted HTTP/API mock approach.
|
|
43
|
-
- Do not mock what is part of the feature's public contract if that breaks the test's meaning.
|
|
57
|
+
## E2E: one canonical scenario plan per feature
|
|
44
58
|
|
|
45
|
-
|
|
59
|
+
- For each feature keep a **single canonical scenario plan** (distinct from implementation specs; the stack adapter names the file — typically `*.cases.md`).
|
|
46
60
|
|
|
47
|
-
|
|
48
|
-
- Cover meaningful branches: successful JSON, HTTP error, network, auth scenarios relevant to the project.
|
|
61
|
+
## E2E: scenario ↔ test traceability
|
|
49
62
|
|
|
50
|
-
|
|
63
|
+
- Every scenario has a corresponding test. **Do not weaken** assertions to match an outdated implementation — tests must reflect business expectations from the plan. Colocate plan and executable tests in the same directory.
|
|
51
64
|
|
|
52
|
-
|
|
53
|
-
- In mapper tests, pay special attention to edge cases and business-rule regression (for example, boundary values, missing fields, unexpected value combinations).
|
|
65
|
+
## E2E: page objects / shared helpers
|
|
54
66
|
|
|
55
|
-
|
|
67
|
+
- Prefer page objects and shared helpers over scattered selectors and per-test setup duplication.
|
|
56
68
|
|
|
57
|
-
|
|
69
|
+
## E2E: stable identifiers (PREFIX-XXX)
|
|
70
|
+
|
|
71
|
+
- When scenarios need stable IDs, prefix the title with `PREFIX-XXX`: `PREFIX` = first letters of words in the entity under test (Latin uppercase); `XXX` = sequential number with three digits and leading zeros. Within one `PREFIX`, numbers must form a consistent sequence with no duplicates.
|
|
72
|
+
- Example: `test('OH-001 Отображается список заказов', async ({ page }) => { ... })` <!-- i18n-keep: E5 --> (Order list is displayed)
|
|
73
|
+
|
|
74
|
+
## E2E: selector priority
|
|
75
|
+
|
|
76
|
+
- Prefer role/label selectors for accessibility and forms; fall back to `data-testid` for stable elements. Use a **hierarchical naming convention** on page roots and key interactive elements (stack adapter defines the scheme — typically `{parent}__{element}`).
|
|
77
|
+
|
|
78
|
+
## E2E: keep plans and selectors in sync with UI
|
|
79
|
+
|
|
80
|
+
- When changing UI: update selectors in page objects and cross-check with the scenario plan. When adding/changing tests: read the matching plan and sync scenario titles first.
|
|
81
|
+
|
|
82
|
+
## Stack notes
|
|
83
|
+
|
|
84
|
+
- `render` from `@testing-library/react` for component tests.
|
|
85
|
+
- `userEvent` from `@testing-library/user-event` for interactions.
|
|
86
|
+
- DOM matchers as wired in the project (`toBeInTheDocument`, `toHaveTextContent`, …).
|
|
87
|
+
- `jest/valid-title` ESLint rule in `app/eslint.config.mjs` enforces the Russian capital-after-period rule (when configured).
|
|
88
|
+
- `@/types` and `@/api` imports — types come from the public API surface, never duplicated in tests.
|
|
89
|
+
- `app/src/mocks/**` — shared fixtures and MSW handlers live here (or repo equivalent).
|
|
90
|
+
- HTTP-client behavior tests live next to the client module in `app/src/lib/clients/**` (prefer `*.spec.ts`); when dual-glob consumer layout is used, the mirrored `app/__tests__/unit/lib/clients/**` path is also accepted.
|
|
91
|
+
- UI test placement: sibling `*.spec.tsx` — no `__tests__/unit/` subfolder inside the component folder; an existing `__tests__` layout in `api/services` is acceptable — do not break it for UI uniformity.
|
|
92
|
+
- `## Stack notes` content is stripped by `scripts/check-shared-core-drift.sh` before byte-comparing this file against `_shared/core/testing/testing-principles.md`; keep prose above (core content) verbatim against the core file.
|
|
58
93
|
|
|
59
|
-
- Follow existing test structure and patterns in the repository: `*.spec.ts(x)` next to the module or in a shared test directory — as in neighboring features.
|
|
60
|
-
- Add tests for critical logic branches and edge cases.
|
|
61
|
-
- When working with data:
|
|
62
|
-
- use **response types** from the API (DTO types) and **target domain types** from `@/types`; do not duplicate interfaces in tests;
|
|
63
|
-
- when possible, rely on data and handlers from `app/src/mocks/**` (or repo equivalent), not ad-hoc random test data.
|
|
64
|
-
- Placement:
|
|
65
|
-
- for **UI components** — **do not create** a `__tests__` subdirectory inside the component folder; the test is a sibling `*.spec.tsx`.
|
|
66
|
-
- in **other modules** (for example `api/services`) an existing `__tests__` layout is acceptable — do not break it for UI uniformity.
|
|
67
|
-
- **new** files — `*.spec.ts` / `*.spec.tsx` (see "File names" above).
|
|
68
94
|
## Incorrect
|
|
69
95
|
|
|
96
|
+
Title violates capital-after-period rule (Russian locale). The rule's enforcement (`jest/valid-title`) will reject this in CI.
|
|
97
|
+
|
|
70
98
|
```ts
|
|
71
|
-
it('
|
|
99
|
+
it('возвращает пустой список. пользователь не авторизован', () => { <!-- i18n-keep: E5 -->
|
|
100
|
+
expect(result).toEqual([]);
|
|
101
|
+
});
|
|
72
102
|
```
|
|
73
103
|
|
|
74
|
-
- `it('Возвращает пустой список. пользователь не авторизован', () => {})` <!-- i18n-keep: E5 -->
|
|
75
|
-
|
|
76
104
|
## Correct
|
|
77
105
|
|
|
78
|
-
|
|
79
|
-
it('Возвращает пустой список. Пользователь не авторизован', () => {})
|
|
80
|
-
```
|
|
81
|
-
<!-- i18n-keep: E5 -->
|
|
106
|
+
Title respects capital-after-period rule.
|
|
82
107
|
|
|
83
|
-
|
|
108
|
+
```ts
|
|
109
|
+
it('Возвращает пустой список. Пользователь не авторизован', () => { <!-- i18n-keep: E5 -->
|
|
110
|
+
expect(result).toEqual([]);
|
|
111
|
+
});
|
|
112
|
+
```
|
|
@@ -20,8 +20,6 @@ Work request without `/task` — see **`tooling-and-review/agent-team-intake.md`
|
|
|
20
20
|
|---------|------|
|
|
21
21
|
| **`/task <desc>`** | **Preferred** — router → dynamic pipeline → first agent |
|
|
22
22
|
| `/task-continue <slug>` | After human gate or pause |
|
|
23
|
-
| `/feature-start <desc>` | Legacy: analyst-only start (no router) |
|
|
24
|
-
| `/feature-continue <slug>` | Alias of task-continue |
|
|
25
23
|
| `/spec-start [desc]` | Generate/bootstrap `docs/specs` — router intent `spec-gen` → analyst author mode → human gate |
|
|
26
24
|
| `/technical-retro [slug]` | Retro with agent team block |
|
|
27
25
|
|
|
@@ -51,6 +49,7 @@ Work request without `/task` — see **`tooling-and-review/agent-team-intake.md`
|
|
|
51
49
|
| `playwright-test-generator` | tests only | e2e spec generation |
|
|
52
50
|
| `playwright-test-healer` | tests only | failing/flaky e2e fixes |
|
|
53
51
|
| `tech-writer` | docs only | docs-only, feature/migration docs |
|
|
52
|
+
| `openspec-author` | `openspec/**` only | openspec-change (`/opsx:propose`, `/opsx:apply`, `/opsx:archive`, openspec refresh) |
|
|
54
53
|
|
|
55
54
|
Full prompts: `.claude/agents/*.md`. Artifact conventions: `.claude/team/README.md`; schema SoT: **agent-artifact-contracts**.
|
|
56
55
|
|
|
@@ -173,7 +172,7 @@ After each agent completes, verify its terminal manifest receipt, then let the o
|
|
|
173
172
|
|
|
174
173
|
## Legacy mode
|
|
175
174
|
|
|
176
|
-
If `pipeline.json` is missing
|
|
175
|
+
If `pipeline.json` is missing, fall back to fixed phases: analysis → development → review → testing.
|
|
177
176
|
|
|
178
177
|
## Skip pipeline when
|
|
179
178
|
|
|
@@ -192,6 +191,6 @@ When user describes a **non-trivial task** (not a question), suggest `/task <mes
|
|
|
192
191
|
|
|
193
192
|
## Preset authoring
|
|
194
193
|
|
|
195
|
-
**Product specs:** When `/task
|
|
194
|
+
**Product specs:** When `/task` or `/spec-start` touches pages/features/`docs/specs`: if INDEX exists and no generate intent → instruct next agent to load requestable **`product-specs`** (consume; soft-fail; never invent). If generate/bootstrap/`spec-gen` → load **`product-specs-authoring`** + skill **`spec-authoring`** inside **task-analyst** (not a separate pipeline step); pass created spec paths + INDEX diff in handoff; human gate must approve before feature-developer. No-op if INDEX absent and no author intent.
|
|
196
195
|
|
|
197
196
|
When editing `packages/ai-rules/presets/**`, follow **`tooling-and-review/preset-pr-checklist.md`** (+ twin-sync / layering / token-budget / leakage).
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Local overlay from .ai.local/ (consumer-owned rules with priority over preset rules) — MANDATORY
|
|
3
|
+
paths:
|
|
4
|
+
- "**/.ai.local/**"
|
|
5
|
+
- "**/AGENTS.md"
|
|
6
|
+
- "**/CLAUDE.md"
|
|
7
|
+
alwaysApply: false
|
|
8
|
+
impact: CRITICAL
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Local overlay (`.ai.local/`) — MANDATORY
|
|
12
|
+
|
|
13
|
+
This rule is mandatory. **You MUST** obey it on every turn, without exception.
|
|
14
|
+
|
|
15
|
+
## On every turn
|
|
16
|
+
|
|
17
|
+
1. **Probe** — before answering, run `ls -la .ai.local` from the repository root.
|
|
18
|
+
2. **Walk** — if `.ai.local/` exists at multiple levels (monorepo), read every level from root to leaf. **Deeper wins** in practice: more specific rules appear later in the assembled context and take precedence.
|
|
19
|
+
3. **Apply** — treat every `.ai.local/rules/*.md` and `.ai.local/conventions.md` as a higher-priority rule for this repo. The block below ("Authoring `.ai.local/rules/*.md`") defines the conventions.
|
|
20
|
+
4. **Conflict** — if a local rule conflicts with a preset rule, **the local rule wins**. If a local rule body contains `override: kill <preset-rule-name>`, drop that preset rule from your context window entirely.
|
|
21
|
+
5. **Acknowledge** — when answering a user question, briefly state which `.ai.local/` rules apply to the current task (one line is enough). Format: `Using .ai.local: <rule-name>(, <rule-name>)*`. If no `.ai.local/` exists, do NOT mention this rule.
|
|
22
|
+
|
|
23
|
+
If `.ai.local/` does not exist → **no-op**, do not error. Do not produce any log line about its absence.
|
|
24
|
+
|
|
25
|
+
## Authoring `.ai.local/rules/*.md` (consumer-side reference)
|
|
26
|
+
|
|
27
|
+
Each `.ai.local/rules/<name>.md` is a plain-markdown rule body. The model parses it as:
|
|
28
|
+
|
|
29
|
+
- Lines before `## Body` are scope metadata. Only `glob:` / `globs:` / `override:` lines are recognised.
|
|
30
|
+
- Everything from `## Body` onward is the rule body.
|
|
31
|
+
- `glob: always` → always-on. Counts against your context budget.
|
|
32
|
+
- `globs: <comma-separated globs>` → on-demand; applies only when matching files are in focus.
|
|
33
|
+
- `override: kill <preset-rule-name>` → drop that preset rule from context.
|
|
34
|
+
|
|
35
|
+
Keep files ≤ 120 lines. Match the style of preset rules (short sections, bullets, code examples).
|
|
36
|
+
|
|
37
|
+
## Limitations (read this)
|
|
38
|
+
|
|
39
|
+
- Cursor/Claude do **not** natively read `.ai.local/`. This rule is a **prompt-only** mechanism: it asks you, the model, to read and apply the files. Reliability is high but not 100%.
|
|
40
|
+
- If a user adds a file to `.ai.local/` mid-session, **restart the session** to be sure it is picked up.
|
|
41
|
+
- "Priority" is **contextual**, not enforced. Always re-read the local rule before answering questions that touch it.
|
|
42
|
+
- This rule is **not** session-start (Claude convention); it loads on touch of `.ai.local/**` or `AGENTS.md`/`CLAUDE.md`. The "every turn" mandate is enforced by the body text, not by Cursor/Claude loading semantics.
|
|
43
|
+
|
|
44
|
+
## Pointers
|
|
45
|
+
|
|
46
|
+
- Authoring guide: `docs/LOCAL-OVERLAY.md` in the `@bonesofspring/ai-rules` package.
|
|
47
|
+
- Living gotchas alternative: `.claude/team/conventions.md`.
|
|
48
|
+
- Root `AGENTS.md` reinforces this rule with a `MANDATORY` section.
|
|
@@ -19,11 +19,15 @@ Checklist for PRs that touch `packages/ai-rules/presets/**` (and dogfood `.curso
|
|
|
19
19
|
- [ ] **Core:** if `_shared/core/**` changed — all `<!-- shared-core: … -->` consumers updated (or documented intentional fork)
|
|
20
20
|
- [ ] **Twin:** Cursor change → Claude twin **same PR** (**FAIL** if missing on next, nuxt, svelte, ios-swift, android-kotlin, go, java, mcp-ts, php-hexagonal, and php-laravel — see `preset-twin-sync`)
|
|
21
21
|
- [ ] **Mapping:** `claude/<stack>/rules/README.md` mapping table is current
|
|
22
|
-
- [ ] **Token budget:** alwaysApply
|
|
22
|
+
- [ ] **Token budget:** Cursor `alwaysApply` ≤ 4 (4th slot reserved for `ai-local-overlay`); Claude session-start exactly 3; meta rules not always-on
|
|
23
|
+
- [ ] **Local overlay coverage:** every installable stack ships `ai-local-overlay.mdc` (Cursor) and `ai-local-overlay.md` (Claude) with `MANDATORY` + acknowledgement format + `docs/LOCAL-OVERLAY.md` pointer; Claude twin listed in `claude/<stack>/rules/README.md` mapping table. Run `packages/ai-rules/scripts/check-local-overlay.sh`.
|
|
23
24
|
- [ ] **Leakage:** no foreign stack agent stems / handoff strings (`preset-no-cross-stack-leakage`)
|
|
25
|
+
- [ ] **Hook-only lifecycle:** `status.json` / `metrics.json` writes happen only inside `hooks/`; agents read but never rewrite lifecycle fields. Run `packages/ai-rules/scripts/check-hook-only-lifecycle.sh`.
|
|
26
|
+
- [ ] **Chain fork:** the byte-wise MD5 uniqueness of `chain-team-phases.sh` across the 10 stacks × 2 platforms (20 hooks) holds. Run `packages/ai-rules/scripts/check-chain-hook-coverage.sh` and `packages/ai-rules/scripts/test-chain-team-phases-coverage.mjs`.
|
|
24
27
|
- [ ] **Twin depth:** domain ≥15 lines; thin aliases documented
|
|
25
28
|
- [ ] **README:** stack `rules/README.md` core→stack mapping / catalog updated if stems added
|
|
26
29
|
- [ ] **CHANGELOG / package README:** note when public preset paths or install surface change
|
|
30
|
+
- [ ] **i18n anchors:** kept-marked Cyrillic fragments in `tests-unit.md(c)` stay consistent with their English counterparts. Run `packages/ai-rules/scripts/check-preset-i18n.sh`.
|
|
27
31
|
- [ ] **Dogfood:** run `packages/ai-rules/scripts/sync-dogfood-cursor.sh` (or document intentional skip) when maintaining this monorepo
|
|
28
32
|
- [ ] **shared-core drift:** for embed-mode stems, run `packages/ai-rules/scripts/check-shared-core-drift.sh` (or document intentional fork)
|
|
29
33
|
|
|
@@ -17,12 +17,16 @@ Invariants for rule loading in an **installed** preset (consumer app).
|
|
|
17
17
|
|
|
18
18
|
| Platform | Always-on | Cap |
|
|
19
19
|
|----------|-----------|-----|
|
|
20
|
-
| Cursor | `alwaysApply: true` | **≤
|
|
20
|
+
| Cursor | `alwaysApply: true` | **≤ 4** |
|
|
21
21
|
| Claude | rules **without** `paths:` | **exactly 3** |
|
|
22
22
|
|
|
23
|
+
**Cursor 4th slot is reserved for `ai-local-overlay`** (consumer-owned `.ai.local/` rules). If you do not need local overlay, demote that rule to `globs: ["**/.ai.local/**"]` and revert to ≤3.
|
|
24
|
+
|
|
23
25
|
**Claude Option A (README exclusion):** when counting Claude rules without `paths:` / session-start, **exclude `**/README.md`** (topic indexes are not session-start rules). The intended session-start trio remains **exactly 3**; body budget sums **only those 3** rules.
|
|
24
26
|
|
|
25
|
-
Session-start body budget
|
|
27
|
+
Session-start body budget:
|
|
28
|
+
- Claude trio: ≤140 lines total (stretch ≤120).
|
|
29
|
+
- Cursor 4-set: ≤170 lines total (4 rules including `ai-local-overlay`).
|
|
26
30
|
|
|
27
31
|
## Meta / author rules
|
|
28
32
|
|
|
@@ -38,4 +42,4 @@ Orchestrator, feature-delivery, code-review, post-change gates, domain globs —
|
|
|
38
42
|
|
|
39
43
|
## Verifier
|
|
40
44
|
|
|
41
|
-
build-verifier **FAIL** if alwaysApply
|
|
45
|
+
build-verifier **FAIL** if Cursor `alwaysApply` count exceeds 4, Claude session-start count exceeds 3 (Claude count **excludes `**/README.md`**), or if a `preset-*` meta rule is marked always-on.
|
|
@@ -39,6 +39,8 @@ Cursor `.mdc` — **SoT per stack**. Claude topic `.md` — derived twin.
|
|
|
39
39
|
|
|
40
40
|
- **Domain** rules: ≥15 body lines (FAIL if thin without documented alias reason).
|
|
41
41
|
- **Thin aliases** (`agent-team-intake`, `technical-retro`): may be shorter (soft) if they only point to a command/skill.
|
|
42
|
+
- **Slim-companion rules** (UI-edit bundle, slim app-cores, slim tooling): may be shorter than 15 lines **if and only if** the body is a pointer into shared-core / stack-prose (no standalone prose). Examples live in stack `rules/README.md` (e.g. `cursor/next/rules/README.md` "UI-edit bundle" intent).
|
|
43
|
+
- **Mechanical enforcement is pending.** Today build-verifier excludes only `agent-team-intake` / `technical-retro` / `preset-layering`; slim-companion rules currently pass under the same human-judgement path as thin aliases. Follow-up: add `allow_slim_stems` to `packages/ai-rules/scripts/check-preset-token-budget.sh` analogous to `trio_stems_allowlist`.
|
|
42
44
|
|
|
43
45
|
## Severity (build-verifier)
|
|
44
46
|
|
|
@@ -106,13 +106,10 @@ Prefer **`executing`** for pipeline mode. Legacy: `analysis`, `development`, `re
|
|
|
106
106
|
/technical-retro <slug>
|
|
107
107
|
```
|
|
108
108
|
|
|
109
|
-
Legacy: `/feature-start`, `/feature-continue`.
|
|
110
|
-
|
|
111
109
|
## Git
|
|
112
110
|
|
|
113
111
|
Commit task artifacts if you want them to survive `ai-rules clean claude`. Or copy finished tasks to `docs/agent-workflow/tasks/<slug>/`.
|
|
114
112
|
|
|
115
|
-
|
|
116
113
|
## specMode, applyReadiness, memlog
|
|
117
114
|
|
|
118
115
|
- **`specMode`:** `consume` | `generate` | `none` — primary in `brief.md` `## Spec mode`; optional top-level `pipeline.json` `specMode`. `none` skips INDEX/author mode (spike/research).
|
|
@@ -54,6 +54,7 @@ Role subagents for the Claude Code team pipeline.
|
|
|
54
54
|
| Agent | File | Production code |
|
|
55
55
|
|-------|------|-----------------|
|
|
56
56
|
| Tech writer | `tech-writer.md` | docs only |
|
|
57
|
+
| OpenSpec author | `openspec-author.md` | `openspec/**` only (proposal/design/tasks/spec deltas; reads `app/**` for evidence) |
|
|
57
58
|
|
|
58
59
|
Copied to `.claude/agents/` on `ai-rules init claude --preset nuxt`.
|
|
59
60
|
|
|
@@ -86,7 +87,6 @@ Default SoT — YAML `model` in each agent file. Optional `steps[].model` (`chea
|
|
|
86
87
|
|---------|---------|
|
|
87
88
|
| `/task <desc>` | Router → dynamic pipeline → first agent |
|
|
88
89
|
| `/task-continue <slug>` | After a human gate |
|
|
89
|
-
| `/feature-start`, `/feature-continue` | Legacy (compatibility) |
|
|
90
90
|
|
|
91
91
|
Rule: `rules/tooling-and-review/agent-team-orchestrator.md`. Plan: `pipeline.json` under `.claude/team/tasks/<slug>/`.
|
|
92
92
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: feature-developer
|
|
3
|
-
description: Feature implementation specialist for Nuxt 3 stack. Implements tasks from decomposition.md following feature-delivery workflow. Use after brief approval via /task-continue
|
|
3
|
+
description: Feature implementation specialist for Nuxt 3 stack. Implements tasks from decomposition.md following feature-delivery workflow. Use after brief approval via /task-continue, or when explicitly asked to implement an approved task slug.
|
|
4
4
|
model: inherit
|
|
5
5
|
---
|
|
6
6
|
|