@pilotspace/add 1.14.0 → 1.16.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 (312) hide show
  1. package/CHANGELOG.md +195 -1
  2. package/README.md +70 -3
  3. package/THIRD_PARTY_NOTICES.md +41 -0
  4. package/agents/add-advisor.md +31 -0
  5. package/agents/add-build.md +29 -0
  6. package/agents/add-design.md +32 -0
  7. package/agents/add-persona.md +31 -0
  8. package/agents/add-verify.md +34 -0
  9. package/bin/cli.js +615 -54
  10. package/docs/02-the-flow.md +1 -1
  11. package/docs/03-step-1-specify.md +4 -0
  12. package/docs/04-step-2-scenarios.md +4 -0
  13. package/docs/06-step-4-tests.md +4 -0
  14. package/docs/08-step-6-verify.md +7 -0
  15. package/docs/18-personas.md +80 -0
  16. package/docs/add-milestone-task-lifecycle.png +0 -0
  17. package/docs/add-task-growth-wheel.png +0 -0
  18. package/docs/appendix-c-glossary.md +5 -1
  19. package/package.json +4 -1
  20. package/personas-teacher/LICENSE +21 -0
  21. package/personas-teacher/README.md +1067 -0
  22. package/personas-teacher/VENDOR.md +13 -0
  23. package/personas-teacher/academic/academic-anthropologist.md +125 -0
  24. package/personas-teacher/academic/academic-geographer.md +127 -0
  25. package/personas-teacher/academic/academic-historian.md +123 -0
  26. package/personas-teacher/academic/academic-narratologist.md +118 -0
  27. package/personas-teacher/academic/academic-psychologist.md +118 -0
  28. package/personas-teacher/design/design-brand-guardian.md +322 -0
  29. package/personas-teacher/design/design-image-prompt-engineer.md +236 -0
  30. package/personas-teacher/design/design-inclusive-visuals-specialist.md +71 -0
  31. package/personas-teacher/design/design-persona-walkthrough.md +272 -0
  32. package/personas-teacher/design/design-ui-designer.md +383 -0
  33. package/personas-teacher/design/design-ux-architect.md +469 -0
  34. package/personas-teacher/design/design-ux-researcher.md +329 -0
  35. package/personas-teacher/design/design-visual-storyteller.md +149 -0
  36. package/personas-teacher/design/design-whimsy-injector.md +438 -0
  37. package/personas-teacher/divisions.json +21 -0
  38. package/personas-teacher/engineering/engineering-ai-data-remediation-engineer.md +211 -0
  39. package/personas-teacher/engineering/engineering-ai-engineer.md +146 -0
  40. package/personas-teacher/engineering/engineering-autonomous-optimization-architect.md +107 -0
  41. package/personas-teacher/engineering/engineering-backend-architect.md +236 -0
  42. package/personas-teacher/engineering/engineering-cms-developer.md +536 -0
  43. package/personas-teacher/engineering/engineering-code-reviewer.md +76 -0
  44. package/personas-teacher/engineering/engineering-codebase-onboarding-engineer.md +173 -0
  45. package/personas-teacher/engineering/engineering-data-engineer.md +306 -0
  46. package/personas-teacher/engineering/engineering-database-optimizer.md +176 -0
  47. package/personas-teacher/engineering/engineering-devops-automator.md +376 -0
  48. package/personas-teacher/engineering/engineering-drupal-shopping-cart.md +360 -0
  49. package/personas-teacher/engineering/engineering-email-intelligence-engineer.md +353 -0
  50. package/personas-teacher/engineering/engineering-embedded-firmware-engineer.md +173 -0
  51. package/personas-teacher/engineering/engineering-feishu-integration-developer.md +598 -0
  52. package/personas-teacher/engineering/engineering-filament-optimization-specialist.md +283 -0
  53. package/personas-teacher/engineering/engineering-frontend-developer.md +225 -0
  54. package/personas-teacher/engineering/engineering-git-workflow-master.md +84 -0
  55. package/personas-teacher/engineering/engineering-incident-response-commander.md +444 -0
  56. package/personas-teacher/engineering/engineering-it-service-manager.md +561 -0
  57. package/personas-teacher/engineering/engineering-minimal-change-engineer.md +207 -0
  58. package/personas-teacher/engineering/engineering-mobile-app-builder.md +493 -0
  59. package/personas-teacher/engineering/engineering-multi-agent-systems-architect.md +600 -0
  60. package/personas-teacher/engineering/engineering-orgscript-engineer.md +113 -0
  61. package/personas-teacher/engineering/engineering-prompt-engineer.md +202 -0
  62. package/personas-teacher/engineering/engineering-rapid-prototyper.md +462 -0
  63. package/personas-teacher/engineering/engineering-senior-developer.md +176 -0
  64. package/personas-teacher/engineering/engineering-software-architect.md +112 -0
  65. package/personas-teacher/engineering/engineering-solidity-smart-contract-engineer.md +522 -0
  66. package/personas-teacher/engineering/engineering-sre.md +90 -0
  67. package/personas-teacher/engineering/engineering-technical-writer.md +393 -0
  68. package/personas-teacher/engineering/engineering-voice-ai-integration-engineer.md +561 -0
  69. package/personas-teacher/engineering/engineering-wechat-mini-program-developer.md +350 -0
  70. package/personas-teacher/engineering/engineering-wordpress-shopping-cart.md +346 -0
  71. package/personas-teacher/examples/README.md +48 -0
  72. package/personas-teacher/examples/nexus-spatial-discovery.md +852 -0
  73. package/personas-teacher/examples/workflow-book-chapter.md +55 -0
  74. package/personas-teacher/examples/workflow-landing-page.md +119 -0
  75. package/personas-teacher/examples/workflow-startup-mvp.md +155 -0
  76. package/personas-teacher/examples/workflow-with-memory.md +238 -0
  77. package/personas-teacher/finance/finance-bookkeeper-controller.md +260 -0
  78. package/personas-teacher/finance/finance-financial-analyst.md +234 -0
  79. package/personas-teacher/finance/finance-fpa-analyst.md +263 -0
  80. package/personas-teacher/finance/finance-investment-researcher.md +272 -0
  81. package/personas-teacher/finance/finance-tax-strategist.md +239 -0
  82. package/personas-teacher/game-development/blender/blender-addon-engineer.md +234 -0
  83. package/personas-teacher/game-development/game-audio-engineer.md +264 -0
  84. package/personas-teacher/game-development/game-designer.md +167 -0
  85. package/personas-teacher/game-development/godot/godot-gameplay-scripter.md +334 -0
  86. package/personas-teacher/game-development/godot/godot-multiplayer-engineer.md +297 -0
  87. package/personas-teacher/game-development/godot/godot-shader-developer.md +266 -0
  88. package/personas-teacher/game-development/level-designer.md +208 -0
  89. package/personas-teacher/game-development/narrative-designer.md +243 -0
  90. package/personas-teacher/game-development/roblox-studio/roblox-avatar-creator.md +297 -0
  91. package/personas-teacher/game-development/roblox-studio/roblox-experience-designer.md +305 -0
  92. package/personas-teacher/game-development/roblox-studio/roblox-systems-scripter.md +325 -0
  93. package/personas-teacher/game-development/technical-artist.md +229 -0
  94. package/personas-teacher/game-development/unity/unity-architect.md +271 -0
  95. package/personas-teacher/game-development/unity/unity-editor-tool-developer.md +310 -0
  96. package/personas-teacher/game-development/unity/unity-multiplayer-engineer.md +321 -0
  97. package/personas-teacher/game-development/unity/unity-shader-graph-artist.md +269 -0
  98. package/personas-teacher/game-development/unreal-engine/unreal-multiplayer-architect.md +313 -0
  99. package/personas-teacher/game-development/unreal-engine/unreal-systems-engineer.md +310 -0
  100. package/personas-teacher/game-development/unreal-engine/unreal-technical-artist.md +256 -0
  101. package/personas-teacher/game-development/unreal-engine/unreal-world-builder.md +273 -0
  102. package/personas-teacher/gis/gis-3d-scene-developer.md +111 -0
  103. package/personas-teacher/gis/gis-analyst.md +91 -0
  104. package/personas-teacher/gis/gis-bim-specialist.md +108 -0
  105. package/personas-teacher/gis/gis-cartography-designer.md +150 -0
  106. package/personas-teacher/gis/gis-drone-reality-mapping.md +120 -0
  107. package/personas-teacher/gis/gis-geoai-ml-engineer.md +105 -0
  108. package/personas-teacher/gis/gis-geoprocessing-specialist.md +97 -0
  109. package/personas-teacher/gis/gis-qa-engineer.md +133 -0
  110. package/personas-teacher/gis/gis-solution-engineer.md +101 -0
  111. package/personas-teacher/gis/gis-spatial-data-engineer.md +97 -0
  112. package/personas-teacher/gis/gis-spatial-data-scientist.md +111 -0
  113. package/personas-teacher/gis/gis-technical-consultant.md +86 -0
  114. package/personas-teacher/gis/gis-web-gis-developer.md +108 -0
  115. package/personas-teacher/marketing/marketing-aeo-foundations.md +264 -0
  116. package/personas-teacher/marketing/marketing-agentic-search-optimizer.md +311 -0
  117. package/personas-teacher/marketing/marketing-ai-citation-strategist.md +170 -0
  118. package/personas-teacher/marketing/marketing-app-store-optimizer.md +321 -0
  119. package/personas-teacher/marketing/marketing-baidu-seo-specialist.md +226 -0
  120. package/personas-teacher/marketing/marketing-bilibili-content-strategist.md +199 -0
  121. package/personas-teacher/marketing/marketing-book-co-author.md +110 -0
  122. package/personas-teacher/marketing/marketing-carousel-growth-engine.md +199 -0
  123. package/personas-teacher/marketing/marketing-china-ecommerce-operator.md +283 -0
  124. package/personas-teacher/marketing/marketing-china-market-localization-strategist.md +283 -0
  125. package/personas-teacher/marketing/marketing-content-creator.md +54 -0
  126. package/personas-teacher/marketing/marketing-cross-border-ecommerce.md +259 -0
  127. package/personas-teacher/marketing/marketing-douyin-strategist.md +149 -0
  128. package/personas-teacher/marketing/marketing-email-strategist.md +249 -0
  129. package/personas-teacher/marketing/marketing-global-podcast-strategist.md +206 -0
  130. package/personas-teacher/marketing/marketing-growth-hacker.md +54 -0
  131. package/personas-teacher/marketing/marketing-instagram-curator.md +113 -0
  132. package/personas-teacher/marketing/marketing-kuaishou-strategist.md +223 -0
  133. package/personas-teacher/marketing/marketing-linkedin-content-creator.md +214 -0
  134. package/personas-teacher/marketing/marketing-livestream-commerce-coach.md +305 -0
  135. package/personas-teacher/marketing/marketing-multi-platform-publisher.md +217 -0
  136. package/personas-teacher/marketing/marketing-podcast-strategist.md +277 -0
  137. package/personas-teacher/marketing/marketing-pr-communications-manager.md +473 -0
  138. package/personas-teacher/marketing/marketing-private-domain-operator.md +308 -0
  139. package/personas-teacher/marketing/marketing-reddit-community-builder.md +123 -0
  140. package/personas-teacher/marketing/marketing-seo-specialist.md +321 -0
  141. package/personas-teacher/marketing/marketing-short-video-editing-coach.md +412 -0
  142. package/personas-teacher/marketing/marketing-social-media-strategist.md +125 -0
  143. package/personas-teacher/marketing/marketing-tiktok-strategist.md +125 -0
  144. package/personas-teacher/marketing/marketing-twitter-engager.md +126 -0
  145. package/personas-teacher/marketing/marketing-video-optimization-specialist.md +119 -0
  146. package/personas-teacher/marketing/marketing-wechat-official-account.md +145 -0
  147. package/personas-teacher/marketing/marketing-weibo-strategist.md +240 -0
  148. package/personas-teacher/marketing/marketing-x-twitter-intelligence-analyst.md +161 -0
  149. package/personas-teacher/marketing/marketing-xiaohongshu-specialist.md +138 -0
  150. package/personas-teacher/marketing/marketing-zhihu-strategist.md +162 -0
  151. package/personas-teacher/paid-media/paid-media-auditor.md +71 -0
  152. package/personas-teacher/paid-media/paid-media-creative-strategist.md +71 -0
  153. package/personas-teacher/paid-media/paid-media-paid-social-strategist.md +71 -0
  154. package/personas-teacher/paid-media/paid-media-ppc-strategist.md +71 -0
  155. package/personas-teacher/paid-media/paid-media-programmatic-buyer.md +71 -0
  156. package/personas-teacher/paid-media/paid-media-search-query-analyst.md +71 -0
  157. package/personas-teacher/paid-media/paid-media-tracking-specialist.md +71 -0
  158. package/personas-teacher/product/product-behavioral-nudge-engine.md +80 -0
  159. package/personas-teacher/product/product-feedback-synthesizer.md +119 -0
  160. package/personas-teacher/product/product-manager.md +469 -0
  161. package/personas-teacher/product/product-sprint-prioritizer.md +154 -0
  162. package/personas-teacher/product/product-trend-researcher.md +159 -0
  163. package/personas-teacher/project-management/project-management-experiment-tracker.md +198 -0
  164. package/personas-teacher/project-management/project-management-jira-workflow-steward.md +230 -0
  165. package/personas-teacher/project-management/project-management-meeting-notes-specialist.md +95 -0
  166. package/personas-teacher/project-management/project-management-project-shepherd.md +194 -0
  167. package/personas-teacher/project-management/project-management-studio-operations.md +200 -0
  168. package/personas-teacher/project-management/project-management-studio-producer.md +203 -0
  169. package/personas-teacher/project-management/project-manager-senior.md +135 -0
  170. package/personas-teacher/sales/sales-account-strategist.md +227 -0
  171. package/personas-teacher/sales/sales-coach.md +271 -0
  172. package/personas-teacher/sales/sales-deal-strategist.md +180 -0
  173. package/personas-teacher/sales/sales-discovery-coach.md +225 -0
  174. package/personas-teacher/sales/sales-engineer.md +182 -0
  175. package/personas-teacher/sales/sales-offer-lead-gen-strategist.md +257 -0
  176. package/personas-teacher/sales/sales-outbound-strategist.md +201 -0
  177. package/personas-teacher/sales/sales-pipeline-analyst.md +267 -0
  178. package/personas-teacher/sales/sales-proposal-strategist.md +217 -0
  179. package/personas-teacher/security/security-appsec-engineer.md +491 -0
  180. package/personas-teacher/security/security-architect.md +304 -0
  181. package/personas-teacher/security/security-blockchain-security-auditor.md +463 -0
  182. package/personas-teacher/security/security-cloud-security-architect.md +523 -0
  183. package/personas-teacher/security/security-compliance-auditor.md +158 -0
  184. package/personas-teacher/security/security-incident-responder.md +437 -0
  185. package/personas-teacher/security/security-penetration-tester.md +399 -0
  186. package/personas-teacher/security/security-senior-secops.md +750 -0
  187. package/personas-teacher/security/security-threat-detection-engineer.md +534 -0
  188. package/personas-teacher/security/security-threat-intelligence-analyst.md +644 -0
  189. package/personas-teacher/spatial-computing/macos-spatial-metal-engineer.md +337 -0
  190. package/personas-teacher/spatial-computing/terminal-integration-specialist.md +70 -0
  191. package/personas-teacher/spatial-computing/visionos-spatial-engineer.md +54 -0
  192. package/personas-teacher/spatial-computing/xr-cockpit-interaction-specialist.md +32 -0
  193. package/personas-teacher/spatial-computing/xr-immersive-developer.md +32 -0
  194. package/personas-teacher/spatial-computing/xr-interface-architect.md +32 -0
  195. package/personas-teacher/specialized/accounts-payable-agent.md +185 -0
  196. package/personas-teacher/specialized/agentic-identity-trust.md +387 -0
  197. package/personas-teacher/specialized/agents-orchestrator.md +367 -0
  198. package/personas-teacher/specialized/automation-governance-architect.md +216 -0
  199. package/personas-teacher/specialized/business-strategist.md +488 -0
  200. package/personas-teacher/specialized/change-management-consultant.md +497 -0
  201. package/personas-teacher/specialized/chief-financial-officer.md +388 -0
  202. package/personas-teacher/specialized/corporate-training-designer.md +192 -0
  203. package/personas-teacher/specialized/customer-service.md +398 -0
  204. package/personas-teacher/specialized/customer-success-manager.md +460 -0
  205. package/personas-teacher/specialized/data-consolidation-agent.md +60 -0
  206. package/personas-teacher/specialized/data-privacy-officer.md +412 -0
  207. package/personas-teacher/specialized/esg-sustainability-officer.md +396 -0
  208. package/personas-teacher/specialized/government-digital-presales-consultant.md +363 -0
  209. package/personas-teacher/specialized/grant-writer.md +511 -0
  210. package/personas-teacher/specialized/healthcare-customer-service.md +389 -0
  211. package/personas-teacher/specialized/healthcare-marketing-compliance.md +395 -0
  212. package/personas-teacher/specialized/hospitality-guest-services.md +603 -0
  213. package/personas-teacher/specialized/hr-onboarding.md +451 -0
  214. package/personas-teacher/specialized/identity-graph-operator.md +260 -0
  215. package/personas-teacher/specialized/language-translator.md +264 -0
  216. package/personas-teacher/specialized/legal-billing-time-tracking.md +569 -0
  217. package/personas-teacher/specialized/legal-client-intake.md +492 -0
  218. package/personas-teacher/specialized/legal-document-review.md +454 -0
  219. package/personas-teacher/specialized/loan-officer-assistant.md +555 -0
  220. package/personas-teacher/specialized/lsp-index-engineer.md +314 -0
  221. package/personas-teacher/specialized/ma-integration-manager.md +427 -0
  222. package/personas-teacher/specialized/medical-billing-coding-specialist.md +491 -0
  223. package/personas-teacher/specialized/operations-manager.md +399 -0
  224. package/personas-teacher/specialized/organizational-psychologist.md +391 -0
  225. package/personas-teacher/specialized/personal-growth-mentor.md +159 -0
  226. package/personas-teacher/specialized/real-estate-buyer-seller.md +596 -0
  227. package/personas-teacher/specialized/recruitment-specialist.md +509 -0
  228. package/personas-teacher/specialized/report-distribution-agent.md +65 -0
  229. package/personas-teacher/specialized/retail-customer-returns.md +566 -0
  230. package/personas-teacher/specialized/sales-data-extraction-agent.md +67 -0
  231. package/personas-teacher/specialized/sales-outreach.md +425 -0
  232. package/personas-teacher/specialized/specialized-chief-of-staff.md +279 -0
  233. package/personas-teacher/specialized/specialized-civil-engineer.md +356 -0
  234. package/personas-teacher/specialized/specialized-cultural-intelligence-strategist.md +88 -0
  235. package/personas-teacher/specialized/specialized-developer-advocate.md +317 -0
  236. package/personas-teacher/specialized/specialized-document-generator.md +55 -0
  237. package/personas-teacher/specialized/specialized-french-consulting-market.md +192 -0
  238. package/personas-teacher/specialized/specialized-korean-business-navigator.md +216 -0
  239. package/personas-teacher/specialized/specialized-mcp-builder.md +248 -0
  240. package/personas-teacher/specialized/specialized-model-qa.md +488 -0
  241. package/personas-teacher/specialized/specialized-pricing-analyst.md +243 -0
  242. package/personas-teacher/specialized/specialized-salesforce-architect.md +180 -0
  243. package/personas-teacher/specialized/specialized-strategy-duel-agent.md +130 -0
  244. package/personas-teacher/specialized/specialized-workflow-architect.md +597 -0
  245. package/personas-teacher/specialized/study-abroad-advisor.md +282 -0
  246. package/personas-teacher/specialized/supply-chain-strategist.md +582 -0
  247. package/personas-teacher/specialized/zk-steward.md +211 -0
  248. package/personas-teacher/strategy/EXECUTIVE-BRIEF.md +95 -0
  249. package/personas-teacher/strategy/QUICKSTART.md +194 -0
  250. package/personas-teacher/strategy/coordination/agent-activation-prompts.md +401 -0
  251. package/personas-teacher/strategy/coordination/handoff-templates.md +357 -0
  252. package/personas-teacher/strategy/nexus-strategy.md +1110 -0
  253. package/personas-teacher/strategy/playbooks/phase-0-discovery.md +178 -0
  254. package/personas-teacher/strategy/playbooks/phase-1-strategy.md +238 -0
  255. package/personas-teacher/strategy/playbooks/phase-2-foundation.md +278 -0
  256. package/personas-teacher/strategy/playbooks/phase-3-build.md +286 -0
  257. package/personas-teacher/strategy/playbooks/phase-4-hardening.md +332 -0
  258. package/personas-teacher/strategy/playbooks/phase-5-launch.md +277 -0
  259. package/personas-teacher/strategy/playbooks/phase-6-operate.md +318 -0
  260. package/personas-teacher/strategy/runbooks/scenario-enterprise-feature.md +157 -0
  261. package/personas-teacher/strategy/runbooks/scenario-incident-response.md +217 -0
  262. package/personas-teacher/strategy/runbooks/scenario-marketing-campaign.md +187 -0
  263. package/personas-teacher/strategy/runbooks/scenario-startup-mvp.md +154 -0
  264. package/personas-teacher/support/support-analytics-reporter.md +365 -0
  265. package/personas-teacher/support/support-executive-summary-generator.md +212 -0
  266. package/personas-teacher/support/support-finance-tracker.md +442 -0
  267. package/personas-teacher/support/support-infrastructure-maintainer.md +618 -0
  268. package/personas-teacher/support/support-legal-compliance-checker.md +588 -0
  269. package/personas-teacher/support/support-support-responder.md +585 -0
  270. package/personas-teacher/testing/testing-accessibility-auditor.md +316 -0
  271. package/personas-teacher/testing/testing-api-tester.md +306 -0
  272. package/personas-teacher/testing/testing-evidence-collector.md +210 -0
  273. package/personas-teacher/testing/testing-performance-benchmarker.md +268 -0
  274. package/personas-teacher/testing/testing-reality-checker.md +236 -0
  275. package/personas-teacher/testing/testing-test-results-analyzer.md +305 -0
  276. package/personas-teacher/testing/testing-tool-evaluator.md +394 -0
  277. package/personas-teacher/testing/testing-workflow-optimizer.md +450 -0
  278. package/personas-teacher/tools.json +19 -0
  279. package/skill/add/SKILL.md +20 -14
  280. package/skill/add/advisor.md +33 -34
  281. package/skill/add/confidence.md +1 -1
  282. package/skill/add/deltas.md +12 -13
  283. package/skill/add/design.md +52 -49
  284. package/skill/add/fold.md +18 -16
  285. package/skill/add/intake.md +4 -3
  286. package/skill/add/loop.md +3 -4
  287. package/skill/add/phases/0-ground.md +32 -34
  288. package/skill/add/phases/0-setup.md +22 -21
  289. package/skill/add/phases/1-specify.md +8 -6
  290. package/skill/add/phases/3-contract.md +1 -1
  291. package/skill/add/phases/4-tests.md +9 -10
  292. package/skill/add/phases/5-build.md +17 -13
  293. package/skill/add/phases/6-verify.md +9 -4
  294. package/skill/add/phases/7-observe.md +2 -1
  295. package/skill/add/report-template.md +62 -18
  296. package/skill/add/run.md +5 -3
  297. package/skill/add/scope.md +2 -2
  298. package/skill/add/sensitivity.md +51 -0
  299. package/skill/add/streams.md +31 -23
  300. package/tooling/add.py +906 -28
  301. package/tooling/add_engine/autonomy.py +36 -1
  302. package/tooling/add_engine/constants.py +56 -3
  303. package/tooling/add_engine/guidelines.py +22 -20
  304. package/tooling/add_engine/predicates.py +56 -3
  305. package/tooling/add_engine/search.py +165 -0
  306. package/tooling/templates/GLOSSARY.md.tmpl +16 -0
  307. package/tooling/templates/MILESTONE.md.tmpl +9 -0
  308. package/tooling/templates/PROMPT.persona.md.tmpl +44 -0
  309. package/tooling/templates/TASK.fast.md.tmpl +1 -0
  310. package/tooling/templates/TASK.md.tmpl +39 -6
  311. package/tooling/templates/gitignore.tmpl +12 -0
  312. package/tooling/templates/personas/_template.md.tmpl +60 -0
