@codyswann/lisa 1.0.0 → 1.0.5

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 (280) hide show
  1. package/README.md +244 -36
  2. package/all/copy-overwrite/.claude/README.md +1 -3
  3. package/all/copy-overwrite/.claude/REFERENCE.md +519 -0
  4. package/all/copy-overwrite/.claude/agents/skill-evaluator.md +7 -7
  5. package/all/copy-overwrite/.claude/agents/test-coverage-agent.md +17 -0
  6. package/all/copy-overwrite/.claude/commands/git/commit.md +9 -5
  7. package/all/copy-overwrite/.claude/commands/git/submit-pr.md +1 -1
  8. package/all/copy-overwrite/.claude/commands/lisa/review-implementation.md +209 -0
  9. package/all/copy-overwrite/.claude/commands/project/add-test-coverage.md +58 -0
  10. package/all/copy-overwrite/.claude/commands/project/archive.md +1 -1
  11. package/all/copy-overwrite/.claude/commands/project/complete-task.md +53 -1
  12. package/all/copy-overwrite/.claude/commands/project/debrief.md +12 -23
  13. package/all/copy-overwrite/.claude/commands/project/execute.md +33 -77
  14. package/all/copy-overwrite/.claude/commands/project/fix-linter-error.md +87 -0
  15. package/all/copy-overwrite/.claude/commands/project/implement.md +24 -28
  16. package/all/copy-overwrite/.claude/commands/project/lower-code-complexity.md +30 -55
  17. package/all/copy-overwrite/.claude/commands/project/plan.md +87 -242
  18. package/all/copy-overwrite/.claude/commands/project/reduce-max-lines-per-function.md +76 -0
  19. package/all/copy-overwrite/.claude/commands/project/reduce-max-lines.md +75 -0
  20. package/all/copy-overwrite/.claude/commands/project/research.md +86 -188
  21. package/all/copy-overwrite/.claude/commands/project/review.md +19 -38
  22. package/all/copy-overwrite/.claude/commands/project/setup.md +1 -1
  23. package/all/copy-overwrite/.claude/commands/project/verify.md +62 -25
  24. package/all/copy-overwrite/.claude/commands/pull-request/review.md +25 -7
  25. package/all/copy-overwrite/.claude/commands/tasks/load.md +63 -0
  26. package/all/copy-overwrite/.claude/commands/tasks/sync.md +84 -0
  27. package/all/copy-overwrite/.claude/hooks/README.md +75 -0
  28. package/all/copy-overwrite/.claude/hooks/check-tired-boss.sh +61 -0
  29. package/all/copy-overwrite/.claude/hooks/debug-hook.sh +47 -0
  30. package/all/copy-overwrite/.claude/hooks/notify-ntfy.sh +2 -0
  31. package/all/copy-overwrite/.claude/hooks/sync-tasks.sh +95 -0
  32. package/all/copy-overwrite/.claude/{skills/coding-philosophy/SKILL.md → rules/coding-philosophy.md} +93 -70
  33. package/all/copy-overwrite/.claude/settings.json +35 -14
  34. package/all/copy-overwrite/.claude/skills/prompt-complexity-scorer/SKILL.md +41 -9
  35. package/all/copy-overwrite/.claude/skills/skill-creator/scripts/init_skill.py +2 -0
  36. package/all/copy-overwrite/.claude/skills/skill-creator/scripts/package_skill.py +2 -0
  37. package/all/copy-overwrite/.claude/skills/skill-creator/scripts/quick_validate.py +2 -0
  38. package/all/copy-overwrite/.safety-net.json +25 -0
  39. package/all/copy-overwrite/CLAUDE.md +8 -30
  40. package/all/copy-overwrite/HUMAN.md +517 -17
  41. package/all/create-only/.claude/rules/PROJECT_RULES.md +9 -0
  42. package/all/create-only/scripts/setup-deploy-key.sh +190 -0
  43. package/all/deletions.json +5 -0
  44. package/cdk/copy-overwrite/.github/workflows/ci.yml +142 -0
  45. package/cdk/copy-overwrite/.github/workflows/deploy.yml +59 -0
  46. package/cdk/copy-overwrite/eslint.cdk.ts +175 -0
  47. package/cdk/copy-overwrite/eslint.config.ts +51 -0
  48. package/cdk/copy-overwrite/eslint.slow.config.ts +80 -0
  49. package/cdk/copy-overwrite/knip.json +53 -0
  50. package/cdk/copy-overwrite/tsconfig.eslint.json +11 -0
  51. package/cdk/merge/package.json +17 -1
  52. package/dist/cli/index.d.ts +3 -2
  53. package/dist/cli/index.d.ts.map +1 -1
  54. package/dist/cli/index.js +83 -64
  55. package/dist/cli/index.js.map +1 -1
  56. package/dist/cli/prompts.d.ts +17 -3
  57. package/dist/cli/prompts.d.ts.map +1 -1
  58. package/dist/cli/prompts.js +52 -16
  59. package/dist/cli/prompts.js.map +1 -1
  60. package/dist/core/config.d.ts +13 -4
  61. package/dist/core/config.d.ts.map +1 -1
  62. package/dist/core/config.js +17 -9
  63. package/dist/core/config.js.map +1 -1
  64. package/dist/core/git-service.d.ts +40 -0
  65. package/dist/core/git-service.d.ts.map +1 -0
  66. package/dist/core/git-service.js +52 -0
  67. package/dist/core/git-service.js.map +1 -0
  68. package/dist/core/index.d.ts +3 -3
  69. package/dist/core/index.js +3 -3
  70. package/dist/core/lisa.d.ts +124 -7
  71. package/dist/core/lisa.d.ts.map +1 -1
  72. package/dist/core/lisa.js +423 -221
  73. package/dist/core/lisa.js.map +1 -1
  74. package/dist/core/manifest.d.ts +5 -1
  75. package/dist/core/manifest.d.ts.map +1 -1
  76. package/dist/core/manifest.js +22 -16
  77. package/dist/core/manifest.js.map +1 -1
  78. package/dist/detection/detector.interface.d.ts +1 -1
  79. package/dist/detection/detectors/cdk.d.ts +6 -1
  80. package/dist/detection/detectors/cdk.d.ts.map +1 -1
  81. package/dist/detection/detectors/cdk.js +16 -8
  82. package/dist/detection/detectors/cdk.js.map +1 -1
  83. package/dist/detection/detectors/expo.d.ts +6 -1
  84. package/dist/detection/detectors/expo.d.ts.map +1 -1
  85. package/dist/detection/detectors/expo.js +13 -8
  86. package/dist/detection/detectors/expo.js.map +1 -1
  87. package/dist/detection/detectors/nestjs.d.ts +7 -2
  88. package/dist/detection/detectors/nestjs.d.ts.map +1 -1
  89. package/dist/detection/detectors/nestjs.js +17 -9
  90. package/dist/detection/detectors/nestjs.js.map +1 -1
  91. package/dist/detection/detectors/npm-package.d.ts +6 -1
  92. package/dist/detection/detectors/npm-package.d.ts.map +1 -1
  93. package/dist/detection/detectors/npm-package.js +9 -4
  94. package/dist/detection/detectors/npm-package.js.map +1 -1
  95. package/dist/detection/detectors/typescript.d.ts +6 -1
  96. package/dist/detection/detectors/typescript.d.ts.map +1 -1
  97. package/dist/detection/detectors/typescript.js +12 -7
  98. package/dist/detection/detectors/typescript.js.map +1 -1
  99. package/dist/detection/index.d.ts +13 -3
  100. package/dist/detection/index.d.ts.map +1 -1
  101. package/dist/detection/index.js +17 -7
  102. package/dist/detection/index.js.map +1 -1
  103. package/dist/errors/index.d.ts +66 -2
  104. package/dist/errors/index.d.ts.map +1 -1
  105. package/dist/errors/index.js +89 -17
  106. package/dist/errors/index.js.map +1 -1
  107. package/dist/index.js +3 -3
  108. package/dist/index.js.map +1 -1
  109. package/dist/logging/console-logger.d.ts +21 -1
  110. package/dist/logging/console-logger.d.ts.map +1 -1
  111. package/dist/logging/console-logger.js +26 -6
  112. package/dist/logging/console-logger.js.map +1 -1
  113. package/dist/logging/index.d.ts +3 -3
  114. package/dist/logging/index.js +2 -2
  115. package/dist/logging/logger.interface.d.ts +1 -1
  116. package/dist/logging/silent-logger.d.ts +21 -1
  117. package/dist/logging/silent-logger.d.ts.map +1 -1
  118. package/dist/logging/silent-logger.js +20 -0
  119. package/dist/logging/silent-logger.js.map +1 -1
  120. package/dist/strategies/copy-contents.d.ts +47 -6
  121. package/dist/strategies/copy-contents.d.ts.map +1 -1
  122. package/dist/strategies/copy-contents.js +99 -49
  123. package/dist/strategies/copy-contents.js.map +1 -1
  124. package/dist/strategies/copy-overwrite.d.ts +10 -2
  125. package/dist/strategies/copy-overwrite.d.ts.map +1 -1
  126. package/dist/strategies/copy-overwrite.js +17 -9
  127. package/dist/strategies/copy-overwrite.js.map +1 -1
  128. package/dist/strategies/create-only.d.ts +10 -2
  129. package/dist/strategies/create-only.d.ts.map +1 -1
  130. package/dist/strategies/create-only.js +14 -6
  131. package/dist/strategies/create-only.js.map +1 -1
  132. package/dist/strategies/index.d.ts +17 -7
  133. package/dist/strategies/index.d.ts.map +1 -1
  134. package/dist/strategies/index.js +19 -9
  135. package/dist/strategies/index.js.map +1 -1
  136. package/dist/strategies/merge.d.ts +10 -2
  137. package/dist/strategies/merge.d.ts.map +1 -1
  138. package/dist/strategies/merge.js +21 -21
  139. package/dist/strategies/merge.js.map +1 -1
  140. package/dist/strategies/strategy.interface.d.ts +1 -1
  141. package/dist/strategies/strategy.interface.d.ts.map +1 -1
  142. package/dist/transaction/backup.d.ts +15 -1
  143. package/dist/transaction/backup.d.ts.map +1 -1
  144. package/dist/transaction/backup.js +47 -12
  145. package/dist/transaction/backup.js.map +1 -1
  146. package/dist/transaction/index.d.ts +3 -3
  147. package/dist/transaction/index.js +2 -2
  148. package/dist/transaction/transaction.d.ts +25 -2
  149. package/dist/transaction/transaction.d.ts.map +1 -1
  150. package/dist/transaction/transaction.js +25 -2
  151. package/dist/transaction/transaction.js.map +1 -1
  152. package/dist/utils/file-operations.d.ts +21 -0
  153. package/dist/utils/file-operations.d.ts.map +1 -1
  154. package/dist/utils/file-operations.js +48 -12
  155. package/dist/utils/file-operations.js.map +1 -1
  156. package/dist/utils/index.d.ts +3 -3
  157. package/dist/utils/index.js +3 -3
  158. package/dist/utils/json-utils.d.ts +12 -0
  159. package/dist/utils/json-utils.d.ts.map +1 -1
  160. package/dist/utils/json-utils.js +17 -5
  161. package/dist/utils/json-utils.js.map +1 -1
  162. package/dist/utils/path-utils.d.ts +11 -0
  163. package/dist/utils/path-utils.d.ts.map +1 -1
  164. package/dist/utils/path-utils.js +12 -1
  165. package/dist/utils/path-utils.js.map +1 -1
  166. package/eslint-plugin-code-organization/__tests__/enforce-statement-order.test.js +5 -0
  167. package/eslint-plugin-code-organization/index.js +5 -0
  168. package/eslint-plugin-code-organization/rules/enforce-statement-order.js +5 -0
  169. package/expo/copy-overwrite/.claude/skills/atomic-design-gluestack/scripts/validate_atomic_structure.py +2 -0
  170. package/expo/copy-overwrite/.claude/skills/container-view-pattern/scripts/create_component.py +2 -0
  171. package/expo/copy-overwrite/.claude/skills/container-view-pattern/scripts/validate_component.py +2 -0
  172. package/expo/copy-overwrite/.claude/skills/cross-platform-compatibility/scripts/validate_cross_platform.py +2 -0
  173. package/expo/copy-overwrite/.claude/skills/directory-structure/scripts/validate_structure.py +2 -0
  174. package/expo/copy-overwrite/.claude/skills/expo-router-best-practices/scripts/generate-route.py +2 -0
  175. package/expo/copy-overwrite/.claude/skills/gluestack-nativewind/scripts/validate_styling.py +2 -41
  176. package/{typescript → expo}/copy-overwrite/.github/workflows/build.yml +3 -0
  177. package/expo/copy-overwrite/.github/workflows/ci.yml +36 -0
  178. package/{typescript → expo}/copy-overwrite/.github/workflows/deploy.yml +22 -26
  179. package/{typescript → expo}/copy-overwrite/.github/workflows/lighthouse.yml +4 -1
  180. package/expo/copy-overwrite/eslint-plugin-component-structure/__tests__/plugin-index.test.js +5 -0
  181. package/expo/copy-overwrite/eslint-plugin-component-structure/__tests__/require-memo-in-view.test.js +5 -0
  182. package/expo/copy-overwrite/eslint-plugin-component-structure/__tests__/single-component-per-file.test.js +5 -0
  183. package/expo/copy-overwrite/eslint-plugin-component-structure/index.js +5 -0
  184. package/expo/copy-overwrite/eslint-plugin-component-structure/rules/enforce-component-structure.js +5 -0
  185. package/expo/copy-overwrite/eslint-plugin-component-structure/rules/no-return-in-view.js +6 -1
  186. package/expo/copy-overwrite/eslint-plugin-component-structure/rules/require-memo-in-view.js +5 -0
  187. package/expo/copy-overwrite/eslint-plugin-component-structure/rules/single-component-per-file.js +5 -0
  188. package/expo/copy-overwrite/eslint-plugin-ui-standards/README.md +0 -68
  189. package/expo/copy-overwrite/eslint-plugin-ui-standards/index.js +5 -3
  190. package/expo/copy-overwrite/eslint-plugin-ui-standards/rules/no-classname-outside-ui.js +5 -0
  191. package/expo/copy-overwrite/eslint-plugin-ui-standards/rules/no-direct-rn-imports.js +5 -0
  192. package/expo/copy-overwrite/eslint.config.ts +53 -0
  193. package/expo/copy-overwrite/eslint.expo.ts +330 -0
  194. package/expo/copy-overwrite/eslint.slow.config.ts +86 -0
  195. package/expo/copy-overwrite/knip.json +132 -0
  196. package/expo/copy-overwrite/lighthouserc.js +27 -0
  197. package/expo/copy-overwrite/tsconfig.eslint.json +25 -0
  198. package/expo/create-only/lighthouserc-config.json +6 -1
  199. package/expo/merge/package.json +16 -3
  200. package/nestjs/copy-overwrite/.claude/skills/nestjs-rules/SKILL.md +1 -1
  201. package/{typescript → nestjs}/copy-overwrite/.github/k6/README.md +2 -2
  202. package/{typescript → nestjs}/copy-overwrite/.github/k6/examples/customer-deploy-integration.yml +3 -0
  203. package/{typescript → nestjs}/copy-overwrite/.github/k6/examples/data-driven-test.js +5 -0
  204. package/{typescript → nestjs}/copy-overwrite/.github/k6/scenarios/load.js +6 -2
  205. package/{typescript → nestjs}/copy-overwrite/.github/k6/scenarios/smoke.js +5 -0
  206. package/{typescript → nestjs}/copy-overwrite/.github/k6/scenarios/soak.js +5 -0
  207. package/{typescript → nestjs}/copy-overwrite/.github/k6/scenarios/spike.js +5 -0
  208. package/{typescript → nestjs}/copy-overwrite/.github/k6/scenarios/stress.js +5 -0
  209. package/{typescript → nestjs}/copy-overwrite/.github/k6/scripts/api-test.js +5 -0
  210. package/{typescript → nestjs}/copy-overwrite/.github/k6/scripts/default-test.js +5 -0
  211. package/nestjs/copy-overwrite/.github/workflows/ci.yml +29 -0
  212. package/nestjs/copy-overwrite/.github/workflows/deploy.yml +291 -0
  213. package/{typescript → nestjs}/copy-overwrite/.github/workflows/load-test.yml +3 -0
  214. package/nestjs/copy-overwrite/eslint.config.ts +53 -0
  215. package/nestjs/copy-overwrite/eslint.nestjs.ts +178 -0
  216. package/nestjs/merge/package.json +11 -3
  217. package/package.json +34 -40
  218. package/typescript/copy-contents/.husky/pre-commit +1 -1
  219. package/typescript/copy-contents/.husky/pre-push +99 -118
  220. package/typescript/copy-overwrite/.claude/hooks/format-on-edit.sh +2 -0
  221. package/typescript/copy-overwrite/.claude/hooks/install_pkgs.sh +3 -11
  222. package/typescript/copy-overwrite/.claude/hooks/lint-on-edit.sh +2 -0
  223. package/typescript/copy-overwrite/.claude/hooks/sg-scan-on-edit.sh +68 -0
  224. package/typescript/copy-overwrite/.claude/settings.json +79 -0
  225. package/typescript/copy-overwrite/.claude/skills/jsdoc-best-practices/SKILL.md +44 -0
  226. package/typescript/copy-overwrite/.github/README.md +49 -1
  227. package/typescript/copy-overwrite/.github/dependabot.yml +3 -0
  228. package/typescript/copy-overwrite/.github/workflows/ci.yml +7 -29
  229. package/typescript/copy-overwrite/.github/workflows/claude.yml +3 -0
  230. package/typescript/copy-overwrite/.github/workflows/create-github-issue-on-failure.yml +6 -4
  231. package/typescript/copy-overwrite/.github/workflows/create-issue-on-failure.yml +176 -0
  232. package/typescript/copy-overwrite/.github/workflows/create-jira-issue-on-failure.yml +3 -1
  233. package/typescript/copy-overwrite/.github/workflows/create-sentry-issue-on-failure.yml +3 -1
  234. package/typescript/copy-overwrite/.github/workflows/lint-slow.yml +40 -0
  235. package/typescript/copy-overwrite/.github/workflows/quality.yml +151 -38
  236. package/typescript/copy-overwrite/.github/workflows/release.yml +3 -0
  237. package/typescript/copy-overwrite/.gitleaksignore +3 -0
  238. package/typescript/copy-overwrite/.lintstagedrc.json +6 -0
  239. package/typescript/copy-overwrite/.prettierignore +2 -1
  240. package/typescript/copy-overwrite/.yamllint +2 -0
  241. package/typescript/copy-overwrite/ast-grep/rule-tests/.gitkeep +3 -0
  242. package/typescript/copy-overwrite/ast-grep/rules/.gitkeep +3 -0
  243. package/typescript/copy-overwrite/ast-grep/utils/.gitkeep +3 -0
  244. package/typescript/copy-overwrite/{commitlint.config.js → commitlint.config.cjs} +5 -0
  245. package/typescript/copy-overwrite/eslint-plugin-code-organization/__tests__/enforce-statement-order.test.js +5 -0
  246. package/typescript/copy-overwrite/eslint-plugin-code-organization/index.js +5 -0
  247. package/typescript/copy-overwrite/eslint-plugin-code-organization/rules/enforce-statement-order.js +5 -0
  248. package/typescript/copy-overwrite/eslint.base.ts +430 -0
  249. package/typescript/copy-overwrite/eslint.config.ts +52 -0
  250. package/typescript/copy-overwrite/eslint.ignore.config.json +19 -2
  251. package/typescript/copy-overwrite/eslint.slow.config.ts +69 -0
  252. package/typescript/copy-overwrite/eslint.typescript.ts +142 -0
  253. package/typescript/copy-overwrite/knip.json +64 -0
  254. package/typescript/copy-overwrite/sgconfig.yml +11 -0
  255. package/typescript/copy-overwrite/tsconfig.eslint.json +9 -0
  256. package/typescript/create-only/eslint.config.local.ts +24 -0
  257. package/typescript/{copy-overwrite/eslint.thresholds.config.json → create-only/eslint.thresholds.json} +1 -1
  258. package/typescript/github-rulesets/base.json +2 -75
  259. package/typescript/merge/.claude/settings.json +160 -0
  260. package/typescript/merge/package.json +35 -34
  261. package/all/copy-overwrite/.claude/commands/rules/format-md.md +0 -72
  262. package/all/copy-overwrite/.claude/skills/coding-philosophy/references/function-structure.md +0 -416
  263. package/all/copy-overwrite/.claude/skills/coding-philosophy/references/immutable-patterns.md +0 -316
  264. package/expo/copy-overwrite/eslint-plugin-ui-standards/rules/no-inline-styles.js +0 -73
  265. package/expo/copy-overwrite/eslint.config.mjs +0 -560
  266. package/lisa.sh +0 -35
  267. package/typescript/copy-overwrite/eslint.config.mjs +0 -390
  268. /package/{all/create-only/PROJECT_RULES.md → cdk/copy-overwrite/.github/workflows/.keep} +0 -0
  269. /package/{typescript → nestjs}/copy-overwrite/.github/k6/BROWSER_TESTING_NOTE.md +0 -0
  270. /package/{typescript → nestjs}/copy-overwrite/.github/k6/INTEGRATION_GUIDE.md +0 -0
  271. /package/{typescript → nestjs}/copy-overwrite/.github/k6/SCENARIO_SELECTION_GUIDE.md +0 -0
  272. /package/{typescript → nestjs}/copy-overwrite/.github/k6/scenarios/load.json +0 -0
  273. /package/{typescript → nestjs}/copy-overwrite/.github/k6/scenarios/smoke.json +0 -0
  274. /package/{typescript → nestjs}/copy-overwrite/.github/k6/scenarios/soak.json +0 -0
  275. /package/{typescript → nestjs}/copy-overwrite/.github/k6/scenarios/spike.json +0 -0
  276. /package/{typescript → nestjs}/copy-overwrite/.github/k6/scenarios/stress.json +0 -0
  277. /package/{typescript → nestjs}/copy-overwrite/.github/k6/thresholds/normal.json +0 -0
  278. /package/{typescript → nestjs}/copy-overwrite/.github/k6/thresholds/relaxed.json +0 -0
  279. /package/{typescript → nestjs}/copy-overwrite/.github/k6/thresholds/strict.json +0 -0
  280. /package/{typescript → nestjs}/copy-overwrite/.github/workflows/k6-load-test-README.md +0 -0
