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,105 @@
1
+ // gw-bet-prose-redesign — retire the machine-readable bet artifacts for the prose model.
2
+ //
3
+ // The bet became pure prose: every machine-readable artifact is now built in code at
4
+ // Delivery. Three shapes are gone — `docs/bets/<slug>/decomposition.json` (the suite and
5
+ // git are the record), `docs/bets/<slug>/contracts/` (the prose API/data design carries the
6
+ // shapes; the canonical contract is captured from the running service into `docs/architecture/api/<service>/`),
7
+ // and the monolithic `decomposition.md` (now a browsable `decomposition/` prose tree). The
8
+ // approval baseline moved from `approval_commit` in `decomposition.json` to the git tag
9
+ // `bet/<slug>/approved` on the approved-prose commit.
10
+ //
11
+ // Restructuring a *live* bet's docs is risky, so this migration is largely ADVISORY: it
12
+ // prints the model change and names any active bet a contributor must restructure by hand.
13
+ // Where cleanup is SAFE and mechanical it acts — already-DELIVERED bets under
14
+ // `docs/bets/_archive/` (whose contracts were already captured to `docs/architecture/api/` at Validation)
15
+ // and stray `.groundwork/bets/<slug>/decomposition.json` files have their obsolete
16
+ // `decomposition.json` / `contracts/` artifacts removed. Active bets are advised, never mutated;
17
+ // their prose record (including any archived `decomposition.md`) is left untouched.
18
+ //
19
+ // Contract (migrations/README.md): forward-only, idempotent, detect-first.
20
+ // detect() is read-only (update --dry-run calls it). Node built-ins only.
21
+
22
+ const fs = require('fs');
23
+ const path = require('path');
24
+
25
+ function listDirs(dir) {
26
+ if (!fs.existsSync(dir)) return [];
27
+ return fs
28
+ .readdirSync(dir, { withFileTypes: true })
29
+ .filter((d) => d.isDirectory())
30
+ .map((d) => d.name);
31
+ }
32
+
33
+ // Obsolete artifacts that are SAFE to delete: stray .groundwork/bets/<slug>/decomposition.json
34
+ // and, under archived (delivered) bets, decomposition.json files + contracts/ directories.
35
+ function obsoleteArtifacts(targetDir) {
36
+ const out = { files: [], dirs: [] };
37
+
38
+ const groundworkBets = path.join(targetDir, '.groundwork', 'bets');
39
+ for (const slug of listDirs(groundworkBets)) {
40
+ const p = path.join(groundworkBets, slug, 'decomposition.json');
41
+ if (fs.existsSync(p)) out.files.push(p);
42
+ }
43
+
44
+ const archive = path.join(targetDir, 'docs', 'bets', '_archive');
45
+ for (const slug of listDirs(archive)) {
46
+ const j = path.join(archive, slug, 'decomposition.json');
47
+ if (fs.existsSync(j)) out.files.push(j);
48
+ const c = path.join(archive, slug, 'contracts');
49
+ if (fs.existsSync(c)) out.dirs.push(c);
50
+ }
51
+
52
+ return out;
53
+ }
54
+
55
+ // Active (non-archived) bets still carrying an old-shape artifact — advise, never mutate.
56
+ function activeBetsNeedingAttention(targetDir) {
57
+ const betsDir = path.join(targetDir, 'docs', 'bets');
58
+ const flagged = [];
59
+ for (const slug of listDirs(betsDir)) {
60
+ if (slug === '_archive') continue;
61
+ const betDir = path.join(betsDir, slug);
62
+ const stale = [];
63
+ if (fs.existsSync(path.join(betDir, 'decomposition.md'))) stale.push('decomposition.md');
64
+ if (fs.existsSync(path.join(betDir, 'decomposition.json'))) stale.push('decomposition.json');
65
+ if (fs.existsSync(path.join(betDir, 'contracts'))) stale.push('contracts/');
66
+ if (stale.length > 0) flagged.push({ slug, stale });
67
+ }
68
+ return flagged;
69
+ }
70
+
71
+ module.exports = {
72
+ detect({ targetDir }) {
73
+ if (!fs.existsSync(path.join(targetDir, '.groundwork'))) return 'n/a'; // not a GroundWork install
74
+ const obsolete = obsoleteArtifacts(targetDir);
75
+ const active = activeBetsNeedingAttention(targetDir);
76
+ if (obsolete.files.length || obsolete.dirs.length || active.length) return 'pending';
77
+ return 'done';
78
+ },
79
+
80
+ run({ targetDir }) {
81
+ const obsolete = obsoleteArtifacts(targetDir);
82
+ for (const f of obsolete.files) fs.rmSync(f, { force: true });
83
+ for (const d of obsolete.dirs) fs.rmSync(d, { recursive: true, force: true });
84
+
85
+ const removed = obsolete.files.length + obsolete.dirs.length;
86
+ if (removed > 0) {
87
+ console.log(` Removed ${removed} obsolete bet artifact(s) (decomposition.json / contracts/) from delivered or stray bets.`);
88
+ }
89
+
90
+ console.log(' The bet is now pure prose; its machine-readable artifacts are built in code at Delivery:');
91
+ console.log(' • docs/bets/<slug>/decomposition.md → a browsable docs/bets/<slug>/decomposition/ prose tree');
92
+ console.log(' • decomposition.json is dropped — the bet-progress suite plus git history are the record');
93
+ console.log(' • docs/bets/<slug>/contracts/ is removed — the prose API/data design carries the shapes,');
94
+ console.log(' and the canonical contract is captured into docs/architecture/api/<service>/ from the running service');
95
+ console.log(' • the approval baseline is the git tag bet/<slug>/approved on the approved-prose commit');
96
+
97
+ const active = activeBetsNeedingAttention(targetDir);
98
+ if (active.length > 0) {
99
+ console.log(' Active bets still carry old-shape artifacts — restructure these by hand (left untouched here):');
100
+ for (const { slug, stale } of active) {
101
+ console.log(` • ${slug}: ${stale.join(', ')}`);
102
+ }
103
+ }
104
+ },
105
+ };
@@ -0,0 +1,37 @@
1
+ // gw-drop-test-manifest — remove orphaned bet test-manifest.json seal files.
2
+ //
3
+ // The SHA-256 test-manifest seal was removed: `./dev bet sign` no longer exists, and
4
+ // `./dev test bet` no longer verifies a manifest. An approved bet suite is now held to
5
+ // its definition of done by the approval commit + the delivery review reconciliation
6
+ // (groundwork-bet workflows 03/04). The dev-bundle update removes the `bet sign` command
7
+ // itself; this deletes the now-inert .groundwork/bets/<slug>/test-manifest.json files it
8
+ // used to write. decomposition.json and everything else under the bet dir are untouched.
9
+ //
10
+ // Contract (migrations/README.md): forward-only, idempotent, detect-first.
11
+ // detect() is read-only (update --dry-run calls it). Node built-ins only.
12
+
13
+ const fs = require('fs');
14
+ const path = require('path');
15
+
16
+ function manifestPaths(targetDir) {
17
+ const betsDir = path.join(targetDir, '.groundwork', 'bets');
18
+ if (!fs.existsSync(betsDir)) return [];
19
+ return fs
20
+ .readdirSync(betsDir, { withFileTypes: true })
21
+ .filter((d) => d.isDirectory())
22
+ .map((d) => path.join(betsDir, d.name, 'test-manifest.json'))
23
+ .filter((p) => fs.existsSync(p));
24
+ }
25
+
26
+ module.exports = {
27
+ detect({ targetDir }) {
28
+ if (!fs.existsSync(path.join(targetDir, '.groundwork'))) return 'n/a'; // not a GroundWork install
29
+ return manifestPaths(targetDir).length > 0 ? 'pending' : 'done';
30
+ },
31
+
32
+ run({ targetDir }) {
33
+ for (const p of manifestPaths(targetDir)) {
34
+ fs.rmSync(p, { force: true });
35
+ }
36
+ },
37
+ };
@@ -0,0 +1,42 @@
1
+ // gw-register-serena-mcp — registers the Serena code-intelligence MCP server in .mcp.json
2
+ // and removes the retired depwire server. init registers Serena directly; this heals older
3
+ // installs (which registered depwire, or nothing) on update. Additive toward other servers:
4
+ // only the depwire entry is removed. Every Serena consumer degrades gracefully when the
5
+ // server is absent, so the recorded completion also respects a user who removes it later.
6
+
7
+ const fs = require('fs');
8
+ const path = require('path');
9
+
10
+ const SERENA_MCP_SERVER = {
11
+ command: 'uvx',
12
+ args: ['--from', 'serena-agent==1.5.3', 'serena', 'start-mcp-server', '--context', 'ide-assistant', '--project', '.'],
13
+ };
14
+
15
+ module.exports = {
16
+ detect({ targetDir }) {
17
+ if (!fs.existsSync(path.join(targetDir, '.groundwork'))) return 'n/a';
18
+ const mcpPath = path.join(targetDir, '.mcp.json');
19
+ if (!fs.existsSync(mcpPath)) return 'pending';
20
+ try {
21
+ const servers = (JSON.parse(fs.readFileSync(mcpPath, 'utf8')).mcpServers) || {};
22
+ // Done only once Serena is present and the retired depwire server is gone.
23
+ return servers.serena && !servers.depwire ? 'done' : 'pending';
24
+ } catch {
25
+ return 'n/a'; // unparseable — touching it risks clobbering the user's file
26
+ }
27
+ },
28
+
29
+ run({ targetDir }) {
30
+ const mcpPath = path.join(targetDir, '.mcp.json');
31
+ let config = { mcpServers: {} };
32
+ if (fs.existsSync(mcpPath)) {
33
+ config = JSON.parse(fs.readFileSync(mcpPath, 'utf8'));
34
+ if (!config.mcpServers || typeof config.mcpServers !== 'object') config.mcpServers = {};
35
+ }
36
+ const hadDepwire = Boolean(config.mcpServers.depwire);
37
+ if (hadDepwire) delete config.mcpServers.depwire; // pull out the retired server
38
+ if (config.mcpServers.serena && !hadDepwire) return; // idempotent — nothing to change
39
+ config.mcpServers.serena = SERENA_MCP_SERVER;
40
+ fs.writeFileSync(mcpPath, JSON.stringify(config, null, 2));
41
+ },
42
+ };
@@ -0,0 +1,40 @@
1
+ // gw-relocate-hidden-skills — remove the orphaned .agents/groundwork/skills/ tree.
2
+ //
3
+ // Hidden methodology skills moved from .agents/groundwork/skills/ to .groundwork/skills/
4
+ // so no agent's skill scanner can pick them up. update installs the new tree at
5
+ // .groundwork/skills/ (clean-copy), but the old location is outside that copy and would
6
+ // linger as dead files. This deletes it. The promoted engineer skills under
7
+ // .agents/skills/groundwork-*-engineer/ are a different tree and are left untouched.
8
+ //
9
+ // Contract (migrations/README.md): forward-only, idempotent, detect-first.
10
+ // detect() is read-only (update --dry-run calls it). Node built-ins only.
11
+
12
+ const fs = require('fs');
13
+ const path = require('path');
14
+
15
+ function oldHiddenDir(targetDir) {
16
+ return path.join(targetDir, '.agents', 'groundwork', 'skills');
17
+ }
18
+
19
+ module.exports = {
20
+ detect({ targetDir }) {
21
+ if (!fs.existsSync(path.join(targetDir, '.groundwork'))) return 'n/a'; // not a GroundWork install
22
+ return fs.existsSync(oldHiddenDir(targetDir)) ? 'pending' : 'done';
23
+ },
24
+
25
+ run({ targetDir }) {
26
+ const dir = oldHiddenDir(targetDir);
27
+ if (fs.existsSync(dir)) {
28
+ fs.rmSync(dir, { recursive: true, force: true });
29
+ }
30
+ // Drop the now-empty .agents/groundwork/ wrapper so nothing dangling remains.
31
+ const wrapper = path.join(targetDir, '.agents', 'groundwork');
32
+ try {
33
+ if (fs.existsSync(wrapper) && fs.readdirSync(wrapper).length === 0) {
34
+ fs.rmdirSync(wrapper);
35
+ }
36
+ } catch {
37
+ /* a non-empty or racing wrapper is fine — leave it */
38
+ }
39
+ },
40
+ };
@@ -0,0 +1,24 @@
1
+ // gw-seed-config-toml — installs the user-owned config file on installs that
2
+ // predate it. init seeds config.toml once and update never touches it (it is
3
+ // user-owned), so projects initialized before the file existed never get one.
4
+ // Seeding the commented default is purely additive: an empty/absent file and the
5
+ // default behave identically, so this cannot change behavior.
6
+
7
+ const fs = require('fs');
8
+ const path = require('path');
9
+
10
+ module.exports = {
11
+ detect({ targetDir }) {
12
+ if (!fs.existsSync(path.join(targetDir, '.groundwork'))) return 'n/a';
13
+ return fs.existsSync(path.join(targetDir, '.groundwork', 'config', 'config.toml'))
14
+ ? 'done'
15
+ : 'pending';
16
+ },
17
+
18
+ run({ targetDir, packageRoot }) {
19
+ const src = path.join(packageRoot, 'src', 'config', 'config.toml');
20
+ const dest = path.join(targetDir, '.groundwork', 'config', 'config.toml');
21
+ fs.mkdirSync(path.dirname(dest), { recursive: true });
22
+ fs.copyFileSync(src, dest);
23
+ },
24
+ };
@@ -0,0 +1,40 @@
1
+ {
2
+ "registry_version": 1,
3
+ "migrations": [
4
+ {
5
+ "id": "gw-seed-config-toml",
6
+ "version": "0.10.0",
7
+ "title": "Seed .groundwork/config/config.toml",
8
+ "kind": "cli",
9
+ "summary": "Installs the user-owned config file on installs that predate it. init seeds it once; update never touched it, so older installs have none."
10
+ },
11
+ {
12
+ "id": "gw-register-serena-mcp",
13
+ "version": "0.10.0",
14
+ "title": "Register the Serena code-intelligence MCP server",
15
+ "kind": "cli",
16
+ "summary": "Adds the Serena MCP server to .mcp.json and removes the retired depwire server. Idempotent; only the depwire entry is removed, other servers are untouched."
17
+ },
18
+ {
19
+ "id": "gw-relocate-hidden-skills",
20
+ "version": "0.10.0",
21
+ "title": "Remove the orphaned .agents/groundwork/skills/ tree",
22
+ "kind": "cli",
23
+ "summary": "Hidden methodology skills moved to .groundwork/skills/ so no agent skill scanner can pick them up. update installs the new tree; this deletes the old .agents/groundwork/skills/ location. Promoted engineer skills under .agents/skills/ are untouched."
24
+ },
25
+ {
26
+ "id": "gw-drop-test-manifest",
27
+ "version": "0.10.0",
28
+ "title": "Remove orphaned bet test-manifest.json seal files",
29
+ "kind": "cli",
30
+ "summary": "The SHA-256 test-manifest seal was removed (./dev bet sign is gone; ./dev test bet no longer verifies a manifest). The dev-bundle update drops the bet sign command; this deletes the now-inert .groundwork/bets/<slug>/test-manifest.json files. decomposition.json and other bet artifacts are untouched."
31
+ },
32
+ {
33
+ "id": "gw-bet-prose-redesign",
34
+ "version": "0.10.0",
35
+ "title": "Retire the machine-readable bet artifacts for the prose model",
36
+ "kind": "cli",
37
+ "summary": "The bet is now pure prose: decomposition.md became a docs/bets/<slug>/decomposition/ tree, decomposition.json is dropped (the suite + git are the record), docs/bets/<slug>/contracts/ is removed (the prose design carries shapes; the canonical contract is captured into docs/architecture/api/<service>/ from running code), and the approval baseline is the git tag bet/<slug>/approved. Mechanically removes obsolete decomposition.json/contracts/ from archived (delivered) bets and stray .groundwork/bets/<slug>/decomposition.json; the groundwork-update skill's Bets family advances any in-flight bet's prose structure."
38
+ }
39
+ ]
40
+ }
package/package.json CHANGED
@@ -1,10 +1,74 @@
1
1
  {
2
2
  "name": "groundwork-method",
3
- "version": "0.0.1",
4
- "description": "OIDC trusted publishing setup package for groundwork-method",
3
+ "version": "0.10.0",
4
+ "description": "An installable delivery system for AI-driven software development: facilitated discovery to canonical docs, generators to a booted monorepo, and a contract-gated bet delivery loop.",
5
+ "bin": {
6
+ "groundwork": "./bin/groundwork.js"
7
+ },
8
+ "engines": {
9
+ "node": ">=22"
10
+ },
11
+ "files": [
12
+ "bin/",
13
+ "lib/",
14
+ "src/",
15
+ "dist/",
16
+ "migrations/",
17
+ "generators.json",
18
+ "CHANGELOG.md"
19
+ ],
20
+ "scripts": {
21
+ "test": "echo \"Error: no test specified\" && exit 1",
22
+ "build": "npm run build:dev-cli && tsc",
23
+ "build:dev-cli": "tsc --noEmit -p src/generators/workspace-dev-cli/cli-src/tsconfig.json && node src/generators/workspace-dev-cli/cli-src/build.mjs",
24
+ "gen:workflow-index": "node scripts/generate_workflow_index.js",
25
+ "build:grammars": "node scripts/build-grammars.mjs",
26
+ "prepublishOnly": "npm run build:dev-cli && tsc && node scripts/generate_workflow_index.js --check"
27
+ },
28
+ "generators": "./generators.json",
5
29
  "keywords": [
6
- "oidc",
7
- "trusted-publishing",
8
- "setup"
9
- ]
30
+ "ai",
31
+ "agents",
32
+ "claude",
33
+ "delivery",
34
+ "methodology",
35
+ "scaffolding",
36
+ "nx",
37
+ "architecture",
38
+ "shape-up"
39
+ ],
40
+ "author": "RNEL",
41
+ "repository": {
42
+ "type": "git",
43
+ "url": "git+https://github.com/ryannel/GroundWork.git"
44
+ },
45
+ "license": "MIT",
46
+ "devDependencies": {
47
+ "@nx/devkit": "^22.7.2",
48
+ "@tree-sitter-grammars/tree-sitter-kotlin": "1.1.0",
49
+ "@tree-sitter-grammars/tree-sitter-lua": "0.4.1",
50
+ "@types/node": "^25.8.0",
51
+ "esbuild": "^0.25.12",
52
+ "nx": "^22.7.2",
53
+ "tree-sitter-c": "0.24.1",
54
+ "tree-sitter-c-sharp": "0.23.5",
55
+ "tree-sitter-cli": "0.26.9",
56
+ "tree-sitter-cpp": "0.23.4",
57
+ "tree-sitter-dart": "1.0.0",
58
+ "tree-sitter-go": "0.25.0",
59
+ "tree-sitter-java": "0.23.5",
60
+ "tree-sitter-javascript": "0.25.0",
61
+ "tree-sitter-php": "0.24.2",
62
+ "tree-sitter-python": "0.25.0",
63
+ "tree-sitter-ruby": "0.23.1",
64
+ "tree-sitter-rust": "0.24.0",
65
+ "tree-sitter-scala": "0.24.0",
66
+ "tree-sitter-swift": "0.7.1",
67
+ "tree-sitter-typescript": "0.23.2",
68
+ "typescript": "^6.0.3"
69
+ },
70
+ "dependencies": {
71
+ "web-tree-sitter": "0.26.9",
72
+ "yaml": "^2.9.0"
73
+ }
10
74
  }
