cc-codeconductor 0.2.9 → 0.3.0

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 (143) hide show
  1. package/README.md +105 -25
  2. package/dist/index.js +662 -291
  3. package/package.json +1 -1
  4. package/presets/agy/AGENTS.md +365 -0
  5. package/presets/agy/README.md +47 -0
  6. package/presets/agy/hooks.json +30 -0
  7. package/presets/agy/mcp_config.json +3 -0
  8. package/presets/agy/rules/commit-style.md +1 -0
  9. package/presets/agy/rules/graphify.md +14 -0
  10. package/presets/agy/scripts/post-tool.sh +25 -0
  11. package/presets/agy/scripts/pre-tool.sh +56 -0
  12. package/presets/agy/settings.json +8 -0
  13. package/presets/agy/skills/cc-api-contract/SKILL.md +71 -0
  14. package/presets/agy/skills/cc-db-migration/SKILL.md +70 -0
  15. package/presets/agy/skills/cc-feature/SKILL.md +115 -0
  16. package/presets/agy/skills/cc-fix/SKILL.md +124 -0
  17. package/presets/agy/skills/cc-pagespeed/SKILL.md +101 -0
  18. package/presets/agy/skills/cc-refactor/SKILL.md +149 -0
  19. package/presets/agy/skills/cc-review/SKILL.md +142 -0
  20. package/presets/agy/skills/cc-tdd-cycle/SKILL.md +226 -0
  21. package/presets/agy/skills/cc-test-plan/SKILL.md +145 -0
  22. package/presets/agy/skills/commit/SKILL.md +5 -0
  23. package/presets/agy/workflows/cc-api-contract.md +71 -0
  24. package/presets/agy/workflows/cc-db-migration.md +70 -0
  25. package/presets/agy/workflows/cc-feature.md +115 -0
  26. package/presets/agy/workflows/cc-fix.md +124 -0
  27. package/presets/agy/workflows/cc-pagespeed.md +101 -0
  28. package/presets/agy/workflows/cc-refactor.md +149 -0
  29. package/presets/agy/workflows/cc-review.md +142 -0
  30. package/presets/agy/workflows/cc-tdd-cycle.md +226 -0
  31. package/presets/agy/workflows/cc-test-plan.md +145 -0
  32. package/presets/agy/workflows/commit.md +1 -0
  33. package/presets/claude/CLAUDE.md +47 -3
  34. package/presets/claude/claude.json +6 -0
  35. package/presets/claude/commands/cc/pagespeed.md +103 -0
  36. package/presets/claude/settings.json +249 -2
  37. package/presets/claude/skills/android/SKILL.md +119 -0
  38. package/presets/claude/skills/conductor-setup/SKILL.md +125 -0
  39. package/presets/claude/skills/find-skills/SKILL.md +142 -0
  40. package/presets/claude/skills/laravel-specialist/SKILL.md +264 -0
  41. package/presets/claude/skills/laravel-specialist/references/eloquent.md +351 -0
  42. package/presets/claude/skills/laravel-specialist/references/livewire.md +512 -0
  43. package/presets/claude/skills/laravel-specialist/references/queues.md +423 -0
  44. package/presets/claude/skills/laravel-specialist/references/routing.md +362 -0
  45. package/presets/claude/skills/laravel-specialist/references/testing.md +522 -0
  46. package/presets/claude/skills/multi-agent-orchestration/README.md +144 -0
  47. package/presets/claude/skills/multi-agent-orchestration/SKILL.md +579 -0
  48. package/presets/claude/skills/multi-agent-orchestration/examples/framework_implementations.py +362 -0
  49. package/presets/claude/skills/multi-agent-orchestration/examples/orchestration_patterns.py +411 -0
  50. package/presets/claude/skills/multi-agent-orchestration/scripts/agent_communication.py +334 -0
  51. package/presets/claude/skills/multi-agent-orchestration/scripts/benchmarking.py +341 -0
  52. package/presets/claude/skills/multi-agent-orchestration/scripts/workflow_management.py +334 -0
  53. package/presets/claude/skills/pagespeed-insights/SKILL.md +443 -0
  54. package/presets/claude/skills/pagespeed-insights/reference.md +50 -0
  55. package/presets/claude/skills/pagespeed-perf/SKILL.md +279 -0
  56. package/presets/claude/skills/php-pro/SKILL.md +208 -0
  57. package/presets/claude/skills/php-pro/references/async-patterns.md +412 -0
  58. package/presets/claude/skills/php-pro/references/laravel-patterns.md +377 -0
  59. package/presets/claude/skills/php-pro/references/modern-php-features.md +323 -0
  60. package/presets/claude/skills/php-pro/references/symfony-patterns.md +466 -0
  61. package/presets/claude/skills/php-pro/references/testing-quality.md +466 -0
  62. package/presets/claude/skills/workflow-orchestration-patterns/SKILL.md +98 -0
  63. package/presets/claude/skills/workflow-orchestration-patterns/references/details.md +223 -0
  64. package/presets/codex/AGENTS.md +38 -14
  65. package/presets/codex/skills/android/SKILL.md +119 -0
  66. package/presets/codex/skills/conductor-setup/SKILL.md +125 -0
  67. package/presets/codex/skills/find-skills/SKILL.md +142 -0
  68. package/presets/codex/skills/laravel-specialist/SKILL.md +264 -0
  69. package/presets/codex/skills/laravel-specialist/references/eloquent.md +351 -0
  70. package/presets/codex/skills/laravel-specialist/references/livewire.md +512 -0
  71. package/presets/codex/skills/laravel-specialist/references/queues.md +423 -0
  72. package/presets/codex/skills/laravel-specialist/references/routing.md +362 -0
  73. package/presets/codex/skills/laravel-specialist/references/testing.md +522 -0
  74. package/presets/codex/skills/multi-agent-orchestration/README.md +144 -0
  75. package/presets/codex/skills/multi-agent-orchestration/SKILL.md +579 -0
  76. package/presets/codex/skills/multi-agent-orchestration/examples/framework_implementations.py +362 -0
  77. package/presets/codex/skills/multi-agent-orchestration/examples/orchestration_patterns.py +411 -0
  78. package/presets/codex/skills/multi-agent-orchestration/scripts/agent_communication.py +334 -0
  79. package/presets/codex/skills/multi-agent-orchestration/scripts/benchmarking.py +341 -0
  80. package/presets/codex/skills/multi-agent-orchestration/scripts/workflow_management.py +334 -0
  81. package/presets/codex/skills/pagespeed-insights/SKILL.md +443 -0
  82. package/presets/codex/skills/pagespeed-insights/reference.md +50 -0
  83. package/presets/codex/skills/pagespeed-perf/SKILL.md +279 -0
  84. package/presets/codex/skills/php-pro/SKILL.md +208 -0
  85. package/presets/codex/skills/php-pro/references/async-patterns.md +412 -0
  86. package/presets/codex/skills/php-pro/references/laravel-patterns.md +377 -0
  87. package/presets/codex/skills/php-pro/references/modern-php-features.md +323 -0
  88. package/presets/codex/skills/php-pro/references/symfony-patterns.md +466 -0
  89. package/presets/codex/skills/php-pro/references/testing-quality.md +466 -0
  90. package/presets/codex/skills/workflow-orchestration-patterns/SKILL.md +98 -0
  91. package/presets/codex/skills/workflow-orchestration-patterns/references/details.md +223 -0
  92. package/presets/opencode/README.md +11 -10
  93. package/presets/opencode/agents/orchestrator.md +121 -1
  94. package/presets/opencode/agents/reviewer.md +31 -0
  95. package/presets/opencode/commands/cc-pagespeed.md +100 -0
  96. package/presets/opencode/prompts/v0.3.0/architect.md +221 -0
  97. package/presets/opencode/prompts/v0.3.0/docs.md +189 -0
  98. package/presets/opencode/prompts/v0.3.0/implementer.md +162 -0
  99. package/presets/opencode/prompts/v0.3.0/orchestrator.md +360 -0
  100. package/presets/opencode/prompts/v0.3.0/repo-explorer.md +110 -0
  101. package/presets/opencode/prompts/v0.3.0/reviewer.md +225 -0
  102. package/presets/opencode/prompts/v0.3.0/task-coach.md +155 -0
  103. package/presets/opencode/prompts/v0.3.0/tester.md +251 -0
  104. package/presets/opencode/skills/android/SKILL.md +119 -0
  105. package/presets/opencode/skills/conductor-setup/SKILL.md +125 -0
  106. package/presets/opencode/skills/find-skills/SKILL.md +142 -0
  107. package/presets/opencode/skills/laravel-specialist/SKILL.md +264 -0
  108. package/presets/opencode/skills/laravel-specialist/references/eloquent.md +351 -0
  109. package/presets/opencode/skills/laravel-specialist/references/livewire.md +512 -0
  110. package/presets/opencode/skills/laravel-specialist/references/queues.md +423 -0
  111. package/presets/opencode/skills/laravel-specialist/references/routing.md +362 -0
  112. package/presets/opencode/skills/laravel-specialist/references/testing.md +522 -0
  113. package/presets/opencode/skills/multi-agent-orchestration/README.md +144 -0
  114. package/presets/opencode/skills/multi-agent-orchestration/SKILL.md +579 -0
  115. package/presets/opencode/skills/multi-agent-orchestration/examples/framework_implementations.py +362 -0
  116. package/presets/opencode/skills/multi-agent-orchestration/examples/orchestration_patterns.py +411 -0
  117. package/presets/opencode/skills/multi-agent-orchestration/scripts/agent_communication.py +334 -0
  118. package/presets/opencode/skills/multi-agent-orchestration/scripts/benchmarking.py +341 -0
  119. package/presets/opencode/skills/multi-agent-orchestration/scripts/workflow_management.py +334 -0
  120. package/presets/opencode/skills/pagespeed-insights/SKILL.md +443 -0
  121. package/presets/opencode/skills/pagespeed-insights/reference.md +50 -0
  122. package/presets/opencode/skills/pagespeed-perf/SKILL.md +279 -0
  123. package/presets/opencode/skills/php-pro/SKILL.md +208 -0
  124. package/presets/opencode/skills/php-pro/references/async-patterns.md +412 -0
  125. package/presets/opencode/skills/php-pro/references/laravel-patterns.md +377 -0
  126. package/presets/opencode/skills/php-pro/references/modern-php-features.md +323 -0
  127. package/presets/opencode/skills/php-pro/references/symfony-patterns.md +466 -0
  128. package/presets/opencode/skills/php-pro/references/testing-quality.md +466 -0
  129. package/presets/opencode/skills/workflow-orchestration-patterns/SKILL.md +98 -0
  130. package/presets/opencode/skills/workflow-orchestration-patterns/references/details.md +223 -0
  131. package/presets/seo-hotel/commands/cc-seo-audit.md +17 -9
  132. package/presets/seo-hotel/settings.json +225 -0
  133. package/presets/seo-hotel/skills/find-skills/SKILL.md +142 -0
  134. package/presets/seo-hotel/skills/pagespeed-insights/SKILL.md +443 -0
  135. package/presets/seo-hotel/skills/pagespeed-insights/reference.md +50 -0
  136. package/src/presets/manifests/agy.yml +38 -3
  137. package/src/presets/manifests/claude.yml +8 -2
  138. package/src/presets/manifests/codex.yml +3 -2
  139. package/src/presets/manifests/cursor.yml +3 -2
  140. package/src/presets/manifests/gemini.yml +3 -2
  141. package/src/presets/manifests/opencode.yml +7 -2
  142. package/src/presets/models/agy.yml +16 -0
  143. package/src/presets/models/opencode.yml +6 -6
