Commissioning State Machine
In a dairy factory, equipment doesn't just appear. It progresses: idea → spec → P&ID → procurement → in transit → in store → mechanically in place → electrically wired → controls proven → operating system. Each state has evidence. Each transition is deterministic. The commissioning engineer knows exactly where every piece stands.
Why would software be different?
The Job
When a venture has many data tables and no compass — scores plateau, interpretation is manual, and gaps never route to tasks — help it know where every table stands, detect gaps automatically, and route those gaps to executable work.
| Trigger Event | Current Failure | Desired Progress |
|---|---|---|
| 195 tables, no compass | No visibility into maturity — which tables are ready, which are stuck | Every table has a state. Every state has evidence. Every gap routes to a task. |
| Scores plateau | Manual interpretation, no systematic path to improvement | Algorithm detects gaps. Gaps become tasks. Tasks close gaps. |
| "Is this table done?" | Depends who you ask. No single source of truth. | State machine answers. Deterministic. Evidence-based. |
| New venture spins up | Each venture reinvents maturity tracking | Same 10-state progression. Same Factory Control Room. Same gap-to-task pipeline. |
The job: "I need to know where every data table stands — and have gaps turn into tasks automatically."
The hidden objection: "What if the algorithm is wrong?" The answer: the algorithm stays pure — no side effects, deterministic transitions, schema changes through migration workflow. The constitution protects the signal.
The Factory Metaphor
Matt's dairy factory experience maps directly. Equipment progresses through discrete states. Same model applies to every data table.
| Factory State | Dream Repo State | Conceptual Evidence |
|---|---|---|
| Idea | Idea (0) | Concept exists — the table is named and scoped |
| Spec | Schema (1) | Data structure defined — columns, types, constraints |
| P&ID | Migration (2) | Migration applied — structure lives in the system |
| Procurement | Data (3) | Seed data populated — table has initial content |
| In transit | Repository (4) | Data access layer exists — read/write operations defined |
| In store | Server Actions (5) | Server-side operations exposed — business logic callable |
| Mechanically in place | CRUD UI (6) | Human interface operable — operators can manage data |
| Electrically wired | ETL Pipeline (7) | Data pipeline connected — extraction and load verified |
| Controls proven | A2A API (8) | Machine interface exposed — agents can access programmatically |
| Operating system | E2E Tests (9) | End-to-end verification passes — full loop proven |
| Commissioned | Fully Commissioned (10) | Operational readiness — table is live and trusted |
Every table. Every venture. Same progression. The Factory Control Room shows the state of the whole system.
The 10-State Machine
| State | Name | Conceptual Evidence |
|---|---|---|
| 0 | Idea | Concept exists — table is named and scoped |
| 1 | Schema | Data structure defined |
| 2 | Migration | Migration applied |
| 3 | Data | Seed data populated |
| 4 | Repository | Data access layer exists |
| 5 | Server Actions | Server-side operations exposed |
| 6 | CRUD UI | Human interface operable |
| 7 | ETL Pipeline | Data pipeline connected |
| 8 | A2A API | Machine interface exposed |
| 9 | E2E Tests | End-to-end verification passes |
| 10 | Fully Commissioned | Operational readiness achieved |
Constitution: The algorithm must remain pure — no side effects. State transitions are deterministic. Schema changes flow through the migration workflow. The state machine observes; it does not mutate.
Gap Detection → Task Automation
The value isn't the state. It's what happens when a gap is detected.
Gap Detected → Algorithm Identifies Missing Evidence → Task Generated → Task Assigned → Gap Closed
| Gap Type | Detection | Task Routing |
|---|---|---|
| Table stuck at Schema | No migration evidence | Generate migration task |
| Table stuck at Repository | No data access layer | Generate repository task |
| Table stuck at CRUD UI | No human interface | Generate UI task |
| Table stuck at ETL | No pipeline connection | Generate ETL task |
| Table stuck at A2A | No machine interface | Generate API task |
Target: 80% of gaps route to tasks automatically. No manual interpretation. No "someone should fix that" — the system produces the task.
Feature / Function / Outcome
| # | Feature | Function | Outcome | Job |
|---|---|---|---|---|
| 1 | 10-state progression model | Track every table through Idea → Fully Commissioned | Visibility — no table is invisible | Core |
| 2 | Evidence-based state detection | Algorithm evaluates conceptual evidence per state | Deterministic — no manual scoring | Core |
| 3 | Gap detection engine | Identify tables stuck below target state | Gaps surface automatically | Core |
| 4 | Gap-to-task routing | Convert detected gaps into executable tasks | 80% of gaps become tasks without human interpretation | Core |
| 5 | Factory Control Room dashboard | Single view of all tables, states, and gaps | "Where does everything stand?" answered in one glance | Core |
| 6 | Algorithm constitution | Pure function, no side effects, deterministic transitions | Trust — the signal is reliable | Core |
| 7 | Migration workflow enforcement | Schema changes flow through defined process | Integrity — no bypass paths | Supporting |
| 8 | Commissioning verification | Independent check against spec | Builder ≠ Commissioner — factory discipline | Supporting |
Business Dev
This is a Mycelium capability — it doesn't sell directly. It sells by making every venture's data maturity visible and actionable.
| Layer | Decision | Initial Assumption | Evidence to Collect |
|---|---|---|---|
| ICP | Who benefits first? | Ventures with 20+ data tables and no systematic maturity tracking | 5 ventures name "table chaos" or "no compass" unprompted |
| Offer | What does this enable? | "Every table has a state. Every gap becomes a task." | Stackmates adopts as default for new tables |
| Channel | How does adoption happen? | Internal-first — every new table enters the state machine by default | New tables appear in Factory Control Room within one cycle |
| Conversion | What proves it works? | First gap auto-routed to task and closed | Gap-to-task automation rate > 50% in first 30 days |
| Retention | Why does it stick? | Once the dashboard exists, operating without it feels blind | Weekly Factory Control Room views > 80% of active builders |
| Expansion | How does it compound? | Every mushroom cap benefits from commissioned data | HowzUs, PrettyMint, BerleyTrails adopt the same progression |
Commissioning
| Component | Schema | API | UI | Tests | Status |
|---|---|---|---|---|---|
| State machine engine | Pending | Pending | Pending | Pending | 0% |
| Evidence evaluation (pure) | Pending | Pending | Pending | Pending | 0% |
| Gap detection | Pending | Pending | Pending | Pending | 0% |
| Gap-to-task routing | Pending | Pending | Pending | Pending | 0% |
| Factory Control Room dashboard | Pending | Pending | Pending | Pending | 0% |
| Migration workflow integration | Pending | Pending | Pending | Pending | 0% |
Metrics
| Metric | Target | Why It Matters |
|---|---|---|
| Tables reaching state 7+ | 20 tables | Operational readiness — data flows, interfaces exist |
| Algorithm confidence | > 70% | The signal is reliable enough to act on |
| Average score | > 5.0 | System-wide maturity is improving |
| Gap-to-task automation | 80% | Manual interpretation eliminated |
Risks + Kill Signal
| Risk | Mitigation |
|---|---|
| Algorithm becomes heuristic soup — side effects creep in | Constitution: pure function, deterministic, migration workflow only. No exceptions. |
| Evidence evaluation is wrong — false positives or negatives | Confidence threshold. Algorithm reports confidence; low confidence flags for human review. |
| Factory Control Room becomes another dashboard nobody uses | Tie to task routing. If you don't look, gaps don't become tasks. Make the dashboard the entry point for "what do I work on next?" |
| State machine diverges from reality | Commissioning verification — independent check. Builder builds. Commissioner validates. |
| Migration workflow bypassed | Schema changes only through migration. No back doors. |
Kill signal: 0 tables reaching state 7+ after 90 days. If the system can't move tables through the progression, the state machine is theory, not tool. Kill and simplify.
Mycelium Capability
This is the progressive maturity automation that ensures every data table reaches operational readiness. Any mushroom cap venture benefits from commissioned data.
| Venture | Depends On Commissioning For |
|---|---|
| Stackmates | CRM tables, pipeline tables, task tables — know what's live |
| Dreamineering | Content pipeline data, mental model indexing — maturity visibility |
| HowzUs | Property data tables — which sources are ETL-ready |
| PrettyMint | Product catalog, inventory — operational readiness |
| BerleyTrails | Trail data, recommendation tables — gap-to-task for data quality |
| TouchForFun | Session data, player data — commissioning before scale |
| BetterPractice | Practice logs, protocol data — tables that compound |
When commissioning works, every venture knows where its data stands. When it doesn't, every venture reinvents maturity tracking. This is the highest-leverage Mycelium primitive for data readiness.
Context
- Jobs To Be Done — Demand-side thinking: what progress, not what features
- Validate Demand — Awareness levels and kill signals
- Shape Up — Fixed time, variable scope
- Standards — Protocol, standard, glue — how repeatable outcomes emerge
- Process Optimisation — Plan, Do, Check, Act — the Deming loop commissioning embodies
- Flow Engineering — Maps that produce code artifacts
- Type-First Development — Schema-driven build approach
- Phygital Mycelium — The capability network this PRD belongs to
- The Factory — Spec → Build → Commission — why builder ≠ commissioner
- ETL Data Tool — State 7 depends on this pipeline
- Data Interface — State 8 depends on this interface
- Mushroom Caps — The ventures that benefit from commissioned data