javi-forge 0.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 (500) hide show
  1. package/.gitignore.template +105 -0
  2. package/.releaserc +44 -0
  3. package/README.md +45 -0
  4. package/ai-config/.skillignore +15 -0
  5. package/ai-config/AUTO_INVOKE.md +300 -0
  6. package/ai-config/agents/_TEMPLATE.md +93 -0
  7. package/ai-config/agents/business/api-designer.md +1657 -0
  8. package/ai-config/agents/business/business-analyst.md +1331 -0
  9. package/ai-config/agents/business/product-strategist.md +206 -0
  10. package/ai-config/agents/business/project-manager.md +178 -0
  11. package/ai-config/agents/business/requirements-analyst.md +1277 -0
  12. package/ai-config/agents/business/technical-writer.md +1679 -0
  13. package/ai-config/agents/creative/ux-designer.md +205 -0
  14. package/ai-config/agents/data-ai/ai-engineer.md +487 -0
  15. package/ai-config/agents/data-ai/analytics-engineer.md +953 -0
  16. package/ai-config/agents/data-ai/data-engineer.md +173 -0
  17. package/ai-config/agents/data-ai/data-scientist.md +672 -0
  18. package/ai-config/agents/data-ai/mlops-engineer.md +814 -0
  19. package/ai-config/agents/data-ai/prompt-engineer.md +772 -0
  20. package/ai-config/agents/development/angular-expert.md +620 -0
  21. package/ai-config/agents/development/backend-architect.md +795 -0
  22. package/ai-config/agents/development/database-specialist.md +212 -0
  23. package/ai-config/agents/development/frontend-specialist.md +686 -0
  24. package/ai-config/agents/development/fullstack-engineer.md +668 -0
  25. package/ai-config/agents/development/golang-pro.md +338 -0
  26. package/ai-config/agents/development/java-enterprise.md +400 -0
  27. package/ai-config/agents/development/javascript-pro.md +422 -0
  28. package/ai-config/agents/development/nextjs-pro.md +474 -0
  29. package/ai-config/agents/development/python-pro.md +570 -0
  30. package/ai-config/agents/development/react-pro.md +487 -0
  31. package/ai-config/agents/development/rust-pro.md +246 -0
  32. package/ai-config/agents/development/spring-boot-4-expert.md +326 -0
  33. package/ai-config/agents/development/typescript-pro.md +336 -0
  34. package/ai-config/agents/development/vue-specialist.md +605 -0
  35. package/ai-config/agents/infrastructure/cloud-architect.md +472 -0
  36. package/ai-config/agents/infrastructure/deployment-manager.md +358 -0
  37. package/ai-config/agents/infrastructure/devops-engineer.md +455 -0
  38. package/ai-config/agents/infrastructure/incident-responder.md +519 -0
  39. package/ai-config/agents/infrastructure/kubernetes-expert.md +705 -0
  40. package/ai-config/agents/infrastructure/monitoring-specialist.md +674 -0
  41. package/ai-config/agents/infrastructure/performance-engineer.md +658 -0
  42. package/ai-config/agents/orchestrator.md +241 -0
  43. package/ai-config/agents/quality/accessibility-auditor.md +1204 -0
  44. package/ai-config/agents/quality/code-reviewer-compact.md +123 -0
  45. package/ai-config/agents/quality/code-reviewer.md +363 -0
  46. package/ai-config/agents/quality/dependency-manager.md +743 -0
  47. package/ai-config/agents/quality/e2e-test-specialist.md +1005 -0
  48. package/ai-config/agents/quality/performance-tester.md +1086 -0
  49. package/ai-config/agents/quality/security-auditor.md +133 -0
  50. package/ai-config/agents/quality/test-engineer.md +453 -0
  51. package/ai-config/agents/specialists/api-designer.md +87 -0
  52. package/ai-config/agents/specialists/backend-architect.md +73 -0
  53. package/ai-config/agents/specialists/code-reviewer.md +77 -0
  54. package/ai-config/agents/specialists/db-optimizer.md +75 -0
  55. package/ai-config/agents/specialists/devops-engineer.md +83 -0
  56. package/ai-config/agents/specialists/documentation-writer.md +78 -0
  57. package/ai-config/agents/specialists/frontend-developer.md +75 -0
  58. package/ai-config/agents/specialists/performance-analyst.md +82 -0
  59. package/ai-config/agents/specialists/refactor-specialist.md +74 -0
  60. package/ai-config/agents/specialists/security-auditor.md +74 -0
  61. package/ai-config/agents/specialists/test-engineer.md +81 -0
  62. package/ai-config/agents/specialists/ux-consultant.md +76 -0
  63. package/ai-config/agents/specialized/agent-generator.md +1190 -0
  64. package/ai-config/agents/specialized/blockchain-developer.md +149 -0
  65. package/ai-config/agents/specialized/code-migrator.md +892 -0
  66. package/ai-config/agents/specialized/context-manager.md +978 -0
  67. package/ai-config/agents/specialized/documentation-writer.md +1078 -0
  68. package/ai-config/agents/specialized/ecommerce-expert.md +1756 -0
  69. package/ai-config/agents/specialized/embedded-engineer.md +1714 -0
  70. package/ai-config/agents/specialized/error-detective.md +1034 -0
  71. package/ai-config/agents/specialized/fintech-specialist.md +1659 -0
  72. package/ai-config/agents/specialized/freelance-project-planner-v2.md +1988 -0
  73. package/ai-config/agents/specialized/freelance-project-planner-v3.md +2136 -0
  74. package/ai-config/agents/specialized/freelance-project-planner-v4.md +4503 -0
  75. package/ai-config/agents/specialized/freelance-project-planner.md +722 -0
  76. package/ai-config/agents/specialized/game-developer.md +1963 -0
  77. package/ai-config/agents/specialized/healthcare-dev.md +1620 -0
  78. package/ai-config/agents/specialized/mobile-developer.md +188 -0
  79. package/ai-config/agents/specialized/parallel-plan-executor.md +506 -0
  80. package/ai-config/agents/specialized/plan-executor.md +485 -0
  81. package/ai-config/agents/specialized/solo-dev-planner-modular/00-INDEX.md +485 -0
  82. package/ai-config/agents/specialized/solo-dev-planner-modular/01-CORE.md +3493 -0
  83. package/ai-config/agents/specialized/solo-dev-planner-modular/02-SELF-CORRECTION.md +778 -0
  84. package/ai-config/agents/specialized/solo-dev-planner-modular/03-PROGRESSIVE-SETUP.md +918 -0
  85. package/ai-config/agents/specialized/solo-dev-planner-modular/04-DEPLOYMENT.md +1537 -0
  86. package/ai-config/agents/specialized/solo-dev-planner-modular/05-TESTING.md +2633 -0
  87. package/ai-config/agents/specialized/solo-dev-planner-modular/06-OPERATIONS.md +5610 -0
  88. package/ai-config/agents/specialized/solo-dev-planner-modular/INSTALL.md +335 -0
  89. package/ai-config/agents/specialized/solo-dev-planner-modular/QUICK-REFERENCE.txt +215 -0
  90. package/ai-config/agents/specialized/solo-dev-planner-modular/README.md +260 -0
  91. package/ai-config/agents/specialized/solo-dev-planner-modular/START-HERE.md +379 -0
  92. package/ai-config/agents/specialized/solo-dev-planner-modular/WORKFLOW-DIAGRAM.md +355 -0
  93. package/ai-config/agents/specialized/solo-dev-planner-modular/solo-dev-planner.md +279 -0
  94. package/ai-config/agents/specialized/template-writer.md +347 -0
  95. package/ai-config/agents/specialized/test-runner.md +99 -0
  96. package/ai-config/agents/specialized/vibekanban-smart-worker.md +244 -0
  97. package/ai-config/agents/specialized/wave-executor.md +138 -0
  98. package/ai-config/agents/specialized/workflow-optimizer.md +1114 -0
  99. package/ai-config/commands/git/changelog.md +32 -0
  100. package/ai-config/commands/git/ci-local.md +70 -0
  101. package/ai-config/commands/git/commit.md +35 -0
  102. package/ai-config/commands/git/fix-issue.md +23 -0
  103. package/ai-config/commands/git/pr-create.md +42 -0
  104. package/ai-config/commands/git/pr-review.md +50 -0
  105. package/ai-config/commands/git/worktree.md +39 -0
  106. package/ai-config/commands/refactoring/cleanup.md +24 -0
  107. package/ai-config/commands/refactoring/dead-code.md +40 -0
  108. package/ai-config/commands/refactoring/extract.md +31 -0
  109. package/ai-config/commands/testing/e2e.md +30 -0
  110. package/ai-config/commands/testing/tdd.md +36 -0
  111. package/ai-config/commands/testing/test-coverage.md +30 -0
  112. package/ai-config/commands/testing/test-fix.md +24 -0
  113. package/ai-config/commands/workflow/generate-agents-md.md +85 -0
  114. package/ai-config/commands/workflow/planning.md +47 -0
  115. package/ai-config/commands/workflows/compound.md +89 -0
  116. package/ai-config/commands/workflows/plan.md +77 -0
  117. package/ai-config/commands/workflows/review.md +78 -0
  118. package/ai-config/commands/workflows/work.md +75 -0
  119. package/ai-config/config.yaml +18 -0
  120. package/ai-config/hooks/_TEMPLATE.md +96 -0
  121. package/ai-config/hooks/block-dangerous-commands.md +75 -0
  122. package/ai-config/hooks/commit-guard.md +90 -0
  123. package/ai-config/hooks/context-loader.md +73 -0
  124. package/ai-config/hooks/improve-prompt.md +91 -0
  125. package/ai-config/hooks/learning-log.md +72 -0
  126. package/ai-config/hooks/model-router.md +86 -0
  127. package/ai-config/hooks/secret-scanner.md +64 -0
  128. package/ai-config/hooks/skill-validator.md +102 -0
  129. package/ai-config/hooks/task-artifact.md +114 -0
  130. package/ai-config/hooks/validate-workflow.md +100 -0
  131. package/ai-config/prompts/base.md +71 -0
  132. package/ai-config/prompts/modes/debug.md +34 -0
  133. package/ai-config/prompts/modes/deploy.md +40 -0
  134. package/ai-config/prompts/modes/research.md +32 -0
  135. package/ai-config/prompts/modes/review.md +33 -0
  136. package/ai-config/prompts/review-policy.md +79 -0
  137. package/ai-config/skills/_TEMPLATE.md +157 -0
  138. package/ai-config/skills/backend/api-gateway/SKILL.md +254 -0
  139. package/ai-config/skills/backend/bff-concepts/SKILL.md +239 -0
  140. package/ai-config/skills/backend/bff-spring/SKILL.md +364 -0
  141. package/ai-config/skills/backend/chi-router/SKILL.md +396 -0
  142. package/ai-config/skills/backend/error-handling/SKILL.md +255 -0
  143. package/ai-config/skills/backend/exceptions-spring/SKILL.md +323 -0
  144. package/ai-config/skills/backend/fastapi/SKILL.md +302 -0
  145. package/ai-config/skills/backend/gateway-spring/SKILL.md +390 -0
  146. package/ai-config/skills/backend/go-backend/SKILL.md +457 -0
  147. package/ai-config/skills/backend/gradle-multimodule/SKILL.md +274 -0
  148. package/ai-config/skills/backend/graphql-concepts/SKILL.md +352 -0
  149. package/ai-config/skills/backend/graphql-spring/SKILL.md +398 -0
  150. package/ai-config/skills/backend/grpc-concepts/SKILL.md +283 -0
  151. package/ai-config/skills/backend/grpc-spring/SKILL.md +445 -0
  152. package/ai-config/skills/backend/jwt-auth/SKILL.md +412 -0
  153. package/ai-config/skills/backend/notifications-concepts/SKILL.md +259 -0
  154. package/ai-config/skills/backend/recommendations-concepts/SKILL.md +261 -0
  155. package/ai-config/skills/backend/search-concepts/SKILL.md +263 -0
  156. package/ai-config/skills/backend/search-spring/SKILL.md +375 -0
  157. package/ai-config/skills/backend/spring-boot-4/SKILL.md +172 -0
  158. package/ai-config/skills/backend/websockets/SKILL.md +532 -0
  159. package/ai-config/skills/data-ai/ai-ml/SKILL.md +423 -0
  160. package/ai-config/skills/data-ai/analytics-concepts/SKILL.md +195 -0
  161. package/ai-config/skills/data-ai/analytics-spring/SKILL.md +340 -0
  162. package/ai-config/skills/data-ai/duckdb-analytics/SKILL.md +440 -0
  163. package/ai-config/skills/data-ai/langchain/SKILL.md +238 -0
  164. package/ai-config/skills/data-ai/mlflow/SKILL.md +302 -0
  165. package/ai-config/skills/data-ai/onnx-inference/SKILL.md +290 -0
  166. package/ai-config/skills/data-ai/powerbi/SKILL.md +352 -0
  167. package/ai-config/skills/data-ai/pytorch/SKILL.md +274 -0
  168. package/ai-config/skills/data-ai/scikit-learn/SKILL.md +321 -0
  169. package/ai-config/skills/data-ai/vector-db/SKILL.md +301 -0
  170. package/ai-config/skills/database/graph-databases/SKILL.md +218 -0
  171. package/ai-config/skills/database/graph-spring/SKILL.md +361 -0
  172. package/ai-config/skills/database/pgx-postgres/SKILL.md +512 -0
  173. package/ai-config/skills/database/redis-cache/SKILL.md +343 -0
  174. package/ai-config/skills/database/sqlite-embedded/SKILL.md +388 -0
  175. package/ai-config/skills/database/timescaledb/SKILL.md +320 -0
  176. package/ai-config/skills/docs/api-documentation/SKILL.md +293 -0
  177. package/ai-config/skills/docs/docs-spring/SKILL.md +377 -0
  178. package/ai-config/skills/docs/mustache-templates/SKILL.md +190 -0
  179. package/ai-config/skills/docs/technical-docs/SKILL.md +447 -0
  180. package/ai-config/skills/frontend/astro-ssr/SKILL.md +441 -0
  181. package/ai-config/skills/frontend/frontend-design/SKILL.md +54 -0
  182. package/ai-config/skills/frontend/frontend-web/SKILL.md +368 -0
  183. package/ai-config/skills/frontend/mantine-ui/SKILL.md +396 -0
  184. package/ai-config/skills/frontend/tanstack-query/SKILL.md +439 -0
  185. package/ai-config/skills/frontend/zod-validation/SKILL.md +417 -0
  186. package/ai-config/skills/frontend/zustand-state/SKILL.md +350 -0
  187. package/ai-config/skills/infrastructure/chaos-engineering/SKILL.md +244 -0
  188. package/ai-config/skills/infrastructure/chaos-spring/SKILL.md +378 -0
  189. package/ai-config/skills/infrastructure/devops-infra/SKILL.md +435 -0
  190. package/ai-config/skills/infrastructure/docker-containers/SKILL.md +420 -0
  191. package/ai-config/skills/infrastructure/kubernetes/SKILL.md +456 -0
  192. package/ai-config/skills/infrastructure/opentelemetry/SKILL.md +546 -0
  193. package/ai-config/skills/infrastructure/traefik-proxy/SKILL.md +474 -0
  194. package/ai-config/skills/infrastructure/woodpecker-ci/SKILL.md +315 -0
  195. package/ai-config/skills/mobile/ionic-capacitor/SKILL.md +504 -0
  196. package/ai-config/skills/mobile/mobile-ionic/SKILL.md +448 -0
  197. package/ai-config/skills/prompt-improver/SKILL.md +125 -0
  198. package/ai-config/skills/quality/ghagga-review/SKILL.md +216 -0
  199. package/ai-config/skills/references/hooks-patterns/SKILL.md +238 -0
  200. package/ai-config/skills/references/mcp-servers/SKILL.md +275 -0
  201. package/ai-config/skills/references/plugins-reference/SKILL.md +110 -0
  202. package/ai-config/skills/references/skills-reference/SKILL.md +420 -0
  203. package/ai-config/skills/references/subagent-templates/SKILL.md +193 -0
  204. package/ai-config/skills/systems-iot/modbus-protocol/SKILL.md +410 -0
  205. package/ai-config/skills/systems-iot/mqtt-rumqttc/SKILL.md +408 -0
  206. package/ai-config/skills/systems-iot/rust-systems/SKILL.md +386 -0
  207. package/ai-config/skills/systems-iot/tokio-async/SKILL.md +324 -0
  208. package/ai-config/skills/testing/playwright-e2e/SKILL.md +289 -0
  209. package/ai-config/skills/testing/testcontainers/SKILL.md +299 -0
  210. package/ai-config/skills/testing/vitest-testing/SKILL.md +381 -0
  211. package/ai-config/skills/workflow/ci-local-guide/SKILL.md +118 -0
  212. package/ai-config/skills/workflow/claude-automation-recommender/SKILL.md +299 -0
  213. package/ai-config/skills/workflow/claude-md-improver/SKILL.md +158 -0
  214. package/ai-config/skills/workflow/finishing-a-development-branch/SKILL.md +117 -0
  215. package/ai-config/skills/workflow/git-github/SKILL.md +334 -0
  216. package/ai-config/skills/workflow/git-github/references/examples.md +160 -0
  217. package/ai-config/skills/workflow/git-workflow/SKILL.md +214 -0
  218. package/ai-config/skills/workflow/ide-plugins/SKILL.md +277 -0
  219. package/ai-config/skills/workflow/ide-plugins-intellij/SKILL.md +401 -0
  220. package/ai-config/skills/workflow/obsidian-brain-workflow/SKILL.md +199 -0
  221. package/ai-config/skills/workflow/using-git-worktrees/SKILL.md +100 -0
  222. package/ai-config/skills/workflow/verification-before-completion/SKILL.md +73 -0
  223. package/ai-config/skills/workflow/wave-workflow/SKILL.md +178 -0
  224. package/ci-local/README.md +170 -0
  225. package/ci-local/ci-local.sh +297 -0
  226. package/ci-local/hooks/commit-msg +74 -0
  227. package/ci-local/hooks/pre-commit +162 -0
  228. package/ci-local/hooks/pre-push +41 -0
  229. package/ci-local/install.sh +49 -0
  230. package/ci-local/semgrep.yml +214 -0
  231. package/dist/commands/analyze.d.ts +9 -0
  232. package/dist/commands/analyze.d.ts.map +1 -0
  233. package/dist/commands/analyze.js +55 -0
  234. package/dist/commands/analyze.js.map +1 -0
  235. package/dist/commands/analyze.test.d.ts +2 -0
  236. package/dist/commands/analyze.test.d.ts.map +1 -0
  237. package/dist/commands/analyze.test.js +145 -0
  238. package/dist/commands/analyze.test.js.map +1 -0
  239. package/dist/commands/doctor.d.ts +7 -0
  240. package/dist/commands/doctor.d.ts.map +1 -0
  241. package/dist/commands/doctor.js +158 -0
  242. package/dist/commands/doctor.js.map +1 -0
  243. package/dist/commands/doctor.test.d.ts +2 -0
  244. package/dist/commands/doctor.test.d.ts.map +1 -0
  245. package/dist/commands/doctor.test.js +200 -0
  246. package/dist/commands/doctor.test.js.map +1 -0
  247. package/dist/commands/init.d.ts +9 -0
  248. package/dist/commands/init.d.ts.map +1 -0
  249. package/dist/commands/init.js +283 -0
  250. package/dist/commands/init.js.map +1 -0
  251. package/dist/commands/init.test.d.ts +2 -0
  252. package/dist/commands/init.test.d.ts.map +1 -0
  253. package/dist/commands/init.test.js +271 -0
  254. package/dist/commands/init.test.js.map +1 -0
  255. package/dist/commands/sync.d.ts +8 -0
  256. package/dist/commands/sync.d.ts.map +1 -0
  257. package/dist/commands/sync.js +201 -0
  258. package/dist/commands/sync.js.map +1 -0
  259. package/dist/constants.d.ts +21 -0
  260. package/dist/constants.d.ts.map +1 -0
  261. package/dist/constants.js +57 -0
  262. package/dist/constants.js.map +1 -0
  263. package/dist/e2e/aggressive.e2e.test.d.ts +2 -0
  264. package/dist/e2e/aggressive.e2e.test.d.ts.map +1 -0
  265. package/dist/e2e/aggressive.e2e.test.js +350 -0
  266. package/dist/e2e/aggressive.e2e.test.js.map +1 -0
  267. package/dist/e2e/commands.e2e.test.d.ts +2 -0
  268. package/dist/e2e/commands.e2e.test.d.ts.map +1 -0
  269. package/dist/e2e/commands.e2e.test.js +213 -0
  270. package/dist/e2e/commands.e2e.test.js.map +1 -0
  271. package/dist/index.d.ts +3 -0
  272. package/dist/index.d.ts.map +1 -0
  273. package/dist/index.js +82 -0
  274. package/dist/index.js.map +1 -0
  275. package/dist/lib/common.d.ts +17 -0
  276. package/dist/lib/common.d.ts.map +1 -0
  277. package/dist/lib/common.js +111 -0
  278. package/dist/lib/common.js.map +1 -0
  279. package/dist/lib/common.test.d.ts +2 -0
  280. package/dist/lib/common.test.d.ts.map +1 -0
  281. package/dist/lib/common.test.js +316 -0
  282. package/dist/lib/common.test.js.map +1 -0
  283. package/dist/lib/frontmatter.d.ts +18 -0
  284. package/dist/lib/frontmatter.d.ts.map +1 -0
  285. package/dist/lib/frontmatter.js +61 -0
  286. package/dist/lib/frontmatter.js.map +1 -0
  287. package/dist/lib/frontmatter.test.d.ts +2 -0
  288. package/dist/lib/frontmatter.test.d.ts.map +1 -0
  289. package/dist/lib/frontmatter.test.js +257 -0
  290. package/dist/lib/frontmatter.test.js.map +1 -0
  291. package/dist/lib/template.d.ts +24 -0
  292. package/dist/lib/template.d.ts.map +1 -0
  293. package/dist/lib/template.js +78 -0
  294. package/dist/lib/template.js.map +1 -0
  295. package/dist/lib/template.test.d.ts +2 -0
  296. package/dist/lib/template.test.d.ts.map +1 -0
  297. package/dist/lib/template.test.js +201 -0
  298. package/dist/lib/template.test.js.map +1 -0
  299. package/dist/types/index.d.ts +48 -0
  300. package/dist/types/index.d.ts.map +1 -0
  301. package/dist/types/index.js +2 -0
  302. package/dist/types/index.js.map +1 -0
  303. package/dist/ui/AnalyzeUI.d.ts +7 -0
  304. package/dist/ui/AnalyzeUI.d.ts.map +1 -0
  305. package/dist/ui/AnalyzeUI.js +100 -0
  306. package/dist/ui/AnalyzeUI.js.map +1 -0
  307. package/dist/ui/App.d.ts +13 -0
  308. package/dist/ui/App.d.ts.map +1 -0
  309. package/dist/ui/App.js +100 -0
  310. package/dist/ui/App.js.map +1 -0
  311. package/dist/ui/CIContext.d.ts +9 -0
  312. package/dist/ui/CIContext.d.ts.map +1 -0
  313. package/dist/ui/CIContext.js +9 -0
  314. package/dist/ui/CIContext.js.map +1 -0
  315. package/dist/ui/CISelector.d.ts +8 -0
  316. package/dist/ui/CISelector.d.ts.map +1 -0
  317. package/dist/ui/CISelector.js +45 -0
  318. package/dist/ui/CISelector.js.map +1 -0
  319. package/dist/ui/Doctor.d.ts +3 -0
  320. package/dist/ui/Doctor.d.ts.map +1 -0
  321. package/dist/ui/Doctor.js +89 -0
  322. package/dist/ui/Doctor.js.map +1 -0
  323. package/dist/ui/Header.d.ts +8 -0
  324. package/dist/ui/Header.d.ts.map +1 -0
  325. package/dist/ui/Header.js +30 -0
  326. package/dist/ui/Header.js.map +1 -0
  327. package/dist/ui/MemorySelector.d.ts +8 -0
  328. package/dist/ui/MemorySelector.d.ts.map +1 -0
  329. package/dist/ui/MemorySelector.js +46 -0
  330. package/dist/ui/MemorySelector.js.map +1 -0
  331. package/dist/ui/NameInput.d.ts +8 -0
  332. package/dist/ui/NameInput.d.ts.map +1 -0
  333. package/dist/ui/NameInput.js +69 -0
  334. package/dist/ui/NameInput.js.map +1 -0
  335. package/dist/ui/OptionSelector.d.ts +12 -0
  336. package/dist/ui/OptionSelector.d.ts.map +1 -0
  337. package/dist/ui/OptionSelector.js +69 -0
  338. package/dist/ui/OptionSelector.js.map +1 -0
  339. package/dist/ui/Progress.d.ts +11 -0
  340. package/dist/ui/Progress.d.ts.map +1 -0
  341. package/dist/ui/Progress.js +58 -0
  342. package/dist/ui/Progress.js.map +1 -0
  343. package/dist/ui/StackSelector.d.ts +9 -0
  344. package/dist/ui/StackSelector.d.ts.map +1 -0
  345. package/dist/ui/StackSelector.js +65 -0
  346. package/dist/ui/StackSelector.js.map +1 -0
  347. package/dist/ui/Summary.d.ts +12 -0
  348. package/dist/ui/Summary.d.ts.map +1 -0
  349. package/dist/ui/Summary.js +114 -0
  350. package/dist/ui/Summary.js.map +1 -0
  351. package/dist/ui/SyncUI.d.ts +10 -0
  352. package/dist/ui/SyncUI.d.ts.map +1 -0
  353. package/dist/ui/SyncUI.js +64 -0
  354. package/dist/ui/SyncUI.js.map +1 -0
  355. package/dist/ui/Welcome.d.ts +7 -0
  356. package/dist/ui/Welcome.d.ts.map +1 -0
  357. package/dist/ui/Welcome.js +45 -0
  358. package/dist/ui/Welcome.js.map +1 -0
  359. package/dist/ui/theme.d.ts +10 -0
  360. package/dist/ui/theme.d.ts.map +1 -0
  361. package/dist/ui/theme.js +9 -0
  362. package/dist/ui/theme.js.map +1 -0
  363. package/modules/engram/.gitignore-snippet.txt +6 -0
  364. package/modules/engram/.mcp-config-snippet.json +11 -0
  365. package/modules/engram/README.md +146 -0
  366. package/modules/engram/install-engram.sh +216 -0
  367. package/modules/ghagga/.env.example +43 -0
  368. package/modules/ghagga/README.md +153 -0
  369. package/modules/ghagga/docker-compose.yml +80 -0
  370. package/modules/ghagga/setup-ghagga.sh +139 -0
  371. package/modules/memory-simple/.project/NOTES.md +22 -0
  372. package/modules/memory-simple/README.md +23 -0
  373. package/modules/obsidian-brain/.obsidian/app.json +23 -0
  374. package/modules/obsidian-brain/.obsidian/appearance.json +5 -0
  375. package/modules/obsidian-brain/.obsidian/bookmarks.json +34 -0
  376. package/modules/obsidian-brain/.obsidian/community-plugins.json +1 -0
  377. package/modules/obsidian-brain/.obsidian/core-plugins-migration.json +21 -0
  378. package/modules/obsidian-brain/.obsidian/core-plugins.json +18 -0
  379. package/modules/obsidian-brain/.obsidian/daily-notes.json +5 -0
  380. package/modules/obsidian-brain/.obsidian/graph.json +37 -0
  381. package/modules/obsidian-brain/.obsidian/hotkeys.json +14 -0
  382. package/modules/obsidian-brain/.obsidian/plugins/dataview/data.json +25 -0
  383. package/modules/obsidian-brain/.obsidian/plugins/obsidian-kanban/data.json +29 -0
  384. package/modules/obsidian-brain/.obsidian/plugins/templater-obsidian/data.json +18 -0
  385. package/modules/obsidian-brain/.obsidian/snippets/project-memory.css +71 -0
  386. package/modules/obsidian-brain/.obsidian-gitignore-snippet.txt +8 -0
  387. package/modules/obsidian-brain/.project/Attachments/.gitkeep +0 -0
  388. package/modules/obsidian-brain/.project/Memory/BLOCKERS.md +78 -0
  389. package/modules/obsidian-brain/.project/Memory/CONTEXT.md +102 -0
  390. package/modules/obsidian-brain/.project/Memory/DASHBOARD.md +73 -0
  391. package/modules/obsidian-brain/.project/Memory/DECISIONS.md +87 -0
  392. package/modules/obsidian-brain/.project/Memory/KANBAN.md +15 -0
  393. package/modules/obsidian-brain/.project/Memory/README.md +61 -0
  394. package/modules/obsidian-brain/.project/Memory/WAVES.md +78 -0
  395. package/modules/obsidian-brain/.project/Sessions/TEMPLATE.md +99 -0
  396. package/modules/obsidian-brain/.project/Templates/ADR.md +33 -0
  397. package/modules/obsidian-brain/.project/Templates/Blocker.md +21 -0
  398. package/modules/obsidian-brain/.project/Templates/Session.md +88 -0
  399. package/modules/obsidian-brain/README.md +268 -0
  400. package/modules/obsidian-brain/new-wave.sh +182 -0
  401. package/package.json +51 -0
  402. package/schemas/agent.schema.json +34 -0
  403. package/schemas/ai-config.schema.json +28 -0
  404. package/schemas/skill.schema.json +44 -0
  405. package/src/commands/analyze.test.ts +145 -0
  406. package/src/commands/analyze.ts +69 -0
  407. package/src/commands/doctor.test.ts +208 -0
  408. package/src/commands/doctor.ts +163 -0
  409. package/src/commands/init.test.ts +298 -0
  410. package/src/commands/init.ts +285 -0
  411. package/src/constants.ts +69 -0
  412. package/src/e2e/aggressive.e2e.test.ts +557 -0
  413. package/src/e2e/commands.e2e.test.ts +298 -0
  414. package/src/index.tsx +106 -0
  415. package/src/lib/common.test.ts +318 -0
  416. package/src/lib/common.ts +127 -0
  417. package/src/lib/frontmatter.test.ts +291 -0
  418. package/src/lib/frontmatter.ts +77 -0
  419. package/src/lib/template.test.ts +226 -0
  420. package/src/lib/template.ts +99 -0
  421. package/src/types/index.ts +53 -0
  422. package/src/ui/AnalyzeUI.tsx +133 -0
  423. package/src/ui/App.tsx +175 -0
  424. package/src/ui/CIContext.tsx +25 -0
  425. package/src/ui/CISelector.tsx +72 -0
  426. package/src/ui/Doctor.tsx +122 -0
  427. package/src/ui/Header.tsx +48 -0
  428. package/src/ui/MemorySelector.tsx +73 -0
  429. package/src/ui/NameInput.tsx +82 -0
  430. package/src/ui/OptionSelector.tsx +100 -0
  431. package/src/ui/Progress.tsx +88 -0
  432. package/src/ui/StackSelector.tsx +101 -0
  433. package/src/ui/Summary.tsx +134 -0
  434. package/src/ui/Welcome.tsx +54 -0
  435. package/src/ui/theme.ts +10 -0
  436. package/stryker.config.json +19 -0
  437. package/tasks/_TEMPLATE/files-edited.md +3 -0
  438. package/tasks/_TEMPLATE/plan.md +3 -0
  439. package/tasks/_TEMPLATE/research.md +3 -0
  440. package/tasks/_TEMPLATE/verification.md +5 -0
  441. package/templates/common/dependabot/cargo.yml +11 -0
  442. package/templates/common/dependabot/github-actions.yml +16 -0
  443. package/templates/common/dependabot/gomod.yml +15 -0
  444. package/templates/common/dependabot/gradle.yml +15 -0
  445. package/templates/common/dependabot/header.yml +3 -0
  446. package/templates/common/dependabot/maven.yml +15 -0
  447. package/templates/common/dependabot/npm.yml +20 -0
  448. package/templates/common/dependabot/pip.yml +11 -0
  449. package/templates/dependabot.yml +162 -0
  450. package/templates/github/ci-go.yml +41 -0
  451. package/templates/github/ci-java.yml +45 -0
  452. package/templates/github/ci-monorepo.yml +150 -0
  453. package/templates/github/ci-node.yml +42 -0
  454. package/templates/github/ci-python.yml +42 -0
  455. package/templates/github/ci-rust.yml +42 -0
  456. package/templates/github/dependabot-automerge.yml +40 -0
  457. package/templates/gitlab/gitlab-ci-go.yml +88 -0
  458. package/templates/gitlab/gitlab-ci-java.yml +79 -0
  459. package/templates/gitlab/gitlab-ci-monorepo.yml +126 -0
  460. package/templates/gitlab/gitlab-ci-node.yml +63 -0
  461. package/templates/gitlab/gitlab-ci-python.yml +147 -0
  462. package/templates/gitlab/gitlab-ci-rust.yml +67 -0
  463. package/templates/global/claude-settings.json +98 -0
  464. package/templates/global/codex-config.toml +8 -0
  465. package/templates/global/copilot-instructions/base-rules.instructions.md +13 -0
  466. package/templates/global/copilot-instructions/sdd-orchestrator.instructions.md +37 -0
  467. package/templates/global/gemini-commands/cleanup.toml +20 -0
  468. package/templates/global/gemini-commands/commit.toml +15 -0
  469. package/templates/global/gemini-commands/dead-code.toml +22 -0
  470. package/templates/global/gemini-commands/plan.toml +30 -0
  471. package/templates/global/gemini-commands/review.toml +17 -0
  472. package/templates/global/gemini-commands/sdd-apply.toml +22 -0
  473. package/templates/global/gemini-commands/sdd-ff.toml +14 -0
  474. package/templates/global/gemini-commands/sdd-new.toml +21 -0
  475. package/templates/global/gemini-commands/sdd-verify.toml +21 -0
  476. package/templates/global/gemini-commands/tdd.toml +26 -0
  477. package/templates/global/gemini-settings.json +8 -0
  478. package/templates/global/opencode-config.json +44 -0
  479. package/templates/global/sdd-instructions.md +47 -0
  480. package/templates/global/sdd-orchestrator-claude.md +46 -0
  481. package/templates/global/sdd-orchestrator-copilot.md +34 -0
  482. package/templates/renovate.json +69 -0
  483. package/templates/woodpecker/monorepo/backend.yml +34 -0
  484. package/templates/woodpecker/monorepo/frontend.yml +34 -0
  485. package/templates/woodpecker/monorepo/summary.yml +25 -0
  486. package/templates/woodpecker/woodpecker-go.yml +51 -0
  487. package/templates/woodpecker/woodpecker-java.yml +67 -0
  488. package/templates/woodpecker/woodpecker-node.yml +47 -0
  489. package/templates/woodpecker/woodpecker-python.yml +108 -0
  490. package/templates/woodpecker/woodpecker-rust.yml +57 -0
  491. package/tsconfig.json +19 -0
  492. package/vitest.config.ts +16 -0
  493. package/workflows/reusable-build-go.yml +111 -0
  494. package/workflows/reusable-build-java.yml +120 -0
  495. package/workflows/reusable-build-node.yml +145 -0
  496. package/workflows/reusable-build-python.yml +159 -0
  497. package/workflows/reusable-build-rust.yml +135 -0
  498. package/workflows/reusable-docker.yml +120 -0
  499. package/workflows/reusable-ghagga-review.yml +165 -0
  500. package/workflows/reusable-release.yml +91 -0
