@3fn/core 13.0.0 → 14.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (284) 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 +7 -16
  35. package/.kiro/steering/DesignerPunk-Systems-Overview.md +6 -6
  36. package/.kiro/steering/Spec-Feedback-Protocol.md +2 -11
  37. package/.kiro/steering/Task-Completion-Protocol.md +98 -17
  38. package/.kiro/steering/core-goals.md +3 -3
  39. package/.kiro/steering/personal-note.md +1 -1
  40. package/.kiro/steering/start-up-tasks.md +17 -6
  41. package/application-mcp-server/src/index.ts +26 -0
  42. package/dist/ComponentTokens.android.kt +12 -12
  43. package/dist/ComponentTokens.ios.swift +12 -12
  44. package/dist/ComponentTokens.web.css +3 -3
  45. package/dist/DesignTokens.android.kt +1 -1
  46. package/dist/DesignTokens.dtcg.json +8 -5
  47. package/dist/DesignTokens.figma.json +2 -2
  48. package/dist/DesignTokens.ios.swift +1 -1
  49. package/dist/DesignTokens.web.css +1 -1
  50. package/dist/android/DesignTokens.android.kt +1 -1
  51. package/dist/blend/OklchBlendCalculator.js +1 -0
  52. package/dist/blend/ThemeAwareBlendUtilities.web.d.ts +13 -2
  53. package/dist/blend/ThemeAwareBlendUtilities.web.js +6 -1
  54. package/dist/browser/designerpunk.esm.js +36 -90
  55. package/dist/browser/designerpunk.esm.min.js +33 -36
  56. package/dist/browser/designerpunk.umd.js +36 -90
  57. package/dist/browser/designerpunk.umd.min.js +47 -50
  58. package/dist/browser/tokens.css +3 -3
  59. package/dist/build/tokens/defineComponentTokens.d.ts +10 -0
  60. package/dist/build/tokens/defineComponentTokens.js +26 -0
  61. package/dist/components/core/Avatar-Base/avatar.tokens.d.ts +21 -26
  62. package/dist/components/core/Avatar-Base/avatar.tokens.js +31 -34
  63. package/dist/components/core/Avatar-Base/index.d.ts +1 -1
  64. package/dist/components/core/Avatar-Base/index.js +2 -2
  65. package/dist/components/core/Avatar-Base/platforms/web/Avatar.web.js +24 -5
  66. package/dist/components/core/Button-CTA/examples/BasicUsage.d.ts +16 -28
  67. package/dist/components/core/Button-CTA/examples/BasicUsage.js +18 -43
  68. package/dist/components/core/Button-CTA/platforms/web/ButtonCTA.web.d.ts +3 -15
  69. package/dist/components/core/Button-CTA/platforms/web/ButtonCTA.web.js +9 -58
  70. package/dist/components/core/Button-CTA/types.d.ts +0 -24
  71. package/dist/components/core/Button-CTA/types.js +6 -0
  72. package/dist/components/core/Button-Icon/buttonIcon.tokens.d.ts +28 -14
  73. package/dist/components/core/Button-Icon/buttonIcon.tokens.js +35 -20
  74. package/dist/components/core/Input-Text-Base/types.d.ts +13 -1
  75. package/dist/components/core/Input-Text-Password/platforms/web/InputTextPassword.web.js +11 -2
  76. package/dist/generators/DTCGFormatGenerator.js +8 -0
  77. package/dist/generators/TokenFileGenerator.js +7 -2
  78. package/dist/integration/BuildErrorHandler.js +2 -2
  79. package/dist/ios/DesignTokens.ios.swift +1 -1
  80. package/dist/mcp/application-mcp.js +24 -0
  81. package/dist/mcp/docs-mcp.js +130 -15
  82. package/dist/mcp/product-mcp.js +25 -0
  83. package/dist/tokens/OpacityTokens.js +1 -1
  84. package/dist/tokens/component/progress.d.ts +65 -5
  85. package/dist/tokens/component/progress.js +79 -18
  86. package/dist/tokens/semantic/BlendTokens.d.ts +10 -3
  87. package/dist/tokens/semantic/BlendTokens.js +17 -5
  88. package/dist/tokens/semantic/OpacityTokens.d.ts +4 -4
  89. package/dist/tokens/semantic/OpacityTokens.js +4 -4
  90. package/dist/types/ComponentTypes.d.ts +1 -1
  91. package/dist/types/generated/TokenTypes.d.ts +1 -1
  92. package/dist/types/generated/TokenTypes.js +1 -1
  93. package/dist/validators/StemmaTokenUsageValidator.js +3 -2
  94. package/dist/web/DesignTokens.web.css +1 -1
  95. package/governance/BUILD-SYSTEM-SETUP.md +1 -2
  96. package/governance/Component-Development-Guide.md +23 -13
  97. package/governance/Component-Development-Standards.md +21 -20
  98. package/governance/Component-Family-Avatar.md +6 -7
  99. package/governance/Component-Family-Badge.md +19 -20
  100. package/governance/Component-Family-Button.md +30 -43
  101. package/governance/Component-Family-Chip.md +14 -15
  102. package/governance/Component-Family-Container.md +12 -13
  103. package/governance/Component-Family-Data-Display.md +1 -2
  104. package/governance/Component-Family-Divider.md +1 -2
  105. package/governance/Component-Family-Form-Inputs.md +65 -65
  106. package/governance/Component-Family-Icon.md +9 -10
  107. package/governance/Component-Family-Loading.md +1 -2
  108. package/governance/Component-Family-Modal.md +1 -2
  109. package/governance/Component-Family-Navigation.md +1 -2
  110. package/governance/Component-Family-Progress.md +0 -1
  111. package/governance/Component-Inheritance-Structures.md +219 -99
  112. package/governance/Component-MCP-Document-Template.md +6 -5
  113. package/governance/Component-Primitive-vs-Semantic-Philosophy.md +1 -1
  114. package/governance/Component-Quick-Reference.md +33 -33
  115. package/governance/Component-Readiness-Status.md +59 -44
  116. package/governance/Component-Templates.md +57 -61
  117. package/governance/Contract-System-Reference.md +7 -7
  118. package/governance/MCP-Integration-Guide.md +1 -1
  119. package/governance/Process-Cross-Reference-Standards.md +31 -13
  120. package/governance/Process-Development-Workflow.md +49 -59
  121. package/governance/Process-File-Organization.md +25 -28
  122. package/governance/Process-Hook-Operations.md +22 -11
  123. package/governance/Process-Orchestration-Model-Selection.md +92 -0
  124. package/governance/Process-Spec-Planning.md +98 -52
  125. package/governance/Process-Task-Type-Definitions.md +80 -4
  126. package/governance/Product-Handoff-Protocol.md +2 -0
  127. package/governance/Rosetta-System-Architecture.md +13 -11
  128. package/governance/Test-Behavioral-Contract-Validation.md +38 -31
  129. package/governance/Test-Failure-Audit-Methodology.md +1 -1
  130. package/governance/Token-Family-Accessibility.md +1 -2
  131. package/governance/Token-Family-Blend.md +18 -16
  132. package/governance/Token-Family-Blur.md +0 -1
  133. package/governance/Token-Family-Border.md +1 -2
  134. package/governance/Token-Family-Color.md +0 -1
  135. package/governance/Token-Family-Glow.md +1 -2
  136. package/governance/Token-Family-Layering.md +0 -1
  137. package/governance/Token-Family-Motion.md +1 -2
  138. package/governance/Token-Family-Opacity.md +0 -1
  139. package/governance/Token-Family-Radius.md +1 -2
  140. package/governance/Token-Family-Responsive.md +1 -2
  141. package/governance/Token-Family-Shadow.md +1 -2
  142. package/governance/Token-Family-Sizing.md +0 -1
  143. package/governance/Token-Family-Spacing.md +1 -2
  144. package/governance/Token-Family-Typography.md +1 -2
  145. package/governance/Token-Governance.md +8 -8
  146. package/governance/Token-Quick-Reference.md +47 -34
  147. package/governance/Token-Resolution-Patterns.md +1 -1
  148. package/governance/Token-Semantic-Structure.md +1 -1
  149. package/governance/Web-Authoring-Standards.md +5 -5
  150. package/governance/browser-distribution-guide.md +1 -4
  151. package/governance/classification-map.md +474 -0
  152. package/governance/completion-documentation-guide.md +23 -37
  153. package/governance/component-meta-authoring-guide.md +1 -1
  154. package/governance/cross-platform-vs-platform-specific-decision-framework.md +1 -1
  155. package/governance/platform-implementation-guidelines.md +2 -3
  156. package/governance/release-management-system.md +28 -63
  157. package/governance/rosetta-system-principles.md +8 -6
  158. package/governance/stemma-system-principles.md +18 -17
  159. package/mcp-server/src/index.ts +24 -6
  160. package/mcp-server/src/indexer/DocumentIndexer.ts +119 -9
  161. package/mcp-server/src/indexer/__tests__/bare-id-crossrefs.test.ts +250 -0
  162. package/mcp-server/src/indexer/cross-ref-parser.ts +29 -1
  163. package/mcp-server/src/indexer/index-health.ts +27 -2
  164. package/mcp-server/src/query/__tests__/find-docs-calibration.test.ts +11 -26
  165. package/mcp-server/src/relocation-integrity-gate/__tests__/relocation-integrity-gate.test.ts +72 -5
  166. package/mcp-server/src/relocation-integrity-gate/relocation-integrity-gate.ts +81 -24
  167. package/mcp-server/src/tools/list-cross-references.ts +2 -2
  168. package/package.json +24 -26
  169. package/src/__tests__/browser-distribution/css-bundling.test.ts +6 -4
  170. package/src/__tests__/console-allowlist.json +14 -0
  171. package/src/__tests__/console-fail-setup.ts +169 -0
  172. package/src/__tests__/integration/Spec107-DesignLanguageContext.test.ts +16 -0
  173. package/src/__tests__/stemma-system/behavioral-contract-validation.test.ts +70 -17
  174. package/src/__tests__/stemma-system/contract-catalog-name-validation.test.ts +28 -0
  175. package/src/__tests__/stemma-system/form-inputs-contracts.test.ts +223 -16
  176. package/src/__tests__/stemma-system/input-text-native-base-call-alignment.test.ts +298 -0
  177. package/src/blend/OklchBlendCalculator.ts +3 -0
  178. package/src/blend/ThemeAwareBlendUtilities.android.kt +3 -0
  179. package/src/blend/ThemeAwareBlendUtilities.ios.swift +3 -0
  180. package/src/blend/ThemeAwareBlendUtilities.web.ts +9 -1
  181. package/src/blend/__tests__/InteractionStateAudit.test.ts +12 -9
  182. package/src/build/errors/__tests__/ErrorHandler.integration.test.ts +8 -0
  183. package/src/build/errors/__tests__/ErrorHandler.test.ts +5 -0
  184. package/src/build/tokens/__tests__/defineComponentTokens.test.ts +113 -0
  185. package/src/build/tokens/defineComponentTokens.ts +43 -1
  186. package/src/build/workflow/__tests__/CICDIntegration.test.ts +12 -1
  187. package/src/cli/__tests__/init.test.ts +45 -11
  188. package/src/components/core/Avatar-Base/Avatar-Base.schema.yaml +1 -1
  189. package/src/components/core/Avatar-Base/__tests__/Avatar.accessibility.test.ts +121 -7
  190. package/src/components/core/Avatar-Base/__tests__/Avatar.image.test.ts +3 -0
  191. package/src/components/core/Avatar-Base/__tests__/Avatar.test.ts +15 -6
  192. package/src/components/core/Avatar-Base/avatar.tokens.ts +31 -34
  193. package/src/components/core/Avatar-Base/contracts.yaml +11 -1
  194. package/src/components/core/Avatar-Base/index.ts +1 -1
  195. package/src/components/core/Avatar-Base/platforms/web/Avatar.web.ts +24 -5
  196. package/src/components/core/Badge-Count-Base/contracts.yaml +1 -1
  197. package/src/components/core/Badge-Label-Base/contracts.yaml +1 -1
  198. package/src/components/core/Button-CTA/Button-CTA.schema.yaml +2 -12
  199. package/src/components/core/Button-CTA/README.md +3 -6
  200. package/src/components/core/Button-CTA/__tests__/ButtonCTA.test.ts +35 -89
  201. package/src/components/core/Button-CTA/__tests__/setup.test.ts +0 -2
  202. package/src/components/core/Button-CTA/__tests__/test-utils.ts +0 -2
  203. package/src/components/core/Button-CTA/contracts.yaml +6 -29
  204. package/src/components/core/Button-CTA/examples/BasicUsage.html +2 -14
  205. package/src/components/core/Button-CTA/examples/BasicUsage.tsx +17 -44
  206. package/src/components/core/Button-CTA/platforms/android/ButtonCTA.android.kt +12 -20
  207. package/src/components/core/Button-CTA/platforms/ios/ButtonCTA.ios.swift +12 -51
  208. package/src/components/core/Button-CTA/platforms/web/ButtonCTA.web.css +2 -26
  209. package/src/components/core/Button-CTA/platforms/web/ButtonCTA.web.ts +18 -71
  210. package/src/components/core/Button-CTA/types.ts +10 -28
  211. package/src/components/core/Button-Icon/buttonIcon.tokens.ts +43 -27
  212. package/src/components/core/Chip-Base/__tests__/ChipBase.test.ts +13 -0
  213. package/src/components/core/Chip-Filter/__tests__/ChipFilter.test.ts +13 -0
  214. package/src/components/core/Chip-Input/__tests__/ChipInput.test.ts +13 -0
  215. package/src/components/core/Input-Text-Base/Input-Text-Base.schema.yaml +30 -2
  216. package/src/components/core/Input-Text-Base/README.md +25 -2
  217. package/src/components/core/Input-Text-Base/__tests__/focusIndicators.test.ts +16 -15
  218. package/src/components/core/Input-Text-Base/contracts.yaml +90 -0
  219. package/src/components/core/Input-Text-Base/platforms/android/InputTextBase.android.kt +26 -12
  220. package/src/components/core/Input-Text-Base/platforms/ios/InputTextBase.ios.swift +195 -59
  221. package/src/components/core/Input-Text-Base/types.ts +13 -1
  222. package/src/components/core/Input-Text-Email/Input-Text-Email.schema.yaml +5 -1
  223. package/src/components/core/Input-Text-Email/README.md +8 -7
  224. package/src/components/core/Input-Text-Email/platforms/android/InputTextEmail.android.kt +1 -4
  225. package/src/components/core/Input-Text-Email/platforms/ios/InputTextEmail.ios.swift +2 -16
  226. package/src/components/core/Input-Text-Password/Input-Text-Password.schema.yaml +10 -3
  227. package/src/components/core/Input-Text-Password/README.md +9 -8
  228. package/src/components/core/Input-Text-Password/contracts.yaml +5 -0
  229. package/src/components/core/Input-Text-Password/platforms/android/InputTextPassword.android.kt +17 -7
  230. package/src/components/core/Input-Text-Password/platforms/ios/InputTextPassword.ios.swift +22 -20
  231. package/src/components/core/Input-Text-Password/platforms/web/InputTextPassword.web.ts +11 -2
  232. package/src/components/core/Input-Text-PhoneNumber/Input-Text-PhoneNumber.schema.yaml +5 -1
  233. package/src/components/core/Input-Text-PhoneNumber/README.md +9 -8
  234. package/src/components/core/Input-Text-PhoneNumber/platforms/android/InputTextPhoneNumber.android.kt +2 -5
  235. package/src/components/core/Input-Text-PhoneNumber/platforms/ios/InputTextPhoneNumber.ios.swift +3 -17
  236. package/src/components/core/Nav-Header-App/contracts.yaml +1 -1
  237. package/src/components/core/Nav-SegmentedChoice-Base/contracts.yaml +1 -1
  238. package/src/components/core/Progress-Indicator-Connector-Base/contracts.yaml +1 -1
  239. package/src/components/core/Progress-Indicator-Label-Base/contracts.yaml +1 -1
  240. package/src/components/core/Progress-Indicator-Node-Base/contracts.yaml +1 -1
  241. package/src/components/core/Progress-Stepper-Base/__tests__/StepperBase.test.ts +5 -2
  242. package/src/components/core/Progress-Stepper-Detailed/__tests__/StepperDetailed.test.ts +5 -2
  243. package/src/generators/DTCGFormatGenerator.ts +6 -0
  244. package/src/generators/TokenFileGenerator.ts +7 -2
  245. package/src/generators/__tests__/DTCGConfigOptions.test.ts +14 -5
  246. package/src/integration/BuildErrorHandler.ts +2 -2
  247. package/src/tokens/OpacityTokens.ts +1 -1
  248. package/src/tokens/__tests__/OpacityTokens.test.ts +3 -1
  249. package/src/tokens/__tests__/ProgressTokenCompliance.test.ts +5 -3
  250. package/src/tokens/__tests__/ProgressTokenFormulas.test.ts +11 -11
  251. package/src/tokens/__tests__/ProgressTokenTranslation.test.ts +22 -20
  252. package/src/tokens/component/progress.ts +83 -21
  253. package/src/tokens/semantic/BlendTokens.ts +26 -5
  254. package/src/tokens/semantic/OpacityTokens.ts +4 -4
  255. package/src/types/ComponentTypes.ts +1 -1
  256. package/src/types/generated/TokenTypes.ts +1 -1
  257. package/src/validators/StemmaTokenUsageValidator.ts +3 -2
  258. package/token-index/components.yaml +8 -8
  259. package/token-index/semantics.yaml +1 -2
  260. package/src/tools/release/__tests__/ChangeClassifier.test.ts +0 -133
  261. package/src/tools/release/__tests__/ChangeExtractor.test.ts +0 -222
  262. package/src/tools/release/__tests__/GitHubPublisher.test.ts +0 -240
  263. package/src/tools/release/__tests__/NotesRenderer.test.ts +0 -142
  264. package/src/tools/release/__tests__/NpmPublisher.test.ts +0 -289
  265. package/src/tools/release/__tests__/PipelineIntegration.test.ts +0 -188
  266. package/src/tools/release/__tests__/ReleasePipeline.test.ts +0 -192
  267. package/src/tools/release/__tests__/SemanticVersionValidator.test.ts +0 -49
  268. package/src/tools/release/__tests__/SummaryScanner.test.ts +0 -141
  269. package/src/tools/release/__tests__/TagResolver.test.ts +0 -91
  270. package/src/tools/release/__tests__/VersionCalculator.test.ts +0 -270
  271. package/src/tools/release/__tests__/helpers/NpmMockHelper.ts +0 -80
  272. package/src/tools/release/cli/ReleasePipeline.ts +0 -165
  273. package/src/tools/release/cli/release-tool.ts +0 -107
  274. package/src/tools/release/pipeline/ChangeClassifier.ts +0 -61
  275. package/src/tools/release/pipeline/ChangeExtractor.ts +0 -87
  276. package/src/tools/release/pipeline/NotesRenderer.ts +0 -66
  277. package/src/tools/release/pipeline/SummaryScanner.ts +0 -70
  278. package/src/tools/release/pipeline/TagResolver.ts +0 -40
  279. package/src/tools/release/pipeline/VersionCalculator.ts +0 -375
  280. package/src/tools/release/publishers/GitHubPublisher.ts +0 -228
  281. package/src/tools/release/publishers/NpmPublisher.ts +0 -196
  282. package/src/tools/release/release-config.json +0 -5
  283. package/src/tools/release/types/index.ts +0 -282
  284. package/src/tools/release/validators/SemanticVersionValidator.ts +0 -67
