@3fn/core 13.0.0 → 14.0.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 (236) hide show
  1. package/.kiro/agents/ada-prompt.md +80 -132
  2. package/.kiro/agents/ada-prompt.md.attribution.json +45 -0
  3. package/.kiro/agents/ada.json +44 -59
  4. package/.kiro/agents/ada.json.attribution.json +13 -0
  5. package/.kiro/agents/data-prompt.md +83 -74
  6. package/.kiro/agents/data-prompt.md.attribution.json +53 -0
  7. package/.kiro/agents/data.json +31 -38
  8. package/.kiro/agents/data.json.attribution.json +13 -0
  9. package/.kiro/agents/kenya-prompt.md +83 -72
  10. package/.kiro/agents/kenya-prompt.md.attribution.json +53 -0
  11. package/.kiro/agents/kenya.json +27 -35
  12. package/.kiro/agents/kenya.json.attribution.json +13 -0
  13. package/.kiro/agents/leonardo-prompt.md +176 -234
  14. package/.kiro/agents/leonardo-prompt.md.attribution.json +45 -0
  15. package/.kiro/agents/leonardo.json +28 -36
  16. package/.kiro/agents/leonardo.json.attribution.json +13 -0
  17. package/.kiro/agents/lina-prompt.md +110 -151
  18. package/.kiro/agents/lina-prompt.md.attribution.json +53 -0
  19. package/.kiro/agents/lina.json +46 -59
  20. package/.kiro/agents/lina.json.attribution.json +13 -0
  21. package/.kiro/agents/sparky-prompt.md +89 -72
  22. package/.kiro/agents/sparky-prompt.md.attribution.json +53 -0
  23. package/.kiro/agents/sparky.json +37 -37
  24. package/.kiro/agents/sparky.json.attribution.json +13 -0
  25. package/.kiro/agents/stacy-prompt.md +74 -48
  26. package/.kiro/agents/stacy-prompt.md.attribution.json +45 -0
  27. package/.kiro/agents/stacy.json +28 -30
  28. package/.kiro/agents/stacy.json.attribution.json +13 -0
  29. package/.kiro/agents/thurgood-prompt.md +94 -138
  30. package/.kiro/agents/thurgood-prompt.md.attribution.json +45 -0
  31. package/.kiro/agents/thurgood.json +31 -35
  32. package/.kiro/agents/thurgood.json.attribution.json +13 -0
  33. package/.kiro/steering/AI-Collaboration-Principles.md +3 -3
  34. package/.kiro/steering/Civitas-System-Overview.md +5 -5
  35. package/.kiro/steering/DesignerPunk-Systems-Overview.md +6 -6
  36. package/.kiro/steering/Task-Completion-Protocol.md +98 -17
  37. package/.kiro/steering/core-goals.md +3 -3
  38. package/.kiro/steering/personal-note.md +1 -1
  39. package/.kiro/steering/start-up-tasks.md +14 -3
  40. package/application-mcp-server/src/index.ts +26 -0
  41. package/dist/ComponentTokens.android.kt +1 -1
  42. package/dist/ComponentTokens.ios.swift +1 -1
  43. package/dist/ComponentTokens.web.css +1 -1
  44. package/dist/DesignTokens.android.kt +1 -1
  45. package/dist/DesignTokens.dtcg.json +8 -5
  46. package/dist/DesignTokens.figma.json +2 -2
  47. package/dist/DesignTokens.ios.swift +1 -1
  48. package/dist/DesignTokens.web.css +1 -1
  49. package/dist/android/DesignTokens.android.kt +1 -1
  50. package/dist/blend/OklchBlendCalculator.js +1 -0
  51. package/dist/blend/ThemeAwareBlendUtilities.web.d.ts +13 -2
  52. package/dist/blend/ThemeAwareBlendUtilities.web.js +6 -1
  53. package/dist/browser/designerpunk.esm.js +22 -81
  54. package/dist/browser/designerpunk.esm.min.js +29 -32
  55. package/dist/browser/designerpunk.umd.js +22 -81
  56. package/dist/browser/designerpunk.umd.min.js +42 -45
  57. package/dist/browser/tokens.css +1 -1
  58. package/dist/components/core/Avatar-Base/platforms/web/Avatar.web.js +24 -5
  59. package/dist/components/core/Button-CTA/examples/BasicUsage.d.ts +16 -28
  60. package/dist/components/core/Button-CTA/examples/BasicUsage.js +18 -43
  61. package/dist/components/core/Button-CTA/platforms/web/ButtonCTA.web.d.ts +3 -15
  62. package/dist/components/core/Button-CTA/platforms/web/ButtonCTA.web.js +9 -58
  63. package/dist/components/core/Button-CTA/types.d.ts +0 -24
  64. package/dist/components/core/Button-CTA/types.js +6 -0
  65. package/dist/components/core/Input-Text-Base/types.d.ts +13 -1
  66. package/dist/components/core/Input-Text-Password/platforms/web/InputTextPassword.web.js +11 -2
  67. package/dist/generators/DTCGFormatGenerator.js +8 -0
  68. package/dist/integration/BuildErrorHandler.js +2 -2
  69. package/dist/ios/DesignTokens.ios.swift +1 -1
  70. package/dist/mcp/application-mcp.js +24 -0
  71. package/dist/mcp/docs-mcp.js +130 -15
  72. package/dist/mcp/product-mcp.js +25 -0
  73. package/dist/tokens/OpacityTokens.js +1 -1
  74. package/dist/tokens/semantic/BlendTokens.d.ts +10 -3
  75. package/dist/tokens/semantic/BlendTokens.js +17 -5
  76. package/dist/tokens/semantic/OpacityTokens.d.ts +4 -4
  77. package/dist/tokens/semantic/OpacityTokens.js +4 -4
  78. package/dist/types/ComponentTypes.d.ts +1 -1
  79. package/dist/types/generated/TokenTypes.d.ts +1 -1
  80. package/dist/types/generated/TokenTypes.js +1 -1
  81. package/dist/validators/StemmaTokenUsageValidator.js +3 -2
  82. package/dist/web/DesignTokens.web.css +1 -1
  83. package/governance/Component-Development-Guide.md +22 -12
  84. package/governance/Component-Development-Standards.md +2 -2
  85. package/governance/Component-Family-Avatar.md +0 -1
  86. package/governance/Component-Family-Badge.md +0 -1
  87. package/governance/Component-Family-Button.md +4 -17
  88. package/governance/Component-Family-Chip.md +0 -1
  89. package/governance/Component-Family-Container.md +0 -1
  90. package/governance/Component-Family-Data-Display.md +1 -2
  91. package/governance/Component-Family-Divider.md +1 -2
  92. package/governance/Component-Family-Form-Inputs.md +5 -5
  93. package/governance/Component-Family-Icon.md +1 -2
  94. package/governance/Component-Family-Loading.md +1 -2
  95. package/governance/Component-Family-Modal.md +1 -2
  96. package/governance/Component-Family-Navigation.md +0 -1
  97. package/governance/Component-Family-Progress.md +0 -1
  98. package/governance/Component-Inheritance-Structures.md +195 -76
  99. package/governance/Component-MCP-Document-Template.md +6 -5
  100. package/governance/Component-Primitive-vs-Semantic-Philosophy.md +1 -1
  101. package/governance/Component-Quick-Reference.md +33 -33
  102. package/governance/Component-Readiness-Status.md +54 -38
  103. package/governance/Component-Templates.md +32 -36
  104. package/governance/Contract-System-Reference.md +6 -6
  105. package/governance/MCP-Integration-Guide.md +1 -1
  106. package/governance/Process-Cross-Reference-Standards.md +31 -13
  107. package/governance/Process-Development-Workflow.md +49 -59
  108. package/governance/Process-File-Organization.md +24 -24
  109. package/governance/Process-Hook-Operations.md +19 -7
  110. package/governance/Process-Orchestration-Model-Selection.md +92 -0
  111. package/governance/Process-Spec-Planning.md +91 -39
  112. package/governance/Process-Task-Type-Definitions.md +80 -4
  113. package/governance/Product-Handoff-Protocol.md +2 -0
  114. package/governance/Rosetta-System-Architecture.md +6 -6
  115. package/governance/Test-Behavioral-Contract-Validation.md +38 -31
  116. package/governance/Test-Failure-Audit-Methodology.md +1 -1
  117. package/governance/Token-Family-Accessibility.md +1 -2
  118. package/governance/Token-Family-Blend.md +18 -16
  119. package/governance/Token-Family-Blur.md +0 -1
  120. package/governance/Token-Family-Border.md +1 -2
  121. package/governance/Token-Family-Color.md +0 -1
  122. package/governance/Token-Family-Glow.md +1 -2
  123. package/governance/Token-Family-Layering.md +0 -1
  124. package/governance/Token-Family-Motion.md +1 -2
  125. package/governance/Token-Family-Opacity.md +0 -1
  126. package/governance/Token-Family-Radius.md +1 -2
  127. package/governance/Token-Family-Responsive.md +1 -2
  128. package/governance/Token-Family-Shadow.md +1 -2
  129. package/governance/Token-Family-Sizing.md +0 -1
  130. package/governance/Token-Family-Spacing.md +1 -2
  131. package/governance/Token-Family-Typography.md +1 -2
  132. package/governance/Token-Governance.md +8 -8
  133. package/governance/Token-Quick-Reference.md +21 -21
  134. package/governance/Token-Resolution-Patterns.md +1 -1
  135. package/governance/Token-Semantic-Structure.md +1 -1
  136. package/governance/Web-Authoring-Standards.md +5 -5
  137. package/governance/browser-distribution-guide.md +1 -4
  138. package/governance/classification-map.md +368 -0
  139. package/governance/completion-documentation-guide.md +11 -8
  140. package/governance/component-meta-authoring-guide.md +1 -1
  141. package/governance/cross-platform-vs-platform-specific-decision-framework.md +1 -1
  142. package/governance/platform-implementation-guidelines.md +1 -1
  143. package/governance/release-management-system.md +2 -2
  144. package/governance/rosetta-system-principles.md +8 -6
  145. package/governance/stemma-system-principles.md +18 -17
  146. package/mcp-server/src/index.ts +24 -6
  147. package/mcp-server/src/indexer/DocumentIndexer.ts +119 -9
  148. package/mcp-server/src/indexer/__tests__/bare-id-crossrefs.test.ts +250 -0
  149. package/mcp-server/src/indexer/cross-ref-parser.ts +29 -1
  150. package/mcp-server/src/indexer/index-health.ts +27 -2
  151. package/mcp-server/src/query/__tests__/find-docs-calibration.test.ts +11 -26
  152. package/mcp-server/src/relocation-integrity-gate/__tests__/relocation-integrity-gate.test.ts +72 -5
  153. package/mcp-server/src/relocation-integrity-gate/relocation-integrity-gate.ts +81 -24
  154. package/mcp-server/src/tools/list-cross-references.ts +2 -2
  155. package/package.json +23 -21
  156. package/src/__tests__/browser-distribution/css-bundling.test.ts +6 -4
  157. package/src/__tests__/console-allowlist.json +14 -0
  158. package/src/__tests__/console-fail-setup.ts +169 -0
  159. package/src/__tests__/integration/Spec107-DesignLanguageContext.test.ts +16 -0
  160. package/src/__tests__/stemma-system/behavioral-contract-validation.test.ts +70 -17
  161. package/src/__tests__/stemma-system/contract-catalog-name-validation.test.ts +28 -0
  162. package/src/__tests__/stemma-system/form-inputs-contracts.test.ts +223 -16
  163. package/src/__tests__/stemma-system/input-text-native-base-call-alignment.test.ts +298 -0
  164. package/src/blend/OklchBlendCalculator.ts +3 -0
  165. package/src/blend/ThemeAwareBlendUtilities.android.kt +3 -0
  166. package/src/blend/ThemeAwareBlendUtilities.ios.swift +3 -0
  167. package/src/blend/ThemeAwareBlendUtilities.web.ts +9 -1
  168. package/src/blend/__tests__/InteractionStateAudit.test.ts +12 -9
  169. package/src/build/errors/__tests__/ErrorHandler.integration.test.ts +8 -0
  170. package/src/build/errors/__tests__/ErrorHandler.test.ts +5 -0
  171. package/src/build/workflow/__tests__/CICDIntegration.test.ts +12 -1
  172. package/src/cli/__tests__/init.test.ts +45 -11
  173. package/src/components/core/Avatar-Base/Avatar-Base.schema.yaml +1 -1
  174. package/src/components/core/Avatar-Base/__tests__/Avatar.accessibility.test.ts +121 -7
  175. package/src/components/core/Avatar-Base/__tests__/Avatar.image.test.ts +3 -0
  176. package/src/components/core/Avatar-Base/__tests__/Avatar.test.ts +15 -6
  177. package/src/components/core/Avatar-Base/contracts.yaml +11 -1
  178. package/src/components/core/Avatar-Base/platforms/web/Avatar.web.ts +24 -5
  179. package/src/components/core/Badge-Count-Base/contracts.yaml +1 -1
  180. package/src/components/core/Badge-Label-Base/contracts.yaml +1 -1
  181. package/src/components/core/Button-CTA/Button-CTA.schema.yaml +2 -12
  182. package/src/components/core/Button-CTA/README.md +3 -6
  183. package/src/components/core/Button-CTA/__tests__/ButtonCTA.test.ts +35 -89
  184. package/src/components/core/Button-CTA/__tests__/setup.test.ts +0 -2
  185. package/src/components/core/Button-CTA/__tests__/test-utils.ts +0 -2
  186. package/src/components/core/Button-CTA/contracts.yaml +6 -29
  187. package/src/components/core/Button-CTA/examples/BasicUsage.html +2 -14
  188. package/src/components/core/Button-CTA/examples/BasicUsage.tsx +17 -44
  189. package/src/components/core/Button-CTA/platforms/android/ButtonCTA.android.kt +12 -20
  190. package/src/components/core/Button-CTA/platforms/ios/ButtonCTA.ios.swift +12 -51
  191. package/src/components/core/Button-CTA/platforms/web/ButtonCTA.web.css +2 -26
  192. package/src/components/core/Button-CTA/platforms/web/ButtonCTA.web.ts +18 -71
  193. package/src/components/core/Button-CTA/types.ts +10 -28
  194. package/src/components/core/Chip-Base/__tests__/ChipBase.test.ts +13 -0
  195. package/src/components/core/Chip-Filter/__tests__/ChipFilter.test.ts +13 -0
  196. package/src/components/core/Chip-Input/__tests__/ChipInput.test.ts +13 -0
  197. package/src/components/core/Input-Text-Base/Input-Text-Base.schema.yaml +30 -2
  198. package/src/components/core/Input-Text-Base/README.md +25 -2
  199. package/src/components/core/Input-Text-Base/__tests__/focusIndicators.test.ts +16 -15
  200. package/src/components/core/Input-Text-Base/contracts.yaml +90 -0
  201. package/src/components/core/Input-Text-Base/platforms/android/InputTextBase.android.kt +26 -12
  202. package/src/components/core/Input-Text-Base/platforms/ios/InputTextBase.ios.swift +195 -59
  203. package/src/components/core/Input-Text-Base/types.ts +13 -1
  204. package/src/components/core/Input-Text-Email/Input-Text-Email.schema.yaml +5 -1
  205. package/src/components/core/Input-Text-Email/README.md +8 -7
  206. package/src/components/core/Input-Text-Email/platforms/android/InputTextEmail.android.kt +1 -4
  207. package/src/components/core/Input-Text-Email/platforms/ios/InputTextEmail.ios.swift +2 -16
  208. package/src/components/core/Input-Text-Password/Input-Text-Password.schema.yaml +10 -3
  209. package/src/components/core/Input-Text-Password/README.md +9 -8
  210. package/src/components/core/Input-Text-Password/contracts.yaml +5 -0
  211. package/src/components/core/Input-Text-Password/platforms/android/InputTextPassword.android.kt +17 -7
  212. package/src/components/core/Input-Text-Password/platforms/ios/InputTextPassword.ios.swift +22 -20
  213. package/src/components/core/Input-Text-Password/platforms/web/InputTextPassword.web.ts +11 -2
  214. package/src/components/core/Input-Text-PhoneNumber/Input-Text-PhoneNumber.schema.yaml +5 -1
  215. package/src/components/core/Input-Text-PhoneNumber/README.md +9 -8
  216. package/src/components/core/Input-Text-PhoneNumber/platforms/android/InputTextPhoneNumber.android.kt +2 -5
  217. package/src/components/core/Input-Text-PhoneNumber/platforms/ios/InputTextPhoneNumber.ios.swift +3 -17
  218. package/src/components/core/Nav-Header-App/contracts.yaml +1 -1
  219. package/src/components/core/Nav-SegmentedChoice-Base/contracts.yaml +1 -1
  220. package/src/components/core/Progress-Indicator-Connector-Base/contracts.yaml +1 -1
  221. package/src/components/core/Progress-Indicator-Label-Base/contracts.yaml +1 -1
  222. package/src/components/core/Progress-Indicator-Node-Base/contracts.yaml +1 -1
  223. package/src/components/core/Progress-Stepper-Base/__tests__/StepperBase.test.ts +5 -2
  224. package/src/components/core/Progress-Stepper-Detailed/__tests__/StepperDetailed.test.ts +5 -2
  225. package/src/generators/DTCGFormatGenerator.ts +6 -0
  226. package/src/generators/__tests__/DTCGConfigOptions.test.ts +14 -5
  227. package/src/integration/BuildErrorHandler.ts +2 -2
  228. package/src/tokens/OpacityTokens.ts +1 -1
  229. package/src/tokens/__tests__/OpacityTokens.test.ts +3 -1
  230. package/src/tokens/semantic/BlendTokens.ts +26 -5
  231. package/src/tokens/semantic/OpacityTokens.ts +4 -4
  232. package/src/tools/release/__tests__/ReleasePipeline.test.ts +1 -1
  233. package/src/types/ComponentTypes.ts +1 -1
  234. package/src/types/generated/TokenTypes.ts +1 -1
  235. package/src/validators/StemmaTokenUsageValidator.ts +3 -2
  236. package/token-index/semantics.yaml +1 -2