@@ -0,0 +1,75 @@
1
+ ---
2
+ description: Reduce max file lines threshold and fix violations
3
+ allowed-tools: Read, Write, Edit, Bash, Glob, Grep, Task, TaskCreate, TaskUpdate, TaskList, TaskGet
4
+ argument-hint: <max-lines-value>
5
+ model: sonnet
6
+ ---
7
+
8
+ # Reduce Max Lines
9
+
10
+ Target threshold: $ARGUMENTS lines per file
11
+
12
+ If no argument provided, prompt the user for a target.
13
+
14
+ ## Process
15
+
16
+ ### Step 0: Check Project Context
17
+
18
+ Check if there's an active project for task syncing:
19
+
20
+ ```bash
21
+ cat .claude-active-project 2>/dev/null
22
+ ```
23
+
24
+ If a project is active, include `metadata: { "project": "<project-name>" }` in all TaskCreate calls.
25
+
26
+ ### Step 1: Locate Configuration
27
+
28
+ Read the eslint thresholds config (`eslint.thresholds.json` or similar).
29
+
30
+ ### Step 2: Update Threshold
31
+
32
+ Set the `maxLines` threshold to $ARGUMENTS (e.g., `"maxLines": $ARGUMENTS`).
33
+
34
+ ### Step 3: Identify Violations
35
+
36
+ Run lint to find all files exceeding the new threshold. Note file path and current line count.
37
+
38
+ If no violations, report success and exit.
39
+
40
+ ### Step 4: Create Task List
41
+
42
+ Create a task for each file needing refactoring, ordered by line count (highest first).
43
+
44
+ Each task should have:
45
+ - **subject**: "Reduce lines in [file]" (imperative form)
46
+ - **description**: File path, current line count, target threshold, refactoring strategies
47
+ - **activeForm**: "Reducing lines in [file]" (present continuous)
48
+ - **metadata**: `{ "project": "<active-project>" }` if project context exists
49
+
50
+ Refactoring strategies:
51
+ - **Extract modules**: Break file into smaller focused modules
52
+ - **Remove duplication**: Consolidate repeated logic
53
+ - **Delete dead code**: Remove unused functions/code paths
54
+ - **Simplify logic**: Use early returns, reduce nesting
55
+
56
+ ### Step 5: Parallel Execution
57
+
58
+ Launch **up to 5 sub-agents** using the `code-simplifier` subagent to refactor in parallel.
59
+
60
+ ### Step 6: Iterate
61
+
62
+ Check for remaining pending tasks. Re-run lint to verify.
63
+
64
+ If violations remain, repeat from Step 3.
65
+
66
+ Continue until all files meet or are under $ARGUMENTS lines.
67
+
68
+ ### Step 7: Report
69
+
70
+ ```
71
+ Max lines reduction complete:
72
+ - Target threshold: $ARGUMENTS
73
+ - Files refactored: [count]
74
+ - Files reduced: [list with line counts]
75
+ ```
@@ -1,248 +1,146 @@
1
1
  ---
