specrails-core 1.4.0 → 1.5.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 +104 -92
- package/commands/setup.md +27 -1
- package/package.json +1 -1
- package/templates/commands/sr/opsx-diff.md +419 -0
- package/templates/commands/sr/telemetry.md +552 -0
- package/templates/personas/the-maintainer.md +20 -0
package/README.md
CHANGED
|
@@ -1,76 +1,85 @@
|
|
|
1
1
|
# specrails-core
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/specrails-core)
|
|
4
|
+
[](https://github.com/fjpulidop/specrails-core)
|
|
4
5
|
[](https://opensource.org/licenses/MIT)
|
|
5
|
-
[](https://www.npmjs.com/package/specrails-core)
|
|
7
|
+
[](https://docs.anthropic.com/en/docs/claude-code)
|
|
6
8
|
|
|
7
|
-
**AI
|
|
9
|
+
**Your AI development team. From idea to production code.**
|
|
10
|
+
|
|
11
|
+
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.
|
|
8
12
|
|
|
9
13
|
```bash
|
|
10
|
-
npx specrails-core@latest init --root-dir
|
|
14
|
+
npx specrails-core@latest init --root-dir .
|
|
11
15
|
```
|
|
12
16
|
|
|
13
|
-
|
|
17
|
+
> **Requirements:** [Claude Code](https://docs.anthropic.com/en/docs/claude-code) (required), Node 18+, git
|
|
14
18
|
|
|
15
|
-
|
|
19
|
+
<!--
|
|
20
|
+
BOARD: Add demo GIF here — this is the #1 conversion driver on Product Hunt and npm.
|
|
21
|
+
Record a 60-90s screen capture showing:
|
|
22
|
+
1. `npx specrails-core@latest init --root-dir .` running
|
|
23
|
+
2. The `/setup` wizard completing (phases 1-5)
|
|
24
|
+
3. `/sr:implement "add dark mode"` → agents working → PR created
|
|
25
|
+
Recommended tools: Loom or QuickTime to record; Kap (https://getkap.co) to export as GIF.
|
|
26
|
+
Then replace this comment with:
|
|
16
27
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
(sr-product-manager) (sr-architect) (sr-developer) (sr-reviewer) (PR)
|
|
20
|
-
```
|
|
28
|
+

|
|
29
|
+
-->
|
|
21
30
|
|
|
22
|
-
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## How it works
|
|
23
34
|
|
|
24
35
|
```
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
/sr:implement UI, Analytics # explore areas, pick the best ideas
|
|
36
|
+
Idea → Architecture → Implementation → Review → PR
|
|
37
|
+
(sr-architect) (sr-developer) (sr-reviewer)
|
|
28
38
|
```
|
|
29
39
|
|
|
30
|
-
|
|
40
|
+
Run `/sr:implement "add dark mode"` — the pipeline designs, builds, reviews, and ships a pull request. No hand-holding required.
|
|
41
|
+
|
|
42
|
+
Every artifact (agents, rules, personas) is generated **specifically for your project** by analyzing your actual codebase, tech stack, and CI setup. Not generic templates.
|
|
31
43
|
|
|
32
44
|
---
|
|
33
45
|
|
|
34
46
|
## Quick start
|
|
35
47
|
|
|
36
|
-
**
|
|
48
|
+
**1. Install**
|
|
37
49
|
|
|
38
50
|
```bash
|
|
39
|
-
npx specrails-core@latest init --root-dir
|
|
51
|
+
npx specrails-core@latest init --root-dir .
|
|
40
52
|
```
|
|
41
53
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
**Step 2 — Run the setup wizard inside Claude Code**
|
|
54
|
+
**2. Run setup inside Claude Code**
|
|
45
55
|
|
|
46
56
|
```bash
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
> /setup # run the interactive setup wizard
|
|
57
|
+
claude # open Claude Code in your project
|
|
58
|
+
> /setup # run the 5-phase wizard (~5 min)
|
|
50
59
|
```
|
|
51
60
|
|
|
52
|
-
|
|
61
|
+
**3. Start building**
|
|
53
62
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
63
|
+
```bash
|
|
64
|
+
> /sr:implement "add user authentication"
|
|
65
|
+
> /sr:implement #42, #43 # from GitHub Issues
|
|
66
|
+
> /sr:update-product-driven-backlog # discover new features with AI
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
That's it. The pipeline takes over.
|
|
61
70
|
|
|
62
71
|
---
|
|
63
72
|
|
|
64
73
|
## What gets installed
|
|
65
74
|
|
|
66
|
-
| Category |
|
|
67
|
-
|
|
75
|
+
| Category | Files | Purpose |
|
|
76
|
+
|----------|-------|---------|
|
|
68
77
|
| **Agents** | `.claude/agents/*.md` | 12 specialized AI agents |
|
|
69
|
-
| **Personas** | `.claude/agents/personas/*.md` | VPC user profiles from
|
|
78
|
+
| **Personas** | `.claude/agents/personas/*.md` | VPC user profiles, generated from your users |
|
|
70
79
|
| **Commands** | `.claude/commands/sr/*.md` | `/sr:implement`, `/sr:product-backlog`, `/sr:update-product-driven-backlog` |
|
|
71
80
|
| **Rules** | `.claude/rules/*.md` | Per-layer coding conventions, loaded by file path |
|
|
72
|
-
| **Memory** | `.claude/agent-memory/` | Persistent
|
|
73
|
-
| **Config** | `.claude/settings.json`, `CLAUDE.md` | Permissions,
|
|
81
|
+
| **Memory** | `.claude/agent-memory/` | Persistent knowledge — agents learn across sessions |
|
|
82
|
+
| **Config** | `.claude/settings.json`, `CLAUDE.md` | Permissions, architecture reference |
|
|
74
83
|
|
|
75
84
|
---
|
|
76
85
|
|
|
@@ -82,7 +91,6 @@ Claude runs a 5-phase wizard that reads your actual codebase and generates every
|
|
|
82
91
|
| Adapts to your codebase | ✅ Reads your actual stack/CI | ⚠️ Prompts only | ❌ |
|
|
83
92
|
| Product-driven backlog | ✅ VPC persona scoring | ❌ | ❌ |
|
|
84
93
|
| Parallel feature builds | ✅ Git worktrees | ❌ | ❌ |
|
|
85
|
-
| Dry-run / preview mode | ✅ Preview before committing | ❌ | ❌ |
|
|
86
94
|
| Institutional memory | ✅ Agents learn across sessions | ❌ | ❌ |
|
|
87
95
|
| Open source | ✅ MIT | N/A | ❌ |
|
|
88
96
|
|
|
@@ -94,37 +102,32 @@ SpecRails is not a chat interface. It's a **development pipeline** that coordina
|
|
|
94
102
|
|
|
95
103
|
| Agent | Model | Role |
|
|
96
104
|
|-------|-------|------|
|
|
97
|
-
| **sr-architect** | Sonnet | Designs features
|
|
98
|
-
| **sr-developer** | Sonnet | Full-stack implementation
|
|
105
|
+
| **sr-architect** | Sonnet | Designs features: proposal, technical design, task breakdown |
|
|
106
|
+
| **sr-developer** | Sonnet | Full-stack implementation |
|
|
99
107
|
| **sr-backend-developer** | Sonnet | Backend-specialized implementation |
|
|
100
108
|
| **sr-frontend-developer** | Sonnet | Frontend-specialized implementation |
|
|
101
|
-
| **sr-reviewer** | Sonnet |
|
|
102
|
-
| **sr-backend-reviewer** | Sonnet | API design,
|
|
103
|
-
| **sr-frontend-reviewer** | Sonnet | UX
|
|
109
|
+
| **sr-reviewer** | Sonnet | Quality gate: runs CI, fixes issues, records learnings |
|
|
110
|
+
| **sr-backend-reviewer** | Sonnet | Backend code review: API design, DB patterns, performance |
|
|
111
|
+
| **sr-frontend-reviewer** | Sonnet | Frontend code review: UX, accessibility, component design |
|
|
104
112
|
| **sr-test-writer** | Sonnet | Generates unit, integration, and e2e tests |
|
|
105
|
-
| **sr-security-reviewer** | Sonnet | Secrets detection, OWASP checks, dependency
|
|
106
|
-
| **sr-doc-sync** | Sonnet |
|
|
107
|
-
| **sr-product-manager** | Opus |
|
|
113
|
+
| **sr-security-reviewer** | Sonnet | Secrets detection, OWASP checks, dependency vulnerabilities |
|
|
114
|
+
| **sr-doc-sync** | Sonnet | Updates changelogs, READMEs, API docs |
|
|
115
|
+
| **sr-product-manager** | Opus | Product discovery: competitive analysis, VPC evaluation |
|
|
108
116
|
| **sr-product-analyst** | Haiku | Read-only backlog analysis and prioritization |
|
|
109
117
|
|
|
110
|
-
The `/sr:implement` pipeline routes tasks to the right agent automatically based on layer tags.
|
|
111
|
-
|
|
112
118
|
---
|
|
113
119
|
|
|
114
|
-
##
|
|
120
|
+
## Commands
|
|
115
121
|
|
|
116
|
-
### `/sr:
|
|
122
|
+
### `/sr:implement` — Build features
|
|
117
123
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
/sr:
|
|
122
|
-
/sr:product-backlog UI, Decks # filter by area
|
|
124
|
+
```bash
|
|
125
|
+
/sr:implement "add dark mode" # from a description
|
|
126
|
+
/sr:implement #85, #71 # from GitHub Issues
|
|
127
|
+
/sr:implement UI, Analytics # explore areas, pick the best ideas
|
|
123
128
|
```
|
|
124
129
|
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
Analyzes your codebase against each persona's jobs/pains/gains, generates new feature ideas, and creates GitHub Issues for the best ones.
|
|
130
|
+
Architect designs → developer builds → reviewer validates → PR created. Multiple features run in parallel with git worktrees.
|
|
128
131
|
|
|
129
132
|
#### Dry-run / preview mode
|
|
130
133
|
|
|
@@ -135,7 +138,7 @@ Not ready to commit? Run the full pipeline without touching git or GitHub:
|
|
|
135
138
|
/sr:implement #85 --preview # --preview is an alias for --dry-run
|
|
136
139
|
```
|
|
137
140
|
|
|
138
|
-
All agents run normally
|
|
141
|
+
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.
|
|
139
142
|
|
|
140
143
|
When you're happy with the preview, apply the cached output:
|
|
141
144
|
|
|
@@ -151,27 +154,39 @@ rm -rf .claude/.dry-run/add-dark-mode/
|
|
|
151
154
|
|
|
152
155
|
### `/sr:product-backlog` — View prioritized backlog
|
|
153
156
|
|
|
157
|
+
```bash
|
|
158
|
+
/sr:product-backlog # show all areas
|
|
159
|
+
/sr:product-backlog UI, Decks # filter by area
|
|
154
160
|
```
|
|
161
|
+
|
|
162
|
+
Reads your GitHub Issues, scores by VPC persona match, recommends top 3 for next sprint.
|
|
163
|
+
|
|
164
|
+
### `/sr:update-product-driven-backlog` — Discover features
|
|
165
|
+
|
|
166
|
+
```bash
|
|
155
167
|
/sr:update-product-driven-backlog # explore all areas
|
|
156
168
|
/sr:update-product-driven-backlog Analytics # focus on one area
|
|
157
169
|
```
|
|
158
170
|
|
|
171
|
+
AI product discovery using your personas. Evaluates ideas, creates GitHub Issues for the best ones.
|
|
172
|
+
|
|
159
173
|
---
|
|
160
174
|
|
|
161
|
-
##
|
|
175
|
+
## VPC persona scoring
|
|
162
176
|
|
|
163
|
-
|
|
177
|
+
Features are scored against your user personas using the VPC framework:
|
|
164
178
|
|
|
165
179
|
```
|
|
166
180
|
+-----------------------------+ +-----------------------------+
|
|
167
181
|
| VALUE PROPOSITION | | CUSTOMER SEGMENT |
|
|
168
|
-
| | | |
|
|
169
182
|
| Products & Services <---+--->| Customer Jobs |
|
|
170
183
|
| Pain Relievers <---+--->| Pains |
|
|
171
184
|
| Gain Creators <---+--->| Gains |
|
|
172
185
|
+-----------------------------+ +-----------------------------+
|
|
173
186
|
```
|
|
174
187
|
|
|
188
|
+
Each persona scores features 0-5. Features are ranked by score/effort ratio. No gut-feel product decisions.
|
|
189
|
+
|
|
175
190
|
---
|
|
176
191
|
|
|
177
192
|
## Prerequisites
|
|
@@ -179,27 +194,25 @@ Every feature is evaluated against your user personas before implementation. Fea
|
|
|
179
194
|
| Tool | Required | Purpose |
|
|
180
195
|
|------|----------|---------|
|
|
181
196
|
| **Claude Code** | Yes | AI agent runtime — [install](https://docs.anthropic.com/en/docs/claude-code) |
|
|
182
|
-
| **
|
|
183
|
-
| **npm
|
|
184
|
-
| **OpenSpec CLI** | Recommended |
|
|
185
|
-
| **GitHub CLI** (`gh`) | Optional | Backlog sync
|
|
186
|
-
| **JIRA CLI** | Optional |
|
|
187
|
-
|
|
188
|
-
The installer checks for each tool and offers to install missing ones automatically.
|
|
197
|
+
| **git** | Yes | Repository detection |
|
|
198
|
+
| **npm / Node 18+** | Recommended | Needed for npx install and OpenSpec CLI |
|
|
199
|
+
| **OpenSpec CLI** | Recommended | Structured design artifacts for `/sr:implement` |
|
|
200
|
+
| **GitHub CLI** (`gh`) | Optional | Backlog sync to GitHub Issues, PR creation |
|
|
201
|
+
| **JIRA CLI** (`jira`) | Optional | Backlog sync to JIRA |
|
|
189
202
|
|
|
190
|
-
|
|
203
|
+
The installer checks for each tool and offers to install missing ones.
|
|
191
204
|
|
|
192
205
|
---
|
|
193
206
|
|
|
194
207
|
## Supported stacks
|
|
195
208
|
|
|
196
|
-
|
|
209
|
+
Stack-agnostic. The `/setup` wizard detects and adapts to whatever you're running:
|
|
197
210
|
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
211
|
+
**Backend:** Python/FastAPI, Node/Express, Go/Gin, Rust/Actix, Java/Spring, Ruby/Rails, .NET
|
|
212
|
+
**Frontend:** React, Vue, Angular, Svelte, Next.js, Nuxt
|
|
213
|
+
**Database:** PostgreSQL, MySQL, SQLite, MongoDB, Redis
|
|
214
|
+
**CI/CD:** GitHub Actions, GitLab CI, Jenkins, Makefile
|
|
215
|
+
**Testing:** pytest, vitest, jest, go test, cargo test, rspec
|
|
203
216
|
|
|
204
217
|
---
|
|
205
218
|
|
|
@@ -217,34 +230,33 @@ specrails-core is stack-agnostic — the setup wizard reads your actual files an
|
|
|
217
230
|
## FAQ
|
|
218
231
|
|
|
219
232
|
**Can I customize the agents after installation?**
|
|
220
|
-
Yes.
|
|
221
|
-
|
|
222
|
-
**How do I customize an agent's personality?**
|
|
223
|
-
Each agent template (`sr-architect`, `sr-developer`, `sr-reviewer`) includes a `## Personality` section with four configurable settings:
|
|
224
|
-
|
|
225
|
-
| Setting | Options | What it controls |
|
|
226
|
-
|---|---|---|
|
|
227
|
-
| `tone` | `terse` / `verbose` | How much explanation the agent includes in its output |
|
|
228
|
-
| `risk_tolerance` | `conservative` / `aggressive` | How cautious the agent is when making decisions |
|
|
229
|
-
| `detail_level` | `summary` / `full` | Granularity of output artifacts and reports |
|
|
230
|
-
| `focus_areas` | comma-separated keywords | Areas the agent prioritizes (e.g. `security, performance`) |
|
|
231
|
-
|
|
232
|
-
After running `/setup`, edit `.claude/agents/sr-architect.md` (or `sr-developer.md` / `sr-reviewer.md`) and change the values inline. Existing setups without a `## Personality` section continue to work unchanged — defaults apply.
|
|
233
|
+
Yes. The generated files in `.claude/` are yours to edit — plain markdown. Edit agent personalities, adjust CI commands, add rules, create personas.
|
|
233
234
|
|
|
234
235
|
**Can I re-run setup?**
|
|
235
236
|
Run `npx specrails-core@latest init --root-dir <path>` again to re-scaffold, then `/setup`.
|
|
236
237
|
|
|
237
238
|
**Does this work without OpenSpec?**
|
|
238
|
-
Partially. `/sr:implement` and sr-architect
|
|
239
|
+
Partially. Product discovery commands and individual agents work. `/sr:implement` and sr-architect rely on OpenSpec for structured design artifacts.
|
|
239
240
|
|
|
240
241
|
**Does this work without GitHub CLI?**
|
|
241
|
-
Yes.
|
|
242
|
+
Yes. Use JIRA instead, or skip backlog commands. `/sr:implement "description"` works without `gh` — it just skips automated PR creation.
|
|
243
|
+
|
|
244
|
+
**How much does it cost to run?**
|
|
245
|
+
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.
|
|
246
|
+
|
|
247
|
+
**Does it work with private repos?**
|
|
248
|
+
Yes. Everything runs locally through Claude Code. No external services beyond the Claude API.
|
|
249
|
+
|
|
250
|
+
---
|
|
251
|
+
|
|
252
|
+
## Also in the SpecRails ecosystem
|
|
242
253
|
|
|
243
|
-
**
|
|
244
|
-
|
|
254
|
+
- **[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.
|
|
255
|
+
- **[specrails.dev](https://specrails.dev)** — Official website and documentation.
|
|
256
|
+
- **Product Hunt** — [Vote for SpecRails on launch day](https://www.producthunt.com) _(link goes live on launch day — star this repo to get notified)_
|
|
245
257
|
|
|
246
258
|
---
|
|
247
259
|
|
|
248
260
|
## License
|
|
249
261
|
|
|
250
|
-
MIT
|
|
262
|
+
MIT — [fjpulidop](https://github.com/fjpulidop)
|
package/commands/setup.md
CHANGED
|
@@ -801,11 +801,37 @@ For each selected command, read the template and adapt:
|
|
|
801
801
|
|
|
802
802
|
Adapt:
|
|
803
803
|
- CI commands to match detected stack
|
|
804
|
-
- Persona references to match generated personas
|
|
804
|
+
- **Persona references** to match generated personas (see substitution rules below)
|
|
805
805
|
- File paths to match project structure
|
|
806
806
|
- Layer tags to match detected layers
|
|
807
807
|
- **Backlog provider commands** based on `BACKLOG_PROVIDER`:
|
|
808
808
|
|
|
809
|
+
#### Backlog command persona placeholder substitution
|
|
810
|
+
|
|
811
|
+
When adapting `update-product-driven-backlog.md` and `product-backlog.md`, substitute the persona placeholders based on the full persona set (user-generated personas + Maintainer if `IS_OSS=true`):
|
|
812
|
+
|
|
813
|
+
| Placeholder | Substitution rule |
|
|
814
|
+
|-------------|------------------|
|
|
815
|
+
| `{{PERSONA_FILE_READ_LIST}}` | One bullet per persona file: `- Read \`.claude/agents/personas/{name}.md\`` |
|
|
816
|
+
| `{{PERSONA_SCORE_HEADERS}}` | Column headers for each persona nickname: e.g., `Alex \| Sara \| Kai` |
|
|
817
|
+
| `{{PERSONA_SCORE_SEPARATORS}}` | One `------` separator per persona column |
|
|
818
|
+
| `{{PERSONA_FIT_FORMAT}}` | Inline score display: e.g., `Alex: X/5, Sara: X/5, Kai: X/5` |
|
|
819
|
+
| `{{PERSONA_VPC_SECTIONS}}` | One VPC section block per persona (see format below) |
|
|
820
|
+
| `{{MAX_SCORE}}` | Total max score = 5 × number of personas (e.g., `15` for 3 personas) |
|
|
821
|
+
| `{{PERSONA_NAMES_WITH_ROLES}}` | Comma-separated: e.g., `Alex (Lead Dev), Sara (Product Founder), Kai (OSS Maintainer)` |
|
|
822
|
+
|
|
823
|
+
**`{{PERSONA_VPC_SECTIONS}}` format** — repeat for each persona in order:
|
|
824
|
+
```
|
|
825
|
+
### "{Nickname}" — The {Role} (X/5)
|
|
826
|
+
- **Jobs addressed**: {list}
|
|
827
|
+
- **Pains relieved**: {list with severity}
|
|
828
|
+
- **Gains created**: {list with impact}
|
|
829
|
+
```
|
|
830
|
+
|
|
831
|
+
**Kai inclusion rule**: When `IS_OSS=true`, Kai (`sr-the-maintainer.md`) is always the last entry in persona lists and the rightmost column in scoring tables. Kai uses the evaluation criteria defined in `.claude/agents/personas/sr-the-maintainer.md` — features score high (4-5/5) for Kai when they reduce async review burden, enforce project-specific conventions, or automate release/dependency coordination; features score low (0-1/5) when they add configuration complexity or require paid tiers.
|
|
832
|
+
|
|
833
|
+
**When `IS_OSS=false`**: All Kai-related persona references are omitted. `{{MAX_SCORE}}` reduces by 5. Tables and inline scores contain only user-generated personas.
|
|
834
|
+
|
|
809
835
|
#### GitHub Issues (`BACKLOG_PROVIDER=github`)
|
|
810
836
|
- Issue fetch: `gh issue list --label "product-driven-backlog" --state open --limit 100 --json number,title,labels,body`
|
|
811
837
|
- Issue create: `gh issue create --title "..." --label "..." --body "..."`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "specrails-core",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.0",
|
|
4
4
|
"description": "AI agent workflow system for Claude Code — installs 12 specialized agents, orchestration commands, and persona-driven product discovery into any repository",
|
|
5
5
|
"bin": {
|
|
6
6
|
"specrails-core": "bin/specrails-core.js"
|