@@ -1,30 +1,31 @@
1
1
  # Advisor — spawning one subagent to follow your plan
2
2
 
3
- The **advisor** strategy is for the orchestrating agent: spawn a *single* subagent to execute
4
- one piece of your plan, then merge its verdict back in. It is the single-subagent companion to
5
- `streams.md`streams pipelines *many* independent tasks in parallel worktrees; the advisor
6
- delegates *one* well-scoped piece (a sweep, a review, a batch) while you stay in the loop. The
7
- engine never spawns; this is your judgment to make per step.
3
+ The **advisor** strategy: spawn a *single* subagent to execute one piece of your plan, then merge
4
+ its verdict back. It is the single-subagent companion to `streams.md` (which pipelines *many* tasks
5
+ in parallel worktrees) you delegate *one* well-scoped piece and stay in the loop. The engine never
6
+ spawns; this is your call per step.
8
7
 
9
8
  ## When to spawn — and when not
10
9
 
11
- Spawn a subagent when the piece is **separable and worth the round-trip**:
10
+ Spawn when the piece is **separable and worth the round-trip**: a broad sweep; an independent adversarial review (the `6-verify` refute-read — fresh context, not graded by the author); a well-scoped batch; or context-offload to a small verdict.
12
11
 
13
- - **Broad / expensive sweep**gather a wide map cheaply, return a compact result.
14
- - **Independent adversarial review** — a fresh context argues *against* your result (the
15
- `6-verify` earned-green refute-read), so the check is not graded by the author.
16
- - **A well-scoped delegable batch** — a self-contained slice with a clear contract and return shape.
17
- - **Context offload** — work that would bloat your context but compresses to a small verdict.
12
+ Do **not** spawn for narrow, cheap work pay the round-trip only when the piece is big or independent enough. When in doubt, do it in-context.
18
13
 
