groundwork-method 0.0.1 → 0.10.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 (629) hide show
  1. package/CHANGELOG.md +781 -0
  2. package/LICENSE +21 -0
  3. package/README.md +44 -29
  4. package/bin/groundwork.js +1654 -0
  5. package/dist/src/generators/add-capability/generator.d.ts +8 -0
  6. package/dist/src/generators/add-capability/generator.js +60 -0
  7. package/dist/src/generators/add-capability/generator.js.map +1 -0
  8. package/dist/src/generators/cli-app/generator.d.ts +9 -0
  9. package/dist/src/generators/cli-app/generator.js +140 -0
  10. package/dist/src/generators/cli-app/generator.js.map +1 -0
  11. package/dist/src/generators/docs-site/generator.d.ts +5 -0
  12. package/dist/src/generators/docs-site/generator.js +441 -0
  13. package/dist/src/generators/docs-site/generator.js.map +1 -0
  14. package/dist/src/generators/electron-app/generator.d.ts +6 -0
  15. package/dist/src/generators/electron-app/generator.js +261 -0
  16. package/dist/src/generators/electron-app/generator.js.map +1 -0
  17. package/dist/src/generators/flutter-app/generator.d.ts +6 -0
  18. package/dist/src/generators/flutter-app/generator.js +314 -0
  19. package/dist/src/generators/flutter-app/generator.js.map +1 -0
  20. package/dist/src/generators/go-microservice/generator.d.ts +8 -0
  21. package/dist/src/generators/go-microservice/generator.js +232 -0
  22. package/dist/src/generators/go-microservice/generator.js.map +1 -0
  23. package/dist/src/generators/nextjs-app/generator.d.ts +8 -0
  24. package/dist/src/generators/nextjs-app/generator.js +294 -0
  25. package/dist/src/generators/nextjs-app/generator.js.map +1 -0
  26. package/dist/src/generators/python-microservice/generator.d.ts +13 -0
  27. package/dist/src/generators/python-microservice/generator.js +265 -0
  28. package/dist/src/generators/python-microservice/generator.js.map +1 -0
  29. package/dist/src/generators/shared/brand-tokens.d.ts +89 -0
  30. package/dist/src/generators/shared/brand-tokens.js +308 -0
  31. package/dist/src/generators/shared/brand-tokens.js.map +1 -0
  32. package/dist/src/generators/shared/capabilities.d.ts +101 -0
  33. package/dist/src/generators/shared/capabilities.js +279 -0
  34. package/dist/src/generators/shared/capabilities.js.map +1 -0
  35. package/dist/src/generators/shared/provenance.d.ts +2 -0
  36. package/dist/src/generators/shared/provenance.js +85 -0
  37. package/dist/src/generators/shared/provenance.js.map +1 -0
  38. package/dist/src/generators/shared/scaffold-helpers.d.ts +72 -0
  39. package/dist/src/generators/shared/scaffold-helpers.js +309 -0
  40. package/dist/src/generators/shared/scaffold-helpers.js.map +1 -0
  41. package/dist/src/generators/system-test-runner/generator.d.ts +23 -0
  42. package/dist/src/generators/system-test-runner/generator.js +125 -0
  43. package/dist/src/generators/system-test-runner/generator.js.map +1 -0
  44. package/dist/src/generators/workspace-dev-cli/generator.d.ts +7 -0
  45. package/dist/src/generators/workspace-dev-cli/generator.js +138 -0
  46. package/dist/src/generators/workspace-dev-cli/generator.js.map +1 -0
  47. package/generators.json +57 -0
  48. package/lib/repo-map/grammars/tree-sitter-c.wasm +0 -0
  49. package/lib/repo-map/grammars/tree-sitter-cpp.wasm +0 -0
  50. package/lib/repo-map/grammars/tree-sitter-csharp.wasm +0 -0
  51. package/lib/repo-map/grammars/tree-sitter-dart.wasm +0 -0
  52. package/lib/repo-map/grammars/tree-sitter-go.wasm +0 -0
  53. package/lib/repo-map/grammars/tree-sitter-java.wasm +0 -0
  54. package/lib/repo-map/grammars/tree-sitter-javascript.wasm +0 -0
  55. package/lib/repo-map/grammars/tree-sitter-kotlin.wasm +0 -0
  56. package/lib/repo-map/grammars/tree-sitter-lua.wasm +0 -0
  57. package/lib/repo-map/grammars/tree-sitter-php.wasm +0 -0
  58. package/lib/repo-map/grammars/tree-sitter-python.wasm +0 -0
  59. package/lib/repo-map/grammars/tree-sitter-ruby.wasm +0 -0
  60. package/lib/repo-map/grammars/tree-sitter-rust.wasm +0 -0
  61. package/lib/repo-map/grammars/tree-sitter-scala.wasm +0 -0
  62. package/lib/repo-map/grammars/tree-sitter-swift.wasm +0 -0
  63. package/lib/repo-map/grammars/tree-sitter-tsx.wasm +0 -0
  64. package/lib/repo-map/grammars/tree-sitter-typescript.wasm +0 -0
  65. package/lib/repo-map/index.js +386 -0
  66. package/lib/repo-map/languages.js +514 -0
  67. package/lib/repo-map/pagerank.js +59 -0
  68. package/migrations/README.md +60 -0
  69. package/migrations/_template/cli-migration.js +27 -0
  70. package/migrations/gw-bet-prose-redesign.js +105 -0
  71. package/migrations/gw-drop-test-manifest.js +37 -0
  72. package/migrations/gw-register-serena-mcp.js +42 -0
  73. package/migrations/gw-relocate-hidden-skills.js +40 -0
  74. package/migrations/gw-seed-config-toml.js +24 -0
  75. package/migrations/index.json +40 -0
  76. package/package.json +70 -6
  77. package/src/AGENTS.md +36 -0
  78. package/src/config/config.toml +30 -0
  79. package/src/config/groundwork-state.json +5 -0
  80. package/src/docs/llms.txt +72 -0
  81. package/src/docs/principles/ai-native/agent-native-systems.md +90 -0
  82. package/src/docs/principles/ai-native/agentic-systems.md +78 -0
  83. package/src/docs/principles/ai-native/ai-engineering.md +100 -0
  84. package/src/docs/principles/ai-native/ai-native-product.md +76 -0
  85. package/src/docs/principles/delivery/cost-engineering.md +89 -0
  86. package/src/docs/principles/delivery/day-2-operational-baseline.md +57 -0
  87. package/src/docs/principles/delivery/devex.md +88 -0
  88. package/src/docs/principles/delivery/platform.md +101 -0
  89. package/src/docs/principles/delivery/progressive-delivery.md +92 -0
  90. package/src/docs/principles/design/ai-native-design.md +73 -0
  91. package/src/docs/principles/design/design-foundations.md +80 -0
  92. package/src/docs/principles/design/design-systems-and-tokens.md +72 -0
  93. package/src/docs/principles/design/interaction-and-motion.md +69 -0
  94. package/src/docs/principles/design/layout-and-space.md +72 -0
  95. package/src/docs/principles/design/usability-and-ux.md +68 -0
  96. package/src/docs/principles/design/visual-design.md +84 -0
  97. package/src/docs/principles/foundations/code-craft.md +86 -0
  98. package/src/docs/principles/foundations/continuous-discovery.md +75 -0
  99. package/src/docs/principles/foundations/documentation.md +102 -0
  100. package/src/docs/principles/foundations/prioritization-and-appetite.md +78 -0
  101. package/src/docs/principles/foundations/product-engineering.md +90 -0
  102. package/src/docs/principles/foundations/product-risks.md +89 -0
  103. package/src/docs/principles/foundations/requirements-and-specs.md +80 -0
  104. package/src/docs/principles/foundations/success-metrics.md +66 -0
  105. package/src/docs/principles/foundations/testing.md +82 -0
  106. package/src/docs/principles/index.md +23 -0
  107. package/src/docs/principles/quality/accessibility.md +88 -0
  108. package/src/docs/principles/quality/observability.md +84 -0
  109. package/src/docs/principles/quality/performance.md +84 -0
  110. package/src/docs/principles/quality/privacy.md +92 -0
  111. package/src/docs/principles/quality/reliability.md +89 -0
  112. package/src/docs/principles/quality/security.md +78 -0
  113. package/src/docs/principles/stack/postgres.md +100 -0
  114. package/src/docs/principles/system-design/api-design.md +86 -0
  115. package/src/docs/principles/system-design/architecture-decisions.md +81 -0
  116. package/src/docs/principles/system-design/code-structure.md +104 -0
  117. package/src/docs/principles/system-design/data-engineering.md +87 -0
  118. package/src/docs/principles/system-design/durable-execution.md +89 -0
  119. package/src/docs/principles/system-design/evolutionary-architecture.md +81 -0
  120. package/src/docs/principles/system-design/identity-and-access.md +76 -0
  121. package/src/docs/principles/system-design/integration-patterns.md +84 -0
  122. package/src/docs/principles/system-design/real-time.md +83 -0
  123. package/src/docs/principles/system-design/surface-architecture.md +74 -0
  124. package/src/docs/ways-of-working/documentation.md +69 -0
  125. package/src/docs/ways-of-working/how-we-work.md +76 -0
  126. package/src/docs/ways-of-working/units-of-work.md +40 -0
  127. package/src/engineer-skills/groundwork-electron-engineer/SKILL.md +118 -0
  128. package/src/engineer-skills/groundwork-electron-engineer/references/ipc-contracts.md +138 -0
  129. package/src/engineer-skills/groundwork-electron-engineer/references/packaging-and-updates.md +82 -0
  130. package/src/engineer-skills/groundwork-electron-engineer/references/process-model.md +94 -0
  131. package/src/engineer-skills/groundwork-electron-engineer/references/security.md +107 -0
  132. package/src/engineer-skills/groundwork-electron-engineer/references/testing-and-smoke.md +107 -0
  133. package/src/engineer-skills/groundwork-electron-engineer/references/theming-and-tokens.md +74 -0
  134. package/src/engineer-skills/groundwork-electron-engineer/sync-anchor.md +14 -0
  135. package/src/engineer-skills/groundwork-flutter-engineer/SKILL.md +108 -0
  136. package/src/engineer-skills/groundwork-flutter-engineer/references/accessibility.md +92 -0
  137. package/src/engineer-skills/groundwork-flutter-engineer/references/architecture.md +189 -0
  138. package/src/engineer-skills/groundwork-flutter-engineer/references/data-and-contracts.md +136 -0
  139. package/src/engineer-skills/groundwork-flutter-engineer/references/navigation.md +122 -0
  140. package/src/engineer-skills/groundwork-flutter-engineer/references/platform-channels.md +93 -0
  141. package/src/engineer-skills/groundwork-flutter-engineer/references/releases-and-distribution.md +84 -0
  142. package/src/engineer-skills/groundwork-flutter-engineer/references/state-management.md +166 -0
  143. package/src/engineer-skills/groundwork-flutter-engineer/references/testing.md +135 -0
  144. package/src/engineer-skills/groundwork-flutter-engineer/references/theming-and-design-tokens.md +109 -0
  145. package/src/engineer-skills/groundwork-flutter-engineer/references/widgets-and-composition.md +123 -0
  146. package/src/engineer-skills/groundwork-flutter-engineer/sync-anchor.md +15 -0
  147. package/src/engineer-skills/groundwork-go-engineer/SKILL.md +171 -0
  148. package/src/engineer-skills/groundwork-go-engineer/references/api-design.md +82 -0
  149. package/src/engineer-skills/groundwork-go-engineer/references/architecture.md +42 -0
  150. package/src/engineer-skills/groundwork-go-engineer/references/capability-ports.md +50 -0
  151. package/src/engineer-skills/groundwork-go-engineer/references/code-craft-security.md +34 -0
  152. package/src/engineer-skills/groundwork-go-engineer/references/concurrency.md +108 -0
  153. package/src/engineer-skills/groundwork-go-engineer/references/go-services.md +77 -0
  154. package/src/engineer-skills/groundwork-go-engineer/references/http-handlers.md +172 -0
  155. package/src/engineer-skills/groundwork-go-engineer/references/implementation-patterns.md +156 -0
  156. package/src/engineer-skills/groundwork-go-engineer/references/integration-realtime-data.md +57 -0
  157. package/src/engineer-skills/groundwork-go-engineer/references/observability.md +49 -0
  158. package/src/engineer-skills/groundwork-go-engineer/references/postgres.md +41 -0
  159. package/src/engineer-skills/groundwork-go-engineer/references/reliability-performance.md +105 -0
  160. package/src/engineer-skills/groundwork-go-engineer/references/testing.md +139 -0
  161. package/src/engineer-skills/groundwork-go-engineer/sync-anchor.md +11 -0
  162. package/src/engineer-skills/groundwork-nextjs-engineer/SKILL.md +107 -0
  163. package/src/engineer-skills/groundwork-nextjs-engineer/references/architecture.md +323 -0
  164. package/src/engineer-skills/groundwork-nextjs-engineer/references/data-fetching.md +458 -0
  165. package/src/engineer-skills/groundwork-nextjs-engineer/references/documentation.md +324 -0
  166. package/src/engineer-skills/groundwork-nextjs-engineer/references/error-boundaries.md +383 -0
  167. package/src/engineer-skills/groundwork-nextjs-engineer/references/mutations-and-forms.md +396 -0
  168. package/src/engineer-skills/groundwork-nextjs-engineer/references/performance-and-deployment.md +947 -0
  169. package/src/engineer-skills/groundwork-nextjs-engineer/references/routing-and-navigation.md +405 -0
  170. package/src/engineer-skills/groundwork-nextjs-engineer/references/server-components.md +394 -0
  171. package/src/engineer-skills/groundwork-nextjs-engineer/references/tailwind-and-styling.md +134 -0
  172. package/src/engineer-skills/groundwork-nextjs-engineer/references/testing.md +433 -0
  173. package/src/engineer-skills/groundwork-nextjs-engineer/references/type-system.md +368 -0
  174. package/src/engineer-skills/groundwork-nextjs-engineer/references/ux-principles.md +278 -0
  175. package/src/engineer-skills/groundwork-nextjs-engineer/references/visual-language.md +69 -0
  176. package/src/engineer-skills/groundwork-nextjs-engineer/sync-anchor.md +9 -0
  177. package/src/engineer-skills/groundwork-python-engineer/SKILL.md +196 -0
  178. package/src/engineer-skills/groundwork-python-engineer/references/api-standards.md +88 -0
  179. package/src/engineer-skills/groundwork-python-engineer/references/architecture.md +57 -0
  180. package/src/engineer-skills/groundwork-python-engineer/references/async-patterns.md +103 -0
  181. package/src/engineer-skills/groundwork-python-engineer/references/capability-ports.md +44 -0
  182. package/src/engineer-skills/groundwork-python-engineer/references/database.md +88 -0
  183. package/src/engineer-skills/groundwork-python-engineer/references/documentation-mcp.md +167 -0
  184. package/src/engineer-skills/groundwork-python-engineer/references/implementation-patterns.md +166 -0
  185. package/src/engineer-skills/groundwork-python-engineer/references/ml-pipelines.md +119 -0
  186. package/src/engineer-skills/groundwork-python-engineer/references/ml-systems-ai-engineering.md +74 -0
  187. package/src/engineer-skills/groundwork-python-engineer/references/observability.md +57 -0
  188. package/src/engineer-skills/groundwork-python-engineer/references/resilience.md +126 -0
  189. package/src/engineer-skills/groundwork-python-engineer/references/testing.md +177 -0
  190. package/src/engineer-skills/groundwork-python-engineer/sync-anchor.md +13 -0
  191. package/src/generators/add-capability/generator.ts +70 -0
  192. package/src/generators/add-capability/schema.json +30 -0
  193. package/src/generators/capabilities/llm/capability.json +28 -0
  194. package/src/generators/capabilities/llm/providers/anthropic/footprint.json +13 -0
  195. package/src/generators/capabilities/llm/providers/anthropic/stacks/go/internal/llm/llm.go.template +102 -0
  196. package/src/generators/capabilities/llm/providers/anthropic/stacks/python/src/__packageName__/adapters/llm.py.template +61 -0
  197. package/src/generators/capabilities/llm/providers/local/footprint.json +13 -0
  198. package/src/generators/capabilities/llm/providers/local/stacks/go/internal/llm/llm.go.template +102 -0
  199. package/src/generators/capabilities/llm/providers/local/stacks/python/src/__packageName__/adapters/llm.py.template +53 -0
  200. package/src/generators/capabilities/llm/providers/localai/footprint.json +29 -0
  201. package/src/generators/capabilities/llm/providers/localai/stacks/go/internal/llm/llm.go.template +102 -0
  202. package/src/generators/capabilities/llm/providers/localai/stacks/python/src/__packageName__/adapters/llm.py.template +53 -0
  203. package/src/generators/capabilities/llm/providers/none/footprint.json +9 -0
  204. package/src/generators/capabilities/llm/providers/none/stacks/go/internal/llm/llm.go.template +35 -0
  205. package/src/generators/capabilities/llm/providers/none/stacks/python/src/__packageName__/adapters/llm.py.template +25 -0
  206. package/src/generators/capabilities/llm/providers/ollama/footprint.json +20 -0
  207. package/src/generators/capabilities/llm/providers/ollama/stacks/go/internal/llm/llm.go.template +102 -0
  208. package/src/generators/capabilities/llm/providers/ollama/stacks/python/src/__packageName__/adapters/llm.py.template +53 -0
  209. package/src/generators/capabilities/llm/providers/openai/footprint.json +13 -0
  210. package/src/generators/capabilities/llm/providers/openai/stacks/go/internal/llm/llm.go.template +98 -0
  211. package/src/generators/capabilities/llm/providers/openai/stacks/python/src/__packageName__/adapters/llm.py.template +60 -0
  212. package/src/generators/capabilities/llm/stacks/go/internal/core/service/llm.go.template +12 -0
  213. package/src/generators/capabilities/llm/stacks/go/internal/llm/llm_test.go.template +33 -0
  214. package/src/generators/capabilities/llm/stacks/python/src/__packageName__/core/llm.py.template +15 -0
  215. package/src/generators/capabilities/llm/stacks/python/tests/contracts/test_llm.py.template +37 -0
  216. package/src/generators/cli-app/files/README.md.template +76 -0
  217. package/src/generators/cli-app/files/build.mjs.template +15 -0
  218. package/src/generators/cli-app/files/package.json.template +21 -0
  219. package/src/generators/cli-app/files/src/cli.ts.template +67 -0
  220. package/src/generators/cli-app/files/src/commands/hello.ts.template +17 -0
  221. package/src/generators/cli-app/files/src/commands/status.ts.template +23 -0
  222. package/src/generators/cli-app/files/src/core/client.test.ts.template +80 -0
  223. package/src/generators/cli-app/files/src/core/client.ts.template +64 -0
  224. package/src/generators/cli-app/files/src/registry.test.ts.template +35 -0
  225. package/src/generators/cli-app/files/src/registry.ts.template +31 -0
  226. package/src/generators/cli-app/files/tsconfig.json.template +16 -0
  227. package/src/generators/cli-app/files/tsconfig.test.json.template +11 -0
  228. package/src/generators/cli-app/generator.ts +138 -0
  229. package/src/generators/cli-app/schema.json +24 -0
  230. package/src/generators/docs-site/files/.gitignore.ejs +40 -0
  231. package/src/generators/docs-site/files/app/docs/__slug__/page.tsx +101 -0
  232. package/src/generators/docs-site/files/app/docs/layout.tsx +14 -0
  233. package/src/generators/docs-site/files/app/docs.css +43 -0
  234. package/src/generators/docs-site/files/app/layout.tsx +24 -0
  235. package/src/generators/docs-site/files/app/page.tsx +135 -0
  236. package/src/generators/docs-site/files/app/source.ts +8 -0
  237. package/src/generators/docs-site/files/components/mermaid.tsx +67 -0
  238. package/src/generators/docs-site/files/next.config.mjs +10 -0
  239. package/src/generators/docs-site/files/package.json +32 -0
  240. package/src/generators/docs-site/files/pnpm-workspace.yaml +7 -0
  241. package/src/generators/docs-site/files/postcss.config.mjs +6 -0
  242. package/src/generators/docs-site/files/source.config.ts +77 -0
  243. package/src/generators/docs-site/files/tailwind.config.js +10 -0
  244. package/src/generators/docs-site/files/tsconfig.json +27 -0
  245. package/src/generators/docs-site/generator.ts +476 -0
  246. package/src/generators/docs-site/schema.json +17 -0
  247. package/src/generators/electron-app/docs/principles/stack/electron/index.md +47 -0
  248. package/src/generators/electron-app/docs/principles/stack/electron/ipc-contracts.md +71 -0
  249. package/src/generators/electron-app/docs/principles/stack/electron/packaging-and-updates.md +59 -0
  250. package/src/generators/electron-app/docs/principles/stack/electron/process-model.md +53 -0
  251. package/src/generators/electron-app/docs/principles/stack/electron/security.md +70 -0
  252. package/src/generators/electron-app/docs/principles/stack/typescript/frontend.md +65 -0
  253. package/src/generators/electron-app/files/.gitignore.template +20 -0
  254. package/src/generators/electron-app/files/README.md.template +125 -0
  255. package/src/generators/electron-app/files/electron.vite.config.ts +31 -0
  256. package/src/generators/electron-app/files/eslint.config.mjs +92 -0
  257. package/src/generators/electron-app/files/forge.config.ts.template +44 -0
  258. package/src/generators/electron-app/files/package.json.template +54 -0
  259. package/src/generators/electron-app/files/playwright.config.ts +18 -0
  260. package/src/generators/electron-app/files/project.json.template +65 -0
  261. package/src/generators/electron-app/files/src/main/core-client.test.ts +81 -0
  262. package/src/generators/electron-app/files/src/main/core-client.ts +55 -0
  263. package/src/generators/electron-app/files/src/main/index.ts +157 -0
  264. package/src/generators/electron-app/files/src/main/ipc.ts +52 -0
  265. package/src/generators/electron-app/files/src/main/policy.test.ts +71 -0
  266. package/src/generators/electron-app/files/src/main/policy.ts +73 -0
  267. package/src/generators/electron-app/files/src/preload/index.ts +23 -0
  268. package/src/generators/electron-app/files/src/renderer/index.html.template +20 -0
  269. package/src/generators/electron-app/files/src/renderer/src/App.test.tsx +61 -0
  270. package/src/generators/electron-app/files/src/renderer/src/App.tsx.template +43 -0
  271. package/src/generators/electron-app/files/src/renderer/src/assets/main.css +40 -0
  272. package/src/generators/electron-app/files/src/renderer/src/env.d.ts +14 -0
  273. package/src/generators/electron-app/files/src/renderer/src/main.tsx +25 -0
  274. package/src/generators/electron-app/files/src/shared/ipc.ts +54 -0
  275. package/src/generators/electron-app/files/tests/smoke/app.spec.ts.template +68 -0
  276. package/src/generators/electron-app/files/tool/electron_exec.sh.template +83 -0
  277. package/src/generators/electron-app/files/tsconfig.json +7 -0
  278. package/src/generators/electron-app/files/tsconfig.node.json +27 -0
  279. package/src/generators/electron-app/files/tsconfig.web.json +22 -0
  280. package/src/generators/electron-app/files/vitest.config.ts +32 -0
  281. package/src/generators/electron-app/files/vitest.setup.ts +1 -0
  282. package/src/generators/electron-app/generator.ts +288 -0
  283. package/src/generators/electron-app/schema.json +23 -0
  284. package/src/generators/flutter-app/docs/principles/stack/flutter/architecture.md +78 -0
  285. package/src/generators/flutter-app/docs/principles/stack/flutter/index.md +38 -0
  286. package/src/generators/flutter-app/docs/principles/stack/flutter/platform-channels.md +51 -0
  287. package/src/generators/flutter-app/docs/principles/stack/flutter/releases-and-distribution.md +59 -0
  288. package/src/generators/flutter-app/docs/principles/stack/flutter/state-management.md +85 -0
  289. package/src/generators/flutter-app/docs/principles/stack/flutter/testing.md +74 -0
  290. package/src/generators/flutter-app/docs/principles/stack/flutter/widgets-and-composition.md +69 -0
  291. package/src/generators/flutter-app/files/.gitignore.template +30 -0
  292. package/src/generators/flutter-app/files/README.md.template +100 -0
  293. package/src/generators/flutter-app/files/analysis_options.yaml.template +18 -0
  294. package/src/generators/flutter-app/files/integration_test/app_test.dart.template +30 -0
  295. package/src/generators/flutter-app/files/lib/app.dart.template +24 -0
  296. package/src/generators/flutter-app/files/lib/config/app_config.dart +15 -0
  297. package/src/generators/flutter-app/files/lib/data/repositories/status_repository.dart +36 -0
  298. package/src/generators/flutter-app/files/lib/data/services/api_client.dart +71 -0
  299. package/src/generators/flutter-app/files/lib/domain/models/health_status.dart +23 -0
  300. package/src/generators/flutter-app/files/lib/main.dart +11 -0
  301. package/src/generators/flutter-app/files/lib/router.dart +23 -0
  302. package/src/generators/flutter-app/files/lib/ui/core/theme/app_theme.dart +110 -0
  303. package/src/generators/flutter-app/files/lib/ui/home/home_view.dart +89 -0
  304. package/src/generators/flutter-app/files/lib/ui/home/home_view_model.dart.template +38 -0
  305. package/src/generators/flutter-app/files/project.json.template +51 -0
  306. package/src/generators/flutter-app/files/pubspec.yaml.template +47 -0
  307. package/src/generators/flutter-app/files/test/api_client_test.dart.template +63 -0
  308. package/src/generators/flutter-app/files/test/fakes/fake_status_repository.dart.template +19 -0
  309. package/src/generators/flutter-app/files/test/home_view_test.dart.template +58 -0
  310. package/src/generators/flutter-app/files/tool/flutter_exec.sh.template +60 -0
  311. package/src/generators/flutter-app/generator.ts +362 -0
  312. package/src/generators/flutter-app/schema.json +23 -0
  313. package/src/generators/go-microservice/docs/principles/stack/go/concurrency.md +123 -0
  314. package/src/generators/go-microservice/docs/principles/stack/go/index.md +70 -0
  315. package/src/generators/go-microservice/docs/principles/stack/go/testing.md +152 -0
  316. package/src/generators/go-microservice/files/.air.toml.template +38 -0
  317. package/src/generators/go-microservice/files/.env.template +4 -0
  318. package/src/generators/go-microservice/files/.golangci.yml.template +82 -0
  319. package/src/generators/go-microservice/files/Dockerfile.dev.template +12 -0
  320. package/src/generators/go-microservice/files/asyncapi-pubsub.yaml.template +33 -0
  321. package/src/generators/go-microservice/files/asyncapi-ws.yaml.template +34 -0
  322. package/src/generators/go-microservice/files/cmd/api/main.go.template +149 -0
  323. package/src/generators/go-microservice/files/cmd/api/main_test.go.template +99 -0
  324. package/src/generators/go-microservice/files/cmd/worker/cleanup/main.go.template +39 -0
  325. package/src/generators/go-microservice/files/db/schema.sql.template +24 -0
  326. package/src/generators/go-microservice/files/go.mod.template +39 -0
  327. package/src/generators/go-microservice/files/internal/config/config.go.template +52 -0
  328. package/src/generators/go-microservice/files/internal/config/otel.go.template +93 -0
  329. package/src/generators/go-microservice/files/internal/core/domain/errors.go.template +16 -0
  330. package/src/generators/go-microservice/files/internal/core/domain/model.go.template +28 -0
  331. package/src/generators/go-microservice/files/internal/core/domain/user.go.template +13 -0
  332. package/src/generators/go-microservice/files/internal/core/pagination.go.template +16 -0
  333. package/src/generators/go-microservice/files/internal/core/service/app_service.go.template +79 -0
  334. package/src/generators/go-microservice/files/internal/core/service/event_hub.go.template +9 -0
  335. package/src/generators/go-microservice/files/internal/core/service/message_queue.go.template +10 -0
  336. package/src/generators/go-microservice/files/internal/core/service/outbox_repository.go.template +31 -0
  337. package/src/generators/go-microservice/files/internal/core/service/repository.go.template +23 -0
  338. package/src/generators/go-microservice/files/internal/core/service/user_repository.go.template +15 -0
  339. package/src/generators/go-microservice/files/internal/core/service/user_service.go.template +43 -0
  340. package/src/generators/go-microservice/files/internal/entrypoints/api/app_handler.go.template +108 -0
  341. package/src/generators/go-microservice/files/internal/entrypoints/api/auth_middleware_test.go.template +52 -0
  342. package/src/generators/go-microservice/files/internal/entrypoints/api/clerk_webhook.go.template +202 -0
  343. package/src/generators/go-microservice/files/internal/entrypoints/api/clerk_webhook_test.go.template +82 -0
  344. package/src/generators/go-microservice/files/internal/entrypoints/api/health_handler.go.template +80 -0
  345. package/src/generators/go-microservice/files/internal/entrypoints/api/idempotency/middleware.go.template +87 -0
  346. package/src/generators/go-microservice/files/internal/entrypoints/api/idempotency/middleware_test.go.template +76 -0
  347. package/src/generators/go-microservice/files/internal/entrypoints/api/idempotency/repository.go.template +37 -0
  348. package/src/generators/go-microservice/files/internal/entrypoints/api/middleware_auth.go.template +40 -0
  349. package/src/generators/go-microservice/files/internal/entrypoints/api/middleware_loadshed.go.template +38 -0
  350. package/src/generators/go-microservice/files/internal/entrypoints/api/middleware_logging.go.template +40 -0
  351. package/src/generators/go-microservice/files/internal/entrypoints/api/middleware_ratelimit.go.template +48 -0
  352. package/src/generators/go-microservice/files/internal/entrypoints/api/middleware_test.go.template +81 -0
  353. package/src/generators/go-microservice/files/internal/entrypoints/api/router.go.template +105 -0
  354. package/src/generators/go-microservice/files/internal/entrypoints/api/types.go.template +70 -0
  355. package/src/generators/go-microservice/files/internal/entrypoints/api/websocket_handler.go.template +39 -0
  356. package/src/generators/go-microservice/files/internal/httpclient/http_client.go.template +87 -0
  357. package/src/generators/go-microservice/files/internal/kafka/kafka.go.template +34 -0
  358. package/src/generators/go-microservice/files/internal/postgres/postgres.go.template +195 -0
  359. package/src/generators/go-microservice/files/internal/postgres/postgres_test.go.template +156 -0
  360. package/src/generators/go-microservice/files/internal/postgres/user_repository.go.template +56 -0
  361. package/src/generators/go-microservice/files/internal/pubsub/gcp_pubsub.go.template +35 -0
  362. package/src/generators/go-microservice/files/internal/websocket/client.go.template +151 -0
  363. package/src/generators/go-microservice/files/internal/websocket/hub.go.template +261 -0
  364. package/src/generators/go-microservice/files/scripts/apply-schema.sh.template +21 -0
  365. package/src/generators/go-microservice/files/tools/tools.go.template +10 -0
  366. package/src/generators/go-microservice/generator.ts +240 -0
  367. package/src/generators/go-microservice/schema.json +63 -0
  368. package/src/generators/nextjs-app/docs/principles/stack/typescript/frontend.md +65 -0
  369. package/src/generators/nextjs-app/files/.dockerignore.template +7 -0
  370. package/src/generators/nextjs-app/files/.env.example.template +24 -0
  371. package/src/generators/nextjs-app/files/.gitignore.template +5 -0
  372. package/src/generators/nextjs-app/files/Dockerfile +53 -0
  373. package/src/generators/nextjs-app/files/app/(auth)/sign-in/__sign-in__/page.tsx.template +9 -0
  374. package/src/generators/nextjs-app/files/app/(auth)/sign-up/__sign-up__/page.tsx.template +9 -0
  375. package/src/generators/nextjs-app/files/app/api/config/route.ts.template +39 -0
  376. package/src/generators/nextjs-app/files/app/api/healthz/route.test.ts +15 -0
  377. package/src/generators/nextjs-app/files/app/api/healthz/route.ts +5 -0
  378. package/src/generators/nextjs-app/files/app/api/proxy/__path__/route.test.ts.template +55 -0
  379. package/src/generators/nextjs-app/files/app/api/proxy/__path__/route.ts.template +126 -0
  380. package/src/generators/nextjs-app/files/app/error.tsx +39 -0
  381. package/src/generators/nextjs-app/files/app/global-error.tsx +68 -0
  382. package/src/generators/nextjs-app/files/app/globals.css +105 -0
  383. package/src/generators/nextjs-app/files/app/layout.tsx +59 -0
  384. package/src/generators/nextjs-app/files/app/loading.tsx +13 -0
  385. package/src/generators/nextjs-app/files/app/not-found.tsx +30 -0
  386. package/src/generators/nextjs-app/files/app/page.tsx +20 -0
  387. package/src/generators/nextjs-app/files/components/providers/default.tsx +19 -0
  388. package/src/generators/nextjs-app/files/components/providers/production.tsx +32 -0
  389. package/src/generators/nextjs-app/files/components/providers/telemetry.tsx +76 -0
  390. package/src/generators/nextjs-app/files/components/render-smoke.test.tsx +29 -0
  391. package/src/generators/nextjs-app/files/components/theme-provider.tsx +11 -0
  392. package/src/generators/nextjs-app/files/components.json +21 -0
  393. package/src/generators/nextjs-app/files/eslint.config.mjs +120 -0
  394. package/src/generators/nextjs-app/files/hooks/use-toast.ts +7 -0
  395. package/src/generators/nextjs-app/files/instrumentation.ts +90 -0
  396. package/src/generators/nextjs-app/files/lib/api/fetcher.ts.template +130 -0
  397. package/src/generators/nextjs-app/files/lib/config.ts +21 -0
  398. package/src/generators/nextjs-app/files/lib/logger.ts +29 -0
  399. package/src/generators/nextjs-app/files/lib/schemas/index.ts +19 -0
  400. package/src/generators/nextjs-app/files/lib/utils.ts +6 -0
  401. package/src/generators/nextjs-app/files/next.config.mjs +9 -0
  402. package/src/generators/nextjs-app/files/package.json +70 -0
  403. package/src/generators/nextjs-app/files/postcss.config.mjs +8 -0
  404. package/src/generators/nextjs-app/files/proxy.test.ts.template +30 -0
  405. package/src/generators/nextjs-app/files/proxy.ts +31 -0
  406. package/src/generators/nextjs-app/files/public/.gitkeep +1 -0
  407. package/src/generators/nextjs-app/files/tsconfig.json +42 -0
  408. package/src/generators/nextjs-app/files/vitest.config.mts +15 -0
  409. package/src/generators/nextjs-app/files/vitest.setup.ts +7 -0
  410. package/src/generators/nextjs-app/generator.ts +307 -0
  411. package/src/generators/nextjs-app/schema.json +44 -0
  412. package/src/generators/python-microservice/docs/principles/stack/python/async.md +168 -0
  413. package/src/generators/python-microservice/docs/principles/stack/python/documentation.md +240 -0
  414. package/src/generators/python-microservice/docs/principles/stack/python/mcp.md +147 -0
  415. package/src/generators/python-microservice/docs/principles/stack/python/resilience.md +193 -0
  416. package/src/generators/python-microservice/docs/principles/stack/python/testing.md +281 -0
  417. package/src/generators/python-microservice/files/.env.example.template +30 -0
  418. package/src/generators/python-microservice/files/Dockerfile.template +36 -0
  419. package/src/generators/python-microservice/files/db/schema.sql.template +19 -0
  420. package/src/generators/python-microservice/files/pyproject.toml.template +76 -0
  421. package/src/generators/python-microservice/files/scripts/apply-schema.sh.template +25 -0
  422. package/src/generators/python-microservice/files/src/__packageName__/adapters/comfyui.py.template +87 -0
  423. package/src/generators/python-microservice/files/src/__packageName__/adapters/config.py.template +48 -0
  424. package/src/generators/python-microservice/files/src/__packageName__/adapters/database.py.template +21 -0
  425. package/src/generators/python-microservice/files/src/__packageName__/adapters/message_queue.py.template +29 -0
  426. package/src/generators/python-microservice/files/src/__packageName__/adapters/repository.py.template +130 -0
  427. package/src/generators/python-microservice/files/src/__packageName__/adapters/telemetry.py.template +68 -0
  428. package/src/generators/python-microservice/files/src/__packageName__/adapters/websocket_hub.py.template +36 -0
  429. package/src/generators/python-microservice/files/src/__packageName__/core/domain/entities.py.template +22 -0
  430. package/src/generators/python-microservice/files/src/__packageName__/core/domain/exceptions.py.template +43 -0
  431. package/src/generators/python-microservice/files/src/__packageName__/core/ports.py.template +42 -0
  432. package/src/generators/python-microservice/files/src/__packageName__/core/service/example_service.py.template +68 -0
  433. package/src/generators/python-microservice/files/src/__packageName__/entrypoints/api/dependencies.py.template +50 -0
  434. package/src/generators/python-microservice/files/src/__packageName__/entrypoints/api/middleware.py.template +131 -0
  435. package/src/generators/python-microservice/files/src/__packageName__/entrypoints/api/router.py.template +37 -0
  436. package/src/generators/python-microservice/files/src/__packageName__/entrypoints/api/websocket_handler.py.template +20 -0
  437. package/src/generators/python-microservice/files/src/__packageName__/entrypoints/worker/cleanup.py.template +35 -0
  438. package/src/generators/python-microservice/files/src/__packageName__/entrypoints/worker/worker.py.template +28 -0
  439. package/src/generators/python-microservice/files/src/__packageName__/main.py.template +108 -0
  440. package/src/generators/python-microservice/files/tests/test_main.py.template +74 -0
  441. package/src/generators/python-microservice/files/tests/test_middleware.py.template +109 -0
  442. package/src/generators/python-microservice/files/tests/test_worker.py.template +16 -0
  443. package/src/generators/python-microservice/generator.ts +286 -0
  444. package/src/generators/python-microservice/schema.json +86 -0
  445. package/src/generators/shared/brand-tokens.ts +301 -0
  446. package/src/generators/shared/capabilities.ts +349 -0
  447. package/src/generators/shared/provenance.ts +61 -0
  448. package/src/generators/shared/scaffold-helpers.ts +309 -0
  449. package/src/generators/system-test-runner/files/tests/bets/.gitkeep +0 -0
  450. package/src/generators/system-test-runner/files/tests/bets/_archive/.gitkeep +0 -0
  451. package/src/generators/system-test-runner/files/tests/conftest.py.template +503 -0
  452. package/src/generators/system-test-runner/files/tests/pyproject.toml.template +20 -0
  453. package/src/generators/system-test-runner/files/tests/system/pages/__init__.py.template +9 -0
  454. package/src/generators/system-test-runner/files/tests/system/pages/base_page.py.template +36 -0
  455. package/src/generators/system-test-runner/files/tests/system/test_a11y_smoke.py.template +132 -0
  456. package/src/generators/system-test-runner/files/tests/system/test_contract_conformance.py.template +140 -0
  457. package/src/generators/system-test-runner/files/tests/system/test_layout_geometry.py.template +109 -0
  458. package/src/generators/system-test-runner/files/tests/system/test_render_smoke.py.template +227 -0
  459. package/src/generators/system-test-runner/files/tests/system/test_system.py.template +158 -0
  460. package/src/generators/system-test-runner/files/tests/system/test_token_conformance.py.template +206 -0
  461. package/src/generators/system-test-runner/files/tests/system/test_visual_regression.py.template +104 -0
  462. package/src/generators/system-test-runner/generator.ts +142 -0
  463. package/src/generators/system-test-runner/schema.json +24 -0
  464. package/src/generators/workspace-dev-cli/cli-src/build.mjs +42 -0
  465. package/src/generators/workspace-dev-cli/cli-src/dist/dev-bundle.js +2168 -0
  466. package/src/generators/workspace-dev-cli/cli-src/src/commands/bet.ts +442 -0
  467. package/src/generators/workspace-dev-cli/cli-src/src/commands/completion.ts +87 -0
  468. package/src/generators/workspace-dev-cli/cli-src/src/commands/doctor.ts +139 -0
  469. package/src/generators/workspace-dev-cli/cli-src/src/commands/lifecycle.ts +548 -0
  470. package/src/generators/workspace-dev-cli/cli-src/src/commands/quality.ts +127 -0
  471. package/src/generators/workspace-dev-cli/cli-src/src/commands/surface.ts +214 -0
  472. package/src/generators/workspace-dev-cli/cli-src/src/index.ts +127 -0
  473. package/src/generators/workspace-dev-cli/cli-src/src/registry.ts +194 -0
  474. package/src/generators/workspace-dev-cli/cli-src/src/theme/color.ts +130 -0
  475. package/src/generators/workspace-dev-cli/cli-src/src/theme/render.ts +158 -0
  476. package/src/generators/workspace-dev-cli/cli-src/src/theme/tokens.ts +122 -0
  477. package/src/generators/workspace-dev-cli/cli-src/src/util/context.ts +43 -0
  478. package/src/generators/workspace-dev-cli/cli-src/src/util/extensions.ts +99 -0
  479. package/src/generators/workspace-dev-cli/cli-src/src/util/paths.ts +46 -0
  480. package/src/generators/workspace-dev-cli/cli-src/src/util/proc.ts +106 -0
  481. package/src/generators/workspace-dev-cli/cli-src/src/util/prompt.ts +108 -0
  482. package/src/generators/workspace-dev-cli/cli-src/src/util/runners.ts +70 -0
  483. package/src/generators/workspace-dev-cli/cli-src/src/util/services.ts +221 -0
  484. package/src/generators/workspace-dev-cli/cli-src/src/util/version.ts +21 -0
  485. package/src/generators/workspace-dev-cli/cli-src/tsconfig.json +16 -0
  486. package/src/generators/workspace-dev-cli/files/.agents/skills/workspace-cli/SKILL.md.template +74 -0
  487. package/src/generators/workspace-dev-cli/files/dev.template +16 -0
  488. package/src/generators/workspace-dev-cli/files/docker-compose.yml.template +20 -0
  489. package/src/generators/workspace-dev-cli/files/scripts/cli/templates/milestone-test.pytmpl.template +46 -0
  490. package/src/generators/workspace-dev-cli/files/scripts/cli/templates/slice-test.pytmpl.template +38 -0
  491. package/src/generators/workspace-dev-cli/generator.ts +136 -0
  492. package/src/generators/workspace-dev-cli/schema.json +22 -0
  493. package/src/hidden-skills/code-intelligence.md +129 -0
  494. package/src/hidden-skills/groundwork-architect/SKILL.md +114 -0
  495. package/src/hidden-skills/groundwork-architect/references/agentic-systems.md +44 -0
  496. package/src/hidden-skills/groundwork-architect/references/ai-native-architecture.md +37 -0
  497. package/src/hidden-skills/groundwork-architect/references/api-and-contracts.md +45 -0
  498. package/src/hidden-skills/groundwork-architect/references/core-and-boundaries.md +45 -0
  499. package/src/hidden-skills/groundwork-architect/references/data-architecture.md +33 -0
  500. package/src/hidden-skills/groundwork-architect/references/decision-records.md +34 -0
  501. package/src/hidden-skills/groundwork-architect/references/durable-execution.md +45 -0
  502. package/src/hidden-skills/groundwork-architect/references/evolutionary-architecture.md +37 -0
  503. package/src/hidden-skills/groundwork-architect/references/identity-and-access.md +41 -0
  504. package/src/hidden-skills/groundwork-architect/references/integration-patterns.md +39 -0
  505. package/src/hidden-skills/groundwork-architect/references/observability.md +36 -0
  506. package/src/hidden-skills/groundwork-architect/references/performance-and-scale.md +41 -0
  507. package/src/hidden-skills/groundwork-architect/references/platform-and-delivery.md +47 -0
  508. package/src/hidden-skills/groundwork-architect/references/realtime-and-async.md +28 -0
  509. package/src/hidden-skills/groundwork-architect/references/reliability.md +31 -0
  510. package/src/hidden-skills/groundwork-architect/references/security-and-trust.md +47 -0
  511. package/src/hidden-skills/groundwork-architect/references/surface-architecture.md +40 -0
  512. package/src/hidden-skills/groundwork-architect/sync-anchor.md +34 -0
  513. package/src/hidden-skills/groundwork-architecture/architecture-template.md +50 -0
  514. package/src/hidden-skills/groundwork-architecture/instructions.md +139 -0
  515. package/src/hidden-skills/groundwork-architecture/phases/01-context-ingestion.md +18 -0
  516. package/src/hidden-skills/groundwork-architecture/phases/02-technical-constraints.md +27 -0
  517. package/src/hidden-skills/groundwork-architecture/phases/03-service-design.md +19 -0
  518. package/src/hidden-skills/groundwork-architecture/phases/04-data-flow-communication.md +23 -0
  519. package/src/hidden-skills/groundwork-architecture/phases/05-component-boundaries-contracts.md +17 -0
  520. package/src/hidden-skills/groundwork-architecture/phases/06-draft-review-present.md +38 -0
  521. package/src/hidden-skills/groundwork-architecture/phases/07-commit.md +33 -0
  522. package/src/hidden-skills/groundwork-architecture/templates/architecture-cache.md +43 -0
  523. package/src/hidden-skills/groundwork-architecture-extract/instructions.md +163 -0
  524. package/src/hidden-skills/groundwork-architecture-extract/templates/architecture-extract-cache.md +21 -0
  525. package/src/hidden-skills/groundwork-bet/briefs/slice-worker.md +191 -0
  526. package/src/hidden-skills/groundwork-bet/instructions.md +88 -0
  527. package/src/hidden-skills/groundwork-bet/templates/bet-progress-test.md +126 -0
  528. package/src/hidden-skills/groundwork-bet/templates/change-proposal.md +38 -0
  529. package/src/hidden-skills/groundwork-bet/templates/decomposition/meta.json +4 -0
  530. package/src/hidden-skills/groundwork-bet/templates/decomposition/milestone-index.md +35 -0
  531. package/src/hidden-skills/groundwork-bet/templates/decomposition/slice.md +35 -0
  532. package/src/hidden-skills/groundwork-bet/templates/pitch.md +45 -0
  533. package/src/hidden-skills/groundwork-bet/templates/technical-design/01-ui-design.md +51 -0
  534. package/src/hidden-skills/groundwork-bet/templates/technical-design/02-data-flows.md +36 -0
  535. package/src/hidden-skills/groundwork-bet/templates/technical-design/03-api-design.md +90 -0
  536. package/src/hidden-skills/groundwork-bet/templates/technical-design/04-data-design.md +29 -0
  537. package/src/hidden-skills/groundwork-bet/workflows/01-discovery.md +198 -0
  538. package/src/hidden-skills/groundwork-bet/workflows/02-design.md +168 -0
  539. package/src/hidden-skills/groundwork-bet/workflows/03-decomposition.md +246 -0
  540. package/src/hidden-skills/groundwork-bet/workflows/04-delivery.md +193 -0
  541. package/src/hidden-skills/groundwork-bet/workflows/05-validation.md +199 -0
  542. package/src/hidden-skills/groundwork-design-system/instructions.md +125 -0
  543. package/src/hidden-skills/groundwork-design-system/templates/brand-tokens.md +182 -0
  544. package/src/hidden-skills/groundwork-design-system/templates/design-system-cache.md +64 -0
  545. package/src/hidden-skills/groundwork-design-system/tracks/_foundation.md +136 -0
  546. package/src/hidden-skills/groundwork-design-system/tracks/agentic-protocol.md +269 -0
  547. package/src/hidden-skills/groundwork-design-system/tracks/cli.md +355 -0
  548. package/src/hidden-skills/groundwork-design-system/tracks/graphical-ui.md +330 -0
  549. package/src/hidden-skills/groundwork-design-system-extract/instructions.md +124 -0
  550. package/src/hidden-skills/groundwork-design-system-extract/templates/design-system-extract-cache.md +19 -0
  551. package/src/hidden-skills/groundwork-designer/SKILL.md +108 -0
  552. package/src/hidden-skills/groundwork-designer/references/accessibility.md +33 -0
  553. package/src/hidden-skills/groundwork-designer/references/ai-native-design.md +37 -0
  554. package/src/hidden-skills/groundwork-designer/references/design-review.md +29 -0
  555. package/src/hidden-skills/groundwork-designer/references/design-systems-and-tokens.md +33 -0
  556. package/src/hidden-skills/groundwork-designer/references/interaction-and-motion.md +37 -0
  557. package/src/hidden-skills/groundwork-designer/references/layout-and-space.md +33 -0
  558. package/src/hidden-skills/groundwork-designer/references/usability-and-ux.md +33 -0
  559. package/src/hidden-skills/groundwork-designer/references/visual-craft.md +49 -0
  560. package/src/hidden-skills/groundwork-designer/sync-anchor.md +20 -0
  561. package/src/hidden-skills/groundwork-doc-sync/instructions.md +100 -0
  562. package/src/hidden-skills/groundwork-elicit/instructions.md +66 -0
  563. package/src/hidden-skills/groundwork-elicit/methods.md +65 -0
  564. package/src/hidden-skills/groundwork-infra-adopt/instructions.md +168 -0
  565. package/src/hidden-skills/groundwork-infra-adopt/templates/infra-adopt-cache.md +21 -0
  566. package/src/hidden-skills/groundwork-mvp/instructions.md +223 -0
  567. package/src/hidden-skills/groundwork-mvp/templates/mvp-cache.md +9 -0
  568. package/src/hidden-skills/groundwork-patch/instructions.md +40 -0
  569. package/src/hidden-skills/groundwork-persona/instructions.md +54 -0
  570. package/src/hidden-skills/groundwork-product/SKILL.md +102 -0
  571. package/src/hidden-skills/groundwork-product/references/ai-native-product.md +45 -0
  572. package/src/hidden-skills/groundwork-product/references/discovery-and-opportunity.md +38 -0
  573. package/src/hidden-skills/groundwork-product/references/product-risks.md +52 -0
  574. package/src/hidden-skills/groundwork-product/references/requirements-and-specs.md +39 -0
  575. package/src/hidden-skills/groundwork-product/references/scope-and-sequencing.md +35 -0
  576. package/src/hidden-skills/groundwork-product/references/shaping-and-appetite.md +48 -0
  577. package/src/hidden-skills/groundwork-product/references/success-metrics-and-signals.md +37 -0
  578. package/src/hidden-skills/groundwork-product/sync-anchor.md +19 -0
  579. package/src/hidden-skills/groundwork-product-brief/instructions.md +231 -0
  580. package/src/hidden-skills/groundwork-product-brief-extract/instructions.md +139 -0
  581. package/src/hidden-skills/groundwork-product-brief-extract/templates/product-brief-extract-cache.md +17 -0
  582. package/src/hidden-skills/groundwork-review/checklists/architecture.md +93 -0
  583. package/src/hidden-skills/groundwork-review/checklists/bet-pitch.md +94 -0
  584. package/src/hidden-skills/groundwork-review/checklists/decomposition.md +135 -0
  585. package/src/hidden-skills/groundwork-review/checklists/design-system.md +85 -0
  586. package/src/hidden-skills/groundwork-review/checklists/domain-entity.md +66 -0
  587. package/src/hidden-skills/groundwork-review/checklists/implementation-readiness.md +46 -0
  588. package/src/hidden-skills/groundwork-review/checklists/infrastructure.md +68 -0
  589. package/src/hidden-skills/groundwork-review/checklists/maturity.md +71 -0
  590. package/src/hidden-skills/groundwork-review/checklists/product-brief.md +69 -0
  591. package/src/hidden-skills/groundwork-review/checklists/technical-design.md +112 -0
  592. package/src/hidden-skills/groundwork-review/instructions.md +181 -0
  593. package/src/hidden-skills/groundwork-scaffold/instructions.md +254 -0
  594. package/src/hidden-skills/groundwork-scaffold/phases/01-ingestion-service-mapping.md +87 -0
  595. package/src/hidden-skills/groundwork-scaffold/phases/02-scaffolding-execution.md +15 -0
  596. package/src/hidden-skills/groundwork-scaffold/phases/03-service-documentation-api-stubs.md +100 -0
  597. package/src/hidden-skills/groundwork-scaffold/phases/04-infrastructure-verification.md +17 -0
  598. package/src/hidden-skills/groundwork-scaffold/phases/05-draft-review.md +19 -0
  599. package/src/hidden-skills/groundwork-scaffold/phases/06-commit.md +19 -0
  600. package/src/hidden-skills/groundwork-scaffold/templates/scaffold-cache.md +23 -0
  601. package/src/hidden-skills/groundwork-scan/instructions.md +164 -0
  602. package/src/hidden-skills/groundwork-scan/references/digest-schema.md +66 -0
  603. package/src/hidden-skills/groundwork-scan/references/exclusions.md +44 -0
  604. package/src/hidden-skills/groundwork-scan/templates/architecture-findings.md +42 -0
  605. package/src/hidden-skills/groundwork-scan/templates/design-findings.md +23 -0
  606. package/src/hidden-skills/groundwork-scan/templates/overview.md +26 -0
  607. package/src/hidden-skills/groundwork-scan/templates/product-findings.md +23 -0
  608. package/src/hidden-skills/groundwork-scan/templates/scan-state.json +19 -0
  609. package/src/hidden-skills/groundwork-stack-forge/instructions.md +150 -0
  610. package/src/hidden-skills/groundwork-stack-forge/references/authoring-engineer-skills.md +107 -0
  611. package/src/hidden-skills/groundwork-surface-activation/instructions.md +138 -0
  612. package/src/hidden-skills/groundwork-update/briefs/reconcile-worker.md +196 -0
  613. package/src/hidden-skills/groundwork-update/instructions.md +200 -0
  614. package/src/hidden-skills/groundwork-writer/SKILL.md +278 -0
  615. package/src/hidden-skills/maturity-model.md +125 -0
  616. package/src/hidden-skills/operating-contract.md +400 -0
  617. package/src/hidden-skills/repo-map-schema.md +90 -0
  618. package/src/hidden-skills/templates/adr.md +57 -0
  619. package/src/hidden-skills/templates/capability-ports.md +71 -0
  620. package/src/hidden-skills/templates/discovery-notes.md +33 -0
  621. package/src/hidden-skills/templates/domain-entity.md +80 -0
  622. package/src/hidden-skills/templates/gap-ledger.md +21 -0
  623. package/src/hidden-skills/templates/handoff.md +37 -0
  624. package/src/hidden-skills/templates/maturity.md +39 -0
  625. package/src/hidden-skills/templates/surfaces.md +207 -0
  626. package/src/skills/groundwork-check/SKILL.md +56 -0
  627. package/src/skills/groundwork-check/instructions.md +70 -0
  628. package/src/skills/groundwork-orchestrator/SKILL.md +176 -0
  629. package/src/skills/groundwork-orchestrator/workflow-index.md +50 -0
