@pilotspace/add 1.13.0 → 1.15.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 (308) hide show
  1. package/CHANGELOG.md +189 -1
  2. package/THIRD_PARTY_NOTICES.md +41 -0
  3. package/bin/cli.js +240 -26
  4. package/docs/02-the-flow.md +1 -1
  5. package/docs/03-step-1-specify.md +4 -0
  6. package/docs/04-step-2-scenarios.md +4 -0
  7. package/docs/06-step-4-tests.md +4 -0
  8. package/docs/17-components.md +23 -5
  9. package/docs/18-personas.md +80 -0
  10. package/docs/add-milestone-task-lifecycle.png +0 -0
  11. package/docs/add-task-growth-wheel.png +0 -0
  12. package/docs/appendix-c-glossary.md +8 -4
  13. package/docs/appendix-d-worked-example.md +79 -0
  14. package/package.json +3 -1
  15. package/personas-teacher/LICENSE +21 -0
  16. package/personas-teacher/README.md +1067 -0
  17. package/personas-teacher/VENDOR.md +13 -0
  18. package/personas-teacher/academic/academic-anthropologist.md +125 -0
  19. package/personas-teacher/academic/academic-geographer.md +127 -0
  20. package/personas-teacher/academic/academic-historian.md +123 -0
  21. package/personas-teacher/academic/academic-narratologist.md +118 -0
  22. package/personas-teacher/academic/academic-psychologist.md +118 -0
  23. package/personas-teacher/design/design-brand-guardian.md +322 -0
  24. package/personas-teacher/design/design-image-prompt-engineer.md +236 -0
  25. package/personas-teacher/design/design-inclusive-visuals-specialist.md +71 -0
  26. package/personas-teacher/design/design-persona-walkthrough.md +272 -0
  27. package/personas-teacher/design/design-ui-designer.md +383 -0
  28. package/personas-teacher/design/design-ux-architect.md +469 -0
  29. package/personas-teacher/design/design-ux-researcher.md +329 -0
  30. package/personas-teacher/design/design-visual-storyteller.md +149 -0
  31. package/personas-teacher/design/design-whimsy-injector.md +438 -0
  32. package/personas-teacher/divisions.json +21 -0
  33. package/personas-teacher/engineering/engineering-ai-data-remediation-engineer.md +211 -0
  34. package/personas-teacher/engineering/engineering-ai-engineer.md +146 -0
  35. package/personas-teacher/engineering/engineering-autonomous-optimization-architect.md +107 -0
  36. package/personas-teacher/engineering/engineering-backend-architect.md +236 -0
  37. package/personas-teacher/engineering/engineering-cms-developer.md +536 -0
  38. package/personas-teacher/engineering/engineering-code-reviewer.md +76 -0
  39. package/personas-teacher/engineering/engineering-codebase-onboarding-engineer.md +173 -0
  40. package/personas-teacher/engineering/engineering-data-engineer.md +306 -0
  41. package/personas-teacher/engineering/engineering-database-optimizer.md +176 -0
  42. package/personas-teacher/engineering/engineering-devops-automator.md +376 -0
  43. package/personas-teacher/engineering/engineering-drupal-shopping-cart.md +360 -0
  44. package/personas-teacher/engineering/engineering-email-intelligence-engineer.md +353 -0
  45. package/personas-teacher/engineering/engineering-embedded-firmware-engineer.md +173 -0
  46. package/personas-teacher/engineering/engineering-feishu-integration-developer.md +598 -0
  47. package/personas-teacher/engineering/engineering-filament-optimization-specialist.md +283 -0
  48. package/personas-teacher/engineering/engineering-frontend-developer.md +225 -0
  49. package/personas-teacher/engineering/engineering-git-workflow-master.md +84 -0
  50. package/personas-teacher/engineering/engineering-incident-response-commander.md +444 -0
  51. package/personas-teacher/engineering/engineering-it-service-manager.md +561 -0
  52. package/personas-teacher/engineering/engineering-minimal-change-engineer.md +207 -0
  53. package/personas-teacher/engineering/engineering-mobile-app-builder.md +493 -0
  54. package/personas-teacher/engineering/engineering-multi-agent-systems-architect.md +600 -0
  55. package/personas-teacher/engineering/engineering-orgscript-engineer.md +113 -0
  56. package/personas-teacher/engineering/engineering-prompt-engineer.md +202 -0
  57. package/personas-teacher/engineering/engineering-rapid-prototyper.md +462 -0
  58. package/personas-teacher/engineering/engineering-senior-developer.md +176 -0
  59. package/personas-teacher/engineering/engineering-software-architect.md +112 -0
  60. package/personas-teacher/engineering/engineering-solidity-smart-contract-engineer.md +522 -0
  61. package/personas-teacher/engineering/engineering-sre.md +90 -0
  62. package/personas-teacher/engineering/engineering-technical-writer.md +393 -0
  63. package/personas-teacher/engineering/engineering-voice-ai-integration-engineer.md +561 -0
  64. package/personas-teacher/engineering/engineering-wechat-mini-program-developer.md +350 -0
  65. package/personas-teacher/engineering/engineering-wordpress-shopping-cart.md +346 -0
  66. package/personas-teacher/examples/README.md +48 -0
  67. package/personas-teacher/examples/nexus-spatial-discovery.md +852 -0
  68. package/personas-teacher/examples/workflow-book-chapter.md +55 -0
  69. package/personas-teacher/examples/workflow-landing-page.md +119 -0
  70. package/personas-teacher/examples/workflow-startup-mvp.md +155 -0
  71. package/personas-teacher/examples/workflow-with-memory.md +238 -0
  72. package/personas-teacher/finance/finance-bookkeeper-controller.md +260 -0
  73. package/personas-teacher/finance/finance-financial-analyst.md +234 -0
  74. package/personas-teacher/finance/finance-fpa-analyst.md +263 -0
  75. package/personas-teacher/finance/finance-investment-researcher.md +272 -0
  76. package/personas-teacher/finance/finance-tax-strategist.md +239 -0
  77. package/personas-teacher/game-development/blender/blender-addon-engineer.md +234 -0
  78. package/personas-teacher/game-development/game-audio-engineer.md +264 -0
  79. package/personas-teacher/game-development/game-designer.md +167 -0
  80. package/personas-teacher/game-development/godot/godot-gameplay-scripter.md +334 -0
  81. package/personas-teacher/game-development/godot/godot-multiplayer-engineer.md +297 -0
  82. package/personas-teacher/game-development/godot/godot-shader-developer.md +266 -0
  83. package/personas-teacher/game-development/level-designer.md +208 -0
  84. package/personas-teacher/game-development/narrative-designer.md +243 -0
  85. package/personas-teacher/game-development/roblox-studio/roblox-avatar-creator.md +297 -0
  86. package/personas-teacher/game-development/roblox-studio/roblox-experience-designer.md +305 -0
  87. package/personas-teacher/game-development/roblox-studio/roblox-systems-scripter.md +325 -0
  88. package/personas-teacher/game-development/technical-artist.md +229 -0
  89. package/personas-teacher/game-development/unity/unity-architect.md +271 -0
  90. package/personas-teacher/game-development/unity/unity-editor-tool-developer.md +310 -0
  91. package/personas-teacher/game-development/unity/unity-multiplayer-engineer.md +321 -0
  92. package/personas-teacher/game-development/unity/unity-shader-graph-artist.md +269 -0
  93. package/personas-teacher/game-development/unreal-engine/unreal-multiplayer-architect.md +313 -0
  94. package/personas-teacher/game-development/unreal-engine/unreal-systems-engineer.md +310 -0
  95. package/personas-teacher/game-development/unreal-engine/unreal-technical-artist.md +256 -0
  96. package/personas-teacher/game-development/unreal-engine/unreal-world-builder.md +273 -0
  97. package/personas-teacher/gis/gis-3d-scene-developer.md +111 -0
  98. package/personas-teacher/gis/gis-analyst.md +91 -0
  99. package/personas-teacher/gis/gis-bim-specialist.md +108 -0
  100. package/personas-teacher/gis/gis-cartography-designer.md +150 -0
  101. package/personas-teacher/gis/gis-drone-reality-mapping.md +120 -0
  102. package/personas-teacher/gis/gis-geoai-ml-engineer.md +105 -0
  103. package/personas-teacher/gis/gis-geoprocessing-specialist.md +97 -0
  104. package/personas-teacher/gis/gis-qa-engineer.md +133 -0
  105. package/personas-teacher/gis/gis-solution-engineer.md +101 -0
  106. package/personas-teacher/gis/gis-spatial-data-engineer.md +97 -0
  107. package/personas-teacher/gis/gis-spatial-data-scientist.md +111 -0
  108. package/personas-teacher/gis/gis-technical-consultant.md +86 -0
  109. package/personas-teacher/gis/gis-web-gis-developer.md +108 -0
  110. package/personas-teacher/marketing/marketing-aeo-foundations.md +264 -0
  111. package/personas-teacher/marketing/marketing-agentic-search-optimizer.md +311 -0
  112. package/personas-teacher/marketing/marketing-ai-citation-strategist.md +170 -0
  113. package/personas-teacher/marketing/marketing-app-store-optimizer.md +321 -0
  114. package/personas-teacher/marketing/marketing-baidu-seo-specialist.md +226 -0
  115. package/personas-teacher/marketing/marketing-bilibili-content-strategist.md +199 -0
  116. package/personas-teacher/marketing/marketing-book-co-author.md +110 -0
  117. package/personas-teacher/marketing/marketing-carousel-growth-engine.md +199 -0
  118. package/personas-teacher/marketing/marketing-china-ecommerce-operator.md +283 -0
  119. package/personas-teacher/marketing/marketing-china-market-localization-strategist.md +283 -0
  120. package/personas-teacher/marketing/marketing-content-creator.md +54 -0
  121. package/personas-teacher/marketing/marketing-cross-border-ecommerce.md +259 -0
  122. package/personas-teacher/marketing/marketing-douyin-strategist.md +149 -0
  123. package/personas-teacher/marketing/marketing-email-strategist.md +249 -0
  124. package/personas-teacher/marketing/marketing-global-podcast-strategist.md +206 -0
  125. package/personas-teacher/marketing/marketing-growth-hacker.md +54 -0
  126. package/personas-teacher/marketing/marketing-instagram-curator.md +113 -0
  127. package/personas-teacher/marketing/marketing-kuaishou-strategist.md +223 -0
  128. package/personas-teacher/marketing/marketing-linkedin-content-creator.md +214 -0
  129. package/personas-teacher/marketing/marketing-livestream-commerce-coach.md +305 -0
  130. package/personas-teacher/marketing/marketing-multi-platform-publisher.md +217 -0
  131. package/personas-teacher/marketing/marketing-podcast-strategist.md +277 -0
  132. package/personas-teacher/marketing/marketing-pr-communications-manager.md +473 -0
  133. package/personas-teacher/marketing/marketing-private-domain-operator.md +308 -0
  134. package/personas-teacher/marketing/marketing-reddit-community-builder.md +123 -0
  135. package/personas-teacher/marketing/marketing-seo-specialist.md +321 -0
  136. package/personas-teacher/marketing/marketing-short-video-editing-coach.md +412 -0
  137. package/personas-teacher/marketing/marketing-social-media-strategist.md +125 -0
  138. package/personas-teacher/marketing/marketing-tiktok-strategist.md +125 -0
  139. package/personas-teacher/marketing/marketing-twitter-engager.md +126 -0
  140. package/personas-teacher/marketing/marketing-video-optimization-specialist.md +119 -0
  141. package/personas-teacher/marketing/marketing-wechat-official-account.md +145 -0
  142. package/personas-teacher/marketing/marketing-weibo-strategist.md +240 -0
  143. package/personas-teacher/marketing/marketing-x-twitter-intelligence-analyst.md +161 -0
  144. package/personas-teacher/marketing/marketing-xiaohongshu-specialist.md +138 -0
  145. package/personas-teacher/marketing/marketing-zhihu-strategist.md +162 -0
  146. package/personas-teacher/paid-media/paid-media-auditor.md +71 -0
  147. package/personas-teacher/paid-media/paid-media-creative-strategist.md +71 -0
  148. package/personas-teacher/paid-media/paid-media-paid-social-strategist.md +71 -0
  149. package/personas-teacher/paid-media/paid-media-ppc-strategist.md +71 -0
  150. package/personas-teacher/paid-media/paid-media-programmatic-buyer.md +71 -0
  151. package/personas-teacher/paid-media/paid-media-search-query-analyst.md +71 -0
  152. package/personas-teacher/paid-media/paid-media-tracking-specialist.md +71 -0
  153. package/personas-teacher/product/product-behavioral-nudge-engine.md +80 -0
  154. package/personas-teacher/product/product-feedback-synthesizer.md +119 -0
  155. package/personas-teacher/product/product-manager.md +469 -0
  156. package/personas-teacher/product/product-sprint-prioritizer.md +154 -0
  157. package/personas-teacher/product/product-trend-researcher.md +159 -0
  158. package/personas-teacher/project-management/project-management-experiment-tracker.md +198 -0
  159. package/personas-teacher/project-management/project-management-jira-workflow-steward.md +230 -0
  160. package/personas-teacher/project-management/project-management-meeting-notes-specialist.md +95 -0
  161. package/personas-teacher/project-management/project-management-project-shepherd.md +194 -0
  162. package/personas-teacher/project-management/project-management-studio-operations.md +200 -0
  163. package/personas-teacher/project-management/project-management-studio-producer.md +203 -0
  164. package/personas-teacher/project-management/project-manager-senior.md +135 -0
  165. package/personas-teacher/sales/sales-account-strategist.md +227 -0
  166. package/personas-teacher/sales/sales-coach.md +271 -0
  167. package/personas-teacher/sales/sales-deal-strategist.md +180 -0
  168. package/personas-teacher/sales/sales-discovery-coach.md +225 -0
  169. package/personas-teacher/sales/sales-engineer.md +182 -0
  170. package/personas-teacher/sales/sales-offer-lead-gen-strategist.md +257 -0
  171. package/personas-teacher/sales/sales-outbound-strategist.md +201 -0
  172. package/personas-teacher/sales/sales-pipeline-analyst.md +267 -0
  173. package/personas-teacher/sales/sales-proposal-strategist.md +217 -0
  174. package/personas-teacher/security/security-appsec-engineer.md +491 -0
  175. package/personas-teacher/security/security-architect.md +304 -0
  176. package/personas-teacher/security/security-blockchain-security-auditor.md +463 -0
  177. package/personas-teacher/security/security-cloud-security-architect.md +523 -0
  178. package/personas-teacher/security/security-compliance-auditor.md +158 -0
  179. package/personas-teacher/security/security-incident-responder.md +437 -0
  180. package/personas-teacher/security/security-penetration-tester.md +399 -0
  181. package/personas-teacher/security/security-senior-secops.md +750 -0
  182. package/personas-teacher/security/security-threat-detection-engineer.md +534 -0
  183. package/personas-teacher/security/security-threat-intelligence-analyst.md +644 -0
  184. package/personas-teacher/spatial-computing/macos-spatial-metal-engineer.md +337 -0
  185. package/personas-teacher/spatial-computing/terminal-integration-specialist.md +70 -0
  186. package/personas-teacher/spatial-computing/visionos-spatial-engineer.md +54 -0
  187. package/personas-teacher/spatial-computing/xr-cockpit-interaction-specialist.md +32 -0
  188. package/personas-teacher/spatial-computing/xr-immersive-developer.md +32 -0
  189. package/personas-teacher/spatial-computing/xr-interface-architect.md +32 -0
  190. package/personas-teacher/specialized/accounts-payable-agent.md +185 -0
  191. package/personas-teacher/specialized/agentic-identity-trust.md +387 -0
  192. package/personas-teacher/specialized/agents-orchestrator.md +367 -0
  193. package/personas-teacher/specialized/automation-governance-architect.md +216 -0
  194. package/personas-teacher/specialized/business-strategist.md +488 -0
  195. package/personas-teacher/specialized/change-management-consultant.md +497 -0
  196. package/personas-teacher/specialized/chief-financial-officer.md +388 -0
  197. package/personas-teacher/specialized/corporate-training-designer.md +192 -0
  198. package/personas-teacher/specialized/customer-service.md +398 -0
  199. package/personas-teacher/specialized/customer-success-manager.md +460 -0
  200. package/personas-teacher/specialized/data-consolidation-agent.md +60 -0
  201. package/personas-teacher/specialized/data-privacy-officer.md +412 -0
  202. package/personas-teacher/specialized/esg-sustainability-officer.md +396 -0
  203. package/personas-teacher/specialized/government-digital-presales-consultant.md +363 -0
  204. package/personas-teacher/specialized/grant-writer.md +511 -0
  205. package/personas-teacher/specialized/healthcare-customer-service.md +389 -0
  206. package/personas-teacher/specialized/healthcare-marketing-compliance.md +395 -0
  207. package/personas-teacher/specialized/hospitality-guest-services.md +603 -0
  208. package/personas-teacher/specialized/hr-onboarding.md +451 -0
  209. package/personas-teacher/specialized/identity-graph-operator.md +260 -0
  210. package/personas-teacher/specialized/language-translator.md +264 -0
  211. package/personas-teacher/specialized/legal-billing-time-tracking.md +569 -0
  212. package/personas-teacher/specialized/legal-client-intake.md +492 -0
  213. package/personas-teacher/specialized/legal-document-review.md +454 -0
  214. package/personas-teacher/specialized/loan-officer-assistant.md +555 -0
  215. package/personas-teacher/specialized/lsp-index-engineer.md +314 -0
  216. package/personas-teacher/specialized/ma-integration-manager.md +427 -0
  217. package/personas-teacher/specialized/medical-billing-coding-specialist.md +491 -0
  218. package/personas-teacher/specialized/operations-manager.md +399 -0
  219. package/personas-teacher/specialized/organizational-psychologist.md +391 -0
  220. package/personas-teacher/specialized/personal-growth-mentor.md +159 -0
  221. package/personas-teacher/specialized/real-estate-buyer-seller.md +596 -0
  222. package/personas-teacher/specialized/recruitment-specialist.md +509 -0
  223. package/personas-teacher/specialized/report-distribution-agent.md +65 -0
  224. package/personas-teacher/specialized/retail-customer-returns.md +566 -0
  225. package/personas-teacher/specialized/sales-data-extraction-agent.md +67 -0
  226. package/personas-teacher/specialized/sales-outreach.md +425 -0
  227. package/personas-teacher/specialized/specialized-chief-of-staff.md +279 -0
  228. package/personas-teacher/specialized/specialized-civil-engineer.md +356 -0
  229. package/personas-teacher/specialized/specialized-cultural-intelligence-strategist.md +88 -0
  230. package/personas-teacher/specialized/specialized-developer-advocate.md +317 -0
  231. package/personas-teacher/specialized/specialized-document-generator.md +55 -0
  232. package/personas-teacher/specialized/specialized-french-consulting-market.md +192 -0
  233. package/personas-teacher/specialized/specialized-korean-business-navigator.md +216 -0
  234. package/personas-teacher/specialized/specialized-mcp-builder.md +248 -0
  235. package/personas-teacher/specialized/specialized-model-qa.md +488 -0
  236. package/personas-teacher/specialized/specialized-pricing-analyst.md +243 -0
  237. package/personas-teacher/specialized/specialized-salesforce-architect.md +180 -0
  238. package/personas-teacher/specialized/specialized-strategy-duel-agent.md +130 -0
  239. package/personas-teacher/specialized/specialized-workflow-architect.md +597 -0
  240. package/personas-teacher/specialized/study-abroad-advisor.md +282 -0
  241. package/personas-teacher/specialized/supply-chain-strategist.md +582 -0
  242. package/personas-teacher/specialized/zk-steward.md +211 -0
  243. package/personas-teacher/strategy/EXECUTIVE-BRIEF.md +95 -0
  244. package/personas-teacher/strategy/QUICKSTART.md +194 -0
  245. package/personas-teacher/strategy/coordination/agent-activation-prompts.md +401 -0
  246. package/personas-teacher/strategy/coordination/handoff-templates.md +357 -0
  247. package/personas-teacher/strategy/nexus-strategy.md +1110 -0
  248. package/personas-teacher/strategy/playbooks/phase-0-discovery.md +178 -0
  249. package/personas-teacher/strategy/playbooks/phase-1-strategy.md +238 -0
  250. package/personas-teacher/strategy/playbooks/phase-2-foundation.md +278 -0
  251. package/personas-teacher/strategy/playbooks/phase-3-build.md +286 -0
  252. package/personas-teacher/strategy/playbooks/phase-4-hardening.md +332 -0
  253. package/personas-teacher/strategy/playbooks/phase-5-launch.md +277 -0
  254. package/personas-teacher/strategy/playbooks/phase-6-operate.md +318 -0
  255. package/personas-teacher/strategy/runbooks/scenario-enterprise-feature.md +157 -0
  256. package/personas-teacher/strategy/runbooks/scenario-incident-response.md +217 -0
  257. package/personas-teacher/strategy/runbooks/scenario-marketing-campaign.md +187 -0
  258. package/personas-teacher/strategy/runbooks/scenario-startup-mvp.md +154 -0
  259. package/personas-teacher/support/support-analytics-reporter.md +365 -0
  260. package/personas-teacher/support/support-executive-summary-generator.md +212 -0
  261. package/personas-teacher/support/support-finance-tracker.md +442 -0
  262. package/personas-teacher/support/support-infrastructure-maintainer.md +618 -0
  263. package/personas-teacher/support/support-legal-compliance-checker.md +588 -0
  264. package/personas-teacher/support/support-support-responder.md +585 -0
  265. package/personas-teacher/testing/testing-accessibility-auditor.md +316 -0
  266. package/personas-teacher/testing/testing-api-tester.md +306 -0
  267. package/personas-teacher/testing/testing-evidence-collector.md +210 -0
  268. package/personas-teacher/testing/testing-performance-benchmarker.md +268 -0
  269. package/personas-teacher/testing/testing-reality-checker.md +236 -0
  270. package/personas-teacher/testing/testing-test-results-analyzer.md +305 -0
  271. package/personas-teacher/testing/testing-tool-evaluator.md +394 -0
  272. package/personas-teacher/testing/testing-workflow-optimizer.md +450 -0
  273. package/personas-teacher/tools.json +19 -0
  274. package/skill/add/SKILL.md +17 -12
  275. package/skill/add/advisor.md +31 -34
  276. package/skill/add/components.md +21 -23
  277. package/skill/add/confidence.md +1 -1
  278. package/skill/add/deltas.md +12 -13
  279. package/skill/add/design.md +52 -49
  280. package/skill/add/fold.md +18 -16
  281. package/skill/add/intake.md +4 -3
  282. package/skill/add/loop.md +1 -2
  283. package/skill/add/phases/0-ground.md +32 -34
  284. package/skill/add/phases/0-setup.md +22 -21
  285. package/skill/add/phases/1-specify.md +8 -6
  286. package/skill/add/phases/3-contract.md +1 -1
  287. package/skill/add/phases/4-tests.md +9 -10
  288. package/skill/add/phases/5-build.md +17 -13
  289. package/skill/add/phases/6-verify.md +7 -4
  290. package/skill/add/phases/7-observe.md +2 -1
  291. package/skill/add/report-template.md +61 -18
  292. package/skill/add/run.md +4 -3
  293. package/skill/add/scope.md +2 -2
  294. package/skill/add/sensitivity.md +51 -0
  295. package/skill/add/streams.md +24 -23
  296. package/tooling/add.py +1076 -39
  297. package/tooling/add_engine/autonomy.py +36 -1
  298. package/tooling/add_engine/constants.py +56 -3
  299. package/tooling/add_engine/guidelines.py +22 -20
  300. package/tooling/add_engine/predicates.py +56 -3
  301. package/tooling/add_engine/search.py +165 -0
  302. package/tooling/templates/GLOSSARY.md.tmpl +16 -0
  303. package/tooling/templates/MILESTONE.md.tmpl +9 -0
  304. package/tooling/templates/PROMPT.persona.md.tmpl +44 -0
  305. package/tooling/templates/TASK.fast.md.tmpl +2 -1
  306. package/tooling/templates/TASK.md.tmpl +36 -6
  307. package/tooling/templates/gitignore.tmpl +12 -0
  308. package/tooling/templates/personas/_template.md.tmpl +60 -0