19
- Do **not** spawn when the work is narrow and cheap enough to do in-context: a small sweep, a
20
- two-file read, a quick edit. A spawn costs a round-trip — pay it only when the piece is big or
21
- independent enough to earn it. When in doubt, do it in-context.
14
+ **Prefer the named roster.** Check first whether the piece fits one of ADD's five phase specialists — `add-design` (setup–contract) · `add-build` (tests·build) · `add-verify` (verify·observe) · `add-persona` (fit-persona selection) · `add-advisor` (a consultative second opinion) — before an ad-hoc spawn; each already carries the worker contract below.
15
+
16
+ ## The 3-lens sequential checklist at verify
17
+
18
+ At Verify, sweep security → concurrency → architecture in order. **Security HARD-STOP ends the checklist** (leave the rest blank). Each lens returns: **CLEAR** · **HARD-STOP** (security only) · **RESIDUE** (concurrency/architecture).
19
+
20
+ Record it in §6 `### Advisor 3-lens verdict`: **Verdict** (PASS/HARD-STOP) · **Residue** (none or brief) · **Binding** (`yes` for `sensitivity: mechanical` — the engine reads it for `advisor-gate-relax`; `advisory` otherwise).
21
+
22
+ **Persona for the refute-read.** When the piece is the earned-green refute-read, select a **Code-Reviewer** persona; its findings carry severity markers — 🔴 blocker · 🟡 concern · 💭 note. A persona is advisory: it never lowers a gate (a security finding still HARD-STOPs).
22
23
 
