Stamped technical architecture: current map, layer model, contracts and decisions
Single source of truth for Stamped's technical architecture. Prepared 6 October 2026 (IST) for Vinayak Raizada; finalised 7 October 2026; moved here from the October 2026 research package the same day. Internal. This is the target architecture for the first three plants. Decisions D13, D14 and D19 are DECIDED by Vinayak and D18 is DEFERRED; every other decision in DECISIONS.md is RECOMMENDED — awaiting Vinayak, with its evidence and how to reverse it. Nothing here claims a result at a plant; verified savings are ₹0. Company identity and hard stops come from the master document, which wins on any conflict.
What changed in the finalise pass: ARCHITECTURE_CHANGES_2026-10-07.md. Deep layer docs: layers/, l3/, l4/, fast-loop/. Renders of the diagrams: render/.
Repo short names (SE, EDGE, L2, L3, KR, L5, L6, EV and so on) are defined in STAMPED_CORE_TECH_CAPABILITIES.md section 0. Capability IDs (C01 to C48) are from the same file. External evidence IDs (E01 onward, I05 onward) are in the evidence ledgerTyped rows (measured / advisory / model partitions) frozen into the trace.
| Theme | truth → quality/estimation → calibrated advice → filtered action → sustained value |
| Design doctrine | Safety → Calibration → Data need → Explainability → Accuracy → Cost |
Chapters
- SummaryToday Stamped runs a slow loop: read connectors at the plant, a TimescaleDB store in the cloud, engines, a shadow decision runtime and a card machine that sends WhatsApp messages.
- Current architecture mapEleven product repos hold the code today: the edge agent, the L2 TimescaleDB store, 48 L3 engines, the KR DecisionRuntime in shadow, the L5 card machine and the L6 UI.
- The layer modelData moves through six conceptual layers: Plant systems, Context, Analytics, Decision, Action and Value, where the outcome is written as a ValueRecord.
- Plant context graph: optionsPlant context means assets, topology, states, lots, genealogy, documents and the links between them, and today the code holds it in four different shapes.
- Data contracts between layersTen contracts carry data between layers, and repos may depend on nothing else: PlantState, Evidence, Prescription, Action, ValueRecord, AutonomyPolicy, Lot and genealogy, WriteRequest, ClosureState and Envelope.
- Autonomy levelsSix autonomy levels run from AL0, which shows data, to AL5, which is autonomous.
- Edge and cloud split, and the write path (NAMUR OA / NE 178)Functions that need an answer within a second, or must survive an internet outage, run on the Plant Box: fast reads, data-quality gates, state estimation, the safety filter, standing-policy decisions and the writer.
- Agent architectureAgents sit downstream of structured intelligence.
- Scope cutEvery component is cut three ways. Build now is what the first three plants need: one ingest path, one store, one registry, one sender, ten 0.x contracts, the slow loop at AL1 and the fast loop in shadow.
- Operating rulesFor the first three plants the targets include a fast-loop step under 1 second at p99, a card within 2 minutes of its prescription and zero acknowledged readings lost.
- Running costMonthly cloud and LLM cost comes from a pricing script, not from estimates in prose.
- Product context for buildersThe operating loop has eight steps, from ingest to proposed learning, each owned by a layer.