@@ -1,46 +1,43 @@
1
1
  # Phase 0 — Ground (the real codebase)
2
2
 
3
- Goal: before you specify anything, gather the REAL current working folder the task will
4
- touch — the actual files, symbols, signatures, docs, todos, config, data, patterns, and conventions — so the
5
- contract, tests, and build are grounded in what exists, not in what you assume.
6
- Fill **§0 GROUND** in TASK.md. Ground is a per-task preamble to the seven steps;
7
- it is **AI-owned** — no human gate here (the one approval stays at the §3 freeze).
3
+ Goal: before you specify, gather the REAL working folder the task touches — files, symbols,
4
+ signatures, docs, config, data, conventions — so the contract/tests/build are grounded in what
5
+ exists, not assumed. Fill **§0 GROUND** in TASK.md: a per-task preamble to the seven steps,
6
+ **AI-owned** no human gate (the one approval stays at the §3 freeze).
8
7
 
9
- If you cannot name the files and symbols the task touches, you do not yet understand
10
- the work — gathering them IS the job, not a detour.
8
+ If you cannot name the files and symbols the task touches, you do not yet understand it —
9
+ gathering them IS the job.
11
10
 
12
11
  ## Gather (in TASK.md §0)
13
12
 
14
- - **Touches** — the real files · symbols · signatures the task will read or change,
15
- named from the actual code (use code-navigation tools — grep / symbol search, never memory).
16
- Each as `path:symbolwhat it is / how it is keyed`.
17
- - **Context (working folder)** — NON-code artifacts the task touches: docs/textbase (README · `*.md` · design notes) · TODOs (`TODO.md` · `FIXME`/`TODO`/`HACK` comments) · config/manifests (configs · `.env.example` · `pyproject`/`package` · CI) · data/fixtures. Task-specific delta only — never index the whole repo.
18
- - **Honors** — the patterns and conventions the work must respect, cited from `PROJECT.md` / `CONVENTIONS.md`. Task-specific delta only — never re-derive the architecture.
13
+ - **Touches** — the real files · symbols · signatures the task reads or changes, named from the
14
+ actual code (code-navigation tools — grep / symbol search, never memory). Each as `path:symbol — what it is / how keyed`; cite the **symbol**, not a bare line number (`l.NNN` rots at build; symbols survive).
15
+ - **Context (working folder)** NON-code artifacts touched: docs/textbase (`*.md`) · TODOs (`TODO`/`FIXME`) · config/manifests (`pyproject`/`package`/CI) · data/fixtures. Task-delta only.
16
+ - **Honors** — patterns/conventions the work must respect, cited from `PROJECT.md`/`CONVENTIONS.md`. Task-delta only — never re-derive the architecture.
19
17
  - **Anchors the contract cites** — the specific symbols §3 CONTRACT will name. The contract may cite only anchors that appear here.
