specrails-core 3.4.0 → 3.4.2

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 CHANGED
@@ -246,7 +246,7 @@ The plugin method has no Node.js requirement. The scaffold method checks for pre
246
246
 
247
247
  ## Supported stacks
248
248
 
249
- Stack-agnostic. The `/setup` wizard detects and adapts to whatever you're running:
249
+ Stack-agnostic. The `/specrails:setup` wizard detects and adapts to whatever you're running:
250
250
 
251
251
  **Backend:** Python/FastAPI, Node/Express, Go/Gin, Rust/Actix, Java/Spring, Ruby/Rails, .NET
252
252
  **Frontend:** React, Vue, Angular, Svelte, Next.js, Nuxt
package/bin/doctor.sh CHANGED
@@ -76,7 +76,7 @@ fi
76
76
  if [[ -f "${PROJECT_ROOT}/CLAUDE.md" ]]; then
77
77
  pass "CLAUDE.md: present"
78
78
  else
79
- fail "CLAUDE.md: missing" "Run /setup inside Claude Code to regenerate"
79
+ fail "CLAUDE.md: missing" "Run /specrails:setup inside Claude Code to regenerate"
80
80
  fi
81
81
 
82
82
  # ─────────────────────────────────────────────
package/commands/setup.md CHANGED
@@ -39,7 +39,7 @@ Read the following files to understand the current installation state:
39
39
  }
40
40
  ```
41
41
  If this file does not exist, inform the user:
42
- > "No `.specrails-manifest.json` found. This looks like a pre-versioning installation. Run `update.sh` first to initialize the manifest, then re-run `/setup --update`."
42
+ > "No `.specrails-manifest.json` found. This looks like a pre-versioning installation. Run `update.sh` first to initialize the manifest, then re-run `/specrails:setup --update`."
43
43
  Then stop.
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)`.
@@ -405,10 +405,10 @@ Fill placeholders with best-effort values from the limited context available:
405
405
  - `{{PROJECT_DESCRIPTION}}` → `QS_PROJECT_DESCRIPTION`
406
406
  - `{{TARGET_USERS}}` → `QS_TARGET_USERS`
407
407
  - `{{GIT_ACCESS}}` → `QS_GIT_ACCESS`
408
- - `{{ARCHITECTURE_DIAGRAM}}` → "(Lite Mode — run `/setup` for full architecture analysis)"
409
- - `{{TECH_EXPERTISE}}` → "(Lite Mode — run `/setup` for codebase-specific expertise)"
408
+ - `{{ARCHITECTURE_DIAGRAM}}` → "(Lite Mode — run `/specrails:setup` for full architecture analysis)"
409
+ - `{{TECH_EXPERTISE}}` → "(Lite Mode — run `/specrails:setup` for codebase-specific expertise)"
410
410
  - `{{LAYER_TAGS}}` → detect from package.json / Gemfile / go.mod if present; otherwise leave empty
411
- - All other placeholders → "(not configured — run `/setup`)"
411
+ - All other placeholders → "(not configured — run `/specrails:setup`)"
412
412
 
413
413
  Create memory directories: `$SPECRAILS_DIR/agent-memory/sr-<name>/`
414
414
 
@@ -436,7 +436,7 @@ Core commands (always install if missing):
436
436
 
437
437
  **If `cli_provider == "claude"`:**
438
438
 
439
- If `QS_IS_RERUN=false` (fresh install): for each core command, read the template from `$SPECRAILS_DIR/setup-templates/commands/specrails/<name>.md`, substitute the backlog placeholders with local values (using the same table as Phase 4.3 "Local Tickets"), stub all persona placeholders with `(Lite Mode — run /setup to configure personas)`, then write to `.claude/commands/specrails/<name>.md`.
439
+ If `QS_IS_RERUN=false` (fresh install): for each core command, read the template from `$SPECRAILS_DIR/setup-templates/commands/specrails/<name>.md`, substitute the backlog placeholders with local values (using the same table as Phase 4.3 "Local Tickets"), stub all persona placeholders with `(Lite Mode — run /specrails:setup to configure personas)`, then write to `.claude/commands/specrails/<name>.md`.
440
440
 
441
441
  If `QS_IS_RERUN=true` (gap-fill mode): for each command in the list above, check if `.claude/commands/specrails/<name>.md` already exists:
442
442
  - If it exists: skip it — show `✓ Already installed: /specrails:<name>`
@@ -444,7 +444,7 @@ If `QS_IS_RERUN=true` (gap-fill mode): for each command in the list above, check
444
444
 