@@ -8,7 +8,7 @@ description: Comprehensive completion and summary documentation guide — two-do
8
8
  # Completion Documentation Guide
9
9
 
10
10
  **Date**: 2026-01-03
11
- **Last Reviewed**: 2026-02-28
11
+ **Last Reviewed**: 2026-07-05
12
12
  **Purpose**: Comprehensive guide for creating completion and summary documentation
13
13
  **Organization**: process-standard
14
14
  **Scope**: cross-project
@@ -24,9 +24,9 @@ This guide consolidates all guidance for creating completion documentation, incl
24
24
  - What content to include (documentation tiers)
25
25
  - Where to place files (directory structure)
26
26
  - How to name files (naming conventions)
27
- - Why summary docs matter (release detection)
27
+ - Why summary docs matter (release-note source material)
28
28
 
29
- **Key Principle**: Parent task completion requires TWO documents - a detailed completion doc for internal knowledge preservation and a summary doc for release detection and public-facing release notes.
29
+ **Key Principle**: Parent task completion requires TWO documents - a detailed completion doc for internal knowledge preservation and a summary doc as public-facing release-note source material.
30
30
 
31
31
  ---
32
32
 
@@ -39,12 +39,12 @@ Parent task completion produces two complementary documents:
39
39
  | Document Type | Location | Purpose | Audience |
