Knowledge Basephilsj

The Factory — optimal build process

factoryactive owner: philip · updated 2026-11-14

relates: dual-deployment-serverless-container · env-selected-store-adapters · transactional-outbox · fail-safe-decision-table · yaml-dsl-form-runtime · agent-skill-packaging

The Factory — optimal build process

The progressive pipeline every delivery flows through: spec with acceptance criteria, design instantiated from KB knowledge, build under architecture rules, test pyramid, DoD gate, CI, review, deploy via the edge seam, and retro that feeds learnings back into the KB. Each stage is gated; failures loop back to the cheapest stage that can fix them.

Pipeline

flowchart TD A[Intake: plain-language ask] --> B[SPEC: military-spec acceptance criteria] B --> C[Design: instantiate kb patterns / frameworks / decisions] C --> D[Build: dual-deployment rules, env-selected stores, outbox] D --> E[Test pyramid: unit → API-contract mock layer → Playwright] E --> F{DoD gate: dod_gate.py + dsl_drift} F -- fail --> D F -- pass --> G[CI green: compile --check, unit, functional] G --> H[Review: adversarial vs Linear ACs] H -- changes requested --> D H -- approved --> I[Merge → deploy via edge seam] I --> J[Retro: learner-retro extracts learnings] J --> K[KB updated: rules / ACs / DoD at L1 → L3] K -.-> C

Stage rules

stagegatefailure loops back to
Intakeask restated as testable ACs—
SPECmilitary-spec: precise, one-sentence ACsIntake
Designevery choice cites a kb: entry or records a new decisionSPEC
Buildhost-agnostic handlers, env-only config, store adapters, outbox for side effectsDesign
Test pyramidunit at base, API-contract-identical mock, Playwright functional on top, all in CIBuild
DoD gatedod_gate.py + dsl_drift.py passBuild
CIgreen before reviewany stage
Reviewadversarial review vs Linear ACs; merge on green CIBuild
Deployvia seam (local runner default, edge adapter production)—
Retrolearner-retro, progressive discipline (evidence thresholds, caps, decay)feeds Design next time

Non-negotiables

Anti-patterns

Sources