2
2
  description: Conducts research of your code base and the web relevant to your project and compiles it for the planning phase
3
3
  argument-hint: <project-directory>
4
+ allowed-tools: Read, Write, Bash, Glob, Grep, Task, TaskCreate, TaskUpdate, TaskList, WebSearch, WebFetch
4
5
  ---
5
6
 
6
7
  # Research Codebase
7
8
 
8
- You are tasked with conducting comprehensive research across the codebase and web that will help create an implementation plan for the brief in $ARGUMENTS
9
+ Conduct comprehensive research across the codebase and web to help create an implementation plan for the brief in $ARGUMENTS.
9
10
 
10
- Goals:
11
+ ## Goals
11
12
 
12
- 1. Determine what existing documentation in the codebase will be needed to fulfill the spec
13
- 2. Determine any gaps in the spec that would prevent a developer from fulfilling the acceptance criteria
14
- 3. Determine any potential pitfalls that should be considered such as performance or security concerns
15
- 4. Determine what code, functions, and modules currently exist within the codebase that could be reused during implementation
16
- 5. Determine testing patterns and locations in the codebase (frameworks, conventions, examples to follow)
17
- 6. Determine documentation patterns in the codebase (JSDoc conventions, DB comment conventions, GraphQL description conventions)
13
+ 1. Determine what existing documentation in the codebase will be needed
14
+ 2. Determine any gaps in the spec that would prevent fulfilling acceptance criteria
15
+ 3. Determine potential pitfalls (performance, security concerns)
16
+ 4. Determine reusable code, functions, and modules in the codebase
17
+ 5. Determine testing patterns and locations (frameworks, conventions, examples)
18
+ 6. Determine documentation patterns (JSDoc, DB comments, GraphQL descriptions)
18
19
 