18
+ - **Issues/Risks (→ feed §1)** — concrete problems · traps · untestable risks you find in the real code while grounding; §1 SPECIFY builds on these, not on assumptions. Task-delta only.
19
+ - **Related intent** — the WHY: `PROJECT.md §` · `GLOSSARY` term(s) · the originating request/milestone rationale (intent, not Honors' conventions). Task-delta.
20
+ - **Ground SHA** — the commit you grounded against (`git rev-parse --short HEAD`); any line ref is "as of" it. `check` warns on a §0 that cites line numbers with no SHA.
20
21
 
21
- **How — gather efficiently:** for the BROAD sweep, prefer a small-model subagent / fast
22
- index / skim (offload to a cheap context, return a compact map); then DEEPEN on what THIS
23
- task specifically needs — never lock a shallow first pass.
22
+ **How:** sweep BROAD cheaply (small-model subagent / fast index / skim → compact map), then DEEPEN on what THIS task needs — don't lock a shallow pass.
24
23
 
25
24
  ## Greenfield / first task
26
25
 
27
- The first task of a project runs ground too. When there is little or no code yet
28
- (greenfield), or you are mid-setup, your grounding IS the foundation docs / brownfield
29
- scan you just produced — point at them; do not re-scan. An honest "new module, no
30
- existing code; honors CONVENTIONS.md §X" is a complete grounding.
26
+ The first task runs ground too. With little/no code (greenfield) or mid-setup, your grounding IS
27
+ the foundation docs / brownfield scan you produced point at them, don't re-scan. An honest
28
+ "new module, no code; honors CONVENTIONS.md §X" is complete.
31
29
 
32
30
  ## AI prompt
33
31
 
34
32
  <prompt>
35
33
  Role: an engineer who reads the real code before designing against it.
36
- Read first: PROJECT.md · CONVENTIONS.md · the actual files the task touches.
37
- Objective: fill §0 GROUND with the real files/symbols/signatures + the conventions to
38
- honor + the anchor points the contract will cite — gathered from the codebase, never assumed.
34
+ Read first: PROJECT.md · CONVENTIONS.md · the files the task touches.
35
+ Objective: fill §0 GROUND from the codebase files/symbols/signatures + conventions + the
36
+ anchors §3 cites + issues/risks found; never assumed.
39
37
  Steps:
40
- 0. Sweep broad cheaply first — prefer a small-model subagent / fast index / skim then deepen task-specifically.
41
- 1. Locate the files and symbols the task reads or changes (code tools, not memory).
42
- 2. Record their signatures / how they are keyed; cite the conventions to honor (task delta only).
43
- 3. Name the anchors §3 will cite.
38
+ 0. Sweep broad cheaply (small-model subagent / fast index / skim), then deepen task-specifically.
39
+ 1. Locate the files/symbols the task reads or changes (code tools, not memory).
40
+ 2. Record signatures/keying; cite conventions (task-delta); note risks for §1; name §3's anchors.
44
41
  Never: invent a file, symbol, or signature you have not opened.
45
42
  </prompt>
46
43
 
@@ -48,17 +45,18 @@ Never: invent a file, symbol, or signature you have not opened.
48
45
 
49
46
  <exit_gate>
50
47
  - [ ] **Touches** — the real files/symbols the task touches are named (from the code, not assumed).
51
- - [ ] **Context** (working folder) — the non-code artifacts the task touches (docs · todos · config · data) are named, task-delta only.
52
- - [ ] **Honors** — the patterns/conventions to honor are cited (task-delta only; no architecture re-scan).
53
- - [ ] **Anchors** — the anchors §3 will cite are listed §3 names only anchors that exist here.
48
+ - [ ] **Context** (working folder) — the non-code artifacts touched (docs · config · data) are named, task-delta only.
49
+ - [ ] **Honors** — the patterns/conventions to honor are cited (task-delta; no architecture re-scan).
50
+ - [ ] **Anchors** — the anchors §3 will cite are listed (§3 names only anchors here).
51
+ - [ ] **Issues/Risks** — the problems/risks found are recorded for §1 (or an honest none).
52
+ - [ ] **Related intent** — the PROJECT/GLOSSARY/origin intent is linked (or an honest none).
53
+ - [ ] **Ground SHA** — the commit grounded against is recorded (line refs read "as of" it).
54
54
  </exit_gate>
55
55
 
56
- **Grounding is complete when** all four fields are filled from real assets: a STRONG grounding cites
57
- actual files/symbols/docs/conventions you opened; a WEAK one leaves a `<…>` placeholder or names what you
58
- assume. All four are non-optional — skipping **Context** (the working folder beyond code) is the usual
59
- silent gap. §3 may cite only anchors that appear here.
56
+ **Grounding is complete when** every field is filled from real assets (a `<…>` placeholder = weak;
57
+ all non-optional). Skipping **Context** (beyond code) is the usual silent gap. §3 cites only anchors here.
60
58
 
61
- > **Advisor · Confidence** — a broad sweep is the canonical spawn case (advisor.md); self-score your grounding before you specify against it (confidence.md).
59
+ > **Advisor · Confidence** — a broad sweep is the canonical spawn (advisor.md); self-score before you specify (confidence.md).
62
60
 
63
61
  ## Next
64
62
 
@@ -1,18 +1,18 @@
1
1
  # Phase 0 — Setup (autonomous draft → one human baseline approval)
2
2
 
3
- Goal: point ADD at a repo and **you** draft the whole foundation — domain, first-milestone scope, and the first task's contract — then hand the human one decision: the **baseline approval**. Brownfield is silent; greenfield keeps a short interview. Either way, the human's only gate is `add.py lock`.
3
+ Goal: point ADD at a repo and **you** draft the whole foundation — domain, first-milestone scope, first task's contract — then hand the human one decision: the **baseline approval**. Brownfield silent; greenfield keeps a short interview; either way the only gate is `add.py lock`.
4
4
 
5
5
  ## 1 · Zero-touch entry — you run init yourself
6
6
 
7
- When there is no `.add/state.json`, do **not** tell the human to initialise — run it yourself. Infer the
8
- project name and stage from the repo, and **arm the baseline-approval gate** with `--await-lock`:
7
+ No `.add/state.json`? Don't tell the human to initialise — run it yourself. Infer name + stage
8
+ from the repo and **arm the baseline-approval gate** with `--await-lock`:
9
9
 
10
10
  ```bash
11
11
  python3 .add/tooling/add.py init --name "<inferred from repo/dir>" --stage <prototype|poc|mvp|production> --await-lock
12
12
  ```
13
13
 
14
- - `--await-lock` seeds an *unlocked* setup — the engine refuses crossing into build or calling `gate` until you `lock`. A plain `init` is grandfathered-locked; its closing `lock` would error `already_locked`.
15
- - name + stage are **your judgment** (read from the dir name, README, manifests): throwaway → `prototype`, risky slice → `poc`, narrow-but-real → `mvp`, full rigor → `production`.
14
+ - `--await-lock` seeds an *unlocked* setup — the engine refuses build or `gate` until you `lock`. A plain `init` is grandfathered-locked (`already_locked` on a later `lock`).
15
+ - name + stage are **your judgment**: throwaway → `prototype`, risky slice → `poc`, narrow → `mvp`, full rigor → `production`.
16
16
 
17
17
  `init` prints one of two things — **that is your branch**:
18
18
  - `brownfield:` → existing code (go to **2a**);
@@ -20,12 +20,12 @@ python3 .add/tooling/add.py init --name "<inferred from repo/dir>" --stage <prot
20
20
 
21
21
  ## 2a · Brownfield — map it silently
22
22
 
23
- The code answers the questions a greenfield interview would ask — **read it instead of asking**. Open `adopt.md` and follow it: fill each living-doc file from the code, never clobber an existing one, tag every decision `evidence-grounded` or `guessed`. Ask the human **nothing** at this step.
23
+ The code answers what a greenfield interview would ask — **read it instead of asking**. Open `adopt.md`: fill each living-doc from code, never clobber, tag every decision `evidence-grounded` or `guessed`. Ask the human **nothing** here.
24
24
 
25
25
  ## 2b · Greenfield — the 4-lens interview (kept): co-specify at foundation level
26
26
 
27
- An empty repo has no code to read, so run the short interview. This is the **co-specify at foundation
28
- level** move — diverge → converge → validate, as a task's §1 uses (`phases/1-specify.md`), lifted to the foundation. Ask the one load-bearing question per lens, draft, then rank lowest-confidence-first and show the top flag:
27
+ An empty repo has no code, so run the short interview the **co-specify at foundation level** move
28
+ (diverge → converge → validate, as §1 does in `phases/1-specify.md`), lifted to the foundation. Ask one load-bearing question per lens, draft, rank lowest-confidence-first, show the top flag:
29
29
 
30
30
  | Lens | The one question that unblocks the section |
31
31
  |------|--------------------------------------------|
@@ -45,47 +45,48 @@ Ask only the live ones. Rank: `⚠ <assumption> — lowest confidence because <w
45
45
  | **UDD** (users) | primary user → jobs, surface, the one flow that must feel right |
46
46
  | **TDD** (trust) | what "done & trusted" means: risks to prove, evidence that closes them |
47
47
 
48
- Capture each surfaced decision as an **ADR** into `PROJECT.md` **Key Decisions** as it lands.
48
+ Capture each surfaced decision as an **ADR** in `PROJECT.md` **Key Decisions** as it lands.
49
49
 
50
- **Under `autonomy: auto` with full context, auto-complete all four drives in one pass** — lowest-confidence-first, surfacing the top flag. This deepens **drafting**, never the gate: auto-complete NEVER skips the human baseline approval — the `lock` stays the one decision.
50
+ **Under `autonomy: auto`, auto-complete all four drives in one pass** — lowest-confidence-first. This deepens **drafting**, never the gate: it NEVER skips the human baseline approval — `lock` stays the one decision.
51
51
 
52
52
  ## 3 · Draft to the lock (both paths)
53
53
 
54
- 1. **Fill the living documentation**: `.add/PROJECT.md` (Domain · Spec/active milestone · UI/UX · Key Decisions), `CONVENTIONS.md`, `GLOSSARY.md`, `MODEL_REGISTRY.md`, `dependencies.allowlist`, and — for a UI project — `DESIGN.md` (delete if no UI; design loop: `design.md`). Brownfield: from code. Greenfield: from interview, gaps flagged `guessed`.
55
- 2. **Propose, then size it.** Float a **kickoff suggestion** for the first milestone: a **goal** (one outcome sentence), a **flow** (task order), and **scenarios** (concrete examples of what ships). Not the frozen `MILESTONE.md`. On their reaction, draft `MILESTONE.md` (read `scope.md`).
54
+ 1. **Fill the living documentation**: `.add/PROJECT.md` (Domain · Spec · UI/UX · Key Decisions), `CONVENTIONS.md`, `GLOSSARY.md`, `MODEL_REGISTRY.md`, `dependencies.allowlist`, and — for a UI project — `DESIGN.md` (delete if no UI; `design.md`). Brownfield: from code. Greenfield: from interview, gaps flagged `guessed`.
55
+ - **Seed personas** (`.add/personas/`): `init` scaffolds `_template.md` (the schema). Author one per role from PROJECT.md + the vendored teacher library `.add/personas-teacher/` (read off-build; engine never fetches), recording the teacher in `source:` and carrying its top `## Playbook` (both optional). Covered by the **baseline approval**; `add.py check` validates; never clobber.
56
+ 2. **Propose, then size it.** Float a **kickoff suggestion** for the first milestone: a **goal** (one sentence), a **flow** (task order), **scenarios** (examples of what ships). Not the frozen `MILESTONE.md`. On their reaction, draft `MILESTONE.md` (read `scope.md`).
56
57
  3. **Create the first task and draft its candidate specification bundle.** `new-task` is allowed pre-lock:
57
58
  ```bash
58
59
  python3 .add/tooling/add.py new-task <slug> --title "<first feature>"
59
60
  ```
60
- Draft the full bundle **§1–§4** incl. the **§4 red suite** (`phases/4-tests.md`); the lock approves it whole. **Leave §3 `Status: DRAFT`** — the lock is its approval. You MAY `advance` pre-lock, but the engine **refuses crossing into build** until you `lock` (`setup_unlocked`). Sequence: **bundle (§1–§4, tests RED) → lock → build** — the red suite must FAIL **before build** (never start Build until §1–§4 exist and tests are red).
61
+ Draft the full bundle **§1–§4** incl. the **§4 red suite** (`phases/4-tests.md`); the lock approves it whole. **Leave §3 `Status: DRAFT`** — the lock is its approval. You MAY `advance` pre-lock, but the engine **refuses build** until you `lock` (`setup_unlocked`). Sequence: **bundle (§1–§4, tests RED) → lock → build** — the red suite must FAIL before build.
61
62
  4. **Write `.add/SETUP-REVIEW.md`** per `setup-review.md`: every drafted decision, **lowest-confidence-first**, tagged `guessed` | `evidence-grounded`.
62
63
 
63
64
  ## Run mode — how the build will be driven (propose parallel + auto; confirm to keep)
64
65
 
65
- Before the lock, surface the **run mode** — **autonomy** (`add.py autonomy`, run.md) and **streams** (`add.py waves` + `streams.md`):
66
+ Before the lock, surface the **run mode** — autonomy + streams (`run.md` · `streams.md`):
66
67
 
67
68
  | Run mode | Human gates | Concurrency |
68
69
  |----------|-------------|-------------|
69
- | **sequential · manual/conservative** | contract freeze **and** every Verify | one task at a time; safest, slowest |
70
- | **parallel · auto** *(proposed default)* | contract freeze **only** — Verify auto-PASSes on complete evidence | `add.py waves` schedules independent tasks; builds overlap behind frozen contracts |
70
+ | **sequential · manual/conservative** | contract freeze **and** every Verify | one task; safest |
71
+ | **parallel · auto** *(default)* | contract freeze **only** — Verify auto-PASSes on evidence | `add.py waves` overlaps independent builds behind frozen contracts |
71
72
 
72
- **Propose `parallel + auto`, ask the human to confirm-to-keep** (or downgrade: `add.py autonomy set conservative --project`). Record the chosen mode in **`PROJECT.md` Key Decisions**.
73
+ **Propose `parallel + auto`; confirm-to-keep** (or downgrade: `add.py autonomy set conservative --project` + `add.py streams set sequential --project`). Record in **`PROJECT.md` Key Decisions**.
73
74
 
74
- The irreducible floor: **one human approval per contract** fires no matter the mode.
75
+ Floor: **one human approval per contract**.
75
76
 
76
77
  ## 4 · The one human gate — the baseline approval
77
78
 
78
- Open the report with the ARC per `report-template.md`, render the DECISION as a guided choice, then present `SETUP-REVIEW.md` lowest-confidence-first. They confirm **once** — an explicit yes to the baseline approval itself; ambient mid-stream agreement is not a confirmation. On that recorded confirmation, you run the lock:
79
+ Open the report with the ARC per `report-template.md`, render SHAPE then APPROVE as a guided choice, then present `SETUP-REVIEW.md` lowest-confidence-first. They confirm **once** — an explicit yes to the baseline approval; ambient mid-stream agreement is not a confirmation. On that recorded confirmation, you run the lock:
79
80
 
80
81
  ```bash
81
82
  python3 .add/tooling/add.py lock --by "<name>"
82
83
  ```
83
84
 
84
- Typing it themselves stays the **escape hatch** — the decision is always the human's; you just execute it. `lock` records the lock layers in one atomic write and opens the build.
85
+ Typing it themselves stays the **escape hatch** — the decision is the human's; you execute. `lock` writes the lock layers atomically and opens the build.
85
86
 
86
87
  ## 5 · After the lock
87
88
 
88
- - The lock **is** the first task's contract approval — do **not** ask for a separate contract-freeze sign-off.
89
+ - The lock **is** the first task's contract approval — no separate contract-freeze sign-off.
89
90
  - Stamp the first task's §3 `Status: FROZEN @ v1`, then read `phases/5-build.md`.
90
91
 
91
92
  ## Exit gate
@@ -3,12 +3,12 @@
3
3
  Goal: state what the feature MUST do and what it must REJECT, with zero ambiguity
4
4
  for the AI to resolve by guessing. Fill **§1 SPECIFY** in TASK.md.
5
5
 
6
- Specify is **co-specification**: brainstorm the shape WITH the user, draft it, then validate. If you cannot write the spec, you do not yet understand the feature — stop and ask.
6
+ Specify is **co-specification**: brainstorm the shape WITH the user, draft, then validate. If you cannot write the spec, you don't yet understand the feature — stop and ask.
7
7
 
8
8
  ## Co-specify in three moves
9
9
 
10
- 1. **Diverge** — surface the decision space: the 2–3 genuine framings of the feature + the open questions you would otherwise guess. Invite the user to add, kill, redirect. (Conversational — no new file. At prototype/poc this shortens to one sentence.)
11
- 2. **Converge** — draft §1, then RANK where your confidence is lowest (below).
10
+ 1. **Diverge** — surface the decision space: the 2–3 genuine framings + the open questions you'd otherwise guess. Invite the user to add, kill, redirect. (Conversational — no new file; at prototype/poc, one sentence.)
11
+ 2. **Converge** — draft §1 answering the §0 GROUND **Issues/Risks**, then RANK where your confidence is lowest (below).
12
12
  3. **Validate** — present the ranked uncertainty first; the user confirms, corrects, or sends back.
13
13
 
14
14
  **Identity is direction, not default (UDD).** Brand color, palette, typeface are human-owned — surface them during Diverge, never assume. For a UI feature with a screen, run the design-definition loop in `design.md`.
@@ -25,13 +25,13 @@ Specify is **co-specification**: brainstorm the shape WITH the user, draft it, t
25
25
 
26
26
  ## The lowest-confidence flag is bundle-wide
27
27
 
28
- The single human approval happens at the contract freeze, over the whole bundle. So your §1 ranking feeds a bundle-level flag the user reads at the decision point (`run.md`): *"of everything I'm asking you to freeze, these 1–2 are most likely wrong."*
28
+ The single approval is at the contract freeze, over the whole bundle so your §1 ranking feeds the bundle-level flag the user reads there (`run.md`): *"of all I'm asking you to freeze, these 1–2 are most likely wrong."*
29
29
 
30
30
  ## AI prompt
31
31
 
32
32
  <prompt>
33
33
  Role: a domain analyst who brainstorms, then asks rather than assumes.
34
- Read first: CONVENTIONS · GLOSSARY · the user's raw input.
34
+ Read first: CONVENTIONS · GLOSSARY · §0 GROUND Issues/Risks · the user's raw input.
35
35
  Objective: fill §1 SPECIFY with zero ambiguity left for the AI to resolve by guessing.
36
36
  Steps:
37
37
  1. Surface 2–3 framings + the open questions; let the user react before you draft.
@@ -50,10 +50,12 @@ Never: resolve an ambiguity by guessing.
50
50
  "none material" that still names the single biggest risk (never a blank "none").
51
51
  </exit_gate>
52
52
 
53
+ > **Persona** — load the fit `.add/personas/<slug>.md`; its `## Critical Rules` shape §1 (advisory; never lowers a gate).
53
54
  > **Advisor · Confidence** — for an unfamiliar domain, spawn a researcher (advisor.md); self-score the spec and let the lowest dimension aim your ⚠ flag (confidence.md).
54
55
 
55
56
  ## Next
56
57
 
57
58
  `python3 .add/tooling/add.py advance` → read `phases/2-scenarios.md`.
58
59
  Book: `docs/03-step-1-specify.md`. (UI feature? also sketch flows + every screen
59
- state: loading/empty/error/success.)
60
+ state: loading/empty/error/success; name it in the parent MILESTONE.md's Scope-hint
61
+ vocabulary, not generic prose.)
@@ -14,7 +14,7 @@ Then mark `Status: FROZEN @ v1`. Generate a mock + contract tests so dependent
14
14
  work can start before the real code exists.