@@ -0,0 +1,199 @@
1
+ # Phase 5: Validation (Testing & Handoff)
2
+
3
+ **Goal:** Verify the implementation, capture each touched service's served contract into the canonical `docs/architecture/api/` record, archive the whole bet, fold what the bet learned back into the upstream documents, and seed the next bet with any signals that surfaced during delivery.
4
+
5
+ A bet that ships without updating upstream docs leaves the next bet operating against a stale map. The Validation phase exists to close the loop — the test suite proves the implementation works, the Living Documents scan proves the rest of the system still describes reality.
6
+
7
+ ## Operating Contract
8
+
9
+ This workflow operates under the protocols defined in `.groundwork/skills/operating-contract.md` (contract v1; Continuous Bet mode: Protocols 1, 2, 4, 8, and 9 apply). This phase is the back-feed mechanism for the entire GroundWork lifecycle — Living Documents and Discovery Notes updates here are what keep the upstream `docs/` artifacts useful for every bet that follows.
10
+
11
+ ## Instructions
12
+
13
+ ### Step 1: Mark validation status
14
+
15
+ Update `docs/bets/<bet-slug>/pitch.md` frontmatter to `status: validation`.
16
+
17
+ ### Step 2: Run the test suite
18
+
19
+ Execute the full bet-progress test suite: `./dev test bet <bet-slug>` (or `pytest tests/bets/<bet-slug>/` directly). Every test must pass before advancing — and run the **prose-integrity reconciliation once over the whole bet**. By now the `bet/<bet-slug>/approved` tag has **ratcheted forward** through delivery — advancing additively as each milestone was opened-and-sliced or added — so it sits at the final rung's authoring commit. `git diff bet/<bet-slug>/approved.. -- docs/bets/<bet-slug>/decomposition/ docs/bets/<bet-slug>/technical-design/` shows no change except approved amendments (the Amendment Protocol's commit trail), and every built test still proves what its slice's Proof-of-work prose describes. (The per-slice reconciliation already guarded each ratchet step during delivery; this is the whole-bet confirmation.) The sealed contract is the prose; the tests and implementation were built this phase and are supposed to have changed. A suite that drifted from the sealed prose without a recorded amendment is not what the user approved — flag it and revert.
20
+
21
+ **Contract verification:** Confirm that no manual schema definitions or rogue HTTP calls were introduced during Delivery — cross-service calls use clients derived from the canonical `docs/architecture/api/<service>/` contract, and no endpoint, field, or table exists that the prose design and the captured contract do not define. A bet that delivered against side-channel contracts has compromised the architecture's integrity; flag it and revert.
22
+
23
+ ### Step 2.5: Capture the canonical contract
24
+
25
+ The bet's API and data design were prose; the real machine-readable contract is what the running service serves. Now that the implementation satisfies the design, snapshot it. For each service this bet touched, capture the service's **served** OpenAPI — `GET /openapi.json` from the running service, or the framework's spec export (FastAPI and Huma generate it from the code) — into `docs/architecture/api/<service>/openapi.yaml` (creating it for a new service), and likewise `asyncapi.yaml` where the service serves events. It is captured from running code, never promoted from a bet spec — the prose design is the design commitment, the running service is the source of truth. The canonical per-service spec is what the generated contract-conformance tests and `groundwork-check` read — a bet that never captures leaves the canonical record describing the system before this bet existed.
26
+
27
+ ### Step 2.6: Visual verification gate
28
+
29
+ **Conditional — graphical surfaces only.** Skip this step entirely, and say so in one line, when the bet touched no `graphical-ui` surface: a backend, CLI, or agentic bet pays nothing. For a bet that delivered a graphical surface, confirm the visual ladder before the bet can reach `delivered`:
30
+
31
+ 1. **Tier 1 — the deterministic floor is green.** Step 2 already ran the suite; confirm `tests/system/test_render_smoke.py`, `test_a11y_smoke.py`, and `test_token_conformance.py` passed across the viewport × theme matrix. Render-smoke catches a blank/throwing/unstyled page; token-conformance asserts the specified atmosphere actually *landed* — the surface treatments render with their backdrop blur and multi-layer elevation rather than degrading to a flat default. A red layer is a real defect and blocks the bet — it is not a flaky test to wave through.
32
+ 2. **Tier 2 — spec-conformance inspection happened.** Confirm each graphical milestone recorded its per-screen spec-conformance verdict during delivery (the `Visual:` line in the closing slice's delivery commit, from `04-delivery.md` Milestone close). That verdict is the designer-judged check: does the rendered surface match the written micro-polish spec, including the dimensions computation cannot assert — optical alignment, restraint, and whether the composition reads as considered. A milestone that closed with no verdict did not run the inspection — route it back.
33
+
34
+ Report which tiers ran in one line, so the run/skip is auditable. There is no separate multimodal "is it as good as the references" grading pass: the craft bar is set as the concrete micro-polish spec at design time (a screenshot cannot see motion or state, and a vision grade of static frames is a weak signal), enforced deterministically by Tier 1 and by the designer's spec-conformance judgement in Tier 2.
35
+
36
+ ### Step 2.7: Record the bet in the capability ledger
37
+
38
+ Skip this step entirely when the project has no `docs/surfaces.md` — a project without a registry has a single implicit surface and no ledger to maintain.
39
+
40
+ The capability ledger (in `docs/surfaces.md`) is where surface divergence becomes a recorded decision instead of silent drift, and validation is the one writer that appends capability rows. For each capability this bet delivered — user-meaningful, typically 1–3 per bet, coarse enough to stay readable, never per-endpoint — write its ledger row:
41
+
42
+ - **Row key:** `<bet-slug>/<capability-slug>` — stable, greppable, collision-free.
43
+ - **Every surface column filled** with exactly one state and its payload: `delivered` (this bet's slug), `planned` (a bet ref or discovery-notes pointer), `omitted` (one-line rationale), or `n/a` (no payload). The pitch's `surfaces:` scope and surface no-gos are the source: in-scope surfaces whose surface milestones went green are `delivered`; deferred no-gos and deferred surface milestones are `planned`; omitted no-gos are `omitted`, carrying the pitch's rationale; structurally meaningless columns are `n/a`. A retired surface's column fills `n/a` automatically.
44
+ - **Cross-post every `planned` cell** as a bullet under `## Bets` in `.groundwork/cache/discovery-notes.md`, naming the capability key and the target surface — the next bet's Discovery reads that section, so the deferral becomes backlog instead of memory.
45
+ - **Update `.groundwork/surfaces.json` in the same change:** append the capability entries with the same keys, states, and payloads. The prose ledger and its machine twin are projections of the same decisions; they never drift.
46
+
47
+ **The gate:** a bet cannot reach `delivered` status with an empty ledger cell. An unfilled column is an undecided divergence — decide it with the user (`planned`, `omitted`, or `n/a`) before Step 8.
48
+
49
+ **Shallow ledger update (insufficient):**
50
+
51
+ ```markdown
52
+ | `notifications/status` | delivered | planned | planned |
53
+ ```
54
+
55
+ States without payloads, `planned` cells pointing nowhere, nothing cross-posted to discovery notes, the JSON twin untouched — a deferral recorded where no future bet will find it is silent drift wearing a ledger row.
56
+
57
+ **Deep ledger update (required standard):**
58
+
59
+ ```markdown
60
+ | Capability | web-app | admin-cli | mcp-server |
61
+ |---|---|---|---|
62
+ | `notification-delivery/in-app-status` | delivered (`notification-delivery`) | planned (discovery-notes — operators asked for failure visibility during the Step 4 review) | omitted — agents query operation status directly via the contract; a push feed duplicates it |
63
+ ```
64
+
65
+ Plus, in the same change: the `planned` cell cross-posted under `## Bets` in discovery notes ("`notification-delivery/in-app-status` → `admin-cli`: operators need failure visibility; deferred from `notification-delivery`"), and `.groundwork/surfaces.json` gaining the matching capability entry with identical states and payloads. Every column decided, every decision findable.
66
+
67
+ ### Step 3: Archive the whole bet
68
+
69
+ Move the whole bet out of the active tree: `docs/bets/<bet-slug>/` → `docs/bets/_archive/<bet-slug>/` **and** `tests/bets/<bet-slug>/` → `tests/bets/_archive/<bet-slug>/`. Run `./dev archive bet <bet-slug>` if the CLI is available — it now moves both; otherwise `git mv docs/bets/<bet-slug> docs/bets/_archive/<bet-slug>` and `git mv tests/bets/<bet-slug> tests/bets/_archive/<bet-slug>`. The active docsite Bets section then shows only in-flight bets.
70
+
71
+ The permanent best-practice tests rolled out during Delivery (in service repos and `tests/system/`) remain in place — they are the ongoing coverage for this feature going forward. The bet's prose and its bet-progress suite served their purpose as the definition of done and the proof-of-work scaffolding; they are now archived as the bet's record.
72
+
73
+ ### Step 4: Review with the user
74
+
75
+ Summarise what was delivered. Walk through the user-facing changes, the new contracts, and any constraints the implementation revealed. Capture the user's reactions — corrections, requests for follow-up bets, or observations about what surprised them all belong in the next step's scan.
76
+
77
+ ### Step 5: Apply the Living Documents protocol
78
+
79
+ The architecture of the system has changed. Every upstream document that describes the changed surface must be updated to match — surgically, in place, without asking permission. This is the single most important step of the phase, and the one most likely to be skipped under deadline pressure.
80
+
81
+ For each `docs/` artifact, scan the bet conversation and the delivered code for what now contradicts the document. Apply targeted updates. Report what changed. When the update to `docs/architecture/index.md` is structural — a new boundary, a changed data flow, a new service-level requirement — adopt the architect persona (`.groundwork/skills/groundwork-architect/SKILL.md`) so the refinement carries the same reasoning standard the document was built to.
82
+
83
+ Documents to scan, in order:
84
+
85
+ 1. **`docs/architecture/index.md`** — new services, new boundaries, refined data flows, new technology choices, new service-level requirements. The Service-Level Requirements table is the most common update target.
86
+ 2. **`docs/design-system.md`** — new design patterns, new component variants, new interaction states, refined accessibility commitments. Update only when the bet introduced something the design system did not anticipate. When the refinement is a design change — a new pattern or component variant, an interaction state, or an accessibility commitment — adopt the designer persona (`.groundwork/skills/groundwork-designer/SKILL.md`) so the update carries the same reasoning standard the design system was built to.
87
+ 3. **`docs/product-brief.md`** — new user types, refined success criteria, capabilities that turned out to be load-bearing in ways the brief did not capture. Vision-level refinements only; the brief is not a changelog. When the refinement is a vision-level product change — a new user type, a reframed success criterion, a capability that shifted the product's scope — adopt the product persona (`.groundwork/skills/groundwork-product/SKILL.md`) so the update carries the same reasoning standard the brief was built to.
88
+ 4. **`docs/architecture/infrastructure.md`** — new services in the local topology, new ports, new health endpoints, new commands. The infrastructure document must continue to describe a system that actually runs.
89
+ 5. **`docs/surfaces.md`** — when it exists: registry entries whose reality changed (a `planned` surface this bet activated, a changed core-access path or test medium), and confirm Step 2.7's ledger rows landed with their `.groundwork/surfaces.json` twin in lockstep. Skip when the project has no registry.
90
+ 6. **`docs/maturity.md`** — the maturity roadmap. Mark every row this bet closed as `closed (<bet-slug>)`, re-assess the dimensions the bet touched (a bet that captured a service's OpenAPI contract into `docs/architecture/api/` may move D2 from 🟡 to ✅ — cite the new evidence), open new rows for gaps the bet revealed or introduced (a new service shipped without a contract is a new `standard-divergence` row), and append one line to `## History`. Re-stamp `last_reviewed`. On a registry project, re-assess D8 (surface parity discipline) against the ledger state Step 2.7 just wrote — a `planned` cell aging past three closed bets with no referencing pitch is what moves it off ✅. If this bet activated a second independently-deployed surface or changed a published contract, re-assess D9 (contract compatibility): the stance must stand under architecture's Binding Constraints and the contract-conformance tests must show no breaking drift.
91
+
92
+ For each document updated, report the change in one line: "Updated `docs/architecture/index.md` — added `notification-service` to service map and SLR row for at-least-once delivery."
93
+
94
+ **Distinguish refinements from reversals (Protocol 2).** Most bet updates are refinements — new rows, new boundaries, additive detail. But if the bet *overturned* a prior Key Decision or Binding Constraint, or you are about to write a superseding ADR in Step 7, that update is a **reversal**, and the Reversal Protocol applies even in Continuous Bet mode (Protocols 1, 2, 4, 8, and 9 apply to the bet). For each reversal: reconcile the *full body* of the affected doc and every dependent doc it touches, write the superseding ADR (Step 7), and **re-invoke `groundwork-review` on each mutated doc** (Protocol 9), with the matching `document_type`. The re-gate is fail-closed and the revise cap applies (Protocol 8): proceed only on a parseable `VERDICT: PRESENT` per doc. Because the reversal supersedes an ADR, also re-review **every** `docs/architecture/domain/*.md` unconditionally (`document_type: domain-entity`) — their `Owner:`/fields go stale silently since they carry no summary to flag the drift, and they are the dependents most often missed. A bet that mutates four setup docs is exactly where contradictory canonical docs creep in — the re-gate is the guard.
95
+
96
+ If a scan finds nothing to update, say so explicitly. Silence is ambiguous — the user cannot tell whether you scanned and found nothing or skipped the scan.
97
+
98
+ ### Step 6: Update discovery notes
99
+
100
+ Scan the bet conversation for signals that belong to a future bet — sequencing instincts ("we should do notifications next"), parking-lot ideas ("the search experience needs its own bet"), constraints the user surfaced about subsequent work. Append these as bullets under `## Bets` in `.groundwork/cache/discovery-notes.md` so the next bet's Discovery phase finds them.
101
+
102
+ Remove any discovery-notes entries that were incorporated into the artifacts updated in Step 5. A signal that has been promoted into a permanent document does not belong in the parking lot.
103
+
104
+ ### Step 7: Write ADRs for significant decisions
105
+
106
+ Review the technical decisions made during this bet. If any decision was significant enough to warrant a permanent record — a stance future bets should not relitigate without a new ADR — write an ADR to `docs/architecture/decisions/NNNN-<slug>.md` using the template at `.groundwork/skills/templates/adr.md`.
107
+
108
+ Significance test: would a new engineer joining the project six months from now need to know this decision to avoid revisiting it? If yes, record it. If no, skip. Not every bet produces an ADR.
109
+
110
+ Number sequentially: read the existing `docs/architecture/decisions/` directory and use the next available integer (zero-padded to four digits). Create the `docs/architecture/decisions/` directory if it does not exist.
111
+
112
+ ### Step 7.5: Run the bet retrospective
113
+
114
+ A bet that ships without extracting its lessons leaves the next bet to rediscover them at delivery prices. The retrospective is one facilitated pass over four mechanics — checklist items in a single conversation, not a ceremony — and its output is `docs/bets/<bet-slug>/retrospective.md` plus action items the next bet reads.
115
+
116
+ 1. **Mine the slice records.** Read the bet's delivery commits — `git log` of the `bet(<bet-slug>): slice ...` commits, their changed files and their `Notes:` lines — plus any change proposals or amendments in the bet directory. Surface *patterns*, not anecdotes: a finding type that appeared in two or more slice reviews, a struggle that recurred, a proof that needed amending. One-off issues are noise; repeats are process signal.
117
+ 2. **Audit the previous bet's action items.** Read the previous bet's `retrospective.md` (if one exists). For each action item: done, in progress, or ignored — and if ignored, did it cost us this bet? An item that was ignored *and* costly escalates to a `docs/maturity.md` row so it stops depending on anyone's memory.
118
+ 3. **Detect significant discoveries.** Check whether this bet invalidated anything queued bets depend on: an architectural assumption broken, a dependency the next pitch does not account for, debt that changes the appetite math, user behaviour different from what the brief assumed. On detection, recommend re-pitching the affected bets before the next one starts — never start a bet on premises this one just disproved. Whether a discovery overturns a queued bet's premise — changed user behaviour, shifted appetite math, or resequenced priorities — is a product judgement; adopt the product persona (`.groundwork/skills/groundwork-product/SKILL.md`) when weighing a re-pitch.
119
+ 4. **Explore readiness.** Green is not live. Confirm with the user where the delivered work actually stands — deployed, accepted, observed in use — and carry anything unresolved forward as an explicit item rather than an assumption.
120
+
121
+ Write `docs/bets/<bet-slug>/retrospective.md`: the patterns found, the follow-through audit results, any discovery alerts, the readiness state, and the action items — each with a stable ID (`<bet-slug>-R1`, `-R2`, …) so the next retrospective can audit them mechanically. Append the action items as bullets under `## Bets` in `.groundwork/cache/discovery-notes.md`, each carrying its ID — the next bet's Discovery phase already reads that section.
122
+
123
+ ### Step 8: Mark the bet delivered
124
+
125
+ Update `docs/bets/<bet-slug>/pitch.md` frontmatter to `status: delivered`. On a registry project, Step 2.7's gate applies: do not write `delivered` while any ledger cell for this bet's capabilities is empty — fill the column or the bet does not close.
126
+
127
+ ### Step 9: Hand off
128
+
129
+ Confirm the bet is complete. Summarise what was delivered, what was updated upstream, and what was parked for the next bet. Recommend a fresh context for the next bet — the rich delivery context has been compressed into doc updates and discovery notes, so the next bet does not need it.
130
+
131
+ ## Quality Standard: What "Deep Enough" Looks Like
132
+
133
+ The handoff fails when the Living Documents scan is a checkbox instead of a surgical update. A handoff that says "no changes needed" without naming what was scanned is indistinguishable from a handoff that skipped the scan entirely. The standard is concrete: state what you read, name what changed, and quote the change.
134
+
135
+ **Shallow output (insufficient):**
136
+
137
+ ```
138
+ Validation complete. Tests pass. Handing off to groundwork-doc-sync to refresh
139
+ the docs.
140
+ ```
141
+
142
+ **Deep output (required standard):**
143
+
144
+ ```
145
+ Validation complete.
146
+
147
+ Test suite: 47/47 passing. Contract verification: all cross-service calls
148
+ use the generated `notification_client`; no rogue HTTP found.
149
+
150
+ Whole bet archived: docs/bets/_archive/notification-delivery/ and
151
+ tests/bets/_archive/notification-delivery/.
152
+
153
+ Living Documents scan:
154
+
155
+ - `docs/architecture/index.md` — added `notification-service` to the service map
156
+ (Phase 3 — Service Design). Added two rows to the Service-Level
157
+ Requirements table: at-least-once delivery for outbound notifications,
158
+ idempotent webhook handler on the receiving side. Tech stack updated to
159
+ reference NATS JetStream as the chosen async transport with the same
160
+ reasoning attached to existing entries.
161
+ - `docs/design-system.md` — added `Toast` component variant for delivery-status
162
+ notifications. Updated interaction states to include the dismissable
163
+ state with focus-trap behaviour.
164
+ - `docs/product-brief.md` — no changes; the bet implemented capabilities
165
+ already described.
166
+ - `docs/architecture/infrastructure.md` — added `notification-service` (port 4002,
167
+ health endpoint `GET /health`) to the services table. Added NATS to
168
+ the infrastructure components table (port 4222, container
169
+ `<app>-nats`). Updated `./dev start` verification footnote to include
170
+ notification flow.
171
+ - `docs/surfaces.md` — ledger row `notification-delivery/in-app-status`
172
+ written: web-app delivered (`notification-delivery`), admin-cli planned
173
+ (cross-posted to discovery notes), mcp-server omitted (agents query
174
+ operation status via the contract). `.groundwork/surfaces.json` updated
175
+ in the same change; no empty cells.
176
+
177
+ Discovery notes:
178
+
179
+ - Removed two `## Design Details` entries that were incorporated into the
180
+ notification service's contract.
181
+ - Appended one `## Bets` entry: "Search experience parked — the user
182
+ raised it three times during this bet, and the architecture's search
183
+ capability is currently unmapped. Next bet candidate."
184
+
185
+ Bet status: delivered.
186
+ ```
187
+
188
+ The shallow version tells the user nothing. The deep version proves the scan happened, names what changed and why, and surfaces the discovery-note delta so the next bet starts with a clear inheritance.
189
+
190
+ The same standard applies across every scan target:
191
+ - **Architecture updates** must name the section, the change, and the reasoning — not just "added a service."
192
+ - **Design System updates** must name the component or pattern that changed and whether existing patterns are affected.
193
+ - **Brief updates** must justify the vision-level change against what the user actually said during delivery.
194
+ - **Infrastructure updates** must include the concrete observable changes — ports, commands, health endpoints — not a summary.
195
+ - **Ledger updates** must carry every cell's state with its payload and name where each `planned` deferral was cross-posted — a state without its payload is a decision without its record.
196
+
197
+ ## Congratulations
198
+
199
+ Once Steps 1 through 9 are complete and the user has seen the handoff summary, congratulate them on a successful bet. The cycle returns to the orchestrator for the next bet or anytime skill.
@@ -0,0 +1,125 @@
1
+ ---
2
+ name: groundwork-design-system
3
+ description: >
4
+ Translates the user's aesthetic intent — mood, personality, interaction
5
+ philosophy — into an implementation-ready `docs/design-system.md` that
6
+ eliminates all downstream design decisions. The brand conversation runs once;
7
+ a translation track runs per interface type in use. Taste conversation in,
8
+ precision specification out, reviewed with the user section by section.
9
+ ---
10
+
11
+ # GroundWork Design System
12
+
13
+ You are an opinionated, technical design systems architect collaborating with a domain expert. The user knows their product deeply — your role is to codify their vision into an implementation-ready design system that eliminates all downstream design decisions. Your output is `docs/design-system.md`: a precision specification that a developer or generative UI tool can implement without making any choices that belong to design.
14
+
15
+ **Adopt the designer persona.** Load `.groundwork/skills/groundwork-designer/SKILL.md` and operate as it for this entire workflow. It carries the design principles you apply — visual craft, layout and space, interaction and motion, usability, the token contract, accessibility — in a self-contained `references/` library routed by decision shape. This workflow choreographs the *conversation* (phases, gates, the per-interface-type tracks); the persona supplies the *design expertise*. When a phase reaches a decision the persona holds a reference for — perceptual colour and type in `visual-craft.md`, spacing and grid in `layout-and-space.md`, states and motion in `interaction-and-motion.md`, the token tiers in `design-systems-and-tokens.md` — load that reference and apply its reasoning rather than re-deriving it here.
16
+
17
+ Lead with curiosity and discovery before leading with proposals. Understand how the user wants their product to *feel* — the mood, the personality, the interaction philosophy — before committing to any specification values. When you can articulate their aesthetic intent clearly enough to explain it back to them, you are ready to translate it into a rigorous design system. Assumptions left unexamined here become CSS values nobody questioned and nobody likes.
18
+
19
+ Education is part of this role. Most users have a clear sense of taste and instinct; fewer understand why OKLCH matters over HEX, why spring physics feel different from linear easing, or how an 8-point spatial grid creates visual rhythm. When a design area has a well-understood technical foundation, surface it. Closing that gap is part of what makes this conversation valuable.
20
+
21
+ Apply the `groundwork-writer` skill when producing the final output document. Declarative, assertive, zero-hedging.
22
+
23
+ ---
24
+
25
+ ## Core Contract: Intent In, Specification Out
26
+
27
+ The user is not a designer or specification writer. They speak in taste, instinct, analogy, and feeling. That is the correct level of input.
28
+
29
+ The process has three beats:
30
+
31
+ 1. **High-level conversation** (Phases 1–4): The agent and user talk about how the product should *feel* — its mood, its personality, its interaction philosophy. No implementation details, no spec-level values, no technical formatting. This conversation runs **once, at brand level** — a product has one personality no matter how many interface types express it.
32
+ 2. **Expert translation** (Phase 5a): The agent autonomously converts the approved direction into a rigorous, implementation-ready specification. This is the agent's core contribution, and it runs **once per interface type in use** — the same brand direction becomes CSS tokens for a screen, ANSI roles for a terminal, protocol semantics for an agent surface.
33
+
34
+ When entering Phase 5a, announce the shift from collaborative conversation to autonomous translation — the user should understand the interaction pattern is changing and that the agent will return with a complete design system for review. Cache updates during this phase are preparation steps, not interruptions of the conversation.
35
+
36
+ 3. **Specific review** (Phase 5b): The agent presents each type's design system as a proposal. The user and agent walk through the specifics together — reacting to concrete choices, adjusting values, and refining until the spec is right.
37
+
38
+ This separation is non-negotiable. A user who is asked to approve OKLCH values during the taste conversation disengages. An agent who skips the translation and echoes the user's words back as a "design system" has done no useful work.
39
+
40
+ ---
41
+
42
+ ## How This Conversation Works
43
+
44
+ Building a design system is a multi-phase collaborative session, not a questionnaire. Each phase has a distinct goal. You drive the conversation — knowing which phase you are in, what you are trying to establish, and when you have enough to move forward.
45
+
46
+ - **Discover before proposing.** In each phase, explore the user's intent and preferences before presenting a recommendation. The proposal should feel like a natural conclusion to the conversation, not an interruption of it.
47
+ - **Use the user's language.** Never assume the user recognises acronyms or jargon they did not introduce themselves. When you bring technical concepts into the conversation, teach them — don't drop them.
48
+ - **Orient the user.** When starting a new phase, explain where the user is in the process and how the phase will be run.
49
+
50
+ ---
51
+
52
+ ## Operating Contract
53
+
54
+ Standard assistant behaviour — covering too much ground per turn, rushing to draft before the conversation has earned its conclusions, and treating documents as static after committing them — undermines collaborative design. These are the failure modes this process is built to prevent.
55
+
56
+ The shared operating contract at `.groundwork/skills/operating-contract.md` (contract v1) defines how to manage conversational pacing, discovery notes, living documents, and phase lifecycles. Read it before taking any other action — the protocols there govern how this entire skill operates.
57
+
58
+ ---
59
+
60
+ ## Initialization & Resume Protocol
61
+
62
+ ### Step 1: Cache Check
63
+
64
+ Check if `.groundwork/cache/design-system-cache.md` exists.
65
+
66
+ - If it **does not exist**, copy the template from `.groundwork/skills/groundwork-design-system/templates/design-system-cache.md` to `.groundwork/cache/design-system-cache.md`. Do not re-read the file you just wrote — the in-memory state is authoritative for the rest of this phase.
67
+ - If it **does exist**, read it. If `interface_types` is already recorded and phases are in progress, summarise what has been completed and ask whether the user wants to resume or start fresh. If they choose to start fresh, reset the cache file from the template. If they choose to resume, skip to Step 3.
68
+
69
+ ### Step 1.5: Discovery Notes Check
70
+
71
+ Apply the Discovery Notes check from the Operating Contract. Check `.groundwork/cache/discovery-notes.md` for entries under `## Design System` and carry them as pre-discovered context into the track.
72
+
73
+ The capture half of Protocol 1 applies through every phase of the track: when the user voices an out-of-phase signal — an architecture instinct, a delivery priority, an implementation specific — append it under its header (`## Architecture`, `## Bets`, `## Design Details`) in `.groundwork/cache/discovery-notes.md` and steer back to the design conversation. Create the file from the template at `.groundwork/skills/templates/discovery-notes.md` if it does not exist.
74
+
75
+ ### Step 1.6: Hand-off Cache Check
76
+
77
+ Check if `.groundwork/cache/handoff/product-brief.md` exists. If it does, read it in full — it carries the previous phase's post-commit context: rejected user-type framings, deferred design decisions, user aesthetic instincts not yet formalised. Treat this as pre-discovered context the same way as discovery notes. This is the Hand-off Cache contract from Protocol 6 of the Operating Contract.
78
+
79
+ If the file does not exist, skip this step. The Operating Contract's Cache Isolation rule (Protocol 7) forbids reading any other phase's cache.
80
+
81
+ ### Step 2: Interface Type Detection
82
+
83
+ Read the product brief's Downstream Context file `.groundwork/context/product-brief.md` first (Protocol 5) — that file carries the Key Decisions, Binding Constraints, and Deferred Questions the product brief committed to. Only read the body of `docs/product-brief.md` if the context file does not name the interaction surfaces clearly enough to classify.
84
+
85
+ Design tracks run once per **interface type** in use, not per surface — a web app and a mobile app are both `graphical-ui` and share one track run. When the context file's Key Decisions carry the surface set with horizon markers (MVP / later / aspirational), classify each surface into a type using the table below; the distinct types of the **MVP-horizon** surfaces are this session's active set. Types appearing only at later or aspirational horizons are deferred — record them in the cache, but do not run their tracks now: they run lazily when `groundwork-surface-activation` births the first surface of that type, appending its section to the existing design system.
86
+
87
+ When the context file carries no surface set (a brief written before surfaces were enumerated), fall back to single-type detection: determine the product's primary interface type and treat it as an active set of one.
88
+
89
+ The interface type describes what the end-user interacts with, not what the backend does. An AI-powered product with a visual frontend is `graphical-ui` regardless of backend complexity.
90
+
91
+ | Type | Signals | Examples |
92
+ |---|---|---|
93
+ | `graphical-ui` | Web app, mobile app, desktop app, dashboard, any product whose target users are end-consumers interacting through a screen | SaaS products, consumer apps, interactive fiction, e-commerce storefronts, admin panels, data visualisation tools, AI-powered products with a visual frontend |
94
+ | `cli` | Command-line tool, terminal application, shell utility — a human sits at a terminal and interacts through typed commands and rendered output, whether the tool runs one-shot or as an interactive session | Developer tools, build systems, package managers, infrastructure CLI, interactive coding assistants and agentic terminal apps (Claude Code, Gemini CLI, Aider) |
95
+ | `agentic-protocol` | Agent framework, skill system, MCP server, developer methodology, protocol — the consumer is another program or agent integrating via API, with no human terminal surface | GroundWork itself, LangChain, agent orchestrators, MCP servers |
96
+
97
+ If `docs/product-brief.md` does not exist or cannot be read, ask the user what kind of interface their product has — visual app, command-line tool, or agent/protocol system, or a combination. Use their answer to determine the types. Do not proceed without a confirmed active set in `interface_types`.
98
+
99
+ If the product brief describes end-consumers (players, readers, shoppers, viewers) as target users but uses backend or engine language, the product is `graphical-ui`. The `agentic-protocol` type applies only when the primary users are developers or other agents integrating via API.
100
+
101
+ Disambiguate `cli` from `agentic-protocol` by **who consumes the output**: a human watching a terminal, or a program integrating via API. A product where a human sits at a terminal interacting with an embedded agent is `cli`, even when an LLM drives the experience underneath — the design problem is terminal rendering, streaming, and interaction. `agentic-protocol` is for the framework or protocol consumed via API with no human terminal surface. A coding assistant a developer runs in their shell routes to `cli`; the MCP server or agent framework it talks to routes to `agentic-protocol`.
102
+
103
+ If the product brief contains explicit interface vocabulary (web app, CLI tool, agent framework), record the types. If the brief describes the system without naming any interaction surface, treat it as ambiguous and ask the user a single, direct question to determine which of the three types applies.
104
+
105
+ Write the active set to the `interface_types` field in `.groundwork/cache/design-system-cache.md`, and any deferred types to its `deferred_types` field.
106
+
107
+ ### Step 3: Load Foundation and Tracks
108
+
109
+ Load and execute `.groundwork/skills/groundwork-design-system/tracks/_foundation.md` — the shared foundation flow. It owns the session spine: the brand-level Phases 1–4 run once, each active type's Phase 5 translation and walkthrough run from its track file, and one commit closes the phase. The foundation draws each type's contributions from the corresponding track file:
110
+
111
+ | Interface Type | Track File |
112
+ |---|---|
113
+ | `graphical-ui` | `.groundwork/skills/groundwork-design-system/tracks/graphical-ui.md` |
114
+ | `cli` | `.groundwork/skills/groundwork-design-system/tracks/cli.md` |
115
+ | `agentic-protocol` | `.groundwork/skills/groundwork-design-system/tracks/agentic-protocol.md` |
116
+
117
+ Read the foundation file and the active tracks, then execute from the foundation's Phase 1 (or the appropriate resume point if resuming). DO NOT retain these initialization instructions in context once the foundation is loaded. The foundation file is the single source of truth for the session spine; each track is the single source of truth for its type's design content.
118
+
119
+ The output, `docs/design-system.md`, carries the shared brand foundation plus one titled section per active type (`# Graphical UI`, `# CLI`, `# Agentic Protocol`) — the section `docs/surfaces.md` design-track references resolve to. A deferred type gets its section later: `groundwork-surface-activation` runs that type's track lazily against the existing foundation, without re-running the brand conversation.
120
+
121
+ ### Commit Contract
122
+
123
+ The commit runs once, in the foundation flow's Phase 6, after every active type's walkthrough completes. It must follow Protocol 3.4 of the Operating Contract — including writing the Downstream Context file to `.groundwork/context/design-system.md` (Protocol 5, enforced by `groundwork-writer`) while keeping `docs/design-system.md` a clean spec with no summary section, and writing the hand-off file to `.groundwork/cache/handoff/design-system.md` (Protocol 6, template at `.groundwork/skills/templates/handoff.md`). The hand-off captures rejected aesthetic directions, deferred design decisions, user instincts about interaction patterns or motion that did not make it into the spec, and any other context the architecture phase needs. The previous phase's hand-off at `.groundwork/cache/handoff/product-brief.md` is deleted at the same commit — this phase has now consumed it.
124
+
125
+ **Brand tokens.** The commit also writes `.groundwork/config/brand-tokens.json` — the machine-readable projection of the branding decisions, following the contract at `.groundwork/skills/groundwork-design-system/templates/brand-tokens.md`. Every product gets the **Tier 1** `identity` block (name, wordmark, primary/accent colour, voice), projected mechanically from the brand's palette and the product brief — not a new design conversation — because scaffolding reads it to brand the `./dev` CLI regardless of interface type. Each active type that defines a **Tier 2** block adds it alongside: the `cli` track emits the `terminal` block (colour role table, symbol vocabulary, splash, typography) and the `graphical-ui` track emits the `visual` block (semantic palette, typography, shape, density, motion), each carrying the same values as its type's section in `docs/design-system.md`. A product with both types in use carries both blocks. This file lives in persistent config and is not deleted at cache cleanup.
@@ -0,0 +1,182 @@
1
+ # Brand Tokens Contract
2
+
3
+ `brand-tokens.json` is the machine-readable projection of the design system's branding decisions. The prose in `docs/design-system.md` is the human source of truth; this file is what automation reads. Both are written at the Design System commit; they never disagree because the tokens are derived from the same approved decisions.
4
+
5
+ **Location:** `.groundwork/config/brand-tokens.json` — the persistent config home, alongside `config.toml` and `state.json`. It is not a draft and it is not deleted on cache cleanup.
6
+
7
+ **Why it exists:** one brand, many renderers. The scaffolded `./dev` control plane reads these tokens to brand itself; a CLI product's own starter reads the same tokens through the same render layer; a graphical product's app generator reads them to seed its theme. The framework wears the brand it helps design.
8
+
9
+ ---
10
+
11
+ ## Tier 1 plus per-type Tier 2 blocks
12
+
13
+ Every project gets a `./dev` CLI regardless of what it is building, so **every product emits Tier 1** — the singular `identity` block, because identity is brand-level. **Tier 2 is a set of per-type blocks**, keyed by name at the top level of the JSON: each interface type whose design track produces a machine-projectable treatment contributes one block, so a product with several types in use carries several blocks side by side.
14
+
15
+ | Block | Emitted by | Carries | Read by |
16
+ |---|---|---|---|
17
+ | `identity` (Tier 1) | every product, exactly once | name, wordmark glyph, primary/accent colour, voice | `./dev`, lightly — and every Tier 2 consumer as the fallback root |
18
+ | `terminal` (Tier 2) | the `cli` track | colour role table, symbol vocabulary, splash, typography | `./dev` richly + the product CLI, via the shared render layer |
19
+ | `visual` (Tier 2) | the `graphical-ui` track | semantic palette (both themes), typography (with per-role micro), shape, density, motion (with interaction profiles), elevation, blur, gradients, surface treatments, optional `platform` ergonomics | graphical app generators, to seed the surface theme (Tailwind today; other theme projections as surface generators land) |
20
+
21
+ The `agentic-protocol` track contributes no Tier 2 block — a protocol has no terminal or visual treatment to project.
22
+
23
+ Tier 2 blocks are **additive** over Tier 1 and over each other. Consumers read the block they need **by key**, tolerate its absence (falling back to a theme derived from `identity`), and ignore blocks they do not know. Never reshape Tier-1 fields to add a block; only append.
24
+
25
+ The `tier` field reads as a capability summary: `1` means identity only; `2` means the file carries at least one Tier 2 block. Consumers must not branch on `tier` to locate blocks — presence of the block key is the only reliable signal, and existing consumers already work this way.
26
+
27
+ ---
28
+
29
+ ## Field reference
30
+
31
+ ### Tier 1 — `identity` (required, every product)
32
+
33
+ | Field | Type | Meaning |
34
+ |---|---|---|
35
+ | `appName` | string | Product name as shown in CLI headers and help. |
36
+ | `wordmark` | string | A short glyph or mark rendered before the name (e.g. `◢◤`). One to three characters. Empty string for none. |
37
+ | `primary` | string `#rrggbb` | The brand's primary accent colour. Drives the CLI's primary chrome (logo, active markers, step headers). |
38
+ | `accent` | string `#rrggbb` | A secondary accent for emphasis and selection. |
39
+ | `voice` | string | A short descriptor of the product's tone (e.g. `"terse, Unix-traditional"`). Informs default verbosity and microcopy. |
40
+
41
+ ### Tier 2 — `terminal` (cli track)
42
+
43
+ - `colorRoles` — a map of semantic role → resolution across colour depths. Roles: `success`, `error`, `warning`, `info`, `muted`, `accent`, `header`, `key`, `value`. Each role carries `truecolor` (`#rrggbb` or `null`), `ansi256` (0–255 or `null`), and `noColor` (the bold/dim/underline/case treatment used when colour is stripped). The render layer resolves truecolor → ansi256 → noColor → plain by terminal capability. Roles with `null` colour fields (e.g. `header`) are expressed by `noColor` treatment at every depth.
44
+ - `symbols` — a map of marker → `{ unicode, ascii }`. The render layer uses `unicode` on capable terminals and `ascii` otherwise. Markers: `success`, `error`, `warning`, `info`, `step`, `substep`, `active`.
45
+ - `splash` — `{ style, tagline }`. `style` is one of `wordmark-line` (the mark + name on one line), `banner` (a multi-line header), or `none`. `tagline` is optional.
46
+ - `typography` — treatment per content tier: `header`, `title`, `body`, `muted`. Values are treatment descriptors (`"bold + UPPERCASE"`, `"bold + primary"`, `"plain"`, `"dim"`).
47
+
48
+ ### Tier 2 — `visual` (graphical-ui track)
49
+
50
+ - `palette` — a map of semantic role → `{ light, dark }` CSS colour strings (OKLCH or `#rrggbb`), the machine form of the colour architecture in `docs/design-system.md`. Roles: `primary`, `accent`, `surface`, `surfaceAlt`, `textBody`, `success`, `error`, `warning`, `info`. Both theme values are required for every role — the design system commits to dual-theme palettes, so the projection carries both.
51
+ - `typography` — `{ display, body, scale }`. `display` and `body` are `{ family, weight }` for the heading and body families. `scale` is a short descriptor of the type-scale treatment (e.g. `"1.25 modular from 16px, fluid clamp"`), enough for a generator to reconstruct the scale's character without re-deriving every step — the full scale lives in the document. Optionally carries `roles` — a map of type role (`display`, `title`, `body`, `caption`, `label`) → `{ size, lineHeight, weight, tracking }`, the concrete per-role micro (line-height and tracking) that separates considered type from framework defaults — and `numeric` (e.g. `"tabular-nums"`) where columns of figures must align.
52
+ - `shape` — `{ radiusBase, character }`. `radiusBase` is the base corner radius (e.g. `"8px"`); `character` is a one-line descriptor of the shape language (e.g. `"soft, concentric nesting"`).
53
+ - `density` — a one-line spacing/density descriptor carrying the grid base (e.g. `"comfortable, 8pt grid"`).
54
+ - `motion` — `{ easeStandard, durationBaseMs, personality }`. `easeStandard` is the standard easing curve (`"cubic-bezier(0.2, 0, 0, 1)"`), `durationBaseMs` the base duration, `personality` a one-word register (`"snappy"`, `"weighted"`, `"restrained"`). Optionally carries `interactions` — a map of context (`hover`, `press`, `enter`, `exit`, `stagger`) → `{ durationMs, ease, transform }`, the per-context motion profiles a surface spec references so feedback timing is a token rather than an ad-hoc value invented per component.
55
+ - `elevation` — optional; a map of level name → an ordered array of shadow layers, each `{ y, blur, spread?, color }` (CSS length plus an OKLCH/`#rrggbb` colour, alpha tapering as the layer widens). The machine form of the design system's depth model: a level is a *stack* — several layers reading as one modelled shadow — not a single drop shadow. Name levels by role (`low`, `mid`, `high`) or by the product's own vocabulary. The geometry serves both themes; carry theme-specific tinting in the layer colour where the design system calls for it.
56
+ - `blur` — optional; a map of level name → CSS length (e.g. `"subtle": "8px"`, `"standard": "12px"`, `"heavy": "20px"`), the backdrop-blur radii the surface treatments draw on.
57
+ - `gradients` — optional; a map of name → a CSS gradient string (the mesh/aurora recipe, e.g. a layered `radial-gradient`), or `{ light, dark }` when the recipe differs by theme. The machine form of the design system's ambient-texture decisions.
58
+ - `surface` — optional; a map of named surface treatment → a composition of the tokens above: `{ blur?, tint?, border?, elevation?, gradient?, noise? }`, where `blur`/`elevation`/`gradient` name an entry in those maps (or carry a literal value) and `tint`/`border` are CSS colours with alpha. This is the per-app surface vocabulary — the glass/elevated/hero treatments a product composes once and reuses — and it is the home for surface recipes that must never be baked into an engineer skill. A generator projects each treatment into one utility class.
59
+ - `references` — optional; the machine-readable form of the design system's `## Design References` record. An array of `{ name, admired }` objects (e.g. `{ "name": "Linear", "admired": "command-palette density, backdrop blur, restraint with colour" }`), naming the market-leading products the design drew from and the specific qualities admired. It is the machine index of the technique library — it informs the atmosphere and motion tokens and the per-surface micro-polish spec at bet design; present when the design system committed a reference record. Sub-objects keyed by platform dimension; each theme projection reads the sub-object it serves and ignores the rest. Web needs no sub-object — the fields above are the web baseline, and one visual block serves every platform.
60
+ - `platform.touch` (mobile surfaces) — `{ targetMin, durationScale }`. `targetMin` is the minimum interactive dimension (e.g. `"48dp"`); the mobile theme projection enforces it in tap-target sizing. `durationScale` (optional, default 1) multiplies `durationBaseMs` for touch surfaces, where full-screen transitions span more distance than pointer micro-interactions.
61
+ - `platform.desktop` (desktop surfaces) — `{ titleBar, menuStyle, density }`. `titleBar` is the window-chrome treatment: `"native"`, `"hidden-inset"` (content extends beneath the platform's window controls), or `"custom"`. `menuStyle` is `"native"` (OS menu bar) or `"in-window"`. `density` (optional) overrides the top-level `density` descriptor for pointer-precision layouts. The desktop shell owns these fields; its renderer reads the shared fields unchanged.
62
+
63
+ ---
64
+
65
+ ## Annotated example — a product carrying both Tier 2 blocks
66
+
67
+ A web app, a mobile app, and a desktop shell plus an admin CLI: the graphical-ui track emitted one `visual` block for all three graphical surfaces — with `platform` ergonomics for mobile and desktop — the cli track emitted `terminal`, and every projection carries the same brand.
68
+
69
+ ```json
70
+ {
71
+ "schema": "groundwork.brand-tokens",
72
+ "version": 1,
73
+ "tier": 2,
74
+ "identity": {
75
+ "appName": "Acme",
76
+ "wordmark": "◢◤",
77
+ "primary": "#5fafff",
78
+ "accent": "#d7afff",
79
+ "voice": "terse, Unix-traditional"
80
+ },
81
+ "visual": {
82
+ "palette": {
83
+ "primary": { "light": "oklch(55% 0.18 250)", "dark": "oklch(70% 0.15 250)" },
84
+ "accent": { "light": "oklch(70% 0.15 300)", "dark": "oklch(75% 0.13 300)" },
85
+ "surface": { "light": "oklch(98% 0.005 250)", "dark": "oklch(18% 0.01 250)" },
86
+ "surfaceAlt": { "light": "oklch(95% 0.008 250)", "dark": "oklch(22% 0.012 250)" },
87
+ "textBody": { "light": "oklch(25% 0.01 250)", "dark": "oklch(90% 0.005 250)" },
88
+ "success": { "light": "oklch(60% 0.13 160)", "dark": "oklch(70% 0.12 160)" },
89
+ "error": { "light": "oklch(55% 0.18 25)", "dark": "oklch(68% 0.16 25)" },
90
+ "warning": { "light": "oklch(70% 0.14 85)", "dark": "oklch(78% 0.13 85)" },
91
+ "info": { "light": "oklch(60% 0.14 250)", "dark": "oklch(72% 0.12 250)" }
92
+ },
93
+ "typography": {
94
+ "display": { "family": "Instrument Sans", "weight": 600 },
95
+ "body": { "family": "Inter", "weight": 400 },
96
+ "scale": "1.25 modular from 16px, fluid clamp",
97
+ "roles": {
98
+ "display": { "size": "2.5rem", "lineHeight": 1.1, "weight": 600, "tracking": "-0.02em" },
99
+ "title": { "size": "1.5rem", "lineHeight": 1.25, "weight": 600, "tracking": "-0.01em" },
100
+ "body": { "size": "1rem", "lineHeight": 1.6, "weight": 400, "tracking": "0" },
101
+ "caption": { "size": "0.875rem", "lineHeight": 1.5, "weight": 400, "tracking": "0.01em" }
102
+ },
103
+ "numeric": "tabular-nums"
104
+ },
105
+ "shape": { "radiusBase": "8px", "character": "soft, concentric nesting" },
106
+ "density": "comfortable, 8pt grid",
107
+ "motion": {
108
+ "easeStandard": "cubic-bezier(0.2, 0, 0, 1)",
109
+ "durationBaseMs": 150,
110
+ "personality": "snappy",
111
+ "interactions": {
112
+ "hover": { "durationMs": 150, "ease": "cubic-bezier(0, 0, 0.2, 1)", "transform": "translateY(-1px)" },
113
+ "press": { "durationMs": 100, "ease": "cubic-bezier(0.4, 0, 1, 1)", "transform": "scale(0.97)" },
114
+ "enter": { "durationMs": 200, "ease": "cubic-bezier(0, 0, 0.2, 1)", "transform": "scale(0.98)" },
115
+ "stagger": { "durationMs": 30, "ease": "linear", "transform": "none" }
116
+ }
117
+ },
118
+ "elevation": {
119
+ "low": [ { "y": "1px", "blur": "2px", "color": "oklch(0% 0 0 / 0.06)" } ],
120
+ "mid": [ { "y": "1px", "blur": "2px", "color": "oklch(0% 0 0 / 0.06)" },
121
+ { "y": "4px", "blur": "8px", "color": "oklch(0% 0 0 / 0.04)" } ],
122
+ "high": [ { "y": "1px", "blur": "2px", "color": "oklch(0% 0 0 / 0.06)" },
123
+ { "y": "4px", "blur": "8px", "color": "oklch(0% 0 0 / 0.04)" },
124
+ { "y": "12px", "blur": "24px", "color": "oklch(0% 0 0 / 0.03)" } ]
125
+ },
126
+ "blur": { "subtle": "8px", "standard": "12px", "heavy": "20px" },
127
+ "gradients": {
128
+ "aurora": "radial-gradient(60% 60% at 30% 20%, oklch(70% 0.15 300 / 0.18), transparent 70%)"
129
+ },
130
+ "surface": {
131
+ "glass": { "blur": "standard", "tint": "oklch(98% 0.005 250 / 0.72)", "border": "oklch(100% 0 0 / 0.08)", "elevation": "mid" },
132
+ "elevated": { "blur": "heavy", "tint": "oklch(98% 0.005 250 / 0.82)", "border": "oklch(100% 0 0 / 0.12)", "elevation": "high" },
133
+ "hero": { "blur": "standard", "tint": "oklch(98% 0.005 250 / 0.65)", "border": "oklch(100% 0 0 / 0.10)", "elevation": "high", "gradient": "aurora" }
134
+ },
135
+ "platform": {
136
+ "touch": { "targetMin": "48dp", "durationScale": 1.25 },
137
+ "desktop": { "titleBar": "hidden-inset", "menuStyle": "native", "density": "compact, 8pt grid" }
138
+ }
139
+ },
140
+ "terminal": {
141
+ "colorRoles": {
142
+ "success": { "truecolor": "#5faf87", "ansi256": 72, "noColor": "bold" },
143
+ "error": { "truecolor": "#d75f5f", "ansi256": 167, "noColor": "bold" },
144
+ "warning": { "truecolor": "#d7af5f", "ansi256": 179, "noColor": "bold" },
145
+ "info": { "truecolor": "#5fafff", "ansi256": 75, "noColor": "dim" },
146
+ "muted": { "truecolor": "#8a8a8a", "ansi256": 245, "noColor": "dim" },
147
+ "accent": { "truecolor": "#d7afff", "ansi256": 183, "noColor": "underline" },
148
+ "header": { "truecolor": null, "ansi256": null, "noColor": "bold+upper" },
149
+ "key": { "truecolor": "#5fafff", "ansi256": 75, "noColor": "plain" },
150
+ "value": { "truecolor": "#d0d0d0", "ansi256": 252, "noColor": "plain" }
151
+ },
152
+ "symbols": {
153
+ "success": { "unicode": "✔", "ascii": "OK" },
154
+ "error": { "unicode": "✖", "ascii": "x" },
155
+ "warning": { "unicode": "⚠", "ascii": "!" },
156
+ "info": { "unicode": "●", "ascii": "*" },
157
+ "step": { "unicode": "▶", "ascii": ">" },
158
+ "substep": { "unicode": "↳", "ascii": "-" },
159
+ "active": { "unicode": "❯", "ascii": ">" }
160
+ },
161
+ "splash": { "style": "wordmark-line", "tagline": "" },
162
+ "typography": {
163
+ "header": "bold + UPPERCASE",
164
+ "title": "bold + primary",
165
+ "body": "plain",
166
+ "muted": "dim"
167
+ }
168
+ }
169
+ }
170
+ ```
171
+
172
+ A CLI-only product is the same object without the `visual` block; a web-only product, without the `terminal` block — and without `platform`, which appears only when a mobile or desktop surface shares the visual block. A Tier-1 file (`"tier": 1`) carries neither block — `identity` only.
173
+
174
+ ---
175
+
176
+ ## Rules
177
+
178
+ - **Derive, never invent.** Every value traces to an approved Design System decision. `terminal.colorRoles` is the machine form of the CLI section's colour architecture; `visual.palette` is the machine form of the graphical section's colour architecture — block and document must carry the same values.
179
+ - **Tier 1 is always derivable.** For products with no cli track, project the brand's primary palette colour to `identity.primary`, pick a secondary as `accent`, and take the product name and voice from the brief. This is a mechanical projection, not a new design conversation.
180
+ - **One block per type, one writer per block.** Each type's track emits its own block at the single Design System commit (or at lazy activation, when a type's track runs later). Blocks never share or override each other's fields.
181
+ - **Versioned contract.** `version` is bumped only when the shape of an existing field changes. Adding a block kind, or an optional field or sub-object within a block (e.g. `visual.platform`), is additive — `version` stays 1. Consumers ignore unknown fields and unknown blocks, and tolerate any missing Tier 2 block or optional field.
182
+ - **Many readers, by key.** The `workspace-dev-cli` generator, the shared CLI render layer, and the `cli-app` product generator read `terminal`; graphical app generators read `visual`; none of them write, and none locate a block through the `tier` field.
@@ -0,0 +1,64 @@
1
+ # Design System Cache
2
+
3
+ > This file captures approved outputs from each phase of the Design System process. It is used to resume work and to compile the final `docs/design-system.md`. Do not edit manually.
4
+
5
+ **Interface Types:** pending
6
+ **Deferred Types:** none
7
+
8
+ ---
9
+
10
+ ## Phase 1: Non-Functional Requirements
11
+
12
+ **Status:** pending
13
+
14
+ <!-- Replace this section with the agreed NFRs once the user approves them. -->
15
+
16
+ ---
17
+
18
+ ## Phase 2: Inspiration Library
19
+
20
+ **Status:** pending
21
+
22
+ <!-- Replace this section with the agreed inspiration library once the user confirms the direction. -->
23
+
24
+ ---
25
+
26
+ ## Phase 3: Structure
27
+
28
+ **Status:** pending
29
+
30
+ <!-- One subsection per active interface type. Replace with each type's agreed structure definition once the user approves it. -->
31
+
32
+ ---
33
+
34
+ ## Phase 4: Design Language
35
+
36
+ **Status:** pending
37
+
38
+ ### Cluster Coverage
39
+
40
+ Language clusters group aesthetic decisions for user reaction. The brand-level core is defined in the foundation flow; each active track's Type language contribution folds into the same clusters. Skip a cluster only when irrelevant to the product.
41
+
42
+ - [ ] Cluster 1: Identity
43
+ - [ ] Cluster 2: Feel
44
+ - [ ] Cluster 3: Craft
45
+
46
+ ### Synthesis
47
+
48
+ <!-- Replace with the Phase 4 Synthesis Gate output once the user approves the direction. -->
49
+
50
+ ---
51
+
52
+ ## Phase 5: Expert Translation & Review
53
+
54
+ **Status:** pending
55
+
56
+ **Draft Location:** `.groundwork/cache/design-system-draft/` — a directory of per-section files shared by all active types. See each track's file table and the foundation flow's Draft Layout rule. Concatenated into `docs/design-system.md` at commit.
57
+
58
+ ### Walkthrough Progress
59
+
60
+ Spec clusters group implementation specifics for the Phase 5b walkthrough. Names are deliberately distinct from Phase 4's language clusters. Phase 5 runs once per active type — duplicate this checklist under a heading per type.
61
+
62
+ - [ ] Cluster 1: Foundation (base tokens — colour, type scale, spacing equivalents)
63
+ - [ ] Cluster 2: Interaction (depth, motion, interaction states, behaviour under load)
64
+ - [ ] Cluster 3: Surface (everything else — refer to the active track for the full list)