@bonesofspring/ai-rules 0.2.22 β 0.2.24
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 +17 -0
- package/README.md +10 -2
- package/bin/cli.js +56 -9
- package/bin/mavis-install.js +441 -0
- package/bin/opencode-install.js +531 -0
- package/package.json +17 -3
- package/presets/_shared/core/agent-team/agent-team-orchestrator.md +2 -2
- package/presets/_shared/core/meta/preset-layering.md +3 -3
- package/presets/_shared/core/meta/preset-no-cross-stack-leakage.md +1 -1
- package/presets/_shared/core/meta/preset-pr-checklist.md +5 -3
- package/presets/_shared/core/meta/preset-token-budget.md +3 -0
- package/presets/_shared/core/meta/preset-twin-sync.md +32 -0
- package/presets/claude/android-kotlin/rules/tooling-and-review/preset-layering.md +3 -3
- package/presets/claude/android-kotlin/rules/tooling-and-review/preset-no-cross-stack-leakage.md +1 -1
- package/presets/claude/android-kotlin/rules/tooling-and-review/preset-pr-checklist.md +5 -3
- package/presets/claude/android-kotlin/rules/tooling-and-review/preset-token-budget.md +3 -0
- package/presets/claude/android-kotlin/rules/tooling-and-review/preset-twin-sync.md +32 -0
- package/presets/claude/go/rules/tooling-and-review/preset-layering.md +3 -3
- package/presets/claude/go/rules/tooling-and-review/preset-no-cross-stack-leakage.md +1 -1
- package/presets/claude/go/rules/tooling-and-review/preset-pr-checklist.md +5 -3
- package/presets/claude/go/rules/tooling-and-review/preset-token-budget.md +3 -0
- package/presets/claude/go/rules/tooling-and-review/preset-twin-sync.md +32 -0
- package/presets/claude/ios-swift/rules/tooling-and-review/preset-layering.md +3 -3
- package/presets/claude/ios-swift/rules/tooling-and-review/preset-no-cross-stack-leakage.md +1 -1
- package/presets/claude/ios-swift/rules/tooling-and-review/preset-pr-checklist.md +5 -3
- package/presets/claude/ios-swift/rules/tooling-and-review/preset-token-budget.md +3 -0
- package/presets/claude/ios-swift/rules/tooling-and-review/preset-twin-sync.md +32 -0
- package/presets/claude/java/rules/tooling-and-review/preset-layering.md +3 -3
- package/presets/claude/java/rules/tooling-and-review/preset-no-cross-stack-leakage.md +1 -1
- package/presets/claude/java/rules/tooling-and-review/preset-pr-checklist.md +5 -3
- package/presets/claude/java/rules/tooling-and-review/preset-token-budget.md +3 -0
- package/presets/claude/java/rules/tooling-and-review/preset-twin-sync.md +32 -0
- package/presets/claude/mcp-ts/rules/tooling-and-review/preset-layering.md +3 -3
- package/presets/claude/mcp-ts/rules/tooling-and-review/preset-no-cross-stack-leakage.md +1 -1
- package/presets/claude/mcp-ts/rules/tooling-and-review/preset-pr-checklist.md +5 -3
- package/presets/claude/mcp-ts/rules/tooling-and-review/preset-token-budget.md +3 -0
- package/presets/claude/mcp-ts/rules/tooling-and-review/preset-twin-sync.md +32 -0
- package/presets/claude/next/REPO_AGENTS.md +10 -5
- package/presets/claude/next/agents/build-verifier.md +3 -1
- package/presets/claude/next/rules/tooling-and-review/ai-local-overlay.md +1 -1
- package/presets/claude/next/rules/tooling-and-review/preset-layering.md +3 -3
- package/presets/claude/next/rules/tooling-and-review/preset-no-cross-stack-leakage.md +1 -1
- package/presets/claude/next/rules/tooling-and-review/preset-pr-checklist.md +5 -3
- package/presets/claude/next/rules/tooling-and-review/preset-token-budget.md +3 -0
- package/presets/claude/next/rules/tooling-and-review/preset-twin-sync.md +32 -0
- package/presets/claude/nuxt/rules/tooling-and-review/preset-layering.md +3 -3
- package/presets/claude/nuxt/rules/tooling-and-review/preset-no-cross-stack-leakage.md +1 -1
- package/presets/claude/nuxt/rules/tooling-and-review/preset-pr-checklist.md +5 -3
- package/presets/claude/nuxt/rules/tooling-and-review/preset-token-budget.md +3 -0
- package/presets/claude/nuxt/rules/tooling-and-review/preset-twin-sync.md +32 -0
- package/presets/claude/php-hexagonal/rules/tooling-and-review/preset-layering.md +3 -3
- package/presets/claude/php-hexagonal/rules/tooling-and-review/preset-no-cross-stack-leakage.md +1 -1
- package/presets/claude/php-hexagonal/rules/tooling-and-review/preset-pr-checklist.md +5 -3
- package/presets/claude/php-hexagonal/rules/tooling-and-review/preset-token-budget.md +3 -0
- package/presets/claude/php-hexagonal/rules/tooling-and-review/preset-twin-sync.md +32 -0
- package/presets/claude/php-laravel/rules/tooling-and-review/preset-layering.md +3 -3
- package/presets/claude/php-laravel/rules/tooling-and-review/preset-no-cross-stack-leakage.md +1 -1
- package/presets/claude/php-laravel/rules/tooling-and-review/preset-pr-checklist.md +5 -3
- package/presets/claude/php-laravel/rules/tooling-and-review/preset-token-budget.md +3 -0
- package/presets/claude/php-laravel/rules/tooling-and-review/preset-twin-sync.md +32 -0
- package/presets/claude/svelte/rules/tooling-and-review/preset-layering.md +3 -3
- package/presets/claude/svelte/rules/tooling-and-review/preset-no-cross-stack-leakage.md +1 -1
- package/presets/claude/svelte/rules/tooling-and-review/preset-pr-checklist.md +5 -3
- package/presets/claude/svelte/rules/tooling-and-review/preset-token-budget.md +3 -0
- package/presets/claude/svelte/rules/tooling-and-review/preset-twin-sync.md +32 -0
- package/presets/cursor/android-kotlin/rules/preset-layering.mdc +3 -3
- package/presets/cursor/android-kotlin/rules/preset-no-cross-stack-leakage.mdc +1 -1
- package/presets/cursor/android-kotlin/rules/preset-pr-checklist.mdc +5 -3
- package/presets/cursor/android-kotlin/rules/preset-token-budget.mdc +3 -0
- package/presets/cursor/android-kotlin/rules/preset-twin-sync.mdc +32 -0
- package/presets/cursor/go/rules/preset-layering.mdc +3 -3
- package/presets/cursor/go/rules/preset-no-cross-stack-leakage.mdc +1 -1
- package/presets/cursor/go/rules/preset-pr-checklist.mdc +5 -3
- package/presets/cursor/go/rules/preset-token-budget.mdc +3 -0
- package/presets/cursor/go/rules/preset-twin-sync.mdc +32 -0
- package/presets/cursor/ios-swift/rules/preset-layering.mdc +3 -3
- package/presets/cursor/ios-swift/rules/preset-no-cross-stack-leakage.mdc +1 -1
- package/presets/cursor/ios-swift/rules/preset-pr-checklist.mdc +5 -3
- package/presets/cursor/ios-swift/rules/preset-token-budget.mdc +3 -0
- package/presets/cursor/ios-swift/rules/preset-twin-sync.mdc +32 -0
- package/presets/cursor/java/rules/preset-layering.mdc +3 -3
- package/presets/cursor/java/rules/preset-no-cross-stack-leakage.mdc +1 -1
- package/presets/cursor/java/rules/preset-pr-checklist.mdc +5 -3
- package/presets/cursor/java/rules/preset-token-budget.mdc +3 -0
- package/presets/cursor/java/rules/preset-twin-sync.mdc +32 -0
- package/presets/cursor/mcp-ts/rules/preset-layering.mdc +3 -3
- package/presets/cursor/mcp-ts/rules/preset-no-cross-stack-leakage.mdc +1 -1
- package/presets/cursor/mcp-ts/rules/preset-pr-checklist.mdc +5 -3
- package/presets/cursor/mcp-ts/rules/preset-token-budget.mdc +3 -0
- package/presets/cursor/mcp-ts/rules/preset-twin-sync.mdc +32 -0
- package/presets/cursor/next/REPO_AGENTS.md +10 -5
- package/presets/cursor/next/agents/build-verifier.md +3 -1
- package/presets/cursor/next/rules/ai-local-overlay.mdc +1 -1
- package/presets/cursor/next/rules/preset-layering.mdc +3 -3
- package/presets/cursor/next/rules/preset-no-cross-stack-leakage.mdc +1 -1
- package/presets/cursor/next/rules/preset-pr-checklist.mdc +5 -3
- package/presets/cursor/next/rules/preset-token-budget.mdc +3 -0
- package/presets/cursor/next/rules/preset-twin-sync.mdc +32 -0
- package/presets/cursor/nuxt/rules/preset-layering.mdc +3 -3
- package/presets/cursor/nuxt/rules/preset-no-cross-stack-leakage.mdc +1 -1
- package/presets/cursor/nuxt/rules/preset-pr-checklist.mdc +5 -3
- package/presets/cursor/nuxt/rules/preset-token-budget.mdc +3 -0
- package/presets/cursor/nuxt/rules/preset-twin-sync.mdc +32 -0
- package/presets/cursor/php-hexagonal/rules/preset-layering.mdc +3 -3
- package/presets/cursor/php-hexagonal/rules/preset-no-cross-stack-leakage.mdc +1 -1
- package/presets/cursor/php-hexagonal/rules/preset-pr-checklist.mdc +5 -3
- package/presets/cursor/php-hexagonal/rules/preset-token-budget.mdc +3 -0
- package/presets/cursor/php-hexagonal/rules/preset-twin-sync.mdc +32 -0
- package/presets/cursor/php-laravel/rules/preset-layering.mdc +3 -3
- package/presets/cursor/php-laravel/rules/preset-no-cross-stack-leakage.mdc +1 -1
- package/presets/cursor/php-laravel/rules/preset-pr-checklist.mdc +5 -3
- package/presets/cursor/php-laravel/rules/preset-token-budget.mdc +3 -0
- package/presets/cursor/php-laravel/rules/preset-twin-sync.mdc +32 -0
- package/presets/cursor/svelte/rules/preset-layering.mdc +3 -3
- package/presets/cursor/svelte/rules/preset-no-cross-stack-leakage.mdc +1 -1
- package/presets/cursor/svelte/rules/preset-pr-checklist.mdc +5 -3
- package/presets/cursor/svelte/rules/preset-token-budget.mdc +3 -0
- package/presets/cursor/svelte/rules/preset-twin-sync.mdc +32 -0
- package/presets/mavis/README.md +60 -0
- package/presets/mavis/next/MAVIS.md +67 -0
- package/presets/mavis/next/MCP.md +36 -0
- package/presets/mavis/next/README.md +15 -0
- package/presets/mavis/next/REPO_AGENTS.md +96 -0
- package/presets/mavis/next/adapter-map.json +959 -0
- package/presets/mavis/next/agents/README.md +206 -0
- package/presets/mavis/next/agents/accessibility-reviewer.md +61 -0
- package/presets/mavis/next/agents/api-contract-reviewer.md +57 -0
- package/presets/mavis/next/agents/build-verifier.md +112 -0
- package/presets/mavis/next/agents/ci-investigator.md +63 -0
- package/presets/mavis/next/agents/code-reviewer.md +61 -0
- package/presets/mavis/next/agents/codebase-analyzer.md +21 -0
- package/presets/mavis/next/agents/debugger.md +80 -0
- package/presets/mavis/next/agents/feature-developer.md +101 -0
- package/presets/mavis/next/agents/migration-specialist.md +67 -0
- package/presets/mavis/next/agents/mockup-reviewer.md +53 -0
- package/presets/mavis/next/agents/openspec-author.md +157 -0
- package/presets/mavis/next/agents/performance-auditor.md +68 -0
- package/presets/mavis/next/agents/playwright-test-generator.md +28 -0
- package/presets/mavis/next/agents/playwright-test-healer.md +28 -0
- package/presets/mavis/next/agents/playwright-test-planner.md +21 -0
- package/presets/mavis/next/agents/qa-tester.md +52 -0
- package/presets/mavis/next/agents/security-reviewer.md +54 -0
- package/presets/mavis/next/agents/solution-architect.md +68 -0
- package/presets/mavis/next/agents/task-analyst.md +166 -0
- package/presets/mavis/next/agents/task-router.md +178 -0
- package/presets/mavis/next/agents/tech-writer.md +57 -0
- package/presets/mavis/next/agents/unit-test-generator.md +31 -0
- package/presets/mavis/next/agents/unit-test-healer.md +32 -0
- package/presets/mavis/next/agents/unit-test-planner.md +54 -0
- package/presets/mavis/next/commands/README.md +49 -0
- package/presets/mavis/next/commands/spec-start.md +24 -0
- package/presets/mavis/next/commands/task-continue.md +50 -0
- package/presets/mavis/next/commands/task.md +50 -0
- package/presets/mavis/next/commands/technical-retro.md +80 -0
- package/presets/mavis/next/hooks/README.md +22 -0
- package/presets/mavis/next/hooks/chain-team-phases.sh +845 -0
- package/presets/mavis/next/mcp.json +19 -0
- package/presets/mavis/next/rules/README.md +16 -0
- package/presets/mavis/next/rules/agent-team-intake.md +11 -0
- package/presets/mavis/next/rules/agent-team-orchestrator.md +210 -0
- package/presets/mavis/next/rules/ai-local-overlay.md +37 -0
- package/presets/mavis/next/rules/anti-sycophancy-discipline.md +23 -0
- package/presets/mavis/next/rules/api-services.md +72 -0
- package/presets/mavis/next/rules/architecture-boundaries-ui.md +9 -0
- package/presets/mavis/next/rules/architecture-boundaries.md +86 -0
- package/presets/mavis/next/rules/arrow-functions.md +25 -0
- package/presets/mavis/next/rules/code-quality-and-refactoring.md +40 -0
- package/presets/mavis/next/rules/code-review-mr.md +40 -0
- package/presets/mavis/next/rules/css-property-order-stylelint.md +5 -0
- package/presets/mavis/next/rules/design-guidance.md +99 -0
- package/presets/mavis/next/rules/feature-delivery-workflow.md +49 -0
- package/presets/mavis/next/rules/http-client.md +55 -0
- package/presets/mavis/next/rules/layer-barrel-exports.md +68 -0
- package/presets/mavis/next/rules/mcp-usage.md +86 -0
- package/presets/mavis/next/rules/mockup-review.md +107 -0
- package/presets/mavis/next/rules/navigation-router-stack.md +56 -0
- package/presets/mavis/next/rules/navigation-router-ui.md +10 -0
- package/presets/mavis/next/rules/next-app-core.md +29 -0
- package/presets/mavis/next/rules/next-app-router.md +44 -0
- package/presets/mavis/next/rules/no-props-spread.md +56 -0
- package/presets/mavis/next/rules/no-type-assertion-as-import-export.md +51 -0
- package/presets/mavis/next/rules/package-manager.md +11 -0
- package/presets/mavis/next/rules/playwright-agents.md +67 -0
- package/presets/mavis/next/rules/post-change-lint.md +35 -0
- package/presets/mavis/next/rules/preset-layering.md +27 -0
- package/presets/mavis/next/rules/preset-no-cross-stack-leakage.md +90 -0
- package/presets/mavis/next/rules/preset-pr-checklist.md +36 -0
- package/presets/mavis/next/rules/preset-token-budget.md +39 -0
- package/presets/mavis/next/rules/preset-twin-sync.md +81 -0
- package/presets/mavis/next/rules/product-specs-authoring.md +112 -0
- package/presets/mavis/next/rules/product-specs.md +56 -0
- package/presets/mavis/next/rules/public-imports.md +50 -0
- package/presets/mavis/next/rules/react-a11y-coding.md +31 -0
- package/presets/mavis/next/rules/react-next-anti-hallucination.md +60 -0
- package/presets/mavis/next/rules/react-ui.md +105 -0
- package/presets/mavis/next/rules/reference-features.md +45 -0
- package/presets/mavis/next/rules/security-next.md +45 -0
- package/presets/mavis/next/rules/store-rtk.md +78 -0
- package/presets/mavis/next/rules/technical-retro.md +11 -0
- package/presets/mavis/next/rules/tests-e2e-structure.md +72 -0
- package/presets/mavis/next/rules/tests-unit.md +72 -0
- package/presets/mavis/next/rules/types-jsdoc.md +43 -0
- package/presets/mavis/next/rules/ux-design.md +99 -0
- package/presets/mavis/next/skills/README.md +21 -0
- package/presets/mavis/next/skills/ci-investigation/SKILL.md +39 -0
- package/presets/mavis/next/skills/code-review/SKILL.md +39 -0
- package/presets/mavis/next/skills/debug-investigation/SKILL.md +26 -0
- package/presets/mavis/next/skills/feature-delivery/SKILL.md +34 -0
- package/presets/mavis/next/skills/mockup-review/SKILL.md +24 -0
- package/presets/mavis/next/skills/playwright-e2e/SKILL.md +28 -0
- package/presets/mavis/next/skills/react-performance/SKILL.md +39 -0
- package/presets/mavis/next/skills/spec-authoring/SKILL.md +21 -0
- package/presets/mavis/next/skills/spec-discovery/SKILL.md +53 -0
- package/presets/mavis/next/skills/technical-retro/SKILL.md +49 -0
- package/presets/mavis/next/skills/unit-testing/SKILL.md +29 -0
- package/presets/mavis/next/skills/ux-design/SKILL.md +31 -0
- package/presets/mavis/next/skills/write-adr/SKILL.md +36 -0
- package/presets/mavis/next/team/README.md +148 -0
- package/presets/mavis/next/team/conventions.md +21 -0
- package/presets/mavis/next/team/fixtures/artifact-manifest.example.json +79 -0
- package/presets/mavis/next/team/fixtures/bugfix-standard.json +25 -0
- package/presets/mavis/next/team/fixtures/feature-full.json +29 -0
- package/presets/mavis/next/team/fixtures/feature-light.json +27 -0
- package/presets/mavis/next/team/fixtures/feature-with-figma-url.json +17 -0
- package/presets/mavis/next/team/fixtures/feature-with-ux-no-figma.json +17 -0
- package/presets/mavis/next/team/fixtures/memlog.example.md +9 -0
- package/presets/mavis/next/team/fixtures/metrics-scenarios/tasks/human-gate/metrics.json +69 -0
- package/presets/mavis/next/team/fixtures/metrics-scenarios/tasks/missing-ledger/status.json +5 -0
- package/presets/mavis/next/team/fixtures/metrics-scenarios/tasks/parallel-receipts/metrics.json +79 -0
- package/presets/mavis/next/team/fixtures/metrics-scenarios/tasks/serial-retry/metrics.json +124 -0
- package/presets/mavis/next/team/fixtures/metrics-scenarios/tasks/validation-failed/metrics.json +124 -0
- package/presets/mavis/next/team/fixtures/metrics.example.json +54 -0
- package/presets/mavis/next/team/fixtures/mockup-review-fail-embedded-status.json +8 -0
- package/presets/mavis/next/team/fixtures/mockup-review-standalone.json +14 -0
- package/presets/mavis/next/team/fixtures/ux-design-standalone.json +15 -0
- package/presets/mavis/next/team/tasks/.gitkeep +0 -0
- package/presets/mavis/platform-contract.json +131 -0
- package/presets/opencode/README.md +61 -0
- package/presets/opencode/next/MCP.md +36 -0
- package/presets/opencode/next/OPENCODE.md +65 -0
- package/presets/opencode/next/README.md +16 -0
- package/presets/opencode/next/REPO_AGENTS.md +97 -0
- package/presets/opencode/next/adapter-map.json +959 -0
- package/presets/opencode/next/agents/README.md +201 -0
- package/presets/opencode/next/agents/accessibility-reviewer.md +73 -0
- package/presets/opencode/next/agents/api-contract-reviewer.md +69 -0
- package/presets/opencode/next/agents/build-verifier.md +124 -0
- package/presets/opencode/next/agents/ci-investigator.md +71 -0
- package/presets/opencode/next/agents/code-reviewer.md +73 -0
- package/presets/opencode/next/agents/codebase-analyzer.md +33 -0
- package/presets/opencode/next/agents/debugger.md +88 -0
- package/presets/opencode/next/agents/feature-developer.md +109 -0
- package/presets/opencode/next/agents/migration-specialist.md +79 -0
- package/presets/opencode/next/agents/mockup-reviewer.md +65 -0
- package/presets/opencode/next/agents/openspec-author.md +169 -0
- package/presets/opencode/next/agents/performance-auditor.md +80 -0
- package/presets/opencode/next/agents/playwright-test-generator.md +36 -0
- package/presets/opencode/next/agents/playwright-test-healer.md +36 -0
- package/presets/opencode/next/agents/playwright-test-planner.md +33 -0
- package/presets/opencode/next/agents/qa-tester.md +60 -0
- package/presets/opencode/next/agents/security-reviewer.md +66 -0
- package/presets/opencode/next/agents/solution-architect.md +80 -0
- package/presets/opencode/next/agents/task-analyst.md +178 -0
- package/presets/opencode/next/agents/task-router.md +190 -0
- package/presets/opencode/next/agents/tech-writer.md +69 -0
- package/presets/opencode/next/agents/unit-test-generator.md +39 -0
- package/presets/opencode/next/agents/unit-test-healer.md +40 -0
- package/presets/opencode/next/agents/unit-test-planner.md +66 -0
- package/presets/opencode/next/commands/README.md +49 -0
- package/presets/opencode/next/commands/spec-start.md +32 -0
- package/presets/opencode/next/commands/task-continue.md +58 -0
- package/presets/opencode/next/commands/task.md +58 -0
- package/presets/opencode/next/commands/technical-retro.md +88 -0
- package/presets/opencode/next/hooks/README.md +22 -0
- package/presets/opencode/next/hooks/chain-team-phases.sh +845 -0
- package/presets/opencode/next/opencode.json +33 -0
- package/presets/opencode/next/rules/README.md +20 -0
- package/presets/opencode/next/rules/agent-team-intake.md +11 -0
- package/presets/opencode/next/rules/agent-team-orchestrator.md +214 -0
- package/presets/opencode/next/rules/ai-local-overlay.md +37 -0
- package/presets/opencode/next/rules/anti-sycophancy-discipline.md +23 -0
- package/presets/opencode/next/rules/api-services.md +72 -0
- package/presets/opencode/next/rules/architecture-boundaries-ui.md +9 -0
- package/presets/opencode/next/rules/architecture-boundaries.md +86 -0
- package/presets/opencode/next/rules/arrow-functions.md +25 -0
- package/presets/opencode/next/rules/code-quality-and-refactoring.md +40 -0
- package/presets/opencode/next/rules/code-review-mr.md +40 -0
- package/presets/opencode/next/rules/css-property-order-stylelint.md +5 -0
- package/presets/opencode/next/rules/design-guidance.md +99 -0
- package/presets/opencode/next/rules/feature-delivery-workflow.md +49 -0
- package/presets/opencode/next/rules/http-client.md +55 -0
- package/presets/opencode/next/rules/layer-barrel-exports.md +68 -0
- package/presets/opencode/next/rules/mcp-usage.md +86 -0
- package/presets/opencode/next/rules/mockup-review.md +107 -0
- package/presets/opencode/next/rules/navigation-router-stack.md +56 -0
- package/presets/opencode/next/rules/navigation-router-ui.md +10 -0
- package/presets/opencode/next/rules/next-app-core.md +29 -0
- package/presets/opencode/next/rules/next-app-router.md +44 -0
- package/presets/opencode/next/rules/no-props-spread.md +56 -0
- package/presets/opencode/next/rules/no-type-assertion-as-import-export.md +51 -0
- package/presets/opencode/next/rules/package-manager.md +11 -0
- package/presets/opencode/next/rules/playwright-agents.md +67 -0
- package/presets/opencode/next/rules/post-change-lint.md +35 -0
- package/presets/opencode/next/rules/preset-layering.md +27 -0
- package/presets/opencode/next/rules/preset-no-cross-stack-leakage.md +90 -0
- package/presets/opencode/next/rules/preset-pr-checklist.md +36 -0
- package/presets/opencode/next/rules/preset-token-budget.md +39 -0
- package/presets/opencode/next/rules/preset-twin-sync.md +81 -0
- package/presets/opencode/next/rules/product-specs-authoring.md +112 -0
- package/presets/opencode/next/rules/product-specs.md +56 -0
- package/presets/opencode/next/rules/public-imports.md +50 -0
- package/presets/opencode/next/rules/react-a11y-coding.md +31 -0
- package/presets/opencode/next/rules/react-next-anti-hallucination.md +60 -0
- package/presets/opencode/next/rules/react-ui.md +105 -0
- package/presets/opencode/next/rules/reference-features.md +45 -0
- package/presets/opencode/next/rules/security-next.md +45 -0
- package/presets/opencode/next/rules/store-rtk.md +78 -0
- package/presets/opencode/next/rules/technical-retro.md +11 -0
- package/presets/opencode/next/rules/tests-e2e-structure.md +72 -0
- package/presets/opencode/next/rules/tests-unit.md +72 -0
- package/presets/opencode/next/rules/types-jsdoc.md +43 -0
- package/presets/opencode/next/rules/ux-design.md +99 -0
- package/presets/opencode/next/skills/README.md +21 -0
- package/presets/opencode/next/skills/ci-investigation/SKILL.md +44 -0
- package/presets/opencode/next/skills/code-review/SKILL.md +44 -0
- package/presets/opencode/next/skills/debug-investigation/SKILL.md +59 -0
- package/presets/opencode/next/skills/feature-delivery/SKILL.md +39 -0
- package/presets/opencode/next/skills/mockup-review/SKILL.md +29 -0
- package/presets/opencode/next/skills/playwright-e2e/SKILL.md +33 -0
- package/presets/opencode/next/skills/react-performance/SKILL.md +44 -0
- package/presets/opencode/next/skills/spec-authoring/SKILL.md +26 -0
- package/presets/opencode/next/skills/spec-discovery/SKILL.md +58 -0
- package/presets/opencode/next/skills/technical-retro/SKILL.md +54 -0
- package/presets/opencode/next/skills/unit-testing/SKILL.md +34 -0
- package/presets/opencode/next/skills/ux-design/SKILL.md +36 -0
- package/presets/opencode/next/skills/write-adr/SKILL.md +41 -0
- package/presets/opencode/next/team/README.md +148 -0
- package/presets/opencode/next/team/conventions.md +21 -0
- package/presets/opencode/next/team/fixtures/artifact-manifest.example.json +79 -0
- package/presets/opencode/next/team/fixtures/bugfix-standard.json +25 -0
- package/presets/opencode/next/team/fixtures/feature-full.json +29 -0
- package/presets/opencode/next/team/fixtures/feature-light.json +27 -0
- package/presets/opencode/next/team/fixtures/feature-with-figma-url.json +17 -0
- package/presets/opencode/next/team/fixtures/feature-with-ux-no-figma.json +17 -0
- package/presets/opencode/next/team/fixtures/memlog.example.md +9 -0
- package/presets/opencode/next/team/fixtures/metrics-scenarios/tasks/human-gate/metrics.json +69 -0
- package/presets/opencode/next/team/fixtures/metrics-scenarios/tasks/missing-ledger/status.json +5 -0
- package/presets/opencode/next/team/fixtures/metrics-scenarios/tasks/parallel-receipts/metrics.json +79 -0
- package/presets/opencode/next/team/fixtures/metrics-scenarios/tasks/serial-retry/metrics.json +124 -0
- package/presets/opencode/next/team/fixtures/metrics-scenarios/tasks/validation-failed/metrics.json +124 -0
- package/presets/opencode/next/team/fixtures/metrics.example.json +54 -0
- package/presets/opencode/next/team/fixtures/mockup-review-fail-embedded-status.json +8 -0
- package/presets/opencode/next/team/fixtures/mockup-review-standalone.json +14 -0
- package/presets/opencode/next/team/fixtures/ux-design-standalone.json +15 -0
- package/presets/opencode/next/team/tasks/.gitkeep +0 -0
- package/presets/opencode/platform-contract.json +131 -0
- package/scripts/capture-cli-golden.mjs +48 -0
- package/scripts/check-chain-hook-coverage.sh +2 -0
- package/scripts/check-mavis-adapter-map.mjs +294 -0
- package/scripts/check-mavis-local-overlay.mjs +56 -0
- package/scripts/check-mavis-platform-contract.mjs +388 -0
- package/scripts/check-mavis-token-budget.mjs +48 -0
- package/scripts/check-opencode-adapter-map.mjs +294 -0
- package/scripts/check-opencode-local-overlay.mjs +56 -0
- package/scripts/check-opencode-platform-contract.mjs +388 -0
- package/scripts/check-opencode-token-budget.mjs +48 -0
- package/scripts/check-preset-leakage.sh +64 -3
- package/scripts/check-preset-structure.sh +108 -0
- package/scripts/check-shared-core-drift.sh +18 -0
- package/scripts/check-task-router-intents.sh +15 -2
- package/scripts/fixtures/cli-golden/claude/next.json +130 -0
- package/scripts/fixtures/cli-golden/cursor/next.json +132 -0
- package/scripts/fixtures/cli-golden/mavis/next.json +125 -0
- package/scripts/fixtures/cli-golden/opencode/next.json +125 -0
- package/scripts/fixtures/mavis-adapter-map/invalid-unmapped/cursor/AGENTS.md +1 -0
- package/scripts/fixtures/mavis-adapter-map/invalid-unmapped/cursor/rules/extra.mdc +1 -0
- package/scripts/fixtures/mavis-adapter-map/invalid-unmapped/cursor/rules/sample.mdc +2 -0
- package/scripts/fixtures/mavis-adapter-map/invalid-unmapped/mavis/MAVIS.md +1 -0
- package/scripts/fixtures/mavis-adapter-map/invalid-unmapped/mavis/adapter-map.json +26 -0
- package/scripts/fixtures/mavis-adapter-map/invalid-unmapped/mavis/rules/sample.md +2 -0
- package/scripts/fixtures/mavis-adapter-map/valid/cursor/AGENTS.md +1 -0
- package/scripts/fixtures/mavis-adapter-map/valid/cursor/rules/sample.mdc +2 -0
- package/scripts/fixtures/mavis-adapter-map/valid/mavis/MAVIS.md +1 -0
- package/scripts/fixtures/mavis-adapter-map/valid/mavis/adapter-map.json +26 -0
- package/scripts/fixtures/mavis-adapter-map/valid/mavis/rules/sample.md +2 -0
- package/scripts/fixtures/mavis-platform-contract/invalid-minimax-destination.json +131 -0
- package/scripts/fixtures/mavis-platform-contract/invalid-missing-capability.json +126 -0
- package/scripts/fixtures/mavis-platform-contract/invalid-released-unknown-stack.json +133 -0
- package/scripts/fixtures/mavis-platform-contract/invalid-unknown-native-path.json +131 -0
- package/scripts/fixtures/mavis-platform-contract/invalid-version-pin.json +132 -0
- package/scripts/fixtures/mavis-platform-contract/valid.json +131 -0
- package/scripts/fixtures/mavis-probe/AGENTS.md +6 -0
- package/scripts/fixtures/mavis-probe/agents/probe-agent.md +6 -0
- package/scripts/fixtures/mavis-probe/fake-mcode.mjs +98 -0
- package/scripts/fixtures/mavis-probe/output.schema.json +28 -0
- package/scripts/fixtures/mavis-probe/rules/probe.md +5 -0
- package/scripts/fixtures/mavis-probe/skills/probe/SKILL.md +11 -0
- package/scripts/fixtures/opencode-adapter-map/invalid-unmapped/cursor/AGENTS.md +1 -0
- package/scripts/fixtures/opencode-adapter-map/invalid-unmapped/cursor/rules/extra.mdc +1 -0
- package/scripts/fixtures/opencode-adapter-map/invalid-unmapped/cursor/rules/sample.mdc +2 -0
- package/scripts/fixtures/opencode-adapter-map/invalid-unmapped/opencode/OPENCODE.md +1 -0
- package/scripts/fixtures/opencode-adapter-map/invalid-unmapped/opencode/adapter-map.json +26 -0
- package/scripts/fixtures/opencode-adapter-map/invalid-unmapped/opencode/rules/sample.md +2 -0
- package/scripts/fixtures/opencode-adapter-map/valid/cursor/AGENTS.md +1 -0
- package/scripts/fixtures/opencode-adapter-map/valid/cursor/rules/sample.mdc +2 -0
- package/scripts/fixtures/opencode-adapter-map/valid/opencode/OPENCODE.md +1 -0
- package/scripts/fixtures/opencode-adapter-map/valid/opencode/adapter-map.json +26 -0
- package/scripts/fixtures/opencode-adapter-map/valid/opencode/rules/sample.md +2 -0
- package/scripts/fixtures/opencode-platform-contract/invalid-home-destination.json +131 -0
- package/scripts/fixtures/opencode-platform-contract/invalid-missing-capability.json +126 -0
- package/scripts/fixtures/opencode-platform-contract/invalid-released-unknown-stack.json +133 -0
- package/scripts/fixtures/opencode-platform-contract/invalid-unknown-native-path.json +131 -0
- package/scripts/fixtures/opencode-platform-contract/invalid-version-pin.json +132 -0
- package/scripts/fixtures/opencode-platform-contract/valid.json +131 -0
- package/scripts/generate-mavis-next.mjs +706 -0
- package/scripts/generate-opencode-next.mjs +831 -0
- package/scripts/lib/cli-golden.mjs +50 -0
- package/scripts/lib/discover-hooks.mjs +94 -0
- package/scripts/probe-mavis-capabilities.mjs +480 -0
- package/scripts/sync-dogfood-mavis.sh +90 -0
- package/scripts/sync-dogfood-opencode.sh +85 -0
- package/scripts/test-agent-task-metrics-hooks.mjs +25 -16
- package/scripts/test-chain-team-phases-coverage.mjs +15 -7
- package/scripts/test-cli-init-clean.mjs +367 -0
- package/scripts/test-cli-mcp-merge.mjs +23 -0
- package/scripts/test-mavis-context-budget.mjs +55 -0
- package/scripts/test-mavis-orchestration.mjs +649 -0
- package/scripts/test-opencode-context-budget.mjs +53 -0
- package/scripts/test-probe-mavis-capabilities.mjs +205 -0
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: playwright-test-healer
|
|
3
|
+
description: "Playwright e2e healer. Use when browser tests fail, become flaky, or need locator/setup fixes while preserving business assertions."
|
|
4
|
+
mode: subagent
|
|
5
|
+
permission:
|
|
6
|
+
edit: allow
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
You debug and fix failing Playwright e2e tests.
|
|
10
|
+
|
|
11
|
+
## Inputs
|
|
12
|
+
|
|
13
|
+
- Failing test output and command.
|
|
14
|
+
- Matching `*.spec.ts` and `*.cases.md` files under `app/__tests__/e2e/**`.
|
|
15
|
+
- Existing page objects and `_shared/` helpers.
|
|
16
|
+
|
|
17
|
+
## Rules
|
|
18
|
+
|
|
19
|
+
1. Follow **`playwright-agents.md`**, **`tests-e2e-structure.md`**, and the **`debug-investigation`** and **`playwright-e2e`** skills.
|
|
20
|
+
2. Treat `*.cases.md` as the behavior contract.
|
|
21
|
+
3. Fix locators, waits, setup, mocks, or page-object flows without weakening business assertions.
|
|
22
|
+
4. **Use `playwright` MCP** when available (or `user-playwright` if installed globally) to reproduce failures and verify fixes.
|
|
23
|
+
5. Prefer targeted fixes in the affected spec/page object over broad test infrastructure changes.
|
|
24
|
+
6. Re-run the affected spec when feasible.
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
## MCP usage
|
|
28
|
+
|
|
29
|
+
Load requestable rule `mcp-usage` when verifying third-party library APIs (Context7) or when a local overlay MCP is present and the task fits. Discover tools at runtime; do not invent schemas. Overlay absence is not a blocker unless the user required that MCP as source of truth.
|
|
30
|
+
|
|
31
|
+
Use Playwright MCP when available for selector checks and failure reproduction. Chrome DevTools is for `debugger` / `performance-auditor`, not this e2e loop. Storybook MCP if present may inform component docs β do not replace `*.cases.md`.
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
## Completion
|
|
35
|
+
|
|
36
|
+
Report root cause, files changed, validation result, and remaining flakiness risk. For agent team tasks, upsert the owned terminal receipt in `artifact-manifest.json`; do not mutate `status.json`.
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: playwright-test-planner
|
|
3
|
+
description: "Playwright e2e planning specialist. Use when the task is to create or update browser test scenarios, *.cases.md plans, or QA coverage for a web flow."
|
|
4
|
+
mode: subagent
|
|
5
|
+
permission:
|
|
6
|
+
edit:
|
|
7
|
+
"*": deny
|
|
8
|
+
".opencode/team/**": allow
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
Write only team artifacts under `.opencode/team/**`. Do not edit production code.
|
|
12
|
+
|
|
13
|
+
You are an expert web test planner for a Next.js frontend.
|
|
14
|
+
|
|
15
|
+
## Project structure
|
|
16
|
+
|
|
17
|
+
Follow **`playwright-agents.md`**, **`tests-e2e-structure.md`**, and the **`playwright-e2e` skill**:
|
|
18
|
+
|
|
19
|
+
- Test root: `app/__tests__/e2e`
|
|
20
|
+
- Plans: `*.cases.md` under the relevant feature folder
|
|
21
|
+
- Specs: `*.spec.ts` in the same folder
|
|
22
|
+
- Seed/setup reference: `app/__tests__/e2e/seed.spec.ts`
|
|
23
|
+
|
|
24
|
+
## Work
|
|
25
|
+
|
|
26
|
+
1. Read the task brief and existing `*.cases.md` files for the affected area.
|
|
27
|
+
2. Explore the UI only when a running app/browser context is available.
|
|
28
|
+
3. Add or update scenarios covering happy path, edge cases, validation, and error states.
|
|
29
|
+
4. Keep scenarios independent and specific enough for a generator or human tester.
|
|
30
|
+
|
|
31
|
+
## Output
|
|
32
|
+
|
|
33
|
+
Write or update the relevant `*.cases.md` file. If this is part of an agent team task, summarize changed plans and upsert the owned terminal receipt in `artifact-manifest.json`; do not mutate `status.json`.
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: qa-tester
|
|
3
|
+
description: "QA and test specialist. Adds or updates unit and e2e tests per decomposition and playwright-agents rules. Use after code review completes for a team task slug."
|
|
4
|
+
mode: subagent
|
|
5
|
+
permission:
|
|
6
|
+
edit: allow
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
You are a QA engineer for a Next.js frontend with Jest unit tests and Playwright e2e.
|
|
10
|
+
|
|
11
|
+
## Inputs
|
|
12
|
+
|
|
13
|
+
1. `.opencode/team/tasks/<slug>/brief.md` β acceptance criteria drive test scenarios.
|
|
14
|
+
2. `.opencode/team/tasks/<slug>/decomposition.md` β test-related tasks (unit, e2e).
|
|
15
|
+
3. Reviewer notes if `changes_requested` was resolved.
|
|
16
|
+
|
|
17
|
+
## Test strategy
|
|
18
|
+
|
|
19
|
+
### Unit tests
|
|
20
|
+
|
|
21
|
+
Follow **`tests-unit.md`**. When pipeline scope is **`e2e-only`**, unit tests should already exist from **feature-developer** β focus QA on e2e only.
|
|
22
|
+
|
|
23
|
+
When the task is mostly unit coverage, prefer invoking `unit-test-planner`, `unit-test-generator`, or `unit-test-healer` instead of doing all work inside QA. Use the **`unit-testing` skill** for the shared workflow.
|
|
24
|
+
|
|
25
|
+
### E2E tests
|
|
26
|
+
|
|
27
|
+
Follow **`playwright-agents.md`** and **`tests-e2e-structure.md`**:
|
|
28
|
+
|
|
29
|
+
- Plans: `app/__tests__/e2e/<Area>/*.cases.md`
|
|
30
|
+
- Specs: `*.spec.ts` in the same folder
|
|
31
|
+
- Use existing page objects and `_shared/` helpers
|
|
32
|
+
|
|
33
|
+
When the task is mostly e2e, prefer invoking the dedicated `playwright-test-planner`, `playwright-test-generator`, or `playwright-test-healer` agent instead of doing all work inside QA. Use the **`playwright-e2e` skill** for the shared workflow.
|
|
34
|
+
|
|
35
|
+
## Execution
|
|
36
|
+
|
|
37
|
+
- Run relevant unit tests for changed modules.
|
|
38
|
+
- Run affected e2e specs if feasible; report failures clearly.
|
|
39
|
+
|
|
40
|
+
## Artifact contract
|
|
41
|
+
|
|
42
|
+
- **Authoritative inputs:** read `.opencode/team/tasks/<slug>/artifact-manifest.json` first; consume handoff `artifactInputIds` when supplied, otherwise consume the manifest entries for brief/decomposition, reviewer notes when present, and prior implementation/validation artifacts.
|
|
43
|
+
- **Owned outputs:** changed/added test paths (and any QA notes written under the slug dir); upsert only the manifest entry assigned by handoff (`artifactOutputId`; fallback `qa-tester`) and preserve all foreign entries.
|
|
44
|
+
- **Terminal receipt:** cover applicable AC/task IDs, list authoritative evidence paths, and emit `completed` or `blocked`. Bind it to the supplied `attemptId` when present.
|
|
45
|
+
- **Shared state:** never create or mutate `status.json` or `metrics.json`; the orchestration runtime/hook owns lifecycle, gates, retries, attempts, and timestamps.
|
|
46
|
+
|
|
47
|
+
Provide summary:
|
|
48
|
+
|
|
49
|
+
- Tests added/updated (paths)
|
|
50
|
+
- Test run results
|
|
51
|
+
- Gaps vs acceptance criteria
|
|
52
|
+
- Suggest `/technical-retro` with the slug when done
|
|
53
|
+
|
|
54
|
+
## Design guidance
|
|
55
|
+
|
|
56
|
+
- Load `design-guidance` (rule stem) when assessing structure, smells, or pattern fit.
|
|
57
|
+
|
|
58
|
+
## Receipt binding
|
|
59
|
+
|
|
60
|
+
> **Receipt binding.** When writing the terminal receipt to `artifact-manifest.json`, set `entry.receipt.attemptId = <attemptId supplied by the orchestrator>` (the orchestrator provides this via `attemptId` on invocation). The hook at `chain-team-phases.sh:readBoundReceiptOutcome` rejects entries whose `attemptId` does not match the current attempt, or whose `Date.parse(timestamps.completedAt) < Date.parse(attemptStartedAt)`. A missing or stale attemptId causes `awaiting_artifact_receipt` stalls. <!-- shared-core: receipt-binding -->
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: security-reviewer
|
|
3
|
+
description: "Security review specialist. Audits auth flows, token handling, XSS risks, secrets in diff, and unsafe DOM/API usage. Readonly β writes security-review.md only; never edits production code."
|
|
4
|
+
mode: subagent
|
|
5
|
+
permission:
|
|
6
|
+
edit:
|
|
7
|
+
"*": deny
|
|
8
|
+
".opencode/team/**": allow
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
Write only team artifacts under `.opencode/team/**`. Do not edit production code.
|
|
12
|
+
|
|
13
|
+
You are a frontend security reviewer for a Next.js TypeScript application.
|
|
14
|
+
|
|
15
|
+
## Inputs
|
|
16
|
+
|
|
17
|
+
1. `.opencode/team/tasks/<slug>/brief.md` and `decomposition.md`.
|
|
18
|
+
2. `.opencode/team/tasks/<slug>/review.md` if code-reviewer already ran.
|
|
19
|
+
3. Git diff β focus on auth, forms, API integration, env usage, user-generated content.
|
|
20
|
+
|
|
21
|
+
## Review scope
|
|
22
|
+
|
|
23
|
+
Load `security-next.md` for coding-time invariants. Focus on:
|
|
24
|
+
|
|
25
|
+
- Secrets, tokens, API keys in source or committed env files; never in `NEXT_PUBLIC_*`.
|
|
26
|
+
- `dangerouslySetInnerHTML`, unsanitized HTML, URL injection.
|
|
27
|
+
- Auth token storage (cookies vs localStorage), server-side session verify, refresh flows, 401 handling.
|
|
28
|
+
- CSRF considerations for state-changing requests (as applicable to frontend).
|
|
29
|
+
- Open redirects in navigation/router usage.
|
|
30
|
+
- Sensitive data in client-side logs or error messages.
|
|
31
|
+
- Dependency surface for known risky patterns in changed files.
|
|
32
|
+
|
|
33
|
+
## Output
|
|
34
|
+
|
|
35
|
+
Write `.opencode/team/tasks/<slug>/security-review.md`:
|
|
36
|
+
|
|
37
|
+
```markdown
|
|
38
|
+
# Security review: <slug>
|
|
39
|
+
|
|
40
|
+
## Verdict
|
|
41
|
+
PASS | PASS_WITH_NOTES | FAIL
|
|
42
|
+
|
|
43
|
+
## Critical (must fix before merge)
|
|
44
|
+
- ...
|
|
45
|
+
|
|
46
|
+
## Warnings
|
|
47
|
+
- ...
|
|
48
|
+
|
|
49
|
+
## Informational
|
|
50
|
+
- ...
|
|
51
|
+
|
|
52
|
+
## AC / threat coverage
|
|
53
|
+
| Area | Status | Notes |
|
|
54
|
+
|------|--------|-------|
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Artifact contract
|
|
58
|
+
|
|
59
|
+
- **Authoritative inputs:** read `.opencode/team/tasks/<slug>/artifact-manifest.json` first; consume handoff `artifactInputIds` when supplied, otherwise consume the manifest entries for brief/decomposition, prior `review.md` when present, and the scoped git diff.
|
|
60
|
+
- **Owned outputs:** `security-review.md`; upsert only the manifest entry assigned by handoff (`artifactOutputId`; fallback `security-review`) and preserve all foreign entries.
|
|
61
|
+
- **Terminal receipt:** cover applicable AC/task IDs, list authoritative evidence paths, and emit `completed` or `changes_requested`. Bind it to the supplied `attemptId` when present.
|
|
62
|
+
- **Shared state:** never create or mutate `status.json` or `metrics.json`; the orchestration runtime/hook owns lifecycle, gates, retries, attempts, and timestamps.
|
|
63
|
+
|
|
64
|
+
If **FAIL**, emit receipt outcome `changes_requested`.
|
|
65
|
+
|
|
66
|
+
Do not modify production code.
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: solution-architect
|
|
3
|
+
description: "Solution architect for cross-layer features, API boundaries, and technical design before implementation. Use for spike intent or when router adds architect step for complex features. Readonly β produces design docs, not production code."
|
|
4
|
+
mode: subagent
|
|
5
|
+
permission:
|
|
6
|
+
edit:
|
|
7
|
+
"*": deny
|
|
8
|
+
".opencode/team/**": allow
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
Write only team artifacts under `.opencode/team/**`. Do not edit production code.
|
|
12
|
+
|
|
13
|
+
You are a solution architect for a Next.js frontend with strict layer boundaries (types, api, store, ui).
|
|
14
|
+
|
|
15
|
+
## Inputs
|
|
16
|
+
|
|
17
|
+
1. `.opencode/team/tasks/<slug>/brief.md` and `decomposition.md` (from analyst).
|
|
18
|
+
2. `.opencode/team/tasks/<slug>/pipeline.json`.
|
|
19
|
+
3. Existing patterns in the repo (`architecture-boundaries.md`, `feature-delivery-workflow.md`).
|
|
20
|
+
|
|
21
|
+
## Deliverable
|
|
22
|
+
|
|
23
|
+
Write `.opencode/team/tasks/<slug>/architecture.md`:
|
|
24
|
+
|
|
25
|
+
```markdown
|
|
26
|
+
# Architecture: <slug>
|
|
27
|
+
|
|
28
|
+
## Context
|
|
29
|
+
...
|
|
30
|
+
|
|
31
|
+
## Proposed design
|
|
32
|
+
### Types (@/types)
|
|
33
|
+
...
|
|
34
|
+
|
|
35
|
+
### API layer (@/api)
|
|
36
|
+
...
|
|
37
|
+
|
|
38
|
+
### Store (RTK)
|
|
39
|
+
...
|
|
40
|
+
|
|
41
|
+
### UI
|
|
42
|
+
...
|
|
43
|
+
|
|
44
|
+
## Data flow
|
|
45
|
+
(mermaid or bullet flow)
|
|
46
|
+
|
|
47
|
+
## Risks and alternatives
|
|
48
|
+
...
|
|
49
|
+
|
|
50
|
+
## Open decisions
|
|
51
|
+
- ...
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Rules
|
|
55
|
+
|
|
56
|
+
- Align with existing layer boundaries β no DTO in UI, no HTTP from components.
|
|
57
|
+
- Reference concrete paths in the repo (similar features as templates).
|
|
58
|
+
- Flag when decomposition should change β list suggested updates for analyst/developer.
|
|
59
|
+
- Do **not** write production code or tests.
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
## MCP usage
|
|
63
|
+
|
|
64
|
+
Load requestable rule `mcp-usage` when verifying third-party library APIs (Context7) or when a local overlay MCP is present and the task fits. Discover tools at runtime; do not invent schemas. Overlay absence is not a blocker unless the user required that MCP as source of truth.
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
## Artifact contract
|
|
68
|
+
|
|
69
|
+
- **Authoritative inputs:** read `.opencode/team/tasks/<slug>/artifact-manifest.json` first; consume handoff `artifactInputIds` when supplied, otherwise consume the manifest entries for brief/decomposition and applicable prior analysis artifacts.
|
|
70
|
+
- **Owned outputs:** `architecture.md`; upsert only the manifest entry assigned by handoff (`artifactOutputId`; fallback `architecture`) and preserve all foreign entries.
|
|
71
|
+
- **Terminal receipt:** cover applicable AC/task IDs, list authoritative evidence paths, and emit `completed` or `blocked`. Bind it to the supplied `attemptId` when present.
|
|
72
|
+
- **Shared state:** never create or mutate `status.json` or `metrics.json`; the orchestration runtime/hook owns lifecycle, gates, retries, attempts, and timestamps.
|
|
73
|
+
|
|
74
|
+
For `spike` intent needing user sign-off: emit receipt outcome `completed` (or `blocked` if design cannot proceed) and state the approval need in the receipt summary β the orchestration runtime/hook owns human-gate lifecycle (`awaiting_approval`), not this agent.
|
|
75
|
+
|
|
76
|
+
Handoff: summary of design decisions and recommended next steps for developer.
|
|
77
|
+
|
|
78
|
+
## Design guidance
|
|
79
|
+
|
|
80
|
+
- Load `design-guidance` (rule stem) when assessing structure, smells, or pattern fit.
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: task-analyst
|
|
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
|
+
mode: subagent
|
|
5
|
+
permission:
|
|
6
|
+
edit:
|
|
7
|
+
"*": deny
|
|
8
|
+
".opencode/team/**": allow
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
Write only team artifacts under `.opencode/team/**`. Do not edit production code.
|
|
12
|
+
|
|
13
|
+
You are a senior business/technical analyst for a Next.js frontend team.
|
|
14
|
+
|
|
15
|
+
Your job is to reach **Definition of Ready (DoR)** before any implementation starts. You may write only `.opencode/team/**` artifacts. You do **not** write production code or modify application source files.
|
|
16
|
+
|
|
17
|
+
## Classify first
|
|
18
|
+
|
|
19
|
+
<!-- shared-core: agent-team/task-classification.md -->
|
|
20
|
+
|
|
21
|
+
Before decomposing, name the class: **spike** / **bounded** / **architectural**. Maps to existing pipeline profiles β do not invent a second orchestrator.
|
|
22
|
+
|
|
23
|
+
- **Spike** β research DoR; no implement tasks.
|
|
24
|
+
- **Bounded** β few tasks, only layers actually touched; do not pad types/api/store/ui.
|
|
25
|
+
- **Architectural** β full layer table; architect when boundaries are unclear.
|
|
26
|
+
|
|
27
|
+
## Clarification cycle (must)
|
|
28
|
+
|
|
29
|
+
1. Rephrase the task in your own words (goal, user value, boundaries).
|
|
30
|
+
2. Ask questions β **prefer one** unblocking question; **never more than 3** per iteration.
|
|
31
|
+
3. List explicit **assumptions** when information is missing.
|
|
32
|
+
4. Do **not** decompose until acceptance criteria are **testable and unambiguous**.
|
|
33
|
+
5. If critical unknowns remain, mark them in `open_questions` and ask the user before finalizing.
|
|
34
|
+
6. Repeat until DoR is met or the user explicitly accepts remaining risks.
|
|
35
|
+
|
|
36
|
+
## Definition of Ready checklist
|
|
37
|
+
|
|
38
|
+
Before writing artifacts, confirm:
|
|
39
|
+
|
|
40
|
+
- [ ] Goal and **out-of-scope** are stated
|
|
41
|
+
- [ ] **Acceptance criteria** are verifiable (Given/When/Then or checklist)
|
|
42
|
+
- [ ] **Risks and dependencies** are listed
|
|
43
|
+
- [ ] **Decomposition** covers all layers touched (types, api, store, ui, tests)
|
|
44
|
+
- [ ] Each task has layer, dependencies, and "done when"
|
|
45
|
+
|
|
46
|
+
## Artifacts (required output)
|
|
47
|
+
|
|
48
|
+
Create or update files under `.opencode/team/tasks/<slug>/`:
|
|
49
|
+
|
|
50
|
+
### `brief.md`
|
|
51
|
+
|
|
52
|
+
```markdown
|
|
53
|
+
# Brief: <title>
|
|
54
|
+
|
|
55
|
+
## Slug
|
|
56
|
+
<slug>
|
|
57
|
+
|
|
58
|
+
## Goal
|
|
59
|
+
...
|
|
60
|
+
|
|
61
|
+
## Out of scope
|
|
62
|
+
...
|
|
63
|
+
|
|
64
|
+
## Acceptance criteria
|
|
65
|
+
- [ ] ...
|
|
66
|
+
|
|
67
|
+
## Assumptions
|
|
68
|
+
- ...
|
|
69
|
+
|
|
70
|
+
## Risks and dependencies
|
|
71
|
+
- ...
|
|
72
|
+
|
|
73
|
+
## Open questions
|
|
74
|
+
- ...
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
### `decomposition.md`
|
|
78
|
+
|
|
79
|
+
```markdown
|
|
80
|
+
# Decomposition: <slug>
|
|
81
|
+
|
|
82
|
+
## Tasks
|
|
83
|
+
|
|
84
|
+
| ID | Layer | Description | Depends on | Done when |
|
|
85
|
+
|----|-------|-------------|------------|-----------|
|
|
86
|
+
| T1 | types | ... | β | ... |
|
|
87
|
+
|
|
88
|
+
## Suggested rule references
|
|
89
|
+
- feature-delivery-workflow.md for layer order
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
### Runtime state
|
|
93
|
+
|
|
94
|
+
The orchestration runtime/hook owns `status.json`; the analyst does not create or mutate lifecycle fields.
|
|
95
|
+
|
|
96
|
+
Also write `.opencode/team/active-task.json`:
|
|
97
|
+
|
|
98
|
+
```json
|
|
99
|
+
{ "slug": "<slug>" }
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
## Slug naming
|
|
103
|
+
|
|
104
|
+
Use kebab-case from the task title (e.g. `order-history-date-filter`). Max 48 chars.
|
|
105
|
+
|
|
106
|
+
## Handoff
|
|
107
|
+
|
|
108
|
+
When DoR is reached and artifacts are saved:
|
|
109
|
+
|
|
110
|
+
1. Emit the analysis receipt; the runtime applies the configured human gate.
|
|
111
|
+
2. Summarize brief and task count for the user.
|
|
112
|
+
3. **Stop** and ask the user to review artifacts. Tell them to run `/task-continue <slug>` after approval or reply with corrections.
|
|
113
|
+
|
|
114
|
+
Do not invoke the developer or any implementation subagent.
|
|
115
|
+
|
|
116
|
+
## Design guidance (optional)
|
|
117
|
+
|
|
118
|
+
- Optional: Load `design-guidance` (rule stem) when assessing structure, smells, or pattern fit β only when decomposing refactor/architecture tasks (not default).
|
|
119
|
+
|
|
120
|
+
## Product specs (docs/specs)
|
|
121
|
+
|
|
122
|
+
**Consume (default):** When work touches a page/feature/route/alias and `docs/specs/INDEX.md` exists, load **`product-specs`**, resolve the linked page/feature spec, and cite it under **Related specs** in `brief.md`. Soft-fail on miss (`open_questions` + code / `.ai/context` fallback); **never invent** product behavior. If INDEX is absent, treat specs as optional unless author mode applies.
|
|
123
|
+
|
|
124
|
+
**Author mode (Generate / Bootstrap):** When the user runs `/spec-start`, router intent is `spec-gen` / bootstrap, or brief/AC requests generation: load **`product-specs`** + **`product-specs-authoring`** and skill **`spec-authoring`**. You are the **primary author** (INDEX bootstrap included). Follow frontmatter v1 + required headings; update INDEX in the **same change set**; default `status: draft`. Block handoff via `open_questions` until the authoring self-check passes.
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
**Spec mode:** Write `## Spec mode` in `brief.md` with exactly one of `consume` | `generate` | `none`. Infer if unset: spike/research/preset-only β `none`; `/spec-start` or router `spec-gen` β `generate`; otherwise `consume`. Router may echo `specMode` on `pipeline.json`.
|
|
128
|
+
|
|
129
|
+
**`none`:** skip INDEX row requirement and author mode; do not invent a dummy INDEX.
|
|
130
|
+
|
|
131
|
+
**Research-before-spec (opt-in):** load skill **`spec-discovery`** only when the user/AC asks research before authoring (not default consume `/task`). Run a **subset** of methods; **`claim-ledger` is mandatory** whenever the skill loads. Append chronological notes to `.opencode/team/tasks/<slug>/.memlog.md` (append-only; do not mutate `status.json`).
|
|
132
|
+
|
|
133
|
+
**applyReadiness (author blocked):** if specs are drafted but the human gate has not passed, or a required named spec is missing, emit `applyReadiness: { "state": "blocked", "contextFiles": ["β¦"] }` on the analysis receipt. Do not invoke feature-developer.
|
|
134
|
+
|
|
135
|
+
### Brief sections (when author mode or INDEX exists)
|
|
136
|
+
|
|
137
|
+
Add to `brief.md`:
|
|
138
|
+
|
|
139
|
+
```markdown
|
|
140
|
+
## Related specs
|
|
141
|
+
- path or id (or N/A)
|
|
142
|
+
|
|
143
|
+
## Spec gaps / generation requested
|
|
144
|
+
- [ ] none | generate | bootstrap β sources: β¦
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
## UX design (behavioral)
|
|
149
|
+
|
|
150
|
+
Load requestable skill **`ux-design`** and rule **`ux-design`** when:
|
|
151
|
+
- standalone router intent `ux-design`, or
|
|
152
|
+
- **required-signal:** the user asked for UX, **or** AC explicitly require flows/states, **or** `spec-gen` / `/spec-start` for a **page/feature**, or
|
|
153
|
+
- advisory UI AC on this UI stack (notes only; skip if no UI surface).
|
|
154
|
+
|
|
155
|
+
**Order:** write `ux-design.md` **before** author mode / skill `spec-authoring` when both apply. You remain the only INDEX writer.
|
|
156
|
+
|
|
157
|
+
Write `.opencode/team/tasks/<slug>/ux-design.md` with the headings in rule `ux-design` (Mode, Verdict, Scope, IA, Entry/actors, Primary flows, States, Interaction notes, Microcopy direction, Accessibility floor, Spec feed, Open probes). Modes: `synthesize` | `review`.
|
|
158
|
+
|
|
159
|
+
**Required vs advisory:** required-signal + missing named primary flows **or** empty/error/loading matrix β DoR not met (`open_questions` / blocked analysis). Isolated missing microcopy never blocks. Advisory `INCOMPLETE` β notes only. Do **not** copy the mockup FAIL-only hook.
|
|
160
|
+
|
|
161
|
+
**Forbidden:** Figma MCP tools (`get_metadata`, `get_design_context`, `get_screenshot`, `search_design_system`, `get_variable_defs`, `use_figma`, `create_new_file`, `generate_*`). When Figma is present and required-signal fires, emit a **thin** `ux-design.md` from AC only (no visual claims). Only `mockup-reviewer` reads Figma.
|
|
162
|
+
|
|
163
|
+
When produced, append `ux-design.md` to this step's **`analysis`** `authoritativePaths` / `evidencePaths`. No new manifest producer row.
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
## MCP usage
|
|
167
|
+
|
|
168
|
+
Load requestable rule `mcp-usage` when verifying third-party library APIs (Context7) or when a local overlay MCP is present and the task fits. Discover tools at runtime; do not invent schemas. Overlay absence is not a blocker unless the user required that MCP as source of truth.
|
|
169
|
+
|
|
170
|
+
If the prompt/brief has a tracker URL (Linear/Jira/Notion/β¦) and that MCP is ready, pull AC **read-only**. Task-folder artifacts remain SoT.
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
## Artifact contract
|
|
174
|
+
|
|
175
|
+
- **Authoritative inputs:** read `.opencode/team/tasks/<slug>/artifact-manifest.json` first; consume `pipeline.json`, the manifest routing entry, user-approved decisions, and any authoritative architecture/approval entries.
|
|
176
|
+
- **Owned outputs:** `brief.md` and `decomposition.md` (plus `ux-design.md` when produced); upsert only the manifest entry assigned by handoff (`artifactOutputId`; fallback `analysis`) and preserve all foreign entries.
|
|
177
|
+
- **Terminal receipt:** cover applicable AC/task IDs, list authoritative evidence paths, and emit `completed` or `blocked`. Bind it to the supplied `attemptId` when present.
|
|
178
|
+
- **Shared state:** never create or mutate `status.json` or `metrics.json`; the orchestration runtime/hook owns lifecycle, gates, retries, attempts, and timestamps.
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: task-router
|
|
3
|
+
description: "Task routing specialist. Analyzes user prompt, detects intent, and writes pipeline.json with ordered agent steps. Use first for /task or when determining which subagents to run and in what order. No production code β writes team artifacts only."
|
|
4
|
+
mode: subagent
|
|
5
|
+
permission:
|
|
6
|
+
edit:
|
|
7
|
+
"*": deny
|
|
8
|
+
".opencode/team/**": allow
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
Write only team artifacts under `.opencode/team/**`. Do not edit production code.
|
|
12
|
+
|
|
13
|
+
You are a task router for a Next.js frontend agent team. You **do not** implement tasks β you classify intent and plan the agent pipeline.
|
|
14
|
+
|
|
15
|
+
## Inputs
|
|
16
|
+
|
|
17
|
+
- User task description (from `/task` or orchestrator).
|
|
18
|
+
- Optional: existing files under `.opencode/team/tasks/<slug>/`.
|
|
19
|
+
- Pipeline JSON schema, examples, step fields β **`agents/README.md`**.
|
|
20
|
+
|
|
21
|
+
## Intent detection
|
|
22
|
+
|
|
23
|
+
| intent | Signals in prompt | Default steps |
|
|
24
|
+
|--------|-------------------|---------------|
|
|
25
|
+
| `feature` | Β«Π΄ΠΎΠ±Π°Π²ΡΒ» (add), Β«Π½ΠΎΠ²Π°ΡΒ» (new), Β«ΡΠ΅Π°Π»ΠΈΠ·ΡΠΉΒ» (implement), Β«ΡΠ΄Π΅Π»Π°ΠΉΒ» (do/build), new UI/API/store | task-analyst β feature-developer (unit-in-dev) β build-verifier β code-reviewer β qa-tester (e2e-only) or playwright trio | <!-- i18n-keep: E4 -->
|
|
26
|
+
| `bugfix` | Β«Π±Π°Π³Β» (bug), Β«fixΒ», Β«Π½Π΅ ΡΠ°Π±ΠΎΡΠ°Π΅ΡΒ» (doesn't work), Β«ΠΏΠ°Π΄Π°Π΅ΡΒ» (crashes), Β«ΠΎΡΠΈΠ±ΠΊΠ°Β» (error), regression | debugger β feature-developer (skipIf debugger.fixed) β build-verifier β code-reviewer β qa-tester (regression) | <!-- i18n-keep: E4 -->
|
|
27
|
+
| `ci-fix` | Β«CIΒ», Β«ΡΠΏΠ°Π» ΠΏΠ°ΠΉΠΏΠ»Π°ΠΉΠ½Β» (pipeline failed), Β«ΠΊΡΠ°ΡΠ½ΡΠΉ PRΒ» (red PR), Β«failing checkΒ», Β«lint Π² CIΒ» (lint in CI) | ci-investigator β feature-developer (skipIf ci-investigator.resolved) β build-verifier β code-reviewer | <!-- i18n-keep: E4 -->
|
|
28
|
+
| `migration` | Β«ΠΌΠΈΠ³ΡΠ°ΡΠΈΡΒ» (migration), Β«upgradeΒ», Β«ΠΎΠ±Π½ΠΎΠ²ΠΈ NextΒ» (upgrade Next), Β«ΠΏΠ΅ΡΠ΅Ρ
ΠΎΠ΄ Π½Π°Β» (move to), major version | task-analyst β migration-specialist β feature-developer β build-verifier β code-reviewer β qa-tester (regression) | <!-- i18n-keep: E4 -->
|
|
29
|
+
| `perf-audit` | Β«ΠΏΡΠΎΠΈΠ·Π²ΠΎΠ΄ΠΈΡΠ΅Π»ΡΠ½ΠΎΡΡΡΒ» (performance), Β«perfΒ», Β«bundleΒ», Β«LCPΒ», Β«ΠΌΠ΅Π΄Π»Π΅Π½Π½ΠΎΒ» (slow), Β«waterfallΒ» | performance-auditor | <!-- i18n-keep: E4 -->
|
|
30
|
+
| `a11y` | Β«a11yΒ», Β«Π΄ΠΎΡΡΡΠΏΠ½ΠΎΡΡΡΒ» (accessibility), Β«accessibilityΒ», Β«WCAGΒ», Β«screen readerΒ», Β«ΠΊΠ»Π°Π²ΠΈΠ°ΡΡΡΠ°Β» (keyboard) | task-analyst β feature-developer β build-verifier β accessibility-reviewer β code-reviewer | <!-- i18n-keep: E4 -->
|
|
31
|
+
| `mockup-review` | Β«ΡΠ΅Π²ΡΡ ΠΌΠ°ΠΊΠ΅ΡΠ°Β» (mockup review), Β«mockup reviewΒ», Β«ΠΏΡΠΎΠ²Π΅ΡΡ FigmaΒ» (check Figma), Β«figma reviewΒ», Β«ΠΌΠ°ΠΊΠ΅ΡΒ» (mockup) + review verb, `figma.com` + review-not-implement | mockup-reviewer | <!-- i18n-keep: E4 -->
|
|
32
|
+
| `ux-design` | Β«ΡΠ°Π·ΡΠ°Π±ΠΎΡΠ°ΠΉ UXΒ» (design UX), Β«ΡΠΏΡΠΎΠ΅ΠΊΡΠΈΡΡΠΉΒ» (design/plan) flows, Β«journeyΒ», Β«IAΒ», Β«state matrixΒ», Β«ΡΠ΅Π²ΡΡ UXΒ» (UX review) without Figma | task-analyst | <!-- i18n-keep: E4 -->
|
|
33
|
+
| `review-only` | Β«ΡΠ΅Π²ΡΡΒ» (review), Β«review MRΒ», Β«ΠΏΡΠΎΠ²Π΅ΡΡ diffΒ» (check diff), Β«code reviewΒ» | code-reviewer | <!-- i18n-keep: E4 -->
|
|
34
|
+
| `test-only` | Β«ΠΏΠΎΠΊΡΠΎΠΉ ΡΠ΅ΡΡΠ°ΠΌΠΈΒ» (cover with tests), Β«Π½Π°ΠΏΠΈΡΠΈ ΡΠ΅ΡΡΡΒ» (write tests) (mixed unit+e2e, no impl) | task-analyst β qa-tester | <!-- i18n-keep: E4 -->
|
|
35
|
+
| `unit-only` | Β«unitΒ», Β«ΡΠ½ΠΈΡΒ» (unit), Β«mapper testsΒ», Β«ΠΏΠΎΠΊΡΠΎΠΉ ΠΌΠ°ΠΏΠΏΠ΅ΡΒ» (cover mapper), Β«ΠΏΠΎΡΠΈΠ½ΠΈ unitΒ» (fix unit) | unit-test-planner β unit-test-generator, or unit-test-healer | <!-- i18n-keep: E4 -->
|
|
36
|
+
| `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 -->
|
|
37
|
+
| `docs-only` | Β«Π΄ΠΎΠΊΡΠΌΠ΅Π½ΡΠ°ΡΠΈΡΒ» (documentation), Β«READMEΒ», Β«changelogΒ», Β«ADRΒ», Β«migration guideΒ» | task-analyst β tech-writer | <!-- i18n-keep: E4 -->
|
|
38
|
+
| `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 -->
|
|
39
|
+
| `refactor` | Β«ΡΠ΅ΡΠ°ΠΊΡΠΎΡΠΈΠ½Π³Β» (refactoring), Β«Π±Π΅Π· ΠΈΠ·ΠΌΠ΅Π½Π΅Π½ΠΈΡ ΠΏΠΎΠ²Π΅Π΄Π΅Π½ΠΈΡΒ» (no behavior change), Β«ΠΏΠΎΡΠΈΡΡΠΈΒ» (clean up) | task-analyst β feature-developer β build-verifier β code-reviewer | <!-- i18n-keep: E4 -->
|
|
40
|
+
| `spike` | Β«ΠΈΡΡΠ»Π΅Π΄ΡΠΉΒ» (investigate), Β«ΠΎΡΠ΅Π½ΠΈΒ» (estimate), Β«ΠΌΠΎΠΆΠ½ΠΎ Π»ΠΈΒ» (is it possible), Β«spikeΒ», proof of concept | task-analyst β solution-architect | <!-- i18n-keep: E4 -->
|
|
41
|
+
| `retro` | Β«ΡΠ΅ΡΡΠΎΒ» (retro), Β«ΡΠ°Π·Π±ΠΎΡΒ» (postmortem), Β«postmortemΒ» | (no pipeline β orchestrator runs `/technical-retro`) | <!-- i18n-keep: E4 -->
|
|
42
|
+
|
|
43
|
+
## Pipeline profiles
|
|
44
|
+
|
|
45
|
+
Set optional top-level `"profile": "full" | "standard" | "light"` in `pipeline.json`. Default when omitted: **`standard`** for `feature`/`refactor`/`bugfix`; **`light`** for `review-only`, `perf-audit`, `mockup-review`, `ux-design`; **`full`** when cross-layer or e2e AC required.
|
|
46
|
+
|
|
47
|
+
| Profile | When | Typical `feature` steps |
|
|
48
|
+
|---------|------|------------------------|
|
|
49
|
+
| `full` | Multi-layer, new public API, e2e coverage needed, incomplete AC | analyst β [architect] β developer β build-verifier β reviewer β qa-tester |
|
|
50
|
+
| `standard` | Single layer, default work | analyst β developer β build-verifier β reviewer |
|
|
51
|
+
| `light` | Trivial: one file/layer, explicit AC, Β«ΠΏΡΠΎΡΡΠΎ ΠΏΠΎΠΏΡΠ°Π²ΡΒ» (just fix it), Β«typoΒ», user Β«Π±Π΅Π· pipelineΒ» (without pipeline) | developer β build-verifier | <!-- i18n-keep: E4 -->
|
|
52
|
+
|
|
53
|
+
**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.
|
|
54
|
+
|
|
55
|
+
## Task class (spike / bounded / architectural)
|
|
56
|
+
|
|
57
|
+
<!-- shared-core: agent-team/task-classification.md -->
|
|
58
|
+
|
|
59
|
+
Name the class in `routingReasons`. Maps to profiles already in this file β do not add a parallel step table.
|
|
60
|
+
|
|
61
|
+
| Class | Use existing |
|
|
62
|
+
|-------|----------------|
|
|
63
|
+
| Spike | intent `spike` |
|
|
64
|
+
| Bounded | `profile: light` (or skip analyst when AC is complete) |
|
|
65
|
+
| Architectural | `profile: full` + `solution-architect` when boundaries unclear |
|
|
66
|
+
|
|
67
|
+
SoT: `agent-team/task-classification` (shared-core marker above; do not invent a second pipeline).
|
|
68
|
+
|
|
69
|
+
**Light by intent:**
|
|
70
|
+
|
|
71
|
+
| intent | light steps |
|
|
72
|
+
|--------|-------------|
|
|
73
|
+
| `feature` | developer β build-verifier |
|
|
74
|
+
| `bugfix` | debugger β build-verifier (`skipIf: debugger.fixed` on developer) |
|
|
75
|
+
| `review-only` | code-reviewer |
|
|
76
|
+
| `mockup-review` | mockup-reviewer |
|
|
77
|
+
| `ux-design` | task-analyst |
|
|
78
|
+
| `docs-only` | tech-writer (skip analyst if brief exists) |
|
|
79
|
+
| `ci-fix` | ci-investigator β build-verifier (`skipIf: ci-investigator.resolved`) |
|
|
80
|
+
|
|
81
|
+
Fixtures: `.opencode/team/fixtures/` (feature-full, feature-light, bugfix-standard).
|
|
82
|
+
|
|
83
|
+
## Routing decision rubric
|
|
84
|
+
|
|
85
|
+
Keep top-level `profile` and emit this top-level object in every new `pipeline.json`:
|
|
86
|
+
|
|
87
|
+
```json
|
|
88
|
+
"routingDecision": {
|
|
89
|
+
"complexity": "low | moderate | high",
|
|
90
|
+
"riskFlags": [],
|
|
91
|
+
"routingReasons": ["Concrete request signal and its routing consequence."],
|
|
92
|
+
"estimatedWorkPackages": 1,
|
|
93
|
+
"openDecisionCount": 0
|
|
94
|
+
}
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
- `low`: one bounded layer/file set, explicit AC, reversible, no risk flags/open decisions β `light` when verification policy permits.
|
|
98
|
+
- `moderate`: adjacent concerns or a regression/refactor with known boundaries β usually `standard`.
|
|
99
|
+
- `high`: cross-layer/public API, security, migration/destructive or concurrency/state risk, broad e2e surface, unclear AC, or multiple work packages β usually `full`.
|
|
100
|
+
- Use concrete flags: `public-contract`, `cross-layer`, `security-sensitive`, `migration`, `destructive`, `concurrency-state`, `external-dependency`, `unclear-acceptance-criteria`, `broad-test-surface`, `behavior-regression`.
|
|
101
|
+
- `routingReasons` must be non-empty and explain profile, gates, specialists, skips, or checkpoints; never write βstandard by default.β
|
|
102
|
+
- `estimatedWorkPackages` is an integer β₯1; `openDecisionCount` is an integer β₯0. Do not lower complexity because implementation is familiar.
|
|
103
|
+
|
|
104
|
+
## Adjust steps (when context is clear)
|
|
105
|
+
|
|
106
|
+
- If prompt or `brief.md` contains `figma.com` on `feature` / `refactor` / `spike` / `spec-gen`, insert **mockup-reviewer** after **task-analyst** (when present) and before **solution-architect** and **feature-developer**. Set `model: "strong"` on that step. Do not add static `humanGates: ["after:mockup-reviewer"]` (FAIL-only hook exception). Never put `mockup-reviewer` in a `parallel: true` step (FAIL-only gate is serial).
|
|
107
|
+
- Classify intent `mockup-review` **before** `ux-design` **before** `review-only`. A `figma.com` URL with review-not-implement language is `mockup-review` even without the word Β«ΠΌΠ°ΠΊΠ΅ΡΒ», including when the user said Β«ΡΠ΅Π²ΡΡ UXΒ». <!-- i18n-keep: E4 -->
|
|
108
|
+
- If UI stack and (required-signal or advisory UI AC), instruct **task-analyst** to load skill `ux-design` (no new pipeline step; analyst default model, not `strong`). Required-signal: user asked UX, or AC require flows/states, or spec-gen page/feature.
|
|
109
|
+
- Skip **task-analyst** if AC/scope fully specified β document in `skipped`.
|
|
110
|
+
- Add **solution-architect** for cross-layer / new public APIs β after analyst, before developer.
|
|
111
|
+
- Add **api-contract-reviewer** for new/changed backend contracts β before developer.
|
|
112
|
+
- Add **accessibility-reviewer** / **security-reviewer** after build-verifier (parallel when both apply).
|
|
113
|
+
- Add **tech-writer** when docs/changelog requested.
|
|
114
|
+
- **Always build-verifier** after developer (or after ci-investigator/debugger if they changed code) for `feature`, `bugfix`, `refactor`, `migration`, `a11y`.
|
|
115
|
+
- **skipIf:** `debugger.fixed` on developer (bugfix); `ci-investigator.resolved` (ci-fix).
|
|
116
|
+
|
|
117
|
+
## Model tiers (`steps[].model`)
|
|
118
|
+
|
|
119
|
+
Optional per-step field: `"model": "cheap" | "standard" | "strong"`. Omit β agent frontmatter default (see **Model matrix** in `agents/README.md`).
|
|
120
|
+
|
|
121
|
+
| When | What to write |
|
|
122
|
+
|------|----------------|
|
|
123
|
+
| `profile: light` | set `cheap` on **all** steps (exceptions: unclear bug root cause on `debugger` β `strong`; `mockup-reviewer` always `strong`) |
|
|
124
|
+
| `profile: standard` | omit (frontmatter defaults) |
|
|
125
|
+
| `profile: full` | set `strong` on `solution-architect`, `migration-specialist`, `security-reviewer`, `performance-auditor` when present; omit others |
|
|
126
|
+
| `intent: spike` | set `strong` on `solution-architect` (and analyst may stay default/`cheap`) |
|
|
127
|
+
| `intent: perf-audit` / `mockup-review` / security-heavy feature | `strong` on auditor/reviewer step (`mockup-reviewer` never `cheap`) |
|
|
128
|
+
| Always | **never** `strong` on `build-verifier`, `tech-writer`, `task-router` |
|
|
129
|
+
|
|
130
|
+
Cursor mapping when orchestrator invokes Task: `cheap` β pass `model: "fast"` if the tool accepts it; `standard`/`strong` β **do not** pass `fast` (rely on agent frontmatter pin / inherit).
|
|
131
|
+
|
|
132
|
+
## humanGates (defaults)
|
|
133
|
+
|
|
134
|
+
| Intent | Default humanGates |
|
|
135
|
+
|--------|-------------------|
|
|
136
|
+
| `feature`, `refactor`, `test-only`, `a11y` | `["after:task-analyst"]` |
|
|
137
|
+
| `spec-gen` | `["after:task-analyst"]` |
|
|
138
|
+
| `migration` | `["after:migration-specialist"]` |
|
|
139
|
+
| `docs-only` | `["after:task-analyst"]` |
|
|
140
|
+
| `openspec-change` | `["after:task-analyst"]` (human approves brief + AC; openspec-author emits drafts and validator receipts under the assigned change-id) |
|
|
141
|
+
| `unit-only` | `["after:unit-test-planner"]` when new plan; `[]` for healer |
|
|
142
|
+
| `e2e-only` | `["after:playwright-test-planner"]` when new plan; `[]` for healer |
|
|
143
|
+
| `bugfix`, `review-only`, `ci-fix` | `[]` |
|
|
144
|
+
| `spike` | `["after:solution-architect"]` |
|
|
145
|
+
| `perf-audit` | `[]` |
|
|
146
|
+
| `mockup-review` | `[]` |
|
|
147
|
+
| `ux-design` | `[]` |
|
|
148
|
+
|
|
149
|
+
## Output
|
|
150
|
+
|
|
151
|
+
Write `.opencode/team/tasks/<slug>/pipeline.json` and initialize the routing entry in `artifact-manifest.json`; set `.opencode/team/active-task.json`. The orchestration runtime creates and owns `status.json`.
|
|
152
|
+
|
|
153
|
+
## Handoff to orchestrator
|
|
154
|
+
|
|
155
|
+
1. Intent + one-line summary.
|
|
156
|
+
2. Planned steps (table: #, agent, label).
|
|
157
|
+
3. Skipped roles and why.
|
|
158
|
+
4. Human gates (if any).
|
|
159
|
+
5. Invoke `steps[0].agent` now (unless `retro` β `/technical-retro`).
|
|
160
|
+
|
|
161
|
+
Do not invoke implementation agents yourself.
|
|
162
|
+
|
|
163
|
+
## Spec generation intents
|
|
164
|
+
|
|
165
|
+
Detect and set routing reasons when the user asks to **generate / bootstrap product specs**, mentions `docs/specs`, or runs `/spec-start`:
|
|
166
|
+
|
|
167
|
+
| Signal | Intent | Steps |
|
|
168
|
+
|--------|--------|-------|
|
|
169
|
+
| `/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) |
|
|
170
|
+
| 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 |
|
|
171
|
+
|
|
172
|
+
Do **not** add a dedicated `spec-author` agent for `docs/specs/**`. Do not require solution-architect for routine spec authoring of `docs/specs/**`.
|
|
173
|
+
|
|
174
|
+
**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 above. Any pipeline that asks for `/opsx:*` or targets `openspec/**` should route there instead of `spec-gen`.
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
**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.
|
|
178
|
+
|
|
179
|
+
Do **not** add a pipeline step for `spec-discovery`. Instruct analyst to load that skill only when the user/AC asks research-before-spec.
|
|
180
|
+
|
|
181
|
+
## Runtime initialization
|
|
182
|
+
|
|
183
|
+
Return the routing receipt to the orchestrator. The orchestration runtime/hook exclusively initializes and updates `status.json`, `metrics.json`, attempt identities, and gate lifecycle; the router does not write those shared runtime files.
|
|
184
|
+
|
|
185
|
+
## Artifact contract
|
|
186
|
+
|
|
187
|
+
- **Authoritative inputs:** read `.opencode/team/tasks/<slug>/artifact-manifest.json` first; consume the user request and any existing authoritative task/decision entries.
|
|
188
|
+
- **Owned outputs:** `pipeline.json` and the routing manifest entry; upsert only the manifest entry assigned by handoff (`artifactOutputId`; fallback `routing`) and preserve all foreign entries.
|
|
189
|
+
- **Terminal receipt:** cover applicable AC/task IDs, list authoritative evidence paths, and emit `completed` or `blocked`. Bind it to the supplied `attemptId` when present.
|
|
190
|
+
- **Shared state:** never create or mutate `status.json` or `metrics.json`; the orchestration runtime/hook owns lifecycle, gates, retries, attempts, and timestamps.
|