specrails-core 3.2.0 → 3.3.1
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 +35 -22
- package/VERSION +1 -1
- package/bin/perf-check.sh +21 -0
- package/bin/specrails-core.js +7 -4
- package/commands/setup.md +51 -33
- package/docs/agents.md +43 -1
- package/docs/deployment.md +4 -4
- package/docs/getting-started.md +22 -8
- package/docs/installation.md +41 -25
- package/docs/local-tickets.md +192 -0
- package/docs/migration-guide.md +140 -0
- package/docs/testing/test-matrix-codex.md +0 -1
- package/docs/user-docs/cli-reference.md +0 -12
- package/docs/user-docs/codex-vs-claude-code.md +0 -1
- package/docs/user-docs/faq.md +6 -3
- package/docs/user-docs/installation.md +6 -3
- package/docs/user-docs/quick-start.md +8 -6
- package/docs/workflows.md +2 -14
- package/package.json +1 -1
- package/update.sh +0 -1
- package/docs/api-reference.md +0 -266
- package/integration-contract.json +0 -45
- package/templates/local-tickets-schema.json +0 -7
- package/templates/skills/sr-health-check/SKILL.md +0 -531
- package/templates/web-manager/package-lock.json +0 -3740
- package/templates/web-manager/server/queue-manager.test.ts +0 -607
- package/templates/web-manager/server/queue-manager.ts +0 -565
package/README.md
CHANGED
|
@@ -17,18 +17,6 @@ npx specrails-core@latest init --root-dir .
|
|
|
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
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
|
-

