create-claude-rails 0.2.0 → 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.
package/README.md CHANGED
@@ -49,7 +49,7 @@ hooks.
49
49
  - **`/onboard`** — conversational project interview, re-runnable as the
50
50
  project matures.
51
51
  - **`/seed`** — detects new tech in your project, proposes expertise.
52
- - **`/upgrade`** — conversational merge when Claude on Rails updates.
52
+ - **`/cor-upgrade`** — conversational merge when Claude on Rails updates.
53
53
 
54
54
  ## How It Works
55
55
 
@@ -97,7 +97,7 @@ scripts/
97
97
  ├── pib-db.js # work tracking CLI (if installed)
98
98
  └── ... # triage tools (if audit installed)
99
99
 
100
- .pibrc.json # installation metadata
100
+ .corrc.json # installation metadata
101
101
  ```
102
102
 
103
103
  ## Upgrading
@@ -106,7 +106,7 @@ scripts/
106
106
  npx create-claude-rails # re-run to add modules
107
107
  ```
108
108
 
109
- In Claude Code, run `/upgrade` for conversational merge of upstream
109
+ In Claude Code, run `/cor-upgrade` for conversational merge of upstream
110
110
  changes with your customizations.
111
111
 
112
112
  ## Philosophy
package/lib/cli.js CHANGED
@@ -22,6 +22,7 @@ const MODULES = {
22
22
  description: 'Block destructive git ops (force push, hard reset). Track skill usage via JSONL telemetry.',
23
23
  mandatory: false,
24
24
  default: true,
25
+ lean: true,
25
26
  templates: ['hooks/git-guardrails.sh', 'hooks/skill-telemetry.sh', 'hooks/skill-tool-telemetry.sh'],
26
27
  },
