deepmodebot 0.0.0-stage → 0.9.1

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 (313) hide show
  1. package/.claude-plugin/marketplace.json +26 -0
  2. package/.omp-plugin/marketplace.json +26 -0
  3. package/LICENSE +24 -0
  4. package/README.md +377 -2
  5. package/bin/deepmodebot.mjs +247 -0
  6. package/lib/autoupdate.mjs +47 -0
  7. package/lib/clients.mjs +139 -0
  8. package/lib/run.mjs +32 -0
  9. package/lib/state.mjs +52 -0
  10. package/lib/tree.mjs +48 -0
  11. package/lib/version.mjs +26 -0
  12. package/package.json +44 -4
  13. package/plugins/deepmodebot/.antigravity-plugin/plugin.json +35 -0
  14. package/plugins/deepmodebot/.antigravity-plugin/skills/deep/SKILL.md +13 -0
  15. package/plugins/deepmodebot/.antigravity-plugin/skills/land-pr/SKILL.md +23 -0
  16. package/plugins/deepmodebot/.antigravity-plugin/skills/pr-thread/SKILL.md +17 -0
  17. package/plugins/deepmodebot/.antigravity-plugin/skills/review-pr/SKILL.md +16 -0
  18. package/plugins/deepmodebot/.antigravity-plugin/skills/tournament/SKILL.md +14 -0
  19. package/plugins/deepmodebot/.claude-plugin/plugin.json +27 -0
  20. package/plugins/deepmodebot/agents/reviewer/agent.md +33 -0
  21. package/plugins/deepmodebot/agents/scout/agent.md +34 -0
  22. package/plugins/deepmodebot/agents/security-reviewer/agent.md +30 -0
  23. package/plugins/deepmodebot/assets/logo.svg +8 -0
  24. package/plugins/deepmodebot/commands/contribute.md +8 -0
  25. package/plugins/deepmodebot/commands/deep.md +11 -0
  26. package/plugins/deepmodebot/commands/land-pr.md +12 -0
  27. package/plugins/deepmodebot/commands/pr-thread.md +14 -0
  28. package/plugins/deepmodebot/commands/project-brief.md +8 -0
  29. package/plugins/deepmodebot/commands/review-pr.md +10 -0
  30. package/plugins/deepmodebot/commands/tournament.md +12 -0
  31. package/plugins/deepmodebot/hooks/hooks.json +26 -0
  32. package/plugins/deepmodebot/hooks.json +24 -0
  33. package/plugins/deepmodebot/mcp_config.json +11 -0
  34. package/plugins/deepmodebot/scripts/antigravity-guard.mjs +413 -0
  35. package/plugins/deepmodebot/scripts/omp-mcp-server.mjs +1091 -0
  36. package/plugins/deepmodebot/skills/agent-harnesses/SKILL.md +57 -0
  37. package/plugins/deepmodebot/skills/agent-harnesses/assets/sdks/bun.lock +391 -0
  38. package/plugins/deepmodebot/skills/agent-harnesses/assets/sdks/check.ts +53 -0
  39. package/plugins/deepmodebot/skills/agent-harnesses/assets/sdks/check_antigravity.py +38 -0
  40. package/plugins/deepmodebot/skills/agent-harnesses/assets/sdks/check_claude.mjs +11 -0
  41. package/plugins/deepmodebot/skills/agent-harnesses/assets/sdks/package.json +11 -0
  42. package/plugins/deepmodebot/skills/agent-harnesses/assets/sdks/requirements.txt +1 -0
  43. package/plugins/deepmodebot/skills/agent-harnesses/references/ai-native-tooling.md +190 -0
  44. package/plugins/deepmodebot/skills/agent-harnesses/references/ai-sdk-selection.md +50 -0
  45. package/plugins/deepmodebot/skills/agent-harnesses/references/antigravity.md +108 -0
  46. package/plugins/deepmodebot/skills/agent-harnesses/references/claude-code.md +166 -0
  47. package/plugins/deepmodebot/skills/agent-harnesses/references/codex.md +151 -0
  48. package/plugins/deepmodebot/skills/agent-harnesses/references/delegation-efficiency.md +230 -0
  49. package/plugins/deepmodebot/skills/agent-harnesses/references/langchain-ecosystem.md +124 -0
  50. package/plugins/deepmodebot/skills/agent-harnesses/references/omp.md +183 -0
  51. package/plugins/deepmodebot/skills/agent-harnesses/references/protocols.md +172 -0
  52. package/plugins/deepmodebot/skills/agent-harnesses/references/sdks.md +228 -0
  53. package/plugins/deepmodebot/skills/agent-harnesses/references/self-authoring.md +171 -0
  54. package/plugins/deepmodebot/skills/cloud-devsecops/SKILL.md +24 -0
  55. package/plugins/deepmodebot/skills/cloud-devsecops/references/aws.md +264 -0
  56. package/plugins/deepmodebot/skills/cloud-devsecops/references/azure.md +261 -0
  57. package/plugins/deepmodebot/skills/cloud-devsecops/references/containers.md +96 -0
  58. package/plugins/deepmodebot/skills/cloud-devsecops/references/devops-tools.md +297 -0
  59. package/plugins/deepmodebot/skills/cloud-devsecops/references/devsecops-pipeline.md +258 -0
  60. package/plugins/deepmodebot/skills/cloud-devsecops/references/gcp.md +258 -0
  61. package/plugins/deepmodebot/skills/cloud-devsecops/references/kubernetes.md +74 -0
  62. package/plugins/deepmodebot/skills/cloud-devsecops/references/local-emulators.md +265 -0
  63. package/plugins/deepmodebot/skills/contribute/SKILL.md +134 -0
  64. package/plugins/deepmodebot/skills/create-verification-skill/LICENSE +21 -0
  65. package/plugins/deepmodebot/skills/create-verification-skill/SKILL.md +101 -0
  66. package/plugins/deepmodebot/skills/create-verification-skill/references/feature-map-example/README.md +47 -0
  67. package/plugins/deepmodebot/skills/create-verification-skill/references/feature-map-example/create-note.md +39 -0
  68. package/plugins/deepmodebot/skills/create-verification-skill/references/feature-map-example/search.md +45 -0
  69. package/plugins/deepmodebot/skills/deep-stack/SKILL.md +53 -0
  70. package/plugins/deepmodebot/skills/deep-stack/references/AGENTS.template.md +52 -0
  71. package/plugins/deepmodebot/skills/deep-stack/references/agentic-workflow.md +114 -0
  72. package/plugins/deepmodebot/skills/deep-stack/references/any-app-stack.md +51 -0
  73. package/plugins/deepmodebot/skills/deep-stack/references/design-workflow.md +101 -0
  74. package/plugins/deepmodebot/skills/deep-stack/references/isolate.md +23 -0
  75. package/plugins/deepmodebot/skills/deep-stack/references/philosophy.md +306 -0
  76. package/plugins/deepmodebot/skills/deep-stack/references/prove.md +31 -0
  77. package/plugins/deepmodebot/skills/deep-stack/references/stack.md +119 -0
  78. package/plugins/deepmodebot/skills/deep-stack/references/structure.md +22 -0
  79. package/plugins/deepmodebot/skills/deep-stack/references/unslop/LICENSE +21 -0
  80. package/plugins/deepmodebot/skills/deep-stack/references/unslop/unslop.md +80 -0
  81. package/plugins/deepmodebot/skills/deepmodebot/LICENSE +23 -0
  82. package/plugins/deepmodebot/skills/deepmodebot/SKILL.md +198 -0
  83. package/plugins/deepmodebot/skills/deepmodebot/assets/agents-md/agents_md.py +207 -0
  84. package/plugins/deepmodebot/skills/deepmodebot/assets/agents-md/test_agents_md.py +146 -0
  85. package/plugins/deepmodebot/skills/deepmodebot/assets/architecture-review/report-template.html +92 -0
  86. package/plugins/deepmodebot/skills/deepmodebot/assets/contain/claude-guard.sh +42 -0
  87. package/plugins/deepmodebot/skills/deepmodebot/assets/contain/claude_guard.py +135 -0
  88. package/plugins/deepmodebot/skills/deepmodebot/assets/contain/omp-contain-link.ts +12 -0
  89. package/plugins/deepmodebot/skills/deepmodebot/assets/contain/omp-contain.ts +115 -0
  90. package/plugins/deepmodebot/skills/deepmodebot/assets/contain/test_antigravity_guard.py +483 -0
  91. package/plugins/deepmodebot/skills/deepmodebot/assets/contain/test_audit_regressions.py +139 -0
  92. package/plugins/deepmodebot/skills/deepmodebot/assets/contain/test_contain.py +301 -0
  93. package/plugins/deepmodebot/skills/deepmodebot/assets/contain/test_omp_mcp.py +602 -0
  94. package/plugins/deepmodebot/skills/deepmodebot/assets/e2e/design.py +242 -0
  95. package/plugins/deepmodebot/skills/deepmodebot/assets/e2e/evidence.py +293 -0
  96. package/plugins/deepmodebot/skills/deepmodebot/assets/e2e/record.py +387 -0
  97. package/plugins/deepmodebot/skills/deepmodebot/assets/e2e/review.py +339 -0
  98. package/plugins/deepmodebot/skills/deepmodebot/assets/e2e/test_design.py +69 -0
  99. package/plugins/deepmodebot/skills/deepmodebot/assets/e2e/test_evidence.py +160 -0
  100. package/plugins/deepmodebot/skills/deepmodebot/assets/e2e/test_record.py +180 -0
  101. package/plugins/deepmodebot/skills/deepmodebot/assets/e2e/test_review.py +265 -0
  102. package/plugins/deepmodebot/skills/deepmodebot/assets/git-guardrails/git-guard-patterns.txt +44 -0
  103. package/plugins/deepmodebot/skills/deepmodebot/assets/git-guardrails/git-guard.sh +132 -0
  104. package/plugins/deepmodebot/skills/deepmodebot/assets/git-guardrails/git-guard.ts +122 -0
  105. package/plugins/deepmodebot/skills/deepmodebot/assets/git-guardrails/test_git_guard.py +192 -0
  106. package/plugins/deepmodebot/skills/deepmodebot/assets/github-app/bot.py +3037 -0
  107. package/plugins/deepmodebot/skills/deepmodebot/assets/github-app/brand.json +11 -0
  108. package/plugins/deepmodebot/skills/deepmodebot/assets/github-app/brand.py +51 -0
  109. package/plugins/deepmodebot/skills/deepmodebot/assets/github-app/ghapp.py +361 -0
  110. package/plugins/deepmodebot/skills/deepmodebot/assets/github-app/install.py +274 -0
  111. package/plugins/deepmodebot/skills/deepmodebot/assets/github-app/local_updates.py +576 -0
  112. package/plugins/deepmodebot/skills/deepmodebot/assets/github-app/review_context.py +204 -0
  113. package/plugins/deepmodebot/skills/deepmodebot/assets/github-app/test_bot.py +2182 -0
  114. package/plugins/deepmodebot/skills/deepmodebot/assets/github-app/test_brand.py +19 -0
  115. package/plugins/deepmodebot/skills/deepmodebot/assets/github-app/test_local_updates.py +691 -0
  116. package/plugins/deepmodebot/skills/deepmodebot/assets/github-app/test_review_context.py +127 -0
  117. package/plugins/deepmodebot/skills/deepmodebot/assets/github-app/test_workspace_cleanup.py +496 -0
  118. package/plugins/deepmodebot/skills/deepmodebot/assets/github-app/workspace_cleanup.py +351 -0
  119. package/plugins/deepmodebot/skills/deepmodebot/assets/loop/loop.py +2394 -0
  120. package/plugins/deepmodebot/skills/deepmodebot/assets/loop/plan.py +583 -0
  121. package/plugins/deepmodebot/skills/deepmodebot/assets/loop/test_loop.py +1426 -0
  122. package/plugins/deepmodebot/skills/deepmodebot/assets/loop/test_plan.py +320 -0
  123. package/plugins/deepmodebot/skills/deepmodebot/assets/loop/test_windows_job.py +326 -0
  124. package/plugins/deepmodebot/skills/deepmodebot/assets/loop/windows_job.py +244 -0
  125. package/plugins/deepmodebot/skills/deepmodebot/assets/perf-audit/bench_harness.py +165 -0
  126. package/plugins/deepmodebot/skills/deepmodebot/assets/perf-audit/perf_audit.py +240 -0
  127. package/plugins/deepmodebot/skills/deepmodebot/assets/perf-audit/test_bench_harness.py +55 -0
  128. package/plugins/deepmodebot/skills/deepmodebot/assets/perf-audit/test_perf_audit.py +53 -0
  129. package/plugins/deepmodebot/skills/deepmodebot/assets/pr-agent/diff_coverage.py +350 -0
  130. package/plugins/deepmodebot/skills/deepmodebot/assets/pr-agent/pr_agent_local.py +370 -0
  131. package/plugins/deepmodebot/skills/deepmodebot/assets/pr-agent/test_diff_coverage.py +94 -0
  132. package/plugins/deepmodebot/skills/deepmodebot/assets/pr-conversation/arena.html +425 -0
  133. package/plugins/deepmodebot/skills/deepmodebot/assets/pr-conversation/arena.py +579 -0
  134. package/plugins/deepmodebot/skills/deepmodebot/assets/pr-conversation/arena_tui.py +839 -0
  135. package/plugins/deepmodebot/skills/deepmodebot/assets/pr-conversation/font8x8_basic.hex +1 -0
  136. package/plugins/deepmodebot/skills/deepmodebot/assets/pr-conversation/show_thread.py +329 -0
  137. package/plugins/deepmodebot/skills/deepmodebot/assets/pr-conversation/test_arena.py +610 -0
  138. package/plugins/deepmodebot/skills/deepmodebot/assets/repo-references.json +637 -0
  139. package/plugins/deepmodebot/skills/deepmodebot/assets/scrape/test_yt_enrich.py +250 -0
  140. package/plugins/deepmodebot/skills/deepmodebot/assets/scrape/yt_enrich.py +1820 -0
  141. package/plugins/deepmodebot/skills/deepmodebot/assets/scrape/yt_meta.py +156 -0
  142. package/plugins/deepmodebot/skills/deepmodebot/assets/scrape/yt_transcript_relay.js +54 -0
  143. package/plugins/deepmodebot/skills/deepmodebot/assets/security-audit/audit-pr.sh +122 -0
  144. package/plugins/deepmodebot/skills/deepmodebot/assets/security-audit/gate.cjs +155 -0
  145. package/plugins/deepmodebot/skills/deepmodebot/assets/security-audit/prompt.md +13 -0
  146. package/plugins/deepmodebot/skills/deepmodebot/assets/tournament/test_tournament.py +654 -0
  147. package/plugins/deepmodebot/skills/deepmodebot/assets/tournament/tournament.py +1285 -0
  148. package/plugins/deepmodebot/skills/deepmodebot/assets/wizard/wizard.sh +234 -0
  149. package/plugins/deepmodebot/skills/deepmodebot/assets/workspace-map/test_workspace_map.py +879 -0
  150. package/plugins/deepmodebot/skills/deepmodebot/assets/workspace-map/workspace_map.py +2436 -0
  151. package/plugins/deepmodebot/skills/deepmodebot/references/README.md +61 -0
  152. package/plugins/deepmodebot/skills/deepmodebot/references/catalog.md +105 -0
  153. package/plugins/deepmodebot/skills/deepmodebot/references/contain.md +39 -0
  154. package/plugins/deepmodebot/skills/deepmodebot/references/factory-landscape.md +147 -0
  155. package/plugins/deepmodebot/skills/deepmodebot/references/flows.md +50 -0
  156. package/plugins/deepmodebot/skills/deepmodebot/references/playbooks/authoring-a-skill.md +37 -0
  157. package/plugins/deepmodebot/skills/deepmodebot/references/playbooks/babysit.md +77 -0
  158. package/plugins/deepmodebot/skills/deepmodebot/references/playbooks/bug-fix.md +34 -0
  159. package/plugins/deepmodebot/skills/deepmodebot/references/playbooks/end-to-end.md +50 -0
  160. package/plugins/deepmodebot/skills/deepmodebot/references/playbooks/eval.md +39 -0
  161. package/plugins/deepmodebot/skills/deepmodebot/references/playbooks/feature.md +60 -0
  162. package/plugins/deepmodebot/skills/deepmodebot/references/playbooks/handoff.md +52 -0
  163. package/plugins/deepmodebot/skills/deepmodebot/references/playbooks/hillclimb.md +46 -0
  164. package/plugins/deepmodebot/skills/deepmodebot/references/playbooks/investigation.md +20 -0
  165. package/plugins/deepmodebot/skills/deepmodebot/references/playbooks/opening-a-pr.md +97 -0
  166. package/plugins/deepmodebot/skills/deepmodebot/references/playbooks/pause-safely.md +30 -0
  167. package/plugins/deepmodebot/skills/deepmodebot/references/playbooks/perf-issue.md +31 -0
  168. package/plugins/deepmodebot/skills/deepmodebot/references/playbooks/phased-build.md +146 -0
  169. package/plugins/deepmodebot/skills/deepmodebot/references/playbooks/prototype.md +31 -0
  170. package/plugins/deepmodebot/skills/deepmodebot/references/playbooks/refactoring.md +60 -0
  171. package/plugins/deepmodebot/skills/deepmodebot/references/playbooks/reference-rebuild.md +45 -0
  172. package/plugins/deepmodebot/skills/deepmodebot/references/playbooks/run-a-goal.md +143 -0
  173. package/plugins/deepmodebot/skills/deepmodebot/references/playbooks/runtime-forensics.md +22 -0
  174. package/plugins/deepmodebot/skills/deepmodebot/references/playbooks/self-authoring.md +130 -0
  175. package/plugins/deepmodebot/skills/deepmodebot/references/playbooks/session-pickup.md +33 -0
  176. package/plugins/deepmodebot/skills/deepmodebot/references/playbooks/setup.md +105 -0
  177. package/plugins/deepmodebot/skills/deepmodebot/references/playbooks/shipping.md +52 -0
  178. package/plugins/deepmodebot/skills/deepmodebot/references/playbooks/spec.md +67 -0
  179. package/plugins/deepmodebot/skills/deepmodebot/references/playbooks/tickets.md +56 -0
  180. package/plugins/deepmodebot/skills/deepmodebot/references/playbooks/trace-forensics.md +24 -0
  181. package/plugins/deepmodebot/skills/deepmodebot/references/playbooks/triage.md +102 -0
  182. package/plugins/deepmodebot/skills/deepmodebot/references/playbooks/visual-parity.md +19 -0
  183. package/plugins/deepmodebot/skills/deepmodebot/references/playbooks/wayfinder.md +44 -0
  184. package/plugins/deepmodebot/skills/deepmodebot/references/playbooks/work-a-queue.md +189 -0
  185. package/plugins/deepmodebot/skills/deepmodebot/references/playbooks/worktree-cleanup.md +35 -0
  186. package/plugins/deepmodebot/skills/deepmodebot/references/principles/attack-the-premise.md +7 -0
  187. package/plugins/deepmodebot/skills/deepmodebot/references/principles/boundary-discipline.md +8 -0
  188. package/plugins/deepmodebot/skills/deepmodebot/references/principles/build-the-lever.md +8 -0
  189. package/plugins/deepmodebot/skills/deepmodebot/references/principles/encode-lessons-in-structure.md +6 -0
  190. package/plugins/deepmodebot/skills/deepmodebot/references/principles/exhaust-the-design-space.md +4 -0
  191. package/plugins/deepmodebot/skills/deepmodebot/references/principles/experience-first.md +7 -0
  192. package/plugins/deepmodebot/skills/deepmodebot/references/principles/explain-the-number.md +9 -0
  193. package/plugins/deepmodebot/skills/deepmodebot/references/principles/fix-root-causes.md +6 -0
  194. package/plugins/deepmodebot/skills/deepmodebot/references/principles/foundational-thinking.md +9 -0
  195. package/plugins/deepmodebot/skills/deepmodebot/references/principles/guard-the-context-window.md +7 -0
  196. package/plugins/deepmodebot/skills/deepmodebot/references/principles/laziness-protocol.md +6 -0
  197. package/plugins/deepmodebot/skills/deepmodebot/references/principles/make-operations-idempotent.md +7 -0
  198. package/plugins/deepmodebot/skills/deepmodebot/references/principles/migrate-callers-then-delete-legacy-apis.md +5 -0
  199. package/plugins/deepmodebot/skills/deepmodebot/references/principles/minimize-reader-load.md +7 -0
  200. package/plugins/deepmodebot/skills/deepmodebot/references/principles/model-the-domain.md +7 -0
  201. package/plugins/deepmodebot/skills/deepmodebot/references/principles/never-block-on-the-human.md +7 -0
  202. package/plugins/deepmodebot/skills/deepmodebot/references/principles/outcome-oriented-execution.md +6 -0
  203. package/plugins/deepmodebot/skills/deepmodebot/references/principles/prove-it-works.md +8 -0
  204. package/plugins/deepmodebot/skills/deepmodebot/references/principles/redesign-from-first-principles.md +7 -0
  205. package/plugins/deepmodebot/skills/deepmodebot/references/principles/separate-before-serializing-shared-state.md +6 -0
  206. package/plugins/deepmodebot/skills/deepmodebot/references/principles/sequence-verifiable-units.md +7 -0
  207. package/plugins/deepmodebot/skills/deepmodebot/references/principles/subtract-before-you-add.md +6 -0
  208. package/plugins/deepmodebot/skills/deepmodebot/references/principles/test-behavior-not-implementation.md +7 -0
  209. package/plugins/deepmodebot/skills/deepmodebot/references/principles/type-system-discipline.md +6 -0
  210. package/plugins/deepmodebot/skills/deepmodebot/references/rust-migration-case-studies.md +26 -0
  211. package/plugins/deepmodebot/skills/deepmodebot/references/startup-ideas.md +21 -0
  212. package/plugins/deepmodebot/skills/deepmodebot/references/techniques/agent-collaboration.md +82 -0
  213. package/plugins/deepmodebot/skills/deepmodebot/references/techniques/architect.md +32 -0
  214. package/plugins/deepmodebot/skills/deepmodebot/references/techniques/architecture-review.md +43 -0
  215. package/plugins/deepmodebot/skills/deepmodebot/references/techniques/arena.md +20 -0
  216. package/plugins/deepmodebot/skills/deepmodebot/references/techniques/benchmark-checklist.md +31 -0
  217. package/plugins/deepmodebot/skills/deepmodebot/references/techniques/blast-radius.md +19 -0
  218. package/plugins/deepmodebot/skills/deepmodebot/references/techniques/correct.md +20 -0
  219. package/plugins/deepmodebot/skills/deepmodebot/references/techniques/course.md +47 -0
  220. package/plugins/deepmodebot/skills/deepmodebot/references/techniques/coworkers.md +70 -0
  221. package/plugins/deepmodebot/skills/deepmodebot/references/techniques/domain-model.md +69 -0
  222. package/plugins/deepmodebot/skills/deepmodebot/references/techniques/figure-it-out.md +25 -0
  223. package/plugins/deepmodebot/skills/deepmodebot/references/techniques/git-guardrails.md +44 -0
  224. package/plugins/deepmodebot/skills/deepmodebot/references/techniques/github-app.md +160 -0
  225. package/plugins/deepmodebot/skills/deepmodebot/references/techniques/goal-review.md +156 -0
  226. package/plugins/deepmodebot/skills/deepmodebot/references/techniques/grill.md +27 -0
  227. package/plugins/deepmodebot/skills/deepmodebot/references/techniques/how.md +23 -0
  228. package/plugins/deepmodebot/skills/deepmodebot/references/techniques/in-your-own-words.md +12 -0
  229. package/plugins/deepmodebot/skills/deepmodebot/references/techniques/inner-loop.md +39 -0
  230. package/plugins/deepmodebot/skills/deepmodebot/references/techniques/interrogate.md +16 -0
  231. package/plugins/deepmodebot/skills/deepmodebot/references/techniques/issue-conversation.md +52 -0
  232. package/plugins/deepmodebot/skills/deepmodebot/references/techniques/no-comments.md +29 -0
  233. package/plugins/deepmodebot/skills/deepmodebot/references/techniques/open-design-evidence.md +65 -0
  234. package/plugins/deepmodebot/skills/deepmodebot/references/techniques/panel.md +34 -0
  235. package/plugins/deepmodebot/skills/deepmodebot/references/techniques/pr-agent.md +39 -0
  236. package/plugins/deepmodebot/skills/deepmodebot/references/techniques/pr-conversation.md +135 -0
  237. package/plugins/deepmodebot/skills/deepmodebot/references/techniques/pr-review.md +138 -0
  238. package/plugins/deepmodebot/skills/deepmodebot/references/techniques/pre-commit.md +31 -0
  239. package/plugins/deepmodebot/skills/deepmodebot/references/techniques/prior-art.md +44 -0
  240. package/plugins/deepmodebot/skills/deepmodebot/references/techniques/questionnaire.md +46 -0
  241. package/plugins/deepmodebot/skills/deepmodebot/references/techniques/re-explain.md +23 -0
  242. package/plugins/deepmodebot/skills/deepmodebot/references/techniques/recall.md +19 -0
  243. package/plugins/deepmodebot/skills/deepmodebot/references/techniques/reflect.md +20 -0
  244. package/plugins/deepmodebot/skills/deepmodebot/references/techniques/research.md +99 -0
  245. package/plugins/deepmodebot/skills/deepmodebot/references/techniques/retro.md +30 -0
  246. package/plugins/deepmodebot/skills/deepmodebot/references/techniques/scrape.md +32 -0
  247. package/plugins/deepmodebot/skills/deepmodebot/references/techniques/security-audit.md +40 -0
  248. package/plugins/deepmodebot/skills/deepmodebot/references/techniques/sharpen.md +15 -0
  249. package/plugins/deepmodebot/skills/deepmodebot/references/techniques/show-me-your-work.md +19 -0
  250. package/plugins/deepmodebot/skills/deepmodebot/references/techniques/sme-review.md +49 -0
  251. package/plugins/deepmodebot/skills/deepmodebot/references/techniques/swarm.md +14 -0
  252. package/plugins/deepmodebot/skills/deepmodebot/references/techniques/tdd.md +55 -0
  253. package/plugins/deepmodebot/skills/deepmodebot/references/techniques/teach.md +20 -0
  254. package/plugins/deepmodebot/skills/deepmodebot/references/techniques/technical-writing.md +22 -0
  255. package/plugins/deepmodebot/skills/deepmodebot/references/techniques/tool-routing.md +85 -0
  256. package/plugins/deepmodebot/skills/deepmodebot/references/techniques/tournament.md +44 -0
  257. package/plugins/deepmodebot/skills/deepmodebot/references/techniques/tracker.md +78 -0
  258. package/plugins/deepmodebot/skills/deepmodebot/references/techniques/unslop.md +15 -0
  259. package/plugins/deepmodebot/skills/deepmodebot/references/techniques/visual-e2e.md +78 -0
  260. package/plugins/deepmodebot/skills/deepmodebot/references/techniques/why.md +31 -0
  261. package/plugins/deepmodebot/skills/deepmodebot/references/techniques/wizard.md +25 -0
  262. package/plugins/deepmodebot/skills/deepmodebot/references/techniques/workspace-map.md +35 -0
  263. package/plugins/deepmodebot/skills/deepmodebot/references/techniques/writing-for-agents.md +66 -0
  264. package/plugins/deepmodebot/skills/deepmodebot/scripts/check_skill.py +93 -0
  265. package/plugins/deepmodebot/skills/deepmodebot/scripts/trending.py +598 -0
  266. package/plugins/deepmodebot/skills/domain-rules/SKILL.md +131 -0
  267. package/plugins/deepmodebot/skills/domain-rules/references/agent-engineering.md +105 -0
  268. package/plugins/deepmodebot/skills/domain-rules/references/ai-concepts.md +103 -0
  269. package/plugins/deepmodebot/skills/domain-rules/references/aws-networking.md +121 -0
  270. package/plugins/deepmodebot/skills/domain-rules/references/backend-system-design.md +162 -0
  271. package/plugins/deepmodebot/skills/domain-rules/references/data-structures-and-cache-optimization.md +48 -0
  272. package/plugins/deepmodebot/skills/domain-rules/references/devops-and-fundamentals.md +137 -0
  273. package/plugins/deepmodebot/skills/domain-rules/references/engineering-practice.md +100 -0
  274. package/plugins/deepmodebot/skills/domain-rules/references/high-scale-server-optimization.md +181 -0
  275. package/plugins/deepmodebot/skills/domain-rules/references/language-ecosystems.md +56 -0
  276. package/plugins/deepmodebot/skills/frontend-ui/SKILL.md +146 -0
  277. package/plugins/deepmodebot/skills/frontend-ui/references/patterns/live-demos.md +38 -0
  278. package/plugins/deepmodebot/skills/frontend-ui/references/patterns/mobbin-shipped-apps.md +28 -0
  279. package/plugins/deepmodebot/skills/frontend-ui/references/patterns/motion-clips.md +269 -0
  280. package/plugins/deepmodebot/skills/frontend-ui/references/patterns/motion-graphics.md +62 -0
  281. package/plugins/deepmodebot/skills/frontend-ui/references/patterns/pinterest-animations.md +217 -0
  282. package/plugins/deepmodebot/skills/frontend-ui/references/patterns/pinterest-patterns.md +101 -0
  283. package/plugins/deepmodebot/skills/frontend-ui/references/playbook/01-workflow.md +25 -0
  284. package/plugins/deepmodebot/skills/frontend-ui/references/playbook/02-review-rubric.md +21 -0
  285. package/plugins/deepmodebot/skills/frontend-ui/references/playbook/03-ai-tells.md +46 -0
  286. package/plugins/deepmodebot/skills/frontend-ui/references/playbook/04-components.md +21 -0
  287. package/plugins/deepmodebot/skills/frontend-ui/references/playbook/04a-agent-ui.md +153 -0
  288. package/plugins/deepmodebot/skills/frontend-ui/references/playbook/05-motion.md +106 -0
  289. package/plugins/deepmodebot/skills/frontend-ui/references/playbook/05a-motion-graphics.md +121 -0
  290. package/plugins/deepmodebot/skills/frontend-ui/references/playbook/06-typography-layout.md +48 -0
  291. package/plugins/deepmodebot/skills/frontend-ui/references/playbook/06a-color.md +26 -0
  292. package/plugins/deepmodebot/skills/frontend-ui/references/playbook/07-copy.md +11 -0
  293. package/plugins/deepmodebot/skills/frontend-ui/references/playbook/08-quality-floor.md +63 -0
  294. package/plugins/deepmodebot/skills/frontend-ui/references/playbook/09-steering-agents.md +13 -0
  295. package/plugins/deepmodebot/skills/maintain-verification-skill/LICENSE +21 -0
  296. package/plugins/deepmodebot/skills/maintain-verification-skill/SKILL.md +47 -0
  297. package/plugins/deepmodebot/skills/project-brief/SKILL.md +100 -0
  298. package/plugins/deepmodebot/skills/project-brief/assets/CONTRIBUTING.template.md +124 -0
  299. package/plugins/deepmodebot/skills/project-brief/assets/ISSUE_TEMPLATE/task.yml +61 -0
  300. package/plugins/deepmodebot/skills/project-brief/assets/PROJECT_BRIEF.template.md +98 -0
  301. package/plugins/deepmodebot/skills/project-brief/assets/PULL_REQUEST_TEMPLATE.md +35 -0
  302. package/plugins/deepmodebot/skills/project-brief/assets/pr-overlap.py +643 -0
  303. package/plugins/deepmodebot/skills/project-brief/assets/sync-roadmap.py +314 -0
  304. package/plugins/deepmodebot/skills/secrets-and-auth/SKILL.md +60 -0
  305. package/plugins/deepmodebot/skills/secrets-and-auth/references/agent-authentication.md +198 -0
  306. package/plugins/deepmodebot/skills/secrets-and-auth/references/leak-prevention.md +206 -0
  307. package/plugins/deepmodebot/skills/secrets-and-auth/references/logins-and-passwords.md +165 -0
  308. package/plugins/deepmodebot/skills/secrets-and-auth/references/secrets-and-env.md +182 -0
  309. package/plugins/deepmodebot/skills/software-architecture/SKILL.md +47 -0
  310. package/plugins/deepmodebot/skills/software-architecture/references/backend-infrastructure.md +273 -0
  311. package/plugins/deepmodebot/skills/software-architecture/references/databases.md +277 -0
  312. package/plugins/deepmodebot/skills/software-architecture/references/monorepos.md +210 -0
  313. package/plugins/deepmodebot/skills/software-architecture/references/ontology.md +287 -0