40
40
  |---------------|----------|---------|----------|
41
41
  | **Detailed Completion Doc** | `.kiro/specs/[spec-name]/completion/` | Comprehensive internal documentation | Internal team, knowledge preservation |
42
- | **Summary Doc** | `docs/specs/[spec-name]/` | Concise, commit-style summary | Public-facing, release notes, hook trigger |
42
+ | **Summary Doc** | `docs/specs/[spec-name]/` | Concise, commit-style summary | Public-facing, release-note source |
43
43
 
44
44
  **Rationale**:
45
- - **Hook Triggering**: The `.kiro/` directory is filtered from Kiro IDE's file watching system. Summary documents in `docs/specs/` enable automatic release detection.
46
- - **Dual Purpose**: Summary documents serve both as hook triggers and as concise, public-facing release note content.
45
+ - **Dual Purpose**: Summary documents are the concise, public-facing record of each parent task — the source material the release recipe reads when authoring release notes.
47
46
  - **Clear Separation**: Detailed completion docs (internal knowledge preservation) remain in `.kiro/`, while summaries (public-facing) live in `docs/`.
47
+ - *(Historical: the `docs/`-placement also served a Kiro release-detection hook, deleted 2026-08-12 — Q6 ballot. The placement stays: the public/internal split earns it on its own.)*
48
48
 