23
24
  ## The plan-following prompt template
24
25
 
25
- Give the subagent the *piece of your plan it owns* and a fixed return shape. This reuses
26
- `streams.md`'s worker-contract tags for a single advisory subagent the contract is identical
27
- on any runner; only the spawn adapter (see `streams.md`) changes. The `<strategy>` block mirrors the task's §5 (Strategy + Known-problem fixes) as the subagent's PREFERRED path — it self-improves on that plan and reports the strategy it actually used.
26
+ Give the subagent the *piece it owns* and a fixed return shape. This reuses `streams.md`'s
27
+ worker-contract tags identical on any runner; only the spawn adapter (see `streams.md`) changes.
28
+ The `<strategy>` block mirrors the task's §5 as the subagent's PREFERRED path — it self-improves on that plan and reports the strategy it actually used.
28
29
 
29
30
  ```xml
30
31
  <objective>
@@ -33,9 +34,11 @@ surrounding decisions. Return a verdict; do not record state.
33
34
  </objective>
34
35
 
35
36
  <persona>
36
- You are a {{DOMAIN}} engineer. Correctness over speed; a wrong-but-plausible result is expensive.
37
+ SELECT the best-fit project persona for this piece and load `.add/personas/{{PERSONA_SLUG}}.md`
38
+ Identity→your stance · Critical Rules→constraints · Success Metrics→done-bar (streams.md's worker
39
+ contract). No match → a {{DOMAIN}} engineer, correctness over speed; never blocks.
37
40
  Work step by step, following the plan:
38
- 1. Load the context files; confirm you understand the piece you own.
41
+ 1. Load the context files + the persona; confirm you understand the piece you own.
39
42
  2. Do the work in small steps, honoring the orchestrator's plan and constraints.
40
43
  3. Self-score your result with confidence.md; if any dimension < 0.9, refine before returning.
41
44
  </persona>
@@ -53,29 +56,25 @@ the plan / task files the piece needs (read-only unless the piece says otherwise
53
56
 
54
57
  <return>
55
58
  End with a structured verdict the orchestrator parses and RECORDS:
56
- { piece, result, evidence, confidence: {per-dimension 0–1}, open_questions }.
59
+ { piece, persona, result, evidence, confidence: {per-dimension 0–1}, open_questions }.
60
+ `persona` names the slug you adopted (or `generic`) — the orchestrator records which persona did the work.
57
61
  Do NOT run add.py or write any shared state — you propose, the orchestrator records.
58
62
  </return>
59
63
  ```
