feat(infra): add primitives + contracts layer
loading diff…
Introduces the human-facing layer of the infrastructure architecture: people write contracts and primitives, agents generate stacks.
registry.yaml — machine-readable topology for all 19 stacks with real account/project IDs and dependsOn edgespackages/contracts/ — typed Outputs interface + ref(env) helper per stack (aws-production, aws-staging, aws-integrations, aws-org-management, cloudflare, doppler, vercel); a rename in a producer is a compile error in all consumers, not a silent runtime failureprimitives/apollo/blueprint.ts — illustrative product blueprint showing Vercel → AWS ALB + Doppler secrets wired via satisfies type enforcementdocs/primitives-and-contracts.md — definitive guide: mental model, who writes what, how to add a product/output, and the full agent generation workflowAll existing stacks in stacks/ are untouched. The contracts define the target interface — the stacks don't export these values yet. That gap is intentional: wiring the actual exports in each stack is the next step, done incrementally per product.
When an agent is asked to generate a new stack for a product:
primitives/<product>/blueprint.ts for the stack list and consumes mappackages/contracts/<upstream>.ts for each upstream in consumesregistry.yaml for account IDs and env namesstacks/<name>/src/ using the ref(env) helpers for cross-stack wiringtsc --noEmit and pulumi preview --diff to self-verifyregistry.yaml account IDs match actual AWS account IDspackages/contracts/aws-production.ts — Outputs fields match what the stack logically ownsprimitives/apollo/blueprint.ts — satisfies type checks confirm the consumed fields exist in their contractsdocs/primitives-and-contracts.md for clarity and completeness🤖 Generated with Claude Code