49
49
  ### When to Create Each Document
50
50
 
@@ -78,7 +78,7 @@ Documentation tiers define the depth and comprehensiveness of completion documen
78
78
  **For complete tier definitions and templates**, query Spec Planning Standards via MCP:
79
79
 
80
80
  ```
81
- get_section({ path: ".kiro/steering/Process-Spec-Planning.md", heading: "Three-Tier Completion Documentation System" })
81
+ get_section({ path: "process-spec-planning", heading: "Three-Tier Completion Documentation System" })
82
82
  ```
83
83
 
84
84
  ---
@@ -130,10 +130,10 @@ docs/specs/cross-platform-build-system/
130
130
  ### Two-Directory Structure
131
131
 
132
132
  ```
133
- docs/specs/[spec-name]/ # Public-facing documentation (TRIGGERS HOOKS)
134
- ├── task-1-summary.md # ✅ Parent task summary (triggers release detection)
135
- ├── task-2-summary.md # ✅ Parent task summary (triggers release detection)
136
- └── task-N-summary.md # ✅ Parent task summary (triggers release detection)
133
+ docs/specs/[spec-name]/ # Public-facing documentation
134
+ ├── task-1-summary.md # ✅ Parent task summary (release-note source)
135
+ ├── task-2-summary.md # ✅ Parent task summary (release-note source)
136
+ └── task-N-summary.md # ✅ Parent task summary (release-note source)
137
137
 
138
138
  .kiro/specs/[spec-name]/ # Internal documentation (NO HOOK TRIGGERS)
139
139
  ├── requirements.md # ❌ Spec requirements (no hook trigger)
@@ -150,7 +150,7 @@ docs/specs/[spec-name]/ # Public-facing documentation (TRIGGER
150
150
 
151
151
  | Location | Purpose | Hook Trigger | Audience |
152
152
  |----------|---------|--------------|----------|
153
- | `docs/specs/[spec-name]/` | Concise summaries | ✅ Yes | Public-facing, release notes |
153
+ | `docs/specs/[spec-name]/` | Concise summaries | — (hook retired) | Public-facing, release-note source |
154
154
  | `.kiro/specs/[spec-name]/completion/` | Comprehensive docs | ❌ No | Internal, knowledge preservation |
155
155
 
156
156
  ---
@@ -166,6 +166,7 @@ docs/specs/[spec-name]/ # Public-facing documentation (TRIGGER
166
166
  **Task**: N.M [Task description from tasks.md]
167
167
  **Type**: Implementation
168
168
  **Status**: Complete
169
+ **Delegated-tier** _(optional — include ONLY if the executing agent/model diverged from the task's planned `**Agent**: <agent> (<Model>)`)_: planned `<agent> (<Model>)` → actual `<agent> (<Model>)` — <one-line reason; flag whether it was agent-evolution (routing/scope) or model-evolution (cognitive-demand)>. See `process-orchestration-model-selection`.
169
170
 
170
171
  ---
171
172
 
@@ -281,18 +282,10 @@ Detailed completion documents can optionally link to the summary document:
281
282
  ### How Summary Documents Feed Release Notes
282
283
 
283
284
  1. **Summary document created** in `docs/specs/[spec-name]/`
284
- 2. **Release tool** (`npm run release:analyze`) scans summary docs via git log since last tag
285
- 3. **ChangeExtractor** parses markdown sections into structured data
286
- 4. **ChangeClassifier** maps changes to priority tiers (🔴/🟡/🔵)
287
- 5. **NotesRenderer** generates public + internal markdown release notes
285
+ 2. **At release time**, the release author derives the shipped delta from squash-commit titles since the last tag (`git log <last-tag>..main --oneline`) and reads summary docs for each change's substance and classification (🔴/🟡/🔵)
286
+ 3. **Release notes are hand-authored** at `docs/releases/release-X.Y.Z.md` from that material — summaries are the notes' source, and the durable per-task record
288
287
 
289
- ### Automatic Analysis
290
-
291
- `commit-task.sh` runs release analysis automatically after each task commit. For on-demand analysis:
292
-
293
- ```bash
294
- npm run release:analyze
295
- ```
288
+ *(The automated release tool that formerly scanned summaries was retired 2026-08-12 — Q6 ballot `.kiro/docs/ballots/2026-08-12-q6-release-manager-retirement.md`. See Release Management System § "The Release Recipe".)*
296
289
 
297
290
  ---
298
291
 
@@ -325,14 +318,6 @@ task-10-summary.md
325
318
 
326
319
  Summary documents are ONLY for parent tasks. Subtasks only need detailed completion docs.
327
320
 
328
- ### ❌ Forgetting Manual Trigger for AI Workflows
329
-
330
- If AI agent created the summary document, you MUST run:
331
- ```bash
332
- ./.kiro/hooks/release-manager.sh auto
333
- ```
334
-
335
- ---
336
321
 
337
322
  ## Workflow Checklist
338
323
 
@@ -349,10 +334,11 @@ If AI agent created the summary document, you MUST run:
349
334
  - [ ] Run validation (`npm test` or `npm run test:all`)
350
335
  - [ ] Create detailed completion doc: `.kiro/specs/[spec-name]/completion/task-N-completion.md`
351
336
  - [ ] Create summary doc: `docs/specs/[spec-name]/task-N-summary.md`
352
- - [ ] Trigger release detection: `./.kiro/hooks/release-manager.sh auto`
353
337
  - [ ] Mark parent task complete using `taskStatus` tool
354
- - [ ] Commit changes: `./.kiro/hooks/commit-task.sh "Task N Complete: Description"`
355
- - [ ] STOP and wait for user authorization
338
+ - [ ] Complete the parent on its unit branch: `./.kiro/hooks/complete-task.sh "..."` — completion and summary docs travel on the branch.
339
+ - **If this parent IS its own merge unit** (a standalone task, or a small single-unit spec): the tooling opens the PR.
340
+ - **If this parent is one of several in a declared multi-parent unit** (spec's tasks.md unit grouping): the tooling commits the docs on the branch — **no PR yet**; the PR opens at UNIT completion.
341
+ - [ ] STOP — if a PR opened, report the PR URL; otherwise report the on-branch parent completion. The task is **accepted when the UNIT merges**.
356
342
 
357
343
  ---
358
344
 
@@ -365,7 +351,7 @@ If AI agent created the summary document, you MUST run:
365
351
 
366
352
  **MCP Queries**:
367
353
  ```
