groundwork-method 0.0.1 → 0.11.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 (647) hide show
  1. package/CHANGELOG.md +823 -0
  2. package/LICENSE +21 -0
  3. package/README.md +44 -29
  4. package/bin/groundwork.js +1723 -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 +173 -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 +79 -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 +108 -0
  106. package/src/docs/principles/index.md +24 -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 +123 -0
  128. package/src/engineer-skills/groundwork-electron-engineer/references/documentation.md +126 -0
  129. package/src/engineer-skills/groundwork-electron-engineer/references/ipc-contracts.md +138 -0
  130. package/src/engineer-skills/groundwork-electron-engineer/references/observability.md +37 -0
  131. package/src/engineer-skills/groundwork-electron-engineer/references/packaging-and-updates.md +82 -0
  132. package/src/engineer-skills/groundwork-electron-engineer/references/performance-and-reliability.md +80 -0
  133. package/src/engineer-skills/groundwork-electron-engineer/references/process-model.md +94 -0
  134. package/src/engineer-skills/groundwork-electron-engineer/references/security.md +107 -0
  135. package/src/engineer-skills/groundwork-electron-engineer/references/testing-and-smoke.md +129 -0
  136. package/src/engineer-skills/groundwork-electron-engineer/references/theming-and-tokens.md +74 -0
  137. package/src/engineer-skills/groundwork-electron-engineer/sync-anchor.md +22 -0
  138. package/src/engineer-skills/groundwork-flutter-engineer/SKILL.md +114 -0
  139. package/src/engineer-skills/groundwork-flutter-engineer/references/accessibility.md +92 -0
  140. package/src/engineer-skills/groundwork-flutter-engineer/references/architecture.md +189 -0
  141. package/src/engineer-skills/groundwork-flutter-engineer/references/data-and-contracts.md +136 -0
  142. package/src/engineer-skills/groundwork-flutter-engineer/references/documentation.md +122 -0
  143. package/src/engineer-skills/groundwork-flutter-engineer/references/navigation.md +122 -0
  144. package/src/engineer-skills/groundwork-flutter-engineer/references/observability.md +37 -0
  145. package/src/engineer-skills/groundwork-flutter-engineer/references/performance-and-reliability.md +100 -0
  146. package/src/engineer-skills/groundwork-flutter-engineer/references/platform-channels.md +93 -0
  147. package/src/engineer-skills/groundwork-flutter-engineer/references/releases-and-distribution.md +84 -0
  148. package/src/engineer-skills/groundwork-flutter-engineer/references/security.md +96 -0
  149. package/src/engineer-skills/groundwork-flutter-engineer/references/state-management.md +166 -0
  150. package/src/engineer-skills/groundwork-flutter-engineer/references/testing.md +160 -0
  151. package/src/engineer-skills/groundwork-flutter-engineer/references/theming-and-design-tokens.md +109 -0
  152. package/src/engineer-skills/groundwork-flutter-engineer/references/widgets-and-composition.md +123 -0
  153. package/src/engineer-skills/groundwork-flutter-engineer/sync-anchor.md +24 -0
  154. package/src/engineer-skills/groundwork-go-engineer/SKILL.md +174 -0
  155. package/src/engineer-skills/groundwork-go-engineer/references/api-design.md +82 -0
  156. package/src/engineer-skills/groundwork-go-engineer/references/architecture.md +42 -0
  157. package/src/engineer-skills/groundwork-go-engineer/references/capability-ports.md +50 -0
  158. package/src/engineer-skills/groundwork-go-engineer/references/code-craft-security.md +34 -0
  159. package/src/engineer-skills/groundwork-go-engineer/references/concurrency.md +108 -0
  160. package/src/engineer-skills/groundwork-go-engineer/references/documentation.md +130 -0
  161. package/src/engineer-skills/groundwork-go-engineer/references/go-services.md +77 -0
  162. package/src/engineer-skills/groundwork-go-engineer/references/http-handlers.md +172 -0
  163. package/src/engineer-skills/groundwork-go-engineer/references/implementation-patterns.md +156 -0
  164. package/src/engineer-skills/groundwork-go-engineer/references/integration-realtime-data.md +57 -0
  165. package/src/engineer-skills/groundwork-go-engineer/references/observability.md +49 -0
  166. package/src/engineer-skills/groundwork-go-engineer/references/postgres.md +41 -0
  167. package/src/engineer-skills/groundwork-go-engineer/references/reliability-performance.md +105 -0
  168. package/src/engineer-skills/groundwork-go-engineer/references/testing.md +201 -0
  169. package/src/engineer-skills/groundwork-go-engineer/sync-anchor.md +20 -0
  170. package/src/engineer-skills/groundwork-nextjs-engineer/SKILL.md +112 -0
  171. package/src/engineer-skills/groundwork-nextjs-engineer/references/accessibility.md +111 -0
  172. package/src/engineer-skills/groundwork-nextjs-engineer/references/architecture.md +323 -0
  173. package/src/engineer-skills/groundwork-nextjs-engineer/references/data-fetching.md +458 -0
  174. package/src/engineer-skills/groundwork-nextjs-engineer/references/documentation.md +324 -0
  175. package/src/engineer-skills/groundwork-nextjs-engineer/references/error-boundaries.md +383 -0
  176. package/src/engineer-skills/groundwork-nextjs-engineer/references/mutations-and-forms.md +396 -0
  177. package/src/engineer-skills/groundwork-nextjs-engineer/references/observability.md +48 -0
  178. package/src/engineer-skills/groundwork-nextjs-engineer/references/performance-and-deployment.md +947 -0
  179. package/src/engineer-skills/groundwork-nextjs-engineer/references/routing-and-navigation.md +405 -0
  180. package/src/engineer-skills/groundwork-nextjs-engineer/references/security.md +131 -0
  181. package/src/engineer-skills/groundwork-nextjs-engineer/references/server-components.md +394 -0
  182. package/src/engineer-skills/groundwork-nextjs-engineer/references/tailwind-and-styling.md +134 -0
  183. package/src/engineer-skills/groundwork-nextjs-engineer/references/testing.md +491 -0
  184. package/src/engineer-skills/groundwork-nextjs-engineer/references/type-system.md +368 -0
  185. package/src/engineer-skills/groundwork-nextjs-engineer/references/ux-principles.md +230 -0
  186. package/src/engineer-skills/groundwork-nextjs-engineer/references/visual-language.md +69 -0
  187. package/src/engineer-skills/groundwork-nextjs-engineer/sync-anchor.md +16 -0
  188. package/src/engineer-skills/groundwork-python-engineer/SKILL.md +199 -0
  189. package/src/engineer-skills/groundwork-python-engineer/references/api-standards.md +88 -0
  190. package/src/engineer-skills/groundwork-python-engineer/references/architecture.md +57 -0
  191. package/src/engineer-skills/groundwork-python-engineer/references/async-patterns.md +103 -0
  192. package/src/engineer-skills/groundwork-python-engineer/references/capability-ports.md +44 -0
  193. package/src/engineer-skills/groundwork-python-engineer/references/database.md +88 -0
  194. package/src/engineer-skills/groundwork-python-engineer/references/documentation-mcp.md +167 -0
  195. package/src/engineer-skills/groundwork-python-engineer/references/implementation-patterns.md +166 -0
  196. package/src/engineer-skills/groundwork-python-engineer/references/ml-pipelines.md +119 -0
  197. package/src/engineer-skills/groundwork-python-engineer/references/ml-systems-ai-engineering.md +74 -0
  198. package/src/engineer-skills/groundwork-python-engineer/references/observability.md +57 -0
  199. package/src/engineer-skills/groundwork-python-engineer/references/resilience.md +126 -0
  200. package/src/engineer-skills/groundwork-python-engineer/references/security.md +148 -0
  201. package/src/engineer-skills/groundwork-python-engineer/references/testing.md +216 -0
  202. package/src/engineer-skills/groundwork-python-engineer/sync-anchor.md +20 -0
  203. package/src/generators/add-capability/generator.ts +70 -0
  204. package/src/generators/add-capability/schema.json +30 -0
  205. package/src/generators/capabilities/llm/capability.json +28 -0
  206. package/src/generators/capabilities/llm/providers/anthropic/footprint.json +13 -0
  207. package/src/generators/capabilities/llm/providers/anthropic/stacks/go/internal/llm/llm.go.template +102 -0
  208. package/src/generators/capabilities/llm/providers/anthropic/stacks/python/src/__packageName__/adapters/llm.py.template +61 -0
  209. package/src/generators/capabilities/llm/providers/local/footprint.json +13 -0
  210. package/src/generators/capabilities/llm/providers/local/stacks/go/internal/llm/llm.go.template +102 -0
  211. package/src/generators/capabilities/llm/providers/local/stacks/python/src/__packageName__/adapters/llm.py.template +53 -0
  212. package/src/generators/capabilities/llm/providers/localai/footprint.json +29 -0
  213. package/src/generators/capabilities/llm/providers/localai/stacks/go/internal/llm/llm.go.template +102 -0
  214. package/src/generators/capabilities/llm/providers/localai/stacks/python/src/__packageName__/adapters/llm.py.template +53 -0
  215. package/src/generators/capabilities/llm/providers/none/footprint.json +9 -0
  216. package/src/generators/capabilities/llm/providers/none/stacks/go/internal/llm/llm.go.template +35 -0
  217. package/src/generators/capabilities/llm/providers/none/stacks/python/src/__packageName__/adapters/llm.py.template +25 -0
  218. package/src/generators/capabilities/llm/providers/ollama/footprint.json +20 -0
  219. package/src/generators/capabilities/llm/providers/ollama/stacks/go/internal/llm/llm.go.template +102 -0
  220. package/src/generators/capabilities/llm/providers/ollama/stacks/python/src/__packageName__/adapters/llm.py.template +53 -0
  221. package/src/generators/capabilities/llm/providers/openai/footprint.json +13 -0
  222. package/src/generators/capabilities/llm/providers/openai/stacks/go/internal/llm/llm.go.template +98 -0
  223. package/src/generators/capabilities/llm/providers/openai/stacks/python/src/__packageName__/adapters/llm.py.template +60 -0
  224. package/src/generators/capabilities/llm/stacks/go/internal/core/service/llm.go.template +12 -0
  225. package/src/generators/capabilities/llm/stacks/go/internal/llm/llm_test.go.template +33 -0
  226. package/src/generators/capabilities/llm/stacks/python/src/__packageName__/core/llm.py.template +15 -0
  227. package/src/generators/capabilities/llm/stacks/python/tests/contracts/test_llm.py.template +37 -0
  228. package/src/generators/cli-app/files/README.md.template +76 -0
  229. package/src/generators/cli-app/files/build.mjs.template +15 -0
  230. package/src/generators/cli-app/files/package.json.template +21 -0
  231. package/src/generators/cli-app/files/src/cli.ts.template +67 -0
  232. package/src/generators/cli-app/files/src/commands/hello.ts.template +17 -0
  233. package/src/generators/cli-app/files/src/commands/status.ts.template +23 -0
  234. package/src/generators/cli-app/files/src/core/client.test.ts.template +80 -0
  235. package/src/generators/cli-app/files/src/core/client.ts.template +64 -0
  236. package/src/generators/cli-app/files/src/registry.test.ts.template +35 -0
  237. package/src/generators/cli-app/files/src/registry.ts.template +31 -0
  238. package/src/generators/cli-app/files/tsconfig.json.template +16 -0
  239. package/src/generators/cli-app/files/tsconfig.test.json.template +11 -0
  240. package/src/generators/cli-app/generator.ts +138 -0
  241. package/src/generators/cli-app/schema.json +24 -0
  242. package/src/generators/docs-site/files/.gitignore.ejs +40 -0
  243. package/src/generators/docs-site/files/app/docs/__slug__/page.tsx +101 -0
  244. package/src/generators/docs-site/files/app/docs/layout.tsx +14 -0
  245. package/src/generators/docs-site/files/app/docs.css +43 -0
  246. package/src/generators/docs-site/files/app/layout.tsx +24 -0
  247. package/src/generators/docs-site/files/app/page.tsx +135 -0
  248. package/src/generators/docs-site/files/app/source.ts +8 -0
  249. package/src/generators/docs-site/files/components/mermaid.tsx +67 -0
  250. package/src/generators/docs-site/files/next.config.mjs +10 -0
  251. package/src/generators/docs-site/files/package.json +32 -0
  252. package/src/generators/docs-site/files/pnpm-workspace.yaml +7 -0
  253. package/src/generators/docs-site/files/postcss.config.mjs +6 -0
  254. package/src/generators/docs-site/files/source.config.ts +77 -0
  255. package/src/generators/docs-site/files/tailwind.config.js +10 -0
  256. package/src/generators/docs-site/files/tsconfig.json +27 -0
  257. package/src/generators/docs-site/generator.ts +476 -0
  258. package/src/generators/docs-site/schema.json +17 -0
  259. package/src/generators/electron-app/docs/principles/stack/electron/index.md +49 -0
  260. package/src/generators/electron-app/docs/principles/stack/electron/ipc-contracts.md +71 -0
  261. package/src/generators/electron-app/docs/principles/stack/electron/packaging-and-updates.md +59 -0
  262. package/src/generators/electron-app/docs/principles/stack/electron/process-model.md +53 -0
  263. package/src/generators/electron-app/docs/principles/stack/electron/security.md +70 -0
  264. package/src/generators/electron-app/docs/principles/stack/typescript/frontend.md +65 -0
  265. package/src/generators/electron-app/files/.gitignore.template +20 -0
  266. package/src/generators/electron-app/files/README.md.template +125 -0
  267. package/src/generators/electron-app/files/electron.vite.config.ts +31 -0
  268. package/src/generators/electron-app/files/eslint.config.mjs +92 -0
  269. package/src/generators/electron-app/files/forge.config.ts.template +44 -0
  270. package/src/generators/electron-app/files/package.json.template +54 -0
  271. package/src/generators/electron-app/files/playwright.config.ts +18 -0
  272. package/src/generators/electron-app/files/project.json.template +65 -0
  273. package/src/generators/electron-app/files/src/main/core-client.test.ts +81 -0
  274. package/src/generators/electron-app/files/src/main/core-client.ts +55 -0
  275. package/src/generators/electron-app/files/src/main/index.ts +157 -0
  276. package/src/generators/electron-app/files/src/main/ipc.ts +52 -0
  277. package/src/generators/electron-app/files/src/main/policy.test.ts +71 -0
  278. package/src/generators/electron-app/files/src/main/policy.ts +73 -0
  279. package/src/generators/electron-app/files/src/preload/index.ts +23 -0
  280. package/src/generators/electron-app/files/src/renderer/index.html.template +20 -0
  281. package/src/generators/electron-app/files/src/renderer/src/App.test.tsx +61 -0
  282. package/src/generators/electron-app/files/src/renderer/src/App.tsx.template +43 -0
  283. package/src/generators/electron-app/files/src/renderer/src/assets/main.css +40 -0
  284. package/src/generators/electron-app/files/src/renderer/src/env.d.ts +14 -0
  285. package/src/generators/electron-app/files/src/renderer/src/main.tsx +25 -0
  286. package/src/generators/electron-app/files/src/shared/ipc.ts +54 -0
  287. package/src/generators/electron-app/files/tests/smoke/app.spec.ts.template +133 -0
  288. package/src/generators/electron-app/files/tool/electron_exec.sh.template +83 -0
  289. package/src/generators/electron-app/files/tsconfig.json +7 -0
  290. package/src/generators/electron-app/files/tsconfig.node.json +27 -0
  291. package/src/generators/electron-app/files/tsconfig.web.json +22 -0
  292. package/src/generators/electron-app/files/vitest.config.ts +32 -0
  293. package/src/generators/electron-app/files/vitest.setup.ts +1 -0
  294. package/src/generators/electron-app/generator.ts +288 -0
  295. package/src/generators/electron-app/schema.json +23 -0
  296. package/src/generators/flutter-app/docs/principles/stack/flutter/architecture.md +78 -0
  297. package/src/generators/flutter-app/docs/principles/stack/flutter/index.md +38 -0
  298. package/src/generators/flutter-app/docs/principles/stack/flutter/platform-channels.md +51 -0
  299. package/src/generators/flutter-app/docs/principles/stack/flutter/releases-and-distribution.md +59 -0
  300. package/src/generators/flutter-app/docs/principles/stack/flutter/state-management.md +85 -0
  301. package/src/generators/flutter-app/docs/principles/stack/flutter/testing.md +86 -0
  302. package/src/generators/flutter-app/docs/principles/stack/flutter/widgets-and-composition.md +69 -0
  303. package/src/generators/flutter-app/files/.gitignore.template +30 -0
  304. package/src/generators/flutter-app/files/README.md.template +100 -0
  305. package/src/generators/flutter-app/files/analysis_options.yaml.template +18 -0
  306. package/src/generators/flutter-app/files/integration_test/app_test.dart.template +64 -0
  307. package/src/generators/flutter-app/files/lib/app.dart.template +24 -0
  308. package/src/generators/flutter-app/files/lib/config/app_config.dart +15 -0
  309. package/src/generators/flutter-app/files/lib/data/repositories/status_repository.dart +36 -0
  310. package/src/generators/flutter-app/files/lib/data/services/api_client.dart +71 -0
  311. package/src/generators/flutter-app/files/lib/domain/models/health_status.dart +23 -0
  312. package/src/generators/flutter-app/files/lib/main.dart +11 -0
  313. package/src/generators/flutter-app/files/lib/router.dart +23 -0
  314. package/src/generators/flutter-app/files/lib/ui/core/theme/app_theme.dart +110 -0
  315. package/src/generators/flutter-app/files/lib/ui/home/home_view.dart +89 -0
  316. package/src/generators/flutter-app/files/lib/ui/home/home_view_model.dart.template +38 -0
  317. package/src/generators/flutter-app/files/project.json.template +51 -0
  318. package/src/generators/flutter-app/files/pubspec.yaml.template +47 -0
  319. package/src/generators/flutter-app/files/test/api_client_test.dart.template +63 -0
  320. package/src/generators/flutter-app/files/test/fakes/fake_status_repository.dart.template +19 -0
  321. package/src/generators/flutter-app/files/test/home_view_test.dart.template +58 -0
  322. package/src/generators/flutter-app/files/tool/flutter_exec.sh.template +60 -0
  323. package/src/generators/flutter-app/generator.ts +362 -0
  324. package/src/generators/flutter-app/schema.json +23 -0
  325. package/src/generators/go-microservice/docs/principles/stack/go/concurrency.md +123 -0
  326. package/src/generators/go-microservice/docs/principles/stack/go/index.md +70 -0
  327. package/src/generators/go-microservice/docs/principles/stack/go/testing.md +168 -0
  328. package/src/generators/go-microservice/files/.air.toml.template +38 -0
  329. package/src/generators/go-microservice/files/.env.template +4 -0
  330. package/src/generators/go-microservice/files/.golangci.yml.template +82 -0
  331. package/src/generators/go-microservice/files/Dockerfile.dev.template +12 -0
  332. package/src/generators/go-microservice/files/asyncapi-pubsub.yaml.template +33 -0
  333. package/src/generators/go-microservice/files/asyncapi-ws.yaml.template +34 -0
  334. package/src/generators/go-microservice/files/cmd/api/main.go.template +149 -0
  335. package/src/generators/go-microservice/files/cmd/api/main_test.go.template +99 -0
  336. package/src/generators/go-microservice/files/cmd/worker/cleanup/main.go.template +39 -0
  337. package/src/generators/go-microservice/files/db/schema.sql.template +24 -0
  338. package/src/generators/go-microservice/files/go.mod.template +39 -0
  339. package/src/generators/go-microservice/files/internal/config/config.go.template +52 -0
  340. package/src/generators/go-microservice/files/internal/config/otel.go.template +93 -0
  341. package/src/generators/go-microservice/files/internal/core/domain/errors.go.template +16 -0
  342. package/src/generators/go-microservice/files/internal/core/domain/model.go.template +28 -0
  343. package/src/generators/go-microservice/files/internal/core/domain/user.go.template +13 -0
  344. package/src/generators/go-microservice/files/internal/core/pagination.go.template +16 -0
  345. package/src/generators/go-microservice/files/internal/core/service/app_service.go.template +79 -0
  346. package/src/generators/go-microservice/files/internal/core/service/event_hub.go.template +9 -0
  347. package/src/generators/go-microservice/files/internal/core/service/message_queue.go.template +10 -0
  348. package/src/generators/go-microservice/files/internal/core/service/outbox_repository.go.template +31 -0
  349. package/src/generators/go-microservice/files/internal/core/service/repository.go.template +23 -0
  350. package/src/generators/go-microservice/files/internal/core/service/user_repository.go.template +15 -0
  351. package/src/generators/go-microservice/files/internal/core/service/user_service.go.template +43 -0
  352. package/src/generators/go-microservice/files/internal/entrypoints/api/app_handler.go.template +108 -0
  353. package/src/generators/go-microservice/files/internal/entrypoints/api/auth_middleware_test.go.template +52 -0
  354. package/src/generators/go-microservice/files/internal/entrypoints/api/clerk_webhook.go.template +202 -0
  355. package/src/generators/go-microservice/files/internal/entrypoints/api/clerk_webhook_test.go.template +82 -0
  356. package/src/generators/go-microservice/files/internal/entrypoints/api/health_handler.go.template +80 -0
  357. package/src/generators/go-microservice/files/internal/entrypoints/api/idempotency/middleware.go.template +87 -0
  358. package/src/generators/go-microservice/files/internal/entrypoints/api/idempotency/middleware_test.go.template +76 -0
  359. package/src/generators/go-microservice/files/internal/entrypoints/api/idempotency/repository.go.template +37 -0
  360. package/src/generators/go-microservice/files/internal/entrypoints/api/middleware_auth.go.template +40 -0
  361. package/src/generators/go-microservice/files/internal/entrypoints/api/middleware_loadshed.go.template +38 -0
  362. package/src/generators/go-microservice/files/internal/entrypoints/api/middleware_logging.go.template +40 -0
  363. package/src/generators/go-microservice/files/internal/entrypoints/api/middleware_ratelimit.go.template +48 -0
  364. package/src/generators/go-microservice/files/internal/entrypoints/api/middleware_test.go.template +81 -0
  365. package/src/generators/go-microservice/files/internal/entrypoints/api/router.go.template +105 -0
  366. package/src/generators/go-microservice/files/internal/entrypoints/api/types.go.template +70 -0
  367. package/src/generators/go-microservice/files/internal/entrypoints/api/websocket_handler.go.template +39 -0
  368. package/src/generators/go-microservice/files/internal/httpclient/http_client.go.template +87 -0
  369. package/src/generators/go-microservice/files/internal/kafka/kafka.go.template +34 -0
  370. package/src/generators/go-microservice/files/internal/postgres/postgres.go.template +195 -0
  371. package/src/generators/go-microservice/files/internal/postgres/postgres_test.go.template +156 -0
  372. package/src/generators/go-microservice/files/internal/postgres/user_repository.go.template +56 -0
  373. package/src/generators/go-microservice/files/internal/pubsub/gcp_pubsub.go.template +35 -0
  374. package/src/generators/go-microservice/files/internal/websocket/client.go.template +151 -0
  375. package/src/generators/go-microservice/files/internal/websocket/hub.go.template +261 -0
  376. package/src/generators/go-microservice/files/scripts/apply-schema.sh.template +21 -0
  377. package/src/generators/go-microservice/files/tools/tools.go.template +10 -0
  378. package/src/generators/go-microservice/generator.ts +240 -0
  379. package/src/generators/go-microservice/schema.json +63 -0
  380. package/src/generators/nextjs-app/docs/principles/stack/typescript/frontend.md +65 -0
  381. package/src/generators/nextjs-app/files/.dockerignore.template +7 -0
  382. package/src/generators/nextjs-app/files/.env.example.template +24 -0
  383. package/src/generators/nextjs-app/files/.gitignore.template +5 -0
  384. package/src/generators/nextjs-app/files/Dockerfile +53 -0
  385. package/src/generators/nextjs-app/files/app/(auth)/sign-in/__sign-in__/page.tsx.template +9 -0
  386. package/src/generators/nextjs-app/files/app/(auth)/sign-up/__sign-up__/page.tsx.template +9 -0
  387. package/src/generators/nextjs-app/files/app/api/config/route.ts.template +39 -0
  388. package/src/generators/nextjs-app/files/app/api/healthz/route.test.ts +15 -0
  389. package/src/generators/nextjs-app/files/app/api/healthz/route.ts +5 -0
  390. package/src/generators/nextjs-app/files/app/api/proxy/__path__/route.test.ts.template +55 -0
  391. package/src/generators/nextjs-app/files/app/api/proxy/__path__/route.ts.template +126 -0
  392. package/src/generators/nextjs-app/files/app/error.tsx +39 -0
  393. package/src/generators/nextjs-app/files/app/global-error.tsx +68 -0
  394. package/src/generators/nextjs-app/files/app/globals.css +105 -0
  395. package/src/generators/nextjs-app/files/app/layout.tsx +59 -0
  396. package/src/generators/nextjs-app/files/app/loading.tsx +13 -0
  397. package/src/generators/nextjs-app/files/app/not-found.tsx +30 -0
  398. package/src/generators/nextjs-app/files/app/page.tsx +20 -0
  399. package/src/generators/nextjs-app/files/components/providers/default.tsx +19 -0
  400. package/src/generators/nextjs-app/files/components/providers/production.tsx +32 -0
  401. package/src/generators/nextjs-app/files/components/providers/telemetry.tsx +76 -0
  402. package/src/generators/nextjs-app/files/components/render-smoke.test.tsx +29 -0
  403. package/src/generators/nextjs-app/files/components/theme-provider.tsx +11 -0
  404. package/src/generators/nextjs-app/files/components.json +21 -0
  405. package/src/generators/nextjs-app/files/eslint.config.mjs +120 -0
  406. package/src/generators/nextjs-app/files/hooks/use-toast.ts +7 -0
  407. package/src/generators/nextjs-app/files/instrumentation.ts +90 -0
  408. package/src/generators/nextjs-app/files/lib/api/fetcher.ts.template +130 -0
  409. package/src/generators/nextjs-app/files/lib/config.ts +21 -0
  410. package/src/generators/nextjs-app/files/lib/logger.ts +29 -0
  411. package/src/generators/nextjs-app/files/lib/schemas/index.ts +19 -0
  412. package/src/generators/nextjs-app/files/lib/utils.ts +6 -0
  413. package/src/generators/nextjs-app/files/next.config.mjs +9 -0
  414. package/src/generators/nextjs-app/files/package.json +70 -0
  415. package/src/generators/nextjs-app/files/postcss.config.mjs +8 -0
  416. package/src/generators/nextjs-app/files/proxy.test.ts.template +30 -0
  417. package/src/generators/nextjs-app/files/proxy.ts +31 -0
  418. package/src/generators/nextjs-app/files/public/.gitkeep +1 -0
  419. package/src/generators/nextjs-app/files/tsconfig.json +42 -0
  420. package/src/generators/nextjs-app/files/vitest.config.mts +15 -0
  421. package/src/generators/nextjs-app/files/vitest.setup.ts +7 -0
  422. package/src/generators/nextjs-app/generator.ts +307 -0
  423. package/src/generators/nextjs-app/schema.json +44 -0
  424. package/src/generators/python-microservice/docs/principles/stack/python/async.md +168 -0
  425. package/src/generators/python-microservice/docs/principles/stack/python/documentation.md +240 -0
  426. package/src/generators/python-microservice/docs/principles/stack/python/mcp.md +147 -0
  427. package/src/generators/python-microservice/docs/principles/stack/python/resilience.md +193 -0
  428. package/src/generators/python-microservice/docs/principles/stack/python/testing.md +322 -0
  429. package/src/generators/python-microservice/files/.env.example.template +30 -0
  430. package/src/generators/python-microservice/files/Dockerfile.template +36 -0
  431. package/src/generators/python-microservice/files/db/schema.sql.template +19 -0
  432. package/src/generators/python-microservice/files/pyproject.toml.template +76 -0
  433. package/src/generators/python-microservice/files/scripts/apply-schema.sh.template +25 -0
  434. package/src/generators/python-microservice/files/src/__packageName__/adapters/comfyui.py.template +87 -0
  435. package/src/generators/python-microservice/files/src/__packageName__/adapters/config.py.template +48 -0
  436. package/src/generators/python-microservice/files/src/__packageName__/adapters/database.py.template +21 -0
  437. package/src/generators/python-microservice/files/src/__packageName__/adapters/message_queue.py.template +29 -0
  438. package/src/generators/python-microservice/files/src/__packageName__/adapters/repository.py.template +130 -0
  439. package/src/generators/python-microservice/files/src/__packageName__/adapters/telemetry.py.template +68 -0
  440. package/src/generators/python-microservice/files/src/__packageName__/adapters/websocket_hub.py.template +36 -0
  441. package/src/generators/python-microservice/files/src/__packageName__/core/domain/entities.py.template +22 -0
  442. package/src/generators/python-microservice/files/src/__packageName__/core/domain/exceptions.py.template +43 -0
  443. package/src/generators/python-microservice/files/src/__packageName__/core/ports.py.template +42 -0
  444. package/src/generators/python-microservice/files/src/__packageName__/core/service/example_service.py.template +68 -0
  445. package/src/generators/python-microservice/files/src/__packageName__/entrypoints/api/dependencies.py.template +50 -0
  446. package/src/generators/python-microservice/files/src/__packageName__/entrypoints/api/middleware.py.template +131 -0
  447. package/src/generators/python-microservice/files/src/__packageName__/entrypoints/api/router.py.template +37 -0
  448. package/src/generators/python-microservice/files/src/__packageName__/entrypoints/api/websocket_handler.py.template +20 -0
  449. package/src/generators/python-microservice/files/src/__packageName__/entrypoints/worker/cleanup.py.template +35 -0
  450. package/src/generators/python-microservice/files/src/__packageName__/entrypoints/worker/worker.py.template +28 -0
  451. package/src/generators/python-microservice/files/src/__packageName__/main.py.template +108 -0
  452. package/src/generators/python-microservice/files/tests/test_main.py.template +74 -0
  453. package/src/generators/python-microservice/files/tests/test_middleware.py.template +109 -0
  454. package/src/generators/python-microservice/files/tests/test_worker.py.template +16 -0
  455. package/src/generators/python-microservice/generator.ts +286 -0
  456. package/src/generators/python-microservice/schema.json +86 -0
  457. package/src/generators/shared/brand-tokens.ts +301 -0
  458. package/src/generators/shared/capabilities.ts +349 -0
  459. package/src/generators/shared/provenance.ts +61 -0
  460. package/src/generators/shared/scaffold-helpers.ts +309 -0
  461. package/src/generators/system-test-runner/NATIVE-CHECK-CONTRACT.md +20 -0
  462. package/src/generators/system-test-runner/files/tests/bets/.gitkeep +0 -0
  463. package/src/generators/system-test-runner/files/tests/bets/_archive/.gitkeep +0 -0
  464. package/src/generators/system-test-runner/files/tests/conftest.py.template +503 -0
  465. package/src/generators/system-test-runner/files/tests/pyproject.toml.template +20 -0
  466. package/src/generators/system-test-runner/files/tests/system/pages/__init__.py.template +9 -0
  467. package/src/generators/system-test-runner/files/tests/system/pages/base_page.py.template +36 -0
  468. package/src/generators/system-test-runner/files/tests/system/test_a11y_smoke.py.template +132 -0
  469. package/src/generators/system-test-runner/files/tests/system/test_contract_conformance.py.template +140 -0
  470. package/src/generators/system-test-runner/files/tests/system/test_layout_geometry.py.template +109 -0
  471. package/src/generators/system-test-runner/files/tests/system/test_render_smoke.py.template +257 -0
  472. package/src/generators/system-test-runner/files/tests/system/test_system.py.template +158 -0
  473. package/src/generators/system-test-runner/files/tests/system/test_token_conformance.py.template +206 -0
  474. package/src/generators/system-test-runner/files/tests/system/test_visual_regression.py.template +104 -0
  475. package/src/generators/system-test-runner/generator.ts +196 -0
  476. package/src/generators/system-test-runner/schema.json +24 -0
  477. package/src/generators/workspace-dev-cli/cli-src/build.mjs +42 -0
  478. package/src/generators/workspace-dev-cli/cli-src/dist/dev-bundle.js +2168 -0
  479. package/src/generators/workspace-dev-cli/cli-src/src/commands/bet.ts +442 -0
  480. package/src/generators/workspace-dev-cli/cli-src/src/commands/completion.ts +87 -0
  481. package/src/generators/workspace-dev-cli/cli-src/src/commands/doctor.ts +139 -0
  482. package/src/generators/workspace-dev-cli/cli-src/src/commands/lifecycle.ts +548 -0
  483. package/src/generators/workspace-dev-cli/cli-src/src/commands/quality.ts +127 -0
  484. package/src/generators/workspace-dev-cli/cli-src/src/commands/surface.ts +214 -0
  485. package/src/generators/workspace-dev-cli/cli-src/src/index.ts +127 -0
  486. package/src/generators/workspace-dev-cli/cli-src/src/registry.ts +194 -0
  487. package/src/generators/workspace-dev-cli/cli-src/src/theme/color.ts +130 -0
  488. package/src/generators/workspace-dev-cli/cli-src/src/theme/render.ts +158 -0
  489. package/src/generators/workspace-dev-cli/cli-src/src/theme/tokens.ts +122 -0
  490. package/src/generators/workspace-dev-cli/cli-src/src/util/context.ts +43 -0
  491. package/src/generators/workspace-dev-cli/cli-src/src/util/extensions.ts +99 -0
  492. package/src/generators/workspace-dev-cli/cli-src/src/util/paths.ts +46 -0
  493. package/src/generators/workspace-dev-cli/cli-src/src/util/proc.ts +106 -0
  494. package/src/generators/workspace-dev-cli/cli-src/src/util/prompt.ts +108 -0
  495. package/src/generators/workspace-dev-cli/cli-src/src/util/runners.ts +70 -0
  496. package/src/generators/workspace-dev-cli/cli-src/src/util/services.ts +221 -0
  497. package/src/generators/workspace-dev-cli/cli-src/src/util/version.ts +21 -0
  498. package/src/generators/workspace-dev-cli/cli-src/tsconfig.json +16 -0
  499. package/src/generators/workspace-dev-cli/files/.agents/skills/workspace-cli/SKILL.md.template +74 -0
  500. package/src/generators/workspace-dev-cli/files/dev.template +16 -0
  501. package/src/generators/workspace-dev-cli/files/docker-compose.yml.template +20 -0
  502. package/src/generators/workspace-dev-cli/files/scripts/cli/templates/milestone-test.pytmpl.template +46 -0
  503. package/src/generators/workspace-dev-cli/files/scripts/cli/templates/slice-test.pytmpl.template +38 -0
  504. package/src/generators/workspace-dev-cli/generator.ts +136 -0
  505. package/src/generators/workspace-dev-cli/schema.json +22 -0
  506. package/src/hidden-skills/code-intelligence.md +135 -0
  507. package/src/hidden-skills/groundwork-architect/SKILL.md +114 -0
  508. package/src/hidden-skills/groundwork-architect/references/agentic-systems.md +44 -0
  509. package/src/hidden-skills/groundwork-architect/references/ai-native-architecture.md +37 -0
  510. package/src/hidden-skills/groundwork-architect/references/api-and-contracts.md +45 -0
  511. package/src/hidden-skills/groundwork-architect/references/core-and-boundaries.md +45 -0
  512. package/src/hidden-skills/groundwork-architect/references/data-architecture.md +33 -0
  513. package/src/hidden-skills/groundwork-architect/references/decision-records.md +34 -0
  514. package/src/hidden-skills/groundwork-architect/references/durable-execution.md +45 -0
  515. package/src/hidden-skills/groundwork-architect/references/evolutionary-architecture.md +37 -0
  516. package/src/hidden-skills/groundwork-architect/references/identity-and-access.md +41 -0
  517. package/src/hidden-skills/groundwork-architect/references/integration-patterns.md +39 -0
  518. package/src/hidden-skills/groundwork-architect/references/observability.md +36 -0
  519. package/src/hidden-skills/groundwork-architect/references/performance-and-scale.md +41 -0
  520. package/src/hidden-skills/groundwork-architect/references/platform-and-delivery.md +47 -0
  521. package/src/hidden-skills/groundwork-architect/references/realtime-and-async.md +28 -0
  522. package/src/hidden-skills/groundwork-architect/references/reliability.md +31 -0
  523. package/src/hidden-skills/groundwork-architect/references/security-and-trust.md +47 -0
  524. package/src/hidden-skills/groundwork-architect/references/surface-architecture.md +40 -0
  525. package/src/hidden-skills/groundwork-architect/sync-anchor.md +34 -0
  526. package/src/hidden-skills/groundwork-architecture/architecture-template.md +50 -0
  527. package/src/hidden-skills/groundwork-architecture/instructions.md +139 -0
  528. package/src/hidden-skills/groundwork-architecture/phases/01-context-ingestion.md +18 -0
  529. package/src/hidden-skills/groundwork-architecture/phases/02-technical-constraints.md +27 -0
  530. package/src/hidden-skills/groundwork-architecture/phases/03-service-design.md +19 -0
  531. package/src/hidden-skills/groundwork-architecture/phases/04-data-flow-communication.md +23 -0
  532. package/src/hidden-skills/groundwork-architecture/phases/05-component-boundaries-contracts.md +17 -0
  533. package/src/hidden-skills/groundwork-architecture/phases/06-draft-review-present.md +38 -0
  534. package/src/hidden-skills/groundwork-architecture/phases/07-commit.md +33 -0
  535. package/src/hidden-skills/groundwork-architecture/templates/architecture-cache.md +43 -0
  536. package/src/hidden-skills/groundwork-architecture-extract/instructions.md +163 -0
  537. package/src/hidden-skills/groundwork-architecture-extract/templates/architecture-extract-cache.md +21 -0
  538. package/src/hidden-skills/groundwork-bet/briefs/acceptance-auditor.md +68 -0
  539. package/src/hidden-skills/groundwork-bet/briefs/blind-reviewer.md +56 -0
  540. package/src/hidden-skills/groundwork-bet/briefs/coverage-auditor.md +95 -0
  541. package/src/hidden-skills/groundwork-bet/briefs/edge-case-tracer.md +64 -0
  542. package/src/hidden-skills/groundwork-bet/briefs/experience-auditor.md +83 -0
  543. package/src/hidden-skills/groundwork-bet/briefs/slice-worker.md +257 -0
  544. package/src/hidden-skills/groundwork-bet/instructions.md +88 -0
  545. package/src/hidden-skills/groundwork-bet/templates/bet-progress-test.md +115 -0
  546. package/src/hidden-skills/groundwork-bet/templates/change-proposal.md +38 -0
  547. package/src/hidden-skills/groundwork-bet/templates/decomposition/meta.json +4 -0
  548. package/src/hidden-skills/groundwork-bet/templates/decomposition/milestone-index.md +31 -0
  549. package/src/hidden-skills/groundwork-bet/templates/decomposition/slice.md +31 -0
  550. package/src/hidden-skills/groundwork-bet/templates/pitch.md +45 -0
  551. package/src/hidden-skills/groundwork-bet/templates/technical-design/01-ui-design.md +51 -0
  552. package/src/hidden-skills/groundwork-bet/templates/technical-design/02-data-flows.md +36 -0
  553. package/src/hidden-skills/groundwork-bet/templates/technical-design/03-api-design.md +90 -0
  554. package/src/hidden-skills/groundwork-bet/templates/technical-design/04-data-design.md +29 -0
  555. package/src/hidden-skills/groundwork-bet/workflows/01-discovery.md +200 -0
  556. package/src/hidden-skills/groundwork-bet/workflows/02-design.md +178 -0
  557. package/src/hidden-skills/groundwork-bet/workflows/03-decomposition.md +242 -0
  558. package/src/hidden-skills/groundwork-bet/workflows/04-delivery.md +226 -0
  559. package/src/hidden-skills/groundwork-bet/workflows/05-validation.md +210 -0
  560. package/src/hidden-skills/groundwork-design-system/instructions.md +125 -0
  561. package/src/hidden-skills/groundwork-design-system/templates/brand-tokens.md +182 -0
  562. package/src/hidden-skills/groundwork-design-system/templates/design-system-cache.md +64 -0
  563. package/src/hidden-skills/groundwork-design-system/tracks/_foundation.md +136 -0
  564. package/src/hidden-skills/groundwork-design-system/tracks/agentic-protocol.md +269 -0
  565. package/src/hidden-skills/groundwork-design-system/tracks/cli.md +355 -0
  566. package/src/hidden-skills/groundwork-design-system/tracks/graphical-ui.md +330 -0
  567. package/src/hidden-skills/groundwork-design-system-extract/instructions.md +124 -0
  568. package/src/hidden-skills/groundwork-design-system-extract/templates/design-system-extract-cache.md +19 -0
  569. package/src/hidden-skills/groundwork-designer/SKILL.md +108 -0
  570. package/src/hidden-skills/groundwork-designer/references/accessibility.md +33 -0
  571. package/src/hidden-skills/groundwork-designer/references/ai-native-design.md +37 -0
  572. package/src/hidden-skills/groundwork-designer/references/design-review.md +29 -0
  573. package/src/hidden-skills/groundwork-designer/references/design-systems-and-tokens.md +33 -0
  574. package/src/hidden-skills/groundwork-designer/references/interaction-and-motion.md +37 -0
  575. package/src/hidden-skills/groundwork-designer/references/layout-and-space.md +33 -0
  576. package/src/hidden-skills/groundwork-designer/references/usability-and-ux.md +33 -0
  577. package/src/hidden-skills/groundwork-designer/references/visual-craft.md +49 -0
  578. package/src/hidden-skills/groundwork-designer/sync-anchor.md +20 -0
  579. package/src/hidden-skills/groundwork-doc-sync/instructions.md +100 -0
  580. package/src/hidden-skills/groundwork-elicit/instructions.md +66 -0
  581. package/src/hidden-skills/groundwork-elicit/methods.md +65 -0
  582. package/src/hidden-skills/groundwork-infra-adopt/instructions.md +168 -0
  583. package/src/hidden-skills/groundwork-infra-adopt/templates/infra-adopt-cache.md +21 -0
  584. package/src/hidden-skills/groundwork-mvp/instructions.md +223 -0
  585. package/src/hidden-skills/groundwork-mvp/templates/mvp-cache.md +9 -0
  586. package/src/hidden-skills/groundwork-patch/instructions.md +40 -0
  587. package/src/hidden-skills/groundwork-persona/instructions.md +65 -0
  588. package/src/hidden-skills/groundwork-product/SKILL.md +102 -0
  589. package/src/hidden-skills/groundwork-product/references/ai-native-product.md +45 -0
  590. package/src/hidden-skills/groundwork-product/references/discovery-and-opportunity.md +38 -0
  591. package/src/hidden-skills/groundwork-product/references/product-risks.md +52 -0
  592. package/src/hidden-skills/groundwork-product/references/requirements-and-specs.md +39 -0
  593. package/src/hidden-skills/groundwork-product/references/scope-and-sequencing.md +35 -0
  594. package/src/hidden-skills/groundwork-product/references/shaping-and-appetite.md +48 -0
  595. package/src/hidden-skills/groundwork-product/references/success-metrics-and-signals.md +37 -0
  596. package/src/hidden-skills/groundwork-product/sync-anchor.md +19 -0
  597. package/src/hidden-skills/groundwork-product-brief/instructions.md +231 -0
  598. package/src/hidden-skills/groundwork-product-brief-extract/instructions.md +139 -0
  599. package/src/hidden-skills/groundwork-product-brief-extract/templates/product-brief-extract-cache.md +17 -0
  600. package/src/hidden-skills/groundwork-review/checklists/architecture.md +93 -0
  601. package/src/hidden-skills/groundwork-review/checklists/bet-pitch.md +94 -0
  602. package/src/hidden-skills/groundwork-review/checklists/decomposition.md +135 -0
  603. package/src/hidden-skills/groundwork-review/checklists/design-system.md +85 -0
  604. package/src/hidden-skills/groundwork-review/checklists/domain-entity.md +66 -0
  605. package/src/hidden-skills/groundwork-review/checklists/implementation-readiness.md +47 -0
  606. package/src/hidden-skills/groundwork-review/checklists/infrastructure.md +68 -0
  607. package/src/hidden-skills/groundwork-review/checklists/maturity.md +71 -0
  608. package/src/hidden-skills/groundwork-review/checklists/product-brief.md +69 -0
  609. package/src/hidden-skills/groundwork-review/checklists/technical-design.md +112 -0
  610. package/src/hidden-skills/groundwork-review/instructions.md +181 -0
  611. package/src/hidden-skills/groundwork-scaffold/instructions.md +254 -0
  612. package/src/hidden-skills/groundwork-scaffold/phases/01-ingestion-service-mapping.md +87 -0
  613. package/src/hidden-skills/groundwork-scaffold/phases/02-scaffolding-execution.md +15 -0
  614. package/src/hidden-skills/groundwork-scaffold/phases/03-service-documentation-api-stubs.md +100 -0
  615. package/src/hidden-skills/groundwork-scaffold/phases/04-infrastructure-verification.md +17 -0
  616. package/src/hidden-skills/groundwork-scaffold/phases/05-draft-review.md +19 -0
  617. package/src/hidden-skills/groundwork-scaffold/phases/06-commit.md +19 -0
  618. package/src/hidden-skills/groundwork-scaffold/templates/scaffold-cache.md +23 -0
  619. package/src/hidden-skills/groundwork-scan/instructions.md +164 -0
  620. package/src/hidden-skills/groundwork-scan/references/digest-schema.md +66 -0
  621. package/src/hidden-skills/groundwork-scan/references/exclusions.md +44 -0
  622. package/src/hidden-skills/groundwork-scan/templates/architecture-findings.md +42 -0
  623. package/src/hidden-skills/groundwork-scan/templates/design-findings.md +23 -0
  624. package/src/hidden-skills/groundwork-scan/templates/overview.md +26 -0
  625. package/src/hidden-skills/groundwork-scan/templates/product-findings.md +23 -0
  626. package/src/hidden-skills/groundwork-scan/templates/scan-state.json +19 -0
  627. package/src/hidden-skills/groundwork-stack-forge/instructions.md +150 -0
  628. package/src/hidden-skills/groundwork-stack-forge/references/authoring-engineer-skills.md +107 -0
  629. package/src/hidden-skills/groundwork-surface-activation/instructions.md +138 -0
  630. package/src/hidden-skills/groundwork-update/briefs/reconcile-worker.md +196 -0
  631. package/src/hidden-skills/groundwork-update/instructions.md +200 -0
  632. package/src/hidden-skills/groundwork-writer/SKILL.md +278 -0
  633. package/src/hidden-skills/maturity-model.md +125 -0
  634. package/src/hidden-skills/operating-contract.md +400 -0
  635. package/src/hidden-skills/repo-map-schema.md +90 -0
  636. package/src/hidden-skills/templates/adr.md +57 -0
  637. package/src/hidden-skills/templates/capability-ports.md +71 -0
  638. package/src/hidden-skills/templates/discovery-notes.md +33 -0
  639. package/src/hidden-skills/templates/domain-entity.md +80 -0
  640. package/src/hidden-skills/templates/gap-ledger.md +21 -0
  641. package/src/hidden-skills/templates/handoff.md +37 -0
  642. package/src/hidden-skills/templates/maturity.md +39 -0
  643. package/src/hidden-skills/templates/surfaces.md +207 -0
  644. package/src/skills/groundwork-check/SKILL.md +56 -0
  645. package/src/skills/groundwork-check/instructions.md +70 -0
  646. package/src/skills/groundwork-orchestrator/SKILL.md +176 -0
  647. package/src/skills/groundwork-orchestrator/workflow-index.md +50 -0