27
28
  'work-tracking': {
@@ -29,6 +30,7 @@ const MODULES = {
29
30
  description: 'Track work items for orient/debrief. Default: SQLite (pib-db). Also supports markdown (tasks.md) or external systems. Choice made during /onboard.',
30
31
  mandatory: false,
31
32
  default: true,
33
+ lean: false,
32
34
  templates: ['scripts/pib-db.js', 'scripts/pib-db-schema.sql'],
33
35
  needsDb: true,
34
36
  },
@@ -37,6 +39,7 @@ const MODULES = {
37
39
  description: 'Structured implementation planning with perspective critique and execution checkpoints.',
38
40
  mandatory: false,
39
41
  default: true,
42
+ lean: true,
40
43
  templates: ['skills/plan', 'skills/execute', 'skills/investigate'],
41
44
  },
42
45
  'compliance': {
@@ -44,6 +47,7 @@ const MODULES = {
44
47
  description: 'Scoped instructions that load by path. Enforcement pipeline for promoting patterns to rules.',
45
48
  mandatory: false,
46
49
  default: true,
50
+ lean: false,
47
51
  templates: ['rules/enforcement-pipeline.md', 'memory/patterns/_pattern-template.md', 'memory/patterns/pattern-intelligence-first.md'],
48
52
  },
49
53
  'audit': {
@@ -51,6 +55,7 @@ const MODULES = {
51
55
  description: 'Periodic expert-perspective analysis with structured triage. Most compute-intensive module.',
52
56
  mandatory: false,
53
57
  default: true,
58
+ lean: true,
54
59
  templates: [
55
60
  'skills/audit', 'skills/pulse', 'skills/triage-audit',
56
61
  'skills/perspectives',
@@ -60,17 +65,19 @@ const MODULES = {
60
65
  ],
61
66
  },
62
67
  'lifecycle': {
63
- name: 'Lifecycle (onboard + seed + upgrade)',
64
- description: 'Conversational onboarding, capability seeding from tech signals, upgrade merges.',
68
+ name: 'Lifecycle (onboard + seed + cor-upgrade + link)',
69
+ description: 'Conversational onboarding, capability seeding, upgrade merges, local dev linking.',
65
70
  mandatory: false,
66
71
  default: true,
67
- templates: ['skills/onboard', 'skills/seed', 'skills/upgrade'],
72
+ lean: true,
73
+ templates: ['skills/onboard', 'skills/seed', 'skills/cor-upgrade', 'skills/link', 'skills/unlink', 'skills/publish', 'skills/extract'],
68
74
  },
69
75
  'validate': {
70
76
  name: 'Validate',
71
77
  description: 'Structural validation checks with unified summary. Define your own validators.',
72
78
  mandatory: false,
73
79
  default: true,
80
+ lean: false,
74
81
  templates: ['skills/validate'],
75
82
  },
76
83
  };
@@ -87,7 +94,7 @@ function detectProjectState(dir) {
87
94
  const entries = fs.readdirSync(dir);
88
95
  const signals = entries.filter(e => PROJECT_SIGNALS.includes(e));
89
96
  const hasClaude = entries.includes('.claude');
90
- const hasPibrc = fs.existsSync(path.join(dir, '.pibrc.json'));
97
+ const hasPibrc = fs.existsSync(path.join(dir, '.corrc.json'));
91
98
 
92
99
  if (hasPibrc) return 'existing-install';
93
100
  if (signals.length > 0) return 'existing-project';
@@ -100,6 +107,7 @@ function parseArgs(argv) {
100
107
  const args = argv.slice(2);
101
108
  const flags = {
102
109
  yes: false,
110
+ lean: false,
103
111
  noDb: false,
104
112
  dryRun: false,
105
113
  help: false,
@@ -110,6 +118,7 @@ function parseArgs(argv) {
110
118
 
111
119
  for (const arg of args) {
112
120
  if (arg === '--yes' || arg === '-y') flags.yes = true;
121
+ else if (arg === '--lean') flags.lean = true;
113
122
  else if (arg === '--no-db') flags.noDb = true;
114
123
  else if (arg === '--dry-run') flags.dryRun = true;
115
124
  else if (arg === '--help' || arg === '-h') flags.help = true;
@@ -127,6 +136,7 @@ function printHelp() {
127
136
 
128
137
  Options:
129
138
  --yes, -y Accept all defaults, no prompts
139
+ --lean Install core modules only (no work-tracking, compliance, validate)
130
140
  --no-db Skip work tracking database setup
131
141
  --dry-run Show what would be copied without writing
132
142
  --reset Remove CoR files (uses manifest for safety)
@@ -137,6 +147,7 @@ function printHelp() {
137
147
  npx create-claude-rails Interactive setup in current dir
138
148
  npx create-claude-rails my-project Set up in ./my-project/
139
149
  npx create-claude-rails --yes Install everything, no questions
150
+ npx create-claude-rails --lean Session loop + planning + perspectives
140
151
  npx create-claude-rails --yes --no-db Install everything except DB
141
152
  npx create-claude-rails --dry-run Preview what would be installed
142
153
  npx create-claude-rails --reset Remove CoR files safely
@@ -175,7 +186,7 @@ async function run() {
175
186
  if (dirState === 'existing-install') {
176
187
  const existing = readMetadata(projectDir);
177
188
  console.log(` Found existing installation (v${existing.version}, installed ${existing.installedAt.split('T')[0]})`);
178
- if (!flags.yes) {
189
+ if (!flags.yes && !flags.lean) {
179
190
  const { proceed } = await prompts({
180
191
  type: 'confirm',
181
192
  name: 'proceed',
@@ -189,7 +200,7 @@ async function run() {
189
200
  }
190
201
  } else if (dirState === 'existing-project') {
191
202
  console.log(` Detected existing project in ${projectDir}`);
192
- if (!flags.yes) {
203
+ if (!flags.yes && !flags.lean) {
193
204
  const { action } = await prompts({
194
205
  type: 'select',
195
206
  name: 'action',
@@ -233,7 +244,18 @@ async function run() {
233
244
  let skippedModules = {};
234
245
  let includeDb = !flags.noDb;
235
246
 
236
- if (flags.yes) {
247
+ if (flags.lean) {
248
+ selectedModules = Object.entries(MODULES)
249
+ .filter(([, mod]) => mod.mandatory || mod.lean)
250
+ .map(([key]) => key);
251
+ includeDb = false;
252
+ const skippedKeys = Object.keys(MODULES).filter(k => !selectedModules.includes(k));
253
+ for (const k of skippedKeys) {
254
+ skippedModules[k] = 'Skipped by --lean install';
255
+ }
256
+ console.log(` Lean install: ${selectedModules.length} modules (session-loop, hooks, planning, audit, lifecycle).`);
257
+ console.log(` Skipped: ${skippedKeys.join(', ')}.\n`);
258
+ } else if (flags.yes) {
237
259
  selectedModules = Object.keys(MODULES);
238
260
  if (flags.noDb) {
239
261
  includeDb = false;
@@ -245,16 +267,36 @@ async function run() {
245
267
  }
246
268
  console.log(` Installing all ${selectedModules.length} modules.${flags.noDb ? ' (skipping work-tracking DB)' : ''}\n`);
247
269
  } else {
248
- const { installAll } = await prompts({
249
- type: 'confirm',
250
- name: 'installAll',
251
- message: 'Install everything? (Y skips individual module questions)',
252
- initial: true,
270
+ const { installMode } = await prompts({
271
+ type: 'select',
272
+ name: 'installMode',
273
+ message: 'How much do you want to install?',
274
+ choices: [
275
+ { title: 'Everything — all modules, full setup', value: 'full' },
276
+ { title: 'Lean — session loop + planning + perspectives (no DB, compliance, validate)', value: 'lean' },
277
+ { title: 'Custom — choose modules individually', value: 'custom' },
278
+ ],
253
279
  });
254
280
 
255
- if (installAll) {
281
+ if (!installMode) {
282
+ console.log(' Cancelled.');
283
+ return;
284
+ }
285
+
286
+ if (installMode === 'full') {
256
287
  selectedModules = Object.keys(MODULES);
257
288
  console.log(`\n Installing all ${selectedModules.length} modules.\n`);
289
+ } else if (installMode === 'lean') {
290
+ selectedModules = Object.entries(MODULES)
291
+ .filter(([, mod]) => mod.mandatory || mod.lean)
292
+ .map(([key]) => key);
293
+ includeDb = false;
294
+ const skippedKeys = Object.keys(MODULES).filter(k => !selectedModules.includes(k));
295
+ for (const k of skippedKeys) {
296
+ skippedModules[k] = 'Skipped by lean install';
297
+ }
298
+ console.log(`\n Lean install: ${selectedModules.length} modules.`);
299
+ console.log(` Skipped: ${skippedKeys.join(', ')}.\n`);
258
300
  } else {
259
301
  for (const [key, mod] of Object.entries(MODULES)) {
260
302
  if (mod.mandatory) {
@@ -448,7 +490,7 @@ async function run() {
448
490
  version: VERSION,
449
491
  manifest: allManifest,
450
492
  });
451
- console.log(' 📝 Created .pibrc.json');
493
+ console.log(' 📝 Created .corrc.json');
452
494
  }
453
495
 
454
496
  // --- Summary ---
package/lib/metadata.js CHANGED
@@ -1,7 +1,7 @@
1
1
  const fs = require('fs');
2
2
  const path = require('path');
3
3
 
4
- const METADATA_FILE = '.pibrc.json';
4
+ const METADATA_FILE = '.corrc.json';
5
5
 
6
6
  function metadataPath(projectDir) {
7
7
  return path.join(projectDir, METADATA_FILE);
package/lib/reset.js CHANGED
@@ -49,7 +49,7 @@ async function reset(projectDir, { dryRun = false, force = false } = {}) {
49
49
 
50
50
  const metadata = readMetadata(projectDir);
51
51
  if (!metadata) {
52
- console.log(' No .pibrc.json found — nothing to reset.');
52
+ console.log(' No .corrc.json found — nothing to reset.');
53
53
  return;
54
54
  }
55
55
 
@@ -133,7 +133,7 @@ async function reset(projectDir, { dryRun = false, force = false } = {}) {
133
133
  }
134
134
  }
135
135
 
136
- // Remove .pibrc.json last
136
+ // Remove .corrc.json last
137
137
  const pibrcPath = path.join(projectDir, METADATA_FILE);
138
138
  if (!dryRun && fs.existsSync(pibrcPath)) {
139
139
  fs.unlinkSync(pibrcPath);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-claude-rails",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "description": "Claude on Rails — opinionated process scaffolding for Claude Code projects",
5
5
  "bin": {
6
6
  "create-claude-rails": "bin/create-claude-rails.js"
@@ -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 CoR 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
 
@@ -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
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 CoR", "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
14
+ path: .claude/skills/cor-upgrade/phases/diff-upstream.md
15
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 Claude on Rails Upgrade
24
+ # /cor-upgrade — Conversational Claude on Rails Upgrade
25
25
 
26
26
  ## Purpose
27
27
 
@@ -211,13 +211,13 @@ the workflow. Execute them at their declared position.
211
211
  The upgrade skill doesn't have to wait for the user to invoke it.
212
212
  Orient can detect when upstream CoR files are newer than the project's
213
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 /upgrade.
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
 
@@ -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 CoR 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?"
@@ -5,15 +5,15 @@ 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
8
+ `.corrc.json` for version and module metadata, then scan the project's
9
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.
@@ -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
@@ -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.
@@ -0,0 +1,52 @@
1
+ ---
2
+ name: link
3
+ description: |
4
+ Set up local development linking for Claude on Rails. Detects whether
5
+ you're in the CoR source repo or a consuming project and runs the
6
+ appropriate npm link command. Use when: "link", "local dev", "use local
7
+ CoR", "/link".
8
+ ---
9
+
10
+ # /link — Local Development Linking
11
+
12
+ ## Purpose
13
+
14
+ Connect a consuming project to a local checkout of Claude on Rails so
15
+ template changes are immediately available without publishing to npm.
16
+
17
+ ## Context Detection
18
+
19
+ Before doing anything, determine where you are:
20
+
21
+ **CoR source repo** (`package.json` has `name: "create-claude-rails"`):
22
+ - Run `npm link` to register the package globally
23
+ - This makes the local checkout available to any project that links to it
24
+ - Tell the user: "Registered locally. In your other projects, run `/link`
25
+ to connect them to this checkout."
26
+
27
+ **Any other project** (anything that isn't the CoR source repo):
28
+ - Run `npm link create-claude-rails` to point to the local CoR checkout
29
+ - Verify it worked: check that `npx create-claude-rails --help` resolves
30
+ to the local version
31
+ - If CoR is already installed (`.corrc.json` exists): "Linked to local
32
+ CoR. Run `/cor-upgrade` to pull template changes into your installed
33
+ skills."
34
+ - If CoR is not yet installed: "Linked to local CoR. Run
35
+ `npx create-claude-rails` to install."
36
+
37
+ ## Prerequisites
38
+
39
+ The CoR source repo must have been linked first (`npm link` from the CoR
40
+ directory). If a consuming project tries to link and the global link
41
+ doesn't exist, npm will error. In that case, tell the user to run `/link`
42
+ in their CoR checkout first.
43
+
44
+ ## What This Encodes
45
+
46
+ - `npm link` (in source) registers a global symlink to the package
47
+ - `npm link create-claude-rails` (in consumer) creates a local symlink
48
+ to the globally registered package
49
+ - The link survives across terminal sessions
50
+ - The link uses whatever is on disk — no version pinning, no caching
51
+ - After linking, `npx create-claude-rails` and `/cor-upgrade` both
52
+ resolve to the local checkout
@@ -168,7 +168,7 @@ Read `phases/work-tracking.md` for how to present work tracking options.
168
168
  tasks.md, GitHub Issues, custom phase files). Present two built-in
169
169
  options — SQLite database (pib-db) or markdown file (tasks.md) — plus
170
170
  bring-your-own for external systems. User picks one, the other, or
171
- neither. The choice is recorded in `.pibrc.json` under `workTracking`
171
+ neither. The choice is recorded in `.corrc.json` under `workTracking`
172
172
  and feeds into generate-context and generate-session-loop.
173
173
 
174
174
  ### 4. Options
@@ -16,7 +16,7 @@ If it doesn't exist, the mode is **first-run** — skip the full scan and
16
16
  move to the interview immediately. No need to check 10 artifact types
17
17
  when the primary signal is absent.
18
18
 
19
- Also read `.pibrc.json` if it exists — it records which modules the CLI
19
+ Also read `.corrc.json` if it exists — it records which modules the CLI
20
20
  installed and which were skipped (with reasons). The interview phase uses
21
21
  this to skip redundant questions.
22
22
 
@@ -5,7 +5,7 @@ listen to answers, follow up on what's interesting or unclear. The quality
5
5
  of the context layer depends directly on the quality of this conversation.
6
6
 
7
7
  When this file is absent or empty, the default behavior is: ask mode-
8
- adapted questions as described below, 2-3 at a time, with follow-ups.
8
+ adapted questions as described below, one at a time, with follow-ups.
9
9
  To explicitly skip the interview (e.g., when generating context from
10
10
  existing documentation), write only `skip: true`.
11
11
 
@@ -69,21 +69,17 @@ The user just ran the CLI in an empty or near-empty directory. There's
69
69
  nothing to scan, no workflow to reflect on yet. Questions must be
70
70
  **forward-looking** — about intentions, not retrospection.
71
71
 
72
- **Round 1What and why:**
73
- - What are you trying to build?
74
- - What will you be using Claude Code for on this project?
75
-
76
- **Round 2 How you work (adapt based on Round 1):**
77
- - How do you usually keep track of what needs to be done? (A list
78
- somewhere, a tool, your head?)
79
- - Will anyone else be working on this with you?
80
- - Have you struggled with anything on past projects that you'd want
81
- to get ahead of this time?
82
-
83
- **Round 3 — Scope and shape (adapt based on Rounds 1-2):**
84
- - How big is this? A weekend project, something you'll be working on
85
- for months?
86
- - What does done look like, roughly?
72
+ **Questions (ask one at a time, in order skip or reorder based on
73
+ what the conversation reveals):**
74
+ 1. What are you trying to build?
75
+ 2. What will you be using Claude Code for on this project?
76
+ 3. How do you usually keep track of what needs to be done?
77
+ 4. Will anyone else be working on this with you?
78
+ 5. Have you struggled with anything on past projects that you'd want
79
+ to get ahead of this time?
80
+ 6. How big is this? A weekend project, something you'll be working on
81
+ for months?
82
+ 7. What does done look like, roughly?
87
83
 
88
84
  **Follow-up instincts:**
89
85
  - If they describe something ambitious, ask what the first milestone is
@@ -98,26 +94,23 @@ The user ran the CLI in a project that already has substance. There are
98
94
  files to scan — use them for tech detection instead of asking. Focus the
99
95
  conversation on **work and pain**, not tooling.
100
96
 
101
- **Before Round 1:** Scan the project for tech signals (package.json,
97
+ **Before asking:** Scan the project for tech signals (package.json,
102
98
  Cargo.toml, requirements.txt, Dockerfile, .github/, etc.). Note what
103
99
  you find — it informs your follow-ups but doesn't replace the
104
100
  conversation. Don't announce what you found; weave it in naturally.
105
101
 
106
- **Round 1Identity:**
107
- - Tell me about this project. What does it do, who is it for?
108
- - What are you mainly working on right now?
109
-
110
- **Round 2 Pain (adapt based on Round 1):**
111
- - What tends to break or get forgotten?
112
- - What do you wish Claude knew about this project from the very start
113
- of every session?
114
- - Is there anything that fails silently — things that go wrong without
115
- anyone noticing until it's too late?
116
-
117
- **Round 3 Operations (adapt based on Rounds 1-2):**
118
- - How do you currently keep track of what needs to be done?
119
- - What does a typical working session on this project look like?
120
- - Is there a deploy pipeline or remote environment?
102
+ **Questions (ask one at a time, in order skip or reorder based on
103
+ what the conversation reveals):**
104
+ 1. Tell me about this project. What does it do?
105
+ 2. What are you mainly working on right now?
106
+ 3. What tends to break or get forgotten?
107
+ 4. What do you wish Claude knew about this project from the very start
108
+ of every session?
109
+ 5. Is there anything that fails silently — things that go wrong without
110
+ anyone noticing until it's too late?
111
+ 6. How do you currently keep track of what needs to be done?
112
+ 7. What does a typical working session on this project look like?
113
+ 8. Is there a deploy pipeline or remote environment?
121
114
 
122
115
  **Follow-up instincts:**
123
116
  - If someone mentions a pain point, ask *why* it happens and how often
@@ -131,48 +124,39 @@ conversation. Don't announce what you found; weave it in naturally.
131
124
  The session loop has been running. Shift from "what is this" to "what
132
125
  have you learned."
133
126
 
134
- **Round 1Session Loop Feedback:**
135
- - What has the session loop taught you that the context files don't
136
- currently capture?
137
- - Does orient give you what you need at session start? What's missing?
138
- - Does debrief close the right loops? What falls through?
139
-
140
- **Round 2 Friction (adapt based on Round 1):**
141
- - Where have you hit friction with the current setup?
142
- - Are there things you keep having to tell Claude that should already be
143
- in the context?
144
- - Any phase files that aren't pulling their weight?
145
-
146
- **Round 3 Growth (adapt based on Rounds 1-2):**
147
- - Has the project changed since the initial onboard? New components,
148
- shifted priorities, different pain points?
149
- - Are you ready for any of the modules you skipped last time?
150
- - Anything you've been doing manually that should be automated?
127
+ **Questions (ask one at a time, in order skip or reorder based on
128
+ what the conversation reveals):**
129
+ 1. What has the session loop taught you that the context files don't
130
+ currently capture?
131
+ 2. Does orient give you what you need at session start? What's missing?
132
+ 3. Does debrief close the right loops? What falls through?
133
+ 4. Where have you hit friction with the current setup?
134
+ 5. Are there things you keep having to tell Claude that should already be
135
+ in the context?
136
+ 6. Any phase files that aren't pulling their weight?
137
+ 7. Has the project changed since the initial onboard?
138
+ 8. Are you ready for any of the modules you skipped last time?
139
+ 9. Anything you've been doing manually that should be automated?
151
140
 
152
141
  ## Mature Re-Run Questions
153
142
 
154
143
  The system has been running long enough to accumulate both value and
155
144
  cruft. This is a health check.
156
145
 
157
- **Round 1Usage Reality:**
158
- - Which modules are you actually using regularly?
159
- - Anything that felt useful at first but you've stopped relying on?
160
- - Are there modules you adopted but never really configured properly?
161
-
162
- **Round 2 Gaps and Drift:**
163
- - What gaps have you noticed in coverage? Things the system should catch
164
- but doesn't.
165
- - Has the project's architecture or priorities shifted since the last
166
- onboard run? Does the context layer reflect the current reality?
167
- - Any new pain points that weren't there before?
168
-
169
- **Round 3 Simplification:**
170
- - Is anything ready to retire? Phase files, perspectives, health checks
171
- that check for problems you no longer have?
172
- - Could any of your custom phase files be simplified now that you know
173
- what you actually need?
174
- - Are there patterns in your memory/feedback that suggest a structural
175
- change rather than another rule?
146
+ **Questions (ask one at a time, in order skip or reorder based on
147
+ what the conversation reveals):**
148
+ 1. Which modules are you actually using regularly?
149
+ 2. Anything that felt useful at first but you've stopped relying on?
150
+ 3. Are there modules you adopted but never really configured properly?
151
+ 4. What gaps have you noticed? Things the system should catch but doesn't.
152
+ 5. Has the project's architecture or priorities shifted since the last
153
+ onboard run?
154
+ 6. Any new pain points that weren't there before?
155
+ 7. Is anything ready to retire?
156
+ 8. Could any of your custom phase files be simplified now that you know
157
+ what you actually need?
158
+ 9. Are there patterns in your memory/feedback that suggest a structural
159
+ change rather than another rule?
176
160
 
177
161
  ## Scope Boundary
178
162
 
@@ -196,7 +180,11 @@ onboard's job.
196
180
 
197
181
  ## Conversation Guidelines
198
182
 
199
- - **2-3 questions per round.** Let the user respond before asking more.
183
+ - **One question at a time.** Ask a single question, wait for the answer,
184
+ then ask the next one. Never stack multiple questions in one message.
185
+ The rounds below are a *sequence*, not a batch — each bullet is its own
186
+ turn. Follow-ups based on the answer take priority over the next
187
+ planned question.
200
188
  - **Follow up on substance.** If an answer reveals something important,
201
189
  dig into it before moving on to the next topic.
202
190
  - **Note CoR module signals.** When someone describes a pain point that
@@ -204,10 +192,16 @@ onboard's job.
204
192
  phase — but don't interrupt the conversation to pitch the module.
205
193
  - **Don't assume answers.** Even if you can see the project's files, ask
206
194
  about things like pain points and priorities that only the user knows.
195
+ - **Earn the right to ask about specifics.** Don't ask about tech stack,
196
+ deployment pipelines, or architecture until the conversation has shown
197
+ the user has context to give a meaningful answer. Lead with open
198
+ questions ("tell me about this project") and let specifics emerge
199
+ naturally. If the user is non-technical or early in their thinking,
200
+ those questions may never be appropriate — and that's fine.
207
201
  - **Summarize before generating.** After the interview, reflect back what
208
202
  you heard: "Here's what I'm taking away from this conversation..." Let
209
203
  the user correct before generating files.
210
- - **For skipped modules (.pibrc.json):** If the CLI's `skipped` field
204
+ - **For skipped modules (.corrc.json):** If the CLI's `skipped` field
211
205
  shows a module was opted out with a reason, weave that into the
212
206
  conversation naturally. "I see you're tracking work somewhere else —
213
207
  tell me about that" rather than "Module work-tracking was skipped."
@@ -6,13 +6,13 @@ opt-in. Progressive adoption means starting with what you need and adding
6
6
  modules as the project matures.
7
7
 
8
8
  When this file is absent or empty, the default behavior is: read
9
- `.pibrc.json` for module selections made during CLI install, then present
9
+ `.corrc.json` for module selections made during CLI install, then present
10
10
  the module hierarchy with that context. To explicitly skip the menu,
11
11
  write only `skip: true`.
12
12
 
13
- ## Reading CLI Selections (.pibrc.json)
13
+ ## Reading CLI Selections (.corrc.json)
14
14
 
15
- If `.pibrc.json` exists in the project root, the CLI has already asked
15
+ If `.corrc.json` exists in the project root, the CLI has already asked
16
16
  about module selections. Read the `modules` and `skipped` fields:
17
17
 
18
18
  - **Installed modules** (`modules` map, value `true`): These are already
@@ -29,7 +29,7 @@ For skipped modules with alternatives, the interview (previous phase)
29
29
  should have already asked about the alternative system. Use those answers
30
30
  here to confirm the wiring plan.
31
31
 
32
- If `.pibrc.json` doesn't exist (manual install or pre-npm adoption),
32
+ If `.corrc.json` doesn't exist (manual install or pre-npm adoption),
33
33
  fall back to presenting the full menu as described below.
34
34
 
35
35
  ## Module Hierarchy
@@ -39,7 +39,7 @@ Compare what the interview revealed against what was generated:
39
39
 
40
40
  ### 2. Module–Phase Alignment
41
41
 
42
- Cross-reference `.pibrc.json` (installed vs skipped modules) against the
42
+ Cross-reference `.corrc.json` (installed vs skipped modules) against the
43
43
  generated phase files:
44
44
 
45
45
  - **Skipped modules:** No phase file should reference a skipped module's
@@ -6,7 +6,7 @@ two built-in options plus bring-your-own. The user chooses one, the other,
6
6
  or neither.
7
7
 
8
8
  When this file is absent or empty, the default behavior is: detect existing
9
- work tracking, present options, record the choice in `.pibrc.json`. To skip
9
+ work tracking, present options, record the choice in `.corrc.json`. To skip
10
10
  work-tracking decisions entirely, write only `skip: true`.
11
11
 
12
12
  ## When This Phase Activates
@@ -28,7 +28,7 @@ Before presenting options, scan for signs of existing work tracking:
28
28
  3. **GitHub Issues** — `gh issue list` returns results (if `gh` CLI is available)
29
29
  4. **Custom work-scan phase** — `.claude/skills/orient/phases/work-scan.md`
30
30
  with non-default content
31
- 5. **`.pibrc.json` workTracking field** — Previous choice already recorded
31
+ 5. **`.corrc.json` workTracking field** — Previous choice already recorded
32
32
 
33
33
  If something is already set up and working, acknowledge it: "I see you're
34
34
  using [X]. Is that working well, or would you like to try something
@@ -161,7 +161,7 @@ Which approach fits your project? You can also skip work tracking for now.
161
161
 
162
162
  ## Recording the Choice
163
163
 
164
- Record the choice in `.pibrc.json` under a `workTracking` field:
164
+ Record the choice in `.corrc.json` under a `workTracking` field:
165
165
 
166
166
  ```json
167
167
  {
@@ -228,4 +228,4 @@ If a user chose markdown initially and later wants to switch to pib-db:
228
228
  2. Early re-run detects markdown tracking
229
229
  3. Work-tracking phase asks: "Still using tasks.md? Anything missing?"
230
230
  4. If user wants to upgrade: offer to import from markdown into pib-db
231
- 5. Update `.pibrc.json` and regenerate phase files
231
+ 5. Update `.corrc.json` and regenerate phase files
@@ -0,0 +1,72 @@
1
+ ---
2
+ name: publish
3
+ description: |
4
+ Publish a new version of Claude on Rails to npm. Analyzes changes since
5
+ last release, suggests a version bump (patch/minor/major), updates
6
+ package.json, commits, tags, and publishes. Use when: "publish",
7
+ "release", "ship it", "/publish".
8
+ ---
9
+
10
+ # /publish — Release to npm
11
+
12
+ ## Purpose
13
+
14
+ Handle the full publish flow for the `create-claude-rails` package:
15
+ analyze what changed, suggest a version, get confirmation, and ship.
16
+
17
+ This skill only runs from the CoR source repo (`package.json` has
18
+ `name: "create-claude-rails"`). If run elsewhere, say so and stop.
19
+
20
+ ## Workflow
21
+
22
+ ### 1. Analyze Changes
23
+
24
+ Run `git log` from the last version tag (e.g., `v0.2.0`) to HEAD.
25
+ Summarize what changed in plain language — group by category:
26
+
27
+ - **Breaking** — renames, removed features, changed file formats
28
+ - **Features** — new flags, new skills, new modules
29
+ - **Fixes** — bug fixes, UX improvements
30
+ - **Internal** — refactors, template updates that don't change behavior
31
+
32
+ ### 2. Suggest Version
33
+
34
+ Based on the changes:
35
+
36
+ - **Patch** (0.x.Y) — fixes only, no new features, no breaking changes
37
+ - **Minor** (0.X.0) — new features, backward-compatible
38
+ - **Major** (X.0.0) — breaking changes (renames, removed APIs, format changes)
39
+
40
+ Note: while pre-1.0, minor can include breaking changes per semver
41
+ convention. Call this out when recommending.
42
+
43
+ Present the suggestion with reasoning:
44
+
45
+ > "Since the last release (v0.2.0), there are N breaking changes
46
+ > (list them), N new features, and N fixes. I'd suggest **0.3.0**
47
+ > because [reason]. Want to go with that, or a different version?"
48
+
49
+ ### 3. Pre-Publish Checks
50
+
51
+ Before publishing, verify:
52
+
53
+ - `node -c lib/cli.js` passes (syntax check)
54
+ - Working tree is clean (no uncommitted changes) — if dirty, ask
55
+ whether to commit first
56
+ - Current branch is main
57
+ - `npm whoami` succeeds (logged in to npm)
58
+
59
+ ### 4. Publish
60
+
61
+ With user confirmation:
62
+
63
+ 1. Update `version` in `package.json`
64
+ 2. Commit: `Bump to <version>`
65
+ 3. Tag: `git tag v<version>`
66
+ 4. `npm publish`
67
+ 5. `git push && git push --tags`
68
+
69
+ ### 5. Post-Publish
70
+
71
+ - Update `system-status.md` if it exists
72
+ - Report the published version and npm URL
@@ -0,0 +1,35 @@
1
+ ---
2
+ name: unlink
3
+ description: |
4
+ Remove local development linking for Claude on Rails. Returns the
5
+ project to using the published npm version. Use when: "unlink",
6
+ "stop using local CoR", "use published version", "/unlink".
7
+ ---
8
+
9
+ # /unlink — Remove Local Development Link
10
+
11
+ ## Purpose
12
+
13
+ Disconnect from a local Claude on Rails checkout and return to using
14
+ the published npm version.
15
+
16
+ ## Context Detection
17
+
18
+ **CoR source repo** (`package.json` has `name: "create-claude-rails"`):
19
+ - Run `npm unlink` to remove the global registration
20
+ - Warn: "This will break the link for all consuming projects that depend
21
+ on it. They'll need to `npm unlink create-claude-rails` too, or
22
+ they'll get resolution errors."
23
+
24
+ **Any other project**:
25
+ - Run `npm unlink create-claude-rails`
26
+ - The project returns to using the published npm version
27
+ - Tell the user: "Unlinked. `npx create-claude-rails` will now pull
28
+ from npm instead of your local checkout."
29
+
30
+ ## When to Use
31
+
32
+ - Before testing against the published npm version
33
+ - When done with a local development cycle
34
+ - When the local CoR checkout is moving to a branch you don't want
35
+ consuming projects to track