@lifeaitools/rdc-skills 0.25.0 → 0.25.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: rdc:onramp
3
- description: "Usage `rdc:onramp <slug> --name \"<Display Name>\"` — Idempotent Phase-1 enrollment orchestrator for a new Place Fund project. Resolves drift state, then runs three ordered steps in strict sequence: (1) `enroll_place` Supabase RPC creates DB spine (places + project_nodes + project_places); (2) `insert_work_item`opens enrollment epic bound to the project_node_id; (3) `scripts/onramp-scaffold-place.mjs` writes `places/<slug>/` disk tree. Never reimplements any door. Four drift states: fresh | already-enrolled | spine-ahead | disk-ahead (disk-ahead STOPs and opens a reconciliation work item)."
3
+ description: "Usage `rdc:onramp <slug> --name \"<Display Name>\"` — Full-pipeline enrollment orchestrator for a new Place Fund project. Runs all 7 phases: enrollresearch + document integration conflict resolutionbrand book + imagery Regen Score gatesite build deploy dev. Each phase is idempotent and resumable."
4
4
  ---
5
5
 
6
6
  > **⚠️ OUTPUT CONTRACT (READ FIRST):** `guides/output-contract.md`
@@ -9,73 +9,179 @@ description: "Usage `rdc:onramp <slug> --name \"<Display Name>\"` — Idempotent
9
9
 
10
10
  > If dispatching subagents or running as a subagent: read `{PROJECT_ROOT}/.rdc/guides/agent-bootstrap.md` first, then `{PROJECT_ROOT}/.rdc/guides/engineering-behavior.md`.
11
11
 
12
- > **Sandbox contract:** This skill honors `RDC_TEST=1` per `guides/agent-bootstrap.md` § RDC_TEST Sandbox Contract. All three external steps (enroll_place RPC, insert_work_item RPC, scaffolder) short-circuit under the flag. Drift resolution and arg validation run normally.
12
+ > **Sandbox contract:** This skill honors `RDC_TEST=1` per `guides/agent-bootstrap.md` § RDC_TEST Sandbox Contract. DB writes, deploys, and web searches short-circuit under the flag. Drift resolution, scoring, and file validation run normally.
13
13
 
14
14
  > **RPMS compliance:** Encodes the Four Laws (One Home Per Fact · One Direction · One Door · One Spine). Each fact is written to its one home. **⛔ NEVER write `places/<slug>/_context.md`** — it is a generated projection owned by `apps/studio/src/lib/context-export-writer.ts`. A post-scaffold gate asserts its absence; the skill halts if found.
15
15
 
16
- > **Purely additive — no architectural-approval interview required** per plan D5 in `.rdc/plans/rdc-onramp-skill.md`: adds one new skill dir and one `skills_meta` key; changes no existing skill, schema, MCP tool, routing, or build/deploy config.
17
-
18
- # rdc:onramp — Phase-1 Enrollment Orchestrator
16
+ # rdc:onramp Full Pipeline Enrollment
19
17
 
20
18
  ## When to Use
21
19
 
22
- - Enrolling a new Place Fund project for the first time (fresh state)
23
- - Healing a spine-ahead state (DB row exists, disk tree missing)
24
- - Checking current enrollment state without writing (`--dry-run`)
25
- - Re-running enrollment to converge to a consistent state (idempotent)
26
-
27
- ## When NOT to Use — escalate to the right tool
20
+ - Enrolling a new Place Fund project end-to-end (enrollment through dev deploy)
21
+ - Resuming an enrollment that stopped at any phase (idempotent re-invoke)
22
+ - Running research + scoring + build for a place already enrolled
28
23
 
