create-claude-rails 0.1.2 → 0.3.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.
Files changed (37) hide show
  1. package/README.md +3 -3
  2. package/lib/cli.js +103 -17
  3. package/lib/copy.js +16 -2
  4. package/lib/metadata.js +3 -2
  5. package/lib/reset.js +193 -0
  6. package/package.json +1 -1
  7. package/templates/EXTENSIONS.md +32 -32
  8. package/templates/README.md +3 -3
  9. package/templates/skills/{upgrade → cor-upgrade}/SKILL.md +23 -23
  10. package/templates/skills/{upgrade → cor-upgrade}/phases/apply.md +3 -3
  11. package/templates/skills/{upgrade → cor-upgrade}/phases/detect-current.md +14 -14
  12. package/templates/skills/{upgrade → cor-upgrade}/phases/diff-upstream.md +3 -3
  13. package/templates/skills/extract/SKILL.md +168 -0
  14. package/templates/skills/link/SKILL.md +52 -0
  15. package/templates/skills/onboard/SKILL.md +55 -22
  16. package/templates/skills/onboard/phases/detect-state.md +21 -39
  17. package/templates/skills/onboard/phases/generate-context.md +1 -1
  18. package/templates/skills/onboard/phases/interview.md +86 -72
  19. package/templates/skills/onboard/phases/modularity-menu.md +21 -18
  20. package/templates/skills/onboard/phases/options.md +98 -0
  21. package/templates/skills/onboard/phases/post-onboard-audit.md +20 -2
  22. package/templates/skills/onboard/phases/summary.md +1 -1
  23. package/templates/skills/onboard/phases/work-tracking.md +231 -0
  24. package/templates/skills/perspectives/_groups-template.yaml +1 -1
  25. package/templates/skills/perspectives/architecture/SKILL.md +275 -0
  26. package/templates/skills/perspectives/box-health/SKILL.md +8 -8
  27. package/templates/skills/perspectives/data-integrity/SKILL.md +2 -2
  28. package/templates/skills/perspectives/documentation/SKILL.md +4 -5
  29. package/templates/skills/perspectives/historian/SKILL.md +250 -0
  30. package/templates/skills/perspectives/process/SKILL.md +3 -3
  31. package/templates/skills/perspectives/skills-coverage/SKILL.md +294 -0
  32. package/templates/skills/perspectives/system-advocate/SKILL.md +191 -0
  33. package/templates/skills/perspectives/usability/SKILL.md +186 -0
  34. package/templates/skills/publish/SKILL.md +72 -0
  35. package/templates/skills/seed/phases/scan-signals.md +7 -3
  36. package/templates/skills/unlink/SKILL.md +35 -0
  37. /package/templates/skills/{upgrade → cor-upgrade}/phases/merge.md +0 -0
@@ -1,15 +1,15 @@
1
- # Extension Examples: How Flow Uses Process-in-a-Box
1
+ # Extension Examples: How Flow Uses Claude on Rails
2
2
 
3
- PIB gives you skeletons. Your project fills them in via phase files —
3
+ Claude on Rails (CoR) gives you skeletons. Your project fills them in via phase files —
4
4
  replacing defaults with project-specific behavior, adding custom phases
5
5
  the skeleton doesn't define. This document shows what that looks like