15
15
  </output_format>
16
16
 
17
- **The freeze is the one approval.** Present the bundle **lowest-confidence first**: the 1–2 points most likely wrong (`⚠ [spec|scenario|contract|test] … — because …; if wrong: …`). Open with the ARC per `report-template.md`, rendering the freeze DECISION as a guided choice (recommended pick + described alternatives). See `run.md`. The approval also freezes the §5 **Scope (may touch)** allowlist + Strategy declarations.
17
+ **The freeze is the one approval.** Present the bundle **lowest-confidence first**: the 1–2 points most likely wrong (`⚠ [spec|scenario|contract|test] … — because …; if wrong: …`). Open with the ARC per `report-template.md`, rendering SHAPE then the freeze APPROVE as a guided choice (recommended pick + described alternatives). See `run.md`. The approval also freezes the §5 **Scope (may touch)** allowlist + Strategy declarations.
18
18
 
19
19
  ## The freeze review checklist
20
20
 
@@ -19,16 +19,14 @@ before code exists is testing nothing and will wave bad code through later.
19
19
 
20
20
  ## Declaring where tests live
21
21
 
22
- §4's `Tests live in:` line is machine-read: when a task has no local `tests/`,
23
- `add.py report` counts test functions at the declared path(s) instead. The FIRST
24
- line matching `Tests live in:` is read; paths are its backticked tokens.
25
- Resolution: `./…` this task's dir · a token containing `/` the project root
26
- (the parent of `.add/`) · a bare name a sibling of the previous token's
27
- directory (else the task dir). A directory token counts the `*.py` files directly
28
- inside it (non-recursive); a `.py` file token counts itself; anything else is
29
- ignored. Resolved files are deduped; reports mark declared counts with `†`.
30
- Paths are confined: anything resolving outside the project root counts 0 — `..` traversal, absolute paths, and
31
- symlink escapes are never read.
22
+ §4's `Tests live in:` line is machine-read: with no local `tests/`, `add.py report`
23
+ counts test functions at the declared backticked paths instead (FIRST `Tests live in:`
24
+ line only). Resolution: `./…` this task's dir · a token with `/` → the project root
25
+ (parent of `.add/`) · a bare name a sibling of the previous token's dir (else the
26
+ task dir). A directory token counts the `*.py` files directly inside it (non-recursive); a `.py`
27
+ file counts itself; else ignored. Resolved files dedupe; declared counts marked `†`. Paths
28
+ are confined: anything resolving outside the project root counts 0 `..` traversal, absolute
29
+ paths, and symlink escapes are never read.
32
30
 
