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,78 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Agentic Systems
|
|
3
|
+
description: Architecting systems where AI agents are first-class actors — topology, interop protocols, context and memory, durable execution, guardrails, and human oversight.
|
|
4
|
+
status: active
|
|
5
|
+
last_reviewed: 2026-06-19
|
|
6
|
+
---
|
|
7
|
+
# Agentic Systems
|
|
8
|
+
|
|
9
|
+
## TL;DR
|
|
10
|
+
|
|
11
|
+
When an AI agent is an actor in the system — planning, calling tools, and acting over many steps — it is a distributed system with a non-deterministic core, and it must be architected like one. We default to a single agent that owns its context and delegates only stateless, read-only fan-out; we treat the context window as the scarce resource; we make long-running agents durable so they resume rather than restart; and we put every agent behind guardrails, an identity, and a human review point sized to the stakes. Agentic capability is designed in, not prompted in.
|
|
12
|
+
|
|
13
|
+
## Why this matters
|
|
14
|
+
|
|
15
|
+
The gap between an agent demo and an agent in production is the same gap as between a script and a distributed system: retries, partial failure, shared-state contention, unbounded loops, and an adversary in the input. The teams that ship reliable agents are not the ones with the best prompts — they are the ones who recognised that an autonomous loop calling real tools is infrastructure, and gave it the structure infrastructure needs. Most agent failures are system failures, not model failures, and they are designed out at the architecture stage or paid for in production.
|
|
16
|
+
|
|
17
|
+
## Our principles
|
|
18
|
+
|
|
19
|
+
### 1. Single agent first; multi-agent only when isolation pays
|
|
20
|
+
|
|
21
|
+
The default is one agent that owns the full context of a task. When work fans out, it spawns **stateless, read-only sub-agents** for isolated retrieval or analysis and folds their results back into its own context. The 2025 standoff between Cognition's *Don't Build Multi-Agents* and Anthropic's *multi-agent research system* read like a contradiction and was not: the dividing line is **read versus write**. Sub-agents that only read — breadth-first research, retrieval across disjoint sources, independent analysis that exceeds one context window — compound capability; agents that write interdependent decisions onto shared mutable state compound error (conflicting actions, lost context, dispersed framing). Cognition's own *Devin manages Devins* later shipped a coordinator over isolated workers once the work was cleanly separable — the same line drawn from the other side. So the decision rule: **fan out only when sub-tasks are independent and read-mostly, and keep exactly one agent holding the pen.** Fan-out also has a price — Anthropic measured its research swarm at roughly 15× the tokens of a single chat (single agents at ~4×) — so the separable sub-problem has to be worth that bill. Supervisor/worker and handoff topologies are tools for genuinely separable work, not a default; under an equal token budget a single well-structured agent usually beats a swarm.
|
|
22
|
+
|
|
23
|
+
### 2. Interop is a protocol stack — adopt by maturity, hide behind ports
|
|
24
|
+
|
|
25
|
+
Agents reach the world through standard protocols, not bespoke glue: **MCP** for tools and data (the model's hands), **A2A** for agent-to-agent delegation across a trust, vendor, or framework boundary (the model's colleagues), and **AG-UI** for the agent↔interface event stream (the model's face). These sit at different maturities and the field has not converged — MCP is effectively universal (adopted by every major provider, governed under the Linux Foundation's Agentic AI Foundation), while A2A reached a v1.0 only recently and a wider set of contenders is still shaking out. So **adopt by maturity**: take MCP now; reach for A2A only when you genuinely cross an org, vendor, or framework boundary — inside a single system a function call or the agents-as-tools pattern beats a network protocol and its failure modes. Whatever you adopt, keep it behind your own ports so an unsettled protocol stays replaceable — the same reason every other interface in the system is a contract.
|
|
26
|
+
|
|
27
|
+
### 3. Context is the scarce resource; engineer it
|
|
28
|
+
|
|
29
|
+
The contents of the context window are the single biggest lever on agent behaviour, and the window is finite. We curate it deliberately — the right system prompt, the right retrieved facts, the right tool results — and we manage its lifecycle with the right tool for the pressure: **compaction** (summarise and re-initialise as the window fills) when the history must round-trip, **offloading** to memory or the file system when state must persist but need not stay resident, and **sub-agent isolation** when a sub-task's tokens should never touch the main thread at all. We clear stale tool output and never dump "everything relevant" in — that both raises cost and *lowers* quality, because irrelevant tokens degrade retrieval inside the window. Context engineering is the core discipline now; prompt wording still matters (the compaction prompt itself must be tuned for recall), but it is one input to context engineering, not the whole game.
|
|
30
|
+
|
|
31
|
+
### 4. Memory is a designed, tiered system
|
|
32
|
+
|
|
33
|
+
An agent's memory is architecture, not an afterthought: **working memory** (the live context), **long-term memory** (durable facts and preferences, retrieved on demand), and **vector memory** (semantic recall over past interactions and knowledge). Each tier has an explicit write policy, retention, and retrieval path — and that write policy is a **trust boundary**, not just a cache rule: anything an agent persists can be poisoned once and replayed forever, which is why OWASP's 2026 Agentic list names memory and context poisoning as a distinct risk. Persist only validated, client-safe facts; keep secrets and PII out of recallable tiers. Memory left implicit becomes either amnesia or unbounded context growth.
|
|
34
|
+
|
|
35
|
+
### 5. Long-running agents are durable
|
|
36
|
+
|
|
37
|
+
An agent loop that runs for minutes or hours will be interrupted — a crash, a timeout, a deploy. We build it on **durable execution** so it resumes from the last committed step instead of restarting and repeating side effects. Match the weight to the horizon: an in-process loop that finishes in minutes and tolerates a clean restart needs only a **checkpointer** (a LangGraph-style PostgresSaver, event-sourced state); a job that runs for hours, spans services, fires non-idempotent side effects, or pauses on a human for days needs a real **durable execution engine** (Temporal-style) with exactly-once guarantees. Do not reach for the heaviest orchestrator by reflex — but do not hand-roll resume flags either. Durability moves the reliability guarantee out of the prompt and into the infrastructure, and it is what makes human-in-the-loop pauses and long tool calls safe.
|
|
38
|
+
|
|
39
|
+
### 6. The input is adversarial; guardrails are architecture
|
|
40
|
+
|
|
41
|
+
An agent mixes instructions and data in one channel, so **prompt injection** is a structural risk, not an edge case — and it arrives indirectly, through retrieved documents, tool outputs, and other agents (an injection in shared context propagates). There is no known complete fix: as of 2026 injection is mitigated in layers, not solved, so design for containment, not prevention. We validate at every trust boundary, constrain what each tool can do, mediate tool access and model traffic through a gateway control point, and treat a model output crossing into code or an action as untrusted until checked. The hard line: **no model-influenced instruction reaches an irreversible or high-privilege action without a deterministic, non-LLM check or a human gate in front of it** — an LLM cannot be the thing that decides whether to trust an LLM. Prompt injection has topped OWASP's LLM risks (LLM01) every year the list has existed, and the 2026 Agentic list extends the same logic to tool misuse and memory poisoning.
|
|
42
|
+
|
|
43
|
+
### 7. Least agency, with a human review point sized to the stakes
|
|
44
|
+
|
|
45
|
+
An agent gets the minimum authority its task requires, and the riskier the action the tighter the leash. High-stakes actions pause at a **human approval gate** — implemented as a durable interrupt that resumes on decision, not a blocking call — and lower-stakes ones route by confidence. "Human in the loop" (approve before acting) and "human on the loop" (monitor and intervene) are distinct designs; we pick deliberately. An agent loop with no termination condition and no oversight is how an autonomous system becomes an autonomous incident.
|
|
46
|
+
|
|
47
|
+
### 8. Evals and traces are the reliability surface
|
|
48
|
+
|
|
49
|
+
Agent behaviour is probabilistic, so we measure it like a system under test: trace every run (plan, tool calls, tokens, outcome), score it on the dimensions that matter (task completion, tool-call correctness, reasoning quality), run evals both offline in CI and online in production, and **promote failed production traces into the eval set** so the suite grows from real behaviour. An agent you cannot trace is an agent you cannot trust.
|
|
50
|
+
|
|
51
|
+
## How we apply this
|
|
52
|
+
|
|
53
|
+
The capability core stays headless and deterministic where it can; the agent is an adapter at the edge, like any other surface, reached through contracts and held to the same boundaries. Durable execution, identity, and the gateway control plane are shared infrastructure the agent rides, not bespoke per-agent code.
|
|
54
|
+
|
|
55
|
+
- [Agent-Native Systems](agent-native-systems.md) — designing the interfaces agents consume.
|
|
56
|
+
- [AI Engineering](ai-engineering.md) — the prompt/eval/context discipline underneath.
|
|
57
|
+
- [Integration Patterns](../system-design/integration-patterns.md) — the distributed-systems patterns an agent loop inherits.
|
|
58
|
+
|
|
59
|
+
## Anti-patterns we reject
|
|
60
|
+
|
|
61
|
+
- **Naive multi-agent.** Parallel agents writing interdependent decisions onto shared mutable state with no shared framing. Conflicting outputs, lost context, compounding error. Default to one agent with stateless, read-only sub-agents.
|
|
62
|
+
- **The over-stuffed context.** Pouring every possibly-relevant document into the window. It raises cost and *lowers* quality — curate and compact instead.
|
|
63
|
+
- **Hand-rolled durability.** Re-implementing checkpointing and resume with ad-hoc state flags. Use a checkpointer or a durable execution engine, sized to the horizon.
|
|
64
|
+
- **Output-only injection defence.** Guarding the model's output while trusting its retrieved inputs, tool results, and persisted memory. Injection comes in through the data and can be replayed from memory.
|
|
65
|
+
- **LLM guarding the LLM.** Letting a model's own judgement be the only check before an irreversible action. Put a deterministic gate or a human in front.
|
|
66
|
+
- **Unbounded agency.** A tool-wielding loop with no authority limit, no termination condition, and no human gate on consequential actions.
|
|
67
|
+
- **Free-text parsing.** Regex-extracting structured results from prose. Use schema-constrained output / tool calling.
|
|
68
|
+
- **Untraced agents.** Shipping an agent whose runs cannot be replayed, scored, or turned into eval cases.
|
|
69
|
+
|
|
70
|
+
## Further reading
|
|
71
|
+
|
|
72
|
+
- *Effective context engineering for AI agents*, Anthropic (2025) — context as the core discipline, with compaction and offloading.
|
|
73
|
+
- *How we built our multi-agent research system*, Anthropic (2025) — when read-heavy fan-out pays, and the ~15× token cost.
|
|
74
|
+
- *Don't Build Multi-Agents*, Cognition (2025) — the single-thread, single-context-owner counter-position.
|
|
75
|
+
- *How and when to build multi-agent systems*, LangChain — the topology trade-offs.
|
|
76
|
+
- *Building effective agents*, Anthropic — the canonical agent-pattern catalogue.
|
|
77
|
+
- *OWASP Top 10 for LLM Applications* (2025) and *OWASP Top 10 for Agentic Applications* (2026) — prompt injection, excessive agency, and memory poisoning as the leading risks.
|
|
78
|
+
- Durable execution engines (Temporal, LangGraph) — checkpointing and resumability as the production reliability pattern.
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: AI Engineering
|
|
3
|
+
description: Prompt engineering, evaluations, agent design, RAG, and context engineering.
|
|
4
|
+
status: active
|
|
5
|
+
last_reviewed: 2026-06-19
|
|
6
|
+
---
|
|
7
|
+
# AI Engineering
|
|
8
|
+
|
|
9
|
+
## TL;DR
|
|
10
|
+
|
|
11
|
+
AI engineering is software engineering with a non-deterministic component in the loop. We treat prompts as code, evaluations as tests, context as a first-class design surface, and agents as distributed systems. The discipline is about making probabilistic systems behave predictably enough to ship.
|
|
12
|
+
|
|
13
|
+
## Why this matters
|
|
14
|
+
|
|
15
|
+
Every team that has tried to ship an AI feature has learned the same lesson the hard way: the part that feels like magic in a demo is the part that fails in unpredictable ways in production. The gap between "it works in the playground" and "it works for every user, every day" is where AI engineering happens. The discipline treats the non-determinism as an engineering problem — measurable, testable, and addressable — rather than as an inherent limitation to shrug at.
|
|
16
|
+
|
|
17
|
+
## Our principles
|
|
18
|
+
|
|
19
|
+
### 1. Prompts are code
|
|
20
|
+
|
|
21
|
+
Prompts live in version control, are reviewed in the same PR as any other change, and are versioned against the model they were tuned for. A prompt is an artifact with a target: it is brittle across model versions, and the requirements it leaves *unstated* are exactly the ones that regress when you upgrade. Pin the model, and treat a model upgrade as a change that must clear the evals before it ships. "We tweaked the prompt in the dashboard" is how a team loses the ability to reason about its own AI behaviour.
|
|
22
|
+
|
|
23
|
+
The contested part is *who* writes the prompt. For a high-volume, measurable task, the best prompt is rarely the one a human hand-tunes. Declarative frameworks (DSPy and its successors) compile a prompt against your eval set — selecting few-shot examples, rewriting instructions to maximize a metric — and beat hand-authoring once you have data to optimize against. The principle is not "humans write clever prompts." It is "the prompt is a versioned, tested artifact," whether a human or an optimizer produced it.
|
|
24
|
+
|
|
25
|
+
Decision rule: hand-author while the task is exploratory or low-volume; move to a compiled/optimized prompt once you have an eval set worth optimizing against and the task runs often enough to pay for it. Either way, the prompt ships through review and is re-validated on every model change.
|
|
26
|
+
|
|
27
|
+
### 2. Evals are tests
|
|
28
|
+
|
|
29
|
+
Every meaningful AI behaviour has an eval: a scored comparison of model output against a reference. Evals run in CI; thresholds are committed; regressions block merge the same way unit-test failures do. Without evals, "did we make the model worse?" is unanswerable, which means every improvement is also a potential regression you will discover from users.
|
|
30
|
+
|
|
31
|
+
But an eval is only as trustworthy as its grader, and the popular grader — an LLM judging another LLM's output — is itself non-deterministic and biased. LLM judges are systematically overconfident, favour longer and more authoritatively formatted answers, and agree with human raters far less than their fluency suggests (inter-rater agreement on hard tasks sits around Fleiss' κ ≈ 0.3). A judge you have not calibrated against human labels is a vibe with a number attached.
|
|
32
|
+
|
|
33
|
+
Decision rule: grade with code wherever the output is checkable — schema, exact match, contains, numeric range — because those checks are deterministic and free. Reserve the LLM judge for genuinely subjective qualities, and before trusting it as a merge gate, measure its agreement with human labels on a held-out set and recalibrate when you change judge models. Set thresholds with a noise band: a one-point move inside the judge's own variance is not a regression, and blocking on it just trains the team to rerun CI until it passes.
|
|
34
|
+
|
|
35
|
+
### 3. Context is the interface
|
|
36
|
+
|
|
37
|
+
The content of the context window — system prompt, few-shot examples, retrieved documents, tool outputs — is the single biggest lever on model behaviour. The goal is not the *most* relevant context; it is the smallest set of high-signal tokens that produces the behaviour you want. More tokens is not more help: as the window fills, recall degrades — *context rot*, a gradient rather than a cliff, rooted in the n² attention budget — so every token you add dilutes the ones that mattered.
|
|
38
|
+
|
|
39
|
+
Design the context deliberately, measure its token budget, and prefer just-in-time retrieval — hand the model lightweight references (paths, IDs, queries) and let it pull the body through a tool when it needs it — over pre-loading everything you *might* need. For long-horizon work, compaction (summarize-and-restart, preserving decisions and open threads) and external note-taking keep the working set small. "Throw in everything relevant" is the anti-pattern that blows up the bill and *lowers* quality.
|
|
40
|
+
|
|
41
|
+
### 4. Retrieval matters more than the model
|
|
42
|
+
|
|
43
|
+
For a knowledge-grounded system, the retrieval layer sets the ceiling. A clever model with bad retrieval gives confident nonsense; a boring model with good retrieval gives boring, correct answers. Invest in retrieval quality — chunk boundaries, indexing, ranking, reranking — before you reach for a bigger model.
|
|
44
|
+
|
|
45
|
+
The honest tension: long-context models and "just put it all in the prompt" make naive RAG look obsolete, and for a small or stable corpus, loading the documents directly is simpler and often better. But long context is neither free nor reliable at scale — it pays the context-rot tax, and for repeated queries over a large corpus, retrieval is cheaper and lower-latency by a wide margin. The field has not abandoned retrieval; it has moved past the naive 2023 top-k pipeline toward *agentic retrieval*, where the model issues, critiques, and refines its own searches as a loop.
|
|
46
|
+
|
|
47
|
+
Decision rule: small or stable corpus that fits comfortably in context → load it directly and skip the retrieval stack. Large, changing, or cost-sensitive corpus → retrieve, and treat retrieval as a first-class system with its own evals (recall@k, not just end-to-end answer quality). Reach for agentic retrieval when a single query cannot express the information need — multi-hop questions, ambiguous asks, corpora that require exploration. Either way, what kills the system is bad retrieval, not a slightly weaker model.
|
|
48
|
+
|
|
49
|
+
### 5. Model outputs are validated at the boundary
|
|
50
|
+
|
|
51
|
+
Every model output that crosses into code is validated: shape, length, content, and expected enumerations. Parse failures are handled explicitly, never allowed to propagate. If you need a number, demand it in a structured schema; do not regex it out of prose.
|
|
52
|
+
|
|
53
|
+
Validation is also a security boundary, not only a correctness one. Treat every model output — and every tool result the model reads — as untrusted input, because anything in the context window can carry an instruction. This is the *lethal trifecta* (Simon Willison, 2025): an agent that combines access to private data, exposure to untrusted content, and the ability to communicate externally can be steered by a poisoned document into exfiltrating secrets — and prompt injection has no reliable fix today. A model output flowing into business logic, a shell, or an HTTP call without validation is an injection vector waiting to fire.
|
|
54
|
+
|
|
55
|
+
Decision rule: budget the trifecta. An agent acting without human review may hold at most two of {private data, untrusted input, external communication}; wanting all three means a human gate or a hard architectural break between the legs (Meta's "rule of two" framing).
|
|
56
|
+
|
|
57
|
+
### 6. Agents are distributed systems
|
|
58
|
+
|
|
59
|
+
An agent loop — model plans, model takes action, agent observes, model re-plans — has all the problems of a distributed system: retries, idempotency, timeouts, failure isolation. We apply the same patterns ([Integration Patterns](../system-design/integration-patterns.md)): bounded retries, circuit breakers, auditable history. The hardest agent failures are system failures, not model failures.
|
|
60
|
+
|
|
61
|
+
The live design argument is single-agent versus multi-agent. Anthropic reports a multi-agent research system beating a single agent substantially on its internal eval; Cognition argues that parallel sub-agents making independent decisions on a shared problem produce conflicting, incoherent output. Both are right about different shapes of work, and the variable that decides it is the *isolation boundary*: how much each sub-agent must know about what the others are doing.
|
|
62
|
+
|
|
63
|
+
Decision rule: split into sub-agents only when the work fans out into independent, read-mostly tasks that each return a small summary (research, search, parallel analysis) — the win is a clean context window per task, not parallelism for its own sake. Keep it a single agent when steps depend on each other's decisions, because coordinating shared mutable state across agents is harder than the problem you started with. And price it in: agents burn multiples of a chat's tokens, multi-agent systems an order of magnitude more.
|
|
64
|
+
|
|
65
|
+
### 7. Cost is part of the evaluation
|
|
66
|
+
|
|
67
|
+
A configuration that is 10% better but 5× more expensive is not obviously better. Evals track quality, latency, *and* cost, and the ship decision weighs all three. This matters more, not less, as token prices fall: reasoning models and agent loops spend tokens by the multiple, so the cost of a feature is now dominated by how many times it calls the model, not the sticker price per token. Budget cost per *task*, not per call, and let the eval surface the configuration that is good enough at a price you can defend ([Cost Engineering](../delivery/cost-engineering.md)).
|
|
68
|
+
|
|
69
|
+
### 8. Human oversight is designed in
|
|
70
|
+
|
|
71
|
+
For high-stakes AI outputs — content a user will act on, actions taken on their behalf — design the review point deliberately. The reviewer gets a summary calibrated to the decision, not a wall of raw output; the review UX is built alongside the AI feature, not retrofitted.
|
|
72
|
+
|
|
73
|
+
Decision rule: place the human gate by stakes × reversibility. Cheap, reversible actions can run unattended with logging; expensive or irreversible ones — sending money, deleting data, messaging the outside world — get a gate, and per the trifecta budget above that gate is mandatory once an agent touches private data and the outside world at once. "Let the model do it" without a review loop is a promise the model will eventually break.
|
|
74
|
+
|
|
75
|
+
## How we apply this
|
|
76
|
+
|
|
77
|
+
- [Agent-Native Systems](agent-native-systems.md) — the flip side, making our interfaces consumable by agents.
|
|
78
|
+
- [Observability](../quality/observability.md) — the trace surface for model calls.
|
|
79
|
+
- [Testing](../foundations/testing.md) — the broader testing discipline evals sit inside.
|
|
80
|
+
|
|
81
|
+
## Anti-patterns we reject
|
|
82
|
+
|
|
83
|
+
- **"The model will figure it out."** Hope is not a design.
|
|
84
|
+
- **Prompts as configuration.** Untracked prompts drift silently, and evals cannot catch drift they are not told about.
|
|
85
|
+
- **Over-stuffed context windows.** Throwing the kitchen sink at the model is usually how quality *decreases*, not increases.
|
|
86
|
+
- **An LLM judge you never checked against humans.** A confident grader that disagrees with people is worse than no grader — it automates the wrong call at scale.
|
|
87
|
+
- **Trusting tool output as if it were your own code.** Everything in the context window is potentially adversarial input.
|
|
88
|
+
- **Skipping evals "this once."** This once becomes always. Evals compound when you have them and compound against you when you do not.
|
|
89
|
+
- **Agent loops without termination.** A loop without a clear exit condition is how a runaway agent becomes a runaway bill.
|
|
90
|
+
- **Deterministic reasoning on top of probabilistic output.** If you need a number, ask for a number in a structured schema. Do not regex-extract it from prose.
|
|
91
|
+
|
|
92
|
+
## Further reading
|
|
93
|
+
|
|
94
|
+
- *Prompt Engineering Guide* ([promptingguide.ai](https://www.promptingguide.ai)) — the practitioner's summary of current patterns.
|
|
95
|
+
- Anthropic, *Building Effective Agents* — the reference for agent architecture patterns, single- and multi-agent.
|
|
96
|
+
- Anthropic, *Effective Context Engineering for AI Agents* — context rot, just-in-time retrieval, compaction, and sub-agent context isolation.
|
|
97
|
+
- Shreya Shankar et al., *Who Validates the Validators?* (2024) — aligning LLM-as-judge evaluation with human preferences.
|
|
98
|
+
- Simon Willison, *The Lethal Trifecta for AI Agents* (2025) — the security model for agents with data and tool access.
|
|
99
|
+
- Gao et al., *Retrieval-Augmented Generation for Large Language Models: A Survey* — RAG ground truth.
|
|
100
|
+
- *DSPy* (Stanford NLP) — declarative, compiled prompts as an alternative to hand-tuning.
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: AI-Native Product
|
|
3
|
+
description: Product management for probabilistic systems — the continuous decision loop, evals as a product responsibility, dual success metrics, and the three AI cost layers.
|
|
4
|
+
status: active
|
|
5
|
+
last_reviewed: 2026-06-19
|
|
6
|
+
---
|
|
7
|
+
# AI-Native Product
|
|
8
|
+
|
|
9
|
+
## TL;DR
|
|
10
|
+
|
|
11
|
+
Building product on top of a probabilistic model changes the job. Success is no longer a feature that works the same way every time — it is an **outcome envelope** the model lands inside often enough, measured by **evals** the product team owns. We run product as a continuous decision loop fed by live signals rather than a staged lifecycle, we track **two** success metrics (product outcome *and* model quality), and we price work across **three cost layers** standard prioritization misses. AI capability is a product to be evaluated and steered, not a feature to be shipped and forgotten.
|
|
12
|
+
|
|
13
|
+
## Why this matters
|
|
14
|
+
|
|
15
|
+
A deterministic feature has a binary definition of done: it meets its spec or it does not. An AI feature does not — the same input can produce a good answer today and a poor one tomorrow, and "good" is a judgement across tone, relevance, and accuracy rather than a pass/fail. Product practice built for deterministic software breaks here in specific ways: acceptance criteria cannot be written as fixed assertions, a one-time launch metric misses the model drifting under you, and a prioritization framework that ignores inference and maintenance cost will greenlight a feature that is ruinous at scale. The teams shipping good AI product are not the ones with the most impressive demo — they are the ones who treat the model's behaviour as a measured, governed, continuously-steered product surface.
|
|
16
|
+
|
|
17
|
+
## Our principles
|
|
18
|
+
|
|
19
|
+
### 1. Own the outcome envelope, not the exact output
|
|
20
|
+
|
|
21
|
+
For a probabilistic feature, product does not specify a single correct output — it defines the **envelope** of acceptable behaviour and the rate at which the model must land inside it. The spec shifts from "the system returns X" to "the system returns something that satisfies these properties, at least this often, and fails safely the rest of the time." Designing the envelope — what good looks like, what unacceptable looks like, what the fallback is when the model misses — is the core product decision of an AI feature.
|
|
22
|
+
|
|
23
|
+
### 2. Evals are a first-class product responsibility — and only as honest as their calibration
|
|
24
|
+
|
|
25
|
+
The quality of an AI feature is whatever its **evals** measure — which is exactly why a careless eval is dangerous: it reports a confident number while measuring the wrong thing. Product owns what "good" means: the dimensions that matter (task completion, correctness, tone, safety), the cases that must pass, and the bar for shipping.
|
|
26
|
+
|
|
27
|
+
Build the suite from reality, not from intuition. Start with **error analysis** — read actual production traces, label the failures, and cluster them *before* writing a single automated check. Teams that skip straight to dashboards and LLM judges end up scoring noise. Then layer the measurement to the stakes of the decision: cheap deterministic checks for coverage, an **LLM-as-judge** for screening the fuzzy dimensions, and human review where correctness is load-bearing.
|
|
28
|
+
|
|
29
|
+
Treat the judge itself as a measurement instrument that must be validated, not as ground truth. LLM judges carry documented biases — verbosity, position, and self-preference among them — and agreement with a small human-labeled set is a point estimate, not a guarantee that the judge holds up on the inputs you have not seen. Decision rule: align the judge against human labels on a held-out sample, re-validate it whenever you change the rubric or swap the underlying model, and **promote failed production cases into the suite** so it grows from where the product actually breaks. A team that cannot say how it measures its AI feature's quality has a demo, not a product — and a team that trusts an unvalidated judge has a demo wearing a dashboard.
|
|
30
|
+
|
|
31
|
+
### 3. Track two success metrics, not one
|
|
32
|
+
|
|
33
|
+
An AI feature succeeds on two axes at once and we instrument both: the **product outcome** (did users get value — engagement, retention, task success) and the **model quality** (precision, recall, acceptable-response rate, latency). These two headline axes sit on top of distinct layers that can each pass or fail independently — the model, the system that serves it (latency, cost, reliability), the product experience, and the business result — so when the headline numbers diverge, locate which layer the divergence lives in before reacting. Strong model scores with weak product outcomes means we are solving the wrong problem well; strong product outcomes with mediocre model scores means the feature tolerates imperfection better than we feared and we should stop over-investing in raw model quality. Watching only one axis hides the other's story. This is the [success-metrics](../foundations/success-metrics.md) discipline extended: the model quality metric is itself instrumented, with its own counter-metrics.
|
|
34
|
+
|
|
35
|
+
### 4. Price the three cost layers — including the ones that recur
|
|
36
|
+
|
|
37
|
+
AI work has a cost structure standard feature prioritization does not model, and ignoring it ships features that are unaffordable at scale:
|
|
38
|
+
|
|
39
|
+
- **Development** — the one-time build, as with any feature.
|
|
40
|
+
- **Inference at scale** — the per-call cost of running the model, paid on *every* use, forever. Do not anchor on today's token price: per-token cost has fallen roughly an order of magnitude a year, but agentic and reasoning workflows consume several times — sometimes orders of magnitude — more tokens per task, so total spend can climb even as unit prices collapse. Model token *volume* under realistic usage and reasoning depth, not the sticker price of a single call.
|
|
41
|
+
- **Adaptation and maintenance** — the recurring cost of keeping quality up as the world moves. In the foundation-model era this is rarely literal retraining: it is model-version churn (providers deprecate and silently re-tune the model under you), prompt and context upkeep, eval maintenance, and the escalation ladder when prompting stops being enough. Decision rule: start with prompting, escalate to retrieval when the gap is missing facts, and reach for fine-tuning only when behaviour must change and the volume justifies it — each rung up adds standing cost, and fine-tuning can multiply inference cost several-fold.
|
|
42
|
+
|
|
43
|
+
[Appetite](../foundations/prioritization-and-appetite.md) for an AI bet must account for all three; a framework that scores only build effort will systematically greenlight the wrong AI work.
|
|
44
|
+
|
|
45
|
+
### 5. Run product as a continuous decision loop
|
|
46
|
+
|
|
47
|
+
AI shortens the distance between a question and an answer — prototypes are hours not weeks, experiments run continuously, and signals from analytics, support, and behaviour arrive in real time. We exploit this by running product as a continuously-running decision system rather than a staged plan: reassess opportunities as signal arrives, prototype to learn rather than to ship, and let the loop tighten decision latency. Hold the line between building to learn and building to earn — a prototype that proves a point is not a feature, and the cheapness of generating one makes it dangerously easy to let a throwaway leak into production unmeasured. The same shortening makes [continuous discovery](../foundations/continuous-discovery.md) cheaper and therefore more obligatory.
|
|
48
|
+
|
|
49
|
+
### 6. Design for probabilistic experience and graceful failure
|
|
50
|
+
|
|
51
|
+
Because the model will sometimes be wrong, the experience is part of the product's correctness, not a polish layer. We design for the miss: visible uncertainty where it matters, easy correction and override, a safe fallback when confidence is low, and a [human review point](../system-design/identity-and-access.md) sized to the stakes of the action. Match friction to consequence — confirmations and checkpoints for high-stakes or irreversible actions, near-zero friction for cheap, reversible ones. Be deliberate about surfacing a confidence number: a model's self-reported confidence is usually poorly calibrated, and a precise-looking "87%" the model cannot back up erodes trust faster than honest hedging. Decision rule: show a numeric confidence only when it is calibrated against ground truth; otherwise express uncertainty by offering alternatives and making correction trivial. A probabilistic feature with a UX that assumes the model is always right is a feature that fails loudly the first time it is wrong.
|
|
52
|
+
|
|
53
|
+
### 7. Use AI to improve the product system, not to impress
|
|
54
|
+
|
|
55
|
+
The test of an AI capability is not how striking a single output looks — it is whether it improves the product system: better evidence, faster learning, clearer trade-offs, fewer repeated explanations, stronger decisions. We judge AI features by their effect on the loop, not by the wow of a cherry-picked prompt. A demo that dazzles and degrades the product system is a net loss disguised as innovation.
|
|
56
|
+
|
|
57
|
+
## How we apply this
|
|
58
|
+
|
|
59
|
+
- The eval suite is to an AI feature what [observability](../quality/observability.md) is to a service — the measurement substrate that makes steering possible — and shares the [agentic-systems](agentic-systems.md) discipline of tracing and scoring every run.
|
|
60
|
+
- Model quality, safety, and the human review point connect to [agent-native systems](agent-native-systems.md) and [AI engineering](ai-engineering.md) on the implementation side; product owns *what* to measure and *what bar* to hold, engineering owns *how*.
|
|
61
|
+
- The outcome envelope and dual metrics are [success-metrics](../foundations/success-metrics.md) applied to a non-deterministic core; the three cost layers extend [prioritization and appetite](../foundations/prioritization-and-appetite.md).
|
|
62
|
+
|
|
63
|
+
## Anti-patterns we reject
|
|
64
|
+
|
|
65
|
+
- **Demo-driven product.** Shipping on the strength of an impressive prompt, with no evals, no quality bar, and no plan for the median case.
|
|
66
|
+
- **Eval theater.** Trusting an LLM judge that was never validated against human labels, or a suite that grades style while the real failures go uncounted — confident numbers measuring the wrong thing.
|
|
67
|
+
- **Ship-and-forget.** Launching an AI feature and never measuring its quality again, so model drift degrades the product invisibly.
|
|
68
|
+
- **Single-metric AI.** Watching product engagement while ignoring model quality, or the reverse — missing the half of the story that explains the other.
|
|
69
|
+
- **Build-cost-only pricing.** Greenlighting an AI feature on build effort alone, then discovering inference at scale, version churn, or fine-tuning upkeep costs more than the feature earns.
|
|
70
|
+
- **Determinism cosplay.** Writing fixed pass/fail acceptance criteria for a probabilistic feature, designing a UX that assumes the model is never wrong, or showing a confidence score the model cannot actually back up.
|
|
71
|
+
|
|
72
|
+
## Further reading
|
|
73
|
+
|
|
74
|
+
- *AI Evals for Engineers & PMs* (Hamel Husain & Shreya Shankar) — error analysis, LLM-as-judge, and building eval suites as a product discipline.
|
|
75
|
+
- *Building effective agents* and *Effective context engineering*, Anthropic — the engineering substrate product steers.
|
|
76
|
+
- *AI Product Management* and *Product Discovery: build to learn vs. build to earn* (Marty Cagan / SVPG) — product judgement over probabilistic systems.
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Cost Engineering
|
|
3
|
+
description: FinOps, cost-aware architecture, and the economics of autoscaling.
|
|
4
|
+
status: active
|
|
5
|
+
last_reviewed: 2026-06-19
|
|
6
|
+
---
|
|
7
|
+
# Cost Engineering
|
|
8
|
+
|
|
9
|
+
## TL;DR
|
|
10
|
+
|
|
11
|
+
Cost is a non-functional requirement with a dashboard and a dollar sign. Every significant architectural decision considers cost-per-user and cost-per-call; every service has a budget it lives inside; surprising spend is an incident. FinOps is how we stay honest about the economics of running what we build.
|
|
12
|
+
|
|
13
|
+
## Why this matters
|
|
14
|
+
|
|
15
|
+
Most teams discover cost too late — after a quarterly bill raises eyebrows in a meeting. By then, the decisions that drove the cost are in production, have consumers, and are expensive to reverse. Cost engineering is the discipline of making the economic consequences of decisions visible at the point of the decision. It turns cost from a finance concern into an engineering variable.
|
|
16
|
+
|
|
17
|
+
## Our principles
|
|
18
|
+
|
|
19
|
+
### 1. Cost is a first-class metric
|
|
20
|
+
|
|
21
|
+
Cost-per-call, cost-per-user, cost-per-feature — all tracked alongside latency and error rate. A feature's success includes its unit economics, not just its engagement numbers. A team that does not know what its features cost cannot reason about trade-offs that matter.
|
|
22
|
+
|
|
23
|
+
### 2. Budgets are set and defended
|
|
24
|
+
|
|
25
|
+
Every significant service runs inside a cost budget. The budget is set at design time, reviewed monthly, and treated as a commitment. Exceeding budget triggers the same response as exceeding any other SLO: investigate, remediate, or explicitly negotiate an increase.
|
|
26
|
+
|
|
27
|
+
### 3. Autoscaling is designed, not enabled
|
|
28
|
+
|
|
29
|
+
Autoscaling is a tool with sharp edges. Aggressive autoscaling on a bursty workload can multiply cost without improving user experience; conservative autoscaling on a steady workload wastes headroom. Each scaling policy is tuned per workload with the production load profile in mind, not set to vendor defaults and left.
|
|
30
|
+
|
|
31
|
+
The shape of the load picks the mechanism. Steady baseline with modest peaks → run a reserved floor and let the autoscaler add thin headroom on top. Spiky, event-driven, or queue-backed work → scale on the real driver (queue depth, request concurrency via KEDA or equivalent), not lagging CPU, and scale to zero when idle if the cold-start budget allows. Latency-sensitive request paths → never scale to zero; the cold start is paid by the user. Defaults are a starting hypothesis, not a setting.
|
|
32
|
+
|
|
33
|
+
### 4. Cheap queries beat fast queries — until staleness has a cost
|
|
34
|
+
|
|
35
|
+
The fastest query is the one that does not run. We cache what we can, compute what we must, and denormalise when the read-to-write ratio justifies it. But "cheap" is not free: a cache buys read cost down with invalidation complexity, and the bugs born of stale or inconsistent reads can cost more than the queries they replaced. Denormalisation trades read cost for write amplification and a second copy of the truth to keep in sync.
|
|
36
|
+
|
|
37
|
+
The decision rule is the read-to-write ratio weighed against the tolerance for staleness. Read-heavy data that tolerates seconds or minutes of lag (catalogues, dashboards, feeds) → cache or denormalise aggressively, with an explicit TTL and an invalidation path. Data where a stale read is a correctness or money bug (balances, inventory, auth) → pay for the live query and optimise the query itself. Never add a cache to mask a query you have not first tried to make cheap at the source.
|
|
38
|
+
|
|
39
|
+
### 5. Egress is expensive; plan for it
|
|
40
|
+
|
|
41
|
+
Cloud provider egress is the most mispriced line item in most bills. Inter-region chatter, chatty logs, large payloads sent frequently — these add up. We place data where its consumers are, batch where we can, and compress where it is cheap to do so.
|
|
42
|
+
|
|
43
|
+
### 6. AI spend has the same discipline
|
|
44
|
+
|
|
45
|
+
Every model call has a measured cost and a caching strategy. Prompts are versioned with token-count measurement; expensive prompts are justified by value. Output tokens are the dominant cost — major providers price them roughly 4-5× input — so a verbose model talking to itself is the silent budget killer, and trimming output earns more than trimming input. Prompt caching is the highest-leverage lever for any workload that resends a large, stable prefix (system prompt, repo, retrieved context): a cache hit bills a small fraction of the input rate, so structure prompts with the stable bytes first and the variable bytes last. "Just pass the whole context to the largest model" is how an AI feature becomes a cost incident.
|
|
46
|
+
|
|
47
|
+
### 7. Rightsize before you commit
|
|
48
|
+
|
|
49
|
+
Reserved instances and committed-use discounts save roughly 30-50% over on-demand for predictable baseline workloads — but the discount is only as good as the baseline it is bought against. Commit to an oversized or idle fleet and you have locked in waste at a discount. So the order is fixed: rightsize first, then commit. Rightsizing cleans the baseline — often returning 15-25% on its own — and only then is there a number worth committing to.
|
|
50
|
+
|
|
51
|
+
The contested zone is how much to commit and for how long. Longer terms (three years) cut the most but lock hardest; a savings plan or reservation generally cannot be cancelled or resized mid-term. Cover the *verified floor* — the level the workload never drops below — and let variable and peak demand float on-demand, where elasticity is worth its premium.
|
|
52
|
+
|
|
53
|
+
The decision rule: commit to the floor you are certain of, ladder the purchases (several small commitments across the year rather than one annual bet) so coverage tracks real growth, and bias longer terms to the stable core and shorter terms to the uncertain layer. Size to the minimum baseline, never to average or peak — basing a commitment on average usage is how a discount becomes a liability.
|
|
54
|
+
|
|
55
|
+
### 8. FinOps is a practice, not an office
|
|
56
|
+
|
|
57
|
+
Cost engineering is something every team does, not a team that does it on behalf of others. The central function provides tooling and visibility; the distributed decisions are made by the teams that built the spend.
|
|
58
|
+
|
|
59
|
+
### 9. AI cost runs through a gateway; carbon is a cost too
|
|
60
|
+
|
|
61
|
+
AI spend earns a dedicated control point: route model calls through an **AI gateway** that does model routing, semantic caching, fallback, and per-key budgets. The gateway is the difference between an experiment and a cost incident — it enforces the token discipline of Principle 6 at the edge, where every team's calls converge, rather than trusting each caller to do it alone.
|
|
62
|
+
|
|
63
|
+
Carbon sits on the same ledger. Measure it with the Green Software Foundation's Software Carbon Intensity (SCI): the energy a workload draws, the carbon intensity of that energy, and embodied hardware emissions, divided by a functional unit (per call, per user). Express the target as a fitness function so it cannot regress silently.
|
|
64
|
+
|
|
65
|
+
The contested zone is *how* you cut carbon, and the two levers are not equal. **Region-shifting** — placing or moving a workload onto a grid running cleaner energy — is usually the single largest lever; Microsoft's carbon-aware research finds the choice of region can dominate a workload's SCI. But it collides head-on with three other principles: data-residency and privacy law may forbid the move, egress (Principle 5) can erase the saving, and distance adds user latency. **Time-shifting** — deferring flexible work to low-carbon windows using grid signals (WattTime, Electricity Maps) via tooling like Microsoft's Carbon Aware SDK — is safer but bounded; published studies find simple scheduling captures most of the available reduction and sophisticated policies add little on top.
|
|
66
|
+
|
|
67
|
+
The decision rule follows the workload. Deferrable batch with no latency SLA (model training, reporting, async pipelines) → time-shift into clean windows. Stateless compute free of residency constraints → region-pin to a low-carbon region at deploy time, after checking the egress and latency bill. Latency-sensitive or residency-bound request paths → shift nothing; cut carbon by cutting waste, which is the same efficiency work that cuts cost.
|
|
68
|
+
|
|
69
|
+
## How we apply this
|
|
70
|
+
|
|
71
|
+
- [Observability](../quality/observability.md) — the measurement substrate for cost per unit.
|
|
72
|
+
- [Platform](platform.md) — the shared infra that every team's cost sits on.
|
|
73
|
+
- [Performance](../quality/performance.md) — cheap code is often also fast code.
|
|
74
|
+
|
|
75
|
+
## Anti-patterns we reject
|
|
76
|
+
|
|
77
|
+
- **"We will optimise cost later."** Later never comes; the architecture is what it is by then.
|
|
78
|
+
- **Autoscale-and-forget.** Default autoscaling on a workload you have not profiled is how you get a thousand-dollar day.
|
|
79
|
+
- **Commit before rightsizing.** A three-year commitment on an oversized fleet locks in waste at a discount, and the term cannot be unwound.
|
|
80
|
+
- **Chatty logs forever.** Unstructured debug logs at volume are a non-trivial line on the bill.
|
|
81
|
+
- **AI calls without budget.** Model spend without a measured cost-per-request grows silently until it does not.
|
|
82
|
+
- **"It's just pennies."** Pennies × N × daily = a real number. Track it.
|
|
83
|
+
|
|
84
|
+
## Further reading
|
|
85
|
+
|
|
86
|
+
- *Cloud FinOps*, Storment & Fuller — the canonical text on cross-functional cost management.
|
|
87
|
+
- *AWS Well-Architected Framework — Cost Optimization pillar* — applicable beyond AWS, useful as a checklist.
|
|
88
|
+
- *FinOps Foundation framework* ([finops.org](https://finops.org)) — the practitioner's handbook; see the Rate Optimization and committed-use-discount capabilities for the commitment-portfolio discipline behind Principle 7.
|
|
89
|
+
- *Green Software Foundation — Software Carbon Intensity (SCI) specification & Carbon Aware SDK* ([greensoftware.foundation](https://greensoftware.foundation)) — how to measure carbon per functional unit and schedule work against grid signals.
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: The Day-2 Operational Baseline
|
|
3
|
+
description: The stack-agnostic bar every project clears to be operable, debuggable, and safe to change on day two — config validation, typed errors, a debug entry point, observability, graceful shutdown, a pure core, a fast test, and dev-CLI integration — plus the two rules that keep an off-script app honest.
|
|
4
|
+
status: active
|
|
5
|
+
last_reviewed: 2026-06-21
|
|
6
|
+
---
|
|
7
|
+
# The Day-2 Operational Baseline
|
|
8
|
+
|
|
9
|
+
## TL;DR
|
|
10
|
+
|
|
11
|
+
A project that boots on day one is not the same as a project a team can operate, debug, and change on day two. The gap between the two is a small, **stack-agnostic** set of properties — load-and-validate config, typed errors, a way to attach a debugger, telemetry, clean shutdown, a pure core, a test that runs in seconds, and integration with the project's dev CLI. A web service in Go, a native desktop app, and an embedded daemon owe every item on this list; they differ only in *how* each one is honoured, never in *whether*. This baseline is the bar a generated scaffold already clears, the checklist a forged stack is held to, and the work a first bet scopes in.
|
|
12
|
+
|
|
13
|
+
## Why this matters
|
|
14
|
+
|
|
15
|
+
GroundWork's value is a high-quality starting point. The paved-road generators bake this baseline in — clean architecture, a composition root, graceful shutdown, observability, a test harness — so a developer who runs one never has to think about it. The risk is everything *off* the paved road: a stack with no generator, or a generated project adapted past its template. The temptation there is to ship something that boots and call it done. A thing that boots but cannot be debugged, observed, or shut down cleanly is not a starting point — it is a liability handed over with a green checkmark.
|
|
16
|
+
|
|
17
|
+
So the baseline is written stack-agnostic on purpose. It is the answer to "what does *good* mean when there is no template to copy?" — and the bar does not drop just because the road ran out.
|
|
18
|
+
|
|
19
|
+
## The two rules
|
|
20
|
+
|
|
21
|
+
These two rules are why the baseline exists, and they outrank convenience every time.
|
|
22
|
+
|
|
23
|
+
### No empty capabilities
|
|
24
|
+
|
|
25
|
+
Every affordance a project materialises must have real backing. A `./dev start` that starts nothing, a `/health` endpoint that always returns `ok`, a test medium with no surface behind it, a config flag nothing reads — each one reads as "covered" while covering nothing, and the next person trusts it. An inert capability is worse than an absent one, because absence is honest.
|
|
26
|
+
|
|
27
|
+
The rule has a sharp edge for adapted tooling: when a shipped affordance does not fit the project (the classic case — a Docker-shaped `./dev start` in a project with no containers), the fix is to **adapt it to do something real or remove it**, never to leave it wired to nothing and never to build a parallel thing beside it. If a capability has no backing yet, say so plainly rather than shipping the hollow shell.
|
|
28
|
+
|
|
29
|
+
### Off-script still lands well
|
|
30
|
+
|
|
31
|
+
When the chosen stack has no paved path, the operational bar is unchanged. The baseline below is the contract: a native macOS app, a Rust daemon, and a Next.js frontend all owe config validation, typed errors, a debug entry point, telemetry, graceful shutdown, a fast test, and dev-CLI integration. Each honours them in its own idiom — `os_log` is not OpenTelemetry, `lldb` is not Delve — but "this stack does it differently" is never "this stack skips it."
|
|
32
|
+
|
|
33
|
+
## The baseline
|
|
34
|
+
|
|
35
|
+
Each item states what the property is and why it earns its place. Most are universal; a few are conditional, and the condition is named. Where an item is genuinely not applicable, that is a valid answer — but it must be a *reasoned* answer recorded alongside the others, not a silent omission.
|
|
36
|
+
|
|
37
|
+
1. **Configuration is loaded and validated at startup.** The process reads its configuration once, validates it, and refuses to boot with a clear message naming the missing or invalid value. *Why:* a process that starts with half a configuration fails later, deep inside a request or a job, where the cause is buried. Fail at the door, not in the dark.
|
|
38
|
+
|
|
39
|
+
2. **Errors are typed and handled at the boundary.** The core raises meaningful, matchable errors; the thin shell maps them to the surface's vocabulary — an HTTP status, a process exit code, a user-facing dialog. No bare strings thrown as control flow, no failures swallowed into silence. *Why:* an error you cannot pattern-match is one you cannot handle, test, or alert on.
|
|
40
|
+
|
|
41
|
+
3. **There is a debugging entry point.** A documented, one-command way to run the app under a debugger or with verbose diagnostic output, and logs a human can read at a glance. *Why:* the first thing a developer does on day two is reproduce a defect. If attaching a debugger is undiscovered territory, every investigation starts from cold — this is the single highest-leverage developer-experience affordance a seed can ship.
|
|
42
|
+
|
|
43
|
+
4. **Observability is wired from the first commit.** Structured logs always; distributed traces and metrics where the target is networked or long-running. *Why:* you cannot operate what you cannot see, and retrofitting telemetry means re-touching every code path you already wrote. Observability is a design-time concern, not a later sprint. (Conditional: a pure local one-shot tool needs structured logs, not a tracing pipeline.) See [Observability](../quality/observability.md).
|
|
44
|
+
|
|
45
|
+
5. **Shutdown is graceful.** The process traps termination signals, stops accepting new work, drains what is in flight, releases resources and long-lived connections, and exits cleanly. *Why:* a process killed mid-flight corrupts state and leaks connections — and the inner loop restarts the process constantly. (Conditional: a stateless one-shot command that holds no resources has nothing to drain; record that as the reason, not the omission.)
|
|
46
|
+
|
|
47
|
+
6. **A pure core wrapped in a thin shell.** Decision logic carries no I/O; concrete dependencies sit behind abstractions the core owns, and no implementation detail leaks inward. *Why:* the core stays testable without infrastructure and swappable as the app grows, and there is one obvious place for every kind of code. See [How We Structure Code](../system-design/code-structure.md).
|
|
48
|
+
|
|
49
|
+
7. **A test harness exists and runs in seconds.** The first test proves the wired-together app does something real — against the real dependency where it runs locally, not a mock of it — and the author or an agent runs it with one command. *Why:* verification, not generation, is now the inner loop's bottleneck; a seed with no fast, trustworthy test is a seed nobody can safely change. See [Testing](../foundations/testing.md).
|
|
50
|
+
|
|
51
|
+
8. **The app is a first-class citizen of the dev CLI.** `start`, `stop`, `logs`, and `test` operate on it through the project's `./dev` CLI — registered as a managed service or runner, never a side process a developer starts by hand. *Why:* the golden path is one command to learn and one surface to improve; an app that lives outside it is friction every developer pays every day. See [Developer Experience](devex.md) and [Platform](platform.md).
|
|
52
|
+
|
|
53
|
+
## How to apply it
|
|
54
|
+
|
|
55
|
+
When scoping a new app — and especially a forged, off-script one — walk the baseline once and, for each item, record one of: *satisfied by the seed*, *scoped into a bet*, or *N/A because …*. The applicable, not-yet-built items become the first bets' work, so the project converges on the full baseline through the normal delivery loop rather than trying to land it all in the scaffold. The seed proves the shape; the delivery loop earns the depth.
|
|
56
|
+
|
|
57
|
+
This document is the canon. The per-stack Day-2 checklists that scaffold and engineer skills carry are *elaborations* of this baseline in a specific idiom — when they and this page disagree, this page wins, and the checklist is the one to fix.
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Developer Experience
|
|
3
|
+
description: Golden paths, paved roads, inner-loop optimisation, and a measurement stack — DORA for the system, DevEx for the human — that tells us whether the loop is healthy.
|
|
4
|
+
status: active
|
|
5
|
+
last_reviewed: 2026-06-19
|
|
6
|
+
---
|
|
7
|
+
# Developer Experience
|
|
8
|
+
|
|
9
|
+
## TL;DR
|
|
10
|
+
|
|
11
|
+
A team ships as fast as its feedback loop lets it. We invest deliberately in the inner loop — the seconds between a code change and the evidence that the change works — because every second saved there is paid back a thousand times over across the team. Your project's dev CLI is the golden path, the measurement stack (DORA for the delivery system, DevEx for the human in it) is how we tell whether the loop is healthy, and friction in the loop is an engineering bug.
|
|
12
|
+
|
|
13
|
+
## Why this matters
|
|
14
|
+
|
|
15
|
+
The single largest predictor of a team's output, over months and years, is the quality of its feedback loop. A team that sees the result of a change in five seconds ships more and ships better than a team that sees it in five minutes — not because the individuals are smarter, but because the loop of hypothesis-and-test runs an order of magnitude more often.
|
|
16
|
+
|
|
17
|
+
But the feedback loop is only one of three things that govern how it actually feels to build here. The research that named the field — *DevEx: What Actually Drives Productivity* (Noda, Storey, Forsgren & Greiler, ACM Queue, 2023) — isolates three dimensions: **feedback loops** (how fast and reliable the answers are), **cognitive load** (how much you must hold in your head to make a change), and **flow state** (whether you can stay in deep work without being yanked out of it). Optimising the loop while ignoring the other two buys a fast loop nobody can think straight inside. Developer experience is not a perk; it is an engineering lever, and it has more than one handle.
|
|
18
|
+
|
|
19
|
+
## Our principles
|
|
20
|
+
|
|
21
|
+
### 1. The inner loop is sacred
|
|
22
|
+
|
|
23
|
+
The inner loop is the sequence from "I think this code will work" to "yes or no, here is the evidence." We invest in making this loop as short as it can be: incremental compilation, test selection, hot reload, one-command bootstrapping, fast linting. Every second shaved off the inner loop multiplies across every engineer, every day.
|
|
24
|
+
|
|
25
|
+
The loop's centre of gravity has moved. When a coding agent can produce a plausible change in seconds, generation stops being the bottleneck and verification becomes it — the 2024 DORA report found AI adoption correlated with *lower* delivery throughput and stability, because machine-speed output floods a system built for human-speed review. So the inner loop we optimise is no longer "edit → compile"; it is "propose → prove." Fast, trustworthy local verification — a test suite the author and the agent can both run in seconds and believe — is now the highest-leverage second to shave. A loop that generates fast but verifies slowly is a regression dressed as progress.
|
|
26
|
+
|
|
27
|
+
### 2. One entry point for local tasks — a facade, not a build system
|
|
28
|
+
|
|
29
|
+
Every local task — start, stop, test, lint, migrate, deploy, generate — runs through a single dev CLI. One command to remember, one tool to teach a new engineer, one surface to improve. Proliferating ad-hoc scripts across `Makefile`, `package.json`, and `bin/` is how a developer experience becomes a treasure hunt.
|
|
30
|
+
|
|
31
|
+
The value is the single discoverable surface, not custom machinery behind it. The dev CLI is a thin facade that delegates to the right standard tool — the monorepo task graph (Nx, Turborepo), a command runner (Task, just, Make), the package manager — never a bespoke build system reimplementing what those already do well. The failure mode is the opposite of fragmentation: a 4,000-line homegrown CLI that nobody but its author can change, with worse caching and worse error messages than the tools it wraps. Decision rule: wrap, don't reinvent. The CLI owns *discoverability and consistency*; the underlying tools own *execution*. If a subcommand contains real build logic rather than orchestration, that logic belongs in the task runner, not the wrapper.
|
|
32
|
+
|
|
33
|
+
### 3. Golden paths, not mandatory paths
|
|
34
|
+
|
|
35
|
+
The golden path is the well-trodden, well-supported way to do a common task. It is the default, and it is the path new engineers and agents follow without thinking. Deviation is allowed when a task genuinely does not fit, but the deviator pays the cost of their own tooling. Golden paths concentrate investment; mandatory paths breed resentment and shadow tooling built to evade them.
|
|
36
|
+
|
|
37
|
+
The trap is freezing the path. A golden path that stops absorbing the cases people actually hit becomes a mandatory path by neglect — everyone deviates, and the "default" is fiction. The path stays golden only if the escape hatches are watched: a deviation that recurs is a signal the path is too narrow, and the fix is to widen the path, not to scold the deviators.
|
|
38
|
+
|
|
39
|
+
### 4. Measure the system with DORA, the human with DevEx — and never the individual
|
|
40
|
+
|
|
41
|
+
The four DORA keys — deployment frequency, lead time for changes, change failure rate, time to recover — measure the health of the *delivery system*. A fifth, operational reliability, measures whether what you ship stays up. We track them, surface them, and treat a regression in any one as a signal to invest in the loop.
|
|
42
|
+
|
|
43
|
+
But DORA measures throughput and stability; it is silent on whether the work is sustainable or the engineers are drowning. That is the DevEx layer — feedback loops, cognitive load, flow state — which the four keys cannot see. The lineage matters: DORA (2018) → SPACE (2021) → DevEx (2023) → DX Core 4 (Tacho & Noda, 2024), which folds all three into one balanced scorecard across speed, effectiveness, quality, and impact. Use the system metrics to find *where* delivery hurts and the human metrics to find *why*. Two non-negotiable guardrails: never reduce these to a single number, and never attribute any of them to an individual. The moment a metric becomes a performance target it gets gamed (Goodhart's law) — deploy frequency inflates with trivial commits, change-failure rate drops because nobody logs incidents. Metrics are instruments for the team to steer by, not a stick to measure people with.
|
|
44
|
+
|
|
45
|
+
### 5. Onboarding time-to-first-value is a measured target
|
|
46
|
+
|
|
47
|
+
A new engineer should reach their first local contribution — "I changed something and I can see the change" — fast, and a new service should reach its first deploy early. We set explicit targets (a first contribution inside the first day, a first deploy inside the first week are good defaults) and we *measure against them* rather than assume them. The number is calibrated to the domain: a CRUD service and a system with deep regulatory or numerical complexity will not share a target, and pretending otherwise just makes the metric a lie. What is universal is the discipline — the target is written down, the actual time is observed, and a regression is treated as a bug in the onboarding system, not a failing of the new hire.
|
|
48
|
+
|
|
49
|
+
### 6. Documentation is part of the loop
|
|
50
|
+
|
|
51
|
+
A command you cannot find is a command you do not use. Every CLI subcommand has a reference entry, every golden path has a guide, every service has a handbook. Documentation lives next to the thing it documents and is generated from the source of truth wherever possible — `--help` output, schema, config — because prose that drifts from reality is worse than no prose: it actively misleads. The test is not "does a doc exist" but "can a new engineer, or an agent, find and trust it without asking a human."
|
|
52
|
+
|
|
53
|
+
### 7. Match the production shapes that bite — not the whole topology
|
|
54
|
+
|
|
55
|
+
The gaps that cause "it works on my machine" are specific: a different database engine or version, a message broker with different ordering and delivery semantics, an auth contract that behaves differently, a different container runtime. Close *those* — same engine, same contract, same semantics — and the class of bug disappears. Emulation over mocks ([Testing](../foundations/testing.md)) applies: emulate a dependency you own the contract with; mock only at the seam of a dependency you do not.
|
|
56
|
+
|
|
57
|
+
Full production *shape* is not full production *scale or topology*, and chasing the latter locally is a losing trade — you cannot run a hundred-node cluster, real traffic, or every downstream service on a laptop, and the attempt produces a brittle, slow local stack that drifts anyway. When fidelity costs more than a laptop can pay, the answer is to move the environment, not fake it: ephemeral preview environments and cloud development environments (Codespaces, Gitpod, Coder) give real production shape on real infrastructure, at the price of network latency in the inner loop. Decision rule: reproduce locally the contracts and semantics that produce correctness bugs; reproduce in a remote or ephemeral environment the scale and topology that produce systemic bugs; do not try to do either in the wrong place.
|
|
58
|
+
|
|
59
|
+
### 8. Cognitive load is the hidden tax
|
|
60
|
+
|
|
61
|
+
The slowest part of a change is often not compiling or testing — it is the time spent figuring out *where* the change goes and *what else* it touches. Extraneous cognitive load (sprawling configuration, leaky abstractions, ten ways to do one thing, knowledge that lives only in someone's head) is a direct, compounding tax on every change, and it is invisible in delivery metrics until it surfaces as slow lead times and burnout. We treat it as a design constraint: consistent project shape, one obvious way to do common things, generated scaffolding so the structure is given rather than rediscovered, and ruthless deletion of the second and third way to do anything. Protecting flow is the same discipline applied to time — batched reviews, asynchronous defaults, and CI that does not demand babysitting keep engineers in deep work instead of context-switching out of it.
|
|
62
|
+
|
|
63
|
+
### 9. Friction is filed as a bug
|
|
64
|
+
|
|
65
|
+
If a process is painful, that pain is a bug. File it, prioritise it, fix it. "Everyone deals with it" is how chronic friction becomes chronic velocity loss. Whoever maintains the dev tooling owns that backlog the same way a product team owns its user-bug backlog — because the developers are the users, and the dev platform is the product.
|
|
66
|
+
|
|
67
|
+
## How we apply this
|
|
68
|
+
|
|
69
|
+
- [Platform](platform.md) — the broader internal platform the dev CLI is a part of.
|
|
70
|
+
- [Progressive Delivery](progressive-delivery.md) — the outer loop the inner loop feeds into.
|
|
71
|
+
|
|
72
|
+
## Anti-patterns we reject
|
|
73
|
+
|
|
74
|
+
- **"Follow the README and read between the lines."** Onboarding that depends on tacit knowledge is not onboarding.
|
|
75
|
+
- **Five CLIs for five tasks — or one CLI that reinvents the build.** One unified facade is the default. A second CLI earns its existence by solving a problem the first cannot; a homegrown build system hiding behind the facade is the same fragmentation wearing a disguise.
|
|
76
|
+
- **Skip-the-test culture.** Fast-but-unreliable tests are worse than slow-reliable ones: a flaky suite teaches the team to ignore red, which is strictly worse than a slow suite they trust. The inner loop is made fast by honest investment, not by cheating — and a verification loop nobody trusts is no loop at all.
|
|
77
|
+
- **DORA theatre.** Tracking the metric while not responding to it is worse than not tracking it. Ranking individuals by it is worse still.
|
|
78
|
+
- **The frozen golden path.** A default that no longer fits the work people do is a mandatory path everyone routes around. Watch the deviations; widen the path.
|
|
79
|
+
- **Ignoring friction.** If you find a sharp edge, file the ticket. Do not route around it silently.
|
|
80
|
+
|
|
81
|
+
## Further reading
|
|
82
|
+
|
|
83
|
+
- *Accelerate*, Forsgren, Humble, Kim — the empirical foundation for the DORA metrics.
|
|
84
|
+
- *The DevOps Handbook*, Kim et al. — the full treatment of the inner-and-outer loop view.
|
|
85
|
+
- *DevEx: What Actually Drives Productivity*, Noda, Storey, Forsgren & Greiler (ACM Queue, 2023) — the feedback-loops / cognitive-load / flow-state model.
|
|
86
|
+
- *The DX Core 4* (Tacho & Noda, 2024) — the unified scorecard folding DORA, SPACE, and DevEx into one framework.
|
|
87
|
+
- *Team Topologies*, Skelton & Pais — the organisational side of platform and golden paths.
|
|
88
|
+
- *Developer Experience: Concept and Definition* (Fagerholm & Münch, 2012) — the academic framing that predates the modern DevEx term.
|