29
- - Research phase paste [`corpus/_shared/onramp/STARTUP.md`](file:///C:/Dev/regen-root/corpus/_shared/onramp/STARTUP.md) into a claude.ai studio project
30
- - Brand/design `rdc:design`
31
- - Site build → `rdc:build` (after research is complete)
32
- - Any architectural change → `rdc:plan` + approval interview
24
+ **Prod promotion is NOT part of onramp.** Once Phase 7 completes, the pipeline
25
+ is done. To promote to production later: `rdc:deploy <slug> promote`.
33
26
 
34
27
  ## Argument Contract
35
28
 
36
29
  ```
37
30
  rdc:onramp <slug> --name "<Display Name>" [--location <json>] [--archetype <archetype>]
38
31
  [--owner <place-fund|rdc|jv|client>] [--history] [--dry-run]
32
+ [--skip-to <phase>] [--no-gate]
39
33
  ```
40
34
 
41
35
  | Arg / Flag | Required | Default | Description |
42
36
  |------------|----------|---------|-------------|
43
- | `slug` | **yes** | — | kebab-case, place-anchored (e.g. `spirit-bear-village`). Validated against `^[a-z0-9]+(-[a-z0-9]+)*$`. |
44
- | `--name` | **yes** | — | Human display name. Passed verbatim to `enroll_place` and the scaffolder. |
45
- | `--location` | no | `{}` | JSON object for `enroll_place p_location` (e.g. `{"state":"BC","country":"Canada"}`). Never guessed — omit entirely if unknown. |
46
- | `--archetype` | no | `TBD` | Base-arc archetype. See [`corpus/_shared/onramp/ARCHETYPES.md`](file:///C:/Dev/regen-root/corpus/_shared/onramp/ARCHETYPES.md). |
37
+ | `slug` | **yes** | — | kebab-case, place-anchored. Validated against `^[a-z0-9]+(-[a-z0-9]+)*$`. |
38
+ | `--name` | **yes** | — | Human display name. |
39
+ | `--location` | no | `{}` | JSON object for `enroll_place p_location`. Never guessed. |
40
+ | `--archetype` | **yes** (fresh) | | Required on fresh enrollment — reject if absent. See `corpus/_shared/onramp/ARCHETYPES.md`. Valid: `land-regen`, `data-center`, `urban-renewal`, or custom slug. |
47
41
  | `--owner` | no | `place-fund` | `place-fund` \| `rdc` \| `jv` \| `client` |
48
- | `--history` | no | off | Opt-in: also scaffold `places/<slug>/HISTORY.md`. See D4 in the plan for when to use. |
49
- | `--dry-run` | no | off | Resolve drift + print plan; perform NO writes (no RPC, no scaffold, no work item). |
42
+ | `--history` | no | off | Scaffold `places/<slug>/HISTORY.md`. |
43
+ | `--dry-run` | no | off | Resolve drift + print plan; no writes. |
44
+ | `--skip-to` | no | — | Jump to a specific phase (1–7). |
45
+ | `--no-gate` | no | off | Skip human gates (brand review). |
46
+
47
+ ## Master Checklist
48
+
49
+ ```
50
+ rdc:onramp <slug> — full pipeline
51
+ Phase 1: Enrollment + RPMS Infrastructure Setup
52
+ [ ] Preflight — validate slug + --name + --archetype (required on fresh); parse flags
53
+ [ ] Resolve drift — classify: fresh | already-enrolled | spine-ahead | disk-ahead
54
+ [ ] DB spine — enroll_place RPC → capture project_node_id
55
+ [ ] DB spine completeness — project_nodes, project_places, prt_projects, regen_projects, place_phase_state
56
+ [ ] Archetype stored — places.metadata.archetype set (not TBD)
57
+ [ ] Enrollment epic — dup-guard + insert_work_item
58
+ [ ] Disk tree — scaffold places/<slug>/ with ALL required files
59
+ [ ] Directory verification — PLACE.md, PRODUCT.md, DESIGN.md, HANDOFF.md, RECONCILIATION.md, SCREENING.md, PROCESS-ARC.md, INTAKE-LOG.md, ONRAMP-REPORT.md, corpus/INDEX.md, arc/01-06, tracker/*
60
+ [ ] Corpus setup — places.corpus_path set, $CORPUS_ROOT dir exists
61
+ [ ] Process-state arc selection — PROCESS-ARC.md written (25 states, per-archetype)
62
+ [ ] Screening stub — SCREENING.md written
63
+ [ ] _context.md absence gate
64
+ [ ] Phase 1 rubric gate — 15-row pass/fail table printed + ONRAMP-REPORT.md appended
65
+ Phase 2: Research — Full Regenerative Regional Deep Research
66
+ [ ] Research prompts — load archetype template from corpus/_shared/onramp/research-prompts/
67
+ [ ] Web research — structured per Five Capitals (Natural, Human, Social, Built, Financial)
68
+ [ ] Read ALL incoming corpus documents ($CORPUS_ROOT/<corpus_path>/)
69
+ [ ] Financial model — extract from docs OR construct from analysis (Tier 4, tagged)
70
+ [ ] Integrate web + document data into 6 arc files (research layer)
71
+ [ ] PRODUCT.md route registry — archetype-specific website routes (NOT fixed 6-arc)
72
+ [ ] PLACE.md compiled from findings
73
+ [ ] corpus/INDEX.md — all sources with tier + capital + arc file
74
+ [ ] DOCUMENT GATE: every incoming doc read — no unread documents allowed
75
+ [ ] Phase 2 rubric gate — 14-row pass/fail + ONRAMP-REPORT.md appended
76
+ Phase 2b: People, Organizations & Place Enrichment
77
+ [ ] Extract all named people + organizations from project documents
78
+ [ ] RocketReach lookup on each person + org — verify existence
79
+ [ ] Web research on orgs — website, news, track record, regional presence
80
+ [ ] Government registry verification for key entities
81
+ [ ] Write verified entities to tracker/STAKEHOLDERS.md (>20 lines floor)
82
+ [ ] Flag unverified entities in RECONCILIATION.md
83
+ Phase 3: Conflict Resolution
84
+ [ ] Build fact inventory — extract every factual claim from all 6 arc files
85
+ [ ] Cross-source verification — web vs document claims explicitly compared
86
+ [ ] Cross-document verification — internal document consistency checked
87
+ [ ] Financial figure verification — arc/05 + arc/06 internally consistent
88
+ [ ] Stakeholder claim verification — arc/03 matches STAKEHOLDERS.md
89
+ [ ] Timeline consistency check — dates coherent across all files
90
+ [ ] Geographic/legal claim verification — boundaries, zoning, rights checked
91
+ [ ] Resolve all conflicts — each claim verified | resolved | held
92
+ [ ] RECONCILIATION.md written — structured ledger, zero conflicted remaining
93
+ [ ] Arc files updated — resolved values written back with citations
94
+ [ ] corpus/INDEX.md updated — new sources + tier reassessments
95
+ [ ] Phase 3 rubric gate — 13-row pass/fail + ONRAMP-REPORT.md appended
96
+ Phase 4: Brand Book + Imagery — Full rdc:design Integration
97
+ [ ] Invoke rdc:design with DESIGN.md brief + PRODUCT.md route registry
98
+ [ ] DESIGN.md — 24-spread editorial brand book (not a stub)
99
+ [ ] Palette — full Studio tokens (--<slug>-*) via RAMPA from ACTUAL place imagery
100
+ [ ] Palette source proof — image filename(s) logged in DESIGN.md
101
+ [ ] IMAGERY-PROMPTS.md — all slots declared; real search before AI gen
102
+ [ ] Generate images via regen-media MCP or OpenAI local gpt-image-2
103
+ [ ] Place images in apps/<slug>/public/images/ + wire imagery.ts
104
+ [ ] Brand review gate (skip if --no-gate)
105
+ [ ] Phase 4 rubric gate — 9-row pass/fail + ONRAMP-REPORT.md appended
106
+ Phase 5: Regen Score — Model-Driven Rubric Assessment
107
+ [ ] Load model specification (VLAS 01 + 03 + archetype benchmarks)
108
+ [ ] Regional comparable research — iterative gap fill
109
+ [ ] SCARF×4Ps lattice assessment — 20 cells with evidence
110
+ [ ] Five Capitals per-capital scoring with evidence citation
111
+ [ ] Coverage spread gate — max-min <= 40
112
+ [ ] Annihilator check — 8 binary pass/fail (any BLOCKED → NO-GO)
113
+ [ ] Recognition formula readiness — 7 terms assessed
114
+ [ ] Process state completion audit — required states per archetype
115
+ [ ] Pathway ladder position — current + target rung
116
+ [ ] Honesty audit — Tier 4 tagged, precedent tiers set
117
+ [ ] Compose Regen Score from model rubric
118
+ [ ] Score gate decision — GO/NEEDS WORK/NO-GO
119
+ [ ] SCREENING.md written — lattice + score card + evidence
120
+ [ ] Phase 5 rubric gate — 15-row pass/fail + ONRAMP-REPORT.md appended
121
+ Phase 6: Site Build — Archetype Routes + RegenOps Integration
122
+ [ ] Create apps/<slug>/ — archetype-specific routes from PRODUCT.md
123
+ [ ] HISTORY as its own route (sourced from HISTORY.md, not folded into arc)
124
+ [ ] All routes render real arc content + imagery (no placeholders)
125
+ [ ] Image/video slots from IMAGERY-PROMPTS.md have placeholder components
126
+ [ ] tsc clean, build clean
127
+ [ ] PUBLISH.md + DEPLOY block generated
128
+ [ ] RegenOps screens — report present/missing (advisory)
129
+ [ ] Phase 6 rubric gate — 10-row pass/fail + ONRAMP-REPORT.md appended
130
+ Phase 7: Deploy Dev — Phase State + Epic Closure
131
+ [ ] Register in apps + app_deployments (allocate next free port)
132
+ [ ] Regenerate PM2 ecosystem config on Vultr (--write flag)
133
+ [ ] PM2 start + HTTP 200 at <slug>.dev.place.fund
134
+ [ ] place_phase_state advanced to phase 7, gate=passed
135
+ [ ] Epic: implementation report submitted, transitioned to review
136
+ [ ] INTAKE-LOG.md — all 7 phase rows present
137
+ [ ] ONRAMP-REPORT.md — all 7 phase sections present
138
+ [ ] Phase 7 rubric gate — 9-row pass/fail (final)
139
+ ```
50
140
 
51
- `--status` is not exposed always `enrolling` (Phase-1 invariant; the Studio promotes to `active` later).
141
+ **Prod promotion is NOT part of onramp.** Once Phase 7 completes, the pipeline
142
+ is done. To promote to production later: `rdc:deploy <slug> promote`.
52
143
 
53
- ## Procedure
144
+ ---
54
145
 
55
- ### 0. Preflight
146
+ ## INTAKE-LOG.md — Transaction Log
56
147
 
57
- Emit the full checklist below before any further action:
148
+ Every onramp run writes a timestamped transaction log at `places/<slug>/INTAKE-LOG.md`.
149
+ Each phase records its timestamp, operator, session ID, and notes. Intake #2+ appends
150
+ rows — the skill detects a prior intake and runs as an update (re-reads documents,
151
+ re-scores, rebuilds changed content).
58
152
 
153
+ ```markdown
154
+ | # | Phase | Timestamp | Operator | Session | Notes |
155
+ |---|-------|-----------|----------|---------|-------|
156
+ | 1 | Enrollment | 2026-07-20T07:11Z | claude-5 | abc123 | fresh state |
157
+ | 1 | Research | 2026-07-20T07:20Z | claude-5 | abc123 | 14 web + 18 docs |
158
+ | 1 | People/Org | ... | ... | ... | N verified |
159
+ | 1 | Conflicts | ... | ... | ... | 2 resolved |
160
+ | 1 | Brand | ... | ... | ... | palette derived |
161
+ | 1 | Score | ... | ... | ... | composite 67 |
162
+ | 1 | Build | ... | ... | ... | tsc 0, build 0 |
163
+ | 1 | Deploy Dev | ... | ... | ... | HTTP 200 |
59
164
  ```
60
- - [ ] Preflight — validate slug + --name; parse flags
61
- - [ ] Resolve drift — classify: fresh | already-enrolled | spine-ahead | disk-ahead
62
- - [ ] Spine — enroll_place RPC (Step 1)
63
- - [ ] Epic — dup-guard + insert_work_item (Step 2)
64
- - [ ] Disk tree — onramp-scaffold-place.mjs (Step 3)
65
- - [ ] HISTORY advisory
66
- - [ ] Report — structural facts + ONE next action
67
- ```
165
+
166
+ ---
167
+
168
+ ## Phase 1: Enrollment + RPMS Infrastructure Setup
169
+
170
+ ### 1.0 Preflight
68
171
 
69
172
  Validate before any external call:
70
173
  - `slug` matches `^[a-z0-9]+(-[a-z0-9]+)*$` — reject if not
71
174
  - `--name` is present and non-empty — reject if not
72
- - `--dry-run` set print plan and exit after drift resolution, no writes
175
+ - `--archetype` is present and not `TBD` **reject if not provided on fresh enrollment**
176
+ (valid values: `land-regen`, `data-center`, `urban-renewal`, or a custom slug
177
+ matching `^[a-z0-9]+(-[a-z0-9]+)*$`)
178
+ - `--dry-run` set → print plan and exit after drift resolution + rubric, no writes
73
179
 
74
- ### 1. Resolve Drift State
180
+ ### 1.1 Resolve Drift State
75
181
 
76
- Read-only DB probe (analytics SELECT is allowed per `.claude/rules/work-items-rpc.md`):
182
+ Read-only DB probe:
77
183
  ```sql
78
- SELECT id, slug, name, status FROM places WHERE slug = '<slug>';
184
+ SELECT id, slug, name, status, corpus_path, metadata FROM places WHERE slug = '<slug>';
79
185
  ```
80
186
 
81
187
  Check disk:
@@ -85,164 +191,1269 @@ test -d "places/<slug>/" && echo "disk:present" || echo "disk:absent"
85
191
 
86
192
  | State | Detection | Action |
87
193
  |-------|-----------|--------|
88
- | **fresh** | No DB row AND no disk dir | Run all three steps in order |
89
- | **already-enrolled** | DB row exists AND disk dir exists | `enroll_place` (idempotent, returns existing node); scaffolder skips existing files; epic dup-guarded. Report "already enrolled — no new writes." |
90
- | **spine-ahead** | DB row exists, disk dir ABSENT | Re-call `enroll_place` (returns existing `project_node_id`); run scaffolder to create missing disk tree |
91
- | **disk-ahead** | Disk dir exists, NO DB row | **⛔ STOP — colliding identity.** Open reconciliation work item; report; exit. Never proceed. |
194
+ | **fresh** | No DB row AND no disk dir | Run all enrollment steps |
195
+ | **already-enrolled** | DB row exists AND disk dir exists | Run verification rubric; fix gaps; continue to Phase 2. |
196
+ | **spine-ahead** | DB row exists, disk dir ABSENT | Run scaffolder; then verification rubric |
197
+ | **disk-ahead** | Disk dir exists, NO DB row | **⛔ STOP.** Open reconciliation work item; exit. |
198
+
199
+ ### 1.2 DB Spine (`enroll_place`)
92
200
 
93
- **disk-ahead STOP protocol — run this, then exit:**
94
201
  ```sql
95
- SELECT insert_work_item(
96
- p_title := 'reconcile: disk-ahead conflict for <slug>',
97
- p_item_type := 'bug',
98
- p_priority := 'urgent',
99
- p_source := 'onramp',
100
- p_description := 'places/<slug>/ exists on disk but has no places DB row. A disk tree with no spine row is an unreconciled state. Manual reconciliation needed before enrollment can proceed — this may describe a different place. Do not auto-enroll.'
101
- );
202
+ SELECT enroll_place('<slug>', '<Display Name>', '<location_json>'::jsonb, 'enrolling');
102
203
  ```
204
+ `project_id = uvojezuorjgqzmhhgluu` REQUIRED on every Supabase MCP call.
103
205
 
104
- Report the work-item id and the disk-ahead explanation, then exit. Never proceed to Step 1.
206
+ **GATE:** Capture `project_node_id` from the returned JSONB. If absent BLOCKED template, stop.
105
207
 
106
- ### 2. Step 1 — DB Spine (`enroll_place`)
208
+ ### 1.3 DB Spine Completeness (NEW)
107
209
 
108
- This RPC is idempotent: calling it for an already-enrolled place returns the existing `project_node_id` without creating duplicate rows.
210
+ After `enroll_place`, verify ALL required DB rows exist not just the `places` row:
109
211
 
110
- **Supabase MCP (preferred):**
111
212
  ```sql
112
- SELECT enroll_place('<slug>', '<Display Name>', '<location_json>'::jsonb, 'enrolling');
113
- ```
213
+ -- project_nodes row
214
+ SELECT id, slug, node_type FROM project_nodes WHERE slug = 'prtnode-<slug>';
114
215
 
115
- `project_id = uvojezuorjgqzmhhgluu` is REQUIRED on every MCP call. An `InputValidationError` means it was omitted — pass it and retry; do not fall back to raw credentials.
216
+ -- project_places join
217
+ SELECT * FROM project_places WHERE place_id = '<places.id>'::uuid;
116
218
 
117
- **Subagent fallback** (if Supabase MCP is unavailable in this context):
118
- ```
119
- Agent({
120
- prompt: "Call Supabase RPC with Supabase MCP tool (mcp__claude_ai_Supabase__execute_sql).
121
- project_id: uvojezuorjgqzmhhgluu
122
- query: SELECT enroll_place('<slug>', '<name>', '{}'::jsonb, 'enrolling');
123
- Return the project_node_id from the result JSON.
124
- Never raw curl to *.supabase.co — hookify-blocked."
125
- })
126
- ```
219
+ -- prt_projects row (drives HISTORY.md gate)
220
+ SELECT id, slug, project_type FROM prt_projects WHERE slug = '<slug>';
127
221
 
128
- **GATE:** Capture `project_node_id` from the returned JSONB. If absent → emit the `BLOCKED:` template from `.claude/rules/infrastructure-contract.md`, stop. Never proceed without a `project_node_id`.
222
+ -- regen_projects row (work_items FK)
223
+ SELECT id, slug FROM regen_projects WHERE slug ILIKE '%<slug>%';
129
224
 
130
- Under `RDC_TEST=1`:
131
- ```
132
- [RDC_TEST] skipping enroll_place RPC — using placeholder project_node_id
225
+ -- place_phase_state
226
+ SELECT * FROM place_phase_state WHERE place_slug = '<slug>';
133
227
  ```
134
228
 
135
- ### 3. Step 2 — Enrollment Epic (`insert_work_item`)
229
+ **Fix missing rows:**
230
+ - `prt_projects` absent → create via RPC or flag as a required manual step
231
+ - `regen_projects` absent → create (needed for epic's `project_id` FK)
232
+ - `place_phase_state` stuck at phase 0 with gate `open` on a re-run → leave as-is
233
+ (phase advancement happens at end of each subsequent phase)
234
+ - Archetype → store in `places.metadata` as `{"archetype": "<value>"}`:
235
+ ```sql
236
+ UPDATE places SET metadata = jsonb_set(COALESCE(metadata,'{}'), '{archetype}', '"<archetype>"')
237
+ WHERE slug = '<slug>';
238
+ ```
136
239
 
137
- **Dup-guard first** (raw SELECT allowed for analytics):
138
- ```sql
139
- SELECT id, title FROM work_items
140
- WHERE title = 'epic: enroll <slug>'
141
- AND project_node_id = '<project_node_id>'::uuid
142
- AND item_type = 'epic'
143
- AND status NOT IN ('done', 'archived')
144
- LIMIT 1;
145
- ```
240
+ ### 1.4 Enrollment Epic (`insert_work_item`)
146
241
 
147
- If a row is returned: reuse the existing id — do NOT insert a duplicate.
148
-
149
- If no row: create the epic:
242
+ Dup-guard, then create if none exists:
150
243
  ```sql
151
244
  SELECT insert_work_item(
152
245
  p_title := 'epic: enroll <slug>',
153
246
  p_item_type := 'epic',
154
247
  p_priority := 'high',
155
248
  p_source := 'onramp',
156
- p_project_node_id := '<project_node_id>'::uuid
249
+ p_project_node_id := '<project_node_id>'::uuid,
250
+ p_labels := ARRAY['onramp','<archetype>']
157
251
  );
158
252
  ```
159
253
 
160
- **GATE:** The epic id (new or reused) must be captured before proceeding to Step 3.
254
+ ### 1.5 Disk Tree + Directory Verification
255
+
256
+ ```bash
257
+ node scripts/onramp-scaffold-place.mjs --slug <slug> --name "<Display Name>" \
258
+ [--archetype <archetype>] [--owner <owner>] [--history]
259
+ ```
161
260
 
162
- Under `RDC_TEST=1`:
261
+ After scaffold, verify the **full RPMS-compliant tree** — not just "disk present":
163
262
  ```
164
- [RDC_TEST] skipping insert_work_item — using placeholder epic id
263
+ places/<slug>/
264
+ PLACE.md — authored identity (One Home)
265
+ PRODUCT.md — route registry + model definition (archetype-specific routes)
266
+ DESIGN.md — brand brief (input to rdc:design)
267
+ HANDOFF.md — build contract
268
+ RECONCILIATION.md — conflict ledger
269
+ SCREENING.md — mission fit + RCL eligibility (NEW)
270
+ PROCESS-ARC.md — 25-state selection matrix for this land type (NEW)
271
+ INTAKE-LOG.md — transaction log (NEW)
272
+ ONRAMP-REPORT.md — per-phase accumulating report (NEW)
273
+ corpus/INDEX.md — source index
274
+ corpus/ — source documents
275
+ arc/01-story.md · 02-place.md · 03-foundation.md · 04-process-outcomes.md · 05-investors.md · 06-model.md
276
+ tracker/DECISIONS.md · DELIVERABLES.md · MILESTONES.md · RISKS.md · STAKEHOLDERS.md
165
277
  ```
166
278
 
167
- ### 4. Step 3 Disk Tree (`onramp-scaffold-place.mjs`)
279
+ If the scaffolder does not create `SCREENING.md`, `PROCESS-ARC.md`, `INTAKE-LOG.md`,
280
+ or `ONRAMP-REPORT.md`, the skill writes them directly (stub templates).
168
281
 
169
- ```bash
170
- node scripts/onramp-scaffold-place.mjs --slug <slug> --name "<Display Name>" \
171
- [--archetype <archetype>] [--owner <owner>] [--history (if --history flag was passed)]
282
+ **Post-scaffold gate:** `_context.md` must be ABSENT.
283
+
284
+ ### 1.6 Corpus Setup (NEW)
285
+
286
+ - Set `places.corpus_path` in DB:
287
+ ```sql
288
+ UPDATE places SET corpus_path = 'TPF/<slug>' WHERE slug = '<slug>' AND corpus_path IS NULL;
289
+ ```
290
+ (Adjust the prefix per project — `TPF/` for Place Fund, `RDC/` for internal, etc.)
291
+ - Verify or create the corpus directory at `$CORPUS_ROOT/<corpus_path>/`
292
+ - Wire `places/<slug>/corpus/INDEX.md` header to reference the global corpus path
293
+
294
+ ### 1.7 Process-State Arc Selection (NEW)
295
+
296
+ Write `places/<slug>/PROCESS-ARC.md` — the model definition.
297
+ Read the land-type selection matrix from `$CORPUS_ROOT/VLAS/plans/03-process-states.md` §5
298
+ and produce a table for THIS place:
299
+
300
+ ```markdown
301
+ # <Display Name> — Process-State Arc Selection
302
+ > Archetype: <archetype> | Generated: <date>
303
+ > Canon: VLAS/plans/03-process-states.md §5
304
+
305
+ | State | Name | Class | Selection | Reason |
306
+ |-------|------|-------|-----------|--------|
307
+ | S00 | Inquiry | CORE | required | — |
308
+ | S01 | Screening | CORE | required | — |
309
+ | S02 | Regional Read | CORE | required | — |
310
+ | S03 | Stakeholder Convening | CORE | required | — |
311
+ | S04 | FPIC | CORE — ANNIHILATOR | required | S→0 if unmet |
312
+ | S05 | Asset Entry | CONDITIONAL | S05a LRLT | land-regen: trust entry |
313
+ | ... | ... | ... | ... | ... |
314
+ | S11 | Stewardship Active | CONDITIONAL | required | land-regen: enterprise models live here |
315
+ | S15 | Capital Formation | CONDITIONAL | required | land-regen: PRT/Place Fund raise |
316
+ | ... through S24 ... |
172
317
  ```
173
318
 
174
- The script is DB-free, idempotent (skips existing files), and writes NO `_context.md`. It produces:
175
- `places/<slug>/PLACE.md · corpus/INDEX.md · arc/01–06/ · PRODUCT.md · DESIGN.md · HANDOFF.md · tracker/*`
319
+ Every `not-applicable` entry MUST carry a reason. A dropped state without a stated
320
+ reason is a defect, not a design (03 §5 rule).
321
+
322
+ ### 1.8 Screening Stub (NEW)
323
+
324
+ Write `places/<slug>/SCREENING.md` if absent:
325
+ ```markdown
326
+ # <Display Name> — Screening (S01)
327
+ > Status: pending | Date: <date>
328
+
329
+ ## Mission Fit
330
+ <!-- TODO: assess alignment with regenerative mission -->
331
+
332
+ ## RCL Eligibility
333
+ - Filter 1 (entity form): <!-- TODO -->
334
+ - Filter 2 (field of use): <!-- TODO -->
335
+
336
+ ## Red Lines
337
+ <!-- TODO: identify any hard stops (e.g. FPIC not obtainable) -->
338
+
339
+ ## Decision
340
+ <!-- screening-pass | screening-decline (with reason) -->
341
+ ```
342
+
343
+ ### 1.9 Phase 1 Rubric Gate
344
+
345
+ Print this table with actual values filled in. **A FAIL on any row stops the phase.**
346
+
347
+ ```
348
+ PHASE 1 RUBRIC — <slug>
349
+ | # | Check | Expected | Actual | Pass |
350
+ |---|--------------------------|-----------------------------------|--------|------|
351
+ | 1 | places row | status=enrolling, corpus_path set | ? | |
352
+ | 2 | project_nodes row | prtnode-<slug> exists | ? | |
353
+ | 3 | project_places join | links place to node | ? | |
354
+ | 4 | prt_projects row | project_type set (not null) | ? | |
355
+ | 5 | regen_projects row | exists (work_items FK) | ? | |
356
+ | 6 | place_phase_state | row exists, initialized | ? | |
357
+ | 7 | archetype in metadata | not TBD, matches --archetype | ? | |
358
+ | 8 | epic | exists, not archived | ? | |
359
+ | 9 | disk: places/<slug>/ | exists with all required files | ? | |
360
+ | 10| disk: PROCESS-ARC.md | state selection matrix, >20 rows | ? | |
361
+ | 11| disk: SCREENING.md | exists (stub OK for Phase 1) | ? | |
362
+ | 12| disk: INTAKE-LOG.md | exists, Phase 1 row written | ? | |
363
+ | 13| disk: ONRAMP-REPORT.md | exists, Phase 1 section written | ? | |
364
+ | 14| corpus: $CORPUS_ROOT dir | dir exists or created | ? | |
365
+ | 15| _context.md | ABSENT | ? | |
366
+ ```
367
+
368
+ Append Phase 1 results to `places/<slug>/ONRAMP-REPORT.md`:
369
+ ```markdown
370
+ ## Phase 1: Enrollment — <date>
371
+ ### Drift state: <fresh|already-enrolled|spine-ahead>
372
+ ### DB spine: places ✅ | project_nodes ✅ | project_places ✅ | prt_projects ⚠️ | regen_projects ✅
373
+ ### Archetype: <archetype>
374
+ ### Disk tree: N files created, M skipped (existing)
375
+ ### Rubric: [full table above, filled in]
376
+ ```
377
+
378
+ Append Phase 1 row to `places/<slug>/INTAKE-LOG.md`.
379
+
380
+ ---
381
+
382
+ ## Phase 2: Research — Full Regenerative Regional Deep Research
383
+
384
+ Research has THREE layers. All must complete before writing arc files.
385
+
386
+ ### 2.1 Research Prompt Engineering — Stored with the Model
387
+
388
+ Each archetype has a **research prompt template** at
389
+ `corpus/_shared/onramp/research-prompts/<archetype>.md`. The template structures a
390
+ full Five Capitals regional deep research:
391
+
392
+ | Capital | Research areas | Min sources |
393
+ |-----------|-----------------------------------------------------------------------|-------------|
394
+ | Natural | Ecoregion, soils (SSURGO), hydrology, vegetation (NVC), wildlife, | 3 Tier 0-2 |
395
+ | | climate band, watershed, marine/tidal, habitat connectivity | |
396
+ | Human | Indigenous territory, FPIC holders, community demographics, | 2 Tier 0-2 |
397
+ | | health/education infrastructure, cultural heritage (NHPA) | |
398
+ | Social | Governance structure, co-governance pathway, community orgs, | 2 Tier 0-2 |
399
+ | | First Nations relationships, stakeholder network | |
400
+ | Built | Existing infrastructure, permitted structures, heritage listings, | 2 Tier 0-2 |
401
+ | | grid/energy, transport, marine access, communications | |
402
+ | Financial | Title chain, encumbrances, easements, tax status, water rights, | 2 Tier 0-2 |
403
+ | | zoning, indicative raise, capital structure, comparable sales | |
404
+
405
+ If the template does not exist for this archetype, the skill writes a default based on
406
+ the Five Capitals table above and flags it in ONRAMP-REPORT.md.
407
+
408
+ Run structured WebSearch calls per capital (not generic 4-6 searches). Target government
409
+ databases, heritage registers, peer-reviewed studies. Use the web-research MCP for
410
+ deep research or built-in WebSearch for targeted queries.
411
+
412
+ ### 2.2 Incoming Document Integration (MANDATORY)
413
+
414
+ **⛔ HARD GATE: Every document in the incoming corpus folder MUST be read before arc files are written.**
415
+
416
+ Locate the incoming corpus folder:
417
+ - Check `$CORPUS_ROOT/<corpus_path>/` first (set in Phase 1)
418
+ - Check Google Drive incoming folder
419
+ - Check `places/<slug>/corpus/` for pre-existing documents
420
+
421
+ For each document:
422
+ 1. **PDFs**: Extract text via `pypdf` (`from pypdf import PdfReader`)
423
+ 2. **Excel/XLSX**: Extract via `openpyxl` or `pandas`
424
+ 3. **CSV**: Read directly
425
+ 4. **Word/DOCX**: Convert to MD via `rdc:convert` or pandoc
426
+ 5. **Images**: Catalog for Phase 4 imagery
427
+
428
+ **What to extract from project documents:**
429
+
430
+ | Document Type | Extract |
431
+ |--------------|---------|
432
+ | Business Plan | Mission, pillars, revenue streams, team bios, partners list |
433
+ | Pro Forma / Financials | CapEx total, phased investment, revenue projections, cost structure |
434
+ | Execution Proposal | Phased timeline, team roles, partner LOIs |
435
+ | Development Package | Property details, permits, water rights, infrastructure specs |
436
+ | Due Diligence List | Regulatory requirements, title review, environmental assessments |
437
+ | Competitor Analysis | Market positioning, pricing, differentiators |
438
+
439
+ ### 2.3 Financial Model — Invent if Absent
440
+
441
+ If no financial model is provided in incoming documents:
442
+ 1. **Analyze**: comparable properties/projects in the region, infrastructure replacement
443
+ value, land value from tax assessments, revenue potential from archetype-typical
444
+ enterprise models (VLAS doc 04 §7 — the 14 stewardship enterprises × primary capital)
445
+ 2. **Build** an illustrative Tier-4 financial model: CapEx estimate, phased investment,
446
+ revenue streams, cost structure, pro forma projection
447
+ 3. **Tag EVERY figure** `(Illustrative — constructed from analysis, no project-supplied source)`
448
+ 4. Write to `arc/06-model.md` with full methodology disclosure
449
+ 5. Flag in ONRAMP-REPORT.md: `Financial model constructed from analysis — no incoming financials`
450
+
451
+ Use the financial model analysis template at `corpus/_shared/onramp/financial-model-template.md`
452
+ if available.
453
+
454
+ ### 2.4 Write Arc Files (Research Layer)
455
+
456
+ The 6 arc files are the **research corpus** — organized by Five Capitals:
457
+
458
+ | Arc file | Primary capital(s) | Research feeds |
459
+ |-----------------------|--------------------|----------------------------------------|
460
+ | `01-story.md` | narrative spine | Place identity + vision + mission |
461
+ | `02-place.md` | Natural, Built | Ecoregion + infrastructure + heritage |
462
+ | `03-foundation.md` | Human, Social | People + governance + FPIC context |
463
+ | `04-process-outcomes.md`| Social, Built | Programs + stewardship + enterprise models |
464
+ | `05-investors.md` | Financial | Capital structure + raise + title chain |
465
+ | `06-model.md` | Financial | Pro forma + revenue (supplied or constructed) |
466
+
467
+ **Every number in 05 and 06 MUST cite its source document with page reference.**
468
+ Tier 4 claims tagged `(Illustrative)`.
469
+
470
+ ### 2.5 Website Route Registry — Archetype-Specific (NOT Fixed 6-Arc)
471
+
472
+ The arc files are research. The **website routes are a separate artifact** defined in
473
+ `places/<slug>/PRODUCT.md`, derived from the archetype's telling
474
+ (VLAS doc 02 — the six movements).
475
+
476
+ Each archetype has a route template at `corpus/_shared/onramp/routes/<archetype>.md`.
477
+ Different archetypes produce different site structures:
478
+
479
+ - **land-regen** routes: `/`, `/place`, `/story`, `/foundation`, `/stewardship`,
480
+ `/invest`, `/history`, `/model`
481
+ - **data-center** routes: `/`, `/place-writes-the-spec`, `/library`, `/pathway`,
482
+ `/civic-compute`, `/resources`
483
+ - **HISTORY** is always its own route/artifact (sourced from `HISTORY.md`),
484
+ never folded into the generic 6-arc
485
+
486
+ `PRODUCT.md` declares: `route → arc-file(s) → content mapping → archetype`
487
+
488
+ If the route template does not exist, the skill writes a default land-regen route set
489
+ and flags it in ONRAMP-REPORT.md.
490
+
491
+ ### 2.6 Source Tier Tracking
492
+
493
+ Every source gets a row in `corpus/INDEX.md`:
494
+ `| source | tier | capital | arc file | date accessed |`
495
+
496
+ ### 2.7 Document Gate
497
+
498
+ Before proceeding to Phase 2b:
499
+ ```
500
+ DOCUMENT GATE:
501
+ [ ] N/M incoming documents read (list each with filename + page count)
502
+ [ ] Financial model: supplied | constructed from analysis
503
+ [ ] Team and partners extracted
504
+ [ ] Timeline extracted: phases with dates
505
+ [ ] All data integrated into arc files with source citations
506
+ [ ] PRODUCT.md route registry written (archetype-specific)
507
+ ```
508
+
509
+ If any incoming document was NOT read: **STOP and report which ones were skipped and why.**
510
+
511
+ ### 2.8 Phase 2 Rubric Gate
512
+
513
+ ```
514
+ PHASE 2 RUBRIC — <slug>
515
+ | # | Check | Expected | Actual | Pass |
516
+ |---|--------------------------------|---------------------------------------|--------|------|
517
+ | 1 | Natural capital sources | >= 3 Tier 0-2 | ? | |
518
+ | 2 | Human capital sources | >= 2 Tier 0-2 | ? | |
519
+ | 3 | Social capital sources | >= 2 Tier 0-2 | ? | |
520
+ | 4 | Built capital sources | >= 2 Tier 0-2 | ? | |
521
+ | 5 | Financial capital sources | >= 2 Tier 0-2 | ? | |
522
+ | 6 | All incoming docs read | 0 unread | ? | |
523
+ | 7 | corpus/INDEX.md | all sources with tier + capital | ? | |
524
+ | 8 | arc/01-06 each > 40 lines | substantive content, not stubs | ? | |
525
+ | 9 | Every number in 05/06 cited | source:page reference present | ? | |
526
+ | 10| Tier 4 claims tagged | (Illustrative) on all | ? | |
527
+ | 11| Financial model | supplied or constructed + disclosed | ? | |
528
+ | 12| PRODUCT.md route registry | archetype-specific routes declared | ? | |
529
+ | 13| places.corpus_path | set in DB | ? | |
530
+ | 14| HISTORY.md | exists if prt_projects.project_type qualifies | ? | |
531
+ ```
532
+
533
+ Append Phase 2 results to `places/<slug>/ONRAMP-REPORT.md`:
534
+ ```markdown
535
+ ## Phase 2: Research — <date>
536
+ ### Sources: N total (Tier 0: X, Tier 1: Y, Tier 2: Z, Tier 3: A, Tier 4: B)
537
+ ### Per-capital: Natural ✅|⚠️ | Human ✅|⚠️ | Social ✅|⚠️ | Built ✅|⚠️ | Financial ✅|⚠️
538
+ ### Financial model: supplied | constructed from analysis
539
+ ### Documents read: N of M incoming
540
+ ### Route registry: <archetype> — N routes declared
541
+ ### Gaps: [list any research areas with insufficient sourcing]
542
+ ### Rubric: [full table above, filled in]
543
+ ```
544
+
545
+ Append Phase 2 row to INTAKE-LOG.md.
546
+
547
+ ---
548
+
549
+ ## Phase 2b: People, Organizations & Place Enrichment
550
+
551
+ After research, before conflict analysis. Enrich and verify all named entities.
552
+
553
+ ### 2b.1 Extract People from All Sources
554
+
555
+ Scan ALL project documents + arc files for named people:
556
+ - Team members (founders, directors, managers)
557
+ - Partners and advisors (named individuals)
558
+ - Indigenous / First Nations contacts and elders
559
+ - Government officials and agency contacts
560
+ - Community leaders and stakeholders
561
+ - Historical figures (for HISTORY.md context)
562
+
563
+ Build a raw entity list: `name | mentioned_in | role_claimed | org_affiliation`.
564
+
565
+ ### 2b.2 Extract Organizations from All Sources
566
+
567
+ Scan for named organizations:
568
+ - Project partners (development, construction, technology)
569
+ - First Nations bands, tribal councils, indigenous orgs
570
+ - Government agencies (federal, state/provincial, municipal)
571
+ - NGOs and conservation organizations
572
+ - Financial institutions, investors, fund managers
573
+ - Contractors, consultants, service providers
574
+
575
+ Build a raw org list: `org_name | mentioned_in | relationship | domain_claimed`.
576
+
577
+ ### 2b.3 Categorize by Relationship Type
578
+
579
+ Assign each entity a relationship category from the VLAS stakeholder taxonomy:
580
+ - `core-team` — named on the project team
581
+ - `partner` — LOI or MOU holder
582
+ - `advisor` — advisory board or named advisor
583
+ - `indigenous-rights-holder` — FPIC counterparty (ANNIHILATOR — must be identified)
584
+ - `government` — regulatory or permitting authority
585
+ - `community` — local community stakeholder
586
+ - `investor` — capital provider or prospective
587
+ - `contractor` — service delivery
588
+ - `historical` — historical figure (HISTORY.md only, no verification needed)
589
+
590
+ ### 2b.4 RocketReach Person Lookup
591
+
592
+ For each non-historical person, run verification:
593
+ ```
594
+ mcp__claude_ai_RocketReach__rocketreach_lookup_person or rocketreach_search_people
595
+ ```
596
+ Record: current_title, current_org, LinkedIn URL, email, verification_status.
597
+ If no match: mark `unverified` — DO NOT invent data.
598
+
599
+ ### 2b.5 RocketReach Company Lookup
600
+
601
+ For each organization:
602
+ ```
603
+ mcp__claude_ai_RocketReach__rocketreach_lookup_company
604
+ ```
605
+ Record: domain, employee_count, industry, location, verification_status.
606
+ Cross-check claimed relationship against actual org profile.
607
+
608
+ ### 2b.6 Web Research on Organizations
609
+
610
+ RocketReach gives you the company card. **Web research gives you the story.** For each
611
+ significant org (core-team, partner, investor, indigenous-rights-holder), run targeted
612
+ web research:
613
+
614
+ 1. **Website analysis:** find the org's website, read their about/mission/team pages.
615
+ Does the org's stated mission align with the project's claims about them?
616
+ 2. **News search:** search for recent news about the org. Any red flags (lawsuits,
617
+ regulatory actions, financial trouble, controversy)?
618
+ 3. **Social/community presence:** does the org have a real presence in the region?
619
+ LinkedIn company page, social media, community references?
620
+ 4. **Track record:** has this org done similar projects before? What was the outcome?
621
+ Search for their name + the project type (e.g., "org-name conservation" or
622
+ "org-name eco-tourism").
623
+ 5. **Financial standing:** for investor/financial entities, any public filings,
624
+ annual reports, or regulatory registrations (SEC, provincial securities)?
625
+
626
+ For each org, record: `org | website | mission_fit | news_flags | regional_presence |
627
+ track_record | verification_status`.
628
+
629
+ Update arc files with findings — especially arc/03-foundation.md (partner orgs) and
630
+ arc/05-investors.md (financial entities). **A partner org with no web presence is a
631
+ yellow flag; an investor entity with no regulatory registration is a red flag.**
632
+
633
+ ### 2b.7 Government Registry Verification
634
+
635
+ For key entities (project company, First Nations band, conservation trust):
636
+ - Check government business registries (state/provincial)
637
+ - Verify First Nations band recognition (federal indigenous affairs)
638
+ - Confirm non-profit/charity status where claimed
639
+ - Record registration numbers where available
640
+
641
+ ### 2b.8 Cross-Reference Against Arc Files
642
+
643
+ Verify consistency between entity claims and arc file content:
644
+ - Team bios in arc/03-foundation.md match RocketReach profiles
645
+ - Partner orgs in arc/04-process-outcomes.md exist and match claimed domain
646
+ - Investor entities in arc/05-investors.md are real institutions
647
+ - Flag any entity mentioned in arc files but NOT in the raw extraction (missed entity)
648
+
649
+ ### 2b.9 Map Stakeholder Network
650
+
651
+ Build a relationship map: who connects to whom, through what mechanism.
652
+ - Direct relationships (employment, partnership, advisory)
653
+ - Indirect relationships (shared board membership, common investor)
654
+ - FPIC chain: which indigenous rights-holders must consent, and who is the contact
655
+ - Governance chain: project → trust → community → rights-holder
656
+
657
+ ### 2b.10 Write STAKEHOLDERS.md
658
+
659
+ Write verified entities to `places/<slug>/tracker/STAKEHOLDERS.md`:
660
+ - **People section:** name, title, org, LinkedIn, verification status, relationship category
661
+ - **Organizations section:** name, domain, size, relationship, verification status
662
+ - **Network section:** key relationships mapped
663
+ - **FPIC counterparties:** explicitly listed (even if unverified — the gap is the finding)
664
+
665
+ **Content floor:** STAKEHOLDERS.md must have >20 lines of substantive content.
666
+ If fewer than 20 lines after enrichment, the rubric FAILs.
667
+
668
+ ### 2b.11 Flag Unverified Entities
669
+
670
+ Write ALL unverified entities to RECONCILIATION.md under a `## Unverified Entities` section:
671
+ - Person: name, claimed role, what was searched, why no match
672
+ - Org: name, claimed relationship, what was searched, why no match
673
+ - Each flagged entity gets an escalation path: "verify via [specific next step]"
674
+
675
+ ### 2b.12 Update Arc Files with Verified Data
676
+
677
+ Where RocketReach returned richer data than the arc files contain:
678
+ - Update arc/03-foundation.md with verified titles and org affiliations
679
+ - Update arc/05-investors.md with verified investor entity details
680
+ - Tag each update: `(Verified via RocketReach <date>)`
681
+
682
+ ### 2b.13 Phase 2b Rubric Gate
683
+
684
+ ```
685
+ PHASE 2b RUBRIC — <slug>
686
+ | # | Check | Expected | Actual | Pass |
687
+ |---|--------------------------------|---------------------------------------|--------|------|
688
+ | 1 | People extracted | all named people from all docs | ? | |
689
+ | 2 | Orgs extracted | all named orgs from all docs | ? | |
690
+ | 3 | Entities categorized | relationship type assigned each | ? | |
691
+ | 4 | RocketReach person lookups | run on all non-historical people | ? | |
692
+ | 5 | RocketReach company lookups | run on all orgs | ? | |
693
+ | 6 | Web research on orgs | website + news + track record checked | ? | |
694
+ | 7 | Government registry checks | key entities verified | ? | |
695
+ | 8 | Arc file cross-reference | no missed entities | ? | |
696
+ | 9 | Stakeholder network mapped | relationships documented | ? | |
697
+ | 10| STAKEHOLDERS.md | >20 lines substantive content | ? | |
698
+ | 11| FPIC counterparties identified | listed even if unverified | ? | |
699
+ | 12| Unverified entities flagged | in RECONCILIATION.md with next steps | ? | |
700
+ | 13| Arc files updated | verified data written back | ? | |
701
+ ```
702
+
703
+ Under `RDC_TEST=1`: skip RocketReach + registry lookups; write placeholder STAKEHOLDERS.md.
704
+
705
+ Append Phase 2b results to ONRAMP-REPORT.md + INTAKE-LOG.md.
706
+
707
+ ---
708
+
709
+ ## Phase 3: Conflict Resolution
710
+
711
+ Systematic fact verification across all sources — every factual claim in every arc file
712
+ must be cross-checked, classified, and resolved before scoring.
713
+
714
+ ### 3.1 Build Fact Inventory
715
+
716
+ Scan all 6 arc files and extract every factual claim into a structured inventory:
717
+ - **Quantitative claims:** acreage, elevation, population, financial figures, dates
718
+ - **Entity claims:** people, orgs, roles, relationships
719
+ - **Legal claims:** title status, easements, zoning, permits, water rights
720
+ - **Ecological claims:** species presence, habitat type, soil classification, watershed
721
+ - **Historical claims:** dates, events, ownership transitions
722
+
723
+ Each claim gets a row: `claim | arc_file | source | tier | category`.
724
+
725
+ ### 3.2 Cross-Source Verification — Web vs Documents
726
+
727
+ For each factual claim, explicitly compare web research sources (Tier 0-2) against
728
+ project-supplied documents (Tier 3-4):
729
+ - Same fact, different numbers → `conflicted`
730
+ - Web confirms document → `verified`
731
+ - Web contradicts document → `conflicted` with both values logged
732
+ - No web source found for document claim → `unverified`
733
+ - Web source found, no document mention → `web-only` (flag for arc update)
734
+
735
+ Log each comparison in RECONCILIATION.md: `claim | web_value | doc_value | status`.
736
+
737
+ ### 3.3 Cross-Document Verification
738
+
739
+ Compare claims across incoming documents themselves:
740
+ - Business plan vs pro forma (financial figures consistent?)
741
+ - Execution proposal vs development package (timeline, team, scope consistent?)
742
+ - Due diligence list vs actual permits/rights in arc files
743
+ - Flag any internal document contradictions
744
+
745
+ ### 3.4 Financial Figure Verification
746
+
747
+ Dedicated pass on all financial claims in arc/05-investors.md and arc/06-model.md:
748
+ - CapEx total: consistent across all mentions?
749
+ - Revenue projections: same base assumptions everywhere?
750
+ - Phased investment amounts: sum correctly?
751
+ - Pro forma: internally consistent (revenue - costs = margin)?
752
+ - All Tier 4 figures tagged `(Illustrative)` — verify none are presented as verified
753
+
754
+ ### 3.5 Stakeholder Claim Verification
755
+
756
+ Cross-check STAKEHOLDERS.md against arc file claims:
757
+ - Every person mentioned in arc/03 appears in STAKEHOLDERS.md
758
+ - Titles/roles match between arc files and verified RocketReach data
759
+ - Partner orgs in arc/04 match STAKEHOLDERS.md org entries
760
+ - No phantom stakeholders (mentioned in arc files, not in STAKEHOLDERS.md)
761
+
762
+ ### 3.6 Timeline Consistency Check
763
+
764
+ Verify all temporal claims are internally consistent:
765
+ - Project phases in arc/04 have realistic durations
766
+ - Milestone dates in tracker/MILESTONES.md align with arc file narratives
767
+ - Historical dates in HISTORY.md are chronologically valid
768
+ - Regulatory timeline (permits, approvals) is plausible for jurisdiction
769
+
770
+ ### 3.7 Geographic and Legal Claim Verification
771
+
772
+ Verify location-specific claims:
773
+ - Property boundaries / APN match county records (Tier 0)
774
+ - Zoning classification matches municipal records
775
+ - Water rights claims match state/provincial records
776
+ - Conservation easement claims match land trust records
777
+ - Heritage/NHPA listings match federal/state registers
778
+
779
+ ### 3.8 Resolve All Conflicts
780
+
781
+ For each `conflicted` or `unverified` claim, choose one resolution:
782
+ - **verified** — web + doc agree, or authoritative source confirms
783
+ - **resolved** — conflict existed, winner chosen with rationale documented
784
+ - **held** — cannot resolve now; escalation path documented (who to ask, what to check)
785
+
786
+ Update arc files with resolved values. Tag resolved claims:
787
+ `(Resolved: <winning_source>, see RECONCILIATION.md RC-NNN)`
788
+
789
+ ### 3.9 Write RECONCILIATION.md
790
+
791
+ Structure as a ledger with sections:
792
+ 1. **Verified Claims** — fact + sources that agree
793
+ 2. **Resolved Conflicts** — fact + both values + winner + rationale
794
+ 3. **Held Claims** — fact + why unresolvable + escalation path + impact if wrong
795
+ 4. **Unverified Entities** (from Phase 2b)
796
+
797
+ Zero `conflicted` facts may remain. `held` facts must each have a documented escalation path
798
+ and an impact assessment (what breaks if this fact is wrong).
799
+
800
+ ### 3.10 Update Arc Files with Corrections
801
+
802
+ Write resolved values back into the arc files:
803
+ - Replace conflicted figures with resolved values
804
+ - Add source citations for newly verified facts
805
+ - Remove or tag unverifiable claims
806
+ - Ensure arc/05 and arc/06 financial figures are internally consistent post-resolution
807
+
808
+ ### 3.11 Update corpus/INDEX.md
809
+
810
+ Add any new sources discovered during verification. Update tier assignments where
811
+ a source's authority was re-assessed during conflict resolution.
812
+
813
+ ### 3.12 Phase 3 Rubric Gate
814
+
815
+ ```
816
+ PHASE 3 RUBRIC — <slug>
817
+ | # | Check | Expected | Actual | Pass |
818
+ |---|--------------------------------|---------------------------------------|--------|------|
819
+ | 1 | Fact inventory built | every arc file scanned, claims listed | ? | |
820
+ | 2 | Web vs doc comparisons | explicitly logged per claim | ? | |
821
+ | 3 | Cross-document consistency | internal doc contradictions resolved | ? | |
822
+ | 4 | Financial figures verified | arc/05 + arc/06 internally consistent | ? | |
823
+ | 5 | Stakeholder claims verified | arc/03 matches STAKEHOLDERS.md | ? | |
824
+ | 6 | Timeline consistency | dates coherent across all files | ? | |
825
+ | 7 | Geographic/legal verified | boundaries, zoning, rights checked | ? | |
826
+ | 8 | Zero conflicted facts | 0 remaining | ? | |
827
+ | 9 | Zero unverified facts | 0 remaining (or reclassified held) | ? | |
828
+ | 10| Held facts documented | each with escalation + impact | ? | |
829
+ | 11| Arc files updated | resolved values written back | ? | |
830
+ | 12| corpus/INDEX.md updated | new sources + tier reassessments | ? | |
831
+ | 13| STAKEHOLDERS.md | >20 lines substantive content | ? | |
832
+ ```
833
+
834
+ Append Phase 3 results to ONRAMP-REPORT.md + INTAKE-LOG.md.
835
+
836
+ ---
837
+
838
+ ## Phase 4: Brand Book + Imagery — Full rdc:design Integration
839
+
840
+ Phase 4 **invokes `rdc:design`** — it does not duplicate design work. The skill prepares
841
+ inputs (DESIGN.md brief + PRODUCT.md route registry from Phases 2/3) and calls `rdc:design`
842
+ which produces the full brand system.
843
+
844
+ ### 4.1 Inputs to rdc:design
845
+
846
+ - `places/<slug>/DESIGN.md` — the brief (identity, voice, audience, mood — written in Phase 2)
847
+ - `places/<slug>/PRODUCT.md` — route registry, content map, site IA (archetype-specific)
848
+ - `places/<slug>/arc/01-story.md` — narrative spine (Story of Place)
849
+
850
+ ### 4.2 The 24-Page Brand Book (Baru Model)
851
+
852
+ `rdc:design` writes/updates `places/<slug>/DESIGN.md` as a **24-page editorial brand book**:
853
+
854
+ | Spread | Section | Content |
855
+ |--------|---------|---------|
856
+ | 1 | Cover | Project name + tagline + hero image |
857
+ | 2-3 | Story of Place | The narrative — who was here, what happened, what's next |
858
+ | 4-5 | Market Position | Competitor landscape, pricing tier, differentiation |
859
+ | 6-7 | Audience Segments | Primary + secondary audiences, psychographics |
860
+ | 8-9 | Voice + Tone | Register, rhythm, prohibitions, example copy |
861
+ | 10-11 | Color Palette | 10-12 tokens derived from ACTUAL place imagery, NOT generic green |
862
+ | 12-13 | Typography | Display + body families, hierarchy, specimen |
863
+ | 14-15 | Imagery Direction | Photography style, subject matter, treatment, existing imagery catalog |
864
+ | 16-17 | Mood + Materiality | Visual register, textures, physical materials, digital materiality |
865
+ | 18-19 | Content Architecture | Site map, route-to-arc mapping, content types per route |
866
+ | 20-21 | Communications | Social strategy, press approach, stakeholder communications |
867
+ | 22 | Token Reference | Full CSS custom property table with hex values |
868
+ | 23 | Pattern Reference | Component patterns, animation vocabulary, interaction model |
869
+ | 24 | Credits + Colophon | Contributors, sources, version |
870
+
871
+ ### 4.3 Palette — Full Studio Tokens via RAMPA
872
+
873
+ **⛔ NEVER generate a generic dark green palette.**
874
+
875
+ 1. Search online for existing imagery of the project (previous names, partner sites, location photos)
876
+ 2. Use RAMPA or image analysis tools to extract dominant colors from ACTUAL place imagery
877
+ 3. Map colors to the place's identity — whatever is SPECIFIC to THIS place
878
+ 4. Generate the full token system:
879
+ - **Studio tokens** — CSS custom properties in the `--<slug>-*` namespace
880
+ - **Color system** — primary, secondary, accent, neutral, semantic mapped to Five Capitals
881
+ 5. Log which image(s) the palette was derived from (source proof in DESIGN.md)
882
+
883
+ ### 4.4 Imagery — Search First, Generate Second, regen-media Pipeline
884
+
885
+ **Before generating ANY imagery with AI:**
886
+ 1. Search the web for existing non-copyright imagery of the project
887
+ 2. Catalog found images in `IMAGERY-PROMPTS.md` with source URLs and license status
888
+ 3. Only generate AI imagery for slots that have no real photography available
889
+
890
+ **Required image slots (minimum per archetype — adjust per PRODUCT.md route set):**
891
+
892
+ | Slot | Aspect | Used in | Prefer real vs AI |
893
+ |------|--------|---------|------------------|
894
+ | `hero-main` | 16:9 wide | Hero section | REAL |
895
+ | `place-aerial` | 16:9 wide | /place header | REAL |
896
+ | `ecology-wildlife` | 4:3 | /place ecology | REAL |
897
+ | `heritage-structure` | 4:3 | /foundation or /story | REAL |
898
+ | `programs-activity` | 1:1 | /stewardship or /regeneration | AI OK |
899
+ | `og-image` | 1200x630 | Social share | Composite |
900
+
901
+ **Generation pipeline — three-stage flow:**
902
+
903
+ ```
904
+ Stage 1: Generate → output/imagegen/<slug>/
905
+ └ AI: regen-media MCP (generate_flux / generate_midjourney)
906
+ OR Codex image_gen (gpt-image-2, --enable image_generation)
907
+ OR OpenAI API direct
908
+ └ Each image: <slot-name>.png (e.g. hero-main.png, ecology-salmon.png)
909
+ └ REPORT.md in the same dir: slot, prompt used, model, dimensions, date
910
+
911
+ Stage 2: Review → $CORPUS_ROOT/TPF/<slug>/artifacts/images/
912
+ └ After task review, move approved images to the corpus artifacts dir
913
+ └ This is the durable home (One Home Per Fact — images are artifacts)
914
+ └ Rejected images stay in output/imagegen/<slug>/ with _rejected suffix
915
+
916
+ Stage 3: Wire → apps/<slug>/public/images/
917
+ └ Copy from corpus artifacts into the app's public dir
918
+ └ Wire imagery.ts (or equivalent) to reference the images
919
+ └ Verify all <Image> src imports resolve after build
920
+ ```
921
+
922
+ - Video placeholders: declare slots in IMAGERY-PROMPTS.md even if content isn't ready
923
+ - The `output/imagegen/<slug>/` directory is the generation landing zone — always
924
+ project-organized, never flat
925
+ - IMAGERY-PROMPTS.md is the manifest: it declares what to generate, and REPORT.md
926
+ in the output dir records what was actually generated
927
+
928
+ ### 4.5 Brand Gate
929
+
930
+ If `--no-gate` is NOT set: stop and report. Re-invoke with `--skip-to 5`.
931
+
932
+ ### 4.6 Phase 4 Rubric Gate
933
+
934
+ ```
935
+ PHASE 4 RUBRIC — <slug>
936
+ | # | Check | Expected | Actual | Pass |
937
+ |---|--------------------------------|---------------------------------------|--------|------|
938
+ | 1 | DESIGN.md | 24-spread outline, not a stub | ? | |
939
+ | 2 | Palette source | derived from THIS place's imagery | ? | |
940
+ | 3 | Palette source proof | image filename(s) logged in DESIGN.md | ? | |
941
+ | 4 | Studio tokens | --<slug>-* CSS properties defined | ? | |
942
+ | 5 | IMAGERY-PROMPTS.md | all slots declared with aspect+mood | ? | |
943
+ | 6 | Image slots filled | hero, aerial, ecology, heritage min | ? | |
944
+ | 7 | Image sources | real search done before AI gen | ? | |
945
+ | 8 | No generic dark green | palette specific to THIS place | ? | |
946
+ | 9 | Brand review gate | passed (or --no-gate) | ? | |
947
+ ```
948
+
949
+ Append Phase 4 results to ONRAMP-REPORT.md + INTAKE-LOG.md.
950
+
951
+ ---
952
+
953
+ ## Phase 5: Regen Score — Model-Driven Rubric Assessment
954
+
955
+ The Regen Score is **driven by the VLAS model specification** (corpus 01), not a standalone
956
+ scoring system. The archetype assigned in Phase 1 determines which model rubric applies,
957
+ which process states are required (corpus 03 §5), which Five Capitals are emphasized,
958
+ and which annihilators must be checked. **The model IS the rubric.**
959
+
960
+ Scoring is NOT a one-pass read-and-number exercise. Each dimension requires regional
961
+ research correlation — you look at the region, discover what comparables exist, check
962
+ how this place fits the regional pattern, and circle back for deeper evidence where the
963
+ first pass left gaps. Multiple research passes per dimension are expected.
964
+
965
+ ### 5.1 Load Model Specification
966
+
967
+ Load the model's scoring context from the VLAS corpus and archetype templates:
968
+ - Read `$CORPUS_ROOT/VLAS/plans/01-model-spec.md` — the universal template (§6 SCARF×4Ps,
969
+ §7 Five Capitals, §8 the arc, §12 recognition formula + annihilators)
970
+ - Read `$CORPUS_ROOT/VLAS/plans/03-process-states.md` — state library + §5 land-type
971
+ selection matrix (Data Center / Land Regen / Urban Renewal)
972
+ - Read `corpus/_shared/onramp/benchmarks/<archetype>.md` — archetype-specific benchmarks
973
+ - Read `places/<slug>/PROCESS-ARC.md` — this place's state selection (from Phase 1)
974
+
975
+ The model spec defines **what gets scored and how**. If the archetype benchmark set does
976
+ not exist, the skill writes a default from the model spec §7 (Five Capitals) + §6
977
+ (SCARF×4Ps lattice) and flags it for review.
978
+
979
+ ### 5.2 Regional Comparable Research — First Pass
980
+
981
+ Before scoring, establish the regional context this place sits within:
982
+ - **Comparable projects:** search for similar archetype projects in the same region
983
+ (state/province, ecoregion, economic zone). What are they? What did they cost?
984
+ What revenue do they generate? What regulatory path did they follow?
985
+ - **Regional economic indicators:** median land values, construction costs per sqft,
986
+ tourism/hospitality revenue baselines, agricultural yields for the bioregion
987
+ - **Regulatory landscape:** what permits/approvals do comparable projects in this
988
+ jurisdiction typically require? What are typical timelines?
989
+ - **Conservation/ecological benchmarks:** ecoregion health baselines, species
990
+ inventories for the bioregion, watershed health metrics from regional agencies
991
+
992
+ This is research — use WebSearch, web-research MCP, or existing corpus. Log all
993
+ new sources in corpus/INDEX.md with tier assignments.
994
+
995
+ ### 5.3 SCARF×4Ps Lattice Assessment
996
+
997
+ Fill the 5×4 grid from model spec §6 for this place. Each cell is a question the
998
+ model answers for a real project:
999
+
1000
+ ```
1001
+ | SCARF \ 4P | Place | People | Purpose | Process |
1002
+ |----------------|------------------|------------------|------------------|------------------|
1003
+ | Source | ? | ? | ? | ? |
1004
+ | Condition | ? | ? | ? | ? |
1005
+ | Appropriateness | ? | ? | ? | ? |
1006
+ | Resilience | ? | ? | ? | ? |
1007
+ | Feedback | ? | ? | ? | ? |
1008
+ ```
1009
+
1010
+ For each cell:
1011
+ - Fill with evidence from arc files (cite arc file + source tier)
1012
+ - Mark as **gate-generating** (produces a hard gate), **filter-generating** (produces
1013
+ a soft filter), or **neither**
1014
+ - Cells that are gate-generating feed directly into the annihilator check (5.7)
1015
+ - Empty cells are scoring gaps — flag for additional research or mark as
1016
+ `declared absence (reason)` (doc 01 §0.3: *a declared absence is an artifact*)
1017
+
1018
+ Write the filled lattice to `places/<slug>/SCREENING.md`.
1019
+
1020
+ ### 5.4 Five Capitals Per-Capital Scoring
1021
+
1022
+ Score each capital per model spec §7 — canonical definitions, never redefined.
1023
+ Each capital has: **definition** → **what it means for this archetype** → **patterns
1024
+ that build it** (doc 04) → **indicators** → **evidence citation**.
1025
+
1026
+ | Capital | Unit | Score 0-100 | Evidence | Source Tier | Arc File(s) |
1027
+ |-----------|------|-------------|----------|-------------|-------------|
1028
+ | Natural | NCU | ? | ? | ? | arc/02 |
1029
+ | Human | HCU | ? | ? | ? | arc/03 |
1030
+ | Social | SCU | ? | ? | ? | arc/03, 04 |
1031
+ | Built | MCU | ? | ? | ? | arc/04 |
1032
+ | Financial | FCU | ? | ? | ? | arc/05, 06 |
1033
+
1034
+ **Financial is a translation layer** — it captures monetized value from gains in the
1035
+ other four (doc 01 §7). Score on whether the financial model supports the other capitals,
1036
+ not as an independent measure of profitability.
1037
+
1038
+ **Coverage rule (doc 01 §5):** a plan that maxes one capital and starves another is
1039
+ **visibly lopsided and fails.** No capital may score below 40 while another scores
1040
+ above 80 (the coverage spread gate). Whole-place or nothing.
1041
+
1042
+ **Weighting honesty:** any weighting used is **pedagogical, not measured.** Label it
1043
+ `Illustrative`. Measured outcomes come from verification (S20), never the planner.
1044
+
1045
+ Each per-capital score MUST cite: which arc file, which source (tier), what evidence
1046
+ justifies the number. No bare scores. Tier 4 figures that are the SOLE evidence for a
1047
+ sub-score → cap that sub-score at 50.
1048
+
1049
+ ### 5.5 Annihilator Check — Binary Pass/Fail
1050
+
1051
+ The recognition formula is a **product** — any zeroed term collapses everything.
1052
+ Gates are **annihilators, not low scores** (doc 01 §12.2, doc 03 §2).
1053
+
1054
+ Check each annihilator and record binary status:
1055
+
1056
+ | Annihilator | State | Check | Status | Evidence |
1057
+ |-------------|-------|-------|--------|----------|
1058
+ | FPIC | S04 | Consent counterparties identified + pathway | ? | STAKEHOLDERS.md |
1059
+ | Readiness | S13 | Place ecology can hold development | ? | arc/02 |
1060
+ | Baseline | S08 | Five Capitals baseline captured or plan exists | ? | arc files |
1061
+ | Covenant | S14 | Legal pathway identified | ? | arc/05, tracker/ |
1062
+ | Permanence | S20 | π_legal × π_ecology both non-zero pathway | ? | HISTORY.md, arc/02 |
1063
+ | Verification| S20 | Measurement plan for ΔI exists | ? | PROCESS-ARC.md |
1064
+ | Offtake | S21 | Revenue/offtake pathway identified | ? | arc/06 |
1065
+ | Dividend | S22 | ≥10% community, before investor allocation | ? | arc/05 |
1066
+
1067
+ At enrollment, most annihilators cannot be fully passed — but the **pathway to passing
1068
+ them** MUST be identified. A place with no FPIC counterparty identified and no plan to
1069
+ identify them is a NO-GO regardless of other scores.
1070
+
1071
+ Status per annihilator:
1072
+ - **CLEAR** — evidence exists or a credible pathway is documented
1073
+ - **AT RISK** — gap identified, pathway unclear but not impossible
1074
+ - **BLOCKED** — no pathway visible → NO-GO signal
1075
+
1076
+ Any annihilator **BLOCKED** → composite capped at NO-GO (<55) regardless of capital scores.
1077
+
1078
+ ### 5.6 Recognition Formula Readiness
1079
+
1080
+ Assess each term of the normative issuance kernel (doc 01 §12, doc 09 §2):
1081
+
1082
+ `Q = A_cap × ΔI_c × P × S × v^α × a^β × (1-U)`
1083
+
1084
+ At enrollment, this is a **readiness assessment**, not a computed Q:
1085
+
1086
+ | Term | Question | Evidence | Readiness |
1087
+ |------|----------|----------|-----------|
1088
+ | A_cap (scale) | Area/asset quantified? | Survey, title, GIS | ? |
1089
+ | ΔI (integrity uplift) | Baseline plan + measurement methodology? | PROCESS-ARC.md | ? |
1090
+ | P (permanence) | Legal + ecological durability pathway? | arc/05, HISTORY.md | ? |
1091
+ | S (stewardship/FPIC) | Consent + governance quality? | STAKEHOLDERS.md | ? |
1092
+ | v (velocity) | Time-series plan for improvement rate? | tracker/MILESTONES.md | ? |
1093
+ | a (acceleration) | Sustained care plan beyond initial cycle? | arc/04 | ? |
1094
+ | (1-U) (uncertainty) | Source quality + measurement confidence? | corpus/INDEX.md tiers | ? |
1095
+
1096
+ Each term: **Ready** / **Partially ready** / **Not ready** / **N/A (with reason)**.
1097
+
1098
+ ### 5.7 Process State Completion Audit
1099
+
1100
+ Read `places/<slug>/PROCESS-ARC.md` (Phase 1) and check which states have evidence
1101
+ of completion vs which are still required.
1102
+
1103
+ For each state S00–S24 marked `required`:
1104
+ 1. What evidence exists that this state has been addressed?
1105
+ 2. Is the evidence sufficient to pass the state's exit gate?
1106
+ 3. Which states are CORE vs CONDITIONAL for this archetype?
1107
+
1108
+ Cross-reference against the land-type selection matrix (doc 03 §5):
1109
+ - Data Center: S05b site control, S11 N/A, S15 N/A
1110
+ - Land Regen / Conservation: S05a LRLT, S11 core, S15 core
1111
+ - Urban Renewal: S05c no land trust, S11 optional, S15 project-dependent
1112
+ - Eco-hospitality / Coastal-watershed: map to closest column + archetype-specific overrides
1113
+
1114
+ **A composite ≥75 with a CORE state missing is invalid.**
1115
+
1116
+ ANNIHILATOR states (S04 FPIC, S08 Baseline, S13 Readiness, S14 Covenant, S20 Verification,
1117
+ S21 Recognition, S22 Return Flow) with no evidence → composite invalid regardless of number.
1118
+
1119
+ ### 5.8 Pathway Ladder Position
1120
+
1121
+ Determine current and target rung (doc 01 §9 — five rungs, ascending):
1122
+ 1. Where does this place sit today? (current rung, with evidence)
1123
+ 2. What is the target rung? (from PROCESS-ARC.md or project vision)
1124
+ 3. Is an operating example at the target rung known? If not, say so honestly.
1125
+ 4. What is the rising floor — the regulatory trajectory in this jurisdiction?
1126
+ 5. Is the project building above or at the current floor?
1127
+
1128
+ The aspirational rule: if no operating example exists at the top, **say so.** Building
1129
+ to the current floor is building to be obsolete.
1130
+
1131
+ ### 5.9 Regional Correlation — Second Pass (Gap Fill)
1132
+
1133
+ After first-pass scoring, identify capitals that scored below 75 individually:
1134
+ - For each weak capital, do a targeted regional research pass:
1135
+ - What specific evidence is missing?
1136
+ - Can it be found via web research in the region?
1137
+ - Are there comparable projects whose public data fills the gap?
1138
+ - Correlate: does new regional data change the picture for other capitals too?
1139
+ - Update arc files with newly found evidence
1140
+ - Re-score the weak capital with new evidence
1141
+ - Log the research cycle in ONRAMP-REPORT.md
1142
+
1143
+ This may require **multiple rounds** — you discover the region's shape, correlate what
1144
+ matters for this place in this region, then circle back for deeper digs on topics that
1145
+ emerged. Research is iterative. A gap that CANNOT be filled after targeted research
1146
+ stays as-is and contributes to the NEEDS WORK or NO-GO verdict.
1147
+
1148
+ ### 5.10 Honesty Audit
1149
+
1150
+ Verify all claims meet the honesty standard (doc 01 §11):
1151
+ - Every Tier 4 figure tagged `(Illustrative)` — no unverified figure scored as fact
1152
+ - Tier 4 figures that are the SOLE evidence for a capital score → cap at 50
1153
+ - Every pattern, instrument, and rung carries a precedent tier
1154
+ (Operating · Pilot · Proposal · Standard · Regulatory)
1155
+ - `announced-not-operating` flags on any case study cited
1156
+ - Financial Verified Mode: no unsourced figure ships as fact
1157
+ - The `[I]` register is identified — what is illustrative vs verified
1158
+ - Log: "N of M scoring evidence points are Tier 4 — ceiling applied to [capitals]"
1159
+
1160
+ ### 5.11 Compose Regen Score from Model Rubric
1161
+
1162
+ Aggregate all scoring components — NOT a simple 5-dimension mean. The model rubric
1163
+ drives the structure:
176
1164
 
177
- **Post-run invariant gate (HARD — halt if violated):**
178
- ```bash
179
- test ! -f "places/<slug>/_context.md" \
180
- && echo "_context.md absent: ✓" \
181
- || echo "FAIL: _context.md present — projection-drift violation"
182
1165
  ```
1166
+ REGEN SCORE — <slug> — <archetype>
1167
+ Model: <archetype> (loaded from $CORPUS_ROOT/VLAS/plans/ + archetype benchmarks)
1168
+
1169
+ SCARF×4Ps Lattice: NN/20 cells filled with evidence (gate-generating: N)
1170
+
1171
+ Five Capitals (per-capital, evidence-cited):
1172
+ Natural: __/100 [arc/02, Tier _]
1173
+ Human: __/100 [arc/03, Tier _]
1174
+ Social: __/100 [arc/03-04, Tier _]
1175
+ Built: __/100 [arc/04, Tier _]
1176
+ Financial: __/100 [arc/05-06, Tier _]
1177
+ Coverage spread: PASS/FAIL (max-min <= 40)
183
1178
 
184
- If `_context.md` is found: **STOP immediately** and report a FAIL. The projection is owned by `context-export-writer.ts` — any hand-authored copy is a Law 3 violation. Do not proceed.
1179
+ Annihilators (binary — any BLOCKED NO-GO):
1180
+ FPIC: CLEAR / AT RISK / BLOCKED
1181
+ Readiness: CLEAR / AT RISK / BLOCKED
1182
+ Baseline: CLEAR / AT RISK / BLOCKED
1183
+ Permanence: CLEAR / AT RISK / BLOCKED
1184
+ Offtake: CLEAR / AT RISK / BLOCKED
1185
+ Dividend: CLEAR / AT RISK / BLOCKED
185
1186
 
186
- Under `RDC_TEST=1`:
1187
+ Recognition Formula: __/7 terms ready
1188
+ Process States: __/__ required states addressed
1189
+ Pathway: Rung __/5 current → Rung __/5 target
1190
+ Research Passes: N rounds (gaps identified + re-researched)
1191
+
1192
+ Composite: __ — GO ≥75 | NEEDS WORK 55-74 | NO-GO <55
187
1193
  ```
188
- [RDC_TEST] skipping onramp-scaffold-place.mjs
189
- [RDC_TEST] skipping _context.md gate (no scaffold ran)
1194
+
1195
+ Write the full score card to `places/<slug>/SCREENING.md` (appending to the lattice
1196
+ from 5.3). This is the durable scoring artifact.
1197
+
1198
+ ### 5.12 Score Gate Decision
1199
+
1200
+ | Composite | Verdict | Action |
1201
+ |-----------|---------|--------|
1202
+ | ≥ 75 | **GO** | Proceed to Phase 6 (Build) |
1203
+ | 55-74 | **NEEDS WORK** | List specific gaps; skill STOPS. Re-invoke after addressed. |
1204
+ | < 55 | **NO-GO** | Project does not meet threshold. Skill STOPS. Escalate to Dave. |
1205
+
1206
+ If NEEDS WORK: list exactly what would move the score to GO — which capital needs
1207
+ evidence, which annihilator needs a pathway, which process state needs attention.
1208
+ A NO-GO is a success of the model if the place genuinely isn't ready.
1209
+
1210
+ Append the full scoring narrative to ONRAMP-REPORT.md:
1211
+ ```markdown
1212
+ ## Phase 5: Regen Score — <date>
1213
+ ### Model: <archetype> (benchmark set: loaded/generated)
1214
+ ### SCARF×4Ps: NN/20 cells filled (N gate-generating)
1215
+ ### Five Capitals:
1216
+ | Capital | Score | Evidence | Tier 4 count | Ceiling | Key citation |
1217
+ |-----------|-------|----------|--------------|---------|-------------|
1218
+ | Natural | NN | X | Y | yes/no | arc/02:LNN |
1219
+ | Human | NN | X | Y | yes/no | arc/03:LNN |
1220
+ | Social | NN | X | Y | yes/no | arc/04:LNN |
1221
+ | Built | NN | X | Y | yes/no | arc/04:LNN |
1222
+ | Financial | NN | X | Y | yes/no | arc/06:LNN |
1223
+ ### Coverage spread: PASS/FAIL
1224
+ ### Annihilators: [list each with status]
1225
+ ### Recognition Formula Readiness: __/7 terms
1226
+ ### Process States: __/__ required addressed
1227
+ ### Pathway: Rung __→__ | Rising floor: [jurisdiction context]
1228
+ ### Composite: NN — [GO / NEEDS WORK / NO-GO]
1229
+ ### Gaps (if NEEDS WORK): [specific actionable items per capital]
1230
+ ```
1231
+
1232
+ ### 5.13 Phase 5 Rubric Gate
1233
+
1234
+ ```
1235
+ PHASE 5 RUBRIC — <slug>
1236
+ | # | Check | Expected | Actual | Pass |
1237
+ |---|--------------------------------|---------------------------------------|--------|------|
1238
+ | 1 | Model spec loaded | VLAS 01 + 03 + archetype benchmarks | ? | |
1239
+ | 2 | Regional comparables researched| >= 2 comparable projects found | ? | |
1240
+ | 3 | SCARF×4Ps lattice filled | 20 cells answered with evidence | ? | |
1241
+ | 4 | All 5 capitals scored | 0-100 each with evidence citation | ? | |
1242
+ | 5 | Coverage spread gate | max-min <= 40 | ? | |
1243
+ | 6 | Annihilators checked | all 8 binary pass/fail recorded | ? | |
1244
+ | 7 | No BLOCKED annihilator | all CLEAR or AT RISK | ? | |
1245
+ | 8 | Recognition formula assessed | all 7 terms readiness recorded | ? | |
1246
+ | 9 | Process states audited | required states checked per archetype | ? | |
1247
+ | 10| Pathway ladder position set | current + target rung with evidence | ? | |
1248
+ | 11| Regional gap-fill pass done | weak capitals re-researched | ? | |
1249
+ | 12| Honesty audit passed | Tier 4 tagged, precedent tiers set | ? | |
1250
+ | 13| Composite >= 75 | GO | ? | |
1251
+ | 14| SCREENING.md written | lattice + score card + evidence | ? | |
1252
+ | 15| Score in ONRAMP-REPORT.md | Phase 5 section appended | ? | |
190
1253
  ```
191
1254
 
192
- ### 5. HISTORY Advisory
1255
+ Append Phase 5 results to ONRAMP-REPORT.md + INTAKE-LOG.md.
1256
+
1257
+ ---
1258
+
1259
+ ## Phase 6: Site Build — Archetype Routes + RegenOps Integration
1260
+
1261
+ ### 6.1 App Structure — Archetype-Specific Routes
193
1262
 
194
- Always print:
1263
+ Create `apps/<slug>/` following the Baru model (`apps/baru-website/`) but with
1264
+ **archetype-specific routes** from `PRODUCT.md` (not a fixed 6+1).
1265
+
1266
+ - Routes declared in `PRODUCT.md` route registry (Phase 2.5)
1267
+ - HISTORY is always its own route (sourced from `HISTORY.md`), never folded into the arc
1268
+ - Section components with REAL content from arc files — not placeholder text
1269
+ - Financial model page with ACTUAL numbers from the pro forma (tagged Illustrative where Tier 4)
1270
+ - Real imagery from Phase 4 (not placeholder gradients)
1271
+ - Every image/video slot from IMAGERY-PROMPTS.md has a placeholder component even if
1272
+ the asset isn't ready — the slot EXISTS in the route
1273
+
1274
+ ### 6.2 RegenOps Screens — Same Flow, TinTin/AI at Every Step
1275
+
1276
+ The onramp pipeline runs IN regenops-app. Required screens (report missing, advisory not block):
1277
+
1278
+ - **Intake/Screening** — S00/S01: project arrives, mission fit, archetype selection
1279
+ - **Research Dashboard** — S02/S07/S10: Five Capitals progress, source tier counts, gaps
1280
+ - **Conflict Resolution** — fact-by-fact review, tier comparison, reconciliation log
1281
+ - **Regen Score Card** — 5-dimension radar, composite, per-dimension evidence drill-down
1282
+ - **Phase State Timeline** — visual arc showing S00–S24 progress for this place
1283
+ - **Enrollment Overview** — place card, archetype, score, current phase, next action
1284
+
1285
+ **MD read/write file tree (REQUIRED in RegenOps project view):**
1286
+ - Browsable tree of `places/<slug>/` markdown files
1287
+ - Click to read any .md inline
1288
+ - Edit and save .md files (PLACE.md, arc/*, tracker/*, DESIGN.md, PRODUCT.md)
1289
+ - Read-only for generated files (`_context.md`)
1290
+ - Uses FS MCP WebDAV bridge for cloud sessions; direct filesystem for CLI
1291
+
1292
+ **TinTin/AI at every step:**
1293
+ - Each screen has a TinTin dispatch button (`POST /api/tintin/dispatch`)
1294
+ - AI assist: "research this gap", "score this dimension", "draft this arc section",
1295
+ "generate image for this slot"
1296
+ - Dave stays in the RegenOps flow; AI is the assistant, not the driver
1297
+
1298
+ ### 6.3 PUBLISH.md + DEPLOY Block
1299
+
1300
+ Per `app-deploy-manifest.md`, generate `PUBLISH.md` with `<!-- DEPLOY -->` block
1301
+ before deploy. Use `scripts/gen-deploy-blocks.mjs` or write manually.
1302
+
1303
+ ### 6.4 Build + Commit Discipline
1304
+
1305
+ 1. `pnpm --filter @regen/<slug> install`
1306
+ 2. `npx tsc --noEmit` — must pass
1307
+ 3. `pnpm --filter @regen/<slug> build` — must produce all routes
1308
+ 4. Commit: infra (lockfile) first with `RDC-Bypass:`, then product with `Work-Item:`
1309
+
1310
+ ### 6.5 Cross-File Route Consistency
1311
+
1312
+ After route creation, verify route names are consistent across ALL project files —
1313
+ not just PRODUCT.md vs the app. Grep `places/<slug>/` for every route path and
1314
+ fix any stale references:
1315
+
1316
+ - `DESIGN.md` content map → must reference current route names
1317
+ - `arc/*.md` route headers → must reference current route names
1318
+ - `ONRAMP-REPORT.md` route listings → must reference current route names
1319
+ - `IMAGERY-PROMPTS.md` slot routes → must reference current route names
1320
+
1321
+ **This is a rubric FAIL if any file references a route that no longer exists.**
1322
+ The skill renamed routes but left stale references → that is the defect this step prevents.
1323
+
1324
+ ### 6.7 Route Content Verification
1325
+
1326
+ After build, verify each route renders REAL content:
1327
+ - No placeholder text ("Lorem ipsum", "Coming soon", "TODO")
1328
+ - Financial figures match arc/05-investors and arc/06-model
1329
+ - Team/partner data matches tracker/STAKEHOLDERS.md
1330
+ - All `<Image>` src imports resolve — no broken images
1331
+
1332
+ ### 6.8 Phase 6 Rubric Gate
195
1333
 
196
1334
  ```
197
- ℹ️ HISTORY.md advisory
198
- places/<slug>/HISTORY.md may be required once prt_projects.project_type is known.
199
- Qualifying types: ranch · eco-hospitality · mixed · conservation · regenerative-agriculture · real-estate · development
200
- Excluded types: credit · water · tech · regenerative-model
201
- To scaffold now: pass --history on this run or re-run with it.
1335
+ PHASE 6 RUBRIC — <slug>
1336
+ | # | Check | Expected | Actual | Pass |
1337
+ |---|--------------------------------|---------------------------------------|--------|------|
1338
+ | 1 | apps/<slug>/ exists | Next.js App Router | ? | |
1339
+ | 2 | Routes match PRODUCT.md | all declared routes present | ? | |
1340
+ | 3 | Cross-file route consistency | 0 stale route refs in DESIGN/arc/report| ? | |
1341
+ | 4 | tsc --noEmit | exit 0 | ? | |
1342
+ | 5 | pnpm build | all routes built | ? | |
1343
+ | 6 | Route content verification | no placeholders, real arc content | ? | |
1344
+ | 7 | Financial figures match arc | 05/06 cited figures rendered on site | ? | |
1345
+ | 8 | Image imports resolve | no broken <Image> src | ? | |
1346
+ | 9 | HISTORY route | own route, sourced from HISTORY.md | ? | |
1347
+ | 10| PUBLISH.md + DEPLOY block | exists, port: registry | ? | |
1348
+ | 11| RegenOps screens | report present/missing (advisory) | ? | |
202
1349
  ```
203
1350
 
204
- If `--history` was passed: the scaffolder above already included the flag. Confirm in output.
1351
+ Append Phase 6 results to ONRAMP-REPORT.md + INTAKE-LOG.md.
205
1352
 
206
- ### 6. Report
1353
+ ---
207
1354
 
208
- Print the completed checklist (all rows checked), then a single verdict line:
1355
+ ## Phase 7: Deploy Dev Phase State + Epic Closure
209
1356
 
1357
+ ### 7.1 Registry Setup
1358
+
1359
+ ```sql
1360
+ -- 1. apps table (parent)
1361
+ INSERT INTO apps (slug, display_name, description, monorepo_path, github_org,
1362
+ github_repo, runtime, owner_slug, status, pnpm_filter) VALUES (...);
1363
+
1364
+ -- 2. app_deployments (child — FK on app_slug)
1365
+ -- Environment enum: 'dev' (NOT 'development')
1366
+ -- Port: query max(pm2_port) + 1 from app_deployments
1367
+ INSERT INTO app_deployments (app_slug, environment, host_type, url,
1368
+ pm2_name, pm2_port, branch, build_command, status) VALUES (...);
1369
+ ```
1370
+
1371
+ ### 7.2 Deploy to Vultr PM2
1372
+
1373
+ ```bash
1374
+ export CI=true
1375
+ git fetch -q origin develop && git reset -q --hard origin/develop
1376
+ pnpm --filter @regen/<slug> install --frozen-lockfile
1377
+ pnpm --filter @regen/<slug> build
1378
+ node scripts/generate-dev-configs.mjs --write # --write flag REQUIRED
1379
+ pm2 start /srv/regen/ecosystem.config.js --only <slug> # .js not .cjs
210
1380
  ```
211
- ✅ rdc:onramp — <slug> [<drift-state>]
212
1381
 
213
- DB spine: places.slug=<slug>
214
- project_nodes.slug=prtnode-<slug>
215
- project_node_id=<uuid>
216
- Epic: <work-item-id> (<new|reused>)
217
- Disk tree: places/<slug>/ (created=N skipped=M)
218
- _context.md: absent ✓
1382
+ ### 7.3 Verify + Phase State Advance
219
1383
 
220
- ─────────────────────────────────────────────
221
- NEXT ACTION RESEARCH PHASE:
222
- Paste corpus/_shared/onramp/STARTUP.md
223
- into a new claude.ai studio project
224
- (PROJECT NAME = <slug>) to begin research.
225
- ─────────────────────────────────────────────
1384
+ - `curl -s https://<slug>.dev.place.fund/` → HTTP 200 + correct `<title>`
1385
+ - All routes return 200
1386
+ - Content spot-check: financial figures match arc files
1387
+
1388
+ After successful deploy:
1389
+ ```sql
1390
+ UPDATE place_phase_state SET current_phase = 7, phase_name = 'Deploy Dev',
1391
+ gate_status = 'passed', updated_at = now()
1392
+ WHERE place_slug = '<slug>';
226
1393
  ```
227
1394
 
228
- Every file path and URL must be a clickable markdown hyperlink per [`.claude/rules/clickable-output.md`](file:///C:/Dev/regen-root/.claude/rules/clickable-output.md).
1395
+ ### 7.4 Epic Closure
1396
+
1397
+ - Submit implementation report with `codeflow_post` via `submit_implementation_report`
1398
+ - Tick all checklist items via `update_checklist_item`
1399
+ - Transition epic to `review` via `update_work_item_status`
1400
+ - Validator closes to `done`
1401
+
1402
+ ### 7.5 INTAKE-LOG.md Finalization
1403
+
1404
+ All 7 phase rows written with timestamps, operator, session ID.
229
1405
 
230
- ## Convergence Guarantee
1406
+ ### 7.6 Phase 7 Rubric Gate
231
1407
 
232
- Every step is idempotent. Re-running `rdc:onramp <slug>` for an already-enrolled place performs zero new writes and reports "already enrolled." It never duplicates a spine row, an epic, or a disk file.
1408
+ ```
1409
+ PHASE 7 RUBRIC — <slug>
1410
+ | # | Check | Expected | Actual | Pass |
1411
+ |---|--------------------------------|---------------------------------------|--------|------|
1412
+ | 1 | app_deployments row | exists with pm2_port allocated | ? | |
1413
+ | 2 | PM2 running | pm2 show <slug> = online | ? | |
1414
+ | 3 | HTTP 200 | <slug>.dev.place.fund returns 200 | ? | |
1415
+ | 4 | Content spot-check | title correct, figures match arc | ? | |
1416
+ | 5 | place_phase_state | advanced to phase 7, gate=passed | ? | |
1417
+ | 6 | Epic status | review or done | ? | |
1418
+ | 7 | Implementation report | submitted with codeflow_post | ? | |
1419
+ | 8 | INTAKE-LOG.md | all 7 phase rows present | ? | |
1420
+ | 9 | ONRAMP-REPORT.md | all 7 phase sections present | ? | |
1421
+ ```
1422
+
1423
+ Append Phase 7 results to ONRAMP-REPORT.md (final section).
1424
+
1425
+ ---
1426
+
1427
+ ## Resumability
1428
+
1429
+ | Phase | Skip condition |
1430
+ |-------|---------------|
1431
+ | 1 — Enrollment | DB row + disk tree + epic all exist + Phase 1 rubric gate all PASS (15 checks) |
1432
+ | 2 — Research | Phase 2 rubric gate all PASS (14 checks) + ONRAMP-REPORT.md Phase 2 section |
1433
+ | 2b — People/Org | STAKEHOLDERS.md >10 lines + unverified flagged in RECONCILIATION.md |
1434
+ | 3 — Conflicts | Phase 3 rubric gate all PASS (7 checks) + zero conflicted/unverified |
1435
+ | 4 — Brand | Phase 4 rubric gate all PASS (9 checks) + --<slug>-* tokens defined |
1436
+ | 5 — Score | Phase 5 rubric gate all PASS (6 checks) + composite ≥75 |
1437
+ | 6 — Build | Phase 6 rubric gate all PASS (10 checks) + tsc + build clean |
1438
+ | 7 — Deploy Dev | Phase 7 rubric gate all PASS (9 checks) + HTTP 200 + phase_state advanced |
1439
+
1440
+ ---
233
1441
 
234
1442
  ## Rules
235
1443
 
236
- - Validate `slug` and `--name` before any external call — reject invalid slugs immediately
237
- - `enroll_place` is the ONLY door for spine rows — never raw INSERT into `places`, `project_nodes`, or `project_places`
238
- - `insert_work_item` is the ONLY door for work items — never raw INSERT into `work_items`
239
- - `onramp-scaffold-place.mjs` is the ONLY door for the disk tree — never hand-write `places/<slug>/` files outside the script
240
- - Dup-guard the epic before insertingone analytics SELECT, never two insert calls
241
- - Assert `_context.md` ABSENT after scaffoldinghard stop if present
242
- - disk-ahead STOP, open reconciliation work item, never call `enroll_place` over an unknown disk tree
243
- - `--status` is always `enrolling` never exposed as a flag
244
- - Under `RDC_TEST=1`: arg validation + drift resolution run; all three external steps short-circuit
1444
+ - `enroll_place` is the ONLY door for spine rows
1445
+ - `insert_work_item` is the ONLY door for work items
1446
+ - `_context.md` must be ABSENT after scaffolding
1447
+ - disk-ahead STOP, never proceed
1448
+ - **Every incoming document MUST be read** no unread docs allowed past Phase 2
1449
+ - **Every financial number MUST cite its source document** no invented figures
1450
+ - **Palette MUST be derived from actual place imagery** no generic dark green
1451
+ - **Search for existing project imagery BEFORE generating AI images**
1452
+ - Source tiers: 0=Recorded legal, 1=Government, 2=Independent, 3=Project upload, 4=Stakeholder claim
1453
+ - Tier 4 claims tagged `(Illustrative)` on all public surfaces
1454
+ - Split infra (lockfile) and product commits — scope guard enforces this
1455
+ - Under `RDC_TEST=1`: DB writes, web searches, builds, and deploys short-circuit
245
1456
 
246
1457
  ## Capture Lessons
247
1458
 
248
- Before the final verdict, follow `.rdc/guides/lessons-learned-spec.md` § Capture procedure. If this run exposed a non-obvious gap — unexpected DB state, scaffolder behavior, drift edge case, RPC shape change — write one `.rdc/lessons/<YYYY-MM-DD>-onramp-<slug>.md`. Commit alongside the run's other commits. A run that taught nothing writes nothing.
1459
+ Before the final verdict, follow `.rdc/guides/lessons-learned-spec.md`. Write `.rdc/lessons/<YYYY-MM-DD>-onramp-<slug>.md` if the run taught something non-obvious.