60
64
 
61
65
  ## Choosing the model — vendor-neutral tiers
62
66
 
63
- Pick the tier from `streams.md`'s vocabulary: **mid** for an ordinary, well-scoped piece; **top**
64
- for a complex, ambiguous, or cross-cutting one. The tier→model-id mapping and the spawn adapter
65
- live there — one home, not repeated here. A stronger model never buys back a human gate: high-risk
66
- scope still escalates.
67
+ Pick the tier from `streams.md`: **mid** for an ordinary piece; **top** for a complex/ambiguous/
68
+ cross-cutting one. The tier→model-id mapping + spawn adapter live there. A stronger model never buys
69
+ back a gate: high-risk scope still escalates.
67
70
 
68
- ## The hard rule — you delegate, you do not abdicate
71
+ ## The hard rule — delegate, don't abdicate
69
72
 
70
73
  <constraints>
71
- The engine never spawns — spawning is the orchestrating agent's choice (tool-agnostic). And:
72
- - the subagent PROPOSES; the orchestrator RECORDS — a worker never runs add.py or writes shared
73
- state (state.json, MILESTONE.md, a sibling's files): you read its verdict and record the outcome;
74
- - delegation never lowers a gate a SECURITY finding still HARD-STOPs, and high-risk scope still
75
- escalates to the human, whoever (or whatever tier) did the work;
76
- - the spawned subagent returns its confidence.md self-score; a low score is a signal to refine or
77
- re-spawn, never a pass.
74
+ The engine never spawns — it's the orchestrating agent's choice. And:
75
+ - the subagent PROPOSES; the orchestrator RECORDS — a worker never runs add.py or writes shared state;
76
+ - delegation never lowers a gate a SECURITY finding still HARD-STOPs and high-risk scope still escalates, whoever did the work;
77
+ - the subagent returns its confidence.md self-score; a low score means refine or re-spawn, never a pass.
78
78
  </constraints>
79
79
 
80
- > Used per step: each phase guide's Advisor hook points here, so an agent spawns in the idiom of
81
- > the phase it is in (see the per-step hooks).
80
+ > Used per step: each phase guide's Advisor hook points here (the per-step hooks).
@@ -18,7 +18,7 @@ If **any** dimension scores **< 0.9**, refine the artifact before presenting, th
18
18
  ## Where it plugs in
19
19
 
20
20
  - It **feeds the lowest-confidence flag** (run.md · 1-specify.md): the lowest-scoring dimension is what you surface ⚠-first at the contract freeze.
21
- - A persistently low score on a risky scope is a signal to **recommend** lowering the autonomy level (auto → conservative / manual; run.md). Recommend it — the autonomy level stays the human's call.
21
+ - A persistently low score on a risky scope is a signal to **recommend** lowering the autonomy level (auto → conservative / manual; run.md) — the level stays the human's call.
22
22
 
23
23
  ## The hard rule — advisory, never a gate
24
24
 
@@ -1,8 +1,8 @@
1
1
  # Lessons learned — how each loop sharpens the foundation
2
2
 
3
- A **lesson learned** is a single learning a task produces, tagged by which of ADD's five competencies it improves. Write deltas in a task's **OBSERVE** phase; later, `fold.md` gathers confirmed ones and consolidates them into a versioned `PROJECT.md`. This is how `DDD · SDD · UDD · TDD · ADD` stop being write-once and start converging.
3
+ A **lesson learned** is a single learning a task produces, tagged by which of ADD's five competencies it improves. Write deltas in **OBSERVE**; later `fold.md` consolidates confirmed ones into a versioned `PROJECT.md` how `DDD · SDD · UDD · TDD · ADD` stop being write-once and converge.
4
4
 
5
- You **emit** deltas as `open`. Only the **human** moves a delta to `folded` or `rejected`. You never self-approve a consolidation.
5
+ You **emit** deltas as `open`; only the **human** moves one to `folded` or `rejected`. You never self-approve a consolidation.
6
6
 
7
7
  ## The grammar (frozen)
8
8
 
@@ -14,10 +14,11 @@ Each delta begins on its own **tag line**; the learning may wrap:
14
14
 
15
15
  - `<COMPETENCY>` — exactly one of the five (below).
16
16
  - `<status>` — `open` | `folded` | `rejected`. A **newly emitted delta is `open`**.
17
- - `<learning>` — the insight. The `- [COMPETENCY · status]` tag line comes **first**; `(evidence: …)` **closes** the delta.
17
+ - `<learning>` — the insight; the tag line comes **first**, `(evidence: …)` **closes** the delta.
18
18
  - `(evidence: …)` — **required**, non-empty: a failing scenario, a production signal, a review note. No evidence → it is an opinion, not a delta.
19
+ - **persona target (optional)** — a competency lesson MAY add `· persona:<slug> · <critical-rule|success-metric>` in brackets, e.g. `- [UDD · open · persona:ui-designer · success-metric] 4.5:1 contrast (evidence: audit)`. At `add.py fold` it lands in `.add/personas/<slug>.md` under that section (newest-first, never clobbering) instead of `PROJECT.md` (`fold.md`).
19
20
 
20
- A long learning may wrap — `add.py check` joins continuation lines, so this is **one** delta:
21
+ A long learning may wrap — `add.py check` joins continuation lines into **one** delta:
21
22
 
22
23
  ```
23
24
  - [SDD · open] the export endpoint must reject a tenant-scoped token used cross-tenant,
@@ -34,18 +35,16 @@ A long learning may wrap — `add.py check` joins continuation lines, so this is
34
35
  | `TDD` | Test | how we prove correctness — a missing scenario, a flaky or hollow test |
35
36
  | `ADD` | AI/build | how the AI builds — a harness, prompt, or convention that helped or hurt |
36
37
 
37
- If a learning touches two, ask "which competency, once updated, would have PREVENTED this?" — that is its home. Split separate learnings into separate deltas; never tag one twice.
38
+ If a learning touches two, ask "which competency, once updated, would have PREVENTED this?" — that is its home. Split separate learnings; never tag one twice.
38
39
 
39
40
  ## Status lifecycle
40
41
 
41
42
  ```
42
- emit (OBSERVE) human review (foundation-update-loop)
43
- open ───────────▶ folded (learning merged into PROJECT.md; version bumps)
44
- └──────────▶ rejected (considered and deliberately NOT consolidated — trail kept)
43
+ emit (OBSERVE) human review
44
+ open ───────────▶ folded (merged into PROJECT.md; version bumps)
45
+ └──────────▶ rejected (deliberately NOT consolidated — trail kept)
45
46
  ```
46
47
 
47
- A `rejected` delta is left in place (not deleted) so "we saw this and chose not to act" stays auditable.
48
-
49
48
  ## Reject codes
50
49
 
51
50
  <reject_codes>
@@ -58,8 +57,8 @@ A `rejected` delta is left in place (not deleted) so "we saw this and chose not
58
57
 
59
58
  ```
60
59
  - [DDD · open] the account model conflated org and workspace (evidence: scenario_cross_tenant_read failed)
61
- - [TDD · open] no scenario covered a deleted tenant's dangling sessions (evidence: review note, PR thread)
62
- - [ADD · open] the scaffold's allow-list missed the tenancy lib, slowing build (evidence: build log retry)
60
+ - [TDD · open] no scenario covered a deleted tenant's dangling sessions (evidence: review note)
61
+ - [ADD · open] the scaffold's allow-list missed the tenancy lib, slowing build (evidence: build log)
63
62
  ```
64
63
 
65
- At the next foundation update the human consolidated the DDD and TDD deltas (→ `folded`) and rejected the ADD one (→ `rejected`). The foundation got sharper; nothing was silently lost.
64
+ At the next update the human consolidated DDD+TDD (→ `folded`) and rejected ADD. Sharper foundation; nothing lost.
@@ -2,13 +2,11 @@
2
2
 
3
3
  When a **UI feature** reaches specify, design it before you build it. This loop takes the
4
4
  feature from the **domain** to a screen the human has **seen and confirmed** — a real captured
5
- image — *before* any implementation. It is loaded on demand (like `advisor.md` / `confidence.md`);
6
- the engine never runs it for you.
5
+ image — *before* any implementation. Loaded on demand; the engine never runs it for you.
7
6
 
8
- Design before code is the UDD half of the method. The token + component foundation a UI project
9
- draws from already exists — `tokens.json` (the compact-DTCG dialect, `udd-tokens.md`),
10
- `catalog.json` + `prototypes/<name>.json` (`udd-catalog.md`). This loop fills that foundation
11
- for a feature and earns the human's sign-off on the look before build.
7
+ Design before code is the UDD half of the method. It fills the existing token + component
8
+ foundation — `tokens.json` (`udd-tokens.md`), `catalog.json` + `prototypes/<name>.json`
9
+ (`udd-catalog.md`) for a feature and earns the human's sign-off before build.
12
10
 
13
11
  ## The loop — five beats
14
12
 
@@ -16,71 +14,73 @@ for a feature and earns the human's sign-off on the look before build.
16
14
  design-intake → review-domain → research-components → wireframe → render-capture-confirm
17
15
  ```
18
16
 
19
- Run the beats in order. Each feeds the next; the last ends at a human design-confirm.
17
+ Run the beats in order; the last ends at a human design-confirm.
20
18
 
21
19
  ### 0 · design-intake
22
- Before you read the domain, interview the human on **four design axes** so the look is
23
- *directed*, not guessed. Ask each, show the options, record the pick:
20
+ Before reading the domain, interview the human on **four design axes** so the look is *directed*,
21
+ not guessed ask each, show options, record the pick:
24
22
 
25
- - **FIDELITY** — how far this design goes: *lo-fi wireframe* · *hi-fi mockup* · *production*.
26
- Recorded **intent** that **informs** how far the later beats render (it is not an engine gate).
23
+ - **FIDELITY** — how far this goes: *lo-fi wireframe* · *hi-fi mockup* · *production*. Recorded
24
+ **intent** informing the later beats, not an engine gate.
27
25
  - **CONCEPT** — the design *idea / mood / direction* in a line.
28
26
  - **LAYOUT** — the *structure / grid / hierarchy* the screens lean on.
29
- - **VISUAL DESIGN** — *color · type · spacing · imagery*. **Surface** identity values for the
30
- human to choose — never auto-pick a brand value (identity stays **human-owned**, `udd-tokens.md`).
27
+ - **VISUAL DESIGN** — *color · type · spacing · imagery*. **Surface** identity values for the human
28
+ to choose — never auto-pick a brand value (identity stays **human-owned**, `udd-tokens.md`).
31
29
 
32
- Record the answers **before** review-domain, at both levels: project **defaults** in DESIGN.md's
33
- `## Design intake` section; per-screen **overrides** (only the deltas) in the per-feature design
34
- note (the `prototypes/<name>.json` companion). Show-before-ask — confirm the picks, never assume.
30
+ Record the answers **before** review-domain: project **defaults** in DESIGN.md's `## Design intake`;
31
+ per-screen **overrides** (deltas only) in the per-feature design note (`prototypes/<name>.json`
32
+ companion). Show-before-ask — confirm the picks.
35
33
 
36
34
  ### 1 · review-domain
37
35
  Start from the **domain**, not a blank canvas. Read the domain model — entities, flows, the
38
36
  ubiquitous language in `PROJECT.md` / `GLOSSARY.md` — and derive **which screens** the feature
39
- needs and the **regions** each screen holds. Map each domain entity to a *presentational*
40
- component (it shows state; it does not own a domain decision). The screen list + per-screen
41
- regions are this beat's output, grounded in the domain you just read.
37
+ needs + the **regions** each holds. Map each entity to a *presentational* component (shows state;
38
+ owns no domain decision). The screen list + regions are this beat's output.
42
39
 
43
40
  ### 2 · research-components (reuse before you invent)
44
- Check `catalog.json` **first** and **reuse** the components already there — that keeps screens
45
- consistent. Research a reference UI only to fill a **genuine gap**, and propose a **new** catalog
46
- component for that gap with a **cited** reference. Reuse before invention; a new component is the
47
- exception, not the default.
41
+ Check `catalog.json` **first** and **reuse** what's there — it keeps screens consistent. Research
42
+ a reference UI only to fill a **genuine gap**; propose a **new** catalog component for it with a
43
+ **cited** reference. Reuse before invention a new component is the exception.
48
44
 
49
45
  ### 3 · wireframe
50
- Draw a **low-fi**, **structural** layout for each screen — regions and component slots, no
51
- styling, no color. This is the cheapest artifact that shows the *expected layout*, so the human
52
- can correct structure before a pixel is styled. Confirm the wireframe, then move on.
46
+ Draw a **low-fi**, **structural** layout per screen — regions and component slots, no styling, no
47
+ color. The cheapest artifact that shows the *expected layout*, so the human corrects structure
48
+ before a pixel is styled. Confirm, then move on.
53
49
 
54
50
  ### 4 · render-capture-confirm
55
- Render the screen as a **self-contained HTML mock** — the project's component library via CDN,
56
- bound to `tokens.json` (resolved to CSS variables), composed from the **reusable per-component
57
- kit** (one token-bound partial per catalog component), populated with realistic **mock** data.
58
- **Capture** a real image (a headless screenshot) and present that image to the human for
59
- **design-confirm** — show-before-ask, **before build**. On confirm, record the layout back to
60
- `prototypes/<name>.json` + `catalog.json`, save the captured image to
61
- `.add/design/captures/<name>.<ext>`, and **attach or mention it in the feature's `TASK.md`**
62
- so the screen the human approved is traceable from the task that builds it. The HTML mock is the
51
+ Render the screen as a **self-contained HTML mock** — the component library via CDN, bound to
52
+ `tokens.json` (CSS variables), composed from the **reusable per-component kit** (one token-bound
53
+ partial per catalog component), with realistic **mock** data.
54
+ **Capture** a real image (a headless screenshot) and present it to the human for **design-confirm**
55
+ — show-before-ask, **before build**. On confirm, record the layout to `prototypes/<name>.json` +
56
+ `catalog.json`, save the image to `.add/design/captures/<name>.<ext>`, and **mention it in the
57
+ feature's `TASK.md`** so the approved screen is traceable from the task. The HTML mock is the
63
58
  *visible evidence*; the json-render tree is the *machine-checkable* record.
64
59
 
60
+ **Persona evidence checklist.** Before design-confirm, match the screen to the seeded UI personas
61
+ (`.add/personas/*` covering visual design and UX research) and render their `## Success Metrics`
62
+ as a confirmable **checklist** beside the captured image — **both dimensions**: **UI-Designer**
63
+ (visual + WCAG-AA **accessibility**) and **UX-Researcher** (methodology-first,
64
+ **validated by user evidence, not assumed**). Each item traces to a success-metric
65
+ the human confirms; it is **evidence, never an auto-pass** — a persona **never lowers a gate**
66
+ (ADD principle 2). **No UI personas**? A **generic design-confirm**, never blocked; UI-less skips it.
67
+
65
68
  ## Tool-agnostic capture
66
69
 
67
- How you render and capture is **your** choice: a headless browser (Playwright / Puppeteer), an
68
- `html2image`-style renderer, a browser-automation skill, a design tool, or a hosted screenshot
69
- service. The recommended default is the self-contained HTML mock above, captured headless,
70
- because it needs no app build yet still wears the project's real tokens and component vocabulary.
71
- For a project that renders json-render, the recommended default is **`@json-render/image`**
72
- (Satori → PNG/SVG, no browser). The captured image is **design-confirm evidence** the human
73
- approves; the engine never renders. This keeps the loop tool-agnostic and the method renderer-free.
70
+ How you render and capture is **your** choice (headless browser, `html2image`, a design tool, a
71
+ screenshot service). The default is the self-contained HTML mock above, captured headless no app
72
+ build, yet wearing the project's real tokens and components. For a json-render project, the default
73
+ is **`@json-render/image`** (Satori PNG/SVG, no browser). The captured image is **design-confirm
74
+ evidence** the human approves; the engine never renders the loop stays tool-agnostic, the method
75
+ renderer-free.
74
76
 
75
- Captures live at **`.add/design/captures/<name>.<ext>`** and are attached/mentioned in the
76
- feature's `TASK.md`. `add.py check` raises a never-red `missing_capture` WARN for any prototype
77
- under `.add/design/prototypes/` that still lacks a capture — a nudge to render + confirm it.
77
+ Captures live at **`.add/design/captures/<name>.<ext>`**, mentioned in the feature's `TASK.md`.
78
+ `add.py check` raises a never-red `missing_capture` WARN for any prototype lacking one — a nudge
79
+ to render + confirm.
78
80
 
79
- The loop **binds** the existing UDD contracts **read-only**: `tokens.json`, `catalog.json`, and
80
- `prototypes/<name>.json` are read and composed, never reshaped the `prototypes/<name>.json`
81
- data contract stays **unchanged** (a change to it is a change request, not a design step). And
82
- **identity** values — brand color, palette, typeface — stay **human-owned**: surface them for the
83
- human to decide, never auto-pick a brand value (`udd-tokens.md`).
81
+ The loop **binds** the UDD contracts **read-only** `tokens.json` / `catalog.json` /
82
+ `prototypes/<name>.json` are read, never reshaped (a reshape is a change request). **Identity**
83
+ values stay **human-owned** (`udd-tokens.md`).
84
84
 
85
85
  ## The hard rules
86
86
 
@@ -96,6 +96,9 @@ human to decide, never auto-pick a brand value (`udd-tokens.md`).
96
96
  agent's own tools; the image is evidence, not an engine artifact.
97
97
  - **Bind, don't break.** The loop reads `tokens.json` / `catalog.json` / `prototypes/<name>.json`
98
98
  read-only; the data contract is unchanged, and identity values stay human-owned.
99
+ - **Confirm against the personas.** With UI personas seeded, the checklist carries the UI-Designer
100
+ (visual/accessibility) + UX-Researcher (evidence-not-assumption) success-metrics — evidence,
101
+ never an auto-pass.
99
102
  </constraints>
100
103
 
101
104
  > Used at specify for a UI feature: `phases/0-setup.md` scaffolds `DESIGN.md`, and
package/skill/add/fold.md CHANGED
@@ -1,24 +1,24 @@
1
1
  # Consolidating lessons — how the foundation self-improves
2
2
 
3
- This **closes the loop**. `deltas.md` lets a task EMIT lessons (`open` lessons learned in OBSERVE); retrospective consolidation gathers the confirmed ones and writes them into a **versioned foundation**, so `DDD · SDD · UDD · TDD · ADD` sharpen across milestones.
3
+ This **closes the loop**. `deltas.md` lets a task EMIT `open` lessons in OBSERVE; consolidation gathers the confirmed ones into a **versioned foundation**, so `DDD · SDD · UDD · TDD · ADD` sharpen across milestones.
4
4
 
5
- `add.py fold` is **judgment-free**: it only TRANSCRIBES each lesson's own captured text into its routed home and bumps the version. It NEVER composes or merges prose, and it **never self-approves** a consolidation — running the command records the human's confirmation. Deciding WHICH lessons to keep, and polishing raw transcribed bullets into lean one-screen prose, remain the human's work — the latter via the **compaction door** (`compact-foundation.md`).
5
+ `add.py fold` is **judgment-free**: it only TRANSCRIBES each lesson's captured text into its routed home and bumps the version it never composes prose and **never self-approves** (running the command records the human's confirmation). Choosing which lessons to keep, and polishing raw bullets into lean prose (the **compaction door**, `compact-foundation.md`), stay the human's work.
6
6
 