@@ -8,7 +8,7 @@ description: Development workflow and task completion practices — task complet
8
8
  # Development Workflow and Task Completion Practices
9
9
 
10
10
  **Date**: 2025-10-20
11
- **Last Reviewed**: 2026-07-03
11
+ **Last Reviewed**: 2026-07-14
12
12
  **Purpose**: Task completion workflow and git practices for all development work
13
13
  **Organization**: process-standard
14
14
  **Scope**: cross-project
@@ -31,10 +31,10 @@ description: Development workflow and task completion practices — task complet
31
31
  5. ❌ **SKIP**: Agent Hook Dependency Chains (priming only - query MCP for details), Troubleshooting sections, Hook Integration details
32
32
 
33
33
  **MCP Queries for Detailed Guidance** (query when needed):
34
- - **Completion Documentation**: `get_section({ path: ".kiro/steering/Completion Documentation Guide.md", heading: "Two-Document Workflow" })`
35
- - **Release Detection**: `get_section({ path: ".kiro/steering/Release Management System.md", heading: "Release Pipeline Architecture" })`
36
- - **File Organization**: `get_section({ path: ".kiro/steering/Process-File-Organization.md", heading: "Organization Implementation (Conditional Loading)" })`
37
- - **Hook Operations**: `get_section({ path: ".kiro/steering/Process-Hook-Operations.md", heading: "Agent Hook Dependency Chains" })`
34
+ - **Completion Documentation**: `get_section({ path: "completion-documentation-guide", heading: "Two-Document Workflow" })`
35
+ - **Release Detection**: `get_section({ path: "release-management-system", heading: "Release Pipeline Architecture" })`
36
+ - **File Organization**: `get_section({ path: "process-file-organization", heading: "Organization Implementation (Conditional Loading)" })`
37
+ - **Hook Operations**: `get_section({ path: "process-hook-operations", heading: "Agent Hook Dependency Chains" })`
38
38
 
