specrails-core 1.4.0 → 1.6.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 +136 -23
- 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
|
@@ -44,12 +44,21 @@ Read the following files to understand the current installation state:
|
|
|
44
44
|
|
|
45
45
|
2. Read `.specrails-version` — contains the current version string (e.g., `0.2.0`). If it does not exist, treat version as `0.1.0 (legacy)`.
|
|
46
46
|
|
|
47
|
-
3. List all template files in `.claude/setup-templates/agents/` — these are the NEW templates from the update:
|
|
47
|
+
3. List all template files in `.claude/setup-templates/agents/` — these are the NEW agent templates from the update:
|
|
48
48
|
```bash
|
|
49
49
|
ls .claude/setup-templates/agents/
|
|
50
50
|
```
|
|
51
51
|
Template files are named with `sr-` prefix (e.g., `sr-architect.md`, `sr-developer.md`).
|
|
52
52
|
|
|
53
|
+
4. List all template files in `.claude/setup-templates/commands/sr/` — these are the NEW command templates from the update:
|
|
54
|
+
```bash
|
|
55
|
+
ls .claude/setup-templates/commands/sr/
|
|
56
|
+
```
|
|
57
|
+
Command template files include `implement.md`, `batch-implement.md`, `health-check.md`, `compat-check.md`, `refactor-recommender.md`, `why.md`, `product-backlog.md`, `update-product-driven-backlog.md`.
|
|
58
|
+
If this directory does not exist, skip command template checking for this update.
|
|
59
|
+
|
|
60
|
+
5. Read `.claude/backlog-config.json` if it exists — contains stored provider configuration needed for command placeholder substitution.
|
|
61
|
+
|
|
53
62
|
### Phase U2: Quick Codebase Re-Analysis
|
|
54
63
|
|
|
55
64
|
Perform the same analysis as Phase 1 of the full setup wizard, but silently — do not prompt the user and do not show the findings table. Just execute and store results internally.
|
|
@@ -71,39 +80,62 @@ Store all results for use in Phases U4 and U5.
|
|
|
71
80
|
|
|
72
81
|
### Phase U3: Identify What Needs Regeneration
|
|
73
82
|
|
|
74
|
-
For each agent template, find its entry in the manifest's `artifacts` map (keyed as `templates/agents/sr-<name>.md`). Compute the SHA-256 checksum of the corresponding file in `.claude/setup-templates/agents/`:
|
|
83
|
+
**Agent templates:** For each agent template, find its entry in the manifest's `artifacts` map (keyed as `templates/agents/sr-<name>.md`). Compute the SHA-256 checksum of the corresponding file in `.claude/setup-templates/agents/`:
|
|
75
84
|
|
|
76
85
|
```bash
|
|
77
86
|
sha256sum .claude/setup-templates/agents/sr-<name>.md
|
|
78
87
|
```
|
|
79
88
|
|
|
80
|
-
Build three lists:
|
|
89
|
+
Build three lists for agents:
|
|
81
90
|
|
|
82
91
|
1. **Changed agents**: agent name exists in manifest AND the current template checksum differs from the manifest checksum → mark for regeneration
|
|
83
92
|
2. **New agents**: template file exists in `.claude/setup-templates/agents/` but the agent name is NOT in the manifest → mark for evaluation
|
|
84
93
|
3. **Unchanged agents**: agent name exists in manifest AND checksum matches → skip
|
|
85
94
|
|
|
86
|
-
|
|
95
|
+
**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/`:
|
|
87
96
|
|
|
97
|
+
```bash
|
|
98
|
+
sha256sum .claude/setup-templates/commands/sr/<name>.md
|
|
88
99
|
```
|
|
89
|
-
## Agent Update Analysis
|
|
90
100
|
|
|
91
|
-
|
|
101
|
+
Build three lists for commands:
|
|
102
|
+
|
|
103
|
+
1. **Changed commands**: command name exists in manifest AND the current template checksum differs from the manifest checksum → mark for update
|
|
104
|
+
2. **New commands**: template file exists in `.claude/setup-templates/commands/sr/` but the command name is NOT in the manifest → mark for evaluation
|
|
105
|
+
3. **Unchanged commands**: command name exists in manifest AND checksum matches → skip
|
|
106
|
+
|
|
107
|
+
Display the combined analysis to the user:
|
|
108
|
+
|
|
109
|
+
```
|
|
110
|
+
## Update Analysis
|
|
111
|
+
|
|
112
|
+
### Agents — Changed Templates (will be regenerated)
|
|
92
113
|
- sr-architect.md (template modified)
|
|
93
114
|
- sr-developer.md (template modified)
|
|
94
115
|
|
|
95
|
-
### New Templates Available
|
|
116
|
+
### Agents — New Templates Available
|
|
96
117
|
- sr-frontend-developer.md
|
|
97
118
|
- sr-backend-developer.md
|
|
98
119
|
|
|
99
|
-
### Unchanged (keeping current)
|
|
120
|
+
### Agents — Unchanged (keeping current)
|
|
100
121
|
- sr-reviewer.md
|
|
101
122
|
- sr-product-manager.md
|
|
123
|
+
|
|
124
|
+
### Commands — Changed Templates (will be updated)
|
|
125
|
+
- implement.md (template modified)
|
|
126
|
+
|
|
127
|
+
### Commands — New Templates Available
|
|
128
|
+
- refactor-recommender.md
|
|
129
|
+
|
|
130
|
+
### Commands — Unchanged (keeping current)
|
|
131
|
+
- health-check.md
|
|
132
|
+
- compat-check.md
|
|
133
|
+
- why.md
|
|
102
134
|
```
|
|
103
135
|
|
|
104
|
-
If there are no changed agents and no new
|
|
136
|
+
If there are no changed agents, no new agents, no changed commands, and no new commands, display:
|
|
105
137
|
```
|
|
106
|
-
All agents are already up to date. Nothing to regenerate.
|
|
138
|
+
All agents and commands are already up to date. Nothing to regenerate.
|
|
107
139
|
```
|
|
108
140
|
Then jump to Phase U7.
|
|
109
141
|
|
|
@@ -133,6 +165,36 @@ After regenerating all changed agents, verify no unresolved placeholders remain:
|
|
|
133
165
|
grep -r '{{[A-Z_]*}}' .claude/agents/sr-*.md 2>/dev/null || echo "OK: no broken placeholders"
|
|
134
166
|
```
|
|
135
167
|
|
|
168
|
+
### Phase U4b: Update Changed Commands
|
|
169
|
+
|
|
170
|
+
For each command in the "changed commands" list from Phase U3:
|
|
171
|
+
|
|
172
|
+
1. Read the NEW template from `.claude/setup-templates/commands/sr/<name>.md`
|
|
173
|
+
2. Read stored backlog configuration from `.claude/backlog-config.json` (if it exists) to resolve provider-specific placeholders:
|
|
174
|
+
- `BACKLOG_PROVIDER` → `provider` field (`github`, `jira`, or `none`)
|
|
175
|
+
- `BACKLOG_WRITE` → `write_access` field
|
|
176
|
+
- `JIRA_BASE_URL` → `jira_base_url` field
|
|
177
|
+
- `JIRA_PROJECT_KEY` → `jira_project_key` field
|
|
178
|
+
3. Substitute all `{{PLACEHOLDER}}` values using the same rules as Phase 4.3 of the full setup:
|
|
179
|
+
- `{{CI_COMMANDS_BACKEND}}` → backend CI commands detected in Phase U2
|
|
180
|
+
- `{{CI_COMMANDS_FRONTEND}}` → frontend CI commands detected in Phase U2
|
|
181
|
+
- `{{DEPENDENCY_CHECK_COMMANDS}}` → stack-specific dependency check commands from Phase U2
|
|
182
|
+
- `{{TEST_RUNNER_CHECK}}` → test runner commands from Phase U2
|
|
183
|
+
- `{{BACKLOG_FETCH_CMD}}` → provider-specific fetch command from backlog config
|
|
184
|
+
- `{{BACKLOG_CREATE_CMD}}` → provider-specific create command from backlog config
|
|
185
|
+
- `{{BACKLOG_VIEW_CMD}}` → provider-specific view command from backlog config
|
|
186
|
+
- `{{BACKLOG_PREFLIGHT}}` → provider-specific preflight check from backlog config
|
|
187
|
+
- Any other `{{PLACEHOLDER}}` values → use Phase U2 analysis data
|
|
188
|
+
4. Write the updated command to `.claude/commands/sr/<name>.md`
|
|
189
|
+
5. Show: `✓ Updated /sr:<name>`
|
|
190
|
+
|
|
191
|
+
After updating all changed commands, verify no unresolved placeholders remain in the updated files:
|
|
192
|
+
```bash
|
|
193
|
+
grep -l '{{[A-Z_]*}}' .claude/commands/sr/*.md 2>/dev/null || echo "OK: no broken placeholders"
|
|
194
|
+
```
|
|
195
|
+
If any placeholders remain unresolved, warn the user:
|
|
196
|
+
> "⚠ Some placeholders in `<filename>` could not be resolved automatically. Please review the file and fill them in manually."
|
|
197
|
+
|
|
136
198
|
### Phase U5: Evaluate New Agents
|
|
137
199
|
|
|
138
200
|
For each agent in the "new" list:
|
|
@@ -150,6 +212,18 @@ For each agent in the "new" list:
|
|
|
150
212
|
4. If the user declines:
|
|
151
213
|
- Show: `→ Skipped sr-<name>`
|
|
152
214
|
|
|
215
|
+
For each command in the "new commands" list from Phase U3:
|
|
216
|
+
|
|
217
|
+
1. Read the template from `.claude/setup-templates/commands/sr/<name>.md` to understand what it does (read the title and description)
|
|
218
|
+
2. Prompt the user:
|
|
219
|
+
> "New command available: `/sr:<name>` — [one-line description from template]. Install it? [Y/n]"
|
|
220
|
+
3. If the user accepts (or presses Enter):
|
|
221
|
+
- Apply placeholder substitution using the same rules as Phase U4b (backlog config + codebase analysis)
|
|
222
|
+
- Write the command to `.claude/commands/sr/<name>.md`
|
|
223
|
+
- Show: `✓ Added /sr:<name>`
|
|
224
|
+
4. If the user declines:
|
|
225
|
+
- Show: `→ Skipped /sr:<name>`
|
|
226
|
+
|
|
153
227
|
### Phase U6: Update Workflow Commands
|
|
154
228
|
|
|
155
229
|
If any new agents were added in Phase U5:
|
|
@@ -171,28 +245,41 @@ Display the final summary and stop. Do not continue to Phase 1 of the full setup
|
|
|
171
245
|
|
|
172
246
|
specrails updated from v<previous> to v<new>.
|
|
173
247
|
|
|
174
|
-
| Action
|
|
175
|
-
|
|
176
|
-
| Agents regenerated
|
|
177
|
-
| Agents added
|
|
178
|
-
| Agents skipped
|
|
179
|
-
| Commands updated
|
|
248
|
+
| Action | Count |
|
|
249
|
+
|---------------------|-------|
|
|
250
|
+
| Agents regenerated | N |
|
|
251
|
+
| Agents added | N |
|
|
252
|
+
| Agents skipped | N |
|
|
253
|
+
| Commands updated | N |
|
|
254
|
+
| Commands added | N |
|
|
255
|
+
| Commands skipped | N |
|
|
180
256
|
|
|
181
|
-
All agents are now up to date.
|
|
257
|
+
All agents and commands are now up to date.
|
|
182
258
|
|
|
183
|
-
### Regenerated
|
|
259
|
+
### Agents Regenerated
|
|
184
260
|
[list agent names, or "(none)"]
|
|
185
261
|
|
|
186
|
-
### Added
|
|
262
|
+
### Agents Added
|
|
187
263
|
[list agent names, or "(none)"]
|
|
188
264
|
|
|
189
|
-
### Skipped
|
|
265
|
+
### Agents Skipped
|
|
190
266
|
[list agent names, or "(none)"]
|
|
267
|
+
|
|
268
|
+
### Commands Updated
|
|
269
|
+
[list command names, or "(none)"]
|
|
270
|
+
|
|
271
|
+
### Commands Added
|
|
272
|
+
[list command names, or "(none)"]
|
|
273
|
+
|
|
274
|
+
### Commands Skipped
|
|
275
|
+
[list command names, or "(none)"]
|
|
191
276
|
```
|
|
192
277
|
|
|
193
|
-
Update `.specrails-manifest.json` to reflect the new checksums for all regenerated and added agents:
|
|
194
|
-
- For each regenerated agent: update its checksum entry to the new template's checksum
|
|
278
|
+
Update `.specrails-manifest.json` to reflect the new checksums for all regenerated/updated and added agents and commands:
|
|
279
|
+
- For each regenerated agent: update its checksum entry to the new template's checksum (keyed as `templates/agents/sr-<name>.md`)
|
|
195
280
|
- For each added agent: add a new entry with its checksum
|
|
281
|
+
- For each updated command: update its checksum entry to the new template's checksum (keyed as `templates/commands/sr/<name>.md`)
|
|
282
|
+
- For each added command: add a new entry with its checksum
|
|
196
283
|
- Update the `version` field to the version read from `.specrails-version`
|
|
197
284
|
|
|
198
285
|
---
|
|
@@ -801,11 +888,37 @@ For each selected command, read the template and adapt:
|
|
|
801
888
|
|
|
802
889
|
Adapt:
|
|
803
890
|
- CI commands to match detected stack
|
|
804
|
-
- Persona references to match generated personas
|
|
891
|
+
- **Persona references** to match generated personas (see substitution rules below)
|
|
805
892
|
- File paths to match project structure
|
|
806
893
|
- Layer tags to match detected layers
|
|
807
894
|
- **Backlog provider commands** based on `BACKLOG_PROVIDER`:
|
|
808
895
|
|
|
896
|
+
#### Backlog command persona placeholder substitution
|
|
897
|
+
|
|
898
|
+
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`):
|
|
899
|
+
|
|
900
|
+
| Placeholder | Substitution rule |
|
|
901
|
+
|-------------|------------------|
|
|
902
|
+
| `{{PERSONA_FILE_READ_LIST}}` | One bullet per persona file: `- Read \`.claude/agents/personas/{name}.md\`` |
|
|
903
|
+
| `{{PERSONA_SCORE_HEADERS}}` | Column headers for each persona nickname: e.g., `Alex \| Sara \| Kai` |
|
|
904
|
+
| `{{PERSONA_SCORE_SEPARATORS}}` | One `------` separator per persona column |
|
|
905
|
+
| `{{PERSONA_FIT_FORMAT}}` | Inline score display: e.g., `Alex: X/5, Sara: X/5, Kai: X/5` |
|
|
906
|
+
| `{{PERSONA_VPC_SECTIONS}}` | One VPC section block per persona (see format below) |
|
|
907
|
+
| `{{MAX_SCORE}}` | Total max score = 5 × number of personas (e.g., `15` for 3 personas) |
|
|
908
|
+
| `{{PERSONA_NAMES_WITH_ROLES}}` | Comma-separated: e.g., `Alex (Lead Dev), Sara (Product Founder), Kai (OSS Maintainer)` |
|
|
909
|
+
|
|
910
|
+
**`{{PERSONA_VPC_SECTIONS}}` format** — repeat for each persona in order:
|
|
911
|
+
```
|
|
912
|
+
### "{Nickname}" — The {Role} (X/5)
|
|
913
|
+
- **Jobs addressed**: {list}
|
|
914
|
+
- **Pains relieved**: {list with severity}
|
|
915
|
+
- **Gains created**: {list with impact}
|
|
916
|
+
```
|
|
917
|
+
|
|
918
|
+
**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.
|
|
919
|
+
|
|
920
|
+
**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.
|
|
921
|
+
|
|
809
922
|
#### GitHub Issues (`BACKLOG_PROVIDER=github`)
|
|
810
923
|
- Issue fetch: `gh issue list --label "product-driven-backlog" --state open --limit 100 --json number,title,labels,body`
|
|
811
924
|
- 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.6.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"
|