7
7
  ## When to consolidate
8
8
 
9
- At **milestone close** (the natural version bump), or **on demand** when open lessons pile up. One run of `add.py fold` = ONE consolidation session: bumps `foundation-version` exactly once and stamps every resolved lesson with that version.
9
+ At **milestone close**, or **on demand** when open lessons pile up. One `add.py fold` = ONE session: one `foundation-version` bump, every resolved lesson stamped with it.
10
10
 
11
11
  ## The ritual
12
12
 
13
13
  1. **Gather** — `add.py deltas` reads every task's OBSERVE block for lessons still `open`.
14
- 2. **Confirm** — decide which to keep; a lesson you do NOT want is marked `rejected` and left in place. Running `add.py fold` over the rest IS your confirmation.
14
+ 2. **Confirm** — mark any lesson you do NOT want `rejected` (left in place); running `add.py fold` over the rest IS your confirmation.
15
15
  3. **Write** — `add.py fold [--task <slug>] [--comp <TAG>]` performs the mechanical write atomically:
16
16
  - flips each selected `open` lesson to `folded` and stamps it `[folded foundation-version N]`;
17
- - transcribes each lesson VERBATIM as one bullet at the TOP (newest-first) of its routed section;
18
- - prepends one row to §Key Decisions (date · what · why · outcome);
17
+ - transcribes each VERBATIM as one bullet at the TOP (newest-first) of its routed section;
18
+ - prepends one §Key Decisions row (date · what · why · outcome);
19
19
  - bumps `foundation-version` by one.