39
39
  ### WHEN Debugging Hook Issues THEN Read:
40
40
  1. ✅ **Task Completion Workflow** (context)
@@ -43,11 +43,11 @@ description: Development workflow and task completion practices — task complet
43
43
  4. ❌ **SKIP**: Spec Planning, Kiro Agent Hook Integration
44
44
 
45
45
  **MCP Queries for Detailed Guidance** (query when needed):
46
- - **Hook Dependency Chains**: `get_section({ path: ".kiro/steering/Process-Hook-Operations.md", heading: "Agent Hook Dependency Chains" })`
47
- - **Hook Troubleshooting**: `get_section({ path: ".kiro/steering/Process-Hook-Operations.md", heading: "Troubleshooting" })`
48
- - **Common Issues**: `get_section({ path: ".kiro/steering/Process-Hook-Operations.md", heading: "Common Issues and Solutions" })`
49
- - **Release Detection Issues**: `get_section({ path: ".kiro/steering/Process-Hook-Operations.md", heading: "Release Detection Not Triggering" })`
50
- - **Hook Best Practices**: `get_section({ path: ".kiro/steering/Process-Hook-Operations.md", heading: "Best Practices" })`
46
+ - **Hook Dependency Chains**: `get_section({ path: "process-hook-operations", heading: "Agent Hook Dependency Chains" })`
47
+ - **Hook Troubleshooting**: `get_section({ path: "process-hook-operations", heading: "Troubleshooting" })`
48
+ - **Common Issues**: `get_section({ path: "process-hook-operations", heading: "Common Issues and Solutions" })`
49
+ - **Release Detection Issues**: `get_section({ path: "process-hook-operations", heading: "Release Detection Not Triggering" })`
50
+ - **Hook Best Practices**: `get_section({ path: "process-hook-operations", heading: "Best Practices" })`
51
51
 
52
52
  ### WHEN Setting Up or Modifying Hooks THEN Read:
53
53
  1. ✅ **Agent Hook Dependency Chains** (priming - then query MCP for detailed guidance)
@@ -56,15 +56,15 @@ description: Development workflow and task completion practices — task complet
56
56
  4. ❌ **SKIP**: Task Completion Workflow, Quality Standards
57
57
 
58
58
  **MCP Queries for Detailed Guidance** (query when needed):
