compound-engineering-pi 0.2.3

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 (332) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +124 -0
  3. package/bin/compound-engineering-pi +12 -0
  4. package/bin/compound-plugin +12 -0
  5. package/compound-engineering-pi +12 -0
  6. package/compound-plugin +5 -0
  7. package/docs/pi.md +152 -0
  8. package/extensions/compound-engineering-compat.ts +452 -0
  9. package/package.json +84 -0
  10. package/pi-resources/compound-engineering/mcporter.json +7 -0
  11. package/plugins/coding-tutor/.claude-plugin/plugin.json +9 -0
  12. package/plugins/coding-tutor/README.md +37 -0
  13. package/plugins/coding-tutor/commands/quiz-me.md +1 -0
  14. package/plugins/coding-tutor/commands/sync-tutorials.md +25 -0
  15. package/plugins/coding-tutor/commands/teach-me.md +1 -0
  16. package/plugins/coding-tutor/skills/coding-tutor/SKILL.md +214 -0
  17. package/plugins/coding-tutor/skills/coding-tutor/scripts/create_tutorial.py +207 -0
  18. package/plugins/coding-tutor/skills/coding-tutor/scripts/index_tutorials.py +193 -0
  19. package/plugins/coding-tutor/skills/coding-tutor/scripts/quiz_priority.py +190 -0
  20. package/plugins/coding-tutor/skills/coding-tutor/scripts/setup_tutorials.py +118 -0
  21. package/plugins/compound-engineering/.claude-plugin/plugin.json +33 -0
  22. package/plugins/compound-engineering/CHANGELOG.md +457 -0
  23. package/plugins/compound-engineering/CLAUDE.md +89 -0
  24. package/plugins/compound-engineering/LICENSE +21 -0
  25. package/plugins/compound-engineering/README.md +232 -0
  26. package/plugins/compound-engineering/agents/design/design-implementation-reviewer.md +109 -0
  27. package/plugins/compound-engineering/agents/design/design-iterator.md +224 -0
  28. package/plugins/compound-engineering/agents/design/figma-design-sync.md +190 -0
  29. package/plugins/compound-engineering/agents/docs/ankane-readme-writer.md +65 -0
  30. package/plugins/compound-engineering/agents/research/best-practices-researcher.md +126 -0
  31. package/plugins/compound-engineering/agents/research/framework-docs-researcher.md +106 -0
  32. package/plugins/compound-engineering/agents/research/git-history-analyzer.md +59 -0
  33. package/plugins/compound-engineering/agents/research/learnings-researcher.md +264 -0
  34. package/plugins/compound-engineering/agents/research/repo-research-analyst.md +135 -0
  35. package/plugins/compound-engineering/agents/review/agent-native-reviewer.md +261 -0
  36. package/plugins/compound-engineering/agents/review/architecture-strategist.md +67 -0
  37. package/plugins/compound-engineering/agents/review/code-simplicity-reviewer.md +101 -0
  38. package/plugins/compound-engineering/agents/review/data-integrity-guardian.md +85 -0
  39. package/plugins/compound-engineering/agents/review/data-migration-expert.md +112 -0
  40. package/plugins/compound-engineering/agents/review/deployment-verification-agent.md +174 -0
  41. package/plugins/compound-engineering/agents/review/dhh-rails-reviewer.md +66 -0
  42. package/plugins/compound-engineering/agents/review/julik-frontend-races-reviewer.md +221 -0
  43. package/plugins/compound-engineering/agents/review/kieran-python-reviewer.md +133 -0
  44. package/plugins/compound-engineering/agents/review/kieran-rails-reviewer.md +115 -0
  45. package/plugins/compound-engineering/agents/review/kieran-typescript-reviewer.md +124 -0
  46. package/plugins/compound-engineering/agents/review/pattern-recognition-specialist.md +72 -0
  47. package/plugins/compound-engineering/agents/review/performance-oracle.md +137 -0
  48. package/plugins/compound-engineering/agents/review/schema-drift-detector.md +154 -0
  49. package/plugins/compound-engineering/agents/review/security-sentinel.md +114 -0
  50. package/plugins/compound-engineering/agents/workflow/bug-reproduction-validator.md +82 -0
  51. package/plugins/compound-engineering/agents/workflow/every-style-editor.md +64 -0
  52. package/plugins/compound-engineering/agents/workflow/lint.md +16 -0
  53. package/plugins/compound-engineering/agents/workflow/pr-comment-resolver.md +84 -0
  54. package/plugins/compound-engineering/agents/workflow/spec-flow-analyzer.md +134 -0
  55. package/plugins/compound-engineering/commands/agent-native-audit.md +278 -0
  56. package/plugins/compound-engineering/commands/changelog.md +138 -0
  57. package/plugins/compound-engineering/commands/create-agent-skill.md +9 -0
  58. package/plugins/compound-engineering/commands/deepen-plan.md +546 -0
  59. package/plugins/compound-engineering/commands/deploy-docs.md +113 -0
  60. package/plugins/compound-engineering/commands/feature-video.md +342 -0
  61. package/plugins/compound-engineering/commands/generate_command.md +163 -0
  62. package/plugins/compound-engineering/commands/heal-skill.md +143 -0
  63. package/plugins/compound-engineering/commands/lfg.md +20 -0
  64. package/plugins/compound-engineering/commands/release-docs.md +212 -0
  65. package/plugins/compound-engineering/commands/report-bug.md +151 -0
  66. package/plugins/compound-engineering/commands/reproduce-bug.md +100 -0
  67. package/plugins/compound-engineering/commands/resolve_parallel.md +35 -0
  68. package/plugins/compound-engineering/commands/resolve_todo_parallel.md +37 -0
  69. package/plugins/compound-engineering/commands/slfg.md +32 -0
  70. package/plugins/compound-engineering/commands/technical_review.md +8 -0
  71. package/plugins/compound-engineering/commands/test-browser.md +339 -0
  72. package/plugins/compound-engineering/commands/test-xcode.md +332 -0
  73. package/plugins/compound-engineering/commands/triage.md +311 -0
  74. package/plugins/compound-engineering/commands/workflows/brainstorm.md +124 -0
  75. package/plugins/compound-engineering/commands/workflows/compound.md +239 -0
  76. package/plugins/compound-engineering/commands/workflows/plan.md +551 -0
  77. package/plugins/compound-engineering/commands/workflows/review.md +526 -0
  78. package/plugins/compound-engineering/commands/workflows/work.md +433 -0
  79. package/plugins/compound-engineering/skills/agent-browser/SKILL.md +223 -0
  80. package/plugins/compound-engineering/skills/agent-native-architecture/SKILL.md +435 -0
  81. package/plugins/compound-engineering/skills/agent-native-architecture/references/action-parity-discipline.md +409 -0
  82. package/plugins/compound-engineering/skills/agent-native-architecture/references/agent-execution-patterns.md +467 -0
  83. package/plugins/compound-engineering/skills/agent-native-architecture/references/agent-native-testing.md +582 -0
  84. package/plugins/compound-engineering/skills/agent-native-architecture/references/architecture-patterns.md +478 -0
  85. package/plugins/compound-engineering/skills/agent-native-architecture/references/dynamic-context-injection.md +338 -0
  86. package/plugins/compound-engineering/skills/agent-native-architecture/references/files-universal-interface.md +301 -0
  87. package/plugins/compound-engineering/skills/agent-native-architecture/references/from-primitives-to-domain-tools.md +359 -0
  88. package/plugins/compound-engineering/skills/agent-native-architecture/references/mcp-tool-design.md +506 -0
  89. package/plugins/compound-engineering/skills/agent-native-architecture/references/mobile-patterns.md +871 -0
  90. package/plugins/compound-engineering/skills/agent-native-architecture/references/product-implications.md +443 -0
  91. package/plugins/compound-engineering/skills/agent-native-architecture/references/refactoring-to-prompt-native.md +317 -0
  92. package/plugins/compound-engineering/skills/agent-native-architecture/references/self-modification.md +269 -0
  93. package/plugins/compound-engineering/skills/agent-native-architecture/references/shared-workspace-architecture.md +680 -0
  94. package/plugins/compound-engineering/skills/agent-native-architecture/references/system-prompt-design.md +250 -0
  95. package/plugins/compound-engineering/skills/andrew-kane-gem-writer/SKILL.md +184 -0
  96. package/plugins/compound-engineering/skills/andrew-kane-gem-writer/references/database-adapters.md +231 -0
  97. package/plugins/compound-engineering/skills/andrew-kane-gem-writer/references/module-organization.md +121 -0
  98. package/plugins/compound-engineering/skills/andrew-kane-gem-writer/references/rails-integration.md +183 -0
  99. package/plugins/compound-engineering/skills/andrew-kane-gem-writer/references/resources.md +119 -0
  100. package/plugins/compound-engineering/skills/andrew-kane-gem-writer/references/testing-patterns.md +261 -0
  101. package/plugins/compound-engineering/skills/brainstorming/SKILL.md +190 -0
  102. package/plugins/compound-engineering/skills/compound-docs/SKILL.md +511 -0
  103. package/plugins/compound-engineering/skills/compound-docs/assets/critical-pattern-template.md +34 -0
  104. package/plugins/compound-engineering/skills/compound-docs/assets/resolution-template.md +93 -0
  105. package/plugins/compound-engineering/skills/compound-docs/references/yaml-schema.md +65 -0
  106. package/plugins/compound-engineering/skills/compound-docs/schema.yaml +176 -0
  107. package/plugins/compound-engineering/skills/create-agent-skills/SKILL.md +275 -0
  108. package/plugins/compound-engineering/skills/create-agent-skills/references/api-security.md +226 -0
  109. package/plugins/compound-engineering/skills/create-agent-skills/references/be-clear-and-direct.md +531 -0
  110. package/plugins/compound-engineering/skills/create-agent-skills/references/best-practices.md +404 -0
  111. package/plugins/compound-engineering/skills/create-agent-skills/references/common-patterns.md +595 -0
  112. package/plugins/compound-engineering/skills/create-agent-skills/references/core-principles.md +437 -0
  113. package/plugins/compound-engineering/skills/create-agent-skills/references/executable-code.md +175 -0
  114. package/plugins/compound-engineering/skills/create-agent-skills/references/iteration-and-testing.md +474 -0
  115. package/plugins/compound-engineering/skills/create-agent-skills/references/official-spec.md +134 -0
  116. package/plugins/compound-engineering/skills/create-agent-skills/references/recommended-structure.md +168 -0
  117. package/plugins/compound-engineering/skills/create-agent-skills/references/skill-structure.md +152 -0
  118. package/plugins/compound-engineering/skills/create-agent-skills/references/using-scripts.md +113 -0
  119. package/plugins/compound-engineering/skills/create-agent-skills/references/using-templates.md +112 -0
  120. package/plugins/compound-engineering/skills/create-agent-skills/references/workflows-and-validation.md +510 -0
  121. package/plugins/compound-engineering/skills/create-agent-skills/templates/router-skill.md +73 -0
  122. package/plugins/compound-engineering/skills/create-agent-skills/templates/simple-skill.md +33 -0
  123. package/plugins/compound-engineering/skills/create-agent-skills/workflows/add-reference.md +96 -0
  124. package/plugins/compound-engineering/skills/create-agent-skills/workflows/add-script.md +93 -0
  125. package/plugins/compound-engineering/skills/create-agent-skills/workflows/add-template.md +74 -0
  126. package/plugins/compound-engineering/skills/create-agent-skills/workflows/add-workflow.md +120 -0
  127. package/plugins/compound-engineering/skills/create-agent-skills/workflows/audit-skill.md +138 -0
  128. package/plugins/compound-engineering/skills/create-agent-skills/workflows/create-domain-expertise-skill.md +605 -0
  129. package/plugins/compound-engineering/skills/create-agent-skills/workflows/create-new-skill.md +191 -0
  130. package/plugins/compound-engineering/skills/create-agent-skills/workflows/get-guidance.md +121 -0
  131. package/plugins/compound-engineering/skills/create-agent-skills/workflows/upgrade-to-router.md +161 -0
  132. package/plugins/compound-engineering/skills/create-agent-skills/workflows/verify-skill.md +204 -0
  133. package/plugins/compound-engineering/skills/dhh-rails-style/SKILL.md +185 -0
  134. package/plugins/compound-engineering/skills/dhh-rails-style/references/architecture.md +653 -0
  135. package/plugins/compound-engineering/skills/dhh-rails-style/references/controllers.md +303 -0
  136. package/plugins/compound-engineering/skills/dhh-rails-style/references/frontend.md +510 -0
  137. package/plugins/compound-engineering/skills/dhh-rails-style/references/gems.md +266 -0
  138. package/plugins/compound-engineering/skills/dhh-rails-style/references/models.md +359 -0
  139. package/plugins/compound-engineering/skills/dhh-rails-style/references/testing.md +338 -0
  140. package/plugins/compound-engineering/skills/document-review/SKILL.md +87 -0
  141. package/plugins/compound-engineering/skills/dspy-ruby/SKILL.md +737 -0
  142. package/plugins/compound-engineering/skills/dspy-ruby/assets/config-template.rb +187 -0
  143. package/plugins/compound-engineering/skills/dspy-ruby/assets/module-template.rb +300 -0
  144. package/plugins/compound-engineering/skills/dspy-ruby/assets/signature-template.rb +221 -0
  145. package/plugins/compound-engineering/skills/dspy-ruby/references/core-concepts.md +674 -0
  146. package/plugins/compound-engineering/skills/dspy-ruby/references/observability.md +366 -0
  147. package/plugins/compound-engineering/skills/dspy-ruby/references/optimization.md +603 -0
  148. package/plugins/compound-engineering/skills/dspy-ruby/references/providers.md +418 -0
  149. package/plugins/compound-engineering/skills/dspy-ruby/references/toolsets.md +502 -0
  150. package/plugins/compound-engineering/skills/every-style-editor/SKILL.md +134 -0
  151. package/plugins/compound-engineering/skills/every-style-editor/references/EVERY_WRITE_STYLE.md +529 -0
  152. package/plugins/compound-engineering/skills/file-todos/SKILL.md +252 -0
  153. package/plugins/compound-engineering/skills/file-todos/assets/todo-template.md +155 -0
  154. package/plugins/compound-engineering/skills/frontend-design/SKILL.md +42 -0
  155. package/plugins/compound-engineering/skills/gemini-imagegen/SKILL.md +237 -0
  156. package/plugins/compound-engineering/skills/gemini-imagegen/requirements.txt +2 -0
  157. package/plugins/compound-engineering/skills/gemini-imagegen/scripts/compose_images.py +157 -0
  158. package/plugins/compound-engineering/skills/gemini-imagegen/scripts/edit_image.py +144 -0
  159. package/plugins/compound-engineering/skills/gemini-imagegen/scripts/gemini_images.py +263 -0
  160. package/plugins/compound-engineering/skills/gemini-imagegen/scripts/generate_image.py +133 -0
  161. package/plugins/compound-engineering/skills/gemini-imagegen/scripts/multi_turn_chat.py +216 -0
  162. package/plugins/compound-engineering/skills/git-worktree/SKILL.md +302 -0
  163. package/plugins/compound-engineering/skills/git-worktree/scripts/worktree-manager.sh +337 -0
  164. package/plugins/compound-engineering/skills/orchestrating-swarms/SKILL.md +1718 -0
  165. package/plugins/compound-engineering/skills/rclone/SKILL.md +150 -0
  166. package/plugins/compound-engineering/skills/rclone/scripts/check_setup.sh +60 -0
  167. package/plugins/compound-engineering/skills/resolve-pr-parallel/SKILL.md +89 -0
  168. package/plugins/compound-engineering/skills/resolve-pr-parallel/scripts/get-pr-comments +68 -0
  169. package/plugins/compound-engineering/skills/resolve-pr-parallel/scripts/resolve-pr-thread +23 -0
  170. package/plugins/compound-engineering/skills/skill-creator/SKILL.md +210 -0
  171. package/plugins/compound-engineering/skills/skill-creator/scripts/init_skill.py +303 -0
  172. package/plugins/compound-engineering/skills/skill-creator/scripts/package_skill.py +110 -0
  173. package/plugins/compound-engineering/skills/skill-creator/scripts/quick_validate.py +65 -0
  174. package/prompts/deepen-plan.md +549 -0
  175. package/prompts/feature-video.md +341 -0
  176. package/prompts/resolve_todo_parallel.md +36 -0
  177. package/prompts/test-browser.md +342 -0
  178. package/prompts/workflows-brainstorm.md +123 -0
  179. package/prompts/workflows-compound.md +238 -0
  180. package/prompts/workflows-plan.md +550 -0
  181. package/prompts/workflows-review.md +529 -0
  182. package/prompts/workflows-work.md +432 -0
  183. package/skills/agent-browser/SKILL.md +223 -0
  184. package/skills/agent-native-architecture/SKILL.md +435 -0
  185. package/skills/agent-native-architecture/references/action-parity-discipline.md +409 -0
  186. package/skills/agent-native-architecture/references/agent-execution-patterns.md +467 -0
  187. package/skills/agent-native-architecture/references/agent-native-testing.md +582 -0
  188. package/skills/agent-native-architecture/references/architecture-patterns.md +478 -0
  189. package/skills/agent-native-architecture/references/dynamic-context-injection.md +338 -0
  190. package/skills/agent-native-architecture/references/files-universal-interface.md +301 -0
  191. package/skills/agent-native-architecture/references/from-primitives-to-domain-tools.md +359 -0
  192. package/skills/agent-native-architecture/references/mcp-tool-design.md +506 -0
  193. package/skills/agent-native-architecture/references/mobile-patterns.md +871 -0
  194. package/skills/agent-native-architecture/references/product-implications.md +443 -0
  195. package/skills/agent-native-architecture/references/refactoring-to-prompt-native.md +317 -0
  196. package/skills/agent-native-architecture/references/self-modification.md +269 -0
  197. package/skills/agent-native-architecture/references/shared-workspace-architecture.md +680 -0
  198. package/skills/agent-native-architecture/references/system-prompt-design.md +250 -0
  199. package/skills/agent-native-reviewer/SKILL.md +260 -0
  200. package/skills/andrew-kane-gem-writer/SKILL.md +184 -0
  201. package/skills/andrew-kane-gem-writer/references/database-adapters.md +231 -0
  202. package/skills/andrew-kane-gem-writer/references/module-organization.md +121 -0
  203. package/skills/andrew-kane-gem-writer/references/rails-integration.md +183 -0
  204. package/skills/andrew-kane-gem-writer/references/resources.md +119 -0
  205. package/skills/andrew-kane-gem-writer/references/testing-patterns.md +261 -0
  206. package/skills/ankane-readme-writer/SKILL.md +63 -0
  207. package/skills/architecture-strategist/SKILL.md +66 -0
  208. package/skills/best-practices-researcher/SKILL.md +125 -0
  209. package/skills/brainstorming/SKILL.md +190 -0
  210. package/skills/bug-reproduction-validator/SKILL.md +81 -0
  211. package/skills/code-simplicity-reviewer/SKILL.md +100 -0
  212. package/skills/compound-docs/SKILL.md +511 -0
  213. package/skills/compound-docs/assets/critical-pattern-template.md +34 -0
  214. package/skills/compound-docs/assets/resolution-template.md +93 -0
  215. package/skills/compound-docs/references/yaml-schema.md +65 -0
  216. package/skills/compound-docs/schema.yaml +176 -0
  217. package/skills/create-agent-skills/SKILL.md +275 -0
  218. package/skills/create-agent-skills/references/api-security.md +226 -0
  219. package/skills/create-agent-skills/references/be-clear-and-direct.md +531 -0
  220. package/skills/create-agent-skills/references/best-practices.md +404 -0
  221. package/skills/create-agent-skills/references/common-patterns.md +595 -0
  222. package/skills/create-agent-skills/references/core-principles.md +437 -0
  223. package/skills/create-agent-skills/references/executable-code.md +175 -0
  224. package/skills/create-agent-skills/references/iteration-and-testing.md +474 -0
  225. package/skills/create-agent-skills/references/official-spec.md +134 -0
  226. package/skills/create-agent-skills/references/recommended-structure.md +168 -0
  227. package/skills/create-agent-skills/references/skill-structure.md +152 -0
  228. package/skills/create-agent-skills/references/using-scripts.md +113 -0
  229. package/skills/create-agent-skills/references/using-templates.md +112 -0
  230. package/skills/create-agent-skills/references/workflows-and-validation.md +510 -0
  231. package/skills/create-agent-skills/templates/router-skill.md +73 -0
  232. package/skills/create-agent-skills/templates/simple-skill.md +33 -0
  233. package/skills/create-agent-skills/workflows/add-reference.md +96 -0
  234. package/skills/create-agent-skills/workflows/add-script.md +93 -0
  235. package/skills/create-agent-skills/workflows/add-template.md +74 -0
  236. package/skills/create-agent-skills/workflows/add-workflow.md +120 -0
  237. package/skills/create-agent-skills/workflows/audit-skill.md +138 -0
  238. package/skills/create-agent-skills/workflows/create-domain-expertise-skill.md +605 -0
  239. package/skills/create-agent-skills/workflows/create-new-skill.md +191 -0
  240. package/skills/create-agent-skills/workflows/get-guidance.md +121 -0
  241. package/skills/create-agent-skills/workflows/upgrade-to-router.md +161 -0
  242. package/skills/create-agent-skills/workflows/verify-skill.md +204 -0
  243. package/skills/data-integrity-guardian/SKILL.md +84 -0
  244. package/skills/data-migration-expert/SKILL.md +111 -0
  245. package/skills/deployment-verification-agent/SKILL.md +173 -0
  246. package/skills/design-implementation-reviewer/SKILL.md +107 -0
  247. package/skills/design-iterator/SKILL.md +222 -0
  248. package/skills/dhh-rails-reviewer/SKILL.md +65 -0
  249. package/skills/dhh-rails-style/SKILL.md +185 -0
  250. package/skills/dhh-rails-style/references/architecture.md +653 -0
  251. package/skills/dhh-rails-style/references/controllers.md +303 -0
  252. package/skills/dhh-rails-style/references/frontend.md +510 -0
  253. package/skills/dhh-rails-style/references/gems.md +266 -0
  254. package/skills/dhh-rails-style/references/models.md +359 -0
  255. package/skills/dhh-rails-style/references/testing.md +338 -0
  256. package/skills/document-review/SKILL.md +87 -0
  257. package/skills/dspy-ruby/SKILL.md +737 -0
  258. package/skills/dspy-ruby/assets/config-template.rb +187 -0
  259. package/skills/dspy-ruby/assets/module-template.rb +300 -0
  260. package/skills/dspy-ruby/assets/signature-template.rb +221 -0
  261. package/skills/dspy-ruby/references/core-concepts.md +674 -0
  262. package/skills/dspy-ruby/references/observability.md +366 -0
  263. package/skills/dspy-ruby/references/optimization.md +603 -0
  264. package/skills/dspy-ruby/references/providers.md +418 -0
  265. package/skills/dspy-ruby/references/toolsets.md +502 -0
  266. package/skills/every-style-editor/SKILL.md +134 -0
  267. package/skills/every-style-editor/references/EVERY_WRITE_STYLE.md +529 -0
  268. package/skills/every-style-editor-2/SKILL.md +62 -0
  269. package/skills/figma-design-sync/SKILL.md +188 -0
  270. package/skills/file-todos/SKILL.md +252 -0
  271. package/skills/file-todos/assets/todo-template.md +155 -0
  272. package/skills/framework-docs-researcher/SKILL.md +105 -0
  273. package/skills/frontend-design/SKILL.md +42 -0
  274. package/skills/gemini-imagegen/SKILL.md +237 -0
  275. package/skills/gemini-imagegen/requirements.txt +2 -0
  276. package/skills/gemini-imagegen/scripts/compose_images.py +157 -0
  277. package/skills/gemini-imagegen/scripts/edit_image.py +144 -0
  278. package/skills/gemini-imagegen/scripts/gemini_images.py +263 -0
  279. package/skills/gemini-imagegen/scripts/generate_image.py +133 -0
  280. package/skills/gemini-imagegen/scripts/multi_turn_chat.py +216 -0
  281. package/skills/git-history-analyzer/SKILL.md +58 -0
  282. package/skills/git-worktree/SKILL.md +302 -0
  283. package/skills/git-worktree/scripts/worktree-manager.sh +337 -0
  284. package/skills/julik-frontend-races-reviewer/SKILL.md +220 -0
  285. package/skills/kieran-python-reviewer/SKILL.md +132 -0
  286. package/skills/kieran-rails-reviewer/SKILL.md +114 -0
  287. package/skills/kieran-typescript-reviewer/SKILL.md +123 -0
  288. package/skills/learnings-researcher/SKILL.md +263 -0
  289. package/skills/lint/SKILL.md +14 -0
  290. package/skills/orchestrating-swarms/SKILL.md +1718 -0
  291. package/skills/pattern-recognition-specialist/SKILL.md +71 -0
  292. package/skills/performance-oracle/SKILL.md +136 -0
  293. package/skills/pr-comment-resolver/SKILL.md +82 -0
  294. package/skills/rclone/SKILL.md +150 -0
  295. package/skills/rclone/scripts/check_setup.sh +60 -0
  296. package/skills/repo-research-analyst/SKILL.md +134 -0
  297. package/skills/resolve_pr_parallel/SKILL.md +89 -0
  298. package/skills/resolve_pr_parallel/scripts/get-pr-comments +68 -0
  299. package/skills/resolve_pr_parallel/scripts/resolve-pr-thread +23 -0
  300. package/skills/schema-drift-detector/SKILL.md +153 -0
  301. package/skills/security-sentinel/SKILL.md +113 -0
  302. package/skills/skill-creator/SKILL.md +210 -0
  303. package/skills/skill-creator/scripts/init_skill.py +303 -0
  304. package/skills/skill-creator/scripts/package_skill.py +110 -0
  305. package/skills/skill-creator/scripts/quick_validate.py +65 -0
  306. package/skills/spec-flow-analyzer/SKILL.md +133 -0
  307. package/src/commands/convert.ts +183 -0
  308. package/src/commands/install.ts +273 -0
  309. package/src/commands/list.ts +37 -0
  310. package/src/commands/sync.ts +89 -0
  311. package/src/converters/claude-to-codex.ts +182 -0
  312. package/src/converters/claude-to-opencode.ts +395 -0
  313. package/src/converters/claude-to-pi.ts +205 -0
  314. package/src/index.ts +22 -0
  315. package/src/parsers/claude-home.ts +65 -0
  316. package/src/parsers/claude.ts +252 -0
  317. package/src/sync/codex.ts +92 -0
  318. package/src/sync/opencode.ts +75 -0
  319. package/src/sync/pi.ts +88 -0
  320. package/src/targets/codex.ts +96 -0
  321. package/src/targets/index.ts +38 -0
  322. package/src/targets/opencode.ts +57 -0
  323. package/src/targets/pi.ts +131 -0
  324. package/src/templates/pi/compat-extension.ts +452 -0
  325. package/src/types/claude.ts +90 -0
  326. package/src/types/codex.ts +23 -0
  327. package/src/types/opencode.ts +54 -0
  328. package/src/types/pi.ts +40 -0
  329. package/src/utils/codex-agents.ts +64 -0
  330. package/src/utils/files.ts +77 -0
  331. package/src/utils/frontmatter.ts +65 -0
  332. package/src/utils/symlink.ts +43 -0