19
- Note: Task-specific concerns (acceptance criteria, specific tests to write, specific documentation to create) are determined during the Planning phase on a per-task basis.
20
+ ## Critical Rule
20
21
 
21
- ## Step 0: MANDATORY SETUP
22
+ **YOUR ONLY JOB IS TO DOCUMENT AND EXPLAIN THE CODEBASE AS IT EXISTS TODAY**
22
23
 
23
- Create workflow tracking todos:
24
- - Step 1: Read mentioned files
25
- - Step 2: Analyze and decompose
26
- - Step 3: Spawn research agents
27
- - Step 4: Wait and synthesize
28
- - Step 5: Generate document
29
- - Step 6: Commit
24
+ - DO NOT suggest improvements or changes
25
+ - DO NOT perform root cause analysis
26
+ - DO NOT propose future enhancements
27
+ - DO NOT critique or identify problems
28
+ - ONLY describe what exists, where it exists, how it works, and how components interact
30
29
 
31
- ⚠️ **CRITICAL**: DO NOT STOP until all 6 todos are marked completed.
30
+ ## Workflow Tasks
32
31
 
33
- ## CRITICAL: YOUR ONLY JOB IS TO DOCUMENT AND EXPLAIN THE CODEBASE AS IT EXISTS TODAY
32
+ Create workflow tracking tasks with `metadata: { "project": "<project-name>", "phase": "research" }`:
34
33
 