20
20
  Validate-all-then-write: if any precondition fails the command writes NOTHING.
21
- 4. **Propose & polish** — transcribed bullets are RAW; afterward consolidate/merge into lean prose (append-only, newest-first) via the compaction door.
21
+ 4. **Propose & polish** — raw bullets later merge into lean prose (append-only, newest-first) via the compaction door.
22
22
 
23
23
  ## Consolidation routing
24
24
 
@@ -29,15 +29,14 @@ At **milestone close** (the natural version bump), or **on demand** when open le
29
29
  | `UDD` | `PROJECT.md` §Users | transcribed bullet at the top |
30
30
  | `TDD` | `CONVENTIONS.md` §Method learnings | transcribed bullet |
31
31
  | `ADD` | `CONVENTIONS.md` §Method learnings | transcribed bullet |
32
+ | `persona:<slug>` | `.add/personas/<slug>.md` §Critical Rules / §Success Metrics | dated bullet at top; schema stays conformant |
32
33
 
33
- Every consolidation ALSO prepends one row at the TOP of `PROJECT.md` §Key Decisions: date · decision · why · outcome.
34
+ A `persona:<slug> · <hint>` lesson routes into that persona doc, not a foundation file; it is still flipped `folded` and still bumps the version once (`deltas.md`).
34
35
 