@@ -0,0 +1,511 @@
1
+ ---
2
+ name: compound-docs
3
+ description: Capture solved problems as categorized documentation with YAML frontmatter for fast lookup
4
+ disable-model-invocation: true
5
+ allowed-tools:
6
+ - Read # Parse conversation context
7
+ - Write # Create resolution docs
8
+ - Bash # Create directories
9
+ - Grep # Search existing docs
10
+ preconditions:
11
+ - Problem has been solved (not in-progress)
12
+ - Solution has been verified working
13
+ ---
14
+
15
+ # compound-docs Skill
16
+
17
+ **Purpose:** Automatically document solved problems to build searchable institutional knowledge with category-based organization (enum-validated problem types).
18
+
19
+ ## Overview
20
+
21
+ This skill captures problem solutions immediately after confirmation, creating structured documentation that serves as a searchable knowledge base for future sessions.
22
+
23
+ **Organization:** Single-file architecture - each problem documented as one markdown file in its symptom category directory (e.g., `docs/solutions/performance-issues/n-plus-one-briefs.md`). Files use YAML frontmatter for metadata and searchability.
24
+
25
+ ---
26
+
27
+ <critical_sequence name="documentation-capture" enforce_order="strict">
28
+
29
+ ## 7-Step Process
30
+
31
+ <step number="1" required="true">
32
+ ### Step 1: Detect Confirmation
33
+
34
+ **Auto-invoke after phrases:**
35
+
36
+ - "that worked"
37
+ - "it's fixed"
38
+ - "working now"
39
+ - "problem solved"
40
+ - "that did it"
41
+
42
+ **OR manual:** `/doc-fix` command
43
+
44
+ **Non-trivial problems only:**
45
+
46
+ - Multiple investigation attempts needed
47
+ - Tricky debugging that took time
48
+ - Non-obvious solution
49
+ - Future sessions would benefit
50
+
51
+ **Skip documentation for:**
52
+
53
+ - Simple typos
54
+ - Obvious syntax errors
55
+ - Trivial fixes immediately corrected
56
+ </step>
57
+
58
+ <step number="2" required="true" depends_on="1">
59
+ ### Step 2: Gather Context
60
+
61
+ Extract from conversation history:
62
+
63
+ **Required information:**
64
+
65
+ - **Module name**: Which module or component had the problem
66
+ - **Symptom**: Observable error/behavior (exact error messages)
67
+ - **Investigation attempts**: What didn't work and why
68
+ - **Root cause**: Technical explanation of actual problem
69
+ - **Solution**: What fixed it (code/config changes)
70
+ - **Prevention**: How to avoid in future
71
+
72
+ **Environment details:**
73
+
74
+ - Rails version
75
+ - Stage (0-6 or post-implementation)
76
+ - OS version
77
+ - File/line references
78
+
79
+ **BLOCKING REQUIREMENT:** If critical context is missing (module name, exact error, stage, or resolution steps), ask user and WAIT for response before proceeding to Step 3:
80
+
81
+ ```
82
+ I need a few details to document this properly:
83
+
84
+ 1. Which module had this issue? [ModuleName]
85
+ 2. What was the exact error message or symptom?
86
+ 3. What stage were you in? (0-6 or post-implementation)
87
+
88
+ [Continue after user provides details]
89
+ ```
90
+ </step>
91
+
92
+ <step number="3" required="false" depends_on="2">
93
+ ### Step 3: Check Existing Docs
94
+
95
+ Search docs/solutions/ for similar issues:
96
+
97
+ ```bash
98
+ # Search by error message keywords
99
+ grep -r "exact error phrase" docs/solutions/
100
+
101
+ # Search by symptom category
102
+ ls docs/solutions/[category]/
103
+ ```
104
+
105
+ **IF similar issue found:**
106
+
107
+ THEN present decision options:
108
+
109
+ ```
110
+ Found similar issue: docs/solutions/[path]
111
+
112
+ What's next?
113
+ 1. Create new doc with cross-reference (recommended)
114
+ 2. Update existing doc (only if same root cause)
115
+ 3. Other
116
+
117
+ Choose (1-3): _
118
+ ```
119
+
120
+ WAIT for user response, then execute chosen action.
121
+
122
+ **ELSE** (no similar issue found):
123
+
124
+ Proceed directly to Step 4 (no user interaction needed).
125
+ </step>
126
+
127
+ <step number="4" required="true" depends_on="2">
128
+ ### Step 4: Generate Filename
129
+
130
+ Format: `[sanitized-symptom]-[module]-[YYYYMMDD].md`
131
+
132
+ **Sanitization rules:**
133
+
134
+ - Lowercase
135
+ - Replace spaces with hyphens
136
+ - Remove special characters except hyphens
137
+ - Truncate to reasonable length (< 80 chars)
138
+
139
+ **Examples:**
140
+
141
+ - `missing-include-BriefSystem-20251110.md`
142
+ - `parameter-not-saving-state-EmailProcessing-20251110.md`
143
+ - `webview-crash-on-resize-Assistant-20251110.md`
144
+ </step>
145
+
146
+ <step number="5" required="true" depends_on="4" blocking="true">
147
+ ### Step 5: Validate YAML Schema
148
+
149
+ **CRITICAL:** All docs require validated YAML frontmatter with enum validation.
150
+
151
+ <validation_gate name="yaml-schema" blocking="true">
152
+
153
+ **Validate against schema:**
154
+ Load `schema.yaml` and classify the problem against the enum values defined in [yaml-schema.md](./references/yaml-schema.md). Ensure all required fields are present and match allowed values exactly.
155
+
156
+ **BLOCK if validation fails:**
157
+
158
+ ```
159
+ ❌ YAML validation failed
160
+
161
+ Errors:
162
+ - problem_type: must be one of schema enums, got "compilation_error"
163
+ - severity: must be one of [critical, high, medium, low], got "invalid"
164
+ - symptoms: must be array with 1-5 items, got string
165
+
166
+ Please provide corrected values.
167
+ ```
168
+
169
+ **GATE ENFORCEMENT:** Do NOT proceed to Step 6 (Create Documentation) until YAML frontmatter passes all validation rules defined in `schema.yaml`.
170
+
171
+ </validation_gate>
172
+ </step>
173
+
174
+ <step number="6" required="true" depends_on="5">
175
+ ### Step 6: Create Documentation
176
+
177
+ **Determine category from problem_type:** Use the category mapping defined in [yaml-schema.md](./references/yaml-schema.md) (lines 49-61).
178
+
179
+ **Create documentation file:**
180
+
181
+ ```bash
182
+ PROBLEM_TYPE="[from validated YAML]"
183
+ CATEGORY="[mapped from problem_type]"
184
+ FILENAME="[generated-filename].md"
185
+ DOC_PATH="docs/solutions/${CATEGORY}/${FILENAME}"
186
+
187
+ # Create directory if needed
188
+ mkdir -p "docs/solutions/${CATEGORY}"
189
+
190
+ # Write documentation using template from assets/resolution-template.md
191
+ # (Content populated with Step 2 context and validated YAML frontmatter)
192
+ ```
193
+
194
+ **Result:**
195
+ - Single file in category directory
196
+ - Enum validation ensures consistent categorization
197
+
198
+ **Create documentation:** Populate the structure from `assets/resolution-template.md` with context gathered in Step 2 and validated YAML frontmatter from Step 5.
199
+ </step>
200
+
201
+ <step number="7" required="false" depends_on="6">
202
+ ### Step 7: Cross-Reference & Critical Pattern Detection
203
+
204
+ If similar issues found in Step 3:
205
+
206
+ **Update existing doc:**
207
+
208
+ ```bash
209
+ # Add Related Issues link to similar doc
210
+ echo "- See also: [$FILENAME]($REAL_FILE)" >> [similar-doc.md]
211
+ ```
212
+
213
+ **Update new doc:**
214
+ Already includes cross-reference from Step 6.
215
+
216
+ **Update patterns if applicable:**
217
+
218
+ If this represents a common pattern (3+ similar issues):
219
+
220
+ ```bash
221
+ # Add to docs/solutions/patterns/common-solutions.md
222
+ cat >> docs/solutions/patterns/common-solutions.md << 'EOF'
223
+
224
+ ## [Pattern Name]
225
+
226
+ **Common symptom:** [Description]
227
+ **Root cause:** [Technical explanation]
228
+ **Solution pattern:** [General approach]
229
+
230
+ **Examples:**
231
+ - [Link to doc 1]
232
+ - [Link to doc 2]
233
+ - [Link to doc 3]
234
+ EOF
235
+ ```
236
+
237
+ **Critical Pattern Detection (Optional Proactive Suggestion):**
238
+
239
+ If this issue has automatic indicators suggesting it might be critical:
240
+ - Severity: `critical` in YAML
241
+ - Affects multiple modules OR foundational stage (Stage 2 or 3)
242
+ - Non-obvious solution
243
+
244
+ Then in the decision menu (Step 8), add a note:
245
+ ```
246
+ 💡 This might be worth adding to Required Reading (Option 2)
247
+ ```
248
+
249
+ But **NEVER auto-promote**. User decides via decision menu (Option 2).
250
+
251
+ **Template for critical pattern addition:**
252
+
253
+ When user selects Option 2 (Add to Required Reading), use the template from `assets/critical-pattern-template.md` to structure the pattern entry. Number it sequentially based on existing patterns in `docs/solutions/patterns/critical-patterns.md`.
254
+ </step>
255
+
256
+ </critical_sequence>
257
+
258
+ ---
259
+
260
+ <decision_gate name="post-documentation" wait_for_user="true">
261
+
262
+ ## Decision Menu After Capture
263
+
264
+ After successful documentation, present options and WAIT for user response:
265
+
266
+ ```
267
+ ✓ Solution documented
268
+
269
+ File created:
270
+ - docs/solutions/[category]/[filename].md
271
+
272
+ What's next?
273
+ 1. Continue workflow (recommended)
274
+ 2. Add to Required Reading - Promote to critical patterns (critical-patterns.md)
275
+ 3. Link related issues - Connect to similar problems
276
+ 4. Add to existing skill - Add to a learning skill (e.g., hotwire-native)
277
+ 5. Create new skill - Extract into new learning skill
278
+ 6. View documentation - See what was captured
279
+ 7. Other
280
+ ```
281
+
282
+ **Handle responses:**
283
+
284
+ **Option 1: Continue workflow**
285
+
286
+ - Return to calling skill/workflow
287
+ - Documentation is complete
288
+
289
+ **Option 2: Add to Required Reading** ⭐ PRIMARY PATH FOR CRITICAL PATTERNS
290
+
291
+ User selects this when:
292
+ - System made this mistake multiple times across different modules
293
+ - Solution is non-obvious but must be followed every time
294
+ - Foundational requirement (Rails, Rails API, threading, etc.)
295
+
296
+ Action:
297
+ 1. Extract pattern from the documentation
298
+ 2. Format as ❌ WRONG vs ✅ CORRECT with code examples
299
+ 3. Add to `docs/solutions/patterns/critical-patterns.md`
300
+ 4. Add cross-reference back to this doc
301
+ 5. Confirm: "✓ Added to Required Reading. All subagents will see this pattern before code generation."
302
+
303
+ **Option 3: Link related issues**
304
+
305
+ - Prompt: "Which doc to link? (provide filename or describe)"
306
+ - Search docs/solutions/ for the doc
307
+ - Add cross-reference to both docs
308
+ - Confirm: "✓ Cross-reference added"
309
+
310
+ **Option 4: Add to existing skill**
311
+
312
+ User selects this when the documented solution relates to an existing learning skill:
313
+
314
+ Action:
315
+ 1. Prompt: "Which skill? (hotwire-native, etc.)"
316
+ 2. Determine which reference file to update (resources.md, patterns.md, or examples.md)
317
+ 3. Add link and brief description to appropriate section
318
+ 4. Confirm: "✓ Added to [skill-name] skill in [file]"
319
+
320
+ Example: For Hotwire Native Tailwind variants solution:
321
+ - Add to `hotwire-native/references/resources.md` under "Project-Specific Resources"
322
+ - Add to `hotwire-native/references/examples.md` with link to solution doc
323
+
324
+ **Option 5: Create new skill**
325
+
326
+ User selects this when the solution represents the start of a new learning domain:
327
+
328
+ Action:
329
+ 1. Prompt: "What should the new skill be called? (e.g., stripe-billing, email-processing)"
330
+ 2. Run `python3 .claude/skills/skill-creator/scripts/init_skill.py [skill-name]`
331
+ 3. Create initial reference files with this solution as first example
332
+ 4. Confirm: "✓ Created new [skill-name] skill with this solution as first example"
333
+
334
+ **Option 6: View documentation**
335
+
336
+ - Display the created documentation
337
+ - Present decision menu again
338
+
339
+ **Option 7: Other**
340
+
341
+ - Ask what they'd like to do
342
+
343
+ </decision_gate>
344
+
345
+ ---
346
+
347
+ <integration_protocol>
348
+
349
+ ## Integration Points
350
+
351
+ **Invoked by:**
352
+ - /compound command (primary interface)
353
+ - Manual invocation in conversation after solution confirmed
354
+ - Can be triggered by detecting confirmation phrases like "that worked", "it's fixed", etc.
355
+
356
+ **Invokes:**
357
+ - None (terminal skill - does not delegate to other skills)
358
+
359
+ **Handoff expectations:**
360
+ All context needed for documentation should be present in conversation history before invocation.
361
+
362
+ </integration_protocol>
363
+
364
+ ---
365
+
366
+ <success_criteria>
367
+
368
+ ## Success Criteria
369
+
370
+ Documentation is successful when ALL of the following are true:
371
+
372
+ - ✅ YAML frontmatter validated (all required fields, correct formats)
373
+ - ✅ File created in docs/solutions/[category]/[filename].md
374
+ - ✅ Enum values match schema.yaml exactly
375
+ - ✅ Code examples included in solution section
376
+ - ✅ Cross-references added if related issues found
377
+ - ✅ User presented with decision menu and action confirmed
378
+
379
+ </success_criteria>
380
+
381
+ ---
382
+
383
+ ## Error Handling
384
+
385
+ **Missing context:**
386
+
387
+ - Ask user for missing details
388
+ - Don't proceed until critical info provided
389
+
390
+ **YAML validation failure:**
391
+
392
+ - Show specific errors
393
+ - Present retry with corrected values
394
+ - BLOCK until valid
395
+
396
+ **Similar issue ambiguity:**
397
+
398
+ - Present multiple matches
399
+ - Let user choose: new doc, update existing, or link as duplicate
400
+
401
+ **Module not in modules documentation:**
402
+
403
+ - Warn but don't block
404
+ - Proceed with documentation
405
+ - Suggest: "Add [Module] to modules documentation if not there"
406
+
407
+ ---
408
+
409
+ ## Execution Guidelines
410
+
411
+ **MUST do:**
412
+ - Validate YAML frontmatter (BLOCK if invalid per Step 5 validation gate)
413
+ - Extract exact error messages from conversation
414
+ - Include code examples in solution section
415
+ - Create directories before writing files (`mkdir -p`)
416
+ - Ask user and WAIT if critical context missing
417
+
418
+ **MUST NOT do:**
419
+ - Skip YAML validation (validation gate is blocking)
420
+ - Use vague descriptions (not searchable)
421
+ - Omit code examples or cross-references
422
+
423
+ ---
424
+
425
+ ## Quality Guidelines
426
+
427
+ **Good documentation has:**
428
+
429
+ - ✅ Exact error messages (copy-paste from output)
430
+ - ✅ Specific file:line references
431
+ - ✅ Observable symptoms (what you saw, not interpretations)
432
+ - ✅ Failed attempts documented (helps avoid wrong paths)
433
+ - ✅ Technical explanation (not just "what" but "why")
434
+ - ✅ Code examples (before/after if applicable)
435
+ - ✅ Prevention guidance (how to catch early)
436
+ - ✅ Cross-references (related issues)
437
+
438
+ **Avoid:**
439
+
440
+ - ❌ Vague descriptions ("something was wrong")
441
+ - ❌ Missing technical details ("fixed the code")
442
+ - ❌ No context (which version? which file?)
443
+ - ❌ Just code dumps (explain why it works)
444
+ - ❌ No prevention guidance
445
+ - ❌ No cross-references
446
+
447
+ ---
448
+
449
+ ## Example Scenario
450
+
451
+ **User:** "That worked! The N+1 query is fixed."
452
+
453
+ **Skill activates:**
454
+
455
+ 1. **Detect confirmation:** "That worked!" triggers auto-invoke
456
+ 2. **Gather context:**
457
+ - Module: Brief System
458
+ - Symptom: Brief generation taking >5 seconds, N+1 query when loading email threads
459
+ - Failed attempts: Added pagination (didn't help), checked background job performance
460
+ - Solution: Added eager loading with `includes(:emails)` on Brief model
461
+ - Root cause: Missing eager loading causing separate database query per email thread
462
+ 3. **Check existing:** No similar issue found
463
+ 4. **Generate filename:** `n-plus-one-brief-generation-BriefSystem-20251110.md`
464
+ 5. **Validate YAML:**
465
+ ```yaml
466
+ module: Brief System
467
+ date: 2025-11-10
468
+ problem_type: performance_issue
469
+ component: rails_model
470
+ symptoms:
471
+ - "N+1 query when loading email threads"
472
+ - "Brief generation taking >5 seconds"
473
+ root_cause: missing_include
474
+ severity: high
475
+ tags: [n-plus-one, eager-loading, performance]
476
+ ```
477
+ ✅ Valid
478
+ 6. **Create documentation:**
479
+ - `docs/solutions/performance-issues/n-plus-one-brief-generation-BriefSystem-20251110.md`
480
+ 7. **Cross-reference:** None needed (no similar issues)
481
+
482
+ **Output:**
483
+
484
+ ```
485
+ ✓ Solution documented
486
+
487
+ File created:
488
+ - docs/solutions/performance-issues/n-plus-one-brief-generation-BriefSystem-20251110.md
489
+
490
+ What's next?
491
+ 1. Continue workflow (recommended)
492
+ 2. Add to Required Reading - Promote to critical patterns (critical-patterns.md)
493
+ 3. Link related issues - Connect to similar problems
494
+ 4. Add to existing skill - Add to a learning skill (e.g., hotwire-native)
495
+ 5. Create new skill - Extract into new learning skill
496
+ 6. View documentation - See what was captured
497
+ 7. Other
498
+ ```
499
+
500
+ ---
501
+
502
+ ## Future Enhancements
503
+
504
+ **Not in Phase 7 scope, but potential:**
505
+
506
+ - Search by date range
507
+ - Filter by severity
508
+ - Tag-based search interface
509
+ - Metrics (most common issues, resolution time)
510
+ - Export to shareable format (community knowledge sharing)
511
+ - Import community solutions
@@ -0,0 +1,34 @@
1
+ # Critical Pattern Template
2
+
3
+ Use this template when adding a pattern to `docs/solutions/patterns/critical-patterns.md`:
4
+
5
+ ---
6
+
7
+ ## N. [Pattern Name] (ALWAYS REQUIRED)
8
+
9
+ ### ❌ WRONG ([Will cause X error])
10
+ ```[language]
11
+ [code showing wrong approach]
12
+ ```
13
+
14
+ ### ✅ CORRECT
15
+ ```[language]
16
+ [code showing correct approach]
17
+ ```
18
+
19
+ **Why:** [Technical explanation of why this is required]
20
+
21
+ **Placement/Context:** [When this applies]
22
+
23
+ **Documented in:** `docs/solutions/[category]/[filename].md`
24
+
25
+ ---
26
+
27
+ **Instructions:**
28
+ 1. Replace N with the next pattern number
29
+ 2. Replace [Pattern Name] with descriptive title
30
+ 3. Fill in WRONG example with code that causes the problem
31
+ 4. Fill in CORRECT example with the solution
32
+ 5. Explain the technical reason in "Why"
33
+ 6. Clarify when this pattern applies in "Placement/Context"
34
+ 7. Link to the full troubleshooting doc where this was originally solved
@@ -0,0 +1,93 @@
1
+ ---
2
+ module: [Module name or "System" for system-wide]
3
+ date: [YYYY-MM-DD]
4
+ problem_type: [build_error|test_failure|runtime_error|performance_issue|database_issue|security_issue|ui_bug|integration_issue|logic_error]
5
+ component: [rails_model|rails_controller|rails_view|service_object|background_job|database|frontend_stimulus|hotwire_turbo|email_processing|brief_system|assistant|authentication|payments]
6
+ symptoms:
7
+ - [Observable symptom 1 - specific error message or behavior]
8
+ - [Observable symptom 2 - what user actually saw/experienced]
9
+ root_cause: [missing_association|missing_include|missing_index|wrong_api|scope_issue|thread_violation|async_timing|memory_leak|config_error|logic_error|test_isolation|missing_validation|missing_permission]
10
+ rails_version: [7.1.2 - optional]
11
+ resolution_type: [code_fix|migration|config_change|test_fix|dependency_update|environment_setup]
12
+ severity: [critical|high|medium|low]
13
+ tags: [keyword1, keyword2, keyword3]
14
+ ---
15
+
16
+ # Troubleshooting: [Clear Problem Title]
17
+
18
+ ## Problem
19
+ [1-2 sentence clear description of the issue and what the user experienced]
20
+
21
+ ## Environment
22
+ - Module: [Name or "System-wide"]
23
+ - Rails Version: [e.g., 7.1.2]
24
+ - Affected Component: [e.g., "Email Processing model", "Brief System service", "Authentication controller"]
25
+ - Date: [YYYY-MM-DD when this was solved]
26
+
27
+ ## Symptoms
28
+ - [Observable symptom 1 - what the user saw/experienced]
29
+ - [Observable symptom 2 - error messages, visual issues, unexpected behavior]
30
+ - [Continue as needed - be specific]
31
+
32
+ ## What Didn't Work
33
+
34
+ **Attempted Solution 1:** [Description of what was tried]
35
+ - **Why it failed:** [Technical reason this didn't solve the problem]
36
+
37
+ **Attempted Solution 2:** [Description of second attempt]
38
+ - **Why it failed:** [Technical reason]
39
+
40
+ [Continue for all significant attempts that DIDN'T work]
41
+
42
+ [If nothing else was attempted first, write:]
43
+ **Direct solution:** The problem was identified and fixed on the first attempt.
44
+
45
+ ## Solution
46
+
47
+ [The actual fix that worked - provide specific details]
48
+
49
+ **Code changes** (if applicable):
50
+ ```ruby
51
+ # Before (broken):
52
+ [Show the problematic code]
53
+
54
+ # After (fixed):
55
+ [Show the corrected code with explanation]
56
+ ```
57
+
58
+ **Database migration** (if applicable):
59
+ ```ruby
60
+ # Migration change:
61
+ [Show what was changed in the migration]
62
+ ```
63
+
64
+ **Commands run** (if applicable):
65
+ ```bash
66
+ # Steps taken to fix:
67
+ [Commands or actions]
68
+ ```
69
+
70
+ ## Why This Works
71
+
72
+ [Technical explanation of:]
73
+ 1. What was the ROOT CAUSE of the problem?
74
+ 2. Why does the solution address this root cause?
75
+ 3. What was the underlying issue (API misuse, configuration error, Rails version issue, etc.)?
76
+
77
+ [Be detailed enough that future developers understand the "why", not just the "what"]
78
+
79
+ ## Prevention
80
+
81
+ [How to avoid this problem in future development:]
82
+ - [Specific coding practice, check, or pattern to follow]
83
+ - [What to watch out for]
84
+ - [How to catch this early]
85
+
86
+ ## Related Issues
87
+
88
+ [If any similar problems exist in docs/solutions/, link to them:]
89
+ - See also: [another-related-issue.md](../category/another-related-issue.md)
90
+ - Similar to: [related-problem.md](../category/related-problem.md)
91
+
92
+ [If no related issues, write:]
93
+ No related issues documented yet.
@@ -0,0 +1,65 @@
1
+ # YAML Frontmatter Schema
2
+
3
+ **See `.claude/skills/codify-docs/schema.yaml` for the complete schema specification.**
4
+
5
+ ## Required Fields
6
+
7
+ - **module** (string): Module name (e.g., "EmailProcessing") or "System" for system-wide issues
8
+ - **date** (string): ISO 8601 date (YYYY-MM-DD)
9
+ - **problem_type** (enum): One of [build_error, test_failure, runtime_error, performance_issue, database_issue, security_issue, ui_bug, integration_issue, logic_error, developer_experience, workflow_issue, best_practice, documentation_gap]
10
+ - **component** (enum): One of [rails_model, rails_controller, rails_view, service_object, background_job, database, frontend_stimulus, hotwire_turbo, email_processing, brief_system, assistant, authentication, payments, development_workflow, testing_framework, documentation, tooling]
11
+ - **symptoms** (array): 1-5 specific observable symptoms
12
+ - **root_cause** (enum): One of [missing_association, missing_include, missing_index, wrong_api, scope_issue, thread_violation, async_timing, memory_leak, config_error, logic_error, test_isolation, missing_validation, missing_permission, missing_workflow_step, inadequate_documentation, missing_tooling, incomplete_setup]
13
+ - **resolution_type** (enum): One of [code_fix, migration, config_change, test_fix, dependency_update, environment_setup, workflow_improvement, documentation_update, tooling_addition, seed_data_update]
14
+ - **severity** (enum): One of [critical, high, medium, low]
15
+
16
+ ## Optional Fields
17
+
18
+ - **rails_version** (string): Rails version in X.Y.Z format
19
+ - **tags** (array): Searchable keywords (lowercase, hyphen-separated)
20
+
21
+ ## Validation Rules
22
+
23
+ 1. All required fields must be present
24
+ 2. Enum fields must match allowed values exactly (case-sensitive)
25
+ 3. symptoms must be YAML array with 1-5 items
26
+ 4. date must match YYYY-MM-DD format
27
+ 5. rails_version (if provided) must match X.Y.Z format
28
+ 6. tags should be lowercase, hyphen-separated
29
+
30
+ ## Example
31
+
32
+ ```yaml
33
+ ---
34
+ module: Email Processing
35
+ date: 2025-11-12
36
+ problem_type: performance_issue
37
+ component: rails_model
38
+ symptoms:
39
+ - "N+1 query when loading email threads"
40
+ - "Brief generation taking >5 seconds"
41
+ root_cause: missing_include
42
+ rails_version: 7.1.2
43
+ resolution_type: code_fix
44
+ severity: high
45
+ tags: [n-plus-one, eager-loading, performance]
46
+ ---
47
+ ```
48
+
49
+ ## Category Mapping
50
+
51
+ Based on `problem_type`, documentation is filed in:
52
+
53
+ - **build_error** → `docs/solutions/build-errors/`
54
+ - **test_failure** → `docs/solutions/test-failures/`
55
+ - **runtime_error** → `docs/solutions/runtime-errors/`
56
+ - **performance_issue** → `docs/solutions/performance-issues/`
57
+ - **database_issue** → `docs/solutions/database-issues/`
58
+ - **security_issue** → `docs/solutions/security-issues/`
59
+ - **ui_bug** → `docs/solutions/ui-bugs/`
60
+ - **integration_issue** → `docs/solutions/integration-issues/`
61
+ - **logic_error** → `docs/solutions/logic-errors/`
62
+ - **developer_experience** → `docs/solutions/developer-experience/`
63
+ - **workflow_issue** → `docs/solutions/workflow-issues/`
64
+ - **best_practice** → `docs/solutions/best-practices/`
65
+ - **documentation_gap** → `docs/solutions/documentation-gaps/`