specrails-core 3.3.0 → 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 (66) hide show
  1. package/README.md +77 -63
  2. package/VERSION +1 -1
  3. package/bin/doctor.sh +1 -1
  4. package/bin/perf-check.sh +21 -0
  5. package/bin/specrails-core.js +7 -4
  6. package/commands/doctor.md +1 -1
  7. package/commands/setup.md +72 -79
  8. package/docs/README.md +3 -2
  9. package/docs/agents.md +15 -15
  10. package/docs/changelog.md +20 -20
  11. package/docs/concepts.md +3 -3
  12. package/docs/customization.md +18 -5
  13. package/docs/deployment.md +24 -9
  14. package/docs/getting-started.md +20 -27
  15. package/docs/installation.md +81 -72
  16. package/docs/local-tickets.md +14 -41
  17. package/docs/migration-guide.md +9 -10
  18. package/docs/playbook-parallel-dev.md +8 -8
  19. package/docs/playbook-product-discovery.md +1 -1
  20. package/docs/plugin-architecture.md +137 -0
  21. package/docs/research/codex-compatibility-analysis.md +11 -11
  22. package/docs/research/mcp-feasibility-analysis.md +5 -5
  23. package/docs/testing/test-matrix-codex.md +1 -2
  24. package/docs/user-docs/cli-reference.md +57 -69
  25. package/docs/user-docs/codex-vs-claude-code.md +7 -8
  26. package/docs/user-docs/faq.md +32 -26
  27. package/docs/user-docs/getting-started-codex.md +7 -7
  28. package/docs/user-docs/installation.md +50 -40
  29. package/docs/user-docs/quick-start.md +21 -27
  30. package/docs/workflows.md +62 -74
  31. package/install.sh +3 -3
  32. package/package.json +1 -1
  33. package/templates/agents/sr-merge-resolver.md +1 -1
  34. package/templates/claude-md/CLAUDE-quickstart.md +2 -2
  35. package/templates/commands/{sr → specrails}/batch-implement.md +18 -18
  36. package/templates/commands/{sr → specrails}/implement.md +8 -8
  37. package/templates/commands/{sr → specrails}/memory-inspect.md +3 -3
  38. package/templates/commands/{sr → specrails}/merge-resolve.md +1 -1
  39. package/templates/commands/{sr → specrails}/opsx-diff.md +1 -1
  40. package/templates/commands/{sr → specrails}/product-backlog.md +7 -7
  41. package/templates/commands/{sr → specrails}/propose-spec.md +1 -1
  42. package/templates/commands/{sr → specrails}/refactor-recommender.md +1 -1
  43. package/templates/commands/{sr → specrails}/retry.md +13 -13
  44. package/templates/commands/{sr → specrails}/team-debug.md +5 -5
  45. package/templates/commands/{sr → specrails}/team-review.md +4 -4
  46. package/templates/commands/{sr → specrails}/telemetry.md +2 -2
  47. package/templates/commands/{sr → specrails}/update-product-driven-backlog.md +2 -2
  48. package/templates/commands/{sr → specrails}/vpc-drift.md +4 -4
  49. package/templates/commands/{sr → specrails}/why.md +5 -5
  50. package/templates/commands/test.md +2 -2
  51. package/templates/skills/sr-batch-implement/SKILL.md +18 -18
  52. package/templates/skills/sr-implement/SKILL.md +8 -8
  53. package/templates/skills/sr-product-backlog/SKILL.md +7 -7
  54. package/templates/skills/sr-refactor-recommender/SKILL.md +1 -1
  55. package/templates/skills/sr-update-backlog/SKILL.md +2 -2
  56. package/templates/skills/sr-why/SKILL.md +5 -5
  57. package/update.sh +2 -3
  58. package/docs/api-reference.md +0 -266
  59. package/integration-contract.json +0 -45
  60. package/templates/local-tickets-schema.json +0 -7
  61. package/templates/skills/sr-health-check/SKILL.md +0 -531
  62. package/templates/web-manager/package-lock.json +0 -3740
  63. package/templates/web-manager/server/queue-manager.test.ts +0 -607
  64. package/templates/web-manager/server/queue-manager.ts +0 -565
  65. /package/templates/commands/{sr → specrails}/compat-check.md +0 -0
  66. /package/templates/commands/{sr → specrails}/health-check.md +0 -0