368
- get_section({ path: ".kiro/steering/Process-Spec-Planning.md", heading: "Three-Tier Completion Documentation System" })
369
- get_section({ path: ".kiro/steering/Process-Development-Workflow.md", heading: "Task Completion Workflow" })
370
- get_section({ path: ".kiro/steering/Release Management System.md", heading: "Release Pipeline Architecture" })
354
+ get_section({ path: "process-spec-planning", heading: "Three-Tier Completion Documentation System" })
355
+ get_section({ path: "process-development-workflow", heading: "Task Completion Workflow" })
356
+ get_section({ path: "release-management-system", heading: "The Release Recipe" })
371
357
  ```
@@ -229,7 +229,7 @@ Component-meta.yaml does NOT currently include a `data_shapes:` field for descri
229
229
 
230
230
  Or query via MCP:
231
231
  ```
232
- get_section({ path: ".kiro/steering/Component-Meta-Data-Shapes-Governance.md", heading: "Trigger Criteria" })
232
+ get_section({ path: "component-meta-data-shapes-governance", heading: "Trigger Criteria" })
233
233
  ```
234
234
 
235
235
  **Any agent creating or reviewing a component-meta.yaml should evaluate the trigger criteria in that doc.** If any criterion is met, follow the escalation process defined there.
@@ -9,7 +9,7 @@ description: Strategic guidance on when to use cross-platform patterns vs platfo
9
9
  # Cross-Platform vs Platform-Specific Decision Framework
10
10
 
11
11
  **Date**: 2025-12-19
12
- **Last Reviewed**: 2025-12-19
12
+ **Last Reviewed**: 2026-07-08
13
13
  **Purpose**: Strategic guidance on when to use cross-platform patterns vs platform-specific idioms
14
14
  **Organization**: process-standard
15
15
  **Scope**: cross-project
@@ -14,7 +14,7 @@ description: Guidelines for maintaining cross-platform behavioral consistency
14
14
  **Scope**: cross-project
15
15
  **Layer**: 2
16
16
  **Relevant Tasks**: component-development, cross-platform-validation, testing
17
- **Last Reviewed**: 2026-01-02
17
+ **Last Reviewed**: 2026-07-08
18
18
 
19
19
  ---
20
20
 
@@ -50,7 +50,7 @@ behavioral_contract_compliance:
50
50
 
51
51
  **Example - Float Label Animation Contract**:
52
52
  ```
53
- Contract: provides_float_label_animation
53
+ Contract: content_float_label
54
54
 
55
55
  All platforms MUST:
56
56
  ✅ Animate label from placeholder to floating position on focus
@@ -465,7 +465,6 @@ pre_implementation:
465
465
  contract_review:
466
466
  - [ ] Each contract has clear trigger conditions
467
467
  - [ ] Each contract has measurable outcomes
468
- - [ ] WCAG references included for accessibility contracts
469
468
  - [ ] Contracts are platform-agnostic (WHAT not HOW)
470
469
 
471
470
  human_ai_checkpoint:
@@ -1,14 +1,19 @@
1
1
  ---
2
2
  id: release-management-system
3
3
  inclusion: manual
4
+ name: Release Management System
5
+ description: The release recipe (derive-classify-ratify, hand-authored notes) and how agents discover what changed and why — replaces the retired automated release tool
6
+ aliases: release recipe, release process, release notes, what changed, version bump, changelog, release delta
4
7
  ---
5
8
 
6
9
  # Release Management System
