devflow-kit 0.9.0 → 1.1.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 (414) hide show
  1. package/CHANGELOG.md +197 -29
  2. package/LICENSE +1 -1
  3. package/README.md +185 -309
  4. package/dist/cli.js +7 -1
  5. package/dist/commands/ambient.d.ts +18 -0
  6. package/dist/commands/ambient.js +136 -0
  7. package/dist/commands/init.d.ts +23 -0
  8. package/dist/commands/init.js +393 -571
  9. package/dist/commands/list.d.ts +3 -0
  10. package/dist/commands/list.js +20 -0
  11. package/dist/commands/memory.d.ts +22 -0
  12. package/dist/commands/memory.js +175 -0
  13. package/dist/commands/uninstall.d.ts +10 -0
  14. package/dist/commands/uninstall.js +418 -78
  15. package/dist/plugins.d.ts +46 -0
  16. package/dist/plugins.js +169 -0
  17. package/dist/utils/cli.d.ts +5 -0
  18. package/dist/utils/cli.js +14 -0
  19. package/dist/utils/installer.d.ts +41 -0
  20. package/dist/utils/installer.js +177 -0
  21. package/dist/utils/paths.d.ts +10 -0
  22. package/dist/utils/paths.js +23 -3
  23. package/dist/utils/post-install.d.ts +80 -0
  24. package/dist/utils/post-install.js +508 -0
  25. package/dist/utils/safe-delete-install.d.ts +29 -0
  26. package/dist/utils/safe-delete-install.js +191 -0
  27. package/dist/utils/safe-delete.d.ts +12 -0
  28. package/dist/utils/safe-delete.js +83 -0
  29. package/package.json +18 -8
  30. package/plugins/devflow-ambient/.claude-plugin/plugin.json +7 -0
  31. package/plugins/devflow-ambient/README.md +49 -0
  32. package/plugins/devflow-ambient/commands/ambient.md +110 -0
  33. package/plugins/devflow-ambient/skills/ambient-router/SKILL.md +89 -0
  34. package/plugins/devflow-ambient/skills/ambient-router/references/skill-catalog.md +64 -0
  35. package/plugins/devflow-audit-claude/.claude-plugin/plugin.json +7 -0
  36. package/plugins/devflow-audit-claude/README.md +46 -0
  37. package/plugins/devflow-audit-claude/agents/claude-md-auditor.md +134 -0
  38. package/plugins/devflow-audit-claude/commands/audit-claude.md +85 -0
  39. package/plugins/devflow-code-review/.claude-plugin/plugin.json +31 -0
  40. package/plugins/devflow-code-review/README.md +73 -0
  41. package/plugins/devflow-code-review/agents/git.md +272 -0
  42. package/plugins/devflow-code-review/agents/reviewer.md +119 -0
  43. package/plugins/devflow-code-review/agents/synthesizer.md +204 -0
  44. package/plugins/devflow-code-review/commands/code-review-teams.md +262 -0
  45. package/plugins/devflow-code-review/commands/code-review.md +141 -0
  46. package/plugins/devflow-code-review/skills/accessibility/SKILL.md +229 -0
  47. package/plugins/devflow-code-review/skills/accessibility/references/detection.md +171 -0
  48. package/plugins/devflow-code-review/skills/accessibility/references/patterns.md +670 -0
  49. package/plugins/devflow-code-review/skills/accessibility/references/violations.md +419 -0
  50. package/plugins/devflow-code-review/skills/agent-teams/SKILL.md +124 -0
  51. package/plugins/devflow-code-review/skills/agent-teams/references/cleanup.md +104 -0
  52. package/plugins/devflow-code-review/skills/agent-teams/references/communication.md +122 -0
  53. package/plugins/devflow-code-review/skills/agent-teams/references/team-patterns.md +217 -0
  54. package/plugins/devflow-code-review/skills/architecture-patterns/SKILL.md +153 -0
  55. package/plugins/devflow-code-review/skills/architecture-patterns/references/detection.md +337 -0
  56. package/plugins/devflow-code-review/skills/architecture-patterns/references/patterns.md +873 -0
  57. package/plugins/devflow-code-review/skills/architecture-patterns/references/violations.md +575 -0
  58. package/plugins/devflow-code-review/skills/complexity-patterns/SKILL.md +143 -0
  59. package/plugins/devflow-code-review/skills/complexity-patterns/references/detection.md +264 -0
  60. package/plugins/devflow-code-review/skills/complexity-patterns/references/patterns.md +487 -0
  61. package/plugins/devflow-code-review/skills/complexity-patterns/references/violations.md +361 -0
  62. package/plugins/devflow-code-review/skills/consistency-patterns/SKILL.md +140 -0
  63. package/plugins/devflow-code-review/skills/consistency-patterns/references/detection.md +207 -0
  64. package/plugins/devflow-code-review/skills/consistency-patterns/references/patterns.md +202 -0
  65. package/plugins/devflow-code-review/skills/consistency-patterns/references/violations.md +213 -0
  66. package/plugins/devflow-code-review/skills/database-patterns/SKILL.md +134 -0
  67. package/plugins/devflow-code-review/skills/database-patterns/references/detection.md +208 -0
  68. package/plugins/devflow-code-review/skills/database-patterns/references/patterns.md +394 -0
  69. package/plugins/devflow-code-review/skills/database-patterns/references/violations.md +332 -0
  70. package/plugins/devflow-code-review/skills/dependencies-patterns/SKILL.md +141 -0
  71. package/plugins/devflow-code-review/skills/dependencies-patterns/references/detection.md +181 -0
  72. package/plugins/devflow-code-review/skills/dependencies-patterns/references/patterns.md +225 -0
  73. package/plugins/devflow-code-review/skills/dependencies-patterns/references/violations.md +247 -0
  74. package/plugins/devflow-code-review/skills/documentation-patterns/SKILL.md +125 -0
  75. package/plugins/devflow-code-review/skills/documentation-patterns/references/detection.md +190 -0
  76. package/plugins/devflow-code-review/skills/documentation-patterns/references/patterns.md +189 -0
  77. package/plugins/devflow-code-review/skills/documentation-patterns/references/violations.md +163 -0
  78. package/plugins/devflow-code-review/skills/frontend-design/SKILL.md +254 -0
  79. package/plugins/devflow-code-review/skills/frontend-design/references/detection.md +184 -0
  80. package/plugins/devflow-code-review/skills/frontend-design/references/patterns.md +511 -0
  81. package/plugins/devflow-code-review/skills/frontend-design/references/violations.md +453 -0
  82. package/plugins/devflow-code-review/skills/performance-patterns/SKILL.md +154 -0
  83. package/plugins/devflow-code-review/skills/performance-patterns/references/detection.md +351 -0
  84. package/plugins/devflow-code-review/skills/performance-patterns/references/patterns.md +503 -0
  85. package/plugins/devflow-code-review/skills/performance-patterns/references/violations.md +354 -0
  86. package/plugins/devflow-code-review/skills/react/SKILL.md +276 -0
  87. package/plugins/devflow-code-review/skills/react/references/patterns.md +1331 -0
  88. package/plugins/devflow-code-review/skills/react/references/violations.md +565 -0
  89. package/plugins/devflow-code-review/skills/regression-patterns/SKILL.md +146 -0
  90. package/plugins/devflow-code-review/skills/regression-patterns/references/detection.md +237 -0
  91. package/plugins/devflow-code-review/skills/regression-patterns/references/patterns.md +226 -0
  92. package/plugins/devflow-code-review/skills/regression-patterns/references/violations.md +225 -0
  93. package/plugins/devflow-code-review/skills/review-methodology/SKILL.md +119 -0
  94. package/plugins/devflow-code-review/skills/review-methodology/references/patterns.md +186 -0
  95. package/plugins/devflow-code-review/skills/review-methodology/references/report-template.md +142 -0
  96. package/plugins/devflow-code-review/skills/review-methodology/references/violations.md +125 -0
  97. package/plugins/devflow-code-review/skills/security-patterns/SKILL.md +156 -0
  98. package/plugins/devflow-code-review/skills/security-patterns/references/detection.md +287 -0
  99. package/plugins/devflow-code-review/skills/security-patterns/references/patterns.md +507 -0
  100. package/plugins/devflow-code-review/skills/security-patterns/references/violations.md +237 -0
  101. package/plugins/devflow-code-review/skills/test-patterns/SKILL.md +183 -0
  102. package/plugins/devflow-code-review/skills/test-patterns/references/detection.md +149 -0
  103. package/plugins/devflow-code-review/skills/test-patterns/references/patterns.md +220 -0
  104. package/plugins/devflow-code-review/skills/test-patterns/references/report-template.md +108 -0
  105. package/plugins/devflow-code-review/skills/test-patterns/references/violations.md +221 -0
  106. package/plugins/devflow-core-skills/.claude-plugin/plugin.json +28 -0
  107. package/plugins/devflow-core-skills/README.md +50 -0
  108. package/plugins/devflow-core-skills/skills/accessibility/SKILL.md +229 -0
  109. package/plugins/devflow-core-skills/skills/accessibility/references/detection.md +171 -0
  110. package/plugins/devflow-core-skills/skills/accessibility/references/patterns.md +670 -0
  111. package/plugins/devflow-core-skills/skills/accessibility/references/violations.md +419 -0
  112. package/plugins/devflow-core-skills/skills/core-patterns/SKILL.md +162 -0
  113. package/plugins/devflow-core-skills/skills/core-patterns/references/checklist.md +276 -0
  114. package/plugins/devflow-core-skills/skills/core-patterns/references/code-smell-violations.md +144 -0
  115. package/plugins/devflow-core-skills/skills/core-patterns/references/detection.md +303 -0
  116. package/plugins/devflow-core-skills/skills/core-patterns/references/patterns.md +576 -0
  117. package/plugins/devflow-core-skills/skills/core-patterns/references/violations.md +369 -0
  118. package/plugins/devflow-core-skills/skills/docs-framework/SKILL.md +138 -0
  119. package/plugins/devflow-core-skills/skills/docs-framework/references/patterns.md +346 -0
  120. package/plugins/devflow-core-skills/skills/docs-framework/references/violations.md +221 -0
  121. package/plugins/devflow-core-skills/skills/frontend-design/SKILL.md +254 -0
  122. package/plugins/devflow-core-skills/skills/frontend-design/references/detection.md +184 -0
  123. package/plugins/devflow-core-skills/skills/frontend-design/references/patterns.md +511 -0
  124. package/plugins/devflow-core-skills/skills/frontend-design/references/violations.md +453 -0
  125. package/plugins/devflow-core-skills/skills/git-safety/SKILL.md +122 -0
  126. package/plugins/devflow-core-skills/skills/git-safety/references/detection.md +290 -0
  127. package/plugins/devflow-core-skills/skills/git-safety/references/patterns.md +289 -0
  128. package/plugins/devflow-core-skills/skills/git-safety/references/violations.md +18 -0
  129. package/plugins/devflow-core-skills/skills/git-workflow/SKILL.md +158 -0
  130. package/plugins/devflow-core-skills/skills/git-workflow/references/commit-patterns.md +115 -0
  131. package/plugins/devflow-core-skills/skills/git-workflow/references/commit-violations.md +77 -0
  132. package/plugins/devflow-core-skills/skills/git-workflow/references/pr-patterns.md +127 -0
  133. package/plugins/devflow-core-skills/skills/git-workflow/references/pr-violations.md +96 -0
  134. package/plugins/devflow-core-skills/skills/github-patterns/SKILL.md +153 -0
  135. package/plugins/devflow-core-skills/skills/github-patterns/references/patterns.md +572 -0
  136. package/plugins/devflow-core-skills/skills/github-patterns/references/violations.md +298 -0
  137. package/plugins/devflow-core-skills/skills/input-validation/SKILL.md +148 -0
  138. package/plugins/devflow-core-skills/skills/input-validation/references/detection.md +283 -0
  139. package/plugins/devflow-core-skills/skills/input-validation/references/patterns.md +361 -0
  140. package/plugins/devflow-core-skills/skills/input-validation/references/violations.md +224 -0
  141. package/plugins/devflow-core-skills/skills/react/SKILL.md +276 -0
  142. package/plugins/devflow-core-skills/skills/react/references/patterns.md +1331 -0
  143. package/plugins/devflow-core-skills/skills/react/references/violations.md +565 -0
  144. package/plugins/devflow-core-skills/skills/test-driven-development/SKILL.md +139 -0
  145. package/plugins/devflow-core-skills/skills/test-driven-development/references/rationalization-prevention.md +111 -0
  146. package/plugins/devflow-core-skills/skills/test-patterns/SKILL.md +183 -0
  147. package/plugins/devflow-core-skills/skills/test-patterns/references/detection.md +149 -0
  148. package/plugins/devflow-core-skills/skills/test-patterns/references/patterns.md +220 -0
  149. package/plugins/devflow-core-skills/skills/test-patterns/references/report-template.md +108 -0
  150. package/plugins/devflow-core-skills/skills/test-patterns/references/violations.md +221 -0
  151. package/plugins/devflow-core-skills/skills/typescript/SKILL.md +176 -0
  152. package/plugins/devflow-core-skills/skills/typescript/references/patterns.md +1105 -0
  153. package/plugins/devflow-core-skills/skills/typescript/references/violations.md +433 -0
  154. package/plugins/devflow-debug/.claude-plugin/plugin.json +18 -0
  155. package/plugins/devflow-debug/README.md +65 -0
  156. package/plugins/devflow-debug/agents/git.md +272 -0
  157. package/plugins/devflow-debug/commands/debug-teams.md +231 -0
  158. package/plugins/devflow-debug/commands/debug.md +160 -0
  159. package/plugins/devflow-debug/skills/agent-teams/SKILL.md +124 -0
  160. package/plugins/devflow-debug/skills/agent-teams/references/cleanup.md +104 -0
  161. package/plugins/devflow-debug/skills/agent-teams/references/communication.md +122 -0
  162. package/plugins/devflow-debug/skills/agent-teams/references/team-patterns.md +217 -0
  163. package/plugins/devflow-debug/skills/git-safety/SKILL.md +122 -0
  164. package/plugins/devflow-debug/skills/git-safety/references/detection.md +290 -0
  165. package/plugins/devflow-debug/skills/git-safety/references/patterns.md +289 -0
  166. package/plugins/devflow-debug/skills/git-safety/references/violations.md +18 -0
  167. package/plugins/devflow-implement/.claude-plugin/plugin.json +21 -0
  168. package/plugins/devflow-implement/README.md +71 -0
  169. package/plugins/devflow-implement/agents/coder.md +122 -0
  170. package/plugins/devflow-implement/agents/git.md +272 -0
  171. package/plugins/devflow-implement/agents/scrutinizer.md +80 -0
  172. package/plugins/devflow-implement/agents/shepherd.md +94 -0
  173. package/plugins/devflow-implement/agents/simplifier.md +62 -0
  174. package/plugins/devflow-implement/agents/skimmer.md +88 -0
  175. package/plugins/devflow-implement/agents/synthesizer.md +204 -0
  176. package/plugins/devflow-implement/agents/validator.md +86 -0
  177. package/plugins/devflow-implement/commands/implement-teams.md +608 -0
  178. package/plugins/devflow-implement/commands/implement.md +426 -0
  179. package/plugins/devflow-implement/skills/accessibility/SKILL.md +229 -0
  180. package/plugins/devflow-implement/skills/accessibility/references/detection.md +171 -0
  181. package/plugins/devflow-implement/skills/accessibility/references/patterns.md +670 -0
  182. package/plugins/devflow-implement/skills/accessibility/references/violations.md +419 -0
  183. package/plugins/devflow-implement/skills/agent-teams/SKILL.md +124 -0
  184. package/plugins/devflow-implement/skills/agent-teams/references/cleanup.md +104 -0
  185. package/plugins/devflow-implement/skills/agent-teams/references/communication.md +122 -0
  186. package/plugins/devflow-implement/skills/agent-teams/references/team-patterns.md +217 -0
  187. package/plugins/devflow-implement/skills/frontend-design/SKILL.md +254 -0
  188. package/plugins/devflow-implement/skills/frontend-design/references/detection.md +184 -0
  189. package/plugins/devflow-implement/skills/frontend-design/references/patterns.md +511 -0
  190. package/plugins/devflow-implement/skills/frontend-design/references/violations.md +453 -0
  191. package/plugins/devflow-implement/skills/implementation-patterns/SKILL.md +162 -0
  192. package/plugins/devflow-implement/skills/implementation-patterns/references/patterns.md +1063 -0
  193. package/plugins/devflow-implement/skills/implementation-patterns/references/violations.md +483 -0
  194. package/plugins/devflow-implement/skills/self-review/SKILL.md +149 -0
  195. package/plugins/devflow-implement/skills/self-review/references/patterns.md +405 -0
  196. package/plugins/devflow-implement/skills/self-review/references/report-template.md +253 -0
  197. package/plugins/devflow-implement/skills/self-review/references/violations.md +308 -0
  198. package/plugins/devflow-resolve/.claude-plugin/plugin.json +19 -0
  199. package/plugins/devflow-resolve/README.md +65 -0
  200. package/plugins/devflow-resolve/agents/git.md +272 -0
  201. package/plugins/devflow-resolve/agents/resolver.md +131 -0
  202. package/plugins/devflow-resolve/agents/simplifier.md +62 -0
  203. package/plugins/devflow-resolve/commands/resolve-teams.md +298 -0
  204. package/plugins/devflow-resolve/commands/resolve.md +237 -0
  205. package/plugins/devflow-resolve/skills/agent-teams/SKILL.md +124 -0
  206. package/plugins/devflow-resolve/skills/agent-teams/references/cleanup.md +104 -0
  207. package/plugins/devflow-resolve/skills/agent-teams/references/communication.md +122 -0
  208. package/plugins/devflow-resolve/skills/agent-teams/references/team-patterns.md +217 -0
  209. package/plugins/devflow-resolve/skills/implementation-patterns/SKILL.md +162 -0
  210. package/plugins/devflow-resolve/skills/implementation-patterns/references/patterns.md +1063 -0
  211. package/plugins/devflow-resolve/skills/implementation-patterns/references/violations.md +483 -0
  212. package/plugins/devflow-resolve/skills/security-patterns/SKILL.md +156 -0
  213. package/plugins/devflow-resolve/skills/security-patterns/references/detection.md +287 -0
  214. package/plugins/devflow-resolve/skills/security-patterns/references/patterns.md +507 -0
  215. package/plugins/devflow-resolve/skills/security-patterns/references/violations.md +237 -0
  216. package/plugins/devflow-self-review/.claude-plugin/plugin.json +7 -0
  217. package/plugins/devflow-self-review/README.md +38 -0
  218. package/plugins/devflow-self-review/agents/scrutinizer.md +80 -0
  219. package/plugins/devflow-self-review/agents/simplifier.md +62 -0
  220. package/plugins/devflow-self-review/agents/validator.md +86 -0
  221. package/plugins/devflow-self-review/commands/self-review.md +126 -0
  222. package/plugins/devflow-self-review/skills/core-patterns/SKILL.md +162 -0
  223. package/plugins/devflow-self-review/skills/core-patterns/references/checklist.md +276 -0
  224. package/plugins/devflow-self-review/skills/core-patterns/references/code-smell-violations.md +144 -0
  225. package/plugins/devflow-self-review/skills/core-patterns/references/detection.md +303 -0
  226. package/plugins/devflow-self-review/skills/core-patterns/references/patterns.md +576 -0
  227. package/plugins/devflow-self-review/skills/core-patterns/references/violations.md +369 -0
  228. package/plugins/devflow-self-review/skills/self-review/SKILL.md +149 -0
  229. package/plugins/devflow-self-review/skills/self-review/references/patterns.md +405 -0
  230. package/plugins/devflow-self-review/skills/self-review/references/report-template.md +253 -0
  231. package/plugins/devflow-self-review/skills/self-review/references/violations.md +308 -0
  232. package/plugins/devflow-specify/.claude-plugin/plugin.json +15 -0
  233. package/plugins/devflow-specify/README.md +46 -0
  234. package/plugins/devflow-specify/agents/skimmer.md +88 -0
  235. package/plugins/devflow-specify/agents/synthesizer.md +204 -0
  236. package/plugins/devflow-specify/commands/specify-teams.md +314 -0
  237. package/plugins/devflow-specify/commands/specify.md +179 -0
  238. package/plugins/devflow-specify/skills/agent-teams/SKILL.md +124 -0
  239. package/plugins/devflow-specify/skills/agent-teams/references/cleanup.md +104 -0
  240. package/plugins/devflow-specify/skills/agent-teams/references/communication.md +122 -0
  241. package/plugins/devflow-specify/skills/agent-teams/references/team-patterns.md +217 -0
  242. package/scripts/hooks/ambient-prompt.sh +48 -0
  243. package/scripts/hooks/background-memory-update.sh +208 -0
  244. package/scripts/hooks/ensure-memory-gitignore.sh +17 -0
  245. package/scripts/hooks/pre-compact-memory.sh +87 -0
  246. package/scripts/hooks/session-start-memory.sh +126 -0
  247. package/scripts/hooks/stop-update-memory.sh +85 -0
  248. package/shared/agents/coder.md +122 -0
  249. package/shared/agents/git.md +272 -0
  250. package/shared/agents/resolver.md +131 -0
  251. package/shared/agents/reviewer.md +119 -0
  252. package/shared/agents/scrutinizer.md +80 -0
  253. package/shared/agents/shepherd.md +94 -0
  254. package/shared/agents/simplifier.md +62 -0
  255. package/shared/agents/skimmer.md +88 -0
  256. package/shared/agents/synthesizer.md +204 -0
  257. package/shared/agents/validator.md +86 -0
  258. package/shared/skills/accessibility/SKILL.md +229 -0
  259. package/shared/skills/accessibility/references/detection.md +171 -0
  260. package/shared/skills/accessibility/references/patterns.md +670 -0
  261. package/shared/skills/accessibility/references/violations.md +419 -0
  262. package/shared/skills/agent-teams/SKILL.md +124 -0
  263. package/shared/skills/agent-teams/references/cleanup.md +104 -0
  264. package/shared/skills/agent-teams/references/communication.md +122 -0
  265. package/shared/skills/agent-teams/references/team-patterns.md +217 -0
  266. package/shared/skills/ambient-router/SKILL.md +89 -0
  267. package/shared/skills/ambient-router/references/skill-catalog.md +64 -0
  268. package/shared/skills/architecture-patterns/SKILL.md +153 -0
  269. package/shared/skills/architecture-patterns/references/detection.md +337 -0
  270. package/shared/skills/architecture-patterns/references/patterns.md +873 -0
  271. package/shared/skills/architecture-patterns/references/violations.md +575 -0
  272. package/shared/skills/complexity-patterns/SKILL.md +143 -0
  273. package/shared/skills/complexity-patterns/references/detection.md +264 -0
  274. package/shared/skills/complexity-patterns/references/patterns.md +487 -0
  275. package/shared/skills/complexity-patterns/references/violations.md +361 -0
  276. package/shared/skills/consistency-patterns/SKILL.md +140 -0
  277. package/shared/skills/consistency-patterns/references/detection.md +207 -0
  278. package/shared/skills/consistency-patterns/references/patterns.md +202 -0
  279. package/shared/skills/consistency-patterns/references/violations.md +213 -0
  280. package/shared/skills/core-patterns/SKILL.md +162 -0
  281. package/shared/skills/core-patterns/references/checklist.md +276 -0
  282. package/shared/skills/core-patterns/references/code-smell-violations.md +144 -0
  283. package/shared/skills/core-patterns/references/detection.md +303 -0
  284. package/shared/skills/core-patterns/references/patterns.md +576 -0
  285. package/shared/skills/core-patterns/references/violations.md +369 -0
  286. package/shared/skills/database-patterns/SKILL.md +134 -0
  287. package/shared/skills/database-patterns/references/detection.md +208 -0
  288. package/shared/skills/database-patterns/references/patterns.md +394 -0
  289. package/shared/skills/database-patterns/references/violations.md +332 -0
  290. package/shared/skills/dependencies-patterns/SKILL.md +141 -0
  291. package/shared/skills/dependencies-patterns/references/detection.md +181 -0
  292. package/shared/skills/dependencies-patterns/references/patterns.md +225 -0
  293. package/shared/skills/dependencies-patterns/references/violations.md +247 -0
  294. package/shared/skills/docs-framework/SKILL.md +138 -0
  295. package/shared/skills/docs-framework/references/patterns.md +346 -0
  296. package/shared/skills/docs-framework/references/violations.md +221 -0
  297. package/shared/skills/documentation-patterns/SKILL.md +125 -0
  298. package/shared/skills/documentation-patterns/references/detection.md +190 -0
  299. package/shared/skills/documentation-patterns/references/patterns.md +189 -0
  300. package/shared/skills/documentation-patterns/references/violations.md +163 -0
  301. package/shared/skills/frontend-design/SKILL.md +254 -0
  302. package/shared/skills/frontend-design/references/detection.md +184 -0
  303. package/shared/skills/frontend-design/references/patterns.md +511 -0
  304. package/shared/skills/frontend-design/references/violations.md +453 -0
  305. package/shared/skills/git-safety/SKILL.md +122 -0
  306. package/shared/skills/git-safety/references/detection.md +290 -0
  307. package/shared/skills/git-safety/references/patterns.md +289 -0
  308. package/shared/skills/git-safety/references/violations.md +18 -0
  309. package/shared/skills/git-workflow/SKILL.md +158 -0
  310. package/shared/skills/git-workflow/references/commit-patterns.md +115 -0
  311. package/shared/skills/git-workflow/references/commit-violations.md +77 -0
  312. package/shared/skills/git-workflow/references/pr-patterns.md +127 -0
  313. package/shared/skills/git-workflow/references/pr-violations.md +96 -0
  314. package/shared/skills/github-patterns/SKILL.md +153 -0
  315. package/shared/skills/github-patterns/references/patterns.md +572 -0
  316. package/shared/skills/github-patterns/references/violations.md +298 -0
  317. package/shared/skills/implementation-patterns/SKILL.md +162 -0
  318. package/shared/skills/implementation-patterns/references/patterns.md +1063 -0
  319. package/shared/skills/implementation-patterns/references/violations.md +483 -0
  320. package/shared/skills/input-validation/SKILL.md +148 -0
  321. package/shared/skills/input-validation/references/detection.md +283 -0
  322. package/shared/skills/input-validation/references/patterns.md +361 -0
  323. package/shared/skills/input-validation/references/violations.md +224 -0
  324. package/shared/skills/performance-patterns/SKILL.md +154 -0
  325. package/shared/skills/performance-patterns/references/detection.md +351 -0
  326. package/shared/skills/performance-patterns/references/patterns.md +503 -0
  327. package/shared/skills/performance-patterns/references/violations.md +354 -0
  328. package/shared/skills/react/SKILL.md +276 -0
  329. package/shared/skills/react/references/patterns.md +1331 -0
  330. package/shared/skills/react/references/violations.md +565 -0
  331. package/shared/skills/regression-patterns/SKILL.md +146 -0
  332. package/shared/skills/regression-patterns/references/detection.md +237 -0
  333. package/shared/skills/regression-patterns/references/patterns.md +226 -0
  334. package/shared/skills/regression-patterns/references/violations.md +225 -0
  335. package/shared/skills/review-methodology/SKILL.md +119 -0
  336. package/shared/skills/review-methodology/references/patterns.md +186 -0
  337. package/shared/skills/review-methodology/references/report-template.md +142 -0
  338. package/shared/skills/review-methodology/references/violations.md +125 -0
  339. package/shared/skills/security-patterns/SKILL.md +156 -0
  340. package/shared/skills/security-patterns/references/detection.md +287 -0
  341. package/shared/skills/security-patterns/references/patterns.md +507 -0
  342. package/shared/skills/security-patterns/references/violations.md +237 -0
  343. package/shared/skills/self-review/SKILL.md +149 -0
  344. package/shared/skills/self-review/references/patterns.md +405 -0
  345. package/shared/skills/self-review/references/report-template.md +253 -0
  346. package/shared/skills/self-review/references/violations.md +308 -0
  347. package/shared/skills/test-driven-development/SKILL.md +139 -0
  348. package/shared/skills/test-driven-development/references/rationalization-prevention.md +111 -0
  349. package/shared/skills/test-patterns/SKILL.md +183 -0
  350. package/shared/skills/test-patterns/references/detection.md +149 -0
  351. package/shared/skills/test-patterns/references/patterns.md +220 -0
  352. package/shared/skills/test-patterns/references/report-template.md +108 -0
  353. package/shared/skills/test-patterns/references/violations.md +221 -0
  354. package/shared/skills/typescript/SKILL.md +176 -0
  355. package/shared/skills/typescript/references/patterns.md +1105 -0
  356. package/shared/skills/typescript/references/violations.md +433 -0
  357. package/src/templates/claudeignore.template +188 -0
  358. package/src/templates/managed-settings.json +160 -0
  359. package/src/templates/settings.json +59 -0
  360. package/dist/cli.d.ts.map +0 -1
  361. package/dist/cli.js.map +0 -1
  362. package/dist/commands/init.d.ts.map +0 -1
  363. package/dist/commands/init.js.map +0 -1
  364. package/dist/commands/uninstall.d.ts.map +0 -1
  365. package/dist/commands/uninstall.js.map +0 -1
  366. package/dist/utils/git.d.ts.map +0 -1
  367. package/dist/utils/git.js.map +0 -1
  368. package/dist/utils/paths.d.ts.map +0 -1
  369. package/dist/utils/paths.js.map +0 -1
  370. package/src/claude/CLAUDE.md +0 -400
  371. package/src/claude/agents/devflow/audit-architecture.md +0 -132
  372. package/src/claude/agents/devflow/audit-complexity.md +0 -132
  373. package/src/claude/agents/devflow/audit-database.md +0 -132
  374. package/src/claude/agents/devflow/audit-dependencies.md +0 -132
  375. package/src/claude/agents/devflow/audit-documentation.md +0 -132
  376. package/src/claude/agents/devflow/audit-performance.md +0 -256
  377. package/src/claude/agents/devflow/audit-security.md +0 -259
  378. package/src/claude/agents/devflow/audit-tests.md +0 -132
  379. package/src/claude/agents/devflow/audit-typescript.md +0 -132
  380. package/src/claude/agents/devflow/brainstorm.md +0 -279
  381. package/src/claude/agents/devflow/catch-up.md +0 -345
  382. package/src/claude/agents/devflow/code-review.md +0 -307
  383. package/src/claude/agents/devflow/commit.md +0 -380
  384. package/src/claude/agents/devflow/debug.md +0 -476
  385. package/src/claude/agents/devflow/design.md +0 -491
  386. package/src/claude/agents/devflow/get-issue.md +0 -286
  387. package/src/claude/agents/devflow/pr-comments.md +0 -285
  388. package/src/claude/agents/devflow/project-state.md +0 -419
  389. package/src/claude/agents/devflow/pull-request.md +0 -493
  390. package/src/claude/agents/devflow/release.md +0 -1137
  391. package/src/claude/agents/devflow/tech-debt.md +0 -338
  392. package/src/claude/commands/devflow/brainstorm.md +0 -68
  393. package/src/claude/commands/devflow/breakdown.md +0 -125
  394. package/src/claude/commands/devflow/catch-up.md +0 -29
  395. package/src/claude/commands/devflow/code-review.md +0 -237
  396. package/src/claude/commands/devflow/commit.md +0 -17
  397. package/src/claude/commands/devflow/debug.md +0 -56
  398. package/src/claude/commands/devflow/design.md +0 -82
  399. package/src/claude/commands/devflow/devlog.md +0 -408
  400. package/src/claude/commands/devflow/get-issue.md +0 -16
  401. package/src/claude/commands/devflow/implement.md +0 -100
  402. package/src/claude/commands/devflow/plan.md +0 -223
  403. package/src/claude/commands/devflow/pull-request.md +0 -20
  404. package/src/claude/commands/devflow/release.md +0 -251
  405. package/src/claude/commands/devflow/resolve-comments.md +0 -583
  406. package/src/claude/scripts/statusline.sh +0 -47
  407. package/src/claude/settings.json +0 -6
  408. package/src/claude/skills/devflow/code-smell/SKILL.md +0 -428
  409. package/src/claude/skills/devflow/debug/SKILL.md +0 -119
  410. package/src/claude/skills/devflow/error-handling/SKILL.md +0 -597
  411. package/src/claude/skills/devflow/input-validation/SKILL.md +0 -514
  412. package/src/claude/skills/devflow/pattern-check/SKILL.md +0 -238
  413. package/src/claude/skills/devflow/research/SKILL.md +0 -138
  414. package/src/claude/skills/devflow/test-design/SKILL.md +0 -384