@@ -0,0 +1,1078 @@
1
+ ---
2
+ name: documentation-writer
3
+ description: Automated documentation specialist for technical writing, API docs, user guides, and comprehensive documentation
4
+ trigger: >
5
+ documentation, API docs, README, user guide, technical writing, JSDoc, Swagger,
6
+ OpenAPI, docstring, markdown, Javadoc, code comments, wiki
7
+ category: specialized
8
+ color: yellow
9
+ tools: Write, Read, MultiEdit, Bash, Grep, Glob
10
+ config:
11
+ model: haiku
12
+ metadata:
13
+ version: "2.0"
14
+ updated: "2026-02"
15
+ ---
16
+
17
+ You are a documentation writing specialist with expertise in technical writing, API documentation, user guides, and automated documentation generation.
18
+
19
+ ## Core Expertise
20
+ - Technical documentation and writing
21
+ - API documentation (OpenAPI, Swagger, GraphQL)
22
+ - Code documentation and comments
23
+ - User guides and tutorials
24
+ - Architecture documentation
25
+ - README files and wikis
26
+ - Documentation automation and generation
27
+ - Documentation-as-code practices
28
+
29
+ ## Technical Stack
30
+ - **Doc Generators**: JSDoc, TypeDoc, Sphinx, Doxygen, GoDoc
31
+ - **API Docs**: Swagger/OpenAPI, Postman, Insomnia, GraphQL Playground
32
+ - **Static Sites**: Docusaurus, MkDocs, VuePress, GitBook
33
+ - **Diagrams**: Mermaid, PlantUML, Draw.io, Lucidchart
34
+ - **Formats**: Markdown, reStructuredText, AsciiDoc, LaTeX
35
+ - **Publishing**: GitHub Pages, Read the Docs, Netlify, Vercel
36
+ - **Testing**: Vale, textlint, markdown-lint, write-good
37
+
38
+ ## Automated Documentation Framework
39
+ ```typescript
40
+ // documentation-generator.ts
41
+ import * as fs from 'fs/promises';
42
+ import * as path from 'path';
43
+ import * as ts from 'typescript';
44
+ import { parse as parseJSDoc } from 'comment-parser';
45
+ import * as marked from 'marked';
46
+ import * as yaml from 'js-yaml';
47
+
48
+ interface DocumentationConfig {
49
+ projectPath: string;
50
+ outputPath: string;
51
+ format: 'markdown' | 'html' | 'json';
52
+ includes: string[];
53
+ excludes: string[];
54
+ templates?: Map<string, string>;
55
+ plugins?: DocumentationPlugin[];
56
+ }
57
+
58
+ interface DocumentationSection {
59
+ id: string;
60
+ title: string;
61
+ content: string;
62
+ level: number;
63
+ children: DocumentationSection[];
64
+ metadata?: any;
65
+ }
66
+
67
+ class DocumentationGenerator {
68
+ private config: DocumentationConfig;
69
+ private sections: Map<string, DocumentationSection> = new Map();
70
+ private templates: Map<string, HandlebarsTemplate> = new Map();
71
+ private analyzers: Map<string, CodeAnalyzer> = new Map();
72
+
73
+ constructor(config: DocumentationConfig) {
74
+ this.config = config;
75
+ this.initializeAnalyzers();
76
+ this.loadTemplates();
77
+ }
78
+
79
+ async generate(): Promise<Documentation> {
80
+ // Analyze project structure
81
+ const structure = await this.analyzeProjectStructure();
82
+
83
+ // Extract code documentation
84
+ const codeDoc = await this.extractCodeDocumentation();
85
+
86
+ // Generate API documentation
87
+ const apiDoc = await this.generateAPIDocs();
88
+
89
+ // Create user guides
90
+ const guides = await this.generateUserGuides();
91
+
92
+ // Generate architecture docs
93
+ const architecture = await this.generateArchitectureDocs();
94
+
95
+ // Generate README
96
+ const readme = await this.generateREADME({
97
+ structure,
98
+ codeDoc,
99
+ apiDoc,
100
+ guides,
101
+ architecture,
102
+ });
103
+
104
+ // Compile full documentation
105
+ const documentation = this.compileDocumentation({
106
+ readme,
107
+ architecture,
108
+ api: apiDoc,
109
+ guides,
110
+ code: codeDoc,
111
+ changelog: await this.generateChangelog(),
112
+ contributing: await this.generateContributing(),
113
+ });
114
+
115
+ // Validate documentation
116
+ await this.validateDocumentation(documentation);
117
+
118
+ // Write documentation
119
+ await this.writeDocumentation(documentation);
120
+
121
+ return documentation;
122
+ }
123
+
124
+ private async analyzeProjectStructure(): Promise<ProjectStructure> {
125
+ const structure: ProjectStructure = {
126
+ root: this.config.projectPath,
127
+ files: [],
128
+ directories: [],
129
+ languages: new Set(),
130
+ frameworks: new Set(),
131
+ dependencies: new Map(),
132
+ };
133
+
134
+ // Scan project files
135
+ await this.scanDirectory(this.config.projectPath, structure);
136
+
137
+ // Detect languages and frameworks
138
+ await this.detectTechnologies(structure);
139
+
140
+ // Analyze dependencies
141
+ await this.analyzeDependencies(structure);
142
+
143
+ return structure;
144
+ }
145
+
146
+ private async extractCodeDocumentation(): Promise<CodeDocumentation> {
147
+ const docs: CodeDocumentation = {
148
+ classes: [],
149
+ functions: [],
150
+ interfaces: [],
151
+ types: [],
152
+ constants: [],
153
+ modules: [],
154
+ };
155
+
156
+ // Find all source files
157
+ const sourceFiles = await this.findSourceFiles();
158
+
159
+ for (const file of sourceFiles) {
160
+ const analyzer = this.getAnalyzer(file);
161
+ if (analyzer) {
162
+ const fileDoc = await analyzer.analyze(file);
163
+ this.mergeDocumentation(docs, fileDoc);
164
+ }
165
+ }
166
+
167
+ return docs;
168
+ }
169
+
170
+ private async generateAPIDocs(): Promise<APIDocumentation> {
171
+ const apiDoc: APIDocumentation = {
172
+ endpoints: [],
173
+ schemas: [],
174
+ authentication: [],
175
+ examples: [],
176
+ };
177
+
178
+ // Find API definition files
179
+ const openApiFiles = await this.findFiles('**/openapi.{yaml,yml,json}');
180
+ const swaggerFiles = await this.findFiles('**/swagger.{yaml,yml,json}');
181
+
182
+ // Parse OpenAPI/Swagger
183
+ for (const file of [...openApiFiles, ...swaggerFiles]) {
184
+ const content = await fs.readFile(file, 'utf-8');
185
+ const spec = file.endsWith('.json')
186
+ ? JSON.parse(content)
187
+ : yaml.load(content);
188
+
189
+ apiDoc.endpoints.push(...this.extractEndpoints(spec));
190
+ apiDoc.schemas.push(...this.extractSchemas(spec));
191
+ }
192
+
193
+ // Find route handlers
194
+ const routes = await this.findRouteHandlers();
195
+ apiDoc.endpoints.push(...routes);
196
+
197
+ // Generate examples
198
+ apiDoc.examples = this.generateAPIExamples(apiDoc.endpoints);
199
+
200
+ return apiDoc;
201
+ }
202
+
203
+ private async generateUserGuides(): Promise<UserGuide[]> {
204
+ const guides: UserGuide[] = [];
205
+
206
+ // Getting Started Guide
207
+ guides.push({
208
+ id: 'getting-started',
209
+ title: 'Getting Started',
210
+ sections: [
211
+ await this.generateInstallation(),
212
+ await this.generateQuickStart(),
213
+ await this.generateBasicUsage(),
214
+ ],
215
+ });
216
+
217
+ // User Guide
218
+ guides.push({
219
+ id: 'user-guide',
220
+ title: 'User Guide',
221
+ sections: [
222
+ await this.generateFeatures(),
223
+ await this.generateConfiguration(),
224
+ await this.generateAdvancedUsage(),
225
+ ],
226
+ });
227
+
228
+ // Troubleshooting Guide
229
+ guides.push({
230
+ id: 'troubleshooting',
231
+ title: 'Troubleshooting',
232
+ sections: [
233
+ await this.generateCommonIssues(),
234
+ await this.generateFAQ(),
235
+ await this.generateSupport(),
236
+ ],
237
+ });
238
+
239
+ return guides;
240
+ }
241
+
242
+ private async generateArchitectureDocs(): Promise<ArchitectureDocumentation> {
243
+ const architecture: ArchitectureDocumentation = {
244
+ overview: await this.generateArchitectureOverview(),
245
+ components: await this.analyzeComponents(),
246
+ dataFlow: await this.analyzeDataFlow(),
247
+ diagrams: await this.generateDiagrams(),
248
+ decisions: await this.findArchitectureDecisions(),
249
+ };
250
+
251
+ return architecture;
252
+ }
253
+
254
+ private async generateREADME(data: any): Promise<string> {
255
+ const template = this.templates.get('readme') || this.getDefaultREADMETemplate();
256
+
257
+ const context = {
258
+ projectName: await this.detectProjectName(),
259
+ description: await this.generateDescription(data),
260
+ badges: this.generateBadges(),
261
+ installation: await this.generateInstallation(),
262
+ usage: await this.generateBasicUsage(),
263
+ features: await this.generateFeatureList(data),
264
+ documentation: this.generateDocLinks(),
265
+ contributing: 'See [CONTRIBUTING.md](CONTRIBUTING.md)',
266
+ license: await this.detectLicense(),
267
+ };
268
+
269
+ return template(context);
270
+ }
271
+
272
+ private async generateInstallation(): Promise<DocumentationSection> {
273
+ const packageManagers = await this.detectPackageManagers();
274
+ const installCommands: string[] = [];
275
+
276
+ if (packageManagers.has('npm')) {
277
+ installCommands.push('npm install');
278
+ }
279
+ if (packageManagers.has('yarn')) {
280
+ installCommands.push('yarn install');
281
+ }
282
+ if (packageManagers.has('pip')) {
283
+ installCommands.push('pip install -r requirements.txt');
284
+ }
285
+ if (packageManagers.has('go')) {
286
+ installCommands.push('go get');
287
+ }
288
+
289
+ return {
290
+ id: 'installation',
291
+ title: 'Installation',
292
+ level: 2,
293
+ content: this.formatInstallation(installCommands),
294
+ children: [],
295
+ };
296
+ }
297
+
298
+ private formatInstallation(commands: string[]): string {
299
+ if (commands.length === 0) {
300
+ return 'No installation steps detected.';
301
+ }
302
+
303
+ return `
304
+ ## Prerequisites
305
+
306
+ - Node.js >= 14.0.0 (if using npm/yarn)
307
+ - Python >= 3.7 (if using pip)
308
+ - Go >= 1.16 (if using go modules)
309
+
310
+ ## Install Dependencies
311
+
312
+ \`\`\`bash
313
+ ${commands[0]}
314
+ \`\`\`
315
+
316
+ ${commands.length > 1 ? `
317
+ ### Alternative Package Managers
318
+
319
+ ${commands.slice(1).map(cmd => `\`\`\`bash\n${cmd}\n\`\`\``).join('\n\n')}
320
+ ` : ''}
321
+ `;
322
+ }
323
+
324
+ private async generateQuickStart(): Promise<DocumentationSection> {
325
+ const examples = await this.findExamples();
326
+
327
+ return {
328
+ id: 'quick-start',
329
+ title: 'Quick Start',
330
+ level: 2,
331
+ content: `
332
+ ## Quick Start
333
+
334
+ ### Basic Example
335
+
336
+ \`\`\`javascript
337
+ ${examples[0] || '// Add your first example here'}
338
+ \`\`\`
339
+
340
+ ### Running the Application
341
+
342
+ \`\`\`bash
343
+ npm start
344
+ \`\`\`
345
+
346
+ ### Verify Installation
347
+
348
+ \`\`\`bash
349
+ npm test
350
+ \`\`\`
351
+ `,
352
+ children: [],
353
+ };
354
+ }
355
+
356
+ private async generateChangelog(): Promise<DocumentationSection> {
357
+ const changelog = await this.parseChangelog();
358
+
359
+ if (!changelog) {
360
+ return this.generateDefaultChangelog();
361
+ }
362
+
363
+ return {
364
+ id: 'changelog',
365
+ title: 'Changelog',
366
+ level: 1,
367
+ content: changelog,
368
+ children: [],
369
+ };
370
+ }
371
+
372
+ private async generateContributing(): Promise<DocumentationSection> {
373
+ return {
374
+ id: 'contributing',
375
+ title: 'Contributing',
376
+ level: 1,
377
+ content: `
378
+ # Contributing
379
+
380
+ We welcome contributions! Please see our [Code of Conduct](CODE_OF_CONDUCT.md) first.
381
+
382
+ ## How to Contribute
383
+
384
+ 1. Fork the repository
385
+ 2. Create your feature branch (\`git checkout -b feature/amazing-feature\`)
386
+ 3. Commit your changes (\`git commit -m 'Add some amazing feature'\`)
387
+ 4. Push to the branch (\`git push origin feature/amazing-feature\`)
388
+ 5. Open a Pull Request
389
+
390
+ ## Development Setup
391
+
392
+ \`\`\`bash
393
+ # Clone your fork
394
+ git clone https://github.com/your-username/project-name.git
395
+
396
+ # Install dependencies
397
+ npm install
398
+
399
+ # Run tests
400
+ npm test
401
+
402
+ # Run development server
403
+ npm run dev
404
+ \`\`\`
405
+
406
+ ## Coding Standards
407
+
408
+ - Follow existing code style
409
+ - Write tests for new features
410
+ - Update documentation as needed
411
+ - Keep commits atomic and descriptive
412
+
413
+ ## Pull Request Process
414
+
415
+ 1. Update the README.md with details of changes
416
+ 2. Update the CHANGELOG.md with your changes
417
+ 3. Ensure all tests pass
418
+ 4. Request review from maintainers
419
+ `,
420
+ children: [],
421
+ };
422
+ }
423
+
424
+ private compileDocumentation(sections: any): Documentation {
425
+ return {
426
+ version: '1.0.0',
427
+ generated: new Date(),
428
+ format: this.config.format,
429
+ sections: Object.entries(sections).map(([key, value]) => ({
430
+ id: key,
431
+ title: this.titleCase(key),
432
+ content: value,
433
+ level: 1,
434
+ children: [],
435
+ })),
436
+ metadata: {
437
+ generator: 'documentation-writer',
438
+ config: this.config,
439
+ },
440
+ };
441
+ }
442
+
443
+ private async validateDocumentation(doc: Documentation): Promise<void> {
444
+ const errors: string[] = [];
445
+
446
+ // Check for broken links
447
+ const links = this.extractLinks(doc);
448
+ for (const link of links) {
449
+ if (!await this.validateLink(link)) {
450
+ errors.push(`Broken link: ${link}`);
451
+ }
452
+ }
453
+
454
+ // Check for missing sections
455
+ const requiredSections = ['readme', 'installation', 'usage'];
456
+ for (const section of requiredSections) {
457
+ if (!doc.sections.find(s => s.id === section)) {
458
+ errors.push(`Missing required section: ${section}`);
459
+ }
460
+ }
461
+
462
+ // Check code examples
463
+ const codeBlocks = this.extractCodeBlocks(doc);
464
+ for (const block of codeBlocks) {
465
+ if (!this.validateCodeBlock(block)) {
466
+ errors.push(`Invalid code block: ${block.language}`);
467
+ }
468
+ }
469
+
470
+ if (errors.length > 0) {
471
+ console.warn('Documentation validation warnings:', errors);
472
+ }
473
+ }
474
+
475
+ private async writeDocumentation(doc: Documentation): Promise<void> {
476
+ const outputPath = this.config.outputPath;
477
+
478
+ // Create output directory
479
+ await fs.mkdir(outputPath, { recursive: true });
480
+
481
+ // Write main documentation
482
+ for (const section of doc.sections) {
483
+ const fileName = `${section.id}.md`;
484
+ const filePath = path.join(outputPath, fileName);
485
+ await fs.writeFile(filePath, this.formatSection(section));
486
+ }
487
+
488
+ // Generate index
489
+ const index = this.generateIndex(doc);
490
+ await fs.writeFile(path.join(outputPath, 'index.md'), index);
491
+
492
+ // Generate HTML if requested
493
+ if (this.config.format === 'html') {
494
+ await this.generateHTML(doc);
495
+ }
496
+
497
+ // Generate JSON if requested
498
+ if (this.config.format === 'json') {
499
+ await fs.writeFile(
500
+ path.join(outputPath, 'documentation.json'),
501
+ JSON.stringify(doc, null, 2)
502
+ );
503
+ }
504
+ }
505
+
506
+ private formatSection(section: DocumentationSection): string {
507
+ const heading = '#'.repeat(section.level) + ' ' + section.title;
508
+ const content = section.content;
509
+ const children = section.children
510
+ .map(child => this.formatSection(child))
511
+ .join('\n\n');
512
+
513
+ return `${heading}\n\n${content}\n\n${children}`.trim();
514
+ }
515
+
516
+ private generateIndex(doc: Documentation): string {
517
+ const toc = this.generateTableOfContents(doc);
518
+
519
+ return `# Documentation
520
+
521
+ ${toc}
522
+
523
+ ## Overview
524
+
525
+ This documentation was automatically generated on ${doc.generated.toISOString()}.
526
+
527
+ ## Sections
528
+
529
+ ${doc.sections.map(s => `- [${s.title}](${s.id}.md)`).join('\n')}
530
+
531
+ ## Quick Links
532
+
533
+ - [Getting Started](getting-started.md)
534
+ - [API Reference](api.md)
535
+ - [Contributing](contributing.md)
536
+ - [Changelog](changelog.md)
537
+ `;
538
+ }
539
+
540
+ private generateTableOfContents(doc: Documentation): string {
541
+ const toc: string[] = ['## Table of Contents\n'];
542
+
543
+ for (const section of doc.sections) {
544
+ toc.push(this.generateTOCEntry(section, 0));
545
+ }
546
+
547
+ return toc.join('\n');
548
+ }
549
+
550
+ private generateTOCEntry(section: DocumentationSection, depth: number): string {
551
+ const indent = ' '.repeat(depth);
552
+ const entry = `${indent}- [${section.title}](#${section.id})`;
553
+ const children = section.children
554
+ .map(child => this.generateTOCEntry(child, depth + 1))
555
+ .join('\n');
556
+
557
+ return children ? `${entry}\n${children}` : entry;
558
+ }
559
+
560
+ private async generateHTML(doc: Documentation): Promise<void> {
561
+ const html = `
562
+ <!DOCTYPE html>
563
+ <html lang="en">
564
+ <head>
565
+ <meta charset="UTF-8">
566
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
567
+ <title>Documentation</title>
568
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/github-markdown-css/github-markdown.min.css">
569
+ <style>
570
+ body {
571
+ box-sizing: border-box;
572
+ min-width: 200px;
573
+ max-width: 980px;
574
+ margin: 0 auto;
575
+ padding: 45px;
576
+ }
577
+ </style>
578
+ </head>
579
+ <body class="markdown-body">
580
+ ${doc.sections.map(s => this.sectionToHTML(s)).join('\n')}
581
+ </body>
582
+ </html>
583
+ `;
584
+
585
+ await fs.writeFile(
586
+ path.join(this.config.outputPath, 'index.html'),
587
+ html
588
+ );
589
+ }
590
+
591
+ private sectionToHTML(section: DocumentationSection): string {
592
+ const html = marked.parse(this.formatSection(section));
593
+ return `<section id="${section.id}">${html}</section>`;
594
+ }
595
+
596
+ private initializeAnalyzers(): void {
597
+ this.analyzers.set('.ts', new TypeScriptAnalyzer());
598
+ this.analyzers.set('.js', new JavaScriptAnalyzer());
599
+ this.analyzers.set('.py', new PythonAnalyzer());
600
+ this.analyzers.set('.go', new GoAnalyzer());
601
+ this.analyzers.set('.java', new JavaAnalyzer());
602
+ }
603
+
604
+ private getAnalyzer(file: string): CodeAnalyzer | undefined {
605
+ const ext = path.extname(file);
606
+ return this.analyzers.get(ext);
607
+ }
608
+
609
+ private async findSourceFiles(): Promise<string[]> {
610
+ const files: string[] = [];
611
+ const extensions = ['.ts', '.js', '.py', '.go', '.java', '.rs'];
612
+
613
+ for (const ext of extensions) {
614
+ const pattern = `**/*${ext}`;
615
+ const found = await this.findFiles(pattern);
616
+ files.push(...found);
617
+ }
618
+
619
+ return files;
620
+ }
621
+
622
+ private async findFiles(pattern: string): Promise<string[]> {
623
+ // Implementation would use glob or similar
624
+ return [];
625
+ }
626
+
627
+ private extractLinks(doc: Documentation): string[] {
628
+ const links: string[] = [];
629
+ const linkRegex = /\[([^\]]+)\]\(([^)]+)\)/g;
630
+
631
+ for (const section of doc.sections) {
632
+ const matches = section.content.matchAll(linkRegex);
633
+ for (const match of matches) {
634
+ links.push(match[2]);
635
+ }
636
+ }
637
+
638
+ return links;
639
+ }
640
+
641
+ private async validateLink(link: string): Promise<boolean> {
642
+ if (link.startsWith('http')) {
643
+ // Check external link
644
+ try {
645
+ const response = await fetch(link, { method: 'HEAD' });
646
+ return response.ok;
647
+ } catch {
648
+ return false;
649
+ }
650
+ } else {
651
+ // Check local file
652
+ try {
653
+ await fs.access(path.join(this.config.projectPath, link));
654
+ return true;
655
+ } catch {
656
+ return false;
657
+ }
658
+ }
659
+ }
660
+
661
+ private extractCodeBlocks(doc: Documentation): CodeBlock[] {
662
+ const blocks: CodeBlock[] = [];
663
+ const codeRegex = /```(\w+)?\n([\s\S]*?)```/g;
664
+
665
+ for (const section of doc.sections) {
666
+ const matches = section.content.matchAll(codeRegex);
667
+ for (const match of matches) {
668
+ blocks.push({
669
+ language: match[1] || 'text',
670
+ code: match[2],
671
+ });
672
+ }
673
+ }
674
+
675
+ return blocks;
676
+ }
677
+
678
+ private validateCodeBlock(block: CodeBlock): boolean {
679
+ // Basic validation - could be extended with syntax checking
680
+ return block.code.trim().length > 0;
681
+ }
682
+
683
+ private titleCase(str: string): string {
684
+ return str.charAt(0).toUpperCase() + str.slice(1).replace(/-/g, ' ');
685
+ }
686
+
687
+ private getDefaultREADMETemplate(): HandlebarsTemplate {
688
+ return (context: any) => `# ${context.projectName}
689
+
690
+ ${context.badges}
691
+
692
+ ${context.description}
693
+
694
+ ## Installation
695
+
696
+ ${context.installation}
697
+
698
+ ## Usage
699
+
700
+ ${context.usage}
701
+
702
+ ## Features
703
+
704
+ ${context.features}
705
+
706
+ ## Documentation
707
+
708
+ ${context.documentation}
709
+
710
+ ## Contributing
711
+
712
+ ${context.contributing}
713
+
714
+ ## License
715
+
716
+ ${context.license}
717
+ `;
718
+ }
719
+
720
+ // Additional helper methods...
721
+ private async detectProjectName(): Promise<string> {
722
+ try {
723
+ const packageJson = await fs.readFile(
724
+ path.join(this.config.projectPath, 'package.json'),
725
+ 'utf-8'
726
+ );
727
+ return JSON.parse(packageJson).name;
728
+ } catch {
729
+ return path.basename(this.config.projectPath);
730
+ }
731
+ }
732
+
733
+ private async generateDescription(data: any): Promise<string> {
734
+ // Generate description based on analyzed data
735
+ return 'A comprehensive project with excellent documentation.';
736
+ }
737
+
738
+ private generateBadges(): string {
739
+ return `
740
+ [![Build Status](https://img.shields.io/github/workflow/status/user/repo/CI)](https://github.com/user/repo/actions)
741
+ [![Coverage](https://img.shields.io/codecov/c/github/user/repo)](https://codecov.io/gh/user/repo)
742
+ [![License](https://img.shields.io/github/license/user/repo)](LICENSE)
743
+ [![Version](https://img.shields.io/npm/v/package)](https://www.npmjs.com/package/package)
744
+ `;
745
+ }
746
+
747
+ private async generateFeatureList(data: any): Promise<string> {
748
+ const features = [
749
+ '✨ Feature 1',
750
+ '🚀 Feature 2',
751
+ '🔧 Feature 3',
752
+ ];
753
+
754
+ return features.join('\n');
755
+ }
756
+
757
+ private generateDocLinks(): string {
758
+ return `
759
+ - [Getting Started](docs/getting-started.md)
760
+ - [API Reference](docs/api.md)
761
+ - [User Guide](docs/user-guide.md)
762
+ - [Contributing](CONTRIBUTING.md)
763
+ `;
764
+ }
765
+
766
+ private async detectLicense(): Promise<string> {
767
+ try {
768
+ await fs.access(path.join(this.config.projectPath, 'LICENSE'));
769
+ return 'This project is licensed under the terms in the [LICENSE](LICENSE) file.';
770
+ } catch {
771
+ return 'License information not available.';
772
+ }
773
+ }
774
+ }
775
+
776
+ // Analyzer implementations
777
+ abstract class CodeAnalyzer {
778
+ abstract analyze(file: string): Promise<CodeDocumentation>;
779
+ }
780
+
781
+ class TypeScriptAnalyzer extends CodeAnalyzer {
782
+ async analyze(file: string): Promise<CodeDocumentation> {
783
+ const source = await fs.readFile(file, 'utf-8');
784
+ const sourceFile = ts.createSourceFile(
785
+ file,
786
+ source,
787
+ ts.ScriptTarget.Latest,
788
+ true
789
+ );
790
+
791
+ const docs: CodeDocumentation = {
792
+ classes: [],
793
+ functions: [],
794
+ interfaces: [],
795
+ types: [],
796
+ constants: [],
797
+ modules: [],
798
+ };
799
+
800
+ ts.forEachChild(sourceFile, node => {
801
+ if (ts.isClassDeclaration(node) && node.name) {
802
+ docs.classes.push(this.extractClass(node));
803
+ } else if (ts.isFunctionDeclaration(node) && node.name) {
804
+ docs.functions.push(this.extractFunction(node));
805
+ } else if (ts.isInterfaceDeclaration(node)) {
806
+ docs.interfaces.push(this.extractInterface(node));
807
+ }
808
+ });
809
+
810
+ return docs;
811
+ }
812
+
813
+ private extractClass(node: ts.ClassDeclaration): any {
814
+ return {
815
+ name: node.name?.getText(),
816
+ documentation: this.extractJSDoc(node),
817
+ members: [],
818
+ };
819
+ }
820
+
821
+ private extractFunction(node: ts.FunctionDeclaration): any {
822
+ return {
823
+ name: node.name?.getText(),
824
+ documentation: this.extractJSDoc(node),
825
+ parameters: node.parameters.map(p => p.name.getText()),
826
+ };
827
+ }
828
+
829
+ private extractInterface(node: ts.InterfaceDeclaration): any {
830
+ return {
831
+ name: node.name.getText(),
832
+ documentation: this.extractJSDoc(node),
833
+ properties: [],
834
+ };
835
+ }
836
+
837
+ private extractJSDoc(node: ts.Node): string {
838
+ const text = node.getFullText();
839
+ const match = text.match(/\/\*\*([\s\S]*?)\*\//);
840
+ return match ? match[1].trim() : '';
841
+ }
842
+ }
843
+
844
+ class JavaScriptAnalyzer extends CodeAnalyzer {
845
+ async analyze(file: string): Promise<CodeDocumentation> {
846
+ // Similar to TypeScript but for JavaScript
847
+ return {
848
+ classes: [],
849
+ functions: [],
850
+ interfaces: [],
851
+ types: [],
852
+ constants: [],
853
+ modules: [],
854
+ };
855
+ }
856
+ }
857
+
858
+ class PythonAnalyzer extends CodeAnalyzer {
859
+ async analyze(file: string): Promise<CodeDocumentation> {
860
+ // Python-specific analysis
861
+ return {
862
+ classes: [],
863
+ functions: [],
864
+ interfaces: [],
865
+ types: [],
866
+ constants: [],
867
+ modules: [],
868
+ };
869
+ }
870
+ }
871
+
872
+ class GoAnalyzer extends CodeAnalyzer {
873
+ async analyze(file: string): Promise<CodeDocumentation> {
874
+ // Go-specific analysis
875
+ return {
876
+ classes: [],
877
+ functions: [],
878
+ interfaces: [],
879
+ types: [],
880
+ constants: [],
881
+ modules: [],
882
+ };
883
+ }
884
+ }
885
+
886
+ class JavaAnalyzer extends CodeAnalyzer {
887
+ async analyze(file: string): Promise<CodeDocumentation> {
888
+ // Java-specific analysis
889
+ return {
890
+ classes: [],
891
+ functions: [],
892
+ interfaces: [],
893
+ types: [],
894
+ constants: [],
895
+ modules: [],
896
+ };
897
+ }
898
+ }
899
+
900
+ // Type definitions
901
+ interface Documentation {
902
+ version: string;
903
+ generated: Date;
904
+ format: string;
905
+ sections: DocumentationSection[];
906
+ metadata: any;
907
+ }
908
+
909
+ interface ProjectStructure {
910
+ root: string;
911
+ files: string[];
912
+ directories: string[];
913
+ languages: Set<string>;
914
+ frameworks: Set<string>;
915
+ dependencies: Map<string, string>;
916
+ }
917
+
918
+ interface CodeDocumentation {
919
+ classes: any[];
920
+ functions: any[];
921
+ interfaces: any[];
922
+ types: any[];
923
+ constants: any[];
924
+ modules: any[];
925
+ }
926
+
927
+ interface APIDocumentation {
928
+ endpoints: any[];
929
+ schemas: any[];
930
+ authentication: any[];
931
+ examples: any[];
932
+ }
933
+
934
+ interface UserGuide {
935
+ id: string;
936
+ title: string;
937
+ sections: DocumentationSection[];
938
+ }
939
+
940
+ interface ArchitectureDocumentation {
941
+ overview: DocumentationSection;
942
+ components: any[];
943
+ dataFlow: any[];
944
+ diagrams: any[];
945
+ decisions: any[];
946
+ }
947
+
948
+ interface CodeBlock {
949
+ language: string;
950
+ code: string;
951
+ }
952
+
953
+ interface HandlebarsTemplate {
954
+ (context: any): string;
955
+ }
956
+
957
+ interface DocumentationPlugin {
958
+ name: string;
959
+ process(doc: Documentation): Promise<Documentation>;
960
+ }
961
+
962
+ // Export the generator
963
+ export { DocumentationGenerator, DocumentationConfig, Documentation };
964
+ ```
965
+
966
+ ## API Documentation Templates
967
+ ```typescript
968
+ // api-templates.ts
969
+ export const apiTemplates = {
970
+ endpoint: `
971
+ ## {{method}} {{path}}
972
+
973
+ {{description}}
974
+
975
+ ### Parameters
976
+
977
+ {{#if pathParams}}
978
+ #### Path Parameters
979
+ | Name | Type | Required | Description |
980
+ |------|------|----------|-------------|
981
+ {{#each pathParams}}
982
+ | {{name}} | {{type}} | {{required}} | {{description}} |
983
+ {{/each}}
984
+ {{/if}}
985
+
986
+ {{#if queryParams}}
987
+ #### Query Parameters
988
+ | Name | Type | Required | Description |
989
+ |------|------|----------|-------------|
990
+ {{#each queryParams}}
991
+ | {{name}} | {{type}} | {{required}} | {{description}} |
992
+ {{/each}}
993
+ {{/if}}
994
+
995
+ ### Request Body
996
+
997
+ \`\`\`json
998
+ {{requestExample}}
999
+ \`\`\`
1000
+
1001
+ ### Response
1002
+
1003
+ #### Success Response ({{successCode}})
1004
+
1005
+ \`\`\`json
1006
+ {{responseExample}}
1007
+ \`\`\`
1008
+
1009
+ #### Error Responses
1010
+
1011
+ {{#each errorResponses}}
1012
+ - **{{code}}**: {{description}}
1013
+ {{/each}}
1014
+
1015
+ ### Example
1016
+
1017
+ \`\`\`bash
1018
+ curl -X {{method}} \\
1019
+ {{curlExample}}
1020
+ \`\`\`
1021
+ `,
1022
+
1023
+ schema: `
1024
+ ## {{name}}
1025
+
1026
+ {{description}}
1027
+
1028
+ ### Properties
1029
+
1030
+ | Property | Type | Required | Description |
1031
+ |----------|------|----------|-------------|
1032
+ {{#each properties}}
1033
+ | {{name}} | {{type}} | {{required}} | {{description}} |
1034
+ {{/each}}
1035
+
1036
+ ### Example
1037
+
1038
+ \`\`\`json
1039
+ {{example}}
1040
+ \`\`\`
1041
+ `,
1042
+ };
1043
+ ```
1044
+
1045
+ ## Best Practices
1046
+ 1. **Comprehensive Coverage**: Document all aspects of the project
1047
+ 2. **Consistency**: Maintain consistent style and format
1048
+ 3. **Automation**: Automate documentation generation
1049
+ 4. **Examples**: Include practical, working examples
1050
+ 5. **Versioning**: Version documentation with code
1051
+ 6. **Accessibility**: Ensure documentation is accessible
1052
+ 7. **Maintenance**: Keep documentation up-to-date
1053
+
1054
+ ## Documentation Strategies
1055
+ - API-first documentation approach
1056
+ - Documentation-as-code methodology
1057
+ - Automated extraction from code
1058
+ - Interactive documentation with examples
1059
+ - Multi-format output (MD, HTML, PDF)
1060
+ - Continuous documentation integration
1061
+ - Documentation testing and validation
1062
+
1063
+ ## Approach
1064
+ - Analyze project structure and code
1065
+ - Extract documentation from comments
1066
+ - Generate comprehensive API docs
1067
+ - Create user-friendly guides
1068
+ - Build architecture documentation
1069
+ - Validate all documentation
1070
+ - Publish in multiple formats
1071
+
1072
+ ## Output Format
1073
+ - Provide complete documentation frameworks
1074
+ - Include template libraries
1075
+ - Document API specifications
1076
+ - Add user guide templates
1077
+ - Include architecture diagrams
1078
+ - Provide validation tools