@@ -0,0 +1,124 @@
1
+ ---
2
+ name: cc-fix
3
+ description:
4
+ Run the bug fix workflow — risk-based routing through task validation,
5
+ implementation, testing, and optional review.
6
+ ---
7
+
8
+ # Bug Fix Workflow
9
+
10
+ Bug description: $ARGUMENTS
11
+
12
+ Provide the following information in $ARGUMENTS:
13
+
14
+ - What is the incorrect behavior (actual)
15
+ - What is the expected behavior
16
+ - Steps to reproduce
17
+ - Environment or version where the bug occurs (if known)
18
+ - Any relevant error messages or stack traces
19
+
20
+ ---
21
+
22
+ ## Step 1 — Task Card validation (task-coach)
23
+
24
+ Invoke `task-coach` with the bug description above.
25
+
26
+ task-coach must produce a Task Card that includes:
27
+
28
+ - A clear statement of actual vs. expected behavior
29
+ - Reproduction steps (or a note that they are unknown)
30
+ - Risk classification: `low`, `medium`, or `high`
31
+ - Scope: which files or modules are likely affected
32
+
33
+ If reproduction steps are missing, task-coach must ask for them before
34
+ classifying risk. A bug without a reproduction path cannot be classified
35
+ reliably.
36
+
37
+ **STOP here. Show the Task Card and wait for human confirmation.**
38
+
39
+ ---
40
+
41
+ ## Step 2 — Route by risk
42
+
43
+ Read the risk field from the Task Card and follow the corresponding route.
44
+
45
+ ### Low-risk route
46
+
47
+ Applies when: the bug is isolated to a single component, existing tests cover
48
+ the affected code, and no public API or shared state is involved.
49
+
50
+ Route: `task-coach` → `implementer` → `tester`
51
+
52
+ Proceed directly to Step 3a.
53
+
54
+ ### Medium or high-risk route
55
+
56
+ Applies when: the bug touches shared state, a public API, auth or payment paths,
57
+ database writes, or the root cause is not yet understood.
58
+
59
+ Route: `task-coach` → `architect` → `implementer` → `tester` → `reviewer`
60
+
61
+ Invoke `architect` before implementation. architect must:
62
+
63
+ - Identify the root cause (or document that it is unknown)
64
+ - Define the fix approach and affected files
65
+ - Flag any regression risk to adjacent components
66
+ - Produce a Technical Plan
67
+
68
+ **STOP here if high-risk. Show the Technical Plan and wait for human approval
69
+ before continuing.**
70
+
71
+ ---
72
+
73
+ ## Step 3a — Implementation, low-risk (implementer)
74
+
75
+ Invoke `implementer` with the Task Card.
76
+ Implementer creates a Git Worktree before touching any file; all edits happen inside it.
77
+
78
+ implementer must:
79
+
80
+ 1. Locate the defect using the reproduction steps
81
+ 2. Apply the minimal fix — no unrelated changes
82
+ 3. Run the test suite
83
+ 4. Produce an Implementation Summary: root cause, fix applied, files changed
84
+
85
+ ---
86
+
87
+ ## Step 3b — Implementation, medium/high-risk (implementer)
88
+
89
+ Invoke `implementer` with the approved Technical Plan and the Task Card.
90
+ Implementer creates a Git Worktree before touching any file; all edits happen inside it.
91
+
92
+ implementer must follow the plan exactly. Any deviation requires a new Technical
93
+ Plan approval. After implementation, run the full test suite.
94
+
95
+ ---
96
+
97
+ ## Step 4 — Regression tests (tester)
98
+
99
+ Invoke `tester` for all risk levels.
100
+
101
+ tester must:
102
+
103
+ 1. Write a regression test that reproduces the original bug (fails before the
104
+ fix, passes after)
105
+ 2. Verify that existing tests still pass
106
+ 3. Produce a Coverage Summary: test added, case covered
107
+
108
+ ---
109
+
110
+ ## Step 5 — Review (reviewer) — medium/high-risk only
111
+
112
+ Invoke `reviewer` with the diff and Task Card.
113
+
114
+ reviewer produces a Review Report with CRITICAL / WARNING / SUGGESTION findings.
115
+ If any CRITICAL findings exist, **STOP**. Do not close the fix until they are
116
+ resolved.
117
+
118
+ ---
119
+
120
+ ## Completion
121
+
122
+ Report: Task Card, Implementation Summary, regression test added, Review Report
123
+ (if applicable). The fix is complete only when: the regression test passes, the
124
+ full suite passes, and no CRITICAL review findings remain.
@@ -0,0 +1,101 @@
1
+ ---
2
+ name: cc-pagespeed
3
+ description: >-
4
+ Run the PageSpeed performance audit — 80/20 analysis of Core Web Vitals using
5
+ the PageSpeed Insights API.
6
+ ---
7
+
8
+ # PageSpeed Performance Audit
9
+
10
+ Audit URL: $ARGUMENTS
11
+
12
+ ---
13
+
14
+ ## Step 1 — Pre-flight (pagespeed-perf skill)
15
+
16
+ Invoke `pagespeed-perf` skill.
17
+
18
+ Read `PAGESPEED_API_KEY` from the environment. Compute the output filename:
19
+ `{YYYY-MM-DD}_pagespeed-{hostname}-claude.md`.
20
+
21
+ Log whether the API key was found. Proceed regardless — lab data is available
22
+ without a key, but CrUX field data requires it.
23
+
24
+ ---
25
+
26
+ ## Step 2 — Collect
27
+
28
+ Call the PageSpeed Insights API for the URL provided above.
29
+
30
+ - Strategy: `both` (mobile + desktop) unless the user specified otherwise.
31
+ - If Bun is available, use `~/.claude/skills/pagespeed-perf/scripts/run.ts`.
32
+ - If Bun is unavailable, call PSI directly via WebFetch and fetch the HTML
33
+ source for manual resource-hint analysis.
34
+
35
+ ---
36
+
37
+ ## Step 3 — Analyze
38
+
39
+ Extract from the PSI response:
40
+
41
+ - Core Web Vitals: LCP, INP, CLS, FCP, TBT, TTFB
42
+ - LCP element (type, selector, HTML snippet)
43
+ - Third-party scripts ordered by blocking time
44
+ - Render-blocking resources
45
+ - Unused JavaScript and CSS (savings in bytes and ms)
46
+
47
+ From the HTML source:
48
+
49
+ - Resource hints (`<link rel="preload|preconnect|prefetch">`)
50
+ - Images: lazy loading, `fetchpriority`, format, dimensions
51
+ - Fonts: `font-display`, preloaded subsets
52
+ - Blocking scripts in `<head>` (no `async`/`defer`)
53
+
54
+ ---
55
+
56
+ ## Step 4 — Prioritize
57
+
58
+ Score each identified optimization using the 80/20 matrix:
59
+ `Score = Impact × Ease` (each 1–5, max 25).
60
+
61
+ Order findings by descending score. Mark optimizations with Score ≥ 20 as
62
+ **Critical 20%**.
63
+
64
+ ---
65
+
66
+ ## Step 5 — Report
67
+
68
+ Write the full performance report to
69
+ `{YYYY-MM-DD}_pagespeed-{hostname}-claude.md` in the current directory.
70
+
71
+ Required sections:
72
+ 1. Resumen Ejecutivo (2–3 paragraphs)
73
+ 2. Métricas Actuales (lab vs field table)
74
+ 3. Recursos con Mayor Impacto
75
+ 4. Plan de Acción Priorizado (80/20 table)
76
+ 5. Solución Técnica Detallada (per finding: problem, evidence, code, expected gain)
77
+ 6. Quick Wins / High Impact Changes / Roadmap
78
+
79
+ End every report with:
80
+ ```
81
+ ---
82
+ *Informe generado el {YYYY-MM-DD} · Herramienta: Claude Code + pagespeed-perf skill*
83
+ *API Key usada: {Sí / No} · Datos CrUX: {Disponibles / No disponibles}*
84
+ ```
85
+
86
+ ---
87
+
88
+ ## Requirements
89
+
90
+ **`PAGESPEED_API_KEY`** — Optional but strongly recommended.
91
+
92
+ - With key: real CrUX field data + 25,000 requests/day quota.
93
+ - Without key: lab data only (Lighthouse); shared rate limit applies.
94
+
95
+ Set in your shell:
96
+ ```powershell
97
+ $env:PAGESPEED_API_KEY = "your-api-key" # Windows PowerShell
98
+ export PAGESPEED_API_KEY="your-api-key" # macOS / Linux
99
+ ```
100
+
101
+ Get a free key: <https://developers.google.com/speed/docs/insights/v5/get-started>
@@ -0,0 +1,149 @@
1
+ ---
2
+ name: cc-refactor
3
+ description:
4
+ Run the refactor workflow — mandatory architectural justification, test
5
+ verification, risk-based implementation, and scope enforcement.
6
+ ---
7
+
8
+ # Refactor Workflow
9
+
10
+ Refactor description: $ARGUMENTS
11
+
12
+ Describe what you want to refactor and why. Include:
13
+
14
+ - The current structure or pattern being changed
15
+ - The target structure or pattern
16
+ - The motivation (performance, readability, architectural alignment, etc.)
17
+ - Known risk areas or dependencies
18
+
19
+ ---
20
+
21
+ ## Prerequisite — Test coverage check
22
+
23
+ Before any agent is invoked, verify that the code being refactored has adequate
24
+ test coverage.
25
+
26
+ A refactor without tests is not a refactor — it is a rewrite with unknown
27
+ behavioral consequences.
28
+
29
+ If coverage is insufficient:
30
+
31
+ 1. **STOP**. Report the coverage gap to the human.
32
+ 2. Suggest invoking `/cc:test-plan` first to establish coverage.
33
+ 3. Do not proceed with the refactor until coverage is confirmed.
34
+
35
+ ---
36
+
37
+ ## Step 1 — Architectural justification (architect)
38
+
39
+ Always invoke `architect` first, regardless of risk level. A refactor without a
40
+ written justification is scope creep in disguise.
41
+
42
+ architect must produce a Refactor Plan that includes:
43
+
44
+ - Statement of the problem with the current structure
45
+ - Proposed target structure and rationale
46
+ - Affected files and module boundaries
47
+ - Risk level: `low`, `medium`, or `high`
48
+ - Behavioral invariants that must not change
49
+ - Open questions requiring human input
50
+
51
+ **Scope creep warning:** If during planning architect identifies unrelated
52
+ improvements, they must be listed separately as "Out of scope." They are not
53
+ part of this refactor.
54
+
55
+ **STOP here. Show the Refactor Plan and wait for explicit human approval. Do not
56
+ proceed without written approval of the plan.**
57
+
58
+ ---
59
+
60
+ ## Step 2 — Route by risk
61
+
62
+ Read the risk field from the Refactor Plan and follow the corresponding route.
63
+
64
+ ### Low-risk route
65
+
66
+ Applies when: the refactor is purely internal, no public interfaces change, full
67
+ test coverage exists for the affected code, and behavioral impact is isolated to
68
+ the refactored module.
69
+
70
+ Route: `architect` (done) → `implementer`
71
+
72
+ Proceed to Step 3a.
73
+
74
+ ### Medium or high-risk route
75
+
76
+ Applies when: module boundaries change, shared interfaces are affected,
77
+ performance characteristics may change, or the refactor touches more than two
78
+ files with behavioral impact.
79
+
80
+ Route: `architect` (done) → `implementer` → `reviewer`
81
+
82
+ Proceed to Step 3b.
83
+
84
+ ---
85
+
86
+ ## Step 3a — Implementation, low-risk (implementer)
87
+
88
+ Invoke `implementer` with the approved Refactor Plan.
89
+ Implementer creates a Git Worktree before touching any file; all edits happen inside it.
90
+
91
+ implementer must:
92
+
93
+ 1. Read the Refactor Plan before opening any file
94
+ 2. Apply only the changes specified in the plan
95
+ 3. Run the full test suite before and after — both runs must pass
96
+ 4. Produce an Implementation Summary: what changed, what did not change, test
97
+ results before and after
98
+
99
+ Any deviation from the plan — including "obvious improvements" encountered
100
+ during implementation — must be flagged and held for a separate task.
101
+
102
+ ---
103
+
104
+ ## Step 3b — Implementation, medium/high-risk (implementer)
105
+
106
+ Same rules as 3a. Additionally:
107
+
108
+ - implementer must document any unexpected complexity discovered during
109
+ implementation and pause if the complexity changes the risk assessment
110
+ - If new risks are found, **STOP** and report to the human before continuing
111
+
112
+ ---
113
+
114
+ ## Step 4 — Test suite verification
115
+
116
+ For all risk levels, confirm:
117
+
118
+ - All tests that existed before the refactor still pass
119
+ - No test was deleted or commented out to make the suite pass
120
+ - Behavior documented in the Task Card remains unchanged
121
+
122
+ If any test fails that was passing before, the refactor has introduced a
123
+ regression. **STOP and report.**
124
+
125
+ ---
126
+
127
+ ## Step 5 — Code review (reviewer) — medium/high-risk only
128
+
129
+ Invoke `reviewer` with the diff and Refactor Plan.
130
+
131
+ reviewer must verify:
132
+
133
+ - The implementation matches the approved plan
134
+ - No behavior was changed beyond the plan's scope
135
+ - No unrelated files were modified
136
+
137
+ Review Report must include CRITICAL / WARNING / SUGGESTION findings. CRITICAL
138
+ findings block completion.
139
+
140
+ ---
141
+
142
+ ## Completion
143
+
144
+ Report: Refactor Plan (approved), Implementation Summary, test results before
145
+ and after, Review Report (if applicable).
146
+
147
+ The refactor is complete only when: all pre-existing tests still pass, the
148
+ implementation matches the approved plan exactly, and no CRITICAL review
149
+ findings remain.
@@ -0,0 +1,142 @@
1
+ ---
2
+ name: cc-review
3
+ description:
4
+ Run a structured code review — produces a Review Report with CRITICAL,
5
+ WARNING, and SUGGESTION findings; CRITICAL findings block merge.
6
+ ---
7
+
8
+ # Code Review Workflow
9
+
10
+ Review target: $ARGUMENTS
11
+
12
+ Specify what to review. Accepted formats:
13
+
14
+ - A branch name: `feature/my-branch`
15
+ - A file or set of files: `src/api/UserController.kt`
16
+ - A pull request reference: `PR #42`
17
+ - Empty — defaults to the current working diff (`git diff`)
18
+
19
+ ---
20
+
21
+ ## Step 1 — Diff collection
22
+
23
+ Before invoking `reviewer`, collect the diff for the specified target.
24
+
25
+ If $ARGUMENTS is empty or not provided:
26
+
27
+ - Use `git diff HEAD` as the review target
28
+
29
+ If $ARGUMENTS is a branch name:
30
+
31
+ - Use `git diff main...$ARGUMENTS` (or `develop` if main is not the base)
32
+
33
+ If $ARGUMENTS is a PR reference:
34
+
35
+ - Retrieve the PR diff and the PR description for context
36
+
37
+ If $ARGUMENTS is a file path:
38
+
39
+ - Use `git diff HEAD -- $ARGUMENTS`
40
+
41
+ Show the diff summary (files changed, lines added/removed) before invoking
42
+ reviewer.
43
+
44
+ ---
45
+
46
+ ## Step 2 — Code review (reviewer)
47
+
48
+ Invoke `reviewer` with:
49
+
50
+ - The full diff
51
+ - The Task Card or PR description (if available)
52
+ - The target specification from $ARGUMENTS
53
+
54
+ reviewer must evaluate the diff against the following checklist:
55
+
56
+ **Correctness**
57
+
58
+ - Does the implementation match the stated intent?
59
+ - Are there logic errors, off-by-one errors, or unhandled edge cases?
60
+
61
+ **Architecture alignment**
62
+
63
+ - Does the change follow existing module boundaries?
64
+ - Does it introduce unplanned coupling or layering violations?
65
+
66
+ **Security**
67
+
68
+ - Are inputs validated before use?
69
+ - Is there any credential, token, or secret in the diff?
70
+ - Are there SQL injection, XSS, or injection risks?
71
+
72
+ **Performance**
73
+
74
+ - Does the change introduce N+1 queries, blocking I/O, or O(n^2) loops?
75
+
76
+ **Test coverage**
77
+
78
+ - Do tests exist for the new or changed behavior?
79
+ - Are assertions meaningful (not just checking that no exception is thrown)?
80
+
81
+ **Documentation**
82
+
83
+ - Are public interfaces documented?
84
+ - Is CHANGELOG updated if behavior changed?
85
+
86
+ ---
87
+
88
+ ## Step 3 — Review Report
89
+
90
+ reviewer produces a structured Review Report with findings in three categories:
91
+
92
+ ```markdown
93
+ ## Review Report
94
+
95
+ ### CRITICAL
96
+
97
+ [Findings that must be fixed before merge. Each finding includes:
98
+
99
+ - Location (file:line)
100
+ - Description of the problem
101
+ - Suggested resolution]
102
+
103
+ ### WARNING
104
+
105
+ [Findings that should be resolved before merge but are not blockers in
106
+ exceptional cases with human approval. Same format as CRITICAL.]
107
+
108
+ ### SUGGESTION
109
+
110
+ [Optional improvements — style, readability, future-proofing. These do not block
111
+ merge.]
112
+
113
+ ### Summary
114
+
115
+ - Files reviewed: N
116
+ - Total findings: N (X critical, Y warnings, Z suggestions)
117
+ - Merge recommendation: APPROVED | BLOCKED
118
+ ```
119
+
120
+ ---
121
+
122
+ ## Step 4 — Merge decision
123
+
124
+ If any CRITICAL findings exist:
125
+
126
+ - The Review Report status is **BLOCKED**
127
+ - Report all CRITICAL findings to the human
128
+ - Do not proceed until each CRITICAL finding is resolved
129
+ - After resolution, invoke `/cc:review` again on the same target
130
+
131
+ If no CRITICAL findings exist:
132
+
133
+ - The Review Report status is **APPROVED**
134
+ - Report any WARNINGs and SUGGESTIONs for human awareness
135
+ - The human makes the final merge decision
136
+
137
+ ---
138
+
139
+ ## Completion
140
+
141
+ Deliver the complete Review Report. Never summarize or omit findings. Every
142
+ finding must include a location and an actionable description.