445
445
  **If `cli_provider == "codex"`:**
446
446
 
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).
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 /specrails:setup to configure personas)`, then write to `.agents/skills/sr-<name>/SKILL.md` (create the directory first).
448
448
 
449
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:
450
450
  - If it exists: skip it — show `✓ Already installed: $sr-<name>`
@@ -1154,7 +1154,7 @@ All write operations must follow the **advisory file locking protocol** defined
1154
1154
  | Placeholder | Substituted value |
1155
1155
  |-------------|-------------------|
1156
1156
  | `{{BACKLOG_PROVIDER_NAME}}` | `Local Tickets` |
1157
- | `{{BACKLOG_PREFLIGHT}}` | `[[ -f "$SPECRAILS_DIR/local-tickets.json" ]] && echo "Local tickets storage: OK" \|\| echo "WARNING: $SPECRAILS_DIR/local-tickets.json not found — run /setup to initialize"` |
1157
+ | `{{BACKLOG_PREFLIGHT}}` | `[[ -f "$SPECRAILS_DIR/local-tickets.json" ]] && echo "Local tickets storage: OK" \|\| echo "WARNING: $SPECRAILS_DIR/local-tickets.json not found — run /specrails:setup to initialize"` |
1158
1158
  | `{{BACKLOG_FETCH_CMD}}` | Read `$SPECRAILS_DIR/local-tickets.json`. Parse the `tickets` map and return all entries where `status` is `"todo"` or `"in_progress"`. |
1159
1159
  | `{{BACKLOG_FETCH_ALL_CMD}}` | Read `$SPECRAILS_DIR/local-tickets.json`. Parse the `tickets` map and return all entries regardless of status. |
1160
1160
  | `{{BACKLOG_FETCH_CLOSED_CMD}}` | Read `$SPECRAILS_DIR/local-tickets.json`. Parse the `tickets` map and return all entries where `status` is `"done"` or `"cancelled"`. |
@@ -1270,7 +1270,7 @@ The setup process installed temporary files that are only needed during installa
1270
1270
  # 1. Remove setup templates (used as structural references during generation)
1271
1271
  rm -rf .claude/setup-templates/
1272
1272
 
1273
- # 2. Remove the /setup command itself — it's a one-time installer, not a permanent command
1273
+ # 2. Remove the /specrails:setup command itself — it's a one-time installer, not a permanent command
1274
1274
  rm -f .claude/commands/setup.md
1275
1275
 
1276
1276
  # 3. Remove the specrails/ directory from the repo if it exists at the root
package/docs/changelog.md CHANGED
@@ -33,7 +33,7 @@ All notable changes to SpecRails are listed here, newest first.
33
33
 
34
34
  ### Improvements
35
35
 
36
- - **`/setup --update` template checksums** — The update command now checks command template checksums before overwriting, so manual customizations are detected and preserved rather than silently clobbered.
36
+ - **`/specrails:setup --update` template checksums** — The update command now checks command template checksums before overwriting, so manual customizations are detected and preserved rather than silently clobbered.
37
37
 
38
38
  ---
39
39
 
@@ -84,8 +84,8 @@ All notable changes to SpecRails are listed here, newest first.
84
84
  ### Agents
85
85
 
86
86
  - **Doc Sync agent enhanced** — Added drift detection with severity levels. The agent now classifies documentation drift as `critical`, `major`, or `minor` and prioritizes accordingly.
87
- - **Test Writer wired into `/setup`** — New installations now include the Test Writer agent by default.
88
- - **Security Reviewer wired into `/setup`** — New installations now include the Security Reviewer agent by default.
87
+ - **Test Writer wired into `/specrails:setup`** — New installations now include the Test Writer agent by default.
88
+ - **Security Reviewer wired into `/specrails:setup`** — New installations now include the Security Reviewer agent by default.
89
89
 
90
90
  ### Onboarding
91
91
 
@@ -271,7 +271,7 @@ specrails-hub se comunica con specrails-core vía `integration-contract.json`. E
271
271
  | Codex memory system poco maduro | Alta | Bajo | Usar patterns file-based (MEMORY.md) en ambas |
272
272
  | API de subagentes distinta | Media | Alto | Abstraer en Skills para no depender de tool-calling nativo |
273
273
  | Double mantenimiento de templates | Media | Medio | Approach B minimiza esto |
274
- | Fragmentación de usuarios | Baja | Medio | UX clara en /setup para elegir provider |
274
+ | Fragmentación de usuarios | Baja | Medio | UX clara en /specrails:setup para elegir provider |
275
275
 
276
276
  ---
277
277
 
@@ -338,7 +338,7 @@ Si el board aprueba proceder:
338
338
  | `/specrails:implement` | Slash command | Skill (mismo `SKILL.md`) |
339
339
  | `/specrails:product-backlog` | Slash command | Skill |
340
340
  | `/opsx:ff` | Slash command | Skill |
341
- | `/setup` | Slash command | `codex exec "run setup"` |
341
+ | `/specrails:setup` | Slash command | `codex exec "run setup"` |
342
342
  | Agent `sr-architect` | `.claude/agents/sr-architect.md` | `.codex/agents/sr-architect.toml` |
343
343
  | Permissions | `.claude/settings.json` | `.codex/config.toml` |
344
344
 
@@ -34,7 +34,7 @@ MCP servers run as local processes (stdio) or remote services (HTTP+SSE). Any MC
34
34
  ### Distribution & Execution Model
35
35
 
36
36
  ```