@@ -0,0 +1,191 @@
1
+ import { promises as fs } from 'fs';
2
+ import * as path from 'path';
3
+ const START_MARKER = '# >>> DevFlow safe-delete >>>';
4
+ const END_MARKER = '# <<< DevFlow safe-delete <<<';
5
+ /** Bump this when the safe-delete block changes. */
6
+ export const SAFE_DELETE_BLOCK_VERSION = 2;
7
+ /**
8
+ * Generate the safe-delete shell function block with markers.
9
+ * Returns null for unsupported shells.
10
+ */
11
+ export function generateSafeDeleteBlock(shell, platform, trashCommand) {
12
+ if (shell === 'unknown')
13
+ return null;
14
+ if (shell === 'bash' || shell === 'zsh') {
15
+ const cmd = trashCommand ?? 'trash';
16
+ return [
17
+ START_MARKER,
18
+ `# v${SAFE_DELETE_BLOCK_VERSION}`,
19
+ `rm() {`,
20
+ ` local files=()`,
21
+ ` for arg in "$@"; do`,
22
+ ` [[ "$arg" =~ ^- ]] || files+=("$arg")`,
23
+ ` done`,
24
+ ` local existing=()`,
25
+ ` for f in "\${files[@]}"; do`,
26
+ ` [ -e "$f" ] || [ -L "$f" ] && existing+=("$f")`,
27
+ ` done`,
28
+ ` if (( \${#existing[@]} > 0 )); then`,
29
+ ` ${cmd} "\${existing[@]}"`,
30
+ ` fi`,
31
+ `}`,
32
+ `command() {`,
33
+ ` if [[ "$1" == "rm" ]]; then`,
34
+ ` shift; rm "$@"`,
35
+ ` else`,
36
+ ` builtin command "$@"`,
37
+ ` fi`,
38
+ `}`,
39
+ END_MARKER,
40
+ ].join('\n');
41
+ }
42
+ if (shell === 'fish') {
43
+ const cmd = trashCommand ?? 'trash';
44
+ return [
45
+ START_MARKER,
46
+ `# v${SAFE_DELETE_BLOCK_VERSION}`,
47
+ `function rm --description "Safe delete via trash"`,
48
+ ` set -l files`,
49
+ ` for arg in $argv`,
50
+ ` if not string match -q -- '-*' $arg`,
51
+ ` set files $files $arg`,
52
+ ` end`,
53
+ ` end`,
54
+ ` set -l existing`,
55
+ ` for f in $files`,
56
+ ` if test -e $f; or test -L $f`,
57
+ ` set existing $existing $f`,
58
+ ` end`,
59
+ ` end`,
60
+ ` if test (count $existing) -gt 0`,
61
+ ` ${cmd} $existing`,
62
+ ` end`,
63
+ `end`,
64
+ END_MARKER,
65
+ ].join('\n');
66
+ }
67
+ if (shell === 'powershell') {
68
+ if (platform === 'win32') {
69
+ return [
70
+ START_MARKER,
71
+ `# v${SAFE_DELETE_BLOCK_VERSION}`,
72
+ `if (Get-Alias rm -ErrorAction SilentlyContinue) {`,
73
+ ` Remove-Alias rm -Force -Scope Global`,
74
+ `}`,
75
+ `function rm {`,
76
+ ` $files = $args | Where-Object { $_ -notlike '-*' }`,
77
+ ` if ($files) {`,
78
+ ` Add-Type -AssemblyName Microsoft.VisualBasic`,
79
+ ` foreach ($f in $files) {`,
80
+ ` $p = Resolve-Path $f -ErrorAction SilentlyContinue`,
81
+ ` if ($p) {`,
82
+ ` if (Test-Path $p -PathType Container) {`,
83
+ ` [Microsoft.VisualBasic.FileIO.FileSystem]::DeleteDirectory(`,
84
+ ` $p, 'OnlyErrorDialogs', 'SendToRecycleBin')`,
85
+ ` } else {`,
86
+ ` [Microsoft.VisualBasic.FileIO.FileSystem]::DeleteFile(`,
87
+ ` $p, 'OnlyErrorDialogs', 'SendToRecycleBin')`,
88
+ ` }`,
89
+ ` }`,
90
+ ` }`,
91
+ ` }`,
92
+ `}`,
93
+ END_MARKER,
94
+ ].join('\n');
95
+ }
96
+ // macOS/Linux PowerShell
97
+ const cmd = trashCommand ?? 'trash';
98
+ return [
99
+ START_MARKER,
100
+ `# v${SAFE_DELETE_BLOCK_VERSION}`,
101
+ `if (Get-Alias rm -ErrorAction SilentlyContinue) {`,
102
+ ` Remove-Alias rm -Force -Scope Global`,
103
+ `}`,
104
+ `function rm {`,
105
+ ` $files = $args | Where-Object { $_ -notlike '-*' }`,
106
+ ` $existing = $files | Where-Object { Test-Path $_ }`,
107
+ ` if ($existing) { & ${cmd} @existing }`,
108
+ `}`,
109
+ END_MARKER,
110
+ ].join('\n');
111
+ }
112
+ return null;
113
+ }
114
+ /**
115
+ * Check if the safe-delete block is already installed in a profile file.
116
+ */
117
+ export async function isAlreadyInstalled(profilePath) {
118
+ try {
119
+ const content = await fs.readFile(profilePath, 'utf-8');
120
+ return content.includes(START_MARKER) && content.includes(END_MARKER);
121
+ }
122
+ catch {
123
+ return false;
124
+ }
125
+ }
126
+ /**
127
+ * Append the safe-delete block to a profile file.
128
+ * Creates parent directories and the file if they don't exist.
129
+ */
130
+ export async function installToProfile(profilePath, block) {
131
+ await fs.mkdir(path.dirname(profilePath), { recursive: true });
132
+ let existing = '';
133
+ try {
134
+ existing = await fs.readFile(profilePath, 'utf-8');
135
+ }
136
+ catch {
137
+ // File doesn't exist yet — will be created
138
+ }
139
+ const separator = existing.length > 0 && !existing.endsWith('\n') ? '\n\n' : '\n';
140
+ const content = existing.length > 0 ? existing + separator + block + '\n' : block + '\n';
141
+ await fs.writeFile(profilePath, content, 'utf-8');
142
+ }
143
+ /**
144
+ * Extract the installed safe-delete block version from a profile file.
145
+ * Returns 0 (not installed), 1 (legacy block without version stamp), or N (versioned block).
146
+ */
147
+ export async function getInstalledVersion(profilePath) {
148
+ try {
149
+ const content = await fs.readFile(profilePath, 'utf-8');
150
+ const startIdx = content.indexOf(START_MARKER);
151
+ if (startIdx === -1)
152
+ return 0;
153
+ const afterMarker = content.slice(startIdx + START_MARKER.length);
154
+ const match = afterMarker.match(/^\n# v(\d+)/);
155
+ return match ? parseInt(match[1], 10) : 1;
156
+ }
157
+ catch {
158
+ return 0;
159
+ }
160
+ }
161
+ /**
162
+ * Remove the safe-delete block from a profile file.
163
+ * Returns true if the block was found and removed, false otherwise.
164
+ * For fish function files, deletes the file if it becomes empty.
165
+ */
166
+ export async function removeFromProfile(profilePath) {
167
+ let content;
168
+ try {
169
+ content = await fs.readFile(profilePath, 'utf-8');
170
+ }
171
+ catch {
172
+ return false;
173
+ }
174
+ const startIdx = content.indexOf(START_MARKER);
175
+ const endIdx = content.indexOf(END_MARKER);
176
+ if (startIdx === -1 || endIdx === -1)
177
+ return false;
178
+ const before = content.slice(0, startIdx);
179
+ const after = content.slice(endIdx + END_MARKER.length);
180
+ // Clean up surrounding whitespace
181
+ const cleaned = (before.trimEnd() + after.trimStart()).trim();
182
+ if (cleaned.length === 0) {
183
+ // File is empty after removal — delete it (fish function files)
184
+ await fs.unlink(profilePath);
185
+ }
186
+ else {
187
+ await fs.writeFile(profilePath, cleaned + '\n', 'utf-8');
188
+ }
189
+ return true;
190
+ }
191
+ //# sourceMappingURL=safe-delete-install.js.map
@@ -0,0 +1,12 @@
1
+ export type Platform = 'macos' | 'linux' | 'windows';
2
+ export type Shell = 'zsh' | 'bash' | 'fish' | 'powershell' | 'unknown';
3
+ export interface SafeDeleteInfo {
4
+ command: string | null;
5
+ installHint: string | null;
6
+ }
7
+ export declare function detectPlatform(): Platform;
8
+ export declare function detectShell(): Shell;
9
+ export declare function getProfilePath(shell: Shell): string | null;
10
+ export declare function getSafeDeleteInfo(platform: Platform): SafeDeleteInfo;
11
+ export declare function hasSafeDelete(platform: Platform): boolean;
12
+ //# sourceMappingURL=safe-delete.d.ts.map
@@ -0,0 +1,83 @@
1
+ import { execSync } from 'child_process';
2
+ import { homedir } from 'os';
3
+ import * as path from 'path';
4
+ export function detectPlatform() {
5
+ switch (process.platform) {
6
+ case 'darwin': return 'macos';
7
+ case 'win32': return 'windows';
8
+ default: return 'linux';
9
+ }
10
+ }
11
+ export function detectShell() {
12
+ // PowerShell detection via PSModulePath (set in all PowerShell sessions)
13
+ if (process.env.PSModulePath) {
14
+ return 'powershell';
15
+ }
16
+ const shellPath = process.env.SHELL;
17
+ if (!shellPath)
18
+ return 'unknown';
19
+ const shellName = path.basename(shellPath);
20
+ switch (shellName) {
21
+ case 'zsh': return 'zsh';
22
+ case 'bash': return 'bash';
23
+ case 'fish': return 'fish';
24
+ default: return 'unknown';
25
+ }
26
+ }
27
+ export function getProfilePath(shell) {
28
+ const home = process.env.HOME || homedir();
29
+ switch (shell) {
30
+ case 'zsh':
31
+ return path.join(home, '.zshrc');
32
+ case 'bash':
33
+ return path.join(home, '.bashrc');
34
+ case 'fish':
35
+ return path.join(home, '.config', 'fish', 'functions', 'rm.fish');
36
+ case 'powershell': {
37
+ // PowerShell profile path varies by platform
38
+ if (process.platform === 'win32') {
39
+ const docs = process.env.USERPROFILE
40
+ ? path.join(process.env.USERPROFILE, 'Documents')
41
+ : path.join(home, 'Documents');
42
+ return path.join(docs, 'PowerShell', 'Microsoft.PowerShell_profile.ps1');
43
+ }
44
+ return path.join(home, '.config', 'powershell', 'Microsoft.PowerShell_profile.ps1');
45
+ }
46
+ case 'unknown':
47
+ return null;
48
+ }
49
+ }
50
+ export function getSafeDeleteInfo(platform) {
51
+ switch (platform) {
52
+ case 'macos':
53
+ return {
54
+ command: 'trash',
55
+ installHint: 'brew install trash-cli',
56
+ };
57
+ case 'linux':
58
+ return {
59
+ command: 'trash-put',
60
+ installHint: 'sudo apt install trash-cli # or: npm install -g trash-cli',
61
+ };
62
+ case 'windows':
63
+ return {
64
+ command: null,
65
+ installHint: null,
66
+ };
67
+ }
68
+ }
69
+ export function hasSafeDelete(platform) {
70
+ if (platform === 'windows')
71
+ return true; // Windows has recycle bin via .NET
72
+ const info = getSafeDeleteInfo(platform);
73
+ if (!info.command)
74
+ return false;
75
+ try {
76
+ execSync(`which ${info.command}`, { stdio: 'ignore' });
77
+ return true;
78
+ }
79
+ catch {
80
+ return false;
81
+ }
82
+ }
83
+ //# sourceMappingURL=safe-delete.js.map
package/package.json CHANGED
@@ -1,25 +1,31 @@
1
1
  {
2
2
  "name": "devflow-kit",
3
- "version": "0.9.0",
3
+ "version": "1.1.0",
4
4
  "description": "Agentic Development Toolkit for Claude Code - Enhance AI-assisted development with intelligent commands and workflows",
5
- "main": "dist/index.js",
6
5
  "type": "module",
7
6
  "bin": {
8
7
  "devflow": "dist/cli.js"
9
8
  },
10
9
  "files": [
11
10
  "dist/",
12
- "src/claude/",
11
+ "!dist/**/*.map",
12
+ "plugins/",
13
+ "shared/",
14
+ "scripts/hooks/",
15
+ "src/templates/",
13
16
  "README.md",
14
17
  "LICENSE",
15
18
  "CHANGELOG.md"
16
19
  ],
17
20
  "scripts": {
18
- "build": "tsc",
21
+ "build": "npm run build:cli && npm run build:plugins",
22
+ "build:cli": "tsc",
23
+ "build:plugins": "npx tsx scripts/build-plugins.ts",
19
24
  "dev": "tsc --watch",
20
25
  "cli": "node dist/cli.js",
21
26
  "prepublishOnly": "npm run build",
22
- "test": "echo \"No tests yet\" && exit 0"
27
+ "test": "vitest run",
28
+ "test:watch": "vitest"
23
29
  },
24
30
  "keywords": [
25
31
  "claude",
@@ -40,15 +46,19 @@
40
46
  "bugs": {
41
47
  "url": "https://github.com/dean0x/devflow/issues"
42
48
  },
43
- "homepage": "https://github.com/dean0x/devflow#readme",
49
+ "homepage": "https://dean0x.github.io/x/devflow/",
44
50
  "engines": {
45
51
  "node": ">=18.0.0"
46
52
  },
47
53
  "dependencies": {
48
- "commander": "^12.0.0"
54
+ "@clack/prompts": "^0.9.1",
55
+ "commander": "^12.0.0",
56
+ "picocolors": "^1.1.1"
49
57
  },
50
58
  "devDependencies": {
51
59
  "@types/node": "^20.11.0",
52
- "typescript": "^5.3.3"
60
+ "tsx": "^4.7.0",
61
+ "typescript": "^5.3.3",
62
+ "vitest": "^4.0.18"
53
63
  }
54
64
  }
@@ -0,0 +1,7 @@
1
+ {
2
+ "name": "devflow-ambient",
3
+ "description": "Ambient mode — auto-loads relevant skills for every prompt",
4
+ "version": "1.1.0",
5
+ "agents": [],
6
+ "skills": ["ambient-router"]
7
+ }
@@ -0,0 +1,49 @@
1
+ # devflow-ambient
2
+
3
+ Ambient mode — auto-loads relevant skills based on each prompt, no explicit commands needed.
4
+
5
+ ## Command
6
+
7
+ ### `/ambient`
8
+
9
+ Classify user intent and apply proportional skill enforcement to any prompt.
10
+
11
+ ```bash
12
+ /ambient add a login form # BUILD/STANDARD — loads TDD + implementation-patterns
13
+ /ambient fix the auth error # DEBUG/STANDARD — loads test-patterns + core-patterns
14
+ /ambient where is the config? # EXPLORE/QUICK — responds normally, zero overhead
15
+ /ambient refactor the auth system # BUILD/ESCALATE — suggests /implement
16
+ ```
17
+
18
+ ## Always-On Mode
19
+
20
+ Enable ambient classification on every prompt without typing `/ambient`:
21
+
22
+ ```bash
23
+ devflow ambient --enable # Register UserPromptSubmit hook
24
+ devflow ambient --disable # Remove hook
25
+ devflow ambient --status # Check if enabled
26
+ ```
27
+
28
+ When enabled, a `UserPromptSubmit` hook injects a classification preamble before every prompt. Slash commands (`/implement`, `/code-review`, etc.) and short confirmations ("yes", "ok") are skipped automatically.
29
+
30
+ ## How It Works
31
+
32
+ 1. **Classify intent** — BUILD, DEBUG, REVIEW, PLAN, EXPLORE, or CHAT
33
+ 2. **Classify depth** — QUICK (zero overhead), STANDARD (2-3 skills), or ESCALATE (workflow nudge)
34
+ 3. **Apply proportionally**:
35
+ - QUICK: respond normally
36
+ - STANDARD: load relevant skills, enforce TDD for BUILD
37
+ - ESCALATE: respond + recommend full workflow command
38
+
39
+ ## Depth Tiers
40
+
41
+ | Depth | When | Overhead |
42
+ |-------|------|----------|
43
+ | QUICK | Chat, simple exploration, git/devops ops, single-word confirmations | ~0 tokens |
44
+ | STANDARD | BUILD/DEBUG/REVIEW/PLAN, 1-5 file scope | ~500-1000 tokens (skill reads) |
45
+ | ESCALATE | Multi-file, architectural, system-wide scope | ~0 extra tokens (nudge only) |
46
+
47
+ ## Skills
48
+
49
+ - `ambient-router` — Intent + depth classification, skill selection matrix
@@ -0,0 +1,110 @@
1
+ ---
2
+ description: Ambient mode — classify intent and auto-load relevant skills for any prompt
3
+ ---
4
+
5
+ # Ambient Command
6
+
7
+ Classify user intent and auto-load relevant skills. No agents spawned — enhances the main session only.
8
+
9
+ ## Usage
10
+
11
+ ```
12
+ /ambient <prompt> Classify and respond with skill enforcement
13
+ /ambient Show usage
14
+ ```
15
+
16
+ ## Phases
17
+
18
+ ### Phase 1: Load Router
19
+
20
+ Read the `ambient-router` skill:
21
+ - `~/.claude/skills/ambient-router/SKILL.md`
22
+
23
+ ### Phase 2: Classify
24
+
25
+ Apply the ambient-router classification to `$ARGUMENTS`:
26
+
27
+ 1. **Intent:** BUILD | DEBUG | REVIEW | PLAN | EXPLORE | CHAT
28
+ 2. **Depth:** QUICK | STANDARD | ESCALATE
29
+
30
+ If no arguments provided, output:
31
+
32
+ ```
33
+ ## Ambient Mode
34
+
35
+ Classify intent and auto-load relevant skills.
36
+
37
+ Usage: /ambient <your prompt>
38
+
39
+ Examples:
40
+ /ambient add a login form → BUILD/STANDARD (loads TDD + implementation-patterns)
41
+ /ambient fix the auth error → DEBUG/STANDARD (loads test-patterns + core-patterns)
42
+ /ambient where is the config? → EXPLORE/QUICK (responds normally)
43
+ /ambient refactor the auth system → BUILD/ESCALATE (suggests /implement)
44
+
45
+ Always-on: devflow ambient --enable
46
+ ```
47
+
48
+ Then stop.
49
+
50
+ ### Phase 3: State Classification
51
+
52
+ - **QUICK:** Skip this phase entirely. Respond directly in Phase 4.
53
+ - **STANDARD:** Output one line: `Ambient: {INTENT}/{DEPTH}. Loading: {skill1}, {skill2}.`
54
+ - **ESCALATE:** Skip — recommendation happens in Phase 4.
55
+
56
+ ### Phase 4: Apply
57
+
58
+ **QUICK:**
59
+ Respond to the user's prompt normally. Zero skill loading. Zero overhead.
60
+
61
+ **STANDARD:**
62
+ Read the selected skills based on the ambient-router's skill selection matrix:
63
+
64
+ | Intent | Primary Skills | Secondary (conditional) |
65
+ |--------|---------------|------------------------|
66
+ | BUILD | test-driven-development, implementation-patterns | typescript (.ts), react (.tsx), frontend-design (CSS/UI), input-validation (forms/API), security-patterns (auth/crypto) |
67
+ | DEBUG | test-patterns, core-patterns | git-safety (if git ops) |
68
+ | REVIEW | self-review, core-patterns | test-patterns |
69
+ | PLAN | implementation-patterns | core-patterns |
70
+
71
+ Read up to 3 skills from `~/.claude/skills/{name}/SKILL.md`. Apply their patterns and constraints when responding to the user's prompt.
72
+
73
+ For BUILD intent: enforce RED-GREEN-REFACTOR from test-driven-development. Write failing tests before production code.
74
+
75
+ **ESCALATE:**
76
+ Respond to the user's prompt with your best effort, then append:
77
+
78
+ > This task spans multiple files/systems. Consider `/implement` for full lifecycle management (exploration → planning → implementation → review).
79
+
80
+ ## Architecture
81
+
82
+ ```
83
+ /ambient <prompt> (main session, no agents)
84
+
85
+ ├─ Phase 1: Load ambient-router skill
86
+ ├─ Phase 2: Classify intent + depth
87
+ ├─ Phase 3: State classification (STANDARD only)
88
+ └─ Phase 4: Apply
89
+ ├─ QUICK → respond directly
90
+ ├─ STANDARD → load 2-3 skills, apply patterns, respond
91
+ └─ ESCALATE → respond + workflow nudge
92
+ ```
93
+
94
+ ## Edge Cases
95
+
96
+ | Case | Handling |
97
+ |------|----------|
98
+ | No arguments | Show usage and stop |
99
+ | Single word ("help") | Classify — likely CHAT/QUICK |
100
+ | Prompt references `/implement` etc. | Classify as normal — user chose /ambient intentionally |
101
+ | Mixed intent ("fix and add test") | Use higher-overhead intent (BUILD > DEBUG) |
102
+ | User says "no enforcement" | Respect immediately — treat as QUICK |
103
+
104
+ ## Principles
105
+
106
+ 1. **No agents** — Ambient enhances the main session, never spawns subagents
107
+ 2. **Proportional** — QUICK gets zero overhead, STANDARD gets 2-3 skills, ESCALATE gets a nudge
108
+ 3. **Transparent** — State classification for STANDARD/ESCALATE, silent for QUICK
109
+ 4. **Respectful** — Never over-classify; when in doubt, go one tier lower
110
+ 5. **TDD for BUILD** — STANDARD depth BUILD tasks enforce test-first workflow
@@ -0,0 +1,89 @@
1
+ ---
2
+ name: ambient-router
3
+ description: >-
4
+ Classify user intent and response depth for ambient mode. Auto-loads relevant
5
+ skills without explicit command invocation. Used by /ambient command and
6
+ always-on UserPromptSubmit hook.
7
+ user-invocable: false
8
+ allowed-tools: Read, Grep, Glob
9
+ ---
10
+
11
+ # Ambient Router
12
+
13
+ Classify user intent and auto-load relevant skills. Zero overhead for simple requests, skill injection for substantive work, workflow nudges for complex tasks.
14
+
15
+ ## Iron Law
16
+
17
+ > **PROPORTIONAL RESPONSE**
18
+ >
19
+ > Match effort to intent. Never apply heavyweight processes to lightweight requests.
20
+ > A chat question gets zero overhead. A 3-file feature gets 2-3 skills. A system
21
+ > refactor gets a nudge toward `/implement`. Misclassification in either direction
22
+ > is a failure.
23
+
24
+ ---
25
+
26
+ ## Step 1: Classify Intent
27
+
28
+ Determine what the user is trying to do from their prompt.
29
+
30
+ | Intent | Signal Words / Patterns | Examples |
31
+ |--------|------------------------|---------|
32
+ | **BUILD** | "add", "create", "implement", "build", "write", "make" | "add a login form", "create an API endpoint" |
33
+ | **DEBUG** | "fix", "bug", "broken", "failing", "error", "why does" | "fix the auth error", "why is this test failing" |
34
+ | **REVIEW** | "check", "look at", "review", "is this ok", "any issues" | "check this function", "any issues with this?" |
35
+ | **PLAN** | "how should", "design", "architecture", "approach", "strategy" | "how should I structure auth?", "what's the approach for caching?" |
36
+ | **EXPLORE** | "what is", "where is", "find", "show me", "explain", "how does" | "where is the config?", "explain this function" |
37
+ | **CHAT** | greetings, meta-questions, confirmations, short responses | "thanks", "yes", "what can you do?" |
38
+
39
+ **Ambiguous prompts:** Default to the lowest-overhead classification. "Update the README" → BUILD/STANDARD. Git operations like "commit this" → QUICK.
40
+
41
+ ## Step 2: Classify Depth
42
+
43
+ Determine how much enforcement the prompt warrants.
44
+
45
+ | Depth | Criteria | Action |
46
+ |-------|----------|--------|
47
+ | **QUICK** | CHAT intent. EXPLORE with no analytical depth ("where is X?"). Git/devops operations (commit, push, merge, branch, pr, deploy, reinstall). Single-word continuations. | Respond normally. Zero overhead. Do not state classification. |
48
+ | **STANDARD** | BUILD/DEBUG/REVIEW/PLAN intent (any word count). EXPLORE with analytical depth ("analyze our X", "discuss how Y works"). | Read and apply 2-3 relevant skills from the selection matrix below. State classification briefly. |
49
+ | **ESCALATE** | Multi-file architectural change, system-wide scope, > 5 files. Detailed implementation plan (100+ words with plan structure). | Respond at best effort + recommend: "This looks like it would benefit from `/implement` for full lifecycle management." |
50
+
51
+ ## Step 3: Select Skills (STANDARD depth only)
52
+
53
+ Based on classified intent, read the following skills to inform your response.
54
+
55
+ | Intent | Primary Skills | Secondary (if file type matches) |
56
+ |--------|---------------|----------------------------------|
57
+ | **BUILD** | test-driven-development, implementation-patterns | typescript (.ts), react (.tsx/.jsx), frontend-design (CSS/UI), input-validation (forms/API), security-patterns (auth/crypto) |
58
+ | **DEBUG** | test-patterns, core-patterns | git-safety (if git operations involved) |
59
+ | **REVIEW** | self-review, core-patterns | test-patterns |
60
+ | **PLAN** | implementation-patterns | core-patterns |
61
+
62
+ **Excluded from ambient** (review-command-only): review-methodology, complexity-patterns, consistency-patterns, database-patterns, dependencies-patterns, documentation-patterns, regression-patterns, architecture-patterns, accessibility.
63
+
64
+ See `references/skill-catalog.md` for the full skill-to-intent mapping with file pattern triggers.
65
+
66
+ ## Step 4: Apply
67
+
68
+ - **QUICK:** Respond directly. No preamble, no classification statement.
69
+ - **STANDARD:** State classification briefly: `Ambient: BUILD/STANDARD. Loading: test-driven-development, implementation-patterns.` Then read the selected skills and apply their patterns to your response. For BUILD intent, enforce RED-GREEN-REFACTOR from test-driven-development.
70
+ - **ESCALATE:** Respond with your best effort, then append: `> This task spans multiple files/systems. Consider \`/implement\` for full lifecycle (exploration → planning → implementation → review).`
71
+
72
+ ---
73
+
74
+ ## Transparency Rules
75
+
76
+ 1. **QUICK → silent.** No classification output.
77
+ 2. **STANDARD → brief statement.** One line: intent, depth, skills loaded.
78
+ 3. **ESCALATE → recommendation.** Best-effort response + workflow nudge.
79
+ 4. **Never lie about classification.** If uncertain, say so.
80
+ 5. **Never over-classify.** When in doubt, go one tier lower.
81
+
82
+ ## Edge Cases
83
+
84
+ | Case | Handling |
85
+ |------|----------|
86
+ | Mixed intent ("fix this bug and add a test") | Use the higher-overhead intent (BUILD > DEBUG) |
87
+ | Continuation of previous conversation | Inherit previous classification unless prompt clearly shifts |
88
+ | User explicitly requests no enforcement | Respect immediately — classify as QUICK |
89
+ | Prompt references specific DevFlow command | Skip ambient — the command has its own orchestration |
@@ -0,0 +1,64 @@
1
+ # Ambient Router — Skill Catalog
2
+
3
+ Full mapping of DevFlow skills to ambient intents and file-type triggers. The ambient-router SKILL.md references this for detailed selection logic.
4
+
5
+ ## Skills Available for Ambient Loading
6
+
7
+ These skills may be loaded during STANDARD-depth ambient routing.
8
+
9
+ ### BUILD Intent
10
+
11
+ | Skill | When to Load | File Patterns |
12
+ |-------|-------------|---------------|
13
+ | test-driven-development | Always for BUILD | `*.ts`, `*.tsx`, `*.js`, `*.jsx`, `*.py` |
14
+ | implementation-patterns | Always for BUILD | Any code file |
15
+ | typescript | TypeScript files in scope | `*.ts`, `*.tsx` |
16
+ | react | React components in scope | `*.tsx`, `*.jsx` |
17
+ | frontend-design | UI/styling work | `*.css`, `*.scss`, `*.tsx` with styling keywords |
18
+ | input-validation | Forms, APIs, user input | Files with form/input/validation keywords |
19
+ | security-patterns | Auth, crypto, secrets | Files with auth/token/crypto/password keywords |
20
+
21
+ ### DEBUG Intent
22
+
23
+ | Skill | When to Load | File Patterns |
24
+ |-------|-------------|---------------|
25
+ | test-patterns | Always for DEBUG | Any test-related context |
26
+ | core-patterns | Always for DEBUG | Any code file |
27
+ | git-safety | Git operations involved | User mentions git, rebase, merge, etc. |
28
+
29
+ ### REVIEW Intent
30
+
31
+ | Skill | When to Load | File Patterns |
32
+ |-------|-------------|---------------|
33
+ | self-review | Always for REVIEW | Any code file |
34
+ | core-patterns | Always for REVIEW | Any code file |
35
+ | test-patterns | Test files in scope | `*.test.*`, `*.spec.*` |
36
+
37
+ ### PLAN Intent
38
+
39
+ | Skill | When to Load | File Patterns |
40
+ |-------|-------------|---------------|
41
+ | implementation-patterns | Always for PLAN | Any planning context |
42
+ | core-patterns | Architectural planning | System design discussions |
43
+
44
+ ## Skills Excluded from Ambient
45
+
46
+ These skills are loaded only by explicit DevFlow commands (primarily `/code-review`):
47
+
48
+ - review-methodology — Full review process (6-step, 3-category classification)
49
+ - complexity-patterns — Cyclomatic complexity, deep nesting analysis
50
+ - consistency-patterns — Naming convention, pattern deviation detection
51
+ - database-patterns — Index analysis, query optimization, migration safety
52
+ - dependencies-patterns — CVE detection, license audit, outdated packages
53
+ - documentation-patterns — Doc drift, stale comments, missing API docs
54
+ - regression-patterns — Lost functionality, broken exports, behavioral changes
55
+ - architecture-patterns — SOLID analysis, coupling detection, layering issues
56
+ - accessibility — WCAG compliance, ARIA roles, keyboard navigation
57
+ - performance-patterns — N+1 queries, memory leaks, caching opportunities
58
+
59
+ ## Selection Limits
60
+
61
+ - **Maximum 3 skills** per ambient response (primary + up to 2 secondary)
62
+ - **Primary skills** are always loaded for the classified intent
63
+ - **Secondary skills** are loaded only when file patterns match conversation context
64
+ - If more than 3 skills seem relevant, this is an ESCALATE signal
@@ -0,0 +1,7 @@
1
+ {
2
+ "name": "devflow-audit-claude",
3
+ "description": "Audit CLAUDE.md files against Anthropic best practices",
4
+ "version": "1.1.0",
5
+ "agents": [],
6
+ "skills": []
7
+ }