specrails-core 3.3.1 → 3.4.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 (56) hide show
  1. package/README.md +76 -48
  2. package/bin/doctor.sh +1 -1
  3. package/commands/doctor.md +1 -1
  4. package/commands/setup.md +70 -70
  5. package/docs/README.md +3 -2
  6. package/docs/agents.md +15 -15
  7. package/docs/changelog.md +20 -20
  8. package/docs/concepts.md +3 -3
  9. package/docs/customization.md +18 -5
  10. package/docs/deployment.md +20 -5
  11. package/docs/getting-started.md +16 -27
  12. package/docs/installation.md +81 -48
  13. package/docs/local-tickets.md +11 -12
  14. package/docs/migration-guide.md +9 -9
  15. package/docs/playbook-parallel-dev.md +8 -8
  16. package/docs/playbook-product-discovery.md +1 -1
  17. package/docs/plugin-architecture.md +137 -0
  18. package/docs/research/codex-compatibility-analysis.md +11 -11
  19. package/docs/research/mcp-feasibility-analysis.md +5 -5
  20. package/docs/testing/test-matrix-codex.md +1 -1
  21. package/docs/user-docs/cli-reference.md +57 -57
  22. package/docs/user-docs/codex-vs-claude-code.md +7 -7
  23. package/docs/user-docs/faq.md +32 -26
  24. package/docs/user-docs/getting-started-codex.md +7 -7
  25. package/docs/user-docs/installation.md +47 -38
  26. package/docs/user-docs/quick-start.md +20 -26
  27. package/docs/workflows.md +62 -62
  28. package/install.sh +3 -3
  29. package/package.json +1 -1
  30. package/templates/agents/sr-merge-resolver.md +1 -1
  31. package/templates/claude-md/CLAUDE-quickstart.md +2 -2
  32. package/templates/commands/{sr → specrails}/batch-implement.md +18 -18
  33. package/templates/commands/{sr → specrails}/implement.md +8 -8
  34. package/templates/commands/{sr → specrails}/memory-inspect.md +3 -3
  35. package/templates/commands/{sr → specrails}/merge-resolve.md +1 -1
  36. package/templates/commands/{sr → specrails}/opsx-diff.md +1 -1
  37. package/templates/commands/{sr → specrails}/product-backlog.md +7 -7
  38. package/templates/commands/{sr → specrails}/propose-spec.md +1 -1
  39. package/templates/commands/{sr → specrails}/refactor-recommender.md +1 -1
  40. package/templates/commands/{sr → specrails}/retry.md +13 -13
  41. package/templates/commands/{sr → specrails}/team-debug.md +5 -5
  42. package/templates/commands/{sr → specrails}/team-review.md +4 -4
  43. package/templates/commands/{sr → specrails}/telemetry.md +2 -2
  44. package/templates/commands/{sr → specrails}/update-product-driven-backlog.md +2 -2
  45. package/templates/commands/{sr → specrails}/vpc-drift.md +4 -4
  46. package/templates/commands/{sr → specrails}/why.md +5 -5
  47. package/templates/commands/test.md +2 -2
  48. package/templates/skills/sr-batch-implement/SKILL.md +18 -18
  49. package/templates/skills/sr-implement/SKILL.md +8 -8
  50. package/templates/skills/sr-product-backlog/SKILL.md +7 -7
  51. package/templates/skills/sr-refactor-recommender/SKILL.md +1 -1
  52. package/templates/skills/sr-update-backlog/SKILL.md +2 -2
  53. package/templates/skills/sr-why/SKILL.md +5 -5
  54. package/update.sh +2 -2
  55. /package/templates/commands/{sr → specrails}/compat-check.md +0 -0
  56. /package/templates/commands/{sr → specrails}/health-check.md +0 -0
package/README.md CHANGED
@@ -12,10 +12,11 @@
12
12
  One command gives your repo a full team of specialized AI agents: architect, developer, reviewer, product manager — all working together through a structured pipeline, fully adapted to your codebase.
13
13
 
14
14
  ```bash
15
- npx specrails-core@latest init --root-dir .
15
+ claude plugin install sr # Claude Code plugin (recommended)
16
+ /specrails:setup # configure for your project
16
17
  ```
17
18
 