37
- npx specrails-core@latest init → install.sh (bash) → /setup (Claude Code command)
37
+ npx specrails-core@latest init → install.sh (bash) → /specrails:setup (Claude Code command)
38
38
  │ │
39
39
  ├── Copy templates ├── Detect codebase
40
40
  ├── Create dirs ├── Generate agents
@@ -337,7 +337,7 @@ These capabilities require Claude Code's runtime and should NOT be exposed via M
337
337
  | `/specrails:batch-implement` | Requires git worktree isolation |
338
338
  | Agent invocation (sr-*) | Requires Claude Code's Agent subagent system |
339
339
  | OpenSpec artifact creation | Interactive, context-heavy (requires conversation) |
340
- | `/setup` wizard | Multi-step interactive configuration |
340
+ | `/specrails:setup` wizard | Multi-step interactive configuration |
341
341
  | Template substitution (write) | Modifies project files, requires user consent |
342
342
 
343
343
  **Principle:** MCP = knowledge access. Claude Code = orchestration engine.
package/install.sh CHANGED
@@ -3,7 +3,7 @@ set -euo pipefail
3
3
 
4
4
  # specrails installer
5
5
  # Installs the agent workflow system into any repository.
6
- # Step 1 of 2: Prerequisites + scaffold. Step 2: Run /setup inside Claude Code.
6
+ # Step 1 of 2: Prerequisites + scaffold. Step 2: Run /specrails:setup inside Claude Code.
7
7
 
8
8
  # Detect pipe mode (curl | bash) vs local execution
9
9
  if [[ -z "${BASH_SOURCE[0]:-}" || "${BASH_SOURCE[0]:-}" == "bash" ]]; then