7
10
 
11
+ > **Audience framing**: this documents **DesignerPunk's own** release process. Consumers of the package read it as a worked example of a recipe-over-tooling release model — the paths, scripts, and named roles below are DesignerPunk's, not yours. (Whether DesignerPunk's release notes themselves ship to consumers is an open Spec 123 question, deferred by the Q6 ballot.)
12
+
8
13
  **Date**: 2026-02-28
9
- **Last Reviewed**: 2026-02-28
10
- **Last Updated**: 2026-02-28
11
- **Purpose**: Mental model of the release management system for AI agents
14
+ **Last Reviewed**: 2026-08-12
15
+ **Last Updated**: 2026-08-12
16
+ **Purpose**: Mental model of the release process for AI agents — the recipe, and how to discover what changed and why
12
17
  **Organization**: process-standard
13
18
  **Scope**: cross-project
14
19
  **Layer**: 2
@@ -18,72 +23,32 @@ inclusion: manual
18
23
 
19
24
  ## Overview
20
25
 
21
- The release tool is an on-demand CLI at `src/tools/release/`. It replaces the previous 203-file system with a focused pipeline: discover summary docs since last git tag → extract structured changes → classify by priority → recommend version bump → generate markdown release notes → optionally create GitHub release.
22
-
23
- **Key principles:**
24
- - Runs on-demand only. No timers, no hooks, no passive file generation.
25
- - Git tags are the only persistent state. No state files, no caches, no history accumulation.
26
- - Human-reviewed before publishing. The tool recommends; Peter decides.
26
+ Releases are executed by a **documented recipe, not a standing tool**. The automated release manager (an on-demand CLI that scanned spec summary docs to recommend versions and generate notes) was **RETIRED on 2026-08-12** — Q6 ballot: `.kiro/docs/ballots/2026-08-12-q6-release-manager-retirement.md`. It was retired because the PR gate made it redundant-and-worse: every merge to `main` is one squash commit whose title is a disciplined change description, so the release delta is derivable with one `git log` — while the tool, reading only spec summaries, was structurally blind to issue-driven work and mis-recommended the v14.0.0 release outright (patch/"no consumer-facing changes" against a breaking component wave).
27
27
 
28
- ---
28
+ **Key principles (unchanged by the retirement):**
29
+ - Human-reviewed, human-decided: the recipe derives and drafts; **the repo's release owner (in DesignerPunk: Peter) ratifies the version bump and merges the release PR**.
30
+ - Git tags are the only persistent release state.
31
+ - Verification stays mechanized; judgment stays human. DesignerPunk's publish guard scripts (`check:drift`, `verify:token-index-clean`, the `prepublishOnly` chain — this repo's package scripts, not shipped to consumers) block a broken publish mechanically and are NOT part of the retired tool.
29
32
 
30
- ## Architecture
33
+ ## The Release Recipe
31
34
 
