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,119 @@
1
+ <goal>
2
+ Analyze spec for user flow completeness without prescribing implementation. Per **Ideation First**, specs capture intent - this validates intent coverage, not implementation detail.
3
+ </goal>
4
+
5
+ <inputs>
6
+ - Spec doc path
7
+ </inputs>
8
+
9
+ <outputs>
10
+ - User flow overview (what the spec enables)
11
+ - Gap identification (what's missing or ambiguous)
12
+ - Clarifying questions for engineer
13
+ </outputs>
14
+
15
+ <constraints>
16
+ - MUST respect spec as intent document, not requirements doc
17
+ - MUST keep analysis high-level (user-observable, not implementation)
18
+ - MUST ask, not prescribe - engineer decides what to address
19
+ - NEVER add implementation details to spec
20
+ </constraints>
21
+
22
+ ## Flow Discovery
23
+
24
+ Read the spec and identify:
25
+
26
+ ### Primary User Journeys
27
+
28
+ | Element | Extract |
29
+ |---------|---------|
30
+ | User types | Who are the actors? (end users, admins, systems) |
31
+ | Entry points | How do users start this flow? |
32
+ | Goals | What are users trying to accomplish? |
33
+ | Exit conditions | How do users know they're done? |
34
+ | Success criteria | What defines a successful outcome? |
35
+
36
+ ### Implicit Flows
37
+
38
+ Look for unstated but necessary flows:
39
+ - Error recovery paths
40
+ - Edge cases mentioned in concerns
41
+ - Dependencies on other features
42
+ - State transitions implied by descriptions
43
+
44
+ ## Gap Analysis
45
+
46
+ For each discovered flow, check:
47
+
48
+ | Dimension | Question |
49
+ |-----------|----------|
50
+ | Entry | How does user start this? Is it clear? |
51
+ | Happy Path | Is the main success path defined? |
52
+ | Error States | What if things go wrong? |
53
+ | Edge Cases | First-time user? Concurrent access? Partial completion? |
54
+ | Exit | How does user know they succeeded? |
55
+
56
+ ### Gap Categories
57
+
58
+ | Category | Description |
59
+ |----------|-------------|
60
+ | Missing Flow | A necessary journey not mentioned |
61
+ | Ambiguous Transition | Unclear what happens between states |
62
+ | Undefined Error | No guidance on failure handling |
63
+ | Scope Boundary | Unclear where this feature ends |
64
+
65
+ ## Output Format
66
+
67
+ Present findings as questions, not mandates:
68
+
69
+ ```
70
+ ## User Flows Identified
71
+
72
+ ### Flow 1: [Name]
73
+ - **Actor**: [Who]
74
+ - **Goal**: [What they want]
75
+ - **Path**: [High-level steps]
76
+ - **Success**: [How they know it worked]
77
+
78
+ ### Flow 2: [Name]
79
+ ...
80
+
81
+ ## Gaps Found
82
+
83
+ ### Missing Flows
84
+ - [Gap]: [Why it matters] → **Question**: [What should happen?]
85
+
86
+ ### Ambiguities
87
+ - [Unclear element]: [What's ambiguous] → **Question**: [Clarify X or Y?]
88
+
89
+ ### Error Handling
90
+ - [Scenario]: [What could fail] → **Question**: [How should user recover?]
91
+
92
+ ## Clarifying Questions
93
+
94
+ Prioritized by impact:
95
+
96
+ ### Critical (blocks understanding)
97
+ 1. [Question that must be answered]
98
+
99
+ ### Important (affects scope)
100
+ 2. [Question that clarifies boundaries]
101
+
102
+ ### Nice-to-have (edge cases)
103
+ 3. [Question about rare scenarios]
104
+
105
+ ## Recommendations
106
+
107
+ Based on analysis:
108
+ - [Suggestion for spec improvement]
109
+ - [Area that may need more ideation]
110
+ ```
111
+
112
+ ## Completion
113
+
114
+ Per **Ideation First**, present gaps as questions and let engineer decide:
115
+ - Which gaps to address in this spec
116
+ - Which gaps to leave for planning phase
117
+ - Which gaps are out of scope
118
+
119
+ Do not modify the spec directly - present findings and await engineer direction.
@@ -0,0 +1,109 @@
1
+ <goal>
2
+ Apply test-driven development principles to prompt execution. Per **Agentic Validation Tooling**, tests written first create clear acceptance criteria and prevent scope creep.
3
+ </goal>
4
+
5
+ <inputs>
6
+ - Prompt file with tasks and acceptance criteria
7
+ - Validation tooling reference (if any)
8
+ </inputs>
9
+
10
+ <outputs>
11
+ - Failing tests that define success
12
+ - Implementation that passes tests
13
+ - No production code without corresponding test
14
+ </outputs>
15
+
16
+ <constraints>
17
+ - MUST write failing tests before implementation
18
+ - MUST implement minimal code to pass tests
19
+ - NEVER add untested functionality
20
+ </constraints>
21
+
22
+ ## TDD Cycle
23
+
24
+ ```
25
+ RED → GREEN → REFACTOR
26
+ │ │ │
27
+ │ │ └─ Improve code quality (tests still pass)
28
+ │ └─ Write minimal code to pass tests
29
+ └─ Write failing tests from acceptance criteria
30
+ ```
31
+
32
+ ## When to Apply TDD
33
+
34
+ | Context | TDD Approach |
35
+ |---------|--------------|
36
+ | High-risk domains (auth, payments, data) | Full TDD - every acceptance criterion tested first |
37
+ | Core business logic | Full TDD - tests define behavior |
38
+ | UI components | Light TDD - key interactions tested |
39
+ | Integration glue code | Light TDD - happy path + error cases |
40
+ | Scripts/utilities | Optional - judgment call |
41
+
42
+ ## TDD for Prompts
43
+
44
+ ### Phase 1: RED (Write Failing Tests)
45
+
46
+ From prompt acceptance criteria, write tests that:
47
+ - Define expected behavior precisely
48
+ - Cover edge cases mentioned in criteria
49
+ - Fail meaningfully (not just "not implemented")
50
+
51
+ ```
52
+ Acceptance Criteria: "User can reset password via email"
53
+ → Test: "sends reset email when valid email provided"
54
+ → Test: "returns error for unknown email"
55
+ → Test: "rate limits reset requests"
56
+ → Test: "token expires after 1 hour"
57
+ ```
58
+
59
+ ### Phase 2: GREEN (Minimal Implementation)
60
+
61
+ Implement only what's needed to pass tests:
62
+ - No extra features
63
+ - No "while I'm here" improvements
64
+ - No premature optimization
65
+
66
+ ### Phase 3: REFACTOR (Improve Quality)
67
+
68
+ With passing tests as safety net:
69
+ - Extract common code
70
+ - Improve naming
71
+ - Simplify logic
72
+ - Tests must still pass
73
+
74
+ ## Integration with Prompt Execution
75
+
76
+ When executing prompts with TDD approach:
77
+
78
+ 1. Read acceptance criteria from prompt
79
+ 2. Generate test cases that prove criteria met
80
+ 3. Run tests (should fail - RED)
81
+ 4. Implement minimal code (GREEN)
82
+ 5. Refactor if needed
83
+ 6. Run validation review with test evidence
84
+
85
+ ## Test Evidence for Validation
86
+
87
+ Include in prompt summary:
88
+ ```markdown
89
+ ## Test Evidence
90
+
91
+ | Acceptance Criterion | Test | Status |
92
+ |---------------------|------|--------|
93
+ | User can reset password | `test_password_reset_happy_path` | PASS |
94
+ | Invalid email rejected | `test_password_reset_invalid_email` | PASS |
95
+ | Rate limited | `test_password_reset_rate_limit` | PASS |
96
+ ```
97
+
98
+ ## When NOT to Use Full TDD
99
+
100
+ - Exploratory/spike work (write tests after if keeping)
101
+ - Pure UI layout changes (visual review sufficient)
102
+ - Configuration changes (integration test coverage)
103
+ - Documentation only
104
+
105
+ ## TDD Philosophy
106
+
107
+ > "No production code without a failing test first."
108
+
109
+ The test defines the contract. The implementation fulfills it. The refactor improves it. Never reverse this order.
@@ -0,0 +1,84 @@
1
+ <goal>
2
+ Find and apply existing validation tooling to build strong acceptance criteria. Per **Agentic Validation Tooling**, matching the right suite to the task ensures programmatic validation without engineer intervention.
3
+ </goal>
4
+
5
+ <inputs>
6
+ - Files/domains involved in the implementation task
7
+ - Nature of the changes (UI, backend, database, etc.)
8
+ </inputs>
9
+
10
+ <outputs>
11
+ - Matched suite file paths for `validation_suites` frontmatter
12
+ - Acceptance criteria derived from suite commands
13
+ </outputs>
14
+
15
+ <constraints>
16
+ - MUST run `ah validation-tools list` to discover available suites
17
+ - MUST match suites via both glob patterns AND description inference
18
+ - MUST document gaps for CREATE_VALIDATION_TOOLING follow-up
19
+ - MUST order validation progressively (compiles → unit tests → integration → E2E)
20
+ </constraints>
21
+
22
+ ## Step 1: Discover Available Suites
23
+
24
+ - Run `ah validation-tools list`
25
+ - Returns JSON with: `name`, `description`, `globs`, `file` path, `tools`
26
+
27
+ ## Step 2: Identify Relevant Suites
28
+
29
+ Match suites using two approaches:
30
+
31
+ **Glob pattern matching** (programmatic):
32
+ - Compare files you're touching against each suite's `globs`
33
+ - Suites with matching patterns are likely relevant
34
+
35
+ **Description inference** (semantic):
36
+ - Read suite descriptions
37
+ - Match against task nature (UI, DB migrations, API endpoints, etc.)
38
+
39
+ Select all suites that apply to implementation scope.
40
+
41
+ ## Step 3: Read Suite Documentation
42
+
43
+ For each relevant suite:
44
+ - Run `cat .allhands/validation/<suite-name>.md`
45
+
46
+ Understand:
47
+ - **Purpose**: What quality aspects it validates
48
+ - **Tooling**: What tools are needed and how to install/configure them
49
+ - **Stochastic Validation**: How to use the suite for exploratory agent-driven validation during implementation
50
+ - **Deterministic Integration**: What CI-gated commands to run for acceptance criteria
51
+
52
+ ## Step 4: Integrate into Acceptance Criteria
53
+
54
+ Per **Agentic Validation Tooling**, use each dimension at the right phase:
55
+
56
+ - **During implementation**: Follow the **Stochastic Validation** section — use model intuition to probe edge cases, test user flows, and verify quality beyond deterministic checks
57
+ - **For acceptance criteria**: Reference the **Deterministic Integration** section — these are binary pass/fail commands that gate completion
58
+ - Stochastic exploration informs quality during the work but is not an acceptance criterion — acceptance criteria must be deterministic
59
+
60
+ Order validation progressively when writing acceptance criteria:
61
+
62
+ Example:
63
+ ```markdown
64
+ ## Acceptance Criteria
65
+ - [ ] Code compiles without errors
66
+ - [ ] `npx vitest run --coverage` passes with >80% coverage on changed files
67
+ - [ ] `npx playwright test auth.spec.ts` passes all auth flow scenarios
68
+ - [ ] No regressions in existing test suites
69
+ ```
70
+
71
+ ## Step 5: Note Gaps
72
+
73
+ If validation needs have no matching suite:
74
+ - Document the gap explicitly
75
+ - Flag for CREATE_VALIDATION_TOOLING follow-up
76
+ - Proceed with available validation (compiles, type checks, basic tests)
77
+
78
+ ## For Prompt Curation
79
+
80
+ When used via PROMPT_TASKS_CURATION:
81
+ - Add suite file paths to prompt's `validation_suites` frontmatter
82
+ - Use the `file` field from `ah validation-tools list` output
83
+ - Makes validation approach explicit and reviewable
84
+ - Executors can read referenced suite files directly
@@ -0,0 +1,11 @@
1
+ <goal>
2
+ Flow authoring conventions for the All Hands harness. Per **Knowledge Compounding**, comprehensive flow-writing knowledge is centralized in the harness-maintenance skill.
3
+ </goal>
4
+
5
+ ## Start Here
6
+
7
+ - Run `ah skills list` to discover the `harness-maintenance` skill
8
+ - Read the skill's routing table — select `references/writing-flows.md` for flow authoring patterns
9
+ - For execution, follow `.allhands/flows/harness/WRITING_HARNESS_FLOWS.md`
10
+
11
+ Per **Context is Precious**, this file redirects to two canonical sources — the skill reference for domain knowledge, the harness flow for execution — rather than duplicating content.
@@ -0,0 +1,84 @@
1
+ <goal>
2
+ Add a new MCP server integration to the harness. Per **Agentic Validation Tooling**, MCP servers extend the harness with external tool capabilities that enable programmatic validation.
3
+ </goal>
4
+
5
+ <inputs>
6
+ - MCP package name or npmjs/GitHub URL
7
+ - Purpose: what capability this MCP enables (e.g., "Supabase database validation")
8
+ </inputs>
9
+
10
+ <outputs>
11
+ - Config file at `.allhands/harness/src/mcp/<server-name>.ts`
12
+ - Environment requirements documentation
13
+ - Validation status report
14
+ </outputs>
15
+
16
+ <constraints>
17
+ - MUST research package before building config
18
+ - MUST NOT add environment variable values - only document requirements
19
+ - MUST validate server discovery after config creation
20
+ - MUST run as sub-agent to avoid blocking main thread
21
+ </constraints>
22
+
23
+ ## Phase 1: Research
24
+
25
+ Investigate the MCP package requirements:
26
+
27
+ **Find the package**:
28
+ - Run `ah tavily search "<mcp_name> MCP server npm"` for package details
29
+
30
+ **Read documentation**:
31
+ - Run `ah context7 search "<mcp_name>"` for official docs
32
+ - Run `ah tavily extract "<doc_url>"` for specific pages
33
+
34
+ **Identify requirements**:
35
+ - Transport type (stdio, http, sse)
36
+ - Command/args for stdio
37
+ - URL for http/sse
38
+ - Environment variables needed
39
+ - Authentication method (API key, OAuth, etc.)
40
+
41
+ ## Phase 2: Build Config
42
+
43
+ - Copy template: `cp .allhands/harness/src/mcp/_template.ts .allhands/harness/src/mcp/<server-name>.ts`
44
+
45
+ Edit the config file with researched values:
46
+ - `name`: Short identifier (used in `ah tools <name>:tool`)
47
+ - `description`: What the server does
48
+ - `type`: Transport type ('stdio', 'http', 'sse')
49
+ - `command`/`args`: For stdio transport
50
+ - `url`: For http/sse transport
51
+ - `env`: Environment variables (use `${VAR_NAME}` syntax)
52
+ - `stateful`: Set to `true` if server maintains session state
53
+ - `toolHints`: Add helpful hints for key tools
54
+
55
+ Add comment with source URL (npm/GitHub).
56
+
57
+ ## Phase 3: Environment Setup
58
+
59
+ If MCP requires authentication or API keys:
60
+
61
+ - Check if env var exists: `grep "VAR_NAME" .env.ai 2>/dev/null || echo "Not found"`
62
+ - Document required variables (do NOT add values):
63
+ - Variable name
64
+ - Where to obtain (signup URL, dashboard location)
65
+ - Expected format (API key, bearer token, etc.)
66
+
67
+ ## Phase 4: Validation
68
+
69
+ - Build harness: `cd .allhands/harness && npm run build`
70
+ - List servers: `ah tools --list` (verify new server appears)
71
+ - List tools: `ah tools <server-name>` (verify tools discovered)
72
+ - Test a tool call (choose read-only/safe tool): `ah tools <server-name>:<tool> --<param>=<value>`
73
+
74
+ If call fails due to missing auth, document and proceed.
75
+
76
+ ## Completion
77
+
78
+ Report back with:
79
+ - Config file created: `.allhands/harness/src/mcp/<server-name>.ts`
80
+ - Available tools: List with brief descriptions
81
+ - Environment requirements (if any)
82
+ - Validation status: "Ready to use" or "Pending auth setup"
83
+
84
+ Main thread can proceed knowing MCP is (or will be) available.
@@ -0,0 +1,91 @@
1
+ <goal>
2
+ Review implementation for architectural compliance and system design quality. Per **Quality Engineering**, ensure changes align with established patterns and maintain proper component boundaries.
3
+ </goal>
4
+
5
+ <inputs>
6
+ - Git diff to base (implementation files)
7
+ - Alignment doc path (for architectural decisions)
8
+ </inputs>
9
+
10
+ <outputs>
11
+ - Architectural compliance assessment
12
+ - SOLID principle violations
13
+ - Component boundary issues
14
+ - Recommendations ordered by priority
15
+ </outputs>
16
+
17
+ <constraints>
18
+ - MUST use git diff to base for implementation review
19
+ - MUST compare against documented and implicit architecture
20
+ - MUST verify component boundaries are respected
21
+ </constraints>
22
+
23
+ ## Context Gathering
24
+
25
+ - Review all implementation changes from base branch
26
+ - Run `ah knowledge docs search "architecture"` for established patterns
27
+ - Read alignment doc for architectural decisions made during planning
28
+
29
+ ## Architectural Analysis
30
+
31
+ ### Component Relationships
32
+
33
+ | Check | Question |
34
+ |-------|----------|
35
+ | Dependency Direction | Do dependencies flow toward stable abstractions? |
36
+ | Circular Dependencies | Are there any import cycles introduced? |
37
+ | Layer Violations | Does UI import from data layer directly? |
38
+ | Boundary Crossing | Are module boundaries respected? |
39
+
40
+ ### SOLID Principles
41
+
42
+ | Principle | Check |
43
+ |-----------|-------|
44
+ | Single Responsibility | Does each module/class have one reason to change? |
45
+ | Open/Closed | Can new behavior be added without modifying existing code? |
46
+ | Liskov Substitution | Are derived types truly substitutable? |
47
+ | Interface Segregation | Are interfaces minimal and focused? |
48
+ | Dependency Inversion | Do high-level modules depend on abstractions? |
49
+
50
+ ### Pattern Compliance
51
+
52
+ For each changed file:
53
+ - Identify expected architectural patterns from existing codebase
54
+ - Compare implementation against those patterns
55
+ - Flag deviations that aren't justified in alignment doc
56
+
57
+ ## Review Process
58
+
59
+ For each changed file:
60
+ - Map its role in the architecture (UI, service, data, infrastructure)
61
+ - Check import statements for dependency direction
62
+ - Verify naming follows established conventions
63
+ - Ensure abstraction level matches its layer
64
+
65
+ ## Output Format
66
+
67
+ Return findings ordered by priority:
68
+
69
+ ```
70
+ ## Architecture Review
71
+
72
+ ### P1 (Critical - Architectural Violations)
73
+ - [File]: [Violation] -> [Impact] -> [Fix]
74
+
75
+ ### P2 (Important - Pattern Deviations)
76
+ - [File]: [Deviation] -> [Expected pattern] -> [Recommendation]
77
+
78
+ ### P3 (Suggestions - Minor Improvements)
79
+ - [File]: [Observation] -> [Improvement opportunity]
80
+
81
+ ## SOLID Analysis
82
+ - [Principle violations found with specific examples]
83
+
84
+ ## Boundary Assessment
85
+ - [Component boundaries respected/violated]
86
+ - [Coupling concerns identified]
87
+
88
+ ## Summary
89
+ - [Overall architectural health]
90
+ - [Key risks introduced]
91
+ ```
@@ -0,0 +1,80 @@
1
+ <goal>
2
+ Review implementation for domain best practices compliance. Per **Knowledge Compounding**, findings feed back to improve skills and documentation.
3
+ </goal>
4
+
5
+ <inputs>
6
+ - Alignment doc path
7
+ - Spec doc path
8
+ - Specific domain to focus on (e.g., react-native/expo, trpc/serverless, database/drizzle/supabase, web/tanstack/nextjs, dev tooling, CICD)
9
+ </inputs>
10
+
11
+ <outputs>
12
+ - Critical review of best practices compliance
13
+ - Improvements needed, ordered by priority
14
+ - Summary of violations (for compounding to encode back into harness)
15
+ </outputs>
16
+
17
+ <constraints>
18
+ - MUST extract skills using SKILL_EXTRACTION.md subtask
19
+ - MUST search codebase knowledge for established patterns
20
+ - MUST use research tools if no skill findings exist for the domain
21
+ - MUST order issues by priority for fixing
22
+ </constraints>
23
+
24
+ ## Context Gathering
25
+
26
+ - Read the alignment doc for prompt summaries
27
+ - Identify domain-relevant implementation files changed from base branch
28
+ - Identify and read prompts that touched this domain
29
+
30
+ ## Best Practices Extraction
31
+
32
+ Spawn subtask to read `.allhands/flows/shared/SKILL_EXTRACTION.md`:
33
+ - Provide the domain files as input
34
+ - Extract patterns, preferences, and pitfalls for this domain
35
+
36
+ Search codebase knowledge:
37
+ - Run `ah knowledge docs search "<domain> best practices"` for established patterns
38
+ - Run `ah knowledge docs search "<domain> architecture"` for design decisions
39
+
40
+ ### Fallback: No Skill Findings
41
+
42
+ Per **Knowledge Compounding**, skills are our maintained source of domain best practices. If skill extraction and knowledge search yield no findings:
43
+
44
+ - Read `.allhands/flows/shared/RESEARCH_GUIDANCE.md` and research current best practices for the domain
45
+ - LLM training data risks staleness without maintained skills - web research fills the gap
46
+
47
+ ## Review Process
48
+
49
+ Compare implementation against extracted best practices:
50
+
51
+ | Check | Question |
52
+ |-------|----------|
53
+ | Patterns | Does implementation follow established code patterns? |
54
+ | Preferences | Are library/approach preferences honored? |
55
+ | Pitfalls | Does implementation avoid known pitfalls? |
56
+ | Consistency | Is style consistent with codebase conventions? |
57
+ | Wiring | Are components properly connected (imports, API calls, state flow)? |
58
+ | Completeness | Is implementation substantive or placeholder-heavy? |
59
+
60
+ ## Output Format
61
+
62
+ Return findings ordered by priority:
63
+
64
+ ```
65
+ ## Domain: <domain-name>
66
+
67
+ ### P1 (Blocking)
68
+ - [Issue]: [What violates] -> [How to fix]
69
+
70
+ ### P2 (Important)
71
+ - [Issue]: [What violates] -> [How to fix]
72
+
73
+ ### P3 (Minor)
74
+ - [Issue]: [What violates] -> [How to fix]
75
+
76
+ ## Compounding Notes
77
+ - [What should be encoded into skills/docs to prevent recurrence]
78
+ ```
79
+
80
+ Compounding agent will use this to update harness based on engineer decisions.
@@ -0,0 +1,101 @@
1
+ <goal>
2
+ Verify claims made in prompts and alignment docs against actual codebase state. Per **Quality Engineering**, unverified claims lead to incorrect implementations.
3
+ </goal>
4
+
5
+ <inputs>
6
+ - Alignment doc path
7
+ - Prompts folder path
8
+ </inputs>
9
+
10
+ <outputs>
11
+ - List of unverified claims requiring attention
12
+ - Verified claims confirmed accurate
13
+ - Corrections for false claims
14
+ </outputs>
15
+
16
+ <constraints>
17
+ - MUST read actual files before confirming/denying claims
18
+ - MUST check multiple search patterns before claiming absence
19
+ - NEVER trust grep results alone for existence claims
20
+ </constraints>
21
+
22
+ ## Claim Extraction
23
+
24
+ Scan alignment doc and prompts for factual assertions about:
25
+ - What exists ("there is a retry mechanism in...")
26
+ - What doesn't exist ("no current handling for...")
27
+ - How things work ("the auth flow uses...")
28
+ - File/function locations ("located at src/...")
29
+
30
+ ## Verification Process
31
+
32
+ For each extracted claim:
33
+
34
+ ### Step 1: Categorize
35
+
36
+ | Claim Type | Verification Method |
37
+ |------------|---------------------|
38
+ | Existence | Read the referenced file/symbol |
39
+ | Absence | Search with multiple patterns, check likely locations |
40
+ | Behavior | Read the code, trace the logic |
41
+ | Location | Verify file exists and contains referenced content |
42
+
43
+ ### Step 2: Verify
44
+
45
+ ```yaml
46
+ claim: "<extracted claim>"
47
+ source: "<prompt number or alignment doc section>"
48
+
49
+ verification:
50
+ method: read | search | trace
51
+ files_checked: ["<paths>"]
52
+ patterns_tried: ["<if search>"]
53
+ context_lines: "<±N lines read>"
54
+
55
+ result: verified | false | partially_true | unverifiable
56
+ correction: "<if false, what's actually true>"
57
+ ```
58
+
59
+ ### Step 3: Output
60
+
61
+ Structure findings for REVIEW_OPTIONS_BREAKDOWN:
62
+
63
+ ```yaml
64
+ claim_verification:
65
+ verified_claims:
66
+ - claim: "<claim text>"
67
+ source: "<prompt/alignment>"
68
+ evidence: "<file:line or brief explanation>"
69
+
70
+ false_claims:
71
+ - claim: "<claim text>"
72
+ source: "<prompt/alignment>"
73
+ actual: "<what's actually true>"
74
+ impact: high | medium | low
75
+ suggested_fix: "<how to correct in source>"
76
+
77
+ unverifiable_claims:
78
+ - claim: "<claim text>"
79
+ source: "<prompt/alignment>"
80
+ reason: "<why unverifiable>"
81
+ recommendation: "<what to do>"
82
+ ```
83
+
84
+ ## Impact Assessment
85
+
86
+ | Impact | Criteria |
87
+ |--------|----------|
88
+ | **High** | False claim would cause implementation failure |
89
+ | **Medium** | False claim causes rework but not failure |
90
+ | **Low** | False claim is cosmetic or non-blocking |
91
+
92
+ ## Common Verification Failures
93
+
94
+ | Pattern | Why It's Risky |
95
+ |---------|---------------|
96
+ | "Based on the search results..." | Search may have missed files |
97
+ | "As we discussed earlier..." | Memory may be inaccurate |
98
+ | "The standard pattern here is..." | May not match actual codebase |
99
+ | "Similar to X, Y does..." | Assumption without verification |
100
+
101
+ **When in doubt, read the code.**