33
31
  ## AI prompt
34
32
 
@@ -52,6 +50,7 @@ Never: implement the feature, or assert on internals.
52
50
  - [ ] Coverage target recorded.
53
51
  </exit_gate>
54
52
 
53
+ > **Persona** — let the fit persona's `## Success Metrics` shape the red suite (advisory).
55
54
  > **Advisor · Confidence** — spawn a test-author for a broad red suite (advisor.md); score Completeness — one test per scenario, every rejection covered (confidence.md).
56
55
 
57
56
  ## Next
@@ -1,27 +1,31 @@
1
1
  # Phase 5 — Build (AI writes the code)
2
2
 
3
3
  Goal: implement the feature so EVERY failing test passes — without changing any
4
- test or the contract. This is the only phase the AI leads. It works because §1–§4
5
- removed all ambiguity. Write code into `.add/tasks/<slug>/src/`.
4
+ test or the contract. This is the only phase the AI leads; §1–§4 removed all
5
+ ambiguity. Write code into `.add/tasks/<slug>/src/`.
6
6
 
7
7
  ## Work in small batches
8
8
 
9
- Pick ONE task-sized slice, restate the tests it must satisfy, implement, run
10
- tests, iterate to green. Keep each batch small enough to review in full.
9
+ Pick ONE task-sized slice, restate its tests, implement, iterate to green.
10
+ Keep each batch small enough to review in full.
11
11
 