6
- in practice, using Flow (PIB's reference implementation) as the example.
6
+ in practice, using Flow (CoR's reference implementation) as the example.
7
7
 
8
8
  Flow is a cognitive workspace built on Claude Code — a GTD system,
9
9
  research thread manager, and course management tool. It has a deployed
10
10
  web app (Railway), a local SQLite cache, research threads, an inbox
11
11
  pipeline, and 25+ skills. It's what happens when a project grows past
12
- PIB's defaults while staying on PIB's rails.
12
+ CoR's defaults while staying on CoR's rails.
13
13
 
14
14
  You and Claude will make different choices for your project. These
15
15
  examples show what choices Flow made and why — not what you should do,
@@ -18,22 +18,22 @@ but what's possible.
18
18
 
19
19
  ## Flow's Phase File Overrides by Skill
20
20
 
21
- For each skeleton skill, the tables show: which PIB phase files Flow
21
+ For each skeleton skill, the tables show: which CoR phase files Flow
22
22
  overrides (replacing default behavior with Flow-specific content), and
23
- which custom phase files Flow adds (concerns PIB doesn't define).
23
+ which custom phase files Flow adds (concerns CoR doesn't define).
24
24
 
25
- Phase file states: **default** = PIB's behavior is fine, no override
25
+ Phase file states: **default** = CoR's behavior is fine, no override
26
26
  needed. **override** = Flow writes its own content. **custom** = Flow
27
- adds a phase PIB doesn't have. **skip** = Flow actively opts out.
27
+ adds a phase CoR doesn't have. **skip** = Flow actively opts out.
28
28
 
29
29
  ### orient
30
30
 
31
- PIB's orient skeleton loads context, syncs data, scans work, checks
31
+ CoR's orient skeleton loads context, syncs data, scans work, checks
32
32
  health, and presents a briefing. Flow's orient is its most complex
33
33
  skill — 47 steps managing a deployed app, research threads, an inbox
34
34
  pipeline, and multiple always-on perspectives.
35
35
 
36
- | Phase | PIB Default | Flow Override |
36
+ | Phase | CoR Default | Flow Override |
37
37
  |---|---|---|
38
38
  | `context.md` | Read status files | `system-status.md`, 7 research threads (`thread.yaml` + `CLAUDE.md`), `MEMORY.md` index, active course syllabi |
39
39
  | `data-sync.md` | Skip | DB pull from Railway (`sync-db-to-railway.sh --pull`). Report failure but don't block. |
@@ -60,12 +60,12 @@ custom phases as concerns emerge.
60
60
 
61
61
  ### debrief
62
62
 
63
- PIB's debrief skeleton inventories work, closes items, updates state,
63
+ CoR's debrief skeleton inventories work, closes items, updates state,
64
64
  records lessons, and captures loose ends. Flow's debrief is the second
65
65
  most complex skill — it resolves feedback comments, runs prep scout and
66
66
  articulation sweeps, checks machine-level drift, and enforces QA gates.
67
67
 
68
- | Phase | PIB Default | Flow Override |
68
+ | Phase | CoR Default | Flow Override |
69
69
  |---|---|---|
70
70
  | `inventory.md` | Scan git log + conversation | Same approach, plus check for uncommitted work, unresolved preview tool sessions |
71
71
  | `close-work.md` | Match session work against pib-db actions | Match against Railway API actions. QA perspective gate: actions can't be marked complete if QA report shows failures. Project auto-completion scan. |
@@ -86,16 +86,16 @@ articulation sweeps, checks machine-level drift, and enforces QA gates.
86
86
  | `project-completion.md` | Check if any projects have all actions completed, prompt for project close |
87
87
 
88
88
  **Key pattern:** Flow's debrief has *mandatory perspectives* — historian
89
- and life-tracker always activate. In PIB's skeleton, perspectives are
89
+ and life-tracker always activate. In CoR's skeleton, perspectives are
90
90
  optional (the `perspectives.md` phase can be empty). Flow overrides this
91
91
  by listing required perspectives in its close-work and loose-ends phases.
92
92
 
93
93
  ### validate
94
94
 
95
- PIB's validate skeleton runs validators from a single phase file. Flow
95
+ CoR's validate skeleton runs validators from a single phase file. Flow
96
96
  overrides with 8 specific validators.
97
97
 
98
- | Phase | PIB Default | Flow Override |
98
+ | Phase | CoR Default | Flow Override |
99
99
  |---|---|---|
100
100
  | `validators.md` | Commented-out examples | 8 validators: fid coverage (`validate-fids.sh`), thread structure (`validate-threads.sh`), folder integrity (`validate-folders.sh`), MEMORY.md references, TypeScript (`npx tsc --noEmit`), Vite build (`npx vite build`), ESLint (`npx eslint`), Mantine import check |
101
101
 
@@ -104,11 +104,11 @@ does the job. Flow just fills in its specific checks.
104
104
 
105
105
  ### plan
106
106
 
107
- PIB's plan skeleton researches, checks overlap, drafts with template,
107
+ CoR's plan skeleton researches, checks overlap, drafts with template,
108
108
  runs perspective critique, checks completeness, presents, and files work.
109
109
  Flow's plan adds a design committee pattern and specific work tracking.
110
110
 
111
- | Phase | PIB Default | Flow Override |
111
+ | Phase | CoR Default | Flow Override |
112
112
  |---|---|---|
113
113
  | `research.md` | Explore codebase | Same, plus check ecosystem memory (`reference-skill-ecosystem.md`) for prior art |
114
114
  | `overlap-check.md` | Query pib-db | Query Railway DB via sqlite3 on local cache. Check open actions + recent completed. |
@@ -126,11 +126,11 @@ Flow's plan adds a design committee pattern and specific work tracking.
126
126
 
127
127
  ### execute
128
128
 
129
- PIB's execute skeleton loads the plan, activates perspectives, implements
129
+ CoR's execute skeleton loads the plan, activates perspectives, implements
130
130
  with checkpoints, validates, and commits. Flow adds QA enforcement and
131
131
  design mock verification.
132
132
 
133
- | Phase | PIB Default | Flow Override |
133
+ | Phase | CoR Default | Flow Override |
134
134
  |---|---|---|
135
135
  | `load-plan.md` | Read plan from conversation or file | Same, plus check for design mocks in action notes (`mock_path`) and `.claude/mocks/` |
136
136
  | `perspectives.md` | Activate relevant perspectives | QA always-on. Boundary-conditions always-on. Others per plan's surface area. |
@@ -141,15 +141,15 @@ design mock verification.
141
141
  **Key pattern:** Flow's execute enforces a QA gate — the QA perspective
142
142
  produces a verification report at checkpoint 3, and debrief won't mark
143
143
  actions complete if QA shows failures. This is the "mandatory perspective"
144
- pattern: a perspective that's advisory in PIB becomes load-bearing in Flow.
144
+ pattern: a perspective that's advisory in CoR becomes load-bearing in Flow.
145
145
 
146
146
  ### audit
147
147
 
148
- PIB's audit skeleton selects perspectives, runs structural checks, loads
148
+ CoR's audit skeleton selects perspectives, runs structural checks, loads
149
149
  triage suppression, spawns perspective agents, and persists findings.
150
150
  Flow overrides the data layer and execution model.
151
151
 
152
- | Phase | PIB Default | Flow Override |
152
+ | Phase | CoR Default | Flow Override |
153
153
  |---|---|---|
154
154
  | `perspective-selection.md` | Discover from SKILL.md files, use groups | Same discovery, but 21 additional domain perspectives available |
155
155
  | `structural-checks.md` | Run fast structural scripts | Same validators as `/validate`, run before LLM analysis |
@@ -164,19 +164,19 @@ Flow overrides the data layer and execution model.
164
164
  | `triage.md` | Programmatic triage of findings via Railway API PATCH endpoint (approve/reject/defer) |
165
165
  | `next-steps.md` | Offer quick-fix, /plan, or bulk triage based on findings after output |
166
166
 
167
- **Why nested agents instead of subprocesses:** PIB's default uses
167
+ **Why nested agents instead of subprocesses:** CoR's default uses
168
168
  `claude --print` for parallel perspective execution. Flow found that
169
169
  subprocess spawning creates API concurrency errors during active
170
170
  sessions. Nested Agent tool calls avoid this. A project without this
171
- constraint can use PIB's subprocess default.
171
+ constraint can use CoR's subprocess default.
172
172
 
173
173
  ### pulse
174
174
 
175
- PIB's pulse skeleton checks self-description accuracy, spots dead
175
+ CoR's pulse skeleton checks self-description accuracy, spots dead
176
176
  references, and detects staleness. Flow overrides with extensive
177
177
  count verification and principle practice checks.
178
178
 
179
- | Phase | PIB Default | Flow Override |
179
+ | Phase | CoR Default | Flow Override |
180
180
  |---|---|---|
181
181
  | `checks.md` | Count freshness, dead references | Count freshness across 3 files (`project-skills-infrastructure.md`, `system-status.md`, `_context.md`). Dead reference spot-check with rotation tracking (`pulse-state.json`). Skill staleness (last-verified > 30d). Rules enforcement health. Session drift detection. Principle spot-check (samples different principle each run). Memory index auto-fix. |
182
182
  | `auto-fix-scope.md` | Closed list of safe fixes | Same closed list: numeric counts, MEMORY.md filenames, system-status moves, `_context.md` perspective lists, last-verified dates |
@@ -190,10 +190,10 @@ project could adopt.
190
190
 
191
191
  ### triage-audit
192
192
 
193
- PIB's triage skeleton loads findings, presents via UI, and applies
193
+ CoR's triage skeleton loads findings, presents via UI, and applies
194
194
  verdicts. Flow overrides the data source and verdict application.
195
195
 
196
- | Phase | PIB Default | Flow Override |
196
+ | Phase | CoR Default | Flow Override |
197
197
  |---|---|---|
198
198
  | `load-findings.md` | Query pib-db or read JSON files | Fetch from Railway DB via API with severity + perspective ordering |
199
199
  | `triage-ui.md` | Start local `triage-server.mjs`, open browser | Same local server, but opened via Chrome MCP tool for reading verdicts |
@@ -218,7 +218,7 @@ project could implement for its own domain.
218
218
  | Change-type deployment | `/deploy` | Classifies changes (markdown-only, code, mixed), takes appropriate deploy path (git push vs git push + platform deploy), verifies | Any project with multiple deployment paths depending on what changed. The classify-deploy-verify loop is the pattern. |
219
219
  | Area health review | `/quarterly-review` | SQL-driven area-by-area walkthrough: stale actions, recurring cadence health, person context freshness, open loops, supply patterns | Any project with areas of responsibility benefits from periodic health queries. The SQL query templates are reusable. |
220
220
 
221
- These are future extraction candidates. If PIB grows beyond Wave 6, the
221
+ These are future extraction candidates. If CoR grows beyond Wave 6, the
222
222
  highest-value patterns to skeleton would be: entity scaffolding (widely
223
223
  applicable), prompt refinement (universal for Claude Code projects), and
224
224
  command queue processing (needed by any project with an async work queue).
@@ -226,7 +226,7 @@ command queue processing (needed by any project with an async work queue).
226
226
 
227
227
  ## Writing Domain-Specific Perspectives
228
228
 
229
- PIB ships 14 generic perspectives. Flow has 19 additional domain-specific
229
+ CoR ships 14 generic perspectives. Flow has 19 additional domain-specific
230
230
  perspectives. Here are three examples showing how to write your own.
231
231
 
232
232
  ### Example 1: GTD (encoding domain expertise)
@@ -305,7 +305,7 @@ Eight skills contained reusable patterns (documented in the table above).
305
305
  The full analysis is in the methodology essay's Wave 6 findings section.
306
306
 
307
307
  These are patterns, not extraction candidates — yet. The patterns are
308
- documented here so PIB users know what's possible. If your project needs
308
+ documented here so CoR users know what's possible. If your project needs
309
309
  entity scaffolding or prompt refinement, you'll write your own version.
310
- If PIB grows a Wave 7, the strongest candidates for skeleton extraction
310
+ If CoR grows a Wave 7, the strongest candidates for skeleton extraction
311
311
  are scaffold, refine-prompts, and handle-findings.
@@ -59,7 +59,7 @@ adoption is straightforward: copy what you need into your project's
59
59
  | `skills/triage-audit/SKILL.md` | 5 | **Triage skeleton.** Load findings, prepare commentary, present via local web UI or CLI, apply verdicts (fix/defer/reject), create actions for approved findings. 3 phase files. |
60
60
  | `skills/onboard/SKILL.md` | 7 | **Onboarding skeleton.** Conversational interview that generates the initial context layer. Re-runnable: first run generates, subsequent runs refine. 6 phase files. |
61
61
  | `skills/seed/SKILL.md` | 7 | **Capability seeding skeleton.** Detects technology adoption signals, proposes expertise conversations, builds and maintains perspectives collaboratively. 4 phase files. |
62
- | `skills/upgrade/SKILL.md` | 7 | **Upgrade skeleton.** Conversational merge when new PIB skeletons arrive. Intelligence is the merge strategy — conversation, not mechanical copy. 4 phase files. |
62
+ | `skills/cor-upgrade/SKILL.md` | 7 | **Upgrade skeleton.** Conversational merge when new CoR skeletons arrive. Intelligence is the merge strategy — conversation, not mechanical copy. 4 phase files. |
63
63
 
64
64
  ### Scripts (6)
65
65
 
@@ -106,7 +106,7 @@ execution, audit). Each is a named domain expert encoded in markdown.
106
106
 
107
107
  | Perspective | Domain | Activation |
108
108
  |------------|--------|-----------|
109
- | `box-health` | PIB adoption health, phase file coverage, configuration drift, anti-bloat | Always-on during audit |
109
+ | `box-health` | CoR adoption health, phase file coverage, configuration drift, anti-bloat | Always-on during audit |
110
110
 
111
111
  **Infrastructure files (7):**
112
112
 
@@ -395,7 +395,7 @@ There is no `box.yaml` or template engine. Configuration uses two mechanisms:
395
395
  (GTD expertise, Mantine quality, sync health, etc.). EXTENSIONS.md
396
396
  includes examples showing how to write your own domain perspectives.
397
397
  - **Distribution mechanism** — No npm package, no installer. Copy files.
398
- The `/onboard` skill guides adoption. The `/upgrade` skill handles updates.
398
+ The `/onboard` skill guides adoption. The `/cor-upgrade` skill handles updates.
399
399
 
400
400
  ## Relationship to Flow
401
401
 
@@ -1,27 +1,27 @@
1
1
  ---
2
- name: upgrade
2
+ name: cor-upgrade
3
3
  description: |
4
- Conversational upgrade when new PIB skeletons arrive. Detects current
4
+ Conversational upgrade when new Claude on Rails skeletons arrive. Detects current
5
5
  adoption state, diffs against upstream, and for each change walks through
6
6
  an intelligent merge — conversation not mechanical copy. Intelligence is
7
- the merge strategy. Use when: "upgrade", "update PIB", "new skeletons",
8
- "/upgrade".
7
+ the merge strategy. Use when: "cor-upgrade", "update CoR", "new skeletons",
8
+ "/cor-upgrade".
9
9
  related:
10
10
  - type: file
11
- path: .claude/skills/upgrade/phases/detect-current.md
11
+ path: .claude/skills/cor-upgrade/phases/detect-current.md
12
12
  role: "Inventory current adoption state"
13
13
  - type: file
14
- path: .claude/skills/upgrade/phases/diff-upstream.md
15
- role: "Semantic diff against upstream PIB"
14
+ path: .claude/skills/cor-upgrade/phases/diff-upstream.md
15
+ role: "Semantic diff against upstream CoR"
16
16
  - type: file
17
- path: .claude/skills/upgrade/phases/merge.md
17
+ path: .claude/skills/cor-upgrade/phases/merge.md
18
18
  role: "Intelligent merge strategy — the core of the skill"
19
19
  - type: file
20
- path: .claude/skills/upgrade/phases/apply.md
20
+ path: .claude/skills/cor-upgrade/phases/apply.md
21
21
  role: "Apply approved changes"
22
22
  ---
23
23
 
24
- # /upgrade — Conversational PIB Upgrade
24
+ # /cor-upgrade — Conversational Claude on Rails Upgrade
25
25
 
26
26
  ## Purpose
27
27
 
@@ -34,7 +34,7 @@ nothing breaks. The upgrade path is mechanical — diff, patch, pray. This
34
34
  works for code because code has precise semantics. It fails for process
35
35
  because process is always adapted to context.
36
36
 
37
- AI-native methodology distributes as conversation. The upstream PIB
37
+ AI-native methodology distributes as conversation. The upstream CoR
38
38
  package publishes new skeletons, updated defaults, additional perspectives,
39
39
  schema migrations. But the project has already adapted those skeletons —
40
40
  customized phase files, tuned perspectives, extended workflows. A
@@ -76,7 +76,7 @@ update, but phase files are NEVER overwritten by upstream changes.**
76
76
 
77
77
  Skeleton files (SKILL.md) contain the generic orchestration — the workflow
78
78
  steps, the phase protocol, the default behaviors. These are authored by
79
- PIB and may improve over time. When upstream publishes a better skeleton,
79
+ CoR and may improve over time. When upstream publishes a better skeleton,
80
80
  the upgrade skill can propose replacing it.
81
81
 
82
82
  Phase files contain the project's customizations — what specific files to
@@ -95,13 +95,13 @@ between the two.
95
95
  ### 1. Detect Current State
96
96
 
97
97
  Read `phases/detect-current.md` for how to inventory the project's
98
- current PIB adoption.
98
+ current CoR adoption.
99
99
 
100
- **Default (absent/empty):** Scan the project for PIB artifacts:
101
- - For each skill in `.claude/skills/`: is it a PIB skeleton? Which
100
+ **Default (absent/empty):** Scan the project for CoR artifacts:
101
+ - For each skill in `.claude/skills/`: is it a CoR skeleton? Which
102
102
  phase files are customized vs using defaults vs explicitly skipped?
103
103
  - Which perspectives are adopted? Which groups configured?
104
- - What hooks are installed from PIB?
104
+ - What hooks are installed from CoR?
105
105
  - What pib-db schema version is in use (check for known columns)?
106
106
  - What's in `memory/patterns/`?
107
107
 
@@ -111,7 +111,7 @@ the diff phase.
111
111
  ### 2. Diff Against Upstream
112
112
 
113
113
  Read `phases/diff-upstream.md` for how to compare the project's state
114
- against the upstream PIB package.
114
+ against the upstream CoR package.
115
115
 
116
116
  **Default (absent/empty):** Look for `.pib-upstream/` in the project
117
117
  root (staged by `npx create-claude-rails upgrade`). For each
@@ -209,15 +209,15 @@ the workflow. Execute them at their declared position.
209
209
  ## Proactive Trigger
210
210
 
211
211
  The upgrade skill doesn't have to wait for the user to invoke it.
212
- Orient can detect when upstream PIB files are newer than the project's
213
- adopted copies and surface "PIB updates available" in the briefing.
214
- This is a hint, not a blocker — the user decides when to run /upgrade.
212
+ Orient can detect when upstream CoR files are newer than the project's
213
+ adopted copies and surface "CoR updates available" in the briefing.
214
+ This is a hint, not a blocker — the user decides when to run /cor-upgrade.
215
215
 
216
216
  To enable this, a project's orient `phases/health-checks.md` or a
217
217
  custom orient phase can compare modification times between upstream
218
218
  skeleton SKILL.md files and their adopted counterparts. When drift is
219
219
  detected, orient mentions it. When the user is ready, they invoke
220
- /upgrade and the full conversational merge begins.
220
+ /cor-upgrade and the full conversational merge begins.
221
221
 
222
222
  ## Extending
223
223
 
@@ -242,7 +242,7 @@ that erase hard-won customizations.
242
242
 
243
243
  ### Without Skill (Bad)
244
244
 
245
- New PIB skeletons arrive. The user manually diffs files, trying to
245
+ New CoR skeletons arrive. The user manually diffs files, trying to
246
246
  figure out what changed. Some changes are obvious — a new skill directory
247
247
  appeared. Others are subtle — a default behavior in an existing skeleton
248
248
  shifted. The user copies files they think are updated, accidentally
@@ -253,7 +253,7 @@ spent two sessions tuning is gone, replaced by the upstream default.
253
253
 
254
254
  ### With Skill (Good)
255
255
 
256
- New PIB skeletons arrive. The user runs `/upgrade`. Claude inventories
256
+ New CoR skeletons arrive. The user runs `/cor-upgrade`. Claude inventories
257
257
  what's adopted, diffs against upstream, and walks through each change:
258
258
  "The orient skeleton added a calendar-check phase. Your project doesn't
259
259
  have calendar integration, so this would be a no-op — skip it for now?"
@@ -71,9 +71,9 @@ Commit after each logical group of changes:
71
71
  skeleton changes)
72
72
 
73
73
  Commit messages should describe what was upgraded:
74
- "Upgrade orient + debrief skeletons from upstream PIB"
75
- "Add trigger_condition column (PIB schema migration)"
76
- "Adopt /validate skill from PIB"
74
+ "Upgrade orient + debrief skeletons from upstream CoR"
75
+ "Add trigger_condition column (CoR schema migration)"
76
+ "Adopt /validate skill from CoR"
77
77
 
78
78
  ## Summary
79
79
 
@@ -1,19 +1,19 @@
1
- # Detect Current — Inventory PIB Adoption State
1
+ # Detect Current — Inventory Claude on Rails Adoption State
2
2
 
3
- Build a structured manifest of the project's current PIB adoption. This
3
+ Build a structured manifest of the project's current CoR adoption. This
4
4
  manifest is consumed by the diff-upstream phase to determine what has
5
5
  changed.
6
6
 
7
7
  When this file is absent or empty, the default behavior is: read
8
- `.pibrc.json` for version and module metadata, then scan the project's
9
- `.claude/skills/`, perspectives, hooks, and database for PIB artifacts.
8
+ `.corrc.json` for version and module metadata, then scan the project's
9
+ `.claude/skills/`, perspectives, hooks, and database for CoR artifacts.
10
10
  To explicitly skip detection, write only `skip: true`.
11
11
 
12
12
  ## What to Inventory
13
13
 
14
- ### Package Metadata (.pibrc.json)
14
+ ### Package Metadata (.corrc.json)
15
15
 
16
- Read `.pibrc.json` from the project root. This file is written by the
16
+ Read `.corrc.json` from the project root. This file is written by the
17
17
  CLI installer (`npx create-claude-rails`) and contains:
18
18
 
19
19
  - **`version`** — the installed package version (for diff-upstream comparison)
@@ -22,7 +22,7 @@ CLI installer (`npx create-claude-rails`) and contains:
22
22
  - **`skipped`** — modules the user opted out of, with reasons
23
23
  - **`upstreamPackage`** — the npm package name (`create-claude-rails`)
24
24
 
25
- If `.pibrc.json` is missing, this is either a pre-npm adoption or a
25
+ If `.corrc.json` is missing, this is either a pre-npm adoption or a
26
26
  manual install. Note this in the manifest — the diff-upstream phase
27
27
  needs to know whether version comparison is possible or if it must fall
28
28
  back to pure filesystem diffing.
@@ -30,9 +30,9 @@ back to pure filesystem diffing.
30
30
  ### Skills
31
31
 
32
32
  For each directory in `.claude/skills/`:
33
- - **Is it a PIB skeleton?** Compare the SKILL.md against the upstream
33
+ - **Is it a CoR skeleton?** Compare the SKILL.md against the upstream
34
34
  upstream templates directory. If it matches a known skeleton
35
- (by name or by frontmatter `name` field), it's a PIB skill.
35
+ (by name or by frontmatter `name` field), it's a CoR skill.
36
36
  - **Phase file status:** For each phase file the skeleton defines, check
37
37
  whether the project's copy is: absent (using default), empty (using
38
38
  default), contains `skip: true` (opted out), or contains custom content
@@ -49,13 +49,13 @@ For each directory in `.claude/skills/`:
49
49
  ### Hooks
50
50
 
51
51
  - Read `.claude/settings.json` (or `.claude/settings.local.json`).
52
- - Identify which hooks were installed as part of PIB adoption vs
52
+ - Identify which hooks were installed as part of CoR adoption vs
53
53
  project-specific additions.
54
54
 
55
55
  ### Database Schema
56
56
 
57
57
  - If the project uses `pib-db`, check the actual DB schema against
58
- known PIB columns. Record which tables and columns exist.
58
+ known CoR columns. Record which tables and columns exist.
59
59
  - Note the effective schema version (inferred from which columns are
60
60
  present, not from a version number).
61
61
 
@@ -68,9 +68,9 @@ For each directory in `.claude/skills/`:
68
68
  ## Output Format
69
69
 
70
70
  Produce a structured manifest (in conversation, not a file) listing:
71
- - **Package version** from `.pibrc.json` (or "unknown — no .pibrc.json")
72
- - **Installed modules** from `.pibrc.json` modules map
73
- - **Skipped modules** with reasons from `.pibrc.json` skipped map
71
+ - **Package version** from `.corrc.json` (or "unknown — no .corrc.json")
72
+ - **Installed modules** from `.corrc.json` modules map
73
+ - **Skipped modules** with reasons from `.corrc.json` skipped map
74
74
  - Each adopted skill with its phase file statuses
75
75
  - Each adopted perspective group with member count
76
76
  - Hook count and types
@@ -1,7 +1,7 @@
1
- # Diff Upstream — Compare Project Against PIB Package
1
+ # Diff Upstream — Compare Project Against Claude on Rails Package
2
2
 
3
3
  Compare the project's current adoption state (from detect-current) against
4
- the upstream PIB package. Produce a categorized list of changes.
4
+ the upstream CoR package. Produce a categorized list of changes.
5
5
 
6
6
  When this file is absent or empty, the default behavior is: look for
7
7
  `.pib-upstream/` in the project root (staged by `npx create-claude-rails
@@ -59,7 +59,7 @@ new tables, new indexes.
59
59
 
60
60
  - New hooks in upstream's recommended settings.
61
61
  - New rules files in upstream's `.claude/rules/`.
62
- - Changes to the PIB onboarding or seed skills.
62
+ - Changes to the CoR onboarding or seed skills.
63
63
 
64
64
  ## Output Format
65
65
 
@@ -0,0 +1,168 @@
1
+ ---
2
+ name: extract
3
+ description: |
4
+ Analyze non-CoR skills, perspectives, and other artifacts in a consuming
5
+ project and propose candidates for upstreaming into Claude on Rails as
6
+ generic templates. Does not perform the extraction — files a proposal
7
+ that surfaces during orient in the CoR repo. Use when: "extract",
8
+ "upstream this", "should this be in CoR?", "/extract".
9
+ ---
10
+
11
+ # /extract — Propose Artifacts for Upstreaming to CoR
12
+
13
+ ## Purpose
14
+
15
+ Consuming projects grow custom skills, perspectives, phase files, and
16
+ other artifacts that solve real problems. Some of those solutions are
17
+ project-specific. Others solve problems that any project would have.
18
+ This skill identifies the latter and proposes upstreaming them into
19
+ Claude on Rails as generic templates.
20
+
21
+ **This skill proposes. It does not extract.** The actual separation of
22
+ generic orchestration from project-specific context happens in the CoR
23
+ repo after a human reviews and accepts the proposal. The consuming
24
+ project then adopts the CoR version via `/cor-upgrade`.
25
+
26
+ ## Where This Runs
27
+
28
+ **Consuming projects only.** If run from the CoR source repo
29
+ (`package.json` name is `create-claude-rails`), say: "This skill runs
30
+ from consuming projects. Here, use orient to review incoming proposals."
31
+
32
+ ## Workflow
33
+
34
+ ### 1. Inventory Non-CoR Artifacts
35
+
36
+ Compare the project's `.claude/` directory against `.corrc.json`'s
37
+ manifest. Anything not in the manifest is project-specific:
38
+
39
+ - **Custom skills** — `.claude/skills/*/SKILL.md` not in manifest
40
+ - **Custom perspectives** — `.claude/skills/perspectives/*/SKILL.md`
41
+ not in the standard set
42
+ - **Custom phase files** — phase files in CoR skills that override
43
+ defaults with substantial logic (not just `skip: true`)
44
+ - **Custom hooks** — hook scripts not installed by CoR
45
+ - **Custom rules** — `.claude/rules/` files beyond the CoR defaults
46
+ - **Patterns** — `.claude/memory/patterns/` entries that encode
47
+ reusable lessons
48
+
49
+ ### 2. Assess Each Candidate
50
+
51
+ For each non-CoR artifact, evaluate:
52
+
53
+ **Generalizability** — Would other projects benefit from this?
54
+ - Does it solve a problem tied to this specific project, or a class
55
+ of problems?
56
+ - Could the project-specific parts be isolated into phase files?
57
+ - Is the core logic reusable if you strip out hardcoded paths, names,
58
+ and domain concepts?
59
+
60
+ **Maturity** — Is this ready to propose?
61
+ - Has it been used enough to know it works? (Check telemetry if
62
+ available, or ask the user.)
63
+ - Has it been refined, or is it a first draft?
64
+ - Are there known issues or things the user wants to change?
65
+
66
+ **Category** — What kind of CoR artifact would this become?
67
+ - A new skill template (SKILL.md + default phase behaviors)
68
+ - A new perspective (SKILL.md with scan scope and finding format)
69
+ - A new phase file for an existing skill (e.g., a custom orient check)
70
+ - A new hook or rule template
71
+ - A new pattern worth promoting to the standard set
72
+
73
+ Rate each candidate: **strong** (clearly generic, proven, ready),
74
+ **possible** (could be generic with work), or **project-specific**
75
+ (not a candidate). Only propose strong and possible candidates.
76
+
77
+ ### 3. Draft Proposals
78
+
79
+ For each candidate, draft a proposal that includes:
80
+
81
+ ```markdown
82
+ # Extraction Proposal: [artifact name]
83
+
84
+ ## Source
85
+ - Project: [project name/path]
86
+ - Artifact: [path to the artifact]
87
+ - Type: skill | perspective | phase | hook | rule | pattern
88
+
89
+ ## What It Does
90
+ [1-2 paragraphs describing the artifact's purpose and how it works
91
+ in the source project]
92
+
93
+ ## Why It's Generic
94
+ [Why this solves a class of problems, not just this project's problem.
95
+ What other projects would use it for.]
96
+
97
+ ## Suggested Generalized Form
98
+ [How this would look as a CoR template. What becomes the skeleton,
99
+ what becomes phase-file-configurable, what gets dropped as
100
+ project-specific. Include a rough SKILL.md outline if it's a skill
101
+ or perspective.]
102
+
103
+ ## What Stays Project-Specific
104
+ [What parts of the current implementation would remain as phase files
105
+ or project configuration after extraction]
106
+
107
+ ## Assessment
108
+ - Generalizability: strong | possible
109
+ - Maturity: proven | early
110
+ - Complexity: low | medium | high (effort to extract)
111
+
112
+ ## Source Artifact Content
113
+ [Full content of the artifact being proposed, so the CoR repo has
114
+ everything needed to evaluate without access to the source project]
115
+ ```
116
+
117
+ ### 4. File Proposals
118
+
119
+ **If linked** (the CoR package resolves to a local directory — check
120
+ if `node -e "console.log(require.resolve('create-claude-rails'))"`
121
+ points to a local path rather than a `node_modules` path):
122
+
123
+ - Write each proposal as a markdown file in the CoR repo's
124
+ `proposals/` directory (create it if needed)
125
+ - Filename: `[source-project]-[artifact-name].md`
126
+ (e.g., `flow-review-pr.md`)
127
+ - These will surface during orient in the CoR repo
128
+
129
+ **If not linked** (CoR is installed from npm):
130
+
131
+ - Open a GitHub issue on the CoR repo for each proposal
132
+ - Title: `Extract proposal: [artifact name] from [project]`
133
+ - Label: `extraction-proposal` (create if needed)
134
+ - Body: the full proposal markdown
135
+ - Requires `gh` CLI to be authenticated
136
+
137
+ **If neither works** (no link, no gh access):
138
+
139
+ - Output the proposals to the terminal and tell the user to
140
+ file them manually or copy them to the CoR repo
141
+
142
+ ### 5. Summary
143
+
144
+ After filing, summarize:
145
+ - How many artifacts were scanned
146
+ - How many proposals were filed (strong + possible)
147
+ - How many were project-specific (not proposed)
148
+ - Where the proposals went (local files or GitHub issues)
149
+ - Remind: "Review these in the CoR repo. Accepted proposals get
150
+ built as generic templates, then your project adopts them via
151
+ /cor-upgrade."
152
+
153
+ ## Running on a Subset
154
+
155
+ The user can target specific artifacts:
156
+
157
+ - `/extract` — scan everything
158
+ - `/extract skills/my-skill` — evaluate a specific skill
159
+ - `/extract perspectives` — evaluate all custom perspectives
160
+
161
+ ## What This Does NOT Do
162
+
163
+ - **Does not modify the consuming project.** No files are changed here.
164
+ - **Does not modify CoR templates.** Proposals are filed, not applied.
165
+ - **Does not decide.** A human reviews each proposal in the CoR repo.
166
+ - **Does not extract phase files from skills.** The separation of
167
+ skeleton from phases happens during implementation in CoR, not here.
168
+ The proposal includes a *suggested* separation, not a final one.