all-hands-cli 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 (305) hide show
  1. package/.allhands/README.md +75 -0
  2. package/.allhands/agents/compounder.yaml +15 -0
  3. package/.allhands/agents/coordinator.yaml +17 -0
  4. package/.allhands/agents/documentor.yaml +15 -0
  5. package/.allhands/agents/e2e-test-planner.yaml +17 -0
  6. package/.allhands/agents/emergent.yaml +22 -0
  7. package/.allhands/agents/executor.yaml +14 -0
  8. package/.allhands/agents/ideation.yaml +11 -0
  9. package/.allhands/agents/initiative-steering.yaml +19 -0
  10. package/.allhands/agents/judge.yaml +13 -0
  11. package/.allhands/agents/planner.yaml +19 -0
  12. package/.allhands/agents/pr-reviewer.yaml +15 -0
  13. package/.allhands/docs.json +5 -0
  14. package/.allhands/docs.local.json +26 -0
  15. package/.allhands/flows/COMPOUNDING.md +203 -0
  16. package/.allhands/flows/COORDINATION.md +89 -0
  17. package/.allhands/flows/CORE.md +87 -0
  18. package/.allhands/flows/DOCUMENTATION.md +218 -0
  19. package/.allhands/flows/E2E_TEST_PLAN_BUILDING.md +140 -0
  20. package/.allhands/flows/EMERGENT_PLANNING.md +57 -0
  21. package/.allhands/flows/IDEATION_SCOPING.md +154 -0
  22. package/.allhands/flows/INITIATIVE_STEERING.md +110 -0
  23. package/.allhands/flows/JUDGE_REVIEWING.md +79 -0
  24. package/.allhands/flows/PROMPT_TASK_EXECUTION.md +68 -0
  25. package/.allhands/flows/PR_REVIEWING.md +43 -0
  26. package/.allhands/flows/SPEC_PLANNING.md +216 -0
  27. package/.allhands/flows/harness/WRITING_HARNESS_FLOWS.md +27 -0
  28. package/.allhands/flows/harness/WRITING_HARNESS_KNOWLEDGE.md +27 -0
  29. package/.allhands/flows/harness/WRITING_HARNESS_ORCHESTRATION.md +27 -0
  30. package/.allhands/flows/harness/WRITING_HARNESS_SKILLS.md +27 -0
  31. package/.allhands/flows/harness/WRITING_HARNESS_TOOLS.md +27 -0
  32. package/.allhands/flows/harness/WRITING_HARNESS_VALIDATION_TOOLING.md +27 -0
  33. package/.allhands/flows/shared/CODEBASE_UNDERSTANDING.md +72 -0
  34. package/.allhands/flows/shared/CREATE_HARNESS_SPEC.md +48 -0
  35. package/.allhands/flows/shared/CREATE_SPEC.md +41 -0
  36. package/.allhands/flows/shared/CREATE_VALIDATION_TOOLING_SPEC.md +70 -0
  37. package/.allhands/flows/shared/DOCUMENTATION_DISCOVERY.md +123 -0
  38. package/.allhands/flows/shared/DOCUMENTATION_WRITER.md +101 -0
  39. package/.allhands/flows/shared/EMERGENT_REFINEMENT_ANALYSIS.md +76 -0
  40. package/.allhands/flows/shared/EXTERNAL_TECH_GUIDANCE.md +97 -0
  41. package/.allhands/flows/shared/IDEATION_CODEBASE_GROUNDING.md +49 -0
  42. package/.allhands/flows/shared/PLAN_DEEPENING.md +152 -0
  43. package/.allhands/flows/shared/PROMPT_TASKS_CURATION.md +113 -0
  44. package/.allhands/flows/shared/PROMPT_VALIDATION_REVIEW.MD +99 -0
  45. package/.allhands/flows/shared/QUICK_PREMORTEM.md +70 -0
  46. package/.allhands/flows/shared/RESEARCH_GUIDANCE.md +38 -0
  47. package/.allhands/flows/shared/REVIEW_OPTIONS_BREAKDOWN.md +68 -0
  48. package/.allhands/flows/shared/SKILL_EXTRACTION.md +84 -0
  49. package/.allhands/flows/shared/SPEC_FLOW_ANALYSIS.md +119 -0
  50. package/.allhands/flows/shared/TDD_WORKFLOW.md +109 -0
  51. package/.allhands/flows/shared/UTILIZE_VALIDATION_TOOLING.md +84 -0
  52. package/.allhands/flows/shared/WRITING_HARNESS_FLOWS.md +11 -0
  53. package/.allhands/flows/shared/WRITING_HARNESS_MCP_TOOLS.md +84 -0
  54. package/.allhands/flows/shared/jury/ARCHITECTURE_REVIEW.md +91 -0
  55. package/.allhands/flows/shared/jury/BEST_PRACTICES_REVIEW.md +80 -0
  56. package/.allhands/flows/shared/jury/CLAIM_VERIFICATION_REVIEW.md +101 -0
  57. package/.allhands/flows/shared/jury/EXPECTATIONS_FIT_REVIEW.md +78 -0
  58. package/.allhands/flows/shared/jury/MAINTAINABILITY_REVIEW.md +110 -0
  59. package/.allhands/flows/shared/jury/PROMPTS_EXPECTATIONS_FIT.md +74 -0
  60. package/.allhands/flows/shared/jury/PROMPTS_FLOW_ANALYSIS.md +92 -0
  61. package/.allhands/flows/shared/jury/PROMPTS_YAGNI.md +78 -0
  62. package/.allhands/flows/shared/jury/PROMPT_PREMORTEM.md +125 -0
  63. package/.allhands/flows/shared/jury/SECURITY_REVIEW.md +86 -0
  64. package/.allhands/flows/shared/jury/YAGNI_REVIEW.md +82 -0
  65. package/.allhands/flows/wip/DEBUG_INVESTIGATION.md +162 -0
  66. package/.allhands/flows/wip/MEMORY_RECALL.md +62 -0
  67. package/.allhands/harness/ah +131 -0
  68. package/.allhands/harness/package-lock.json +5292 -0
  69. package/.allhands/harness/package.json +52 -0
  70. package/.allhands/harness/src/__tests__/e2e/commands.test.ts +307 -0
  71. package/.allhands/harness/src/__tests__/e2e/event-loop.test.ts +539 -0
  72. package/.allhands/harness/src/__tests__/e2e/hooks.test.ts +427 -0
  73. package/.allhands/harness/src/__tests__/e2e/new-initiative-routing.test.ts +137 -0
  74. package/.allhands/harness/src/__tests__/e2e/run-e2e.ts +109 -0
  75. package/.allhands/harness/src/__tests__/e2e/specs-type.test.ts +210 -0
  76. package/.allhands/harness/src/__tests__/e2e/validation-hooks.test.ts +669 -0
  77. package/.allhands/harness/src/__tests__/e2e/validation-path-consistency.test.ts +354 -0
  78. package/.allhands/harness/src/__tests__/e2e/validation.test.ts +528 -0
  79. package/.allhands/harness/src/__tests__/harness/assertions.ts +318 -0
  80. package/.allhands/harness/src/__tests__/harness/cli-runner.ts +359 -0
  81. package/.allhands/harness/src/__tests__/harness/fixture.ts +384 -0
  82. package/.allhands/harness/src/__tests__/harness/hook-runner.ts +411 -0
  83. package/.allhands/harness/src/__tests__/harness/index.ts +122 -0
  84. package/.allhands/harness/src/cli.ts +36 -0
  85. package/.allhands/harness/src/commands/complexity.ts +177 -0
  86. package/.allhands/harness/src/commands/context7.ts +202 -0
  87. package/.allhands/harness/src/commands/docs.ts +557 -0
  88. package/.allhands/harness/src/commands/hooks.ts +24 -0
  89. package/.allhands/harness/src/commands/index.ts +51 -0
  90. package/.allhands/harness/src/commands/knowledge.ts +382 -0
  91. package/.allhands/harness/src/commands/memories.ts +302 -0
  92. package/.allhands/harness/src/commands/notify.ts +61 -0
  93. package/.allhands/harness/src/commands/oracle.ts +158 -0
  94. package/.allhands/harness/src/commands/perplexity.ts +220 -0
  95. package/.allhands/harness/src/commands/planning.ts +245 -0
  96. package/.allhands/harness/src/commands/schema.ts +73 -0
  97. package/.allhands/harness/src/commands/skills.ts +128 -0
  98. package/.allhands/harness/src/commands/solutions.ts +353 -0
  99. package/.allhands/harness/src/commands/spawn.ts +158 -0
  100. package/.allhands/harness/src/commands/specs.ts +532 -0
  101. package/.allhands/harness/src/commands/tavily.ts +226 -0
  102. package/.allhands/harness/src/commands/tools.ts +579 -0
  103. package/.allhands/harness/src/commands/trace.ts +327 -0
  104. package/.allhands/harness/src/commands/tui.ts +960 -0
  105. package/.allhands/harness/src/commands/validate.ts +143 -0
  106. package/.allhands/harness/src/commands/validation-tools.ts +108 -0
  107. package/.allhands/harness/src/hooks/context.ts +1442 -0
  108. package/.allhands/harness/src/hooks/enforcement.ts +170 -0
  109. package/.allhands/harness/src/hooks/index.ts +54 -0
  110. package/.allhands/harness/src/hooks/lifecycle.ts +229 -0
  111. package/.allhands/harness/src/hooks/notification.ts +104 -0
  112. package/.allhands/harness/src/hooks/observability.ts +551 -0
  113. package/.allhands/harness/src/hooks/session.ts +88 -0
  114. package/.allhands/harness/src/hooks/shared.ts +815 -0
  115. package/.allhands/harness/src/hooks/transcript-parser.ts +208 -0
  116. package/.allhands/harness/src/hooks/validation.ts +617 -0
  117. package/.allhands/harness/src/lib/__tests__/ctags.test.ts +244 -0
  118. package/.allhands/harness/src/lib/__tests__/docs-validation.test.ts +344 -0
  119. package/.allhands/harness/src/lib/__tests__/mcp-runtime.test.ts +190 -0
  120. package/.allhands/harness/src/lib/__tests__/schema.test.ts +861 -0
  121. package/.allhands/harness/src/lib/base-command.ts +198 -0
  122. package/.allhands/harness/src/lib/cli-daemon.ts +343 -0
  123. package/.allhands/harness/src/lib/compaction.ts +313 -0
  124. package/.allhands/harness/src/lib/ctags.ts +497 -0
  125. package/.allhands/harness/src/lib/docs-validation.ts +907 -0
  126. package/.allhands/harness/src/lib/event-loop.ts +662 -0
  127. package/.allhands/harness/src/lib/flows.ts +155 -0
  128. package/.allhands/harness/src/lib/git.ts +276 -0
  129. package/.allhands/harness/src/lib/knowledge-worker.ts +72 -0
  130. package/.allhands/harness/src/lib/knowledge.ts +810 -0
  131. package/.allhands/harness/src/lib/llm.ts +255 -0
  132. package/.allhands/harness/src/lib/mcp-client.ts +432 -0
  133. package/.allhands/harness/src/lib/mcp-daemon.ts +486 -0
  134. package/.allhands/harness/src/lib/mcp-runtime.ts +418 -0
  135. package/.allhands/harness/src/lib/notification.ts +115 -0
  136. package/.allhands/harness/src/lib/opencode/index.ts +70 -0
  137. package/.allhands/harness/src/lib/opencode/profiles.ts +300 -0
  138. package/.allhands/harness/src/lib/opencode/prompts/codesearch.md +98 -0
  139. package/.allhands/harness/src/lib/opencode/prompts/knowledge-aggregator.md +67 -0
  140. package/.allhands/harness/src/lib/opencode/runner.ts +281 -0
  141. package/.allhands/harness/src/lib/oracle.ts +926 -0
  142. package/.allhands/harness/src/lib/planning-utils.ts +150 -0
  143. package/.allhands/harness/src/lib/planning.ts +605 -0
  144. package/.allhands/harness/src/lib/pr-review.ts +225 -0
  145. package/.allhands/harness/src/lib/prompts.ts +522 -0
  146. package/.allhands/harness/src/lib/schema.ts +418 -0
  147. package/.allhands/harness/src/lib/schemas/agent-profile.ts +141 -0
  148. package/.allhands/harness/src/lib/schemas/template-vars.ts +138 -0
  149. package/.allhands/harness/src/lib/session.ts +164 -0
  150. package/.allhands/harness/src/lib/specs.ts +348 -0
  151. package/.allhands/harness/src/lib/tldr.ts +829 -0
  152. package/.allhands/harness/src/lib/tmux.ts +1051 -0
  153. package/.allhands/harness/src/lib/trace-store.ts +714 -0
  154. package/.allhands/harness/src/mcp/__tests__/index.test.ts +46 -0
  155. package/.allhands/harness/src/mcp/_template.ts +47 -0
  156. package/.allhands/harness/src/mcp/filesystem.ts +33 -0
  157. package/.allhands/harness/src/mcp/index.ts +69 -0
  158. package/.allhands/harness/src/mcp/playwright.ts +34 -0
  159. package/.allhands/harness/src/mcp/xcodebuild.ts +29 -0
  160. package/.allhands/harness/src/schemas/docs.schema.json +44 -0
  161. package/.allhands/harness/src/schemas/settings.schema.json +214 -0
  162. package/.allhands/harness/src/tui/actions.ts +227 -0
  163. package/.allhands/harness/src/tui/file-viewer-modal.ts +270 -0
  164. package/.allhands/harness/src/tui/index.ts +1574 -0
  165. package/.allhands/harness/src/tui/modal.ts +232 -0
  166. package/.allhands/harness/src/tui/prompts-pane.ts +186 -0
  167. package/.allhands/harness/src/tui/status-pane.ts +434 -0
  168. package/.allhands/harness/tsconfig.json +22 -0
  169. package/.allhands/harness/vitest.config.ts +13 -0
  170. package/.allhands/pillars.md +33 -0
  171. package/.allhands/principles.md +88 -0
  172. package/.allhands/schemas/alignment.yaml +51 -0
  173. package/.allhands/schemas/documentation.yaml +10 -0
  174. package/.allhands/schemas/prompt.yaml +92 -0
  175. package/.allhands/schemas/skill.yaml +34 -0
  176. package/.allhands/schemas/solution.yaml +131 -0
  177. package/.allhands/schemas/spec.yaml +67 -0
  178. package/.allhands/schemas/validation-suite.yaml +49 -0
  179. package/.allhands/schemas/workflow.yaml +51 -0
  180. package/.allhands/settings.json +57 -0
  181. package/.allhands/skills/claude-code-patterns/SKILL.md +60 -0
  182. package/.allhands/skills/claude-code-patterns/docs/context-hygiene.md +19 -0
  183. package/.allhands/skills/harness-maintenance/SKILL.md +449 -0
  184. package/.allhands/skills/harness-maintenance/references/core-architecture.md +187 -0
  185. package/.allhands/skills/harness-maintenance/references/harness-skills.md +87 -0
  186. package/.allhands/skills/harness-maintenance/references/knowledge-compounding.md +78 -0
  187. package/.allhands/skills/harness-maintenance/references/tools-commands-mcp-hooks.md +115 -0
  188. package/.allhands/skills/harness-maintenance/references/validation-tooling.md +77 -0
  189. package/.allhands/skills/harness-maintenance/references/writing-flows.md +84 -0
  190. package/.allhands/validation/browser-automation.md +109 -0
  191. package/.allhands/validation/xcode-automation.md +195 -0
  192. package/.allhands/workflows/documentation.md +86 -0
  193. package/.allhands/workflows/investigation.md +81 -0
  194. package/.allhands/workflows/milestone.md +91 -0
  195. package/.allhands/workflows/optimization.md +85 -0
  196. package/.allhands/workflows/refactor.md +99 -0
  197. package/.allhands/workflows/triage.md +81 -0
  198. package/.claude/README.md +1 -0
  199. package/.claude/agents/explorer.md +10 -0
  200. package/.claude/agents/researcher.md +11 -0
  201. package/.claude/agents/task-runner.md +8 -0
  202. package/.claude/settings.json +231 -0
  203. package/.env.ai.example +7 -0
  204. package/.github/workflows/npm-publish.yml +69 -0
  205. package/.internal.json +45 -0
  206. package/.tldr/config.json +11 -0
  207. package/.tldrignore +90 -0
  208. package/CLAUDE.md +6 -0
  209. package/README.md +98 -0
  210. package/bin/sync-cli.js +7552 -0
  211. package/concerns.md +7 -0
  212. package/docs/README.md +41 -0
  213. package/docs/agents/README.md +24 -0
  214. package/docs/agents/agent-configuration-system.md +86 -0
  215. package/docs/agents/execution-agents.md +50 -0
  216. package/docs/agents/knowledge-agents.md +61 -0
  217. package/docs/agents/orchestration-agent.md +57 -0
  218. package/docs/agents/planning-agents.md +84 -0
  219. package/docs/agents/quality-review-agents.md +67 -0
  220. package/docs/agents/workflow-agent-orchestration.md +69 -0
  221. package/docs/flows/README.md +44 -0
  222. package/docs/flows/compounding.md +126 -0
  223. package/docs/flows/coordination.md +72 -0
  224. package/docs/flows/core-harness-integration.md +63 -0
  225. package/docs/flows/documentation-orchestration.md +98 -0
  226. package/docs/flows/e2e-test-plan-building.md +83 -0
  227. package/docs/flows/emergent-refinement.md +104 -0
  228. package/docs/flows/flow-authoring-and-mcp-tools.md +89 -0
  229. package/docs/flows/judge-reviewing.md +112 -0
  230. package/docs/flows/plan-deepening-and-research.md +107 -0
  231. package/docs/flows/plan-review-jury.md +114 -0
  232. package/docs/flows/pr-reviewing.md +54 -0
  233. package/docs/flows/prompt-task-execution.md +119 -0
  234. package/docs/flows/spec-planning.md +162 -0
  235. package/docs/flows/type-specific-scoping-flows.md +49 -0
  236. package/docs/flows/validation-and-skills-integration.md +145 -0
  237. package/docs/flows/wip/wip-flows.md +102 -0
  238. package/docs/harness/README.md +23 -0
  239. package/docs/harness/agent-profiles.md +84 -0
  240. package/docs/harness/cli/README.md +24 -0
  241. package/docs/harness/cli/cli-entry-and-command-discovery.md +91 -0
  242. package/docs/harness/cli/docs-command.md +87 -0
  243. package/docs/harness/cli/knowledge-command.md +91 -0
  244. package/docs/harness/cli/minor-cli-commands.md +65 -0
  245. package/docs/harness/cli/oracle-command.md +113 -0
  246. package/docs/harness/cli/planning-command.md +95 -0
  247. package/docs/harness/cli/schema-and-validation-commands.md +154 -0
  248. package/docs/harness/cli/search-commands.md +97 -0
  249. package/docs/harness/cli/spawn-command.md +136 -0
  250. package/docs/harness/cli/specs-command.md +102 -0
  251. package/docs/harness/cli/tools-command.md +122 -0
  252. package/docs/harness/cli/trace-command.md +122 -0
  253. package/docs/harness/cli-daemon.md +92 -0
  254. package/docs/harness/event-loop.md +184 -0
  255. package/docs/harness/hooks/README.md +15 -0
  256. package/docs/harness/hooks/context-hooks.md +96 -0
  257. package/docs/harness/hooks/lifecycle-and-observability-hooks.md +135 -0
  258. package/docs/harness/hooks/validation-hooks.md +97 -0
  259. package/docs/harness/test-harness.md +149 -0
  260. package/docs/harness/tui.md +176 -0
  261. package/docs/memories.md +20 -0
  262. package/docs/solutions/agentic-issues/premature-agent-deletion-tui-action-dependency-20260130.md +49 -0
  263. package/docs/solutions/agentic-issues/ref-anchor-scope-mismatch-skill-references-20260131.md +55 -0
  264. package/docs/solutions/agentic-issues/tautological-tests-routing-20260131.md +52 -0
  265. package/docs/solutions/integration_issue/blocktool-output-format-mismatch-hook-runner-20260130.md +52 -0
  266. package/docs/solutions/integration_issue/dual-validation-path-divergence-schema-20260130.md +66 -0
  267. package/docs/solutions/security-issues/unsanitized-domain-path-join-20260131.md +52 -0
  268. package/docs/solutions/test-failures/event-loop-mock-ordering-checkAgentWindows-20260130.md +63 -0
  269. package/docs/sync-cli/README.md +19 -0
  270. package/docs/sync-cli/cli-entrypoint-and-commands.md +39 -0
  271. package/docs/sync-cli/commands/README.md +11 -0
  272. package/docs/sync-cli/commands/pull-manifest-command.md +36 -0
  273. package/docs/sync-cli/commands/push-command.md +84 -0
  274. package/docs/sync-cli/commands/sync-command.md +71 -0
  275. package/docs/sync-cli/systems/README.md +14 -0
  276. package/docs/sync-cli/systems/git-and-github-integration.md +49 -0
  277. package/docs/sync-cli/systems/interactive-ui.md +43 -0
  278. package/docs/sync-cli/systems/manifest-and-distribution.md +51 -0
  279. package/docs/sync-cli/systems/path-resolution.md +42 -0
  280. package/package.json +46 -0
  281. package/scripts/install-shim.sh +40 -0
  282. package/scripts/pre-pack.sh +25 -0
  283. package/specs/harness-maintenance-skill.spec.md +138 -0
  284. package/specs/roadmap/git-spec-lifecycle-management.spec.md +113 -0
  285. package/specs/sync-init-flag.spec.md +117 -0
  286. package/specs/unified-workflow-orchestration.spec.md +250 -0
  287. package/specs/validation-tooling-practice.spec.md +98 -0
  288. package/specs/workflow-domain-configuration.spec.md +265 -0
  289. package/src/commands/pull-manifest.ts +31 -0
  290. package/src/commands/push.ts +344 -0
  291. package/src/commands/sync.ts +289 -0
  292. package/src/lib/constants.ts +10 -0
  293. package/src/lib/dotfiles.ts +36 -0
  294. package/src/lib/fs-utils.ts +18 -0
  295. package/src/lib/gh.ts +40 -0
  296. package/src/lib/git.ts +63 -0
  297. package/src/lib/gitignore.ts +167 -0
  298. package/src/lib/manifest.ts +121 -0
  299. package/src/lib/marker-sync.ts +39 -0
  300. package/src/lib/paths.ts +38 -0
  301. package/src/lib/target-lines.ts +66 -0
  302. package/src/lib/ui.ts +78 -0
  303. package/src/sync-cli.ts +120 -0
  304. package/target-lines.json +23 -0
  305. package/tsconfig.json +20 -0
