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.
- package/CHANGELOG.md +781 -0
- package/LICENSE +21 -0
- package/README.md +44 -29
- package/bin/groundwork.js +1654 -0
- package/dist/src/generators/add-capability/generator.d.ts +8 -0
- package/dist/src/generators/add-capability/generator.js +60 -0
- package/dist/src/generators/add-capability/generator.js.map +1 -0
- package/dist/src/generators/cli-app/generator.d.ts +9 -0
- package/dist/src/generators/cli-app/generator.js +140 -0
- package/dist/src/generators/cli-app/generator.js.map +1 -0
- package/dist/src/generators/docs-site/generator.d.ts +5 -0
- package/dist/src/generators/docs-site/generator.js +441 -0
- package/dist/src/generators/docs-site/generator.js.map +1 -0
- package/dist/src/generators/electron-app/generator.d.ts +6 -0
- package/dist/src/generators/electron-app/generator.js +261 -0
- package/dist/src/generators/electron-app/generator.js.map +1 -0
- package/dist/src/generators/flutter-app/generator.d.ts +6 -0
- package/dist/src/generators/flutter-app/generator.js +314 -0
- package/dist/src/generators/flutter-app/generator.js.map +1 -0
- package/dist/src/generators/go-microservice/generator.d.ts +8 -0
- package/dist/src/generators/go-microservice/generator.js +232 -0
- package/dist/src/generators/go-microservice/generator.js.map +1 -0
- package/dist/src/generators/nextjs-app/generator.d.ts +8 -0
- package/dist/src/generators/nextjs-app/generator.js +294 -0
- package/dist/src/generators/nextjs-app/generator.js.map +1 -0
- package/dist/src/generators/python-microservice/generator.d.ts +13 -0
- package/dist/src/generators/python-microservice/generator.js +265 -0
- package/dist/src/generators/python-microservice/generator.js.map +1 -0
- package/dist/src/generators/shared/brand-tokens.d.ts +89 -0
- package/dist/src/generators/shared/brand-tokens.js +308 -0
- package/dist/src/generators/shared/brand-tokens.js.map +1 -0
- package/dist/src/generators/shared/capabilities.d.ts +101 -0
- package/dist/src/generators/shared/capabilities.js +279 -0
- package/dist/src/generators/shared/capabilities.js.map +1 -0
- package/dist/src/generators/shared/provenance.d.ts +2 -0
- package/dist/src/generators/shared/provenance.js +85 -0
- package/dist/src/generators/shared/provenance.js.map +1 -0
- package/dist/src/generators/shared/scaffold-helpers.d.ts +72 -0
- package/dist/src/generators/shared/scaffold-helpers.js +309 -0
- package/dist/src/generators/shared/scaffold-helpers.js.map +1 -0
- package/dist/src/generators/system-test-runner/generator.d.ts +23 -0
- package/dist/src/generators/system-test-runner/generator.js +125 -0
- package/dist/src/generators/system-test-runner/generator.js.map +1 -0
- package/dist/src/generators/workspace-dev-cli/generator.d.ts +7 -0
- package/dist/src/generators/workspace-dev-cli/generator.js +138 -0
- package/dist/src/generators/workspace-dev-cli/generator.js.map +1 -0
- package/generators.json +57 -0
- package/lib/repo-map/grammars/tree-sitter-c.wasm +0 -0
- package/lib/repo-map/grammars/tree-sitter-cpp.wasm +0 -0
- package/lib/repo-map/grammars/tree-sitter-csharp.wasm +0 -0
- package/lib/repo-map/grammars/tree-sitter-dart.wasm +0 -0
- package/lib/repo-map/grammars/tree-sitter-go.wasm +0 -0
- package/lib/repo-map/grammars/tree-sitter-java.wasm +0 -0
- package/lib/repo-map/grammars/tree-sitter-javascript.wasm +0 -0
- package/lib/repo-map/grammars/tree-sitter-kotlin.wasm +0 -0
- package/lib/repo-map/grammars/tree-sitter-lua.wasm +0 -0
- package/lib/repo-map/grammars/tree-sitter-php.wasm +0 -0
- package/lib/repo-map/grammars/tree-sitter-python.wasm +0 -0
- package/lib/repo-map/grammars/tree-sitter-ruby.wasm +0 -0
- package/lib/repo-map/grammars/tree-sitter-rust.wasm +0 -0
- package/lib/repo-map/grammars/tree-sitter-scala.wasm +0 -0
- package/lib/repo-map/grammars/tree-sitter-swift.wasm +0 -0
- package/lib/repo-map/grammars/tree-sitter-tsx.wasm +0 -0
- package/lib/repo-map/grammars/tree-sitter-typescript.wasm +0 -0
- package/lib/repo-map/index.js +386 -0
- package/lib/repo-map/languages.js +514 -0
- package/lib/repo-map/pagerank.js +59 -0
- package/migrations/README.md +60 -0
- package/migrations/_template/cli-migration.js +27 -0
- package/migrations/gw-bet-prose-redesign.js +105 -0
- package/migrations/gw-drop-test-manifest.js +37 -0
- package/migrations/gw-register-serena-mcp.js +42 -0
- package/migrations/gw-relocate-hidden-skills.js +40 -0
- package/migrations/gw-seed-config-toml.js +24 -0
- package/migrations/index.json +40 -0
- package/package.json +70 -6
- package/src/AGENTS.md +36 -0
- package/src/config/config.toml +30 -0
- package/src/config/groundwork-state.json +5 -0
- package/src/docs/llms.txt +72 -0
- package/src/docs/principles/ai-native/agent-native-systems.md +90 -0
- package/src/docs/principles/ai-native/agentic-systems.md +78 -0
- package/src/docs/principles/ai-native/ai-engineering.md +100 -0
- package/src/docs/principles/ai-native/ai-native-product.md +76 -0
- package/src/docs/principles/delivery/cost-engineering.md +89 -0
- package/src/docs/principles/delivery/day-2-operational-baseline.md +57 -0
- package/src/docs/principles/delivery/devex.md +88 -0
- package/src/docs/principles/delivery/platform.md +101 -0
- package/src/docs/principles/delivery/progressive-delivery.md +92 -0
- package/src/docs/principles/design/ai-native-design.md +73 -0
- package/src/docs/principles/design/design-foundations.md +80 -0
- package/src/docs/principles/design/design-systems-and-tokens.md +72 -0
- package/src/docs/principles/design/interaction-and-motion.md +69 -0
- package/src/docs/principles/design/layout-and-space.md +72 -0
- package/src/docs/principles/design/usability-and-ux.md +68 -0
- package/src/docs/principles/design/visual-design.md +84 -0
- package/src/docs/principles/foundations/code-craft.md +86 -0
- package/src/docs/principles/foundations/continuous-discovery.md +75 -0
- package/src/docs/principles/foundations/documentation.md +102 -0
- package/src/docs/principles/foundations/prioritization-and-appetite.md +78 -0
- package/src/docs/principles/foundations/product-engineering.md +90 -0
- package/src/docs/principles/foundations/product-risks.md +89 -0
- package/src/docs/principles/foundations/requirements-and-specs.md +80 -0
- package/src/docs/principles/foundations/success-metrics.md +66 -0
- package/src/docs/principles/foundations/testing.md +82 -0
- package/src/docs/principles/index.md +23 -0
- package/src/docs/principles/quality/accessibility.md +88 -0
- package/src/docs/principles/quality/observability.md +84 -0
- package/src/docs/principles/quality/performance.md +84 -0
- package/src/docs/principles/quality/privacy.md +92 -0
- package/src/docs/principles/quality/reliability.md +89 -0
- package/src/docs/principles/quality/security.md +78 -0
- package/src/docs/principles/stack/postgres.md +100 -0
- package/src/docs/principles/system-design/api-design.md +86 -0
- package/src/docs/principles/system-design/architecture-decisions.md +81 -0
- package/src/docs/principles/system-design/code-structure.md +104 -0
- package/src/docs/principles/system-design/data-engineering.md +87 -0
- package/src/docs/principles/system-design/durable-execution.md +89 -0
- package/src/docs/principles/system-design/evolutionary-architecture.md +81 -0
- package/src/docs/principles/system-design/identity-and-access.md +76 -0
- package/src/docs/principles/system-design/integration-patterns.md +84 -0
- package/src/docs/principles/system-design/real-time.md +83 -0
- package/src/docs/principles/system-design/surface-architecture.md +74 -0
- package/src/docs/ways-of-working/documentation.md +69 -0
- package/src/docs/ways-of-working/how-we-work.md +76 -0
- package/src/docs/ways-of-working/units-of-work.md +40 -0
- package/src/engineer-skills/groundwork-electron-engineer/SKILL.md +118 -0
- package/src/engineer-skills/groundwork-electron-engineer/references/ipc-contracts.md +138 -0
- package/src/engineer-skills/groundwork-electron-engineer/references/packaging-and-updates.md +82 -0
- package/src/engineer-skills/groundwork-electron-engineer/references/process-model.md +94 -0
- package/src/engineer-skills/groundwork-electron-engineer/references/security.md +107 -0
- package/src/engineer-skills/groundwork-electron-engineer/references/testing-and-smoke.md +107 -0
- package/src/engineer-skills/groundwork-electron-engineer/references/theming-and-tokens.md +74 -0
- package/src/engineer-skills/groundwork-electron-engineer/sync-anchor.md +14 -0
- package/src/engineer-skills/groundwork-flutter-engineer/SKILL.md +108 -0
- package/src/engineer-skills/groundwork-flutter-engineer/references/accessibility.md +92 -0
- package/src/engineer-skills/groundwork-flutter-engineer/references/architecture.md +189 -0
- package/src/engineer-skills/groundwork-flutter-engineer/references/data-and-contracts.md +136 -0
- package/src/engineer-skills/groundwork-flutter-engineer/references/navigation.md +122 -0
- package/src/engineer-skills/groundwork-flutter-engineer/references/platform-channels.md +93 -0
- package/src/engineer-skills/groundwork-flutter-engineer/references/releases-and-distribution.md +84 -0
- package/src/engineer-skills/groundwork-flutter-engineer/references/state-management.md +166 -0
- package/src/engineer-skills/groundwork-flutter-engineer/references/testing.md +135 -0
- package/src/engineer-skills/groundwork-flutter-engineer/references/theming-and-design-tokens.md +109 -0
- package/src/engineer-skills/groundwork-flutter-engineer/references/widgets-and-composition.md +123 -0
- package/src/engineer-skills/groundwork-flutter-engineer/sync-anchor.md +15 -0
- package/src/engineer-skills/groundwork-go-engineer/SKILL.md +171 -0
- package/src/engineer-skills/groundwork-go-engineer/references/api-design.md +82 -0
- package/src/engineer-skills/groundwork-go-engineer/references/architecture.md +42 -0
- package/src/engineer-skills/groundwork-go-engineer/references/capability-ports.md +50 -0
- package/src/engineer-skills/groundwork-go-engineer/references/code-craft-security.md +34 -0
- package/src/engineer-skills/groundwork-go-engineer/references/concurrency.md +108 -0
- package/src/engineer-skills/groundwork-go-engineer/references/go-services.md +77 -0
- package/src/engineer-skills/groundwork-go-engineer/references/http-handlers.md +172 -0
- package/src/engineer-skills/groundwork-go-engineer/references/implementation-patterns.md +156 -0
- package/src/engineer-skills/groundwork-go-engineer/references/integration-realtime-data.md +57 -0
- package/src/engineer-skills/groundwork-go-engineer/references/observability.md +49 -0
- package/src/engineer-skills/groundwork-go-engineer/references/postgres.md +41 -0
- package/src/engineer-skills/groundwork-go-engineer/references/reliability-performance.md +105 -0
- package/src/engineer-skills/groundwork-go-engineer/references/testing.md +139 -0
- package/src/engineer-skills/groundwork-go-engineer/sync-anchor.md +11 -0
- package/src/engineer-skills/groundwork-nextjs-engineer/SKILL.md +107 -0
- package/src/engineer-skills/groundwork-nextjs-engineer/references/architecture.md +323 -0
- package/src/engineer-skills/groundwork-nextjs-engineer/references/data-fetching.md +458 -0
- package/src/engineer-skills/groundwork-nextjs-engineer/references/documentation.md +324 -0
- package/src/engineer-skills/groundwork-nextjs-engineer/references/error-boundaries.md +383 -0
- package/src/engineer-skills/groundwork-nextjs-engineer/references/mutations-and-forms.md +396 -0
- package/src/engineer-skills/groundwork-nextjs-engineer/references/performance-and-deployment.md +947 -0
- package/src/engineer-skills/groundwork-nextjs-engineer/references/routing-and-navigation.md +405 -0
- package/src/engineer-skills/groundwork-nextjs-engineer/references/server-components.md +394 -0
- package/src/engineer-skills/groundwork-nextjs-engineer/references/tailwind-and-styling.md +134 -0
- package/src/engineer-skills/groundwork-nextjs-engineer/references/testing.md +433 -0
- package/src/engineer-skills/groundwork-nextjs-engineer/references/type-system.md +368 -0
- package/src/engineer-skills/groundwork-nextjs-engineer/references/ux-principles.md +278 -0
- package/src/engineer-skills/groundwork-nextjs-engineer/references/visual-language.md +69 -0
- package/src/engineer-skills/groundwork-nextjs-engineer/sync-anchor.md +9 -0
- package/src/engineer-skills/groundwork-python-engineer/SKILL.md +196 -0
- package/src/engineer-skills/groundwork-python-engineer/references/api-standards.md +88 -0
- package/src/engineer-skills/groundwork-python-engineer/references/architecture.md +57 -0
- package/src/engineer-skills/groundwork-python-engineer/references/async-patterns.md +103 -0
- package/src/engineer-skills/groundwork-python-engineer/references/capability-ports.md +44 -0
- package/src/engineer-skills/groundwork-python-engineer/references/database.md +88 -0
- package/src/engineer-skills/groundwork-python-engineer/references/documentation-mcp.md +167 -0
- package/src/engineer-skills/groundwork-python-engineer/references/implementation-patterns.md +166 -0
- package/src/engineer-skills/groundwork-python-engineer/references/ml-pipelines.md +119 -0
- package/src/engineer-skills/groundwork-python-engineer/references/ml-systems-ai-engineering.md +74 -0
- package/src/engineer-skills/groundwork-python-engineer/references/observability.md +57 -0
- package/src/engineer-skills/groundwork-python-engineer/references/resilience.md +126 -0
- package/src/engineer-skills/groundwork-python-engineer/references/testing.md +177 -0
- package/src/engineer-skills/groundwork-python-engineer/sync-anchor.md +13 -0
- package/src/generators/add-capability/generator.ts +70 -0
- package/src/generators/add-capability/schema.json +30 -0
- package/src/generators/capabilities/llm/capability.json +28 -0
- package/src/generators/capabilities/llm/providers/anthropic/footprint.json +13 -0
- package/src/generators/capabilities/llm/providers/anthropic/stacks/go/internal/llm/llm.go.template +102 -0
- package/src/generators/capabilities/llm/providers/anthropic/stacks/python/src/__packageName__/adapters/llm.py.template +61 -0
- package/src/generators/capabilities/llm/providers/local/footprint.json +13 -0
- package/src/generators/capabilities/llm/providers/local/stacks/go/internal/llm/llm.go.template +102 -0
- package/src/generators/capabilities/llm/providers/local/stacks/python/src/__packageName__/adapters/llm.py.template +53 -0
- package/src/generators/capabilities/llm/providers/localai/footprint.json +29 -0
- package/src/generators/capabilities/llm/providers/localai/stacks/go/internal/llm/llm.go.template +102 -0
- package/src/generators/capabilities/llm/providers/localai/stacks/python/src/__packageName__/adapters/llm.py.template +53 -0
- package/src/generators/capabilities/llm/providers/none/footprint.json +9 -0
- package/src/generators/capabilities/llm/providers/none/stacks/go/internal/llm/llm.go.template +35 -0
- package/src/generators/capabilities/llm/providers/none/stacks/python/src/__packageName__/adapters/llm.py.template +25 -0
- package/src/generators/capabilities/llm/providers/ollama/footprint.json +20 -0
- package/src/generators/capabilities/llm/providers/ollama/stacks/go/internal/llm/llm.go.template +102 -0
- package/src/generators/capabilities/llm/providers/ollama/stacks/python/src/__packageName__/adapters/llm.py.template +53 -0
- package/src/generators/capabilities/llm/providers/openai/footprint.json +13 -0
- package/src/generators/capabilities/llm/providers/openai/stacks/go/internal/llm/llm.go.template +98 -0
- package/src/generators/capabilities/llm/providers/openai/stacks/python/src/__packageName__/adapters/llm.py.template +60 -0
- package/src/generators/capabilities/llm/stacks/go/internal/core/service/llm.go.template +12 -0
- package/src/generators/capabilities/llm/stacks/go/internal/llm/llm_test.go.template +33 -0
- package/src/generators/capabilities/llm/stacks/python/src/__packageName__/core/llm.py.template +15 -0
- package/src/generators/capabilities/llm/stacks/python/tests/contracts/test_llm.py.template +37 -0
- package/src/generators/cli-app/files/README.md.template +76 -0
- package/src/generators/cli-app/files/build.mjs.template +15 -0
- package/src/generators/cli-app/files/package.json.template +21 -0
- package/src/generators/cli-app/files/src/cli.ts.template +67 -0
- package/src/generators/cli-app/files/src/commands/hello.ts.template +17 -0
- package/src/generators/cli-app/files/src/commands/status.ts.template +23 -0
- package/src/generators/cli-app/files/src/core/client.test.ts.template +80 -0
- package/src/generators/cli-app/files/src/core/client.ts.template +64 -0
- package/src/generators/cli-app/files/src/registry.test.ts.template +35 -0
- package/src/generators/cli-app/files/src/registry.ts.template +31 -0
- package/src/generators/cli-app/files/tsconfig.json.template +16 -0
- package/src/generators/cli-app/files/tsconfig.test.json.template +11 -0
- package/src/generators/cli-app/generator.ts +138 -0
- package/src/generators/cli-app/schema.json +24 -0
- package/src/generators/docs-site/files/.gitignore.ejs +40 -0
- package/src/generators/docs-site/files/app/docs/__slug__/page.tsx +101 -0
- package/src/generators/docs-site/files/app/docs/layout.tsx +14 -0
- package/src/generators/docs-site/files/app/docs.css +43 -0
- package/src/generators/docs-site/files/app/layout.tsx +24 -0
- package/src/generators/docs-site/files/app/page.tsx +135 -0
- package/src/generators/docs-site/files/app/source.ts +8 -0
- package/src/generators/docs-site/files/components/mermaid.tsx +67 -0
- package/src/generators/docs-site/files/next.config.mjs +10 -0
- package/src/generators/docs-site/files/package.json +32 -0
- package/src/generators/docs-site/files/pnpm-workspace.yaml +7 -0
- package/src/generators/docs-site/files/postcss.config.mjs +6 -0
- package/src/generators/docs-site/files/source.config.ts +77 -0
- package/src/generators/docs-site/files/tailwind.config.js +10 -0
- package/src/generators/docs-site/files/tsconfig.json +27 -0
- package/src/generators/docs-site/generator.ts +476 -0
- package/src/generators/docs-site/schema.json +17 -0
- package/src/generators/electron-app/docs/principles/stack/electron/index.md +47 -0
- package/src/generators/electron-app/docs/principles/stack/electron/ipc-contracts.md +71 -0
- package/src/generators/electron-app/docs/principles/stack/electron/packaging-and-updates.md +59 -0
- package/src/generators/electron-app/docs/principles/stack/electron/process-model.md +53 -0
- package/src/generators/electron-app/docs/principles/stack/electron/security.md +70 -0
- package/src/generators/electron-app/docs/principles/stack/typescript/frontend.md +65 -0
- package/src/generators/electron-app/files/.gitignore.template +20 -0
- package/src/generators/electron-app/files/README.md.template +125 -0
- package/src/generators/electron-app/files/electron.vite.config.ts +31 -0
- package/src/generators/electron-app/files/eslint.config.mjs +92 -0
- package/src/generators/electron-app/files/forge.config.ts.template +44 -0
- package/src/generators/electron-app/files/package.json.template +54 -0
- package/src/generators/electron-app/files/playwright.config.ts +18 -0
- package/src/generators/electron-app/files/project.json.template +65 -0
- package/src/generators/electron-app/files/src/main/core-client.test.ts +81 -0
- package/src/generators/electron-app/files/src/main/core-client.ts +55 -0
- package/src/generators/electron-app/files/src/main/index.ts +157 -0
- package/src/generators/electron-app/files/src/main/ipc.ts +52 -0
- package/src/generators/electron-app/files/src/main/policy.test.ts +71 -0
- package/src/generators/electron-app/files/src/main/policy.ts +73 -0
- package/src/generators/electron-app/files/src/preload/index.ts +23 -0
- package/src/generators/electron-app/files/src/renderer/index.html.template +20 -0
- package/src/generators/electron-app/files/src/renderer/src/App.test.tsx +61 -0
- package/src/generators/electron-app/files/src/renderer/src/App.tsx.template +43 -0
- package/src/generators/electron-app/files/src/renderer/src/assets/main.css +40 -0
- package/src/generators/electron-app/files/src/renderer/src/env.d.ts +14 -0
- package/src/generators/electron-app/files/src/renderer/src/main.tsx +25 -0
- package/src/generators/electron-app/files/src/shared/ipc.ts +54 -0
- package/src/generators/electron-app/files/tests/smoke/app.spec.ts.template +68 -0
- package/src/generators/electron-app/files/tool/electron_exec.sh.template +83 -0
- package/src/generators/electron-app/files/tsconfig.json +7 -0
- package/src/generators/electron-app/files/tsconfig.node.json +27 -0
- package/src/generators/electron-app/files/tsconfig.web.json +22 -0
- package/src/generators/electron-app/files/vitest.config.ts +32 -0
- package/src/generators/electron-app/files/vitest.setup.ts +1 -0
- package/src/generators/electron-app/generator.ts +288 -0
- package/src/generators/electron-app/schema.json +23 -0
- package/src/generators/flutter-app/docs/principles/stack/flutter/architecture.md +78 -0
- package/src/generators/flutter-app/docs/principles/stack/flutter/index.md +38 -0
- package/src/generators/flutter-app/docs/principles/stack/flutter/platform-channels.md +51 -0
- package/src/generators/flutter-app/docs/principles/stack/flutter/releases-and-distribution.md +59 -0
- package/src/generators/flutter-app/docs/principles/stack/flutter/state-management.md +85 -0
- package/src/generators/flutter-app/docs/principles/stack/flutter/testing.md +74 -0
- package/src/generators/flutter-app/docs/principles/stack/flutter/widgets-and-composition.md +69 -0
- package/src/generators/flutter-app/files/.gitignore.template +30 -0
- package/src/generators/flutter-app/files/README.md.template +100 -0
- package/src/generators/flutter-app/files/analysis_options.yaml.template +18 -0
- package/src/generators/flutter-app/files/integration_test/app_test.dart.template +30 -0
- package/src/generators/flutter-app/files/lib/app.dart.template +24 -0
- package/src/generators/flutter-app/files/lib/config/app_config.dart +15 -0
- package/src/generators/flutter-app/files/lib/data/repositories/status_repository.dart +36 -0
- package/src/generators/flutter-app/files/lib/data/services/api_client.dart +71 -0
- package/src/generators/flutter-app/files/lib/domain/models/health_status.dart +23 -0
- package/src/generators/flutter-app/files/lib/main.dart +11 -0
- package/src/generators/flutter-app/files/lib/router.dart +23 -0
- package/src/generators/flutter-app/files/lib/ui/core/theme/app_theme.dart +110 -0
- package/src/generators/flutter-app/files/lib/ui/home/home_view.dart +89 -0
- package/src/generators/flutter-app/files/lib/ui/home/home_view_model.dart.template +38 -0
- package/src/generators/flutter-app/files/project.json.template +51 -0
- package/src/generators/flutter-app/files/pubspec.yaml.template +47 -0
- package/src/generators/flutter-app/files/test/api_client_test.dart.template +63 -0
- package/src/generators/flutter-app/files/test/fakes/fake_status_repository.dart.template +19 -0
- package/src/generators/flutter-app/files/test/home_view_test.dart.template +58 -0
- package/src/generators/flutter-app/files/tool/flutter_exec.sh.template +60 -0
- package/src/generators/flutter-app/generator.ts +362 -0
- package/src/generators/flutter-app/schema.json +23 -0
- package/src/generators/go-microservice/docs/principles/stack/go/concurrency.md +123 -0
- package/src/generators/go-microservice/docs/principles/stack/go/index.md +70 -0
- package/src/generators/go-microservice/docs/principles/stack/go/testing.md +152 -0
- package/src/generators/go-microservice/files/.air.toml.template +38 -0
- package/src/generators/go-microservice/files/.env.template +4 -0
- package/src/generators/go-microservice/files/.golangci.yml.template +82 -0
- package/src/generators/go-microservice/files/Dockerfile.dev.template +12 -0
- package/src/generators/go-microservice/files/asyncapi-pubsub.yaml.template +33 -0
- package/src/generators/go-microservice/files/asyncapi-ws.yaml.template +34 -0
- package/src/generators/go-microservice/files/cmd/api/main.go.template +149 -0
- package/src/generators/go-microservice/files/cmd/api/main_test.go.template +99 -0
- package/src/generators/go-microservice/files/cmd/worker/cleanup/main.go.template +39 -0
- package/src/generators/go-microservice/files/db/schema.sql.template +24 -0
- package/src/generators/go-microservice/files/go.mod.template +39 -0
- package/src/generators/go-microservice/files/internal/config/config.go.template +52 -0
- package/src/generators/go-microservice/files/internal/config/otel.go.template +93 -0
- package/src/generators/go-microservice/files/internal/core/domain/errors.go.template +16 -0
- package/src/generators/go-microservice/files/internal/core/domain/model.go.template +28 -0
- package/src/generators/go-microservice/files/internal/core/domain/user.go.template +13 -0
- package/src/generators/go-microservice/files/internal/core/pagination.go.template +16 -0
- package/src/generators/go-microservice/files/internal/core/service/app_service.go.template +79 -0
- package/src/generators/go-microservice/files/internal/core/service/event_hub.go.template +9 -0
- package/src/generators/go-microservice/files/internal/core/service/message_queue.go.template +10 -0
- package/src/generators/go-microservice/files/internal/core/service/outbox_repository.go.template +31 -0
- package/src/generators/go-microservice/files/internal/core/service/repository.go.template +23 -0
- package/src/generators/go-microservice/files/internal/core/service/user_repository.go.template +15 -0
- package/src/generators/go-microservice/files/internal/core/service/user_service.go.template +43 -0
- package/src/generators/go-microservice/files/internal/entrypoints/api/app_handler.go.template +108 -0
- package/src/generators/go-microservice/files/internal/entrypoints/api/auth_middleware_test.go.template +52 -0
- package/src/generators/go-microservice/files/internal/entrypoints/api/clerk_webhook.go.template +202 -0
- package/src/generators/go-microservice/files/internal/entrypoints/api/clerk_webhook_test.go.template +82 -0
- package/src/generators/go-microservice/files/internal/entrypoints/api/health_handler.go.template +80 -0
- package/src/generators/go-microservice/files/internal/entrypoints/api/idempotency/middleware.go.template +87 -0
- package/src/generators/go-microservice/files/internal/entrypoints/api/idempotency/middleware_test.go.template +76 -0
- package/src/generators/go-microservice/files/internal/entrypoints/api/idempotency/repository.go.template +37 -0
- package/src/generators/go-microservice/files/internal/entrypoints/api/middleware_auth.go.template +40 -0
- package/src/generators/go-microservice/files/internal/entrypoints/api/middleware_loadshed.go.template +38 -0
- package/src/generators/go-microservice/files/internal/entrypoints/api/middleware_logging.go.template +40 -0
- package/src/generators/go-microservice/files/internal/entrypoints/api/middleware_ratelimit.go.template +48 -0
- package/src/generators/go-microservice/files/internal/entrypoints/api/middleware_test.go.template +81 -0
- package/src/generators/go-microservice/files/internal/entrypoints/api/router.go.template +105 -0
- package/src/generators/go-microservice/files/internal/entrypoints/api/types.go.template +70 -0
- package/src/generators/go-microservice/files/internal/entrypoints/api/websocket_handler.go.template +39 -0
- package/src/generators/go-microservice/files/internal/httpclient/http_client.go.template +87 -0
- package/src/generators/go-microservice/files/internal/kafka/kafka.go.template +34 -0
- package/src/generators/go-microservice/files/internal/postgres/postgres.go.template +195 -0
- package/src/generators/go-microservice/files/internal/postgres/postgres_test.go.template +156 -0
- package/src/generators/go-microservice/files/internal/postgres/user_repository.go.template +56 -0
- package/src/generators/go-microservice/files/internal/pubsub/gcp_pubsub.go.template +35 -0
- package/src/generators/go-microservice/files/internal/websocket/client.go.template +151 -0
- package/src/generators/go-microservice/files/internal/websocket/hub.go.template +261 -0
- package/src/generators/go-microservice/files/scripts/apply-schema.sh.template +21 -0
- package/src/generators/go-microservice/files/tools/tools.go.template +10 -0
- package/src/generators/go-microservice/generator.ts +240 -0
- package/src/generators/go-microservice/schema.json +63 -0
- package/src/generators/nextjs-app/docs/principles/stack/typescript/frontend.md +65 -0
- package/src/generators/nextjs-app/files/.dockerignore.template +7 -0
- package/src/generators/nextjs-app/files/.env.example.template +24 -0
- package/src/generators/nextjs-app/files/.gitignore.template +5 -0
- package/src/generators/nextjs-app/files/Dockerfile +53 -0
- package/src/generators/nextjs-app/files/app/(auth)/sign-in/__sign-in__/page.tsx.template +9 -0
- package/src/generators/nextjs-app/files/app/(auth)/sign-up/__sign-up__/page.tsx.template +9 -0
- package/src/generators/nextjs-app/files/app/api/config/route.ts.template +39 -0
- package/src/generators/nextjs-app/files/app/api/healthz/route.test.ts +15 -0
- package/src/generators/nextjs-app/files/app/api/healthz/route.ts +5 -0
- package/src/generators/nextjs-app/files/app/api/proxy/__path__/route.test.ts.template +55 -0
- package/src/generators/nextjs-app/files/app/api/proxy/__path__/route.ts.template +126 -0
- package/src/generators/nextjs-app/files/app/error.tsx +39 -0
- package/src/generators/nextjs-app/files/app/global-error.tsx +68 -0
- package/src/generators/nextjs-app/files/app/globals.css +105 -0
- package/src/generators/nextjs-app/files/app/layout.tsx +59 -0
- package/src/generators/nextjs-app/files/app/loading.tsx +13 -0
- package/src/generators/nextjs-app/files/app/not-found.tsx +30 -0
- package/src/generators/nextjs-app/files/app/page.tsx +20 -0
- package/src/generators/nextjs-app/files/components/providers/default.tsx +19 -0
- package/src/generators/nextjs-app/files/components/providers/production.tsx +32 -0
- package/src/generators/nextjs-app/files/components/providers/telemetry.tsx +76 -0
- package/src/generators/nextjs-app/files/components/render-smoke.test.tsx +29 -0
- package/src/generators/nextjs-app/files/components/theme-provider.tsx +11 -0
- package/src/generators/nextjs-app/files/components.json +21 -0
- package/src/generators/nextjs-app/files/eslint.config.mjs +120 -0
- package/src/generators/nextjs-app/files/hooks/use-toast.ts +7 -0
- package/src/generators/nextjs-app/files/instrumentation.ts +90 -0
- package/src/generators/nextjs-app/files/lib/api/fetcher.ts.template +130 -0
- package/src/generators/nextjs-app/files/lib/config.ts +21 -0
- package/src/generators/nextjs-app/files/lib/logger.ts +29 -0
- package/src/generators/nextjs-app/files/lib/schemas/index.ts +19 -0
- package/src/generators/nextjs-app/files/lib/utils.ts +6 -0
- package/src/generators/nextjs-app/files/next.config.mjs +9 -0
- package/src/generators/nextjs-app/files/package.json +70 -0
- package/src/generators/nextjs-app/files/postcss.config.mjs +8 -0
- package/src/generators/nextjs-app/files/proxy.test.ts.template +30 -0
- package/src/generators/nextjs-app/files/proxy.ts +31 -0
- package/src/generators/nextjs-app/files/public/.gitkeep +1 -0
- package/src/generators/nextjs-app/files/tsconfig.json +42 -0
- package/src/generators/nextjs-app/files/vitest.config.mts +15 -0
- package/src/generators/nextjs-app/files/vitest.setup.ts +7 -0
- package/src/generators/nextjs-app/generator.ts +307 -0
- package/src/generators/nextjs-app/schema.json +44 -0
- package/src/generators/python-microservice/docs/principles/stack/python/async.md +168 -0
- package/src/generators/python-microservice/docs/principles/stack/python/documentation.md +240 -0
- package/src/generators/python-microservice/docs/principles/stack/python/mcp.md +147 -0
- package/src/generators/python-microservice/docs/principles/stack/python/resilience.md +193 -0
- package/src/generators/python-microservice/docs/principles/stack/python/testing.md +281 -0
- package/src/generators/python-microservice/files/.env.example.template +30 -0
- package/src/generators/python-microservice/files/Dockerfile.template +36 -0
- package/src/generators/python-microservice/files/db/schema.sql.template +19 -0
- package/src/generators/python-microservice/files/pyproject.toml.template +76 -0
- package/src/generators/python-microservice/files/scripts/apply-schema.sh.template +25 -0
- package/src/generators/python-microservice/files/src/__packageName__/adapters/comfyui.py.template +87 -0
- package/src/generators/python-microservice/files/src/__packageName__/adapters/config.py.template +48 -0
- package/src/generators/python-microservice/files/src/__packageName__/adapters/database.py.template +21 -0
- package/src/generators/python-microservice/files/src/__packageName__/adapters/message_queue.py.template +29 -0
- package/src/generators/python-microservice/files/src/__packageName__/adapters/repository.py.template +130 -0
- package/src/generators/python-microservice/files/src/__packageName__/adapters/telemetry.py.template +68 -0
- package/src/generators/python-microservice/files/src/__packageName__/adapters/websocket_hub.py.template +36 -0
- package/src/generators/python-microservice/files/src/__packageName__/core/domain/entities.py.template +22 -0
- package/src/generators/python-microservice/files/src/__packageName__/core/domain/exceptions.py.template +43 -0
- package/src/generators/python-microservice/files/src/__packageName__/core/ports.py.template +42 -0
- package/src/generators/python-microservice/files/src/__packageName__/core/service/example_service.py.template +68 -0
- package/src/generators/python-microservice/files/src/__packageName__/entrypoints/api/dependencies.py.template +50 -0
- package/src/generators/python-microservice/files/src/__packageName__/entrypoints/api/middleware.py.template +131 -0
- package/src/generators/python-microservice/files/src/__packageName__/entrypoints/api/router.py.template +37 -0
- package/src/generators/python-microservice/files/src/__packageName__/entrypoints/api/websocket_handler.py.template +20 -0
- package/src/generators/python-microservice/files/src/__packageName__/entrypoints/worker/cleanup.py.template +35 -0
- package/src/generators/python-microservice/files/src/__packageName__/entrypoints/worker/worker.py.template +28 -0
- package/src/generators/python-microservice/files/src/__packageName__/main.py.template +108 -0
- package/src/generators/python-microservice/files/tests/test_main.py.template +74 -0
- package/src/generators/python-microservice/files/tests/test_middleware.py.template +109 -0
- package/src/generators/python-microservice/files/tests/test_worker.py.template +16 -0
- package/src/generators/python-microservice/generator.ts +286 -0
- package/src/generators/python-microservice/schema.json +86 -0
- package/src/generators/shared/brand-tokens.ts +301 -0
- package/src/generators/shared/capabilities.ts +349 -0
- package/src/generators/shared/provenance.ts +61 -0
- package/src/generators/shared/scaffold-helpers.ts +309 -0
- package/src/generators/system-test-runner/files/tests/bets/.gitkeep +0 -0
- package/src/generators/system-test-runner/files/tests/bets/_archive/.gitkeep +0 -0
- package/src/generators/system-test-runner/files/tests/conftest.py.template +503 -0
- package/src/generators/system-test-runner/files/tests/pyproject.toml.template +20 -0
- package/src/generators/system-test-runner/files/tests/system/pages/__init__.py.template +9 -0
- package/src/generators/system-test-runner/files/tests/system/pages/base_page.py.template +36 -0
- package/src/generators/system-test-runner/files/tests/system/test_a11y_smoke.py.template +132 -0
- package/src/generators/system-test-runner/files/tests/system/test_contract_conformance.py.template +140 -0
- package/src/generators/system-test-runner/files/tests/system/test_layout_geometry.py.template +109 -0
- package/src/generators/system-test-runner/files/tests/system/test_render_smoke.py.template +227 -0
- package/src/generators/system-test-runner/files/tests/system/test_system.py.template +158 -0
- package/src/generators/system-test-runner/files/tests/system/test_token_conformance.py.template +206 -0
- package/src/generators/system-test-runner/files/tests/system/test_visual_regression.py.template +104 -0
- package/src/generators/system-test-runner/generator.ts +142 -0
- package/src/generators/system-test-runner/schema.json +24 -0
- package/src/generators/workspace-dev-cli/cli-src/build.mjs +42 -0
- package/src/generators/workspace-dev-cli/cli-src/dist/dev-bundle.js +2168 -0
- package/src/generators/workspace-dev-cli/cli-src/src/commands/bet.ts +442 -0
- package/src/generators/workspace-dev-cli/cli-src/src/commands/completion.ts +87 -0
- package/src/generators/workspace-dev-cli/cli-src/src/commands/doctor.ts +139 -0
- package/src/generators/workspace-dev-cli/cli-src/src/commands/lifecycle.ts +548 -0
- package/src/generators/workspace-dev-cli/cli-src/src/commands/quality.ts +127 -0
- package/src/generators/workspace-dev-cli/cli-src/src/commands/surface.ts +214 -0
- package/src/generators/workspace-dev-cli/cli-src/src/index.ts +127 -0
- package/src/generators/workspace-dev-cli/cli-src/src/registry.ts +194 -0
- package/src/generators/workspace-dev-cli/cli-src/src/theme/color.ts +130 -0
- package/src/generators/workspace-dev-cli/cli-src/src/theme/render.ts +158 -0
- package/src/generators/workspace-dev-cli/cli-src/src/theme/tokens.ts +122 -0
- package/src/generators/workspace-dev-cli/cli-src/src/util/context.ts +43 -0
- package/src/generators/workspace-dev-cli/cli-src/src/util/extensions.ts +99 -0
- package/src/generators/workspace-dev-cli/cli-src/src/util/paths.ts +46 -0
- package/src/generators/workspace-dev-cli/cli-src/src/util/proc.ts +106 -0
- package/src/generators/workspace-dev-cli/cli-src/src/util/prompt.ts +108 -0
- package/src/generators/workspace-dev-cli/cli-src/src/util/runners.ts +70 -0
- package/src/generators/workspace-dev-cli/cli-src/src/util/services.ts +221 -0
- package/src/generators/workspace-dev-cli/cli-src/src/util/version.ts +21 -0
- package/src/generators/workspace-dev-cli/cli-src/tsconfig.json +16 -0
- package/src/generators/workspace-dev-cli/files/.agents/skills/workspace-cli/SKILL.md.template +74 -0
- package/src/generators/workspace-dev-cli/files/dev.template +16 -0
- package/src/generators/workspace-dev-cli/files/docker-compose.yml.template +20 -0
- package/src/generators/workspace-dev-cli/files/scripts/cli/templates/milestone-test.pytmpl.template +46 -0
- package/src/generators/workspace-dev-cli/files/scripts/cli/templates/slice-test.pytmpl.template +38 -0
- package/src/generators/workspace-dev-cli/generator.ts +136 -0
- package/src/generators/workspace-dev-cli/schema.json +22 -0
- package/src/hidden-skills/code-intelligence.md +129 -0
- package/src/hidden-skills/groundwork-architect/SKILL.md +114 -0
- package/src/hidden-skills/groundwork-architect/references/agentic-systems.md +44 -0
- package/src/hidden-skills/groundwork-architect/references/ai-native-architecture.md +37 -0
- package/src/hidden-skills/groundwork-architect/references/api-and-contracts.md +45 -0
- package/src/hidden-skills/groundwork-architect/references/core-and-boundaries.md +45 -0
- package/src/hidden-skills/groundwork-architect/references/data-architecture.md +33 -0
- package/src/hidden-skills/groundwork-architect/references/decision-records.md +34 -0
- package/src/hidden-skills/groundwork-architect/references/durable-execution.md +45 -0
- package/src/hidden-skills/groundwork-architect/references/evolutionary-architecture.md +37 -0
- package/src/hidden-skills/groundwork-architect/references/identity-and-access.md +41 -0
- package/src/hidden-skills/groundwork-architect/references/integration-patterns.md +39 -0
- package/src/hidden-skills/groundwork-architect/references/observability.md +36 -0
- package/src/hidden-skills/groundwork-architect/references/performance-and-scale.md +41 -0
- package/src/hidden-skills/groundwork-architect/references/platform-and-delivery.md +47 -0
- package/src/hidden-skills/groundwork-architect/references/realtime-and-async.md +28 -0
- package/src/hidden-skills/groundwork-architect/references/reliability.md +31 -0
- package/src/hidden-skills/groundwork-architect/references/security-and-trust.md +47 -0
- package/src/hidden-skills/groundwork-architect/references/surface-architecture.md +40 -0
- package/src/hidden-skills/groundwork-architect/sync-anchor.md +34 -0
- package/src/hidden-skills/groundwork-architecture/architecture-template.md +50 -0
- package/src/hidden-skills/groundwork-architecture/instructions.md +139 -0
- package/src/hidden-skills/groundwork-architecture/phases/01-context-ingestion.md +18 -0
- package/src/hidden-skills/groundwork-architecture/phases/02-technical-constraints.md +27 -0
- package/src/hidden-skills/groundwork-architecture/phases/03-service-design.md +19 -0
- package/src/hidden-skills/groundwork-architecture/phases/04-data-flow-communication.md +23 -0
- package/src/hidden-skills/groundwork-architecture/phases/05-component-boundaries-contracts.md +17 -0
- package/src/hidden-skills/groundwork-architecture/phases/06-draft-review-present.md +38 -0
- package/src/hidden-skills/groundwork-architecture/phases/07-commit.md +33 -0
- package/src/hidden-skills/groundwork-architecture/templates/architecture-cache.md +43 -0
- package/src/hidden-skills/groundwork-architecture-extract/instructions.md +163 -0
- package/src/hidden-skills/groundwork-architecture-extract/templates/architecture-extract-cache.md +21 -0
- package/src/hidden-skills/groundwork-bet/briefs/slice-worker.md +191 -0
- package/src/hidden-skills/groundwork-bet/instructions.md +88 -0
- package/src/hidden-skills/groundwork-bet/templates/bet-progress-test.md +126 -0
- package/src/hidden-skills/groundwork-bet/templates/change-proposal.md +38 -0
- package/src/hidden-skills/groundwork-bet/templates/decomposition/meta.json +4 -0
- package/src/hidden-skills/groundwork-bet/templates/decomposition/milestone-index.md +35 -0
- package/src/hidden-skills/groundwork-bet/templates/decomposition/slice.md +35 -0
- package/src/hidden-skills/groundwork-bet/templates/pitch.md +45 -0
- package/src/hidden-skills/groundwork-bet/templates/technical-design/01-ui-design.md +51 -0
- package/src/hidden-skills/groundwork-bet/templates/technical-design/02-data-flows.md +36 -0
- package/src/hidden-skills/groundwork-bet/templates/technical-design/03-api-design.md +90 -0
- package/src/hidden-skills/groundwork-bet/templates/technical-design/04-data-design.md +29 -0
- package/src/hidden-skills/groundwork-bet/workflows/01-discovery.md +198 -0
- package/src/hidden-skills/groundwork-bet/workflows/02-design.md +168 -0
- package/src/hidden-skills/groundwork-bet/workflows/03-decomposition.md +246 -0
- package/src/hidden-skills/groundwork-bet/workflows/04-delivery.md +193 -0
- package/src/hidden-skills/groundwork-bet/workflows/05-validation.md +199 -0
- package/src/hidden-skills/groundwork-design-system/instructions.md +125 -0
- package/src/hidden-skills/groundwork-design-system/templates/brand-tokens.md +182 -0
- package/src/hidden-skills/groundwork-design-system/templates/design-system-cache.md +64 -0
- package/src/hidden-skills/groundwork-design-system/tracks/_foundation.md +136 -0
- package/src/hidden-skills/groundwork-design-system/tracks/agentic-protocol.md +269 -0
- package/src/hidden-skills/groundwork-design-system/tracks/cli.md +355 -0
- package/src/hidden-skills/groundwork-design-system/tracks/graphical-ui.md +330 -0
- package/src/hidden-skills/groundwork-design-system-extract/instructions.md +124 -0
- package/src/hidden-skills/groundwork-design-system-extract/templates/design-system-extract-cache.md +19 -0
- package/src/hidden-skills/groundwork-designer/SKILL.md +108 -0
- package/src/hidden-skills/groundwork-designer/references/accessibility.md +33 -0
- package/src/hidden-skills/groundwork-designer/references/ai-native-design.md +37 -0
- package/src/hidden-skills/groundwork-designer/references/design-review.md +29 -0
- package/src/hidden-skills/groundwork-designer/references/design-systems-and-tokens.md +33 -0
- package/src/hidden-skills/groundwork-designer/references/interaction-and-motion.md +37 -0
- package/src/hidden-skills/groundwork-designer/references/layout-and-space.md +33 -0
- package/src/hidden-skills/groundwork-designer/references/usability-and-ux.md +33 -0
- package/src/hidden-skills/groundwork-designer/references/visual-craft.md +49 -0
- package/src/hidden-skills/groundwork-designer/sync-anchor.md +20 -0
- package/src/hidden-skills/groundwork-doc-sync/instructions.md +100 -0
- package/src/hidden-skills/groundwork-elicit/instructions.md +66 -0
- package/src/hidden-skills/groundwork-elicit/methods.md +65 -0
- package/src/hidden-skills/groundwork-infra-adopt/instructions.md +168 -0
- package/src/hidden-skills/groundwork-infra-adopt/templates/infra-adopt-cache.md +21 -0
- package/src/hidden-skills/groundwork-mvp/instructions.md +223 -0
- package/src/hidden-skills/groundwork-mvp/templates/mvp-cache.md +9 -0
- package/src/hidden-skills/groundwork-patch/instructions.md +40 -0
- package/src/hidden-skills/groundwork-persona/instructions.md +54 -0
- package/src/hidden-skills/groundwork-product/SKILL.md +102 -0
- package/src/hidden-skills/groundwork-product/references/ai-native-product.md +45 -0
- package/src/hidden-skills/groundwork-product/references/discovery-and-opportunity.md +38 -0
- package/src/hidden-skills/groundwork-product/references/product-risks.md +52 -0
- package/src/hidden-skills/groundwork-product/references/requirements-and-specs.md +39 -0
- package/src/hidden-skills/groundwork-product/references/scope-and-sequencing.md +35 -0
- package/src/hidden-skills/groundwork-product/references/shaping-and-appetite.md +48 -0
- package/src/hidden-skills/groundwork-product/references/success-metrics-and-signals.md +37 -0
- package/src/hidden-skills/groundwork-product/sync-anchor.md +19 -0
- package/src/hidden-skills/groundwork-product-brief/instructions.md +231 -0
- package/src/hidden-skills/groundwork-product-brief-extract/instructions.md +139 -0
- package/src/hidden-skills/groundwork-product-brief-extract/templates/product-brief-extract-cache.md +17 -0
- package/src/hidden-skills/groundwork-review/checklists/architecture.md +93 -0
- package/src/hidden-skills/groundwork-review/checklists/bet-pitch.md +94 -0
- package/src/hidden-skills/groundwork-review/checklists/decomposition.md +135 -0
- package/src/hidden-skills/groundwork-review/checklists/design-system.md +85 -0
- package/src/hidden-skills/groundwork-review/checklists/domain-entity.md +66 -0
- package/src/hidden-skills/groundwork-review/checklists/implementation-readiness.md +46 -0
- package/src/hidden-skills/groundwork-review/checklists/infrastructure.md +68 -0
- package/src/hidden-skills/groundwork-review/checklists/maturity.md +71 -0
- package/src/hidden-skills/groundwork-review/checklists/product-brief.md +69 -0
- package/src/hidden-skills/groundwork-review/checklists/technical-design.md +112 -0
- package/src/hidden-skills/groundwork-review/instructions.md +181 -0
- package/src/hidden-skills/groundwork-scaffold/instructions.md +254 -0
- package/src/hidden-skills/groundwork-scaffold/phases/01-ingestion-service-mapping.md +87 -0
- package/src/hidden-skills/groundwork-scaffold/phases/02-scaffolding-execution.md +15 -0
- package/src/hidden-skills/groundwork-scaffold/phases/03-service-documentation-api-stubs.md +100 -0
- package/src/hidden-skills/groundwork-scaffold/phases/04-infrastructure-verification.md +17 -0
- package/src/hidden-skills/groundwork-scaffold/phases/05-draft-review.md +19 -0
- package/src/hidden-skills/groundwork-scaffold/phases/06-commit.md +19 -0
- package/src/hidden-skills/groundwork-scaffold/templates/scaffold-cache.md +23 -0
- package/src/hidden-skills/groundwork-scan/instructions.md +164 -0
- package/src/hidden-skills/groundwork-scan/references/digest-schema.md +66 -0
- package/src/hidden-skills/groundwork-scan/references/exclusions.md +44 -0
- package/src/hidden-skills/groundwork-scan/templates/architecture-findings.md +42 -0
- package/src/hidden-skills/groundwork-scan/templates/design-findings.md +23 -0
- package/src/hidden-skills/groundwork-scan/templates/overview.md +26 -0
- package/src/hidden-skills/groundwork-scan/templates/product-findings.md +23 -0
- package/src/hidden-skills/groundwork-scan/templates/scan-state.json +19 -0
- package/src/hidden-skills/groundwork-stack-forge/instructions.md +150 -0
- package/src/hidden-skills/groundwork-stack-forge/references/authoring-engineer-skills.md +107 -0
- package/src/hidden-skills/groundwork-surface-activation/instructions.md +138 -0
- package/src/hidden-skills/groundwork-update/briefs/reconcile-worker.md +196 -0
- package/src/hidden-skills/groundwork-update/instructions.md +200 -0
- package/src/hidden-skills/groundwork-writer/SKILL.md +278 -0
- package/src/hidden-skills/maturity-model.md +125 -0
- package/src/hidden-skills/operating-contract.md +400 -0
- package/src/hidden-skills/repo-map-schema.md +90 -0
- package/src/hidden-skills/templates/adr.md +57 -0
- package/src/hidden-skills/templates/capability-ports.md +71 -0
- package/src/hidden-skills/templates/discovery-notes.md +33 -0
- package/src/hidden-skills/templates/domain-entity.md +80 -0
- package/src/hidden-skills/templates/gap-ledger.md +21 -0
- package/src/hidden-skills/templates/handoff.md +37 -0
- package/src/hidden-skills/templates/maturity.md +39 -0
- package/src/hidden-skills/templates/surfaces.md +207 -0
- package/src/skills/groundwork-check/SKILL.md +56 -0
- package/src/skills/groundwork-check/instructions.md +70 -0
- package/src/skills/groundwork-orchestrator/SKILL.md +176 -0
- package/src/skills/groundwork-orchestrator/workflow-index.md +50 -0
|
@@ -0,0 +1,400 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: operating-contract
|
|
3
|
+
version: "1"
|
|
4
|
+
description: >
|
|
5
|
+
Shared behavioral protocols every GroundWork methodology skill loads and enacts:
|
|
6
|
+
discovery notes, living documents, lifecycle modes, phase lifecycle, pacing,
|
|
7
|
+
the downstream context store, setup graduation, hand-off cache, cache isolation,
|
|
8
|
+
the review gate, and review invocation.
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# GroundWork Operating Contract
|
|
12
|
+
|
|
13
|
+
**This document is mandatory. Every GroundWork methodology skill MUST load and follow these protocols. They are non-negotiable and apply in every phase, every bet, and every conversation.**
|
|
14
|
+
|
|
15
|
+
The `version` in this file's frontmatter is the contract's major version. Skills name the contract version they were written against; a skill that expects v1 running against a v2 contract is operating on assumptions the contract no longer makes — surface the mismatch to the user instead of proceeding silently.
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## Protocol 1: Discovery Notes
|
|
20
|
+
|
|
21
|
+
Out-of-phase signals captured now save the user from repeating themselves in later phases — capture them immediately.
|
|
22
|
+
|
|
23
|
+
During any GroundWork conversation, the user will mention things that belong to a different phase — design preferences during a product brief, delivery priorities during architecture, architectural instincts during the design system phase. These signals are valuable and must be preserved.
|
|
24
|
+
|
|
25
|
+
### How It Works
|
|
26
|
+
|
|
27
|
+
During every turn, silently monitor for out-of-phase signals. When you hear one:
|
|
28
|
+
|
|
29
|
+
1. Acknowledge it naturally within the conversation if appropriate, then steer back to the current topic.
|
|
30
|
+
2. Append the signal as a new bullet under the appropriate section header in `.groundwork/cache/discovery-notes.md`. Use file editing tools — shell commands (echo, sed) corrupt markdown formatting. If the file does not exist, create it with all section headers listed below.
|
|
31
|
+
3. Continue with the next discovery question in the same turn so the user's flow is not interrupted.
|
|
32
|
+
|
|
33
|
+
### Section Headers
|
|
34
|
+
|
|
35
|
+
The discovery notes file uses these five sections. Every skill that writes or reads discovery notes uses exactly these headers — drift between writers and readers turns notes into orphans neither side can find.
|
|
36
|
+
|
|
37
|
+
| Section | What goes here |
|
|
38
|
+
|---|---|
|
|
39
|
+
| `## Product Brief` | Vision-level signals surfaced during later phases — new user types, missing capabilities, refined success criteria. Captured for in-flight batched application to `docs/product-brief.md`. |
|
|
40
|
+
| `## Design System` | Anything about **what the user sees or does** — interaction patterns, search/browse/navigation flows, aesthetic instincts, look-and-feel preferences — surfaced outside the Design System phase. The bright line vs `## Design Details`: if the signal describes the user-facing experience it goes here, even when it names a concrete mechanism (e.g. "faceted pills alongside conversational search", "more-like-this pivots"). |
|
|
41
|
+
| `## Architecture` | Infrastructure preferences, scaling instincts, technology opinions surfaced outside the architecture phase. |
|
|
42
|
+
| `## Design Details` | **Internal mechanisms the user never sees directly** — async flows, callback patterns, job lifecycles, data ownership decisions, contract format choices, resiliency patterns — from capability and boundary conversations. Feeds the Bet's Design Foundations phase when producing API contracts and data schema. Not for user-facing interaction patterns; those go to `## Design System`. |
|
|
43
|
+
| `## Bets` | Delivery priorities, MVP scope instincts, feature sequencing for future bets. Read by `groundwork-mvp` and the Bet discovery workflow. |
|
|
44
|
+
|
|
45
|
+
### When to Check
|
|
46
|
+
|
|
47
|
+
At the start of any phase, check `.groundwork/cache/discovery-notes.md` for entries under your phase's header. Treat them as pre-discovered context. Re-asking signals that were already captured wastes the user's time and erodes trust in the process. Carry this context into the relevant stages.
|
|
48
|
+
|
|
49
|
+
### Distinction from Hand-off Cache
|
|
50
|
+
|
|
51
|
+
Discovery notes capture signals *during* a conversation that belong to a different phase. The Hand-off Cache (Protocol 6) captures post-commit context that did not fit in the canonical doc. The two patterns are complementary, not alternative — a single phase typically writes to both.
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## Protocol 2: Living Documents
|
|
56
|
+
|
|
57
|
+
Documents that fall behind the conversation lose value. All `docs/` artifacts are living documents — update them as new information surfaces.
|
|
58
|
+
|
|
59
|
+
This is not restricted to a specific phase or direction. Any phase, any bet, any conversation: if new information surfaces that refines an existing document, update it immediately.
|
|
60
|
+
|
|
61
|
+
- A bet can update the product brief.
|
|
62
|
+
- Architecture can update the design system.
|
|
63
|
+
- Delivery can update architecture.
|
|
64
|
+
- A user interview can update everything.
|
|
65
|
+
|
|
66
|
+
### How to Apply Updates
|
|
67
|
+
|
|
68
|
+
- **Surgical and targeted.** Change only what new information warrants. Do not rewrite sections that remain accurate. But "surgical" is never licence to leave *inaccurate* text standing: any sentence the change makes false must be rewritten, not annotated around.
|
|
69
|
+
- **Refresh the Downstream Context if it is still live.** During setup, if the change touches a Key Decision, Binding Constraint, or Deferred Question of an upstream phase whose `.groundwork/context/<phase>.md` has not yet been torn down (Protocol 10), update that file in the same edit. After setup completes there is no context file to refresh — the published doc is the only living record.
|
|
70
|
+
- **State the current design declaratively.** Write the body as if the current design were always the design. Never leave `~~strikethrough~~` of the old choice, "(was X, now Y)" parentheticals, or "superseded by…" notes in the body — that hedging belongs in the superseding ADR alone. A doc that names both the old and the new design reads as contradictory to a downstream consumer and to the review.
|
|
71
|
+
- **Do not ask for permission.** These are refinements consistent with the user's own words and decisions, not new product choices.
|
|
72
|
+
- **Report what changed.** After committing, briefly list any documents that were updated and what specifically shifted. This change list is also the set of docs the reversal gate re-reviews (below) — keep it accurate.
|
|
73
|
+
- If no updates are warranted, skip silently.
|
|
74
|
+
|
|
75
|
+
### Refinements vs Reversals
|
|
76
|
+
|
|
77
|
+
Most Living Documents updates are **refinements**: they add detail, sharpen wording, or record a decision compatible with what the doc already commits to. Refinements need only the surgical edits above.
|
|
78
|
+
|
|
79
|
+
A **reversal** is different — it overturns a decision a prior doc already committed. Reversals are the dangerous case: they leave earlier docs describing a system that is no longer being built. A change is a **reversal** (not a refinement) if *either* of these is true:
|
|
80
|
+
|
|
81
|
+
- **(a)** you write, or mark, an ADR that *supersedes* an accepted ADR; or
|
|
82
|
+
- **(b)** your edit negates, removes, or replaces a bullet in any doc's `### Key Decisions` or `### Binding Constraints`.
|
|
83
|
+
|
|
84
|
+
When in doubt, treat it as a reversal — the cost of an unnecessary re-review is far lower than the cost of canonical docs that contradict each other.
|
|
85
|
+
|
|
86
|
+
### Reversal Protocol — reconcile, then re-gate
|
|
87
|
+
|
|
88
|
+
When a change is a reversal, before you commit:
|
|
89
|
+
|
|
90
|
+
1. **Reconcile the whole body.** Rewrite every sentence the reversal makes false, in every section of the doc. If the reversed phase's `.groundwork/context/<phase>.md` is still live, reconcile it too so it and the body describe the same single design.
|
|
91
|
+
2. **Reconcile every dependent doc that cites the reversed decision.** A reversal rarely lives in one file. Trace it into the docs that consumed it and fix them too: domain entities (`Owner:`, fields, lifecycle, events), service docs, infrastructure, and any doc that references the reversed decision.
|
|
92
|
+
3. **Record the supersession in an ADR.** The old design lives *only* in the superseding ADR (Context / Decision / what it cost), never as a residue in the body or summary.
|
|
93
|
+
4. **Re-gate: re-invoke `groundwork-review` on every mutated canonical doc.** This is the safety net the reversal exists to trip. For each doc you changed, run the review with the matching `document_type` (a mutated `docs/architecture/domain/<entity>.md` uses `document_type: domain-entity`). Apply 🔴 findings and re-review until `PRESENT`.
|
|
94
|
+
- **Domain docs are re-reviewed unconditionally on a structural reversal.** When the reversal supersedes an accepted ADR or changes an architecture `### Key Decision` / `### Binding Constraint`, re-review **every** `docs/architecture/domain/*.md` (`document_type: domain-entity`), not only the ones you remembered to edit. Domain stubs carry no summary, so nothing flags them when they drift — and "the facilitator forgot the domain docs were dependents" is the exact failure this protocol exists to prevent. The set is small and the re-review is cheap; do not gate it on your own judgement of which entities the reversal touched.
|
|
95
|
+
- **Cap and fail-closed handling:** the revise cap and the rule for a reviewer that cannot run are defined once in Protocol 8 (Review Gate), and the dispatch and failure procedure once in Protocol 9 (Review Invocation); both apply here unchanged — a re-gate that errors blocks the commit exactly as a drafting-phase review does.
|
|
96
|
+
|
|
97
|
+
**Accepted residual:** a *refinement* that introduces a minor body-only inconsistency while the live Downstream Context (if any) stays accurate is not re-gated — downstream setup phases read the Downstream Context first (Protocol 3.2.2, Protocol 5), so the drift is low-impact and is caught later by `groundwork-check`. Reversals are gated because they corrupt the cross-phase contract and the dependent docs; refinements are not, to keep the common case cheap.
|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
## Lifecycle Modes
|
|
102
|
+
|
|
103
|
+
GroundWork operates in two distinct lifecycle modes. Skills must know which mode they operate in — it determines which protocols apply.
|
|
104
|
+
|
|
105
|
+
### Sequential Setup
|
|
106
|
+
|
|
107
|
+
**Skills:** `groundwork-product-brief`, `groundwork-design-system`, `groundwork-architecture`, `groundwork-scaffold`, `groundwork-mvp`, `groundwork-product-brief-extract`, `groundwork-design-system-extract`, `groundwork-architecture-extract`, `groundwork-infra-adopt`
|
|
108
|
+
|
|
109
|
+
All protocols apply: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10. The brownfield extract and adopt skills are Sequential Setup phases that reverse-engineer their artifacts from an existing codebase rather than building them through greenfield discovery — the lifecycle, cache, hand-off, context, and review obligations are identical to their greenfield counterparts.
|
|
110
|
+
|
|
111
|
+
- Each phase writes a cache file in `.groundwork/cache/` at init and deletes it on commit.
|
|
112
|
+
- Each phase writes a hand-off file to `.groundwork/cache/handoff/<phase>.md` on commit (Protocol 6).
|
|
113
|
+
- Each phase writes a Downstream Context file to `.groundwork/context/<phase>.md` on commit (Protocol 5); the published `docs/` artifact carries no `## Summary for Downstream` section.
|
|
114
|
+
- The setup→delivery transition runs Setup Graduation (Protocol 10): durable context graduates into `docs/`, then `.groundwork/context/` is torn down.
|
|
115
|
+
- A fresh context is recommended between phases (Protocol 3.4.8).
|
|
116
|
+
|
|
117
|
+
### Brownfield Scan (carve-out)
|
|
118
|
+
|
|
119
|
+
**Skill:** `groundwork-scan`
|
|
120
|
+
|
|
121
|
+
`groundwork-scan` is the Phase 0 preparation step of the brownfield track. It reads an existing codebase and writes a **scan baseline** — a resumable progress file and concern-split findings — into `.groundwork/cache/`, which the brownfield extract phases distil into canonical docs. It produces no `docs/` artifact, so three Sequential Setup obligations do not apply to it:
|
|
122
|
+
|
|
123
|
+
- **No Downstream Context file and no hand-off file** (Protocols 5 and 6) — it writes no `docs/` artifact and no `handoff/<phase>.md`. Its structured findings files *are* the hand-off, and they fan out to three readers rather than a single next phase.
|
|
124
|
+
- **No review gate** (Protocol 8) — there is no canonical doc to gate. The review gate fires on each downstream extract when it commits its `docs/` artifact.
|
|
125
|
+
- **Findings persist past commit, not deleted at commit** (inverting Protocol 3.4.3) — the findings are the durable input the extract phases consume. `groundwork-infra-adopt`, the last setup phase that reads the baseline, deletes the shared scan cache at its commit.
|
|
126
|
+
|
|
127
|
+
Scan completion is tracked as a durable `scan` marker in `state.json`, not inferred from a `docs/` artifact, because the scan cache is purged before setup ends. Protocols 1 and 4 still apply: the scan captures out-of-phase signals into `discovery-notes.md` and paces its one scope-confirmation interview.
|
|
128
|
+
|
|
129
|
+
### Continuous Bet
|
|
130
|
+
|
|
131
|
+
**Skills:** `groundwork-bet` (all five phases: discovery, design, decomposition, delivery, validation)
|
|
132
|
+
|
|
133
|
+
Protocols 1, 2, 4, 8, and 9 apply. Protocols 3, 5, 6, and 7 do **not** apply.
|
|
134
|
+
|
|
135
|
+
- The pitch frontmatter `status` field is the state machine. No *per-phase* cache file is created at init and deleted at commit the way Sequential Setup phases do — the only cache files in play are the shared `discovery-notes.md` and transient drafts such as `bet-pitch-draft.md`.
|
|
136
|
+
- No hand-off files are written. Context is shared across all five phases — a fresh context is not recommended between bet phases.
|
|
137
|
+
- Bet documents (`docs/bets/<slug>/*`) have no Downstream Context file and no `## Summary for Downstream` section. The pitch's `status` field and the shared context serve the same function.
|
|
138
|
+
- Protocol 7 cache isolation rules apply to the `.groundwork/cache/discovery-notes.md` file only.
|
|
139
|
+
|
|
140
|
+
This divergence is intentional. The bet's tightly coupled five-phase flow benefits from shared context; the one-shot setup phases benefit from clean isolation. A skill that looks non-conformant against the setup protocols may be correctly implementing the continuous-bet mode.
|
|
141
|
+
|
|
142
|
+
### Maintenance (anytime)
|
|
143
|
+
|
|
144
|
+
**Skills:** `groundwork-doc-sync`, `groundwork-update`, `groundwork-check`, `groundwork-patch`, `groundwork-surface-activation`
|
|
145
|
+
|
|
146
|
+
Maintenance skills run on demand at any point after setup — they keep the committed doc set true, rather than producing new phase artifacts. For `groundwork-doc-sync`, Protocols 1, 2, 4, 8, and 9 apply; Protocols 3, 5, and 6 do not — a maintenance run has no phase cache, no hand-off file, and no fresh-context recommendation. Under Protocol 7 it reads only `discovery-notes.md` and `repo-map.json` from the cache. When a maintenance run *creates* a doc (a new domain entity, a superseding ADR), the new file follows the same template and contract as its setup-phase counterpart.
|
|
147
|
+
|
|
148
|
+
`groundwork-update` (the framework front door — distinct from `groundwork-doc-sync`, which syncs docs to the project's own code) runs under the same protocol set as `groundwork-doc-sync` (1, 2, 4; 8 and 9 when a brief item or a reconcile advance mutates a canonical doc). Its additional obligation is the framework catch-up: Phase A executes the items `npx groundwork-method update` compiled into `.groundwork/cache/upgrade-brief.json`, in order; Phase B reconciles each artifact family to the current canonical that ships in `.groundwork/skills/` (its Family Index) — there is no phase cache beyond the brief itself.
|
|
149
|
+
|
|
150
|
+
`groundwork-patch` runs under the same protocol set as `groundwork-doc-sync` (1, 2, 4; 8 and 9 when a reversal re-gate fires). Its additional obligation is the patch ledger: every patch appends a row to `docs/bets/patch-ledger.md`, and its scope test routes contract-touching or clustering work to the bet lifecycle instead of absorbing it.
|
|
151
|
+
|
|
152
|
+
`groundwork-surface-activation` runs under the same protocol set as `groundwork-doc-sync` (1, 2, 4; 8 and 9 when a reversal re-gate fires — typically a contract-compatibility stance overturning an architecture Key Decision). Its additional obligation is the registry twins: every change to `docs/surfaces.md` updates `.groundwork/surfaces.json` in the same edit, and its ledger triage leaves no cell of the new surface's column empty.
|
|
153
|
+
|
|
154
|
+
`groundwork-check` is read-only and diagnostic: it mutates nothing, so only Protocol 7's read rules bind it. Its obligation is reporting honesty — a doc it cannot assess is reported as unassessed, never as current.
|
|
155
|
+
|
|
156
|
+
---
|
|
157
|
+
|
|
158
|
+
## Protocol 3: Phase Lifecycle
|
|
159
|
+
|
|
160
|
+
Every methodology phase follows the same lifecycle. The sequence ensures artifacts are committed consistently — deviating risks orphaned cache files, lost discovery notes, or stale hand-offs that the next phase incorporates as if current.
|
|
161
|
+
|
|
162
|
+
### 1. Initialize
|
|
163
|
+
|
|
164
|
+
Check if the phase's cache file exists in `.groundwork/cache/`.
|
|
165
|
+
|
|
166
|
+
- If it **does not exist**, create it from the phase's template.
|
|
167
|
+
- If it **does exist**, read it. If work is in progress, summarise what has been completed and ask whether the user wants to resume or start fresh. If they choose to start fresh, reset the cache from the template. If they choose to resume, skip to the first incomplete stage.
|
|
168
|
+
|
|
169
|
+
### 2. Read Upstream Context
|
|
170
|
+
|
|
171
|
+
Read context from the prior phase in this exact order — the order minimises context consumption while preserving every cross-phase signal:
|
|
172
|
+
|
|
173
|
+
1. **Hand-off file** — `.groundwork/cache/handoff/<previous-phase>.md` if it exists. This is the previous phase's post-commit context drop (Protocol 6). Read it in full.
|
|
174
|
+
2. **Downstream Context files** — for each upstream phase this phase depends on, read `.groundwork/context/<upstream-phase>.md` (Protocol 5). Use it as the working context.
|
|
175
|
+
3. **Full upstream sections — lazy** — read the body of an upstream `docs/*.md` only when a specific decision in the current phase requires detail the context file does not carry. Do not pre-load entire upstream docs into context.
|
|
176
|
+
4. **Discovery notes** — check `.groundwork/cache/discovery-notes.md` for entries under your phase's section header (Protocol 1).
|
|
177
|
+
|
|
178
|
+
Skills must name their upstream chain explicitly — which prior phases the hand-off and summaries are read from. Do not infer the chain from project state.
|
|
179
|
+
|
|
180
|
+
### 3. Execute Stages
|
|
181
|
+
|
|
182
|
+
Work through the phase's stages as defined in its instructions. Update the cache file as each stage completes.
|
|
183
|
+
|
|
184
|
+
Do not mark a phase complete until the user explicitly confirms — premature completion commits artifacts the user may not endorse.
|
|
185
|
+
|
|
186
|
+
### 4. Commit
|
|
187
|
+
|
|
188
|
+
When the user gives explicit final approval:
|
|
189
|
+
|
|
190
|
+
1. Write the two setup artifacts. **(a)** Write the final document to `docs/` — a clean published document with **no** `## Summary for Downstream` section. **(b)** Write the Downstream Context file to `.groundwork/context/<current-phase>.md` (Protocol 5), derived from the finished doc as the final drafting action. Both are enforced by the `groundwork-writer` skill.
|
|
191
|
+
2. Write the hand-off file to `.groundwork/cache/handoff/<current-phase>.md` as defined in Protocol 6.
|
|
192
|
+
3. Delete the phase's cache file from `.groundwork/cache/`.
|
|
193
|
+
4. If a hand-off file from the previous phase exists at `.groundwork/cache/handoff/<previous-phase>.md`, delete it — this phase has now consumed it.
|
|
194
|
+
5. **Apply the Living Documents protocol**: scan the conversation for insights that refine any existing `docs/` artifact. Apply surgical updates; if a refined doc belongs to an upstream setup phase whose Downstream Context is still live, refresh that `.groundwork/context/<phase>.md` too. Report what changed. If any update is a **reversal** (Protocol 2 — it supersedes an ADR or overturns a prior Key Decision / Binding Constraint), follow the Reversal Protocol: reconcile the full body and every dependent doc, then re-invoke `groundwork-review` on each mutated doc before committing.
|
|
195
|
+
6. **Update discovery notes**: scan the conversation for out-of-phase signals not captured in real time. Append new signals to `.groundwork/cache/discovery-notes.md`. Remove entries that were incorporated into the committed artifact or the hand-off file.
|
|
196
|
+
7. Confirm completion with a brief, clear message.
|
|
197
|
+
8. **Recommend a fresh context** for the next phase — a clean context gives the next skill full working memory. This is a recommendation, not a requirement.
|
|
198
|
+
9. Hand off to the `groundwork-orchestrator` skill immediately. Do not ask the user to invoke it.
|
|
199
|
+
|
|
200
|
+
---
|
|
201
|
+
|
|
202
|
+
## Protocol 4: Conversational Pacing
|
|
203
|
+
|
|
204
|
+
The goal of pacing is to manage the user's cognitive load. Complex, structural decisions — the ones that shape the product, constrain the design space, or have downstream consequences — deserve focused attention. Rushing through them in a compound question produces shallow answers that collapse under implementation pressure.
|
|
205
|
+
|
|
206
|
+
Give important questions room to breathe. When a decision has real trade-offs or downstream consequences, present it on its own, explore it fully, and resolve it before moving on. When several questions are straightforward or closely related, grouping them keeps the conversation moving without overwhelming the user.
|
|
207
|
+
|
|
208
|
+
Converge toward proposals. Once you have enough signal to form a recommendation, propose it and let the user react — continued interrogation past the point of sufficient information wastes the user's time and energy. The conversation should feel like it's building toward something, not circling.
|
|
209
|
+
|
|
210
|
+
Confirm before advancing to the next phase. Summarise what was established and get explicit confirmation before moving on — premature advancement commits decisions the user may not endorse.
|
|
211
|
+
|
|
212
|
+
---
|
|
213
|
+
|
|
214
|
+
## Protocol 5: Downstream Context
|
|
215
|
+
|
|
216
|
+
Each Sequential Setup phase writes a **Downstream Context** file to `.groundwork/context/<phase>.md` at commit. This is the cross-phase contract the *flow* runs on: the next setup phases consume it first, and read an upstream doc's body only when a specific decision requires detail the context file does not carry. The context file is the **only** place this contract lives — the published `docs/` artifact carries none of it.
|
|
217
|
+
|
|
218
|
+
This separation is deliberate. A setup phase produces two different things for two different readers: the cross-phase machinery the *flow* needs to make its next decision, and the product documentation a reader who was never in the room needs. They have opposite shapes — the first is a terse decision ledger, the second is reference prose. Keeping the ledger out of `docs/` is what lets the published doc read as documentation rather than a report-out of the conversation that produced it.
|
|
219
|
+
|
|
220
|
+
The store is **scaffolding, not a durable ledger.** It persists through setup so each downstream phase reads its upstream contract, and it is torn down when setup completes (Protocol 10). Nothing in `.groundwork/context/` survives into delivery; everything durable graduates into `docs/` first.
|
|
221
|
+
|
|
222
|
+
### Location and naming
|
|
223
|
+
|
|
224
|
+
`.groundwork/context/<phase>.md` — one file per phase, named after the *writing* phase. Example: `groundwork-architecture` writes `.groundwork/context/architecture.md`. The file is persistent across setup phases (unlike the single-hop hand-off cache, Protocol 6) and is created on demand — write tools create the `context/` directory if absent.
|
|
225
|
+
|
|
226
|
+
### Structure
|
|
227
|
+
|
|
228
|
+
The context file contains exactly four subsections, in this order:
|
|
229
|
+
|
|
230
|
+
| Subsection | What goes here |
|
|
231
|
+
|---|---|
|
|
232
|
+
| `### Key Decisions` | The decisions this phase committed to that downstream phases must respect. Bulleted, one decision per bullet, ≤15 words each. State the decision; do not justify it. |
|
|
233
|
+
| `### Binding Constraints` | The constraints — hard rules, performance budgets, data residency, compliance, vendor limits — that any downstream phase must work within. Bulleted, one constraint per bullet. |
|
|
234
|
+
| `### Deferred Questions` | Decisions intentionally left open at this stage, with the phase that will resolve them. Format: `- <question> — resolved in <phase>`. |
|
|
235
|
+
| `### Out of Scope` | What this phase deliberately did not address. Different from deferred (which will be answered later); this is permanent absence. |
|
|
236
|
+
|
|
237
|
+
### Length Budget
|
|
238
|
+
|
|
239
|
+
The entire file is ≤200 words. Bullets, not prose. If a decision cannot be stated in 15 words, the decision itself is incomplete — finish the decision before writing the bullet.
|
|
240
|
+
|
|
241
|
+
### What the Context File Does Not Contain
|
|
242
|
+
|
|
243
|
+
- **No rationale.** Why a decision was made belongs in the published doc body or in an ADR. The context file states the decision only.
|
|
244
|
+
- **No rejected options.** Rejected options belong in the hand-off file (Protocol 6) so the next phase can see what was considered.
|
|
245
|
+
- **No marketing or framing.** The context file is for an agent making the next phase's decisions. State facts, not narrative.
|
|
246
|
+
|
|
247
|
+
### Derive It From the Finished Doc, Last
|
|
248
|
+
|
|
249
|
+
Write the published doc body first, then derive the context file from it as the **final** drafting action — never maintain the two in parallel. Do a single deliberate pass: walk every binding decision, constraint, deferred question, and permanent exclusion in the doc and confirm each is reflected in the context file, and that the context file asserts nothing the doc does not. A context file hand-maintained alongside the body desyncs on every edit.
|
|
250
|
+
|
|
251
|
+
### Enforcement
|
|
252
|
+
|
|
253
|
+
The `groundwork-writer` skill enforces this contract. Every commit step that writes a Sequential Setup `docs/` artifact loads `groundwork-writer`, writes the clean published doc to `docs/`, and writes the Downstream Context file to `.groundwork/context/<phase>.md`.
|
|
254
|
+
|
|
255
|
+
---
|
|
256
|
+
|
|
257
|
+
## Protocol 6: Hand-off Cache
|
|
258
|
+
|
|
259
|
+
The hand-off cache carries post-commit context from one phase to the next when that context did not fit in the canonical doc. It exists because the canonical doc must remain a clean, durable artifact — committee-readable, frontmatter-light, body-tight — but the next phase often needs the discarded surrounding context to make good decisions.
|
|
260
|
+
|
|
261
|
+
### File Location
|
|
262
|
+
|
|
263
|
+
`.groundwork/cache/handoff/<phase>.md` — one file per phase, named after the *writing* phase (not the consuming phase). Example: `groundwork-architecture` writes `.groundwork/cache/handoff/architecture.md` for `groundwork-mvp` (or whichever skill is next) to consume.
|
|
264
|
+
|
|
265
|
+
### Lifecycle
|
|
266
|
+
|
|
267
|
+
| Step | When | By whom |
|
|
268
|
+
|---|---|---|
|
|
269
|
+
| Created from template | At commit (Protocol 3.4.2) | The phase that just committed |
|
|
270
|
+
| Read | At init (Protocol 3.2.1) | The next phase in the chain |
|
|
271
|
+
| Deleted | At the consumer's commit (Protocol 3.4.4) | The phase that consumed it |
|
|
272
|
+
|
|
273
|
+
Single-hop only. A hand-off file from phase N is consumed by phase N+1 and then deleted. Phase N+2 reads its context from N+1's hand-off and from the Downstream Context files in `.groundwork/context/`, not from a chain of stale hand-offs. Long-range context flows through the Downstream Context files (Protocol 5), not through hand-off files.
|
|
274
|
+
|
|
275
|
+
### Template
|
|
276
|
+
|
|
277
|
+
The shared template lives at `.groundwork/skills/templates/handoff.md`. Skills copy it on commit and fill in only the sections that have content — empty sections may be omitted entirely.
|
|
278
|
+
|
|
279
|
+
### What the Hand-off File Captures
|
|
280
|
+
|
|
281
|
+
- **Rejected Options** — alternatives considered and ruled out, with the rationale. Lets the next phase avoid re-litigating decisions.
|
|
282
|
+
- **Deferred Decisions** — decisions explicitly left open, with the trigger that should reopen them. Distinct from Protocol 5's Deferred Questions: hand-off entries carry the conversational context behind the deferral.
|
|
283
|
+
- **User Instincts** — uncommitted signals the user voiced that the next phase should honour but the current phase did not formalise.
|
|
284
|
+
- **Context Drop** — anything else the next phase needs that does not fit the categories above.
|
|
285
|
+
|
|
286
|
+
### What the Hand-off File Does Not Capture
|
|
287
|
+
|
|
288
|
+
- Decisions the canonical doc already records — those belong in the doc.
|
|
289
|
+
- Out-of-phase signals — those belong in discovery notes (Protocol 1).
|
|
290
|
+
- General notes about the conversation — if the next phase does not need it, do not write it.
|
|
291
|
+
|
|
292
|
+
---
|
|
293
|
+
|
|
294
|
+
## Protocol 7: Cache Isolation
|
|
295
|
+
|
|
296
|
+
A phase reads from a strict, minimal set of cache locations. Reading from anywhere else risks pulling stale state from a prior phase's incomplete work.
|
|
297
|
+
|
|
298
|
+
### What a phase may read from `.groundwork/cache/`
|
|
299
|
+
|
|
300
|
+
| Path | Purpose | When |
|
|
301
|
+
|---|---|---|
|
|
302
|
+
| `<phase>-cache.md` | The current phase's own resume state | Init only, for resume detection |
|
|
303
|
+
| `<phase>-draft/` or `<phase>-draft.md` | The current phase's own draft state | During execute and revise stages |
|
|
304
|
+
| `discovery-notes.md` | Cross-phase signal capture (Protocol 1) | Init (check own section) and during execute (capture out-of-phase signals) |
|
|
305
|
+
| `handoff/<previous-phase>.md` | The previous phase's hand-off (Protocol 6) | Init only |
|
|
306
|
+
| `scan-state.json`, `scan/overview.md` | The brownfield scan baseline — shared classification and partition map | Init and execute, **brownfield extract and adopt phases only** |
|
|
307
|
+
| `repo-map.json` | The deterministic code map (build/refresh: `npx groundwork-method repo-map`). Durable past setup — `groundwork-infra-adopt` preserves it at cleanup as a first-class artifact. How to leverage it with Serena: `.groundwork/skills/code-intelligence.md` | Brownfield extract and adopt phases during setup; `groundwork-check`, `groundwork-doc-sync`, and the bet loop thereafter, for impact analysis |
|
|
308
|
+
| `scan/<own-slice>.md` | The brownfield findings slice this phase consumes (`product-findings.md`, `design-findings.md`, or `architecture-findings.md`) | Init and execute, **the one owning extract phase only** |
|
|
309
|
+
|
|
310
|
+
### What a phase must not read from `.groundwork/cache/`
|
|
311
|
+
|
|
312
|
+
- Any other phase's `<phase>-cache.md` — that state is internal to the writing phase and is deleted at commit.
|
|
313
|
+
- Any other phase's `<phase>-draft.md` or `<phase>-draft/` — drafts are working artifacts; the committed `docs/*.md` is the authoritative version.
|
|
314
|
+
- Any hand-off file other than the previous phase's. Cross-phase context from older phases flows through the Downstream Context files in `.groundwork/context/`, not through hand-off chains.
|
|
315
|
+
|
|
316
|
+
### Enforcement at init
|
|
317
|
+
|
|
318
|
+
Each phase's init step verifies its own caches are clean — no stale draft directory, no orphan cache file from a previous run that did not commit. If foreign state is found, the phase asks the user to confirm a clean restart before proceeding.
|
|
319
|
+
|
|
320
|
+
### The Downstream Context store is not cache
|
|
321
|
+
|
|
322
|
+
`.groundwork/context/` is a sibling of `.groundwork/cache/`, not part of it. Unlike a phase's transient cache (created at init, deleted at that phase's commit), a Downstream Context file persists across **all** downstream setup phases so each can read its upstream contract (Protocol 5). It is not bound by the per-phase read restrictions above — any setup phase may read the context file of any phase it declares as upstream. The whole store is torn down once, at setup completion (Protocol 10); nothing in it survives into delivery.
|
|
323
|
+
|
|
324
|
+
---
|
|
325
|
+
|
|
326
|
+
## Protocol 8: Review Gate
|
|
327
|
+
|
|
328
|
+
A review checkpoint is a gate, not a formality. A phase passes only on a positive, parseable verdict from the isolated reviewer — every other outcome blocks. Gating on the *presence of a pass* rather than on *detecting a failure* is what keeps the gate safe: an unrecognised error, a dropped connection, and a truncated response all read as "not a pass" and stop the phase, instead of slipping through as a silent success.
|
|
329
|
+
|
|
330
|
+
This protocol governs every place a skill invokes `groundwork-review` — the Sequential Setup drafting phases, the Reversal Protocol re-gate (Protocol 2), and the Continuous Bet validation reviews.
|
|
331
|
+
|
|
332
|
+
### The gate
|
|
333
|
+
|
|
334
|
+
Presenting a draft as reviewed, or committing it, is permitted only when the reviewer returns a parseable `VERDICT: PRESENT`. Every other outcome blocks:
|
|
335
|
+
|
|
336
|
+
- `VERDICT: REVISE` — apply the 🔴 findings and re-invoke, subject to the cap below.
|
|
337
|
+
- A `REVIEW_UNAVAILABLE` sentinel, any error string, an empty response, or output carrying no parseable `VERDICT:` line — the review did not run. This is a hard failure, never a pass.
|
|
338
|
+
|
|
339
|
+
### Fail closed when the review cannot run
|
|
340
|
+
|
|
341
|
+
When a positive verdict cannot be obtained because the reviewer errored or returned nothing, the phase must not commit and must not state or imply that the review passed. Report to the user that the independent review failed to run, include the error, and pause. Each Sequential Setup phase already pauses for explicit user approval before committing (Protocol 3.4) — fold the failure into that pause rather than proceeding around it.
|
|
342
|
+
|
|
343
|
+
The author reviewing its own draft is not a substitute. The reviewer runs in an isolated context precisely so the agent that wrote the draft does not judge it — running the checks inline destroys that guarantee and re-introduces the blind spots the gate exists to catch. An adversarial self-review is permitted only when the user explicitly authorises it as a fallback, and only when the output labels it loudly as a self-review that does not satisfy the independent-review gate. It never counts as a passed gate, silently or otherwise. Protocol 9 (Review Invocation) turns this rule into the operational procedure a phase follows when the reviewer cannot run.
|
|
344
|
+
|
|
345
|
+
### The revise cap
|
|
346
|
+
|
|
347
|
+
A reviewer that keeps returning `REVISE` on a draft the agent cannot improve further would loop forever. After 3 REVISE verdicts on a single document, stop revising and treat that pass as the stopping point: surface every remaining 🔴 Critical finding to the user as 🟡 Advisory, and state plainly that the review did not reach PRESENT and how many critical findings remain unresolved. The user weighs them before approving the commit. This cap applies at every review checkpoint, so the escape hatch behaves identically everywhere.
|
|
348
|
+
|
|
349
|
+
Hitting the cap is a disclosed, user-visible outcome, not a silent downgrade. It differs from the fail-closed case above by when it fires: the cap fires after the review *ran* and could not be satisfied; fail-closed fires when the review *could not run at all*. Both block a silent pass, and both surface to the user.
|
|
350
|
+
|
|
351
|
+
---
|
|
352
|
+
|
|
353
|
+
## Protocol 9: Review Invocation
|
|
354
|
+
|
|
355
|
+
Protocol 8 defines what the reviewer's verdict means; this protocol defines how the review runs. Every invocation of `groundwork-review` — drafting-phase gates, Reversal Protocol re-gates (Protocol 2), bet validation re-reviews — follows this one procedure. Calling skills state what they pass and when in their phase the review fires; the dispatch mechanics and the failure procedure live here and are never restated per skill.
|
|
356
|
+
|
|
357
|
+
### Dispatch
|
|
358
|
+
|
|
359
|
+
The reviewer runs as an independent subagent with a fresh context, dispatched through the host's subagent mechanism — the `Task` tool in Claude Code. The dispatch prompt loads the `groundwork-review` skill and passes `document_path` (the draft under review) and `document_type` (which checklist the reviewer applies). Only the verdict and findings return to the caller; the reviewer's deliberation stays in its own context, which keeps the calling conversation's window clean and the judgement independent of the author.
|
|
360
|
+
|
|
361
|
+
### The verdict gates the commit
|
|
362
|
+
|
|
363
|
+
The gate is fail-closed (Protocol 8): the phase presents the draft as reviewed, or commits it, only on a parseable `VERDICT: PRESENT`. On `VERDICT: REVISE`, apply the 🔴 findings to the draft and re-dispatch, subject to Protocol 8's revise cap.
|
|
364
|
+
|
|
365
|
+
### When the review cannot run
|
|
366
|
+
|
|
367
|
+
A dispatch that errors, returns `REVIEW_UNAVAILABLE`, or returns no parseable verdict has reviewed nothing. A subagent that has produced no output for an unreasonably long time is in the same state — treat the hang as a failure rather than waiting indefinitely, because a review that never returns gates nothing. A host with no subagent mechanism cannot dispatch at all; that is the same failure, known before the first attempt.
|
|
368
|
+
|
|
369
|
+
In every one of these cases the phase MUST NOT proceed as if reviewed and MUST NOT quietly run the review checks itself — the author judging its own draft re-introduces exactly the blind spots the isolated reviewer exists to catch (Protocol 8). Instead:
|
|
370
|
+
|
|
371
|
+
1. **Stop and report.** Tell the user plainly that the independent review could not run, and why — the error, the hang, or the missing dispatch mechanism.
|
|
372
|
+
2. **Offer exactly two paths, and take neither until the user chooses:**
|
|
373
|
+
- **Retry the dispatch** (where a dispatch mechanism exists — transient failures usually clear on retry).
|
|
374
|
+
- **An authorised self-review** — only with the user's explicit authorisation, run the review checks inline and label the output loudly as a self-review that does not satisfy the independent-review gate. This is Protocol 8's fallback rule as an operational procedure; it never counts as a passed gate.
|
|
375
|
+
|
|
376
|
+
There is no third path: committing, presenting the draft as reviewed, or self-reviewing without authorisation defeats the gate.
|
|
377
|
+
|
|
378
|
+
---
|
|
379
|
+
|
|
380
|
+
## Protocol 10: Setup Graduation
|
|
381
|
+
|
|
382
|
+
The Downstream Context store (Protocol 5) is setup scaffolding. Left standing after setup, it becomes a second, stale source of truth alongside `docs/` — and a dangerous one, because it reads like a decision ledger but is no longer maintained. Setup Graduation is the single step that dismantles the scaffolding once the building stands: everything durable graduates into `docs/` as proper technical documentation, and everything left over from the green/brown setup process is removed.
|
|
383
|
+
|
|
384
|
+
### When it fires
|
|
385
|
+
|
|
386
|
+
Once, at the **setup→delivery transition** — after the last Sequential Setup phase commits (greenfield: `groundwork-scaffold`/`groundwork-mvp`; brownfield: `groundwork-infra-adopt`) and before the first bet. The **orchestrator** owns the trigger: on detecting that all setup phases are complete, it runs Graduation before routing into the Delivery Loop. It is not a methodology phase and writes no phase cache — it is a reconcile-and-teardown pass over artifacts the setup phases already produced.
|
|
387
|
+
|
|
388
|
+
### The three steps
|
|
389
|
+
|
|
390
|
+
1. **Graduate binding decisions into ADRs.** Walk every `.groundwork/context/*.md` file. Each Key Decision or Binding Constraint that still constrains future work and is not already captured in `docs/architecture/decisions/` becomes a proper ADR there (the architect's decision-record convention). A decision already recorded in an ADR or fully stated in a canonical doc body needs no new ADR — graduate, do not duplicate.
|
|
391
|
+
2. **Reconcile the rest into the docs.** Run a Living Documents pass (Protocol 2) so any remaining durable context — a constraint, a deferred question now answerable, a scope boundary — is reflected in the proper `docs/` technical documentation. After this step, `docs/` is the complete durable record; the context store holds nothing the docs do not.
|
|
392
|
+
3. **Tear down the setup residue.** Delete `.groundwork/context/` in full. Drain `.groundwork/cache/discovery-notes.md` of any remaining entries (apply or discard each, then remove the file). Remove any other setup-only residue — stray hand-off files, phase caches that did not clean up. The brownfield scan cache is already removed by `groundwork-infra-adopt` at its own commit.
|
|
393
|
+
|
|
394
|
+
### The invariant
|
|
395
|
+
|
|
396
|
+
By the end of the flow, everything durable lives in `docs/` as proper technical documentation; everything else is removed. A reader who opens the project after setup finds one source of truth — the docs — and no setup bookkeeping to mistake for it.
|
|
397
|
+
|
|
398
|
+
### Fail-safe
|
|
399
|
+
|
|
400
|
+
Graduation never deletes before it has graduated. If step 1 or 2 cannot complete — an ADR cannot be written, a doc reconciliation is ambiguous — stop and surface it to the user; do not run step 3. A torn-down store whose decisions never reached `docs/` is unrecoverable.
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
# repo-map.json — the code map contract
|
|
2
|
+
|
|
3
|
+
`.groundwork/cache/repo-map.json` is GroundWork's deterministic structural map of a
|
|
4
|
+
codebase. The generator (`npx groundwork-method repo-map`) is its producer; the brownfield
|
|
5
|
+
scan, architecture extraction, and `groundwork-check`/`groundwork-doc-sync` are its consumers.
|
|
6
|
+
This file pins the shape so producer and consumers agree — whether the map was built by the
|
|
7
|
+
generator or, for an unsupported language, filled in by LLM inference in the same shape.
|
|
8
|
+
|
|
9
|
+
It is a coarse, whole-repo aggregate by design. Precise, live, per-symbol questions are
|
|
10
|
+
Serena's job (see `code-intelligence.md`); this map is the bird's-eye view Serena cannot export.
|
|
11
|
+
|
|
12
|
+
## Shape
|
|
13
|
+
|
|
14
|
+
```jsonc
|
|
15
|
+
{
|
|
16
|
+
"schema_version": 1,
|
|
17
|
+
"generator": "groundwork-method repo-map",
|
|
18
|
+
"generator_version": "0.10.0", // package version that wrote it
|
|
19
|
+
"generated_at": "2026-06-19T...Z", // wall-clock stamp (write time)
|
|
20
|
+
"generated_at_commit": "<sha|null>", // HEAD when generated — the staleness anchor
|
|
21
|
+
"stats": {
|
|
22
|
+
"files": 128, // source files mapped
|
|
23
|
+
"edges": 412, // resolved internal import edges
|
|
24
|
+
"languages": { "go": 80, "python": 30, "typescript": 18 }
|
|
25
|
+
},
|
|
26
|
+
"coverage": { // per language: file count + fidelity
|
|
27
|
+
"go": { "files": 80, "fidelity": "graph" }, // graph = edges + centrality
|
|
28
|
+
"rust": { "files": 12, "fidelity": "symbols" } // symbols = symbol index only
|
|
29
|
+
},
|
|
30
|
+
"modules": [ // top-level partition → file count, by size desc
|
|
31
|
+
{ "path": "services", "files": 64 },
|
|
32
|
+
{ "path": "web", "files": 40 }
|
|
33
|
+
],
|
|
34
|
+
"centrality": [ // every file, ranked by PageRank desc
|
|
35
|
+
{ "file": "services/auth/token.go", "rank": 0.0182, "in": 21, "out": 3 }
|
|
36
|
+
],
|
|
37
|
+
"edges": [ // directed: `from` imports `to`
|
|
38
|
+
{ "from": "services/api/h.go", "to": "services/auth/token.go", "weight": 1 }
|
|
39
|
+
],
|
|
40
|
+
"symbols": { // per-file top-level definitions (informational)
|
|
41
|
+
"services/auth/token.go": ["Mint", "Verify", "Claims"]
|
|
42
|
+
},
|
|
43
|
+
"contracts": [ "api/openapi.yaml", "rpc/user.proto" ], // detected contract/spec files
|
|
44
|
+
"external_dependencies": [ "fmt", "react", "github.com/x/y" ], // distinct external imports
|
|
45
|
+
"unmapped": [ // languages present but NOT mapped (+ why)
|
|
46
|
+
{ "language": "Elixir", "files": 14, "reason": "no built-in queries yet" }
|
|
47
|
+
]
|
|
48
|
+
}
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Field notes
|
|
52
|
+
|
|
53
|
+
- **`centrality`** is the field the scan leans on: high-rank files are the hubs to read
|
|
54
|
+
deeply; leaves are skimmed. Rank is weighted PageRank over the import graph (damping 0.85),
|
|
55
|
+
so it captures transitive importance, not just raw in-degree.
|
|
56
|
+
- **`edges`** are *internal* import edges only. A Go package import expands to edges against
|
|
57
|
+
the package's files, with `weight` split across them so a wide package does not dominate.
|
|
58
|
+
Relative TS/JS specifiers and resolvable Python modules become single edges (`weight` 1).
|
|
59
|
+
- **`external_dependencies`** captures imports that resolve outside the repo (stdlib,
|
|
60
|
+
third-party). They are recorded but excluded from centrality.
|
|
61
|
+
- **`generated_at_commit`** is the freshness anchor. `npx groundwork-method repo-map --check`
|
|
62
|
+
and `groundwork-check` compare it against HEAD's changed source files to report staleness.
|
|
63
|
+
|
|
64
|
+
## Maintenance
|
|
65
|
+
|
|
66
|
+
The map is a snapshot, kept fresh cheaply: the generator caches per-file parse results keyed
|
|
67
|
+
by content hash (`repo-map.cache.json`), so a rerun reparses only changed files. Freshness is
|
|
68
|
+
**detect-and-lazy-refresh** — `groundwork-check` reports drift as an advisory and consumers
|
|
69
|
+
regenerate on use when stale; no git hook runs by default (opt-in only, see `host-support.md`).
|
|
70
|
+
|
|
71
|
+
## Coverage and fidelity
|
|
72
|
+
|
|
73
|
+
Languages map at one of two fidelities, declared per language in `coverage`:
|
|
74
|
+
|
|
75
|
+
- **`graph`** — import edges resolve to internal files, so `edges` and `centrality` are real.
|
|
76
|
+
Built in for Go, Python, TypeScript/JavaScript (incl. TSX/JSX), Java, and Dart.
|
|
77
|
+
- **`symbols`** — `symbols`, `external_dependencies`, and `modules` are populated, but the
|
|
78
|
+
language contributes no internal edges (no verified resolver). Built in for Rust, Kotlin,
|
|
79
|
+
C#, C/C++, Scala, Swift, PHP, Ruby, and Lua.
|
|
80
|
+
|
|
81
|
+
Anything else a repo can enable at either fidelity via the project extension seam
|
|
82
|
+
(`.groundwork/config/repo-map.languages.js`; see `code-intelligence.md`). Languages present but
|
|
83
|
+
neither built in nor enabled appear in `unmapped` with a reason — they are not silently dropped.
|
|
84
|
+
Where the map cannot cover a language at all, the scan falls back to LLM inference in the same shape.
|
|
85
|
+
|
|
86
|
+
## Known limits (v1)
|
|
87
|
+
|
|
88
|
+
- Edges are import-level. `require()`/dynamic `import()` and call-graph edges are not yet
|
|
89
|
+
resolved; the symbol index is top-level definitions, not a full reference graph — that
|
|
90
|
+
precision is Serena's live job, not the map's.
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: <NNNN. Title>
|
|
3
|
+
description: <One-line summary of the decision>
|
|
4
|
+
status: accepted
|
|
5
|
+
last_reviewed: <YYYY-MM-DD>
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# NNNN. <Title>
|
|
9
|
+
|
|
10
|
+
**Status:** accepted **Owner:** <team or role accountable for this today>
|
|
11
|
+
**Date:** <YYYY-MM-DD> **Supersedes:** <— or NNNN>
|
|
12
|
+
|
|
13
|
+
> The record is immutable; the decision is not. If this is later superseded,
|
|
14
|
+
> change status to `superseded by [NNNN](NNNN-<slug>.md)`, add a one-line note
|
|
15
|
+
> at the top of the body explaining what changed, and leave the original
|
|
16
|
+
> reasoning intact — never overwrite it. The trail is what makes the set
|
|
17
|
+
> trustworthy enough to re-evaluate against.
|
|
18
|
+
|
|
19
|
+
## Context
|
|
20
|
+
|
|
21
|
+
What problem or constraint forced this decision, and what we were choosing
|
|
22
|
+
between. The forces at play. Capture enough that someone — human or agent —
|
|
23
|
+
re-reading this in a year understands the world it was made in.
|
|
24
|
+
|
|
25
|
+
## Decision
|
|
26
|
+
|
|
27
|
+
What we chose, stated as a single sentence followed by elaboration.
|
|
28
|
+
|
|
29
|
+
## Assumptions
|
|
30
|
+
|
|
31
|
+
What must stay true for this to remain the right decision — the load profile,
|
|
32
|
+
team size, vendor, cost, regulatory boundary, or scale it rests on. List them
|
|
33
|
+
plainly: each is a condition that, if it breaks, brings this decision back for
|
|
34
|
+
review. A decision with no stated assumptions cannot be told when it has gone
|
|
35
|
+
stale.
|
|
36
|
+
|
|
37
|
+
## Review trigger
|
|
38
|
+
|
|
39
|
+
The condition that should resurface this decision — "when we add a second
|
|
40
|
+
region", "if write throughput passes 50k/s", or a date when nothing more
|
|
41
|
+
specific applies. Decisions expire against reality, not the calendar.
|
|
42
|
+
|
|
43
|
+
## Trade-offs
|
|
44
|
+
|
|
45
|
+
- **What we gave up:** ...
|
|
46
|
+
- **What risk we accepted:** ...
|
|
47
|
+
- **What this makes harder in future:** ...
|
|
48
|
+
|
|
49
|
+
## Alternatives considered
|
|
50
|
+
|
|
51
|
+
Other options on the table and why they were rejected. State each rejection at
|
|
52
|
+
the right epistemic level: a measured or sourced fact may be stated as fact; an
|
|
53
|
+
unvalidated judgement must be framed as a judgement with its basis ("we judge X
|
|
54
|
+
weaker for our quality bar, pending validation"), not asserted as established
|
|
55
|
+
fact.
|
|
56
|
+
|
|
57
|
+
- ...
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# Capability Ports & Providers Registry Contract
|
|
2
|
+
|
|
3
|
+
`docs/architecture/index.md` §3 ("Key Capabilities & Technical Decisions" → Capability Ports & Providers) is the canonical, human record of which technical capabilities the system depends on and how each is satisfied. `.groundwork/capability-ports.json` is its machine-readable twin, written in the same commit (the contract-grade rule: every reviewed artifact has a machine-checkable twin). The architecture commit writes both at greenfield setup; `groundwork-architecture-extract` writes both at brownfield adoption; the scaffold phase reads the twin to compose generators, infrastructure, and runners.
|
|
4
|
+
|
|
5
|
+
> **Not the capability ledger.** `docs/surfaces.md` carries a *capability ledger* — user-facing **features** mapped across **surfaces** (`checkout/guest-checkout` delivered on web, planned on mobile). This registry is a different axis: **technical capabilities** (LLM inference, a data store, telemetry) and the **providers** that satisfy them. Features reach surfaces; capabilities are satisfied by providers. Keep the two distinct.
|
|
6
|
+
|
|
7
|
+
**The model.** A **capability** is an interface the system depends on; a **provider** is the implementation that satisfies it, wired in at the edge and swappable. Each provider declares an **operational footprint** — exactly one of:
|
|
8
|
+
|
|
9
|
+
| Footprint | Meaning | Materialized by the scaffold as |
|
|
10
|
+
|---|---|---|
|
|
11
|
+
| `env` | A hosted API reached by key/URL | environment variables in the service config; no infrastructure |
|
|
12
|
+
| `compose-service` | A container the local stack runs | a `docker-compose.yml` service injected on demand (e.g. a pgvector store → `db`) |
|
|
13
|
+
| `runner` | A native host process | an entry in `.dev/dev.config.json` `runners[]` that `./dev` start/stop/status manage |
|
|
14
|
+
| `none` | A **bare interface** — a bet | the interface + a not-yet-implemented stub + a strict-xfail contract test; no provider SDK, no infra |
|
|
15
|
+
|
|
16
|
+
There are no default providers, and therefore no default infrastructure: a database appears *because* a store provider's footprint is a compose service; a tracing backend appears *because* a telemetry provider was selected. `none` is GroundWork's own thesis turned on the scaffold — the interface is the spec, the provider is a bet the delivery loop later cashes.
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## Schema — `.groundwork/capability-ports.json`
|
|
21
|
+
|
|
22
|
+
```json
|
|
23
|
+
{
|
|
24
|
+
"schema": "groundwork.capability-ports",
|
|
25
|
+
"version": 1,
|
|
26
|
+
"ports": [
|
|
27
|
+
{
|
|
28
|
+
"capability": "llm",
|
|
29
|
+
"service": "compute-service",
|
|
30
|
+
"provider": "anthropic",
|
|
31
|
+
"footprint": "env",
|
|
32
|
+
"rationale": "Hosted Claude; product committed to Anthropic."
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"capability": "datastore",
|
|
36
|
+
"service": "api",
|
|
37
|
+
"provider": "postgres",
|
|
38
|
+
"footprint": "compose-service",
|
|
39
|
+
"rationale": "Relational + vector store for the catalogue."
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"capability": "llm",
|
|
43
|
+
"service": "drafting-service",
|
|
44
|
+
"provider": "none",
|
|
45
|
+
"footprint": "none",
|
|
46
|
+
"rationale": "Provider undecided — ship the interface as a bet, build the provider in the first delivery."
|
|
47
|
+
}
|
|
48
|
+
]
|
|
49
|
+
}
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
| Field | Values | Meaning |
|
|
53
|
+
|---|---|---|
|
|
54
|
+
| `capability` | a capability id in the registry (`src/generators/capabilities/<id>/`) | the capability interface |
|
|
55
|
+
| `service` | a service slug, or omit for a workspace-wide capability | which service owns the capability |
|
|
56
|
+
| `provider` | a provider in the capability's catalog, or `none` | the chosen provider |
|
|
57
|
+
| `footprint` | `env` · `compose-service` · `runner` · `none` | the provider's operational cost; the scaffold materializes exactly this |
|
|
58
|
+
| `rationale` | free text | why this provider — including "bare interface, to be built as a bet" for `none` |
|
|
59
|
+
|
|
60
|
+
A `provider` of `none` always has `footprint: "none"`. An empty `ports` array is legal — a product with no technical capabilities.
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## How the scaffold consumes it
|
|
65
|
+
|
|
66
|
+
The scaffold phase (`groundwork-scaffold` Phase 1) reads this twin alongside the surface registry and maps each capability to a generator action:
|
|
67
|
+
|
|
68
|
+
- An `env` / `compose-service` / `runner` provider becomes a generator flag (e.g. `python-microservice --llm --llmProvider anthropic`, `--postgres`) or, for an existing service, an `add-capability --service <s> --capability <c> --provider <p>` invocation.
|
|
69
|
+
- A `none` provider scaffolds the bare interface (`--provider none` / `add-capability ... --provider none`): the interface, the stub, and the strict-xfail contract test.
|
|
70
|
+
|
|
71
|
+
Phase 4 reconciles: every `compose-service` footprint must be a service in `docker-compose.yml`, every `runner` a registered runner in `dev.config.json`, every `env` documented in `infrastructure.md`, and every `none` a service with its xfail contract test present — a mismatch is a gap between the architecture and the scaffold.
|