18
- > **Requirements:** [Claude Code](https://docs.anthropic.com/en/docs/claude-code) or [Codex CLI](https://github.com/openai/codex) (choose one), Node 18+, git
19
+ > **Requirements:** [Claude Code](https://docs.anthropic.com/en/docs/claude-code) or [Codex CLI](https://github.com/openai/codex) (choose one), git
19
20
 
20
21
  ---
21
22
 
@@ -26,7 +27,7 @@ Idea → Architecture → Implementation → Review → PR
26
27
  (sr-architect) (sr-developer) (sr-reviewer)
27
28
  ```
28
29
 
29
- Run `/sr:implement "add dark mode"` — the pipeline designs, builds, reviews, and ships a pull request. No hand-holding required.
30
+ Run `/specrails:implement "add dark mode"` — the pipeline designs, builds, reviews, and ships a pull request. No hand-holding required.
30
31
 
31
32
  Every artifact (agents, rules, personas) is generated **specifically for your project** by analyzing your actual codebase, tech stack, and CI setup. Not generic templates.
32
33
 
@@ -34,44 +35,69 @@ Every artifact (agents, rules, personas) is generated **specifically for your pr
34
35
 
35
36
  ## Quick start
36
37
 
37
- **1. Install**
38
+ ### Claude Code plugin (recommended)
38
39
 
39
40
  ```bash
40
- npx specrails-core@latest init --root-dir .
41
+ claude plugin install sr # install the sr plugin
42
+ /specrails:setup # run the 5-phase wizard (~5 min)
41
43
  ```
42
44
 
43
- **2. Run setup inside your AI CLI**
45
+ Updates automatically: `claude plugin update sr`
46
+
47
+ ### Scaffold method (alternative)
44
48
 
45
49
  ```bash
46
- claude # Claude Code
47
- # or
48
- codex # OpenAI Codex (beta)
49
- > /setup # run the 5-phase wizard (~5 min)
50
+ npx specrails-core@latest init --root-dir . # copy project files
51
+ /specrails:setup # run the wizard
50
52
  ```
51
53
 
52
- **3. Start building**
54
+ ### Start building
53
55
 
54
56
  ```bash
55
- > /sr:implement "add user authentication"
56
- > /sr:implement #1, #2 # from local tickets (default)
57
- > /sr:implement #42, #43 # from GitHub Issues (if configured)
58
- > /sr:update-product-driven-backlog # discover new features with AI
57
+ > /specrails:implement "add user authentication"
58
+ > /specrails:implement #1, #2 # from local tickets (default)
59
+ > /specrails:implement #42, #43 # from GitHub Issues (if configured)
60
+ > /specrails:update-product-driven-backlog # discover new features with AI
59
61
  ```
60
62
 
61
63
  That's it. The pipeline takes over.
62
64
 
63
65
  ---
64
66
 
67
+ ## Plugin vs scaffold
68
+
69
+ | | Plugin | Scaffold |
70
+ |--|--------|---------|
71
+ | **What it contains** | Agents, skills, hooks, references | Nothing — project data only |
72
+ | **Install** | `claude plugin install sr` | `npx specrails-core@latest init` |
73
+ | **Updates** | `claude plugin update sr` | Re-run npx |
74
+ | **Project data** | Generated by `/specrails:setup` into `.specrails/` | Same |
75
+ | **Use case** | Recommended for most projects | When you need full offline control |
76
+
77
+ The plugin contains the logic (agent prompts, skills, commands). Running `/specrails:setup` generates the project-specific data files (~8–10 files in `.specrails/`) — config, personas, memory, pipeline state. These are yours to edit and commit.
78
+
79
+ ---
80
+
65
81
  ## What gets installed
66
82
 
83
+ ### Plugin (logic — auto-updated via `claude plugin update sr`)
84
+
85
+ | Category | Location | Purpose |
86
+ |----------|----------|---------|
87
+ | **Agents** | Plugin | 14 specialized AI agents |
88
+ | **Commands** | Plugin | 17 workflow commands: `/specrails:implement`, `/specrails:product-backlog`, `/specrails:why`, and more |
89
+ | **Skills** | Plugin | OpenSpec skills (`/opsx:*`) included |
90
+ | **Hooks & References** | Plugin | Agent hooks, reference docs |
91
+
92
+ ### Project data (generated by `/specrails:setup` — lives in your repo)
93
+
67
94
  | Category | Files | Purpose |
68
95
  |----------|-------|---------|
69
- | **Agents** | `.claude/agents/*.md` | 14 specialized AI agents |
70
- | **Personas** | `.claude/agents/personas/*.md` | VPC user profiles, generated from your users |
71
- | **Commands** | `.claude/commands/sr/*.md` | 17 workflow commands: `/sr:implement`, `/sr:product-backlog`, `/sr:why`, and more |
72
- | **Rules** | `.claude/rules/*.md` | Per-layer coding conventions, loaded by file path |
73
- | **Memory** | `.claude/agent-memory/` | Persistent knowledge agents learn across sessions |
74
- | **Config** | `.claude/settings.json`, `CLAUDE.md` | Permissions, architecture reference |
96
+ | **Config** | `.specrails/config.yaml` | Stack, CI commands, git workflow |
97
+ | **Personas** | `.specrails/personas/*.md` | VPC user profiles, generated from your users |
98
+ | **Rules** | `.specrails/rules/*.md` | Per-layer coding conventions |
99
+ | **Memory** | `.specrails/agent-memory/` | Persistent knowledge agents learn across sessions |
100
+ | **Pipeline state** | `.specrails/pipeline/` | In-flight feature state for parallel builds |
75
101
 
76
102
  ---
77
103
 
@@ -113,12 +139,12 @@ SpecRails is not a chat interface. It's a **development pipeline** that coordina
113
139
 
114
140
  ## Commands
115
141
 
116
- ### `/sr:implement` — Build features
142
+ ### `/specrails:implement` — Build features
117
143
 
118
144
  ```bash
119
- /sr:implement "add dark mode" # from a description
120
- /sr:implement #85, #71 # from GitHub Issues
121
- /sr:implement UI, Analytics # explore areas, pick the best ideas
145
+ /specrails:implement "add dark mode" # from a description
146
+ /specrails:implement #85, #71 # from GitHub Issues
147
+ /specrails:implement UI, Analytics # explore areas, pick the best ideas
122
148
  ```
123
149
 
124
150
  Architect designs → developer builds → reviewer validates → PR created. Multiple features run in parallel with git worktrees.
@@ -128,8 +154,8 @@ Architect designs → developer builds → reviewer validates → PR created. Mu
128
154
  Not ready to commit? Run the full pipeline without touching git or GitHub:
129
155
 
130
156
  ```bash
131
- /sr:implement "add dark mode" --dry-run
132
- /sr:implement #85 --preview # --preview is an alias for --dry-run
157
+ /specrails:implement "add dark mode" --dry-run
158
+ /specrails:implement #85 --preview # --preview is an alias for --dry-run
133
159
  ```
134
160
 
135
161
  All agents run normally. Generated files land in `.claude/.dry-run/<feature-name>/` instead of your working tree. No branches, commits, PRs, or issue updates are created.
@@ -137,7 +163,7 @@ All agents run normally. Generated files land in `.claude/.dry-run/<feature-name
137
163
  When you're happy with the preview, apply the cached output:
138
164
 
139
165
  ```bash
140
- /sr:implement --apply add-dark-mode # copies files to real paths, then ships
166
+ /specrails:implement --apply add-dark-mode # copies files to real paths, then ships
141
167
  ```
142
168
 
143
169
  To discard without applying:
@@ -146,20 +172,20 @@ To discard without applying:
146
172
  rm -rf .claude/.dry-run/add-dark-mode/
147
173
  ```
148
174
 
149
- ### `/sr:product-backlog` — View prioritized backlog
175
+ ### `/specrails:product-backlog` — View prioritized backlog
150
176
 
151
177
  ```bash
152
- /sr:product-backlog # show all areas
153
- /sr:product-backlog UI, Decks # filter by area
178
+ /specrails:product-backlog # show all areas
179
+ /specrails:product-backlog UI, Decks # filter by area
154
180
  ```
155
181
 
156
182
  Reads your tickets (local or GitHub Issues), scores by VPC persona match, recommends top 3 for next sprint.
157
183
 
158
- ### `/sr:update-product-driven-backlog` — Discover features
184
+ ### `/specrails:update-product-driven-backlog` — Discover features
159
185
 
160
186
  ```bash
161
- /sr:update-product-driven-backlog # explore all areas
162
- /sr:update-product-driven-backlog Analytics # focus on one area
187
+ /specrails:update-product-driven-backlog # explore all areas
188
+ /specrails:update-product-driven-backlog Analytics # focus on one area
163
189
  ```
164
190
 
165
191
  AI product discovery using your personas. Evaluates ideas, creates tickets (local or GitHub Issues) for the best ones.
@@ -172,13 +198,13 @@ specrails-core ships with a built-in ticket system — no GitHub account or exte
172
198
 
173
199
  Tickets live in `.claude/local-tickets.json` alongside your code. They're plain JSON and git-friendly.
174
200
 
175
- **Local tickets are the default.** The `/setup` wizard defaults to local tickets and skips GitHub/JIRA credential setup unless you opt in.
201
+ **Local tickets are the default.** The `/specrails:setup` wizard defaults to local tickets and skips GitHub/JIRA credential setup unless you opt in.
176
202
 
177
203
  ```bash
178
- /sr:implement #1, #4 # implement by ticket ID
179
- /sr:product-backlog # view prioritized backlog
180
- /sr:update-product-driven-backlog # discover and create tickets with AI
181
- /sr:propose-spec # create a ticket from a spec proposal
204
+ /specrails:implement #1, #4 # implement by ticket ID
205
+ /specrails:product-backlog # view prioritized backlog
206
+ /specrails:update-product-driven-backlog # discover and create tickets with AI
207
+ /specrails:propose-spec # create a ticket from a spec proposal
182
208
  ```
183
209
 
184
210
  See [docs/local-tickets.md](./docs/local-tickets.md) for the full schema reference, concurrency model, and command integration details.
@@ -210,12 +236,11 @@ Each persona scores features 0-5. Features are ranked by score/effort ratio. No
210
236
  |------|----------|---------|
211
237
  | **Claude Code** | Yes | AI agent runtime — [install](https://docs.anthropic.com/en/docs/claude-code) |
212
238
  | **git** | Yes | Repository detection |
213
- | **npm / Node 18+** | Recommended | Needed for npx install and OpenSpec CLI |
214
- | **OpenSpec CLI** | Recommended | Structured design artifacts for `/sr:implement` |
239
+ | **npm / Node 18+** | For scaffold method only | Needed for `npx specrails-core@latest init` |
215
240
  | **GitHub CLI** (`gh`) | Optional | Backlog sync to GitHub Issues, PR creation. Not needed with local tickets. |
216
241
  | **JIRA CLI** (`jira`) | Optional | Backlog sync to JIRA. Not needed with local tickets. |
217
242
 
218
- The installer checks for each tool and offers to install missing ones.
243
+ The plugin method has no Node.js requirement. The scaffold method checks for prerequisites and offers to install missing ones.
219
244
 
220
245
  ---
221
246
 
@@ -245,26 +270,29 @@ Stack-agnostic. The `/setup` wizard detects and adapts to whatever you're runnin
245
270
  ## FAQ
246
271
 
247
272
  **Can I customize the agents after installation?**
248
- Yes. The generated files in `.claude/` are yours to edit — plain markdown. Edit agent personalities, adjust CI commands, add rules, create personas.
273
+ With the plugin method, project data files in `.specrails/` are yours to edit — personas, rules, config. With the scaffold method, `.claude/` agent files are also editable. To update plugin logic, run `claude plugin update sr`.
249
274
 
250
275
  **Can I re-run setup?**
251
- Run `npx specrails-core@latest init --root-dir <path>` again to re-scaffold, then `/setup`.
276
+ Run `/specrails:setup` again at any time to regenerate or update project data files.
252
277
 
253
- **Does this work without OpenSpec?**
254
- Partially. Product discovery commands and individual agents work. `/sr:implement` and sr-architect rely on OpenSpec for structured design artifacts.
278
+ **Plugin vs scaffold which should I use?**
279
+ Plugin is recommended: it has no Node.js requirement, updates automatically, and separates logic from project data. Use scaffold if you need full offline control or want to version the agent prompts themselves.
255
280
 
256
281
  **Does this work without GitHub CLI?**
257
- Yes. Local tickets are the default and need no external tools. `/sr:implement "description"` also works without `gh` — it just skips automated PR creation.
282
+ Yes. Local tickets are the default and need no external tools. `/specrails:implement "description"` also works without `gh` — it just skips automated PR creation.
258
283
 
259
284
  **Can I use local tickets and GitHub Issues together?**
260
285
  Not simultaneously for the same project — backlog commands use one active provider at a time. You can migrate from GitHub Issues to local tickets using the [migration guide](./docs/migration-guide.md).
261
286
 
262
287
  **How much does it cost to run?**
263
- A full `/sr:implement` cycle for one feature typically costs a few dollars in Claude API usage. The sr-product-manager uses Opus; all other agents use Sonnet or Haiku.
288
+ A full `/specrails:implement` cycle for one feature typically costs a few dollars in Claude API usage. The sr-product-manager uses Opus; all other agents use Sonnet or Haiku.
264
289
 
265
290
  **Does it work with private repos?**
266
291
  Yes. Everything runs locally through Claude Code. No external services beyond the Claude API.
267
292
 
293
+ **How do I use SpecRails with Codex?**
294
+ Codex uses the scaffold method: `npx specrails-core@latest init --root-dir .`. See [docs/user-docs/getting-started-codex.md](./docs/user-docs/getting-started-codex.md).
295
+
268
296
  ---
269
297
 
270
298
  ## Also in the SpecRails ecosystem
package/bin/doctor.sh CHANGED
@@ -108,7 +108,7 @@ echo ""
108
108
 
109
109
  if [[ "${FAIL}" -eq 0 ]]; then
110
110
  TOTAL=$((PASS + FAIL))
111
- echo -e "All ${TOTAL} checks passed. Run ${BOLD}/sr:product-backlog${NC} to get started."
111
+ echo -e "All ${TOTAL} checks passed. Run ${BOLD}/specrails:product-backlog${NC} to get started."
112
112
  else
113
113
  echo "${FAIL} check(s) failed."
114
114
  fi
@@ -35,7 +35,7 @@ Each check is displayed as ✅ (pass) or ❌ (fail with fix instruction).
35
35
 
36
36
  On all checks passed:
37
37
  ```
38
- All 6 checks passed. Run /sr:product-backlog to get started.
38
+ All 6 checks passed. Run /specrails:product-backlog to get started.
39
39
  ```
40
40
 
41
41
  On failure:
package/commands/setup.md CHANGED
@@ -52,9 +52,9 @@ Read the following files to understand the current installation state:
52
52
  ```
53
53
  Template files are named with `sr-` prefix (e.g., `sr-architect.md`, `sr-developer.md`).
54
54
 
55
- 5. List all template files in `$SPECRAILS_DIR/setup-templates/commands/sr/` — these are the NEW command templates from the update:
55
+ 5. List all template files in `$SPECRAILS_DIR/setup-templates/commands/specrails/` — these are the NEW command templates from the update:
56
56
  ```bash
57
- ls $SPECRAILS_DIR/setup-templates/commands/sr/
57
+ ls $SPECRAILS_DIR/setup-templates/commands/specrails/
58
58
  ```
59
59
  Command template files include `implement.md`, `batch-implement.md`, `compat-check.md`, `refactor-recommender.md`, `why.md`, `product-backlog.md`, `update-product-driven-backlog.md`.
60
60
  If this directory does not exist, skip command template checking for this update.
@@ -94,16 +94,16 @@ Build three lists for agents:
94
94
  2. **New agents**: template file exists in `.claude/setup-templates/agents/` but the agent name is NOT in the manifest → mark for evaluation
95
95
  3. **Unchanged agents**: agent name exists in manifest AND checksum matches → skip
96
96
 
97
- **Command templates:** If `.claude/setup-templates/commands/sr/` exists, for each command template file, find its entry in the manifest's `artifacts` map (keyed as `templates/commands/sr/<name>.md`). Compute the SHA-256 checksum of the corresponding file in `.claude/setup-templates/commands/sr/`:
97
+ **Command templates:** If `.claude/setup-templates/commands/specrails/` exists, for each command template file, find its entry in the manifest's `artifacts` map (keyed as `templates/commands/specrails/<name>.md`). Compute the SHA-256 checksum of the corresponding file in `.claude/setup-templates/commands/specrails/`:
98
98
 
99
99
  ```bash
100
- sha256sum .claude/setup-templates/commands/sr/<name>.md
100
+ sha256sum .claude/setup-templates/commands/specrails/<name>.md
101
101
  ```
102
102
 
103
103
  Build three lists for commands:
104
104
 
105
105
  1. **Changed commands**: command name exists in manifest AND the current template checksum differs from the manifest checksum → mark for update
106
- 2. **New commands**: template file exists in `.claude/setup-templates/commands/sr/` but the command name is NOT in the manifest → mark for evaluation
106
+ 2. **New commands**: template file exists in `.claude/setup-templates/commands/specrails/` but the command name is NOT in the manifest → mark for evaluation
107
107
  3. **Unchanged commands**: command name exists in manifest AND checksum matches → skip
108
108
 
109
109
  Display the combined analysis to the user:
@@ -176,7 +176,7 @@ grep -r '{{[A-Z_]*}}' .codex/agents/sr-*.toml 2>/dev/null || echo "OK: no broken
176
176
  For each command in the "changed commands" list from Phase U3:
177
177
 
178
178
  1. Read the NEW template:
179
- - If `cli_provider == "claude"`: from `$SPECRAILS_DIR/setup-templates/commands/sr/<name>.md`
179
+ - If `cli_provider == "claude"`: from `$SPECRAILS_DIR/setup-templates/commands/specrails/<name>.md`
180
180
  - If `cli_provider == "codex"`: from `$SPECRAILS_DIR/setup-templates/skills/sr-<name>/SKILL.md`
181
181
  2. Read stored backlog configuration from `$SPECRAILS_DIR/backlog-config.json` (if it exists) to resolve provider-specific placeholders:
182
182
  - `BACKLOG_PROVIDER` → `provider` field (`github`, `jira`, or `none`)
@@ -194,16 +194,16 @@ For each command in the "changed commands" list from Phase U3:
194
194
  - `{{BACKLOG_PREFLIGHT}}` → provider-specific preflight check from backlog config
195
195
  - Any other `{{PLACEHOLDER}}` values → use Phase U2 analysis data
196
196
  4. Write the updated file:
197
- - If `cli_provider == "claude"`: to `.claude/commands/sr/<name>.md`
197
+ - If `cli_provider == "claude"`: to `.claude/commands/specrails/<name>.md`
198
198
  - If `cli_provider == "codex"`: to `.agents/skills/sr-<name>/SKILL.md`
199
199
  5. Show:
200
- - If `cli_provider == "claude"`: `✓ Updated /sr:<name>`
200
+ - If `cli_provider == "claude"`: `✓ Updated /specrails:<name>`
201
201
  - If `cli_provider == "codex"`: `✓ Updated $sr-<name>`
202
202
 
203
203
  After updating all changed commands/skills, verify no unresolved placeholders remain:
204
204
  ```bash
205
205
  # If cli_provider == "claude":
206
- grep -l '{{[A-Z_]*}}' .claude/commands/sr/*.md 2>/dev/null || echo "OK: no broken placeholders"
206
+ grep -l '{{[A-Z_]*}}' .claude/commands/specrails/*.md 2>/dev/null || echo "OK: no broken placeholders"
207
207
  # If cli_provider == "codex":
208
208
  grep -rl '{{[A-Z_]*}}' .agents/skills/sr-*/SKILL.md 2>/dev/null || echo "OK: no broken placeholders"
209
209
  ```
@@ -230,17 +230,17 @@ For each agent in the "new" list:
230
230
  For each command in the "new commands" list from Phase U3:
231
231
 
232
232
  1. Read the template:
233
- - If `cli_provider == "claude"`: from `$SPECRAILS_DIR/setup-templates/commands/sr/<name>.md`
233
+ - If `cli_provider == "claude"`: from `$SPECRAILS_DIR/setup-templates/commands/specrails/<name>.md`
234
234
  - If `cli_provider == "codex"`: from `$SPECRAILS_DIR/setup-templates/skills/sr-<name>/SKILL.md`
235
235
  2. Prompt the user:
236
- - If `cli_provider == "claude"`: `"New command available: /sr:<name> — [one-line description]. Install it? [Y/n]"`
236
+ - If `cli_provider == "claude"`: `"New command available: /specrails:<name> — [one-line description]. Install it? [Y/n]"`
237
237
  - If `cli_provider == "codex"`: `"New skill available: $sr-<name> — [one-line description]. Install it? [Y/n]"`
238
238
  3. If the user accepts (or presses Enter):
239
239
  - Apply placeholder substitution using the same rules as Phase U4b (backlog config + codebase analysis)
240
- - If `cli_provider == "claude"`: write to `.claude/commands/sr/<name>.md` — show `✓ Added /sr:<name>`
240
+ - If `cli_provider == "claude"`: write to `.claude/commands/specrails/<name>.md` — show `✓ Added /specrails:<name>`
241
241
  - If `cli_provider == "codex"`: write to `.agents/skills/sr-<name>/SKILL.md` — show `✓ Added $sr-<name>`
242
242
  4. If the user declines:
243
- - If `cli_provider == "claude"`: show `→ Skipped /sr:<name>`
243
+ - If `cli_provider == "claude"`: show `→ Skipped /specrails:<name>`
244
244
  - If `cli_provider == "codex"`: show `→ Skipped $sr-<name>`
245
245
 
246
246
  ### Phase U6: Update Workflow Commands
@@ -248,12 +248,12 @@ For each command in the "new commands" list from Phase U3:
248
248
  If any new agents were added in Phase U5:
249
249
 
250
250
  1. Read the implement command/skill:
251
- - If `cli_provider == "claude"`: `.claude/commands/sr/implement.md`
251
+ - If `cli_provider == "claude"`: `.claude/commands/specrails/implement.md`
252
252
  - If `cli_provider == "codex"`: `.agents/skills/sr-implement/SKILL.md`
253
253
  2. Check if the file references agent names in its orchestration steps (look for `sr-architect`, `sr-developer`, `sr-reviewer` etc.)
254
254
  3. If newly added agents belong in the implementation pipeline (i.e., they are layer-specific developers such as `sr-frontend-developer` or `sr-backend-developer`), add them to the appropriate step in the implement command — specifically where parallel developer agents are launched
255
255
  4. Write the updated file if any changes were made:
256
- - If `cli_provider == "claude"`: `.claude/commands/sr/implement.md`
256
+ - If `cli_provider == "claude"`: `.claude/commands/specrails/implement.md`
257
257
  - If `cli_provider == "codex"`: `.agents/skills/sr-implement/SKILL.md`
258
258
  5. Show which commands were updated, or "No command updates needed" if nothing changed
259
259
 
@@ -301,7 +301,7 @@ All agents and commands are now up to date.
301
301
  Update `.specrails-manifest.json` to reflect the new checksums for all regenerated/updated and added agents and commands:
302
302
  - For each regenerated agent: update its checksum entry to the new template's checksum (keyed as `templates/agents/sr-<name>.md`)
303
303
  - For each added agent: add a new entry with its checksum
304
- - For each updated command: update its checksum entry to the new template's checksum (keyed as `templates/commands/sr/<name>.md`)
304
+ - For each updated command: update its checksum entry to the new template's checksum (keyed as `templates/commands/specrails/<name>.md`)
305
305
  - For each added command: add a new entry with its checksum
306
306
  - Update the `version` field to the version read from `.specrails-version`
307
307
 
@@ -351,9 +351,9 @@ Store as `QS_IS_EXISTING_CODEBASE=true/false`.
351
351
  Before generating files, check if this is a re-run:
352
352
 
353
353
  1. Check if commands/skills already exist:
354
- - If `cli_provider == "claude"`: check if `.claude/commands/sr/` directory exists with any `.md` files:
354
+ - If `cli_provider == "claude"`: check if `.claude/commands/specrails/` directory exists with any `.md` files:
355
355
  ```bash
356
- ls .claude/commands/sr/*.md 2>/dev/null
356
+ ls .claude/commands/specrails/*.md 2>/dev/null
357
357
  ```
358
358
  - If `cli_provider == "codex"`: check if `.agents/skills/sr-*/SKILL.md` files exist:
359
359
  ```bash
@@ -364,13 +364,13 @@ Before generating files, check if this is a re-run:
364
364
 
365
365
  In re-run mode, QS3 executes in **gap-fill mode** for command/skill files:
366
366
  - For each command in the list, check if it already exists:
367
- - If `cli_provider == "claude"`: at `.claude/commands/sr/<name>.md`
367
+ - If `cli_provider == "claude"`: at `.claude/commands/specrails/<name>.md`
368
368
  - If `cli_provider == "codex"`: at `.agents/skills/sr-<name>/SKILL.md`
369
369
  - If it exists: skip it and show:
370
- - Claude: `✓ Already installed: /sr:<name>`
370
+ - Claude: `✓ Already installed: /specrails:<name>`
371
371
  - Codex: `✓ Already installed: $sr-<name>`
372
372
  - If it does NOT exist: install it and show:
373
- - Claude: `✓ Added /sr:<name> (was missing)`
373
+ - Claude: `✓ Added /specrails:<name> (was missing)`
374
374
  - Codex: `✓ Added $sr-<name> (was missing)`
375
375
  - Do NOT prompt the user for confirmation on missing files — install them automatically
376
376
 
@@ -436,11 +436,11 @@ Core commands (always install if missing):
436
436
 
437
437
  **If `cli_provider == "claude"`:**
438
438
 
439
- If `QS_IS_RERUN=false` (fresh install): for each core command, read the template from `$SPECRAILS_DIR/setup-templates/commands/sr/<name>.md`, substitute the backlog placeholders with local values (using the same table as Phase 4.3 "Local Tickets"), stub all persona placeholders with `(Lite Mode — run /setup to configure personas)`, then write to `.claude/commands/sr/<name>.md`.
439
+ If `QS_IS_RERUN=false` (fresh install): for each core command, read the template from `$SPECRAILS_DIR/setup-templates/commands/specrails/<name>.md`, substitute the backlog placeholders with local values (using the same table as Phase 4.3 "Local Tickets"), stub all persona placeholders with `(Lite Mode — run /setup to configure personas)`, then write to `.claude/commands/specrails/<name>.md`.
440
440
 
441
- If `QS_IS_RERUN=true` (gap-fill mode): for each command in the list above, check if `.claude/commands/sr/<name>.md` already exists:
442
- - If it exists: skip it — show `✓ Already installed: /sr:<name>`
443
- - If it does NOT exist: read template, substitute placeholders as above, write to `.claude/commands/sr/<name>.md` — show `✓ Added /sr:<name> (was missing)`
441
+ If `QS_IS_RERUN=true` (gap-fill mode): for each command in the list above, check if `.claude/commands/specrails/<name>.md` already exists:
442
+ - If it exists: skip it — show `✓ Already installed: /specrails:<name>`
443
+ - If it does NOT exist: read template, substitute placeholders as above, write to `.claude/commands/specrails/<name>.md` — show `✓ Added /specrails:<name> (was missing)`
444
444
 
445
445
  **If `cli_provider == "codex"`:**
446
446
 
@@ -461,25 +461,25 @@ Remove `commands/setup.md` from `.claude/commands/` if it was copied there by th
461
461
  After generating all files, display the setup complete message.
462
462
 
463
463
  Then, based on `QS_IS_EXISTING_CODEBASE`:
464
- - **Existing codebase** (`true`): recommend `/sr:refactor-recommender`
465
- - **New project** (`false`): recommend `/sr:product-backlog`
464
+ - **Existing codebase** (`true`): recommend `/specrails:refactor-recommender`
465
+ - **New project** (`false`): recommend `/specrails:product-backlog`
466
466
 
467
467
  If `QS_IS_RERUN=false`, display:
468
468
  ```
469
469
  ✅ Setup complete.
470
470
 
471
471
  Try your first command:
472
- > /sr:product-backlog
472
+ > /specrails:product-backlog
473
473
  ```
474
- (Replace `/sr:product-backlog` with `/sr:refactor-recommender` for existing codebases.)
474
+ (Replace `/specrails:product-backlog` with `/specrails:refactor-recommender` for existing codebases.)
475
475
 
476
476
  If `QS_IS_RERUN=true`, display the gap-fill summary and stop:
477
477
  ```
478
478
  ✅ Re-run complete.
479
479
 
480
480
  Commands status:
481
- ✓ Already installed: /sr:<name>
482
- ✓ Added /sr:<name> (was missing)
481
+ ✓ Already installed: /specrails:<name>
482
+ ✓ Added /specrails:<name> (was missing)
483
483
  [... one line per command ...]
484
484
 
485
485
  All commands are up to date.
@@ -913,8 +913,8 @@ Store the full configuration in `.claude/backlog-config.json`:
913
913
 
914
914
  #### If None
915
915
 
916
- - Skip `/sr:product-backlog` and `/sr:update-product-driven-backlog` commands.
917
- - The `/sr:implement` command will still work with text descriptions.
916
+ - Skip `/specrails:product-backlog` and `/specrails:update-product-driven-backlog` commands.
917
+ - The `/specrails:implement` command will still work with text descriptions.
918
918
 
919
919
  ### 3.3 Git & shipping workflow
920
920
 
@@ -943,14 +943,14 @@ If automatic, also check if `gh` is authenticated (for PR creation). If not, war
943
943
 
944
944
  | Command | Purpose | Requires |
945
945
  |---------|---------|----------|
946
- | /sr:implement | Full pipeline: sr-architect → sr-developer → sr-reviewer → ship | sr-architect + sr-developer + sr-reviewer |
947
- | /sr:batch-implement | Orchestrate multiple features in dependency-aware waves | sr-architect + sr-developer + sr-reviewer |
948
- | /sr:propose-spec | Interactively propose and refine a feature spec, then create a GitHub issue | GitHub CLI |
949
- | /sr:product-backlog | View prioritized backlog with VPC scores | sr-product-analyst + Backlog provider |
950
- | /sr:update-product-driven-backlog | Generate new feature ideas via product discovery | sr-product-manager + Backlog provider |
951
- | /sr:compat-check | Snapshot API surface and detect breaking changes | None |
952
- | /sr:refactor-recommender | Scan for refactoring opportunities ranked by impact/effort | None |
953
- | /sr:why | Search past architectural decisions from agent memory | None |
946
+ | /specrails:implement | Full pipeline: sr-architect → sr-developer → sr-reviewer → ship | sr-architect + sr-developer + sr-reviewer |
947
+ | /specrails:batch-implement | Orchestrate multiple features in dependency-aware waves | sr-architect + sr-developer + sr-reviewer |
948
+ | /specrails:propose-spec | Interactively propose and refine a feature spec, then create a GitHub issue | GitHub CLI |
949
+ | /specrails:product-backlog | View prioritized backlog with VPC scores | sr-product-analyst + Backlog provider |
950
+ | /specrails:update-product-driven-backlog | Generate new feature ideas via product discovery | sr-product-manager + Backlog provider |
951
+ | /specrails:compat-check | Snapshot API surface and detect breaking changes | None |
952
+ | /specrails:refactor-recommender | Scan for refactoring opportunities ranked by impact/effort | None |
953
+ | /specrails:why | Search past architectural decisions from agent memory | None |
954
954
 
955
955
  [All] [Custom selection]
956
956
  ```
@@ -1078,21 +1078,21 @@ Write each persona to `$SPECRAILS_DIR/agents/personas/`:
1078
1078
  For each selected command, read the template and adapt.
1079
1079
 
1080
1080
  **If `cli_provider == "claude"` (default):**
1081
- - `setup-templates/commands/sr/implement.md` → `.claude/commands/sr/implement.md`
1082
- - `setup-templates/commands/sr/batch-implement.md` → `.claude/commands/sr/batch-implement.md`
1083
- - `setup-templates/commands/sr/propose-spec.md` → `.claude/commands/sr/propose-spec.md`
1084
- - `setup-templates/commands/sr/product-backlog.md` → `.claude/commands/sr/product-backlog.md` (if `BACKLOG_PROVIDER != none`)
1085
- - `setup-templates/commands/sr/update-product-driven-backlog.md` → `.claude/commands/sr/update-product-driven-backlog.md` (if `BACKLOG_PROVIDER != none`)
1086
- - `setup-templates/commands/sr/compat-check.md` → `.claude/commands/sr/compat-check.md`
1087
- - `setup-templates/commands/sr/refactor-recommender.md` → `.claude/commands/sr/refactor-recommender.md`
1088
- - `setup-templates/commands/sr/why.md` → `.claude/commands/sr/why.md`
1081
+ - `setup-templates/commands/specrails/implement.md` → `.claude/commands/specrails/implement.md`
1082
+ - `setup-templates/commands/specrails/batch-implement.md` → `.claude/commands/specrails/batch-implement.md`
1083
+ - `setup-templates/commands/specrails/propose-spec.md` → `.claude/commands/specrails/propose-spec.md`
1084
+ - `setup-templates/commands/specrails/product-backlog.md` → `.claude/commands/specrails/product-backlog.md` (if `BACKLOG_PROVIDER != none`)
1085
+ - `setup-templates/commands/specrails/update-product-driven-backlog.md` → `.claude/commands/specrails/update-product-driven-backlog.md` (if `BACKLOG_PROVIDER != none`)
1086
+ - `setup-templates/commands/specrails/compat-check.md` → `.claude/commands/specrails/compat-check.md`
1087
+ - `setup-templates/commands/specrails/refactor-recommender.md` → `.claude/commands/specrails/refactor-recommender.md`
1088
+ - `setup-templates/commands/specrails/why.md` → `.claude/commands/specrails/why.md`
1089
1089
 
1090
1090
  **If `cli_provider == "codex"`:**
1091
1091
  - `setup-templates/skills/sr-implement/SKILL.md` → `.agents/skills/sr-implement/SKILL.md`
1092
1092
  - `setup-templates/skills/sr-batch-implement/SKILL.md` → `.agents/skills/sr-batch-implement/SKILL.md`
1093
- - `setup-templates/commands/sr/propose-spec.md` → `.agents/skills/sr-propose-spec/SKILL.md` (wrap with YAML frontmatter if no skill template exists)
1094
- - `setup-templates/commands/sr/product-backlog.md` → `.agents/skills/sr-product-backlog/SKILL.md` (if `BACKLOG_PROVIDER != none`; wrap with frontmatter)
1095
- - `setup-templates/commands/sr/update-product-driven-backlog.md` → `.agents/skills/sr-update-product-driven-backlog/SKILL.md` (if `BACKLOG_PROVIDER != none`; wrap with frontmatter)
1093
+ - `setup-templates/commands/specrails/propose-spec.md` → `.agents/skills/sr-propose-spec/SKILL.md` (wrap with YAML frontmatter if no skill template exists)
1094
+ - `setup-templates/commands/specrails/product-backlog.md` → `.agents/skills/sr-product-backlog/SKILL.md` (if `BACKLOG_PROVIDER != none`; wrap with frontmatter)
1095
+ - `setup-templates/commands/specrails/update-product-driven-backlog.md` → `.agents/skills/sr-update-product-driven-backlog/SKILL.md` (if `BACKLOG_PROVIDER != none`; wrap with frontmatter)
1096
1096
  - `setup-templates/skills/sr-compat-check/SKILL.md` → `.agents/skills/sr-compat-check/SKILL.md`
1097
1097
  - `setup-templates/skills/sr-refactor-recommender/SKILL.md` → `.agents/skills/sr-refactor-recommender/SKILL.md`
1098
1098
  - `setup-templates/skills/sr-why/SKILL.md` → `.agents/skills/sr-why/SKILL.md`
@@ -1110,7 +1110,7 @@ metadata:
1110
1110
  ---
1111
1111
  ```
1112
1112
 
1113
- For both providers, create the output directory before writing (`mkdir -p` for `.claude/commands/sr/` or `.agents/skills/sr-<name>/`).
1113
+ For both providers, create the output directory before writing (`mkdir -p` for `.claude/commands/specrails/` or `.agents/skills/sr-<name>/`).
1114
1114
 
1115
1115
  Adapt:
1116
1116
  - CI commands to match detected stack
@@ -1315,7 +1315,7 @@ After cleanup, verify that only the intended files remain:
1315
1315
  # If cli_provider == "claude":
1316
1316
  ls .claude/agents/sr-*.md
1317
1317
  ls .claude/agents/personas/*.md
1318
- ls .claude/commands/sr/*.md
1318
+ ls .claude/commands/specrails/*.md
1319
1319
  ls .claude/rules/*.md
1320
1320
  ls .claude/agent-memory/
1321
1321
 
@@ -1371,14 +1371,14 @@ Display the complete installation summary:
1371
1371
  [If cli_provider == "claude":]
1372
1372
  | Command | File |
1373
1373
  |---------|------|
1374
- | /sr:implement | .claude/commands/sr/implement.md |
1375
- | /sr:batch-implement | .claude/commands/sr/batch-implement.md |
1376
- | /sr:propose-spec | .claude/commands/sr/propose-spec.md |
1377
- | /sr:product-backlog | .claude/commands/sr/product-backlog.md |
1378
- | /sr:update-product-driven-backlog | .claude/commands/sr/update-product-driven-backlog.md |
1379
- | /sr:compat-check | .claude/commands/sr/compat-check.md |
1380
- | /sr:refactor-recommender | .claude/commands/sr/refactor-recommender.md |
1381
- | /sr:why | .claude/commands/sr/why.md |
1374
+ | /specrails:implement | .claude/commands/specrails/implement.md |
1375
+ | /specrails:batch-implement | .claude/commands/specrails/batch-implement.md |
1376
+ | /specrails:propose-spec | .claude/commands/specrails/propose-spec.md |
1377
+ | /specrails:product-backlog | .claude/commands/specrails/product-backlog.md |
1378
+ | /specrails:update-product-driven-backlog | .claude/commands/specrails/update-product-driven-backlog.md |
1379
+ | /specrails:compat-check | .claude/commands/specrails/compat-check.md |
1380
+ | /specrails:refactor-recommender | .claude/commands/specrails/refactor-recommender.md |
1381
+ | /specrails:why | .claude/commands/specrails/why.md |
1382
1382
  [If cli_provider == "codex":]
1383
1383
  | Skill | File |
1384
1384
  |-------|------|
@@ -1410,9 +1410,9 @@ Note: Only commands/skills selected during setup are shown. Backlog commands are
1410
1410
  ### Next Steps
1411
1411
  [If cli_provider == "claude":]
1412
1412
  1. Review the generated files in .claude/
1413
- 2. Run `/sr:product-backlog` to see your backlog (if GitHub Issues exist)
1414
- 3. Run `/sr:update-product-driven-backlog` to generate feature ideas
1415
- 4. Run `/sr:implement #issue-number` to implement a feature
1413
+ 2. Run `/specrails:product-backlog` to see your backlog (if GitHub Issues exist)
1414
+ 3. Run `/specrails:update-product-driven-backlog` to generate feature ideas
1415
+ 4. Run `/specrails:implement #issue-number` to implement a feature
1416
1416
  5. Commit the .claude/ directory to version control
1417
1417
  [If cli_provider == "codex":]
1418
1418
  1. Review the generated files in .codex/ and .agents/skills/
@@ -1423,9 +1423,9 @@ Note: Only commands/skills selected during setup are shown. Backlog commands are
1423
1423
 
1424
1424
  ### Quick Start
1425
1425
  [If cli_provider == "claude":]
1426
- - `/sr:implement "describe a feature"` — implement something right now
1427
- - `/sr:product-backlog` — see prioritized feature ideas
1428
- - `/sr:update-product-driven-backlog` — discover new features using VPC
1426
+ - `/specrails:implement "describe a feature"` — implement something right now
1427
+ - `/specrails:product-backlog` — see prioritized feature ideas
1428
+ - `/specrails:update-product-driven-backlog` — discover new features using VPC
1429
1429
  [If cli_provider == "codex":]
1430
1430
  - `$sr-implement "describe a feature"` — implement something right now
1431
1431
  - `$sr-product-backlog` — see prioritized feature ideas
@@ -1442,7 +1442,7 @@ After displaying the setup complete summary above, detect the project type and o
1442
1442
 
1443
1443
  Try your first spec:
1444
1444
  [If cli_provider == "claude":]
1445
- > /sr:product-backlog
1445
+ > /specrails:product-backlog
1446
1446
  [If cli_provider == "codex":]
1447
1447
  > $sr-product-backlog
1448
1448
  ```
@@ -1453,7 +1453,7 @@ Try your first spec:
1453
1453
 
1454
1454
  Try your first spec:
1455
1455
  [If cli_provider == "claude":]
1456
- > /sr:refactor-recommender
1456
+ > /specrails:refactor-recommender
1457
1457
  [If cli_provider == "codex":]
1458
1458
  > $sr-refactor-recommender
1459
1459
  ```
package/docs/README.md CHANGED
@@ -13,9 +13,10 @@ Welcome to the SpecRails docs. This guide will take you from zero to a fully aut
13
13
 
14
14
  | Guide | What it covers |
15
15
  |-------|----------------|
16
- | [Installation & Setup](installation.md) | Detailed setup, prerequisites, the `/setup` wizard |
16
+ | [Installation & Setup](installation.md) | Detailed setup, prerequisites, the `/specrails:setup` wizard |
17
+ | [Plugin Architecture](plugin-architecture.md) | Plugin vs scaffold, what lives where, how updates work |
17
18
  | [Agents](agents.md) | Every agent explained — role, when it runs, why it exists |
18
- | [Workflows & Commands](workflows.md) | How to use `/sr:implement`, `/sr:product-backlog`, and more |
19
+ | [Workflows & Commands](workflows.md) | How to use `/specrails:implement`, `/specrails:product-backlog`, and more |
19
20
  | [Customization](customization.md) | Adapt agents, rules, personas, and conventions to your project |
20
21
  | [Updating](updating.md) | Keep SpecRails up to date without losing your customizations |
21
22