package/src/AGENTS.md ADDED
@@ -0,0 +1,36 @@
1
+ # AGENTS.md
2
+
3
+ GroundWork is installed in this project. This file is the **canonical instruction source**
4
+ for every AI coding agent that works here. Agent-specific files (e.g. `CLAUDE.md`) are
5
+ symlinks to this one — **edit `AGENTS.md`, never the symlinked copies.**
6
+
7
+ ## Start here
8
+
9
+ Run the **`groundwork-orchestrator`** skill. It reads project state and routes to the next
10
+ step — greenfield discovery, brownfield scan, or the delivery (bet) loop. Everything in
11
+ GroundWork flows from the orchestrator; you do not need to memorize the lifecycle.
12
+
13
+ This is also the entry point for **maintenance**: when you want to "update GroundWork",
14
+ "upgrade GroundWork", or bring this project up to date with the current framework, run the
15
+ orchestrator and it routes to the update lane. Do not go hunting for a CLI command or a
16
+ specific skill — the orchestrator is always the front door.
17
+
18
+ ## Where things live
19
+
20
+ - **Registered skills** (auto-loaded): `.agents/skills/` — the orchestrator, `groundwork-check`,
21
+ and any installed engineer personas.
22
+ - **Hidden methodology skills** (loaded on demand by the orchestrator): `.groundwork/skills/`.
23
+ - **Project docs**: `docs/` — product brief, architecture, lifecycle, bets, and principles.
24
+ - **Config & state**: `.groundwork/config/` — never hand-edit `state.json`.
25
+ - **Knowledge index**: `llms.txt` at the project root.
26
+
27
+ ## Agent wiring
28
+
29
+ This project is set up to be agent-agnostic from a single source of truth:
30
+
31
+ - The content above lives once in `AGENTS.md` + `.agents/`.
32
+ - Each agent reads it through symlinks created by `npx groundwork-method init`
33
+ (e.g. Claude Code: `CLAUDE.md → AGENTS.md`, `.claude → .agents`). AGENTS.md-native agents
34
+ (Cursor, Codex, OpenCode, Cline) read `AGENTS.md` and `.agents/skills/` directly.
35
+ - Add another agent later with `npx groundwork-method init --agent <name>` — non-destructive.
36
+ `AGENTS.md` never moves; only symlinks change.
@@ -0,0 +1,30 @@
1
+ # GroundWork project configuration.
2
+ #
3
+ # This file is yours: `groundwork init` seeds it once and `groundwork update`
4
+ # never touches it. All sections are optional — an empty file behaves exactly
5
+ # like no file.
6
+
7
+ # ── Defaults ────────────────────────────────────────────────────────────────
8
+ # Starting positions the facilitation skills PROPOSE during conversation.
9
+ # A default is never silently applied: the architecture and scaffold phases
10
+ # present it with reasoning and you still make the call.
11
+
12
+ [defaults]
13
+ # stack = "go" # preferred backend: go | python
14
+ # frontend = "nextjs" # preferred frontend generator
15
+ # llm_provider = "anthropic" # provider proposed for AI-powered services
16
+ # llm_model = "claude-sonnet-4-6"
17
+
18
+ # Generator flags the scaffold phase proposes, keyed by generator name.
19
+ [defaults.generators]
20
+ # go-microservice = "--withPostgres"
21
+
22
+ # ── Custom skills ───────────────────────────────────────────────────────────
23
+ # Your own methodology skills, merged into the orchestrator's routing AFTER
24
+ # the built-in table — a built-in route wins any conflict. Key is the intent
25
+ # the orchestrator matches; value is the instruction file path relative to
26
+ # the project root. Keep custom skill files outside .groundwork/skills/
27
+ # (that tree is replaced by `groundwork update`).
28
+
29
+ [skills]
30
+ # "security-review" = ".agents/custom/security-review/instructions.md"
@@ -0,0 +1,5 @@
1
+ {
2
+ "version": 2,
3
+ "project_type": null,
4
+ "completed": []
5
+ }
@@ -0,0 +1,72 @@
1
+ # GroundWork Documentation Index
2
+
3
+ The canonical documents in this project, in their expected order of
4
+ relevance for AI agents working in this codebase.
5
+
6
+ *The Vision-and-direction and System documents are created by the GroundWork
7
+ setup phases and appear here as each phase commits — those links resolve once
8
+ setup runs. The other sections ship at install time.*
9
+
10
+ ## Vision and direction
11
+ - [Product Brief](docs/product-brief.md): The product's vision, users, and constraints.
12
+ - [Design System](docs/design-system.md): Interface decisions, NFRs, and design language.
13
+ - [Maturity Roadmap](docs/maturity.md): The project's assessment against the GroundWork maturity model and the tracked roadmap of open gaps.
14
+
15
+ ## How we work
16
+ - [How we work](docs/ways-of-working/how-we-work.md): The two-mode lifecycle — setup and delivery loop.
17
+ - [Units of work](docs/ways-of-working/units-of-work.md): Bets, milestones, and slices — the delivery vocabulary.
18
+ - [Documentation protocol](docs/ways-of-working/documentation.md): Living documents, drift detection, and ADR conventions.
19
+
20
+ ## Engineering principles
21
+ - [Manifesto](docs/principles/index.md): Core engineering beliefs that govern every decision.
22
+ - [Code craft](docs/principles/foundations/code-craft.md): How we write and structure code.
23
+ - [Documentation](docs/principles/foundations/documentation.md): What to document and how.
24
+ - [Testing](docs/principles/foundations/testing.md): Test strategy and coverage philosophy.
25
+ - [Product engineering](docs/principles/foundations/product-engineering.md): Shipping with user outcomes in mind.
26
+ - [Continuous discovery](docs/principles/foundations/continuous-discovery.md): Discovery as a weekly habit — the opportunity-solution tree, problem space before solution.
27
+ - [Product risks](docs/principles/foundations/product-risks.md): The four risks every bet must clear — value, usability, feasibility, viability — and killing the riskiest assumption first.
28
+ - [Success metrics](docs/principles/foundations/success-metrics.md): Designing the measure — North Star and inputs, leading vs lagging, counter-metrics, signal before ship.
29
+ - [Requirements & specs](docs/principles/foundations/requirements-and-specs.md): Evidence-grounded, testable specification — jobs-to-be-done, journeys, stable-ID requirements, Given/When/Then.
30
+ - [Prioritization & appetite](docs/principles/foundations/prioritization-and-appetite.md): Choosing and sequencing across the portfolio — appetite over estimate, the bet as the unit, scoring frameworks in their place.
31
+ - [Reliability](docs/principles/quality/reliability.md): Fault tolerance and failure modes.
32
+ - [Observability](docs/principles/quality/observability.md): Logging, tracing, and alerting.
33
+ - [Performance](docs/principles/quality/performance.md): Latency, throughput, and resource efficiency.
34
+ - [Security](docs/principles/quality/security.md): Threat modelling and secure defaults.
35
+ - [Privacy](docs/principles/quality/privacy.md): Data minimisation and consent.
36
+ - [Accessibility](docs/principles/quality/accessibility.md): Inclusive design and WCAG compliance.
37
+ - [The Day-2 Operational Baseline](docs/principles/delivery/day-2-operational-baseline.md): The stack-agnostic bar every project clears to be operable and debuggable on day two, plus the no-empty-capabilities and off-script-still-lands-well rules.
38
+ - [Developer experience](docs/principles/delivery/devex.md): Fast feedback loops and ergonomic tooling.
39
+ - [Progressive delivery](docs/principles/delivery/progressive-delivery.md): Feature flags and incremental rollout.
40
+ - [Platform](docs/principles/delivery/platform.md): Internal platform and developer self-service.
41
+ - [Cost engineering](docs/principles/delivery/cost-engineering.md): Cloud cost ownership and optimisation.
42
+ - [How we structure code](docs/principles/system-design/code-structure.md): A pure core, swappable edges, and one obvious place for everything.
43
+ - [API design](docs/principles/system-design/api-design.md): REST, gRPC, and contract-first design.
44
+ - [Integration patterns](docs/principles/system-design/integration-patterns.md): Events, queues, and service communication.
45
+ - [Real-time patterns](docs/principles/system-design/real-time.md): WebSocket, SSE, and streaming.
46
+ - [Data engineering](docs/principles/system-design/data-engineering.md): Pipelines, schemas, and analytical patterns.
47
+ - [Architecture decisions](docs/principles/system-design/architecture-decisions.md): ADRs as governed, re-evaluable records — assumptions, review triggers, supersession.
48
+ - [Evolutionary architecture](docs/principles/system-design/evolutionary-architecture.md): Designing for change — fitness functions, architecture-as-code, strangler-fig modernization, advisory governance.
49
+ - [Surface architecture](docs/principles/system-design/surface-architecture.md): Surfaces as adapters over the core — BFF seam, micro-frontends, render placement, design-system-as-contract.
50
+ - [Identity & access](docs/principles/system-design/identity-and-access.md): Authn/authz as architecture — OIDC/OAuth2.1, SPIFFE workload identity, first-class agent identity, modelled authorization.
51
+ - [Durable execution](docs/principles/system-design/durable-execution.md): Workflow-as-code — checkpointed long-running/multi-step processes, orchestration vs choreography, the substrate for durable agents.
52
+ - [AI engineering](docs/principles/ai-native/ai-engineering.md): Prompts, evals, and model integration.
53
+ - [Agent-native systems](docs/principles/ai-native/agent-native-systems.md): Designing for agentic workloads.
54
+ - [Agentic systems](docs/principles/ai-native/agentic-systems.md): Agents as first-class actors — topology, MCP/A2A/AG-UI, memory, durable execution, guardrails, oversight.
55
+ - [AI-native product](docs/principles/ai-native/ai-native-product.md): Product management for probabilistic systems — the continuous decision loop, evals as a product responsibility, dual success metrics, the three AI cost layers.
56
+ - [Design foundations](docs/principles/design/design-foundations.md): The design discipline's core beliefs — taste as input, implemented specification as output, every interface state designed.
57
+ - [Visual design](docs/principles/design/visual-design.md): Perceptual colour (OKLCH), typographic rigour, modelled light and depth, hierarchy by weight before size.
58
+ - [Layout & space](docs/principles/design/layout-and-space.md): Spacing scale, grid, intrinsic and fluid layout, container queries, density, responsiveness.
59
+ - [Interaction & motion](docs/principles/design/interaction-and-motion.md): Affordance and feedback, the full set of interface states, purposeful motion, perceived performance.
60
+ - [Usability & UX](docs/principles/design/usability-and-ux.md): Heuristics and UX laws, cognitive load, forms, error prevention, navigation and scent.
61
+ - [Design systems & tokens](docs/principles/design/design-systems-and-tokens.md): Token tiers and naming, theming, components as contracts, design-system governance.
62
+ - [AI-native design](docs/principles/design/ai-native-design.md): Designing probabilistic and generative features — latency, confidence, failure, autonomy, chat-vs-GUI.
63
+ - [Postgres](docs/principles/stack/postgres.md): Schema design, migrations, and query patterns.
64
+
65
+ ## System
66
+ - [Architecture](docs/architecture/index.md): Service topology and communication patterns.
67
+ - [Infrastructure](docs/architecture/infrastructure.md): Boot order, ports, health checks, and run commands.
68
+ - [Domain](docs/architecture/domain/): Entity definitions, lifecycle state machines, and invariants.
69
+ - [Decisions](docs/architecture/decisions/): Architectural decision records.
70
+
71
+ ## Stack principles (added by generators)
72
+ <!-- Stack-specific docs are appended here when a generator deploys them. -->
@@ -0,0 +1,90 @@
1
+ ---
2
+ title: Agent-Native Systems
3
+ description: Making APIs and docs AI-consumable — MCP, llms.txt, structured metadata, and the interfaces that let agents work alongside humans.
4
+ status: active
5
+ last_reviewed: 2026-06-19
6
+ ---
7
+ # Agent-Native Systems
8
+
9
+ ## TL;DR
10
+
11
+ AI agents read our APIs, our events, and our documentation programmatically. Building agent-native systems means designing every interface — contract, spec, doc page — so that an agent can consume it without a human translator in the loop. MCP for structured tool surfaces, machine-readable docs for retrieval, stable error codes, rich OpenAPI examples — the pieces compose into a system agents can work inside. The catch: an agent is an *untrusted, retrying, context-limited* consumer, and the parts of this stack that are genuinely durable are not the same as the parts the market is currently hyping.
12
+
13
+ ## Why this matters
14
+
15
+ The organisation that takes agent-readiness seriously in 2026 gets a multiplier on every engineer's output. Agents write code faster, answer questions faster, and onboard faster when the systems they are working against are designed for them. The organisation that treats agent-readiness as an afterthought pays the cost in a constant low-grade friction: agents that need babysitting, outputs that need correction, onboarding that requires a human bootstrapping step for every task.
16
+
17
+ The investment is mostly the same hygiene that serves human engineers — typed contracts, worked examples, stable error codes. That overlap is the point: agent-readiness is rarely a separate budget line, and the work that pays off is the work you would defend on its own merits anyway. Be suspicious of any "agent-ready" task that only helps agents; it is usually a bet on a convention that has not earned its keep.
18
+
19
+ ## Our principles
20
+
21
+ ### 1. Every interface has a machine-consumable specification
22
+
23
+ HTTP endpoints have OpenAPI; events have AsyncAPI; the tools an agent should use have MCP schemas; documentation has machine-readable exports. An interface without a machine-consumable spec is off-limits to agents by default — and, in practice, hard for humans to integrate against too. This is the load-bearing principle of the whole page; the rest are refinements of it.
24
+
25
+ ### 2. Specifications include descriptions, examples, and constraints
26
+
27
+ A spec that says a field is `string` without saying what the string represents is a spec an agent cannot use correctly. We write descriptions, give examples, enumerate finite domains, and state constraints explicitly. The standard is: a competent agent should be able to use the interface without reading the implementation.
28
+
29
+ Worked examples carry more weight than prose. A concrete sample invocation disambiguates a schema faster than a paragraph of description, and model providers now treat examples as first-class — Anthropic's tool-use examples and OpenAI's schema examples both exist because example-grounding measurably improves correct tool use. When you have one good description and one good example to write, write the example.
30
+
31
+ ### 3. MCP is our standard tool surface — and we treat it as an attack surface
32
+
33
+ When we want agents to *act* on the system beyond reading, we expose the capability through a Model Context Protocol server. This is no longer a bet: MCP launched November 2024 and within a year was adopted across Anthropic, OpenAI, Google, Microsoft, and AWS and placed under vendor-neutral foundation governance. It is the interop layer. A bespoke prompt-engineering integration is the deprecated pattern.
34
+
35
+ Two things that "MCP is the standard" does not let you skip:
36
+
37
+ **Security.** An MCP tool's *description and output are model input* — they steer the agent. That makes them an injection vector, not just metadata. The documented failure modes are real and named (OWASP published an MCP Top 10 in 2025): tool poisoning (malicious instructions hidden in a tool description the user never sees), rug pulls (a trusted tool silently mutating its behaviour after approval), and prompt injection riding in on tool *results* from upstream data. The 2025 Supabase/Cursor incident — a privileged agent reading attacker-controlled support tickets as instructions and exfiltrating tokens — is the canonical example. So: tool descriptions and tool outputs are untrusted input. Servers run least-privilege (scoped credentials per tool, never a blanket service-role key), destructive or irreversible operations require an out-of-band confirmation step, and tool definitions are version-pinned and re-reviewed on change rather than trusted on first approval.
38
+
39
+ **Scale.** Loading every tool's full schema into context up front does not scale — a large surface can burn six figures of tokens before the agent does any work, and a model reasoning over hundreds of tools picks worse. The decision rule: under ~20 stable tools, define them directly. Past that, do not flatten everything into the context window — use on-demand tool discovery (defer loading; let the agent search for the tool it needs) or let the agent *write code* against a typed API instead of issuing one tool call per step. Anthropic's November 2025 code-execution-with-MCP work reported the latter taking a ~150K-token tool surface down to ~2K. This is the same instinct as the next anti-pattern, made quantitative.
40
+
41
+ ### 4. Documentation ships in a machine-readable channel
42
+
43
+ Every docs page ships a plain-text/Markdown export an agent can fetch and read without parsing HTML, JavaScript, or rendered layout. This is the durable, uncontested half of "AI-readable docs," and we do it unconditionally: it is cheap, it serves our own retrieval and agent pipelines directly, and it degrades gracefully for any consumer.
44
+
45
+ `llms.txt` — a curated index file pointing at those exports — is the contested half, and we are deliberate about *why* we ship it. As of 2026 no major AI provider (OpenAI, Google, Anthropic, Meta) commits to reading `llms.txt` in production; Google has stated plainly it does not use the file and that it offers no search-visibility benefit, and site adoption sits around one in ten. So `llms.txt` is **not** an SEO or third-party-crawler play, and we do not justify it that way. Its real value is as an index for the agents *we* control — our own assistants, RAG indexers, and internal tooling, which can be pointed at a clean manifest instead of crawling a sitemap. Decision rule: ship the per-page `.md` exports always; ship `llms.txt` when we operate agents that will consume it, and skip it if our only argument for it is hoping someone else's crawler honours it.
46
+
47
+ ### 5. Error responses are structured, stable, and actionable
48
+
49
+ Every error carries a stable code, a human message, and machine-readable details. The code is catalogued and never renumbered. Agents branch on codes; they do not parse prose. This is the single highest-leverage API hygiene choice for agent-readiness — and it costs nothing a human integrator would not also thank you for. The detail object should carry what the caller needs to *recover*, not just diagnose: which field failed, the constraint it violated, and whether a retry could ever succeed (a `429` with backoff guidance is actionable; a bare `500` is a guessing game).
50
+
51
+ ### 6. Idempotency enables retry
52
+
53
+ Agents retry — on timeouts, on ambiguous failures, on their own re-planning. Systems that penalise retry — duplicate records, doubled charges, phantom events — cannot be worked against reliably. Every write endpoint accepts an idempotency key ([API Design](../system-design/api-design.md)); every event consumer is de-duplicating ([Integration Patterns](../system-design/integration-patterns.md)). Make the *contract* explicit too: state how long a key is honoured and what a replay returns, because an agent that cannot tell "already done" from "do it again" will eventually do it again.
54
+
55
+ ### 7. Constrain the artifact, not the reasoning
56
+
57
+ When an agent produces a structured result — a database record, an API payload, a configuration fragment — we constrain *that artifact's shape* with schema-constrained generation (JSON schema with strict mode, or tool calling) rather than free-text-then-parse. Free-text parsing is how agent pipelines become brittle, and modern strict-mode decoding makes schema conformance a near-guarantee rather than a hope.
58
+
59
+ The nuance practitioners learned the hard way: forcing a model to *reason inside* a rigid format degrades the reasoning itself. Tam et al. ("Let Me Speak Freely?", 2024) measured large accuracy drops on reasoning tasks when output was format-constrained versus free-form. So the decision rule is to separate thinking from emitting: let the model reason in prose (a scratchpad, a reasoning field, or a first turn), then emit the constrained artifact (a second turn, or a dedicated tool call). Constrain the part that has to be machine-valid; do not strangle the part that has to be correct.
60
+
61
+ Related, and often confused: structured outputs fix the *shape of an answer the model must give*; tool calling lets the model *choose whether and which action to take*. Reach for structured outputs when you always need a typed result back; reach for tool calling when the model is deciding what to do next.
62
+
63
+ ### 8. Documentation is reviewed for agent consumption
64
+
65
+ When we write a page, we ask: would an agent reading this through a text channel understand what to do? If the page assumes visual hierarchy, colour, or context that does not survive serialisation, we re-shape it. Agent-readiness is a docs quality attribute, not a separate track of work — and the reshaping (explicit structure, stated assumptions, source-form diagrams) makes the page better for the human skimming it on a phone, too.
66
+
67
+ ## How we apply this
68
+
69
+ - [API Design](../system-design/api-design.md) — the OpenAPI discipline that makes our APIs agent-consumable.
70
+ - [Documentation](../foundations/documentation.md) — the dual-audience docs stance.
71
+
72
+ ## Anti-patterns we reject
73
+
74
+ - **Auth flows that require human interaction.** A consent screen with a "click here" button is a dead end for an automated client. Design auth that supports programmatic token issuance — and scope those tokens to the task, since an agent credential is exactly what an injection attack wants to steal.
75
+ - **Prose-only error responses.** `"something went wrong"` is unusable by any automated caller.
76
+ - **Undocumented "internal" APIs.** An API without a spec is an API that agents cannot use — which means humans will be asked to do the thing an agent should be doing.
77
+ - **MCP tools that wrap everything.** An MCP server that mirrors every endpoint in the API is noise that costs tokens and degrades tool selection. Expose the capabilities agents actually need, named in the agent's vocabulary; for large surfaces, prefer on-demand discovery or code execution over loading every schema up front (Principle 3).
78
+ - **Trusting tool descriptions and tool output.** Treating an MCP tool's metadata or an upstream tool result as safe instruction is how prompt injection and tool poisoning land. It is untrusted input; gate the privileged action.
79
+ - **Documentation that leans on rendered visuals.** An architecture diagram nobody can parse from Markdown is a diagram an agent cannot read. Prefer Mermaid source in the Markdown.
80
+ - **Shipping `llms.txt` as an SEO bet.** If the only reason to add it is hope that a third-party crawler honours it, skip it — that bet has not paid off (Principle 4).
81
+
82
+ ## Further reading
83
+
84
+ - *Model Context Protocol* ([modelcontextprotocol.io](https://modelcontextprotocol.io)) — the canonical MCP specification.
85
+ - *OWASP Top 10 for MCP* — the named threat taxonomy (tool poisoning, rug pulls, injection) behind Principle 3's security stance.
86
+ - *Code execution with MCP* (Anthropic engineering, November 2025) — the tool-surface scaling argument and the code-over-tool-calls pattern.
87
+ - *llms.txt specification* ([llmstxt.org](https://llmstxt.org)) — the convention, read alongside the honest adoption picture in Principle 4.
88
+ - *"Let Me Speak Freely? A Study on the Impact of Format Restrictions on Performance of Large Language Models"* — Tam et al., 2024 ([arXiv:2408.02442](https://arxiv.org/abs/2408.02442)) — evidence for constraining the artifact, not the reasoning.
89
+ - *OpenAPI Specification* ([openapis.org](https://www.openapis.org)) — the HTTP contract format.
90
+ - *Simon Willison's blog* ([simonwillison.net](https://simonwillison.net)) — ongoing, practical commentary on the state of tooling.