package/README.md CHANGED
@@ -12,22 +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
-
20
- <!--
21
- BOARD: Add demo GIF here — this is the #1 conversion driver on Product Hunt and npm.
22
- Record a 60-90s screen capture showing:
23
- 1. `npx specrails-core@latest init --root-dir .` running
24
- 2. The `/setup` wizard completing (phases 1-5)
25
- 3. `/sr:implement "add dark mode"` → agents working → PR created
26
- Recommended tools: Loom or QuickTime to record; Kap (https://getkap.co) to export as GIF.
27
- Then replace this comment with:
28
-
29
- ![specrails-core demo](./assets/demo.gif)
30
- -->
19
+ > **Requirements:** [Claude Code](https://docs.anthropic.com/en/docs/claude-code) or [Codex CLI](https://github.com/openai/codex) (choose one), git
31
20
 
32
21
  ---
33
22
 
@@ -38,7 +27,7 @@ Idea → Architecture → Implementation → Review → PR
38
27
  (sr-architect) (sr-developer) (sr-reviewer)
39
28
  ```
40
29
 
41
- 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.
42
31
 
43
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.
44
33
 
@@ -46,44 +35,69 @@ Every artifact (agents, rules, personas) is generated **specifically for your pr
46
35
 
47
36
  ## Quick start
48
37
 
49
- **1. Install**
38
+ ### Claude Code plugin (recommended)
50
39
 
51
40
  ```bash
52
- 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)
53
43
  ```
54
44
 
55
- **2. Run setup inside your AI CLI**
45
+ Updates automatically: `claude plugin update sr`
46
+
47
+ ### Scaffold method (alternative)
56
48
 
57
49
  ```bash
58
- claude # Claude Code
59
- # or
60
- codex # OpenAI Codex (beta)
61
- > /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
62
52
  ```
63
53
 
64
- **3. Start building**
54
+ ### Start building
65
55
 
66
56
  ```bash
67
- > /sr:implement "add user authentication"
68
- > /sr:implement #1, #2 # from local tickets (default)
69
- > /sr:implement #42, #43 # from GitHub Issues (if configured)
70
- > /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
71
61
  ```
72
62
 
73
63
  That's it. The pipeline takes over.
74
64
 
75
65
  ---
76
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
+
77
81
  ## What gets installed
78
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
+
79
94
  | Category | Files | Purpose |
80
95
  |----------|-------|---------|
81
- | **Agents** | `.claude/agents/*.md` | 14 specialized AI agents |
82
- | **Personas** | `.claude/agents/personas/*.md` | VPC user profiles, generated from your users |
83
- | **Commands** | `.claude/commands/sr/*.md` | 17 workflow commands: `/sr:implement`, `/sr:product-backlog`, `/sr:health-check`, `/sr:why`, and more |
84
- | **Rules** | `.claude/rules/*.md` | Per-layer coding conventions, loaded by file path |
85
- | **Memory** | `.claude/agent-memory/` | Persistent knowledge agents learn across sessions |
86
- | **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 |
87
101
 
88
102
  ---
89
103
 
@@ -125,12 +139,12 @@ SpecRails is not a chat interface. It's a **development pipeline** that coordina
125
139
 
126
140
  ## Commands
127
141
 
128
- ### `/sr:implement` — Build features
142
+ ### `/specrails:implement` — Build features
129
143
 
130
144
  ```bash
131
- /sr:implement "add dark mode" # from a description
132
- /sr:implement #85, #71 # from GitHub Issues
133
- /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
134
148
  ```
135
149
 
136
150
  Architect designs → developer builds → reviewer validates → PR created. Multiple features run in parallel with git worktrees.
@@ -140,8 +154,8 @@ Architect designs → developer builds → reviewer validates → PR created. Mu
140
154
  Not ready to commit? Run the full pipeline without touching git or GitHub:
141
155
 
142
156
  ```bash
143
- /sr:implement "add dark mode" --dry-run
144
- /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
145
159
  ```
146
160
 
147
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.
@@ -149,7 +163,7 @@ All agents run normally. Generated files land in `.claude/.dry-run/<feature-name
149
163
  When you're happy with the preview, apply the cached output:
150
164
 
151
165
  ```bash
152
- /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
153
167
  ```
154
168
 
155
169
  To discard without applying:
@@ -158,20 +172,20 @@ To discard without applying:
158
172
  rm -rf .claude/.dry-run/add-dark-mode/
159
173
  ```
160
174
 
161
- ### `/sr:product-backlog` — View prioritized backlog
175
+ ### `/specrails:product-backlog` — View prioritized backlog
162
176
 
163
177
  ```bash
164
- /sr:product-backlog # show all areas
165
- /sr:product-backlog UI, Decks # filter by area
178
+ /specrails:product-backlog # show all areas
179
+ /specrails:product-backlog UI, Decks # filter by area
166
180
  ```
167
181
 
168
182
  Reads your tickets (local or GitHub Issues), scores by VPC persona match, recommends top 3 for next sprint.
169
183
 
170
- ### `/sr:update-product-driven-backlog` — Discover features
184
+ ### `/specrails:update-product-driven-backlog` — Discover features
171
185
 
172
186
  ```bash
173
- /sr:update-product-driven-backlog # explore all areas
174
- /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
175
189
  ```
176
190
 
177
191
  AI product discovery using your personas. Evaluates ideas, creates tickets (local or GitHub Issues) for the best ones.
@@ -182,15 +196,15 @@ AI product discovery using your personas. Evaluates ideas, creates tickets (loca
182
196
 
183
197
  specrails-core ships with a built-in ticket system — no GitHub account or external tools required.
184
198
 
185
- Tickets live in `.claude/local-tickets.json` alongside your code. They're plain JSON, git-friendly, and bidirectionally synced with specrails-hub in real time.
199
+ Tickets live in `.claude/local-tickets.json` alongside your code. They're plain JSON and git-friendly.
186
200
 
187
- **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.
188
202
 
189
203
  ```bash
190
- /sr:implement #1, #4 # implement by ticket ID
191
- /sr:product-backlog # view prioritized backlog
192
- /sr:update-product-driven-backlog # discover and create tickets with AI
193
- /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
194
208
  ```
195
209
 
196
210
  See [docs/local-tickets.md](./docs/local-tickets.md) for the full schema reference, concurrency model, and command integration details.
@@ -222,12 +236,11 @@ Each persona scores features 0-5. Features are ranked by score/effort ratio. No
222
236
  |------|----------|---------|
223
237
  | **Claude Code** | Yes | AI agent runtime — [install](https://docs.anthropic.com/en/docs/claude-code) |
224
238
  | **git** | Yes | Repository detection |
225
- | **npm / Node 18+** | Recommended | Needed for npx install and OpenSpec CLI |
226
- | **OpenSpec CLI** | Recommended | Structured design artifacts for `/sr:implement` |
239
+ | **npm / Node 18+** | For scaffold method only | Needed for `npx specrails-core@latest init` |
227
240
  | **GitHub CLI** (`gh`) | Optional | Backlog sync to GitHub Issues, PR creation. Not needed with local tickets. |
228
241
  | **JIRA CLI** (`jira`) | Optional | Backlog sync to JIRA. Not needed with local tickets. |
229
242
 
230
- 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.
231
244
 
232
245
  ---
233
246
 
@@ -257,32 +270,33 @@ Stack-agnostic. The `/setup` wizard detects and adapts to whatever you're runnin
257
270
  ## FAQ
258
271
 
259
272
  **Can I customize the agents after installation?**
260
- 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`.
261
274
 
262
275
  **Can I re-run setup?**
263
- 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.
264
277
 
265
- **Does this work without OpenSpec?**
266
- 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.
267
280
 
268
281
  **Does this work without GitHub CLI?**
269
- 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.
270
283
 
271
284
  **Can I use local tickets and GitHub Issues together?**
272
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).
273
286
 
274
287
  **How much does it cost to run?**
275
- 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.
276
289
 
277
290
  **Does it work with private repos?**
278
291
  Yes. Everything runs locally through Claude Code. No external services beyond the Claude API.
279
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
+
280
296
  ---
281
297
 
282
298
  ## Also in the SpecRails ecosystem
283
299
 
284
- - **[specrails-hub](https://github.com/fjpulidop/specrails-hub)** — GUI for specrails-core. Manage your agents, run commands, and view pipeline results from a web interface.
285
- - **[specrails.dev](https://specrails.dev)** — Official website and documentation.
286
300
  - **Product Hunt** — [Vote for SpecRails on launch day](https://www.producthunt.com) _(link goes live on launch day — star this repo to get notified)_
287
301
 
288
302
  ---
package/VERSION CHANGED
@@ -1 +1 @@
1
- 2.1.0
1
+ 3.3.0
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
@@ -0,0 +1,21 @@
1
+ #!/bin/bash
2
+ # Performance regression check for specrails-core.
3
+ # This is a template/installer repo — no runtime benchmarks apply.
4
+ # Reports NO_PERF_IMPACT so the CI workflow exits cleanly.
5
+ set -euo pipefail
6
+
7
+ FILES="${MODIFIED_FILES_LIST:-}"
8
+ CONTEXT="${2:-}"
9
+
10
+ # Determine if any performance-sensitive files were modified.
11
+ # For specrails-core (a shell installer + markdown template repo), there are
12
+ # no runtime execution paths to benchmark. All changes are to installer scripts
13
+ # or template files that have no measurable latency or throughput impact.
14
+
15
+ echo "specrails-core performance check"
16
+ echo "Modified files: ${FILES:-<none>}"
17
+ echo ""
18
+ echo "This repository contains shell installer scripts and Markdown templates."
19
+ echo "No runtime benchmarks apply — skipping performance regression analysis."
20
+ echo ""
21
+ echo "PERF_STATUS: NO_PERF_IMPACT"
@@ -8,6 +8,7 @@ const COMMANDS = {
8
8
  init: "install.sh",
9
9
  update: "update.sh",
10
10
  doctor: "bin/doctor.sh",
11
+ "perf-check": "bin/perf-check.sh",
11
12
  };
12
13
 
13
14
  const args = process.argv.slice(2);
@@ -17,9 +18,10 @@ if (!subcommand) {
17
18
  console.log(`specrails-core — Agent Workflow System for Claude Code
18
19
 
19
20
  Usage:
20
- specrails-core init [--root-dir <path>] Install into a repository
21
- specrails-core update [--only <component>] Update an existing installation
22
- specrails-core doctor Run health checks
21
+ specrails-core init [--root-dir <path>] Install into a repository
22
+ specrails-core update [--only <component>] Update an existing installation
23
+ specrails-core doctor Run health checks
24
+ specrails-core perf-check [--files <list>] Performance regression check (CI)
23
25
 
24
26
  More info: https://github.com/fjpulidop/specrails-core`);
25
27
  process.exit(0);
@@ -29,7 +31,7 @@ const script = COMMANDS[subcommand];
29
31
 
30
32
  if (!script) {
31
33
  console.error(`Unknown command: ${subcommand}\n`);
32
- console.error("Available commands: init, update, doctor");
34
+ console.error("Available commands: init, update, doctor, perf-check");
33
35
  process.exit(1);
34
36
  }
35
37
 
@@ -40,6 +42,7 @@ const ALLOWED_FLAGS = {
40
42
  init: ["--root-dir", "--yes", "-y"],
41
43
  update: ["--only"],
42
44
  doctor: [],
45
+ "perf-check": ["--files", "--context"],
43
46
  };
44
47
 
45
48
  const subargs = args.slice(1);
@@ -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: