@bonesofspring/ai-rules 0.2.19 → 0.2.20

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.
Files changed (182) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/package.json +1 -1
  3. package/presets/_shared/README.md +3 -3
  4. package/presets/_shared/core/agent-team/task-classification.md +21 -0
  5. package/presets/_shared/core/quality/debug-investigation.md +24 -0
  6. package/presets/_shared/core/quality/verification-before-completion.md +25 -0
  7. package/presets/_shared/core/review/receiving-code-review.md +24 -0
  8. package/presets/claude/android-kotlin/agents/build-verifier.md +6 -0
  9. package/presets/claude/android-kotlin/agents/ci-investigator.md +1 -0
  10. package/presets/claude/android-kotlin/agents/code-reviewer.md +2 -0
  11. package/presets/claude/android-kotlin/agents/debugger.md +5 -0
  12. package/presets/claude/android-kotlin/agents/feature-developer.md +7 -0
  13. package/presets/claude/android-kotlin/agents/task-analyst.md +10 -0
  14. package/presets/claude/android-kotlin/agents/task-router.md +14 -0
  15. package/presets/claude/android-kotlin/skills/code-review/SKILL.md +6 -0
  16. package/presets/claude/android-kotlin/skills/debug-investigation/SKILL.md +33 -5
  17. package/presets/claude/go/agents/build-verifier.md +6 -0
  18. package/presets/claude/go/agents/ci-investigator.md +1 -0
  19. package/presets/claude/go/agents/code-reviewer.md +2 -0
  20. package/presets/claude/go/agents/debugger.md +7 -0
  21. package/presets/claude/go/agents/feature-developer.md +7 -0
  22. package/presets/claude/go/agents/task-analyst.md +10 -0
  23. package/presets/claude/go/agents/task-router.md +14 -0
  24. package/presets/claude/go/skills/code-review/SKILL.md +6 -0
  25. package/presets/claude/go/skills/debug-investigation/SKILL.md +32 -4
  26. package/presets/claude/ios-swift/agents/build-verifier.md +6 -0
  27. package/presets/claude/ios-swift/agents/ci-investigator.md +1 -0
  28. package/presets/claude/ios-swift/agents/code-reviewer.md +2 -0
  29. package/presets/claude/ios-swift/agents/debugger.md +5 -0
  30. package/presets/claude/ios-swift/agents/feature-developer.md +7 -0
  31. package/presets/claude/ios-swift/agents/task-analyst.md +10 -0
  32. package/presets/claude/ios-swift/agents/task-router.md +14 -0
  33. package/presets/claude/ios-swift/skills/code-review/SKILL.md +6 -0
  34. package/presets/claude/ios-swift/skills/debug-investigation/SKILL.md +33 -5
  35. package/presets/claude/java/agents/build-verifier.md +6 -0
  36. package/presets/claude/java/agents/ci-investigator.md +1 -0
  37. package/presets/claude/java/agents/code-reviewer.md +2 -0
  38. package/presets/claude/java/agents/debugger.md +7 -0
  39. package/presets/claude/java/agents/feature-developer.md +7 -0
  40. package/presets/claude/java/agents/task-analyst.md +10 -0
  41. package/presets/claude/java/agents/task-router.md +14 -0
  42. package/presets/claude/java/skills/code-review/SKILL.md +6 -0
  43. package/presets/claude/java/skills/debug-investigation/SKILL.md +32 -4
  44. package/presets/claude/mcp-ts/agents/build-verifier.md +6 -0
  45. package/presets/claude/mcp-ts/agents/feature-developer.md +7 -0
  46. package/presets/claude/mcp-ts/agents/task-analyst.md +10 -0
  47. package/presets/claude/mcp-ts/agents/task-router.md +14 -0
  48. package/presets/claude/mcp-ts/skills/code-review/SKILL.md +6 -0
  49. package/presets/claude/mcp-ts/skills/debug-investigation/SKILL.md +31 -3
  50. package/presets/claude/next/agents/build-verifier.md +6 -0
  51. package/presets/claude/next/agents/ci-investigator.md +1 -0
  52. package/presets/claude/next/agents/code-reviewer.md +2 -0
  53. package/presets/claude/next/agents/debugger.md +5 -0
  54. package/presets/claude/next/agents/feature-developer.md +7 -0
  55. package/presets/claude/next/agents/task-analyst.md +11 -1
  56. package/presets/claude/next/agents/task-router.md +14 -0
  57. package/presets/claude/next/skills/code-review/SKILL.md +6 -0
  58. package/presets/claude/next/skills/debug-investigation/SKILL.md +29 -14
  59. package/presets/claude/nuxt/agents/build-verifier.md +6 -0
  60. package/presets/claude/nuxt/agents/ci-investigator.md +1 -0
  61. package/presets/claude/nuxt/agents/code-reviewer.md +2 -0
  62. package/presets/claude/nuxt/agents/debugger.md +5 -0
  63. package/presets/claude/nuxt/agents/feature-developer.md +7 -0
  64. package/presets/claude/nuxt/agents/task-analyst.md +11 -1
  65. package/presets/claude/nuxt/agents/task-router.md +14 -0
  66. package/presets/claude/nuxt/skills/code-review/SKILL.md +6 -0
  67. package/presets/claude/nuxt/skills/debug-investigation/SKILL.md +29 -12
  68. package/presets/claude/php-hexagonal/agents/build-verifier.md +6 -0
  69. package/presets/claude/php-hexagonal/agents/ci-investigator.md +1 -0
  70. package/presets/claude/php-hexagonal/agents/code-reviewer.md +2 -0
  71. package/presets/claude/php-hexagonal/agents/debugger.md +7 -0
  72. package/presets/claude/php-hexagonal/agents/feature-developer.md +7 -0
  73. package/presets/claude/php-hexagonal/agents/task-analyst.md +10 -0
  74. package/presets/claude/php-hexagonal/agents/task-router.md +14 -0
  75. package/presets/claude/php-hexagonal/skills/code-review/SKILL.md +6 -0
  76. package/presets/claude/php-hexagonal/skills/debug-investigation/SKILL.md +32 -4
  77. package/presets/claude/php-laravel/agents/build-verifier.md +6 -0
  78. package/presets/claude/php-laravel/agents/ci-investigator.md +1 -0
  79. package/presets/claude/php-laravel/agents/code-reviewer.md +2 -0
  80. package/presets/claude/php-laravel/agents/debugger.md +7 -0
  81. package/presets/claude/php-laravel/agents/feature-developer.md +7 -0
  82. package/presets/claude/php-laravel/agents/task-analyst.md +10 -0
  83. package/presets/claude/php-laravel/agents/task-router.md +14 -0
  84. package/presets/claude/php-laravel/skills/code-review/SKILL.md +6 -0
  85. package/presets/claude/php-laravel/skills/debug-investigation/SKILL.md +32 -4
  86. package/presets/claude/svelte/agents/build-verifier.md +6 -0
  87. package/presets/claude/svelte/agents/ci-investigator.md +1 -0
  88. package/presets/claude/svelte/agents/code-reviewer.md +2 -0
  89. package/presets/claude/svelte/agents/debugger.md +5 -0
  90. package/presets/claude/svelte/agents/feature-developer.md +7 -0
  91. package/presets/claude/svelte/agents/task-analyst.md +11 -1
  92. package/presets/claude/svelte/agents/task-router.md +14 -0
  93. package/presets/claude/svelte/skills/code-review/SKILL.md +6 -0
  94. package/presets/claude/svelte/skills/debug-investigation/SKILL.md +29 -12
  95. package/presets/cursor/android-kotlin/agents/build-verifier.md +6 -0
  96. package/presets/cursor/android-kotlin/agents/ci-investigator.md +1 -0
  97. package/presets/cursor/android-kotlin/agents/code-reviewer.md +2 -0
  98. package/presets/cursor/android-kotlin/agents/debugger.md +5 -0
  99. package/presets/cursor/android-kotlin/agents/feature-developer.md +7 -0
  100. package/presets/cursor/android-kotlin/agents/task-analyst.md +10 -0
  101. package/presets/cursor/android-kotlin/agents/task-router.md +14 -0
  102. package/presets/cursor/android-kotlin/skills/code-review/SKILL.md +6 -0
  103. package/presets/cursor/android-kotlin/skills/debug-investigation/SKILL.md +33 -5
  104. package/presets/cursor/go/agents/build-verifier.md +6 -0
  105. package/presets/cursor/go/agents/ci-investigator.md +1 -0
  106. package/presets/cursor/go/agents/code-reviewer.md +2 -0
  107. package/presets/cursor/go/agents/debugger.md +7 -0
  108. package/presets/cursor/go/agents/feature-developer.md +7 -0
  109. package/presets/cursor/go/agents/task-analyst.md +10 -0
  110. package/presets/cursor/go/agents/task-router.md +14 -0
  111. package/presets/cursor/go/skills/code-review/SKILL.md +6 -0
  112. package/presets/cursor/go/skills/debug-investigation/SKILL.md +32 -4
  113. package/presets/cursor/ios-swift/agents/build-verifier.md +6 -0
  114. package/presets/cursor/ios-swift/agents/ci-investigator.md +1 -0
  115. package/presets/cursor/ios-swift/agents/code-reviewer.md +2 -0
  116. package/presets/cursor/ios-swift/agents/debugger.md +5 -0
  117. package/presets/cursor/ios-swift/agents/feature-developer.md +7 -0
  118. package/presets/cursor/ios-swift/agents/task-analyst.md +10 -0
  119. package/presets/cursor/ios-swift/agents/task-router.md +14 -0
  120. package/presets/cursor/ios-swift/skills/code-review/SKILL.md +6 -0
  121. package/presets/cursor/ios-swift/skills/debug-investigation/SKILL.md +33 -5
  122. package/presets/cursor/java/agents/build-verifier.md +6 -0
  123. package/presets/cursor/java/agents/ci-investigator.md +1 -0
  124. package/presets/cursor/java/agents/code-reviewer.md +2 -0
  125. package/presets/cursor/java/agents/debugger.md +7 -0
  126. package/presets/cursor/java/agents/feature-developer.md +7 -0
  127. package/presets/cursor/java/agents/task-analyst.md +10 -0
  128. package/presets/cursor/java/agents/task-router.md +14 -0
  129. package/presets/cursor/java/skills/code-review/SKILL.md +6 -0
  130. package/presets/cursor/java/skills/debug-investigation/SKILL.md +32 -4
  131. package/presets/cursor/mcp-ts/agents/build-verifier.md +6 -0
  132. package/presets/cursor/mcp-ts/agents/feature-developer.md +7 -0
  133. package/presets/cursor/mcp-ts/agents/task-analyst.md +10 -0
  134. package/presets/cursor/mcp-ts/agents/task-router.md +14 -0
  135. package/presets/cursor/mcp-ts/skills/code-review/SKILL.md +6 -0
  136. package/presets/cursor/mcp-ts/skills/debug-investigation/SKILL.md +31 -3
  137. package/presets/cursor/next/agents/build-verifier.md +6 -0
  138. package/presets/cursor/next/agents/ci-investigator.md +1 -0
  139. package/presets/cursor/next/agents/code-reviewer.md +2 -0
  140. package/presets/cursor/next/agents/debugger.md +5 -0
  141. package/presets/cursor/next/agents/feature-developer.md +7 -0
  142. package/presets/cursor/next/agents/task-analyst.md +11 -1
  143. package/presets/cursor/next/agents/task-router.md +14 -0
  144. package/presets/cursor/next/skills/code-review/SKILL.md +6 -0
  145. package/presets/cursor/next/skills/debug-investigation/SKILL.md +29 -14
  146. package/presets/cursor/nuxt/agents/build-verifier.md +6 -0
  147. package/presets/cursor/nuxt/agents/ci-investigator.md +1 -0
  148. package/presets/cursor/nuxt/agents/code-reviewer.md +2 -0
  149. package/presets/cursor/nuxt/agents/debugger.md +5 -0
  150. package/presets/cursor/nuxt/agents/feature-developer.md +7 -0
  151. package/presets/cursor/nuxt/agents/task-analyst.md +11 -1
  152. package/presets/cursor/nuxt/agents/task-router.md +14 -0
  153. package/presets/cursor/nuxt/skills/code-review/SKILL.md +6 -0
  154. package/presets/cursor/nuxt/skills/debug-investigation/SKILL.md +29 -12
  155. package/presets/cursor/php-hexagonal/agents/build-verifier.md +6 -0
  156. package/presets/cursor/php-hexagonal/agents/ci-investigator.md +1 -0
  157. package/presets/cursor/php-hexagonal/agents/code-reviewer.md +2 -0
  158. package/presets/cursor/php-hexagonal/agents/debugger.md +7 -0
  159. package/presets/cursor/php-hexagonal/agents/feature-developer.md +7 -0
  160. package/presets/cursor/php-hexagonal/agents/task-analyst.md +10 -0
  161. package/presets/cursor/php-hexagonal/agents/task-router.md +14 -0
  162. package/presets/cursor/php-hexagonal/skills/code-review/SKILL.md +6 -0
  163. package/presets/cursor/php-hexagonal/skills/debug-investigation/SKILL.md +32 -4
  164. package/presets/cursor/php-laravel/agents/build-verifier.md +6 -0
  165. package/presets/cursor/php-laravel/agents/ci-investigator.md +1 -0
  166. package/presets/cursor/php-laravel/agents/code-reviewer.md +2 -0
  167. package/presets/cursor/php-laravel/agents/debugger.md +7 -0
  168. package/presets/cursor/php-laravel/agents/feature-developer.md +7 -0
  169. package/presets/cursor/php-laravel/agents/task-analyst.md +10 -0
  170. package/presets/cursor/php-laravel/agents/task-router.md +14 -0
  171. package/presets/cursor/php-laravel/skills/code-review/SKILL.md +6 -0
  172. package/presets/cursor/php-laravel/skills/debug-investigation/SKILL.md +32 -4
  173. package/presets/cursor/svelte/agents/build-verifier.md +6 -0
  174. package/presets/cursor/svelte/agents/ci-investigator.md +1 -0
  175. package/presets/cursor/svelte/agents/code-reviewer.md +2 -0
  176. package/presets/cursor/svelte/agents/debugger.md +5 -0
  177. package/presets/cursor/svelte/agents/feature-developer.md +7 -0
  178. package/presets/cursor/svelte/agents/task-analyst.md +11 -1
  179. package/presets/cursor/svelte/agents/task-router.md +14 -0
  180. package/presets/cursor/svelte/skills/code-review/SKILL.md +6 -0
  181. package/presets/cursor/svelte/skills/debug-investigation/SKILL.md +29 -12
  182. package/scripts/check-shared-core-drift.sh +6 -0
@@ -8,10 +8,20 @@ You are a senior business/technical analyst for a Nuxt 3 frontend team.
8
8
 
9
9
  Your job is to reach **Definition of Ready (DoR)** before any implementation starts. You may write only `.claude/team/**` artifacts. You do **not** write production code or modify application source files.
10
10
 
11
+ ## Classify first
12
+
13
+ <!-- shared-core: agent-team/task-classification.md -->
14
+
15
+ Before decomposing, name the class: **spike** / **bounded** / **architectural**. Maps to existing pipeline profiles — do not invent a second orchestrator.
16
+
17
+ - **Spike** — research DoR; no implement tasks.
18
+ - **Bounded** — few tasks, only layers actually touched; do not pad types/api/store/ui.
19
+ - **Architectural** — full layer table; architect when boundaries are unclear.
20
+
11
21
  ## Clarification cycle (must)
12
22
 
13
23
  1. Rephrase the task in your own words (goal, user value, boundaries).
14
- 2. Ask **1–3 questions per iteration** never more than 3 at once.
24
+ 2. Ask questions **prefer one** unblocking question; **never more than 3** per iteration.
15
25
  3. List explicit **assumptions** when information is missing.
16
26
  4. Do **not** decompose until acceptance criteria are **testable and unambiguous**.