@@ -0,0 +1,27 @@
1
+ <goal>
2
+ Guide agents through validation suite creation. Per **Agentic Validation Tooling**, every validation domain has stochastic (exploratory) and deterministic (pass/fail) dimensions that compound through the crystallization lifecycle.
3
+ </goal>
4
+
5
+ <inputs>
6
+ - Validation domain and scope
7
+ - Tooling requirements (stochastic exploration, deterministic gating, or both)
8
+ </inputs>
9
+
10
+ <outputs>
11
+ - Validation suite following harness conventions with both stochastic and deterministic dimensions
12
+ </outputs>
13
+
14
+ <constraints>
15
+ - MUST include meaningful stochastic dimension — deterministic-only tools are test commands, not suites
16
+ - MUST follow crystallization lifecycle: stochastic discovers, deterministic entrenches
17
+ - NEVER create suites without clear validation domain justification
18
+ </constraints>
19
+
20
+ ## Execution
21
+
22
+ - Read `.allhands/principles.md` for first principle context
23
+ - Run `ah skills list` to discover the `harness-maintenance` skill
24
+ - Read the skill's `references/validation-tooling.md` for suite philosophy and crystallization patterns
25
+ - Design the suite with both stochastic and deterministic sections
26
+ - Validate suite existence threshold — ensure meaningful stochastic dimension exists
27
+ - Test deterministic checks produce binary pass/fail results
@@ -0,0 +1,72 @@
1
+ <goal>
2
+ Enable context-efficient codebase exploration using intentional tooling. Per **Context is Precious**, minimize context window consumption while maximizing understanding.
3
+ </goal>
4
+
5
+ <constraints>
6
+
7
+ - MUST use `ah knowledge docs search` FIRST for ANY DISCOVERY TASKS
8
+ - MUST use `tldr` or LSP tool to get context from code files!
9
+ - NEVER use the Read tool - unless absolutely necessary
10
+
11
+ </constraints>
12
+
13
+ ## Search Tool Selection
14
+
15
+ Choose the right tool for the query type:
16
+
17
+ | Need | Tool | When |
18
+ |------|------|------|
19
+ | **Great codebase navigation tool AND documented knowledge!!** | `ah knowledge docs search` | "How does X work?", "Why is Y designed this way?" |
20
+ | **Find relevant codebase patterns when knowledge search is not enough** | `tldr semantic search` or grep | Known string, error message, literal pattern |
21
+ | **Find symbol definition - usually from symbols given by knowledge search** | LSP | Class, function, type by name |
22
+ | **Past solutions** | `ah solutions search` | Similar problem solved before |
23
+ | **Past learnings** | `ah memories search` | Engineer preferences, validation gaps, prior insights |
24
+ | **Grep but better** | `ast-grep` | Known string, error message, literal pattern |
25
+
26
+ ### Search Flow
27
+
28
+ ```
29
+ Engineer Task → Knowledge Docs Search → LSP on Referenced Symbols → Grep/ast-grep if needed
30
+ ```
31
+
32
+ ## Query Formatting
33
+
34
+ Queries should be **complete sentences** with full context, not minimal keywords:
35
+
36
+ ```bash
37
+ # GOOD - complete question with context
38
+ ah knowledge docs search "how does the retry mechanism handle rate limits when calling external APIs"
39
+
40
+ # BAD - keyword soup
41
+ ah knowledge docs search "retry rate limit api"
42
+ ```
43
+
44
+ ## Response Interpretation
45
+
46
+ Knowledge search returns:
47
+ - `insight`: Engineering / Product knowledge with the "why"
48
+ - `lsp_entry_points`: Key file references with exploration rationale and LSP symbols
49
+ - `design_notes`: Relevant architectural decisions
50
+ - `[ref:...]`: Contains file references and LSP symbols. Only returned if the full docs document is returned.
51
+
52
+ ## Decision Tree
53
+
54
+ ```
55
+ Need codebase context?
56
+ ├─ Get relevant codebase direction with knowledge? → ah knowledge docs search
57
+ ├─ Aggregated result? → Follow lsp_entry_points (why field = priority)
58
+ └─ Direct result? → relevant_files + [ref:...] blocks → LSP on symbols
59
+ ├─ Know exact symbol? → LSP directly
60
+ ├─ Know semantic idea? → tldr semantic search / grep
61
+ ├─ Suspect a similar problem faced before? → ah solutions search + ah memories search first
62
+ └─ ast-grep if still struggling
63
+ ```
64
+
65
+ ### Failure Recovery
66
+
67
+ | Situation | Next Step |
68
+ |-----------|-----------|
69
+ | Knowledge docs search returns nothing | Try different semantic phrasing |
70
+ | grep returns nothing | Try alternative names (error/exception/failure) |
71
+ | LSP can't find symbol | Check import statements, search file contents |
72
+ | Pattern not found | Widen search directory, check file extensions |
@@ -0,0 +1,48 @@
1
+ <goal>
2
+ Create a harness improvement spec when compounding identifies systemic issues. Per **Prompt Files as Units of Work**, harness improvements go through the full loop.
3
+ </goal>
4
+
5
+ <inputs>
6
+ - Engineer-selected improvement issues from compounding (one or more)
7
+ - Problems encountered, fixes proposed
8
+ - Per-tool impact map from compounding signal analysis (evidence for spec motivation)
9
+ </inputs>
10
+
11
+ <outputs>
12
+ - Spec at `specs/roadmap/harness-<name>.spec.md`
13
+ </outputs>
14
+
15
+ <constraints>
16
+ - MUST create spec, NOT implement directly
17
+ - MUST get engineer confirmation
18
+ - MUST scope to engineer-selected improvements from a single compounding session
19
+ - Harness specs do NOT block feature specs
20
+ </constraints>
21
+
22
+ ## Context & Impact
23
+
24
+ Receive from compounding: improvement identified, problem it solves, evidence.
25
+
26
+ Assess: affected flows/commands/hooks, new capability vs fix, risk level.
27
+
28
+ ## Engineer Interview
29
+
30
+ Present: problem, proposed solution, impact scope, effort, urgency.
31
+
32
+ If engineer declines: document in `docs/memories.md`, exit flow.
33
+
34
+ ## Spec Creation
35
+
36
+ Use `name: harness-{name}` and `domain_name: harness` (triggers `harness-maintenance` skill during planning).
37
+
38
+ Body sections: Problem Statement, Proposed Solution, Affected Components, Testing Strategy (brief - how to verify the improvement works).
39
+
40
+ Follow `.allhands/flows/shared/CREATE_SPEC.md`.
41
+
42
+ ## Handoff
43
+
44
+ Ask engineer: "This harness improvement spec is ready. Would you like to start working on it now?"
45
+
46
+ If yes: checkout the branch and run `ah planning ensure`
47
+
48
+ If no: inform engineer spec is saved in `specs/roadmap/` for later activation via TUI
@@ -0,0 +1,41 @@
1
+ <goal>
2
+ Write a spec file with proper schema, persist to base branch. Single source of truth for spec creation.
3
+ </goal>
4
+
5
+ ## Write Spec
6
+
7
+ Run `ah schema spec` for the schema format. Write `specs/roadmap/{name}.spec.md` following the schema.
8
+
9
+ ## Branch Prefix Convention
10
+
11
+ Per **Frontier Models are Capable**, derive the default branch prefix from the spec `type` field:
12
+
13
+ | Spec Type | Branch Prefix |
14
+ |-----------|---------------|
15
+ | `milestone` (or missing) | `feature/` |
16
+ | `investigation` | `fix/` |
17
+ | `optimization` | `optimize/` |
18
+ | `refactor` | `refactor/` |
19
+ | `documentation` | `docs/` |
20
+ | `triage` | `triage/` |
21
+
22
+ The `branch` field on the spec is always the source of truth — this convention applies to the default suggestion when the spec doesn't specify one.
23
+
24
+ ## Create
25
+
26
+ Run: `ah specs create specs/roadmap/{name}.spec.md --json`
27
+
28
+ This assigns the branch name (using type-based prefix convention with collision handling), commits the spec file to the base branch, and pushes to origin. Parse `branch` from response for the final branch name. No branch is created at this step — branch creation happens at activation time.
29
+
30
+ Run: `ah knowledge roadmap reindex`
31
+
32
+ ## Confirm
33
+
34
+ Report spec name and branch to engineer.
35
+
36
+ Ask: "Would you like to start working on this now?"
37
+
38
+ If yes, activate the spec (which creates the branch and sets up planning):
39
+ ```bash
40
+ ah specs activate {name}
41
+ ```
@@ -0,0 +1,70 @@
1
+ <goal>
2
+ Create a validation tooling spec for a new domain. Per **Prompt Files as Units of Work**, validation tooling is infrastructure that goes through the full harness loop.
3
+ </goal>
4
+
5
+ <inputs>
6
+ - Gap analysis from ASSESS_VALIDATION_TOOLING
7
+ - Original spec blocked by this tooling need
8
+ </inputs>
9
+
10
+ <outputs>
11
+ - Spec at `specs/roadmap/validation-<name>.spec.md`
12
+ - Original spec updated with `dependencies: [validation-<name>]`
13
+ </outputs>
14
+
15
+ <constraints>
16
+ - MUST create spec, NOT implement tooling
17
+ - MUST get engineer confirmation
18
+ - MUST include CICD + meta-testing in acceptance criteria
19
+ - MUST verify the validation domain has a meaningful stochastic dimension before creating a suite spec. Per **Agentic Validation Tooling**, deterministic-only tools (type checking, linting, formatting) are test commands — NOT suites.
20
+ </constraints>
21
+
22
+ ## Domain Knowledge
23
+
24
+ - Run `ah skills list` to discover the `harness-maintenance` skill
25
+ - Read the skill's `references/validation-tooling.md` for suite writing philosophy, crystallization lifecycle, evidence capture patterns, and tool validation guidance
26
+
27
+ ## Research
28
+
29
+ Read `.allhands/flows/shared/RESEARCH_GUIDANCE.md` and investigate:
30
+ - Best practices: `ah perplexity research "best practices <validation_type> testing <technology>"`
31
+ - Available tools: `ah tavily search "<technology> testing tools"`, `ah tools --list`
32
+ - CICD patterns: `ah perplexity research "<validation_type> CICD GitHub Actions"`
33
+ - Determine whether the domain has exploratory patterns that benefit from agent intuition (stochastic dimension). If the validation is purely deterministic (binary command output), it does not justify a suite — document it as a test command reference instead.
34
+
35
+ If valuable MCP not integrated, note as acceptance criterion.
36
+
37
+ ## Tool Validation
38
+
39
+ Per **Agentic Validation Tooling**, research produces assumptions; running the tool produces ground truth. Per **Ideation First**, prevents encoding untested assumptions.
40
+
41
+ - Install and verify the tool responds to `--help` — internalize the full command vocabulary before anything else
42
+ - Create a minimal test target (temp directory, not committed)
43
+ - Execute representative stochastic workflows — discover commands, chaining, and the observe-act-verify loop
44
+ - Document divergences from researched documentation — informs spec and engineer interview
45
+
46
+ ## Engineer Interview
47
+
48
+ Present: recommended approach, alternatives, CICD impact, effort, MCP availability. Include divergences discovered during Tool Validation.
49
+
50
+ Confirm engineer agrees and understands this creates a blocking dependency.
51
+
52
+ ## Spec Creation
53
+
54
+ Use `name: validation-{name}` and `domain_name: infrastructure`.
55
+
56
+ New suites must articulate both their stochastic and deterministic dimensions. Per **Agentic Validation Tooling**, the stochastic dimension justifies the suite's existence; the deterministic dimension provides CI/CD gating.
57
+
58
+ Body sections: Context, Acceptance Criteria (setup, coverage, meta-testing, CICD, documentation), Technical Constraints, Out of Scope.
59
+
60
+ Follow `.allhands/flows/shared/CREATE_SPEC.md`.
61
+
62
+ Update original spec with `dependencies: [validation-{name}]`.
63
+
64
+ ## Handoff
65
+
66
+ Ask engineer: "This validation tooling spec is ready and blocks your original work. Would you like to switch focus to it now?"
67
+
68
+ If yes: checkout the branch and run `ah planning ensure`
69
+
70
+ If no: inform engineer spec is saved and original spec is blocked until this is complete
@@ -0,0 +1,123 @@
1
+ <goal>
2
+ Discover ALL documentable approaches/features within a domain. Per **Frontier Models are Capable**, identify engineering knowledge comprehensively - it's better to over-discover than under-discover.
3
+
4
+ Engineering knowledge sources: prompts, commit messages, and alignment docs when provided (Incremental mode), otherwise infer decisions and intent from the code itself (Fill-the-Gaps mode).
5
+ </goal>
6
+
7
+ <inputs>
8
+ - `domain`: Name of the domain to analyze
9
+ - `source_paths`: Directories/files to scan
10
+ - `exclude`: Glob patterns for files/directories to skip (from `.allhands/docs.json`)
11
+ - `mode`: "fill-gaps" or "incremental"
12
+ - `session_context`: (incremental only) Summary from alignment doc
13
+ </inputs>
14
+
15
+ <outputs>
16
+ - List of approaches with associated files and symbols
17
+ - Recommended documentation structure
18
+ </outputs>
19
+
20
+ <constraints>
21
+ - MUST use `ah knowledge docs search` to check existing documentation coverage
22
+ - MUST return structured approach list, not prose
23
+ - MUST cover all significant features, grouping by feature to stay **under 20 approaches**
24
+ - NEVER propose approaches already fully documented
25
+ - NEVER split a single command/feature into multiple approaches
26
+ </constraints>
27
+
28
+ ## Analysis Strategy
29
+
30
+ Run `tldr structure <source_path>` to get full codemap, then identify **user-facing features and systems**.
31
+
32
+ **Exclusion filtering**: If `exclude` patterns are provided, skip any files or directories matching those globs before analysis. Do not propose approaches for excluded paths and do not list excluded files in approach `files` arrays. Patterns are matched relative to project root.
33
+
34
+ ### What makes a good approach (= one doc file)?
35
+ - A CLI command with all its implementation details
36
+ - A subsystem that serves a clear purpose (e.g., "MCP integration", "TUI components")
37
+ - A workflow or pattern used across the codebase
38
+ - An integration with external services
39
+
40
+ ### What should NOT be separate approaches?
41
+ - Helper functions (belong in parent feature's doc)
42
+ - Internal utilities (group with related features)
43
+ - Implementation details of a larger feature
44
+ - Multiple files that serve the same purpose
45
+
46
+ ## Coverage Check
47
+
48
+ - Run `ah knowledge docs search "<domain>"` to find existing docs
49
+ - For each identified approach:
50
+ - Check if already documented
51
+ - If partial coverage, note gaps
52
+ - If no coverage, mark as new
53
+
54
+ ## Grouping Heuristics
55
+
56
+ **One approach = one documentation file.** Group aggressively:
57
+
58
+ | Pattern | Grouping |
59
+ |---------|----------|
60
+ | CLI command + all its helpers/implementation | **Single approach** |
61
+ | Related utilities (even 5-10 functions) | **Single approach** |
62
+ | Subsystem with multiple files serving one purpose | **Single approach** |
63
+ | Large system with truly distinct user-facing parts | Multiple approaches |
64
+ | Cross-cutting pattern used everywhere | Single pattern-focused approach |
65
+
66
+ **Key principle**: Only create separate approaches when someone would realistically search for them as distinct topics. Most helper functions, internal utilities, and implementation details belong in their parent feature's doc.
67
+
68
+ ## Output Format
69
+
70
+ Return structured YAML with **intelligent directory groupings**:
71
+
72
+ ```yaml
73
+ domain: "<domain-name>"
74
+ approaches:
75
+ - name: "<approach-name>"
76
+ description: "<one-line purpose>"
77
+ group: "<subdirectory-name>" # e.g., "cli", "tui", "hooks", or null for flat
78
+ files:
79
+ - "<path/to/file.ts>"
80
+ symbols:
81
+ - "<FunctionName>"
82
+ - "<ClassName>"
83
+ existing_coverage: "none" | "partial" | "full"
84
+ notes: "<gaps or special considerations>"
85
+ recommended_structure:
86
+ directories:
87
+ - name: "cli"
88
+ description: "Command-line interface commands"
89
+ approach_count: 16
90
+ - name: "tui"
91
+ description: "Terminal UI components"
92
+ approach_count: 4
93
+ # Groups with <3 approaches stay flat (group: null)
94
+ flat_files:
95
+ - "docs/<domain>/test-harness.md" # Single approach, no subdirectory
96
+ ```
97
+
98
+ ### Directory Grouping Rules
99
+
100
+ 1. **Create subdirectory** when 3+ approaches share a logical category
101
+ 2. **Keep flat** when approaches don't group logically or group has <3 files
102
+ 3. **Name by concept**, not by source path (e.g., `cli/` not `commands/`)
103
+ 4. **Common groupings** to consider:
104
+ - `cli/` - Command implementations
105
+ - `tui/` - UI components
106
+ - `hooks/` - Hook categories
107
+ - `integrations/` - External service integrations
108
+ - `core/` - Core libraries (only if needed to disambiguate)
109
+
110
+ ## Completeness Check
111
+
112
+ Before returning, verify:
113
+ - Are major user-facing features covered?
114
+ - Are key subsystems documented?
115
+ - Have you grouped related functionality together?
116
+
117
+ **Warning signs of over-discovery:**
118
+ - More than 20 approaches for a domain
119
+ - Multiple approaches for the same CLI command
120
+ - Separate approaches for helper/utility functions
121
+ - Approaches that would result in very short docs
122
+
123
+ If you exceed 20 approaches, consolidate related ones until under the limit.
@@ -0,0 +1,101 @@
1
+ <goal>
2
+ Write documentation that exposes engineering knowledge via file references and LSP symbols. Per **Knowledge Compounding**, docs enable semantic discovery of code through compounded understanding of use cases, intent, and key decisions.
3
+
4
+ Engineering knowledge sources: prompts, commit messages, and alignment docs when provided via `session_knowledge`, otherwise infer decisions and intent from the code itself.
5
+ </goal>
6
+
7
+ <inputs>
8
+ - `domain`: Domain being documented
9
+ - `approaches`: List of approaches with:
10
+ - `name`: Approach identifier
11
+ - `group`: Subdirectory name (or null for flat)
12
+ - `files`: Source files to document
13
+ - `symbols`: Key symbols to reference
14
+ - `doc_directory`: Target directory for docs
15
+ - `existing_docs`: Paths to edit (empty for new docs)
16
+ - `session_knowledge`: (incremental only) Commit messages, alignment summary, prompt learnings
17
+ </inputs>
18
+
19
+ <outputs>
20
+ - Documentation files with `[ref:file:Symbol]` placeholders
21
+ - Created directories as needed
22
+ </outputs>
23
+
24
+ <constraints>
25
+ - MUST follow `ah schema documentation` for frontmatter and file reference format
26
+ - MUST use LSP symbols (function names, class names) in refs for searchability
27
+ - MUST create directories before writing files
28
+ - NEVER write command/installation guides - those belong in README.md
29
+ - NEVER use a uniform template across docs - each doc's structure must be driven by its content type. Two docs about different topics should look different.
30
+ </constraints>
31
+
32
+ ## Doc Quality Goals
33
+
34
+ Per **Knowledge Compounding**, each doc should:
35
+
36
+ 1. **Expose engineering knowledge** - Use cases, intent, key decisions, trade-offs
37
+ 2. **Enable semantic discovery** - Descriptions that match how someone would search
38
+ 3. **Minimize token count** - Right-sized for indexing, not bloated
39
+
40
+ ## Format Selection
41
+
42
+ Per **Frontier Models are Capable**, select the format that communicates the content best:
43
+
44
+ | Content Type | Format |
45
+ |---|---|
46
+ | State transitions, lifecycles | Mermaid state diagram |
47
+ | Multi-step processes, request flows | Mermaid sequence diagram |
48
+ | Component relationships, data flow | Mermaid flowchart |
49
+ | Feature comparisons, option matrices | Table |
50
+ | Algorithm steps, retry/backoff logic | Numbered list with formula notation |
51
+ | Conditional behavior, branching logic | Decision tree or nested bullets |
52
+
53
+ Do NOT default to the same section pattern for every doc. A retry-backoff doc needs a delay formula table. An optimistic UI doc needs a state diagram. A CI pipeline doc needs a job dependency graph. Let the content drive the structure.
54
+
55
+ ## Writing Approach
56
+
57
+ ### For New Docs
58
+
59
+ - Run `ah schema documentation` to get required frontmatter format
60
+ - Read source files to understand the approach
61
+ - Identify key entry points, core logic, and integration points
62
+ - Structure freely - use whatever sections serve the content:
63
+ - Overview, Architecture, Patterns, Data Flow, Key Decisions
64
+ - Tables, diagrams (mermaid), lists - whatever communicates best
65
+ - Embed refs throughout: `[ref:src/lib/semantic-search.ts:searchIndex]`
66
+
67
+ ### For Editing Existing Docs
68
+
69
+ - Read existing doc and `existing_docs` paths
70
+ - Read source files to understand changes
71
+ - If `session_knowledge` provided, incorporate learnings:
72
+ - New patterns or approaches from implementation
73
+ - Key decisions documented in alignment
74
+ - Deviations or discoveries from prompts
75
+ - Update refs to match current code
76
+ - Add new sections for new functionality
77
+ - Remove or update stale content
78
+
79
+ ### For Fixing Validation Issues
80
+
81
+ If provided `stale_refs` or `invalid_refs`:
82
+ - Read the doc and referenced files
83
+ - For stale refs: update to current symbols/locations
84
+ - For invalid refs: remove or fix (symbol may have been renamed/moved)
85
+ - Verify all refs point to real implementations
86
+
87
+ ## Directory Structure
88
+
89
+ Use the `group` field from approach input to determine file paths:
90
+
91
+ - **If `group` is set**: `<doc_directory>/<group>/<approach-name>.md`
92
+ - Example: `docs/harness/cli/knowledge-command.md`
93
+ - **If `group` is null**: `<doc_directory>/<approach-name>.md`
94
+ - Example: `docs/harness/test-harness.md`
95
+
96
+ Create subdirectories as needed before writing files.
97
+
98
+ ## Completion
99
+
100
+ - Ensure all docs are written to `doc_directory`
101
+ - Report files created/modified
@@ -0,0 +1,76 @@
1
+ <goal>
2
+ Analyze emergent refinement prompts to determine which should be kept, improved, or eliminated. Per **Quality Engineering**, present options to the engineer for variant selection.
3
+ </goal>
4
+
5
+ <inputs>
6
+ - Alignment doc path
7
+ - Prompts file directory
8
+ </inputs>
9
+
10
+ <outputs>
11
+ - User-patch prompts for improvements/eliminations
12
+ - Updated alignment doc with engineer decisions
13
+ </outputs>
14
+
15
+ <constraints>
16
+ - MUST analyze all prompts with `type: emergent` frontmatter
17
+ - MUST document engineer decisions in alignment doc and prompt files
18
+ - MUST use git hashes from prompts to identify file changes for reversion
19
+ </constraints>
20
+
21
+ ## Context Gathering
22
+
23
+ - Read the alignment doc for milestone goal and context
24
+ - Read all prompts in the directory with `type: emergent` frontmatter
25
+ - Extract git hashes from each prompt to identify affected files
26
+
27
+ ## Prompt Analysis
28
+
29
+ For each emergent refinement prompt, evaluate:
30
+
31
+ | Criterion | Question |
32
+ |-----------|----------|
33
+ | Hypothesis | What did it propose to accomplish? |
34
+ | Approach | How did it attempt to solve the outcome? |
35
+ | Effectiveness | Did validation results prove goal contribution? |
36
+ | Alignment | Does it push toward alignment doc goals? |
37
+
38
+ ## Classification
39
+
40
+ Categorize each emergent prompt:
41
+
42
+ | Category | Criteria | Action |
43
+ |----------|----------|--------|
44
+ | **Keep** | Strong hypothesis, effective, aligned | No action needed |
45
+ | **Improve** | Good hypothesis, but execution gaps | Create improvement patch prompt |
46
+ | **Eliminate** | Hypothesis doesn't support goal | Create reversion patch prompt |
47
+
48
+ For "Improve" prompts, document:
49
+ - Why they aren't "Keep" status
50
+ - What changes would elevate them
51
+
52
+ ## Engineer Decision
53
+
54
+ Present findings holistically:
55
+ - Compare emergent refinements against each other
56
+ - Highlight patterns of effective vs ineffective hypotheses
57
+ - Offer recommendations per prompt
58
+
59
+ Allow engineer to:
60
+ - Accept suggestions as-is
61
+ - Provide custom adjustments
62
+ - Decide eliminations
63
+
64
+ ## Prompt Creation
65
+
66
+ For accepted changes:
67
+ - Read `.allhands/flows/shared/PROMPT_TASKS_CURATION.md` for guidance
68
+ - Create `type: user-patch` prompts for improvements
69
+ - Create `type: user-patch` prompts for eliminations (include reversion steps using git hash file references)
70
+
71
+ ## Decision Documentation
72
+
73
+ Per **Knowledge Compounding**, document engineer decisions:
74
+ - Add rationale to alignment doc
75
+ - Amend individual prompt files with engineer steering
76
+ - Capture why prompts were kept/improved/eliminated
@@ -0,0 +1,97 @@
1
+ <goal>
2
+ Acquire explicit documentation and implementation inspiration from external technologies. Per **Frontier Models are Capable**, this provides the specific implementation guidance needed to deduce "how" from "why".
3
+ </goal>
4
+
5
+ <inputs>
6
+ - Query for context7 or open source repo exploration
7
+ - Query type indication: open source GitHub project OR proprietary documentation only
8
+ - Relevant codebase files to inject into query context (if applicable)
9
+ </inputs>
10
+
11
+ <outputs>
12
+ - Summary of guidance provided
13
+ - Strong implementation examples/suggestions inferred from tool responses
14
+ </outputs>
15
+
16
+ <constraints>
17
+ - MUST use context7 for documentation references
18
+ - MUST clone open source repos to `.reposearch/` for local exploration
19
+ - MUST run both approaches in parallel when query benefits from dual perspective
20
+ - MUST NOT USE OTHER TOOLING THAN DESCRIBED HERE UNLESS BOTH OPTIONS ARE FAILING TO PROVIDE RESULTS
21
+ </constraints>
22
+
23
+ ## Tool Selection
24
+
25
+ | Query Type | Tool | Purpose |
26
+ |------------|------|---------|
27
+ | Documentation lookup | `ah context7 search` | Official docs and API references |
28
+ | Open source exploration | `gh search` + clone | Clone repo locally for full file navigation |
29
+ | Both applicable | Run in parallel | Well-rounded perspective |
30
+
31
+ ## Usage Patterns
32
+
33
+ ### Documentation Only (context7)
34
+
35
+ For proprietary domains with documentation pages:
36
+ - Run `ah context7 search "<technology> <query>"`
37
+ - Extract API patterns, configuration examples
38
+ - Note version-specific behaviors
39
+
40
+ ### Open Source Inspiration (Clone & Browse)
41
+
42
+ For exploring GitHub repositories locally:
43
+
44
+ 1. **Search for repositories**:
45
+ ```bash
46
+ gh search repos "<query>" --limit 5
47
+ ```
48
+
49
+ 2. **Clone to local research folder**:
50
+ ```bash
51
+ # Clone into .reposearch folder (gitignored)
52
+ mkdir -p .reposearch
53
+ git clone --depth 1 <repo-url> .reposearch/<repo-name>
54
+ ```
55
+
56
+ Note: Ensure `.reposearch/` is in the project's `.gitignore`.
57
+
58
+ 3. **Browse locally with standard tooling**:
59
+ - Use `Glob` to find files by pattern
60
+ - Use `Grep` to search code content
61
+ - Use `Read` to examine specific files
62
+ - Use `ls` to explore directory structure
63
+
64
+ 4. **Clean up when done** (optional):
65
+ ```bash
66
+ rm -rf .reposearch/<repo-name>
67
+ ```
68
+
69
+ This approach leverages the agent's superior local file navigation capabilities:
70
+ - Full regex search across the codebase
71
+ - Fast pattern matching and file discovery
72
+ - Direct file reading without API encoding issues
73
+ - Study implementation patterns in similar projects
74
+ - Extract architectural decisions
75
+ - Note how libraries handle similar problems
76
+
77
+ ### Parallel Exploration
78
+
79
+ Most cases benefit from both tools:
80
+ - Documentation gives official guidance
81
+ - Source code reveals actual implementation patterns
82
+ - Cross-reference for comprehensive understanding
83
+
84
+ ## Query Formulation
85
+
86
+ When injecting codebase context:
87
+ - Include relevant file paths from this codebase
88
+ - Explain how query relates to existing implementation
89
+ - Ask specific questions about integration approach
90
+
91
+ ## Output Synthesis
92
+
93
+ Provide:
94
+ - Summary of what guidance was found
95
+ - Specific implementation suggestions
96
+ - Code patterns to follow
97
+ - Gotchas or edge cases discovered