groundwork-method 0.0.1 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (629) hide show
  1. package/CHANGELOG.md +781 -0
  2. package/LICENSE +21 -0
  3. package/README.md +44 -29
  4. package/bin/groundwork.js +1654 -0
  5. package/dist/src/generators/add-capability/generator.d.ts +8 -0
  6. package/dist/src/generators/add-capability/generator.js +60 -0
  7. package/dist/src/generators/add-capability/generator.js.map +1 -0
  8. package/dist/src/generators/cli-app/generator.d.ts +9 -0
  9. package/dist/src/generators/cli-app/generator.js +140 -0
  10. package/dist/src/generators/cli-app/generator.js.map +1 -0
  11. package/dist/src/generators/docs-site/generator.d.ts +5 -0
  12. package/dist/src/generators/docs-site/generator.js +441 -0
  13. package/dist/src/generators/docs-site/generator.js.map +1 -0
  14. package/dist/src/generators/electron-app/generator.d.ts +6 -0
  15. package/dist/src/generators/electron-app/generator.js +261 -0
  16. package/dist/src/generators/electron-app/generator.js.map +1 -0
  17. package/dist/src/generators/flutter-app/generator.d.ts +6 -0
  18. package/dist/src/generators/flutter-app/generator.js +314 -0
  19. package/dist/src/generators/flutter-app/generator.js.map +1 -0
  20. package/dist/src/generators/go-microservice/generator.d.ts +8 -0
  21. package/dist/src/generators/go-microservice/generator.js +232 -0
  22. package/dist/src/generators/go-microservice/generator.js.map +1 -0
  23. package/dist/src/generators/nextjs-app/generator.d.ts +8 -0
  24. package/dist/src/generators/nextjs-app/generator.js +294 -0
  25. package/dist/src/generators/nextjs-app/generator.js.map +1 -0
  26. package/dist/src/generators/python-microservice/generator.d.ts +13 -0
  27. package/dist/src/generators/python-microservice/generator.js +265 -0
  28. package/dist/src/generators/python-microservice/generator.js.map +1 -0
  29. package/dist/src/generators/shared/brand-tokens.d.ts +89 -0
  30. package/dist/src/generators/shared/brand-tokens.js +308 -0
  31. package/dist/src/generators/shared/brand-tokens.js.map +1 -0
  32. package/dist/src/generators/shared/capabilities.d.ts +101 -0
  33. package/dist/src/generators/shared/capabilities.js +279 -0
  34. package/dist/src/generators/shared/capabilities.js.map +1 -0
  35. package/dist/src/generators/shared/provenance.d.ts +2 -0
  36. package/dist/src/generators/shared/provenance.js +85 -0
  37. package/dist/src/generators/shared/provenance.js.map +1 -0
  38. package/dist/src/generators/shared/scaffold-helpers.d.ts +72 -0
  39. package/dist/src/generators/shared/scaffold-helpers.js +309 -0
  40. package/dist/src/generators/shared/scaffold-helpers.js.map +1 -0
  41. package/dist/src/generators/system-test-runner/generator.d.ts +23 -0
  42. package/dist/src/generators/system-test-runner/generator.js +125 -0
  43. package/dist/src/generators/system-test-runner/generator.js.map +1 -0
  44. package/dist/src/generators/workspace-dev-cli/generator.d.ts +7 -0
  45. package/dist/src/generators/workspace-dev-cli/generator.js +138 -0
  46. package/dist/src/generators/workspace-dev-cli/generator.js.map +1 -0
  47. package/generators.json +57 -0
  48. package/lib/repo-map/grammars/tree-sitter-c.wasm +0 -0
  49. package/lib/repo-map/grammars/tree-sitter-cpp.wasm +0 -0
  50. package/lib/repo-map/grammars/tree-sitter-csharp.wasm +0 -0
  51. package/lib/repo-map/grammars/tree-sitter-dart.wasm +0 -0
  52. package/lib/repo-map/grammars/tree-sitter-go.wasm +0 -0
  53. package/lib/repo-map/grammars/tree-sitter-java.wasm +0 -0
  54. package/lib/repo-map/grammars/tree-sitter-javascript.wasm +0 -0
  55. package/lib/repo-map/grammars/tree-sitter-kotlin.wasm +0 -0
  56. package/lib/repo-map/grammars/tree-sitter-lua.wasm +0 -0
  57. package/lib/repo-map/grammars/tree-sitter-php.wasm +0 -0
  58. package/lib/repo-map/grammars/tree-sitter-python.wasm +0 -0
  59. package/lib/repo-map/grammars/tree-sitter-ruby.wasm +0 -0
  60. package/lib/repo-map/grammars/tree-sitter-rust.wasm +0 -0
  61. package/lib/repo-map/grammars/tree-sitter-scala.wasm +0 -0
  62. package/lib/repo-map/grammars/tree-sitter-swift.wasm +0 -0
  63. package/lib/repo-map/grammars/tree-sitter-tsx.wasm +0 -0
  64. package/lib/repo-map/grammars/tree-sitter-typescript.wasm +0 -0
  65. package/lib/repo-map/index.js +386 -0
  66. package/lib/repo-map/languages.js +514 -0
  67. package/lib/repo-map/pagerank.js +59 -0
  68. package/migrations/README.md +60 -0
  69. package/migrations/_template/cli-migration.js +27 -0
  70. package/migrations/gw-bet-prose-redesign.js +105 -0
  71. package/migrations/gw-drop-test-manifest.js +37 -0
  72. package/migrations/gw-register-serena-mcp.js +42 -0
  73. package/migrations/gw-relocate-hidden-skills.js +40 -0
  74. package/migrations/gw-seed-config-toml.js +24 -0
  75. package/migrations/index.json +40 -0
  76. package/package.json +70 -6
  77. package/src/AGENTS.md +36 -0
  78. package/src/config/config.toml +30 -0
  79. package/src/config/groundwork-state.json +5 -0
  80. package/src/docs/llms.txt +72 -0
  81. package/src/docs/principles/ai-native/agent-native-systems.md +90 -0
  82. package/src/docs/principles/ai-native/agentic-systems.md +78 -0
  83. package/src/docs/principles/ai-native/ai-engineering.md +100 -0
  84. package/src/docs/principles/ai-native/ai-native-product.md +76 -0
  85. package/src/docs/principles/delivery/cost-engineering.md +89 -0
  86. package/src/docs/principles/delivery/day-2-operational-baseline.md +57 -0
  87. package/src/docs/principles/delivery/devex.md +88 -0
  88. package/src/docs/principles/delivery/platform.md +101 -0
  89. package/src/docs/principles/delivery/progressive-delivery.md +92 -0
  90. package/src/docs/principles/design/ai-native-design.md +73 -0
  91. package/src/docs/principles/design/design-foundations.md +80 -0
  92. package/src/docs/principles/design/design-systems-and-tokens.md +72 -0
  93. package/src/docs/principles/design/interaction-and-motion.md +69 -0
  94. package/src/docs/principles/design/layout-and-space.md +72 -0
  95. package/src/docs/principles/design/usability-and-ux.md +68 -0
  96. package/src/docs/principles/design/visual-design.md +84 -0
  97. package/src/docs/principles/foundations/code-craft.md +86 -0
  98. package/src/docs/principles/foundations/continuous-discovery.md +75 -0
  99. package/src/docs/principles/foundations/documentation.md +102 -0
  100. package/src/docs/principles/foundations/prioritization-and-appetite.md +78 -0
  101. package/src/docs/principles/foundations/product-engineering.md +90 -0
  102. package/src/docs/principles/foundations/product-risks.md +89 -0
  103. package/src/docs/principles/foundations/requirements-and-specs.md +80 -0
  104. package/src/docs/principles/foundations/success-metrics.md +66 -0
  105. package/src/docs/principles/foundations/testing.md +82 -0
  106. package/src/docs/principles/index.md +23 -0
  107. package/src/docs/principles/quality/accessibility.md +88 -0
  108. package/src/docs/principles/quality/observability.md +84 -0
  109. package/src/docs/principles/quality/performance.md +84 -0
  110. package/src/docs/principles/quality/privacy.md +92 -0
  111. package/src/docs/principles/quality/reliability.md +89 -0
  112. package/src/docs/principles/quality/security.md +78 -0
  113. package/src/docs/principles/stack/postgres.md +100 -0
  114. package/src/docs/principles/system-design/api-design.md +86 -0
  115. package/src/docs/principles/system-design/architecture-decisions.md +81 -0
  116. package/src/docs/principles/system-design/code-structure.md +104 -0
  117. package/src/docs/principles/system-design/data-engineering.md +87 -0
  118. package/src/docs/principles/system-design/durable-execution.md +89 -0
  119. package/src/docs/principles/system-design/evolutionary-architecture.md +81 -0
  120. package/src/docs/principles/system-design/identity-and-access.md +76 -0
  121. package/src/docs/principles/system-design/integration-patterns.md +84 -0
  122. package/src/docs/principles/system-design/real-time.md +83 -0
  123. package/src/docs/principles/system-design/surface-architecture.md +74 -0
  124. package/src/docs/ways-of-working/documentation.md +69 -0
  125. package/src/docs/ways-of-working/how-we-work.md +76 -0
  126. package/src/docs/ways-of-working/units-of-work.md +40 -0
  127. package/src/engineer-skills/groundwork-electron-engineer/SKILL.md +118 -0
  128. package/src/engineer-skills/groundwork-electron-engineer/references/ipc-contracts.md +138 -0
  129. package/src/engineer-skills/groundwork-electron-engineer/references/packaging-and-updates.md +82 -0
  130. package/src/engineer-skills/groundwork-electron-engineer/references/process-model.md +94 -0
  131. package/src/engineer-skills/groundwork-electron-engineer/references/security.md +107 -0
  132. package/src/engineer-skills/groundwork-electron-engineer/references/testing-and-smoke.md +107 -0
  133. package/src/engineer-skills/groundwork-electron-engineer/references/theming-and-tokens.md +74 -0
  134. package/src/engineer-skills/groundwork-electron-engineer/sync-anchor.md +14 -0
  135. package/src/engineer-skills/groundwork-flutter-engineer/SKILL.md +108 -0
  136. package/src/engineer-skills/groundwork-flutter-engineer/references/accessibility.md +92 -0
  137. package/src/engineer-skills/groundwork-flutter-engineer/references/architecture.md +189 -0
  138. package/src/engineer-skills/groundwork-flutter-engineer/references/data-and-contracts.md +136 -0
  139. package/src/engineer-skills/groundwork-flutter-engineer/references/navigation.md +122 -0
  140. package/src/engineer-skills/groundwork-flutter-engineer/references/platform-channels.md +93 -0
  141. package/src/engineer-skills/groundwork-flutter-engineer/references/releases-and-distribution.md +84 -0
  142. package/src/engineer-skills/groundwork-flutter-engineer/references/state-management.md +166 -0
  143. package/src/engineer-skills/groundwork-flutter-engineer/references/testing.md +135 -0
  144. package/src/engineer-skills/groundwork-flutter-engineer/references/theming-and-design-tokens.md +109 -0
  145. package/src/engineer-skills/groundwork-flutter-engineer/references/widgets-and-composition.md +123 -0
  146. package/src/engineer-skills/groundwork-flutter-engineer/sync-anchor.md +15 -0
  147. package/src/engineer-skills/groundwork-go-engineer/SKILL.md +171 -0
  148. package/src/engineer-skills/groundwork-go-engineer/references/api-design.md +82 -0
  149. package/src/engineer-skills/groundwork-go-engineer/references/architecture.md +42 -0
  150. package/src/engineer-skills/groundwork-go-engineer/references/capability-ports.md +50 -0
  151. package/src/engineer-skills/groundwork-go-engineer/references/code-craft-security.md +34 -0
  152. package/src/engineer-skills/groundwork-go-engineer/references/concurrency.md +108 -0
  153. package/src/engineer-skills/groundwork-go-engineer/references/go-services.md +77 -0
  154. package/src/engineer-skills/groundwork-go-engineer/references/http-handlers.md +172 -0
  155. package/src/engineer-skills/groundwork-go-engineer/references/implementation-patterns.md +156 -0
  156. package/src/engineer-skills/groundwork-go-engineer/references/integration-realtime-data.md +57 -0
  157. package/src/engineer-skills/groundwork-go-engineer/references/observability.md +49 -0
  158. package/src/engineer-skills/groundwork-go-engineer/references/postgres.md +41 -0
  159. package/src/engineer-skills/groundwork-go-engineer/references/reliability-performance.md +105 -0
  160. package/src/engineer-skills/groundwork-go-engineer/references/testing.md +139 -0
  161. package/src/engineer-skills/groundwork-go-engineer/sync-anchor.md +11 -0
  162. package/src/engineer-skills/groundwork-nextjs-engineer/SKILL.md +107 -0
  163. package/src/engineer-skills/groundwork-nextjs-engineer/references/architecture.md +323 -0
  164. package/src/engineer-skills/groundwork-nextjs-engineer/references/data-fetching.md +458 -0
  165. package/src/engineer-skills/groundwork-nextjs-engineer/references/documentation.md +324 -0
  166. package/src/engineer-skills/groundwork-nextjs-engineer/references/error-boundaries.md +383 -0
  167. package/src/engineer-skills/groundwork-nextjs-engineer/references/mutations-and-forms.md +396 -0
  168. package/src/engineer-skills/groundwork-nextjs-engineer/references/performance-and-deployment.md +947 -0
  169. package/src/engineer-skills/groundwork-nextjs-engineer/references/routing-and-navigation.md +405 -0
  170. package/src/engineer-skills/groundwork-nextjs-engineer/references/server-components.md +394 -0
  171. package/src/engineer-skills/groundwork-nextjs-engineer/references/tailwind-and-styling.md +134 -0
  172. package/src/engineer-skills/groundwork-nextjs-engineer/references/testing.md +433 -0
  173. package/src/engineer-skills/groundwork-nextjs-engineer/references/type-system.md +368 -0
  174. package/src/engineer-skills/groundwork-nextjs-engineer/references/ux-principles.md +278 -0
  175. package/src/engineer-skills/groundwork-nextjs-engineer/references/visual-language.md +69 -0
  176. package/src/engineer-skills/groundwork-nextjs-engineer/sync-anchor.md +9 -0
  177. package/src/engineer-skills/groundwork-python-engineer/SKILL.md +196 -0
  178. package/src/engineer-skills/groundwork-python-engineer/references/api-standards.md +88 -0
  179. package/src/engineer-skills/groundwork-python-engineer/references/architecture.md +57 -0
  180. package/src/engineer-skills/groundwork-python-engineer/references/async-patterns.md +103 -0
  181. package/src/engineer-skills/groundwork-python-engineer/references/capability-ports.md +44 -0
  182. package/src/engineer-skills/groundwork-python-engineer/references/database.md +88 -0
  183. package/src/engineer-skills/groundwork-python-engineer/references/documentation-mcp.md +167 -0
  184. package/src/engineer-skills/groundwork-python-engineer/references/implementation-patterns.md +166 -0
  185. package/src/engineer-skills/groundwork-python-engineer/references/ml-pipelines.md +119 -0
  186. package/src/engineer-skills/groundwork-python-engineer/references/ml-systems-ai-engineering.md +74 -0
  187. package/src/engineer-skills/groundwork-python-engineer/references/observability.md +57 -0
  188. package/src/engineer-skills/groundwork-python-engineer/references/resilience.md +126 -0
  189. package/src/engineer-skills/groundwork-python-engineer/references/testing.md +177 -0
  190. package/src/engineer-skills/groundwork-python-engineer/sync-anchor.md +13 -0
  191. package/src/generators/add-capability/generator.ts +70 -0
  192. package/src/generators/add-capability/schema.json +30 -0
  193. package/src/generators/capabilities/llm/capability.json +28 -0
  194. package/src/generators/capabilities/llm/providers/anthropic/footprint.json +13 -0
  195. package/src/generators/capabilities/llm/providers/anthropic/stacks/go/internal/llm/llm.go.template +102 -0
  196. package/src/generators/capabilities/llm/providers/anthropic/stacks/python/src/__packageName__/adapters/llm.py.template +61 -0
  197. package/src/generators/capabilities/llm/providers/local/footprint.json +13 -0
  198. package/src/generators/capabilities/llm/providers/local/stacks/go/internal/llm/llm.go.template +102 -0
  199. package/src/generators/capabilities/llm/providers/local/stacks/python/src/__packageName__/adapters/llm.py.template +53 -0
  200. package/src/generators/capabilities/llm/providers/localai/footprint.json +29 -0
  201. package/src/generators/capabilities/llm/providers/localai/stacks/go/internal/llm/llm.go.template +102 -0
  202. package/src/generators/capabilities/llm/providers/localai/stacks/python/src/__packageName__/adapters/llm.py.template +53 -0
  203. package/src/generators/capabilities/llm/providers/none/footprint.json +9 -0
  204. package/src/generators/capabilities/llm/providers/none/stacks/go/internal/llm/llm.go.template +35 -0
  205. package/src/generators/capabilities/llm/providers/none/stacks/python/src/__packageName__/adapters/llm.py.template +25 -0
  206. package/src/generators/capabilities/llm/providers/ollama/footprint.json +20 -0
  207. package/src/generators/capabilities/llm/providers/ollama/stacks/go/internal/llm/llm.go.template +102 -0
  208. package/src/generators/capabilities/llm/providers/ollama/stacks/python/src/__packageName__/adapters/llm.py.template +53 -0
  209. package/src/generators/capabilities/llm/providers/openai/footprint.json +13 -0
  210. package/src/generators/capabilities/llm/providers/openai/stacks/go/internal/llm/llm.go.template +98 -0
  211. package/src/generators/capabilities/llm/providers/openai/stacks/python/src/__packageName__/adapters/llm.py.template +60 -0
  212. package/src/generators/capabilities/llm/stacks/go/internal/core/service/llm.go.template +12 -0
  213. package/src/generators/capabilities/llm/stacks/go/internal/llm/llm_test.go.template +33 -0
  214. package/src/generators/capabilities/llm/stacks/python/src/__packageName__/core/llm.py.template +15 -0
  215. package/src/generators/capabilities/llm/stacks/python/tests/contracts/test_llm.py.template +37 -0
  216. package/src/generators/cli-app/files/README.md.template +76 -0
  217. package/src/generators/cli-app/files/build.mjs.template +15 -0
  218. package/src/generators/cli-app/files/package.json.template +21 -0
  219. package/src/generators/cli-app/files/src/cli.ts.template +67 -0
  220. package/src/generators/cli-app/files/src/commands/hello.ts.template +17 -0
  221. package/src/generators/cli-app/files/src/commands/status.ts.template +23 -0
  222. package/src/generators/cli-app/files/src/core/client.test.ts.template +80 -0
  223. package/src/generators/cli-app/files/src/core/client.ts.template +64 -0
  224. package/src/generators/cli-app/files/src/registry.test.ts.template +35 -0
  225. package/src/generators/cli-app/files/src/registry.ts.template +31 -0
  226. package/src/generators/cli-app/files/tsconfig.json.template +16 -0
  227. package/src/generators/cli-app/files/tsconfig.test.json.template +11 -0
  228. package/src/generators/cli-app/generator.ts +138 -0
  229. package/src/generators/cli-app/schema.json +24 -0
  230. package/src/generators/docs-site/files/.gitignore.ejs +40 -0
  231. package/src/generators/docs-site/files/app/docs/__slug__/page.tsx +101 -0
  232. package/src/generators/docs-site/files/app/docs/layout.tsx +14 -0
  233. package/src/generators/docs-site/files/app/docs.css +43 -0
  234. package/src/generators/docs-site/files/app/layout.tsx +24 -0
  235. package/src/generators/docs-site/files/app/page.tsx +135 -0
  236. package/src/generators/docs-site/files/app/source.ts +8 -0
  237. package/src/generators/docs-site/files/components/mermaid.tsx +67 -0
  238. package/src/generators/docs-site/files/next.config.mjs +10 -0
  239. package/src/generators/docs-site/files/package.json +32 -0
  240. package/src/generators/docs-site/files/pnpm-workspace.yaml +7 -0
  241. package/src/generators/docs-site/files/postcss.config.mjs +6 -0
  242. package/src/generators/docs-site/files/source.config.ts +77 -0
  243. package/src/generators/docs-site/files/tailwind.config.js +10 -0
  244. package/src/generators/docs-site/files/tsconfig.json +27 -0
  245. package/src/generators/docs-site/generator.ts +476 -0
  246. package/src/generators/docs-site/schema.json +17 -0
  247. package/src/generators/electron-app/docs/principles/stack/electron/index.md +47 -0
  248. package/src/generators/electron-app/docs/principles/stack/electron/ipc-contracts.md +71 -0
  249. package/src/generators/electron-app/docs/principles/stack/electron/packaging-and-updates.md +59 -0
  250. package/src/generators/electron-app/docs/principles/stack/electron/process-model.md +53 -0
  251. package/src/generators/electron-app/docs/principles/stack/electron/security.md +70 -0
  252. package/src/generators/electron-app/docs/principles/stack/typescript/frontend.md +65 -0
  253. package/src/generators/electron-app/files/.gitignore.template +20 -0
  254. package/src/generators/electron-app/files/README.md.template +125 -0
  255. package/src/generators/electron-app/files/electron.vite.config.ts +31 -0
  256. package/src/generators/electron-app/files/eslint.config.mjs +92 -0
  257. package/src/generators/electron-app/files/forge.config.ts.template +44 -0
  258. package/src/generators/electron-app/files/package.json.template +54 -0
  259. package/src/generators/electron-app/files/playwright.config.ts +18 -0
  260. package/src/generators/electron-app/files/project.json.template +65 -0
  261. package/src/generators/electron-app/files/src/main/core-client.test.ts +81 -0
  262. package/src/generators/electron-app/files/src/main/core-client.ts +55 -0
  263. package/src/generators/electron-app/files/src/main/index.ts +157 -0
  264. package/src/generators/electron-app/files/src/main/ipc.ts +52 -0
  265. package/src/generators/electron-app/files/src/main/policy.test.ts +71 -0
  266. package/src/generators/electron-app/files/src/main/policy.ts +73 -0
  267. package/src/generators/electron-app/files/src/preload/index.ts +23 -0
  268. package/src/generators/electron-app/files/src/renderer/index.html.template +20 -0
  269. package/src/generators/electron-app/files/src/renderer/src/App.test.tsx +61 -0
  270. package/src/generators/electron-app/files/src/renderer/src/App.tsx.template +43 -0
  271. package/src/generators/electron-app/files/src/renderer/src/assets/main.css +40 -0
  272. package/src/generators/electron-app/files/src/renderer/src/env.d.ts +14 -0
  273. package/src/generators/electron-app/files/src/renderer/src/main.tsx +25 -0
  274. package/src/generators/electron-app/files/src/shared/ipc.ts +54 -0
  275. package/src/generators/electron-app/files/tests/smoke/app.spec.ts.template +68 -0
  276. package/src/generators/electron-app/files/tool/electron_exec.sh.template +83 -0
  277. package/src/generators/electron-app/files/tsconfig.json +7 -0
  278. package/src/generators/electron-app/files/tsconfig.node.json +27 -0
  279. package/src/generators/electron-app/files/tsconfig.web.json +22 -0
  280. package/src/generators/electron-app/files/vitest.config.ts +32 -0
  281. package/src/generators/electron-app/files/vitest.setup.ts +1 -0
  282. package/src/generators/electron-app/generator.ts +288 -0
  283. package/src/generators/electron-app/schema.json +23 -0
  284. package/src/generators/flutter-app/docs/principles/stack/flutter/architecture.md +78 -0
  285. package/src/generators/flutter-app/docs/principles/stack/flutter/index.md +38 -0
  286. package/src/generators/flutter-app/docs/principles/stack/flutter/platform-channels.md +51 -0
  287. package/src/generators/flutter-app/docs/principles/stack/flutter/releases-and-distribution.md +59 -0
  288. package/src/generators/flutter-app/docs/principles/stack/flutter/state-management.md +85 -0
  289. package/src/generators/flutter-app/docs/principles/stack/flutter/testing.md +74 -0
  290. package/src/generators/flutter-app/docs/principles/stack/flutter/widgets-and-composition.md +69 -0
  291. package/src/generators/flutter-app/files/.gitignore.template +30 -0
  292. package/src/generators/flutter-app/files/README.md.template +100 -0
  293. package/src/generators/flutter-app/files/analysis_options.yaml.template +18 -0
  294. package/src/generators/flutter-app/files/integration_test/app_test.dart.template +30 -0
  295. package/src/generators/flutter-app/files/lib/app.dart.template +24 -0
  296. package/src/generators/flutter-app/files/lib/config/app_config.dart +15 -0
  297. package/src/generators/flutter-app/files/lib/data/repositories/status_repository.dart +36 -0
  298. package/src/generators/flutter-app/files/lib/data/services/api_client.dart +71 -0
  299. package/src/generators/flutter-app/files/lib/domain/models/health_status.dart +23 -0
  300. package/src/generators/flutter-app/files/lib/main.dart +11 -0
  301. package/src/generators/flutter-app/files/lib/router.dart +23 -0
  302. package/src/generators/flutter-app/files/lib/ui/core/theme/app_theme.dart +110 -0
  303. package/src/generators/flutter-app/files/lib/ui/home/home_view.dart +89 -0
  304. package/src/generators/flutter-app/files/lib/ui/home/home_view_model.dart.template +38 -0
  305. package/src/generators/flutter-app/files/project.json.template +51 -0
  306. package/src/generators/flutter-app/files/pubspec.yaml.template +47 -0
  307. package/src/generators/flutter-app/files/test/api_client_test.dart.template +63 -0
  308. package/src/generators/flutter-app/files/test/fakes/fake_status_repository.dart.template +19 -0
  309. package/src/generators/flutter-app/files/test/home_view_test.dart.template +58 -0
  310. package/src/generators/flutter-app/files/tool/flutter_exec.sh.template +60 -0
  311. package/src/generators/flutter-app/generator.ts +362 -0
  312. package/src/generators/flutter-app/schema.json +23 -0
  313. package/src/generators/go-microservice/docs/principles/stack/go/concurrency.md +123 -0
  314. package/src/generators/go-microservice/docs/principles/stack/go/index.md +70 -0
  315. package/src/generators/go-microservice/docs/principles/stack/go/testing.md +152 -0
  316. package/src/generators/go-microservice/files/.air.toml.template +38 -0
  317. package/src/generators/go-microservice/files/.env.template +4 -0
  318. package/src/generators/go-microservice/files/.golangci.yml.template +82 -0
  319. package/src/generators/go-microservice/files/Dockerfile.dev.template +12 -0
  320. package/src/generators/go-microservice/files/asyncapi-pubsub.yaml.template +33 -0
  321. package/src/generators/go-microservice/files/asyncapi-ws.yaml.template +34 -0
  322. package/src/generators/go-microservice/files/cmd/api/main.go.template +149 -0
  323. package/src/generators/go-microservice/files/cmd/api/main_test.go.template +99 -0
  324. package/src/generators/go-microservice/files/cmd/worker/cleanup/main.go.template +39 -0
  325. package/src/generators/go-microservice/files/db/schema.sql.template +24 -0
  326. package/src/generators/go-microservice/files/go.mod.template +39 -0
  327. package/src/generators/go-microservice/files/internal/config/config.go.template +52 -0
  328. package/src/generators/go-microservice/files/internal/config/otel.go.template +93 -0
  329. package/src/generators/go-microservice/files/internal/core/domain/errors.go.template +16 -0
  330. package/src/generators/go-microservice/files/internal/core/domain/model.go.template +28 -0
  331. package/src/generators/go-microservice/files/internal/core/domain/user.go.template +13 -0
  332. package/src/generators/go-microservice/files/internal/core/pagination.go.template +16 -0
  333. package/src/generators/go-microservice/files/internal/core/service/app_service.go.template +79 -0
  334. package/src/generators/go-microservice/files/internal/core/service/event_hub.go.template +9 -0
  335. package/src/generators/go-microservice/files/internal/core/service/message_queue.go.template +10 -0
  336. package/src/generators/go-microservice/files/internal/core/service/outbox_repository.go.template +31 -0
  337. package/src/generators/go-microservice/files/internal/core/service/repository.go.template +23 -0
  338. package/src/generators/go-microservice/files/internal/core/service/user_repository.go.template +15 -0
  339. package/src/generators/go-microservice/files/internal/core/service/user_service.go.template +43 -0
  340. package/src/generators/go-microservice/files/internal/entrypoints/api/app_handler.go.template +108 -0
  341. package/src/generators/go-microservice/files/internal/entrypoints/api/auth_middleware_test.go.template +52 -0
  342. package/src/generators/go-microservice/files/internal/entrypoints/api/clerk_webhook.go.template +202 -0
  343. package/src/generators/go-microservice/files/internal/entrypoints/api/clerk_webhook_test.go.template +82 -0
  344. package/src/generators/go-microservice/files/internal/entrypoints/api/health_handler.go.template +80 -0
  345. package/src/generators/go-microservice/files/internal/entrypoints/api/idempotency/middleware.go.template +87 -0
  346. package/src/generators/go-microservice/files/internal/entrypoints/api/idempotency/middleware_test.go.template +76 -0
  347. package/src/generators/go-microservice/files/internal/entrypoints/api/idempotency/repository.go.template +37 -0
  348. package/src/generators/go-microservice/files/internal/entrypoints/api/middleware_auth.go.template +40 -0
  349. package/src/generators/go-microservice/files/internal/entrypoints/api/middleware_loadshed.go.template +38 -0
  350. package/src/generators/go-microservice/files/internal/entrypoints/api/middleware_logging.go.template +40 -0
  351. package/src/generators/go-microservice/files/internal/entrypoints/api/middleware_ratelimit.go.template +48 -0
  352. package/src/generators/go-microservice/files/internal/entrypoints/api/middleware_test.go.template +81 -0
  353. package/src/generators/go-microservice/files/internal/entrypoints/api/router.go.template +105 -0
  354. package/src/generators/go-microservice/files/internal/entrypoints/api/types.go.template +70 -0
  355. package/src/generators/go-microservice/files/internal/entrypoints/api/websocket_handler.go.template +39 -0
  356. package/src/generators/go-microservice/files/internal/httpclient/http_client.go.template +87 -0
  357. package/src/generators/go-microservice/files/internal/kafka/kafka.go.template +34 -0
  358. package/src/generators/go-microservice/files/internal/postgres/postgres.go.template +195 -0
  359. package/src/generators/go-microservice/files/internal/postgres/postgres_test.go.template +156 -0
  360. package/src/generators/go-microservice/files/internal/postgres/user_repository.go.template +56 -0
  361. package/src/generators/go-microservice/files/internal/pubsub/gcp_pubsub.go.template +35 -0
  362. package/src/generators/go-microservice/files/internal/websocket/client.go.template +151 -0
  363. package/src/generators/go-microservice/files/internal/websocket/hub.go.template +261 -0
  364. package/src/generators/go-microservice/files/scripts/apply-schema.sh.template +21 -0
  365. package/src/generators/go-microservice/files/tools/tools.go.template +10 -0
  366. package/src/generators/go-microservice/generator.ts +240 -0
  367. package/src/generators/go-microservice/schema.json +63 -0
  368. package/src/generators/nextjs-app/docs/principles/stack/typescript/frontend.md +65 -0
  369. package/src/generators/nextjs-app/files/.dockerignore.template +7 -0
  370. package/src/generators/nextjs-app/files/.env.example.template +24 -0
  371. package/src/generators/nextjs-app/files/.gitignore.template +5 -0
  372. package/src/generators/nextjs-app/files/Dockerfile +53 -0
  373. package/src/generators/nextjs-app/files/app/(auth)/sign-in/__sign-in__/page.tsx.template +9 -0
  374. package/src/generators/nextjs-app/files/app/(auth)/sign-up/__sign-up__/page.tsx.template +9 -0
  375. package/src/generators/nextjs-app/files/app/api/config/route.ts.template +39 -0
  376. package/src/generators/nextjs-app/files/app/api/healthz/route.test.ts +15 -0
  377. package/src/generators/nextjs-app/files/app/api/healthz/route.ts +5 -0
  378. package/src/generators/nextjs-app/files/app/api/proxy/__path__/route.test.ts.template +55 -0
  379. package/src/generators/nextjs-app/files/app/api/proxy/__path__/route.ts.template +126 -0
  380. package/src/generators/nextjs-app/files/app/error.tsx +39 -0
  381. package/src/generators/nextjs-app/files/app/global-error.tsx +68 -0
  382. package/src/generators/nextjs-app/files/app/globals.css +105 -0
  383. package/src/generators/nextjs-app/files/app/layout.tsx +59 -0
  384. package/src/generators/nextjs-app/files/app/loading.tsx +13 -0
  385. package/src/generators/nextjs-app/files/app/not-found.tsx +30 -0
  386. package/src/generators/nextjs-app/files/app/page.tsx +20 -0
  387. package/src/generators/nextjs-app/files/components/providers/default.tsx +19 -0
  388. package/src/generators/nextjs-app/files/components/providers/production.tsx +32 -0
  389. package/src/generators/nextjs-app/files/components/providers/telemetry.tsx +76 -0
  390. package/src/generators/nextjs-app/files/components/render-smoke.test.tsx +29 -0
  391. package/src/generators/nextjs-app/files/components/theme-provider.tsx +11 -0
  392. package/src/generators/nextjs-app/files/components.json +21 -0
  393. package/src/generators/nextjs-app/files/eslint.config.mjs +120 -0
  394. package/src/generators/nextjs-app/files/hooks/use-toast.ts +7 -0
  395. package/src/generators/nextjs-app/files/instrumentation.ts +90 -0
  396. package/src/generators/nextjs-app/files/lib/api/fetcher.ts.template +130 -0
  397. package/src/generators/nextjs-app/files/lib/config.ts +21 -0
  398. package/src/generators/nextjs-app/files/lib/logger.ts +29 -0
  399. package/src/generators/nextjs-app/files/lib/schemas/index.ts +19 -0
  400. package/src/generators/nextjs-app/files/lib/utils.ts +6 -0
  401. package/src/generators/nextjs-app/files/next.config.mjs +9 -0
  402. package/src/generators/nextjs-app/files/package.json +70 -0
  403. package/src/generators/nextjs-app/files/postcss.config.mjs +8 -0
  404. package/src/generators/nextjs-app/files/proxy.test.ts.template +30 -0
  405. package/src/generators/nextjs-app/files/proxy.ts +31 -0
  406. package/src/generators/nextjs-app/files/public/.gitkeep +1 -0
  407. package/src/generators/nextjs-app/files/tsconfig.json +42 -0
  408. package/src/generators/nextjs-app/files/vitest.config.mts +15 -0
  409. package/src/generators/nextjs-app/files/vitest.setup.ts +7 -0
  410. package/src/generators/nextjs-app/generator.ts +307 -0
  411. package/src/generators/nextjs-app/schema.json +44 -0
  412. package/src/generators/python-microservice/docs/principles/stack/python/async.md +168 -0
  413. package/src/generators/python-microservice/docs/principles/stack/python/documentation.md +240 -0
  414. package/src/generators/python-microservice/docs/principles/stack/python/mcp.md +147 -0
  415. package/src/generators/python-microservice/docs/principles/stack/python/resilience.md +193 -0
  416. package/src/generators/python-microservice/docs/principles/stack/python/testing.md +281 -0
  417. package/src/generators/python-microservice/files/.env.example.template +30 -0
  418. package/src/generators/python-microservice/files/Dockerfile.template +36 -0
  419. package/src/generators/python-microservice/files/db/schema.sql.template +19 -0
  420. package/src/generators/python-microservice/files/pyproject.toml.template +76 -0
  421. package/src/generators/python-microservice/files/scripts/apply-schema.sh.template +25 -0
  422. package/src/generators/python-microservice/files/src/__packageName__/adapters/comfyui.py.template +87 -0
  423. package/src/generators/python-microservice/files/src/__packageName__/adapters/config.py.template +48 -0
  424. package/src/generators/python-microservice/files/src/__packageName__/adapters/database.py.template +21 -0
  425. package/src/generators/python-microservice/files/src/__packageName__/adapters/message_queue.py.template +29 -0
  426. package/src/generators/python-microservice/files/src/__packageName__/adapters/repository.py.template +130 -0
  427. package/src/generators/python-microservice/files/src/__packageName__/adapters/telemetry.py.template +68 -0
  428. package/src/generators/python-microservice/files/src/__packageName__/adapters/websocket_hub.py.template +36 -0
  429. package/src/generators/python-microservice/files/src/__packageName__/core/domain/entities.py.template +22 -0
  430. package/src/generators/python-microservice/files/src/__packageName__/core/domain/exceptions.py.template +43 -0
  431. package/src/generators/python-microservice/files/src/__packageName__/core/ports.py.template +42 -0
  432. package/src/generators/python-microservice/files/src/__packageName__/core/service/example_service.py.template +68 -0
  433. package/src/generators/python-microservice/files/src/__packageName__/entrypoints/api/dependencies.py.template +50 -0
  434. package/src/generators/python-microservice/files/src/__packageName__/entrypoints/api/middleware.py.template +131 -0
  435. package/src/generators/python-microservice/files/src/__packageName__/entrypoints/api/router.py.template +37 -0
  436. package/src/generators/python-microservice/files/src/__packageName__/entrypoints/api/websocket_handler.py.template +20 -0
  437. package/src/generators/python-microservice/files/src/__packageName__/entrypoints/worker/cleanup.py.template +35 -0
  438. package/src/generators/python-microservice/files/src/__packageName__/entrypoints/worker/worker.py.template +28 -0
  439. package/src/generators/python-microservice/files/src/__packageName__/main.py.template +108 -0
  440. package/src/generators/python-microservice/files/tests/test_main.py.template +74 -0
  441. package/src/generators/python-microservice/files/tests/test_middleware.py.template +109 -0
  442. package/src/generators/python-microservice/files/tests/test_worker.py.template +16 -0
  443. package/src/generators/python-microservice/generator.ts +286 -0
  444. package/src/generators/python-microservice/schema.json +86 -0
  445. package/src/generators/shared/brand-tokens.ts +301 -0
  446. package/src/generators/shared/capabilities.ts +349 -0
  447. package/src/generators/shared/provenance.ts +61 -0
  448. package/src/generators/shared/scaffold-helpers.ts +309 -0
  449. package/src/generators/system-test-runner/files/tests/bets/.gitkeep +0 -0
  450. package/src/generators/system-test-runner/files/tests/bets/_archive/.gitkeep +0 -0
  451. package/src/generators/system-test-runner/files/tests/conftest.py.template +503 -0
  452. package/src/generators/system-test-runner/files/tests/pyproject.toml.template +20 -0
  453. package/src/generators/system-test-runner/files/tests/system/pages/__init__.py.template +9 -0
  454. package/src/generators/system-test-runner/files/tests/system/pages/base_page.py.template +36 -0
  455. package/src/generators/system-test-runner/files/tests/system/test_a11y_smoke.py.template +132 -0
  456. package/src/generators/system-test-runner/files/tests/system/test_contract_conformance.py.template +140 -0
  457. package/src/generators/system-test-runner/files/tests/system/test_layout_geometry.py.template +109 -0
  458. package/src/generators/system-test-runner/files/tests/system/test_render_smoke.py.template +227 -0
  459. package/src/generators/system-test-runner/files/tests/system/test_system.py.template +158 -0
  460. package/src/generators/system-test-runner/files/tests/system/test_token_conformance.py.template +206 -0
  461. package/src/generators/system-test-runner/files/tests/system/test_visual_regression.py.template +104 -0
  462. package/src/generators/system-test-runner/generator.ts +142 -0
  463. package/src/generators/system-test-runner/schema.json +24 -0
  464. package/src/generators/workspace-dev-cli/cli-src/build.mjs +42 -0
  465. package/src/generators/workspace-dev-cli/cli-src/dist/dev-bundle.js +2168 -0
  466. package/src/generators/workspace-dev-cli/cli-src/src/commands/bet.ts +442 -0
  467. package/src/generators/workspace-dev-cli/cli-src/src/commands/completion.ts +87 -0
  468. package/src/generators/workspace-dev-cli/cli-src/src/commands/doctor.ts +139 -0
  469. package/src/generators/workspace-dev-cli/cli-src/src/commands/lifecycle.ts +548 -0
  470. package/src/generators/workspace-dev-cli/cli-src/src/commands/quality.ts +127 -0
  471. package/src/generators/workspace-dev-cli/cli-src/src/commands/surface.ts +214 -0
  472. package/src/generators/workspace-dev-cli/cli-src/src/index.ts +127 -0
  473. package/src/generators/workspace-dev-cli/cli-src/src/registry.ts +194 -0
  474. package/src/generators/workspace-dev-cli/cli-src/src/theme/color.ts +130 -0
  475. package/src/generators/workspace-dev-cli/cli-src/src/theme/render.ts +158 -0
  476. package/src/generators/workspace-dev-cli/cli-src/src/theme/tokens.ts +122 -0
  477. package/src/generators/workspace-dev-cli/cli-src/src/util/context.ts +43 -0
  478. package/src/generators/workspace-dev-cli/cli-src/src/util/extensions.ts +99 -0
  479. package/src/generators/workspace-dev-cli/cli-src/src/util/paths.ts +46 -0
  480. package/src/generators/workspace-dev-cli/cli-src/src/util/proc.ts +106 -0
  481. package/src/generators/workspace-dev-cli/cli-src/src/util/prompt.ts +108 -0
  482. package/src/generators/workspace-dev-cli/cli-src/src/util/runners.ts +70 -0
  483. package/src/generators/workspace-dev-cli/cli-src/src/util/services.ts +221 -0
  484. package/src/generators/workspace-dev-cli/cli-src/src/util/version.ts +21 -0
  485. package/src/generators/workspace-dev-cli/cli-src/tsconfig.json +16 -0
  486. package/src/generators/workspace-dev-cli/files/.agents/skills/workspace-cli/SKILL.md.template +74 -0
  487. package/src/generators/workspace-dev-cli/files/dev.template +16 -0
  488. package/src/generators/workspace-dev-cli/files/docker-compose.yml.template +20 -0
  489. package/src/generators/workspace-dev-cli/files/scripts/cli/templates/milestone-test.pytmpl.template +46 -0
  490. package/src/generators/workspace-dev-cli/files/scripts/cli/templates/slice-test.pytmpl.template +38 -0
  491. package/src/generators/workspace-dev-cli/generator.ts +136 -0
  492. package/src/generators/workspace-dev-cli/schema.json +22 -0
  493. package/src/hidden-skills/code-intelligence.md +129 -0
  494. package/src/hidden-skills/groundwork-architect/SKILL.md +114 -0
  495. package/src/hidden-skills/groundwork-architect/references/agentic-systems.md +44 -0
  496. package/src/hidden-skills/groundwork-architect/references/ai-native-architecture.md +37 -0
  497. package/src/hidden-skills/groundwork-architect/references/api-and-contracts.md +45 -0
  498. package/src/hidden-skills/groundwork-architect/references/core-and-boundaries.md +45 -0
  499. package/src/hidden-skills/groundwork-architect/references/data-architecture.md +33 -0
  500. package/src/hidden-skills/groundwork-architect/references/decision-records.md +34 -0
  501. package/src/hidden-skills/groundwork-architect/references/durable-execution.md +45 -0
  502. package/src/hidden-skills/groundwork-architect/references/evolutionary-architecture.md +37 -0
  503. package/src/hidden-skills/groundwork-architect/references/identity-and-access.md +41 -0
  504. package/src/hidden-skills/groundwork-architect/references/integration-patterns.md +39 -0
  505. package/src/hidden-skills/groundwork-architect/references/observability.md +36 -0
  506. package/src/hidden-skills/groundwork-architect/references/performance-and-scale.md +41 -0
  507. package/src/hidden-skills/groundwork-architect/references/platform-and-delivery.md +47 -0
  508. package/src/hidden-skills/groundwork-architect/references/realtime-and-async.md +28 -0
  509. package/src/hidden-skills/groundwork-architect/references/reliability.md +31 -0
  510. package/src/hidden-skills/groundwork-architect/references/security-and-trust.md +47 -0
  511. package/src/hidden-skills/groundwork-architect/references/surface-architecture.md +40 -0
  512. package/src/hidden-skills/groundwork-architect/sync-anchor.md +34 -0
  513. package/src/hidden-skills/groundwork-architecture/architecture-template.md +50 -0
  514. package/src/hidden-skills/groundwork-architecture/instructions.md +139 -0
  515. package/src/hidden-skills/groundwork-architecture/phases/01-context-ingestion.md +18 -0
  516. package/src/hidden-skills/groundwork-architecture/phases/02-technical-constraints.md +27 -0
  517. package/src/hidden-skills/groundwork-architecture/phases/03-service-design.md +19 -0
  518. package/src/hidden-skills/groundwork-architecture/phases/04-data-flow-communication.md +23 -0
  519. package/src/hidden-skills/groundwork-architecture/phases/05-component-boundaries-contracts.md +17 -0
  520. package/src/hidden-skills/groundwork-architecture/phases/06-draft-review-present.md +38 -0
  521. package/src/hidden-skills/groundwork-architecture/phases/07-commit.md +33 -0
  522. package/src/hidden-skills/groundwork-architecture/templates/architecture-cache.md +43 -0
  523. package/src/hidden-skills/groundwork-architecture-extract/instructions.md +163 -0
  524. package/src/hidden-skills/groundwork-architecture-extract/templates/architecture-extract-cache.md +21 -0
  525. package/src/hidden-skills/groundwork-bet/briefs/slice-worker.md +191 -0
  526. package/src/hidden-skills/groundwork-bet/instructions.md +88 -0
  527. package/src/hidden-skills/groundwork-bet/templates/bet-progress-test.md +126 -0
  528. package/src/hidden-skills/groundwork-bet/templates/change-proposal.md +38 -0
  529. package/src/hidden-skills/groundwork-bet/templates/decomposition/meta.json +4 -0
  530. package/src/hidden-skills/groundwork-bet/templates/decomposition/milestone-index.md +35 -0
  531. package/src/hidden-skills/groundwork-bet/templates/decomposition/slice.md +35 -0
  532. package/src/hidden-skills/groundwork-bet/templates/pitch.md +45 -0
  533. package/src/hidden-skills/groundwork-bet/templates/technical-design/01-ui-design.md +51 -0
  534. package/src/hidden-skills/groundwork-bet/templates/technical-design/02-data-flows.md +36 -0
  535. package/src/hidden-skills/groundwork-bet/templates/technical-design/03-api-design.md +90 -0
  536. package/src/hidden-skills/groundwork-bet/templates/technical-design/04-data-design.md +29 -0
  537. package/src/hidden-skills/groundwork-bet/workflows/01-discovery.md +198 -0
  538. package/src/hidden-skills/groundwork-bet/workflows/02-design.md +168 -0
  539. package/src/hidden-skills/groundwork-bet/workflows/03-decomposition.md +246 -0
  540. package/src/hidden-skills/groundwork-bet/workflows/04-delivery.md +193 -0
  541. package/src/hidden-skills/groundwork-bet/workflows/05-validation.md +199 -0
  542. package/src/hidden-skills/groundwork-design-system/instructions.md +125 -0
  543. package/src/hidden-skills/groundwork-design-system/templates/brand-tokens.md +182 -0
  544. package/src/hidden-skills/groundwork-design-system/templates/design-system-cache.md +64 -0
  545. package/src/hidden-skills/groundwork-design-system/tracks/_foundation.md +136 -0
  546. package/src/hidden-skills/groundwork-design-system/tracks/agentic-protocol.md +269 -0
  547. package/src/hidden-skills/groundwork-design-system/tracks/cli.md +355 -0
  548. package/src/hidden-skills/groundwork-design-system/tracks/graphical-ui.md +330 -0
  549. package/src/hidden-skills/groundwork-design-system-extract/instructions.md +124 -0
  550. package/src/hidden-skills/groundwork-design-system-extract/templates/design-system-extract-cache.md +19 -0
  551. package/src/hidden-skills/groundwork-designer/SKILL.md +108 -0
  552. package/src/hidden-skills/groundwork-designer/references/accessibility.md +33 -0
  553. package/src/hidden-skills/groundwork-designer/references/ai-native-design.md +37 -0
  554. package/src/hidden-skills/groundwork-designer/references/design-review.md +29 -0
  555. package/src/hidden-skills/groundwork-designer/references/design-systems-and-tokens.md +33 -0
  556. package/src/hidden-skills/groundwork-designer/references/interaction-and-motion.md +37 -0
  557. package/src/hidden-skills/groundwork-designer/references/layout-and-space.md +33 -0
  558. package/src/hidden-skills/groundwork-designer/references/usability-and-ux.md +33 -0
  559. package/src/hidden-skills/groundwork-designer/references/visual-craft.md +49 -0
  560. package/src/hidden-skills/groundwork-designer/sync-anchor.md +20 -0
  561. package/src/hidden-skills/groundwork-doc-sync/instructions.md +100 -0
  562. package/src/hidden-skills/groundwork-elicit/instructions.md +66 -0
  563. package/src/hidden-skills/groundwork-elicit/methods.md +65 -0
  564. package/src/hidden-skills/groundwork-infra-adopt/instructions.md +168 -0
  565. package/src/hidden-skills/groundwork-infra-adopt/templates/infra-adopt-cache.md +21 -0
  566. package/src/hidden-skills/groundwork-mvp/instructions.md +223 -0
  567. package/src/hidden-skills/groundwork-mvp/templates/mvp-cache.md +9 -0
  568. package/src/hidden-skills/groundwork-patch/instructions.md +40 -0
  569. package/src/hidden-skills/groundwork-persona/instructions.md +54 -0
  570. package/src/hidden-skills/groundwork-product/SKILL.md +102 -0
  571. package/src/hidden-skills/groundwork-product/references/ai-native-product.md +45 -0
  572. package/src/hidden-skills/groundwork-product/references/discovery-and-opportunity.md +38 -0
  573. package/src/hidden-skills/groundwork-product/references/product-risks.md +52 -0
  574. package/src/hidden-skills/groundwork-product/references/requirements-and-specs.md +39 -0
  575. package/src/hidden-skills/groundwork-product/references/scope-and-sequencing.md +35 -0
  576. package/src/hidden-skills/groundwork-product/references/shaping-and-appetite.md +48 -0
  577. package/src/hidden-skills/groundwork-product/references/success-metrics-and-signals.md +37 -0
  578. package/src/hidden-skills/groundwork-product/sync-anchor.md +19 -0
  579. package/src/hidden-skills/groundwork-product-brief/instructions.md +231 -0
  580. package/src/hidden-skills/groundwork-product-brief-extract/instructions.md +139 -0
  581. package/src/hidden-skills/groundwork-product-brief-extract/templates/product-brief-extract-cache.md +17 -0
  582. package/src/hidden-skills/groundwork-review/checklists/architecture.md +93 -0
  583. package/src/hidden-skills/groundwork-review/checklists/bet-pitch.md +94 -0
  584. package/src/hidden-skills/groundwork-review/checklists/decomposition.md +135 -0
  585. package/src/hidden-skills/groundwork-review/checklists/design-system.md +85 -0
  586. package/src/hidden-skills/groundwork-review/checklists/domain-entity.md +66 -0
  587. package/src/hidden-skills/groundwork-review/checklists/implementation-readiness.md +46 -0
  588. package/src/hidden-skills/groundwork-review/checklists/infrastructure.md +68 -0
  589. package/src/hidden-skills/groundwork-review/checklists/maturity.md +71 -0
  590. package/src/hidden-skills/groundwork-review/checklists/product-brief.md +69 -0
  591. package/src/hidden-skills/groundwork-review/checklists/technical-design.md +112 -0
  592. package/src/hidden-skills/groundwork-review/instructions.md +181 -0
  593. package/src/hidden-skills/groundwork-scaffold/instructions.md +254 -0
  594. package/src/hidden-skills/groundwork-scaffold/phases/01-ingestion-service-mapping.md +87 -0
  595. package/src/hidden-skills/groundwork-scaffold/phases/02-scaffolding-execution.md +15 -0
  596. package/src/hidden-skills/groundwork-scaffold/phases/03-service-documentation-api-stubs.md +100 -0
  597. package/src/hidden-skills/groundwork-scaffold/phases/04-infrastructure-verification.md +17 -0
  598. package/src/hidden-skills/groundwork-scaffold/phases/05-draft-review.md +19 -0
  599. package/src/hidden-skills/groundwork-scaffold/phases/06-commit.md +19 -0
  600. package/src/hidden-skills/groundwork-scaffold/templates/scaffold-cache.md +23 -0
  601. package/src/hidden-skills/groundwork-scan/instructions.md +164 -0
  602. package/src/hidden-skills/groundwork-scan/references/digest-schema.md +66 -0
  603. package/src/hidden-skills/groundwork-scan/references/exclusions.md +44 -0
  604. package/src/hidden-skills/groundwork-scan/templates/architecture-findings.md +42 -0
  605. package/src/hidden-skills/groundwork-scan/templates/design-findings.md +23 -0
  606. package/src/hidden-skills/groundwork-scan/templates/overview.md +26 -0
  607. package/src/hidden-skills/groundwork-scan/templates/product-findings.md +23 -0
  608. package/src/hidden-skills/groundwork-scan/templates/scan-state.json +19 -0
  609. package/src/hidden-skills/groundwork-stack-forge/instructions.md +150 -0
  610. package/src/hidden-skills/groundwork-stack-forge/references/authoring-engineer-skills.md +107 -0
  611. package/src/hidden-skills/groundwork-surface-activation/instructions.md +138 -0
  612. package/src/hidden-skills/groundwork-update/briefs/reconcile-worker.md +196 -0
  613. package/src/hidden-skills/groundwork-update/instructions.md +200 -0
  614. package/src/hidden-skills/groundwork-writer/SKILL.md +278 -0
  615. package/src/hidden-skills/maturity-model.md +125 -0
  616. package/src/hidden-skills/operating-contract.md +400 -0
  617. package/src/hidden-skills/repo-map-schema.md +90 -0
  618. package/src/hidden-skills/templates/adr.md +57 -0
  619. package/src/hidden-skills/templates/capability-ports.md +71 -0
  620. package/src/hidden-skills/templates/discovery-notes.md +33 -0
  621. package/src/hidden-skills/templates/domain-entity.md +80 -0
  622. package/src/hidden-skills/templates/gap-ledger.md +21 -0
  623. package/src/hidden-skills/templates/handoff.md +37 -0
  624. package/src/hidden-skills/templates/maturity.md +39 -0
  625. package/src/hidden-skills/templates/surfaces.md +207 -0
  626. package/src/skills/groundwork-check/SKILL.md +56 -0
  627. package/src/skills/groundwork-check/instructions.md +70 -0
  628. package/src/skills/groundwork-orchestrator/SKILL.md +176 -0
  629. package/src/skills/groundwork-orchestrator/workflow-index.md +50 -0