17
27
  5. If critical unknowns remain, mark them in `open_questions` and ask the user before finalizing.
@@ -45,6 +45,20 @@ Set optional top-level `"profile": "full" | "standard" | "light"` in `pipeline.j
45
45
 
46
46
  **Light signals:** one file, one layer, explicit AC in prompt, no architectural risk. **Never skip `build-verifier`** after developer when `app/**` changed. **Skip `code-reviewer`** in light only for non-prod preset/docs tasks — for `app/src` changes prefer standard.
47
47
 
48
+ ## Task class (spike / bounded / architectural)
49
+
50
+ <!-- shared-core: agent-team/task-classification.md -->
51
+
52
+ Name the class in `routingReasons`. Maps to profiles already in this file — do not add a parallel step table.
53
+
54
+ | Class | Use existing |
55
+ |-------|----------------|
56
+ | Spike | intent `spike` |
57
+ | Bounded | `profile: light` (or skip analyst when AC is complete) |
58
+ | Architectural | `profile: full` + `solution-architect` when boundaries unclear |
59
+
60
+ SoT: `agent-team/task-classification` (shared-core marker above; do not invent a second pipeline).
61
+
48
62
  **Light by intent:**
49
63
 
50
64
  | intent | light steps |
@@ -33,6 +33,12 @@ Lead with findings ordered by severity. Required shape (also in `code-review-mr`
33
33
 
34
34
  For agent team tasks, write `.claude/team/tasks/<slug>/review.md` and upsert the owned terminal receipt (`completed` or `changes_requested`); do not mutate `status.json`.
35
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
+
36
42
  ## Design guidance
37
43
 
38
44
  - Load `design-guidance` (rule stem) when assessing structure, smells, or pattern fit.
@@ -3,19 +3,36 @@ name: debug-investigation
3
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
4
  ---
5
5
 
6
- # Debug Investigation
6
+ <!-- shared-core: quality/debug-investigation.md -->
7
7
 
8
- ## Process
8
+ # Debug investigation
9
9
 
10
- 1. Reproduce the issue or collect the closest available evidence: error output, failing test, browser snapshot, logs, or user steps.
11
- 2. Define expected vs actual behavior in one sentence.
12
- 3. Trace the failing path through the smallest relevant slice of the codebase.
13
- 4. Identify the root cause before editing. Avoid broad refactors during bugfixes.
14
- 5. Apply the smallest fix that preserves existing architecture and public contracts.
15
- 6. Add or update a regression test when the behavior is user-facing or likely to recur.
16
- 7. Run the narrow failing check first, then relevant lint/type/test validation.
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**.
17
11
 
18
- ## Artifacts
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
19
36
 
20
37
  For agent team tasks, write `.claude/team/tasks/<slug>/debug-report.md` with:
21
38
 
@@ -28,7 +45,7 @@ For agent team tasks, write `.claude/team/tasks/<slug>/debug-report.md` with:
28
45
  Agent team: upsert the owned terminal receipt in `artifact-manifest.json`; do not mutate `status.json`.
29
46
 
30
47
 
31
- ## MCP usage
48
+ ### MCP usage
32
49
 
33
50
  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.
34
51
 
@@ -39,6 +56,6 @@ Shipped browser split: Playwright MCP for e2e specs/selectors; Chrome DevTools M
39
56
  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.
40
57
 
41
58
 
42
- ## Design guidance
59
+ ### Design guidance
43
60
 
44
61
  - Load `design-guidance` (rule stem) when assessing structure, smells, or pattern fit.
@@ -17,6 +17,12 @@ You are the build verifier for **PHP hexagonal** services (and for **ai-rules pr
17
17
 
18
18
  **Never** require Playwright, XCUITest, `lint:js`/`lint:css`, `xcodebuild`/`SwiftLint`, `mvn`, or `gradlew` as the PHP gate.
19
19
 
20
+ ## Verification before completion
21
+
22
+ <!-- shared-core: quality/verification-before-completion.md -->
23
+
24
+ Before writing `validation-report.md` or claiming PASS: IDENTIFY the commands, RUN them, READ exit codes, VERIFY they match the verdict, THEN claim. Do not mark PASS from memory of a prior developer run.
25
+
20
26
  ## Preset-structure validation (when editing `packages/ai-rules/presets/**`)
21
27
 
22
28
  From `packages/ai-rules/`:
@@ -27,3 +27,4 @@ If a Sentry/Datadog (or similar) MCP is ready and the task is a production error
27
27
  ## Anti-sycophancy discipline
28
28
 
29
29
  - When writing or changing code, load / follow rule `anti-sycophancy-discipline`.
30
+ - When acting on review feedback (`changes_requested` / human comments): verify each item against the codebase before implementing; no performative agreement.
@@ -16,6 +16,8 @@ You are a senior PHP hexagonal code reviewer. Write only review artifacts under
16
16
 
17
17
  Apply skill `code-review` and `code-review-mr.mdc`. Weigh `architecture-boundaries.mdc`, `domain-layer.mdc`, `application-usecases.mdc`, `ports-interfaces.mdc`, `adapters-driving.mdc`, `adapters-driven.mdc`, `composition-root.mdc`, `php-conventions.mdc`, `tests-unit.mdc`, `tests-integration.mdc`, `security-php.mdc`.
18
18
 
19
+ You **issue** reviews. Implementers acting on your findings must verify each item against the codebase and must not perform agreement. Do not require gratitude in replies.
20
+
19
21
  ## Review focus (PHP hexagonal)
20
22
 
21
23
  - If the MR touches `docs/specs/**`, load **`product-specs`** (+ **`product-specs-authoring`** when new/changed specs): **WARN** code/spec drift; **FAIL** broken INDEX `path` link or missing required frontmatter keys/arrays on touched spec files; required body headings missing → **FAIL** on touched files. Do not invent missing product behavior.
@@ -6,6 +6,8 @@ readonly: false
6
6
 
7
7
  Investigate with **runtime evidence**: failing `composer test` / `vendor/bin/phpunit` output, logs, stack traces, minimal repro.
8
8
 
9
+ Use the **`debug-investigation` skill** for the investigation loop.
10
+
9
11
  ## Approach
10
12
 
11
13
  1. Reproduce with `composer test` / `vendor/bin/phpunit` / focused class/package tests.
@@ -21,6 +23,10 @@ Investigate with **runtime evidence**: failing `composer test` / `vendor/bin/php
21
23
  Write `.claude/team/tasks/<slug>/debug-report.md`.
22
24
 
23
25
 
26
+ ## 3-fix architecture gate
27
+
28
+ After **three** unsuccessful fix attempts (or the same symptom returning twice): STOP. Do not attempt fix #4. Escalate architecture with the human or `solution-architect`. Follow skill `debug-investigation`. Before `fixApplied: true`, re-run the failing check.
29
+
24
30
  ## MCP usage
25
31
 
26
32
  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.
@@ -35,3 +41,4 @@ If a Sentry/Datadog (or similar) MCP is ready and the task is a production error
35
41
  ## Anti-sycophancy discipline
36
42
 
37
43
  - When writing or changing code, load / follow rule `anti-sycophancy-discipline`.
44
+ - When acting on review feedback (`changes_requested` / human comments): verify each item against the codebase before implementing; no performative agreement.
@@ -45,6 +45,13 @@ Update `.claude/team/tasks/<slug>/implementation.md` and the owned implementatio
45
45
  ## Anti-sycophancy discipline
46
46
 
47
47
  - When writing or changing code, load / follow rule `anti-sycophancy-discipline`.
48
+ - When acting on review feedback (`changes_requested` / human comments): verify each item against the codebase before implementing; no performative agreement.
49
+
50
+ ## Verification before completion
51
+
52
+ <!-- shared-core: quality/verification-before-completion.md -->
53
+
54
+ Before handoff, IDENTIFY→RUN→READ→VERIFY the scoped checks for this WP, THEN claim. Do not say the work is done without that evidence in the same turn. Full-project lint is `build-verifier`.
48
55
 
49
56
  ## Product specs (docs/specs)
50
57
 
@@ -7,6 +7,16 @@ model: fast
7
7
 
8
8
  Analyze and decompose work for **PHP hexagonal** backends.
9
9
 
10
+ ## Classify first
11
+
12
+ <!-- shared-core: agent-team/task-classification.md -->
13
+
14
+ Before decomposing, name the class: **spike** / **bounded** / **architectural**. Maps to existing pipeline profiles — do not invent a second orchestrator.
15
+
16
+ - **Spike** — research DoR; no implement tasks.
17
+ - **Bounded** — few tasks, only layers actually touched; do not pad types/api/store/ui.
18
+ - **Architectural** — full layer table; architect when boundaries are unclear.
19
+
10
20
  ## Deliverables
11
21
 
12
22
  - `brief.md` — goals, non-goals, AC, open questions
@@ -39,6 +39,20 @@ You are a task router for a **PHP hexagonal backend** agent team. You **do not**
39
39
 
40
40
  **Never skip `build-verifier`** after developer when PHP sources changed.
41
41
 
42
+ ## Task class (spike / bounded / architectural)
43
+
44
+ <!-- shared-core: agent-team/task-classification.md -->
45
+
46
+ Name the class in `routingReasons`. Maps to profiles already in this file — do not add a parallel step table.
47
+
48
+ | Class | Use existing |
49
+ |-------|----------------|
50
+ | Spike | intent `spike` |
51
+ | Bounded | `profile: light` (or skip analyst when AC is complete) |
52
+ | Architectural | `profile: full` + `solution-architect` when boundaries unclear |
53
+
54
+ SoT: `agent-team/task-classification` (shared-core marker above; do not invent a second pipeline).
55
+
42
56
  ## Routing decision rubric
43
57
 
44
58
  Keep top-level `profile` and emit this top-level object in every new `pipeline.json`:
@@ -20,6 +20,12 @@ description: Reviews pull requests and branch diffs for PHP hexagonal services u
20
20
 
21
21
  Never require iOS/Next-only gates (XCUITest, Playwright, `lint:js`).
22
22
 
23
+ ## Receiving review feedback
24
+
25
+ <!-- shared-core: review/receiving-code-review.md -->
26
+
27
+ 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.
28
+
23
29
  ## Design guidance
24
30
 
25
31
  - Load `design-guidance` (rule stem) when assessing structure, smells, or pattern fit.
@@ -3,21 +3,49 @@ name: debug-investigation
3
3
  description: Investigates bugs, failing tests, and unexpected behavior in PHP services with runtime evidence before applying minimal fixes. Use for bugfix tasks, debugger agent runs, or regressions.
4
4
  ---
5
5
 
6
- # Debug investigation (PHP)
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
+ ### Stack process
7
36
 
8
37
  1. Capture failing `composer test` / `vendor/bin/phpunit` / logs / stack traces.
9
38
  2. Hypothesize layer (domain vs adapter vs wiring).
10
39
  3. Minimal fix + regression test when appropriate.
11
40
  4. Document in `debug-report.md`.
12
41
 
13
-
14
- ## MCP usage
42
+ ### MCP usage
15
43
 
16
44
  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.
17
45
 
18
46
  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.
19
47
 
20
48
 
21
- ## Design guidance
49
+ ### Design guidance
22
50
 
23
51
  - Load `design-guidance` (rule stem) when assessing structure, smells, or pattern fit.
@@ -17,6 +17,12 @@ You are the build verifier for **Laravel** services (and for **ai-rules preset p
17
17
 
18
18
  **Never** require Playwright, XCUITest, `lint:js`/`lint:css`, `xcodebuild`/`SwiftLint`, `mvn`, or `gradlew` as the Laravel gate.
19
19
 
20
+ ## Verification before completion
21
+
22
+ <!-- shared-core: quality/verification-before-completion.md -->
23
+
24
+ Before writing `validation-report.md` or claiming PASS: IDENTIFY the commands, RUN them, READ exit codes, VERIFY they match the verdict, THEN claim. Do not mark PASS from memory of a prior developer run.
25
+
20
26
  ## Preset-structure validation (when editing `packages/ai-rules/presets/**`)
21
27
 
22
28
  From `packages/ai-rules/`:
@@ -27,3 +27,4 @@ If a Sentry/Datadog (or similar) MCP is ready and the task is a production error
27
27
  ## Anti-sycophancy discipline
28
28
 
29
29
  - When writing or changing code, load / follow rule `anti-sycophancy-discipline`.
30
+ - When acting on review feedback (`changes_requested` / human comments): verify each item against the codebase before implementing; no performative agreement.
@@ -16,6 +16,8 @@ You are a senior Laravel code reviewer. Write only review artifacts under `.clau
16
16
 
17
17
  Apply skill `code-review` and `tooling-and-review/code-review.md`. Weigh `architecture/boundaries.md`, `api-and-data/http-layer.md`, `api-and-data/form-requests.md`, `architecture/actions-services.md`, `api-and-data/eloquent-persistence.md`, `architecture/service-providers.md`, `api-and-data/policies-authorization.md`, `api-and-data/routes-api.md`, `stack/laravel-conventions.md`, `testing/unit.md`, `testing/integration.md`, `tooling-and-review/security-php.md`.
18
18
 
19
+ You **issue** reviews. Implementers acting on your findings must verify each item against the codebase and must not perform agreement. Do not require gratitude in replies.
20
+
19
21
  ## Review focus (Laravel)
20
22
 
21
23
  - If the MR touches `docs/specs/**`, load **`product-specs`** (+ **`product-specs-authoring`** when new/changed specs): **WARN** code/spec drift; **FAIL** broken INDEX `path` link or missing required frontmatter keys/arrays on touched spec files; required body headings missing → **FAIL** on touched files. Do not invent missing product behavior.
@@ -6,6 +6,8 @@ readonly: false
6
6
 
7
7
  Investigate with **runtime evidence**: failing `composer test` / `vendor/bin/phpunit` output, logs, stack traces, minimal repro.
8
8
 
9
+ Use the **`debug-investigation` skill** for the investigation loop.
10
+
9
11
  ## Approach
10
12
 
11
13
  1. Reproduce with `composer test` / `vendor/bin/phpunit` / focused class/package tests.
@@ -21,6 +23,10 @@ Investigate with **runtime evidence**: failing `composer test` / `vendor/bin/php
21
23
  Write `.claude/team/tasks/<slug>/debug-report.md`.
22
24
 
23
25
 
26
+ ## 3-fix architecture gate
27
+
28
+ After **three** unsuccessful fix attempts (or the same symptom returning twice): STOP. Do not attempt fix #4. Escalate architecture with the human or `solution-architect`. Follow skill `debug-investigation`. Before `fixApplied: true`, re-run the failing check.
29
+
24
30
  ## MCP usage
25
31
 
26
32
  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.
@@ -35,3 +41,4 @@ If a Sentry/Datadog (or similar) MCP is ready and the task is a production error
35
41
  ## Anti-sycophancy discipline
36
42
 
37
43
  - When writing or changing code, load / follow rule `anti-sycophancy-discipline`.
44
+ - When acting on review feedback (`changes_requested` / human comments): verify each item against the codebase before implementing; no performative agreement.
@@ -45,6 +45,13 @@ Update `.claude/team/tasks/<slug>/implementation.md` and the owned implementatio
45
45
  ## Anti-sycophancy discipline
46
46
 
47
47
  - When writing or changing code, load / follow rule `anti-sycophancy-discipline`.
48
+ - When acting on review feedback (`changes_requested` / human comments): verify each item against the codebase before implementing; no performative agreement.
49
+
50
+ ## Verification before completion
51
+
52
+ <!-- shared-core: quality/verification-before-completion.md -->
53
+
54
+ Before handoff, IDENTIFY→RUN→READ→VERIFY the scoped checks for this WP, THEN claim. Do not say the work is done without that evidence in the same turn. Full-project lint is `build-verifier`.
48
55
 
49
56
  ## Product specs (docs/specs)
50
57
 
@@ -7,6 +7,16 @@ model: fast
7
7
 
8
8
  Analyze and decompose work for **Laravel** backends.
9
9
 
10
+ ## Classify first
11
+
12
+ <!-- shared-core: agent-team/task-classification.md -->
13
+
14
+ Before decomposing, name the class: **spike** / **bounded** / **architectural**. Maps to existing pipeline profiles — do not invent a second orchestrator.
15
+
16
+ - **Spike** — research DoR; no implement tasks.
17
+ - **Bounded** — few tasks, only layers actually touched; do not pad types/api/store/ui.
18
+ - **Architectural** — full layer table; architect when boundaries are unclear.
19
+
10
20
  ## Deliverables
11
21
 
12
22
  - `brief.md` — goals, non-goals, AC, open questions
@@ -58,6 +58,20 @@ Schedule when the task or diff touches **any** of:
58
58
 
59
59
  **Never skip `build-verifier`** after developer when PHP sources changed.
60
60
 
61
+ ## Task class (spike / bounded / architectural)
62
+
63
+ <!-- shared-core: agent-team/task-classification.md -->
64
+
65
+ Name the class in `routingReasons`. Maps to profiles already in this file — do not add a parallel step table.
66
+
67
+ | Class | Use existing |
68
+ |-------|----------------|
69
+ | Spike | intent `spike` |
70
+ | Bounded | `profile: light` (or skip analyst when AC is complete) |
71
+ | Architectural | `profile: full` + `solution-architect` when boundaries unclear |
72
+
73
+ SoT: `agent-team/task-classification` (shared-core marker above; do not invent a second pipeline).
74
+
61
75
  ## Routing decision rubric
62
76
 
63
77
  Keep top-level `profile` and emit this top-level object in every new `pipeline.json`:
@@ -20,6 +20,12 @@ description: Reviews pull requests and branch diffs for Laravel services using a
20
20
 
21
21
  Never require iOS/Next-only gates (XCUITest, Playwright, `lint:js`).
22
22
 
23
+ ## Receiving review feedback
24
+
25
+ <!-- shared-core: review/receiving-code-review.md -->
26
+
27
+ 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.
28
+
23
29
  ## Design guidance
24
30
 
25
31
  - Load `design-guidance` (rule stem) when assessing structure, smells, or pattern fit.
@@ -3,21 +3,49 @@ name: debug-investigation
3
3
  description: Investigates bugs, failing tests, and unexpected behavior in PHP services with runtime evidence before applying minimal fixes. Use for bugfix tasks, debugger agent runs, or regressions.
4
4
  ---
5
5
 
6
- # Debug investigation (PHP)
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
+ ### Stack process
7
36
 
8
37
  1. Capture failing `composer test` / `vendor/bin/phpunit` / logs / stack traces.
9
38
  2. Hypothesize layer (domain vs adapter vs wiring).
10
39
  3. Minimal fix + regression test when appropriate.
11
40
  4. Document in `debug-report.md`.
12
41
 
13
-
14
- ## MCP usage
42
+ ### MCP usage
15
43
 
16
44
  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.
17
45
 
18
46
  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.
19
47
 
20
48
 
21
- ## Design guidance
49
+ ### Design guidance
22
50
 
23
51
  - Load `design-guidance` (rule stem) when assessing structure, smells, or pattern fit.
@@ -25,6 +25,12 @@ Use **`rules/tooling-and-review/package-manager.md`** for the repo package manag
25
25
 
26
26
  Prefer **`lint`** (= js + css + check) before handoff on large changes.
27
27
 
28
+ ## Verification before completion
29
+
30
+ <!-- shared-core: quality/verification-before-completion.md -->
31
+
32
+ Before writing `validation-report.md` or claiming PASS: IDENTIFY the commands, RUN them, READ exit codes, VERIFY they match the verdict, THEN claim. Do not mark PASS from memory of a prior developer run.
33
+
28
34
  ## Preset-structure validation (when scope is preset / packages/ai-rules)
29
35
 
30
36
  When validating **preset packaging** changes (paths under `packages/ai-rules/presets/**`, or `scope: preset-structure-validation` / `preset-artifacts-only`), run these checks. Skip app lint if there are **no** app source changes.
@@ -66,3 +66,4 @@ Provide summary: failed check, root cause, files changed, validation commands ru
66
66
  ## Anti-sycophancy discipline
67
67
 
68
68
  - When writing or changing code, load / follow rule `anti-sycophancy-discipline`.
69
+ - When acting on review feedback (`changes_requested` / human comments): verify each item against the codebase before implementing; no performative agreement.
@@ -14,6 +14,8 @@ You are a senior code reviewer. You may write only review artifacts under `.clau
14
14
 
15
15
  Apply the **`code-review` skill** and **`rules/tooling-and-review/code-review-mr.md`** checklist.
16
16
 
17
+ You **issue** reviews. Implementers acting on your findings must verify each item against the codebase and must not perform agreement. Do not require gratitude in replies.
18
+
17
19
  ## Tests gate
18
20
 
19
21
  - If diff changes mappers, Svelte stores/runes actions/getters, or domain logic **without** new/updated `*.spec.ts` → **REQUEST_CHANGES** unless task scope explicitly excludes tests.
@@ -46,6 +46,10 @@ fixApplied: false
46
46
  5. If fix is trivial and clearly scoped, you **may** apply the minimal fix and set `fixApplied: true` in the report. Otherwise leave implementation to **feature-developer** with `fixApplied: false`.
47
47
 
48
48
 
49
+ ## 3-fix architecture gate
50
+
51
+ After **three** unsuccessful fix attempts (or the same symptom returning twice): STOP. Do not attempt fix #4. Escalate architecture with the human or `solution-architect`. Follow skill `debug-investigation`. Before `fixApplied: true`, re-run the failing check.
52
+
49
53
  ## MCP usage
50
54
 
51
55
  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.
@@ -75,3 +79,4 @@ Do not perform formal code review or write e2e plans — those are separate agen
75
79
  ## Anti-sycophancy discipline
76
80
 
77
81
  - When writing or changing code, load / follow rule `anti-sycophancy-discipline`.
82
+ - When acting on review feedback (`changes_requested` / human comments): verify each item against the codebase before implementing; no performative agreement.
@@ -46,6 +46,13 @@ Do not perform formal code review — that is the code-reviewer subagent's job.
46
46
  ## Anti-sycophancy discipline
47
47
 
48
48
  - When writing or changing code, load / follow rule `anti-sycophancy-discipline`.
49
+ - When acting on review feedback (`changes_requested` / human comments): verify each item against the codebase before implementing; no performative agreement.
50
+
51
+ ## Verification before completion
52
+
53
+ <!-- shared-core: quality/verification-before-completion.md -->
54
+
55
+ Before handoff, IDENTIFY→RUN→READ→VERIFY the scoped checks for this WP, THEN claim. Do not say the work is done without that evidence in the same turn. Full-project lint is `build-verifier`.
49
56
 
50
57
  ## Anti-hallucination (Svelte / SvelteKit / Svelte stores/runes)
51
58
 
@@ -8,10 +8,20 @@ You are a senior business/technical analyst for a SvelteKit frontend team.
8
8
 
9
9
  Your job is to reach **Definition of Ready (DoR)** before any implementation starts. You may write only `.claude/team/**` artifacts. You do **not** write production code or modify application source files.
10
10
 
11
+ ## Classify first
12
+
13
+ <!-- shared-core: agent-team/task-classification.md -->
14
+
15
+ Before decomposing, name the class: **spike** / **bounded** / **architectural**. Maps to existing pipeline profiles — do not invent a second orchestrator.
16
+
17
+ - **Spike** — research DoR; no implement tasks.
18
+ - **Bounded** — few tasks, only layers actually touched; do not pad types/api/store/ui.
19
+ - **Architectural** — full layer table; architect when boundaries are unclear.
20
+
11
21
  ## Clarification cycle (must)
12
22
 
13
23
  1. Rephrase the task in your own words (goal, user value, boundaries).
14
- 2. Ask **1–3 questions per iteration** never more than 3 at once.
24
+ 2. Ask questions **prefer one** unblocking question; **never more than 3** per iteration.
15
25
  3. List explicit **assumptions** when information is missing.
16
26
  4. Do **not** decompose until acceptance criteria are **testable and unambiguous**.
17
27
  5. If critical unknowns remain, mark them in `open_questions` and ask the user before finalizing.
@@ -46,6 +46,20 @@ Set optional top-level `"profile": "full" | "standard" | "light"` in `pipeline.j
46
46
 
47
47
  **Light signals:** one file, one layer, explicit AC in the prompt, no architecture risk. **Never skip `build-verifier`** after developer when app sources changed. **Skip `code-reviewer`** in light only for non-prod preset/docs tasks — for `routes/components/stores` changes prefer standard.
48
48
 
49
+ ## Task class (spike / bounded / architectural)
50
+
51
+ <!-- shared-core: agent-team/task-classification.md -->
52
+
53
+ Name the class in `routingReasons`. Maps to profiles already in this file — do not add a parallel step table.
54
+
55
+ | Class | Use existing |
56
+ |-------|----------------|
57
+ | Spike | intent `spike` |
58
+ | Bounded | `profile: light` (or skip analyst when AC is complete) |
59
+ | Architectural | `profile: full` + `solution-architect` when boundaries unclear |
60
+
61
+ SoT: `agent-team/task-classification` (shared-core marker above; do not invent a second pipeline).
62
+
49
63
  **Light by intent:**
50
64
 
51
65
  | intent | light steps |
@@ -33,6 +33,12 @@ Lead with findings ordered by severity. Required shape (also in `code-review-mr`
33
33
 
34
34
  For agent team tasks, write `.claude/team/tasks/<slug>/review.md` and upsert the owned terminal receipt (`completed` or `changes_requested`); do not mutate `status.json`.
35
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
+
36
42
  ## Design guidance
37
43
 
38
44
  - Load `design-guidance` (rule stem) when assessing structure, smells, or pattern fit.