12
12
  ## Declaring the scope of impact (Scope + Strategy)
13
13
 
14
- §5 of TASK.md opens with two declarations, drafted WITH the specification bundle and frozen by the §3 approval — never invented mid-build:
14
+ §5 opens with two declarations, drafted with the bundle and frozen by the §3 approval — never invented mid-build:
15
15
 
16
- - **Scope (may touch)** — the allowlist of every file the build may write (backticked tokens). Needing a file outside the declared Scope is a **STOP → change request** back to Specify, never improvisation.
17
- - **Strategy (ordered batches)** — the planned build order. Guidance, not enforced.
16
+ - **Scope (may touch)** — the allowlist of files the build may write (backticked tokens). A file outside it is a **STOP → change request** back to Specify, never improvisation.
17
+ - **Strategy (ordered batches)** — the planned build order; guidance, not enforced.
18
18
 
19
- Enforced: a completing verify gate refuses an out-of-scope build (`scope_violation` → self-heal); `add.py check` surfaces it.
19
+ Enforced: a completing verify gate refuses an out-of-scope build (`scope_violation` → self-heal).
20
+
21
+ ## Persona overlay (optional)
22
+
23
+ You may load the active `.add/personas/<slug>.md` as a domain **overlay** atop `SOUL.md` (SOUL = voice/trust; persona = domain **stance**) — name it in §5. SOUL.md is **human-owned**: the overlay never rewrites it (`soul.md`). Advisory — it never lowers a gate; security still **HARD-STOPs**.
20
24
 
21
25
  ## The cardinal rule
22
26
 
23
27
  **Never weaken or delete a test to make it pass, and never edit the frozen
24
- contract.** A genuine need to change either is a change request back to Specify. Honor the feature-specific safety rule named in §5 (e.g. atomic balance update).
28
+ contract.** A genuine need to change either is a change request back to Specify. Honor the §5 safety rule (e.g. atomic balance update).
25
29
 
26
30
  ## AI prompt
27
31
 
@@ -30,9 +34,9 @@ Role: implement the feature so EVERY failing test passes — the build phase.
30
34
  Read first: §1 · §3 · §4 · CONVENTIONS.
31
35
  Objective: every §4 test green, one small batch at a time.
32
36
  Steps:
33
- 1. Make EVERY failing test pass, one small batch at a time, honoring the §5 safety rule.
37
+ 1. Make EVERY failing test pass, honoring the §5 safety rule.
34
38
  2. Report which tests pass and exactly what changed.
35
- Never: change a test or the contract; use a package off the allow-list; or push past something unclear instead of asking.
39
+ Never: change a test or the contract; use a package off the allow-list; or push past unclear instead of asking.
36
40
  </prompt>
37
41
 
38
42
  ## Exit gate
@@ -46,7 +50,7 @@ Never: change a test or the contract; use a package off the allow-list; or push
46
50
  - [ ] Change small enough to review in full.
47
51
  </exit_gate>
48
52
 
49
- > **Advisor · Confidence** — delegate an independent, well-scoped batch (advisor.md); self-score before you present green, and refine while it is cheap (confidence.md).
53
+ > **Advisor · Confidence** — delegate a well-scoped batch (advisor.md); self-score before presenting green, refine while cheap (confidence.md).
50
54
 
51
55
  ## Next
52
56
 
@@ -55,4 +59,4 @@ Book: `docs/07-step-5-build.md`.
55
59
 
56
60
  > Under `autonomy: auto` Build and Verify run together as one evidence-auto-gated run. See `run.md`.
57
61
  >
58
- > **Honest redo.** A confirmed cheat returns the task HERE — revert the tampered file or de-overfit src, then advance again. This is the bounded self-heal loop (`run.md`), capped: after the cap it HARD-STOPs to the human. Never weaken a test or edit the frozen contract to pass.
62
+ > **Honest redo.** A confirmed cheat returns the task HERE — revert the tampered file or de-overfit src, then advance again (the bounded self-heal loop, `run.md`; capped, then HARD-STOPs to the human). Never weaken a test or edit the frozen contract to pass.
@@ -11,7 +11,7 @@ sufficient. Fill **§6** in TASK.md including the GATE RECORD.
11
11
 
12
12
  ## Before you build — declare the build expectations
13
13
 
