oh-my-customcodex 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 (351) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +327 -0
  3. package/dist/cli/index.js +32054 -0
  4. package/dist/index.js +5469 -0
  5. package/package.json +89 -0
  6. package/templates/.claude/agents/arch-documenter.md +38 -0
  7. package/templates/.claude/agents/arch-speckit-agent.md +66 -0
  8. package/templates/.claude/agents/be-django-expert.md +47 -0
  9. package/templates/.claude/agents/be-express-expert.md +31 -0
  10. package/templates/.claude/agents/be-fastapi-expert.md +45 -0
  11. package/templates/.claude/agents/be-go-backend-expert.md +45 -0
  12. package/templates/.claude/agents/be-nestjs-expert.md +29 -0
  13. package/templates/.claude/agents/be-springboot-expert.md +42 -0
  14. package/templates/.claude/agents/db-alembic-expert.md +73 -0
  15. package/templates/.claude/agents/db-postgres-expert.md +38 -0
  16. package/templates/.claude/agents/db-redis-expert.md +38 -0
  17. package/templates/.claude/agents/db-supabase-expert.md +37 -0
  18. package/templates/.claude/agents/de-airflow-expert.md +48 -0
  19. package/templates/.claude/agents/de-dbt-expert.md +36 -0
  20. package/templates/.claude/agents/de-kafka-expert.md +83 -0
  21. package/templates/.claude/agents/de-pipeline-expert.md +34 -0
  22. package/templates/.claude/agents/de-snowflake-expert.md +38 -0
  23. package/templates/.claude/agents/de-spark-expert.md +38 -0
  24. package/templates/.claude/agents/fe-design-expert.md +120 -0
  25. package/templates/.claude/agents/fe-flutter-agent.md +48 -0
  26. package/templates/.claude/agents/fe-svelte-agent.md +33 -0
  27. package/templates/.claude/agents/fe-vercel-agent.md +40 -0
  28. package/templates/.claude/agents/fe-vuejs-agent.md +34 -0
  29. package/templates/.claude/agents/infra-aws-expert.md +49 -0
  30. package/templates/.claude/agents/infra-docker-expert.md +49 -0
  31. package/templates/.claude/agents/lang-golang-expert.md +46 -0
  32. package/templates/.claude/agents/lang-java21-expert.md +42 -0
  33. package/templates/.claude/agents/lang-kotlin-expert.md +45 -0
  34. package/templates/.claude/agents/lang-python-expert.md +45 -0
  35. package/templates/.claude/agents/lang-rust-expert.md +45 -0
  36. package/templates/.claude/agents/lang-typescript-expert.md +45 -0
  37. package/templates/.claude/agents/mgr-claude-code-bible.md +62 -0
  38. package/templates/.claude/agents/mgr-creator.md +57 -0
  39. package/templates/.claude/agents/mgr-gitnerd.md +50 -0
  40. package/templates/.claude/agents/mgr-sauron.md +163 -0
  41. package/templates/.claude/agents/mgr-supplier.md +39 -0
  42. package/templates/.claude/agents/mgr-updater.md +40 -0
  43. package/templates/.claude/agents/qa-engineer.md +36 -0
  44. package/templates/.claude/agents/qa-planner.md +78 -0
  45. package/templates/.claude/agents/qa-writer.md +32 -0
  46. package/templates/.claude/agents/sec-codeql-expert.md +56 -0
  47. package/templates/.claude/agents/slack-cli-expert.md +98 -0
  48. package/templates/.claude/agents/souls/lang-golang-expert.soul.md +21 -0
  49. package/templates/.claude/agents/sys-memory-keeper.md +123 -0
  50. package/templates/.claude/agents/sys-naggy.md +76 -0
  51. package/templates/.claude/agents/tool-bun-expert.md +26 -0
  52. package/templates/.claude/agents/tool-npm-expert.md +31 -0
  53. package/templates/.claude/agents/tool-optimizer.md +37 -0
  54. package/templates/.claude/agents/wiki-curator.md +72 -0
  55. package/templates/.claude/config/required-plugins.json +30 -0
  56. package/templates/.claude/contexts/dev.md +20 -0
  57. package/templates/.claude/contexts/ecomode.md +110 -0
  58. package/templates/.claude/contexts/index.yaml +41 -0
  59. package/templates/.claude/contexts/research.md +28 -0
  60. package/templates/.claude/contexts/review.md +23 -0
  61. package/templates/.claude/hooks/hooks.json +533 -0
  62. package/templates/.claude/hooks/scripts/adaptive-harness-scan.sh +45 -0
  63. package/templates/.claude/hooks/scripts/agent-start-recorder.sh +40 -0
  64. package/templates/.claude/hooks/scripts/agent-teams-advisor.sh +76 -0
  65. package/templates/.claude/hooks/scripts/audit-log.sh +64 -0
  66. package/templates/.claude/hooks/scripts/auto-continue-guard.sh +33 -0
  67. package/templates/.claude/hooks/scripts/content-hash-validator.sh +75 -0
  68. package/templates/.claude/hooks/scripts/context-budget-advisor.sh +107 -0
  69. package/templates/.claude/hooks/scripts/cost-cap-advisor.sh +71 -0
  70. package/templates/.claude/hooks/scripts/cwd-change-detector.sh +36 -0
  71. package/templates/.claude/hooks/scripts/eval-core-batch-save.sh +46 -0
  72. package/templates/.claude/hooks/scripts/feedback-collector.sh +92 -0
  73. package/templates/.claude/hooks/scripts/file-change-validator.sh +26 -0
  74. package/templates/.claude/hooks/scripts/git-delegation-guard.sh +57 -0
  75. package/templates/.claude/hooks/scripts/model-escalation-advisor.sh +106 -0
  76. package/templates/.claude/hooks/scripts/omcodex-auto-update.sh +4 -0
  77. package/templates/.claude/hooks/scripts/omcustom-auto-update.sh +177 -0
  78. package/templates/.claude/hooks/scripts/rtk-intercept.sh +77 -0
  79. package/templates/.claude/hooks/scripts/rule-deletion-guard.sh +60 -0
  80. package/templates/.claude/hooks/scripts/schema-validator.sh +106 -0
  81. package/templates/.claude/hooks/scripts/secret-filter.sh +100 -0
  82. package/templates/.claude/hooks/scripts/session-autofix-prompt.sh +34 -0
  83. package/templates/.claude/hooks/scripts/session-autofix.sh +146 -0
  84. package/templates/.claude/hooks/scripts/session-env-check.sh +254 -0
  85. package/templates/.claude/hooks/scripts/skill-extractor-analyzer.sh +49 -0
  86. package/templates/.claude/hooks/scripts/stage-blocker.sh +16 -0
  87. package/templates/.claude/hooks/scripts/stale-todo-scanner.sh +91 -0
  88. package/templates/.claude/hooks/scripts/stall-detection-advisor.sh +112 -0
  89. package/templates/.claude/hooks/scripts/stop-console-audit.sh +46 -0
  90. package/templates/.claude/hooks/scripts/stuck-detector.sh +199 -0
  91. package/templates/.claude/hooks/scripts/task-outcome-recorder.sh +119 -0
  92. package/templates/.claude/hooks/scripts/task-state-precompact.sh +58 -0
  93. package/templates/.claude/hooks/scripts/user-prompt-preprocessor.sh +32 -0
  94. package/templates/.claude/hooks/skill-count-reminder.sh +34 -0
  95. package/templates/.claude/install-hooks.sh +100 -0
  96. package/templates/.claude/ontology/agents.yaml +546 -0
  97. package/templates/.claude/ontology/graphs/agent-skill.json +102 -0
  98. package/templates/.claude/ontology/graphs/full-graph.json +629 -0
  99. package/templates/.claude/ontology/graphs/routing.json +112 -0
  100. package/templates/.claude/ontology/graphs/skill-rule.json +78 -0
  101. package/templates/.claude/ontology/rules.yaml +251 -0
  102. package/templates/.claude/ontology/schema.yaml +144 -0
  103. package/templates/.claude/ontology/skills.yaml +575 -0
  104. package/templates/.claude/rules/MAY-optimization.md +42 -0
  105. package/templates/.claude/rules/MUST-agent-design.md +340 -0
  106. package/templates/.claude/rules/MUST-agent-identification.md +77 -0
  107. package/templates/.claude/rules/MUST-agent-teams.md +293 -0
  108. package/templates/.claude/rules/MUST-completion-verification.md +112 -0
  109. package/templates/.claude/rules/MUST-continuous-improvement.md +69 -0
  110. package/templates/.claude/rules/MUST-enforcement-policy.md +50 -0
  111. package/templates/.claude/rules/MUST-intent-transparency.md +74 -0
  112. package/templates/.claude/rules/MUST-language-policy.md +28 -0
  113. package/templates/.claude/rules/MUST-orchestrator-coordination.md +399 -0
  114. package/templates/.claude/rules/MUST-parallel-execution.md +184 -0
  115. package/templates/.claude/rules/MUST-permissions.md +32 -0
  116. package/templates/.claude/rules/MUST-safety.md +23 -0
  117. package/templates/.claude/rules/MUST-sync-verification.md +145 -0
  118. package/templates/.claude/rules/MUST-tool-identification.md +97 -0
  119. package/templates/.claude/rules/SHOULD-ecomode.md +123 -0
  120. package/templates/.claude/rules/SHOULD-error-handling.md +33 -0
  121. package/templates/.claude/rules/SHOULD-hud-statusline.md +51 -0
  122. package/templates/.claude/rules/SHOULD-interaction.md +77 -0
  123. package/templates/.claude/rules/SHOULD-memory-integration.md +371 -0
  124. package/templates/.claude/rules/SHOULD-ontology-rag-routing.md +49 -0
  125. package/templates/.claude/rules/SHOULD-wiki-sync.md +73 -0
  126. package/templates/.claude/rules/index.yaml +141 -0
  127. package/templates/.claude/schemas/tool-inputs.json +62 -0
  128. package/templates/.claude/skills/action-validator/SKILL.md +89 -0
  129. package/templates/.claude/skills/adaptive-harness/SKILL.md +335 -0
  130. package/templates/.claude/skills/adversarial-review/SKILL.md +80 -0
  131. package/templates/.claude/skills/agora/SKILL.md +194 -0
  132. package/templates/.claude/skills/airflow-best-practices/SKILL.md +94 -0
  133. package/templates/.claude/skills/alembic-best-practices/SKILL.md +295 -0
  134. package/templates/.claude/skills/ambiguity-gate/SKILL.md +94 -0
  135. package/templates/.claude/skills/analysis/SKILL.md +223 -0
  136. package/templates/.claude/skills/audit-agents/SKILL.md +118 -0
  137. package/templates/.claude/skills/aws-best-practices/SKILL.md +281 -0
  138. package/templates/.claude/skills/claude-code-bible/SKILL.md +93 -0
  139. package/templates/.claude/skills/claude-code-bible/scripts/fetch-docs.js +244 -0
  140. package/templates/.claude/skills/claude-native/SKILL.md +215 -0
  141. package/templates/.claude/skills/codex-exec/SKILL.md +206 -0
  142. package/templates/.claude/skills/codex-exec/scripts/codex-wrapper.cjs +430 -0
  143. package/templates/.claude/skills/create-agent/SKILL.md +94 -0
  144. package/templates/.claude/skills/cve-triage/SKILL.md +91 -0
  145. package/templates/.claude/skills/dag-orchestration/SKILL.md +201 -0
  146. package/templates/.claude/skills/dbt-best-practices/SKILL.md +55 -0
  147. package/templates/.claude/skills/de-lead-routing/SKILL.md +230 -0
  148. package/templates/.claude/skills/deep-plan/SKILL.md +344 -0
  149. package/templates/.claude/skills/deep-verify/SKILL.md +111 -0
  150. package/templates/.claude/skills/dev-lead-routing/SKILL.md +161 -0
  151. package/templates/.claude/skills/dev-refactor/SKILL.md +234 -0
  152. package/templates/.claude/skills/dev-review/SKILL.md +172 -0
  153. package/templates/.claude/skills/django-best-practices/SKILL.md +334 -0
  154. package/templates/.claude/skills/docker-best-practices/SKILL.md +276 -0
  155. package/templates/.claude/skills/evaluator-optimizer/SKILL.md +421 -0
  156. package/templates/.claude/skills/fastapi-best-practices/SKILL.md +271 -0
  157. package/templates/.claude/skills/fix-refs/SKILL.md +109 -0
  158. package/templates/.claude/skills/flutter-best-practices/SKILL.md +325 -0
  159. package/templates/.claude/skills/gemini-exec/SKILL.md +215 -0
  160. package/templates/.claude/skills/gemini-exec/scripts/gemini-wrapper.cjs +485 -0
  161. package/templates/.claude/skills/go-backend-best-practices/SKILL.md +135 -0
  162. package/templates/.claude/skills/go-best-practices/SKILL.md +204 -0
  163. package/templates/.claude/skills/hada-scout/SKILL.md +92 -0
  164. package/templates/.claude/skills/harness-eval/SKILL.md +95 -0
  165. package/templates/.claude/skills/harness-synthesizer/SKILL.md +145 -0
  166. package/templates/.claude/skills/help/SKILL.md +127 -0
  167. package/templates/.claude/skills/idea/SKILL.md +88 -0
  168. package/templates/.claude/skills/impeccable-design/SKILL.md +173 -0
  169. package/templates/.claude/skills/intent-detection/SKILL.md +293 -0
  170. package/templates/.claude/skills/intent-detection/patterns/agent-triggers.yaml +438 -0
  171. package/templates/.claude/skills/java21-best-practices/SKILL.md +190 -0
  172. package/templates/.claude/skills/jinja2-prompts/SKILL.md +86 -0
  173. package/templates/.claude/skills/kafka-best-practices/SKILL.md +53 -0
  174. package/templates/.claude/skills/kotlin-best-practices/SKILL.md +257 -0
  175. package/templates/.claude/skills/lists/SKILL.md +80 -0
  176. package/templates/.claude/skills/memory-management/SKILL.md +196 -0
  177. package/templates/.claude/skills/memory-recall/SKILL.md +172 -0
  178. package/templates/.claude/skills/memory-save/SKILL.md +128 -0
  179. package/templates/.claude/skills/model-escalation/SKILL.md +62 -0
  180. package/templates/.claude/skills/monitoring-setup/SKILL.md +215 -0
  181. package/templates/.claude/skills/multi-model-verification/SKILL.md +130 -0
  182. package/templates/.claude/skills/npm-audit/SKILL.md +74 -0
  183. package/templates/.claude/skills/npm-publish/SKILL.md +65 -0
  184. package/templates/.claude/skills/npm-version/SKILL.md +104 -0
  185. package/templates/.claude/skills/omcodex-auto-improve/SKILL.md +136 -0
  186. package/templates/.claude/skills/omcodex-feedback/SKILL.md +205 -0
  187. package/templates/.claude/skills/omcodex-improve-report/SKILL.md +65 -0
  188. package/templates/.claude/skills/omcodex-loop/SKILL.md +45 -0
  189. package/templates/.claude/skills/omcodex-release-notes/SKILL.md +117 -0
  190. package/templates/.claude/skills/omcodex-takeover/SKILL.md +115 -0
  191. package/templates/.claude/skills/omcodex-web/SKILL.md +95 -0
  192. package/templates/.claude/skills/optimize-analyze/SKILL.md +57 -0
  193. package/templates/.claude/skills/optimize-bundle/SKILL.md +69 -0
  194. package/templates/.claude/skills/optimize-report/SKILL.md +76 -0
  195. package/templates/.claude/skills/peer-messaging/SKILL.md +59 -0
  196. package/templates/.claude/skills/pipeline/SKILL.md +103 -0
  197. package/templates/.claude/skills/pipeline-architecture-patterns/SKILL.md +84 -0
  198. package/templates/.claude/skills/pipeline-guards/SKILL.md +173 -0
  199. package/templates/.claude/skills/post-release-followup/SKILL.md +134 -0
  200. package/templates/.claude/skills/postgres-best-practices/SKILL.md +67 -0
  201. package/templates/.claude/skills/pr-auto-improve/SKILL.md +129 -0
  202. package/templates/.claude/skills/professor-triage/SKILL.md +321 -0
  203. package/templates/.claude/skills/python-best-practices/SKILL.md +223 -0
  204. package/templates/.claude/skills/qa-lead-routing/SKILL.md +104 -0
  205. package/templates/.claude/skills/react-best-practices/SKILL.md +102 -0
  206. package/templates/.claude/skills/reasoning-sandwich/SKILL.md +64 -0
  207. package/templates/.claude/skills/redis-best-practices/SKILL.md +84 -0
  208. package/templates/.claude/skills/release-plan/SKILL.md +207 -0
  209. package/templates/.claude/skills/research/SKILL.md +493 -0
  210. package/templates/.claude/skills/result-aggregation/SKILL.md +165 -0
  211. package/templates/.claude/skills/rtk-exec/SKILL.md +199 -0
  212. package/templates/.claude/skills/rtk-exec/scripts/rtk-wrapper.cjs +377 -0
  213. package/templates/.claude/skills/rust-best-practices/SKILL.md +268 -0
  214. package/templates/.claude/skills/sauron-watch/SKILL.md +239 -0
  215. package/templates/.claude/skills/scout/SKILL.md +250 -0
  216. package/templates/.claude/skills/sdd/SKILL.md +24 -0
  217. package/templates/.claude/skills/sdd-dev/SKILL.md +257 -0
  218. package/templates/.claude/skills/sdd-development/SKILL.md +24 -0
  219. package/templates/.claude/skills/secretary-routing/SKILL.md +132 -0
  220. package/templates/.claude/skills/skill-extractor/SKILL.md +155 -0
  221. package/templates/.claude/skills/skills-sh-search/SKILL.md +210 -0
  222. package/templates/.claude/skills/snowflake-best-practices/SKILL.md +66 -0
  223. package/templates/.claude/skills/spark-best-practices/SKILL.md +53 -0
  224. package/templates/.claude/skills/springboot-best-practices/SKILL.md +74 -0
  225. package/templates/.claude/skills/springboot-best-practices/examples/config-properties-example.java +22 -0
  226. package/templates/.claude/skills/springboot-best-practices/examples/controller-example.java +28 -0
  227. package/templates/.claude/skills/springboot-best-practices/examples/controller-test-example.java +33 -0
  228. package/templates/.claude/skills/springboot-best-practices/examples/entity-example.java +22 -0
  229. package/templates/.claude/skills/springboot-best-practices/examples/exception-handler-example.java +30 -0
  230. package/templates/.claude/skills/springboot-best-practices/examples/repository-example.java +17 -0
  231. package/templates/.claude/skills/springboot-best-practices/examples/repository-test-example.java +23 -0
  232. package/templates/.claude/skills/springboot-best-practices/examples/security-config-example.java +27 -0
  233. package/templates/.claude/skills/springboot-best-practices/examples/service-example.java +33 -0
  234. package/templates/.claude/skills/status/SKILL.md +155 -0
  235. package/templates/.claude/skills/structured-dev-cycle/SKILL.md +200 -0
  236. package/templates/.claude/skills/stuck-recovery/SKILL.md +80 -0
  237. package/templates/.claude/skills/supabase-postgres-best-practices/SKILL.md +100 -0
  238. package/templates/.claude/skills/systematic-debugging/SKILL.md +288 -0
  239. package/templates/.claude/skills/systematic-debugging/condition-based-waiting-example.ts +278 -0
  240. package/templates/.claude/skills/systematic-debugging/condition-based-waiting.md +240 -0
  241. package/templates/.claude/skills/systematic-debugging/defense-in-depth.md +252 -0
  242. package/templates/.claude/skills/systematic-debugging/find-polluter.sh +147 -0
  243. package/templates/.claude/skills/systematic-debugging/root-cause-tracing.md +87 -0
  244. package/templates/.claude/skills/task-decomposition/SKILL.md +197 -0
  245. package/templates/.claude/skills/typescript-best-practices/SKILL.md +322 -0
  246. package/templates/.claude/skills/update-docs/SKILL.md +142 -0
  247. package/templates/.claude/skills/update-external/SKILL.md +169 -0
  248. package/templates/.claude/skills/vercel-deploy/SKILL.md +75 -0
  249. package/templates/.claude/skills/web-design-guidelines/SKILL.md +119 -0
  250. package/templates/.claude/skills/wiki/SKILL.md +426 -0
  251. package/templates/.claude/skills/wiki-rag/SKILL.md +154 -0
  252. package/templates/.claude/skills/worker-reviewer-pipeline/SKILL.md +165 -0
  253. package/templates/.claude/skills/writing-clearly-and-concisely/SKILL.md +66 -0
  254. package/templates/.claude/statusline.sh +380 -0
  255. package/templates/.claude/uninstall-hooks.sh +52 -0
  256. package/templates/.github/workflows/wiki-sync.yml +132 -0
  257. package/templates/AGENTS.md.en +255 -0
  258. package/templates/AGENTS.md.ko +255 -0
  259. package/templates/CLAUDE.md +263 -0
  260. package/templates/CLAUDE.md.en +256 -0
  261. package/templates/CLAUDE.md.ko +256 -0
  262. package/templates/deprecated-files.json +10 -0
  263. package/templates/guides/agents-md-quality/README.md +110 -0
  264. package/templates/guides/airflow/README.md +47 -0
  265. package/templates/guides/alembic/README.md +438 -0
  266. package/templates/guides/aws/common-patterns.md +169 -0
  267. package/templates/guides/aws/index.yaml +26 -0
  268. package/templates/guides/aws/well-architected.md +143 -0
  269. package/templates/guides/cc-token-saver/README.md +97 -0
  270. package/templates/guides/claude-code/01-overview.md +42 -0
  271. package/templates/guides/claude-code/03-tools.md +107 -0
  272. package/templates/guides/claude-code/04-agent-skills.md +90 -0
  273. package/templates/guides/claude-code/05-agent-sdk.md +129 -0
  274. package/templates/guides/claude-code/06-mcp.md +165 -0
  275. package/templates/guides/claude-code/07-prompt-engineering.md +100 -0
  276. package/templates/guides/claude-code/08-testing.md +56 -0
  277. package/templates/guides/claude-code/09-guardrails.md +78 -0
  278. package/templates/guides/claude-code/10-monitoring.md +87 -0
  279. package/templates/guides/claude-code/11-sub-agents.md +159 -0
  280. package/templates/guides/claude-code/12-workflow-patterns.md +182 -0
  281. package/templates/guides/claude-code/13-cli-flags.md +151 -0
  282. package/templates/guides/claude-code/index.yaml +61 -0
  283. package/templates/guides/dbt/README.md +32 -0
  284. package/templates/guides/django-best-practices/README.md +476 -0
  285. package/templates/guides/docker/compose-best-practices.md +284 -0
  286. package/templates/guides/docker/dockerfile-best-practices.md +262 -0
  287. package/templates/guides/docker/index.yaml +26 -0
  288. package/templates/guides/drizzle-orm/README.md +69 -0
  289. package/templates/guides/elements-of-style/elements-of-style.html +2609 -0
  290. package/templates/guides/fastapi/best-practices.md +232 -0
  291. package/templates/guides/fastapi/index.yaml +21 -0
  292. package/templates/guides/flutter/architecture.md +141 -0
  293. package/templates/guides/flutter/fundamentals.md +119 -0
  294. package/templates/guides/flutter/index.yaml +44 -0
  295. package/templates/guides/flutter/performance.md +119 -0
  296. package/templates/guides/flutter/security.md +120 -0
  297. package/templates/guides/flutter/state-management.md +144 -0
  298. package/templates/guides/flutter/testing.md +155 -0
  299. package/templates/guides/git-worktree-workflow/README.md +138 -0
  300. package/templates/guides/go-backend/index.yaml +26 -0
  301. package/templates/guides/go-backend/project-layout.md +243 -0
  302. package/templates/guides/go-backend/uber-style.md +212 -0
  303. package/templates/guides/golang/concurrency.md +282 -0
  304. package/templates/guides/golang/effective-go.md +309 -0
  305. package/templates/guides/golang/error-handling.md +250 -0
  306. package/templates/guides/golang/index.yaml +27 -0
  307. package/templates/guides/hook-data-flow/README.md +135 -0
  308. package/templates/guides/iceberg/README.md +49 -0
  309. package/templates/guides/impeccable-design/color-and-contrast.md +278 -0
  310. package/templates/guides/impeccable-design/index.yaml +12 -0
  311. package/templates/guides/impeccable-design/motion-design.md +390 -0
  312. package/templates/guides/impeccable-design/typography.md +386 -0
  313. package/templates/guides/impeccable-design/ux-writing.md +400 -0
  314. package/templates/guides/index.yaml +265 -0
  315. package/templates/guides/java21/index.yaml +29 -0
  316. package/templates/guides/java21/java-style-guide.md +248 -0
  317. package/templates/guides/java21/modern-java21.md +303 -0
  318. package/templates/guides/kafka/README.md +32 -0
  319. package/templates/guides/kotlin/coding-conventions.md +247 -0
  320. package/templates/guides/kotlin/idioms.md +234 -0
  321. package/templates/guides/kotlin/index.yaml +26 -0
  322. package/templates/guides/multi-model-routing/README.md +101 -0
  323. package/templates/guides/multi-provider-exec/README.md +83 -0
  324. package/templates/guides/postgres/README.md +58 -0
  325. package/templates/guides/python/index.yaml +26 -0
  326. package/templates/guides/python/pep8-style-guide.md +202 -0
  327. package/templates/guides/python/zen-of-python.md +79 -0
  328. package/templates/guides/redis/README.md +50 -0
  329. package/templates/guides/rust/error-handling.md +262 -0
  330. package/templates/guides/rust/index.yaml +26 -0
  331. package/templates/guides/rust/ownership.md +180 -0
  332. package/templates/guides/skill-bundle-design/README.md +106 -0
  333. package/templates/guides/slack-cli/README.md +145 -0
  334. package/templates/guides/snowflake/README.md +32 -0
  335. package/templates/guides/spark/README.md +32 -0
  336. package/templates/guides/springboot/best-practices.md +361 -0
  337. package/templates/guides/springboot/index.yaml +22 -0
  338. package/templates/guides/supabase-postgres/README.md +32 -0
  339. package/templates/guides/supabase-postgres/index.yaml +19 -0
  340. package/templates/guides/typescript/advanced-types.md +225 -0
  341. package/templates/guides/typescript/index.yaml +26 -0
  342. package/templates/guides/typescript/type-system.md +219 -0
  343. package/templates/guides/web-design/accessibility.md +66 -0
  344. package/templates/guides/web-design/index.yaml +20 -0
  345. package/templates/guides/web-design/performance.md +102 -0
  346. package/templates/guides/web-scraping/README.md +926 -0
  347. package/templates/guides/web-scraping/index.yaml +19 -0
  348. package/templates/guides/worktree-lifecycle/README.md +104 -0
  349. package/templates/index.yaml +18 -0
  350. package/templates/manifest.json +49 -0
  351. package/templates/workflows/auto-dev.yaml +46 -0