|
|
30
|
-
-->
|
|
31
|
-
|
|
32
20
|
---
|
|
33
21
|
|
|
34
22
|
## How it works
|
|
@@ -65,7 +53,8 @@ codex # OpenAI Codex (beta)
|
|
|
65
53
|
|
|
66
54
|
```bash
|
|
67
55
|
> /sr:implement "add user authentication"
|
|
68
|
-
> /sr:implement #
|
|
56
|
+
> /sr:implement #1, #2 # from local tickets (default)
|
|
57
|
+
> /sr:implement #42, #43 # from GitHub Issues (if configured)
|
|
69
58
|
> /sr:update-product-driven-backlog # discover new features with AI
|
|
70
59
|
```
|
|
71
60
|
|
|
@@ -77,9 +66,9 @@ That's it. The pipeline takes over.
|
|
|
77
66
|
|
|
78
67
|
| Category | Files | Purpose |
|
|
79
68
|
|----------|-------|---------|
|
|
80
|
-
| **Agents** | `.claude/agents/*.md` |
|
|
69
|
+
| **Agents** | `.claude/agents/*.md` | 14 specialized AI agents |
|
|
81
70
|
| **Personas** | `.claude/agents/personas/*.md` | VPC user profiles, generated from your users |
|
|
82
|
-
| **Commands** | `.claude/commands/sr/*.md` | `/sr:implement`, `/sr:product-backlog`, `/sr:
|
|
71
|
+
| **Commands** | `.claude/commands/sr/*.md` | 17 workflow commands: `/sr:implement`, `/sr:product-backlog`, `/sr:why`, and more |
|
|
83
72
|
| **Rules** | `.claude/rules/*.md` | Per-layer coding conventions, loaded by file path |
|
|
84
73
|
| **Memory** | `.claude/agent-memory/` | Persistent knowledge — agents learn across sessions |
|
|
85
74
|
| **Config** | `.claude/settings.json`, `CLAUDE.md` | Permissions, architecture reference |
|
|
@@ -115,6 +104,8 @@ SpecRails is not a chat interface. It's a **development pipeline** that coordina
|
|
|
115
104
|
| **sr-test-writer** | Sonnet | Generates unit, integration, and e2e tests |
|
|
116
105
|
| **sr-security-reviewer** | Sonnet | Secrets detection, OWASP checks, dependency vulnerabilities |
|
|
117
106
|
| **sr-doc-sync** | Sonnet | Updates changelogs, READMEs, API docs |
|
|
107
|
+
| **sr-merge-resolver** | Sonnet | AI-powered merge conflict resolution for multi-feature pipelines |
|
|
108
|
+
| **sr-performance-reviewer** | Sonnet | Performance regression detection after implementation |
|
|
118
109
|
| **sr-product-manager** | Opus | Product discovery: competitive analysis, VPC evaluation |
|
|
119
110
|
| **sr-product-analyst** | Haiku | Read-only backlog analysis and prioritization |
|
|
120
111
|
|
|
@@ -162,7 +153,7 @@ rm -rf .claude/.dry-run/add-dark-mode/
|
|
|
162
153
|
/sr:product-backlog UI, Decks # filter by area
|
|
163
154
|
```
|
|
164
155
|
|
|
165
|
-
Reads your GitHub Issues, scores by VPC persona match, recommends top 3 for next sprint.
|
|
156
|
+
Reads your tickets (local or GitHub Issues), scores by VPC persona match, recommends top 3 for next sprint.
|
|
166
157
|
|
|
167
158
|
### `/sr:update-product-driven-backlog` — Discover features
|
|
168
159
|
|
|
@@ -171,7 +162,28 @@ Reads your GitHub Issues, scores by VPC persona match, recommends top 3 for next
|
|
|
171
162
|
/sr:update-product-driven-backlog Analytics # focus on one area
|
|
172
163
|
```
|
|
173
164
|
|
|
174
|
-
AI product discovery using your personas. Evaluates ideas, creates GitHub Issues for the best ones.
|
|
165
|
+
AI product discovery using your personas. Evaluates ideas, creates tickets (local or GitHub Issues) for the best ones.
|
|
166
|
+
|
|
167
|
+
---
|
|
168
|
+
|
|
169
|
+
## Local ticket management
|
|
170
|
+
|
|
171
|
+
specrails-core ships with a built-in ticket system — no GitHub account or external tools required.
|
|
172
|
+
|
|
173
|
+
Tickets live in `.claude/local-tickets.json` alongside your code. They're plain JSON and git-friendly.
|
|
174
|
+
|
|
175
|
+
**Local tickets are the default.** The `/setup` wizard defaults to local tickets and skips GitHub/JIRA credential setup unless you opt in.
|
|
176
|
+
|
|
177
|
+
```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
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
See [docs/local-tickets.md](./docs/local-tickets.md) for the full schema reference, concurrency model, and command integration details.
|
|
185
|
+
|
|
186
|
+
Migrating from GitHub Issues or JIRA? See [docs/migration-guide.md](./docs/migration-guide.md).
|
|
175
187
|
|
|
176
188
|
---
|
|
177
189
|
|
|
@@ -200,8 +212,8 @@ Each persona scores features 0-5. Features are ranked by score/effort ratio. No
|
|
|
200
212
|
| **git** | Yes | Repository detection |
|
|
201
213
|
| **npm / Node 18+** | Recommended | Needed for npx install and OpenSpec CLI |
|
|
202
214
|
| **OpenSpec CLI** | Recommended | Structured design artifacts for `/sr:implement` |
|
|
203
|
-
| **GitHub CLI** (`gh`) | Optional | Backlog sync to GitHub Issues, PR creation |
|
|
204
|
-
| **JIRA CLI** (`jira`) | Optional | Backlog sync to JIRA |
|
|
215
|
+
| **GitHub CLI** (`gh`) | Optional | Backlog sync to GitHub Issues, PR creation. Not needed with local tickets. |
|
|
216
|
+
| **JIRA CLI** (`jira`) | Optional | Backlog sync to JIRA. Not needed with local tickets. |
|
|
205
217
|
|
|
206
218
|
The installer checks for each tool and offers to install missing ones.
|
|
207
219
|
|
|
@@ -242,7 +254,10 @@ Run `npx specrails-core@latest init --root-dir <path>` again to re-scaffold, the
|
|
|
242
254
|
Partially. Product discovery commands and individual agents work. `/sr:implement` and sr-architect rely on OpenSpec for structured design artifacts.
|
|
243
255
|
|
|
244
256
|
**Does this work without GitHub CLI?**
|
|
245
|
-
Yes.
|
|
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.
|
|
258
|
+
|
|
259
|
+
**Can I use local tickets and GitHub Issues together?**
|
|
260
|
+
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).
|
|
246
261
|
|
|
247
262
|
**How much does it cost to run?**
|
|
248
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.
|
|
@@ -254,8 +269,6 @@ Yes. Everything runs locally through Claude Code. No external services beyond th
|
|
|
254
269
|
|
|
255
270
|
## Also in the SpecRails ecosystem
|
|
256
271
|
|
|
257
|
-
- **[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.
|
|
258
|
-
- **[specrails.dev](https://specrails.dev)** — Official website and documentation.
|
|
259
272
|
- **Product Hunt** — [Vote for SpecRails on launch day](https://www.producthunt.com) _(link goes live on launch day — star this repo to get notified)_
|
|
260
273
|
|
|
261
274
|
---
|
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
3.3.0
|
|
@@ -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"
|
package/bin/specrails-core.js
CHANGED
|
@@ -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
|
|
21
|
-
specrails-core update
|
|
22
|
-
specrails-core doctor
|
|
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);
|
package/commands/setup.md
CHANGED
|
@@ -10,11 +10,11 @@ Interactive wizard to configure the full agent workflow system for this reposito
|
|
|
10
10
|
|
|
11
11
|
Check `$ARGUMENTS` in this order:
|
|
12
12
|
|
|
13
|
-
1. If `--update` is present → execute **Update Mode** (below), then stop. Do NOT continue to Phase 1 or
|
|
14
|
-
2. If `--
|
|
15
|
-
3. Otherwise (no flags) →
|
|
13
|
+
1. If `--update` is present → execute **Update Mode** (below), then stop. Do NOT continue to Phase 1 or Lite Mode.
|
|
14
|
+
2. If `--lite` is present → execute **Lite Mode** (below), then stop. Do NOT execute Phase 1.
|
|
15
|
+
3. Otherwise (no flags) → skip directly to **Phase 1** and execute the full 5-phase wizard.
|
|
16
16
|
|
|
17
|
-
**Default is
|
|
17
|
+
**Default is the full wizard.** Lite Mode only runs when `--lite` is explicitly passed.
|
|
18
18
|
|
|
19
19
|
---
|
|
20
20
|
|
|
@@ -56,7 +56,7 @@ Read the following files to understand the current installation state:
|
|
|
56
56
|
```bash
|
|
57
57
|
ls $SPECRAILS_DIR/setup-templates/commands/sr/
|
|
58
58
|
```
|
|
59
|
-
Command template files include `implement.md`, `batch-implement.md`, `
|
|
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.
|
|
61
61
|
|
|
62
62
|
6. Read `$SPECRAILS_DIR/backlog-config.json` if it exists — contains stored provider configuration needed for command placeholder substitution.
|
|
@@ -130,7 +130,6 @@ Display the combined analysis to the user:
|
|
|
130
130
|
- refactor-recommender.md
|
|
131
131
|
|
|
132
132
|
### Commands — Unchanged (keeping current)
|
|
133
|
-
- health-check.md
|
|
134
133
|
- compat-check.md
|
|
135
134
|
- why.md
|
|
136
135
|
```
|
|
@@ -308,9 +307,9 @@ Update `.specrails-manifest.json` to reflect the new checksums for all regenerat
|
|
|
308
307
|
|
|
309
308
|
---
|
|
310
309
|
|
|
311
|
-
##
|
|
310
|
+
## Lite Mode
|
|
312
311
|
|
|
313
|
-
When
|
|
312
|
+
When `--lite` is passed, run this streamlined 3-question setup. Do NOT run Phase 1–5. When QS4 is complete, stop.
|
|
314
313
|
|
|
315
314
|
### QS1: Ask the 3 questions
|
|
316
315
|
|
|
@@ -332,14 +331,14 @@ Store the answers as:
|
|
|
332
331
|
|
|
333
332
|
Use these defaults for all configuration not asked in QS1:
|
|
334
333
|
|
|
335
|
-
| Setting |
|
|
336
|
-
|
|
334
|
+
| Setting | Lite Mode Default |
|
|
335
|
+
|---------|------------------|
|
|
337
336
|
| Agents enabled | sr-architect, sr-developer, sr-reviewer, sr-product-manager |
|
|
338
337
|
| Git mode | Derived from QS_GIT_ACCESS |
|
|
339
338
|
| CLAUDE.md template | `templates/CLAUDE-quickstart.md` |
|
|
340
339
|
| OpenSpec enabled | Yes if `openspec` CLI is detected in PATH, No otherwise |
|
|
341
340
|
| Telemetry | Not configured (deferred to PRD-002) |
|
|
342
|
-
| Backlog provider |
|
|
341
|
+
| Backlog provider | local (lightweight JSON-based, no external tools needed) |
|
|
343
342
|
|
|
344
343
|
Detect whether this is an existing codebase or new project:
|
|
345
344
|
- **Existing codebase**: `package.json`, `Gemfile`, `pyproject.toml`, `go.mod`, or `pom.xml` found in the repo root
|
|
@@ -379,7 +378,7 @@ For CLAUDE.md/AGENTS.md and agent files, the existing per-file prompts already h
|
|
|
379
378
|
|
|
380
379
|
### QS3: Generate files
|
|
381
380
|
|
|
382
|
-
Generate files using the
|
|
381
|
+
Generate files using the Lite Mode defaults.
|
|
383
382
|
|
|
384
383
|
**1. CLAUDE.md**
|
|
385
384
|
|
|
@@ -406,10 +405,10 @@ Fill placeholders with best-effort values from the limited context available:
|
|
|
406
405
|
- `{{PROJECT_DESCRIPTION}}` → `QS_PROJECT_DESCRIPTION`
|
|
407
406
|
- `{{TARGET_USERS}}` → `QS_TARGET_USERS`
|
|
408
407
|
- `{{GIT_ACCESS}}` → `QS_GIT_ACCESS`
|
|
409
|
-
- `{{ARCHITECTURE_DIAGRAM}}` → "(
|
|
410
|
-
- `{{TECH_EXPERTISE}}` → "(
|
|
408
|
+
- `{{ARCHITECTURE_DIAGRAM}}` → "(Lite Mode — run `/setup` for full architecture analysis)"
|
|
409
|
+
- `{{TECH_EXPERTISE}}` → "(Lite Mode — run `/setup` for codebase-specific expertise)"
|
|
411
410
|
- `{{LAYER_TAGS}}` → detect from package.json / Gemfile / go.mod if present; otherwise leave empty
|
|
412
|
-
- All other placeholders → "(not configured — run `/setup
|
|
411
|
+
- All other placeholders → "(not configured — run `/setup`)"
|
|
413
412
|
|
|
414
413
|
Create memory directories: `$SPECRAILS_DIR/agent-memory/sr-<name>/`
|
|
415
414
|
|
|
@@ -419,27 +418,37 @@ Core commands (always install if missing):
|
|
|
419
418
|
- `implement.md`
|
|
420
419
|
- `batch-implement.md`
|
|
421
420
|
- `propose-spec.md`
|
|
422
|
-
- `health-check.md`
|
|
423
421
|
- `compat-check.md`
|
|
424
422
|
- `why.md`
|
|
423
|
+
- `product-backlog.md`
|
|
424
|
+
- `update-product-driven-backlog.md`
|
|
425
425
|
|
|
426
|
-
|
|
426
|
+
**Initialize local ticket storage** (backlog provider defaults to `local`):
|
|
427
|
+
1. Copy `templates/local-tickets-schema.json` to `$SPECRAILS_DIR/local-tickets.json` and set `last_updated` to the current ISO-8601 timestamp. Skip if the file already exists.
|
|
428
|
+
2. Write `$SPECRAILS_DIR/backlog-config.json` (skip if already exists):
|
|
429
|
+
```json
|
|
430
|
+
{
|
|
431
|
+
"provider": "local",
|
|
432
|
+
"write_access": true,
|
|
433
|
+
"git_auto": true
|
|
434
|
+
}
|
|
435
|
+
```
|
|
427
436
|
|
|
428
437
|
**If `cli_provider == "claude"`:**
|
|
429
438
|
|
|
430
|
-
If `QS_IS_RERUN=false` (fresh install):
|
|
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`.
|
|
431
440
|
|
|
432
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:
|
|
433
442
|
- If it exists: skip it — show `✓ Already installed: /sr:<name>`
|
|
434
|
-
- If it does NOT exist:
|
|
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)`
|
|
435
444
|
|
|
436
445
|
**If `cli_provider == "codex"`:**
|
|
437
446
|
|
|
438
|
-
If `QS_IS_RERUN=false` (fresh install): for each core command,
|
|
447
|
+
If `QS_IS_RERUN=false` (fresh install): for each core command, read the corresponding skill template from `$SPECRAILS_DIR/setup-templates/skills/sr-<name>/SKILL.md`, substitute the backlog placeholders with local values and stub persona placeholders with `(Lite Mode — run /setup to configure personas)`, then write to `.agents/skills/sr-<name>/SKILL.md` (create the directory first).
|
|
439
448
|
|
|
440
449
|
If `QS_IS_RERUN=true` (gap-fill mode): for each command in the list above, check if `.agents/skills/sr-<name>/SKILL.md` already exists:
|
|
441
450
|
- If it exists: skip it — show `✓ Already installed: $sr-<name>`
|
|
442
|
-
- If it does NOT exist:
|
|
451
|
+
- If it does NOT exist: read template, substitute placeholders as above, write to `.agents/skills/sr-<name>/SKILL.md` — show `✓ Added $sr-<name> (was missing)`
|
|
443
452
|
|
|
444
453
|
**4. Cleanup**
|
|
445
454
|
|
|
@@ -452,7 +461,7 @@ Remove `commands/setup.md` from `.claude/commands/` if it was copied there by th
|
|
|
452
461
|
After generating all files, display the setup complete message.
|
|
453
462
|
|
|
454
463
|
Then, based on `QS_IS_EXISTING_CODEBASE`:
|
|
455
|
-
- **Existing codebase** (`true`): recommend `/sr:
|
|
464
|
+
- **Existing codebase** (`true`): recommend `/sr:refactor-recommender`
|
|
456
465
|
- **New project** (`false`): recommend `/sr:product-backlog`
|
|
457
466
|
|
|
458
467
|
If `QS_IS_RERUN=false`, display:
|
|
@@ -462,7 +471,7 @@ If `QS_IS_RERUN=false`, display:
|
|
|
462
471
|
Try your first command:
|
|
463
472
|
> /sr:product-backlog
|
|
464
473
|
```
|
|
465
|
-
(Replace `/sr:product-backlog` with `/sr:
|
|
474
|
+
(Replace `/sr:product-backlog` with `/sr:refactor-recommender` for existing codebases.)
|
|
466
475
|
|
|
467
476
|
If `QS_IS_RERUN=true`, display the gap-fill summary and stop:
|
|
468
477
|
```
|
|
@@ -682,12 +691,26 @@ Which agents do you want to install?
|
|
|
682
691
|
|
|
683
692
|
### 3.2 Backlog provider
|
|
684
693
|
|
|
685
|
-
Ask the user
|
|
694
|
+
Ask the user how they want to manage their product backlog. Default is local — no external tools or accounts required:
|
|
686
695
|
|
|
687
696
|
```
|
|
688
697
|
## Backlog Provider
|
|
689
698
|
|
|
690
|
-
|
|
699
|
+
Use local ticket management or connect an external provider?
|
|
700
|
+
|
|
701
|
+
1. **Local tickets** (default, recommended) — lightweight JSON-based ticket management built into the project.
|
|
702
|
+
No external tools or accounts required. Tickets stored in `.claude/local-tickets.json`, version-controlled and diffable.
|
|
703
|
+
2. **External provider** — connect GitHub Issues, JIRA, or disable backlog commands
|
|
704
|
+
```
|
|
705
|
+
|
|
706
|
+
If the user selects **1** or presses Enter without typing anything: set `BACKLOG_PROVIDER=local` and proceed directly to **If Local Tickets** below. Do NOT ask about GitHub CLI, JIRA credentials, or any external provider configuration.
|
|
707
|
+
|
|
708
|
+
If the user selects **2**: display the secondary menu:
|
|
709
|
+
|
|
710
|
+
```
|
|
711
|
+
## External Backlog Provider
|
|
712
|
+
|
|
713
|
+
Which external provider?
|
|
691
714
|
|
|
692
715
|
1. **Local tickets** (recommended) — lightweight JSON-based ticket management built into the project.
|
|
693
716
|
No external tools required. Tickets stored in `.claude/local-tickets.json`, version-controlled and diffable.
|
|
@@ -925,7 +948,6 @@ If automatic, also check if `gh` is authenticated (for PR creation). If not, war
|
|
|
925
948
|
| /sr:propose-spec | Interactively propose and refine a feature spec, then create a GitHub issue | GitHub CLI |
|
|
926
949
|
| /sr:product-backlog | View prioritized backlog with VPC scores | sr-product-analyst + Backlog provider |
|
|
927
950
|
| /sr:update-product-driven-backlog | Generate new feature ideas via product discovery | sr-product-manager + Backlog provider |
|
|
928
|
-
| /sr:health-check | Run tests, linting, coverage, complexity, and dependency audit | None |
|
|
929
951
|
| /sr:compat-check | Snapshot API surface and detect breaking changes | None |
|
|
930
952
|
| /sr:refactor-recommender | Scan for refactoring opportunities ranked by impact/effort | None |
|
|
931
953
|
| /sr:why | Search past architectural decisions from agent memory | None |
|
|
@@ -1061,7 +1083,6 @@ For each selected command, read the template and adapt.
|
|
|
1061
1083
|
- `setup-templates/commands/sr/propose-spec.md` → `.claude/commands/sr/propose-spec.md`
|
|
1062
1084
|
- `setup-templates/commands/sr/product-backlog.md` → `.claude/commands/sr/product-backlog.md` (if `BACKLOG_PROVIDER != none`)
|
|
1063
1085
|
- `setup-templates/commands/sr/update-product-driven-backlog.md` → `.claude/commands/sr/update-product-driven-backlog.md` (if `BACKLOG_PROVIDER != none`)
|
|
1064
|
-
- `setup-templates/commands/sr/health-check.md` → `.claude/commands/sr/health-check.md`
|
|
1065
1086
|
- `setup-templates/commands/sr/compat-check.md` → `.claude/commands/sr/compat-check.md`
|
|
1066
1087
|
- `setup-templates/commands/sr/refactor-recommender.md` → `.claude/commands/sr/refactor-recommender.md`
|
|
1067
1088
|
- `setup-templates/commands/sr/why.md` → `.claude/commands/sr/why.md`
|
|
@@ -1072,7 +1093,6 @@ For each selected command, read the template and adapt.
|
|
|
1072
1093
|
- `setup-templates/commands/sr/propose-spec.md` → `.agents/skills/sr-propose-spec/SKILL.md` (wrap with YAML frontmatter if no skill template exists)
|
|
1073
1094
|
- `setup-templates/commands/sr/product-backlog.md` → `.agents/skills/sr-product-backlog/SKILL.md` (if `BACKLOG_PROVIDER != none`; wrap with frontmatter)
|
|
1074
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)
|
|
1075
|
-
- `setup-templates/skills/sr-health-check/SKILL.md` → `.agents/skills/sr-health-check/SKILL.md`
|
|
1076
1096
|
- `setup-templates/skills/sr-compat-check/SKILL.md` → `.agents/skills/sr-compat-check/SKILL.md`
|
|
1077
1097
|
- `setup-templates/skills/sr-refactor-recommender/SKILL.md` → `.agents/skills/sr-refactor-recommender/SKILL.md`
|
|
1078
1098
|
- `setup-templates/skills/sr-why/SKILL.md` → `.agents/skills/sr-why/SKILL.md`
|
|
@@ -1356,7 +1376,6 @@ Display the complete installation summary:
|
|
|
1356
1376
|
| /sr:propose-spec | .claude/commands/sr/propose-spec.md |
|
|
1357
1377
|
| /sr:product-backlog | .claude/commands/sr/product-backlog.md |
|
|
1358
1378
|
| /sr:update-product-driven-backlog | .claude/commands/sr/update-product-driven-backlog.md |
|
|
1359
|
-
| /sr:health-check | .claude/commands/sr/health-check.md |
|
|
1360
1379
|
| /sr:compat-check | .claude/commands/sr/compat-check.md |
|
|
1361
1380
|
| /sr:refactor-recommender | .claude/commands/sr/refactor-recommender.md |
|
|
1362
1381
|
| /sr:why | .claude/commands/sr/why.md |
|
|
@@ -1368,7 +1387,6 @@ Display the complete installation summary:
|
|
|
1368
1387
|
| $sr-propose-spec | .agents/skills/sr-propose-spec/SKILL.md |
|
|
1369
1388
|
| $sr-product-backlog | .agents/skills/sr-product-backlog/SKILL.md |
|
|
1370
1389
|
| $sr-update-product-driven-backlog | .agents/skills/sr-update-product-driven-backlog/SKILL.md |
|
|
1371
|
-
| $sr-health-check | .agents/skills/sr-health-check/SKILL.md |
|
|
1372
1390
|
| $sr-compat-check | .agents/skills/sr-compat-check/SKILL.md |
|
|
1373
1391
|
| $sr-refactor-recommender | .agents/skills/sr-refactor-recommender/SKILL.md |
|
|
1374
1392
|
| $sr-why | .agents/skills/sr-why/SKILL.md |
|
|
@@ -1414,7 +1432,7 @@ Note: Only commands/skills selected during setup are shown. Backlog commands are
|
|
|
1414
1432
|
- `$sr-update-product-driven-backlog` — discover new features using VPC
|
|
1415
1433
|
```
|
|
1416
1434
|
|
|
1417
|
-
## First Task Prompt (
|
|
1435
|
+
## First Task Prompt (Full Wizard)
|
|
1418
1436
|
|
|
1419
1437
|
After displaying the setup complete summary above, detect the project type and output:
|
|
1420
1438
|
|
|
@@ -1435,9 +1453,9 @@ Try your first spec:
|
|
|
1435
1453
|
|
|
1436
1454
|
Try your first spec:
|
|
1437
1455
|
[If cli_provider == "claude":]
|
|
1438
|
-
> /sr:
|
|
1456
|
+
> /sr:refactor-recommender
|
|
1439
1457
|
[If cli_provider == "codex":]
|
|
1440
|
-
> $sr-
|
|
1458
|
+
> $sr-refactor-recommender
|
|
1441
1459
|
```
|
|
1442
1460
|
|
|
1443
1461
|
Then stop.
|
package/docs/agents.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Agents
|
|
2
2
|
|
|
3
|
-
SpecRails ships with **
|
|
3
|
+
SpecRails ships with **14 specialized agents**. Each has a clear role, a dedicated AI model, and knows exactly when to stay in its lane.
|
|
4
4
|
|
|
5
5
|
## Why specialized agents?
|
|
6
6
|
|
|
@@ -245,6 +245,48 @@ The Reviewer is the **last agent before ship**. It:
|
|
|
245
245
|
|
|
246
246
|
---
|
|
247
247
|
|
|
248
|
+
### Merge Resolver
|
|
249
|
+
|
|
250
|
+
| | |
|
|
251
|
+
|-|-|
|
|
252
|
+
| **Color** | Yellow |
|
|
253
|
+
| **Model** | Sonnet |
|
|
254
|
+
| **Trigger** | `/sr:merge-resolve`, `/sr:implement` (Phase 4a, after worktree merge) |
|
|
255
|
+
| **Role** | AI-powered merge conflict resolution |
|
|
256
|
+
|
|
257
|
+
When a multi-feature pipeline merges worktrees and produces conflict markers, the Merge Resolver analyzes each conflict block using the OpenSpec context bundles from both features. It applies resolutions where confidence is high enough and leaves clean markers for the conflicts it cannot safely resolve.
|
|
258
|
+
|
|
259
|
+
**Configuration (in `.claude/agents/sr-merge-resolver.md`):**
|
|
260
|
+
- `tone`: `terse` (default) or `verbose`
|
|
261
|
+
- `risk_tolerance`: `conservative` (default) or `aggressive`
|
|
262
|
+
- `confidence_threshold`: 0–100, default `70`
|
|
263
|
+
|
|
264
|
+
**What it produces:**
|
|
265
|
+
- Resolved conflict blocks written in place
|
|
266
|
+
- Structured resolution report (file, block, confidence, resolution or left-as-marker)
|
|
267
|
+
|
|
268
|
+
---
|
|
269
|
+
|
|
270
|
+
### Performance Reviewer
|
|
271
|
+
|
|
272
|
+
| | |
|
|
273
|
+
|-|-|
|
|
274
|
+
| **Color** | Yellow |
|
|
275
|
+
| **Model** | Sonnet |
|
|
276
|
+
| **Trigger** | `/sr:implement` (Phase 4, after Security Reviewer) |
|
|
277
|
+
| **Role** | Performance regression detection |
|
|
278
|
+
|
|
279
|
+
The Performance Reviewer benchmarks modified code paths after implementation, compares metrics against configured thresholds, and outputs a structured report. It never fixes code — findings above the threshold trigger the Developer to address them before the pipeline continues.
|
|
280
|
+
|
|
281
|
+
**Configuration:** Create `.specrails/perf-thresholds.yml` to set custom thresholds per metric. The agent falls back to built-in defaults if the file is missing.
|
|
282
|
+
|
|
283
|
+
**What it produces:**
|
|
284
|
+
- Execution time, memory usage, and throughput metrics for modified paths
|
|
285
|
+
- Pass/fail report against configured thresholds
|
|
286
|
+
- `PERF_STATUS` result consumed by the pipeline orchestrator
|
|
287
|
+
|
|
288
|
+
---
|
|
289
|
+
|
|
248
290
|
## Agent memory
|
|
249
291
|
|
|
250
292
|
Every agent stores observations in `.claude/agent-memory/<agent>/MEMORY.md`. This memory persists across sessions, so agents get smarter over time:
|
package/docs/deployment.md
CHANGED
|
@@ -18,7 +18,7 @@ SpecRails runs locally — no cloud infrastructure required. Choose the setup th
|
|
|
18
18
|
The fastest way to get started. No install required.
|
|
19
19
|
|
|
20
20
|
```bash
|
|
21
|
-
npx specrails-core@latest
|
|
21
|
+
npx specrails-core@latest init --root-dir .
|
|
22
22
|
```
|
|
23
23
|
|
|
24
24
|
This will:
|
|
@@ -35,10 +35,10 @@ This will:
|
|
|
35
35
|
Clone the repository for full control and the ability to customize agents.
|
|
36
36
|
|
|
37
37
|
```bash
|
|
38
|
-
git clone https://github.com/
|
|
38
|
+
git clone https://github.com/fjpulidop/specrails-core
|
|
39
39
|
cd specrails-core
|
|
40
40
|
npm install
|
|
41
|
-
|
|
41
|
+
./install.sh --root-dir <your-project>
|
|
42
42
|
```
|
|
43
43
|
|
|
44
44
|
### Updating
|
|
@@ -90,7 +90,7 @@ docker compose run specrails setup
|
|
|
90
90
|
### Building locally
|
|
91
91
|
|
|
92
92
|
```bash
|
|
93
|
-
git clone https://github.com/
|
|
93
|
+
git clone https://github.com/fjpulidop/specrails-core
|
|
94
94
|
cd specrails-core
|
|
95
95
|
docker build -t specrails:local .
|
|
96
96
|
docker run -it \
|
package/docs/getting-started.md
CHANGED
|
@@ -10,16 +10,18 @@ Think of it as hiring a full engineering team that lives inside your CLI.
|
|
|
10
10
|
|
|
11
11
|
## Prerequisites
|
|
12
12
|
|
|
13
|
-
You
|
|
13
|
+
You need:
|
|
14
14
|
|
|
15
|
+
- **Node.js 18+** — required for the installer (`node --version` to check)
|
|
15
16
|
- **Git** — your project must be a git repository
|
|
16
17
|
- **[Claude Code](https://claude.ai/claude-code)** — Anthropic's CLI tool
|
|
17
18
|
|
|
18
19
|
Optional (recommended):
|
|
19
20
|
|
|
20
|
-
- **npm** — for installing the Pipeline Monitor dashboard
|
|
21
21
|
- **[GitHub CLI](https://cli.github.com/)** (`gh`) — for automatic PR creation and issue tracking
|
|
22
22
|
|
|
23
|
+
> **Using OpenAI Codex instead of Claude Code?** See [Installation](user-docs/installation.md) for Codex-specific setup.
|
|
24
|
+
|
|
23
25
|
## Install
|
|
24
26
|
|
|
25
27
|
Pick your preferred method:
|
|
@@ -33,8 +35,8 @@ npx specrails-core@latest init --root-dir <your-project>
|
|
|
33
35
|
**git clone**
|
|
34
36
|
|
|
35
37
|
```bash
|
|
36
|
-
git clone https://github.com/fjpulidop/specrails.git
|
|
37
|
-
./specrails/install.sh --root-dir <your-project>
|
|
38
|
+
git clone https://github.com/fjpulidop/specrails-core.git
|
|
39
|
+
./specrails-core/install.sh --root-dir <your-project>
|
|
38
40
|
```
|
|
39
41
|
|
|
40
42
|
The installer will:
|
|
@@ -54,17 +56,27 @@ Open Claude Code in your project and run:
|
|
|
54
56
|
/setup
|
|
55
57
|
```
|
|
56
58
|
|
|
57
|
-
|
|
59
|
+
By default, `/setup` runs the **full 5-phase wizard** — deep stack analysis, researched user personas, and fully adapted agents.
|
|
58
60
|
|
|
59
61
|
| Phase | What happens |
|
|
60
62
|
|-------|-------------|
|
|
61
63
|
| **1. Analyze** | Detects your tech stack, architecture layers, CI commands, and conventions |
|
|
62
|
-
| **2. Personas** | Researches your competitive landscape and generates user personas
|
|
63
|
-
| **3. Configure** | Asks about your backlog provider, git workflow, and which agents
|
|
64
|
+
| **2. Personas** | Researches your competitive landscape and generates full VPC user personas |
|
|
65
|
+
| **3. Configure** | Asks about your backlog provider, git workflow, and which agents to enable |
|
|
64
66
|
| **4. Generate** | Fills all templates with your project-specific context |
|
|
65
67
|
| **5. Cleanup** | Removes the wizard and templates, leaving only your tailored workflow files |
|
|
66
68
|
|
|
67
|
-
|
|
69
|
+
**In a hurry?** Run `/setup --lite` for the quick version: three questions, sensible defaults, done in under a minute.
|
|
70
|
+
|
|
71
|
+
| Question | What it configures |
|
|
72
|
+
|----------|-------------------|
|
|
73
|
+
| What is this project? | Agent context and CLAUDE.md |
|
|
74
|
+
| Who are the target users? | Persona stubs for product discovery |
|
|
75
|
+
| Git access — read-only or read-write? | Whether agents can commit |
|
|
76
|
+
|
|
77
|
+
Lite mode installs the four core agents (architect, developer, reviewer, product manager), all workflow commands, and local ticket storage. You can run the full wizard later to deepen the configuration.
|
|
78
|
+
|
|
79
|
+
After either mode, your `.claude/` directory contains adapted agents, commands, and rules — ready to use.
|
|
68
80
|
|
|
69
81
|
## Your first feature
|
|
70
82
|
|
|
@@ -104,4 +116,6 @@ Now that you're running, learn how the system thinks:
|
|
|
104
116
|
|
|
105
117
|
---
|
|
106
118
|
|
|
119
|
+
**Looking for step-by-step guides?** See [Quick Start](user-docs/quick-start.md) for a walkthrough of your first feature, or [Installation](user-docs/installation.md) for detailed install options including Codex support.
|
|
120
|
+
|
|
107
121
|
[← Back to Docs](README.md) · [Core Concepts →](concepts.md)
|