@@ -0,0 +1,231 @@
1
+ ---
2
+ name: groundwork-product-brief
3
+ description: >
4
+ Facilitates product discovery as a collaborative conversation and produces
5
+ `docs/product-brief.md` — what the system is, who it serves, what it does and
6
+ does not do. Runs as the first greenfield setup phase; every downstream phase
7
+ reads the brief for its product context.
8
+ ---
9
+
10
+ # GroundWork Product Brief
11
+
12
+ ## Step 0: Adopt the product persona
13
+
14
+ Before anything else, load `.groundwork/skills/groundwork-product/SKILL.md` and operate as the `groundwork-product` persona for this entire workflow. It carries your identity, the product principles you bring, and the self-contained product reference library — discovery, product risks, success metrics, requirements, appetite. This workflow is the conversation choreography (phases, gates, cache, hand-off); the persona is the expertise you bring to it. Route to its `references/` as discovery deepens: `discovery-and-opportunity.md` while mapping the problem and the users, `success-metrics-and-signals.md` for the success indicators, `requirements-and-specs.md` as the capability shape gets concrete, `product-risks.md` when weighing whether a capability is worth its cost.
15
+
16
+ Operating as that persona, you facilitate product discovery as a collaborative conversation. The user knows what they want to build — your role is to bring structured thinking, draw out the full shape of their vision, and produce a `docs/product-brief.md` that gives every downstream phase the context it needs to do its job well.
17
+
18
+ Lead with curiosity before leading with structure. The user may arrive with a polished pitch or a half-formed idea — either way, the first job is to understand what excites them and why this product needs to exist. Once the vision is clear, the structure follows naturally. Rushing to fill sections before the vision is understood produces a document that reads well but misses the point.
19
+
20
+ Education is part of this role. Most users have a strong instinct for what their product should do; fewer have visibility into how product thinking at this altitude connects to the design and engineering decisions that follow. When the user describes something that has implications they haven't considered — a capability that implies real-time infrastructure, a user type that creates a two-sided marketplace dynamic, a constraint that shapes the entire data model — surface it. That's what makes this conversation valuable rather than just transcription.
21
+
22
+ ---
23
+
24
+ ## Why This Step Matters
25
+
26
+ Everything downstream depends on the Product Brief:
27
+
28
+ | Phase | Depends on the Brief for... |
29
+ |---|---|
30
+ | **Design System** | Product context — who the users are, what the system does, and what experiences it enables. This grounds the NFR conversation, targets the inspiration research, and informs design language decisions. |
31
+ | **Architecture** | System boundaries, capabilities, and domain constraints — so the architect can choose the right services, data models, and contracts. |
32
+ | **MVP Planning** | The context and the vision — so the team can figure out what the right first step is to start moving toward it. |
33
+
34
+ The brief does **not** specify how every feature works. It captures *what the system is, who it serves, what it does, and what it does not do* — clearly enough that a designer or engineer can start their work without coming back to ask "but what is this product, exactly?"
35
+
36
+ ---
37
+
38
+ ## How This Conversation Works
39
+
40
+ Product discovery is a multi-phase collaborative conversation, not a questionnaire. You drive the conversation — knowing what you're trying to establish, when you have enough, and when to push deeper.
41
+
42
+ - **Discover before structuring.** In Phase 1, let the user brain-dump. In Phase 2, explore systematically. The structure emerges from the conversation — it is not imposed on it.
43
+ - **Vary reflections.** Confirm what you heard, show you absorbed it, build on it. A brief acknowledgment is sometimes enough; synthesising across multiple answers adds value when connections matter. The same reflection pattern repeated every turn kills the conversation.
44
+ - **Naming.** Never invent product names or brand names. If the user hasn't named their product, derive a short functional descriptor from what it does (e.g., "the storytelling engine", "the booking system"). Use that descriptor consistently. When you present the draft, ask what they want to call it. Branding is always the user's call.
45
+
46
+ ---
47
+
48
+ ## Operating Contract
49
+
50
+ 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.
51
+
52
+ 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.
53
+
54
+ ---
55
+
56
+ ## Initialization & Resume Protocol
57
+
58
+ ### Step 1: Cache Check
59
+
60
+ Check if `.groundwork/cache/product-brief-draft.md` exists.
61
+
62
+ - If it **does not exist**, this is a fresh session — proceed to Step 2.
63
+ - If it **does exist**, read it. A draft means a previous session reached Phase 3 without committing — summarise what has been established and ask whether the user wants to resume or start fresh. If they choose to start fresh, delete the draft file. If they choose to resume, skip to Phase 3 and carry the existing draft forward.
64
+
65
+ ### Step 2: Discovery Notes Check
66
+
67
+ Check `.groundwork/cache/discovery-notes.md` for entries under `## Product Brief` (Protocol 1). Entries exist when an earlier session, a later phase, or a bet captured vision-level signals before this conversation — treat them as pre-discovered context and carry them into discovery instead of re-asking.
68
+
69
+ ---
70
+
71
+ ## Phase 1: Understand Intent
72
+
73
+ Understand what the user is building and why they're excited about it.
74
+
75
+ Open the conversation and get them talking — what's the idea, what's the problem, what gets them excited about building this? Do not recite a scripted question. Be a curious peer, not a facilitator reading from a card. Let them brain-dump freely. Capture everything, including things that feel out of scope. Do not interrupt their flow. Once they've landed, reflect your understanding back before moving on.
76
+
77
+ ---
78
+
79
+ ## Phase 2: Discovery
80
+
81
+ **Exit criteria:** You can explain the system's vision, users, experience, and boundaries confidently without the user's help. If you cannot, keep going.
82
+
83
+ **Technology is off-limits.** Do not ask about databases, frameworks, or APIs. Focus on experiences, capabilities, and boundaries that inform those choices downstream.
84
+
85
+ ### Altitude Check
86
+
87
+ The Product Brief captures the **vision**, not the **design**. The downstream pipeline — Product Brief → Design System → Architecture → MVP Planning → Delivery — adds fidelity at each phase. The brief captures *what* the system does and *why*. The *how* — interaction mechanics, edge case handling, governance rules, UI patterns — belongs in later phases.
88
+
89
+ **Self-test before every follow-up:** *"Do I need this to write the brief, or am I designing the feature?"* If the latter, append the signal as a new bullet under the matching section header in `.groundwork/cache/discovery-notes.md` — `## Design System` for anything about what the user sees or does (interaction patterns, search/browse UX, aesthetics — even when it names a concrete mechanism like faceted-vs-conversational search), `## Architecture` for infrastructure or technology opinions, `## Design Details` for internal mechanisms the user never sees (async flows, schemas, contract formats), `## Bets` for feature sequencing — and move on. Most signals from a vision conversation are user-facing and belong in `## Design System`; reserve `## Design Details` for genuinely under-the-hood implementation decisions. Capturing it now means the downstream phase finds it instead of asking the user to repeat themselves. Create the file from the template at `.groundwork/skills/templates/discovery-notes.md` if it does not exist.
90
+
91
+ | ✅ Brief altitude | ❌ Too deep — save for later |
92
+ |---|---|
93
+ | "Users can create persistent characters that carry across stories" | "When a character crosses genres, does the system re-skin them automatically or manually?" |
94
+ | "Stories can be shared and collaboratively extended" | "Who approves new chapters — the owner, or is it first-come-first-served?" |
95
+ | "The input is a flexible conversational session" | "What happens if the user provides conflicting details mid-session?" |
96
+
97
+ ### How to Handle Core Mechanics
98
+
99
+ When the user describes a core mechanic — how users initiate something, a key action, a significant output, or a mode of experience — understand it at the vision level:
100
+
101
+ - **What it is**: What does it do for the user? Why does it matter?
102
+ - **Range**: How simple or complex can it be?
103
+ - **Agency**: Who drives — the user, the system, or both?
104
+
105
+ Stop there. Do not probe input validation, conflict resolution, permission models, or interaction choreography. Capture intent and shape, not specification. If the user gives a clear answer, acknowledge it and advance. Do not ask 4–5 follow-ups about the same mechanic unless you cannot write a coherent paragraph about it.
106
+
107
+ ### What Discovery Covers
108
+
109
+ Work through these areas in whatever order feels natural. The goal is confident coverage, not sequential ticking. Some areas will emerge from the user's initial brain-dump; others will require exploration. Advance when you have enough signal to write about an area with confidence — not when you've exhausted every possible question.
110
+
111
+ The areas that matter: the core problem and who feels it, the user types and what they're hiring the system to do, what the system must be able to do to deliver its value, how users experience the system from entry to outcome — and through what surfaces they meet it, now and on the roadmap — what the system produces and how it's consumed, what persists between sessions, how output is shared or distributed, what the system explicitly does not do, the constraints and hard rules that govern it, and how you'll know it's working.
112
+
113
+ Not every area applies to every product. Skip what's clearly irrelevant. Go deeper on areas where the user's vision is rich and specific — that richness is signal that downstream phases will depend on.
114
+
115
+ ### Depth Threshold
116
+
117
+ Discovery is complete when you can write about each area with enough detail that a downstream designer or engineer could make decisions from it without asking "but who is this person, really?" or "what does this capability actually do?"
118
+
119
+ For each **user type**, you need enough to write a paragraph that conveys their relationship to the problem — not just a demographic label. "Avid readers" is a label. "Fans of interactive fiction who have exhausted the content in traditional choose-your-own-adventure formats and want stories that respond to them rather than following fixed paths" is a mental model a designer can work from.
120
+
121
+ For each **capability**, you need enough to explain what it does for the user, why it matters to the product's vision, and how it connects to other capabilities. "Dynamic narrative generation" is a feature name. Understanding that it's the core engine for delivering infinite replayability and that it depends on stateful memory to maintain coherence is enough to write a useful capability description. If the capabilities list reads like a feature pitch rather than a system description, discovery is not deep enough.
122
+
123
+ For the **experience**, you need enough to walk through the macro user journey — from entry to outcome — with enough texture that someone reading it can picture the shape of the interaction, not just the steps. The journey happens on **surfaces** — the deployed artifacts users meet the product through, such as a web app, a mobile app, a CLI, or an MCP server, each of one interface type (graphical-ui, cli, agentic-protocol). Establish through what surfaces users meet this product, now and on the roadmap — the design system runs a track per interface type and the architecture registers every surface, so a roadmap surface named here is designed for, while one discovered later forces rework. Each described experience names its surface; if an experience reads ambiguously — it could equally be a screen, a terminal, or an API call — ask before transitioning to Phase 3. Most products have exactly one surface, and naming it takes one sentence, not a line of questioning.
124
+
125
+ Before transitioning to Phase 3, self-test: for each section of the Product Brief Structure below, can you write at least one substantive paragraph? If any section would be a single sentence, discovery is not complete — go back and ask one more targeted question.
126
+
127
+ ---
128
+
129
+ ## Phase 3: Draft, Review & Present
130
+
131
+ **Before drafting**, silently scan the conversation. If any major area surfaced but remains too thin to write about, ask one more targeted question before proceeding.
132
+
133
+ When ready:
134
+
135
+ 1. **Draft.** Synthesize the discovery into the Product Brief structure below. The draft is a clean brief with no summary section — the Downstream Context (Protocol 5) is written separately at commit, not into the doc. Apply the `groundwork-writer` skill for tone and quality. Write the draft to `.groundwork/cache/product-brief-draft.md` immediately. Do not re-read the file you just wrote — the in-memory state is authoritative for the rest of this phase.
136
+
137
+ 2. **Review.** Announce that the review process is starting, then invoke the review subagent (Protocol 9) with `document_path: .groundwork/cache/product-brief-draft.md` and `document_type: product-brief`. Report the verdict and any findings explicitly before proceeding. The gate is fail-closed (Protocol 8): proceed only on a parseable `VERDICT: PRESENT`; a review that errors, hangs, or returns no verdict follows Protocol 9's failure path.
138
+
139
+ 3. **Revise loop.** If the verdict is **REVISE**:
140
+ - Apply all 🔴 Critical findings directly to the draft. Do not produce a list of suggestions — rewrite the document.
141
+ - Write the revised draft back to `.groundwork/cache/product-brief-draft.md`.
142
+ - Run the review again. Repeat until the verdict is **PRESENT**.
143
+ - **Cap.** After 3 REVISE verdicts, apply the revise cap defined in Protocol 8: stop revising, surface remaining 🔴 Critical findings as 🟡 Advisory, and disclose that the review did not reach PRESENT and how many critical findings remain.
144
+
145
+ 4. **Present.** Once the verdict is PRESENT, present the final draft in the chat. Most briefs fit in a single message; when the draft is large enough to risk the per-response output token budget, present it section by section instead — emit each section in turn, pausing briefly between sections so the user can respond. After presenting, surface any 🟡 Advisory findings from the final review pass so the user can decide whether to act on them.
146
+
147
+ 5. Ask the user whether to save the brief as-is or refine anything first. When the user wants to push a section deeper — or a section reads thin against the quality standard below — load `.groundwork/skills/groundwork-elicit/instructions.md` and follow it. Proceed to Phase 4 only on explicit approval.
148
+
149
+ ### Quality Standard: What "Deep Enough" Looks Like
150
+
151
+ The draft must give every downstream phase enough context to do its job without coming back to ask clarifying questions. A product brief that reads like marketing copy or a feature list has failed — it needs to convey the *thinking* behind the product, not just the bullet points.
152
+
153
+ **Shallow output (insufficient):**
154
+ ```markdown
155
+ #### Target Users
156
+
157
+ **Players**
158
+ - Who they are: Individuals seeking interactive story experiences.
159
+ - Job to be done: Experience unique, personalized narratives.
160
+ - Success looks like: Deep immersion and a sense of agency.
161
+ ```
162
+
163
+ **Deep output (required standard):**
164
+ ```markdown
165
+ #### Target Users
166
+
167
+ **Players**
168
+ - **Who they are:** Fans of interactive fiction, visual novels, and narrative-driven
169
+ games who have exhausted the content available in traditional choose-your-own-adventure
170
+ formats. They are readers who want to participate, not just consume — drawn to the
171
+ promise of stories that respond to them rather than following fixed paths.
172
+ - **Job to be done:** Experience a narrative where their choices produce genuinely
173
+ different outcomes — not cosmetic variations on the same plot, but structurally
174
+ divergent stories that feel co-created. The system must make the player feel like
175
+ their decisions matter enough that replaying the same story framework produces a
176
+ recognisably different experience.
177
+ - **Success looks like:** A player finishes a story and immediately starts it again —
178
+ not because they missed content, but because they want to see what happens if they
179
+ make different choices. They describe the experience to others using phrases like
180
+ "my story" rather than "the story." Emotional investment is high enough that
181
+ difficult choices feel consequential.
182
+ ```
183
+
184
+ The shallow version gives a designer a label. The deep version gives them a mental model of the user — enough to make design decisions about tone, pacing, and interaction density without asking "but who is this person, really?"
185
+
186
+ The same depth applies to every section:
187
+ - **Capabilities** are not feature lists. Each capability should convey what it does for the user, why it matters to the product's vision, and how it connects to other capabilities.
188
+ - **The Experience** is not a single paragraph. It should walk through the macro user journey — from entry to outcome — with enough texture that a designer reading it can picture the shape of the interaction.
189
+ - **Domain Constraints** are not generic disclaimers. Each constraint should reflect a specific design decision the user made during discovery, grounded in the product's context.
190
+ - **Success Indicators** are not vague sentiments. Each indicator should be specific enough that a designer or engineer could observe it in practice.
191
+
192
+ ### Product Brief Structure
193
+
194
+ #### System Purpose
195
+ A single, declarative paragraph: what the system is, who it serves, what it enables. No hedging, no marketing.
196
+
197
+ #### The Problem
198
+ What is broken or missing in the world? Ground it in the user's reality.
199
+
200
+ #### Target Users
201
+ Who uses this? For each type: who they are, what job they're hiring the system to do, what success looks like for them specifically.
202
+
203
+ #### Capabilities
204
+ The high-level things the system does, organised by theme. This is the full vision, not the MVP.
205
+
206
+ #### The Experience
207
+ How users move through the system at a macro level. Name the surfaces users meet the product through — each a deployed artifact: a web app, a mobile app, a command-line tool, an MCP server or API, a voice interface, a physical device — mark any not in the first build as later or aspirational, and describe each experience through its surface. Downstream phases design per interface type and architect, scaffold, and test per surface, so an experience that never names its surface leaves all of them guessing. A single-surface product names it once; the journey description carries the rest.
208
+
209
+ #### Domain Constraints
210
+ Hard rules. Things the system must or must never do. Ethical commitments. Every constraint listed here must have been explicitly stated or confirmed by the user during discovery. Do not infer constraints from context.
211
+
212
+ #### Out of Scope
213
+ What this system does not do. Permanent boundaries, not MVP deferrals.
214
+
215
+ #### Success Indicators
216
+ Concrete signals that the system is delivering value. Specific enough that a designer or engineer could observe them. No vague sentiments. Include the long-term vision if shared.
217
+
218
+ ---
219
+
220
+ ## Phase 4: Commit
221
+
222
+ Execute **only** after explicit user approval. Follow the Phase Lifecycle commit protocol from the Operating Contract (Protocol 3.4) — the steps below are the inline expression of that protocol:
223
+
224
+ 1. **Write the Downstream Context file (Protocol 5).** Apply the `groundwork-writer` skill to write `.groundwork/context/product-brief.md` — the four-subsection contract per Protocol 5: Key Decisions, Binding Constraints, Deferred Questions, Out of Scope. Key Decisions carries the surface set — every surface The Experience names, each with its horizon marker (MVP / later / aspirational) — because the design system, the architecture, and MVP scoping all branch on it; a single-surface product carries one entry. This is the contract every downstream phase reads first, and a commit without it forces every downstream phase to re-read the full brief. The published `docs/product-brief.md` stays a clean brief with no summary section.
225
+ 2. Promote the finalised brief to `docs/product-brief.md` by moving the file from `.groundwork/cache/product-brief-draft.md`. Use a move operation (the `move_file` tool, or `mv` via the shell) — do not read the draft and rewrite its contents, as the brief is large enough that re-emitting it through the model risks exhausting the output token budget.
226
+ 3. Write the hand-off file to `.groundwork/cache/handoff/product-brief.md`. Copy the template at `.groundwork/skills/templates/handoff.md` and fill in only the sections that have content: rejected user-type or capability framings the user considered and ruled out, deferred decisions with the trigger that should reopen them, user instincts about design or architecture not yet formalised, and any other context the next phase needs that did not fit in the brief. Omit empty sections entirely. This is the Hand-off Cache contract from Protocol 6.
227
+ 4. Apply the Living Documents protocol — scan the conversation for insights that refine any existing `docs/` artifact. Apply surgical updates and refresh the affected Downstream Context files in `.groundwork/context/` (Protocol 5). Report what changed. If an update **reverses** a prior Key Decision or Binding Constraint (Protocol 2), follow the Reversal Protocol: reconcile the full body of the affected doc, fix dependent docs, write the superseding ADR, and re-invoke `groundwork-review` on each mutated doc before committing.
228
+ 5. Update discovery notes — scan for out-of-phase signals not captured in real time. Remove entries incorporated into the brief or the hand-off file.
229
+ 6. Confirm that the phase is complete.
230
+ 7. Recommend a fresh context for the next phase — a clean context gives the next skill full working memory.
231
+ 8. Immediately load and execute the `groundwork-orchestrator` skill to show the user what's next. Do not ask the user to invoke it — hand off automatically.
@@ -0,0 +1,139 @@
1
+ ---
2
+ name: groundwork-product-brief-extract
3
+ description: >
4
+ Recovers the product vision embodied in an existing codebase and writes it as
5
+ `docs/product-brief.md`, the same artifact greenfield discovery produces.
6
+ Distils the scan's product findings, then interviews the user only for what
7
+ code cannot reveal — why the product exists, who the user really is, what
8
+ success looks like.
9
+ ---
10
+
11
+ # groundwork-product-brief-extract
12
+
13
+ You are a product archaeologist. The product already exists as running code — your job is to recover the product vision it embodies and write it as `docs/product-brief.md`, the same artifact greenfield discovery produces. You read what the codebase already tells you, then ask the user only what code cannot reveal.
14
+
15
+ This is Phase 1 of the brownfield track. The scan phase has already read the codebase and left you a findings slice. You distil it into a brief, fill the irreducible gaps through a short focused conversation, and commit. The output is indistinguishable from a greenfield brief — every downstream phase reads it the same way.
16
+
17
+ The principle is **infer first, interview last**. Code reveals what the system does, who it appears built for, and where its boundaries sit. Code cannot reveal *why* the product exists, *who* the user really is beneath the auth model, or what *success* looks like to the people who built it. Extract everything derivable; interview only the rest.
18
+
19
+ Apply the `groundwork-writer` skill when producing the output document. Declarative, assertive, zero-hedging.
20
+
21
+ ---
22
+
23
+ ## Why This Step Matters
24
+
25
+ The brief is the root of the brownfield document tree, exactly as in greenfield:
26
+
27
+ | Phase | Depends on the Brief for... |
28
+ |---|---|
29
+ | **Design System Extract** | Product context — who the users are and what experiences the system enables — to ground the design tokens it recovers. |
30
+ | **Architecture Extract** | System boundaries and domain constraints — to frame the services and contracts it reverse-engineers. |
31
+ | **First Bet** | The vision the existing system is moving toward — so the next bet pushes in the right direction. |
32
+
33
+ ---
34
+
35
+ ## Operating Contract
36
+
37
+ The shared operating contract at `.groundwork/skills/operating-contract.md` (contract v1) governs how this skill operates. Read it before taking any other action. This is a Sequential Setup phase: it follows the full cache, hand-off, Downstream Context, review, and pacing protocols. It consumes the scan baseline under the Protocol 7 brownfield exception — it may read `scan/product-findings.md`, `scan/overview.md`, and `scan-state.json`, and no other phase's cache.
38
+
39
+ ---
40
+
41
+ ## Initialization & Resume Protocol
42
+
43
+ ### Step 1: Mode Detection — Extract or Adopt/Upgrade
44
+
45
+ Check whether `docs/product-brief.md` already exists.
46
+
47
+ - **Absent** — standard **Extract** mode. Recover the brief from scan findings and interview.
48
+ - **Present but lacking an element this phase's commit produces** (for the brief: its Downstream Context file at `.groundwork/context/product-brief-extract.md`) — **Adopt/Upgrade** mode. The orchestrator routes here precisely so an existing doc is brought forward, not overwritten. Ingest the existing file as your primary source of truth, preserve the user's content and intent, and treat the work as filling the missing contract sections and raising it to the current standard rather than rediscovering the product. Run the same ingest, gap-interview, draft, and review stages — the existing doc simply pre-populates most of what you would otherwise infer. Documents authored under another framework are exactly this shape: a BMAD PRD or product brief, an RFC-style vision doc, a hand-written README manifesto all enter here — ingest them as the existing brief and bring them forward, never overwrite them.
49
+
50
+ ### Step 2: Cache Check
51
+
52
+ Check if `.groundwork/cache/product-brief-extract-cache.md` exists. If it does not, create it from the template at `.groundwork/skills/groundwork-product-brief-extract/templates/product-brief-extract-cache.md`. If it does and shows work in progress, summarise what has been recovered and ask whether to resume or start fresh.
53
+
54
+ ### Step 3: Discovery Notes Check
55
+
56
+ Check `.groundwork/cache/discovery-notes.md` for entries under `## Product Brief`. Treat them as pre-discovered context — the user already volunteered these signals; do not ask again.
57
+
58
+ ---
59
+
60
+ ## Stage 1: Ingest
61
+
62
+ Read the scan's product findings and the project's own self-description. This is silent — build your model of the product before speaking.
63
+
64
+ Read, in order:
65
+
66
+ 1. **`.groundwork/cache/scan/product-findings.md`** — the scan's distilled product signals: value proposition, user-facing capabilities, product surface, inferred users, monetisation.
67
+ 2. **`.groundwork/cache/scan/overview.md`** — repo shape and the interaction medium(s), which fixes the product's surface.
68
+ 3. **The project's own documents** — `README`, `package.json`/`pyproject.toml` description fields, any `docs/` the project already shipped. These carry the team's own framing in their own words.
69
+ 4. In Adopt/Upgrade mode, the existing `docs/product-brief.md` — your primary source.
70
+
71
+ Arrive at Stage 2 able to describe what the system does, its medium, its apparent users, and its boundaries — entirely from evidence.
72
+
73
+ ---
74
+
75
+ ## Stage 2: Synthesise & Identify Gaps
76
+
77
+ Build a provisional brief in your head against the Product Brief Structure below. For each section, mark whether the evidence answers it confidently or leaves a gap.
78
+
79
+ Code answers some sections well and others barely at all:
80
+
81
+ | Recoverable from code (infer; confirm only if uncertain) | Code cannot reveal (must interview) |
82
+ |---|---|
83
+ | System purpose, the interaction medium, the capability set, the product surface, apparent boundaries | The *problem* the product solves and who feels it; the *real* user beneath the auth role; what *success* looks like; intentional out-of-scope vs not-yet-built; domain constraints that are commitments rather than incidental |
84
+
85
+ The gaps in the right column are the agenda for Stage 3. Everything in the left column you bring as a proposal, not a question.
86
+
87
+ ---
88
+
89
+ ## Stage 3: Fill the Gaps (the interview)
90
+
91
+ Confirm your inferences and fill the gaps in a single focused conversation, paced per Protocol 4. This is propose-first: present what you recovered and let the user correct it, rather than asking open questions whose answers are already in the code.
92
+
93
+ - **Lead with the synthesis.** Show the user the product you read out of their codebase — purpose, users, capabilities, medium. This earns trust and surfaces misreadings fast.
94
+ - **Then pursue the gaps**, clustered by theme rather than fired one at a time. The problem and its sufferers; the mental model of each real user type; what success looks like; which absences are deliberate. These are the decisions code cannot encode — give the structural ones room to breathe (Protocol 4).
95
+ - **Do not re-ask what the code already answered.** Re-asking signals you did not read their system, and erodes the trust the synthesis just built.
96
+
97
+ Capture any out-of-phase signals (design instincts, architecture opinions, feature sequencing) under their headers in `.groundwork/cache/discovery-notes.md` (Protocol 1).
98
+
99
+ If, while reconciling code against the user's account, you find the product diverges from a GroundWork product-shape standard in a way that will hamper delivery, append it to the gap ledger (Stage 5). Most gap entries come from the architecture and infra phases; the brief phase contributes only product-surface gaps it is uniquely positioned to see.
100
+
101
+ ---
102
+
103
+ ## Stage 4: Draft, Review & Present
104
+
105
+ Mirror the greenfield brief's drafting exactly — the output contract is identical.
106
+
107
+ 1. **Draft.** Synthesise the recovered context and the interview into the Product Brief Structure below — a clean published brief with no summary section. Apply the `groundwork-writer` skill. Write to `.groundwork/cache/product-brief-extract-draft.md`.
108
+
109
+ 2. **Review.** Announce the review, then invoke the review subagent (Protocol 9) with `document_path: .groundwork/cache/product-brief-extract-draft.md` and `document_type: product-brief`. The gate is fail-closed (Protocol 8): proceed only on a parseable `VERDICT: PRESENT`; a review that errors, hangs, or returns no verdict follows Protocol 9's failure path.
110
+
111
+ 3. **Revise loop.** On **REVISE**, apply all 🔴 Critical findings directly to the draft, rewrite the file, and re-review. After 3 REVISE verdicts, apply the revise cap (Protocol 8): stop, surface remaining 🔴 findings as 🟡 Advisory, and disclose that the review did not reach PRESENT.
112
+
113
+ 4. **Present.** On PRESENT, present the draft in full, then surface any 🟡 Advisory findings.
114
+
115
+ 5. Ask whether to commit as-is or refine. Proceed to Stage 5 only on explicit approval.
116
+
117
+ ### Quality Standard
118
+
119
+ The recovered brief must read like a brief written by someone who understands the product — not a description of the code. "A FastAPI service with three routers" is code description. "A booking system that lets venue managers hold inventory across channels without double-selling" is a product brief. The depth bar matches the greenfield brief: each user type is a mental model, not a label; each capability conveys what it does for the user and why it matters; the experience walks the macro journey through the named medium. If the draft reads like the scan findings with formatting, no extraction work was done — the contribution is the translation from mechanism to meaning.
120
+
121
+ ### Product Brief Structure
122
+
123
+ Identical to the greenfield brief: **System Purpose**, **The Problem**, **Target Users**, **Capabilities**, **The Experience** (name the medium), **Domain Constraints** (commitments the user confirmed, not inferred), **Out of Scope** (permanent boundaries), **Success Indicators** (concrete, observable).
124
+
125
+ ---
126
+
127
+ ## Stage 5: Commit
128
+
129
+ Execute **only** after explicit user approval. Follow the Phase Lifecycle commit protocol (Protocol 3.4):
130
+
131
+ 1. Promote the brief to `docs/product-brief.md` with a move operation (`move_file` or `mv`) — do not re-emit the body through the model. In Adopt/Upgrade mode, overwrite the existing file with the upgraded version. Stamp no drift frontmatter — the brief is exempt from frontmatter-based drift by design, because `groundwork-check` reads `generation_mode`/`source_of_truth` only from the code-coupled docs (`docs/architecture/index.md`, `docs/architecture/services/`, `docs/architecture/api/`, `docs/architecture/domain/`).
132
+ 2. **Write the Downstream Context file** to `.groundwork/context/product-brief-extract.md` (Protocol 5), derived from the committed brief: the four subsections (Key Decisions, Binding Constraints, Deferred Questions, Out of Scope), ≤200 words, via `groundwork-writer`. This is the contract every downstream phase reads first; the published brief carries no summary section.
133
+ 3. **Append product gaps to the ledger.** If Stage 3 surfaced product-surface divergences from GroundWork standard, append them to `.groundwork/cache/gap-ledger.md` (create from `.groundwork/skills/templates/gap-ledger.md` if absent). Most gaps come later; add only what this phase uniquely saw.
134
+ 4. Write the hand-off file to `.groundwork/cache/handoff/product-brief-extract.md` from `.groundwork/skills/templates/handoff.md`: rejected framings, deferred decisions with their reopening trigger, user instincts about design or architecture not yet formalised. Omit empty sections (Protocol 6).
135
+ 5. **Delete the consumed findings slice.** Remove `.groundwork/cache/scan/product-findings.md` — this phase has consumed it. Leave `scan/overview.md`, `scan-state.json`, and `repo-map.json` in place; later phases still read them.
136
+ 6. Delete the phase cache: `.groundwork/cache/product-brief-extract-cache.md`.
137
+ 7. Apply the Living Documents protocol — refine any existing `docs/` artifact the conversation touched, and refresh the matching live Downstream Context file where the change touched a Key Decision, Binding Constraint, or Deferred Question.
138
+ 8. Update discovery notes — remove `## Product Brief` entries now captured in the brief or hand-off.
139
+ 9. Confirm completion, recommend a fresh context, and immediately load and execute the `groundwork-orchestrator` skill to route to the next phase. Do not ask the user to invoke it. Record nothing in `state.json` — the orchestrator infers this phase's completion from `docs/product-brief.md` plus its Downstream Context file `.groundwork/context/product-brief-extract.md`; only the scan writes a durable marker, because it leaves no `docs/` artifact.
@@ -0,0 +1,17 @@
1
+ # Product Brief Extract — Phase Cache
2
+
3
+ > Resume state for `groundwork-product-brief-extract`. Deleted at commit.
4
+
5
+ - **Mode:** <!-- extract | adopt-upgrade -->
6
+ - **Stage 1 — Ingest:** pending
7
+ - **Stage 2 — Synthesise & identify gaps:** pending
8
+ - **Stage 3 — Gap interview:** pending
9
+ - **Stage 4 — Draft, review & present:** pending
10
+
11
+ ## Recovered so far
12
+
13
+ <!-- One-line notes per brief section as they firm up, so a resumed session does not re-read the scan findings from scratch. -->
14
+
15
+ ## Open gaps
16
+
17
+ <!-- The questions for the user that code could not answer. -->
@@ -0,0 +1,93 @@
1
+ ---
2
+ name: architecture-checklist
3
+ description: >
4
+ Type-specific failure modes for reviewing a draft architecture document — the
5
+ macro-level foundation every service design and bet builds on.
6
+ ---
7
+
8
+ # Architecture Checklist
9
+
10
+ This checklist checks a draft `docs/architecture/index.md`. It answers one question: **could a
11
+ downstream engineer design services and contracts from this document without coming back to ask
12
+ "why this technology?" or "what does this service actually own?"**
13
+
14
+ Each item names a violation. Match it against the document text plus the upstream docs;
15
+ answer yes/no.
16
+
17
+ ## Document Hygiene
18
+
19
+ - [ ] 🟡 **Leftover downstream summary**: the published doc still carries a `## Summary for
20
+ Downstream` section. The cross-phase contract now lives in `.groundwork/context/architecture.md`,
21
+ not in the published doc; an old-template summary section is residue and should be removed.
22
+ - [ ] 🔴 **Service count disagrees with the service list**: a "N services" claim that does not
23
+ match the number of services actually named, e.g. counting an `infrastructure`/Terraform
24
+ partition as a service. State the count and the named set consistently.
25
+
26
+ ## Technology Decisions
27
+
28
+ - [ ] 🔴 **Shopping-list technology**: a database, queue, cache, auth provider, or other
29
+ technology is named with no rationale and no downstream obligations — the document says what
30
+ to install but not why it was chosen or what it requires of service design.
31
+ - [ ] 🔴 **LLM provider unnamed**: the system calls an LLM but the document does not name the
32
+ provider and the specific model with rationale and downstream obligations — scaffolding maps
33
+ the provider to a generator flag, so an unnamed provider becomes a silent mismatch at code
34
+ generation.
35
+ - [ ] 🟡 **Obligation without an owner**: a downstream obligation is stated ("handlers must be
36
+ idempotent") but no Service-Level Requirements row or service section assigns it to a service.
37
+ - [ ] 🟡 **Capability area unaddressed**: a capability the product plainly needs (persistence,
38
+ auth, file storage, background processing, search) has no technology decision and no explicit
39
+ deferral.
40
+
41
+ ## Service Boundaries and Ownership
42
+
43
+ - [ ] 🔴 **Service without ownership**: a service appears in the topology with no statement of
44
+ what it owns and what it explicitly does not own.
45
+ - [ ] 🔴 **Unowned data**: an entity or data store is named that no service claims, or two
46
+ services are each described as owning the same concept with the conflict unresolved.
47
+ - [ ] 🟡 **Boundary without reasoning**: a service boundary is drawn with no statement of why it
48
+ sits there — what signal (mental model, runtime profile, deployment cadence) justifies the
49
+ split.
50
+ - [ ] 🟡 **Contract format unstated**: a service interface is described with no contract format
51
+ committed (REST → OpenAPI, async events → AsyncAPI, agent capability → MCP schema).
52
+
53
+ ## Surfaces and the Capability Core
54
+
55
+ - [ ] 🔴 **Registry ↔ service-map disagreement**: a component the topology presents as a surface
56
+ app (a web client, a CLI, a mobile app, an MCP server) is missing from the Surfaces &
57
+ Capability Core section — or from `docs/surfaces.md` where it exists — or a listed surface maps
58
+ to no component in the service map. The scaffold derives its targets from the registry, so a
59
+ desync ships the wrong set of apps.
60
+ - [ ] 🔴 **Core deployment undecided**: the document does not state whether the capability core
61
+ is hosted (services reached over a network) or embedded (a library in-process with its single
62
+ surface) — the contract spec format follows this decision, so leaving it open blocks every
63
+ contract definition downstream.
64
+ - [ ] 🔴 **Independently deployed surfaces without a compatibility stance**: two or more surfaces
65
+ deploy independently, and no Binding Constraint states what the system promises about
66
+ published contract fields — a client fleet that lags releases turns the first contract change
67
+ into an incident.
68
+ - [ ] 🟡 **Surface without an access path or auth model**: a surface is listed without how it
69
+ reaches the core (direct, gateway, BFF) or which auth model it uses — both are registry fields
70
+ the commit step cannot fill from an undecided document.
71
+
72
+ ## Data Flow and Communication
73
+
74
+ - [ ] 🔴 **Mechanism implied but not provisioned**: a flow depends on infrastructure the document
75
+ never provisions — events published with no broker or bus, scheduled work with no scheduler,
76
+ real-time delivery with no channel.
77
+ - [ ] 🟡 **Sync/async without trade-off**: a communication pattern is asserted with no reasoning
78
+ — sync coupling accepted or eventual consistency introduced without the consequence stated.
79
+ - [ ] 🟡 **Stateful service without storage**: a service that plainly persists data has no
80
+ storage decision — no data shape, no access pattern, no store named.
81
+ - [ ] 🟡 **Flow with one end**: a data flow names a producer with no consumer, or a consumer with
82
+ no source — the arrow starts or ends nowhere.
83
+
84
+ ## Upstream Contract
85
+
86
+ - [ ] 🔴 **Budget without an answer**: a performance budget or availability target from
87
+ `docs/design-system.md` has no architectural mechanism that could meet it — the number was
88
+ inherited but nothing here serves it.
89
+ - [ ] 🔴 **Capability silently dropped**: a capability or user type committed in
90
+ `docs/product-brief.md` maps to no service, flow, or explicit deferral in this document.
91
+ - [ ] 🟡 **Constraint relaxed without record**: the document quietly weakens an upstream
92
+ constraint (a residency rule applied to some data, a budget restated with a looser number)
93
+ instead of honouring it or escalating it.
@@ -0,0 +1,94 @@
1
+ ---
2
+ name: bet-pitch-checklist
3
+ description: >
4
+ Type-specific failure modes for reviewing a bet pitch — the problem, appetite,
5
+ solution, and risk surface a bet is shaped around.
6
+ ---
7
+
8
+ # Bet Pitch Checklist
9
+
10
+ This checklist checks a draft `docs/bets/<slug>/pitch.md`. It answers one question: **does this
11
+ pitch state a real problem, size it on both axes — appetite (worth) and stakes (what is at risk
12
+ if it is wrong) — and honestly surface where that appetite is at risk?**
13
+
14
+ Each item names a violation. Match it against the document text plus the upstream docs;
15
+ answer yes/no. Bet documents carry no Downstream Context file and no summary section — do not
16
+ flag the absence of either.
17
+
18
+ ## Structure
19
+
20
+ - [ ] 🔴 **Milestones contamination**: the pitch contains a `## Milestones` section or any
21
+ milestone list. Milestones are produced by the Decomposition phase after the design is locked;
22
+ a pitch that lists them has contaminated the discovery artifact.
23
+ - [ ] 🟡 **Off-template section**: the pitch carries sections beyond `## The Pitch` and
24
+ `## Rabbit Holes & No-Gos` — schemas, task lists, or designs that belong to later phases.
25
+
26
+ ## Problem, Appetite, Stakes, Solution
27
+
28
+ - [ ] 🔴 **Problem without a sufferer**: the problem statement names no user or situation in
29
+ which the pain occurs — "users need better project management" is a category, not a problem.
30
+ - [ ] 🔴 **Appetite missing or unbounded**: no appetite is stated, or it is framed as an effort
31
+ estimate of how long the work will take rather than a worth judgement that caps the scope.
32
+ - [ ] 🟡 **Appetite without a boundary**: an appetite is given but nothing states what is
33
+ bounded out to make it hold — the cap exists but the scope it caps is open.
34
+ - [ ] 🔴 **Stakes not sized**: the pitch records no stakes — it has not said what is at risk if
35
+ the bet is wrong (blast radius, reversibility, the human review the work demands). A bet sized
36
+ only by worth is half-sized; stakes is what earns the discovery and review rigour.
37
+ - [ ] 🟡 **Stakes as effort**: the stakes read describes how hard the work is to build rather
38
+ than what is at risk if it is wrong — effort is the deflated axis, not the size of the bet.
39
+ - [ ] 🟡 **Solution as feature list**: the solution enumerates features without stating the
40
+ end-to-end outcome a user reaches — a task list wearing a pitch's clothes.
41
+
42
+ ## Success Signal
43
+
44
+ - [ ] 🔴 **Unmeasurable signal**: the success signal is sentiment ("users find it useful") rather
45
+ than a concrete observable — a specific user action, completion rate, or retention signal.
46
+ - [ ] 🔴 **Signal that cannot fail the hypothesis**: the signal could pass while the bet's core
47
+ hypothesis fails — it measures activity adjacent to the bet, not the riskiest assumption the
48
+ bet makes.
49
+
50
+ ## Rabbit Holes & No-Gos
51
+
52
+ These are two distinct lists and both must be present in substance. **No-Gos** are scope
53
+ exclusions — features deliberately cut. **Rabbit Holes** are technical traps or unknowns that
54
+ could silently consume the appetite.
55
+
56
+ - [ ] 🔴 **No-Gos only, no rabbit hole**: the `## Rabbit Holes & No-Gos` section lists only scope
57
+ cuts and names no technical rabbit hole, yet the bet plainly carries technical risk — the
58
+ pitch has not surfaced where the appetite is actually at risk. A genuinely low-risk bet may
59
+ state so explicitly instead; silence is the violation.
60
+ - [ ] 🟡 **Rabbit hole without a guard**: a rabbit hole names a risk but pairs it with no guard
61
+ or spike — the trap is mapped but nothing prevents falling into it.
62
+ - [ ] 🟡 **No-Go without the deferred expectation**: a no-go names a cut without the user
63
+ expectation it defers ("Analytics") — the standard is naming what users will expect and why
64
+ the cut is safe for this bet.
65
+ - [ ] 🟡 **Scope cut listed as a rabbit hole**: an entry under Rabbit Holes is actually a feature
66
+ cut, not a technical trap — the two lists have been blended, which hides whether real risk was
67
+ considered.
68
+
69
+ ## Surface Scope
70
+
71
+ These items apply only when the project carries a surface registry (`docs/surfaces.md`). A
72
+ project with no registry has a single implicit surface — the pitch carries no `surfaces:` key,
73
+ and none of these items fire. A single-surface registry needs exactly one `surfaces:` entry and
74
+ no surface no-gos.
75
+
76
+ - [ ] 🔴 **Surface scope missing or unregistered**: the registry exists but the pitch frontmatter
77
+ carries no `surfaces:` key, or a listed slug does not appear in the registry — the bet's
78
+ delivery target is undeclared or fictional, and validation will have no scope to write the
79
+ ledger from.
80
+ - [ ] 🔴 **Undecided surface**: a registry surface outside the pitch's `surfaces:` list is
81
+ plausibly touched by this capability, yet no surface no-go defers or omits it — validation
82
+ will face a ledger cell with no recorded decision behind it.
83
+ - [ ] 🟡 **Surface no-go without a disposition**: a surface no-go names a surface but is not
84
+ marked deferred (with intent) or omitted (with rationale) — the divergence is noted but not
85
+ decided, which is the silent drift the ledger exists to prevent.
86
+
87
+ ## Upstream Contract
88
+
89
+ - [ ] 🔴 **Out-of-scope resurrection**: the pitch builds something `docs/product-brief.md`
90
+ permanently excludes, with no recorded decision reversing that boundary.
91
+ - [ ] 🔴 **Constraint breach**: the pitched solution violates a binding constraint from
92
+ `docs/architecture/index.md` or `docs/design-system.md` — a budget, a data rule, a platform commitment.
93
+ - [ ] 🟡 **Unacknowledged dependency**: the pitch assumes a capability (a service, an
94
+ integration, a data source) that no upstream doc records as existing or planned.