@@ -169,13 +169,13 @@ generate_manifest() {
169
169
  artifacts_json="${artifacts_json},"
170
170
  fi
171
171
  artifacts_json="${artifacts_json}
172
- \"commands/setup.md\": \"${setup_checksum}\""
172
+ \"commands/specrails/setup.md\": \"${setup_checksum}\""
173
173
 
174
174
  # Include commands/doctor.md
175
175
  local doctor_checksum
176
176
  doctor_checksum="sha256:$(shasum -a 256 "$SCRIPT_DIR/commands/doctor.md" | awk '{print $1}')"
177
177
  artifacts_json="${artifacts_json},
178
- \"commands/doctor.md\": \"${doctor_checksum}\""
178
+ \"commands/specrails/doctor.md\": \"${doctor_checksum}\""
179
179
 
180
180
  cat > "$REPO_ROOT/.specrails-manifest.json" << EOF
181
181
  {
@@ -433,8 +433,8 @@ if command -v jira &> /dev/null; then
433
433
  HAS_JIRA=true
434
434
  else
435
435
  HAS_JIRA=false
436
- # Don't warn here — JIRA is only relevant if chosen during /setup.
437
- # If the user selects JIRA in /setup and it's not installed, the setup
436
+ # Don't warn here — JIRA is only relevant if chosen during /specrails:setup.
437
+ # If the user selects JIRA in /specrails:setup and it's not installed, the setup
438
438
  # wizard will offer to install it (go-jira via brew/go, or Atlassian CLI).
439
439
  fi
440
440
 
@@ -491,7 +491,7 @@ if [[ "$CLI_PROVIDER" == "codex" ]]; then
491
491
  mkdir -p "$REPO_ROOT/.agents/skills/setup"
492
492
  mkdir -p "$REPO_ROOT/.agents/skills/doctor"
493
493
  else
494
- mkdir -p "$REPO_ROOT/$SPECRAILS_DIR/commands"
494
+ mkdir -p "$REPO_ROOT/$SPECRAILS_DIR/commands/specrails"
495
495
  fi
496
496
  mkdir -p "$REPO_ROOT/$SPECRAILS_DIR/setup-templates/agents"
497
497
  mkdir -p "$REPO_ROOT/$SPECRAILS_DIR/setup-templates/commands"
@@ -503,7 +503,7 @@ mkdir -p "$REPO_ROOT/$SPECRAILS_DIR/setup-templates/settings"
503
503
  mkdir -p "$REPO_ROOT/$SPECRAILS_DIR/setup-templates/prompts"
504
504
  mkdir -p "$REPO_ROOT/$SPECRAILS_DIR/agent-memory/explanations"
505
505
 
506
- # Copy the /setup and /doctor commands (or skills for Codex)
506
+ # Copy the /specrails:setup and /specrails:doctor commands (or skills for Codex)
507
507
  if [[ "$CLI_PROVIDER" == "codex" ]]; then
508
508
  # Codex uses Agent Skills in .agents/skills/<name>/SKILL.md
509
509
  {
@@ -536,12 +536,12 @@ if [[ "$CLI_PROVIDER" == "codex" ]]; then
536
536
  } > "$REPO_ROOT/.agents/skills/doctor/SKILL.md"
537
537
  ok "Installed \$doctor skill"
538
538
  else
539
- # Claude Code uses commands in .claude/commands/
540
- cp "$SCRIPT_DIR/commands/setup.md" "$REPO_ROOT/$SPECRAILS_DIR/commands/setup.md"
541
- ok "Installed /setup command"
539
+ # Claude Code uses commands in .claude/commands/specrails/ (namespaced as /specrails:*)
540
+ cp "$SCRIPT_DIR/commands/setup.md" "$REPO_ROOT/$SPECRAILS_DIR/commands/specrails/setup.md"
541
+ ok "Installed /specrails:setup command"
542
542
 
543
- cp "$SCRIPT_DIR/commands/doctor.md" "$REPO_ROOT/$SPECRAILS_DIR/commands/doctor.md"
544
- ok "Installed /doctor command"
543
+ cp "$SCRIPT_DIR/commands/doctor.md" "$REPO_ROOT/$SPECRAILS_DIR/commands/specrails/doctor.md"
544
+ ok "Installed /specrails:doctor command"
545
545
  fi
546
546
 
547
547
  # Install bin/doctor.sh for standalone use
@@ -556,7 +556,7 @@ tar -C "$SCRIPT_DIR/templates" --exclude='node_modules' --exclude='package-lock.
556
556
  | tar -C "$REPO_ROOT/$SPECRAILS_DIR/setup-templates/" -xf -
557
557
  ok "Installed setup templates (commands + skills)"
558
558
 
559
- # Write OSS detection results for /setup
559
+ # Write OSS detection results for /specrails:setup
560
560
  cat > "$REPO_ROOT/$SPECRAILS_DIR/setup-templates/.oss-detection.json" << EOF
561
561
  {
562
562
  "is_oss": $IS_OSS,
@@ -632,7 +632,7 @@ if [[ "$CLI_PROVIDER" == "codex" ]]; then
632
632
  echo " .agents/skills/setup/SKILL.md ← The \$setup skill"
633
633
  echo " .agents/skills/doctor/SKILL.md ← The \$doctor skill"
634
634
  else
635
- echo " $SPECRAILS_DIR/commands/setup.md ← The /setup command"
635
+ echo " $SPECRAILS_DIR/commands/specrails/setup.md ← The /specrails:setup command"
636
636
  fi
637
637
  echo " $SPECRAILS_DIR/setup-templates/ ← Templates: commands + skills (temporary, removed after setup)"
638
638
  echo " .specrails-version ← Installed specrails version"
@@ -658,7 +658,7 @@ echo ""
658
658
  if [[ "$CLI_PROVIDER" == "codex" ]]; then
659
659
  echo -e " ${BOLD}\$setup${NC}"
660
660
  else
661
- echo -e " ${BOLD}/setup${NC}"
661
+ echo -e " ${BOLD}/specrails:setup${NC}"
662
662
  fi
663
663
  echo ""
664
664
  if [[ "$CLI_PROVIDER" == "codex" ]]; then
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "specrails-core",
3
- "version": "3.4.0",
3
+ "version": "3.4.2",
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"
@@ -57,7 +57,7 @@ These are the most common reasons code passes locally but fails in CI:
57
57
 
58
58
  The orchestrator runs specialized layer reviewers in parallel before you launch. Their reports are injected here. A value of `"SKIPPED"` means no files of that layer type were in the changeset.
59
59
 
60
- **These are NOT `/setup` placeholders. They use `[injected]` notation, not `{{...}}` notation.** The `[injected]` markers below are replaced by the actual report text when the orchestrator launches you.
60
+ **These are NOT `/specrails:setup` placeholders. They use `[injected]` notation, not `{{...}}` notation.** The `[injected]` markers below are replaced by the actual report text when the orchestrator launches you.
61
61
 
62
62
  FRONTEND_REVIEW_REPORT:
63
63
  [injected]
@@ -46,7 +46,7 @@ specrails doctor
46
46
  Or inside Claude Code:
47
47
 
48
48
  ```
49
- /doctor
49
+ /specrails:doctor
50
50
  ```
51
51
 
52
52
  ---
@@ -0,0 +1,62 @@
1
+ # Doctor: specrails Health Check
2
+
3
+ Run the specrails health check to validate that all prerequisites are correctly configured for this repository.
4
+
5
+ ---
6
+
7
+ ## What it checks
8
+
9
+ | Check | Pass condition |
10
+ |-------|---------------|
11
+ | Claude Code CLI | `claude` binary found in PATH |
12
+ | Claude API key | `claude config list` shows a key OR `ANTHROPIC_API_KEY` env var set |
13
+ | Agent files | `agents/` directory exists with at least 1 `AGENTS.md` file |
14
+ | CLAUDE.md | `CLAUDE.md` present in the repo root |
15
+ | Git initialized | `.git/` directory present |
16
+ | npm | `npm` binary found in PATH |
17
+
18
+ ## How to run
19
+
20
+ This command delegates to the standalone health check script installed at `.specrails/bin/doctor.sh`. Run it directly:
21
+
22
+ ```
23
+ Bash tool: bash .specrails/bin/doctor.sh
24
+ ```
25
+
26
+ Or via the npm CLI wrapper:
27
+
28
+ ```
29
+ npx specrails-core@latest doctor
30
+ ```
31
+
32
+ ## Output
33
+
34
+ Each check is displayed as ✅ (pass) or ❌ (fail with fix instruction).
35
+
36
+ On all checks passed:
37
+ ```
38
+ All 6 checks passed. Run /specrails:product-backlog to get started.
39
+ ```
40
+
41
+ On failure:
42
+ ```
43
+ ❌ API key: not configured
44
+ Fix: Run: claude config set api_key <your-key> | Get a key: https://console.anthropic.com/
45
+
46
+ 1 check(s) failed.
47
+ ```
48
+
49
+ ## Exit codes
50
+
51
+ - `0` — all checks passed
52
+ - `1` — one or more checks failed
53
+
54
+ ## Log file
55
+
56
+ Each run appends a timestamped summary to `~/.specrails/doctor.log`:
57
+
58
+ ```
59
+ 2026-03-20T10:00:00Z checks=6 passed=6 failed=0
60
+ ```
61
+
62
+ The `~/.specrails/` directory is created automatically if it does not exist.
@@ -40,7 +40,7 @@ Always exclude the following from all analysis:
40
40
 
41
41
  ## Phase 1.5: VPC Context
42
42
 
43
- Check whether persona files exist at `.claude/agents/personas/`. This path is present in any repo that has run `/setup`.
43
+ Check whether persona files exist at `.claude/agents/personas/`. This path is present in any repo that has run `/specrails:setup`.
44
44
 
45
45
  ```bash
46
46
  ls .claude/agents/personas/ 2>/dev/null
@@ -208,5 +208,5 @@ Issues created: {N} (or "dry-run: no issues created")
208
208
  ```
209
209
 
210
210
  Where:
211
- - `{vpc_header}` is `VPC personas loaded: {persona names}` when `VPC_AVAILABLE=true`, or `VPC personas: not found (run /setup to enable)` otherwise.
211
+ - `{vpc_header}` is `VPC personas loaded: {persona names}` when `VPC_AVAILABLE=true`, or `VPC personas: not found (run /specrails:setup to enable)` otherwise.
212
212
  - `{vpc_detail}` is `**VPC Value**: {vpc_value}/5 — {vpc_persona}: {vpc_rationale}` when `VPC_AVAILABLE=true`, omitted otherwise.