59
- - **Hook Dependency Chains**: `get_section({ path: ".kiro/steering/Process-Hook-Operations.md", heading: "Agent Hook Dependency Chains" })`
60
- - **Hook Troubleshooting**: `get_section({ path: ".kiro/steering/Process-Hook-Operations.md", heading: "Troubleshooting" })`
61
- - **Kiro Agent Hook Integration**: `get_section({ path: ".kiro/steering/Process-Hook-Operations.md", heading: "Kiro Agent Hook Integration" })`
59
+ - **Hook Dependency Chains**: `get_section({ path: "process-hook-operations", heading: "Agent Hook Dependency Chains" })`
60
+ - **Hook Troubleshooting**: `get_section({ path: "process-hook-operations", heading: "Troubleshooting" })`
61
+ - **Kiro Agent Hook Integration**: `get_section({ path: "process-hook-operations", heading: "Kiro Agent Hook Integration" })`
62
62
 
63
63
  ### WHEN Creating Completion Documentation THEN Read:
64
64
  1. ✅ **Task Completion Workflow** (quick reference section)
65
65
  2. ✅ Query **Completion Documentation Guide** via MCP for detailed guidance:
66
- - `get_document_full({ path: ".kiro/steering/Completion Documentation Guide.md" })`
67
- - Or specific sections: `get_section({ path: ".kiro/steering/Completion Documentation Guide.md", heading: "Documentation Tiers" })`
66
+ - `get_document_full({ path: "completion-documentation-guide" })`
67
+ - Or specific sections: `get_section({ path: "completion-documentation-guide", heading: "Documentation Tiers" })`
68
68
 
69
69
  ---
70
70
 
@@ -72,18 +72,12 @@ description: Development workflow and task completion practices — task complet
72
72
 
73
73
  ### Recommended Process (IDE-based with Automation)
74
74
  1. **[MANUAL]** **Complete Task Work**: Implement all requirements and create specified artifacts
75
- 2. **[MANUAL]** **Validate Implementation**:
76
- - For regular tasks: Run `npm test` (functional lanes only, timing-assertion-free; ~1 min warm)
77
- - For parent tasks (default): Run `npm test` (comprehensive functional validation, ~1 min warm)
78
- - For parent tasks modifying release tool: Run `npm run test:all` (~1 min — includes performance suites; the cost delta over `npm test` is seconds)
79
- - For performance tasks: Run `npm run test:performance` AND `npm run test:performance:isolated` (seconds each; perf coverage is split across the two lanes — or run `npm run test:all`). Performance assertions are wall-clock-sensitive: run on an otherwise-idle machine
80
-
81
- > Lane semantics reworked 2026-07-03 (commit `29bba7de`; see Spec 125 design-outline addendum): default lanes are timing-assertion-free; performance coverage is split across `test:performance` + `test:performance:isolated`.
75
+ 2. **[MANUAL]** **Local validation**: the unit PR's required checks run the full functional suite at the gate; validating locally first catches failures before they block the merge. Test-command and lane selection (incl. the performance lanes and the 2026-07-03 lane-semantics note): Start Up Tasks §4–§5.
82
76
  3. **[MANUAL]** **Create Detailed Completion Document**: For parent tasks, create comprehensive completion doc at `.kiro/specs/[spec-name]/completion/task-N-parent-completion.md` (Tier 3)
83
77
  4. **[MANUAL]** **Create Summary Document**: For parent tasks, create concise summary doc at `docs/specs/[spec-name]/task-N-summary.md`
84
78
  5. **[MANUAL]** **Mark Task Complete**: Use `taskStatus` tool to update task status to "completed" when finished
85
- 6. **[MANUAL]** **Commit Changes**: Run `./.kiro/hooks/commit-task.sh "Task Name"` to automatically commit, push, and run release analysis
86
- 7. **[MANUAL]** **Verify on GitHub**: Confirm changes appear in repository with correct commit message
79
+ 6. **[MANUAL]** **Open the Task PR**: Run `./.kiro/hooks/complete-task.sh "Task Name"` to commit on the task branch, push, and open the PR; report the PR URL and STOP
80
+ 7. **[MANUAL]** **Merge = completion**: Peter merges on green — the merge accepts the work into `main` (no separate GitHub verification step; the merged PR is the verification). Release analysis runs post-merge on `main`.
87
81
 
88
82
  **Why use `taskStatus` tool?**
89
83
  - Triggers agent hooks for automatic file organization
@@ -100,22 +94,22 @@ description: Development workflow and task completion practices — task complet
100
94
  **For detailed guidance** on documentation tiers, naming conventions, templates, and the two-document workflow, query Completion Documentation Guide via MCP:
101
95
 
102
96
  ```
103
- get_document_full({ path: ".kiro/steering/Completion Documentation Guide.md" })
97
+ get_document_full({ path: "completion-documentation-guide" })
104
98
  ```
105
99
 
106
100
  Or query specific sections:
107
101
  ```
108
- get_section({ path: ".kiro/steering/Completion Documentation Guide.md", heading: "Two-Document Workflow" })
109
- get_section({ path: ".kiro/steering/Completion Documentation Guide.md", heading: "Documentation Tiers" })
110
- get_section({ path: ".kiro/steering/Completion Documentation Guide.md", heading: "Naming Conventions" })
102
+ get_section({ path: "completion-documentation-guide", heading: "Two-Document Workflow" })
103
+ get_section({ path: "completion-documentation-guide", heading: "Documentation Tiers" })
104
+ get_section({ path: "completion-documentation-guide", heading: "Naming Conventions" })
111
105
  ```
112
106
 
113
107
  ### Alternative Process (Script-based without Automation)
114
108
  1. **Complete Task Work**: Implement all requirements and create specified artifacts
115
109
  2. **Manually update tasks.md**: Change task status from `[ ]` to `[x]`
116
- 3. **Commit Changes**: Run `./.kiro/hooks/commit-task.sh "Task Name"` to automatically commit and push
117
- 4. **Verify on GitHub**: Confirm changes appear in repository with correct commit message
118
- 5. **[OPTIONAL]** **Release Analysis**: Run `npm run release:analyze` if you want detailed release analysis beyond what commit-task.sh provides
110
+ 3. **Open the Task PR**: Run `./.kiro/hooks/complete-task.sh "Task Name"` to commit on the task branch, push, and open the PR
111
+ 4. **Merge = completion**: Peter merges on green; the merged PR is the verification
112
+ 5. **[OPTIONAL]** **Release Analysis**: Run `npm run release:analyze` for detailed local analysis (the standing analysis runs post-merge on `main`)
119
113
 
120
114
  **When to use this approach:**
121
115
  - Quick fixes or minor changes
