Publication Pipeline
How truth becomes published destination data. Read with the Publication Model and the Data Contract. The pipeline is deterministic, gated, and versioned — it obeys the same phase-gated, human-approved discipline as the rest of the ecosystem (Principle 10, O2/O8).
1 · The stages
graph TD
R["① Source repositories"] --> D["② Digests (markdown estate)"]
IP["① Intelligence Platform (FIP)"] -. awaiting .-> D
D --> G["③ Portfolio Graph — build-graph.mjs"]
G --> H["④ Health Engine — build-health.mjs"]
G --> P["⑤ Publication generators"]
H --> P
ED["② Editorial Source Layer<br/>content/editorial/** (Claude-owned)"] --> P
P --> V{"⑥ Validation gate"}
V -->|fail| P
V -->|pass| CLASS{"⑦ Approval routing<br/>by publicationClass"}
CLASS -->|reference / generated<br/>(no new claims)| AUTO["⑦a Auto-publishable"]
CLASS -->|editorial / claim-bearing| HUM{"⑦b Human approval"}
CLASS -->|structural| ADR{"⑦c Human + ADR"}
HUM -->|changes| P
AUTO --> PUB["⑧ Publish — versioned publication/**"]
HUM -->|approved| PUB
ADR -->|accepted| PUB
PUB --> LOV["⑨ Lovable consumes (version-pinned)"]
LOV --> SITE["⑩ Published site"]
LIVE["live/** (RESERVED)<br/>mutable · TTL · unattended"] -. future .-> LOV
classDef g fill:#eee,stroke:#bbb,stroke-dasharray:4 3,color:#333;
class IP,LIVE g;
Editorial Source Layer is now a first-class input at stage ②, a sibling of the estate (model §7). Authored narrative is Claude-owned; it is never authored in Lovable.
| Stage | Owner | Input → Output | Status today |
|---|---|---|---|
| ① Repos / FIP | Claude | source code & docs → evidence | repos ✅ · FIP feeds ⏳ awaiting |
| ② Digests (estate) | Claude (human-reviewed) | repos → portal/**.md |
✅ live |
| ③ Portfolio Graph | Claude (deterministic) | estate → portfolio-graph.json |
✅ live (build-graph.mjs) |
| ④ Health Engine | Claude (deterministic) | graph → health.json |
✅ live (build-health.mjs) |
| ⑤ Publication generators | Claude (deterministic) | graph+health+editorial → publication/** |
⏳ to build (roadmap) |
| ⑥ Validation gate | Claude (automated) | feeds → pass/fail report | ⏳ to build (validation) |
| ⑦ Approval | Human (founder) | validated feeds → approved set | process defined |
| ⑧ Publish | Claude (automated) | approved feeds → versioned + manifest | ⏳ to build |
| ⑨/⑩ Consume/serve | Lovable | pinned feeds → rendered portal | Lovable-owned |
2 · Triggers (when the pipeline runs)
| Trigger | Regenerates | Requires approval? |
|---|---|---|
Estate change (portal/**.md edited/committed) |
③ graph → ④ health → ⑤ affected feeds | Yes, before ⑧ |
| New/updated digest or ADR | ③→④→⑤ + evidence-plates |
Yes |
Editorial change (content/editorial/** — hero/story/flagship copy, curation) |
only the affected destination feed(s) | Yes (editorial ⇒ human-approved) |
intelproducts pack export lands (Tier C → live) |
intelligence-products.json, evidence-plates |
Yes + ADR (feed promotion) |
| FIP begins emitting mechanics (findings, assets, …) | new feeds per catalogue | Yes + ADR |
| Scheduled integrity check | none (verifies hashes/routes only) | No |
Regeneration rule: generators are pure functions of their inputs. Re-running with an unchanged estate
commit + graph hash yields byte-identical feeds (no Date.now(); generatedAt is stamped only at ⑧). This makes
diffs meaningful and caching safe.
Dependency order (never skip): estate → graph → health → feeds. A feed is never generated from an estate that
hasn’t been re-graphed; the manifest records the graphHash/estateCommit each feed was built from.
3 · Approval gates (routed by publication class)
The validation gate is always mandatory; the approval gate depends on the feed’s publicationClass
(model §8). This lets deterministic no-claim feeds publish unattended (enabling scheduled
publishing) while every claim-bearing/editorial feed still requires a human — nothing customer-facing auto-ships.
- Validation gate (⑥, automated, always). All acceptance tests in Publication Validation must pass. A single failure blocks publish, regardless of class.
- Approval routing (⑦):
- ⑦a Auto-publishable —
publicationClass ∈ {reference, generated}(pure projections, no new claims:reference-library,navigation,routes,canonical/spine,healthsnapshot,engineering-manual). Publishes on trigger without per-run human sign-off — the contract was approved once; the data adds no claim. This is the hook for scheduled publishing. - ⑦b Human-approved —
publicationClass ∈ {editorial, claim-bearing}(arrival,story,flagship-experiences,evidence-plates,intelligence-products). The founder reviews the diff and approves. Mirrors “nothing auto-sent” (O2); AI drafts, a human accepts (AI Governance). - ⑦c Human + ADR —
publicationClass:"structural"(tier promotion, new feed, schema shape change) requires an ADR before publish (ADR practice).
- ⑦a Auto-publishable —
- Live feeds (reserved). A future
feedClass:"live"feed has its contract human-approved once; individual updates then flow unattended under a TTL — it is not part of the immutablepublication/publish cycle and lives underlive/. None exist today.
4 · Publish steps (⑧)
- Freeze inputs — record
estateCommit,graphHash,healthHash. - Generate every feed into a staging
publication/tree. - Validate (gate ⑥). Abort on any failure.
- Version — bump each changed feed’s
version(semver); publication set version bumps. Versions are immutable — a published version is never rewritten; a change is a new version (supersede, never mutate — Principle 3, O9). - Stamp
generatedAtand compute each feed’shash. - Write
manifest.jsonwith all feed versions/statuses/hashes. - Approve (gate ⑦) — the founder signs off the staged set.
- Publish — the approved
publication/**becomes the canonical set Lovable pins. - Log — append a changelog entry (current-state/changelog).
5 · How Lovable consumes (⑨)
- Lovable loads
manifest.json, then the feeds it needs, pinned to the published version. - It renders only what the feeds contain, honouring
status/missing(placeholders for awaiting/planned). - It resolves all links through
routes.json(no hard-coded URLs). - It never writes back — the boundary is one-way (truth → presentation).
6 · Failure & rollback
- Validation failure: publish aborts; the previous published version remains canonical (Lovable unaffected).
- Bad data discovered post-publish: correct the estate → regenerate → publish a new version; never edit a published version in place. Lovable re-pins when ready.
- Awaiting feed goes stale: an
awaitingfeed is valid indefinitely (empty + status). No failure; it simply hasn’t been promoted.
7 · What the pipeline must never do
- Generate a feed from unreviewed estate, or skip the graph step.
- Publish without validation + human approval.
- Mutate a published version in place.
- Emit a claim without provenance, or upgrade a
planned/awaitingitem tolivewithout its source landing.