14
- Fill the §6 **Build expectations** block BEFORE Build: OBSERVABLE outcomes derived from §2 + §3. At this gate, confirm each against real evidence (the `confirmed by` column) — one with no evidence is not yet verified.
14
+ Fill the §6 **Build expectations** block BEFORE Build: OBSERVABLE outcomes derived from §2 + §3. At this gate, confirm each against real evidence (the `confirmed by` column) — one with no evidence isn't yet verified.
15
15
 
16
16
  ## Part one — confirm the evidence
17
17
 
@@ -25,14 +25,16 @@ If any is false, stop and return to Build.
25
25
  ## Part two — check what tests miss
26
26
 
27
27
  - **Concurrency/timing** — correct when two run at once? (Tests run serially and miss races.)
28
- - **Security** — exposed secrets, injection openings, unexpected dependencies. A security finding is always `HARD-STOP`, never a waiver. ANY note here escalates to the human — start it with `NOTE` or `⚠` so `add.py audit` can see it (`unescalated_security_note`). **But that check sees only what you wrote down:** it fires on a *marked* note that slipped through as an auto-gate PASS — a finding you never marked is **invisible** to the engine, escalated to no one. Honest disclosure, not false cover: under `auto`, a human **spot-audit** (reading the diff) is the only backstop for a *missed* security finding.
28
+ - **Security** — exposed secrets, injection openings, unexpected dependencies. A security finding is always `HARD-STOP`, never a waiver. ANY note here escalates to the human — start it with `NOTE` or `⚠` so `add.py audit` can see it (`unescalated_security_note`). **But that check sees only what you wrote down:** it fires on a *marked* note auto-gated to PASS — a finding you never marked is **invisible**, escalated to no one. Under `auto`, a human **spot-audit** (reading the diff) is the only backstop for a *missed* security finding.
29
29
  - **Architecture** — respects layering/dependency rules in CONVENTIONS.md?
30
30
 
31
+ Run the three lenses in order — a Security `HARD-STOP` ends the checklist (leave the rest blank). Record in §6 `### Advisor 3-lens verdict` (Verdict · Residue · Binding): `sensitivity: mechanical` → Binding `yes` (engine reads it for `advisor-gate-relax`), every other class → Binding `advisory`. `add.py audit` flags an unfilled block `advisor_verdict_unrecorded`, a companion to `refute_unrecorded`.
32
+
31
33
  ## Part three — the deep check (do not skim)
32
34
 
33
35
  If the task produced code, record that every new symbol is referenced (wiring) and that no new dead/unused code was introduced. If it produced prose or non-code, record a semantic read — what you read in full and what it confirmed. The resolver judges which path; the engine never classifies.
34
36
 
35
- Record it in the §6 **Deep checks** block — an unfilled one is a **shallow verify**, not a PASS.
37
+ Record in the §6 **Deep checks** block — an unfilled one is a **shallow verify**, not a PASS.
36
38
 
37
39
  ## Part four — was the green earned?
38
40
 
@@ -40,7 +42,7 @@ A green suite proves tests pass — not that the build EARNED them. Three judgme
40
42
 
41
43
  ## Record exactly one outcome (no silent pass)
42
44
 
43
- Present this gate via `report-template.md`'s ARC, render DECISION as a guided choice, and reconcile FLAGS with `add.py report --decide`'s open-item count first.
45
+ Present this gate via `report-template.md`'s ARC, render APPROVE as a guided choice, and reconcile FLAGS with `add.py report --decide`'s open-item count.
44
46
 
45
47
  | Outcome | When |
46
48
  |---------|------|
@@ -55,6 +57,7 @@ Present this gate via `report-template.md`'s ARC, render DECISION as a guided ch
55
57
  (under `autonomy: auto`, no residue) the run auto-resolved as accountable owner.
56
58
  </exit_gate>
57
59
 
60
+ > **Persona** — run the refute-read under the fit persona / Code-Reviewer lens (advisory; security still HARD-STOPs).
58
61
  > **Advisor · Confidence** — the earned-green refute-read is the canonical adversarial spawn (advisor.md); score it before recording the gate (confidence.md).
59
62
 
60
63
  ```bash
@@ -38,9 +38,10 @@ Never: auto-roll-back — recommend; a human owns the production decision.
38
38
  - [ ] A reviewed spec delta captured (becomes the next `new-task`).
39
39
  </exit_gate>
40
40
 
41
+ > **Persona** — tag a lesson `· persona:<slug> ·` so `add.py fold` grows the persona.
41
42
  > **Advisor · Confidence** — spawn a reviewer to mine the run for lessons (advisor.md); score Self-evaluation — did this loop teach the foundation? (confidence.md).
42
43
 
43
44
  ## Next
44
45
 
45
- Loop. The artifacts you built are living documents the next cycle refines.
46
+ Loop. The artifacts you built are living docs the next cycle refines.
46
47
  Book: `docs/09-the-loop.md`.
@@ -2,11 +2,26 @@
2
2
 
3
3
  The engine renders artifacts (`report`, `report --decide`, `status`); this file governs the CHAT MESSAGE you wrap around them.
4
4
 
5
- Use it every time you report at or near a decision point.
5
+ Use it every time you report at or near a human gate.
6
6
 
7
- ## The decision arc — rendered first, above the report blocks
7
+ ## The decision banner — rendered first, above everything
8
8
 
9
- Every report at a human gate opens with the **ARC** three labelled lines placing the decision in the work's whole arc. Render it first, then a separator, then the report blocks:
9
+ Every report at a human gate opens with a banner line, so a human scanning a long chat can spot "this needs my input" without reading prose:
10
+
11
+ ```
12
+ ════════════════════════════════════════════════════════════════
13
+ PLAN · <task/milestone title, bold> · <gate name> → APPROVE?
14
+ 📄 <task's TASK.md path> · <milestone's MILESTONE.md path>
15
+ ════════════════════════════════════════════════════════════════
16
+ ```
17
+
18
+ - The title is the real H1 from TASK.md/MILESTONE.md, **bolded** — not the bare slug.
19
+ - The path line names the actual file(s) so the human can open them directly; omit the milestone half for a milestone-free/fast task.
20
+ - Any `§`-numbered section named anywhere in the report (SHAPE, FLAGS, APPROVE, NEXT) is **bolded** — e.g. `**§3 CONTRACT**` — so a scanning eye finds exactly which part of the file is in play.
21
+
22
+ ## The decision arc — rendered next
23
+
24
+ Every report at a human gate carries the **ARC** — three labelled lines placing the decision in the work's whole arc. Render it right after the banner, then a separator, then the report blocks:
10
25
 
11
26
  ```
12
27
  ARC goal: <the milestone / project goal this decision serves>
