@bonesofspring/ai-rules 0.2.19 → 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 +42 -0
- package/README.md +17 -2
- package/bin/cli.js +83 -6
- package/package.json +5 -2
- package/presets/_shared/README.md +4 -3
- 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/agent-team/task-classification.md +21 -0
- 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/quality/debug-investigation.md +24 -0
- package/presets/_shared/core/quality/verification-before-completion.md +25 -0
- package/presets/_shared/core/review/receiving-code-review.md +24 -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/build-verifier.md +6 -0
- package/presets/claude/android-kotlin/agents/ci-investigator.md +1 -0
- package/presets/claude/android-kotlin/agents/code-reviewer.md +2 -0
- package/presets/claude/android-kotlin/agents/debugger.md +5 -0
- package/presets/claude/android-kotlin/agents/feature-developer.md +8 -1
- package/presets/claude/android-kotlin/agents/openspec-author.md +163 -0
- package/presets/claude/android-kotlin/agents/task-analyst.md +11 -1
- package/presets/claude/android-kotlin/agents/task-router.md +19 -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/android-kotlin/skills/code-review/SKILL.md +6 -0
- package/presets/claude/android-kotlin/skills/debug-investigation/SKILL.md +33 -5
- package/presets/claude/go/README.md +1 -1
- package/presets/claude/go/agents/README.md +3 -2
- package/presets/claude/go/agents/build-verifier.md +6 -0
- package/presets/claude/go/agents/ci-investigator.md +1 -0
- package/presets/claude/go/agents/code-reviewer.md +2 -0
- package/presets/claude/go/agents/debugger.md +7 -0
- package/presets/claude/go/agents/feature-developer.md +7 -0
- package/presets/claude/go/agents/openspec-author.md +163 -0
- package/presets/claude/go/agents/task-analyst.md +10 -0
- package/presets/claude/go/agents/task-router.md +19 -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/go/skills/code-review/SKILL.md +6 -0
- package/presets/claude/go/skills/debug-investigation/SKILL.md +32 -4
- package/presets/claude/ios-swift/agents/README.md +3 -2
- package/presets/claude/ios-swift/agents/build-verifier.md +6 -0
- package/presets/claude/ios-swift/agents/ci-investigator.md +1 -0
- package/presets/claude/ios-swift/agents/code-reviewer.md +2 -0
- package/presets/claude/ios-swift/agents/debugger.md +5 -0
- package/presets/claude/ios-swift/agents/feature-developer.md +8 -1
- package/presets/claude/ios-swift/agents/openspec-author.md +163 -0
- package/presets/claude/ios-swift/agents/task-analyst.md +11 -1
- package/presets/claude/ios-swift/agents/task-router.md +19 -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/ios-swift/skills/code-review/SKILL.md +6 -0
- package/presets/claude/ios-swift/skills/debug-investigation/SKILL.md +33 -5
- package/presets/claude/java/CLAUDE.md +1 -1
- package/presets/claude/java/agents/README.md +3 -2
- package/presets/claude/java/agents/build-verifier.md +6 -0
- package/presets/claude/java/agents/ci-investigator.md +1 -0
- package/presets/claude/java/agents/code-reviewer.md +2 -0
- package/presets/claude/java/agents/debugger.md +7 -0
- package/presets/claude/java/agents/feature-developer.md +7 -0
- package/presets/claude/java/agents/openspec-author.md +163 -0
- package/presets/claude/java/agents/task-analyst.md +10 -0
- package/presets/claude/java/agents/task-router.md +19 -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/java/skills/code-review/SKILL.md +6 -0
- package/presets/claude/java/skills/debug-investigation/SKILL.md +32 -4
- package/presets/claude/mcp-ts/agents/build-verifier.md +6 -0
- package/presets/claude/mcp-ts/agents/feature-developer.md +7 -0
- package/presets/claude/mcp-ts/agents/task-analyst.md +11 -1
- package/presets/claude/mcp-ts/agents/task-router.md +14 -0
- 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/mcp-ts/skills/code-review/SKILL.md +6 -0
- package/presets/claude/mcp-ts/skills/debug-investigation/SKILL.md +31 -3
- 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 +17 -1
- package/presets/claude/next/agents/ci-investigator.md +1 -0
- package/presets/claude/next/agents/code-reviewer.md +2 -0
- package/presets/claude/next/agents/debugger.md +5 -0
- package/presets/claude/next/agents/feature-developer.md +8 -1
- package/presets/claude/next/agents/openspec-author.md +163 -0
- package/presets/claude/next/agents/task-analyst.md +12 -2
- package/presets/claude/next/agents/task-router.md +19 -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/skills/code-review/SKILL.md +6 -0
- package/presets/claude/next/skills/debug-investigation/SKILL.md +29 -14
- package/presets/claude/next/team/README.md +0 -3
- package/presets/claude/nuxt/agents/README.md +1 -1
- package/presets/claude/nuxt/agents/build-verifier.md +6 -0
- package/presets/claude/nuxt/agents/ci-investigator.md +1 -0
- package/presets/claude/nuxt/agents/code-reviewer.md +2 -0
- package/presets/claude/nuxt/agents/debugger.md +5 -0
- package/presets/claude/nuxt/agents/feature-developer.md +8 -1
- package/presets/claude/nuxt/agents/openspec-author.md +163 -0
- package/presets/claude/nuxt/agents/task-analyst.md +12 -2
- package/presets/claude/nuxt/agents/task-router.md +19 -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/skills/code-review/SKILL.md +6 -0
- package/presets/claude/nuxt/skills/debug-investigation/SKILL.md +29 -12
- 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/build-verifier.md +6 -0
- package/presets/claude/php-hexagonal/agents/ci-investigator.md +1 -0
- package/presets/claude/php-hexagonal/agents/code-reviewer.md +2 -0
- package/presets/claude/php-hexagonal/agents/debugger.md +7 -0
- package/presets/claude/php-hexagonal/agents/feature-developer.md +7 -0
- package/presets/claude/php-hexagonal/agents/openspec-author.md +163 -0
- package/presets/claude/php-hexagonal/agents/task-analyst.md +10 -0
- package/presets/claude/php-hexagonal/agents/task-router.md +19 -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-hexagonal/skills/code-review/SKILL.md +6 -0
- package/presets/claude/php-hexagonal/skills/debug-investigation/SKILL.md +32 -4
- package/presets/claude/php-laravel/agents/README.md +3 -2
- package/presets/claude/php-laravel/agents/build-verifier.md +6 -0
- package/presets/claude/php-laravel/agents/ci-investigator.md +1 -0
- package/presets/claude/php-laravel/agents/code-reviewer.md +2 -0
- package/presets/claude/php-laravel/agents/debugger.md +7 -0
- package/presets/claude/php-laravel/agents/feature-developer.md +7 -0
- package/presets/claude/php-laravel/agents/openspec-author.md +163 -0
- package/presets/claude/php-laravel/agents/task-analyst.md +10 -0
- package/presets/claude/php-laravel/agents/task-router.md +19 -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/php-laravel/skills/code-review/SKILL.md +6 -0
- package/presets/claude/php-laravel/skills/debug-investigation/SKILL.md +32 -4
- package/presets/claude/svelte/agents/README.md +1 -1
- package/presets/claude/svelte/agents/build-verifier.md +6 -0
- package/presets/claude/svelte/agents/ci-investigator.md +1 -0
- package/presets/claude/svelte/agents/code-reviewer.md +2 -0
- package/presets/claude/svelte/agents/debugger.md +5 -0
- package/presets/claude/svelte/agents/feature-developer.md +8 -1
- package/presets/claude/svelte/agents/openspec-author.md +163 -0
- package/presets/claude/svelte/agents/task-analyst.md +12 -2
- package/presets/claude/svelte/agents/task-router.md +19 -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/skills/code-review/SKILL.md +6 -0
- package/presets/claude/svelte/skills/debug-investigation/SKILL.md +29 -12
- 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/build-verifier.md +6 -0
- package/presets/cursor/android-kotlin/agents/ci-investigator.md +1 -0
- package/presets/cursor/android-kotlin/agents/code-reviewer.md +2 -0
- package/presets/cursor/android-kotlin/agents/debugger.md +5 -0
- package/presets/cursor/android-kotlin/agents/feature-developer.md +8 -1
- package/presets/cursor/android-kotlin/agents/openspec-author.md +164 -0
- package/presets/cursor/android-kotlin/agents/task-analyst.md +11 -1
- package/presets/cursor/android-kotlin/agents/task-router.md +19 -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/android-kotlin/skills/code-review/SKILL.md +6 -0
- package/presets/cursor/android-kotlin/skills/debug-investigation/SKILL.md +33 -5
- package/presets/cursor/go/README.md +6 -6
- package/presets/cursor/go/agents/README.md +3 -2
- package/presets/cursor/go/agents/build-verifier.md +6 -0
- package/presets/cursor/go/agents/ci-investigator.md +1 -0
- package/presets/cursor/go/agents/code-reviewer.md +2 -0
- package/presets/cursor/go/agents/debugger.md +7 -0
- package/presets/cursor/go/agents/feature-developer.md +7 -0
- package/presets/cursor/go/agents/openspec-author.md +164 -0
- package/presets/cursor/go/agents/task-analyst.md +10 -0
- package/presets/cursor/go/agents/task-router.md +19 -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/go/skills/code-review/SKILL.md +6 -0
- package/presets/cursor/go/skills/debug-investigation/SKILL.md +32 -4
- 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/build-verifier.md +6 -0
- package/presets/cursor/ios-swift/agents/ci-investigator.md +1 -0
- package/presets/cursor/ios-swift/agents/code-reviewer.md +2 -0
- package/presets/cursor/ios-swift/agents/debugger.md +5 -0
- package/presets/cursor/ios-swift/agents/feature-developer.md +8 -1
- package/presets/cursor/ios-swift/agents/openspec-author.md +164 -0
- package/presets/cursor/ios-swift/agents/task-analyst.md +11 -1
- package/presets/cursor/ios-swift/agents/task-router.md +19 -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/ios-swift/skills/code-review/SKILL.md +6 -0
- package/presets/cursor/ios-swift/skills/debug-investigation/SKILL.md +33 -5
- package/presets/cursor/java/AGENTS.md +1 -1
- package/presets/cursor/java/agents/README.md +3 -2
- package/presets/cursor/java/agents/build-verifier.md +6 -0
- package/presets/cursor/java/agents/ci-investigator.md +1 -0
- package/presets/cursor/java/agents/code-reviewer.md +2 -0
- package/presets/cursor/java/agents/debugger.md +7 -0
- package/presets/cursor/java/agents/feature-developer.md +7 -0
- package/presets/cursor/java/agents/openspec-author.md +164 -0
- package/presets/cursor/java/agents/task-analyst.md +10 -0
- package/presets/cursor/java/agents/task-router.md +19 -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/java/skills/code-review/SKILL.md +6 -0
- package/presets/cursor/java/skills/debug-investigation/SKILL.md +32 -4
- package/presets/cursor/mcp-ts/agents/build-verifier.md +6 -0
- package/presets/cursor/mcp-ts/agents/feature-developer.md +7 -0
- package/presets/cursor/mcp-ts/agents/task-analyst.md +11 -1
- package/presets/cursor/mcp-ts/agents/task-router.md +14 -0
- 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/mcp-ts/skills/code-review/SKILL.md +6 -0
- package/presets/cursor/mcp-ts/skills/debug-investigation/SKILL.md +31 -3
- 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 +17 -1
- package/presets/cursor/next/agents/ci-investigator.md +1 -0
- package/presets/cursor/next/agents/code-reviewer.md +2 -0
- package/presets/cursor/next/agents/debugger.md +5 -0
- package/presets/cursor/next/agents/feature-developer.md +8 -1
- package/presets/cursor/next/agents/openspec-author.md +164 -0
- package/presets/cursor/next/agents/task-analyst.md +12 -2
- package/presets/cursor/next/agents/task-router.md +19 -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/skills/code-review/SKILL.md +6 -0
- package/presets/cursor/next/skills/debug-investigation/SKILL.md +29 -14
- 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/build-verifier.md +6 -0
- package/presets/cursor/nuxt/agents/ci-investigator.md +1 -0
- package/presets/cursor/nuxt/agents/code-reviewer.md +2 -0
- package/presets/cursor/nuxt/agents/debugger.md +5 -0
- package/presets/cursor/nuxt/agents/feature-developer.md +8 -1
- package/presets/cursor/nuxt/agents/openspec-author.md +164 -0
- package/presets/cursor/nuxt/agents/task-analyst.md +12 -2
- package/presets/cursor/nuxt/agents/task-router.md +19 -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/skills/code-review/SKILL.md +6 -0
- package/presets/cursor/nuxt/skills/debug-investigation/SKILL.md +29 -12
- 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/build-verifier.md +6 -0
- package/presets/cursor/php-hexagonal/agents/ci-investigator.md +1 -0
- package/presets/cursor/php-hexagonal/agents/code-reviewer.md +2 -0
- package/presets/cursor/php-hexagonal/agents/debugger.md +7 -0
- package/presets/cursor/php-hexagonal/agents/feature-developer.md +7 -0
- package/presets/cursor/php-hexagonal/agents/openspec-author.md +164 -0
- package/presets/cursor/php-hexagonal/agents/task-analyst.md +10 -0
- package/presets/cursor/php-hexagonal/agents/task-router.md +19 -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-hexagonal/skills/code-review/SKILL.md +6 -0
- package/presets/cursor/php-hexagonal/skills/debug-investigation/SKILL.md +32 -4
- 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/build-verifier.md +6 -0
- package/presets/cursor/php-laravel/agents/ci-investigator.md +1 -0
- package/presets/cursor/php-laravel/agents/code-reviewer.md +2 -0
- package/presets/cursor/php-laravel/agents/debugger.md +7 -0
- package/presets/cursor/php-laravel/agents/feature-developer.md +7 -0
- package/presets/cursor/php-laravel/agents/openspec-author.md +164 -0
- package/presets/cursor/php-laravel/agents/task-analyst.md +10 -0
- package/presets/cursor/php-laravel/agents/task-router.md +19 -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/php-laravel/skills/code-review/SKILL.md +6 -0
- package/presets/cursor/php-laravel/skills/debug-investigation/SKILL.md +32 -4
- package/presets/cursor/svelte/README.md +6 -6
- package/presets/cursor/svelte/agents/README.md +1 -1
- package/presets/cursor/svelte/agents/build-verifier.md +6 -0
- package/presets/cursor/svelte/agents/ci-investigator.md +1 -0
- package/presets/cursor/svelte/agents/code-reviewer.md +2 -0
- package/presets/cursor/svelte/agents/debugger.md +5 -0
- package/presets/cursor/svelte/agents/feature-developer.md +8 -1
- package/presets/cursor/svelte/agents/openspec-author.md +164 -0
- package/presets/cursor/svelte/agents/task-analyst.md +12 -2
- package/presets/cursor/svelte/agents/task-router.md +19 -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/skills/code-review/SKILL.md +6 -0
- package/presets/cursor/svelte/skills/debug-investigation/SKILL.md +29 -12
- 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 -26
- 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
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: openspec-author
|
|
3
|
+
description: OpenSpec (spec-driven SDD) specialist. Explores openspec/specs/**, authors/refreshes/archives openspec/changes/** proposal–design–tasks–spec deltas per openspec/config.yaml schema. Reads app/** for evidence; never edits production code. Use when pipeline steps reference openspec/changes, /opsx:propose, /opsx:apply, /opsx:archive, openspec/specs, or scope is a change-id.
|
|
4
|
+
model: inherit
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
You are an **OpenSpec** (Fission AI spec-driven SDD) author for a frontend/backend agent team.
|
|
8
|
+
|
|
9
|
+
Your only writes target `openspec/**` (and team artifact manifests). Production code lives behind `feature-developer`; you are **docs / spec only**.
|
|
10
|
+
|
|
11
|
+
## When to load
|
|
12
|
+
|
|
13
|
+
You are invoked when:
|
|
14
|
+
|
|
15
|
+
- Pipeline step `agent` is `openspec-author`.
|
|
16
|
+
- Pipeline step `scope` is `openspec:<change-id>` (preferred) or `openspec-propose` (legacy alias — treat as `openspec:openspec-<change-id>` only when the handoff brief explicitly names the change-id).
|
|
17
|
+
- Prompt includes `/opsx:propose`, `/opsx:apply`, `/opsx:archive`, `openspec/changes`, `openspec/specs`, `openspec/config.yaml`, or `openspec validate`.
|
|
18
|
+
- Per task-analyst / solution-architect handoff, refresh an existing capability or scaffold a brand-new change.
|
|
19
|
+
|
|
20
|
+
If `openspec/` is absent in the repo, stop and report `blocked` with the message *"openspec/** not initialized — run `openspec init` first"* — never invent directories.
|
|
21
|
+
|
|
22
|
+
## Inputs
|
|
23
|
+
|
|
24
|
+
1. `.claude/team/tasks/<slug>/{brief.md, decomposition.md, architecture.md}` (Cursor: `.cursor/team/tasks/<slug>/`).
|
|
25
|
+
2. `.claude/team/tasks/<slug>/artifact-manifest.json` — read first, consume `artifactInputIds`.
|
|
26
|
+
3. `openspec/config.yaml` — schema, context block, `rules.proposal | specs | design | tasks`. **Source of truth** for word limits, Non-goals mandate, SHALL statement format, data-flow expectation, and task granularity. Never fork.
|
|
27
|
+
4. `openspec/specs/<capability>/spec.md` — surviving applied specs (the "as-is" target).
|
|
28
|
+
5. `openspec/changes/archive/<YYYY-MM-DD>-<change-id>/` — prior decisions (D-1..) and open questions (OQ-1..) reusable across changes.
|
|
29
|
+
6. Source tree for code-evidence reads only — `app/src/**`, `src/**`, or stack equivalent. **Never edit.** Cite path:line in requirements, scenarios, design notes.
|
|
30
|
+
7. Pipeline step `scope` — must be `openspec:<change-id>` (e.g. `openspec:MEDCARD-11762-sync-offline-consultation-spec`).
|
|
31
|
+
|
|
32
|
+
## Phase discipline (mirrors `/opsx:propose` → `/opsx:apply` → `/opsx:archive`)
|
|
33
|
+
|
|
34
|
+
Pipeline step `scope` may encode a single phase or full lifecycle. Match the body to the phase, do not skip phases within a single invocation.
|
|
35
|
+
|
|
36
|
+
### Phase 1 — Explore
|
|
37
|
+
|
|
38
|
+
1. Read `openspec/config.yaml`. Confirm `schema:` and the four `rules.*` blocks.
|
|
39
|
+
2. Read `openspec/specs/**/spec.md` (one file per capability) — note each capability's `## Purpose` and current `## Requirements`.
|
|
40
|
+
3. Read `openspec/changes/archive/**/proposal.md` for prior decisions and OQ defaults that map to this change.
|
|
41
|
+
4. Code-archaeology (read-only) on the affected source tree: list concrete routes, flags, slices, thunks, record statuses. Label every observation `code-evidence`.
|
|
42
|
+
5. Emit a capability delta as `NEW | MODIFIED | REMOVED | RENAMED` with affected file paths.
|
|
43
|
+
6. If a required source artefact is missing (e.g. `architecture.md` not produced), set `blocked` with the gap, do not invent.
|
|
44
|
+
|
|
45
|
+
### Phase 2 — Propose
|
|
46
|
+
|
|
47
|
+
Scaffold `openspec/changes/<change-id>/`:
|
|
48
|
+
|
|
49
|
+
```
|
|
50
|
+
openspec/changes/<change-id>/
|
|
51
|
+
├── .openspec.yaml # schema mirror, change-id, created date
|
|
52
|
+
├── proposal.md # Why / What Changes / Capabilities / Non-goals / Impact — under 500 words per config.rules.proposal
|
|
53
|
+
├── design.md # Context / Goals / Decisions (D-1..) / Data flow (mermaid) / Open questions (OQ-1..)
|
|
54
|
+
├── tasks.md # 1.1, 1.2, … — AC + verification checklists for future SDD
|
|
55
|
+
└── specs/<capability>/
|
|
56
|
+
└── spec.md # delta block: `## MODIFIED Requirements` and/or `## REMOVED Requirements`
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Hard constraints (read `config.yaml rules.proposal` first — they win):
|
|
60
|
+
|
|
61
|
+
- `proposal.md` ≤ 500 words.
|
|
62
|
+
- `## Non-goals` section mandatory (omit → `blocked`).
|
|
63
|
+
- `## What Changes` lists capability deltas **only**; no implementation steps.
|
|
64
|
+
- `## Capabilities` table groups deltas by capability slug; cite spec paths.
|
|
65
|
+
- Spec deltas use `## MODIFIED Requirements` heading (or `## REMOVED Requirements`); Each `### Requirement:` block carries `SHALL` statements and `#### Scenario:` Given/When/Then. Mirror existing capability voice.
|
|
66
|
+
- `design.md` data-flow is mermaid or ascii (no proprietary XML). Document **current as-is** unless the change is explicitly redesign.
|
|
67
|
+
- `tasks.md` 1.1, 1.2, 1.3 — each ≤ 5 acceptance bullets + verification note. **No production code in tasks**; tasks are **for future SDD implementation/tests**, not for rewriting the page now.
|
|
68
|
+
|
|
69
|
+
### Phase 3 — Apply (validate, do not merge to specs)
|
|
70
|
+
|
|
71
|
+
Run from repo root:
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
openspec validate <change-id> --type change --strict # must pass
|
|
75
|
+
openspec validate --specs --strict # must pass — surviving capabilities
|
|
76
|
+
openspec show <change-id> --json --deltas-only # handoff receipt
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
On FAIL: fix the offending markdowns (cite config rule that failed), re-run. On second FAIL: stop, emit `blocked`, attach the validator output.
|
|
80
|
+
|
|
81
|
+
Do **not** move the change into `openspec/specs/` — that is the human merge step (`/opsx:apply` after review).
|
|
82
|
+
|
|
83
|
+
### Phase 4 — Archive (post-merge)
|
|
84
|
+
|
|
85
|
+
After a human gate `applied` confirmation:
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
# Move the approved change into archive; preserve prior archive intact.
|
|
89
|
+
mv openspec/changes/<change-id> openspec/changes/archive/<YYYY-MM-DD>-<change-id>
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
Update `openspec/changes/archive/INDEX.md` if present. Verify that no surviving capability now references the archived `proposal.md` accidentally.
|
|
93
|
+
|
|
94
|
+
If `scope` carries multiple phases (e.g. `openspec:<change-id>:propose+apply`), one invocation may emit all four files and the validator receipts. If `scope` is single-phase, emit only the matching files.
|
|
95
|
+
|
|
96
|
+
## Source discipline
|
|
97
|
+
|
|
98
|
+
- **Never invent** product behavior. Cite `path:line` for every requirement that depends on code. Label inferred lines as `> Status: inferred (no AC)` rather than fabricating fields.
|
|
99
|
+
- Reuse archive decisions: if `archive/.../proposal.md` records `D-3: X`, only fork when code-evidence contradicts X — append `D-N+1` rather than rewriting.
|
|
100
|
+
- Resolve OQ defaults from the most recent archive that touched the same capability; otherwise raise the OQ in the new change and stop until the human answers.
|
|
101
|
+
- Capability naming mirrors surviving `openspec/specs/<capability>/spec.md` slugs; new capabilities use the same domain vocabulary as `config.yaml context`.
|
|
102
|
+
|
|
103
|
+
## Will / Will not
|
|
104
|
+
|
|
105
|
+
**Will**
|
|
106
|
+
|
|
107
|
+
- Read `app/src/**` (or stack equivalent) for evidence; never write.
|
|
108
|
+
- Create or update files under `openspec/changes/<change-id>/**` and the associated `specs/<capability>/spec.md` delta.
|
|
109
|
+
- Move an approved change into `openspec/changes/archive/<YYYY-MM-DD>-<change-id>/`.
|
|
110
|
+
- Run `openspec validate` and `openspec show --deltas-only`; surface FAIL output verbatim.
|
|
111
|
+
- Reference `openspec/config.yaml` rules in any deviation comment.
|
|
112
|
+
|
|
113
|
+
**Will not**
|
|
114
|
+
|
|
115
|
+
- Edit `app/**`, `app/src/**`, `src/**`, or any production-code tree.
|
|
116
|
+
- Edit `docs/specs/**` — that file tree belongs to skill `spec-authoring` (`docs/specs/INDEX.md` + page/feature templates). Hand off via `open_questions` if a request conflates the two.
|
|
117
|
+
- Edit `openspec/specs/**` directly (apply via the change, never in place).
|
|
118
|
+
- Skip the `## Non-goals` section in `proposal.md` even when the user omits it.
|
|
119
|
+
- Use `scope: openspec-propose` in **new** pipelines — it is a legacy alias for `openspec:<change-id>`; keep emitting the correct scope name. (Tech-writer still carries the legacy alias for in-flight replays.)
|
|
120
|
+
- Invent routes, flags, status names, or DTO fields. Cite or raise OQ.
|
|
121
|
+
|
|
122
|
+
## Artifact contract
|
|
123
|
+
|
|
124
|
+
- **Authoritative inputs:** read `.claude/team/tasks/<slug>/artifact-manifest.json` first; consume handoff `artifactInputIds` when supplied, otherwise consume the manifest entries for brief/decomposition and available architecture/migration/review artifacts.
|
|
125
|
+
- **Owned outputs:** `openspec/changes/<change-id>/**` (proposal.md, design.md, tasks.md, .openspec.yaml, specs/<capability>/spec.md delta) plus the team slot `openspec-change.md` in `.claude/team/tasks/<slug>/` when the orchestrator asks for a summary handoff. Preserve all foreign entries; upsert only the manifest entry assigned by handoff (`artifactOutputId`; fallback `openspec-change`).
|
|
126
|
+
- **Terminal receipt:** cover applicable AC/task IDs, list authoritative evidence paths under `openspec/changes/<change-id>/**`, attach `openspec validate <change-id> --type change --strict` exit code + deltas-only summary, and emit `completed` or `blocked`. Bind it to the supplied `attemptId` when present.
|
|
127
|
+
- **Shared state:** never create or mutate `status.json` or `metrics.json`; the orchestration runtime/hook owns lifecycle, gates, retries, attempts, and timestamps.
|
|
128
|
+
|
|
129
|
+
## Output
|
|
130
|
+
|
|
131
|
+
When invoked directly (no pipeline), write the spec handoff at `.claude/team/tasks/<slug>/openspec-change.md`:
|
|
132
|
+
|
|
133
|
+
```markdown
|
|
134
|
+
# OpenSpec change: <change-id>
|
|
135
|
+
|
|
136
|
+
## Phase emitted
|
|
137
|
+
explore | propose | apply | archive | full
|
|
138
|
+
|
|
139
|
+
## Capabilities touched
|
|
140
|
+
- <slug> — NEW | MODIFIED | REMOVED | RENAMED (cite openspec/specs/<slug>/spec.md or planned spec path)
|
|
141
|
+
|
|
142
|
+
## Validator receipt
|
|
143
|
+
- `openspec validate <change-id> --type change --strict` → <PASS|FAIL> (exit <n>)
|
|
144
|
+
- `openspec validate --specs --strict` → <PASS|FAIL> (n surviving)
|
|
145
|
+
- `openspec show <change-id> --json --deltas-only` → paths: ...
|
|
146
|
+
|
|
147
|
+
## Open questions (forwarded to human gate)
|
|
148
|
+
- OQ-N: …
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
## Anti-sycophancy
|
|
152
|
+
|
|
153
|
+
Match `code-quality-and-refactoring.mdc`:
|
|
154
|
+
|
|
155
|
+
- Verbatim third-party API (openspec CLI flags) → never invent flags; `// VERIFY: openspec.<flag> @ <version>` if uncertain; consult `npx openspec --help`.
|
|
156
|
+
- Before "is this correct?" — list ≥3 failure modes for the chosen delta (capability obsolescence, schema drift, archive mismatch, prod code-only evidence, conflict with prior D-N).
|
|
157
|
+
- Refactor without tests — N/A (docs only) but if the team lacks an existing spec for the change, raise OQ before proposing.
|
|
158
|
+
- Comments — WHY only when non-obvious (e.g. when forking `config.yaml rules.proposal`); never narrate.
|
|
159
|
+
- Urgency — name the trade-off (e.g. "Use spec-driven character sketch over future-SDD rewrite because config.rules.design forbids redesign") and comply.
|
|
160
|
+
|
|
161
|
+
## MCP usage (on-demand)
|
|
162
|
+
|
|
163
|
+
Load `mcp-usage` only when needing Context7 for an unknown openspec CLI flag or third-party library. Default: rely on `npx openspec --help` and `openspec/config.yaml` rules; mark `// VERIFY: openspec.<flag>` if behavior is unclear.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: task-analyst
|
|
3
|
-
description: Task analysis specialist. Clarifies requirements, validates acceptance criteria, and decomposes work into concrete tasks. Use for
|
|
3
|
+
description: Task analysis specialist. Clarifies requirements, validates acceptance criteria, and decomposes work into concrete tasks. Use for task intake, or when the user asks to analyze or decompose a feature before coding. Writes only team artifacts; never writes production code.
|
|
4
4
|
model: fast
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -8,10 +8,20 @@ You are a senior business/technical analyst for a Nuxt 3 frontend team.
|
|
|
8
8
|
|
|
9
9
|
Your job is to reach **Definition of Ready (DoR)** before any implementation starts. You may write only `.claude/team/**` artifacts. You do **not** write production code or modify application source files.
|
|
10
10
|
|
|
11
|
+
## Classify first
|
|
12
|
+
|
|
13
|
+
<!-- shared-core: agent-team/task-classification.md -->
|
|
14
|
+
|
|
15
|
+
Before decomposing, name the class: **spike** / **bounded** / **architectural**. Maps to existing pipeline profiles — do not invent a second orchestrator.
|
|
16
|
+
|
|
17
|
+
- **Spike** — research DoR; no implement tasks.
|
|
18
|
+
- **Bounded** — few tasks, only layers actually touched; do not pad types/api/store/ui.
|
|
19
|
+
- **Architectural** — full layer table; architect when boundaries are unclear.
|
|
20
|
+
|
|
11
21
|
## Clarification cycle (must)
|
|
12
22
|
|
|
13
23
|
1. Rephrase the task in your own words (goal, user value, boundaries).
|
|
14
|
-
2. Ask
|
|
24
|
+
2. Ask questions — **prefer one** unblocking question; **never more than 3** per iteration.
|
|
15
25
|
3. List explicit **assumptions** when information is missing.
|
|
16
26
|
4. Do **not** decompose until acceptance criteria are **testable and unambiguous**.
|
|
17
27
|
5. If critical unknowns remain, mark them in `open_questions` and ask the user before finalizing.
|
|
@@ -29,6 +29,7 @@ You are a task router for a Nuxt 3 frontend agent team. You **do not** implement
|
|
|
29
29
|
| `unit-only` | «unit», «юнит» (unit), «mapper tests», «покрой маппер» (cover mapper), «почини unit» (fix unit) | unit-test-planner → unit-test-generator, or unit-test-healer | <!-- i18n-keep: E4 -->
|
|
30
30
|
| `e2e-only` | «e2e», «playwright», «browser test», «сценарии e2e» (e2e scenarios), «почини e2e» (fix e2e) | playwright-test-planner → playwright-test-generator, or playwright-test-healer | <!-- i18n-keep: E4 -->
|
|
31
31
|
| `docs-only` | «документация» (documentation), «README», «changelog», «ADR», «migration guide» | task-analyst → tech-writer | <!-- i18n-keep: E4 -->
|
|
32
|
+
| `openspec-change` | `/opsx:propose`, `/opsx:apply`, `/opsx:archive`, `openspec/changes`, `openspec/specs`, `openspec/config.yaml`, «обнови openspec» (refresh openspec), «OpenSpec change», «open-spec propose», openspec refresh | task-analyst → solution-architect (skipIf no architecture delta) → openspec-author (scope: `openspec:<change-id>`) | <!-- i18n-keep: E4 -->
|
|
32
33
|
| `refactor` | «рефакторинг» (refactoring), «без изменения поведения» (no behavior change), «почисти» (clean up) | task-analyst → feature-developer → build-verifier → code-reviewer | <!-- i18n-keep: E4 -->
|
|
33
34
|
| `spike` | «исследуй» (investigate), «оцени» (estimate), «можно ли» (is it possible), «spike», proof of concept | task-analyst → solution-architect | <!-- i18n-keep: E4 -->
|
|
34
35
|
| `retro` | «ретро» (retro), «разбор» (postmortem), «postmortem» | (no pipeline — orchestrator runs `/technical-retro`) | <!-- i18n-keep: E4 -->
|
|
@@ -45,6 +46,20 @@ Set optional top-level `"profile": "full" | "standard" | "light"` in `pipeline.j
|
|
|
45
46
|
|
|
46
47
|
**Light signals:** one file, one layer, explicit AC in prompt, no architectural risk. **Never skip `build-verifier`** after developer when `app/**` changed. **Skip `code-reviewer`** in light only for non-prod preset/docs tasks — for `app/src` changes prefer standard.
|
|
47
48
|
|
|
49
|
+
## Task class (spike / bounded / architectural)
|
|
50
|
+
|
|
51
|
+
<!-- shared-core: agent-team/task-classification.md -->
|
|
52
|
+
|
|
53
|
+
Name the class in `routingReasons`. Maps to profiles already in this file — do not add a parallel step table.
|
|
54
|
+
|
|
55
|
+
| Class | Use existing |
|
|
56
|
+
|-------|----------------|
|
|
57
|
+
| Spike | intent `spike` |
|
|
58
|
+
| Bounded | `profile: light` (or skip analyst when AC is complete) |
|
|
59
|
+
| Architectural | `profile: full` + `solution-architect` when boundaries unclear |
|
|
60
|
+
|
|
61
|
+
SoT: `agent-team/task-classification` (shared-core marker above; do not invent a second pipeline).
|
|
62
|
+
|
|
48
63
|
**Light by intent:**
|
|
49
64
|
|
|
50
65
|
| intent | light steps |
|
|
@@ -116,6 +131,7 @@ Cursor mapping when orchestrator invokes Task: `cheap` → pass `model: "fast"`
|
|
|
116
131
|
| `spec-gen` | `["after:task-analyst"]` |
|
|
117
132
|
| `migration` | `["after:migration-specialist"]` |
|
|
118
133
|
| `docs-only` | `["after:task-analyst"]` |
|
|
134
|
+
| `openspec-change` | `["after:task-analyst"]` (human approves brief + AC; openspec-author emits drafts and validator receipts under the assigned change-id) |
|
|
119
135
|
| `unit-only` | `["after:unit-test-planner"]` when new plan; `[]` for healer |
|
|
120
136
|
| `e2e-only` | `["after:playwright-test-planner"]` when new plan; `[]` for healer |
|
|
121
137
|
| `bugfix`, `review-only`, `ci-fix` | `[]` |
|
|
@@ -147,7 +163,9 @@ Detect and set routing reasons when the user asks to **generate / bootstrap prod
|
|
|
147
163
|
| `/spec-start`, "bootstrap docs/specs", "generate product spec" | `spec-gen` | task-analyst (**author mode**) → human gate → stop (or continue to feature-developer only if implement-after) |
|
|
148
164
|
| Feature/task with AC "generate specs" / missing INDEX + bootstrap AC | `spec-gen` inside feature profile | task-analyst author mode first; **not** a separate agent step |
|
|
149
165
|
|
|
150
|
-
Do **not** add a dedicated `spec-author` agent
|
|
166
|
+
Do **not** add a dedicated `spec-author` agent for `docs/specs/**`. Do not require solution-architect for routine spec authoring of `docs/specs/**`.
|
|
167
|
+
|
|
168
|
+
**openspec is a different file tree** (`openspec/changes/`, `openspec/specs/`) — it is not `docs/specs/`. The dedicated agent `openspec-author` lives in `agents/openspec-author.md`; it owns `openspec/changes/<id>/**` end-to-end (explore → propose → validate → archive) and is reachable via the `openspec-change` intent row in § Intent detection. Any pipeline that asks for `/opsx:*` or targets `openspec/**` should route there instead of `spec-gen`.
|
|
151
169
|
|
|
152
170
|
|
|
153
171
|
**specMode (optional `pipeline.json` field):** `none` for spike/research; `generate` for `spec-gen` / `/spec-start`; `consume` default when INDEX exists. Echo top-level `specMode`. Brief `## Spec mode` wins on conflict.
|
|
@@ -42,6 +42,10 @@ Conventional commit / release note snippet.
|
|
|
42
42
|
- Do not duplicate entire decomposition — summarize outcomes and how to use/extend.
|
|
43
43
|
- May create or update files under `docs/**` when the task explicitly requests it; otherwise keep primary output in team artifacts.
|
|
44
44
|
|
|
45
|
+
## OpenSpec (`openspec/changes/**`, `openspec/specs/**`)
|
|
46
|
+
|
|
47
|
+
The `openspec/**` file tree is owned by the dedicated agent **`openspec-author`**, not by this agent. When a handoff brief or pipeline step mentions `/opsx:propose`, `/opsx:apply`, `/opsx:archive`, `openspec/changes/`, or `openspec/specs/`, hand off to `openspec-author` instead of authoring here. The legacy pipeline scope `openspec-propose` (used in early emedcard-web pipelines) maps to the new scope `openspec:<change-id>` and the new agent — keep emitting the legacy scope only as a backward-compatible alias while in-flight replays complete.
|
|
48
|
+
|
|
45
49
|
## Product specs (docs/specs)
|
|
46
50
|
|
|
47
51
|
Post-delivery: when behavior or public docs changed and `docs/specs/` is in play, load **`product-specs`** (+ **`product-specs-authoring`** if updating specs). Sync page/feature specs + INDEX in the **same change set**. **Never invent** product behavior without AC/code source; label inferred lines `status: draft`. Soft-fail on miss; no-op if INDEX absent and sync not requested.
|
|
@@ -8,8 +8,6 @@ Slash commands are copied to `.claude/commands/` on `ai-rules init claude --pres
|
|
|
8
8
|
|---------|---------|
|
|
9
9
|
| **`/task <description>`** | **Main entry:** router → pipeline.json → roles in order |
|
|
10
10
|
| `/task-continue <slug>` | After a human gate or pause |
|
|
11
|
-
| `/feature-start <description>` | Legacy: analyst only (no router) |
|
|
12
|
-
| `/feature-continue <slug>` | Alias of task-continue |
|
|
13
11
|
| `/technical-retro [slug]` | Retro; with slug — “Agent work” block |
|
|
14
12
|
|
|
15
13
|
## `/task` examples
|
|
@@ -5,7 +5,7 @@ description: Continue an agent-team task after a human gate, pause, or review ch
|
|
|
5
5
|
|
|
6
6
|
# Task continue — after a human gate or pause
|
|
7
7
|
|
|
8
|
-
Continue the pipeline from `pipeline.json`.
|
|
8
|
+
Continue the pipeline from `pipeline.json`.
|
|
9
9
|
|
|
10
10
|
## Arguments
|
|
11
11
|
|
|
@@ -36,7 +36,7 @@ Examples:
|
|
|
36
36
|
- **do not** write `status.json` / `metrics.json` lifecycle fields yourself — the orchestration runtime/hook owns them (see **agent-artifact-contracts**). If `status.json` is missing, only a minimal bootstrap is allowed (`slug`, `intent`, `pipelineIndex: 0`, `currentAgent: steps[0]`, `state: in_progress`) — **do not** increment `pipelineIndex` by hand;
|
|
37
37
|
- invoke the subagent for `pipeline.steps[0].agent` (slug, artifact paths, scope).
|
|
38
38
|
6. **After each agent** — wait for hook handoff / reconciliation terminal receipt → `status.state`; do not start the next step until `status.json` reflects the handoff (or until there is a hook `followup_message`).
|
|
39
|
-
7. **Human gate** — if after the current step there is a gate in `humanGates` (`after:<agent>`), after the agent finishes **stop** and ask for `/task-continue <slug
|
|
39
|
+
7. **Human gate** — if after the current step there is a gate in `humanGates` (`after:<agent>`), after the agent finishes **stop** and ask for `/task-continue <slug>`.
|
|
40
40
|
|
|
41
41
|
## Do not
|
|
42
42
|
|
|
@@ -49,10 +49,6 @@ Examples:
|
|
|
49
49
|
- `awaitingHumanGate` / `state: awaiting_approval` → suggest reviewing artifacts or `/task-continue <slug>`.
|
|
50
50
|
- `in_progress` → ask: continue or a new slug.
|
|
51
51
|
|
|
52
|
-
## Legacy
|
|
53
|
-
|
|
54
|
-
`/feature-start` and `/feature-continue` remain compatible; prefer `/task` for new work.
|
|
55
|
-
|
|
56
52
|
## Metrics
|
|
57
53
|
|
|
58
54
|
Runtime/hook owns `metrics.json` and `status.json` attempt ledgers. Before the first invocation ensure `task_started` and one `activeAttempts[attemptId]` + `attempt_started` exist (router/runtime bootstrap — parent must not invent parallel indices). On `/task-continue`, run the installed chain hook `end_human_gate` action (or wrapper) so `human_gate_ended` lands before the next attempt. Do not calculate durations in agents.
|
|
@@ -10,7 +10,7 @@ The agent acts as a **neutral facilitator of a technical retrospective**, not as
|
|
|
10
10
|
## When to use
|
|
11
11
|
|
|
12
12
|
- The user asks for: “retro”, “technical retro”, “sprint/iteration review”, “action items after release”.
|
|
13
|
-
- After an agent-team pipeline finishes
|
|
13
|
+
- After an agent-team pipeline finishes.
|
|
14
14
|
- Context exists: period, topic (release, incident), task slug, notes.
|
|
15
15
|
|
|
16
16
|
## Inputs (gather, do not invent)
|
|
@@ -53,7 +53,7 @@ Do not invent facts that are not in artifacts, the diff, or the user message.
|
|
|
53
53
|
|
|
54
54
|
## “Agent work” block (required when there is a slug)
|
|
55
55
|
|
|
56
|
-
If the retro is tied to
|
|
56
|
+
If the retro is tied to an agent-team pipeline:
|
|
57
57
|
|
|
58
58
|
| Question | What to record |
|
|
59
59
|
|----------|----------------|
|
|
@@ -138,6 +138,14 @@ const DEFAULT_ARTIFACT_OUTPUT_IDS = {
|
|
|
138
138
|
'mockup-reviewer': 'mockup-review',
|
|
139
139
|
'api-contract-reviewer': 'api-contract-review',
|
|
140
140
|
'tech-writer': 'documentation',
|
|
141
|
+
'openspec-author': 'openspec-change',
|
|
142
|
+
'qa-tester': 'qa',
|
|
143
|
+
'unit-test-planner': 'unit-test-plan',
|
|
144
|
+
'unit-test-generator': 'unit-test-spec',
|
|
145
|
+
'unit-test-healer': 'unit-test-heal',
|
|
146
|
+
'playwright-test-planner': 'e2e-plan',
|
|
147
|
+
'playwright-test-generator': 'e2e-spec',
|
|
148
|
+
'playwright-test-healer': 'e2e-heal',
|
|
141
149
|
};
|
|
142
150
|
function artifactOutputIdFor(step, agent) {
|
|
143
151
|
if (step && typeof step.artifactOutputId === 'string') return step.artifactOutputId;
|
|
@@ -242,7 +250,17 @@ function recordSkippedStep(step, stepIndex) {
|
|
|
242
250
|
function writeStatus(next) {
|
|
243
251
|
status = { ...status, ...next, slug, updatedAt: now };
|
|
244
252
|
const temporary = `${statusPath}.${process.pid}.${Date.now()}.tmp`;
|
|
245
|
-
|
|
253
|
+
// Open + write + fsync + rename so the durable file lands on disk before
|
|
254
|
+
// the orchestrator reads it. Closes the race window where a subagent that
|
|
255
|
+
// completed milliseconds before writeStatus() could otherwise invoke the
|
|
256
|
+
// next step on a stale status (in particular the human-gate write).
|
|
257
|
+
const fd = fs.openSync(temporary, 'w');
|
|
258
|
+
try {
|
|
259
|
+
fs.writeSync(fd, JSON.stringify(status, null, 2) + '\n');
|
|
260
|
+
try { fs.fsyncSync(fd); } catch {}
|
|
261
|
+
} finally {
|
|
262
|
+
fs.closeSync(fd);
|
|
263
|
+
}
|
|
246
264
|
fs.renameSync(temporary, statusPath);
|
|
247
265
|
}
|
|
248
266
|
|
|
@@ -339,6 +357,12 @@ const AGENT_HANDOFF = {
|
|
|
339
357
|
`Use playwright MCP when available. Follow testing/playwright-agents.md and debug-investigation. Upsert the owned terminal receipt in artifact-manifest.json; do not mutate status.json lifecycle fields.`,
|
|
340
358
|
'tech-writer': (s) =>
|
|
341
359
|
`Invoke tech-writer for slug "${s}". Write documentation.md from task artifacts. Upsert the owned terminal receipt in artifact-manifest.json; do not mutate status.json lifecycle fields.`,
|
|
360
|
+
'openspec-author': (s, scope) =>
|
|
361
|
+
`Invoke openspec-author for slug "${s}"${scope ? ` (scope: ${scope})` : ''}. ` +
|
|
362
|
+
`Read openspec/config.yaml schema + rules; if openspec/** is absent, emit blocked ("openspec/** not initialized"). ` +
|
|
363
|
+
`Author openspec/changes/<change-id>/{proposal.md, design.md, tasks.md, .openspec.yaml} and the capability spec delta per phase (explore|propose|apply|archive). ` +
|
|
364
|
+
`Run \`openspec validate <change-id> --type change --strict\` and \`openspec validate --specs --strict\` (Phase 3); surface FAIL output verbatim. ` +
|
|
365
|
+
`Upsert the owned terminal receipt (artifactOutputId \`openspec-change\`) in artifact-manifest.json with validator exit code + evidence paths; do not mutate status.json lifecycle fields. `,
|
|
342
366
|
};
|
|
343
367
|
|
|
344
368
|
const REVIEW_AGENTS = new Set([
|
|
@@ -512,9 +536,37 @@ if (!fs.existsSync(pipelinePath)) {
|
|
|
512
536
|
}
|
|
513
537
|
|
|
514
538
|
let pipeline;
|
|
539
|
+
let pipelineParseError = null;
|
|
515
540
|
try {
|
|
516
541
|
pipeline = JSON.parse(fs.readFileSync(pipelinePath, 'utf8'));
|
|
517
|
-
} catch {
|
|
542
|
+
} catch (error) {
|
|
543
|
+
pipelineParseError = error;
|
|
544
|
+
}
|
|
545
|
+
// Modern pipelines carry an `intent` field. If pipeline.json is present but
|
|
546
|
+
// unparseable, surface the error so the orchestrator can stop and report
|
|
547
|
+
// instead of falling back to legacyFlow() — which silently drops modern
|
|
548
|
+
// roles like `openspec-author`, `qa-tester`, and the test-planner trio.
|
|
549
|
+
if (pipelineParseError) {
|
|
550
|
+
if (fs.existsSync(pipelinePath)) {
|
|
551
|
+
const raw = fs.readFileSync(pipelinePath, 'utf8');
|
|
552
|
+
const hasModernIntent = /"intent"\s*:/.test(raw);
|
|
553
|
+
appendMetric({
|
|
554
|
+
eventId: `${status.metricsRunId || slug}:pipeline_parse_error:${Date.now()}`,
|
|
555
|
+
type: 'pipeline_parse_error',
|
|
556
|
+
at: now,
|
|
557
|
+
source: 'hook',
|
|
558
|
+
attributionConfidence: 'high',
|
|
559
|
+
error: String(pipelineParseError.message || pipelineParseError),
|
|
560
|
+
hasModernIntent,
|
|
561
|
+
});
|
|
562
|
+
if (hasModernIntent) {
|
|
563
|
+
writeStatus({ state: 'blocked', phase: 'blocked', currentAgent: 'task-router' });
|
|
564
|
+
process.stdout.write(JSON.stringify({
|
|
565
|
+
followup_message: `pipeline.json is malformed for slug "${slug}" — JSON parse error: ${pipelineParseError.message}. Re-run the task-router to regenerate pipeline.json, then resume via /task-continue ${slug}.`,
|
|
566
|
+
}));
|
|
567
|
+
process.exit(0);
|
|
568
|
+
}
|
|
569
|
+
}
|
|
518
570
|
legacyFlow();
|
|
519
571
|
}
|
|
520
572
|
|
|
@@ -25,6 +25,7 @@ In Claude Code all `.md` files under `rules/` are **discovered recursively**. Bo
|
|
|
25
25
|
| `nuxt-app-core.mdc` | `stack/nuxt-app-core.md` |
|
|
26
26
|
| `package-manager.mdc` | `tooling-and-review/package-manager.md` |
|
|
27
27
|
| `code-quality-and-refactoring.mdc` | `tooling-and-review/code-quality.md` |
|
|
28
|
+
| `ai-local-overlay.mdc` | `tooling-and-review/ai-local-overlay.md` |
|
|
28
29
|
| `anti-sycophancy-discipline.mdc` | `tooling-and-review/anti-sycophancy-discipline.md` |
|
|
29
30
|
| `vue-nuxt-anti-hallucination.mdc` | `anti-hallucination/vue-nuxt-anti-hallucination.md` |
|
|
30
31
|
| `design-guidance.mdc` | `tooling-and-review/design-guidance.md` |
|
|
@@ -9,3 +9,9 @@ Unit, e2e, Playwright agents.
|
|
|
9
9
|
| `tests-e2e-structure.md` | `*.cases.md`, page objects, data-testid | `paths: tests/e2e/**` |
|
|
10
10
|
|
|
11
11
|
See also `.claude/agents/playwright-test-*.md` after `ai-rules init`.
|
|
12
|
+
|
|
13
|
+
## Shared core
|
|
14
|
+
|
|
15
|
+
| Shared core | Cursor adapter | Claude twins |
|
|
16
|
+
|-------------|----------------|--------------|
|
|
17
|
+
| `testing/testing-principles.md` | `tests-unit.mdc`, `tests-e2e-structure.mdc` | `tests-unit.md`, `tests-e2e-structure.md` |
|
|
@@ -1,49 +1,92 @@
|
|
|
1
1
|
---
|
|
2
|
-
description:
|
|
2
|
+
description: E2E test and plan structure (Playwright)
|
|
3
3
|
paths: 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: `tests/e2e/**`.
|
|
9
|
-
- Scenario plans:
|
|
10
|
-
|
|
11
|
-
-
|
|
12
|
-
|
|
13
|
-
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
-
|
|
19
|
-
|
|
20
|
-
-
|
|
21
|
-
- page objects (e.g. `OrderHistoryPage.ts`);
|
|
22
|
-
- shared helpers from `_shared`.
|
|
23
|
-
|
|
24
|
-
# E2E test naming
|
|
25
|
-
|
|
26
|
-
- Language:
|
|
27
|
-
- all `test` / `it` names, `describe` blocks, and steps in `*.cases.md` must be formulated **in Russian**, describing behavior and the expected result. <!-- i18n-keep: E5 -->
|
|
28
|
-
- E2E title format (`test(...)` / `it(...)`):
|
|
29
|
-
- before the scenario description, put a **numbered prefix** in the form: `PREFIX-XXX Scenario description`.
|
|
30
|
-
- `PREFIX` — abbreviation from the **first letters of the words** of the entity under test, written in **Latin uppercase**.
|
|
31
|
-
- example: `OrderHistory` → `OH`, `BillingReport` → `BR`.
|
|
32
|
-
- `XXX` — sequential test number **with three digits and leading zeros**: `001`, `002`, `010`, `123`, etc.
|
|
33
|
-
- full e2e title example:
|
|
34
|
-
- `test('OH-001 Отображается список заказов', async ({ page }) => { ... })` <!-- i18n-keep: E5 -->
|
|
35
|
-
- within one entity (`PREFIX`), test numbers must form a **consistent sequence** without duplicate numbers.
|
|
36
|
-
|
|
37
|
-
# data-testid for e2e
|
|
38
|
-
|
|
39
|
-
- **Selector priority:** `data-testid` for stable elements; `getByRole` and `getByLabel` for forms and accessible elements.
|
|
40
|
-
- **Naming:** scheme `{parent}__{element}` (e.g. `history-page__title`, `history-page__recognition-banner__attach-files-button`).
|
|
41
|
-
- **Where to add:** on page root containers and key interactive elements (buttons, links, fields) that page objects target.
|
|
42
|
-
- **When UI changes:** update data-testid in components and matching selectors in page objects; align with `*.cases.md`.
|
|
43
|
-
|
|
44
|
-
# Agent requirement
|
|
45
|
-
|
|
46
|
-
When adding/changing e2e tests:
|
|
47
|
-
- First look at the matching `*.cases.md` and sync scenario names.
|
|
48
|
-
- Place specs next to plans in the same directory.
|
|
49
|
-
- Reuse shared page objects and helpers; do not copy selectors into every test.
|
|
81
|
+
- Scenario plans: `*.cases.md` — canonical source.
|
|
82
|
+
- Tests: `*.spec.ts` — Playwright implementations.
|
|
83
|
+
- Shared utilities: `tests/e2e/_shared/**`.
|
|
84
|
+
- **Russian-locale HARD policy:** all `test` / `it` titles, `describe` blocks, and `*.cases.md` steps MUST be in Russian, describing behavior + expected result. <!-- i18n-keep: E5 -->
|
|
85
|
+
- `data-testid` priority: `data-testid` for stable; `getByRole` / `getByLabel` for forms.
|
|
86
|
+
- `data-testid` naming scheme `{parent}__{element}` — example `history-page__title`, `history-page__recognition-banner__attach-files-button`.
|
|
87
|
+
- `PREFIX-XXX` example: `OrderHistory` → `OH`, `BillingReport` → `BR`.
|
|
88
|
+
- Russian example: `test('OH-001 Отображается список заказов', async ({ page }) => { ... })` <!-- i18n-keep: E5 --> (Order list is displayed).
|
|
89
|
+
- Page object example filename: `OrderHistoryPage.ts`.
|
|
90
|
+
- `## 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.
|
|
91
|
+
|
|
92
|
+
See also **`testing/playwright-agents.md`** for planner/generator/healer.
|