@lifeaitools/rdc-skills 0.9.37 → 0.10.0

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",
3
- "version": "0.9.37",
3
+ "version": "0.9.38",
4
4
  "description": "RDC typed-agent dispatch skill suite for Claude Code — plan, build, review, overnight unattended builds with work-item tracking and TDD enforcement.",
5
5
  "author": {
6
6
  "name": "LIFEAI",
package/CHANGELOG.md CHANGED
@@ -7,6 +7,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ---
9
9
 
10
+ ## v0.9.38 — Clean-box npm install hardening
11
+
12
+ ### Fixed
13
+
14
+ - **Fresh Claude home install.** The installer now creates `CLAUDE_HOME` and `settings.json` when they do not exist, so a first-time machine is not blocked before Claude has written config files.
15
+ - **Public package portability.** Removed the most brittle user-machine paths from public skill docs and hooks, replacing them with `{PROJECT_ROOT}`, `{RDC_SKILLS_ROOT}`, or environment-derived paths.
16
+ - **Hook path fallback.** Commit hygiene hooks now use the current OS home directory instead of a user-specific fallback path.
17
+
18
+ ### Added
19
+
20
+ - **npm binaries.** `rdc-skills-install` and `rdc-skills-self-test` are exposed from the npm package for simpler clean-box installs.
21
+
22
+ ---
23
+
10
24
  ## v0.9.37 — RDC hook loop guard and behavior tests
11
25
 
12
26
  ### Fixed
@@ -55,7 +55,7 @@ rdc:deploy: <slug> → <domain>
55
55
  ```
56
56
  rdc:deploy new: <slug>
57
57
  [ ] Registry entry loaded (or interactive create)
58
- [ ] DNS path chosen (A: *.dev.place.fund B: apex C: other zone)
58
+ [ ] DNS path chosen (A: staging wildcard B: apex C: other zone)
59
59
  [ ] DNS record verified or wildcard confirmed
60
60
  [ ] Cloudflare proxy setting correct for DNS path
61
61
  [ ] server_uuid, project_uuid, environment_uuid, github_app_uuid resolved
@@ -103,7 +103,7 @@ rdc:deploy audit: fleet scan
103
103
  [ ] Env var drift (registry.env_vars_needed vs Coolify env)
104
104
  [ ] Branch mismatches (Coolify git_branch ≠ expected)
105
105
  [ ] Disk space on 64.237.54.189
106
- [ ] CF proxy misconfigs on *.dev.place.fund
106
+ [ ] DNS/proxy misconfigs on configured staging wildcard
107
107
  [ ] Duplicate apps (same repo, multiple UUIDs)
108
108
 
109
109
  Findings:
@@ -127,7 +127,7 @@ There is no Coolify MCP server — do not reference `@masonator/coolify-mcp`.
127
127
 
128
128
  ```bash
129
129
  _COOLIFY=$(curl -s http://127.0.0.1:52437/v/coolify-api)
130
- curl -s -H "Authorization: Bearer $_COOLIFY" https://deploy.regendevcorp.com/api/v1/applications
130
+ curl -s -H "Authorization: Bearer $_COOLIFY" "$DEPLOY_API_BASE/api/v1/applications"
131
131
  ```
132
132
 
133
133
  If clauth daemon is not responding:
@@ -143,7 +143,7 @@ BLOCKED: clauth daemon not responding. Run scripts\restart-clauth.bat, unlock at
143
143
  ```
144
144
  Server UUID: ih386anenvvvn6fy1umtyow0
145
145
  Server IP: 64.237.54.189
146
- Dashboard: https://deploy.regendevcorp.com
146
+ Dashboard: <deployment-dashboard-url>
147
147
  GitHub App UUID: xdmcy60putp5h9j7k4kwg9c3
148
148
  ```
149
149
 
@@ -15,7 +15,7 @@ Use `skills/design/SKILL.md` as the source of truth.
15
15
 
16
16
  - Studio, Palette Library, brand-token, theme, component, or live-editor work
17
17
  - Any design task that must understand RDC's real token tables and Studio routes
18
- - UI critique, audit, polish, colorize, type, layout, or craft work in `regen-root`
18
+ - UI critique, audit, polish, colorize, type, layout, or craft work in `{PROJECT_ROOT}`
19
19
  - Agent-side color-system exploration using Rampa CLI
20
20
 
21
21
  ## Arguments
@@ -30,13 +30,13 @@ description: >-
30
30
  **First action — set the overnight sentinel** so the `no-stop-open-epics` Stop hook engages (interactive sessions are not gated by it):
31
31
 
32
32
  ```bash
33
- mkdir -p C:/Dev/regen-root/.rdc && touch C:/Dev/regen-root/.rdc/overnight.lock
33
+ mkdir -p {PROJECT_ROOT}/.rdc && touch {PROJECT_ROOT}/.rdc/overnight.lock
34
34
  ```
35
35
 
36
36
  **Last action at end of run (success OR failure) — remove the sentinel:**
37
37
 
38
38
  ```bash
39
- rm -f C:/Dev/regen-root/.rdc/overnight.lock
39
+ rm -f {PROJECT_ROOT}/.rdc/overnight.lock
40
40
  ```
41
41
 
42
42
  If the sentinel file does not exist, the Stop hook will NOT block — which means interactive sessions stop freely and only `rdc:overnight` is held to the "drain the queue" contract.
@@ -1,159 +1,49 @@
1
1
  ---
2
- name: rdc:release
3
2
  description: >-
4
- Atomic release. Usage `rdc:release <repo> [version]` or `rdc:release <repo> --patch|--minor|--major` or `rdc:release <repo> --dry-run` — bump, commit, tag, push, wait CI, install, verify, restart. Known repos: clauth, rdc-skills, regen-media, gws. No user handoff.
3
+ Atomic release. Usage `rdc:release <repo> [version]` or `rdc:release <repo> --patch|--minor|--major|--dry-run` — bump, commit, tag, push, wait CI/publish, install, and verify. Uses repo-local release metadata.
5
4
  ---
6
5
 
6
+ # rdc:release — Generic Release
7
+
7
8
  > **⚠️ OUTPUT CONTRACT (READ FIRST):** `guides/output-contract.md`
8
- > Checklist-only output. No tool-call narration. No raw git/npm/CI dumps.
9
+ > Checklist-only output. No raw git/npm/CI dumps.
9
10
  > One checklist upfront, updated in place, shown again at end with 1-line verdict.
10
11
 
11
- > **Sandbox contract:** This skill honors `RDC_TEST=1` per `guides/agent-bootstrap.md` § RDC_TEST Sandbox Contract. Destructive external calls (git tag push, CI poll, npm publish verification, global install, daemon restart) short-circuit under the flag — the checklist still runs, but each destructive step echoes `[RDC_TEST] skipping <step>` instead of mutating external state.
12
-
13
- # rdc:release — Atomic LIFEAI Package Release
14
-
15
- ## Purpose
16
-
17
- Dave has Bash access. Therefore Dave should never be asked to run install
18
- commands. This skill handles the complete release loop for any LIFEAI-published
19
- package so the user sees one checklist and one verdict, not a series of "now run
20
- this" handoffs.
21
-
22
- ## Arguments
23
-
24
- - `rdc:release <repo>` — patch bump (default), full loop
25
- - `rdc:release <repo> <version>` — explicit version (e.g. `1.6.0`)
26
- - `rdc:release <repo> --minor` | `--major` | `--patch` — semver bump
27
- - `rdc:release <repo> --dry-run` — show checklist and planned version, do nothing
28
- - `rdc:release` (no args) — list known repos, ask which
29
-
30
- ## Known repos
31
-
32
- Resolve `<repo>` to source path + install mechanism:
33
-
34
- | Repo | Source path | Publish | Install | Post-install |
35
- |------|-------------|---------|---------|--------------|
36
- | `clauth` | `C:/Dev/clauth` | npm via tag → GitHub Actions | `npm install -g @lifeaitools/clauth@latest` | `curl -s -X POST http://127.0.0.1:52437/restart` |
37
- | `rdc-skills` | `C:/Dev/rdc-skills` | local (no npm) | `bash C:/Dev/rdc-skills/scripts/install.sh` + cp fallback | none |
38
- | `regen-media` | `C:/Dev/regen-root/mcp-servers/regen-media` | local | restart MCP server | none |
39
- | `gws` | `C:/Dev/regen-root/mcp-servers/gws` | local | restart MCP server | none |
40
-
41
- Add new repos to this table as they emerge. If user specifies an unknown repo,
42
- ask for the source path and install command.
43
-
44
- ## Checklist (run every mode)
12
+ ## Checklist
45
13
 
46
14
  ```
47
- rdc:release: <repo> vX.Y.Z vA.B.C
15
+ rdc:release: <repo> vX.Y.Z -> vA.B.C
48
16
  [ ] Source path resolved
49
- [ ] Working tree clean (git status)
50
- [ ] Current version detected (package.json)
17
+ [ ] Release metadata read
18
+ [ ] Working tree clean or user-approved dirty scope identified
19
+ [ ] Current version detected
51
20
  [ ] New version computed
52
- [ ] Dry-run gate (if --dry-run, stop here)
53
- [ ] package.json bumped (all version fields)
21
+ [ ] Dry-run gate handled
22
+ [ ] Version files updated
23
+ [ ] Tests/self-test passed
54
24
  [ ] Commit created
55
- [ ] Tag vA.B.C created
56
- [ ] Push to origin
57
- [ ] Push --tags to origin
58
- [ ] CI run located (gh run list, if applicable)
59
- [ ] CI completed successfully (poll every 20s, 10min timeout)
60
- [ ] npm registry shows vA.B.C (if npm package, poll every 15s, 3min timeout)
61
- [ ] Local install executed
62
- [ ] Installed version verified matches vA.B.C
63
- [ ] Post-install action (daemon restart, etc., if applicable)
64
- [ ] Smoke test (ping health endpoint or binary --version)
65
- ✅ rdc:release <repo>: vA.B.C live and installed
25
+ [ ] Tag created
26
+ [ ] Branch and tag pushed
27
+ [ ] CI/publish status verified
28
+ [ ] Registry/package/deploy target shows vA.B.C, if applicable
29
+ [ ] Local install/update executed, if applicable
30
+ [ ] Installed/runtime version verified
31
+ [ ] Smoke test passed
32
+ rdc:release <repo>: vA.B.C live and verified
66
33
  ```
67
34
 
68
- ## Execution details (silent to user — don't narrate)
35
+ ## Rules
69
36
 
70
- ### 1. Version bump
71
- - Read `package.json`, parse version
72
- - Apply bump: patch (default), minor, major, or explicit
73
- - Rewrite all `version` fields (some packages have version in `claude.version` too)
37
+ - Do not release without explicit user authorization.
38
+ - Prefer repo-local release instructions in `.rdc/release.json`, README, package scripts, or CI workflows.
39
+ - Never force push or bypass hooks.
40
+ - Never declare success without verifying the installed or deployed version.
74
41
 
75
- ### 2. Commit + tag + push
76
- ```bash
77
- cd <source_path>
78
- git add package.json
79
- git commit -m "chore(release): vA.B.C"
80
- if [ "$RDC_TEST" != "1" ]; then
81
- git tag vA.B.C
82
- git push && git push --tags
83
- else
84
- echo "[RDC_TEST] skipping git tag + git push --tags"
85
- fi
86
- ```
87
- Never `--no-verify`. Never `--force`. If pre-commit hook fails, fix root cause, don't skip.
42
+ ## RDC Skills Package
88
43
 
89
- *Under `$RDC_TEST=1`, sections 3 (CI poll), 4 (npm registry poll), 5 (install), 6 (verify install), 7 (post-install), and 8 (smoke test) are also skipped — echo `[RDC_TEST] skipping <section>` for each and mark the checklist line as `[~]`.*
44
+ After publishing this package to npm, a clean-box install should use:
90
45
 
91
- ### 3. CI poll (for repos with GH Actions publish)
92
46
  ```bash
93
- # Locate the run triggered by the tag push
94
- gh run list --repo LIFEAI/<repo> --limit 5 --json status,conclusion,headBranch,databaseId
95
- # Poll its status field every 20s until conclusion ∈ {success, failure, cancelled}
96
- # Max 10 minutes — if timeout, fail with [!] and report run URL
47
+ npm install -g @lifeaitools/rdc-skills@latest
48
+ rdc-skills-install --profile core
97
49
  ```
98
-
99
- ### 4. npm registry poll (only if published to npm)
100
- ```bash
101
- npm view @lifeaitools/<repo> version
102
- # Poll every 15s until matches new version
103
- # Max 3 minutes — usually lands within 30-60s after CI success
104
- ```
105
-
106
- ### 5. Install
107
- - **clauth:** `npm install -g @lifeaitools/clauth@latest`
108
- - **rdc-skills:** `bash C:/Dev/rdc-skills/scripts/install.sh` — if output shows only one file copied (known bug), fall back to `cp C:/Dev/rdc-skills/skills/*.md ~/.claude/skills/user/ && cp C:/Dev/rdc-skills/skills/*.md C:/Dev/regen-root/.claude/skills/user/`
109
- - **MCP servers:** restart the server process (find its PID, kill, respawn — or document how)
110
-
111
- ### 6. Verify install
112
- - **clauth:** `curl -s http://127.0.0.1:52437/ping | jq -r .app_version` — must equal new version
113
- - **rdc-skills:** `ls ~/.claude/skills/user/rdc-release.md` (or whichever file is new in this release) — must exist
114
- - **Global npm:** `npm list -g --depth=0 @lifeaitools/<repo>` — version matches
115
-
116
- ### 7. Post-install
117
- - **clauth:** `curl -s -X POST http://127.0.0.1:52437/restart` — wait 3s — ping again
118
- - Others: N/A
119
-
120
- ### 8. Smoke test
121
- - **clauth:** new tool roundtrip (e.g., `curl -s http://127.0.0.1:52437/get/openai | head -c 10` succeeds without error)
122
- - **rdc-skills:** load one new skill file and check frontmatter parses
123
- - **MCP:** server responds to `tools/list`
124
-
125
- ## Failure modes → checklist outcome
126
-
127
- | Failure | Marker | Next |
128
- |---------|--------|------|
129
- | Dirty working tree | `[!]` line 2 | Abort with one-sentence diff summary; ask user to commit or stash |
130
- | Pre-commit hook fails | `[!]` line 7 | Fix root cause, re-stage, retry (NEVER --no-verify) |
131
- | CI fails | `[!]` line 11 | Print run URL, tail 20 lines of failing job, ask user |
132
- | npm doesn't register | `[!]` line 12 | Print npm error, check if CI actually published (not a silent skip) |
133
- | Install script broken | `[!]` line 13 | Fall back to manual cp; note the installer bug as a task |
134
- | Version mismatch after install | `[!]` line 14 | Uninstall + clean install; if still wrong, likely cache issue |
135
- | Post-install restart fails | `[!]` line 15 | Print ping error; instruct user to run `scripts\restart-clauth.bat` manually |
136
-
137
- Even on failure, show the full checklist with `[!]` markers so user sees exactly
138
- where it stopped.
139
-
140
- ## Dry-run mode
141
-
142
- Prints the checklist + resolved version bump + every command that WOULD run, but
143
- executes nothing beyond reads. Use when user says "what would you do" or before
144
- risky major bumps.
145
-
146
- ## Never
147
-
148
- - Never release on behalf of the user without an explicit `rdc:release` invocation
149
- - Never skip CI verification ("it'll probably work" is how stale installs happen)
150
- - Never `--force` push, never `--no-verify`, never `--no-gpg-sign`
151
- - Never touch `main` — release tags go on the default branch the repo uses (`master` for clauth, rdc-skills)
152
- - Never declare success without verifying the installed version matches
153
-
154
- ## Related
155
-
156
- - `.claude/rules/clauth.md` — clauth release workflow source of truth
157
- - `feedback_version_bump_must_tag.md` (memory) — never bump without tagging
158
- - `feedback_clauth_ci.md` (memory) — CI publish pattern
159
- - `feedback_just_do_it.md` (memory) — don't hand commands to Dave; run them
@@ -29,7 +29,7 @@ description: >-
29
29
 
30
30
  1. **Run the linter:**
31
31
  ```bash
32
- node C:/Dev/rdc-skills/scripts/self-test.mjs
32
+ node {RDC_SKILLS_ROOT}/scripts/self-test.mjs
33
33
  ```
34
34
 
35
35
  2. **Interpret exit codes:**
package/commands/watch.md CHANGED
@@ -24,7 +24,7 @@ description: >-
24
24
  ```bash
25
25
  node ${CLAUDE_PLUGIN_ROOT}/scripts/watch-init.mjs
26
26
  ```
27
- (If `CLAUDE_PLUGIN_ROOT` is not set, resolve the plugin path from your invocation context. On Windows it's typically `C:/Dev/rdc-skills`.)
27
+ (If `CLAUDE_PLUGIN_ROOT` is not set, resolve the plugin path from your invocation context or the installed plugin cache.)
28
28
 
29
29
  2. **Parse the output.** The script prints `run_id`, `log_path`, `current`, `viewer`, and `open_hint`. Capture `log_path` and `viewer` for the rest of the session.
30
30
 
@@ -137,7 +137,7 @@ When `RDC_TEST=1` is set, the skill is running inside the Tier 2 sandbox harness
137
137
  **Bash pattern:**
138
138
  ```bash
139
139
  if [ "$RDC_TEST" != "1" ]; then
140
- curl -X POST "https://deploy.regendevcorp.com/api/v1/applications/$UUID/deploy" ...
140
+ curl -X POST "$DEPLOY_API_BASE/api/v1/applications/$UUID/deploy" ...
141
141
  else
142
142
  echo "[RDC_TEST] skipping Coolify deploy"
143
143
  fi
@@ -156,7 +156,7 @@ if (process.env.RDC_TEST !== '1') {
156
156
 
157
157
  **New-skill contract:** every new `rdc:*` skill MUST honor `RDC_TEST` before shipping. Tier 2 manifests will fail any skill that writes to external state under the flag.
158
158
 
159
- **Known blocker:** The `check-cwd.js` SessionStart hook hard-blocks Claude sessions launched from `C:/Dev/rdc-skills`. The hook must check `process.env.RDC_TEST === '1'` and call `process.exit(0)` early to allow Tier 2 sandbox runs. Without this bypass, all Tier 2 headless invocations fail with `exit_code: -1`. File: `~/.claude/hooks/check-cwd.js`.
159
+ **Known blocker:** Project-specific cwd hooks must check `process.env.RDC_TEST === '1'` and call `process.exit(0)` early to allow Tier 2 sandbox runs. Without this bypass, headless self-test invocations can fail before the skill loads. File: `~/.claude/hooks/check-cwd.js`.
160
160
 
161
161
  ---
162
162
 
@@ -0,0 +1,297 @@
1
+ ---
2
+ type: spec
3
+ role: history-md
4
+ systems: [place-fund, prt, plan]
5
+ schema_version: "1.0"
6
+ tags: [history-md, spec, rdc-skills, place-fund]
7
+ ---
8
+ # HISTORY.md — Authoritative Specification
9
+ > Version: 1.0 | Effective: 2026-05-22
10
+
11
+ Every land-based project in the Place Fund ecosystem that satisfies the trigger predicate below
12
+ MUST carry a `places/<prt_slug>/HISTORY.md` file in the regen-root monorepo.
13
+ Skills that plan, scaffold, and validate real-estate PRT projects read this file to verify
14
+ research provenance, lineage completeness, and research lifecycle status.
15
+
16
+ ---
17
+
18
+ ## Purpose
19
+
20
+ `HISTORY.md` is the **land lineage record** for a Place Fund project — the authoritative
21
+ document linking a `prt_projects` row to its physical, ecological, cultural, and regulatory
22
+ history. It is NOT a marketing document. It is a research-grade provenance record that:
23
+
24
+ - Provides due-diligence depth for regenerative land stewardship decisions
25
+ - Anchors the project's data to verifiable primary sources (county records, PLSS, BLM, state archives)
26
+ - Tracks research lifecycle from `draft` through `peer-reviewed` so consumers know what to trust
27
+ - Enables the Place Fund's ecological and conservation underwriting to be audited independently
28
+
29
+ A missing or stub `HISTORY.md` signals that research is pending. A `published` one signals
30
+ that the record has been reviewed and is fit for external use.
31
+
32
+ ---
33
+
34
+ ## Trigger Predicate
35
+
36
+ A `prt_projects` row **requires** a `places/<slug>/HISTORY.md` when ALL of:
37
+
38
+ 1. `project_type IN ('ranch','eco-hospitality','mixed','conservation','regenerative-agriculture','real-estate','development')`
39
+ 2. `name IS NOT NULL` (always true for active rows)
40
+ 3. AT LEAST ONE OF:
41
+ - `location_state IS NOT NULL`
42
+ - `location_city IS NOT NULL`
43
+ - `country IS NOT NULL`
44
+ - `total_acres IS NOT NULL`
45
+ - `lat IS NOT NULL`
46
+ - `EXISTS (SELECT 1 FROM geo_parcels WHERE project_id = prt_projects.id)`
47
+ - `EXISTS (SELECT 1 FROM geo_projects WHERE prt_project_id = prt_projects.id)` — a geo_projects join indicates real GIS data exists for this place, even if lat/lng on prt_projects is unset
48
+
49
+ **Excluded by default:** `project_type IN ('credit','water','tech','regenerative-model')` — these
50
+ are credit instruments or abstract models, not physical land parcels. Individual rows may be
51
+ opted in manually by a supervisor if a composite history is warranted.
52
+
53
+ As a SQL check (used by the validator):
54
+
55
+ ```sql
56
+ SELECT slug, name, project_type, location_state, location_city, country, total_acres, lat
57
+ FROM prt_projects
58
+ WHERE is_template IS NOT TRUE
59
+ AND project_type IN ('ranch','eco-hospitality','mixed','conservation',
60
+ 'regenerative-agriculture','real-estate','development')
61
+ AND (
62
+ location_state IS NOT NULL
63
+ OR location_city IS NOT NULL
64
+ OR country IS NOT NULL
65
+ OR total_acres IS NOT NULL
66
+ OR lat IS NOT NULL
67
+ OR EXISTS (SELECT 1 FROM geo_parcels WHERE project_id = prt_projects.id)
68
+ OR EXISTS (SELECT 1 FROM geo_projects WHERE prt_project_id = prt_projects.id)
69
+ )
70
+ ORDER BY slug;
71
+ ```
72
+
73
+ ---
74
+
75
+ ## Schema
76
+
77
+ ### Frontmatter Fields
78
+
79
+ Every `HISTORY.md` begins with YAML frontmatter bounded by `---` delimiters.
80
+
81
+ ```yaml
82
+ ---
83
+ schema_version: "1.0"
84
+ prt_slug: SLUG
85
+ project_type: ranch
86
+ location:
87
+ county: COUNTY
88
+ state: STATE
89
+ country: COUNTRY
90
+ parcel_apn: APN
91
+ area_acres: ACRES
92
+ centroid: [LAT, LNG]
93
+ acquired: "YYYY-MM-DD"
94
+ steward: STEWARD_NAME
95
+ research_status: draft
96
+ last_reviewed: "YYYY-MM-DD"
97
+ contributors: []
98
+ ---
99
+ ```
100
+
101
+ ### Field Reference
102
+
103
+ | Field | Type | Required | Notes |
104
+ |-------|------|----------|-------|
105
+ | `schema_version` | string | yes | Always `"1.0"` for this revision |
106
+ | `prt_slug` | string | yes | Must match `prt_projects.slug` exactly (case-sensitive) |
107
+ | `project_type` | string | yes | Echo from `prt_projects.project_type` |
108
+ | `location` | object | yes | Nested block — see sub-fields below |
109
+ | `location.county` | string | no | County or district name |
110
+ | `location.state` | string | no | State or province name or abbreviation |
111
+ | `location.country` | string | no | Country name; omit if USA |
112
+ | `location.parcel_apn` | string | no | Assessor's Parcel Number (APN) or equivalent |
113
+ | `location.area_acres` | number | no | Total acreage from authoritative source |
114
+ | `location.centroid` | [lat, lng] | no | Decimal-degree centroid coordinates |
115
+ | `acquired` | ISO date | no | Acquisition date (`YYYY-MM-DD`); omit if unknown |
116
+ | `steward` | string | yes | Current stewarding entity or person |
117
+ | `research_status` | enum | yes | One of: `draft` · `in-research` · `peer-reviewed` · `published` |
118
+ | `last_reviewed` | ISO date | yes | Date this file was last substantively reviewed |
119
+ | `contributors` | string[] | yes | Array of contributor identifiers (may be empty `[]`) |
120
+
121
+ #### `research_status` semantics
122
+
123
+ | Value | Meaning |
124
+ |-------|---------|
125
+ | `draft` | Stub created; no primary-source research yet |
126
+ | `in-research` | Active research underway; primary sources being identified |
127
+ | `peer-reviewed` | Research complete; reviewed by at least one secondary reviewer |
128
+ | `published` | Record approved for external publication and citation |
129
+
130
+ The validator will warn (not fail) on `draft` rows — they are expected during initial rollout.
131
+ The validator will fail if `research_status` is not one of the four allowed values.
132
+
133
+ ---
134
+
135
+ ## Required Body Sections
136
+
137
+ The body of `HISTORY.md` must contain all five section headings in order. Each section may
138
+ contain a TODO marker during draft status; it must contain substantive prose at `published`.
139
+
140
+ ### `## Land lineage`
141
+
142
+ Deep time through present ownership. Cover:
143
+ - Pre-contact landscape and ecological baseline
144
+ - Indigenous stewardship, use patterns, and territorial context
145
+ - Spanish/Mexican land grants (if applicable)
146
+ - US government survey and PLSS reference (township, range, section)
147
+ - Homestead entry, patent, and early title chain
148
+ - Major ownership transitions to present
149
+
150
+ ### `## Stewardship transitions`
151
+
152
+ Timeline of stewardship changes. Cover:
153
+ - Each major ownership or management transfer with approximate dates
154
+ - Conservation easements, deed restrictions, and encumbrances
155
+ - Use-change inflection points (e.g. dryland → irrigated, grazing → timber)
156
+ - Current stewardship entity and tenure
157
+
158
+ ### `## Ecological context`
159
+
160
+ Physical and biological baseline. Cover:
161
+ - Ecoregion and watershed affiliation
162
+ - Soil classifications (NRCS Web Soil Survey references)
163
+ - Vegetation communities and cover types
164
+ - Water resources (streams, springs, riparian areas, aquifer)
165
+ - Wildlife corridors and listed species presence/absence
166
+ - Fire history and disturbance regime
167
+
168
+ ### `## Cultural significance`
169
+
170
+ Human geography and intangible values. Cover:
171
+ - Indigenous place names and cultural associations (cite tribal consultation if any)
172
+ - Historic structures, archaeological sites, or cultural landscapes (Section 106 if applicable)
173
+ - Community significance — grazing allotments, water rights, access traditions
174
+ - Scenic and recreational values
175
+
176
+ ### `## Regulatory record`
177
+
178
+ Legal, regulatory, and administrative context. Cover:
179
+ - Zoning and land use designations
180
+ - Conservation easements held by land trusts (ACE, TNC, CLT, etc.)
181
+ - Water rights adjudications
182
+ - Federal and state permits (grazing permits, NEPA actions, ESA consultations)
183
+ - Tax status (agricultural classification, conservation land designation)
184
+ - Open title or lien issues of record
185
+
186
+ ---
187
+
188
+ ## File Location Convention
189
+
190
+ ```
191
+ C:/Dev/regen-root/places/<prt_slug>/HISTORY.md
192
+ ```
193
+
194
+ The directory is named using the **sanitized slug** — lowercase, no special characters,
195
+ hyphens for separators. If `prt_projects.slug` contains uppercase letters (e.g. `Diamond`),
196
+ the filesystem path uses `diamond/HISTORY.md` while `prt_slug` in frontmatter preserves
197
+ the exact DB value (`Diamond`).
198
+
199
+ ---
200
+
201
+ ## Enforcement Layers
202
+
203
+ ### Layer 1 — Workflow scaffold (`rdc:plan`)
204
+
205
+ When `rdc:plan` creates a new `prt_projects` row with a qualifying `project_type`, it reads
206
+ this spec and produces a stub `places/<slug>/HISTORY.md` from `scaffold/templates/HISTORY.md.template`.
207
+ The stub is committed alongside the epic creation commit so the file is never absent from day one.
208
+
209
+ ### Layer 2 — Validator script
210
+
211
+ `C:/Dev/rdc-skills/scripts/validate-place-histories.js` runs in two modes:
212
+
213
+ | Mode | Behavior | Exit code |
214
+ |------|----------|-----------|
215
+ | `--mode warn` (default) | Missing or malformed HISTORY.md emits WARN; exits 0 | 0 |
216
+ | `--mode fail` | Missing or malformed HISTORY.md emits FAIL; exits 1 | 1 |
217
+
218
+ The validator is wired into the `rdc-skills` `prepack` step (warn mode) so it runs on every
219
+ package publish and surfaces gaps without blocking.
220
+
221
+ ### Layer 3 — Optional DB gate (future)
222
+
223
+ A `history_md_status` column on `prt_projects` can mirror `research_status` from frontmatter
224
+ via a sync script. This enables Supabase-side filtering of projects by research completeness.
225
+ Not implemented in v1 — planned for a future epic.
226
+
227
+ ---
228
+
229
+ ## Consumer Integration
230
+
231
+ ### `rdc:plan`
232
+
233
+ When scaffolding a new real-estate PRT project:
234
+ 1. Check if `project_type` satisfies the trigger predicate.
235
+ 2. If yes: hydrate `HISTORY.md.template` with DB row metadata and write `places/<slug>/HISTORY.md`.
236
+ 3. Commit the stub alongside the epic creation commit.
237
+
238
+ ### `rdc:review` / `rdc:build`
239
+
240
+ When the build scope touches `apps/prt/`:
241
+ 1. Run `node C:/Dev/rdc-skills/scripts/validate-place-histories.js --mode warn`.
242
+ 2. Surface any WARN lines in the review output.
243
+ 3. Do not block on warn — block only on FAIL (malformed frontmatter).
244
+
245
+ ---
246
+
247
+ ## Example — Dos Pueblos Ranch (dp-phased-model)
248
+
249
+ ```markdown
250
+ ---
251
+ schema_version: "1.0"
252
+ prt_slug: dp-phased-model
253
+ project_type: ranch
254
+ location:
255
+ county: Santa Barbara
256
+ state: California
257
+ country:
258
+ parcel_apn:
259
+ area_acres:
260
+ centroid:
261
+ acquired:
262
+ steward: Dos Pueblos Ranch LLC
263
+ research_status: draft
264
+ last_reviewed: "2026-05-22"
265
+ contributors: []
266
+ ---
267
+
268
+ > This is a draft stub. Research pending. Status will be promoted to in-research once primary sources are identified.
269
+
270
+ ## Land lineage
271
+
272
+ TODO: Research land lineage of Dos Pueblos Ranch. Cover Chumash territory, Spanish rancho land grant (Rancho Dos Pueblos, c. 1842), Mexican land commission adjudication, US patent, and ownership chain to present.
273
+
274
+ ## Stewardship transitions
275
+
276
+ TODO: Document major ownership and use transitions for Dos Pueblos Ranch from rancho era through current orchid and agricultural operations.
277
+
278
+ ## Ecological context
279
+
280
+ TODO: Document ecoregion (Southern California Coast Ranges), chaparral and oak woodland communities, seasonal streams, and proximity to coastal wetlands.
281
+
282
+ ## Cultural significance
283
+
284
+ TODO: Research Chumash place names and village associations. Note proximity to historic Chumash settlements along the Santa Barbara coast.
285
+
286
+ ## Regulatory record
287
+
288
+ TODO: Document zoning (Santa Barbara County agricultural/rural zones), any conservation easements, and water rights in Goleta Water District service area.
289
+ ```
290
+
291
+ ---
292
+
293
+ ## Changelog
294
+
295
+ | Version | Date | Change |
296
+ |---------|------|--------|
297
+ | 1.0 | 2026-05-22 | Initial spec — trigger predicate, schema, 5 required sections, 3-layer enforcement |