@@ -0,0 +1,68 @@
1
+ ---
2
+ title: Usability & UX
3
+ description: Heuristics and UX laws applied at decision time, cognitive load, form design, error prevention and recovery, and information scent.
4
+ status: active
5
+ last_reviewed: 2026-06-20
6
+ ---
7
+ # Usability & UX
8
+
9
+ ## TL;DR
10
+
11
+ Usability is not a checklist run at the end — it is a set of diagnostic lenses held up to every screen as it is designed. The heuristics and UX laws are tools for *making* decisions, not for auditing them afterwards. The product, not the user, absorbs complexity. Errors are designed out before they are messaged; where they remain, recovery is cheap and the user's work is protected. Every label predicts where it leads.
12
+
13
+ ## Why this matters
14
+
15
+ Most usability failures are not exotic — they are the same handful of mistakes repeated: silent actions, jargon labels, validation that punishes mid-typing, confirmation dialogs trained into reflexive clicks, forms that ask for what the system already knows, and "click here" links that carry no scent of their destination. Each has a known, defensible fix. The discipline is applying those fixes at design time, when they are free, instead of discovering the problem in a usability test after the structure has hardened around it.
16
+
17
+ ## Our principles
18
+
19
+ ### 1. Apply the heuristics as lenses, not a checklist
20
+
21
+ Nielsen's ten heuristics are diagnostic lenses held up to a design while it is made: is system status visible, does the language match the user's world, is there a marked exit from every state, is it consistent with what users know from elsewhere, are errors prevented before they are messaged, does it favour recognition over recall, does it serve both novice and expert, is it minimal, do errors route to a fix, is help in context. We reason with them; we do not recite them. A heuristic that surfaces no concrete change to the screen in front of us was not really applied.
22
+
23
+ ### 2. The UX laws carry concrete implications
24
+
25
+ The laws of UX are design instructions, each with a direct consequence. Fitts: primary actions are large and near the user's pointer, destructive ones small or distant, and screen edges are infinite targets. Hick: reduce and group choices and offer a recommended default. Jakob: meet convention first, because users spend most of their time on *other* products. Miller: chunk information rather than capping menus at seven. Tesler: the product absorbs irreducible complexity through smart defaults and inference. Postel: accept messy input and normalise it silently. Peak-End: invest in the peak moment and the ending. Doherty: keep perceived response under ~400ms, manufacturing it with optimistic UI when real speed is unavailable. Von Restorff: give the single most important action visual distinction; if everything is emphasised, nothing is.
26
+
27
+ ### 3. The product absorbs complexity, not the user
28
+
29
+ Every system carries irreducible complexity; the only question is who bears it. We make the product bear it — sensible defaults so the common case requires no decision, values derived rather than asked, the happy path optimised for first use with accelerators layered on for experts. We attack *extraneous* cognitive load — visual clutter, inconsistent patterns, unnecessary choices — because every scrap of attention spent decoding the interface is attention not spent on the task. Recognition beats recall: show options and prior choices rather than making the user remember across screens.
30
+
31
+ ### 4. Reveal complexity progressively
32
+
33
+ We show the common 80% first and tuck advanced options one discoverable layer deep, because deferred complexity is managed complexity and a flatter surface lowers the decision cost of the common case. For complex, branching, or low-confidence flows — onboarding, checkout, anything official — one question per page beats a long wall of fields, because it lowers load and handles validation, branching, and save-progress far better.
34
+
35
+ ### 5. Forms ask less, validate kindly, and never lose work
36
+
37
+ A form is a single column, top to bottom, with labels above the field — the layout that completes fastest and survives translation — and never a placeholder standing in for a label, because the placeholder vanishes on input and fails review and accessibility. We validate on blur and confirm success inline, never erroring mid-keystroke, because punishing not-yet-finished input is hostile. On a failed submit we keep every entered value, mark each field inline, summarise at the top, and move focus to the first error. We pre-fill what we can infer and cut every field not needed now, because each field measurably lowers completion, and we use the correct input type and accept any reasonable format.
38
+
39
+ ### 6. Prevent the error; make recovery cheap
40
+
41
+ The cheapest error to recover from is the one that cannot occur, so we design errors out first with constraints, smart defaults, and forgiving formats before designing any message. For reversible actions we act immediately and offer Undo rather than a confirmation dialog, because dialogs train reflexive "yes" clicks and interrupt flow while Undo respects momentum; confirmation is reserved for the genuinely destructive and irreversible. Where a message is still needed, it states what happened, why, and how to fix it, in plain language at the point of the error, styled to be noticed without blame or raw error codes. Work is protected by autosave and a warning before discarding unsaved changes.
42
+
43
+ ### 7. Every label predicts where it leads
44
+
45
+ Users forage by scent: they choose links and buttons by the payoff each label predicts, so labels are descriptive and specific and match the content they lead to — never "click here," "learn more," or a bare "submit." Every screen answers the wayfinding questions — where am I, how did I get here, where can I go, how do I get back — through an active navigation state, a clear title, breadcrumbs in deep hierarchies, and consistent, persistent navigation. Disorientation is a silent driver of abandonment.
46
+
47
+ ## How we apply this
48
+
49
+ - [Interaction & Motion](interaction-and-motion.md) — the state, feedback, and perceived-performance decisions usability depends on.
50
+ - [Accessibility](../quality/accessibility.md) — keyboard operability, focus management, and error association as the operable backbone of usability.
51
+ - [Design Foundations](design-foundations.md) — usability is the design-owned risk in the four-risk frame.
52
+
53
+ ## Anti-patterns we reject
54
+
55
+ - **Heuristics as an audit.** Reciting the ten heuristics after the fact instead of using them to change the design as it is made.
56
+ - **Placeholder as label.** A label that disappears the moment the field is filled, defeating review and accessibility.
57
+ - **Validation mid-keystroke.** Red errors thrown before the user has finished a field, punishing in-progress input.
58
+ - **Lost work on failure.** Clearing the form or losing entered data when a submit fails.
59
+ - **Confirmation-dialog overuse.** "Are you sure?" on routine reversible actions, training the reflexive click that defeats the dialog's purpose.
60
+ - **Asking for the known.** Requiring data the system already has or could derive.
61
+ - **Scentless labels.** "Click here" / "Learn more" / generic "Next" that predict nothing about their destination.
62
+
63
+ ## Further reading
64
+
65
+ - Nielsen Norman Group, *10 Usability Heuristics* and the supporting article corpus.
66
+ - Jon Yablonski, *Laws of UX* — the laws above, each with its design implication.
67
+ - Luke Wroblewski, *Web Form Design* — single-column forms, label placement, and inline validation.
68
+ - GOV.UK Design System, *Question pages* — one-thing-per-page for complex and branching flows.
@@ -0,0 +1,84 @@
1
+ ---
2
+ title: Visual Design
3
+ description: Perceptual colour, typographic rigour, spatial depth, and visual hierarchy — the craft that separates an implemented design from a framework default.
4
+ status: active
5
+ last_reviewed: 2026-06-21
6
+ ---
7
+ # Visual Design
8
+
9
+ ## TL;DR
10
+
11
+ The visual layer is built on perception, not convenience. Colour is authored in a perceptually uniform space so palettes are even and predictable; type is a system of co-tuned roles, not a list of font sizes; depth comes from light modelled honestly; hierarchy is carried by weight and colour before size. Atmosphere — translucency, ambient glow, and grain — is modelled material used with restraint, never decoration; and the finishing details (optical alignment, pixel-crisp edges, tabular figures) are where polish is won or lost. The gap between a designed interface and a generic one lives entirely in these details, and every one of them has a correct, defensible default.
12
+
13
+ ## Why this matters
14
+
15
+ Two teams can use the same font, the same brand hue, and the same grid and ship interfaces that feel a class apart. The difference is not effort spread evenly — it is correctness in the places perception is most sensitive. A colour ramp built in HEX has uneven perceived steps because HEX lightness is not perceptual; a shadow built from one layer reads as a fuzzy grey box because real light casts many; type sized without paired line-height and tracking reads as "defaults" because typographic quality lives in the relationships, not the sizes. Getting these right is cheap once known and impossible to fake.
16
+
17
+ ## Our principles
18
+
19
+ ### 1. Author colour in a perceptual space (OKLCH)
20
+
21
+ We define colour in OKLCH — lightness, chroma, hue — not HEX/RGB/HSL, because OKLCH is perceptually uniform: equal numeric steps in lightness look equal to the eye across every hue. HSL lies — a 50%-lightness yellow is far brighter than a 50%-lightness blue — so palettes built in HSL need per-hue hand-correction and `darken()`/hue-rotation silently break. In OKLCH, fix the lightness curve, sweep the hue, and the ramp stays perceptually parallel. This is not speculative: CSS Color 4 ships `oklch()` in every evergreen browser and mandates OKLCH for gamut mapping.
22
+
23
+ ### 2. Build palettes as luminance-pinned ramps surfaced through semantic tokens
24
+
25
+ A colour system is two layers. **Primitive ramps**: for each hue, a scale (commonly 11 steps, 50→950) generated by pinning a lightness curve and a chroma *arc* — chroma peaks in the mid-steps and tapers at the light and dark ends, because extreme lightness cannot hold high chroma without clipping the gamut. A flat chroma across all steps is the tell of a naïve ramp. **Semantic tokens**: roles (`surface`, `text`, `border`, `brand`, `success/warning/danger`) mapped onto ramp steps. Components reference only the semantic layer, so a theme swap or rebrand never touches a component. Wide-gamut Display P3 is layered as progressive enhancement, never as the carrier of meaning or contrast.
26
+
27
+ ### 3. Dark mode is a system, not an inversion
28
+
29
+ A dark theme is a separate semantic mapping over the same token names, governed by three rules: signal elevation with lightness (a raised surface is lighter, not shadowed), because shadows nearly vanish on dark backgrounds; desaturate and lighten brand colours, because a saturated accent at mid-lightness glows against dark; and avoid pure `#000`/`#fff`, because maximum contrast causes halation that vibrates the edges of text. Algorithmic inversion (`filter: invert()`) is never a dark mode — it destroys the carefully built hierarchy and produces wrong colours.
30
+
31
+ ### 4. Contrast is validated, with WCAG as the floor and APCA as the lens
32
+
33
+ Text meets WCAG 2.2 AA — 4.5:1 for body, 3:1 for large text and for non-text UI elements — as the compliance floor. We design and check with APCA where it matters, because the WCAG ratio is not perceptually uniform: it overstates contrast in dark mode and ignores font weight and size, so a pair that "passes" can be unreadable. APCA models perception, is polarity-aware, and factors size and weight, which makes it the better design tool even though it carries no legal standing yet. Contrast is a property of the token *pairing* in context, never of a colour in isolation.
34
+
35
+ ### 5. Typography is a system of roles, each a bundle of co-tuned properties
36
+
37
+ A type scale is generated from one base and one modular ratio (1.2 for dense UI, 1.25 for general product, 1.333+ for editorial), exposed as named steps, not per-element magic numbers — and the ratio is relaxed at display sizes, where a pure geometric scale overshoots. Each *role* (display, headings, body, caption, label, mono) carries size **and** line-height (tight for headings, open for body), weight, and tracking (negative for large display, slightly positive for small labels) — because typographic quality lives in those relationships, not in size alone. Sizes name their purpose (`text-body`), never their appearance (`text-16`).
38
+
39
+ ### 6. Render type fluidly, on variable fonts, with optical sizing
40
+
41
+ Each scale step is a `clamp(min, preferred, max)` that interpolates between two viewport poles, replacing breakpoint font-size jumps with smooth scaling. The preferred value always includes a `rem` term, never pure `vw`, because pure-`vw` text ignores user zoom and fails WCAG resize-text. We ship a variable font and let `font-optical-sizing: auto` tune stroke detail to size, because one variable file replaces many static weights and unlocks continuous, per-role weight and optical adjustments a static cut cannot. Body text holds a comfortable measure (~45–75 characters via `max-width` in `ch`); `font-display: swap` with metric-matched fallbacks prevents invisible text and layout shift.
42
+
43
+ ### 7. Depth is modelled light, not a default shadow
44
+
45
+ Elevation comes from a multi-layer shadow stack — several shadows with progressively larger offset and blur and inversely scaled alpha — sharing one light-source direction (vertical offset roughly twice the horizontal) and tinted toward the background hue rather than pure black, because real light casts many soft accumulating shadows from a consistent source. A single `box-shadow` is a fuzzy grey box; the layered stack reads as physical. Edges catch light: prefer a translucent, luminosity-aware border or a 1px top highlight over a flat opaque grey line. Gradients interpolate in OKLCH/OKLab and carry ~1% noise to kill banding, because sRGB interpolation produces a muddy mid-stop dead zone.
46
+
47
+ ### 8. Atmosphere is modelled material — translucency, glow, and grain, used with restraint
48
+
49
+ High-end surfaces read as material in an environment, not flat fills, and the techniques that build that atmosphere are exactly the ones a generic build skips. **Translucency (glass):** a surface tinted with alpha over a `backdrop-filter` blur samples the content beneath, placing the surface in front of a scene rather than on a void — reserved for layered chrome (navigation, overlays, command surfaces), always with a tint opaque enough to hold text contrast and a solid fallback for engines without backdrop support. **Ambient glow and gradient mesh:** a barely-perceptible radial wash (opacity well under ~0.15, fading to transparent over a solid fallback) warms a large surface and leads the eye — interpolated in OKLCH with ~1% noise, never a hard two-stop dump. **Grain:** a fine, low-opacity noise overlay defeats banding and lends tactility to large flats. Depth is multi-plane: foreground, surface, and background blur and move differently so the interface reads as layers, not a sheet. The whole discipline is restraint — atmosphere serves the content; when blur, glow, and grain become the subject, the surface has become decoration. Borrow the *technique and rigour* of the work you admire, never its signature look: the look dates, the rigour does not.
50
+
51
+ ### 9. Hierarchy is carried by weight and colour before size
52
+
53
+ The fastest way to a flat, undifferentiated screen is to express every level with a different font size. We build hierarchy with a small set of greys (near-black primary, mid secondary, light tertiary) and two weights first; size is the last lever, not the first, because secondary text that is merely smaller still competes for attention, while lightening it makes it recede. We compose grayscale-first — if the layout fails without colour, its weight-and-spacing hierarchy is broken — and never let colour be the sole differentiator. Proximity groups: related elements sit closer than unrelated ones, so equal spacing everywhere destroys structure.
54
+
55
+ ### 10. Align optically and render crisp; set figures in tabular numerals
56
+
57
+ Polish lives below the level most builds check. **Optical alignment is not mathematical alignment:** a triangle or play icon centred by its bounding box looks off-centre, and text centred by its line box sits high — nudge by eye to where the visual mass balances. **Render on the pixel grid:** keep 1px borders and hairlines crisp rather than smeared across two subpixels — integer offsets for sharp edges, no fractional positioning of thin lines. **Set figures in tabular numerals** wherever values are compared or change in place (tables, metrics, timers, counters) so digits hold their columns and the layout stops jittering; reserve proportional numerals for running prose. Each of these is invisible until it is wrong, and collectively they are the difference between considered and almost.
58
+
59
+ ## How we apply this
60
+
61
+ - [Layout & Space](layout-and-space.md) — the spatial scale and grid the visual rhythm sits on.
62
+ - [Design Systems & Tokens](design-systems-and-tokens.md) — how colour, type, and depth decisions become the semantic-token contract.
63
+ - [Accessibility](../quality/accessibility.md) — contrast, colour-independence, and zoom as non-negotiable constraints on the visual layer.
64
+
65
+ ## Anti-patterns we reject
66
+
67
+ - **HEX/HSL palette math.** Ramps and `darken()`/hue-rotation built in a non-perceptual space, producing uneven steps and unpredictable brightness.
68
+ - **Flat-chroma ramps.** A scale with constant chroma across all steps — the signature of a generated-but-not-designed palette.
69
+ - **Inverted dark mode.** Algorithmic inversion or pure-black-on-pure-white, ignoring elevation, desaturation, and halation.
70
+ - **Size-only type tokens.** Font sizes named by their pixel value with no paired line-height, weight, or tracking, and one global letter-spacing.
71
+ - **The single-layer shadow.** One `box-shadow` with a pure-black colour, plus a flat opaque grey border, the documented "AI slop" depth signature.
72
+ - **The default gradient.** A two-stop indigo/purple hero gradient interpolated in sRGB with visible banding.
73
+ - **Blur as decoration.** Backdrop blur on opaque or non-layered surfaces, or without a contrast-safe tint and a solid fallback — the cost of glass without the layered-scene payoff.
74
+ - **Glow/grain dump.** A high-opacity or hard-stop "ambient" gradient, or heavy noise, used as ornament rather than a sub-perceptual wash that serves the content.
75
+ - **Signature mimicry.** Copying a named product's signature surface look instead of borrowing the underlying technique and restraint.
76
+ - **Bounding-box centring.** Trusting mathematical centre for icons, arrows, and optically-uneven glyphs instead of nudging to optical balance; blurred hairlines from fractional pixel offsets.
77
+ - **Hierarchy by size alone.** Five font sizes standing in for a hierarchy that weight and colour would carry better.
78
+
79
+ ## Further reading
80
+
81
+ - Andrey Sitnik / Evil Martians, *OKLCH in CSS* — why perceptual colour replaces HEX and HSL for palette building.
82
+ - Josh Comeau, *Designing Beautiful Shadows* and *Make Beautiful Gradients* — modelling light honestly in CSS.
83
+ - *Utopia* (utopia.fyi) — fluid type and space from anchor points, with the zoom-safe `clamp()` method.
84
+ - *Refactoring UI*, Wathan & Schoger — hierarchy by weight and colour, grayscale-first composition.
@@ -0,0 +1,86 @@
1
+ ---
2
+ title: Code Craft
3
+ description: Simplicity, readability, the discipline of deletion, and the refusal to build for hypothetical futures.
4
+ status: active
5
+ last_reviewed: 2026-06-19
6
+ ---
7
+ # Code Craft
8
+
9
+ ## TL;DR
10
+
11
+ Code is read far more than it is written. Our craft is to write code that the next reader — human or agent — can understand, change, and delete with confidence. Simplicity is the default; abstraction is a cost that must be earned.
12
+
13
+ ## Why this matters
14
+
15
+ In a codebase that is alive for more than a year, the dominant cost is not writing code — it is understanding the code already there so you can change it. Every abstraction, every layer of indirection, every "flexible" interface is a tax on future readers. Our stance is that taxes must be justified. When we optimise for future flexibility we have not yet needed, we pay a certain cost today against an uncertain benefit later; more often than not, the benefit never arrives and we are left with the cost.
16
+
17
+ ## Our principles
18
+
19
+ ### 1. Simpler is better than clever
20
+
21
+ A function that a tired engineer can understand in thirty seconds is worth more than a function that demonstrates the author's taste in type systems. Prefer plain data structures over clever abstractions, plain control flow over meta-programming, plain naming over in-joke naming. When "clever" and "clear" conflict, clear wins.
22
+
23
+ The trap is mistaking *simple* for *familiar*. Rich Hickey's distinction is the one that matters: simple is the opposite of *complex* (one concern, not braided together), while easy is the opposite of *hard* (close at hand, familiar). Cleverness is bad precisely when it complects — when it braids state with time, policy with mechanism, identity with behaviour to buy terseness. But an unfamiliar construct that *untangles* those concerns is not cleverness; it is simplicity wearing a new face, and familiarity will catch up. The decision rule: prefer the option with the fewest interleaved concerns, even when it is the less familiar one — and reject the option that is compact only because it has tangled things you will later need to pull apart.
24
+
25
+ ### 2. No speculative abstraction
26
+
27
+ Do not build a generalisation until you have at least three concrete use cases driving the same shape. Premature abstractions are harder to change than the duplication they replace — because now you have to understand the abstraction, the use cases, and the compatibility between them before you can change any of them.
28
+
29
+ The asymmetry is the whole argument, and Sandi Metz states it best: duplication is far cheaper than the wrong abstraction. Unwinding a wrong abstraction means re-inlining it into every caller and then deleting what each one does not need — strictly more work than the duplication you were trying to avoid, often done under deadline by someone who did not write it. When you are unsure, duplicate: you can always extract later with more information, but you cannot cheaply un-extract.
30
+
31
+ DRY is a rule about knowledge, not characters. Two fragments that look identical but change for different reasons are *not* duplication, and coupling them is the mistake; one business rule expressed in two places *is* duplication even when the code differs. The decision rule: extract only when you have seen the same shape change for the same reason three times, or you have a hard, already-funded requirement (not a guess) for the second case. Until then, keep the copies and watch them — if they drift apart, they were never the same thing; if they move together, you have found the real abstraction and earned the right to name it.
32
+
33
+ ### 3. Deletion is a virtue
34
+
35
+ The code you delete cannot break, cannot require maintenance, cannot confuse the next reader, and cannot leak a vulnerability. When a feature is removed, the code should go with it — including the tests, the config flags, and the docs. Leaving dead code "just in case" is a bet that is almost always wrong: if we need it back, we will write a clearer version with the benefit of hindsight.
36
+
37
+ ### 4. Names are the interface
38
+
39
+ A badly named function is a broken interface even if its behaviour is correct, because every caller has to read the implementation to know what it does. We spend time on names. We rename aggressively when a better name becomes clear. Variables, functions, types, files, directories — all of them communicate, and a mismatch between name and behaviour is a bug.
40
+
41
+ ### 5. Comments explain the "why"
42
+
43
+ Code explains the "what" of its own mechanics; restating that in prose is noise. The comment's job is the "why" — the non-obvious constraint, the invariant that must hold, the bug that drove an odd choice, the reference to an ADR. If a comment would be obvious to anyone who read the next two lines, delete it.
44
+
45
+ There is one "what" worth writing, and it is not redundant: the comment that states what a unit *does, assumes, and costs* so that a caller never has to read its body. That comment is the abstraction. John Ousterhout's point holds — "good code is self-documenting" is the excuse that produces a hundred shallow methods nobody can compose, because if a caller must read your implementation to use it, you have no abstraction at all. The decision rule splits cleanly by location: comment the *contract* at the boundary of a module (what it guarantees, what it requires, what it will cost you); do not narrate the line-by-line mechanics *inside* it. A comment that saves a reader from opening the file is leverage; a comment that repeats the line beneath it is debt.
46
+
47
+ ### 6. Error handling is design, not decoration
48
+
49
+ Errors are a first-class part of the interface, not an afterthought. We decide — explicitly — which errors a function can return, how callers are expected to respond, and where the boundary between recoverable and fatal is. `err != nil` sprinkled through a codebase without a model behind it is a failure of design.
50
+
51
+ Make the failure modes visible in the signature. Model expected, recoverable failures as values in the return type (Go's `error` return, Rust's `Result`) so a caller cannot forget that they exist; reserve exceptions and panics for programmer error and states you genuinely cannot continue from. Wrap foreign errors at the boundary where you cross into another system's vocabulary, so a third party's failure taxonomy does not leak into yours. The test of a good error design is simple: from the signature alone, a caller can tell what can go wrong and what they are expected to do about it.
52
+
53
+ ### 7. Trust the boundary; distrust the internal
54
+
55
+ We validate at system boundaries — user input, external APIs, message payloads — where the data is untrusted. We do not re-validate between internal callers in the same service; if an internal contract is wrong, the right fix is the contract, not a runtime check in every consumer. Defensive programming inside the trust boundary is a form of noise.
56
+
57
+ The mechanism that makes this safe is *parsing*, not checking. At the boundary, turn untrusted input into a type that cannot represent the illegal state — a parsed `Email` or `NonEmptyList<Order>`, not a raw string you re-inspect everywhere (Alexis King, "Parse, don't validate"). Once the data carries its guarantee in its type, internal code receives it for free and re-validation is genuinely dead code. If you find yourself re-checking a value deep inside the system, that is the signal: the boundary handed you a type too weak to trust, so strengthen the type rather than scattering the check.
58
+
59
+ The honest exception is the security boundary that runs *inside* the process — a multi-tenant query, an authorization decision, a privilege-escalation path. There, defense in depth is not noise: the second check guards against a different failure mode (a bug, not malformed input), and the cost of being wrong is a breach rather than a stack trace. Distrust the internal everywhere except where the threat model says a single point of failure is itself the vulnerability.
60
+
61
+ ### 8. Dead code is a bug
62
+
63
+ Commented-out code, `_unused` variables, orphan functions, legacy configuration — all of it decays the signal-to-noise ratio of the codebase. When we find it, we delete it. `git` preserves anything we lose; the working tree should contain only code that is alive today.
64
+
65
+ ## How we apply this
66
+
67
+ - [How We Structure Code](../system-design/code-structure.md) — the structural discipline that makes simplicity scalable.
68
+ - [Testing](testing.md) — tests that exercise behaviour keep refactoring cheap.
69
+ - [Decisions](../../decisions/) — the ADRs that capture the "why" our comments do not.
70
+
71
+ ## Anti-patterns we reject
72
+
73
+ - **Defensive programming without a threat model.** Guarding every internal call against nil is not robustness — it is distrust of our own type system.
74
+ - **"Might need it later" scaffolding.** Config flags for scenarios that do not exist, plugin systems with one plugin, interfaces with one implementation. Delete.
75
+ - **Fashion-driven refactors.** Rewriting working code to match a new pattern the team read about this week is debt, not progress.
76
+ - **Multi-paragraph docstrings.** If the function needs a multi-paragraph docstring to be understood, the function is wrong. Split it, rename it, or simplify it — then the docstring is not needed.
77
+ - **Backwards-compatibility shims for internal APIs.** If it is fully internal, changing it is allowed and expected; compatibility layers are debt we impose on ourselves for no benefit.
78
+
79
+ ## Further reading
80
+
81
+ - *A Philosophy of Software Design*, John Ousterhout — deep modules, the cost of shallow abstractions, and why interface comments are part of the design, not decoration.
82
+ - *The Wrong Abstraction*, Sandi Metz — why duplication is far cheaper than the wrong abstraction, and how to unwind one.
83
+ - *Parse, Don't Validate*, Alexis King — pushing validation to the boundary by making illegal states unrepresentable in the type.
84
+ - *Simple Made Easy*, Rich Hickey — simple is not easy; complexity is entanglement, not volume.
85
+ - *Tidy First?*, Kent Beck — the economics of refactoring as a separable activity.
86
+ - *The Pragmatic Programmer*, Hunt & Thomas — the canonical treatment of names, duplication, and orthogonality.
@@ -0,0 +1,75 @@
1
+ ---
2
+ title: Continuous Discovery
3
+ description: Discovery as a continuous habit, not a phase — mapping the problem space with an opportunity-solution tree before committing to a solution, while keeping vision in the lead.
4
+ status: active
5
+ last_reviewed: 2026-06-19
6
+ ---
7
+ # Continuous Discovery
8
+
9
+ ## TL;DR
10
+
11
+ Discovery is not the phase before delivery — it is a habit that runs alongside it. We stay in regular contact with the people we build for, we map the **problem space** before we choose a solution, and we connect every solution we consider back to a desired outcome through an opportunity-solution tree. The goal is not more research; it is a shorter loop between a decision and the evidence that should inform it.
12
+
13
+ ## Why this matters
14
+
15
+ The most expensive mistake in software is building the wrong thing well, and it is almost always made at the moment a team jumps from a vague problem straight to a specific solution. Discovery done as a one-time upfront phase cannot prevent this: the assumptions it validated go stale the moment the world moves, and by the time delivery reveals the gap, the cost of the miss is a shipped feature instead of a discarded sketch. Teams that ship the right thing repeatedly are not the ones who research hardest once — they are the ones who keep a continuous, low-friction connection to the people they build for and let it steer decisions while those decisions are still cheap to change. Discovery is continuous because the problem space is never finished revealing itself.
16
+
17
+ Be precise about what discovery is for. It is the discipline that stops you building the wrong thing; it is not, by itself, the thing that produces the breakthrough. Direction comes from vision and technical insight — discovery's job is to tell you whether the ground under that direction is real before you commit the team to it. A team that treats every user signal as a referendum on where to go will polish what exists and never invent what does not; a team that runs on vision alone will ship confident, expensive wrong bets. The two are partners, and the rest of this document is about holding both.
18
+
19
+ ## Our principles
20
+
21
+ ### 1. Discovery is a continuous habit, not a gate
22
+
23
+ We treat customer contact as a recurring rhythm, not a quarterly study. The unit is small and frequent: one conversation, one observed session, one assumption tested. Continuous contact keeps the team's mental model of the user current, surfaces problems while they are still cheap to act on, and means no live decision rests on research that is months old. A team that only talks to users at the start of a project is navigating by a map it drew once and never updated.
24
+
25
+ The weekly touchpoint is the canonical prescription, and it is a good default — but the cadence is not the principle. The invariant is that no decision in flight rests on stale or absent evidence; the calendar is just a forcing function. Where users are abundant and reachable, weekly is easy and right. Where they are scarce, gated, or expensive to reach — enterprise buyers, regulated domains, infrastructure and developer tooling where the user is a busy engineer — a fixed weekly slot fails in the opposite direction: it fills with whoever happened to be reachable, and the same small panel hardens into an echo chamber that confirms what you already believe. **Decision rule:** set cadence to the rate at which you are making real decisions, not to the calendar, and recruit a representative rolling panel rather than re-interviewing the same convenient few. Use automated recruiting so the touchpoint never depends on a weekly scramble. In 2026, the working pattern is asynchronous and AI-moderated sessions for breadth, with live conversations reserved for depth, contradiction, and high-stakes accounts.
26
+
27
+ ### 2. Map the problem space before choosing a solution
28
+
29
+ The first move is never "what should we build?" — it is "what is the user actually trying to accomplish, and where does that break down?" We hold the problem space open deliberately, naming the distinct opportunities (unmet needs, pain points, desires) before collapsing toward any one solution. A solution chosen before the problem space is understood is a guess dressed as a plan; the discipline is to resist the collapse until the opportunities are explicit.
30
+
31
+ ### 3. The opportunity-solution tree keeps work connected to outcomes
32
+
33
+ We structure discovery as a tree: a desired **outcome** at the root, branching into the **opportunities** that could move it, branching into candidate **solutions**, branching into the **assumptions** each solution rests on. The tree makes the reasoning visible — every solution traces back to an opportunity and an outcome, and any solution that cannot is a feature looking for a justification. The tree is living: it evolves as evidence comes in, not a diagram drawn once for a kickoff.
34
+
35
+ The tree is a tool, not a tollgate. Not every problem needs one: when the opportunity is obvious and the solution is essentially the only sane one, building a tree to "discover" it is theatre — skip it and execute. When you do build one, build it to the 80/20: map the few most promising opportunities, not an exhaustive taxonomy of everything a user might ever feel. An over-built tree becomes the feature factory's backlog in disguise, a sprawling diagram nobody prunes that quietly turns into a list of solutions to chase. **Decision rule:** build the tree only when it will change a decision — when there are genuinely competing opportunities or non-obvious solutions to reason between — and keep it only as large as the decision in front of you requires.
36
+
37
+ ### 4. Compare opportunities instead of debating solutions
38
+
39
+ When a team argues about which feature to build, it is usually arguing about solutions to different problems without realising it. The tree reframes the debate: decide which *opportunity* is most worth pursuing first, and the solution conversation becomes tractable. Prioritising at the opportunity level — by the size of the unmet need, how many users feel it, and how well it serves the target outcome — beats prioritising a backlog of solutions whose value is asserted rather than reasoned.
40
+
41
+ ### 5. Seek evidence, and guard against the loudest voice
42
+
43
+ Discovery grounds decisions in evidence, but evidence is easy to skew: the loudest customer, the most recent complaint, the most senior stakeholder's hunch. We weight signal by how representative it is of the target users and the target outcome, not by how forcefully it arrived. Structured contact across the user base — rather than reacting to whoever escalated last — is what keeps the opportunity space honest. The discipline cuts the other way too: a loud outlier is sometimes the canary, a leading signal the representative middle has not felt yet. **Decision rule:** an escalation is triaged *into* the opportunity space, not promoted straight onto the roadmap and not reflexively dismissed as noise — it earns weight only when it maps to a real opportunity for a target user.
44
+
45
+ ### 6. The team discovers together
46
+
47
+ The people who will build the thing hear the problem firsthand. When product, design, and engineering all sit in (or watch) customer contact, the team shares one mental model and the handoff loss between "what the user said" and "what we built" collapses. Discovery filtered through a single person and relayed as a requirements document loses exactly the texture that would have changed the design. Firsthand exposure is a force multiplier on every downstream decision.
48
+
49
+ The invariant is shared exposure, not synchronized calendars. **Decision rule:** the product trio — the people deciding what to build and how — is present live for synthesis, where the interpretation actually happens; everyone else gets the recording and the highlights asynchronously. Mandating that the whole team attend every session is its own waste, and it is the fastest way to get the cadence abandoned the first time delivery gets tight.
50
+
51
+ ### 7. Vision leads; the customer is not always the source
52
+
53
+ Customers are reliable about their problems and unreliable about solutions. They will tell you, vividly, where their day breaks down; they cannot ask for the thing they have never seen. The defining products of the last two decades were not waiting in an interview transcript — they came from a vision of what had become possible and the technical insight to build it, and were then de-risked against real users. Marty Cagan makes this case directly: customers are not the source of innovation. **Decision rule:** let customer evidence be decisive for two questions — *is this problem real?* and *does this solution actually land?* — and overrule opinion there without apology. But for category-creating or technology-enabled bets, vision and technical insight choose the direction, and discovery's job shifts from "find the opportunity" to "prove the leap is real before we bet the team on it." This matters most for foundational tooling, where the user often cannot describe the better way until they are holding it.
54
+
55
+ ## How we apply this
56
+
57
+ - The desired outcome at the root of the tree is a [success metric](success-metrics.md), not a feature count — discovery steers toward a measurable change in behaviour.
58
+ - Each candidate solution carries the [product risks](product-risks.md) it must clear; discovery is where we test the riskiest assumption before delivery, not after.
59
+ - When discovery converges on a bet, its problem, hypothesis, and no-gos are framed against [prioritization and appetite](prioritization-and-appetite.md) — the opportunity chosen sets the appetite.
60
+
61
+ ## Anti-patterns we reject
62
+
63
+ - **Big-bang discovery.** A single upfront research phase that produces a backlog and then ends. The map goes stale and nothing updates it.
64
+ - **Solution-first thinking.** Jumping to "let's build X" before the opportunity X serves is named. The problem space never gets mapped, so the solution can never be wrong — which means it can never be right either.
65
+ - **The feature factory's roadmap.** A prioritised list of solutions with no visible link to outcomes. Without the tree, "why this and not that?" has no defensible answer.
66
+ - **Loudest-customer steering.** Letting the most recent escalation set the agenda. Reactive discovery optimises for the squeakiest wheel, not the target user.
67
+ - **Discovery by proxy.** One person talks to users and relays a document to the team. The texture that would have changed the design is lost in translation.
68
+ - **Discovery theater.** Interviews and trees run on schedule but never change a decision — research as ritual, the insight filed and the roadmap untouched. Activity is not discovery; a habit that never kills or reshapes a bet is overhead in costume.
69
+
70
+ ## Further reading
71
+
72
+ - *Continuous Discovery Habits*, Teresa Torres — the canonical treatment of the weekly habit and the opportunity-solution tree.
73
+ - *Inspired* and *Empowered*, Marty Cagan — discovery as the core competency of a product team.
74
+ - *The Mom Test*, Rob Fitzpatrick — how to talk to users without leading them toward the answer you want to hear.
75
+ - *Customers Are Not the Source of Innovation*, Marty Cagan (Business of Software talk) — why vision and technical insight, not interview transcripts, produce category-defining products — the counterweight to taking discovery as the source of direction.
@@ -0,0 +1,102 @@
1
+ ---
2
+ title: Documentation
3
+ description: Docs as an active product surface for humans and AI agents — canonical knowledge, machine-readable interfaces, automation-first governance, and drift control.
4
+ status: active
5
+ last_reviewed: 2026-06-19
6
+ ---
7
+ # Documentation
8
+
9
+ ## TL;DR
10
+
11
+ Documentation is an active product surface. The docs are the canonical source for durable engineering knowledge; agent skills are the execution layer that selects, loads, and applies that knowledge safely. We design documentation for humans and AI agents at the same time, organise it with Diátaxis as the default frame, expose it through clean Markdown exports, a curated `llms.txt` index, and MCP resources, and enforce freshness with automation wherever a human would drift.
12
+
13
+ ## Why this matters
14
+
15
+ In 2026, documentation is part of the runtime environment for engineering work. A human reads the site through navigation and search; an agent reads the same knowledge through MCP resources, `llms.txt`, and per-page Markdown exports. If those surfaces disagree, the system teaches different readers different truths. That is not a documentation problem; it is an engineering defect.
16
+
17
+ The operating model is simple: **docs hold the knowledge, skills control the agent behaviour**. Durable guidance belongs in the docs where humans and agents can inspect it. Skill files stay concise and directive: they define when to trigger, what context to load, which tools to use, and which safety checks must run. This keeps prompts lean, reduces duplicated policy, and gives us one canonical place to correct factual drift.
18
+
19
+ ## Our principles
20
+
21
+ ### 1. Documentation is canonical knowledge
22
+
23
+ Architecture principles, service handbooks, workflow guides, glossary terms, ADRs, API references, and generated schemas belong in the docs. A skill may point to these pages, but it does not become the source of truth for material that humans also need to understand.
24
+
25
+ ### 2. Skills are the agent execution layer
26
+
27
+ Agent skills are a control surface, not a second documentation site. A skill owns triggering, task routing, tool use, safety constraints, verification steps, and context-loading instructions. It should reference the relevant doc pages, not duplicate them in full.
28
+
29
+ ### 3. AI-native documentation is first class
30
+
31
+ Every important documentation surface must survive machine consumption. Three surfaces carry the load, and they are not interchangeable:
32
+
33
+ - **Clean per-page Markdown exports and semantic HTML** are the floor. Any agent, crawler, or RAG pipeline can read them today with no special support. This is non-negotiable.
34
+ - **`llms.txt`** is a curated index that helps a client *route* to the right pages instead of scraping the whole site. Be honest about its reach: no major model provider treats it as a crawl signal — Google's public position is that it behaves like the long-dead `keywords` meta tag, and AI-bot logs show near-zero direct requests for it. Its real value is business-to-agent: an agent you control, or an opted-in client (an IDE assistant, an MCP doc server such as `mcpdoc`), reads the index and pulls only the pages it needs. Publish it for that audience; do not assume an external crawler will honour it.
35
+ - **MCP resources** are the path when retrieval must be scoped and auditable. MCP gives the agent explicit, token-efficient fetches and gives us a log of what was actually read, instead of hoping a crawler lands on the right page.
36
+
37
+ Decision rule: ship the Markdown/HTML floor for everyone; add `llms.txt` as a routing index for agents you or your users control; reach for MCP when retrieval must be governed and inspectable. Agent-readiness is a quality attribute of the docs system, not an SEO play.
38
+
39
+ ### 4. Diátaxis is the structural frame
40
+
41
+ We organise by reader intent, not by our internal org chart. Tutorials teach, how-to guides solve, reference pages support lookup, and explanation pages build understanding. A page that mixes these jobs forces both humans and agents to infer the purpose from context, which makes retrieval weaker and maintenance harder.
42
+
43
+ Diátaxis is the default partition, not a cage. It was designed for *tools* with shallow conceptual models; dense domains — a framework, a language, a protocol — need forms it does not name. The two it most often misses: a **conceptual overview** for the reader still deciding whether to adopt at all (different from an explanation aimed at someone already learning), and **annotated examples and recipes** that teach a way of thinking rather than one procedure. Allow those page types explicitly. The failure mode is dogma: refusing to write the page a reader needs because no quadrant fits, or forcing a genuinely sequential lesson into random-access reference. Use the four types to keep each page honest about its job; add a fifth when the domain demands it.
44
+
45
+ ### 5. Active docs replace passive docs
46
+
47
+ A page is not "done" when it is written. Active docs declare ownership, review cadence, freshness status, and source-of-truth boundaries. Pages that age past their review window are visibly flagged and reviewed as part of normal engineering work, not as a cleanup project.
48
+
49
+ ### 6. Automation is the first reviewer
50
+
51
+ Automated checks enforce the cheap, high-signal rules: required frontmatter, broken internal links, stale review dates, and known version mismatches. Humans review accuracy, judgment, and usefulness. Automation handles the facts it can verify without fatigue.
52
+
53
+ ### 7. Prefer generated reference over prose
54
+
55
+ API specs, event contracts, database schemas, CLI command tables, and error catalogues have machine-readable sources. We render them from those sources instead of hand-writing reference pages. Hand-written reference drifts; generated reference rebuilds and validates.
56
+
57
+ Generation covers the *facts*, not the *orientation*. A raw OpenAPI dump is accurate and nearly unusable — readers still need hand-written narrative explaining what the API is for, the common flows, and the constraints a schema cannot express. Decision rule: generate every fact that has a machine source; hand-write the connective tissue around it; never paraphrase a generated fact back into prose, where it will silently rot out of sync with the source.
58
+
59
+ ### 8. Decisions are append-only
60
+
61
+ Hard-to-reverse decisions live in ADRs. Accepted ADRs are not edited to match current preference; they are superseded. Each ADR carries enough consequence and debt context for a future reader to understand why the decision existed, what it cost, and when to revisit it.
62
+
63
+ ### 9. Metadata interoperability matters
64
+
65
+ Precise metadata, stable identifiers, and explicit relationships between documentation objects sharpen interoperability. For agent discovery specifically, use `llms.txt`, Markdown exports, MCP resources, and HTTP `Link` headers.
66
+
67
+ ### 10. Drift is corrected at the source
68
+
69
+ When code, docs, skills, specs, and design records disagree, we identify the source of truth before editing. Code and generated contracts win for shipped runtime behaviour. ADRs win for historical decisions. Active design docs win for current delivery intent until the shipped system proves otherwise. Skills win for agent execution behaviour only.
70
+
71
+ ## Freshness model
72
+
73
+ | Surface | Review window | Freshness rule |
74
+ |---|---:|---|
75
+ | Principles | 6 months | Review when operating model or engineering policy changes. |
76
+ | Service handbooks | 3 months | Review when code structure, stack versions, commands, or service boundaries change. |
77
+ | API and event reference | Every contract change | Generated from OpenAPI and AsyncAPI sources. |
78
+ | Runbooks | 3 months | Review after incidents, operational changes, or ownership changes. |
79
+ | Active bet and TDD docs | Every material implementation change | Keep design intent aligned with delivery reality. |
80
+ | Delivered bet docs | Historical | Freeze except for explicit correction notes. |
81
+ | ADRs | Historical | Supersede instead of rewriting accepted records. |
82
+ | Agent skills | Every skill or mapped docs change | Validate trigger logic, context routing, and verification steps. |
83
+
84
+ ## Anti-patterns we reject
85
+
86
+ - **Skill files as shadow docs.** A skill that duplicates durable engineering policy becomes stale faster than the canonical docs page.
87
+ - **Docs pages as prompts.** Documentation should explain systems and decisions; skills should instruct agents how to act.
88
+ - **Documentation as an afterthought.** Docs ship with the feature or the feature is incomplete.
89
+ - **Manual reference tables.** If a table can be generated from code, contracts, or schemas, generate it.
90
+ - **Unowned pages.** A page without owner and review cadence has no maintenance path.
91
+ - **Stale diagrams.** A diagram that does not match the system is worse than no diagram because it creates false confidence.
92
+ - **Screenshots as reference.** Screenshots are acceptable as evidence in incidents, not as canonical UI or architecture documentation.
93
+ - **Marketing-flavoured engineering docs.** Assertions need evidence, examples, or source-of-truth links.
94
+ - **Overstated standards claims.** Distinguish formal standards from emerging conventions. Name the standard, its scope, and why it applies.
95
+
96
+ ## Further reading
97
+
98
+ - [Diátaxis](https://diataxis.fr) — the structural model for tutorials, how-to guides, reference, and explanation.
99
+ - [llms.txt](https://llmstxt.org) — the curated-index convention behind our AI-readable docs; adopted by developer-doc tooling and MCP clients, not honoured by major web crawlers.
100
+ - [Model Context Protocol](https://modelcontextprotocol.io) — the protocol for structured agent access to docs resources and tools.
101
+ - *Docs for Developers*, Bhatti et al. — practical guidance for engineering documentation.
102
+ - *Living Documentation*, Cyrille Martraire — using code and automation to reduce documentation drift.
@@ -0,0 +1,78 @@
1
+ ---
2
+ title: Prioritization & Appetite
3
+ description: Choosing and sizing across the portfolio — appetite as worth, stakes as the size that survives AI, and where scoring frameworks help and mislead.
4
+ status: active
5
+ last_reviewed: 2026-06-19
6
+ ---
7
+ # Prioritization & Appetite
8
+
9
+ ## TL;DR
10
+
11
+ Prioritization is the portfolio decision: of all the things worth doing, which do we commit to next, how much is each worth, and how much is at risk if we get it wrong? We size work on two axes that survive AI — **worth** (an *appetite*: how much the problem deserves, judged by opportunity cost) and **stakes** (blast radius × reversibility × the human review the work demands). The third historical axis, **effort/complexity**, is the one AI destabilized: agents change how long execution takes unpredictably — and distort our felt sense of it — so an effort estimate no longer sizes anything reliably. The unit of commitment is the **bet**: a shaped wager carrying both an appetite and a stakes read. Scoring frameworks inform that judgement; they do not replace it.
12
+
13
+ ## Why this matters
14
+
15
+ Work used to be sized on three axes that travelled together — how much it is worth, how much is at risk if it goes wrong, and how much effort it takes — and effort became the proxy for all three. Bigger estimate, bigger thing. AI broke that correlation. Agents change *execution effort* unpredictably and in both directions: the boilerplate slog and the load-bearing change can now cost the same wall-clock, and which one an agent accelerates is rarely knowable up front. Worse, the signal can no longer be read from the inside — in a 2025 randomized trial, experienced open-source developers completed familiar tasks 19% *slower* with AI tooling while believing they had worked faster (METR). So the team that still sizes by effort — or by its cousin, complexity — is anchoring on the one axis that became both noisy and untrustworthy to the gut.
16
+
17
+ Two axes survive, because they are bound by human judgement and consequence rather than by how fast the code gets written. **Worth** is what *appetite* has always measured — and appetite was never an estimate, so AI did not weaken it; if anything, when the cost of execution becomes unreadable, worth becomes the most stable thing left to argue about. **Stakes** is what is at risk if we are wrong, and a fast agent makes a wrong thing faster, not safer. Sizing by these two — and naming effort as the deflated axis it now is — is what keeps planning honest once the old proxy stops working.
18
+
19
+ ## Our principles
20
+
21
+ ### 1. Appetite, not estimate — worth, not effort
22
+
23
+ We set an **appetite** first — a statement of how much a problem is worth solving, fixed before the solution exists to bias it — and then design the largest version of a good solution that fits inside it. This inverts the usual flow: instead of estimating the cost of a fixed solution, we fix the worth and negotiate the solution. The question becomes "what is the best outcome we can deliver for what this is worth?" rather than "how long will this take?"
24
+
25
+ Appetite is denominated in **worth, judged by opportunity cost** — not in effort. But worth is squishy, and an appetite that stays an abstraction never bites: scope creeps to fill "worth a lot." So worth must resolve to a *hard ceiling* — one fixed, unforgeable budget the work may not exceed without an explicit re-bet. The distinction that matters is **ceiling versus estimate**, not time versus worth: a budget you design *within* is a circuit breaker (this is exactly why Shape Up caps its appetites in time — time is unforgeable), while a budget *derived from* an effort estimate is the trap AI sprung. Convert worth into whatever the binding constraint actually is — a cycle count, a headcount, a spend, or calendar time where human coordination dominates (heavy review, cross-team work) — then let that ceiling, not the solution, win every argument. If a solution cannot fit the appetite, cut scope or reject the work — never stretch the appetite to fit the solution.
26
+
27
+ ### 2. Size is stakes, not effort
28
+
29
+ The size of a bet that matters is its **stakes**: how much is at risk if we get it wrong. Three things set it, and none of them shrink when the agent speeds up:
30
+
31
+ - **Blast radius** — how much surface the change touches, and how many users or systems feel it if it is wrong.
32
+ - **Reversibility** — how cheaply a wrong call can be undone (Bezos's one-way versus two-way doors). A one-way door — a published API, a data migration, a pricing change — is high-stakes at any size; a feature flag behind which we can iterate is low, and the real cost there is treating it as if it were one-way and moving too slowly.
33
+ - **Review and judgement load** — how much a human must hold in their head to *vouch* for the work. This is the axis most specific to the AI-native shift: an agent can produce more correct-looking code than a human can actually verify, so the trust ceiling, not the typing speed, is the real bottleneck.
34
+
35
+ Stakes is what earns rigour — a high-stakes bet earns deeper discovery, tighter review, and a smaller validating increment, regardless of how little effort it takes to build. Effort and complexity are explicitly *not* the measure of size: they are the axis AI deflated, and a small-effort change to a payment path is high-stakes precisely where effort would have called it trivial. Worth says how much to invest; stakes says how carefully.
36
+
37
+ ### 3. The bet is the unit of commitment
38
+
39
+ We commit in **bets**: a shaped problem, an appetite (its worth), a stakes read, a sketch of the solution, a success signal, and explicit no-gos. The bet is deliberately small and reversible so that a wrong call costs one cycle, not a quarter — and so that we re-decide frequently with fresh information rather than locking a long plan. Between bets we are free to change direction entirely; that freedom is the point. Big up-front roadmaps trade this optionality away for a false sense of certainty.
40
+
41
+ ### 4. Prioritise the opportunity, then bound the solution
42
+
43
+ The first decision is *which opportunity* is most worth pursuing — by the size of the unmet need, how many target users feel it, and how well it serves the desired outcome. The second is how much appetite it earns. Separating these keeps the conversation honest: a large opportunity with a small appetite is a deliberate first slice; a small opportunity with a large appetite is a mistake the framing makes visible. Prioritising solutions directly skips the opportunity decision and smuggles the value question past review.
44
+
45
+ ### 5. Opportunity cost is the real currency
46
+
47
+ Saying yes to a bet is saying no to everything else that cycle could have held. We judge each candidate against that alternative, not against an absolute bar — the question is never "is this worth doing?" (almost everything is) but "is this the *best* thing to do next?" Naming the opportunity cost out loud is what turns a backlog of good ideas into a sequence of defensible choices.
48
+
49
+ ### 6. No-gos and the parking lot keep scope honest
50
+
51
+ A bet names what it is explicitly *not* building — the natural extensions a user would expect, each excluded for a stated reason and routed somewhere (a later bet, a permanent boundary, the parking lot). No-gos are how a fixed appetite stays fixed under pressure: the scope-cutting decision is made once, in the open, instead of relitigated every time the work gets hard. Parked ideas and prior sequencing instincts are inputs to the next prioritization, not commitments — appetite math that ignores them re-discovers decisions already made.
52
+
53
+ ### 7. Scoring frameworks inform; they do not decide
54
+
55
+ Frameworks like RICE, weighted scoring, or opportunity scoring are useful for *structuring* a comparison — making the inputs explicit, exposing a wildly mis-ranked item, forcing a reach-vs-impact conversation. They mislead when their output is treated as the decision: the scores are estimates dressed as arithmetic, they flatten strategy into a single number, and they reward whatever is easy to quantify over whatever matters. We use them to inform judgement and surface disagreement, then decide with judgement. The payoff is real where the inputs are real: many comparable candidates, a mature product with usage data to ground reach and impact, and stakes low enough that a mis-rank is cheap to correct. It inverts in early-stage or data-poor work, where reach and impact are guesses, and on a short slate of high-stakes bets, where ranking 1.7 against 1.3 lends false precision to a call that turns on judgement anyway. A roadmap that is the literal sort order of a scoring spreadsheet has outsourced the hardest product decision to a formula.
56
+
57
+ ## How we apply this
58
+
59
+ - The opportunity a bet pursues comes from the [continuous-discovery](continuous-discovery.md) tree — prioritization chooses among its branches; appetite bounds the chosen one.
60
+ - Stakes set how much [product risk](product-risks.md) work a bet earns: a high-stakes bet earns a discovery spike before its appetite is fixed, so we are not betting worth on an untested assumption — and `product-risks.md` §6 ("low stakes earn a lighter pass") is the same axis, governing discovery depth.
61
+ - Appetite and the bet are how [product engineering](product-engineering.md) schedules shaped work — this page is the portfolio view (choosing and sizing bets); product engineering is the per-bet view (shaping one piece of work well).
62
+
63
+ ## Anti-patterns we reject
64
+
65
+ - **Estimate-driven planning.** Fix the scope, estimate the cost, watch it balloon. Appetite exists because estimates anchor on effort, not on what the work is worth — and AI made effort the least stable thing to anchor on.
66
+ - **Sizing by complexity.** Treating "how hard is this to build" as the measure of how big a thing is. Complexity is the axis AI destabilized; it now mis-sizes high-stakes/low-effort work as trivial and low-stakes/high-effort work as major.
67
+ - **The backlog as autopilot.** A ranked list executed top-down with no fresh judgement about whether the top item is still the right bet.
68
+ - **Scoring-formula governance.** Treating a RICE or weighted-score sort as the decision rather than an input to it. The formula rewards the quantifiable, not the important.
69
+ - **Scope that expands to fill time.** No fixed appetite, so work grows until the deadline forces a messy cut nobody planned.
70
+ - **Ignoring the parking lot.** Re-deciding sequencing the user already settled because prior instincts and parked ideas were not carried into the prioritization.
71
+
72
+ ## Further reading
73
+
74
+ - *Shape Up*, Ryan Singer — appetite, betting, and the fixed-worth/variable-scope inversion (here re-denominated from time to worth, and paired with stakes).
75
+ - *Escaping the Build Trap*, Melissa Perri — why the feature-backlog-as-strategy fails and what replaces it.
76
+ - *Continuous Discovery Habits*, Teresa Torres — prioritising at the opportunity level rather than the solution level.
77
+ - *Amazon 1997 Letter to Shareholders*, Jeff Bezos — one-way vs. two-way door decisions: reserve heavyweight rigour for the irreversible.
78
+ - *Measuring the Impact of Early-2025 AI on Experienced Open-Source Developer Productivity*, METR (2025) — the randomized trial behind the claim that the effort signal is now both noisy and badly mis-perceived.