@bonesofspring/ai-rules 0.2.23 → 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 +9 -0
- package/README.md +5 -1
- package/bin/cli.js +32 -9
- package/bin/opencode-install.js +531 -0
- package/package.json +10 -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 +4 -3
- package/presets/_shared/core/meta/preset-token-budget.md +3 -0
- package/presets/_shared/core/meta/preset-twin-sync.md +16 -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 +4 -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 +16 -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 +4 -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 +16 -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 +4 -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 +16 -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 +4 -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 +16 -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 +4 -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 +16 -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 +4 -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 +16 -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 +4 -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 +16 -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 +4 -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 +16 -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 +4 -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 +16 -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 +4 -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 +16 -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 +4 -3
- package/presets/cursor/android-kotlin/rules/preset-token-budget.mdc +3 -0
- package/presets/cursor/android-kotlin/rules/preset-twin-sync.mdc +16 -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 +4 -3
- package/presets/cursor/go/rules/preset-token-budget.mdc +3 -0
- package/presets/cursor/go/rules/preset-twin-sync.mdc +16 -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 +4 -3
- package/presets/cursor/ios-swift/rules/preset-token-budget.mdc +3 -0
- package/presets/cursor/ios-swift/rules/preset-twin-sync.mdc +16 -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 +4 -3
- package/presets/cursor/java/rules/preset-token-budget.mdc +3 -0
- package/presets/cursor/java/rules/preset-twin-sync.mdc +16 -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 +4 -3
- package/presets/cursor/mcp-ts/rules/preset-token-budget.mdc +3 -0
- package/presets/cursor/mcp-ts/rules/preset-twin-sync.mdc +16 -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 +4 -3
- package/presets/cursor/next/rules/preset-token-budget.mdc +3 -0
- package/presets/cursor/next/rules/preset-twin-sync.mdc +16 -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 +4 -3
- package/presets/cursor/nuxt/rules/preset-token-budget.mdc +3 -0
- package/presets/cursor/nuxt/rules/preset-twin-sync.mdc +16 -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 +4 -3
- package/presets/cursor/php-hexagonal/rules/preset-token-budget.mdc +3 -0
- package/presets/cursor/php-hexagonal/rules/preset-twin-sync.mdc +16 -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 +4 -3
- package/presets/cursor/php-laravel/rules/preset-token-budget.mdc +3 -0
- package/presets/cursor/php-laravel/rules/preset-twin-sync.mdc +16 -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 +4 -3
- package/presets/cursor/svelte/rules/preset-token-budget.mdc +3 -0
- package/presets/cursor/svelte/rules/preset-twin-sync.mdc +16 -0
- package/presets/mavis/next/REPO_AGENTS.md +9 -7
- package/presets/mavis/next/adapter-map.json +1 -1
- package/presets/mavis/next/agents/build-verifier.md +3 -1
- package/presets/mavis/next/rules/agent-team-orchestrator.md +2 -2
- package/presets/mavis/next/rules/ai-local-overlay.md +1 -1
- package/presets/mavis/next/rules/preset-layering.md +3 -3
- package/presets/mavis/next/rules/preset-no-cross-stack-leakage.md +1 -1
- package/presets/mavis/next/rules/preset-pr-checklist.md +4 -3
- package/presets/mavis/next/rules/preset-token-budget.md +3 -0
- package/presets/mavis/next/rules/preset-twin-sync.md +16 -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 +5 -1
- package/scripts/check-chain-hook-coverage.sh +1 -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 +30 -1
- package/scripts/check-preset-structure.sh +45 -0
- package/scripts/check-task-router-intents.sh +4 -4
- package/scripts/fixtures/cli-golden/claude/next.json +8 -8
- package/scripts/fixtures/cli-golden/cursor/next.json +8 -8
- package/scripts/fixtures/cli-golden/mavis/next.json +9 -9
- package/scripts/fixtures/cli-golden/opencode/next.json +125 -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 +9 -7
- package/scripts/generate-opencode-next.mjs +831 -0
- package/scripts/lib/discover-hooks.mjs +23 -1
- package/scripts/sync-dogfood-mavis.sh +90 -0
- package/scripts/sync-dogfood-opencode.sh +85 -0
- package/scripts/test-agent-task-metrics-hooks.mjs +4 -1
- package/scripts/test-chain-team-phases-coverage.mjs +6 -1
- package/scripts/test-cli-init-clean.mjs +111 -0
- package/scripts/test-opencode-context-budget.mjs +53 -0
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Type documentation in `app/src/types`
|
|
2
|
+
|
|
3
|
+
When adding or substantially changing types in this layer, **follow the JSDoc style already adopted in the repo** (see examples: `User.types.ts`, `Common.types.ts`, `ServerValidation.types.ts`, `TreatmentPlan/*.types.ts`).
|
|
4
|
+
|
|
5
|
+
## Language and form
|
|
6
|
+
|
|
7
|
+
- Comment text — **in Russian** (repo locale convention for domain/API field descriptions), brief and to the point: what the type or field means in the domain or API contract.
|
|
8
|
+
- **Do not rely** on tags like `@param`, `@returns`, `@see`, `@deprecated` for type descriptions — they are **not used** in this layer; plain text in `/** … */` is enough.
|
|
9
|
+
|
|
10
|
+
## Exported `type` / `interface`
|
|
11
|
+
|
|
12
|
+
- Immediately **before the declaration** — a `/** … */` block.
|
|
13
|
+
- If you need to explain data source, constraints, or non-obvious details — a **second paragraph** in the same block (in JSDoc, separate paragraphs with a blank line between text lines).
|
|
14
|
+
- For **nested** objects in the same file, document each type with its own block above its declaration.
|
|
15
|
+
|
|
16
|
+
## Fields
|
|
17
|
+
|
|
18
|
+
- For **every** public property — a **single-line** `/** … */` on the line directly **above** the field.
|
|
19
|
+
- If a field **does not come from the backend as-is** but is computed or enriched on the frontend (mapper, selector, UI) — start the description with the **`[computed]`** prefix (as in `TUserProfile`, treatment plan types).
|
|
20
|
+
- For data formats, state this **in the text**: e.g. date `YYYY-MM-DD`, a display string example in quotes.
|
|
21
|
+
|
|
22
|
+
Example field comment (Russian locale — keep Cyrillic in type docs): <!-- i18n-keep: E5 -->
|
|
23
|
+
|
|
24
|
+
```ts
|
|
25
|
+
/** Дата рождения в формате YYYY-MM-DD */ <!-- i18n-keep: E5 -->
|
|
26
|
+
birthDate: string
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Classes and other declarations
|
|
30
|
+
|
|
31
|
+
- For **classes** (e.g. transport errors), when changing public API — a brief block above the class and **comments on public fields** using the same rules as interface properties.
|
|
32
|
+
|
|
33
|
+
## `enum`
|
|
34
|
+
|
|
35
|
+
- In `enums.ts`, members are often **without JSDoc** historically; for new enums a short description **above the enum** is acceptable if purpose is not obvious from the name. UI labels — as established, via `*Names` objects next to the enum.
|
|
36
|
+
|
|
37
|
+
## Agent practice
|
|
38
|
+
|
|
39
|
+
- When adding a new type or field, **do not leave** new public fields unexplained if meaning is not 100% clear from the name.
|
|
40
|
+
- When editing a file that already has such comments, **maintain the same style**, not mixed with English-only or tag-heavy blocks.
|
|
41
|
+
- Do not bloat comments: one or two sentences per type, one line per field is normal; exception — a genuinely complex domain caveat.
|
|
42
|
+
|
|
43
|
+
See also imports and barrel: `public-imports.md`.
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
<!-- shared-core: review/ux-design.md -->
|
|
2
|
+
|
|
3
|
+
# UX design checklist
|
|
4
|
+
|
|
5
|
+
On-demand behavioral UX checklist (IA, named flows, state matrix). **Procedure:** skill `ux-design`. **Producer:** `task-analyst` (not a pipeline agent). Do not inline this checklist into the analyst prompt.
|
|
6
|
+
|
|
7
|
+
Stack-agnostic: no app-source globs, Playwright, or `xcodebuild`. Form-factor **examples** live in adapter **Stack notes** only.
|
|
8
|
+
|
|
9
|
+
## When to load
|
|
10
|
+
|
|
11
|
+
- Standalone `/task` intent `ux-design` (modes `synthesize` | `review`; profile `light`; steps only `task-analyst`)
|
|
12
|
+
- Embedded on a UI-capable stack when **required-signal** or advisory UI AC fires on `feature` / `refactor` / `spike` / `spec-gen`
|
|
13
|
+
- Required-signal (any one): the user asked for UX, **or** AC explicitly require flows/states, **or** intent is `spec-gen` / `/spec-start` for a **page/feature**. Else **advisory** (notes only; skip if no UI surface)
|
|
14
|
+
- **Do not** load for backend-only AC even on a UI stack. Classify `mockup-review` (Figma) before `ux-design` before `review-only`
|
|
15
|
+
|
|
16
|
+
## Inputs
|
|
17
|
+
|
|
18
|
+
1. Task `artifact-manifest.json`, then prompt / `brief.md` / `decomposition.md` when present
|
|
19
|
+
2. Skill `ux-design` + this rule
|
|
20
|
+
3. Approved `docs/specs` only as product-behavior SoT **after** UX synthesis maps via Spec feed — do not write INDEX here
|
|
21
|
+
|
|
22
|
+
## Forbidden Figma MCP
|
|
23
|
+
|
|
24
|
+
Do **not** call Figma MCP. Only `mockup-reviewer` reads Figma. Forbidden by name: `get_metadata`, `get_design_context`, `get_screenshot`, `search_design_system`, `get_variable_defs`, `use_figma`, `create_new_file`, `generate_*`.
|
|
25
|
+
|
|
26
|
+
When `figma.com` is present and required-signal fires, emit a **thin** `ux-design.md` from AC only (IA/flows the mockup must cover; no visual or DS claims). If the user only pasted a URL and AC are visual, the UX file may be omitted; `mockup-review.md` coverage stands.
|
|
27
|
+
|
|
28
|
+
Do **not** write BMAD-style `DESIGN.md` or a second visual spine. One experience artifact: `ux-design.md`.
|
|
29
|
+
|
|
30
|
+
## Modes
|
|
31
|
+
|
|
32
|
+
| Mode | When |
|
|
33
|
+
|------|------|
|
|
34
|
+
| `synthesize` | Design UX from a brief/AC (standalone «разработай UX» / embedded required-signal) | <!-- i18n-keep: E4 -->
|
|
35
|
+
| `review` | Critique a brief/wireframe/description **without** Figma («ревью UX»). Figma + review-not-implement remains intent `mockup-review` | <!-- i18n-keep: E4 -->
|
|
36
|
+
|
|
37
|
+
## Required vs advisory
|
|
38
|
+
|
|
39
|
+
- **Required** when required-signal fires (user-asked-ux / ac-requires-flows-states / spec-gen-page-feature)
|
|
40
|
+
- **Advisory** otherwise (UI AC without those signals). Advisory `INCOMPLETE` → notes only; DoR may complete
|
|
41
|
+
- Skip the skill when there is no UI surface or the prompt is empty of UX-relevant AC
|
|
42
|
+
|
|
43
|
+
## Verdicts
|
|
44
|
+
|
|
45
|
+
`PASS` | `PASS_WITH_NOTES` | `INCOMPLETE`. Never copy the mockup FAIL-only hook (`changes_requested` + do-not-retry-developer). Incomplete UX is an analyst/DoR problem.
|
|
46
|
+
|
|
47
|
+
| Verdict | Required step | Advisory step | Standalone intent `ux-design` |
|
|
48
|
+
|---------|---------------|---------------|-------------------------------|
|
|
49
|
+
| `PASS` / `PASS_WITH_NOTES` | Analysis may complete DoR | Analysis may complete | `completed` |
|
|
50
|
+
| `INCOMPLETE` | DoR **not** met: `open_questions` / blocked analysis; existing `after:task-analyst` gate | Notes only; DoR may complete | `completed` (report-only) |
|
|
51
|
+
|
|
52
|
+
**Block (`INCOMPLETE` as DoR failure) only when the step was required and primary flows *or* the empty/error/loading matrix are missing.** Isolated missing microcopy or optional protagonist names never block.
|
|
53
|
+
|
|
54
|
+
## Surface-closure
|
|
55
|
+
|
|
56
|
+
Each stated need → a surface; each surface → a flow that lands there. If closure fails, list probes under **Open probes** — **do not invent** screens, flows, or copy to fill gaps.
|
|
57
|
+
|
|
58
|
+
## Spec feed
|
|
59
|
+
|
|
60
|
+
Analyst remains the **only** writer of `docs/specs` INDEX and page/feature files. Map `ux-design.md` → templates **after** UX synthesis (UX before `spec-authoring` author mode):
|
|
61
|
+
|
|
62
|
+
| `ux-design.md` heading | Page template | Feature template |
|
|
63
|
+
|------------------------|---------------|------------------|
|
|
64
|
+
| Scope + IA | **Overview** | **Overview** |
|
|
65
|
+
| Entry / actors | **Entry / actors** | — (page-level) |
|
|
66
|
+
| Primary flows | **Primary flows** | **Shared behavior / constraints** when a flow is cross-page |
|
|
67
|
+
| States | **States** (loading/empty/error/success) | **Cross-cutting states** when shared |
|
|
68
|
+
| Interaction notes + microcopy direction | Inform **Acceptance criteria**; leftover → **Edge cases** | Shared constraints |
|
|
69
|
+
| Accessibility floor (behavioral) | Testable AC without pixels; else Edge cases | Shared constraints |
|
|
70
|
+
| Surface-closure probes | Analyst `open_questions` — **do not** invent spec rows | Same |
|
|
71
|
+
|
|
72
|
+
## Manifest
|
|
73
|
+
|
|
74
|
+
When produced, append `ux-design.md` to the **`analysis`** entry `authoritativePaths` and `evidencePaths`. Do **not** add a new default producer row for v1 (`ux-designer` is deferred).
|
|
75
|
+
|
|
76
|
+
## Report headings
|
|
77
|
+
|
|
78
|
+
Write `ux-design.md` with these headings (must match the architecture artifact contract):
|
|
79
|
+
|
|
80
|
+
```markdown
|
|
81
|
+
# UX design: <slug>
|
|
82
|
+
## Mode
|
|
83
|
+
synthesize | review
|
|
84
|
+
## Verdict
|
|
85
|
+
PASS | PASS_WITH_NOTES | INCOMPLETE
|
|
86
|
+
## Scope
|
|
87
|
+
- Form factor: web | ios | android | mixed
|
|
88
|
+
- Figma present: yes | no
|
|
89
|
+
- Required-signal: user-asked-ux | ac-requires-flows-states | spec-gen-page-feature | advisory
|
|
90
|
+
## Information architecture
|
|
91
|
+
## Entry / actors
|
|
92
|
+
## Primary flows
|
|
93
|
+
## States
|
|
94
|
+
## Interaction notes
|
|
95
|
+
## Microcopy direction
|
|
96
|
+
## Accessibility floor (behavioral)
|
|
97
|
+
## Spec feed
|
|
98
|
+
## Open probes
|
|
99
|
+
```
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# `.opencode/skills` (preset next)
|
|
2
|
+
|
|
3
|
+
Project skills for Cursor. They keep long workflows out of always-on rules while preserving the same team conventions as the Claude preset.
|
|
4
|
+
|
|
5
|
+
| Skill | When to use |
|
|
6
|
+
|-------|-------------|
|
|
7
|
+
| `feature-delivery` | End-to-end feature work across types, API, store, UI, tests |
|
|
8
|
+
| `spec-authoring` | Author or bootstrap docs/specs (INDEX, page/feature templates); `/spec-start` / analyst author mode |
|
|
9
|
+
| `spec-discovery` | Opt-in research-before-spec in analyst author mode (claim ledger; not default `/task` consume) |
|
|
10
|
+
| `mockup-review` | Figma mockup review: DS, coverage, viewports (standalone or embedded) |
|
|
11
|
+
| `ux-design` | Behavioral UX synthesis/review via task-analyst (standalone or embedded; no Figma MCP) |
|
|
12
|
+
| `code-review` | MR/diff review using project architecture and test standards |
|
|
13
|
+
| `debug-investigation` | Reproducing and fixing bugs with root-cause evidence |
|
|
14
|
+
| `ci-investigation` | Diagnosing and fixing failing CI checks on PRs/branches |
|
|
15
|
+
| `unit-testing` | Planning, generating, or healing unit test coverage |
|
|
16
|
+
| `playwright-e2e` | Planning, generating, or healing Playwright e2e coverage |
|
|
17
|
+
| `technical-retro` | Technical retrospective for a task, sprint, incident, or agent pipeline |
|
|
18
|
+
| `write-adr` | Author an Architecture Decision Record (context / decision / consequences) |
|
|
19
|
+
| `react-performance` | Implementer checklist: bundle, RSC/client, memo, waterfalls, CWV (not a perf audit agent) |
|
|
20
|
+
|
|
21
|
+
Skills are copied to `.opencode/skills/` by `ai-rules init opencode --preset next`.
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ci-investigation
|
|
3
|
+
description: Investigates failing CI checks on PRs and branches — lint, type-check, unit, e2e — with local reproduction and minimal fixes. Use when CI is red or for ci-fix pipeline tasks.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# CI Investigation
|
|
7
|
+
|
|
8
|
+
## Workflow
|
|
9
|
+
|
|
10
|
+
1. Identify the **first failing check** (lint, type-check, unit, e2e, build).
|
|
11
|
+
2. Capture error output — ignore cascading failures until root cause is found.
|
|
12
|
+
3. Reproduce locally with the same commands CI uses from `app/`:
|
|
13
|
+
- `lint:js`, `lint:css`, `type-check`
|
|
14
|
+
- targeted unit test file or suite
|
|
15
|
+
- affected Playwright spec if e2e failed
|
|
16
|
+
4. Inspect git diff for changed files related to the failure.
|
|
17
|
+
5. Apply **minimal fix** — no unrelated refactors.
|
|
18
|
+
|
|
19
|
+
## Artifact
|
|
20
|
+
|
|
21
|
+
Write `ci-report.md` under the task slug folder:
|
|
22
|
+
|
|
23
|
+
- Failed check name and link/log excerpt
|
|
24
|
+
- Root cause classification
|
|
25
|
+
- Fix applied (or handoff to feature-developer)
|
|
26
|
+
- Validation commands and results
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
## MCP usage
|
|
30
|
+
|
|
31
|
+
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.
|
|
32
|
+
|
|
33
|
+
If a Sentry/Datadog (or similar) MCP is ready and the task is a production error, event, or trace, use it. Do not invent telemetry.
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
## Handoff Rules
|
|
37
|
+
|
|
38
|
+
- Config-only or one-line fixes → fix in place, re-run check.
|
|
39
|
+
- Missing tests or architecture work → document and route to `feature-developer` or `qa-tester`.
|
|
40
|
+
- Flaky e2e → prefer `playwright-test-healer` after ci-investigator identifies the spec.
|
|
41
|
+
|
|
42
|
+
## Validation
|
|
43
|
+
|
|
44
|
+
Always re-run the failing command locally before marking complete. If environment blocks execution, state the exact command and blocker.
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: code-review
|
|
3
|
+
description: Reviews pull requests, merge requests, git diffs, and branch changes using the preset's architecture, import, UI, API, and testing standards. Use when the user asks for review or when code-reviewer runs in an agent pipeline.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Code Review
|
|
7
|
+
|
|
8
|
+
## Inputs
|
|
9
|
+
|
|
10
|
+
Use the local repository as the source of truth: `git status`, `git diff`, task artifacts under `.opencode/team/tasks/<slug>/` when present, and opened files. Do not invent hosting metadata such as labels, CI status, or reviewers.
|
|
11
|
+
|
|
12
|
+
## Review Order
|
|
13
|
+
|
|
14
|
+
1. Understand the intent and affected layers.
|
|
15
|
+
2. Check correctness and regressions first.
|
|
16
|
+
3. Verify architecture boundaries: UI does not know DTO/transport, store does not depend on UI, API services do not pull UI/store.
|
|
17
|
+
4. Check public imports through `@/types` and `@/api`, plus barrel updates for new public symbols.
|
|
18
|
+
5. Review UI consistency, styling conventions, and prop shape.
|
|
19
|
+
6. Check tests: unit for mapper/domain logic, behavior tests for HTTP client changes, e2e plan/spec updates for user flows.
|
|
20
|
+
7. **Reuse lens:** flag new helpers that duplicate existing utilities; prefer adjacent shared modules over copy-paste.
|
|
21
|
+
8. **Efficiency lens:** unnecessary work, sequential ops that should be parallel, hot-path bloat, no-op store updates, overly broad reads.
|
|
22
|
+
9. Report validation gaps: lint, stylelint, type-check, or relevant tests not run.
|
|
23
|
+
|
|
24
|
+
## Output
|
|
25
|
+
|
|
26
|
+
Lead with findings ordered by severity. Required shape (also in `code-review-mr`):
|
|
27
|
+
|
|
28
|
+
- Each finding: **`path:line`** — problem — impact — concrete fix direction.
|
|
29
|
+
- Severity: **`blocker` | `important` | `nit`** (list blocker → nit).
|
|
30
|
+
- Vague («looks risky») is not a finding — cite evidence or ask for surrounding context.
|
|
31
|
+
- End with a verdict line: **`Safe to merge | needs changes | reject`**.
|
|
32
|
+
- If there are no findings, say so and call out remaining test or validation risk.
|
|
33
|
+
|
|
34
|
+
For agent team tasks, write `.opencode/team/tasks/<slug>/review.md` and upsert the owned terminal receipt (`completed` or `changes_requested`); do not mutate `status.json`.
|
|
35
|
+
|
|
36
|
+
## Receiving review feedback
|
|
37
|
+
|
|
38
|
+
<!-- shared-core: review/receiving-code-review.md -->
|
|
39
|
+
|
|
40
|
+
When **implementing** review comments (not when issuing them): verify each item against the codebase before changing code; do not perform agreement (`You're absolutely right!`). Unclear items → ask, do not guess.
|
|
41
|
+
|
|
42
|
+
## Design guidance
|
|
43
|
+
|
|
44
|
+
- Load `design-guidance` (rule stem) when assessing structure, smells, or pattern fit.
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: debug-investigation
|
|
3
|
+
description: Investigates bugs, failing tests, crashes, and incorrect behavior with runtime evidence before applying minimal fixes. Use for bugfix tasks, debugger agent runs, regressions, and flaky test diagnosis.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<!-- shared-core: quality/debug-investigation.md -->
|
|
7
|
+
|
|
8
|
+
# Debug investigation
|
|
9
|
+
|
|
10
|
+
Stack-agnostic root-cause loop. Consumed by skill `debug-investigation` and agent `debugger`. Platform paths, MCP, and stack commands belong in adapter **Stack notes**.
|
|
11
|
+
|
|
12
|
+
## When
|
|
13
|
+
|
|
14
|
+
Any bug, test failure, build failure, or unexpected behavior — **before** proposing a fix.
|
|
15
|
+
|
|
16
|
+
## Phases (in order)
|
|
17
|
+
|
|
18
|
+
1. **Evidence** — reproduce, or collect the closest evidence (error output, failing test, logs, user steps).
|
|
19
|
+
2. **Isolate** — expected vs actual in one sentence; smallest relevant slice of the codebase.
|
|
20
|
+
3. **Root cause** — name the cause before editing. One hypothesis at a time; do not stack speculative fixes.
|
|
21
|
+
4. **Minimal fix + verify** — smallest change that preserves architecture and public contracts. Add a regression test when the behavior is user-facing or likely to recur. Re-run the **failing** check first, then the relevant lint/type/test slice.
|
|
22
|
+
|
|
23
|
+
## 3-fix architecture gate
|
|
24
|
+
|
|
25
|
+
If **three** fix attempts fail, or the same symptom returns after two supposed fixes: **STOP**. Do not attempt fix #4. Escalate — the design is likely wrong (human partner or `solution-architect`). Chasing symptoms is the failure mode.
|
|
26
|
+
|
|
27
|
+
## Do not
|
|
28
|
+
|
|
29
|
+
- Broad refactor during a bugfix.
|
|
30
|
+
- Fix only where the error surfaces if invalid data originates elsewhere.
|
|
31
|
+
- Claim `fixApplied: true` without re-running the failing check (see `quality/verification-before-completion.md`).
|
|
32
|
+
|
|
33
|
+
## Stack notes
|
|
34
|
+
|
|
35
|
+
### Artifacts
|
|
36
|
+
|
|
37
|
+
For agent team tasks, write `.opencode/team/tasks/<slug>/debug-report.md` with:
|
|
38
|
+
|
|
39
|
+
- Reproduction steps or evidence source.
|
|
40
|
+
- Root cause.
|
|
41
|
+
- Fix scope.
|
|
42
|
+
- Regression coverage.
|
|
43
|
+
- Remaining risk.
|
|
44
|
+
|
|
45
|
+
Agent team: upsert the owned terminal receipt in `artifact-manifest.json`; do not mutate `status.json`.
|
|
46
|
+
|
|
47
|
+
### MCP usage
|
|
48
|
+
|
|
49
|
+
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.
|
|
50
|
+
|
|
51
|
+
If Chrome DevTools MCP is ready and the app is running, use it for console, network, and runtime evidence.
|
|
52
|
+
|
|
53
|
+
Shipped browser split: Playwright MCP for e2e specs/selectors; Chrome DevTools MCP for live-app debug and performance (app must be running). Storybook MCP if present and the work is component docs/stories.
|
|
54
|
+
|
|
55
|
+
If a Sentry/Datadog (or similar) MCP is ready and the task is a production error, event, or trace, use it. Do not invent telemetry.
|
|
56
|
+
|
|
57
|
+
### Design guidance
|
|
58
|
+
|
|
59
|
+
- Load `design-guidance` (rule stem) when assessing structure, smells, or pattern fit.
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: feature-delivery
|
|
3
|
+
description: Delivers Next.js frontend features end-to-end across domain types, API services, store, UI, mocks, tests, and validation. Use when implementing or extending a feature, especially through /task or feature-developer.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Feature Delivery
|
|
7
|
+
|
|
8
|
+
1. Read task brief, acceptance criteria, and decomposition if present.
|
|
9
|
+
2. If `docs/specs/INDEX.md` exists **or** brief/handoff lists approved generated specs, resolve via **`product-specs`** and treat approved specs as behavior SoT before layer work (soft-fail on miss — do not invent behavior). If generation was requested but not yet approved, stop for human gate — do not implement against draft-only gaps.
|
|
10
|
+
3. Read **`feature-delivery-workflow.md`** and **`reference-features.md`** — follow layer order and mirror closest reference feature.
|
|
11
|
+
4. Add or update focused tests for changed behavior.
|
|
12
|
+
5. Validation from `app/`: **invoke** **`post-change-lint.md`** after code edits (requestable, not always-on — but **must** when code changed). Pipeline: scoped lint OK if next step is `build-verifier`.
|
|
13
|
+
|
|
14
|
+
- If the prompt or brief contains a `figma.com` URL, load requestable skill `mockup-review` and do not start UI work until the mockup-reviewer step is completed or the user continued past FAIL/`BLOCKED_MCP`.
|
|
15
|
+
- When required-signal (user asked UX, AC require flows/states, or spec-gen page/feature) and **no** `figma.com` URL: `ux-design.md` must exist on the analysis manifest entry (verdict not `INCOMPLETE`) before UI work. If missing, **blocked** — hand back to `task-analyst`. Parallel to the mockup gate when Figma exists.
|
|
16
|
+
|
|
17
|
+
## Scope discipline
|
|
18
|
+
|
|
19
|
+
Implement only the current AC / decomposition task. Clarify ambiguity before coding; do not add unrelated hardening, polish, or refactors. See `feature-developer` → **Zero improvisation**.
|
|
20
|
+
|
|
21
|
+
## Handoff
|
|
22
|
+
|
|
23
|
+
Summarize by layer, validation results, and known gaps. Agent team: upsert the owned terminal receipt in `artifact-manifest.json`; do not mutate `status.json`.
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
## MCP usage
|
|
27
|
+
|
|
28
|
+
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.
|
|
29
|
+
|
|
30
|
+
Shipped browser split: Playwright MCP for e2e specs/selectors; Chrome DevTools MCP for live-app debug and performance (app must be running). Storybook MCP if present and the work is component docs/stories.
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
## Design guidance
|
|
34
|
+
|
|
35
|
+
- Load `design-guidance` (rule stem) when assessing structure, smells, or pattern fit.
|
|
36
|
+
|
|
37
|
+
## Anti-hallucination
|
|
38
|
+
|
|
39
|
+
- When editing app TS/TSX, load `react-next-anti-hallucination` (phantom Next/React/RTK imports).
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: mockup-review
|
|
3
|
+
description: Reviews a Figma mockup for design-system compliance, feature coverage, and viewport matrix via Figma MCP. Use for standalone mockup-review intent or when a feature/refactor/spike/spec-gen task includes a figma.com URL.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Mockup review
|
|
7
|
+
|
|
8
|
+
Requestable procedure for agent `mockup-reviewer`. Checklist lives in rule `mockup-review` — do not duplicate it here.
|
|
9
|
+
|
|
10
|
+
## When to run
|
|
11
|
+
|
|
12
|
+
- Standalone `/task` intent `mockup-review` (report-only; profile `light`; steps only `mockup-reviewer`).
|
|
13
|
+
- Embedded: `feature` / `refactor` / `spike` / `spec-gen` whose prompt or `brief.md` contains a `figma.com` URL on a UI stack — after `task-analyst` (when present), before architect and developer.
|
|
14
|
+
|
|
15
|
+
## MCP OAuth preflight
|
|
16
|
+
|
|
17
|
+
Confirm Figma MCP is configured (see `MCP.md`). Do not ship secrets. If MCP is down or auth fails, write `mockup-review.md` with verdict `BLOCKED_MCP` and receipt `blocked`. Do not invent DS claims. Embedded skip-forward is `/task-continue` (explicit «proceed without MCP»).
|
|
18
|
+
|
|
19
|
+
## Plugin skills
|
|
20
|
+
|
|
21
|
+
If plugin skills `figma-design-to-code` / `figma-use` are installed, load them for MCP invocation recipes; do not paste their bodies; do not run design-to-code. Preset owns the checklist, agent, and routing; plugin owns MCP recipes.
|
|
22
|
+
|
|
23
|
+
## Load the checklist
|
|
24
|
+
|
|
25
|
+
Load requestable rule `mockup-review` and follow its review dimensions, node caps, and report headings.
|
|
26
|
+
|
|
27
|
+
## Output
|
|
28
|
+
|
|
29
|
+
Write `.opencode/team/tasks/<slug>/mockup-review.md` and upsert manifest entry id `mockup-review` (producer `mockup-reviewer`). Receipt mapping is in the agent prompt.
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: playwright-e2e
|
|
3
|
+
description: Plans, generates, and heals Playwright e2e tests using this preset's app/__tests__/e2e layout, *.cases.md plans, page objects, and shared helpers. Use for e2e planning, test generation, or fixing failing browser tests.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Playwright E2E
|
|
7
|
+
|
|
8
|
+
## Project Layout
|
|
9
|
+
|
|
10
|
+
- Test root: `app/__tests__/e2e`.
|
|
11
|
+
- Mirror formula: `app/src/<rel>` → `app/__tests__/e2e/<rel>` (drop `app/src`, preserve the relative path).
|
|
12
|
+
- Place artifacts at the deepest mirrored folder of the source under test; page-wide scenarios use the page folder.
|
|
13
|
+
- Test plans: `*.cases.md` files in the mirrored folder.
|
|
14
|
+
- Executable specs: `*.spec.ts` files in the same folder.
|
|
15
|
+
- Seed/setup reference: `app/__tests__/e2e/seed.spec.ts`. Root exceptions: `_shared/`, `smoke.spec.ts`, and `seed.spec.ts`.
|
|
16
|
+
|
|
17
|
+
Do not introduce top-level `specs/`, `tests/`, or feature-named folders for real coverage unless the user explicitly asks for a sandbox.
|
|
18
|
+
|
|
19
|
+
## Planner
|
|
20
|
+
|
|
21
|
+
Create or update the relevant `*.cases.md` file. Each scenario should include title, preconditions, steps, and expected result. Cover happy path, important edge cases, validation, and error states.
|
|
22
|
+
|
|
23
|
+
## Generator
|
|
24
|
+
|
|
25
|
+
Generate specs from `*.cases.md` into the same folder. Reuse existing page objects and `_shared/` helpers. Keep test names aligned with scenario names.
|
|
26
|
+
|
|
27
|
+
## Healer
|
|
28
|
+
|
|
29
|
+
Fix selectors, waits, setup, or page-object details without weakening business assertions. Use the matching `*.cases.md` file as the behavior contract.
|
|
30
|
+
|
|
31
|
+
## Validation
|
|
32
|
+
|
|
33
|
+
Run the affected spec when feasible. If the environment blocks execution, report the command that should be run and the blocker.
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: react-performance
|
|
3
|
+
description: Next.js React performance checklist for implementers — bundle, RSC/client boundaries, memoization discipline, data-fetch waterfalls, Core Web Vitals. Use while coding a next feature; not a substitute for the performance-auditor agent when the user asks for an audit report.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# React performance (next)
|
|
7
|
+
|
|
8
|
+
On-demand checklist for **implementers** shipping Next.js UI. For a formal diff audit report, use the **`performance-auditor`** agent instead — this skill does not replace it.
|
|
9
|
+
|
|
10
|
+
## Bundle
|
|
11
|
+
|
|
12
|
+
- Prefer route-level and component-level code splitting for heavy UI (charts, editors).
|
|
13
|
+
- Avoid importing large libraries into shared layouts; keep client entry points small.
|
|
14
|
+
- Check that barrel files do not re-export heavy modules into every consumer.
|
|
15
|
+
|
|
16
|
+
## RSC / client boundaries
|
|
17
|
+
|
|
18
|
+
- Default to Server Components; add `"use client"` only when hooks, browser APIs, or interactivity require it.
|
|
19
|
+
- Keep client leaves small; pass serializable props from server parents.
|
|
20
|
+
- Do not pull server-only modules (secrets, Node APIs) into client components.
|
|
21
|
+
|
|
22
|
+
## Memoization discipline
|
|
23
|
+
|
|
24
|
+
- Do **not** add `useMemo` / `useCallback` by default — follow the repo’s React Compiler / team guidance.
|
|
25
|
+
- Memoize when profiling shows unstable props causing expensive subtree re-renders, or when an existing pattern already does.
|
|
26
|
+
- Prefer fixing state placement and list keys over blanket memo wrappers.
|
|
27
|
+
|
|
28
|
+
## Data-fetch waterfalls
|
|
29
|
+
|
|
30
|
+
- Avoid sequential awaits that could be parallel (`Promise.all`) when independent.
|
|
31
|
+
- Lift shared fetches to a layout/parent when multiple children need the same data.
|
|
32
|
+
- Prefer store/thunk or server fetch patterns already used in the feature’s reference slice — do not invent a second data layer.
|
|
33
|
+
|
|
34
|
+
## Core Web Vitals (quick)
|
|
35
|
+
|
|
36
|
+
| Metric | Implementer checks |
|
|
37
|
+
|--------|--------------------|
|
|
38
|
+
| LCP | Hero/media not blocked by unnecessary client JS; sensible image sizing |
|
|
39
|
+
| INP | Click handlers lean; avoid long sync work on the main thread |
|
|
40
|
+
| CLS | Reserve space for images/skeleton; stable fonts |
|
|
41
|
+
|
|
42
|
+
## Handoff
|
|
43
|
+
|
|
44
|
+
If the user asks for a **performance audit report** of a diff/deliverable, route to **`performance-auditor`** (readonly `perf-report.md`), not this skill alone.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: spec-authoring
|
|
3
|
+
description: Author or bootstrap consumer docs/specs (INDEX, page/feature templates, frontmatter v1). Use with task-analyst author mode, /spec-start, or when brief AC requests Generate/Bootstrap.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Spec authoring
|
|
7
|
+
|
|
8
|
+
Requestable — not always-on. Load **`product-specs`** + **`product-specs-authoring`** first.
|
|
9
|
+
|
|
10
|
+
## Steps
|
|
11
|
+
|
|
12
|
+
1. **Resolve mode** — Generate (tree exists) vs Bootstrap (create INDEX + templates + first spec). Refuse inventing INDEX without explicit intent/AC/`/spec-start`.
|
|
13
|
+
2. **Ensure templates** — if consumer `docs/specs/_templates/` missing, copy from package SoT `presets/_shared/assets/docs-specs/_templates/` (or seeded init assets).
|
|
14
|
+
3. **Fill frontmatter v1** — all array keys present (may be `[]`); prefer `type: feature` on backend/MCP; default `status: draft`.
|
|
15
|
+
4. **Fill required body headings** — page: Overview, Entry/actors, Primary flows, States, Acceptance criteria; feature: Overview, Shared behavior/constraints, Related pages. Use `N/A` explicitly when needed.
|
|
16
|
+
5. **Update INDEX** in the **same change set** (columns: id, type, domain, title, path, optional routes/aliases/status).
|
|
17
|
+
6. **Self-check** against `product-specs-authoring` checklist; put blockers in `open_questions`.
|
|
18
|
+
7. **Handoff** — list created/updated paths + INDEX diff for human gate (`after:task-analyst`). Approve before feature-developer.
|
|
19
|
+
|
|
20
|
+
## Sources
|
|
21
|
+
|
|
22
|
+
Cite AC / user / Figma / labeled code inference. Do not invent product behavior.
|
|
23
|
+
|
|
24
|
+
## mcp-ts
|
|
25
|
+
|
|
26
|
+
Analyst-only path (no tech-writer). `routes` = tool names; `ui`/`store` = `[]`.
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: spec-discovery
|
|
3
|
+
description: Opt-in research-before-spec for task-analyst author mode. 11 named methods plus a mandatory claim ledger. Use when the user or AC asks discovery before generating docs/specs — not default /task consume.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Spec discovery
|
|
7
|
+
|
|
8
|
+
Requestable — **not** always-on. Load **only** in **task-analyst author mode** when the user or AC asks research-before-spec (including `/spec-start` with that intent). Never default consume `/task`. Not a pipeline step.
|
|
9
|
+
|
|
10
|
+
Load **`product-specs`** (and **`product-specs-authoring`** after this skill if authoring follows). Do **not** invent product behavior. Do **not** create a second spec-file tree.
|
|
11
|
+
|
|
12
|
+
## Load policy
|
|
13
|
+
|
|
14
|
+
1. Pick a **subset** of methods that fit the task — not all 11 every time.
|
|
15
|
+
2. **`claim-ledger` is mandatory** whenever this skill runs.
|
|
16
|
+
3. Write chronological notes to `.opencode/team/tasks/<slug>/.memlog.md` (append-only). Do **not** mutate `status.json` / `metrics.json`.
|
|
17
|
+
4. Discovery output lives in memlog + `brief.md` sections. Then hand off to skill **`spec-authoring`** (or stop if `specMode: none`).
|
|
18
|
+
|
|
19
|
+
Backend / MCP stacks: skip UI-only examples; prefer `analog-scan`, `code-archaeology`, `problem-define`, `assumption-audit`, `claim-ledger`.
|
|
20
|
+
|
|
21
|
+
## Methods
|
|
22
|
+
|
|
23
|
+
| Method | Produces | Skip when |
|
|
24
|
+
|--------|----------|-----------|
|
|
25
|
+
| **intake-capture** | Raw idea, origin, first unknowns → memlog + brief Research inputs | User prompt + AC already complete |
|
|
26
|
+
| **index-locator** | Related INDEX rows + linked spec paths + gaps | `specMode: none` or INDEX absent without consume intent |
|
|
27
|
+
| **code-archaeology** | Observed behavior labeled `inferred`/`draft` with path citations | Greenfield with no relevant code |
|
|
28
|
+
| **research-pack-scan** | Claims from `team/tasks/<slug>/research/**` or user-supplied paths | No research paths cited |
|
|
29
|
+
| **evidence-against** | Reasons the idea may fail | Internal spike with no product/external risk |
|
|
30
|
+
| **problem-define** | Who hurts, goals, non-goals, cost of inaction → brief | Brief Goal + Out of scope already exhaustive |
|
|
31
|
+
| **concept-shape** | 2–3 approach options + appetite (small/medium/large); no API design | `architecture.md` exists or one obvious path |
|
|
32
|
+
| **working-backwards-check** | Headline + 5 customer objections + verdict `forged` / `needs-heat` / `cracked` | Consume mode with approved specs |
|
|
33
|
+
| **assumption-audit** | Assumption register → brief Assumptions + `open_questions` | Never skip in author mode (keep lightweight) |
|
|
34
|
+
| **analog-scan** | 2–3 repo analogs via `reference-features` / code search | No plausible analog |
|
|
35
|
+
| **claim-ledger** | Markdown table `source → claim` for every product-behavior claim | **Never skip** when this skill is loaded |
|
|
36
|
+
|
|
37
|
+
## Claim ledger (required)
|
|
38
|
+
|
|
39
|
+
Block spec authoring until every product-behavior claim has a source:
|
|
40
|
+
|
|
41
|
+
```markdown
|
|
42
|
+
| Source | Claim |
|
|
43
|
+
|--------|-------|
|
|
44
|
+
| brief AC-3 | Checkout shows empty cart copy |
|
|
45
|
+
| code-archaeology inferred | Empty state uses an illustration |
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Sources: AC / user / UI copy / labeled code inference / research path. Unsourced claims → `open_questions`.
|
|
49
|
+
|
|
50
|
+
## Memlog
|
|
51
|
+
|
|
52
|
+
Path: `.opencode/team/tasks/<slug>/.memlog.md`. Chronological `## YYYY-MM-DD` headings. Optional tags: `decision`, `assumption`, `override`, `event`, `claim`.
|
|
53
|
+
|
|
54
|
+
## Forbidden
|
|
55
|
+
|
|
56
|
+
- 108-technique catalogs, HTML composers, party-mode, five `assess.*` slash commands, Python memlog runtime.
|
|
57
|
+
- Dummy INDEX rows when `specMode: none`.
|
|
58
|
+
- Dumping the whole `docs/specs/**` tree — locator is INDEX → linked page + optional `feature.md`.
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: technical-retro
|
|
3
|
+
description: Facilitates technical retrospectives for tasks, sprints, incidents, releases, and agent-team pipelines. Use when the user asks for retro, postmortem, process review, or action items after delivery.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Technical Retro
|
|
7
|
+
|
|
8
|
+
## Inputs
|
|
9
|
+
|
|
10
|
+
Ask for missing period, focus, task slug, participants, or format constraints. If a slug is provided, read `.opencode/team/tasks/<slug>/` artifacts and local git status/diff. Do not invent facts not present in artifacts or the user's message.
|
|
11
|
+
|
|
12
|
+
## Facilitation Principles
|
|
13
|
+
|
|
14
|
+
- Focus on process and system behavior, not blame.
|
|
15
|
+
- Separate facts, interpretations, and proposed actions.
|
|
16
|
+
- Balance what worked with what slowed delivery.
|
|
17
|
+
- Keep action items concrete, owned, and measurable.
|
|
18
|
+
|
|
19
|
+
## Default Structure
|
|
20
|
+
|
|
21
|
+
1. Goal and scope.
|
|
22
|
+
2. Timeline or factual observations.
|
|
23
|
+
3. What worked.
|
|
24
|
+
4. What hurt quality, speed, or confidence.
|
|
25
|
+
5. Root causes for the top one or two issues.
|
|
26
|
+
6. Experiments and action items.
|
|
27
|
+
|
|
28
|
+
## Agent Team Block
|
|
29
|
+
|
|
30
|
+
For `/task` pipelines, include router, analyst, developer, **build-verifier**, reviewer, QA/e2e, hooks, and rules.
|
|
31
|
+
|
|
32
|
+
## Wrong-turn taxonomy (optional)
|
|
33
|
+
|
|
34
|
+
When artifacts or the user mention agent mistakes, tag incidents:
|
|
35
|
+
|
|
36
|
+
| Kind | Signal |
|
|
37
|
+
|------|--------|
|
|
38
|
+
| `correction` | User pushback («no», «don't», «actually») |
|
|
39
|
+
| `retry` | Same tool/approach 2+ times before success |
|
|
40
|
+
| `waste` | Many searches before the right file |
|
|
41
|
+
| `reversal` | Edit then revert / delete |
|
|
42
|
+
| `dead-end` | Env/tool failure (missing binary, wrong path) |
|
|
43
|
+
|
|
44
|
+
Severity: **high** (explicit correction / large waste) · **med** · **low**. Confidence 0–100 — be honest; low-confidence items are optional.
|
|
45
|
+
|
|
46
|
+
## Preset feedback loop
|
|
47
|
+
|
|
48
|
+
If the same issue appeared in **2+** tasks (or **3+** for packaging a new rule/skill — Rule of Three), add section **Preset updates**:
|
|
49
|
+
|
|
50
|
+
- Proposed change to `.opencode/rules/`, `.opencode/agents/`, `.opencode/skills/`, or **`.opencode/team/conventions.md`** (prefer conventions for project gotchas)
|
|
51
|
+
- One concrete snippet or file path
|
|
52
|
+
- Whether it belongs in always-on vs globs vs skill vs conventions (see `PRESET-CONTRIBUTION` → Building blocks)
|
|
53
|
+
|
|
54
|
+
Do not apply preset or conventions changes without user approval.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: unit-testing
|
|
3
|
+
description: Plans, generates, and heals unit tests for mappers, thunks, HTTP client behavior, and React components using mirrored paths under app/__tests__/unit and tests-unit rules. Use for unit test planning, generation, or fixing failing unit tests.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Unit Testing
|
|
7
|
+
|
|
8
|
+
## Project Layout
|
|
9
|
+
|
|
10
|
+
- Test root: `app/__tests__/unit`.
|
|
11
|
+
- Mirror formula: `app/src/<rel>` → `app/__tests__/unit/<rel>` (drop `app/src`, preserve the relative path).
|
|
12
|
+
- Place specs at the deepest mirrored folder of the module under test; do not colocate tests under `app/src/**`.
|
|
13
|
+
- Legacy `*.test.ts` / `*.test.tsx` — do not rename without a separate task.
|
|
14
|
+
- Runner: Jest or Vitest as configured in the target repo; components use `@testing-library/react`.
|
|
15
|
+
|
|
16
|
+
Follow **`tests-unit.md`** (Cursor) or **`rules/testing/tests-unit.md`** (Claude).
|
|
17
|
+
|
|
18
|
+
## Planner
|
|
19
|
+
|
|
20
|
+
Write or update `.opencode/team/tasks/<slug>/unit-test-plan.md` (or `.claude/team/...`).
|
|
21
|
+
|
|
22
|
+
Each scenario needs a Russian `it()` title (capital letter after each sentence). Cover mappers, thunks, client behavior branches, and component interactions per AC. Record the mirrored target path under `app/__tests__/unit/`.
|
|
23
|
+
|
|
24
|
+
## Generator
|
|
25
|
+
|
|
26
|
+
Implement specs from `unit-test-plan.md` under the mirrored `app/__tests__/unit/` path. Import the source under test through the `@/` alias. Reuse project test-store, HTTP mocks, and existing test utilities. Do not change production code.
|
|
27
|
+
|
|
28
|
+
## Healer
|
|
29
|
+
|
|
30
|
+
Fix mocks, async timing, selectors, and setup — preserve business assertions. Use `unit-test-plan.md` and `brief.md` as the behavior contract.
|
|
31
|
+
|
|
32
|
+
## Validation
|
|
33
|
+
|
|
34
|
+
Run affected unit tests from `app/` when feasible. Report command, pass/fail, and remaining gaps vs plan.
|