@@ -27,34 +42,61 @@ Its facts are engine-sourced (goal = `m-goal` · done = exit-criteria + tasks do
27
42
  - **verify** — `goal:` ship the decision arc · `done:` report-arc tests 6/6 green · `plan:` PASS → wire the arc into every gate → goal.
28
43
  - **contract-freeze** — `goal:` … · `done:` bundle drafted, lowest-confidence flag surfaced · `plan:` freeze §3 → build → goal.
29
44
 
45
+ ## PLAN / SHAPE — when there's more than one step, or a shape to freeze
46
+
47
+ Render one of these (never both) right after the ARC, whenever the message needs to show more than a single fact — a multi-task breakdown, a roadmap, mid-milestone orientation, or (at a contract freeze) the shape itself:
48
+
49
+ ```
50
+ PLAN <milestone or theme — one line>
51
+ ✅ done (N) <collapsed — never enumerated by name>
52
+ 🔄 <active-slug> <one line: what it's doing right now>
53
+ ⬜ <next-slug> <one line — "depends-on: <slug>" if it blocks>
54
+ ⬜ <next-slug>
55
+ ⚠ <flagged-slug> <one line — why it's flagged>
56
+ … +N more queued <only if the live list exceeds the cap>
57
+ ```
58
+
59
+ ```
60
+ SHAPE <task title, bold> — v<N> (DRAFT — not yet frozen)
61
+ <endpoint/type/field> <new | changed | unchanged>
62
+ <error case / reject token> <what triggers it>
63
+ ```
64
+
65
+ - **Collapse done to a count.** Never enumerate finished tasks by name — the human already trusts what's shipped; re-listing it is noise.
66
+ - **Cap live items at ~5–7**, in dependency order; footer `+N more queued` rather than listing everything.
67
+ - **One line per item** — slug + what it does or blocks on; never restate the whole TASK.md.
68
+ - **Glyphs are fixed** — ✅ done · 🔄 active/in-progress · ⬜ pending · ⚠ blocked or flagged. Do not invent new glyphs.
69
+ - **Sourced from the engine, summarized by you** — pull from `add.py status`'s `tasks:`/`streams:` output; never paste it verbatim into chat.
70
+ - **SHAPE is freeze-only** — the concrete thing being locked, so the human reviews the actual shape, not just commentary about it.
71
+
30
72
  ## The report blocks, in order
31
73
 
32
74
  Render every block (write "none" rather than dropping one); add MORE when needed.
33
75
 
34
76
  ```
35
77
  SUMMARY one line: intent + target + where we are + what we done
36
- DECISION what you need from the human (or "none — FYI") — exactly one
37
78
  FLAGS lowest-confidence first: why + cost-if-wrong
38
79
  DECIDED highest-confidence first: the autonomous calls you made + why each was safe
39
80
  EVIDENCE small table: tests · gates · parity · check — engine-sourced
81
+ APPROVE what you need from the human (or "none — FYI") — exactly one — sits last, right before the ask
40
82
  NEXT the recommended next actions, ranked (top ▶ highlighted, bolded) + what each unlocks
41
83
  ```
42
84
 
43
- 1. **SUMMARY** — one line: intent + target + position.
44
- 2. **DECISION** — as a **guided decision**: one `▶ (recommended)` + 1–3 described alternatives. Exactly one per report, or "none FYI". Ask after everything below (show-before-ask).
45
- 3. **FLAGS** — lowest-confidence first, each with *why* and *cost if wrong*. Where TASK.md markers exist (`⚠` / `- [~]` / `- [ ]`), quote verbatim and keep document order.
46
- 4. **DECIDED** — high-confidence autonomous calls, highest-confidence first, each with *why* it was safe. "none" when none. NEVER list a security / residue / lowered-autonomy call here.
47
- 5. **EVIDENCE** — engine-sourced facts from `add.py` output, never re-typed.
85
+ 1. **SUMMARY** — one line: intent + target + position. **Never optional** — even when PLAN/SHAPE already carries most of the context, SUMMARY still renders as its own line; it is never merged into or silently replaced by another block.
86
+ 2. **FLAGS** — lowest-confidence first, each with *why* and *cost if wrong*. Where TASK.md markers exist (`⚠` / `- [~]` / `- [ ]`), quote verbatim and keep document order.
87
+ 3. **DECIDED** — high-confidence autonomous calls, highest-confidence first, each with *why* it was safe. "none" when none. NEVER list a security / residue / lowered-autonomy call here.
88
+ 4. **EVIDENCE** — engine-sourced facts from `add.py` output, never re-typed.
89
+ 5. **APPROVE** — as a **guided decision**: one `▶ … (recommended)` + 1–3 described alternatives. Exactly one per report, or "none — FYI". Rendered last among the core blocks — the actual interactive ask fires only after everything above it (show-before-ask).
48
90
  6. **NEXT** — ranked next actions, top one marked `▶` with what it unlocks. Mirror the rollup's `DECIDE NEXT` for the top action; overrule it only with a stated reason. **Informational, not a second gate**.
49
91
 
50
92
  ### Beyond the core blocks
51
93
 
52
- When a report needs more — a `RISK` ledger, a `DIFF`, a `SCOPE` map — add an extra block (SCREAMING-CASE label · one-line intent · engine-sourced where possible) AFTER EVIDENCE and BEFORE NEXT. Add only when it carries what the core blocks don't; never pad; never drop a core block.
94
+ When a report needs more — a `RISK` ledger, a `DIFF`, a `SCOPE` map — add an extra block (SCREAMING-CASE label · one-line intent · engine-sourced where possible) AFTER EVIDENCE and BEFORE APPROVE. Add only when it carries what the core blocks don't; never pad; never drop a core block.
53
95
 
54
- ### The DECISION block as a guided choice
96
+ ### The APPROVE block as a guided choice
55
97
 
56
98
  ```
57
- DECISION <the question>
99
+ APPROVE <the question>
58
100
 
59
101
  ▶ <recommended option> (recommended)
60
102
  <one-line description — what it means · what it unlocks or costs>
@@ -67,19 +109,20 @@ DECISION <the question>
67
109
  - **Every option is described** — pick and each alternative carry a one-line description.
68
110
  - **Human gates only** — render at `[human gate]` points; not at `[you drive]` steps.
69
111
 
70
- **The ask itself** — when block 2 becomes an `AskUserQuestion` picker: recommended option goes first with `(Recommended)` suffix. On tools without `AskUserQuestion`, render as a numbered/`▶` menu. The question is a summary, never the artifact — intent + what "yes" means + the flag count.
112
+ **The ask itself** — when the APPROVE block becomes an `AskUserQuestion` picker: recommended option goes first with `(Recommended)` suffix. On tools without `AskUserQuestion`, render as a numbered/`▶` menu. The question is a summary, never the artifact — intent + what "yes" means + the flag count.
71
113
 
72
114
  ## Hard rules
73
115
 
74
116
  <constraints>
75
117
  - **Summary-first.** Never bury the decision under a task list or a diff.
76
- - **Show before ask.** Render the artifact (digest · diff · report) before any approval question.
77
- - **Guided decision.** At a `[human gate]`, block 2 is a guided choice — one `▶ … (recommended)` + 1–3 described alternatives; never a bare next step.
118
+ - **Show before ask.** Render the artifact (digest · diff · report) before any approval question. PLAN/SHAPE counts as the artifact here too.
119
+ - **Guided decision.** At a `[human gate]`, APPROVE is a guided choice — one `▶ … (recommended)` + 1–3 described alternatives; never a bare next step.
78
120
  - **Reconcile the count.** FLAGS must reconcile with `add.py report --decide`'s open-item count before the ask. Engine wins if prose disagrees — fix the data, not the sentence.
79
121
  - **Never pre-stamp a human decision point.** Freeze / gate / lock fields stay DRAFT or blank until the answer returns: show → ask → stamp → advance.
122
+ - **Never dump raw engine output as the plan.** Summarize `add.py status`/`report` through PLAN/SHAPE (or prose) — the engine's full verbosity is for `add.py` itself, not the chat message wrapped around it.
80
123
  - **One report per decision point.** After an approval, point at the frozen artifact — do not re-render the bundle.
81
124
  - **Honest scope.** "Done" means the request, not the last task: report "task 2/3", never "done" while approved scope remains.
82
- - **The question is a summary, never the artifact.** A compact SUMMARY · DECISION · FLAGS block sits in chat immediately before the ask; the question text itself is two lines at most — intent + what "yes" means + flag count — pointing at the report above.
83
- - **NEXT is not a second gate.** The single decision stays in DECISION; NEXT is ranked recommendations only.
84
- - **DECIDED never holds a gate-class call.** Security / residue / lowered-autonomy calls escalate in DECISION.
125
+ - **The question is a summary, never the artifact.** A compact SUMMARY · FLAGS block sits in chat immediately before the ask; the question text itself is two lines at most — intent + what "yes" means + flag count — pointing at the report above.
126
+ - **NEXT is not a second gate.** The single decision stays in APPROVE; NEXT is ranked recommendations only.
127
+ - **DECIDED never holds a gate-class call.** Security / residue / lowered-autonomy calls escalate in APPROVE.
85
128
  </constraints>
package/skill/add/run.md CHANGED
@@ -69,6 +69,8 @@ recorded pass is an explicit pass, not a skip).
69
69
  contract edited; loops dry; completeness-critic clean; and the deep check below.
70
70
  - **The deep check (every gate, do not skim).** If the task produced code, record that every new symbol is referenced (wiring) and that no new dead/unused code was introduced. If it produced prose or non-code, record a semantic read. An unfilled deep check is a **shallow verify**, not an auto-PASS.
71
71
  - **The recorded refute-read (under `auto`).** The earned-green refute-read (`6-verify.md`) is not just run — its **verdict is recorded** in §6 (`EARNED | NOT-EARNED`); `add.py audit` surfaces an unrecorded one as `refute_unrecorded` — one of three shape lints it lists (with `shallow_deep_check` + `risk_unset`) — and a human spot-audit is the backstop. NOT-EARNED routes to `add.py heal`, never an auto-PASS.
72
+ - **The recorded Advisor 3-lens verdict (under `auto`).** The Advisor 3-lens sweep (security → concurrency → architecture, `6-verify.md`) is recorded in §6 `### Advisor 3-lens verdict`; `add.py audit` surfaces an unfilled block as `advisor_verdict_unrecorded` — a shape lint alongside `refute_unrecorded`.
73
+ - **The `advisor-gate-relax` pathway.** A `risk: high` + `sensitivity: mechanical` task whose §6 Advisor 3-lens verdict records Verdict `PASS` and Residue `none` may auto-complete via `add.py gate PASS` **without** a lowered autonomy level. Security and every non-mechanical sensitivity class are never relaxed by this pathway — the high-risk guard still applies.
72
74
  - **Always escalates to a human (never auto-passed):** any **security** finding (HARD-STOP, always);
73
75
  a **concurrency**/timing risk the tests cannot exercise; an **architecture**/layering violation;
74
76
  any failing test.
@@ -122,9 +124,8 @@ autonomy: manual | conservative | auto
122
124
  - **conservative** — the deliberate *lowering*: the run converges but STOPS at the verify gate.
123
125
  - **manual** — the strict floor: the human owns the verify gate; the engine never auto-resolves.
124
126
 
125
- > **v7 reversal (recorded).** Earlier the default was `conservative`; v7 flips it `auto` is the
126
- > default, `conservative` is the deliberate lowering. The level is still **per-scope** and is
127
- > lowered wherever risk demands.
127
+ > **v7 reversal (recorded).** Earlier the default was `conservative`; v7 flips it to `auto` as
128
+ > the default. The level is still **per-scope** and is lowered wherever risk demands.
128
129
 
129
130
  **The high-risk guard.** On a **high-risk or method-defining scope** `auto` must be lowered to
130
131
  `conservative` or `manual`; leaving it at `auto` is the reject code **`unguarded_high_risk_auto`**.