cc-codeconductor 0.4.3 → 1.0.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 (262) hide show
  1. package/README.md +95 -95
  2. package/dist/cli/errors.d.ts +65 -0
  3. package/dist/core/compilation/compile-checker.d.ts +51 -0
  4. package/dist/core/config/codeconductor-config.d.ts +42 -0
  5. package/dist/core/config/config-loader.d.ts +11 -0
  6. package/dist/core/filesystem/credential-guard.d.ts +18 -0
  7. package/dist/core/goal/goal-planner.d.ts +8 -0
  8. package/dist/core/goal/goal-state.d.ts +15 -0
  9. package/dist/core/loop/git-stats.d.ts +13 -0
  10. package/dist/core/loop/loop-engine.d.ts +79 -0
  11. package/dist/core/memory/episodic-store.d.ts +6 -0
  12. package/dist/core/memory/operational-state.d.ts +6 -0
  13. package/dist/core/orchestrator/runtime-orchestrator.d.ts +25 -0
  14. package/dist/core/planner/product-planner.d.ts +18 -0
  15. package/dist/core/presets/package-paths.d.ts +4 -0
  16. package/dist/core/product-graph/graph-store.d.ts +11 -0
  17. package/dist/core/product-graph/paths.d.ts +18 -0
  18. package/dist/core/verification/verification-runner.d.ts +57 -0
  19. package/dist/domain/loop/loop-state.d.ts +74 -0
  20. package/dist/domain/product/entities.d.ts +11 -0
  21. package/dist/index.d.ts +15 -0
  22. package/dist/index.js +23721 -15064
  23. package/dist/library.js +2595 -0
  24. package/dist/utils/result.d.ts +36 -0
  25. package/dist/validation/schemas.d.ts +3660 -0
  26. package/package.json +15 -2
  27. package/policy.yml +12 -11
  28. package/presets/agy/AGENTS.md +11 -5
  29. package/presets/agy/gates/pre-commit/GATE.md +136 -0
  30. package/presets/agy/skills/cc-fix/SKILL.md +2 -2
  31. package/presets/agy/skills/cc-tdd-cycle/SKILL.md +11 -0
  32. package/presets/agy/skills/evaluation/SKILL.md +6 -0
  33. package/presets/agy/skills/openspec/SKILL.md +32 -0
  34. package/presets/agy/workflows/cc-api-contract.md +12 -0
  35. package/presets/agy/workflows/cc-ask.md +55 -0
  36. package/presets/agy/workflows/cc-clarify.md +33 -0
  37. package/presets/agy/workflows/cc-council.md +31 -7
  38. package/presets/agy/workflows/cc-db-migration.md +22 -9
  39. package/presets/agy/workflows/cc-explore.md +37 -0
  40. package/presets/agy/workflows/cc-feature.md +41 -19
  41. package/presets/agy/workflows/cc-fix.md +50 -23
  42. package/presets/agy/workflows/cc-handoff.md +42 -0
  43. package/presets/agy/workflows/cc-iterative.md +128 -0
  44. package/presets/agy/workflows/cc-openspec.md +75 -0
  45. package/presets/agy/workflows/cc-pagespeed.md +12 -0
  46. package/presets/agy/workflows/cc-prototype.md +39 -0
  47. package/presets/agy/workflows/cc-refactor.md +12 -0
  48. package/presets/agy/workflows/cc-review.md +12 -0
  49. package/presets/agy/workflows/cc-scorecard.md +29 -0
  50. package/presets/agy/workflows/cc-tdd-cycle.md +24 -0
  51. package/presets/agy/workflows/cc-test-plan.md +12 -0
  52. package/presets/agy/workflows/cc-triage.md +35 -0
  53. package/presets/claude/CLAUDE.md +64 -0
  54. package/presets/claude/commands/cc/api-contract.md +12 -0
  55. package/presets/claude/commands/cc/ask.md +55 -0
  56. package/presets/claude/commands/cc/clarify.md +32 -0
  57. package/presets/claude/commands/cc/council.md +87 -0
  58. package/presets/claude/commands/cc/db-migration.md +22 -9
  59. package/presets/claude/commands/cc/explore.md +36 -0
  60. package/presets/claude/commands/cc/feature.md +49 -22
  61. package/presets/claude/commands/cc/fix.md +74 -20
  62. package/presets/claude/commands/cc/handoff.md +44 -0
  63. package/presets/claude/commands/cc/iterative.md +132 -0
  64. package/presets/claude/commands/cc/openspec.md +169 -0
  65. package/presets/claude/commands/cc/pagespeed.md +12 -0
  66. package/presets/claude/commands/cc/prototype.md +38 -0
  67. package/presets/claude/commands/cc/refactor.md +152 -1
  68. package/presets/claude/commands/cc/review.md +90 -17
  69. package/presets/claude/commands/cc/scorecard.md +77 -0
  70. package/presets/claude/commands/cc/tdd-cycle.md +53 -3
  71. package/presets/claude/commands/cc/test-plan.md +12 -0
  72. package/presets/claude/commands/cc/triage.md +34 -0
  73. package/presets/claude/gates/pre-commit/GATE.md +136 -0
  74. package/presets/claude/settings.json +8 -46
  75. package/presets/claude/skills/evaluation/SKILL.md +42 -0
  76. package/presets/claude/skills/openspec/SKILL.md +54 -0
  77. package/presets/codex/AGENTS.md +62 -5
  78. package/presets/codex/commands/cc-ask.md +55 -0
  79. package/presets/codex/gates/pre-commit/GATE.md +136 -0
  80. package/presets/cursor/.cursorignore +15 -0
  81. package/presets/cursor/AGENTS.md +504 -0
  82. package/presets/cursor/agents/architect.md +211 -0
  83. package/presets/cursor/agents/business-agent.md +44 -0
  84. package/presets/cursor/agents/complexity-auditor.md +76 -0
  85. package/presets/cursor/agents/continuous-architect.md +37 -0
  86. package/presets/cursor/agents/contract-builder.md +75 -0
  87. package/presets/cursor/agents/docs.md +181 -0
  88. package/presets/cursor/agents/goal-planner.md +71 -0
  89. package/presets/cursor/agents/impact-analyst.md +43 -0
  90. package/presets/cursor/agents/implementer.md +161 -0
  91. package/presets/cursor/agents/orchestrator.md +377 -0
  92. package/presets/cursor/agents/repo-explorer.md +100 -0
  93. package/presets/cursor/agents/reviewer.md +237 -0
  94. package/presets/cursor/agents/security-reviewer.md +113 -0
  95. package/presets/cursor/agents/task-coach.md +145 -0
  96. package/presets/cursor/agents/tester.md +241 -0
  97. package/presets/cursor/commands/cc/api-contract.md +70 -0
  98. package/presets/cursor/commands/cc/ask.md +55 -0
  99. package/presets/cursor/commands/cc/clarify.md +32 -0
  100. package/presets/cursor/commands/cc/council.md +87 -0
  101. package/presets/cursor/commands/cc/db-migration.md +71 -0
  102. package/presets/cursor/commands/cc/explore.md +36 -0
  103. package/presets/cursor/commands/cc/feature.md +137 -0
  104. package/presets/cursor/commands/cc/fix.md +148 -0
  105. package/presets/cursor/commands/cc/handoff.md +41 -0
  106. package/presets/cursor/commands/cc/iterative.md +133 -0
  107. package/presets/cursor/commands/cc/openspec.md +159 -0
  108. package/presets/cursor/commands/cc/pagespeed.md +115 -0
  109. package/presets/cursor/commands/cc/prototype.md +38 -0
  110. package/presets/cursor/commands/cc/refactor.md +160 -0
  111. package/presets/cursor/commands/cc/review.md +149 -0
  112. package/presets/cursor/commands/cc/scorecard.md +77 -0
  113. package/presets/cursor/commands/cc/tdd-cycle.md +250 -0
  114. package/presets/cursor/commands/cc/test-plan.md +150 -0
  115. package/presets/cursor/commands/cc/triage.md +34 -0
  116. package/presets/cursor/gates/pre-commit/GATE.md +136 -0
  117. package/presets/cursor/rules/behavioral-discipline.mdc +14 -0
  118. package/presets/cursor/rules/context-budget.mdc +12 -0
  119. package/presets/cursor/rules/orchestration.mdc +12 -0
  120. package/presets/cursor/rules/yagni-stdlib.mdc +11 -0
  121. package/presets/cursor/skills/android/SKILL.md +122 -0
  122. package/presets/cursor/skills/api-versioning/SKILL.md +394 -0
  123. package/presets/cursor/skills/astro/SKILL.md +322 -0
  124. package/presets/cursor/skills/auth-token-inspector/SKILL.md +33 -0
  125. package/presets/cursor/skills/code-review/SKILL.md +208 -0
  126. package/presets/cursor/skills/conductor-setup/SKILL.md +127 -0
  127. package/presets/cursor/skills/django-orm/SKILL.md +463 -0
  128. package/presets/cursor/skills/django-testing/SKILL.md +417 -0
  129. package/presets/cursor/skills/django-uv/SKILL.md +409 -0
  130. package/presets/cursor/skills/drizzle-schema-architect/SKILL.md +54 -0
  131. package/presets/cursor/skills/evaluation/SKILL.md +8 -0
  132. package/presets/cursor/skills/fastapi-pydantic-strict/SKILL.md +46 -0
  133. package/presets/cursor/skills/find-skills/SKILL.md +144 -0
  134. package/presets/cursor/skills/jpa-nplusone-detector/SKILL.md +49 -0
  135. package/presets/cursor/skills/jpa-postgres/SKILL.md +626 -0
  136. package/presets/cursor/skills/laravel-specialist/SKILL.md +267 -0
  137. package/presets/cursor/skills/laravel-specialist/references/eloquent.md +351 -0
  138. package/presets/cursor/skills/laravel-specialist/references/livewire.md +512 -0
  139. package/presets/cursor/skills/laravel-specialist/references/queues.md +423 -0
  140. package/presets/cursor/skills/laravel-specialist/references/routing.md +362 -0
  141. package/presets/cursor/skills/laravel-specialist/references/testing.md +522 -0
  142. package/presets/cursor/skills/livewire-alpine-bridge/SKILL.md +39 -0
  143. package/presets/cursor/skills/multi-agent-orchestration/README.md +144 -0
  144. package/presets/cursor/skills/multi-agent-orchestration/SKILL.md +579 -0
  145. package/presets/cursor/skills/multi-agent-orchestration/examples/framework_implementations.py +362 -0
  146. package/presets/cursor/skills/multi-agent-orchestration/examples/orchestration_patterns.py +411 -0
  147. package/presets/cursor/skills/multi-agent-orchestration/scripts/agent_communication.py +334 -0
  148. package/presets/cursor/skills/multi-agent-orchestration/scripts/benchmarking.py +341 -0
  149. package/presets/cursor/skills/multi-agent-orchestration/scripts/workflow_management.py +334 -0
  150. package/presets/cursor/skills/nextjs-typescript/SKILL.md +394 -0
  151. package/presets/cursor/skills/openspec/SKILL.md +52 -0
  152. package/presets/cursor/skills/pagespeed-insights/SKILL.md +445 -0
  153. package/presets/cursor/skills/pagespeed-insights/reference.md +50 -0
  154. package/presets/cursor/skills/pagespeed-perf/SKILL.md +281 -0
  155. package/presets/cursor/skills/php-pro/SKILL.md +210 -0
  156. package/presets/cursor/skills/php-pro/references/async-patterns.md +412 -0
  157. package/presets/cursor/skills/php-pro/references/laravel-patterns.md +377 -0
  158. package/presets/cursor/skills/php-pro/references/modern-php-features.md +323 -0
  159. package/presets/cursor/skills/php-pro/references/symfony-patterns.md +466 -0
  160. package/presets/cursor/skills/php-pro/references/testing-quality.md +466 -0
  161. package/presets/cursor/skills/python/SKILL.md +613 -0
  162. package/presets/cursor/skills/python-django-stack/SKILL.md +500 -0
  163. package/presets/cursor/skills/python-fastapi-stack/SKILL.md +464 -0
  164. package/presets/cursor/skills/security/SKILL.md +384 -0
  165. package/presets/cursor/skills/seo-analytics-injector/SKILL.md +44 -0
  166. package/presets/cursor/skills/spring-auth-auditor/SKILL.md +33 -0
  167. package/presets/cursor/skills/spring-boot-feature/SKILL.md +566 -0
  168. package/presets/cursor/skills/spring-boot-kotlin/SKILL.md +408 -0
  169. package/presets/cursor/skills/spring-boot-testing-strategy/SKILL.md +479 -0
  170. package/presets/cursor/skills/sqlalchemy/SKILL.md +473 -0
  171. package/presets/cursor/skills/tailwind-responsive-auditor/SKILL.md +32 -0
  172. package/presets/cursor/skills/tdd-mutation-tester/SKILL.md +28 -0
  173. package/presets/cursor/skills/testing-tdd/SKILL.md +592 -0
  174. package/presets/cursor/skills/workflow-orchestration-patterns/SKILL.md +98 -0
  175. package/presets/cursor/skills/workflow-orchestration-patterns/references/details.md +223 -0
  176. package/presets/opencode/agents/architect.md +22 -2
  177. package/presets/opencode/agents/complexity-auditor.md +16 -0
  178. package/presets/opencode/agents/contract-builder.md +109 -0
  179. package/presets/opencode/agents/devil.md +158 -0
  180. package/presets/opencode/agents/docs.md +19 -2
  181. package/presets/opencode/agents/goal-planner.md +112 -0
  182. package/presets/opencode/agents/implementer.md +39 -2
  183. package/presets/opencode/agents/orchestrator.md +124 -19
  184. package/presets/opencode/agents/planner.md +61 -0
  185. package/presets/opencode/agents/repo-explorer.md +15 -0
  186. package/presets/opencode/agents/reviewer.md +53 -2
  187. package/presets/opencode/agents/security-reviewer.md +159 -0
  188. package/presets/opencode/agents/task-coach.md +69 -2
  189. package/presets/opencode/agents/tester.md +18 -2
  190. package/presets/opencode/commands/cc-api-contract.md +12 -0
  191. package/presets/opencode/commands/cc-ask.md +55 -0
  192. package/presets/opencode/commands/cc-clarify.md +31 -0
  193. package/presets/opencode/commands/cc-council.md +87 -0
  194. package/presets/opencode/commands/cc-db-migration.md +22 -9
  195. package/presets/opencode/commands/cc-explore.md +35 -0
  196. package/presets/opencode/commands/cc-feature.md +41 -19
  197. package/presets/opencode/commands/cc-fix.md +50 -23
  198. package/presets/opencode/commands/cc-handoff.md +40 -0
  199. package/presets/opencode/commands/cc-iterative.md +127 -0
  200. package/presets/opencode/commands/cc-openspec.md +74 -0
  201. package/presets/opencode/commands/cc-pagespeed.md +12 -0
  202. package/presets/opencode/commands/cc-prototype.md +37 -0
  203. package/presets/opencode/commands/cc-refactor.md +12 -0
  204. package/presets/opencode/commands/cc-review.md +12 -0
  205. package/presets/opencode/commands/cc-scorecard.md +28 -0
  206. package/presets/opencode/commands/cc-tdd-cycle.md +24 -0
  207. package/presets/opencode/commands/cc-test-plan.md +12 -0
  208. package/presets/opencode/commands/cc-triage.md +33 -0
  209. package/presets/opencode/gates/pre-commit/GATE.md +136 -0
  210. package/presets/opencode/prompts/v0.1.0/DEPRECATED.md +11 -0
  211. package/presets/opencode/prompts/v0.2.0/DEPRECATED.md +11 -0
  212. package/presets/opencode/prompts/v0.3.0/DEPRECATED.md +11 -0
  213. package/presets/opencode/prompts/v0.4.0/DEPRECATED.md +11 -0
  214. package/presets/opencode/prompts/v0.5.0/architect.md +222 -0
  215. package/presets/opencode/prompts/v0.5.0/complexity-auditor.md +91 -0
  216. package/presets/opencode/prompts/v0.5.0/contract-builder.md +84 -0
  217. package/presets/opencode/prompts/v0.5.0/docs.md +190 -0
  218. package/presets/opencode/prompts/v0.5.0/goal-planner.md +80 -0
  219. package/presets/opencode/prompts/v0.5.0/implementer.md +171 -0
  220. package/presets/opencode/prompts/v0.5.0/orchestrator.md +388 -0
  221. package/presets/opencode/prompts/v0.5.0/repo-explorer.md +111 -0
  222. package/presets/opencode/prompts/v0.5.0/reviewer.md +248 -0
  223. package/presets/opencode/prompts/v0.5.0/security-reviewer.md +123 -0
  224. package/presets/opencode/prompts/v0.5.0/task-coach.md +156 -0
  225. package/presets/opencode/prompts/v0.5.0/tester.md +252 -0
  226. package/presets/opencode/prompts/v0.6.0/implementer.md +35 -0
  227. package/presets/opencode/prompts/v0.6.0/planner.md +36 -0
  228. package/presets/opencode/prompts/v0.6.0/reviewer.md +40 -0
  229. package/presets/opencode/prompts/v1.0.0/README.md +47 -0
  230. package/presets/opencode/prompts/v1.0.0/architect.md +259 -0
  231. package/presets/opencode/prompts/v1.0.0/complexity-auditor.md +116 -0
  232. package/presets/opencode/prompts/v1.0.0/contract-builder.md +120 -0
  233. package/presets/opencode/prompts/v1.0.0/devil.md +169 -0
  234. package/presets/opencode/prompts/v1.0.0/docs.md +229 -0
  235. package/presets/opencode/prompts/v1.0.0/goal-planner.md +123 -0
  236. package/presets/opencode/prompts/v1.0.0/implementer.md +228 -0
  237. package/presets/opencode/prompts/v1.0.0/orchestrator.md +474 -0
  238. package/presets/opencode/prompts/v1.0.0/planner.md +72 -0
  239. package/presets/opencode/prompts/v1.0.0/repo-explorer.md +147 -0
  240. package/presets/opencode/prompts/v1.0.0/reviewer.md +295 -0
  241. package/presets/opencode/prompts/v1.0.0/security-reviewer.md +170 -0
  242. package/presets/opencode/prompts/v1.0.0/task-coach.md +235 -0
  243. package/presets/opencode/prompts/v1.0.0/tester.md +298 -0
  244. package/presets/opencode/skills/evaluation/SKILL.md +6 -0
  245. package/presets/opencode/skills/openspec/SKILL.md +50 -0
  246. package/presets/seo-hotel/settings.json +0 -17
  247. package/presets/templates/BACKLOG.md +33 -0
  248. package/presets/templates/execution-profile.yml +6 -0
  249. package/presets/templates/model-comparison.md +11 -0
  250. package/presets/templates/regression-checklist.yml +10 -0
  251. package/src/presets/manifests/agy.yml +2 -2
  252. package/src/presets/manifests/claude.yml +2 -2
  253. package/src/presets/manifests/codex.yml +2 -2
  254. package/src/presets/manifests/cursor.yml +19 -3
  255. package/src/presets/manifests/gemini.yml +2 -2
  256. package/src/presets/manifests/opencode.yml +2 -2
  257. package/src/presets/models/agy.yml +97 -49
  258. package/src/presets/models/claude.yml +83 -39
  259. package/src/presets/models/codex.yml +83 -40
  260. package/src/presets/models/cursor.yml +83 -39
  261. package/src/presets/models/gemini.yml +83 -39
  262. package/src/presets/models/opencode.yml +78 -34