35
36
  ## Status transitions & version
36
37
 
37
- - **confirm**: `open` → `folded` (text transcribed at top of routed target, newest-first).
38
- - **decline**: `open` `rejected`, left in place "we considered and chose not to act" stays auditable.
39
- - Consolidation is **append-only (newest-first)**: PREPENDS new bullets/rows, never silently rewrites — EXCEPT via the recorded compaction door.
40
- - Each `add.py fold` run **bumps** `foundation-version:` in `PROJECT.md` by one (monotonic int).
38
+ - **confirm** `open` → `folded`; **decline** `open` `rejected` (left in place auditable trail).
39
+ - Consolidation is **append-only (newest-first)** PREPENDS, never silently rewrites, EXCEPT via the recorded compaction door.
41
40
 
42
41
  ## Reject codes
43
42
 
@@ -45,17 +44,20 @@ Every consolidation ALSO prepends one row at the TOP of `PROJECT.md` §Key Decis
45
44
  - `no_open_deltas` — nothing is `open` in the selected scope. Version is NOT bumped.
46
45
  - `missing_route_section` — a lesson routes to a foundation section that does not exist. Add the section header, then re-run. Nothing is written.
47
46
  - `no_foundation_version` — `PROJECT.md` carries no parseable `foundation-version:` marker to bump.
47
+ - `missing_persona_target` — a `persona:<slug>` lesson with no `.add/personas/<slug>.md`. Fail-closed: nothing written, no bump. Seed the persona first.
48
+ - `persona_section_unroutable` — the section hint is not `critical-rule` or `success-metric`. Nothing is written.
49
+ - `persona_clobber_forbidden` — INVARIANT: a persona consolidation prepends only; it never drops existing content or breaks the schema.
48
50
  </reject_codes>
49
51
 
50
- Convention-era codes `unconfirmed_fold` and `unroutable_delta` are **retired**: invoking `add.py fold` IS the confirmation; a missing destination surfaces as `missing_route_section`.
52
+ Retired: `unconfirmed_fold` · `unroutable_delta` running `add.py fold` IS the confirmation; a missing destination is `missing_route_section`.
51
53
 
52
54
  ## Worked example
53
55
 
54
56
  The `competency-deltas` task closed its OBSERVE with two lessons:
55
57
 
56
58
  ```
57
- - [ADD · open] dogfood .add/tooling template can silently diverge from canonical (evidence: md5 mismatch this build)
58
- - [TDD · open] structural tests guard canonical artifacts but not their dogfood twins (evidence: scope-loop note + this build)
59
+ - [ADD · open] dogfood .add/tooling can silently diverge from canonical (evidence: md5 mismatch)
60
+ - [TDD · open] structural tests guard canonical artifacts but not their dogfood twins (evidence: this build)
59
61
  ```
60
62
 
61
- The human keeps both and runs `add.py fold`. Routing transcribes each into `CONVENTIONS.md` §Method learnings, prepends a §Key Decisions row, flips them to `folded` with `[folded foundation-version N]`, and bumps `foundation-version` 1 → 2 — all in one atomic write.
63
+ The human runs `add.py fold`: both transcribe into `CONVENTIONS.md` §Method learnings, a §Key Decisions row is prepended, both flip to `folded`, and `foundation-version` bumps 1 → 2 — one atomic write.
@@ -6,8 +6,9 @@ Before a task exists, ADD turns a raw request into correctly-sized, versioned sc
6
6
 
7
7
  ## Interview before you size
8
8
 
9
- When the request arrives as a question, or its intent is not sharp enough to place in one bucket:
10
- explore it WITH the user before classifying. Reflect the intent you heard, name what seems in and
9
+ Run `add.py search <keyword> [<keyword> ...]` first it surfaces overlapping/prior work in one
10
+ command instead of a full manual re-read. When the request arrives as a question, or its intent is
11
+ not sharp enough to place in one bucket: explore it WITH the user before classifying. Reflect the intent you heard, name what seems in and
11
12
  out of scope, and offer 2–3 sized options with your own recommendation. Only then emit
12
13
  `{ bucket, rationale, command }`. `ask_human` stays the floor: when interviewing cannot sharpen the
13
14
  request, reject — never guess a bucket.
@@ -61,7 +62,7 @@ goal/body, the new TASK.md, or a note in the affected TASK.md — never in state
61
62
  Some requests decompose into **N>1 milestones of the same line** — a roadmap, not one milestone.
62
63
  Don't create only the first and lose the rest. Instead:
63
64
 
64
- 1. **Propose** the roadmap — the ordered milestone list, each with a one-line goal. (AI proposes.)
65
+ 1. **Propose** the roadmap — the ordered milestone list, each with a one-line goal.
65
66
  2. **Confirm** — the human confirms the roadmap before anything is created. Never auto-create N
66
67
  milestones unprompted — the intake floor (`ask_human`) still holds.
67
68
  3. **Create** all N on confirm — the first with `add.py new-milestone <slug>` (active), the rest
package/skill/add/loop.md CHANGED
@@ -50,15 +50,14 @@ When every task is done but the goal is not, `add.py status` shows
50
50
  - **Define the release steps** — write the milestone's `## Release steps` (merge is one small
51
51
  step among them; PR, asset export, tag/publish are others). These **feed** the release scope —
52
52
  read `release.md` for the cut; loop.md never re-specifies it.
53
- Present the close via `report-template.md` — open with the ARC (goal · done · plan) and
54
- render as a guided choice (recommended next move + described alternatives).
53
+ Present the close via `report-template.md` — open with the ARC (goal · done · plan),
54
+ render as a guided choice **before `milestone-done`/`archive-milestone` run, not after.**
55
55
 
56
56
  ## Reopen is the verb; this loop is the trigger
57
57
 
58
58
  When a deepened verify finds a criterion unmet on a task already marked done,
59
59
  `add.py reopen <task> --to <phase> --reason "..."` returns it to the flow with a recorded
60
- reason and a reset gate. Deciding WHEN to fire it because a goal criterion is unmet is this
61
- loop's job.
60
+ reason and a reset gate — fired by this loop's judgment, not the engine's.
62
61
 
63
62
  ## The reactivation residual (deferred)
64
63
 
@@ -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