@@ -0,0 +1,485 @@
1
+ #!/usr/bin/env node
2
+
3
+ /**
4
+ * gemini-wrapper.cjs
5
+ *
6
+ * Node.js wrapper for Google Gemini CLI (non-interactive execution).
7
+ * Executes gemini in prompt mode with structured JSON output.
8
+ *
9
+ * Usage:
10
+ * node gemini-wrapper.cjs --prompt "your prompt" [options]
11
+ *
12
+ * Options:
13
+ * --prompt <text> Required: prompt to execute
14
+ * --json Enable JSON output from gemini (-o json)
15
+ * --stream-json Enable stream-JSON output (-o stream-json)
16
+ * --output <path> Save response to file
17
+ * --model <name> Specify model (default: gemini CLI default)
18
+ * --timeout <ms> Execution timeout in milliseconds (default: 120000, max: 600000)
19
+ * --yolo Use yolo approval mode (auto-approve all actions)
20
+ * --sandbox Run in sandbox mode
21
+ * --plan Use plan approval mode
22
+ * --working-dir <dir> Set working directory for execution
23
+ *
24
+ * Output (JSON to stdout):
25
+ * Success: { "success": true, "output": "...", "duration_ms": 1234, ... }
26
+ * Failure: { "success": false, "error": "...", "stderr": "...", ... }
27
+ *
28
+ * Exit codes:
29
+ * 0 = success
30
+ * 1 = execution error
31
+ * 2 = validation error (missing binary/auth)
32
+ */
33
+
34
+ const { spawn, execFileSync } = require('child_process');
35
+ const fs = require('fs');
36
+ const path = require('path');
37
+ const os = require('os');
38
+
39
+ // Configuration
40
+ const DEFAULT_TIMEOUT_MS = 120000; // 2 minutes
41
+ const MAX_TIMEOUT_MS = 600000; // 10 minutes
42
+ const KILL_GRACE_PERIOD_MS = 5000; // 5 seconds for graceful shutdown
43
+
44
+ /**
45
+ * Parse command line arguments
46
+ * @returns {Object} Parsed arguments
47
+ */
48
+ function parseArgs() {
49
+ const args = {
50
+ prompt: null,
51
+ json: false,
52
+ streamJson: false,
53
+ output: null,
54
+ model: null,
55
+ timeout: DEFAULT_TIMEOUT_MS,
56
+ yolo: false,
57
+ sandbox: false,
58
+ plan: false,
59
+ workingDir: null,
60
+ };
61
+
62
+ for (let i = 2; i < process.argv.length; i++) {
63
+ const arg = process.argv[i];
64
+
65
+ switch (arg) {
66
+ case '--prompt':
67
+ if (i + 1 < process.argv.length) {
68
+ args.prompt = process.argv[++i];
69
+ }
70
+ break;
71
+ case '--json':
72
+ args.json = true;
73
+ break;
74
+ case '--stream-json':
75
+ args.streamJson = true;
76
+ break;
77
+ case '--output':
78
+ if (i + 1 < process.argv.length) {
79
+ args.output = process.argv[++i];
80
+ }
81
+ break;
82
+ case '--model':
83
+ if (i + 1 < process.argv.length) {
84
+ args.model = process.argv[++i];
85
+ }
86
+ break;
87
+ case '--timeout':
88
+ if (i + 1 < process.argv.length) {
89
+ const timeoutValue = parseInt(process.argv[++i], 10);
90
+ if (!isNaN(timeoutValue)) {
91
+ args.timeout = Math.min(timeoutValue, MAX_TIMEOUT_MS);
92
+ }
93
+ }
94
+ break;
95
+ case '--yolo':
96
+ args.yolo = true;
97
+ break;
98
+ case '--sandbox':
99
+ args.sandbox = true;
100
+ break;
101
+ case '--plan':
102
+ args.plan = true;
103
+ break;
104
+ case '--working-dir':
105
+ if (i + 1 < process.argv.length) {
106
+ args.workingDir = process.argv[++i];
107
+ }
108
+ break;
109
+ }
110
+ }
111
+
112
+ return args;
113
+ }
114
+
115
+ /**
116
+ * Validate environment for gemini execution
117
+ * @returns {Object} Validation result { valid: boolean, errors: string[] }
118
+ */
119
+ function validateEnvironment() {
120
+ const errors = [];
121
+
122
+ // Check for gemini binary
123
+ try {
124
+ execFileSync('which', ['gemini'], { stdio: 'pipe' });
125
+ } catch (error) {
126
+ // Try common installation paths
127
+ const commonPaths = [
128
+ '/usr/local/bin/gemini',
129
+ path.join(os.homedir(), '.local', 'bin', 'gemini'),
130
+ path.join(os.homedir(), 'bin', 'gemini'),
131
+ path.join(os.homedir(), '.npm-global', 'bin', 'gemini'),
132
+ ];
133
+
134
+ const geminiExists = commonPaths.some(p => fs.existsSync(p));
135
+ if (!geminiExists) {
136
+ errors.push('gemini binary not found in PATH or common locations');
137
+ }
138
+ }
139
+
140
+ // Check authentication (multiple methods supported)
141
+ const hasGoogleApiKey = !!process.env.GOOGLE_API_KEY;
142
+ const hasGeminiApiKey = !!process.env.GEMINI_API_KEY;
143
+
144
+ if (!hasGoogleApiKey && !hasGeminiApiKey) {
145
+ console.error('[gemini-wrapper] Note: GOOGLE_API_KEY/GEMINI_API_KEY not set, relying on gcloud auth');
146
+ }
147
+
148
+ return {
149
+ valid: errors.length === 0,
150
+ errors,
151
+ };
152
+ }
153
+
154
+ /**
155
+ * Build gemini command array
156
+ * @param {Object} options - Command options
157
+ * @returns {Object} Command structure { binary: string, args: string[] }
158
+ */
159
+ function buildCommand(options) {
160
+ const args = [];
161
+
162
+ // Prompt mode (non-interactive, ephemeral)
163
+ args.push('-p', options.prompt);
164
+
165
+ // Output format
166
+ if (options.streamJson) {
167
+ args.push('-o', 'stream-json');
168
+ } else if (options.json) {
169
+ args.push('-o', 'json');
170
+ }
171
+
172
+ // Model selection
173
+ if (options.model) {
174
+ args.push('-m', options.model);
175
+ }
176
+
177
+ // Approval mode
178
+ if (options.yolo) {
179
+ args.push('-y');
180
+ } else if (options.plan) {
181
+ args.push('--approval-mode', 'plan');
182
+ }
183
+
184
+ // Sandbox mode
185
+ if (options.sandbox) {
186
+ args.push('-s');
187
+ }
188
+
189
+ return {
190
+ binary: 'gemini',
191
+ args,
192
+ };
193
+ }
194
+
195
+ /**
196
+ * Execute gemini command
197
+ * @param {string} binary - Binary to execute
198
+ * @param {string[]} args - Command arguments
199
+ * @param {number} timeout - Timeout in milliseconds
200
+ * @param {string|null} workingDir - Working directory
201
+ * @returns {Promise<Object>} Execution result
202
+ */
203
+ function executeGemini(binary, args, timeout, workingDir = null) {
204
+ return new Promise((resolve) => {
205
+ const startTime = Date.now();
206
+ let stdout = '';
207
+ let stderr = '';
208
+ let timedOut = false;
209
+
210
+ const spawnOptions = {
211
+ cwd: workingDir || process.cwd(),
212
+ env: process.env,
213
+ };
214
+
215
+ const child = spawn(binary, args, spawnOptions);
216
+
217
+ // Collect output
218
+ child.stdout.on('data', (data) => {
219
+ stdout += data.toString();
220
+ });
221
+
222
+ child.stderr.on('data', (data) => {
223
+ stderr += data.toString();
224
+ });
225
+
226
+ // Set timeout
227
+ const timeoutHandle = setTimeout(() => {
228
+ timedOut = true;
229
+ console.error('[gemini-wrapper] Timeout reached, terminating process...');
230
+
231
+ // Graceful termination attempt
232
+ child.kill('SIGTERM');
233
+
234
+ // Force kill after grace period
235
+ setTimeout(() => {
236
+ if (!child.killed) {
237
+ console.error('[gemini-wrapper] Force killing process...');
238
+ child.kill('SIGKILL');
239
+ }
240
+ }, KILL_GRACE_PERIOD_MS);
241
+ }, timeout);
242
+
243
+ // Handle process exit
244
+ child.on('close', (exitCode) => {
245
+ clearTimeout(timeoutHandle);
246
+ const durationMs = Date.now() - startTime;
247
+
248
+ resolve({
249
+ exitCode: exitCode !== null ? exitCode : 1,
250
+ stdout,
251
+ stderr,
252
+ timedOut,
253
+ durationMs,
254
+ });
255
+ });
256
+
257
+ // Handle spawn errors
258
+ child.on('error', (error) => {
259
+ clearTimeout(timeoutHandle);
260
+ const durationMs = Date.now() - startTime;
261
+
262
+ resolve({
263
+ exitCode: 1,
264
+ stdout,
265
+ stderr: stderr + '\nSpawn error: ' + error.message,
266
+ timedOut: false,
267
+ durationMs,
268
+ });
269
+ });
270
+ });
271
+ }
272
+
273
+ /**
274
+ * Parse JSON output from gemini (-o json)
275
+ * Gemini JSON output is a single JSON object: { session_id, response, stats }
276
+ * @param {string} output - Raw output string
277
+ * @returns {Object} Parsed result { response: string|null, stats: object|null, parseError: string|null }
278
+ */
279
+ function parseJson(output) {
280
+ try {
281
+ const data = JSON.parse(output.trim());
282
+ return {
283
+ response: data.response || null,
284
+ stats: data.stats || null,
285
+ sessionId: data.session_id || null,
286
+ parseError: null,
287
+ };
288
+ } catch (error) {
289
+ return {
290
+ response: null,
291
+ stats: null,
292
+ sessionId: null,
293
+ parseError: `Failed to parse JSON: ${error.message}`,
294
+ };
295
+ }
296
+ }
297
+
298
+ /**
299
+ * Parse stream-JSON output from gemini (-o stream-json)
300
+ * Stream format: newline-delimited JSON events
301
+ * { type: "init", ... }
302
+ * { type: "message", role: "user"|"assistant", content: "..." }
303
+ * { type: "result", stats: {...} }
304
+ * @param {string} output - Raw output string
305
+ * @returns {Object} Parsed result { events: object[], finalMessage: string|null, stats: object|null, parseErrors: string[] }
306
+ */
307
+ function parseStreamJson(output) {
308
+ const lines = output.split('\n').filter(line => line.trim().length > 0);
309
+ const events = [];
310
+ const parseErrors = [];
311
+ let finalMessage = null;
312
+ let stats = null;
313
+
314
+ for (const line of lines) {
315
+ try {
316
+ const event = JSON.parse(line);
317
+ events.push(event);
318
+
319
+ // Extract final assistant message
320
+ if (event.type === 'message' && event.role === 'assistant') {
321
+ finalMessage = event.content || event.text || finalMessage;
322
+ }
323
+
324
+ // Extract stats from result event
325
+ if (event.type === 'result') {
326
+ stats = event.stats || null;
327
+ if (event.response) {
328
+ finalMessage = event.response;
329
+ }
330
+ }
331
+
332
+ // Fallback: look for common response patterns
333
+ if (!finalMessage && event.content && event.role === 'model') {
334
+ finalMessage = event.content;
335
+ }
336
+ } catch (error) {
337
+ parseErrors.push(`Failed to parse line: ${error.message}`);
338
+ }
339
+ }
340
+
341
+ return {
342
+ events,
343
+ finalMessage,
344
+ stats,
345
+ parseErrors,
346
+ };
347
+ }
348
+
349
+ /**
350
+ * Main execution function
351
+ */
352
+ async function main() {
353
+ const args = parseArgs();
354
+
355
+ // Validate required arguments
356
+ if (!args.prompt) {
357
+ const result = {
358
+ success: false,
359
+ error: 'Missing required argument: --prompt',
360
+ exit_code: 2,
361
+ };
362
+ console.log(JSON.stringify(result, null, 2));
363
+ process.exit(2);
364
+ }
365
+
366
+ // Validate environment
367
+ const validation = validateEnvironment();
368
+ if (!validation.valid) {
369
+ const result = {
370
+ success: false,
371
+ error: 'Environment validation failed',
372
+ validation_errors: validation.errors,
373
+ exit_code: 2,
374
+ };
375
+ console.log(JSON.stringify(result, null, 2));
376
+ process.exit(2);
377
+ }
378
+
379
+ console.error(`[gemini-wrapper] Executing gemini with timeout: ${args.timeout}ms`);
380
+ if (args.workingDir) {
381
+ console.error(`[gemini-wrapper] Working directory: ${args.workingDir}`);
382
+ }
383
+
384
+ // Build command
385
+ const command = buildCommand(args);
386
+ console.error(`[gemini-wrapper] Command: ${command.binary} ${command.args.join(' ')}`);
387
+
388
+ // Execute
389
+ const execResult = await executeGemini(
390
+ command.binary,
391
+ command.args,
392
+ args.timeout,
393
+ args.workingDir
394
+ );
395
+
396
+ // Process result
397
+ let output = null;
398
+ let eventsCount = 0;
399
+ let stats = null;
400
+
401
+ if (args.streamJson && execResult.stdout) {
402
+ const parsed = parseStreamJson(execResult.stdout);
403
+ eventsCount = parsed.events.length;
404
+ output = parsed.finalMessage;
405
+ stats = parsed.stats;
406
+
407
+ if (parsed.parseErrors.length > 0) {
408
+ console.error('[gemini-wrapper] Stream-JSON parse errors:', parsed.parseErrors.join('; '));
409
+ }
410
+ } else if (args.json && execResult.stdout) {
411
+ const parsed = parseJson(execResult.stdout);
412
+ output = parsed.response;
413
+ stats = parsed.stats;
414
+
415
+ if (parsed.parseError) {
416
+ console.error('[gemini-wrapper] JSON parse error:', parsed.parseError);
417
+ // Fallback to raw output
418
+ output = execResult.stdout.trim();
419
+ }
420
+ } else {
421
+ output = execResult.stdout.trim();
422
+ }
423
+
424
+ // Determine success
425
+ const success = execResult.exitCode === 0 && !execResult.timedOut;
426
+
427
+ // Build result object
428
+ const result = {
429
+ success,
430
+ duration_ms: execResult.durationMs,
431
+ exit_code: execResult.exitCode,
432
+ };
433
+
434
+ if (success) {
435
+ result.output = output || execResult.stdout;
436
+ result.model = args.model || '(default)';
437
+ if (args.streamJson) {
438
+ result.events_count = eventsCount;
439
+ }
440
+ if (stats) {
441
+ result.stats = stats;
442
+ }
443
+ } else {
444
+ if (execResult.timedOut) {
445
+ result.error = `Execution timed out after ${args.timeout}ms`;
446
+ } else {
447
+ result.error = 'Execution failed';
448
+ }
449
+ if (execResult.stderr) {
450
+ result.stderr = execResult.stderr.trim();
451
+ }
452
+ }
453
+
454
+ // Write output file if requested
455
+ if (args.output && output) {
456
+ try {
457
+ const outputDir = path.dirname(args.output);
458
+ if (!fs.existsSync(outputDir)) {
459
+ fs.mkdirSync(outputDir, { recursive: true });
460
+ }
461
+ fs.writeFileSync(args.output, output, 'utf-8');
462
+ console.error(`[gemini-wrapper] Output written to: ${args.output}`);
463
+ } catch (error) {
464
+ console.error(`[gemini-wrapper] Failed to write output file: ${error.message}`);
465
+ result.output_file_error = error.message;
466
+ }
467
+ }
468
+
469
+ // Output JSON result to stdout
470
+ console.log(JSON.stringify(result, null, 2));
471
+
472
+ process.exit(result.exit_code);
473
+ }
474
+
475
+ // Run
476
+ main().catch(error => {
477
+ const result = {
478
+ success: false,
479
+ error: 'Unexpected error: ' + error.message,
480
+ stack: error.stack,
481
+ exit_code: 1,
482
+ };
483
+ console.log(JSON.stringify(result, null, 2));
484
+ process.exit(1);
485
+ });
@@ -0,0 +1,135 @@
1
+ ---
2
+ name: go-backend-best-practices
3
+ description: Go backend patterns from Uber style and standard layout
4
+ scope: core
5
+ user-invocable: false
6
+ ---
7
+
8
+ ## Purpose
9
+
10
+ Apply Go backend patterns for building production-ready services.
11
+
12
+ ## Rules
13
+
14
+ ### 1. Project Structure (Standard Layout)
15
+
16
+ ```yaml
17
+ layout: "cmd/{server/main.go} + internal/{handler/,service/,repository/,model/} + pkg/{shared/} + api/{openapi.yaml} + configs/ + scripts/"
18
+
19
+ directories:
20
+ cmd: Main applications (one per binary)
21
+ internal: Private application code
22
+ pkg: Library code safe for external use
23
+ api: API definitions (OpenAPI, protobuf)
24
+ configs: Configuration files
25
+ scripts: Build and CI scripts
26
+ ```
27
+
28
+ Reference: guides/go-backend/project-layout.md
29
+
30
+ ### 2. Error Handling (Uber Style)
31
+
32
+ ```yaml
33
+ principles:
34
+ - Wrap errors with context using %w
35
+ - Handle errors once (don't log AND return)
36
+ - Use sentinel errors for specific conditions
37
+ - Name error variables with Err prefix
38
+
39
+ patterns:
40
+ sentinel: "var ErrNotFound = errors.New(\"not found\")"
41
+ wrapping: "fmt.Errorf(\"getUser %s: %w\", id, err)"
42
+ checking: "errors.Is(err, ErrNotFound)"
43
+ ```
44
+
45
+ Reference: guides/go-backend/uber-style.md
46
+
47
+ ### 3. Concurrency (Uber Style)
48
+
49
+ ```yaml
50
+ channels:
51
+ size: "Use 0 (unbuffered) or 1 only"
52
+ larger: "Requires careful review"
53
+
54
+ goroutines:
55
+ never: fire-and-forget
56
+ always: wait for completion or manage lifecycle
57
+ patterns: "sync.WaitGroup + error channel for parallel work; context.Context for cancellation"
58
+ ```
59
+
60
+ Reference: guides/go-backend/uber-style.md
61
+
62
+ ### 4. HTTP Server
63
+
64
+ ```yaml
65
+ structure:
66
+ handler: HTTP layer (request/response)
67
+ service: Business logic
68
+ repository: Data access
69
+
70
+ patterns:
71
+ dependency_injection: "Handler struct with service field, constructor NewXxxHandler()"
72
+ router: "chi.NewRouter() with middleware (Logger, Recoverer) and versioned routes"
73
+ error_mapping: "errors.Is() to map domain errors to HTTP status codes"
74
+ ```
75
+
76
+ Reference: guides/go-backend/uber-style.md
77
+
78
+ ### 5. Dependency Injection
79
+
80
+ ```yaml
81
+ approach: constructor injection
82
+ avoid: global variables
83
+ pattern: "Struct with dependencies as fields, New* constructor functions, wire up in main()"
84
+ ```
85
+
86
+ Reference: guides/go-backend/uber-style.md
87
+
88
+ ### 6. Configuration
89
+
90
+ ```yaml
91
+ approach:
92
+ - Use environment variables
93
+ - Validate at startup
94
+ - Group related settings
95
+ pattern: "Config struct with nested typed configs, env struct tags, Parse at startup"
96
+ ```
97
+
98
+ Reference: guides/go-backend/uber-style.md
99
+
100
+ ### 7. Testing
101
+
102
+ ```yaml
103
+ patterns:
104
+ table_driven: for comprehensive coverage
105
+ interfaces: for mocking
106
+ parallel: for speed
107
+ tools: "gomock for mocks, cmp.Diff for assertions"
108
+ ```
109
+
110
+ Reference: guides/go-backend/uber-style.md
111
+
112
+ ### 8. Performance (Uber Style)
113
+
114
+ ```yaml
115
+ guidelines:
116
+ - Use strconv over fmt for conversions
117
+ - Pre-allocate slices with known capacity
118
+ - Avoid repeated string-to-byte conversions
119
+ - Copy slices/maps at boundaries
120
+ ```
121
+
122
+ Reference: guides/go-backend/uber-style.md
123
+
124
+ ## Application
125
+
126
+ When writing Go backend code:
127
+
128
+ 1. **Always** use standard project layout
129
+ 2. **Always** wrap errors with context
130
+ 3. **Never** fire-and-forget goroutines
131
+ 4. **Use** constructor injection
132
+ 5. **Use** table-driven tests
133
+ 6. **Handle** errors once
134
+ 7. **Copy** data at boundaries
135
+ 8. **Validate** config at startup