35
- - DO NOT suggest improvements or changes unless the user explicitly asks for them
36
- - DO NOT perform root cause analysis unless the user explicitly asks for them
37
- - DO NOT propose future enhancements unless the user explicitly asks for them
38
- - DO NOT critique the implementation or identify problems
39
- - DO NOT recommend refactoring, optimization, or architectural changes
40
- - ONLY describe what exists, where it exists, how it works, and how components interact
41
- - You are creating a technical map/documentation of the existing system
34
+ 1. Read mentioned files
35
+ 2. Analyze and decompose
36
+ 3. Spawn research agents
37
+ 4. Wait and synthesize
38
+ 5. Generate document
39
+ 6. Commit
42
40
 
43
41
  ## Step 1: Read Mentioned Files
44
- Mark "Step 1: Read mentioned files" as in_progress.
45
42
 
46
- **Read any directly mentioned files first:**
47
- - If the user mentions specific files (tickets, docs, JSON), read them FULLY first
48
- - **IMPORTANT**: Use the Read tool WITHOUT limit/offset parameters to read entire files
49
- - **CRITICAL**: Read these files yourself in the main context before spawning any sub-tasks
50
- - This ensures you have full context before decomposing the research
51
-
52
- Mark "Step 1: Read mentioned files" as completed. Proceed to Step 2.
43
+ Read any directly mentioned files FULLY first (no limit/offset). This ensures full context before spawning sub-tasks.
53
44
 
54
45
  ## Step 2: Analyze and Decompose
55
- Mark "Step 2: Analyze and decompose" as in_progress.
56
46
 
57
- **Analyze and decompose the research question:**
58
47
  - Break down the brief into composable research areas
59
- - Take time to ultrathink about the underlying patterns, connections, and architectural implications
60
48
  - Identify specific components, patterns, or concepts to investigate
61
- - Create a research plan using TodoWrite to track all subtasks
62
49
  - Consider which directories, files, or architectural patterns are relevant
63
50
 
64
- Mark "Step 2: Analyze and decompose" as completed. Proceed to Step 3.
65
-
66
51
  ## Step 3: Spawn Research Agents
67
- Mark "Step 3: Spawn research agents" as in_progress.
68
52
 
69
- **Spawn parallel sub-agent tasks for comprehensive research:**
70
- - Create multiple Task agents to research different aspects concurrently
71
- - We now have specialized agents that know how to do specific research tasks:
53
+ Spawn parallel sub-agent tasks for comprehensive research:
72
54
 
73
55
  **For codebase research:**
74
- - Use the **codebase-locator** agent to find WHERE files and components live
75
- - Use the **codebase-analyzer** agent to understand HOW specific code works (without critiquing it)
76
- - Use the **codebase-pattern-finder** agent to find examples of existing patterns (without evaluating them)
77
- - Use the **git-history-analyzer** agent to understand what changes the file has undergone that may affect the implementation plan
56
+ - **codebase-locator**: Find WHERE files and components live
57
+ - **codebase-analyzer**: Understand HOW specific code works
58
+ - **codebase-pattern-finder**: Find examples of existing patterns
59
+ - **git-history-analyzer**: Understand file change history
78
60
 
79
61
  **For e2e test research:**
80
- - Use the **codebase-locator** agent to find existing e2e tests in `e2e/` or `tests/` directories that relate to the feature being modified
81
- - Use the **codebase-analyzer** agent to document what scenarios each relevant test covers
82
- - Identify tests that will need modification due to UI/flow changes
83
- - Identify tests that may need to be removed if features are deprecated
84
- - Identify gaps where new tests will be needed for new functionality
85
- - Document the test file paths and what each test validates
86
-
87
- **IMPORTANT**: All agents are documentarians, not critics. They will describe what exists without suggesting improvements or identifying issues.
62
+ - Find existing e2e tests in `e2e/` or `tests/` directories
63
+ - Document what scenarios each test covers
64
+ - Identify tests needing modification or gaps for new functionality
88
65
 
89
66
  **For web research:**
90
- - Use the **web-search-researcher** agent for external documentation and resources
91
- - IF you use web-research agents, instruct them to return LINKS with their findings, and please INCLUDE those links in your final report
92
-
93
- The key is to use these agents intelligently:
94
- - Start with locator agents to find what exists
95
- - Then use analyzer agents on the most promising findings to document how they work
96
- - Run multiple agents in parallel when they're searching for different things
97
- - Each agent knows its job - just tell it what you're looking for
98
- - Don't write detailed prompts about HOW to search - the agents already know
99
- - Remind agents they are documenting, not evaluating or improving
67
+ - **web-search-researcher**: External documentation and resources
68
+ - Include LINKS with findings in the final report
100
69
 
101
- Mark "Step 3: Spawn research agents" as completed. Proceed to Step 4.
70
+ Run multiple agents in parallel when searching for different things.
102
71
 
103
72
  ## Step 4: Wait and Synthesize
