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,110 @@
1
+ <goal>
2
+ Structured, domain-aware mid-execution scope adjustment. Per **Quality Engineering**, initiative steering provides deep replanning when ad-hoc coordinator patches are insufficient. Per **Frontier Models are Capable**, the workflow domain config drives what to explore and what to ask — the agent deduces how to steer from domain knowledge and current execution state.
3
+ </goal>
4
+
5
+ <constraints>
6
+ - MUST read the workflow domain config, active spec, alignment doc, and all current prompt files before steering
7
+ - MUST NOT add prompt summaries for created prompts — per **Prompt Files as Units of Work**, summaries are written by executing agents after completion
8
+ - MUST reset `core_consolidation` to `pending` in alignment doc frontmatter when initiative goals change
9
+ - MUST follow append-only numbering and dependency patching patterns for all prompt changes
10
+ - MUST NOT ask for human intervention during execution (aside from the Steering Interview phase)
11
+ - MUST set `stage: 'steering'` on `status.yaml` on entry and restore `stage: 'executing'` on exit
12
+ </constraints>
13
+
14
+ ## Stage Management — Entry
15
+
16
+ Pause prompt spawning before any analysis. Per **Quality Engineering**, active executors continue but no new prompts are picked up during steering.
17
+
18
+ - Derive `status.yaml` path from `ALIGNMENT_PATH` (same directory, replace `alignment.md` with `status.yaml`)
19
+ - Read `status.yaml` and record the current `stage` value
20
+ - Set `stage: 'steering'` in `status.yaml`
21
+
22
+ ## Context Gathering
23
+
24
+ Ground against current execution state — this is the core difference from spec planning, which grounds against the spec alone.
25
+
26
+ - Read the workflow domain config at `WORKFLOW_DOMAIN_PATH`
27
+ - Read the active spec at `SPEC_PATH`
28
+ - Read the alignment doc at `ALIGNMENT_PATH` — note Overview goals, prior prompt summaries, engineer decisions, any existing steering amendments
29
+ - List and read all prompt files in `PROMPTS_FOLDER`:
30
+ - Categorize by status: `done`, `in_progress`, `pending`, `blocked`
31
+ - Note dependency graph and identify the execution frontier
32
+ - Assess implementation state:
33
+ - Check `git diff` and `git log` on `BRANCH` for recent commits
34
+ - Compare completed work (prompt summaries) against spec goals
35
+ - Identify gaps, risks, and drift between plan and reality
36
+ - Run `ah solutions search "<steering context keywords>"` for relevant past solutions
37
+ - Run `ah memories search "<steering context keywords>"` for relevant learnings
38
+
39
+ ## Deep Grounding
40
+
41
+ Per **Context is Precious**, focus research on the problem area driving the steering session.
42
+
43
+ - Spawn 1-2 research subtasks: tell them to read `.allhands/flows/shared/CODEBASE_UNDERSTANDING.md` to understand the specific area under discussion
44
+ - Use implementation diffs, completed prompt summaries, and pending prompt tasks as heuristics for current state
45
+ - Consolidate findings before proceeding to interview
46
+
47
+ ## Steering Interview
48
+
49
+ Per **Ideation First**, the engineer drives scope; the domain config drives what to surface.
50
+
51
+ - Ask domain-specific questions driven by the workflow domain config's Domain Knowledge and Ideation Guidance sections, framed at implementation level against current execution state
52
+ - The steering domain (`WORKFLOW_DOMAIN_PATH`) can differ from the spec's `initial_workflow_domain` — e.g., a milestone spec encounters a bug, engineer steers with investigation domain config
53
+ - Present researched options with recommended approaches using `AskUserQuestion`
54
+ - Ask ONE question at a time — adapt subsequent questions based on previous answers
55
+ - Cover at minimum:
56
+ - What is driving the need for steering? (scope change, blocking issue, new information, quality concern)
57
+ - Which areas of the current plan are affected?
58
+ - What is the desired outcome?
59
+
60
+ ## Prompt Modification
61
+
62
+ Based on interview outcomes, produce prompt insertions, modifications, and/or deletions.
63
+
64
+ ### Creating New Prompts
65
+
66
+ - Read `.allhands/flows/shared/PROMPT_TASKS_CURATION.md` for prompt creation guidance
67
+ - Read `.allhands/flows/shared/UTILIZE_VALIDATION_TOOLING.md` to assign validation suites to new prompts
68
+ - Assign the next available prompt number — append-only, NEVER renumber existing prompts
69
+ - Use `getNextPromptNumber()` or derive from highest existing prompt number + 1
70
+
71
+ ### Modifying Existing Prompts
72
+
73
+ - Only modify prompts with status `pending` or `blocked` — per **Prompt Files as Units of Work**, `done` and `in_progress` prompts are immutable unless engineer explicitly requests
74
+ - Update tasks, acceptance criteria, or dependencies as needed
75
+ - Document what changed and why in the prompt body
76
+
77
+ ### Deleting Prompts
78
+
79
+ - Mark prompts for deletion by setting `status: deleted` in frontmatter (preserve audit trail)
80
+ - Update dependency references on any prompts that depended on deleted prompts
81
+
82
+ ### Dependency Patching
83
+
84
+ When inserting between existing prompts, patch the dependency graph:
85
+ - New prompt's `dependencies` = the "run after" prompt numbers
86
+ - Patch each "run before" prompt's `dependencies` to include the new prompt number
87
+ - Verify the resulting execution order is consistent and acyclic
88
+
89
+ ## Alignment Doc Amendment
90
+
91
+ Per **Knowledge Compounding**, append-only amendments preserve the audit trail.
92
+
93
+ - Append a `## Steering Amendment` section to the alignment doc (NEVER rewrite existing sections)
94
+ - Record in the amendment:
95
+ - **Steering domain**: the workflow domain config used (may differ from spec's `initial_workflow_domain`)
96
+ - **Trigger**: what drove the steering session
97
+ - **User inputs**: engineer decisions from the interview
98
+ - **Prompt changes**: insertions (new prompt numbers and titles), modifications (what changed), deletions (which prompts and why)
99
+ - If initiative goals changed:
100
+ - Update the Overview section with new goal context
101
+ - Reset `core_consolidation` to `pending` in alignment doc frontmatter
102
+ - Do NOT update the spec's `initial_workflow_domain` field — the steering domain is tracked in the amendment, preserving the spec's original identity
103
+ - Do NOT write prompt summaries for newly created prompts
104
+
105
+ ## Stage Management — Exit
106
+
107
+ Restore prompt spawning after steering is complete.
108
+
109
+ - Set `stage: 'executing'` in `status.yaml`
110
+ - Stop
@@ -0,0 +1,79 @@
1
+ <goal>
2
+ Orchestrate a jury of specialized reviewers to judge implementation against planning files and spec. Per **Quality Engineering**, the question is "which variant is best?" - reviewers identify issues, engineer chooses which to address.
3
+ </goal>
4
+
5
+ <inputs>
6
+ - Alignment doc path
7
+ - Spec doc path
8
+ - Prompts folder path
9
+ </inputs>
10
+
11
+ <constraints>
12
+ - MUST spawn parallel jury subtasks for comprehensive review
13
+ - MUST present engineer with actionable options, not mandates
14
+ - MUST create `type: review-fix` prompts for accepted fixes
15
+ - NEVER read jury review files (`.allhands/flows/shared/jury/*`) directly - subtasks load their own flows per **Context is Precious**
16
+ </constraints>
17
+
18
+ ## Context Gathering
19
+
20
+ Read these files to understand what's being reviewed:
21
+ - Read the alignment doc
22
+ - Read the spec doc
23
+ - Run `ls <prompts_folder_path>` to see all prompts
24
+
25
+ ## Jury Orchestration
26
+
27
+ Spawn parallel review subtasks, providing each with alignment doc, spec doc, and prompts folder paths:
28
+
29
+ ### Domain Best Practices
30
+ For each domain touched by implementation:
31
+ - Spawn subtask to read `.allhands/flows/shared/jury/BEST_PRACTICES_REVIEW.md`
32
+ - Domains include: expo/react-native, trpc/serverless, database/drizzle/supabase, web/tanstack/nextjs, dev tooling, CI/CD
33
+ - Each covers performance, security, and code quality best practices
34
+
35
+ ### Expectations Fit
36
+ - Spawn subtask to read `.allhands/flows/shared/jury/EXPECTATIONS_FIT_REVIEW.md`
37
+ - Ensures alignment doc + prompts document engineer decisions and fit original spec expectations
38
+
39
+ ### Security
40
+ - Spawn subtask to read `.allhands/flows/shared/jury/SECURITY_REVIEW.md`
41
+ - Ensures implementation doesn't introduce security risks
42
+
43
+ ### YAGNI
44
+ - Spawn subtask to read `.allhands/flows/shared/jury/YAGNI_REVIEW.md`
45
+ - Ensures implementation avoids over-engineering and unnecessary complexity
46
+
47
+ ### Maintainability
48
+ - Spawn subtask to read `.allhands/flows/shared/jury/MAINTAINABILITY_REVIEW.md`
49
+ - Identifies agentic anti-patterns, simplification opportunities, LOC reduction
50
+
51
+ ### Architecture
52
+ - Spawn subtask to read `.allhands/flows/shared/jury/ARCHITECTURE_REVIEW.md`
53
+ - Verifies SOLID principles, component boundaries, pattern compliance
54
+
55
+ ### Claim Verification
56
+ - Spawn subtask to read `.allhands/flows/shared/jury/CLAIM_VERIFICATION_REVIEW.md`
57
+ - Verifies factual claims in prompts/alignment against actual codebase state
58
+
59
+ ## Feedback Synthesis
60
+
61
+ After all jury subtasks complete:
62
+ - Read `.allhands/flows/shared/REVIEW_OPTIONS_BREAKDOWN.md` for structuring feedback into P1/P2/P3 ranked options
63
+ - Deduplicate and elevate repeated concerns across jury members
64
+ - For each item: describe the issue, explain importance, suggest implementation
65
+ - Group by priority and effort
66
+ - Present actionable options to engineer with tradeoffs, not mandates
67
+
68
+ ## Engineer Decision
69
+
70
+ - Present ranked options and let engineer choose which to accept and which to decline
71
+ - Track both accepted AND declined items with engineer's reasoning
72
+ - Per **Quality Engineering**, engineer effort goes to quality control of variants
73
+
74
+ ## Prompt Creation
75
+
76
+ For accepted fixes:
77
+ - Read `.allhands/flows/shared/PROMPT_TASKS_CURATION.md` for prompt creation guidance
78
+ - Create `type: review-fix` prompts for each accepted issue
79
+ - Include review context and specific fix requirements in prompt body
@@ -0,0 +1,68 @@
1
+ <goal>
2
+ Execute prompt tasks with full context, validate thoroughly, and document your work. Per **Prompt Files as Units of Work**, the prompt IS the task - complete it as a self-contained unit.
3
+ </goal>
4
+
5
+ <constraints>
6
+ - MUST read prompt file and alignment doc before implementation
7
+ - MUST pass validation before committing
8
+ - MUST append summary to prompt file on completion
9
+ - NEVER commit without passing validation review
10
+ </constraints>
11
+
12
+ ## Context Gathering
13
+
14
+ - Read the prompt file for tasks and acceptance criteria
15
+ - If FAILURE SUMMARY sections exist, adapt to their redirections / learnings
16
+ - Read the alignment doc for milestone context, prior prompt summaries, and key decisions
17
+ - Read any relevant dependency prompt files
18
+ - Only if additional context is needed (likely not needed):
19
+ - Run `ah knowledge docs search <descriptive_query>` for codebase information as needed
20
+ - Run `ah solutions search "<keywords>"` for relevant past solutions
21
+ - Run `ah memories search "<keywords>"` for relevant learnings and engineer preferences
22
+
23
+ ## Implementation
24
+
25
+ - Follow tasks and break them down into Todos if necessary
26
+ - After implementation,
27
+ - Read `validation_suites` frontmatter entries. During implementation, follow the **Stochastic Validation** section for exploratory validation — use model intuition to probe edge cases, test user flows, and verify quality beyond what deterministic checks cover.
28
+ - Use validation tooling to acquire test data meeting acceptance criteria
29
+
30
+ ### Deviation Handling
31
+
32
+ Per **Frontier Models are Capable**, handle deviations automatically without engineer steering:
33
+
34
+ | Deviation Type | Action |
35
+ |----------------|--------|
36
+ | Bugs/errors | Fix immediately, document in summary |
37
+ | Missing critical functionality (validation, error handling, security) | Add immediately, document in summary |
38
+ | Blocking issues (missing deps, broken imports, config errors) | Fix to unblock, document in summary |
39
+ | Architectural changes (new DB tables, major schema changes, new services) | Stop and document in prompt - requires planning |
40
+
41
+ If architectural deviation is needed, document the blocker and set `status: blocked` rather than proceeding.
42
+
43
+ ## Validation
44
+
45
+ - Acceptance criteria validation uses the **Deterministic Integration** section of referenced suites — these are binary pass/fail commands that gate completion. Stochastic exploration during implementation informs quality but does not replace deterministic acceptance criteria.
46
+ - Spawn subtask to read `.allhands/flows/shared/PROMPT_VALIDATION_REVIEW.md` and follow its instructions
47
+ - Include validation results and `validation_suites` file paths in subtask inputs
48
+ - Act on feedback until it passes
49
+ - If at prompt attempt > 2 with real limitations, communicate compromises - reviewer may still reject
50
+
51
+ ## Completion
52
+
53
+ **CRITICAL: Follow this exact order to prevent race conditions with parallel agents.**
54
+
55
+ 1. Run `ah schema prompt` for summary format
56
+ 2. Append success summary to prompt file
57
+ - Include any deviations handled during implementation
58
+ - If blockers required engineer steering, document as learnings to prevent recurrence
59
+ 3. Run `ah schema alignment body` for alignment doc summary format
60
+ 4. Append prompt summary to alignment doc's "## Prompt Summaries" section
61
+ - Per **Knowledge Compounding**, this enables other agents to see completed work without reading each prompt
62
+ - If section doesn't exist, create it
63
+ 5. Commit all changes (implementation only - alignment and prompt files are NOT git tracked)
64
+ 6. Set frontmatter `status: done` - **MUST be after summaries are written**
65
+ 7. Rename prompt file to include `-DONE` suffix
66
+ 8. Stop
67
+
68
+ **Note**: Alignment files and prompt files are NOT git tracked. Only commit implementation changes. Do not mention prompts or prompt numbers in commit messages.
@@ -0,0 +1,43 @@
1
+ <goal>
2
+ Process PR review feedback into actionable prompts. Per **Knowledge Compounding**, engineer decisions on what NOT to address are as important as what they accept.
3
+ </goal>
4
+
5
+ <constraints>
6
+ - MUST use gh CLI to read PR comments
7
+ - MUST document declined review items in alignment doc
8
+ - MUST create `type: review-fix` prompts for accepted items
9
+ </constraints>
10
+
11
+ ## Context Gathering
12
+
13
+ - Run `gh pr view --comments` to read PR review comments
14
+ - Aggregate all feedback from reviewers
15
+
16
+ ## Feedback Synthesis
17
+
18
+ - Read `.allhands/flows/shared/REVIEW_OPTIONS_BREAKDOWN.md` for structuring feedback
19
+ - Present actionable options to engineer
20
+ - Group by severity and effort
21
+
22
+ ## Engineer Decision
23
+
24
+ - Present options and let engineer choose which to address
25
+ - Track both accepted AND declined items
26
+
27
+ ## Decision Documentation
28
+
29
+ Per **Knowledge Compounding**, declined items matter for future context:
30
+ - Run `ah schema alignment` to review alignment doc structure
31
+ - Add declined review items to alignment doc (captures engineer's reasoning)
32
+ - This prevents future agents from re-suggesting rejected approaches
33
+
34
+ ## Prompt Creation
35
+
36
+ For accepted items:
37
+ - Read `.allhands/flows/shared/PROMPT_TASKS_CURATION.md` for guidance
38
+ - Create `type: review-fix` prompts for each accepted item
39
+ - Include PR comment context in prompt body
40
+
41
+ ## Completion
42
+
43
+ Stop once prompts created and alignment doc updated.
@@ -0,0 +1,216 @@
1
+ <goal>
2
+ Transform the spec into executable prompts with domain-appropriate planning depth. Per **Quality Engineering**, deep domains get full planning with variant architecture and jury review. Per **Frontier Models are Capable**, focused domains get lightweight scoping that leaves room for hypothesis-driven discovery. The workflow domain config at `WORKFLOW_DOMAIN_PATH` drives planning behavior.
3
+ </goal>
4
+
5
+ <inputs>
6
+ - Spec doc path
7
+ - Alignment doc path
8
+ - Prompts folder path
9
+ - `WORKFLOW_DOMAIN_PATH` — path to the workflow domain config file
10
+ </inputs>
11
+
12
+ <constraints>
13
+ - MUST read the workflow domain config before planning — `planning_depth` determines the planning path
14
+ - MUST present recommended approach for each decision point
15
+ - MUST NOT re-ask questions already solidified by the spec — the spec represents resolved decisions from ideation
16
+ - MUST NOT ask questions with obvious answers derivable from spec context or research findings
17
+ - MUST leverage research findings to propose alternatives, challenge approaches, and surface unforeseen constraints — never enter the interview uninformed
18
+ - MUST include jury review when domain config sets `jury_required: true`
19
+ - NEVER read jury review files (`.allhands/flows/shared/jury/*`) directly — subtasks load their own flows per **Context is Precious**
20
+ - Focused planning domains MUST document unresolved questions in alignment doc for emergent planner consumption
21
+ - Prompts MUST be fully autonomous — no human intervention during execution
22
+ - Testing is NOT a prompt — validation happens via validation_suites attached to prompts
23
+ </constraints>
24
+
25
+ ## Context Gathering
26
+
27
+ - Read the spec doc
28
+ - Read the workflow domain config at `WORKFLOW_DOMAIN_PATH`
29
+ - **Defensive fallback**: If `WORKFLOW_DOMAIN_PATH` is empty or the file does not exist, default to deep planning behavior (`planning_depth: deep`, `jury_required: true`). Per **Knowledge Compounding**, this handles backward compatibility with specs created before domain config was active.
30
+ - Note `planning_depth`, `jury_required`, and the Planning Considerations section
31
+ - Read the alignment doc for existing prompts that may impact planning (if exists)
32
+ - Read codebase files referenced in spec for initial grounding
33
+ - Ensure your branch is up to date with base branch
34
+ - Search documented solutions with `ah solutions search "<keywords>"` for relevant past learnings
35
+ - Search memories with `ah memories search "<keywords>"` for engineer preferences and prior spec insights
36
+
37
+ ## Idempotency Check
38
+
39
+ Per **Knowledge Compounding**, detect existing planning artifacts and offer modes:
40
+
41
+ - Check if the prompts folder contains existing prompt files and/or an alignment doc exists
42
+ - If no existing artifacts — proceed directly to Planning Depth
43
+ - If existing artifacts detected, ask the engineer using `AskUserQuestion`:
44
+ - **Start fresh** — Clear prompts and alignment doc, replan from spec
45
+ - **Amend** — Read existing alignment doc and prompts, produce amendments without re-litigating existing decisions
46
+ - In amend mode:
47
+ - Use **reference integrity check** for staleness: decisions referencing prompts that no longer exist or have been significantly modified are flagged as stale and re-presented to the engineer
48
+ - Decisions whose referenced prompts still exist and are structurally intact are preserved
49
+ - Focus research and interview on new/changed areas only
50
+
51
+ ## Planning Depth
52
+
53
+ Per **Frontier Models are Capable**, the domain config's `planning_depth` determines the planning path — deduce appropriate behavior:
54
+
55
+ | Planning Depth | Planning Path | Research | Interview | Jury | Output |
56
+ |----------------|--------------|----------|-----------|------|--------|
57
+ | `deep` (or fallback) | Deep Planning | 1-4 deep subtasks | Full decision interview | Gated by `jury_required` | 5-15 prompts + detailed alignment doc |
58
+ | `focused` | Focused Planning | 1-2 focused subtasks | Open questions only (skippable) | No | 0-3 seed prompts + problem-focused alignment doc |
59
+
60
+ The domain config's **Planning Considerations** section drives domain-specific behavior within each path — surface its constraints, limitations, and edge cases during research and interview phases.
61
+
62
+ ## Deep Planning
63
+
64
+ ### Deep Research
65
+
66
+ Spawn parallel subtasks to ground recommendations before the engineer interview:
67
+ - 1-4 Tasks: Tell them to read `.allhands/flows/shared/CODEBASE_UNDERSTANDING.md` to understand relevant implementation approaches
68
+ - 0-3 Tasks: Tell them to read `.allhands/flows/shared/RESEARCH_GUIDANCE.md` to isolate optimal solutions (if necessary)
69
+ - Apply domain config's Planning Considerations to focus research scope and priorities
70
+
71
+ After research completes, synthesize findings to identify: approach alternatives the spec didn't consider, constraints or limitations the spec may not account for, edge cases surfaced by codebase reality, and feasibility concerns with stated approaches. Bring these to the interview — don't wait for the engineer to ask.
72
+
73
+ ### Engineer Interview
74
+
75
+ The interview covers genuinely open decisions — not re-litigation of spec content. The spec represents resolved ideation outcomes; respect them. Per **Quality Engineering**, come to the interview with a researched perspective and present it using `AskUserQuestion`:
76
+
77
+ - **Only ask about open decisions**: Do not re-ask what the spec has decided. Do not ask questions whose answers are obvious from spec context or research findings. Focus on implementation approach decisions that genuinely require engineer input.
78
+ - **Bring your own analysis**: For each decision point, present what research revealed — alternatives the spec didn't consider, constraints discovered in the codebase, tradeoffs between approaches, edge cases that need handling. The engineer should be responding to informed proposals, not generating options from scratch.
79
+ - Ask ONE decision point at a time — do not batch all questions together
80
+ - Each implementation approach becomes a set of options (2-4 per question)
81
+ - Engineer can choose one OR many (disposable variants)
82
+ - When selecting many, create parallel variant prompts behind feature flags if they can't work together at the same time
83
+ - If variant prompts used, engineer MUST choose a **convention** when selecting multiple approaches
84
+ - Each option MUST have a recommended approach (mark with "(Recommended)" suffix)
85
+ - Adapt subsequent questions based on previous answers when logical dependencies exist
86
+ - Use domain config's Planning Considerations to inform approach evaluation criteria
87
+
88
+ Keep interview concise and actionable.
89
+
90
+ ### Disposable Variant Architecture
91
+
92
+ When engineer selects multiple approaches:
93
+ - Create variant prompts that can execute in parallel
94
+ - Each variant hidden behind feature flag
95
+ - Variants are cheap to implement and test
96
+ - Planning agent is the only agent who architects variant prompt structures
97
+ - Pass variant knowledge to prompt creation phase
98
+
99
+ ### External Technology Implementation Usage Research
100
+
101
+ Spawn subtasks to read `.allhands/flows/shared/EXTERNAL_TECH_GUIDANCE.md`:
102
+ - Typically run after understanding the implementation approach and the external technology required
103
+ - Can inform the engineer interview where beneficial
104
+ - Consolidate approach against actual documentation
105
+ - Derive specific implementation steps
106
+
107
+ ### Prompt Creation
108
+
109
+ - Read `.allhands/flows/shared/PROMPT_TASKS_CURATION.md` for prompt creation guidance
110
+ - Transform researched approaches into executable prompts
111
+ - Read `.allhands/flows/shared/UTILIZE_VALIDATION_TOOLING.md` to discover and assign existing validation suites to prompts
112
+ - For high-risk domains (auth, payments, data), note TDD approach requirement in prompt
113
+ - Reference `.allhands/flows/shared/TDD_WORKFLOW.md` for TDD execution guidance
114
+
115
+ ### Deep Alignment Doc
116
+
117
+ - Run `ah schema alignment` for format
118
+ - Create alignment doc with Overview + Hard User Requirements sections
119
+ - Document engineer decisions ONLY when they deviate from recommendations:
120
+ - Record: what you recommended, what they chose instead, their stated reasoning
121
+ - Do NOT record when engineer accepts the recommended approach
122
+ - Purpose: future agents need to know where human judgment overrode AI suggestions
123
+ - Do NOT write prompt summaries — those are appended by executor after prompt completion
124
+
125
+ ### Plan Verification
126
+
127
+ Before jury review (if applicable), self-verify plans achieve goals:
128
+
129
+ | Dimension | Check |
130
+ |-----------|-------|
131
+ | Requirement Coverage | Every spec requirement has task(s)? |
132
+ | Task Completeness | Every prompt has clear acceptance criteria? |
133
+ | Key Links Planned | Components wire together (API → UI)? |
134
+ | Scope Sanity | 2-3 tasks per prompt? <7 files per prompt? |
135
+ | Validation Coverage | Prompts reference available validation suites where applicable? |
136
+
137
+ Fix issues before proceeding.
138
+
139
+ ### Plan Review Jury
140
+
141
+ **Gated by `jury_required` from domain config.** If `jury_required: false` — skip this section entirely.
142
+
143
+ Spawn parallel review subtasks (provide alignment doc, spec doc, prompts folder paths):
144
+
145
+ | Jury Member | Flow | Focus |
146
+ |-------------|------|-------|
147
+ | Expectations Fit | `.allhands/flows/shared/jury/PROMPTS_EXPECTATIONS_FIT.md` | Alignment + prompts fit spec expectations |
148
+ | Flow Analysis | `.allhands/flows/shared/jury/PROMPTS_FLOW_ANALYSIS.md` | Prompt dependencies, variant ordering, importance |
149
+ | YAGNI | `.allhands/flows/shared/jury/PROMPTS_YAGNI.md` | Holistic over-engineering check |
150
+ | Premortem | `.allhands/flows/shared/jury/PROMPT_PREMORTEM.md` | Risk analysis — Tigers, Elephants, failure modes |
151
+
152
+ After jury returns:
153
+ - Read `.allhands/flows/shared/REVIEW_OPTIONS_BREAKDOWN.md` for feedback synthesis
154
+ - Premortem Tigers become P1/P2 review items; Elephants become discussion points
155
+ - Present actionable options to engineer (including risk acceptance decisions)
156
+ - Amend prompts based on engineer choices, respecting PROMPT_TASKS_CURATION limits:
157
+ - Do NOT pack substantial refinements into existing prompts
158
+ - Create NEW prompts for additions that exceed scope limits (tasks, files)
159
+ - Update prompt dependencies when inserting new prompts
160
+ - Document only deviations from recommendations (including accepted risks that were flagged)
161
+
162
+ ### Plan Deepening (Optional)
163
+
164
+ Per **Knowledge Compounding**, offer to deepen the plan:
165
+
166
+ Ask engineer: "Would you like to deepen this plan with comprehensive research?"
167
+
168
+ If yes:
169
+ - Read `.allhands/flows/shared/PLAN_DEEPENING.md` and follow instructions
170
+ - Applies available skills to each plan section
171
+ - Searches solutions for relevant past learnings
172
+ - Enhances prompts with research insights
173
+ - Preserves original content, only adds research findings
174
+
175
+ Recommended for complex architectural decisions, high-risk domains, novel technologies, or large specs with many unknowns.
176
+
177
+ ## Focused Planning
178
+
179
+ ### Focused Research
180
+
181
+ Spawn 1-2 targeted research subtasks grounded in the problem area:
182
+ - Tell them to read `.allhands/flows/shared/CODEBASE_UNDERSTANDING.md` focused on the specific problem domain
183
+ - Only spawn external research (`.allhands/flows/shared/RESEARCH_GUIDANCE.md`) if the spec references external tools or novel approaches
184
+ - Apply domain config's Planning Considerations to focus research direction
185
+
186
+ ### Engineer Scope Narrowing
187
+
188
+ Present spec open questions and concerns to the engineer using `AskUserQuestion`:
189
+ - Each open question becomes a question — engineer can answer to narrow scope or skip
190
+ - For each question, present what research revealed and your recommended resolution — the engineer should be responding to an informed proposal, not an open-ended prompt
191
+ - Skipped/unanswered questions remain open for hypothesis-driven discovery
192
+ - Keep interview brief — focused domains intentionally leave room for discovery
193
+
194
+ ### Seed Prompt Creation
195
+
196
+ - Read `.allhands/flows/shared/PROMPT_TASKS_CURATION.md` for prompt creation guidance
197
+ - Create 0-3 seed prompts as testable hypotheses grounded in research findings
198
+ - Read `.allhands/flows/shared/UTILIZE_VALIDATION_TOOLING.md` to discover and assign validation suites
199
+ - Seed prompts target the most concrete, immediately actionable aspects of the spec
200
+ - Remaining open questions are left for the emergent planner to design experiments around
201
+
202
+ ### Focused Alignment Doc
203
+
204
+ - Run `ah schema alignment` for format — use the same schema sections with type-appropriate content:
205
+ - **Overview**: Problem statement, evidence, context, and unresolved questions — the emergent planner reads these to design experiments
206
+ - **Hard User Requirements**: Success criteria and constraints
207
+ - **Engineer Decisions**: Only deviations from recommendations (same as deep planning)
208
+ - Document unresolved questions (skipped interview questions, open spec questions) prominently in Overview — per **Knowledge Compounding**, this enables emergent planner to discover and test answers
209
+ - Document concerns and limitations as context for hypothesis formation
210
+ - Do NOT write prompt summaries — those are appended by executor after prompt completion
211
+
212
+ ## Completion
213
+
214
+ - Finalize prompts and alignment doc
215
+ - Edit `.planning/<branch>/status.yaml` to set `stage: executing` — this signals the event loop to begin picking up prompts for execution
216
+ - Stop
@@ -0,0 +1,27 @@
1
+ <goal>
2
+ Guide agents through flow authoring with harness conventions. Per **Context is Precious**, flows are thin entry points that route to skill references for domain knowledge.
3
+ </goal>
4
+
5
+ <inputs>
6
+ - Flow file path
7
+ - Flow purpose and target audience
8
+ </inputs>
9
+
10
+ <outputs>
11
+ - Flow file following harness conventions (XML tags, progressive disclosure, principle citations)
12
+ </outputs>
13
+
14
+ <constraints>
15
+ - MUST cite First Principles by name when they motivate a flow directive
16
+ - MUST use XML tags per flow writing conventions
17
+ - MUST keep flows brief — progressive disclosure over monolithic docs
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/writing-flows.md` for flow authoring patterns
25
+ - Author the flow using conventions: `<goal>`, `<inputs>`, `<outputs>`, `<constraints>`, action-verb bullets
26
+ - Verify flow follows progressive disclosure — reference sub-flows rather than inlining complexity
27
+ - Ensure line count stays within 20-40 lines per **Context is Precious**
@@ -0,0 +1,27 @@
1
+ <goal>
2
+ Guide agents through knowledge compounding infrastructure — docs, solutions, memories, knowledge indexes. Per **Knowledge Compounding**, everything feeds forward: decisions, pivots, limitations, realizations.
3
+ </goal>
4
+
5
+ <inputs>
6
+ - Knowledge type: docs, solutions, memories, or indexes
7
+ - Content to compound and its domain
8
+ </inputs>
9
+
10
+ <outputs>
11
+ - Knowledge artifact following compounding conventions and schema compliance
12
+ </outputs>
13
+
14
+ <constraints>
15
+ - MUST follow schema for the specific knowledge type
16
+ - MUST ensure knowledge compounds — future tasks benefit from all past work
17
+ - NEVER create isolated knowledge that doesn't feed forward
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/knowledge-compounding.md` for schemas and compounding patterns
25
+ - Create or update the knowledge artifact following type-specific conventions
26
+ - Ensure proper indexing for discoverability via `ah knowledge docs search` or `ah solutions search`
27
+ - Verify schema compliance for the knowledge type
@@ -0,0 +1,27 @@
1
+ <goal>
2
+ Guide agents through orchestration layer changes — TUI lifecycle, event loop, agent profiles, workflows. Per **Frontier Models are Capable**, understand architectural invariants before modifying interconnected systems.
3
+ </goal>
4
+
5
+ <inputs>
6
+ - Orchestration domain: TUI, event loop, agent profiles, or workflows
7
+ - Change purpose and affected components
8
+ </inputs>
9
+
10
+ <outputs>
11
+ - Working orchestration changes preserving architectural invariants
12
+ </outputs>
13
+
14
+ <constraints>
15
+ - MUST understand lifecycle implications before modifying TUI or event loop
16
+ - MUST validate with `ah validate agents` after agent profile changes
17
+ - NEVER break graceful degradation for optional dependencies
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/core-architecture.md` for architecture, schemas, and lifecycle patterns
25
+ - Implement changes preserving architectural invariants (graceful degradation, semantic validation, in-memory state)
26
+ - Validate with `ah validate agents` after profile modifications
27
+ - Test lifecycle behavior end-to-end
@@ -0,0 +1,27 @@
1
+ <goal>
2
+ Guide agents through skill creation and maintenance. Per **Context is Precious**, skills follow the hub-and-spoke model — a compact routing hub with domain-specific reference docs.
3
+ </goal>
4
+
5
+ <inputs>
6
+ - Skill domain and purpose
7
+ - Reference docs needed for the skill's knowledge areas
8
+ </inputs>
9
+
10
+ <outputs>
11
+ - Skill following hub-and-spoke conventions with schema-compliant SKILL.md and reference docs
12
+ </outputs>
13
+
14
+ <constraints>
15
+ - MUST follow hub-and-spoke pattern — SKILL.md routes, references teach
16
+ - MUST comply with skill schema (frontmatter, globs, version)
17
+ - NEVER duplicate knowledge across reference docs
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/harness-skills.md` for skill schema, discovery mechanism, and conventions
25
+ - Create or update the skill following hub-and-spoke pattern
26
+ - Ensure glob coverage matches the skill's domain files
27
+ - Verify schema compliance and reference doc cross-linking
@@ -0,0 +1,27 @@
1
+ <goal>
2
+ Guide agents through adding or modifying harness tools (CLI commands, hooks, MCP servers). Per **Knowledge Compounding**, tools follow the auto-discovery pattern — agents find them via `--help`, docs teach motivations.
3
+ </goal>
4
+
5
+ <inputs>
6
+ - Tool type: command, hook, or MCP integration
7
+ - Tool purpose and trigger conditions
8
+ </inputs>
9
+
10
+ <outputs>
11
+ - Working tool integrated into the harness with auto-discovery support
12
+ </outputs>
13
+
14
+ <constraints>
15
+ - MUST follow the auto-discovery pattern — commands self-document via `--help`
16
+ - MUST validate with `ah validate agents` after changes affecting agent profiles
17
+ - NEVER add tools without clear first principle 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/tools-commands-mcp-hooks.md` for tool architecture and patterns
25
+ - Implement the tool following auto-discovery conventions
26
+ - Validate with `ah validate agents` if agent profiles are affected
27
+ - Test hook behavior with Claude Code runner if adding hooks