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,112 @@
1
+ ---
2
+ name: technical-design-checklist
3
+ description: >
4
+ Type-specific failure modes for reviewing a bet's technical design — the
5
+ contract Decomposition and Delivery execute against.
6
+ ---
7
+
8
+ # Technical Design Checklist
9
+
10
+ This checklist checks a draft `docs/bets/<slug>/technical-design/` directory. It answers one question:
11
+ **could a developer implement from this design on the first pass — and could a milestone proof
12
+ pass or fail against it unambiguously?**
13
+
14
+ Each item names a violation. Match it against the document text, the bet's pitch, and the
15
+ upstream docs. Bet documents carry no Downstream Context file and no summary section — do not
16
+ flag the absence of either.
17
+
18
+ ## Document Shape
19
+
20
+ - [ ] 🔴 **Implementation code present**: the document contains application logic — the design
21
+ phase is forbidden from writing implementation code; only design documentation, interface
22
+ specifications, contracts, and schemas belong here.
23
+ - [ ] 🟡 **Per-milestone organisation**: the design is split by milestone or phase rather than
24
+ covering the entire bet — decomposition has leaked into the design artifact.
25
+ - [ ] 🟡 **Section missing without reason**: one of UI Design, Data Flows, API Design,
26
+ or Schema & Data Design is absent and the document does not state why it does not apply to this bet.
27
+
28
+ ## UI Design
29
+
30
+ UI Design carries one subsection per surface in the pitch's `surfaces:` frontmatter. When
31
+ the project has no surface registry (`docs/surfaces.md`), the product has a single implicit
32
+ surface — expect exactly one subsection in the project's interface medium, and do not flag the
33
+ absence of surface ceremony.
34
+
35
+ - [ ] 🔴 **In-scope surface undesigned**: a surface in the pitch's `surfaces:` scope has no
36
+ UI Design subsection — that surface's milestone tests will have nothing to assert
37
+ against, and delivery will improvise the experience.
38
+ - [ ] 🔴 **Untestable interface**: a view, command, or interaction is described too vaguely for a
39
+ test to pass or fail against it — surface milestone tests assert against these subsections, so
40
+ "the user can manage their notifications" specifies nothing.
41
+ - [ ] 🔴 **Missing states**: a view or command defines its happy path but not its loading, empty,
42
+ error, or degraded states — the states are where implementations diverge silently.
43
+ - [ ] 🟡 **Wireframe missing**: a `graphical-ui` surface's key view defines states but carries no
44
+ wireframe — neither an ASCII sketch nor a linked mockup — so its layout and hierarchy are left
45
+ for the build to improvise. The ASCII wireframe is the always-present baseline; a mockup image
46
+ supplements but does not replace it.
47
+ - [ ] 🟡 **Wrong medium vocabulary**: a surface's subsection does not use the vocabulary of that
48
+ surface's interface type in `docs/design-system.md` — screens and states for graphical UI,
49
+ commands and output for CLI, request/response turns for agentic protocol. Each subsection
50
+ speaks its own surface's vocabulary; a CLI subsection describing "screens" is a violation even
51
+ when the bet also scopes a graphical surface.
52
+ - [ ] 🟡 **Organised by service, not by interaction**: a surface subsection is structured by
53
+ feature or service instead of by view, command, or interaction — the user-observable surface
54
+ is the unit milestones prove.
55
+
56
+ ## API Design
57
+
58
+ - [ ] 🔴 **Vague shape**: a prose API entry in `03-api-design.md` says "returns the entity" or
59
+ "accepts the standard payload" instead of giving the full request and response shapes with
60
+ field types inline. The prose design is the bet's only contract — Delivery materializes proofs
61
+ and builds the implementation from these shapes, so what is not here will not be in the
62
+ implementation, and a proof cannot rest on a shape the design never spelled out.
63
+ - [ ] 🔴 **State change without a shape**: a bet changes persistent state but the affected store
64
+ carries no field shapes in `04-data-design.md` — column names, types, and nullability. A
65
+ persisted effect a proof observes traces to this store; an undefined store cannot be
66
+ implemented or proven against.
67
+ - [ ] 🔴 **No error cases**: an endpoint in the API design defines no error responses, or lists
68
+ status codes without caller guidance — the caller's recovery behaviour is part of the contract.
69
+ - [ ] 🔴 **Contract shaped for one consumer**: an interface in the API design only one in-scope
70
+ surface can consume — it presumes web session state, returns markup where data belongs,
71
+ paginates by viewport, or encodes one surface's rendering concerns. The contract serves every
72
+ in-scope surface and presumes none; when only one surface is in scope, the latent agentic
73
+ surface is the second consumer — a programmatic caller with no UI and no session must find the
74
+ contract complete.
75
+ - [ ] 🟡 **Untyped field**: a request or response field appears without a type, nullability, or
76
+ allowed values where they matter (enums, cursors, identifiers).
77
+ - [ ] 🟡 **Auth unstated**: a contract does not state its authentication requirement, on a
78
+ boundary where the architecture defines one.
79
+ - [ ] 🟡 **Rationale-free surprise**: a non-obvious contract decision (pagination model,
80
+ idempotency rule, versioning) is asserted with no design rationale — the next reader will
81
+ relitigate it.
82
+
83
+ ## Data Flows & Data Design
84
+
85
+ - [ ] 🔴 **Flow without a trigger or a sink**: a data path does not state what initiates it,
86
+ which services handle it, or what persists at the end — an arrow with a missing end.
87
+ - [ ] 🟡 **Flow without a diagram**: a non-trivial cross-service or routing flow is described in
88
+ prose with no `sequenceDiagram` or `flowchart` — ordering and service boundaries that a diagram
89
+ makes legible are left to the reader to reconstruct.
90
+ - [ ] 🟡 **Domain doc duplicated**: the schema section restates an entity already defined in
91
+ `docs/architecture/domain/` instead of referencing the entity doc and describing only what this bet adds or
92
+ changes — the copies will drift.
93
+ - [ ] 🟡 **Schema without lifecycle**: a table or store that carries a status field defines no
94
+ state machine for it, and no reference to where one is defined.
95
+
96
+ ## Chain Integrity
97
+
98
+ - [ ] 🔴 **Pitched capability undesigned**: a capability or outcome the pitch commits to has no
99
+ interface element, flow, or contract covering it — Delivery will discover the hole mid-bet.
100
+ - [ ] 🔴 **Silent scope growth**: an interface element or flow traces to nothing in the pitch —
101
+ the design has quietly expanded the bet beyond its appetite.
102
+ - [ ] 🟡 **Stakes mismatch**: the design's actual blast radius or reversibility is graver than
103
+ the pitch's stakes read — it touches a one-way door, a load-bearing path, or a wider surface
104
+ than the pitch sized for — yet no rigour (deeper review, a flag, a smaller increment) answers it.
105
+ - [ ] 🔴 **Architecture contradiction**: a contract or flow contradicts `docs/architecture/index.md`
106
+ or an accepted ADR — a sync call across a boundary the architecture made async, a store a
107
+ service does not own.
108
+ - [ ] 🟡 **Pitch topology missing or stale**: the design establishes the services and components
109
+ this bet touches, but the pitch's Solution carries no topology graph — or still shows the
110
+ template placeholder — so a reader of the pitch cannot see the system the bet plays in. A
111
+ trivial single-component bet may carry a one-line note instead of a graph; silence is the
112
+ violation.
@@ -0,0 +1,181 @@
1
+ ---
2
+ name: groundwork-review
3
+ description: >
4
+ Reviews a draft GroundWork document in an isolated subagent context and
5
+ returns a structured verdict — PRESENT or REVISE — with critical and advisory
6
+ findings. Calling skills invoke it once per mutated canonical doc with the
7
+ document path and type; only the verdict and findings flow back.
8
+ ---
9
+
10
+ # GroundWork Review
11
+
12
+ ## How This Skill Is Invoked
13
+
14
+ This skill runs in an **isolated subagent context** — never in the calling skill's main conversation. The calling skill provides a document path and document type; this subagent reads the document, performs the review, and returns the verdict and findings only. The deliberation, the upstream-doc reads, and any intermediate reasoning stay in the subagent context and do not flow back to the caller.
15
+
16
+ Running the review in-context, the way earlier versions of this skill operated, paid the cost of every review's intermediate reasoning forever — the verdict and findings are useful to the caller; the deliberation is not. Isolation is the contract.
17
+
18
+ ### Invocation environments
19
+
20
+ | Environment | How the calling skill invokes the review |
21
+ |---|---|
22
+ | Claude Code | Via the `Task` tool with a general-purpose subagent. The prompt loads this file and supplies the document path and document type. |
23
+ | Other environments | Any mechanism that runs this skill's instructions in an isolated context with file-read tools and returns the final text. |
24
+
25
+ The contract is environment-agnostic — input and output are the same regardless of how the isolated execution is realised.
26
+
27
+ ---
28
+
29
+ ## Inputs
30
+
31
+ The calling skill passes two fields:
32
+
33
+ - `document_path` — the draft to review. The path may point to a cache draft (e.g. `.groundwork/cache/product-brief-draft.md`) or a committed canonical doc.
34
+ - `document_type` — one of: `product-brief`, `design-system`, `architecture`, `infrastructure`, `domain-entity`, `bet-pitch`, `technical-design`, `decomposition`, `maturity`. Used to locate upstream documents.
35
+
36
+ Read the document at `document_path` before beginning any check.
37
+
38
+ ---
39
+
40
+ ## Type-Specific Checklist
41
+
42
+ After reading the document, load `.groundwork/skills/groundwork-review/checklists/<document_type>.md` if it exists. The checklist names the failure modes specific to this document type; apply its items as the type-specific pass alongside Checks 1–4. When a checklist item is violated, cite it **by name** in the finding — e.g. `checklist: Label without a person — 'Role-Playing Groups' has no job-to-be-done` — not by restating the item's text.
43
+
44
+ If the checklist file is missing, proceed with the generic checks alone — its absence is not an error.
45
+
46
+ One checklist deliberately sits outside the `document_type` enum: `checklists/implementation-readiness.md` is the delivery workflow's inline gate, applied directly by the bet skill before the first slice — it never routes through this review and must not be added as a `document_type`.
47
+
48
+ Checklist findings flow through the same output contract below: the item's 🔴/🟡 marking sets the finding's severity, the verdict rules apply unchanged, and the length discipline holds — cite item names, not item text.
49
+
50
+ ---
51
+
52
+ ## Output Contract
53
+
54
+ Return exactly two blocks of structured output, in this order, and nothing else:
55
+
56
+ ```
57
+ VERDICT: PRESENT | REVISE
58
+
59
+ FINDINGS:
60
+ - 🔴 <finding 1>
61
+ - 🔴 <finding 2>
62
+ - 🟡 <advisory finding>
63
+ ```
64
+
65
+ If there are no findings, return `FINDINGS: none`. Do not write conversational text, do not summarise the document, do not explain your reasoning. The calling skill consumes only the verdict and findings — anything else is wasted output tokens.
66
+
67
+ The verdict rules:
68
+
69
+ - Any 🔴 Critical finding → `VERDICT: REVISE`. The caller revises and re-invokes.
70
+ - Only 🟡 Advisory findings (or none) → `VERDICT: PRESENT`. The caller surfaces the advisory findings to the user after presenting the draft.
71
+
72
+ ---
73
+
74
+ ## Check 1: Conversation Fidelity
75
+
76
+ The subagent context does not see the calling skill's conversation. This check therefore narrows: instead of comparing the document to the conversation that produced it, compare it to the document's own internal coherence and to the upstream docs (Check 3).
77
+
78
+ For checks that genuinely require the conversation, the calling skill is responsible for noting them when it invokes the review — pass any concern about fidelity as a hint inside the invocation prompt.
79
+
80
+ For this check, answer:
81
+
82
+ **Does the document contradict itself?**
83
+ Scan for internal contradictions — a capability named in one section that is excluded in another, a constraint stated as binding but ignored in the body, a deferred question that the body silently resolves. Each contradiction is a finding.
84
+
85
+ **Does the document contain claims the upstream docs do not support?**
86
+ This shades into Check 3 but applies even when the document has no upstream — any claim that reads as fact but is not derivable from the document's own evidence is a finding.
87
+
88
+ ---
89
+
90
+ ## Check 2: The Handoff Test
91
+
92
+ This document will be read by someone — agent or human — who was not in the conversation. They will use it to start their own work.
93
+
94
+ Read the document's own description of its purpose and who it serves. Then ask:
95
+
96
+ **Can each intended consumer start their work with only this document?**
97
+
98
+ For every person or role the document claims to serve, ask: what would they have to come back and ask before they could begin? Each unanswered question is a finding.
99
+
100
+ Published `docs/` artifacts are **clean reference documentation** — they carry no `## Summary for Downstream` section. The cross-phase contract (Key Decisions / Binding Constraints / Deferred Questions / Out of Scope) lives in the ephemeral Downstream Context file at `.groundwork/context/<phase>.md` (Protocol 5 of the operating contract), written at commit and torn down at setup completion (Protocol 10). That context file is **not** the document under review and is **not** part of this gate — the reviewer assesses the published doc body as reference documentation. Do not read `.groundwork/context/` and do not require, or check the contents of, any summary section in the published doc.
101
+
102
+ If a published setup doc still carries a leftover `## Summary for Downstream` section (an old-template artifact), that is itself worth a 🟡 finding — the section no longer belongs in published docs — but its **absence** is correct and must never be flagged.
103
+
104
+ Apply the Handoff Test to the body itself: every decision, constraint, deferral, and exclusion the consumers need must be present and coherent **in the body**. A binding decision the body fails to record, or an open question the body silently resolves, is a finding on the body — not on any summary header.
105
+
106
+ ---
107
+
108
+ ## Check 3: Upstream Contract
109
+
110
+ Every document after the first inherits commitments from the documents that came before it.
111
+
112
+ The chain is:
113
+
114
+ ```
115
+ product-brief → design-system → architecture → infrastructure → bet-pitch → technical-design → decomposition
116
+ ```
117
+
118
+ **`maturity` resolves its upstream specially.** The maturity doc (`docs/maturity.md`) assesses the project against the model defined at `.groundwork/skills/maturity-model.md` — read that file first; it defines the dimensions (D1–D9), assessment states, and the allowed severity/recommendation/status values. Its upstream is the full canonical doc set: an assessment or roadmap row that contradicts a committed doc (claiming D3 ✅ while `docs/architecture/infrastructure.md` records no `./dev` surface, or naming a service `docs/architecture/index.md` does not have) is a 🔴 finding.
119
+
120
+ **`domain-entity` resolves its upstream specially.** Domain entity docs (`docs/architecture/domain/<entity>.md`) are *generated from* architecture, so they sit below it rather than on the linear chain. Their upstream is **`docs/architecture/index.md` plus the accepted (non-superseded) ADRs under `docs/architecture/decisions/`** — skip any ADR whose `status` is `superseded`. The entity's `Owner:`, its fields, and any vendor or mechanism it names (auth provider, persistence model, data-isolation strategy) must agree with that current architecture and those ADRs. A domain doc that still names a superseded choice — e.g. `Owner: web (via Supabase Auth)` after an ADR moved auth to Clerk and persistence to another service — is a 🔴 finding: it describes a system no longer being built.
121
+
122
+ An invariant that asserts a guarantee an accepted ADR explicitly surrendered or weakened — claiming a pre-screen where the ADR records a monitor, immediate consistency where the ADR accepted eventual — is a 🔴 finding: it overstates what the system enforces. A domain event listed as published when the architecture provisions no message broker or event bus is a 🔴 finding for the same reason: it implies a mechanism that does not exist.
123
+
124
+ For the given `document_type`, read every upstream document that exists. The foundational documents live at canonical paths: `docs/product-brief.md`, `docs/design-system.md`, `docs/architecture/index.md`, `docs/architecture/infrastructure.md`. The bet documents live under the bet slug: `docs/bets/<slug>/pitch.md` and the technical-design directory `docs/bets/<slug>/technical-design/` (read every section file in it). When reviewing a bet document, infer `<slug>` from the document path — the draft path contains the slug as a directory component.
125
+
126
+ **Read each upstream doc's body.** Published upstream docs are reference documentation with no summary section; the doc body is the contract. Check the document under review against the decisions and constraints the upstream body commits to.
127
+
128
+ If an upstream document doesn't exist, skip this check for that upstream and note its absence — do not fail on it.
129
+
130
+ If the product brief is the document being reviewed, skip this check entirely. It has no upstream.
131
+
132
+ For each upstream:
133
+
134
+ **Does the document honour every commitment from upstream?**
135
+
136
+ - Are all decisions, constraints, and users/capabilities the upstream body commits to accounted for — either addressed, explicitly deferred, or quietly compatible?
137
+ - Does anything in this document contradict the upstream body?
138
+ - Has any upstream commitment been silently dropped?
139
+
140
+ Each contradiction, omission, or silent departure is a finding.
141
+
142
+ ---
143
+
144
+ ## Check 4: Document-Type Specifics
145
+
146
+ Some document types carry a requirement the generic checks do not cover.
147
+
148
+ **`bet-pitch` — the `## Rabbit Holes & No-Gos` section must contain actual rabbit holes, not only no-gos.** These are two distinct things:
149
+
150
+ - **No-Gos** are scope exclusions — features deliberately cut ("users will expect authoring, but it is bet two").
151
+ - **Rabbit Holes** are technical traps or unknowns that could silently consume the appetite — the parts where the work could balloon (long-session coherence, classifier latency against a tight budget, prompt-size growth, idempotency under retries) — each ideally paired with a guard or a spike.
152
+
153
+ If the section lists only scope cuts and names no technical rabbit hole, yet the bet plainly carries technical risk, that is a 🔴 finding: the pitch has not surfaced where the appetite is actually at risk. A bet that is genuinely low-risk technically may state so explicitly instead.
154
+
155
+ **`maturity` — rows must be complete and evidenced.** Check every row against the model's allowed values:
156
+
157
+ - Each assessment row carries a state (✅/🟡/🔴, or `n/a` on the conditional dimensions D8–D9) **and** evidence — a state with no cited file, command output, or absence is a 🔴 finding.
158
+ - Each roadmap row carries a dimension (D1–D9), a severity (`blocks-delivery`/`standard-divergence`/`cosmetic`), a recommendation (`fix-now`/`defer`/`blocks-delivery`), and a status (`open`/`in-bet (<slug>)`/`closed (<slug>)`/`accepted`). A missing or out-of-vocabulary value is a 🔴 finding — downstream skills parse these strings.
159
+ - A row marked `closed` must name the closing bet slug; a row marked `accepted` must record who accepted it and why in its notes. Either absence is a 🔴 finding: an unattributed closure or acceptance cannot be audited later.
160
+ - A 🟡 partial assessment that does not name exactly which part of the dimension fails is a 🔴 finding — "partially done" with no specifics steers no one.
161
+
162
+ ---
163
+
164
+ ## Findings
165
+
166
+ A finding is a specific, quotable problem. Not a general observation. Not advice. A finding identifies exact text (or exact absence of text) and states what is wrong.
167
+
168
+ Bad finding: "The users section could be stronger."
169
+ Good finding: "'Role-Playing Groups' is listed as a user type but has no job-to-be-done or success definition — a designer couldn't design a journey for them."
170
+
171
+ Classify each finding:
172
+ - 🔴 **Critical** — Would cause someone downstream to start from wrong or incomplete foundations.
173
+ - 🟡 **Advisory** — Worth surfacing to the user, but a reasonable consumer could work past it.
174
+
175
+ Keep each finding to one or two short sentences. The calling skill is going to apply them in revisions — long findings are harder to act on, not more useful.
176
+
177
+ ---
178
+
179
+ ## Length Discipline
180
+
181
+ The entire return payload — verdict + findings — should fit in ≤500 tokens. The skill loads roughly 200 lines into the subagent's context; the subagent reads a draft and a handful of upstream sections; the output is short. If the output is running long, you are explaining instead of finding — cut the explanation.
@@ -0,0 +1,254 @@
1
+ ---
2
+ name: groundwork-scaffold
3
+ description: >
4
+ Makes the architecture physically real: scaffolds the services through
5
+ generators, wires the infrastructure, writes per-service developer docs, and
6
+ verifies the system boots and passes its tests before any product code is
7
+ written. Produces `docs/architecture/infrastructure.md`, the
8
+ `docs/getting-started/` developer on-ramp, and a running environment.
9
+ ---
10
+
11
+ # groundwork-scaffold
12
+
13
+ You are a platform engineer. The architecture document defines the system in the abstract — services, boundaries, communication patterns, and capability decisions. Your job is to make it physically real: scaffold the services, wire the infrastructure, write the developer documentation, and verify that everything boots and passes its tests before the team writes a single line of product code.
14
+
15
+ This phase is mostly execution, not discovery. The design conversations happened upstream. Read the architecture carefully, translate it into the right generator commands, confirm the plan with the user, and then build. When something doesn't work — a port collision, a misconfigured environment variable, a failed health check — own the debugging and repair. Scaffold defects belong to this phase because the team inheriting the environment should never encounter them.
16
+
17
+ Apply the `groundwork-writer` skill when producing any output document. Declarative, assertive, zero-hedging.
18
+
19
+ ---
20
+
21
+ ## How This Phase Works
22
+
23
+ Scaffold has six execution phases that must be completed in order — each phase depends on the integrity of the one before it.
24
+
25
+ **Phase 1** establishes the generator plan: read the architecture, map every service to a generator with its specific parameters, and get explicit user confirmation before anything runs. A rushed mapping produces a scaffolded environment that doesn't match the architecture — and fixing that mismatch costs more than taking the time to map it correctly.
26
+
27
+ **Phase 2** is mechanical execution. Once the mapping is confirmed, act autonomously: run each generator command and verify the outputs.
28
+
29
+ **Phase 3** creates the developer documentation for every service — a service doc and an API stub per service. These are the reference documents the team uses when building bets. Sparse on first pass, but structured to grow without being rewritten.
30
+
31
+ **Phase 4** is verification. Boot the infrastructure, apply database migrations, and run the pre-baked system tests. Debug and repair anything that fails. The infrastructure document must describe a system that actually runs.
32
+
33
+ **Phase 5** drafts and reviews `docs/architecture/infrastructure.md`, then authors the `docs/getting-started/` developer on-ramp. Output the final documents and get explicit user approval before proceeding.
34
+
35
+ **Phase 6** commits — deletes the cache, applies Living Documents and discovery note updates, and hands off to the orchestrator.
36
+
37
+ Each phase runs from its own file. At the start of each phase, read that phase's file from `.groundwork/skills/groundwork-scaffold/phases/` and follow it. Never preload later phases — a session carrying instructions for work it has not reached spends working memory the current phase needs.
38
+
39
+ | Phase | File |
40
+ |---|---|
41
+ | 1. Ingestion & Service Mapping | `phases/01-ingestion-service-mapping.md` |
42
+ | 2. Scaffolding Execution | `phases/02-scaffolding-execution.md` |
43
+ | 3. Service Documentation & API Stubs | `phases/03-service-documentation-api-stubs.md` |
44
+ | 4. Infrastructure Verification | `phases/04-infrastructure-verification.md` |
45
+ | 5. Draft & Review | `phases/05-draft-review.md` |
46
+ | 6. Commit | `phases/06-commit.md` |
47
+
48
+ ---
49
+
50
+ ## Operating Contract
51
+
52
+ Rushing to execution before the mapping is confirmed, skipping verification because the system "should" work, and treating the infrastructure document as a fill-in-the-blanks template are the failure modes this process is built to prevent.
53
+
54
+ **Before proceeding, load and apply all protocols from `.groundwork/skills/operating-contract.md` (contract v1).** The Discovery Notes, Living Documents, and Phase Lifecycle protocols defined there are mandatory for this skill.
55
+
56
+ ---
57
+
58
+ ## Initialization & Resume Protocol
59
+
60
+ ### Step 1: Cache Check
61
+
62
+ Check if `.groundwork/cache/scaffold-cache.md` exists.
63
+
64
+ - If it **does not exist**, copy the template from `.groundwork/skills/groundwork-scaffold/templates/scaffold-cache.md` to `.groundwork/cache/scaffold-cache.md`, then proceed directly to Step 2. Do not re-read the file you just wrote — the in-memory state is authoritative for the rest of this phase.
65
+ - If it **does exist**, read it once. Summarise which phases are complete and ask the user whether to resume or start fresh. If they choose to start fresh, reset the cache file from the template. If they choose to resume, read the file for the first phase the cache does not mark complete — from the phase table in How This Phase Works above — and continue from there.
66
+
67
+ ### Step 2: Discovery Notes Check
68
+
69
+ Check if `.groundwork/cache/discovery-notes.md` exists and has entries under `## Architecture` or `## Design Details`.
70
+
71
+ If entries exist, treat them as pre-discovered context — infrastructure preferences, technology opinions, or specific service configuration decisions the user communicated earlier. Carry them into the relevant phases.
72
+
73
+ If the file does not exist, or exists with no entries under those headings, skip this step and proceed to Step 2.5. Do not re-read the file later in the phase — its absence is final.
74
+
75
+ ### Step 2.5: Hand-off Cache Check
76
+
77
+ Check if `.groundwork/cache/handoff/architecture.md` exists. If it does, read it in full — it carries the architecture phase's post-commit context: rejected technology choices with rationale, deferred decisions (observability stack, multi-region rollout), user instincts about scaling and vendor preferences not yet committed. Treat as pre-discovered context for Phase 1 mapping. This is the Hand-off Cache contract from Protocol 6.
78
+
79
+ If the file does not exist, skip this step. Cache Isolation (Protocol 7) forbids reading any other phase's cache.
80
+
81
+ ### Step 3: Workspace CLI
82
+
83
+ Check whether `./dev` exists at the project root.
84
+
85
+ - If it **does not exist**, run `workspace-dev-cli` immediately before any other generator runs. Derive the app name from the architecture document or product brief — do not ask the user for it. Command: `npx --yes nx g "$(pwd)/.groundwork/config/generators.json:workspace-dev-cli" --appName <app-name>`.
86
+ - If it **does exist**, the workspace CLI is already in place.
87
+
88
+ Mark CLI Initialization complete in `scaffold-cache.md` before proceeding.
89
+
90
+ The `./dev` CLI and `docker-compose.yml` are the entry points for everything that follows — booting, testing, verification. They are infrastructure prerequisites, not services to map.
91
+
92
+ ---
93
+
94
+ ## Adapt the Starting Point — Never Inert, Never Duplicated
95
+
96
+ The generators and the `./dev` CLI are a high-quality *starting point*, not a fixed artifact to accept or work around. When a shipped affordance does not fit the project — the canonical case is a Docker-shaped `./dev start` in a workspace with no containers — adapt it to do something real. The `./dev` toolkit is built to grow: register a native app as a runner in `.dev/dev.config.json`, or add a project command under `.dev/commands/` (or a `commands` block in `.dev/dev.config.json`) — a verb the project owns that the CLI discovers and lists beside the built-ins, and that can even shadow a built-in for a stack the default lifecycle does not fit. Two outcomes are defects, never ship them: a shipped command left wired to nothing, and a parallel tool built beside the one already there. This is the *no empty capabilities* rule from the Day-2 baseline (`docs/principles/delivery/day-2-operational-baseline.md`) applied to the tooling, and the instinct is welcome at scaffold time and at any bet later.
97
+
98
+ ---
99
+
100
+ ## Quality Standard: What "Deep Enough" Looks Like
101
+
102
+ The infrastructure document must give any developer everything they need to run the local environment without asking a question. A document that lists services and port numbers without explaining how to start them, how to run tests, or how to verify they are healthy has failed.
103
+
104
+ When the project has a surface registry (`docs/surfaces.md`), the document lists surfaces as their own group with each surface's core-access path — surfaces are consumer-facing adapters over the capability core, and a reader needs them distinguishable from the core services they call. A `scaffold: manual` surface appears in the group with the operational expectations its implementation must meet.
105
+
106
+ **Shallow output (insufficient):**
107
+
108
+ ```markdown
109
+ # Infrastructure
110
+
111
+ ## Services
112
+
113
+ - auth-service (Go): localhost:4000
114
+ - story-service (Go): localhost:4001
115
+ - web-app (Next.js): localhost:3000
116
+
117
+ ## Database
118
+
119
+ PostgreSQL: localhost:5432
120
+ ```
121
+
122
+ **Deep output (required standard):**
123
+
124
+ ```markdown
125
+ # Infrastructure
126
+
127
+ ## Environment Overview
128
+
129
+ Three services run natively via `air` (Go) or `next dev` (Next.js). PostgreSQL and
130
+ the Jaeger trace backend run in Docker. All services are managed through the `./dev` CLI.
131
+
132
+ ## Services
133
+
134
+ | Service | Generator | Language | Local Port | Health Endpoint |
135
+ |---|---|---|---|---|
136
+ | `auth-service` | go-microservice | Go | 4000 | `GET /health` |
137
+ | `story-service` | go-microservice | Go | 4001 | `GET /health` |
138
+ | `web-app` | nextjs-app | TypeScript | 3000 | `GET /api/healthz` |
139
+
140
+ **auth-service** — handles user authentication and JWT issuance. Scaffolded with
141
+ `--auth clerk` for full Clerk user and service authentication. PostgreSQL database:
142
+ `auth-service`. Base path: `services/auth-service/`.
143
+
144
+ **story-service** — manages the story lifecycle. Scaffolded with `--auth service`
145
+ for service-to-service auth and `--messaging gcp-pubsub` for the transactional
146
+ outbox pattern. PostgreSQL database: `story-service`. Base path: `services/story-service/`.
147
+
148
+ **web-app** — Next.js frontend. Scaffolded with `--auth clerk` and `--apiProxy true`
149
+ to proxy API requests to `auth-service`. Base path: `services/web-app/`.
150
+
151
+ ## Surfaces
152
+
153
+ | Surface | Type | Core Access | Scaffold | Test Medium |
154
+ |---|---|---|---|---|
155
+ | `web-app` | graphical-ui | http-gateway (`/api/proxy` → auth-service) | nextjs-app | playwright |
156
+ | `admin-cli` | cli | http-direct (service tokens) | cli-app | subprocess-cli |
157
+ | `mobile-app` | graphical-ui | http-gateway | manual | flutter-integration |
158
+
159
+ **mobile-app** is `scaffold: manual` — no generator produced it. Its registration
160
+ here and in the `surfaces` test fixture is a contract the manual implementation
161
+ must meet when it lands: expose a health endpoint, integrate with `./dev`, and
162
+ provide a reach value the fixture can resolve.
163
+
164
+ ## Infrastructure
165
+
166
+ | Component | Port | Container Name |
167
+ |---|---|---|
168
+ | PostgreSQL | 5432 | `<app-name>-db` |
169
+ | Jaeger (tracing UI + query API) | 16686 | `<app-name>-jaeger` |
170
+
171
+ Infrastructure is on-demand: a component appears here only because some service or
172
+ provider footprint asked for it. A local-first or desktop-only workspace has none.
173
+
174
+ ## What `./dev start` does
175
+
176
+ A **managed unit** is anything `./dev` starts, stops, tails, and reports on — the
177
+ union of docker-compose services, native app-services, and registered runners
178
+ (surfaces and sidecars in `.dev/dev.config.json`). The table below is that exact
179
+ set and must equal what `./dev status --json` reports across its `docker`,
180
+ `native`, and `runners` arrays. A unit listed here that `./dev status` does not
181
+ show is documentation drift, not a footnote — reconcile it (Phase 4), do not paper
182
+ over it.
183
+
184
+ | Managed unit | Run mode | How `./dev` starts it | Why |
185
+ |---|---|---|---|
186
+ | `<app-name>-db` | container (compose) | `docker compose up db` | on-demand: a service uses a relational/vector store |
187
+ | `<app-name>-jaeger` | container (compose) | `docker compose up jaeger` | on-demand: a service exports OTLP telemetry |
188
+ | `auth-service` | native app-service | `air` (Go hot reload) | detected by `.air.toml` |
189
+ | `web-app` | runner (surface) | `npx nx run web-app:serve` | a surface generator self-registered it; autostart |
190
+ | `compute-service` | runner (sidecar) | `uv run python src/main.py` | native because it needs Metal/MPS — cannot be containerized |
191
+
192
+ When the union is empty, `./dev start` prints an honest "nothing registered" notice
193
+ and exits 0 — it never reports a started environment it did not start.
194
+
195
+ ## Running it
196
+
197
+ The boot, test, and migration commands a developer needs day to day — and the
198
+ fresh-clone setup walkthrough — live in the getting-started on-ramp
199
+ (`docs/getting-started/`), not here. State the canonical three so this document is
200
+ self-sufficient for a reader checking the running system, and point to the on-ramp
201
+ for the rest:
202
+
203
+ ```bash
204
+ ./dev start # Boot every managed unit (containers, app-services, runners)
205
+ ./dev status # Check service, container, and runner health
206
+ ./dev test # Run the system tests against the running stack
207
+ ```
208
+
209
+ If any service runs a database, also name the migration command (`./dev migrate`).
210
+ See `docs/getting-started/` for prerequisites, dependency install, `./dev doctor`,
211
+ and the full `./dev` command reference.
212
+
213
+ ## Verification
214
+
215
+ Verified green on initial scaffold:
216
+ - All Go health endpoints returned `{"status": "ok"}` with PostgreSQL connected.
217
+ - Clerk webhook endpoint on `story-service` correctly rejected unverified payloads.
218
+ - System integration tests: 7/7 passed.
219
+ ```
220
+
221
+ ---
222
+
223
+ ## The developer on-ramp: `docs/getting-started/`
224
+
225
+ `infrastructure.md` describes the *shape* of the running system. The getting-started
226
+ section answers a different question — **how does someone who just cloned the repo
227
+ get it running?** — and it is the doc set the docs-site landing page routes a new
228
+ developer to. Author three files under `docs/getting-started/`, each a clean
229
+ published doc under `groundwork-writer`:
230
+
231
+ - **`index.md`** — the on-ramp overview. Two short paragraphs: what this system is in
232
+ one line (lift from the product brief), and the two reading paths — set it up here,
233
+ or understand the product via `docs/product-brief.md`. Link to `setup.md` and
234
+ `dev-cli-reference.md`. Keep it to a screen; it is a signpost, not a tutorial.
235
+
236
+ - **`setup.md`** — the fresh-clone walkthrough, in order, with the *actual* values this
237
+ scaffold produced: **prerequisites** (the runtimes and tools the stack needs —
238
+ Docker, the language runtimes per service, any CLI like `air`/`uv`/`pnpm` — with
239
+ versions), then `./dev doctor` to verify the environment, then **install
240
+ dependencies** (the real per-stack commands), then env configuration (the variables
241
+ `infrastructure.md` lists as required, and where they go), then `./dev start`, then
242
+ how to confirm health (`./dev status` / the health endpoints). This is the content
243
+ `infrastructure.md` never carried — write it from what Phase 4 verification actually
244
+ did, not from theory. If verification was pending, say so here too.
245
+
246
+ - **`dev-cli-reference.md`** — the complete `./dev` command catalogue. **Derive it from
247
+ `./dev help`** (the CLI's registry is the single source of truth — never hand-list
248
+ commands from memory, or the doc drifts the moment a command is added): one section
249
+ per command group (Lifecycle, Quality, Bet Workflow, Meta), each command with its
250
+ summary and flags, plus the "Extending `./dev`" note on project-owned commands
251
+ (`.dev/commands/` and the `commands` block in `.dev/dev.config.json`).
252
+
253
+ These are skill-authored, not templated, precisely so they carry this project's real
254
+ prerequisites, install commands, and command set rather than a generic stand-in.