104
- Mark "Step 4: Wait and synthesize" as in_progress.
105
73
 
106
- **Wait for all sub-agents to complete and synthesize findings:**
107
- - ⚠️ **CRITICAL**: Wait for ALL sub-agent tasks to complete before proceeding
108
- - DO NOT proceed to Step 5 until every spawned Task has returned
109
- - Compile all sub-agent results (both codebase and thoughts findings)
74
+ **CRITICAL**: Wait for ALL sub-agent tasks to complete before proceeding.
75
+
76
+ - Compile all sub-agent results
110
77
  - Prioritize live codebase findings as primary source of truth
111
78
  - Connect findings across different components
112
- - Include specific file paths and line numbers for reference
113
- - Highlight patterns, connections, and architectural decisions
114
- - Include any frameworks used such as Ruby on Rails, NestJs, Expo, React, React Native, Vue, etc
115
- - If a framework is used, identify what portions of the framework are relevant to the given project (i.e. ActiveRecord, NestJs Service's, dependency injection, etc)
116
-
117
- Mark "Step 4: Wait and synthesize" as completed. Proceed to Step 5.
79
+ - Include specific file paths and line numbers
80
+ - Note any frameworks used (Rails, NestJS, Expo, React, etc.)
118
81
 
119
82
  ## Step 5: Generate Document
120
- Mark "Step 5: Generate document" as in_progress.
121
-
122
- **Generate research document:**
123
- - Structure the document with YAML frontmatter followed by content:
124
-
125
- ```markdown
126
- ---
127
- date: [Current date and time with timezone in ISO format]
128
- status: complete
129
- last_updated: [Current date in YYYY-MM-DD format]
130
- ---
131
-
132
- # Research
133
-
134
- ## Summary
135
-
136
- [High-level documentation of what was found]
137
83
 
138
- ## Detailed Findings
84
+ Create `$ARGUMENTS/research.md` with this structure:
139
85
 
140
- ### [Component/Area 1]
141
-
142
- - Description of what exists ([file.ext:line](link))
143
- - How it connects to other components
144
- - Current implementation details (without evaluation)
145
-
146
- ### [Component/Area 2]
147
-
148
- ...
149
-
150
- ## Code References
151
-
152
- - `path/to/file.py:123` - Description of what's there
153
- - `another/file.ts:45-67` - Description of the code block
154
-
155
- ## Architecture Documentation
156
-
157
- [Current patterns, conventions, and design implementations found in the codebase]
158
-
159
- ## Testing Patterns
160
-
161
- ### Unit Test Patterns
162
- - **Location**: `src/**/__tests__/*.test.ts` (or actual pattern found)
163
- - **Framework**: Jest/Vitest/etc.
164
- - **Example to follow**: `path/to/example.test.ts:line-range`
165
- - **Conventions**: [Describe naming, structure, mock patterns]
166
-
167
- ### Integration Test Patterns
168
- - **Location**: `src/**/*.integration.test.ts` (or actual pattern found)
169
- - **Example to follow**: `path/to/example.integration.test.ts`
170
- - **Conventions**: [Describe setup, teardown, database handling]
86
+ ```markdown
87
+ ---
88
+ date: [ISO format with timezone]
89
+ status: complete
90
+ last_updated: [YYYY-MM-DD]
91
+ ---
171
92
 
172
- ### E2E Test Patterns
173
- - **Location**: `e2e/*.spec.ts` (or actual pattern found)
174
- - **Framework**: Playwright/Cypress/Maestro/etc.
175
- - **Example to follow**: `path/to/example.spec.ts`
176
- - **Conventions**: [Describe page objects, fixtures, assertions]
93
+ # Research
177
94
 
178
- ## Documentation Patterns
95
+ ## Summary
96
+ [High-level documentation of findings]
179
97
 
180
- ### JSDoc Conventions
181
- - **Style**: [Describe the JSDoc style used in this codebase]
182
- - **Example**: `path/to/well-documented-file.ts:line-range`
183
- - **Required tags**: [@param, @returns, @throws, etc.]
98
+ ## Detailed Findings
99
+ ### [Component/Area]
100
+ - Description of what exists ([file.ext:line](link))
101
+ - How it connects to other components
184
102
 
185
- ### Database Comments (Backend Only)
186
- - **Convention**: [How tables/columns are documented]
187
- - **Example**: `path/to/entity.ts` or migration file
188
- - **Required for**: [New tables, new columns, complex relationships]
103
+ ## Code References
104
+ - `path/to/file.py:123` - Description
189
105
 
190
- ### GraphQL Descriptions (Backend Only)
191
- - **Convention**: [How types/fields are documented]
192
- - **Example**: `path/to/resolver.ts` or schema file
193
- - **Required for**: [Public API fields, complex types]
106
+ ## Architecture Documentation
107
+ [Patterns, conventions, design implementations]
194
108
 
195
- ## Open Questions
109
+ ## Testing Patterns
110
+ ### Unit Test Patterns
111
+ - **Location**: pattern found
112
+ - **Framework**: Jest/Vitest/etc.
113
+ - **Example to follow**: path:line-range
114
+ - **Conventions**: naming, structure, mocks
196
115
 
197
- <!--
198
- Structure each question with context and impact.
199
- The Answer field must be filled by a human before planning can proceed.
200
- -->
116
+ ### Integration Test Patterns
117
+ [Similar structure]
201
118
 
202
- ### Q1: [Short Question Title]
203
- **Question**: [Full question]
204
- **Context**: [Why this question arose, what in the brief is unclear]
205
- **Impact**: [What parts of implementation this affects]
206
- **Answer**: _[Human fills this in before running /project:plan]_
119
+ ### E2E Test Patterns
120
+ [Similar structure]
207
121
 
208
- <!-- Add more questions as needed using the same format -->
209
- <!-- If no questions, replace this section with: [None identified] -->
210
- ```
122
+ ## Documentation Patterns
123
+ ### JSDoc Conventions
124
+ ### Database Comments (Backend)
125
+ ### GraphQL Descriptions (Backend)
211
126
 
212
- - Save the research document as `research.md` in the $ARGUMENTS directory
127
+ ## Open Questions
213
128
 
214
- Mark "Step 5: Generate document" as completed. Proceed to Step 6.
129
+ ### Q1: [Short Title]
130
+ **Question**: [Full question]
131
+ **Context**: [Why this arose]
132
+ **Impact**: [What it affects]
133
+ **Answer**: _[Human fills before /project:plan]_
134
+ ```
215
135
 
216
136
  ## Step 6: Commit
217
- Mark "Step 6: Commit" as in_progress.
218
-
219
- Run /git:commit
220
137
 
221
- Mark "Step 6: Commit" as completed.
138
+ Run `/git:commit`
222
139
 
223
- ## Important notes:
140
+ ## Important Notes
224
141
 
225
- - Always use parallel Task agents to maximize efficiency and minimize context usage
226
- - Always run fresh codebase research - never rely solely on existing research documents
227
- - Focus on finding concrete file paths and line numbers for developer reference
228
- - Research documents should be self-contained with all necessary context
229
- - Each sub-agent prompt should be specific and focused on read-only documentation operations
230
- - Document cross-component connections and how systems interact
231
- - Include temporal context (when the research was conducted)
232
- - Keep the main agent focused on synthesis, not deep file reading
233
- - Have sub-agents document examples and usage patterns as they exist
234
- - **CRITICAL**: You and all sub-agents are documentarians, not evaluators
142
+ - Always use parallel Task agents to maximize efficiency
143
+ - Always run fresh codebase research - never rely solely on existing documents
144
+ - Focus on finding concrete file paths and line numbers
145
+ - Each sub-agent prompt should be specific and focused on read-only documentation
235
146
  - **REMEMBER**: Document what IS, not what SHOULD BE
236
- - **NO RECOMMENDATIONS**: Only describe the current state of the codebase
237
- - **File reading**: Always read mentioned files FULLY (no limit/offset) before spawning sub-tasks
238
- - **Critical ordering**: Follow the numbered steps exactly
239
- - ALWAYS read mentioned files first before spawning sub-tasks (step 1)
240
- - ALWAYS wait for all sub-agents to complete before synthesizing (step 4)
241
- - ALWAYS gather metadata before writing the document (step 5 before step 6)
242
- - NEVER write the research document with placeholder values
243
- - **Frontmatter consistency**:
244
- - Always include frontmatter at the beginning of research documents
245
- - Keep frontmatter fields consistent across all research documents
246
- - Update frontmatter when adding follow-up research
247
- - Use snake_case for multi-word field names (e.g., `last_updated`)
248
- - Tags should be relevant to the research topic and components studied
@@ -1,63 +1,44 @@
1
1
  ---
2
2
  description: Performs extensive code review and optimization on the current project
3
3
  argument-hint: <project-directory>
4
+ allowed-tools: Read, Write, Edit, Bash, Glob, Grep, Task, TaskCreate, TaskUpdate, TaskList, Skill
4
5
  ---
5
6
 
6
- The current branch is a feature branch that contains full implementation of the project described in $ARGUMENTS
7
+ The current branch is a feature branch with full implementation of the project in $ARGUMENTS.
7
8
 
8
- IMPORTANT: Perform each step and then move to the next one without stopping
9
+ **IMPORTANT**: Perform each step and move to the next without stopping.
9
10
 
10
- ## Step 0: MANDATORY SETUP
11
+ ## Setup
11
12
 
12
- Use TodoWrite to create workflow tracking todos:
13
- - Step 1: Perform Claude Review
14
- - Step 2: Implement Claude Review Fixes
15
- - Step 3: Perform CodeRabbit Review
16
- - Step 4: Implement CodeRabbit Review Fixes
17
- - Step 5: Perform Claude Optimizations
13
+ Create workflow tracking tasks with `metadata: { "project": "<project-name>", "phase": "review" }`:
18
14
 
19
- ## Step 1: Perform Claude Review
20
-
21
- Mark "Step 1: Perform Claude Review" as in_progress.
15
+ 1. Perform Claude Review
16
+ 2. Implement Claude Review Fixes
17
+ 3. Perform CodeRabbit Review
18
+ 4. Implement CodeRabbit Review Fixes
19
+ 5. Perform Claude Optimizations
22
20
 
23
- If $ARGUMENTS/claude-review.md already exists, Mark "Step 1: Perform Claude Review" as completed. Proceed to Step 2
21
+ ## Step 1: Perform Claude Review
24
22
 
25
- Otherwise, run /local-code-review $ARGUMENTS
23
+ If `$ARGUMENTS/claude-review.md` already exists, skip to Step 2.
26
24
 
27
- Mark "Step 1: Perform Claude Review" as completed. Proceed to Step 2
25
+ Otherwise, run `/project:local-code-review $ARGUMENTS`
28
26
 
29
27
  ## Step 2: Implement Claude Review Fixes
30
28
 
31
- Mark "Step 2: Implement Claude Review Fixes" as in_progress.
32
-
33
- 1. Read $ARGUMENTS/claude-review.md
34
- 2. Fix any suggestions that score above 45 in $ARGUMENTS/claude-review.md
35
-
36
- Mark "Step 2: Implement Claude Review Fixes" as completed. Proceed to Step 3
29
+ 1. Read `$ARGUMENTS/claude-review.md`
30
+ 2. Fix any suggestions that score above 45
37
31
 
38
32
  ## Step 3: Perform CodeRabbit Review
39
33
 
40
- Mark "Step 3: Perform CodeRabbit Review" as in_progress.
41
-
42
- If $ARGUMENTS/coderabbit-review.md already exists, Mark "Step 3: Perform CodeRabbit Review" as completed. Proceed to Step 4
34
+ If `$ARGUMENTS/coderabbit-review.md` already exists, skip to Step 4.
43
35
 
44
- Otherwise, use Task tool with prompt: "Run !`coderabbit review --plain || true` to get comprehensive code analysis and improvement suggestions and write the results to $ARGUMENTS/coderabbit-review.md"
45
-
46
- Mark "Step 3: Perform CodeRabbit Review" as completed. Proceed to Step 4
36
+ Otherwise, use Task tool with prompt: "Run `coderabbit review --plain || true` and write results to $ARGUMENTS/coderabbit-review.md"
47
37
 
48
38
  ## Step 4: Implement CodeRabbit Review Fixes
49
39
 
50
- Mark "Step 4: Implement CodeRabbit Review Fixes" as in_progress.
51
-
52
- Evaluate the suggestions in $ARGUMENTS/coderabbit-review.md and implement fixes/changes for any valid findings
53
-
54
- Mark "Step 4: Implement CodeRabbit Review Fixes" as completed. Proceed to Step 5
40
+ Evaluate suggestions in `$ARGUMENTS/coderabbit-review.md` and implement fixes for valid findings.
55
41
 
56
42
  ## Step 5: Perform Claude Optimizations
57
43
 
58
- Mark "Step 5: Perform Claude Optimizations" as in_progress.
59
-
60
- Use the code simplifier agent to clean up the code that was added to the current branch.
61
-
62
- Mark "Step 5: Perform Claude Optimizations" as completed.
63
-
44
+ Use the code simplifier agent to clean up code added to the current branch.
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  description: Initialize a comprehensive NestJS backend project with full requirements analysis, planning, and structure setup
3
3
  argument-hint: <project-brief-file-or-jira-issue-number>
4
- allowed-tools: Read, Write, Bash(git*), Glob, Grep, Task, TodoWrite
4
+ allowed-tools: Read, Write, Bash(git*), Glob, Grep, Task, TaskCreate, TaskUpdate, TaskList
5
5
  ---
6
6
 
7
7
  1. Decide if $ARGUMENTS is a Jira issue number or a path to a file
@@ -1,38 +1,75 @@
1
1
  ---
2
2
  description: Comprehensive verification that a feature branch fully implements all project requirements with proper code quality, tests, and documentation
3
3
  argument-hint: <project-directory>
4
+ allowed-tools: Read, Write, Edit, Bash, Glob, Grep, Task, TaskCreate, TaskUpdate, TaskList
4
5
  ---
5
6
 
6
- The current branch is a feature branch that contains full implementation of the project described in $ARGUMENTS
7
+ The current branch is a feature branch with full implementation of the project in $ARGUMENTS.
7
8
 
8
- ## Step 0: MANDATORY SETUP
9
+ ## Setup
9
10
 
10
- Use TodoWrite to create workflow tracking todos:
11
- - Step 1: Review Requirements for $ARGUMENTS
12
- - Step 2: Verify Implementation
13
- - Step 3: Document Drift
11
+ Create workflow tracking tasks with `metadata: { "project": "<project-name>", "phase": "verify" }`:
14
12
 
15
- ## Step 1: Review Requirements
16
-
17
- Mark "Step 1: Review Requirements" as in_progress.
13
+ 1. Review Requirements
14
+ 2. Verify Implementation
15
+ 3. Run Task Verification Commands
16
+ 4. Document Drift
18
17
 
19
- Read all the requirements for $ARGUMENTS
18
+ ## Step 1: Review Requirements
20
19
 
21
- Mark "Step 1: Review Requirements" as completed. Proceed to Step 2
20
+ Read all requirements for $ARGUMENTS.
22
21
 
23
22
  ## Step 2: Verify Implementation
24
23
 
25
- Mark "Step 2: Verify Implementation" as in_progress.
26
-
27
- Verify that the implementation completely and fully satisfies all the requirements from Step 1
28
-
29
- Mark "Step 2: Verify Implementation" as completed. Proceed to Step 3
30
-
31
-
32
- ## Step 3: Document Drift
33
-
34
- Mark "Step 3: Document Drift" as in_progress.
35
-
36
- IF there is any divergence from the requirements, document what this drift is to $ARGUMENTS/drift.md
37
-
38
- Mark "Step 3: Document Drift" as completed.
24
+ Verify the implementation completely and fully satisfies all requirements from Step 1.
25
+
26
+ ## Step 3: Run Task Verification Commands
27
+
28
+ ### 3a: Create Verification Tasks
29
+
30
+ First, read all task files in `$ARGUMENTS/tasks/` and create a new task for each one that has verification metadata:
31
+
32
+ For each task file:
33
+ 1. **Read the task file** (JSON or markdown)
34
+ 2. **Check for verification metadata**:
35
+ - JSON tasks: Look for `metadata.verification`
36
+ - Markdown tasks: Look for `## Verification` section with `### Proof Command`
37
+ 3. **If verification exists**, create a new task:
38
+ ```
39
+ subject: "Verify: <original-task-subject>"
40
+ description: "Run verification for task <id>: <verification.command>"
41
+ activeForm: "Verifying <original-task-subject>"
42
+ metadata: {
43
+ "project": "<project-name>",
44
+ "phase": "verify",
45
+ "originalTaskId": "<id>",
46
+ "verification": <copy the verification object>
47
+ }
48
+ ```
49
+
50
+ ### 3b: Execute Verification Tasks
51
+
52
+ Work through each verification task:
53
+
54
+ 1. **Run verification command** using Bash tool:
55
+ - JSON: Execute `metadata.verification.command`
56
+ - Markdown: Execute the command in `### Proof Command` code block
57
+ 2. **Compare output to expected**:
58
+ - JSON: Compare to `metadata.verification.expected`
59
+ - Markdown: Compare to `### Expected Output` section
60
+ 3. **Record results and mark task**:
61
+ - If verification passes → Mark task completed
62
+ - If verification fails → Keep task in_progress, document failure in drift.md
63
+ - If command cannot run → Keep task in_progress, document blocker in drift.md
64
+
65
+ ### Verification Summary
66
+
67
+ After running all verification tasks, report:
68
+ - Total tasks with verification: X
69
+ - Passed: Y
70
+ - Failed: Z
71
+ - Blocked: W
72
+
73
+ ## Step 4: Document Drift
74
+
75
+ If there is any divergence from the requirements or verification failures, document the drift to `$ARGUMENTS/drift.md`.
@@ -1,12 +1,30 @@
1
1
  ---
2
2
  description: Checks for code review comments on a PR and implements them if required.
3
3
  argument-hint: <github-pr-link>
4
- allowed-tools: Read, Write, Bash(git*), Glob, Grep, Task, TodoWrite. Bash(gh*)
4
+ allowed-tools: Read, Write, Edit, Bash(git*), Glob, Grep, Task, TaskCreate, TaskUpdate, TaskList, TaskGet, Bash(gh*)
5
5
  ---
6
6
 
7
- 1. Use the github cli to find all the code review comments on $ARGUMENTS
8
- 2. Create a task list for each unresolved code review comment
9
- 3. Review the code reviews one by one and determine if they are correct and should be implemented
10
- 4. The ones that aren't valid or you're not implementing, use the github cli to comment why you're not and resolve the code review comment
11
- 5. For the rest, implement the changes and then use the github cli to mark the comment why it's resolved.
12
- 6. Once all the code review comments have been resolved, run /git:commit
7
+ Use the GitHub CLI to fetch all review comments on $ARGUMENTS:
8
+
9
+ ```bash
10
+ gh pr view $ARGUMENTS --json reviews,comments
11
+ gh api repos/{owner}/{repo}/pulls/{pr_number}/comments
12
+ ```
13
+
14
+ Extract each unresolved review comment as a separate item. Note the comment ID, file path, line number, and comment body.
15
+
16
+ Create a task for each unresolved comment with `metadata: { "pr": "$ARGUMENTS" }`:
17
+ - **subject**: Brief description of the requested change
18
+ - **description**: Full comment body, file path, line number, comment ID, and these instructions:
19
+ 1. Evaluate if the requested change is valid
20
+ 2. If not valid, reply explaining why and mark resolved, skip remaining steps
21
+ 3. If valid, make appropriate code updates
22
+ 4. Ensure changes follow project coding standards
23
+ 5. Run relevant tests to verify changes work
24
+ 6. Run `/git:commit` to commit changes
25
+ 7. If hooks fail, fix errors and re-run `/git:commit`
26
+ - **activeForm**: "Implementing PR feedback for [file]"
27
+
28
+ Launch up to 6 subagents to work through the task list in parallel.
29
+
30
+ When all tasks are completed, run `/git:commit-and-submit-pr`.