@@ -0,0 +1,80 @@
1
+ ---
2
+ name: unslop
3
+ description: Cut AI tells from text you write or edit for a human reader (commit messages, PR titles and bodies, docs, code comments, replies). Apply before committing, posting, or sending; leave prose you didn't touch alone.
4
+ ---
5
+
6
+ # Unslop
7
+
8
+ Edit text to remove AI patterns and add human voice.
9
+
10
+ ## Process
11
+
12
+ 1. Scan for the patterns below.
13
+ 2. Rewrite. Preserve meaning, match intended tone.
14
+ 3. Add soul (see next section).
15
+ 4. Self-audit: "What makes this obviously AI generated?" Fix remaining tells.
16
+
17
+ ## Adding soul
18
+
19
+ Removing patterns is half the job. Sterile, voiceless writing is just as obvious.
20
+
21
+ - **Have opinions.** React to facts instead of neutrally listing pros and cons.
22
+ - **Vary rhythm.** Short sentences. Then longer ones that take their time. Mix it up.
23
+ - **Acknowledge complexity.** "Impressive but also kind of unsettling" beats "impressive."
24
+ - **Use "I" when it fits.** First person isn't unprofessional.
25
+ - **Let some mess in.** Perfect structure looks machine-made.
26
+ - **Be specific.** Not "this is concerning" but "there's something unsettling about agents churning away at 3am."
27
+
28
+ ## Patterns to detect and fix
29
+
30
+ ### Content
31
+
32
+ 1. **Puffery.** "pivotal moment", "testament to", "evolving landscape", "setting the stage for", "indelible mark", "deeply rooted". Cut puffery, state what happened.
33
+ 2. **Name-dropping.** Listing media outlets without context. Pick one, say what was said.
34
+ 3. **Superficial -ing phrases.** "highlighting...", "ensuring...", "reflecting...", "showcasing...", "fostering...". Delete or expand with real sources.
35
+ 4. **Promotional language.** "nestled", "vibrant", "breathtaking", "groundbreaking", "renowned", "stunning", "must-visit". Use neutral descriptions.
36
+ 5. **Vague attributions.** "Experts believe", "Industry reports suggest", "Some critics argue". Name the source or delete.
37
+ 6. **Formulaic challenges.** "Despite challenges... continues to thrive." Replace with specific facts.
38
+
39
+ ### Language
40
+
41
+ 7. **AI vocabulary.** Additionally, crucial, delve, enduring, enhance, fostering, garner, interplay, intricate, landscape (abstract), pivotal, showcase, tapestry (abstract), testament, underscore, vibrant. Replace with plain words.
42
+ 8. **Fancy ways to say "is".** "serves as", "stands as", "boasts", "features". Just say "is" or "has".
43
+ 9. **"Not just X, but Y."** State the point directly instead.
44
+ 10. **Rule of three.** Forcing ideas into groups of three. Use the natural number.
45
+ 11. **Synonym cycling.** Protagonist, main character, central figure, hero all in one paragraph. Pick one, repeat it.
46
+ 12. **False ranges.** "from X to Y" where X and Y aren't on a meaningful scale. List topics directly.
47
+
48
+ ### Style
49
+
50
+ 13. **Em dash overuse.** Avoid em dashes entirely. Use periods or commas only (no parentheses, no en dashes, no hyphen-as-dash substitutes). Em dashes are an AI tell, and reaching for parentheses instead just trades one tell for another. If a thought needs separation, end the sentence or use a comma.
51
+ 14. **Colon overuse.** Colons are fine before a list or example. Not as mid-sentence connectors. "If you're coming from traditional automation: instead of registering event handlers, you describe conditions" adds nothing with the colon. Rewrite to let the point stand on its own without comparison framing. "Describing when the scheduler should fire works best as plain English." Same meaning, no crutch punctuation.
52
+ 15. **Boldface overuse.** Don't bold every proper noun or acronym.
53
+ 16. **Inline-header lists.** The tell is a bold label and colon that restates the line: "**Performance:** Performance improved...". Convert those to prose. A bold lead-in that ends in a period, names the item, and is followed by genuinely new detail ("**Schema in TypeScript.** Tables live in one file.") is fine, not a tell.
54
+ 17. **Title case headings.** Use sentence case.
55
+ 18. **Decorative emojis.** Remove from headings and bullets.
56
+ 19. **Curly quotes.** Replace with straight quotes.
57
+
58
+ ### Communication artifacts
59
+
60
+ 20. **Chatbot phrases.** "I hope this helps!", "Let me know if...", "Of course!", "Certainly!", "Found the smoking gun!" Remove.
61
+ 21. **Cutoff disclaimers.** "While specific details are limited..." Find sources or remove.
62
+ 22. **Sycophantic tone.** "Great question! You're absolutely right!" Respond directly.
63
+
64
+ ### Filler
65
+
66
+ 23. **Filler phrases.** "In order to" becomes "To". "Due to the fact that" becomes "Because". "It is important to note that" gets deleted.
67
+ 24. **Excessive hedging.** "could potentially possibly be argued that it might" becomes "may".
68
+ 25. **Generic conclusions.** "The future looks bright." State specific plans or facts.
69
+
70
+ ### Jargon
71
+
72
+ 26. **Abstract metaphor nouns.** Substrate, wedge, vector, locus, vantage, nexus, primitive (as noun), harness (as metaphor), surface (as in "API surface"), bedrock, scaffolding (as metaphor), modality, paradigm, gold-plating, ratchet (as metaphor), evacuate (for moving code), endgame, north star, flywheel. These read as technical but usually have a plainer concrete word. "Substrate" becomes "base". "Wedge in" becomes "add". "Vector" becomes "way" or "method". "Gold-plating" becomes "more than the job needs". "Ratchet" becomes the mechanism's real name or "a limit that only tightens". "Evacuate" becomes "move out". "Endgame" becomes "the last phase". Pick the concrete word.
73
+
74
+ ### Plain speech
75
+
76
+ 27. **Say what it does, not how it feels.** "the database stays close at hand", "SQL you can read", "types that follow your schema" name a feeling. The fix names the mechanism or a number: "`.toSQL()` returns the exact string sent to the database", "a column rename fails the build". Ask what the sentence tells the reader to do or know, then write that. If you can't restate it as a concrete instruction, fact, or number, cut it. One more check: if the sentence could appear unchanged in another project's docs, it says nothing about this one. Cut it.
77
+ 28. **Shorten or split dense sentences.** If the reader has to backtrack to parse a sentence, break it in two or drop clauses. One idea per sentence.
78
+ 29. **Active voice.** Prefer it. Catch "is/are/was/were + past participle" and name the actor: "queries are validated" becomes "the compiler validates queries", "the file is parsed by the loader" becomes "the loader parses the file". Passive is fine only when the actor is unknown or genuinely doesn't matter.
79
+ 30. **Cut adverbs, or use a stronger verb.** "runs quickly" becomes "is fast" or the number. "significantly improves" becomes the measured delta. An adverb propping up a weak verb means the verb is wrong.
80
+ 31. **Prefer the plain word.** "utilize" becomes "use", "leverage" becomes "use", "facilitate" becomes "help", "numerous" becomes "many", "in the event that" becomes "if". The fancier synonym is rarely clearer.
@@ -0,0 +1,23 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Lauren Tan
4
+ Copyright (c) 2026 Matt Pocock (references/techniques/grill.md and
5
+ references/playbooks/wayfinder.md are adapted from github.com/mattpocock/skills)
6
+
7
+ Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ of this software and associated documentation files (the "Software"), to deal
9
+ in the Software without restriction, including without limitation the rights
10
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ copies of the Software, and to permit persons to whom the Software is
12
+ furnished to do so, subject to the following conditions:
13
+
14
+ The above copyright notice and this permission notice shall be included in all
15
+ copies or substantial portions of the Software.
16
+
17
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
+ SOFTWARE.
@@ -0,0 +1,198 @@
1
+ ---
2
+ name: deepmodebot
3
+ description: "Engineering rigor for /deep, Deepmodebot, or rigor requests on large/risky work: restate, choose a playbook, apply named principles, prove real behavior, report evidence."
4
+ disable-model-invocation: true
5
+ hooks:
6
+ PreToolUse:
7
+ - matcher: "Write|Edit|NotebookEdit"
8
+ hooks:
9
+ - type: command
10
+ command: 'for f in "${CLAUDE_PLUGIN_ROOT:-/nonexistent}/skills/deepmodebot/assets/contain/claude-guard.sh" "${CLAUDE_PROJECT_DIR:-.}/.claude/skills/deepmodebot/assets/contain/claude-guard.sh" "$HOME/.claude/skills/deepmodebot/assets/contain/claude-guard.sh"; do if [ -f "$f" ]; then exec "${BASH:-bash}" "$f" enforce; fi; done; exit 0'
11
+ ---
12
+
13
+ # Deepmodebot
14
+
15
+ Paths are relative to this skill (`skill://deepmodebot/...` in omp; elsewhere resolve on disk).
16
+
17
+ **Cross-harness.** Guides/guards ship for omp, Claude Code, Codex, Antigravity (Cursor and others follow rules without shipped guards). Map omp names: `task` → subagents (or `acpx <agent> exec`); `todo` → tasks; `ask` → one question; `.omp/skills/` → `.claude/skills/` or `.agents/skills/`.
18
+ Tool limits: `loop.py run` targets `omp|claude|codex`; `pr-agent` needs `omp`; `security-audit` needs `claude` on POSIX. Details: `skill://agent-harnesses`.
19
+
20
+ ## Full-scope completion
21
+
22
+ Applies to M/L and multi-item routes (Size S tracks its single item inline, no Scope Manifest or continuation loop). Slicing sequences verification; it never shrinks scope.
23
+
24
+ 1. **Total Scope vs. Active Sprint.** Keep 100% of deliverables/inventory in ONE Scope Manifest (`docs/specs/<slug>-manifest.json` or `.scratch/goals/<slug>-manifest.json`, `loop.py manifest`, mirrored in `todo`). Only the user removes scope; promises join it; an unqualified yes accepts offered options except hard stops. Rough ideas include real essentials (persistence, validation, error/empty states, wired entrypoints); complex/unclear domains clear via **sme-review** (`sme_gate`) before Sprint 2+.
25
+ 2. **Machine-checked inventory.** For "all/every/full set", classify candidates in `"inventory"` as `included`, `duplicate` (`representative`), `non_target` (`reason`), or `blocked` (`evidence` + `unblock`). Any `pending` item fails `loop.py manifest`; batch without shrinking.
26
+ 3. **Resolve reversible ambiguity.** Pick a scope-preserving structure from evidence, state assumptions, isolate uncertain groups. Ask only when evidence cannot settle a material choice, an `sme_gate` is required, or a safety/permission boundary applies. Finish independent work first.
27
+ 4. **Close against evidence.** Reconcile manifest, inventory, deliverables, and tasks before replying. Single-run builds drive `1/N` to `N/N`. Sprint mode (`active_sprint: 1` / `sme_gate: "required"`) lands Sprint 1 with proof and pauses ONLY at the sprint/SME checkpoint, reporting Sprint 2..N as remaining (`scope_complete: false`). Blockers name item, failure, attempts, and unblock path.
28
+ 5. **Zero-loss resume.** Arm one continuation mechanism (`references/playbooks/run-a-goal.md`) and record its ID/state. On quota/cost cap, `checkpoint_every` / `sme_gate` (`loop.py run` exit `6`), or passing Sprint 1 with deferred slices (`exit 0`, `scope_complete: false`), manifest + `latest-summary.json` is the resume ledger. A pause is never completion.
29
+
30
+ ## Route (do this first)
31
+
32
+ `/deep <anything>` routes and sizes without asking which mode to use.
33
+
34
+ **1. Orient.** In git repos, use Antigravity's hook-injected offline git-only **workspace-map** overview if present; else run `python -B "<this skill>/assets/workspace-map/workspace_map.py" overview --fast --offline --no-orca` (`py -3 -B` on Windows; writes `<main-checkout>/.scratch/workspace-map.db`).
35
+ Skip `overview` on strictly read-only routes (`investigation`, local `pr-review`, `pr-thread`) when no DB exists. Run `query <term>` before broad greps and `workspaces`/`prs` (`--global --all-repos` cross-repo); never ask the user to run map commands.
36
+ Check `git remote`, `docs/PROJECT_BRIEF.md`, `STACK.md`, and verify skills (`.omp`/`.claude`/`.agents/skills/verify-*`). GitHub delivery checks `gh repo view --json nameWithOwner,viewerPermission,isEmpty` and `gh api user -q .login`. Outside/empty repo: Contain the work. Process conflicts: Setup (`references/playbooks/setup.md`, two owner yeses before rewriting rule files).
37
+
38
+ **2. Route by intent & vagueness.** Match `## Routes` (first match wins, aligned with `tournament.py route`). When ambiguous, pipe to `python -B "<this skill>/assets/tournament/tournament.py" route --stdin --json` (`--empty-dir` in empty/new dirs, `--has-factory` if `factory.json` exists). Concrete tasks run directly; draft plans → **grill**; open gaps/vague ambitions → **tournament** (`references/techniques/tournament.md`).
39
+
40
+ **3. Size it** (re-size if scope grows).
41
+
42
+ | Size | Looks like | How to run it |
43
+ |---|---|---|
44
+ | **S** | <= 30 changed lines in <= 2 files; no auth, secrets, permissions, trust-boundary parsing, migrations, CI, or agent config | One-line restate, fix, regression if behavioral, prove real artifact. **Local S** stays uncommitted. Publication: S lane (`references/playbooks/opening-a-pr.md`) + 3-reviewer, 2-of-3 panel. |
45
+ | **M** | Few files, one feature or bug with a cause to find | Matched playbook; inline if one owner suffices. Local: uncommitted edit; publish: Opening a PR. |
46
+ | **L** | Cross-cutting, new module, many files, risky, or long-running | Full playbook with subagents, **architect** if shapes differ, **show-me-your-work** trail. |
47
+
48
+ **Delivery != size.** No remote, local-review ask, or ordinary local S/M edit (no PR/commit/ship ask) → **local edit**: leave verified S/M uncommitted, review diff, prove real behavior, stop (no default-branch commit/PR/push). Explicit PR/ship/land/queue asks publish via Opening a PR + 3-reviewer panel.
49
+ Worktree only for concurrent writers or dirty unrelated work. Local M skips shipping panels, new verify frameworks, design contests; auth/permissions/migrations/security/L keep full checks. Discovery = size `none` (no panel); business cases use `references/techniques/research.md`.
50
+
51
+ **4. Cadence, tier & SME.** Before turn 1 or kickoff, pick the smallest benchmark-proven tier and `<= medium` effort for S/search/mechanical/oracle-backed M (`skill://agent-harnesses/references/delegation-efficiency.md`); reserve `L` for planning, hard debug, security, final review; skip Fast/Ultrafast. Complex/unclear domains → **sme-review** (+ **questionnaire** for unverified P0/P1 rules) before specs, loops, or Sprint 2+. Split multi-PR/customer specs into sprints.
52
+
53
+ **5. Act, then report.** Follow Autonomy's gates and hard stops. Report result and proof.
54
+
55
+ ## Reasoning gates
56
+
57
+ Apply proportionally on M/L; S uses goal + real-artifact check directly.
58
+
59
+ 1. **Before planning:** name user, deliverable, acceptance evidence, sources. Inspect sources first; separate facts from assumptions, check if done/superseded, resolve contradictions, mark gaps unknown.
60
+ 2. **At phase boundaries & delivery:** check output against goal/evidence for missing items, stale facts, unsupported claims, or drift; replan if premise fails.
61
+ 3. **When stalled:** after two attempts without better evidence, repeated rewrites, or contradictions, pause. Inspect real artifacts, test premise, pivot or report blocker. Never drop scope.
62
+
63
+ Business cases: prove one workflow on observable user success before scaling (`references/techniques/research.md`); label unproven market/revenue/exit claims as estimates.
64
+
65
+ ## Contain the work
66
+
67
+ One project root per task; every write stays inside it (code, scratch, temp, logs, clones, worktrees, evidence, delegates). Details: `references/contain.md`.
68
+
69
+ - **Root.** `git rev-parse --show-toplevel` (including worktrees); name absolute path in restate. Outside/new project: create `<parent>/<kebab-case-name>/` (never nest repos) + `git init -b main`; if a write guard pins this session to an existing repo, reopen in the new root (`references/contain.md`).
70
+ - **Scratch & worktrees.** Temp in `<root>/.scratch/tmp/`; worktrees in main checkout's `.worktrees/<branch>/` (`.gitignore` `*`). Run Python with `-B` or `PYTHONDONTWRITEBYTECODE=1`.
71
+ - **No system temp/global installs.** Never write `/tmp`, `$TMPDIR`, `%TEMP%`, home files, or sibling dirs; scope `TMPDIR`/`TMP`/`TEMP` to `$ROOT/.scratch/tmp`. Install deps locally; global installs and user-config edits are hard stops.
72
+ - **Reads free; writes fenced.** Outside writes allowed only for: new repo folder; tool-managed state (`local://`/`artifact://`, Antigravity `brain/`/artifacts, package/browser caches, Claude plan/memory); `.deepmodebot.json` `"extraWriteRoots"`; deepmodebot's own outside writes (`references/contain.md`). All else is a hard stop.
73
+ - **Notes, delegates & guards.** Durable notes go in `.scratch/` or git common dir. Delegate briefs name absolute root and own subdir/worktree. Guards back file-edit tools (none covers shell commands; this rule still binds shell commands); on denial move inside root, never bypass.
74
+ - **Cleanup.** Delete only this session's disposables and empty `.scratch/tmp/` without disturbing originals, other sessions, active jobs, or unpushed work; `git status --porcelain` shows only intended changes and evidence stays in `.scratch/evidence/` or verify dir.
75
+
76
+ ## Non-negotiables
77
+
78
+ For **S**, only one-line restate, single-item scope check, real-artifact proof, and (if landing) S lane apply.
79
+
80
+ - **Restate first.** State goal, problem, and smallest change without waiting for confirmation (stop if premise fails).
81
+ - **Scope ledger.** Track 100% of the request per Full-scope completion (M/L/multi-item use a Scope Manifest; Size S tracks its single item inline).
82
+ - **Name principles.** On M/L, add a "Why I chose this" line naming each read principle (`references/principles/`) that changed a decision.
83
+ - **Prove on the real artifact.** Run the real app/CLI/service and capture evidence. Reuse an existing verify skill; else drive directly; create one only when requested or justified by repeated runs. Tests alone are not proof.
84
+ - **Decide; don't ask.** Fact → look up. Observable fork → Prototype. Product/design/preference → decide (Autonomy). Investigation answers read-only from evidence.
85
+ - **Secrets, logins, tokens, auth** → read `skill://secrets-and-auth` first. Never print, paste, or commit secrets; use scoped short-lived identities; rotate leaks.
86
+ - **Name data shape first** (`references/principles/model-the-domain.md`); new domains/DBs/layouts/boundaries also read `skill://software-architecture`.
87
+ - **Comments.** Only non-obvious *why* or external constraints; no phase-narrating comments.
88
+ - **Long/step-away work** → decision trail via **show-me-your-work** (`references/techniques/show-me-your-work.md`).
89
+ - **PR & gate layer.** Self-review (**pr-review**) before opening; run **pr-agent** + local checks once open; land own PRs via **pr-conversation**; incoming PRs use `/deepmodebot:review-pr <PR>`. No CI/hosted bots. Run **security-audit** on merge head when opted in or touching auth, permissions, parsing, or secrets (blocking = P0).
90
+
91
+ ## Autonomy
92
+
93
+ - **Own PRs land on their own** when publishing/landing a PR (via **pr-conversation**) once findings resolve, linked issues are answered, panel passes, and required checks are green.
94
+ - **Exact-head panel pass.** Nothing lands on default/shared branches until **panel** (`references/techniques/panel.md`) passes at that head: 3 independent verifiers, >=2 passes (including S lane). Merge via `gh pr merge --match-head-commit <sha>`, verify trunk, revert if red. Verified local S/M edits stay uncommitted.
95
+ - **Decisions are yours.** Pick the smallest reversible codebase-consistent option for product/design/scope/preference calls; log trail rows and list under "Decisions I made". **Tournament** pauses at Champion + Runner-Up for discovery-only or choose-first asks; build asks continue with Champion within permissions. Others' repos keep their asks.
96
+ - **Hard stops** (batch into one question at end unless asked): force-push/history rewrite on shared/default branch; deleting others' branches/data/resources; deploys/releases/publishing; external messages; bypassing forge protections; spending money/accounts; user-only credentials; outside-root writes; rewriting repo rule files (two owner yeses).
97
+ - **Admin merge on own PRs.** Only on explicit land/merge ask or `"autonomousMerge": true` (`~/.config/deepmodebot/bot.json` or base-branch `.deepmodebot.json`; `false` stops and asks): `--admin` may bypass only a required review after an exact-head panel pass, never a failing/cancelled check or non-review rules (signed commits, linear history, CODEOWNERS, unresolved threads).
98
+ - **Subscription, not API.** Logged-in subscriptions only (session, subagents, headless CLIs, `acpx`). Never set up API keys; unset `ANTHROPIC_API_KEY`, `ANTHROPIC_AUTH_TOKEN`, `OPENAI_API_KEY`, `CODEX_API_KEY`, `GEMINI_API_KEY`, `GOOGLE_API_KEY`, and `CLAUDE_CODE_USE_{BEDROCK,VERTEX,FOUNDRY}` in child envs.
99
+ - **Finish line & candor.** Tick waypoints and start the next item in the same turn; never stop at slice 1 on single-run builds, and report deferred sprints as remaining scope. Say "no" when warranted.
100
+
101
+ ## Subagents
102
+
103
+ - You run the playbook; delegates own exclusive files. Roles: read-only → `scout`/`Explore`/`explorer`; diff review → `reviewer` (omp/Antigravity) or read-only general subagent with `pr-review` prompt (Claude Code/Codex); edits/runs → default agent.
104
+ - Briefs state goal, absolute root, exact files, acceptance check, root-only writes, and applicable `references/principles/<name>.md` (omp omits `AGENTS.md`). Parallel delegates are **coworkers** (`references/techniques/coworkers.md`); panel verifiers vote before talking.
105
+ - **Delegate only when it pays.** Multi-agent runs cost ~15x chat + cold cache. Delegate wide searches, log digests, fresh-eyes review, independent slices; keep 1-file/coupled/hard reasoning inline. Batch 3-5 spawns, pass paths, reuse warm children.
106
+ - **Rate-limit & tier discipline.** Pin tiers per Route 4 (`delegation-efficiency.md`): small for search/mechanical, mid (`medium`) for oracle-backed slices, `L` (`high`) for design/debug/security/final review, cross-family for judges. Check quota (`omp usage`/`/usage`/`/status`), `/clear` between tasks, switch models at clean boundaries, cap unattended runs, back off or rotate family on 429s.
107
+ - Inspect every delegate's diff and write your own summary. Fresh delegates by default; reuse only for live state.
108
+
109
+ ## Routes
110
+
111
+ Step 2 of Route (first match wins). Techniques: `references/techniques/<name>.md`; playbooks: `references/playbooks/<file>.md`. Full catalog (30 playbooks, 52 techniques, 24 principles): `references/catalog.md`.
112
+
113
+ | Request or repo looks like | Route |
114
+ |---|---|
115
+ | "review" a PR, or PR number/URL alone | **pr-review** (PR mode) |
116
+ | "review since <ref>", branch vs spec/standards | **pr-review** (local mode) |
117
+ | "land / finish / merge this PR on your own", own PR | **pr-conversation** |
118
+ | "bots plan / discuss / implement issue", "@deepmodebot implement" | **issue-conversation** |
119
+ | "install deepmodebot on my repos", "run the bots on their own", subscription bots | **github-app** |
120
+ | "check on / babysit / get green" a PR | `babysit` |
121
+ | "help on / contribute to / what can I work on", read-only repo w/ brief | `skill://contribute` |
122
+ | "set up / publish for contributors", issues for helpers | `skill://project-brief` |
123
+ | "run the factory", issue queue via `factory.json` | `work-a-queue` (factory) |
124
+ | "drive the board / backlog", autonomous roadmap | `work-a-queue` (board) |
125
+ | "autopilot this queue", "stack them, don't merge" | `work-a-queue` (PR; `stack-only`) |
126
+ | "set up deepmodebot", tracker/glossary/ADRs, first spec/tickets/triage | `setup` (then resume) |
127
+ | "triage issues", "is #N ready for an agent" | `triage` |
128
+ | Complex domain/customer spec/"SME in the loop" (**sme-review**); "questionnaire" (**questionnaire**) | Named technique |
129
+ | "vague goal into measurable milestones", "review my goal with 3 agents" | **goal-review** → `self-authoring` |
130
+ | "grill me / this plan / stress-test", draft plan (`GLOSSARY.md`/`docs/adr/` → With docs) | **grill** |
131
+ | "write / turn into a spec", "spec it up" | `spec` |
132
+ | "break into tickets", "split spec into issues" | `tickets` |
133
+ | "implement / build spec #N", "ship in sprints" | `phased-build` (sprint/build) |
134
+ | Writing/editing a skill (`SKILL.md`) | `authoring-a-skill` (**writing-for-agents** first) |
135
+ | Writing/editing `AGENTS.md`, `CLAUDE.md`, rule file, brief | **writing-for-agents** (`assets/agents-md/agents_md.py`) |
136
+ | "write/improve prompt, skill, goal, or loop", repeated workflow | `self-authoring` |
137
+ | "what do we call this"/glossary/ADR (**domain-model**); "research X" (**research**); "which flow" (`references/flows.md`); "TDD" (**tdd**) | Named target |
138
+ | "hand this off", "continue in a new session", background handoff | `handoff` |
139
+ | "chief of staff", "own this goal long-term", across sessions | `run-a-goal` (program) |
140
+ | "loop until X", "keep going until green", "going to bed, finish it" | `run-a-goal` (session) |
141
+ | Multi-session foggy route: "wayfinder", "plan migration" | `wayfinder` |
142
+ | "port / rewrite / migrate" to another language | `refactoring` (Language ports) |
143
+ | "security-audit PRs", security gate or audit | **security-audit** (own agent, no CI) |
144
+ | "run pr-agent" on a PR | **pr-agent** |
145
+ | "is there a library/project/example for X", fork/copy | **prior-art** |
146
+ | "tighten/audit/harden inner loop", "stop AI code slop" | **inner-loop** |
147
+ | "index/map workspace", "list Orca worktrees/open PRs", "find symbol fast" | **workspace-map** |
148
+ | "what stack", "pick a stack for <app>" (stack choice only) | `skill://deep-stack` (`references/any-app-stack.md`, after **prior-art**) |
149
+ | "finish / build full project end to end", "don't stop at a slice/MVP" | `end-to-end` |
150
+ | Specialist: `tool-routing`, `agent-collaboration`, `visual-e2e`, `open-design-evidence`, `git-guardrails`, `pre-commit`, `scrape`, `architecture-review`, `wizard`, `course`, `re-explain`, `retro` | Named technique |
151
+ | "tournament", "arena debate", "architecture/research gaps", "blind spots", "propose best system" | **tournament** |
152
+ | Open/vague ambition ("rethink X", "make smarter", "build me an AI app" w/o behaviors) | **tournament** |
153
+ | New app with concrete behaviors ("build me <app> that ...") | **prior-art** → `skill://deep-stack` → `end-to-end` |
154
+ | Anything else | `## Playbooks` below |
155
+
156
+ ## Playbooks
157
+
158
+ List matched steps (`<n>. <short imperative>`) in `todo`; note skips. Full 30-playbook table: `references/catalog.md`.
159
+
160
+ - **Diagnose:** `investigation`, `bug-fix`, `perf-issue`, `hillclimb`, `runtime-forensics`, `trace-forensics`.
161
+ - **Build:** `feature`, `end-to-end`, `refactoring`, `prototype`, `visual-parity`, `reference-rebuild`.
162
+ - **Meta:** `authoring-a-skill`, `self-authoring`, `eval`.
163
+ - **Plan & ship:** `setup`, `spec`, `tickets`, `triage`, `phased-build`, `wayfinder`, `babysit`, `shipping`, `opening-a-pr`.
164
+ - **Autonomous & continuity:** `run-a-goal`, `work-a-queue`, `session-pickup`, `pause-safely`, `handoff`, `worktree-cleanup`. Bespoke large effort → **figure-it-out**.
165
+
166
+ ## Technique triggers
167
+
168
+ M/L when a rule changes work; skip for S. All 52 techniques: `references/catalog.md`. Names = deepmodebot's files.
169
+
170
+ - **New build** → **prior-art** (`scripts/trending.py`). **2+ shapes** → **architect**. **Open gaps/vague** → **tournament**. **Draft plan** → **grill**.
171
+ - **Complex domain** → **sme-review** + **questionnaire**. **Loops/slop** → **inner-loop**. **Orient/Orca/PRs/tokens** → **workspace-map** + `guard-the-context-window` + `delegation-efficiency.md`.
172
+ - **Numbers** → **benchmark-checklist**. **Prose** → **unslop** + **technical-writing**. **Pre-review** → **no-comments**. **Repeated fix** → **correct** + `self-authoring`.
173
+ - **Terms/ADRs** → **domain-model**. **Research** → **research**. **Issues** → **tracker**. **Fan-out** → **swarm** / **arena**. **Contested design** → **interrogate**.
174
+
175
+ ## Principles
176
+
177
+ Read `references/principles/<name>.md` before citing; definitions in `references/catalog.md`.
178
+
179
+ - **Core:** `laziness-protocol`, `foundational-thinking`, `redesign-from-first-principles`, `attack-the-premise`, `subtract-before-you-add`, `minimize-reader-load`, `outcome-oriented-execution`, `experience-first`, `exhaust-the-design-space`, `build-the-lever`.
180
+ - **Architecture:** `model-the-domain`, `boundary-discipline`, `type-system-discipline`, `make-operations-idempotent`, `migrate-callers-then-delete-legacy-apis`, `separate-before-serializing-shared-state`.
181
+ - **Verification:** `prove-it-works`, `fix-root-causes`, `sequence-verifiable-units`, `test-behavior-not-implementation`, `explain-the-number`.
182
+ - **Delegation & Meta:** `guard-the-context-window`, `never-block-on-the-human`, `encode-lessons-in-structure`.
183
+
184
+ ## Reference library
185
+
186
+ Read entry skill first; full index: `references/README.md`:
187
+ - UI/motion/color/a11y/chat → `skill://frontend-ui`; stack/UI design/proof → `skill://deep-stack`
188
+ - Harnesses (omp/Claude/Codex/Antigravity), MCP/ACP, tiers → `skill://agent-harnesses` (`langchain-ecosystem.md`, `ai-sdk-selection.md`)
189
+ - Secrets/logins/MFA/OAuth/auth → `skill://secrets-and-auth`; repo/domain/DB/backend → `skill://software-architecture`
190
+ - Agents/LLMs/AWS/backend/languages/DevOps/debug → `skill://domain-rules`
191
+ - Docker/K8s/cloud/IAM/policy/pipelines/IaC/emulators → `skill://cloud-devsecops`
192
+
193
+ ## Writing the reply
194
+
195
+ - Short declarative sentences, one thought each; no long dashes or mid-sentence colons (colons before lists ok).
196
+ - Keep required playbook sections; lead with consumer/maintainer impact before detail.
197
+ - Never fabricate links/citations/outputs; link only what you produced/read; label claims (measured, inferred, guess); never hand off checks you can run.
198
+ - **No machinery.** Omit skills, playbooks, routes, sizes, verify bookkeeping, pre-authorizations, models/subagents, internal codes unless required by a playbook section or "Why I chose this". Report result, proof, risks, blockers; mention machinery only when it affects trust.
@@ -0,0 +1,207 @@
1
+ #!/usr/bin/env python3
2
+ """Generate or refresh a repo's AGENTS.md and CLAUDE.md (deepmodebot "writing-for-agents" technique).
3
+
4
+ python agents_md.py build [path] [--overwrite] [--dry-run]
5
+ python agents_md.py check [path]
6
+ python agents_md.py user [--write]
7
+
8
+ AGENTS.md is the one home for the rules. CLAUDE.md imports it with `@AGENTS.md`, because Claude Code reads
9
+ CLAUDE.md, not AGENTS.md. build writes a managed block between deepmodebot markers and keeps everything outside it;
10
+ running it again refreshes the block in place. --overwrite replaces both whole files after copying the old ones to
11
+ <root>/.scratch/agents-md-backup/<timestamp>/. The block holds the finish-line rule, the repo's real check commands
12
+ (from `loop.py audit`), and where scratch files go.
13
+ check exits 1 when either file lacks the current block, so a stale block fails a repo check.
14
+ user previews the finish-line block for ~/.claude/CLAUDE.md, which Claude Code loads in every project; --write adds
15
+ it. That file is the user's own config: write it only on the user's explicit yes.
16
+ """
17
+ import argparse
18
+ import importlib.util
19
+ import os
20
+ import re
21
+ import shutil
22
+ import sys
23
+ import time
24
+
25
+
26
+ def load_loop():
27
+ """loop.py is a sibling asset, not an installed package; load it by path for its repo audit."""
28
+ path = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..", "loop", "loop.py")
29
+ spec = importlib.util.spec_from_file_location("deepmodebot_loop", path)
30
+ module = importlib.util.module_from_spec(spec)
31
+ spec.loader.exec_module(module)
32
+ return module
33
+
34
+
35
+ LOOP = load_loop()
36
+ audit_repo, project_root = LOOP.audit_repo, LOOP.project_root
37
+
38
+ BEGIN = "<!-- deepmodebot:begin (generated by deepmodebot agents_md.py; edits inside this block are replaced) -->"
39
+ END = "<!-- deepmodebot:end -->"
40
+ BLOCK_RE = re.compile(r"<!-- deepmodebot:begin[^\n]*-->\n.*?<!-- deepmodebot:end -->\n?", re.S)
41
+ IMPORT_RE = re.compile(r"^@AGENTS\.md\s*$", re.M)
42
+
43
+ FINISH_LINE = """## Finish line
44
+
45
+ 1. Before starting, list every part of the request in the user's own words.
46
+ 2. Say "done", "finished", or "complete" only when every part is done.
47
+ 3. Report status as a list: each part marked done, not started, or blocked (with why), plus a count like "4 of 9 done".
48
+ 4. Passing tests or a working demo mean "this part works", not "the request is done".
49
+ 5. When you shrink or skip a part, say so at that moment, not in a caveats list at the end.
50
+ 6. When asked "are we done?", answer with the list first.
51
+ """
52
+
53
+
54
+ def code_list(commands):
55
+ return ", ".join(f"`{cmd}`" for cmd in commands)
56
+
57
+
58
+ def repo_block(report):
59
+ layers = report["layers"]
60
+ lines = [FINISH_LINE, "## Checks", ""]
61
+ static, tests = layers["static_checks"], layers["test_checks"]
62
+ if static and not tests:
63
+ lines.append(f"- Checks, after every edit and before calling a part done: {code_list(static)}. No separate "
64
+ "test command was found; if this check does not run the tests, add one.")
65
+ else:
66
+ lines.append(f"- Fast checks, after every edit: {code_list(static)}." if static else
67
+ "- No fast static check (typecheck, lint) was found; add one before running unattended loops.")
68
+ lines.append(f"- Tests, before calling a part done: {code_list(tests)}." if tests else
69
+ "- No test command was found; add one before calling behavior done.")
70
+ if layers["runtime_verify"]:
71
+ lines.append(f"- Live proof: the {code_list(layers['runtime_verify'])} skill. Tests alone are not proof.")
72
+ else:
73
+ lines.append("- Live proof: run the real app, CLI, or service path. Tests alone are not proof.")
74
+ lines += ["", "## Work area", "",
75
+ "- Scratch, temp files, logs, and evidence go in `.scratch/` (git-ignored), never system temp.", ""]
76
+ return "\n".join(lines)
77
+
78
+
79
+ def wrap(body):
80
+ return f"{BEGIN}\n{body.rstrip()}\n{END}\n"
81
+
82
+
83
+ def upsert(text, block):
84
+ """Replace the managed block in text, or append it. Text outside the markers is kept byte for byte."""
85
+ if "<!-- deepmodebot:begin" in text and not BLOCK_RE.search(text):
86
+ raise SystemExit("found a deepmodebot begin marker without its end marker; fix or remove it, then rerun")
87
+ if BLOCK_RE.search(text):
88
+ return BLOCK_RE.sub(lambda _: block, text, count=1)
89
+ if not text.strip():
90
+ return block
91
+ return text.rstrip("\n") + "\n\n" + block
92
+
93
+
94
+ def safe_target(root, name):
95
+ path = os.path.join(root, name)
96
+ if os.path.islink(path):
97
+ raise SystemExit(f"{name} is a symlink; refusing to write through it")
98
+ return path
99
+
100
+
101
+ def read(path):
102
+ if not os.path.exists(path):
103
+ return ""
104
+ with open(path, encoding="utf-8") as handle:
105
+ return handle.read()
106
+
107
+
108
+ def write(path, text):
109
+ os.makedirs(os.path.dirname(path), exist_ok=True)
110
+ with open(path, "w", encoding="utf-8", newline="\n") as handle:
111
+ handle.write(text)
112
+
113
+
114
+ def planned(root, overwrite):
115
+ """Return {file name: (path, current text, wanted text)} for AGENTS.md and CLAUDE.md."""
116
+ agents_block = wrap(repo_block(audit_repo(root)))
117
+ claude_block = wrap("@AGENTS.md")
118
+ plan = {}
119
+ for name, block, title in (("AGENTS.md", agents_block, "# Agent instructions"),
120
+ ("CLAUDE.md", claude_block, "# Claude Code")):
121
+ path = safe_target(root, name)
122
+ current = read(path)
123
+ if overwrite:
124
+ wanted = f"{title}\n\n{block}"
125
+ elif name == "CLAUDE.md" and IMPORT_RE.search(BLOCK_RE.sub("", current)):
126
+ wanted = current
127
+ else:
128
+ wanted = upsert(current, block)
129
+ plan[name] = (path, current, wanted)
130
+ return plan
131
+
132
+
133
+ def backup(root, plan):
134
+ folder = os.path.join(root, ".scratch", "agents-md-backup", time.strftime("%Y%m%dT%H%M%S"))
135
+ ignore = os.path.join(root, ".scratch", ".gitignore")
136
+ if not os.path.exists(ignore):
137
+ write(ignore, "*\n")
138
+ for name, (path, current, _) in plan.items():
139
+ if os.path.exists(path):
140
+ os.makedirs(folder, exist_ok=True)
141
+ shutil.copy2(path, os.path.join(folder, name))
142
+ return folder
143
+
144
+
145
+ def run_build(opts):
146
+ root = project_root(opts.path)
147
+ plan = planned(root, opts.overwrite)
148
+ if opts.dry_run:
149
+ for name, (_, current, wanted) in plan.items():
150
+ print(f"--- {name} ({'unchanged' if wanted == current else 'would change'})\n{wanted}")
151
+ return 0
152
+ if opts.overwrite and any(os.path.exists(path) for path, _, _ in plan.values()):
153
+ print(f"backed up the old files to {os.path.relpath(backup(root, plan), root)}")
154
+ for name, (path, current, wanted) in plan.items():
155
+ if wanted == current:
156
+ print(f"{name}: up to date")
157
+ else:
158
+ write(path, wanted)
159
+ print(f"{name}: {'written' if current else 'created'}")
160
+ return 0
161
+
162
+
163
+ def run_check(opts):
164
+ root = project_root(opts.path)
165
+ stale = [name for name, (_, current, wanted) in planned(root, False).items() if wanted != current]
166
+ for name in stale:
167
+ print(f"{name}: missing or stale deepmodebot block; run `agents_md.py build`")
168
+ if not stale:
169
+ print("AGENTS.md and CLAUDE.md: up to date")
170
+ return 1 if stale else 0
171
+
172
+
173
+ def run_user(opts):
174
+ path = os.path.join(os.path.expanduser("~"), ".claude", "CLAUDE.md")
175
+ if os.path.islink(path):
176
+ raise SystemExit(f"{path} is a symlink; refusing to write through it")
177
+ current = read(path)
178
+ wanted = upsert(current, wrap(FINISH_LINE))
179
+ if not opts.write:
180
+ print(f"--- {path} ({'unchanged' if wanted == current else 'would change'}; rerun with --write to apply)\n"
181
+ f"{wanted}")
182
+ return 0
183
+ if wanted == current:
184
+ print(f"{path}: up to date")
185
+ else:
186
+ write(path, wanted)
187
+ print(f"{path}: {'written' if current else 'created'}")
188
+ return 0
189
+
190
+
191
+ def main():
192
+ parser = argparse.ArgumentParser(description=__doc__.splitlines()[0])
193
+ sub = parser.add_subparsers(dest="action", required=True)
194
+ build = sub.add_parser("build", help="create or refresh AGENTS.md and CLAUDE.md")
195
+ build.add_argument("path", nargs="?", default=".")
196
+ build.add_argument("--overwrite", action="store_true", help="replace whole files, backing up the old ones")
197
+ build.add_argument("--dry-run", action="store_true", help="print the files and write nothing")
198
+ check = sub.add_parser("check", help="exit 1 when either file lacks the current block")
199
+ check.add_argument("path", nargs="?", default=".")
200
+ user = sub.add_parser("user", help="preview, or --write, the finish-line block in ~/.claude/CLAUDE.md")
201
+ user.add_argument("--write", action="store_true")
202
+ opts = parser.parse_args()
203
+ return {"build": run_build, "check": run_check, "user": run_user}[opts.action](opts)
204
+
205
+
206
+ if __name__ == "__main__":
207
+ sys.exit(main())