@@ -0,0 +1,115 @@
1
+ # PageSpeed Performance Audit
2
+
3
+ Audit web performance using the PageSpeed Insights API. Applies the 80/20
4
+ principle: identify the 20% of changes that produce 80% of the performance gain.
5
+ Produces a prioritized report in the current working directory.
6
+
7
+ ## Step 0 — CCEP Bootstrap
8
+
9
+ Command: `pagespeed` (fixed for this workflow — do not infer from user text)
10
+
11
+ 1. Run: `npx cc-codeconductor ccep parse --command pagespeed "$ARGUMENTS" --output json`
12
+ 2. Run: `npx cc-codeconductor ccep resolve --command pagespeed "$ARGUMENTS" --output json`
13
+ 3. Run: `npx cc-codeconductor ccep profile pagespeed --output json`
14
+ 4. After planner/intake JSON is available, run: `npx cc-codeconductor ccep evaluate --command pagespeed --input <planner.json> --output json`. If `stop` is true, show questions or risks and wait for human input.
15
+ 5. Delegate to subagents using compiled CCEP prompts — never forward raw `$ARGUMENTS` to planners.
16
+
17
+ ---
18
+
19
+ ## Usage
20
+
21
+ ```
22
+ /cc-pagespeed --url <url> [--strategy mobile|desktop|both]
23
+ ```
24
+
25
+ ## Parameters
26
+
27
+ | Parameter | Required | Description |
28
+ | ------------- | -------- | -------------------------------------------------------------- |
29
+ | `--url` | Yes | Full URL to audit (must include scheme: https://...) |
30
+ | `--strategy` | No | Analysis strategy: `mobile`, `desktop`, or `both` (default: `both`) |
31
+
32
+ ## Requirements
33
+
34
+ ### `PAGESPEED_API_KEY` — Optional but strongly recommended
35
+
36
+ | Mode | Lab data | CrUX field data | Rate limits |
37
+ | ------------ | -------- | --------------- | ---------------- |
38
+ | **With key** | ✅ | ✅ (real users) | 25,000 req/day |
39
+ | **Without** | ✅ | ❌ | ~2 req/s shared |
40
+
41
+ Without the key, Core Web Vitals field data (real user experience via CrUX) is
42
+ unavailable. Lab data from Lighthouse still runs.
43
+
44
+ Set the key before invoking the command:
45
+
46
+ ```powershell
47
+ # Windows PowerShell
48
+ $env:PAGESPEED_API_KEY = "your-api-key"
49
+
50
+ # macOS / Linux
51
+ export PAGESPEED_API_KEY="your-api-key"
52
+ ```
53
+
54
+ Get a free key (Google account required):
55
+ <https://developers.google.com/speed/docs/insights/v5/get-started>
56
+
57
+ ## Workflow
58
+
59
+ When `/cc-pagespeed` is invoked, load the `pagespeed-perf` skill and execute
60
+ the following steps in order:
61
+
62
+ 1. **Pre-flight** — Read `$env:PAGESPEED_API_KEY` from the environment. Compute
63
+ the output filename: `{YYYY-MM-DD}_pagespeed-{hostname}-claude.md`.
64
+
65
+ 2. **Collect** — Call the PageSpeed Insights API for the requested strategy
66
+ (`mobile`, `desktop`, or `both`). Prefer the Bun scripts in
67
+ `~/.claude/skills/pagespeed-perf/scripts/run.ts` if Bun is available.
68
+ Otherwise, use `WebFetch` to call the PSI endpoint directly.
69
+
70
+ 3. **Analyze** — Extract Core Web Vitals (LCP, INP, CLS, FCP, TTFB, TBT),
71
+ identify the LCP element, enumerate third-party scripts by blocking time,
72
+ and inspect resource hints in the HTML `<head>`.
73
+
74
+ 4. **Prioritize** — Score each identified optimization using the 80/20 matrix:
75
+ `Impact × Ease` (each 1–5). Order findings by descending score. Highlight
76
+ the top actions with Score ≥ 20 as the critical 20%.
77
+
78
+ 5. **Report** — Write the structured markdown report to
79
+ `{YYYY-MM-DD}_pagespeed-{hostname}-claude.md` in the current directory.
80
+
81
+ ## Output File
82
+
83
+ The report is saved as `{YYYY-MM-DD}_pagespeed-{hostname}-claude.md`.
84
+
85
+ - Hostname characters outside `[a-zA-Z0-9]` are replaced with `-`.
86
+ - Example: `https://www.example.com` → `2026-06-07_pagespeed-www-example-com-claude.md`
87
+
88
+ ## Skills Loaded
89
+
90
+ - `pagespeed-perf` — Web Performance Engineering: PSI API, Core Web Vitals
91
+ thresholds, 80/20 optimization matrix, resource-hint analysis, third-party
92
+ script auditing, framework-specific implementation templates.
93
+
94
+ ## Examples
95
+
96
+ ```bash
97
+ # Full audit — mobile + desktop
98
+ /cc-pagespeed --url https://www.example.com
99
+
100
+ # Mobile only
101
+ /cc-pagespeed --url https://www.example.com --strategy mobile
102
+
103
+ # Desktop only
104
+ /cc-pagespeed --url https://www.example.com --strategy desktop
105
+ ```
106
+
107
+ ## Hard Rules
108
+
109
+ - **GET only.** Never send POST, PUT, or DELETE to the target URL.
110
+ - **No auth.** Never include cookies, tokens, or auth headers.
111
+ - **No external crawling.** Audit only the provided URL.
112
+ - **Quantify every finding.** Never write "it would improve LCP". Always cite
113
+ the observed value and estimated gain (e.g., "reduces LCP from 4.2 s to ~3.0 s").
114
+ - **No generic recommendations.** Every finding must be backed by data from
115
+ the audit of this specific URL.
@@ -0,0 +1,38 @@
1
+ ---
2
+ description: >-
3
+ [cc: alias] Disposable spike in an isolated worktree. Not a merge candidate.
4
+ ---
5
+
6
+ # Prototype Workflow
7
+
8
+ Prototype request: $ARGUMENTS
9
+
10
+ ## Step 0 — CCEP Bootstrap
11
+
12
+ Command: `prototype` (fixed for this workflow — do not infer from user text)
13
+
14
+ 1. Run: `npx cc-codeconductor ccep parse --command prototype "$ARGUMENTS" --output json`
15
+ 2. Run: `npx cc-codeconductor ccep resolve --command prototype "$ARGUMENTS" --output json`
16
+ 3. Run: `npx cc-codeconductor ccep profile prototype --output json`
17
+ 4. After planner/intake JSON is available, run: `npx cc-codeconductor ccep evaluate --command prototype --input <planner.json> --output json`. If `stop` is true, show questions or risks and wait for human input.
18
+ 5. Delegate to subagents using compiled CCEP prompts — never forward raw `$ARGUMENTS` to planners.
19
+
20
+ ---
21
+
22
+ ## Step 1 — Bounds (architect)
23
+
24
+ Invoke `architect`. Define what the spike may touch, time-box, and what must not leak into main. Do not treat this as a production Technical Plan.
25
+
26
+ **STOP here. Wait for approval of the spike bounds.**
27
+
28
+ ---
29
+
30
+ ## Step 2 — Spike (implementer)
31
+
32
+ Invoke `implementer` in a Git worktree that is not a merge candidate. Label the Implementation Summary as disposable. Do not open a PR against protected branches.
33
+
34
+ ---
35
+
36
+ ## Completion
37
+
38
+ Report bounds, worktree path, and what was learned. Recommend `/cc:feature` or `/cc:fix` if the spike should become real work.
@@ -0,0 +1,160 @@
1
+ ---
2
+ description: >-
3
+ [cc: alias] Run the refactor workflow — mandatory architectural justification,
4
+ test verification, risk-based implementation, and scope enforcement.
5
+ ---
6
+
7
+ # Refactor Workflow
8
+
9
+ Refactor description: $ARGUMENTS
10
+
11
+ Describe what you want to refactor and why. Include:
12
+
13
+ - The current structure or pattern being changed
14
+ - The target structure or pattern
15
+ - The motivation (performance, readability, architectural alignment, etc.)
16
+ - Known risk areas or dependencies
17
+
18
+ ---
19
+
20
+ ## Prerequisite — Test coverage check
21
+
22
+ Before any role is adopted, verify that the code being refactored has adequate
23
+ test coverage.
24
+
25
+ A refactor without tests is not a refactor — it is a rewrite with unknown
26
+ behavioral consequences.
27
+
28
+ If coverage is insufficient:
29
+
30
+ 1. **STOP**. Report the coverage gap.
31
+ 2. Suggest running `/test-plan` first to establish coverage.
32
+ 3. Do not proceed with the refactor until coverage is confirmed.
33
+
34
+ ---
35
+
36
+ ## Step 0 — CCEP Bootstrap
37
+
38
+ Command: `refactor` (fixed for this workflow — do not infer from user text)
39
+
40
+ 1. Run: `npx cc-codeconductor ccep parse --command refactor "$ARGUMENTS" --output json`
41
+ 2. Run: `npx cc-codeconductor ccep resolve --command refactor "$ARGUMENTS" --output json`
42
+ 3. Run: `npx cc-codeconductor ccep profile refactor --output json`
43
+ 4. After planner/intake JSON is available, run: `npx cc-codeconductor ccep evaluate --command refactor --input <planner.json> --output json`. If `stop` is true, show questions or risks and wait for human input.
44
+ 5. Delegate to subagents using compiled CCEP prompts — never forward raw `$ARGUMENTS` to planners.
45
+
46
+ ---
47
+
48
+ ## Step 1 — Architectural justification (Architect role)
49
+
50
+ Invoke the `architect` subagent via the Task tool. Always invoke this step
51
+ first, regardless of risk level. A refactor without a written justification is
52
+ scope creep in disguise.
53
+
54
+ Produce a Refactor Plan that includes:
55
+
56
+ - Statement of the problem with the current structure
57
+ - Proposed target structure and rationale
58
+ - Affected files and module boundaries
59
+ - Risk level: `low`, `medium`, or `high`
60
+ - Behavioral invariants that must not change
61
+ - Open questions requiring human input
62
+
63
+ **Scope creep warning:** If during planning you identify unrelated improvements,
64
+ list them separately as "Out of scope." They are not part of this refactor.
65
+
66
+ **STOP here. Show the Refactor Plan and wait for explicit human approval. Do not
67
+ proceed without written approval of the plan.**
68
+
69
+ ---
70
+
71
+ ## Step 2 — Route by risk
72
+
73
+ Read the risk field from the Refactor Plan and follow the corresponding route.
74
+
75
+ ### Low-risk route
76
+
77
+ Applies when: the refactor is purely internal, no public interfaces change, full
78
+ test coverage exists for the affected code, and behavioral impact is isolated to
79
+ the refactored module.
80
+
81
+ Route: Architect (done) → Implementer
82
+
83
+ Proceed to Step 3a.
84
+
85
+ ### Medium or high-risk route
86
+
87
+ Applies when: module boundaries change, shared interfaces are affected,
88
+ performance characteristics may change, or the refactor touches more than two
89
+ files with behavioral impact.
90
+
91
+ Route: Architect (done) → Implementer → Reviewer
92
+
93
+ Proceed to Step 3b.
94
+
95
+ ---
96
+
97
+ ## Step 3a — Implementation, low-risk (Implementer role)
98
+
99
+ Invoke the `implementer` subagent via the Task tool. Use the approved
100
+ Refactor Plan.
101
+ Implementer creates a Git Worktree before touching any file; all edits happen inside it.
102
+
103
+ 1. Read the Refactor Plan before opening any file.
104
+ 2. Apply only the changes specified in the plan.
105
+ 3. Run the full test suite before and after — both runs must pass.
106
+ 4. Produce an Implementation Summary: what changed, what did not change, test
107
+ results before and after.
108
+
109
+ Any deviation from the plan — including "obvious improvements" encountered
110
+ during implementation — must be flagged and held for a separate task.
111
+
112
+ ---
113
+
114
+ ## Step 3b — Implementation, medium/high-risk (Implementer role)
115
+
116
+ Same rules as Step 3a. Additionally:
117
+
118
+ - Document any unexpected complexity discovered during implementation.
119
+ - Pause and report if complexity changes the risk assessment.
120
+ - If new risks are found, **STOP** and report before continuing.
121
+
122
+ ---
123
+
124
+ ## Step 4 — Test suite verification
125
+
126
+ For all risk levels, confirm:
127
+
128
+ - All tests that existed before the refactor still pass.
129
+ - No test was deleted or commented out to make the suite pass.
130
+ - Behavior documented in the Task Card remains unchanged.
131
+
132
+ If any test fails that was passing before, the refactor has introduced a
133
+ regression. **STOP and report.**
134
+
135
+ ---
136
+
137
+ ## Step 5 — Code review (Reviewer role) — medium/high-risk only
138
+
139
+ Invoke the `reviewer` subagent via the Task tool. Use the diff and Refactor
140
+ Plan.
141
+
142
+ Verify:
143
+
144
+ - The implementation matches the approved plan.
145
+ - No behavior was changed beyond the plan's scope.
146
+ - No unrelated files were modified.
147
+
148
+ Review Report must include CRITICAL / WARNING / SUGGESTION findings. CRITICAL
149
+ findings block completion.
150
+
151
+ ---
152
+
153
+ ## Completion
154
+
155
+ Report: Refactor Plan (approved), Implementation Summary, test results before
156
+ and after, Review Report (if applicable).
157
+
158
+ The refactor is complete only when: all pre-existing tests still pass, the
159
+ implementation matches the approved plan exactly, and no CRITICAL review
160
+ findings remain.
@@ -0,0 +1,149 @@
1
+ ---
2
+ description: >-
3
+ [cc: alias] Run a structured code review — produces a Review Report with
4
+ CRITICAL, WARNING, and SUGGESTION findings; CRITICAL findings block merge.
5
+ ---
6
+
7
+ # Code Review Workflow
8
+
9
+ Review target: $ARGUMENTS
10
+
11
+ Specify what to review. Accepted formats:
12
+
13
+ - A branch name: `feature/my-branch`
14
+ - A file or set of files: `src/api/UserController.kt`
15
+ - A pull request reference: `PR #42`
16
+ - Empty — defaults to the current working diff (`git diff`)
17
+
18
+ ---
19
+
20
+ ## Step 0 — CCEP Bootstrap
21
+
22
+ Command: `review` (fixed for this workflow — do not infer from user text)
23
+
24
+ 1. Run: `npx cc-codeconductor ccep parse --command review "$ARGUMENTS" --output json`
25
+ 2. Run: `npx cc-codeconductor ccep resolve --command review "$ARGUMENTS" --output json`
26
+ 3. Run: `npx cc-codeconductor ccep profile review --output json`
27
+ 4. After planner/intake JSON is available, run: `npx cc-codeconductor ccep evaluate --command review --input <planner.json> --output json`. If `stop` is true, show questions or risks and wait for human input.
28
+ 5. Delegate to subagents using compiled CCEP prompts — never forward raw `$ARGUMENTS` to planners.
29
+
30
+ ---
31
+
32
+ ## Step 1 — Diff collection
33
+
34
+ Before adopting the Reviewer role, collect the diff for the specified target.
35
+
36
+ If $ARGUMENTS is empty or not provided:
37
+
38
+ - Use `git diff HEAD` as the review target.
39
+
40
+ If $ARGUMENTS is a branch name:
41
+
42
+ - Use `git diff main...$ARGUMENTS` (or `develop` if main is not the base).
43
+
44
+ If $ARGUMENTS is a PR reference:
45
+
46
+ - Retrieve the PR diff and the PR description for context.
47
+
48
+ If $ARGUMENTS is a file path:
49
+
50
+ - Use `git diff HEAD -- $ARGUMENTS`.
51
+
52
+ Show the diff summary (files changed, lines added/removed) before proceeding.
53
+
54
+ ---
55
+
56
+ ## Step 2 — Code review (Reviewer role)
57
+
58
+ Invoke the `reviewer` subagent via the Task tool.
59
+
60
+ Evaluate the diff against the following checklist:
61
+
62
+ **Correctness**
63
+
64
+ - Does the implementation match the stated intent?
65
+ - Are there logic errors, off-by-one errors, or unhandled edge cases?
66
+
67
+ **Architecture alignment**
68
+
69
+ - Does the change follow existing module boundaries?
70
+ - Does it introduce unplanned coupling or layering violations?
71
+
72
+ **Security**
73
+
74
+ - Are inputs validated before use?
75
+ - Is there any credential, token, or secret in the diff?
76
+ - Are there SQL injection, XSS, or injection risks?
77
+
78
+ **Performance**
79
+
80
+ - Does the change introduce N+1 queries, blocking I/O, or O(n²) loops?
81
+
82
+ **Test coverage**
83
+
84
+ - Do tests exist for the new or changed behavior?
85
+ - Are assertions meaningful (not just checking that no exception is thrown)?
86
+
87
+ **Documentation**
88
+
89
+ - Are public interfaces documented?
90
+ - Is CHANGELOG updated if behavior changed?
91
+
92
+ ---
93
+
94
+ ## Step 3 — Review Report
95
+
96
+ Produce a structured Review Report with findings in three categories:
97
+
98
+ ```markdown
99
+ ## Review Report
100
+
101
+ ### CRITICAL
102
+ [Findings that must be fixed before merge — file:line, description, suggested resolution]
103
+
104
+ ### WARNING
105
+ [Findings that should be resolved before merge — same format as CRITICAL]
106
+
107
+ ### SUGGESTION
108
+ [Optional improvements — style, readability, future-proofing. These do not block merge.]
109
+
110
+ ### Summary
111
+ - Files reviewed: N
112
+ - Total findings: N (X critical, Y warnings, Z suggestions)
113
+ - Merge recommendation: APPROVED | BLOCKED
114
+ ```
115
+
116
+ ---
117
+
118
+ ## Step 4 — Merge decision
119
+
120
+ If any CRITICAL findings exist:
121
+
122
+ - The Review Report status is **BLOCKED**.
123
+ - Report all CRITICAL findings.
124
+ - Do not proceed until each CRITICAL finding is resolved.
125
+ - After resolution, run `/review` again on the same target.
126
+
127
+ If no CRITICAL findings exist:
128
+
129
+ - The Review Report status is **APPROVED**.
130
+ - Report any WARNINGs and SUGGESTIONs for human awareness.
131
+ - The human makes the final merge decision.
132
+
133
+ ---
134
+
135
+ ## Completion
136
+
137
+ Deliver the complete Review Report. Never summarize or omit findings.
138
+
139
+ ---
140
+
141
+ ## Step 5 — Scorecard and outcome
142
+
143
+ ```bash
144
+ npx cc-codeconductor scorecard create --from-diff --agent reviewer
145
+ npx cc-codeconductor scorecard record --verdict PASS|REVISE|REJECT --score <weighted>
146
+ npx cc-codeconductor scorecard regression
147
+ ```
148
+
149
+ Map merge recommendation to scorecard verdict. Record outcome for trend tracking.
@@ -0,0 +1,77 @@
1
+ ---
2
+ description: >-
3
+ [cc: alias] Evaluate deliverable quality — scorecard, outcome tracking, regression
4
+ checklist, and aggregate stats.
5
+ ---
6
+
7
+ # Scorecard Evaluation Workflow
8
+
9
+ Scope: $ARGUMENTS
10
+
11
+ ---
12
+
13
+ ## Step 0 — CCEP Bootstrap
14
+
15
+ Command: `scorecard` (fixed for this workflow — do not infer from user text)
16
+
17
+ 1. Run: `npx cc-codeconductor ccep parse --command scorecard "$ARGUMENTS" --output json`
18
+ 2. Run: `npx cc-codeconductor ccep resolve --command scorecard "$ARGUMENTS" --output json`
19
+ 3. Run: `npx cc-codeconductor ccep profile scorecard --output json`
20
+ 4. After planner/intake JSON is available, run: `npx cc-codeconductor ccep evaluate --command scorecard --input <planner.json> --output json`. If `stop` is true, show questions or risks and wait for human input.
21
+ 5. Delegate to subagents using compiled CCEP prompts — never forward raw `$ARGUMENTS` to planners.
22
+
23
+ ---
24
+
25
+ ## Step 1 — Identify task
26
+
27
+ Use `$ARGUMENTS` as task id (e.g. `BC-001`) or read active item from `npx cc-codeconductor openspec status`.
28
+
29
+ ---
30
+
31
+ ## Step 2 — Create scorecard with auto-signals
32
+
33
+ ```bash
34
+ npx cc-codeconductor scorecard create --task <id> --agent reviewer --from-diff
35
+ ```
36
+
37
+ Review auto-suggested criteria (minimal diff, cc-gain). Complete remaining scores 0–3 per [`docs/agent-scorecard.md`](docs/agent-scorecard.md).
38
+
39
+ ---
40
+
41
+ ## Step 3 — Regression (optional)
42
+
43
+ ```bash
44
+ npx cc-codeconductor scorecard regression
45
+ ```
46
+
47
+ If required checks fail, **STOP** and report failures.
48
+
49
+ ---
50
+
51
+ ## Step 4 — Record outcome
52
+
53
+ ```bash
54
+ npx cc-codeconductor scorecard record --task <id> --agent reviewer --model <model> --verdict PASS --score 2.5
55
+ ```
56
+
57
+ Include `--cost` and `--tokens` when available from session metrics.
58
+
59
+ ---
60
+
61
+ ## Step 5 — Aggregate
62
+
63
+ ```bash
64
+ npx cc-codeconductor scorecard aggregate
65
+ ```
66
+
67
+ Report pass rate and average weighted score.
68
+
69
+ ---
70
+
71
+ ## Routing on verdict
72
+
73
+ - **PASS** — accept deliverable; update backlog if applicable
74
+ - **REVISE** — return to implementer/tester with findings
75
+ - **REJECT** — route to task-coach for re-scoping
76
+
77
+ Apply skill `evaluation`.