32
- ```
33
- CLI Entry Point (src/tools/release/cli/release-tool.ts)
34
- ├── analyze → ReleasePipeline.analyze()
35
- ├── notes → ReleasePipeline.generateNotes()
36
- └── release → ReleasePipeline.release()
35
+ The operational sequence lives in `.kiro/hooks/RELEASE-FLOW.md` (the PR-gated release flow). The judgment half, summarized:
37
36
 
38
- ReleasePipeline (src/tools/release/cli/ReleasePipeline.ts)
39
- ├── TagResolver — git describe --tags --abbrev=0
40
- ├── SummaryScanner — git log + glob docs/specs/*/task-*-summary.md
41
- ├── ChangeExtractor — parse summary doc markdown sections
42
- ├── ChangeClassifier — map to 🔴 breaking / 🟡 prominent / 🔵 context
43
- ├── NotesRenderer — markdown generation (public + internal)
44
- └── GitHubPublisher — git tag + GitHub release creation
45
- ```
46
-
47
- ---
37
+ 1. **Derive the delta**: `git log $(git describe --tags --abbrev=0)..main --oneline` — every line is a squash-merged PR title (the changelog spine). Scope a second pass to the shipped surface to separate consumer-facing from internal — **the authoritative shipped-surface list is `package.json` `files[]`** (fifteen-plus roots beyond `src/`, including `governance/` and the other served-content roots; scoping to `src/` alone would have dropped v14.0.0's docs-corpus entry).
38
+ 2. **Classify**: for each change, read its task summary (`docs/specs/…`) or PR body for substance; classify 🔴 breaking / 🟡 minor / 🔵 patch-or-internal. Issue-driven work has no summary doc — its PR title and body are the record; do not assume spec-shaped work is the whole delta (the retired tool's fatal assumption).
39
+ 3. **Recommend the bump; the release owner ratifies.** Removals or behavior breaks → major. New behavior → minor. Fixes/internal → patch.
40
+ 4. **Hand-author the notes** at `docs/releases/release-X.Y.Z.md` (v14.0.0 is the format precedent). Notes ride the release PR with the version bump and any token-index regeneration.
41
+ 5. **Publish per RELEASE-FLOW.md** (repo-internal; and the dual-registry playbook it references): release PR → the release owner merges → publish from merged `main` → then tag and GitHub release: `git tag -a vX.Y.Z && git push origin vX.Y.Z && gh release create vX.Y.Z --notes-file docs/releases/release-X.Y.Z.md`.
48
42
 
49
- ## CLI Commands
50
-
51
- | Command | What It Does | When to Use |
52
- |---------|-------------|-------------|
53
- | `npm run release:analyze` | Scan changes since last tag, display recommendation | Check what's accumulated |
54
- | `npm run release:notes` | Generate markdown release notes to `docs/releases/` | Preview release content |
55
- | `npm run release:run` | Full release: notes + tag + GitHub publish | Actual release |
56
- | `npm run release:run -- --dry-run` | Preview release without tagging or publishing | Pre-release check |
57
-
58
- Shell wrapper: `./.kiro/hooks/release-manager.sh analyze|notes|release`
59
-
60
- ---
43
+ ## Discovering What Changed and Why
61
44
 
62
- ## AI Agent Decision Points
45
+ Agents answering "what changed, and why?" — for any purpose, not just releases — follow the record chain. *(Consumer note: in a consumer repo only the served governance corpus is reachable; the chain's other paths are DesignerPunk-internal — the PATTERN transfers, the paths don't.)*
63
46
 
64
- ### 1. Summary Document Quality
65
- Release notes are generated from summary docs. Better summaries → better release notes.
66
- - **What Was Done** → becomes the change description
67
- - **Key Changes** → becomes the bullet points
68
- - **Deliverables** → drives priority classification (🔴/🟡/🔵)
47
+ 1. **What, at a glance**: squash-commit titles on `main` (`git log vX..vY --oneline`, or between any two points). Every commit is a PR with a disciplined title.
48
+ 2. **What, curated per release**: `docs/releases/release-X.Y.Z.md` — hand-authored, consumer-facing framing, breaking changes called out with migration guidance.
49
+ 3. **Why, per task**: `docs/specs/[spec]/task-N-summary.md` (public summary) and `.kiro/specs/[spec]/completion/` (detailed record) — for spec-shaped work. For issue-driven work: the PR body and any `.kiro/issues/` record.
50
+ 4. **Why, decision-grade**: `.kiro/docs/ballots/` (ratified decisions with their evidence and counter-arguments) and `governance/classification-map.md` (per-rule classifications with dated history). When a change traces to a ruling, the ballot is the authoritative why.
69
51
 
70
- ### 2. Deliverables Section
71
- When present, the `## Deliverables *(optional)*` section drives classification directly:
72
- - `🔴` → breaking/consumer-facing → major bump
73
- - `🟡` → ecosystem → minor bump
74
- - `🔵` → internal/context → patch bump
75
-
76
- When absent, keyword heuristics apply (less accurate, human-reviewed anyway).
77
-
78
- ### 3. Summary Document Location
79
- Must be `docs/specs/[spec-name]/task-N-summary.md` — the scanner looks here via git log.
80
-
81
- ---
82
-
83
- ## Post-Commit Analysis
84
-
85
- `commit-task.sh` runs `release:analyze` after each task commit (non-blocking, fails silently). This provides immediate feedback on accumulated change significance. Skip with `--no-analyze` flag.
86
-
87
- ---
52
+ ## Historical Note
88
53
 
89
- *For operational task completion workflow, see Process-Development-Workflow.md.*
54
+ The retired tool's own history is instructive: it replaced a 203-file predecessor (Spec 065's rebuild), and its retirement continues that simplification — 203 files → 24 files → a recipe — completed once the PR gate supplied, as a by-product of merge discipline, the structured change record the tooling existed to reconstruct. Records: Spec 065 (the rebuild), the Q6 ballot (the retirement), `docs/releases/release-14.0.0.md` (the live trial that settled it).
@@ -13,7 +13,7 @@ description: Rosetta System foundational principles — primitive-to-semantic hi
13
13
  **Scope**: cross-project
14
14
  **Layer**: 2
15
15
  **Relevant Tasks**: token-development, architecture, spec-planning
16
- **Last Reviewed**: 2026-01-03
16
+ **Last Reviewed**: 2026-07-09
17
17
 
18
18
  ---
19
19
 
@@ -138,10 +138,12 @@ Mathematical foundation allows documented exceptions for design requirements:
138
138
  | **Radius** | Shape definition | radius100, radius200 | radius.button, radius.card |
139
139
  | **Shadow** | Depth and elevation | shadowBlur200, shadowOpacity300 | shadow.container, shadow.modal |
140
140
  | **Glow** | Emphasis effects | glowBlur200, glowOpacity100 | glow.focus, glow.highlight |
141
- | **Opacity** | Transparency | opacity048, opacity080 | opacity.disabled, opacity.hover |
141
+ | **Opacity** | Transparency | opacity048, opacity080 | opacity.ghost, opacity.heavy |
142
142
  | **Blend** | Color modification | blend100, blend200 | blend.hoverDarker, blend.focusSaturate |
143
143
  | **Border** | Edge definition | borderWidth100, borderWidth200 | border.input, border.focus |
144
144
  | **Motion** | Animation timing | duration250, easingStandard | motion.floatLabel |
145
+ | **Sizing** | Component dimensions (width, height, box size) | size100, size300 | - |
146
+ | **Blur** | Edge softness, radial spread, backdrop obscuring (composed into Shadow, Glow) | blur100, blur200 | - |
145
147
  | **Layering** | Stacking order | - | zIndex.modal, elevation.card |
146
148
  | **Accessibility** | WCAG compliance | tapArea44, tapArea48 | accessibility.touchTarget |
147
149
 
@@ -522,8 +524,8 @@ Rosetta Token System
522
524
  Rosetta System documentation is accessible via MCP:
523
525
 
524
526
  ```
525
- get_document_summary({ path: ".kiro/steering/rosetta-system-principles.md" })
526
- get_section({ path: ".kiro/steering/rosetta-system-principles.md", heading: "Mathematical Relationships" })
527
+ get_document_summary({ path: "rosetta-system-principles" })
528
+ get_section({ path: "rosetta-system-principles", heading: "Mathematical Relationships" })
527
529
  ```
528
530
 
529
531
  ---
@@ -581,8 +583,8 @@ get_section({ path: ".kiro/steering/rosetta-system-principles.md", heading: "Mat
581
583
  ## Related Documentation
582
584
 
583
585
  - [Stemma System Principles](stemma-system-principles) - Relational foundation for component development
584
- - [Civitas System Overview](civitas-system-overview) - Governance foundation for operational consistency
585
- - [DesignerPunk Systems Overview](designerpunk-systems-overview) - Visual architecture of all three systems
586
+ - [Civitas System Overview](../.kiro/steering/Civitas-System-Overview.md) - Governance foundation for operational consistency
587
+ - [DesignerPunk Systems Overview](../.kiro/steering/DesignerPunk-Systems-Overview.md) - Visual architecture of all three systems
586
588
  - [Token System Overview](../../docs/token-system-overview.md) - Master document mapping token files
587
589
  - [Token Quick Reference](token-quick-reference) - Token documentation routing
588
590
  - [Token Architecture 2.0 Mathematics](../../preserved-knowledge/token-architecture-2-0-mathematics.md) - Detailed mathematical formulas
@@ -13,7 +13,7 @@ description: Foundational principles and governance for systematic component dev
13
13
  **Scope**: cross-project
14
14
  **Layer**: 2
15
15
  **Relevant Tasks**: component-development, architecture, spec-planning
16
- **Last Reviewed**: 2026-01-01
16
+ **Last Reviewed**: 2026-07-09
17
17
 
18
18
  ---
19
19
 
@@ -127,7 +127,7 @@ Behavioral contracts work uniformly across web, iOS, and Android:
127
127
  | **Data Displays** | Information presentation | DataDisplay-Base | Placeholder |
128
128
  | **Dividers** | Visual separation | Divider-Base | Placeholder |
129
129
  | **Loading** | Progress indication | Loading-Base | Placeholder |
130
- | **Navigation** | Wayfinding | Nav-Base | Placeholder |
130
+ | **Navigation** | Wayfinding | Nav-Header-Base | Active |
131
131
 
132
132
  ### Family Inheritance Structure
133
133
 
@@ -161,7 +161,8 @@ base_contracts:
161
161
  - validatable
162
162
  - float_label_animation
163
163
  - error_state_display
164
- - disabled_state
164
+ # No disabled_state — DesignerPunk does not support disabled states
165
+ # (adjudicated 2026-07-15). If unavailable, don't render the component.
165
166
 
166
167
  # Input-Text-Email extends with:
167
168
  extended_contracts:
@@ -554,11 +555,9 @@ Input-Text-Base:
554
555
  type: string
555
556
  required: false
556
557
  description: Placeholder text when empty
557
- disabled:
558
- type: boolean
559
- required: false
560
- default: false
561
- description: Whether input is disabled
558
+ # No `disabled` prop — DesignerPunk does not support disabled states
559
+ # (adjudicated 2026-07-15). If the field is unavailable, don't render it;
560
+ # use `readOnly` when the value should stay visible but not be editable.
562
561
  error:
563
562
  type: string
564
563
  required: false
@@ -577,10 +576,9 @@ Input-Text-Base:
577
576
  description: Displays error message and visual error indication
578
577
  platforms: [web, ios, android]
579
578
  required: true
580
- - name: supports_disabled_state
581
- description: Prevents interaction when disabled
582
- platforms: [web, ios, android]
583
- required: true
579
+ # No supports_disabled_state contract — DesignerPunk does not support
580
+ # disabled states for usability and accessibility reasons (adjudicated
581
+ # 2026-07-15). If unavailable, don't render the component.
584
582
 
585
583
  tokens:
586
584
  - typography.input.*
@@ -712,7 +710,10 @@ LoginForm:
712
710
  behavioral_contracts:
713
711
  - form_validation_on_submit
714
712
  - field_validation_on_blur
715
- - submit_button_disabled_until_valid
713
+ # Submit button stays interactive at all times — validation runs on press
714
+ # and surfaces field errors. DesignerPunk does not support disabled states
715
+ # (adjudicated 2026-07-15), so never gate the button on form validity.
716
+ - submit_validates_on_press
716
717
  ```
717
718
 
718
719
  #### Feed Post Pattern
@@ -828,8 +829,8 @@ Rosetta Token System
828
829
  Stemma System documentation is accessible via MCP:
829
830
 
830
831
  ```
831
- get_document_summary({ path: ".kiro/steering/stemma-system-principles.md" })
832
- get_section({ path: ".kiro/steering/stemma-system-principles.md", heading: "Component Schema Format" })
832
+ get_document_summary({ path: "stemma-system-principles" })
833
+ get_section({ path: "stemma-system-principles", heading: "Component Schema Format" })
833
834
  ```
834
835
 
835
836
  ---
@@ -886,8 +887,8 @@ get_section({ path: ".kiro/steering/stemma-system-principles.md", heading: "Comp
886
887
 
887
888
  ## Related Documentation
888
889
 
889
- - [Civitas System Overview](civitas-system-overview) - Governance foundation for operational consistency
890
- - [DesignerPunk Systems Overview](designerpunk-systems-overview) - Visual architecture of all three systems
890
+ - [Civitas System Overview](../.kiro/steering/Civitas-System-Overview.md) - Governance foundation for operational consistency
891
+ - [DesignerPunk Systems Overview](../.kiro/steering/DesignerPunk-Systems-Overview.md) - Visual architecture of all three systems
891
892
  - [Primitive vs Semantic Usage Philosophy](primitive-vs-semantic-usage-philosophy) - Comprehensive decision guidance for component selection
892
893
  - [Component Schema Format Specification](component-schema-format) - Formal schema structure and validation rules
893
894
  - [Component Readiness Status System](component-readiness-status) - Comprehensive readiness status definitions and transition guidelines
@@ -346,7 +346,15 @@ class MCPDocumentationServer {
346
346
  }
347
347
 
348
348
  /**
349
- * Set up graceful shutdown handlers
349
+ * Set up graceful shutdown handlers.
350
+ *
351
+ * stdin EOF ('end'/'close') is a first-class shutdown trigger: a stdio MCP server
352
+ * whose parent client died (or gracefully closed the pipe) has no one to serve, but
353
+ * the file watcher keeps the event loop alive forever — found live at Spec 122 U3
354
+ * (~230 orphaned servers accumulated across harness runs, wedging later boots).
355
+ * Self-exiting on EOF also makes graceful client closes immediate: the MCP SDK's
356
+ * StdioClientTransport.close() ends stdin and waits up to 2s for exactly this exit
357
+ * before escalating to SIGTERM.
350
358
  */
351
359
  private setupShutdownHandlers(): void {
352
360
  const shutdown = async () => {
@@ -356,6 +364,8 @@ class MCPDocumentationServer {
356
364
 
357
365
  process.on('SIGINT', shutdown);
358
366
  process.on('SIGTERM', shutdown);
367
+ process.stdin.on('end', shutdown);
368
+ process.stdin.on('close', shutdown);
359
369
  }
360
370
  }
361
371
 
@@ -417,11 +427,19 @@ async function main(): Promise<void> {
417
427
  await server.start();
418
428
  }
419
429
 
420
- // Run the server
421
- main().catch((error) => {
422
- console.error('[MCP Server] Fatal error:', error);
423
- process.exit(1);
424
- });
430
+ // Run the server ONLY when this module is the process entry point (executed
431
+ // directly — `node mcp-server/dist/index.js`, or the esbuild `dist/mcp/docs-mcp.js`
432
+ // bundle a consumer launches). Importing this module as a LIBRARY (Spec 122 imports
433
+ // the re-exported WORKFLOW_RULES from the package entry) must NOT start the server;
434
+ // the previous unconditional call started an MCP server as an import side effect.
435
+ // This module is CommonJS (tsconfig `module: commonjs`), so `require.main === module`
436
+ // is the correct entry check — verified to still fire under the esbuild CJS bundle.
437
+ if (require.main === module) {
438
+ main().catch((error) => {
439
+ console.error('[MCP Server] Fatal error:', error);
440
+ process.exit(1);
441
+ });
442
+ }
425
443
 
426
444
  // Export for testing
427
445
  export { MCPDocumentationServer };