@@ -131,10 +125,10 @@ get_section({ path: ".kiro/steering/Completion Documentation Guide.md", heading:
131
125
  - Example: "Task 6 Complete: Strategic Framework Documentation Package"
132
126
 
133
127
  ### Git Practices
134
- - **Repository**: https://github.com/3fn/DesignerPunkv2
135
- - **Branch**: All work on `main` branch (single-branch workflow for now)
136
- - **Commits**: Atomic commits per task completion with descriptive messages
137
- - **Push**: Always push immediately after commit to maintain synchronization
128
+ - **Repository**: https://github.com/3fn/DesignerPunk
129
+ - **Branch**: All work on task branches (`task/<spec>-<N>-<slug>`); `main` is protected — direct pushes are rejected, admins included
130
+ - **Commits**: Atomic commits per subtask on the branch; squash-merge yields one `main` commit per **merge unit** with the PR title as its subject (a unit is the whole spec for small specs, or a tasks.md-declared grouping for large specs — see Task-Completion-Protocol § Coherent Units)
131
+ - **PRs**: Title = `Task <N> Complete: <Description> (<spec>)`; body carries Spec / Task / Agent / completion-doc path / validation note
138
132
 
139
133
  ## Spec Planning (Conditional Loading)
140
134
 
@@ -167,17 +161,13 @@ See **Spec Planning Standards** (`.kiro/steering/Process-Spec-Planning.md`) for
167
161
  ## Hook System Usage
168
162
 
169
163
  ### Available Tools
170
- - **`.kiro/hooks/commit-task.sh`**: Simple wrapper for task completion commits
171
- - **`.kiro/hooks/task-completion-commit.sh`**: Full automation script with message extraction
164
+ - **`.kiro/hooks/complete-task.sh`**: Task-completion PR tooling — branch, commit, push, PR-open, URL report
172
165
  - **`.kiro/hooks/README.md`**: Complete documentation and usage examples
173
166
 
174
167
  ### Usage Examples
175
168
  ```bash
176
- # Standard task completion commit
177
- ./.kiro/hooks/commit-task.sh "1. Create North Star Vision Document"
178
-
179
- # For different specs or custom task files
180
- ./.kiro/hooks/task-completion-commit.sh path/to/tasks.md "Task Name"
169
+ # Standard task completion — opens the task PR
170
+ ./.kiro/hooks/complete-task.sh "Task N Complete: Description (spec)"
181
171
  ```
182
172
 
183
173
  ---
@@ -195,14 +185,14 @@ Agent hooks use `runAfter` configuration to create dependency chains where hooks
195
185
  **For detailed guidance** on dependency chain behavior, troubleshooting, and best practices, query Process-Hook-Operations via MCP:
196
186
 
197
187
  ```
198
- get_document_full({ path: ".kiro/steering/Process-Hook-Operations.md" })
188
+ get_document_full({ path: "process-hook-operations" })
199
189
  ```
200
190
 
201
191
  Or query specific sections:
202
192
  ```
203
- get_section({ path: ".kiro/steering/Process-Hook-Operations.md", heading: "Agent Hook Dependency Chains" })
204
- get_section({ path: ".kiro/steering/Process-Hook-Operations.md", heading: "Dependency Chain Behavior" })
205
- get_section({ path: ".kiro/steering/Process-Hook-Operations.md", heading: "Best Practices" })
193
+ get_section({ path: "process-hook-operations", heading: "Agent Hook Dependency Chains" })
194
+ get_section({ path: "process-hook-operations", heading: "Dependency Chain Behavior" })
195
+ get_section({ path: "process-hook-operations", heading: "Best Practices" })
206
196
  ```
207
197
 
208
198
  ---
@@ -237,15 +227,15 @@ When experiencing errors or failures during task completion, hooks not triggerin
237
227
  **For detailed troubleshooting guidance**, query Process-Hook-Operations via MCP:
238
228
 
239
229
  ```
240
- get_document_full({ path: ".kiro/steering/Process-Hook-Operations.md" })
230
+ get_document_full({ path: "process-hook-operations" })
241
231
  ```
242
232
 
243
233
  Or query specific sections:
244
234
  ```
245
- get_section({ path: ".kiro/steering/Process-Hook-Operations.md", heading: "Troubleshooting" })
246
- get_section({ path: ".kiro/steering/Process-Hook-Operations.md", heading: "Common Issues and Solutions" })
247
- get_section({ path: ".kiro/steering/Process-Hook-Operations.md", heading: "Release Detection Not Triggering" })
248
- get_section({ path: ".kiro/steering/Process-Hook-Operations.md", heading: "Quick Reference: Diagnostic Commands" })
235
+ get_section({ path: "process-hook-operations", heading: "Troubleshooting" })
236
+ get_section({ path: "process-hook-operations", heading: "Common Issues and Solutions" })
237
+ get_section({ path: "process-hook-operations", heading: "Release Detection Not Triggering" })
238
+ get_section({ path: "process-hook-operations", heading: "Quick Reference: Diagnostic Commands" })
249
239
  ```
250
240
 
251
241
  **Quick Reference - Common Issues**:
@@ -255,9 +245,9 @@ get_section({ path: ".kiro/steering/Process-Hook-Operations.md", heading: "Quick
255
245
  - **Hook script errors**: Ensure scripts have execute permissions (`chmod +x`)
256
246
 
257
247
  **Quick Reference - Error Recovery**:
258
- - If commit fails: Fix issues and re-run hook script
259
- - If push fails: Run `git push origin main` manually
260
- - If wrong message: Use `git commit --amend -m "Correct Message"` then force push
248
+ - If commit fails: Fix issues and re-run the tooling
249
+ - If push fails: Push the TASK BRANCH manually (`git push -u origin <branch>`) — never `main`
250
+ - If the PR title is wrong: Edit the PR title on GitHub (squash-merge takes the title as the commit subject)
261
251
 
262
252
 
263
253
  ---
@@ -298,13 +288,13 @@ Agent hooks provide automatic file organization and release detection when tasks
298
288
  **For detailed guidance** on hook execution order, automatic file organization, release detection, and troubleshooting, query Process-Hook-Operations via MCP:
299
289
 
300
290
  ```
301
- get_document_full({ path: ".kiro/steering/Process-Hook-Operations.md" })
291
+ get_document_full({ path: "process-hook-operations" })
302
292
  ```
303
293
 
304
294
  Or query specific sections:
305
295
  ```
306
- get_section({ path: ".kiro/steering/Process-Hook-Operations.md", heading: "Kiro Agent Hook Integration" })
307
- get_section({ path: ".kiro/steering/Process-Hook-Operations.md", heading: "Agent Hook Execution Order" })
308
- get_section({ path: ".kiro/steering/Process-Hook-Operations.md", heading: "Automatic File Organization" })
309
- get_section({ path: ".kiro/steering/Process-Hook-Operations.md", heading: "Release Detection" })
296
+ get_section({ path: "process-hook-operations", heading: "Kiro Agent Hook Integration" })
297
+ get_section({ path: "process-hook-operations", heading: "Agent Hook Execution Order" })
298
+ get_section({ path: "process-hook-operations", heading: "Automatic File Organization" })
299
+ get_section({ path: "process-hook-operations", heading: "Release Detection" })
310
300
  ```
@@ -9,7 +9,7 @@ description: File organization standards — metadata-driven organization, direc
9
9
  # File Organization Standards
10
10
 
11
11
  **Date**: 2025-01-10
12
- **Last Reviewed**: 2026-06-23
12
+ **Last Reviewed**: 2026-07-05
13
13
  **Purpose**: Metadata-driven file organization system for sustainable project structure
14
14
  **Organization**: process-standard
15
15
  **Scope**: cross-project
@@ -34,8 +34,8 @@ description: File organization standards — metadata-driven organization, direc
34
34
 
35
35
  **Query via MCP for detailed guidance:**
36
36
  ```
37
- get_section({ path: ".kiro/steering/Completion Documentation Guide.md", heading: "Two-Document Workflow" })
38
- get_section({ path: ".kiro/steering/Completion Documentation Guide.md", heading: "Cross-References" })
37
+ get_section({ path: "completion-documentation-guide", heading: "Two-Document Workflow" })
38
+ get_section({ path: "completion-documentation-guide", heading: "Cross-References" })
39
39
  ```
40
40
 
41
41
  ### WHEN Creating Spec Documents (Requirements, Design, Tasks)
@@ -58,8 +58,8 @@ get_section({ path: ".kiro/steering/Completion Documentation Guide.md", heading:
58
58
 
59
59
  **Query via MCP for detailed guidance:**
60
60
  ```
61
- get_section({ path: ".kiro/steering/Completion Documentation Guide.md", heading: "Naming Conventions" })
62
- get_section({ path: ".kiro/steering/Completion Documentation Guide.md", heading: "Document Templates" })
61
+ get_section({ path: "completion-documentation-guide", heading: "Naming Conventions" })
62
+ get_section({ path: "completion-documentation-guide", heading: "Document Templates" })
63
63
  ```
64
64
 
65
65
  ### WHEN Adding Cross-References
@@ -69,9 +69,9 @@ get_section({ path: ".kiro/steering/Completion Documentation Guide.md", heading:
69
69
 
70
70
  **Query via MCP for detailed guidance:**
71
71
  ```
72
- get_section({ path: ".kiro/steering/Process-Cross-Reference-Standards.md", heading: "How to Format Cross-References" })
73
- get_section({ path: ".kiro/steering/Process-Cross-Reference-Standards.md", heading: "Common Cross-Reference Patterns" })
74
- get_section({ path: ".kiro/steering/Process-Cross-Reference-Standards.md", heading: "Anti-Patterns to Avoid" })
72
+ get_section({ path: "process-cross-reference-standards", heading: "How to Format Cross-References" })
73
+ get_section({ path: "process-cross-reference-standards", heading: "Common Cross-Reference Patterns" })
74
+ get_section({ path: "process-cross-reference-standards", heading: "Anti-Patterns to Avoid" })
75
75
  ```
76
76
 
77
77
  ### WHEN Organizing Existing Files AND Creating New Implementation Files
@@ -172,13 +172,13 @@ aliases: RTL, bidirectional, internationalization, i18n
172
172
  **For detailed guidance** on completion documentation naming conventions, templates, and the two-document workflow, query Completion Documentation Guide via MCP:
173
173
 
174
174
  ```
175
- get_document_full({ path: ".kiro/steering/Completion Documentation Guide.md" })
175
+ get_document_full({ path: "completion-documentation-guide" })
176
176
  ```
177
177
 
178
178
  Or query specific sections:
179
179
  ```
180
- get_section({ path: ".kiro/steering/Completion Documentation Guide.md", heading: "Naming Conventions" })
181
- get_section({ path: ".kiro/steering/Completion Documentation Guide.md", heading: "Directory Structure" })
180
+ get_section({ path: "completion-documentation-guide", heading: "Naming Conventions" })
181
+ get_section({ path: "completion-documentation-guide", heading: "Directory Structure" })
182
182
  ```
183
183
 
184
184
  #### Summary Documents
@@ -194,19 +194,19 @@ get_section({ path: ".kiro/steering/Completion Documentation Guide.md", heading:
194
194
  - Summary docs are ONLY for parent tasks (not subtasks)
195
195
  - Naming pattern: `task-N-summary.md` (e.g., `task-1-summary.md`)
196
196
  - Hook pattern: `**/task-*-summary.md`
197
- - AI workflows: `commit-task.sh` runs release analysis automatically after commit
197
+ - AI workflows: release analysis runs post-merge on `main` (summary docs traverse the PR gate with the work)
198
198
 
199
199
  **For detailed guidance** on summary document templates, cross-references, and the two-document workflow, query Completion Documentation Guide via MCP:
200
200
 
201
201
  ```
202
- get_document_full({ path: ".kiro/steering/Completion Documentation Guide.md" })
202
+ get_document_full({ path: "completion-documentation-guide" })
203
203
  ```
204
204
 
205
205
  Or query specific sections:
206
206
  ```
207
- get_section({ path: ".kiro/steering/Completion Documentation Guide.md", heading: "Two-Document Workflow" })
208
- get_section({ path: ".kiro/steering/Completion Documentation Guide.md", heading: "Cross-References" })
209
- get_section({ path: ".kiro/steering/Completion Documentation Guide.md", heading: "Document Templates" })
207
+ get_section({ path: "completion-documentation-guide", heading: "Two-Document Workflow" })
208
+ get_section({ path: "completion-documentation-guide", heading: "Cross-References" })
209
+ get_section({ path: "completion-documentation-guide", heading: "Document Templates" })
210
210
  ```
211
211
 
212
212
  #### Spec-Specific Guides
@@ -293,13 +293,13 @@ strategic-framework/
293
293
  **For detailed guidance** on completion documentation directory structure, naming patterns, and the two-document workflow, query Completion Documentation Guide via MCP:
294
294
 
295
295
  ```
296
- get_document_full({ path: ".kiro/steering/Completion Documentation Guide.md" })
296
+ get_document_full({ path: "completion-documentation-guide" })
297
297
  ```
298
298
 
299
299
  Or query specific sections:
300
300
  ```
301
- get_section({ path: ".kiro/steering/Completion Documentation Guide.md", heading: "Directory Structure" })
302
- get_section({ path: ".kiro/steering/Completion Documentation Guide.md", heading: "Naming Conventions" })
301
+ get_section({ path: "completion-documentation-guide", heading: "Directory Structure" })
302
+ get_section({ path: "completion-documentation-guide", heading: "Naming Conventions" })
303
303
  ```
304
304
 
305
305
  ### Audit Findings
@@ -388,7 +388,7 @@ After moving files, update any cross-reference links to reflect new locations.
388
388
 
389
389
  #### Enhanced Commit Hook
390
390
  ```bash
391
- # .kiro/hooks/commit-task-organized.sh "Task Name" [--organize]
391
+ # .kiro/hooks/complete-task.sh "Task Name" [--organize] (organization option folded into the PR-flow tooling)
392
392
  # Optional organization during task completion
393
393
  # Human-controlled with hook assistance
394
394
  # Maintains fallback to current behavior
@@ -561,14 +561,14 @@ Cross-references are markdown links that connect related documentation, enabling
561
561
  **For detailed guidance** on cross-reference formatting, patterns, anti-patterns, and maintenance, query Process-Cross-Reference-Standards via MCP:
562
562
 
563
563
  ```
564
- get_document_full({ path: ".kiro/steering/Process-Cross-Reference-Standards.md" })
564
+ get_document_full({ path: "process-cross-reference-standards" })
565
565
  ```
566
566
 
567
567
  Or query specific sections:
568
568
  ```
569
- get_section({ path: ".kiro/steering/Process-Cross-Reference-Standards.md", heading: "How to Format Cross-References" })
570
- get_section({ path: ".kiro/steering/Process-Cross-Reference-Standards.md", heading: "Common Cross-Reference Patterns" })
571
- get_section({ path: ".kiro/steering/Process-Cross-Reference-Standards.md", heading: "Anti-Patterns to Avoid" })
569
+ get_section({ path: "process-cross-reference-standards", heading: "How to Format Cross-References" })
570
+ get_section({ path: "process-cross-reference-standards", heading: "Common Cross-Reference Patterns" })
571
+ get_section({ path: "process-cross-reference-standards", heading: "Anti-Patterns to Avoid" })
572
572
  ```
573
573
 
574
574
  ---
@@ -8,7 +8,7 @@ description: Agent hook operational guidance — dependency chains, execution or
8
8
  # Hook Operations Guide
9
9
 
10
10
  **Date**: 2026-01-04
11
- **Last Reviewed**: 2026-01-04
11
+ **Last Reviewed**: 2026-07-09
12
12
  **Purpose**: Comprehensive operational guidance for agent hook dependency chains, troubleshooting, and best practices
13
13
  **Organization**: process-standard
14
14
  **Scope**: cross-project
@@ -19,6 +19,16 @@ description: Agent hook operational guidance — dependency chains, execution or
19
19
 
20
20
  This document provides detailed operational guidance for working with Kiro agent hooks. It covers dependency chain behavior, troubleshooting procedures, and best practices for reliable automation.
21
21
 
22
+ > ## ⚠️ Scope & runtime — read before applying any of this
23
+ >
24
+ > **1. This describes a Kiro-IDE-only mechanism.** The "agent hooks" here are the Kiro event-hook runtime — `.kiro/agent-hooks/*.json` configs fired by the Kiro IDE on `taskStatusChange` events. **Claude Code has no equivalent event-hook system** (the same runtime gap that the always-layer has under CC — see 122 / OB-7). Under Claude Code none of these hooks fire; file organization and any release steps are performed by explicit tooling/CLI steps, not by IDE events. Read every "hooks fire on task completion" statement below as *Kiro-runtime behavior*, not a cross-runtime guarantee.
25
+ >
26
+ > **2. "Task completion" now means merge (125-A PR-gate).** Since the ratified 125-A workflow, a task is accepted when its unit's **PR is merged** — not when a local status flips. The completion tool is `./.kiro/hooks/complete-task.sh` (opens the PR), which **superseded** the old commit-on-completion tooling. Work reaches `main` only through a merged, branch-protected PR. So the troubleshooting guidance below that frames "direct git commits" as *bypassing hooks* (versus using the `taskStatus` tool) is **Kiro-IDE-specific and predates the branch→PR→merge flow** — under the current workflow, committing and pushing a branch is a *correct, expected* step, not an error to avoid.
27
+ >
28
+ > **3. Release detection here is historical.** As the frontmatter notes, the release system was rebuilt in Spec 065 into an on-demand CLI (`src/tools/release/`); the release-detection-on-task-completion hook content below is retained for Kiro-hook operational history. See [Release Management System](release-management-system) for the current architecture.
29
+ >
30
+ > This doc is preserved for Kiro-runtime hook operations and history. A cross-runtime rework belongs with the 122 agent-generator work (OB-7), not here.
31
+
22
32
  **When to use this document**:
23
33
  - Debugging hook issues or automation failures
24
34
  - Understanding hook dependencies and execution order
@@ -509,6 +519,8 @@ ls -la .kiro/release-triggers/
509
519
  # git commit -m "message" && git push
510
520
  ```
511
521
 
522
+ > **Kiro-runtime framing only (see the Scope banner).** "`git commit && push` bypasses hooks" is true *only* of the Kiro IDE event mechanism. Under the 125-A PR-gate workflow, committing and pushing a branch is the **correct** step — subtask/parent work reaches `main` through a merged PR, and `taskStatus` marks completion *on the branch*. This "wrong approach" label applies to Kiro hook-triggering, not to the git workflow itself.
523
+
512
524
  2. **Verify task status changed**: Check tasks.md to confirm task is marked `[x]`
513
525
 
514
526
  3. **Check hook configurations**: Verify JSON files are valid and enabled
@@ -1155,13 +1167,13 @@ File organization triggers automatically when task status changes to "completed"
1155
1167
  **For detailed guidance** on file organization workflow, metadata values, directory structure, scope rationale, and manual organization options, query File Organization Standards via MCP:
1156
1168
 
1157
1169
  ```
1158
- get_document_full({ path: ".kiro/steering/Process-File-Organization.md" })
1170
+ get_document_full({ path: "process-file-organization" })
1159
1171
  ```
1160
1172
 
1161
1173
  Or query specific sections:
1162
1174
  ```
1163
- get_section({ path: ".kiro/steering/Process-File-Organization.md", heading: "Organization Implementation (Conditional Loading)" })
1164
- get_section({ path: ".kiro/steering/Process-File-Organization.md", heading: "File Organization Scope (Conditional Loading)" })
1175
+ get_section({ path: "process-file-organization", heading: "Organization Implementation (Conditional Loading)" })
1176
+ get_section({ path: "process-file-organization", heading: "File Organization Scope (Conditional Loading)" })
1165
1177
  ```
1166
1178
 
1167
1179
  ### Release Detection
@@ -1182,13 +1194,13 @@ Release detection triggers automatically when parent task summary documents are
1182
1194
  **For detailed guidance** on release detection pipeline, troubleshooting, hook debugging, and manual triggers, query Release Management System via MCP:
1183
1195
 
1184
1196
  ```
1185
- get_document_full({ path: ".kiro/steering/Release Management System.md" })
1197
+ get_document_full({ path: "release-management-system" })
1186
1198
  ```
1187
1199
 
1188
1200
  Or query specific sections:
1189
1201
  ```
1190
- get_section({ path: ".kiro/steering/Release Management System.md", heading: "Release Pipeline Architecture" })
1191
- get_section({ path: ".kiro/steering/Release Management System.md", heading: "AI Agent Decision Points" })
1202
+ get_section({ path: "release-management-system", heading: "Release Pipeline Architecture" })
1203
+ get_section({ path: "release-management-system", heading: "AI Agent Decision Points" })
1192
1204
  ```
1193
1205
 
1194
1206
  ---
@@ -0,0 +1,92 @@
1
+ ---
2
+ id: process-orchestration-model-selection
3
+ inclusion: manual
4
+ name: Process-Orchestration-Model-Selection
5
+ description: How an orchestrating agent picks a model tier for delegated subagent work — match the tier to the task's cognitive demand (decide vs. implement) weighted by blast radius, default to inheriting the session model, and always independently verify subagent output. Load when delegating work to subagents or deciding which model a subagent should run.
6
+ ---
7
+
8
+ # Orchestration Model Selection
9
+
10
+ **Date**: 2026-07-07
11
+ **Last Reviewed**: 2026-07-09
12
+ **Purpose**: How an orchestrating agent chooses the model tier for delegated subagent work, and why verification — not the tier — is the guardrail (content AND placement)
13
+ **Organization**: process-standard
14
+ **Scope**: cross-project
15
+ **Layer**: 2
16
+ **Relevant Tasks**: agent-architecture, general-task-execution
17
+
18
+ ---
19
+
20
+ ## The Policy (one sentence)
21
+
22
+ **Match the model tier to the task's cognitive demand — *decide* vs. *implement*, weighted by *blast radius* — default to inheriting the session model, and always independently verify subagent output. Delegate-then-verify is the guardrail, not the tier.**
23
+
24
+ ## The Axis: decide vs. implement
25
+
26
+ The question is never "is this a subagent?" It is "what cognition does this task demand?"
27
+
28
+ - **Implement** — carry out an already-settled design, contract, or spec: component/token/test authoring against a fixed model, scripted or mechanical multi-file sweeps with a defined pattern, ports/transcriptions, measurements and probes, applying a ratified ballot. The hard calls are made; the work is faithful execution.
29
+ - **Decide** — produce architecture, make a consequential or hard-to-reverse call, weigh cross-cutting tradeoffs, or reason through multiple failure modes: spec design and review rounds, ballot drafting, incorporation/adjudication passes, choosing a system boundary or a new cross-component contract.
30
+
31
+ **Weight by blast radius.** A wrong *implementation* detail is usually local and cheap to fix under verification. A wrong *architectural* call propagates and is costly to unwind — that is exactly where marginal model capability earns its cost, and exactly the wrong place to chase savings.
32
+
33
+ ## The tiering rule
34
+
35
+ - **Implement against a settled design/contract/spec → the cheaper capable tier** (currently Sonnet). Bias toward it for concrete work: on Spec 121 the cheaper tier was *diligent*, not merely adequate — it caught real edge cases (a comma-tokenizer bug, an empty-owner schema gap, a latent import-time side effect) rather than silently papering over them.
36
+ - **Decide → the higher tier** (currently Opus).
37
+ - **The main orchestration loop stays top-tier.** Synthesis, cross-checking subagent output, and human-facing judgment are the highest-leverage cognition in the session; do not downgrade the loop that verifies everything else.
38
+
39
+ ## The default: inherit the session model
40
+
41
+ When the orchestrator does not specify a tier, a subagent **inherits the session model**. Agents carry **no per-agent default tier** — the tier is a property of the *task*, chosen at delegation, not a fixed attribute of the agent (the same agent does implement-work on one task and decide-work on another).
42
+
43
+ Inherit is the right default because it **fails expensive, not wrong**: forgetting to specify runs the task at the orchestrator's own tier — over-provisioned for cheap work (a *cost* failure: visible in spend and session limits, self-correcting) rather than under-powered for consequential work (a *quality* failure: silent, shipped). But inherit is **silent in both directions**, so it is only safe alongside the always-visible calibration rule:
44
+
45
+ - **Calibrate bidirectionally relative to the session model** — *downgrade* for implementation, *upgrade* for a decide task. Do not assume inherit is safe because the session is usually top-tier: under a cheaper session, a forgotten decide task would silently under-power.
46
+ - Omitting the tier is a decision, not a non-decision. Make it consciously.
47
+
48
+ ## The real guardrail: delegate-then-verify
49
+
50
+ **The safety mechanism is independent verification by the main loop, NOT the model tier.** Every subagent's output is re-checked before it is trusted: re-run the relevant tests and type-check, read the actual diff, spot-check against the contract. That review layer is what catches problems — including from capable tiers (a subagent once wrote a contrast *ratio* into a field expecting a color *value*; the main-loop review caught it, not the tier). The rule holds regardless of which tier ran the work: a higher tier is never a substitute for verifying; a cheaper tier under verification is safe *because* it is verified.
51
+
52
+ **Verification covers placement, not just content.** When you delegate a **file edit**, the check is two-part: the content is correct AND the edit landed **where you intended** — in the intended working tree, on the intended branch. A subagent can silently act on a *different* working tree than you meant and report success anyway, because relative paths resolve from *its* working directory, not yours. Defend against it on both ends: **hand the subagent absolute paths to the intended tree** when you delegate, and **after it reports done, confirm the change is where you expect** (`git status`/`git diff` in the intended tree, or read the file at its absolute path) before you trust or commit it. This extends the content-verification rule above to *placement*; a "done" report is a claim about content, never a guarantee about location.
53
+
54
+ - **Claude Code symptom (harness-specific).** CC nests worktrees *inside* the repo (`.claude/worktrees/<name>/`), so upward path or module resolution from a subagent (`../../../`) can cross the worktree boundary into the **parent repo** — a delegated edit lands on the parent-repo copy instead of the worktree branch, esbuild reads the parent's `package.json`, etc. Observed 3× in one session. The placement check above is the mitigation; the durable fix is upstream (place worktrees as *siblings* of the repo, not nested — a Claude Code harness-behavior request), which this guardrail does not own. Other harnesses carry this symptom note only if they reproduce the nesting condition.
55
+
56
+ ## Escalation, not default-when-unsure
57
+
58
+ The higher tier is an **escalation with a concrete trigger**, not a fallback for uncertainty. Reflexively reaching for it "to be safe" quietly gives back the cost savings without a proven need. Escalate on a concrete signal — the task requires *choosing between non-obvious tradeoffs* or *reasoning through multiple failure modes* — not on a vague sense that the work is important.
59
+
60
+ ## The load-bearing qualifier
61
+
62
+ The way to keep delegated work in the cheaper tier is to **front-load the architecture into the spec** so the subagent *implements a decided design*. Across Spec 121 the cheaper tier was safe because the hard calls were made in the requirements/design phase *before* any subagent ran (one task was typed "Architecture," yet its decisions were already settled in the spec — implementation in practice). The corollary is the trigger: **if a subagent must *make* the architectural call** — an open module-resolution strategy, a new cross-MCP contract, a system boundary — **that is the higher tier regardless of it being "a subagent."** Task **Type** is a *prior, not the answer*: an Architecture-typed task whose design is genuinely settled implements at the cheaper tier, and an Implementation-typed task that still requires a consequential call is a decide task — confirm the design is actually settled before downgrading, rather than reading the tier off the Type label.
63
+
64
+ ## Recording the tier per task (spec-driven work)
65
+
66
+ Spec-driven work has a natural place to pre-record the judgment: the task's `**Agent**:` metadata in `tasks.md`, set at formalization, when the author knows whether the architecture is settled. Format: `**Agent**: <agent> (<Model>)` (e.g. `Thurgood (Sonnet)`; cross-domain `Agent A (Model) + Agent B (Model)`) — the model rides the *task*, so the same agent may carry different models on different tasks. The recorded model is **advisory as of authoring**: the executing orchestrator re-checks it against the current model lineup (delegate-then-verify is the net). It jumpstarts calibration even if this policy is not loaded — the concrete name is actionable without the policy's vocabulary. See `Process-Spec-Planning.md` § "Agent Assignment" for the field rule. This is a *reinforcement* for spec work, not a replacement for the always-visible rule, which covers all orchestration.
67
+
68
+ ## Why the tier matters (cost rationale)
69
+
70
+ Capability tiers are priced differently (higher tier ≈ higher $/token on both input and output; ordering as of 2026-07: Opus > Sonnet > Haiku). Two consequences: a *minor-version* downgrade within a tier saves nothing (same price) — the real lever is **tier**, not version; and running a cheaper *subagent* tier than the orchestrator also **preserves the main-loop prompt cache**, whereas switching the *main* model mid-conversation would invalidate it.
71
+
72
+ ## Still calibrating (this section is expected to move)
73
+
74
+ The concrete tier assignments track the current model lineup and **will change** as models change. Recalibration lands *here*, not in the policy above.
75
+
76
+ - Current mapping (set 2026-07-06/07, Fable-era): **Sonnet** = implementation against settled specs; **Opus** = the decide tier (design, review, adjudication, ballot drafting); **Fable** = the main orchestration loop only.
77
+ - Treat specific tier *names* as the current instantiation of the *policy*, not as the policy. When the lineup shifts, re-map the names; the decide-vs-implement axis and delegate-then-verify guardrail are the stable parts.
78
+
79
+ ## Per-harness field mechanics (mechanics, not policy)
80
+
81
+ *How* an orchestrator selects a tier is harness-specific; the policy above is not.
82
+
83
+ - **Claude Code**: the subagent's `model:` frontmatter (or the Agent-tool `model` param) accepts a tier alias (`sonnet` / `opus` / `haiku` / `fable`), a full model ID, or `inherit`. **Omitting it means `inherit` — the session's current model.** Under a top-tier session, omission silently runs every subagent top-tier; set `model:` explicitly for cheaper work. Generated agent definitions carry **no** `model:` — they inherit by design; the tier is chosen per invocation.
84
+ - **Kiro**: model-selection mechanism may differ and is not characterized here. Document it when a Kiro orchestrator needs it; the policy is identical across harnesses.
85
+
86
+ ## MCP Query
87
+
88
+ ```
89
+ get_document_full({ path: "process-orchestration-model-selection" })
90
+ get_section({ path: "process-orchestration-model-selection", heading: "The tiering rule" })
91
+ get_section({ path: "process-orchestration-model-selection", heading: "The default: inherit the session model" })
92
+ ```