specrails-core 3.3.0 → 3.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +77 -63
- package/VERSION +1 -1
- package/bin/doctor.sh +1 -1
- package/bin/perf-check.sh +21 -0
- package/bin/specrails-core.js +7 -4
- package/commands/doctor.md +1 -1
- package/commands/setup.md +72 -79
- package/docs/README.md +3 -2
- package/docs/agents.md +15 -15
- package/docs/changelog.md +20 -20
- package/docs/concepts.md +3 -3
- package/docs/customization.md +18 -5
- package/docs/deployment.md +24 -9
- package/docs/getting-started.md +20 -27
- package/docs/installation.md +81 -72
- package/docs/local-tickets.md +14 -41
- package/docs/migration-guide.md +9 -10
- package/docs/playbook-parallel-dev.md +8 -8
- package/docs/playbook-product-discovery.md +1 -1
- package/docs/plugin-architecture.md +137 -0
- package/docs/research/codex-compatibility-analysis.md +11 -11
- package/docs/research/mcp-feasibility-analysis.md +5 -5
- package/docs/testing/test-matrix-codex.md +1 -2
- package/docs/user-docs/cli-reference.md +57 -69
- package/docs/user-docs/codex-vs-claude-code.md +7 -8
- package/docs/user-docs/faq.md +32 -26
- package/docs/user-docs/getting-started-codex.md +7 -7
- package/docs/user-docs/installation.md +50 -40
- package/docs/user-docs/quick-start.md +21 -27
- package/docs/workflows.md +62 -74
- package/install.sh +3 -3
- package/package.json +1 -1
- package/templates/agents/sr-merge-resolver.md +1 -1
- package/templates/claude-md/CLAUDE-quickstart.md +2 -2
- package/templates/commands/{sr → specrails}/batch-implement.md +18 -18
- package/templates/commands/{sr → specrails}/implement.md +8 -8
- package/templates/commands/{sr → specrails}/memory-inspect.md +3 -3
- package/templates/commands/{sr → specrails}/merge-resolve.md +1 -1
- package/templates/commands/{sr → specrails}/opsx-diff.md +1 -1
- package/templates/commands/{sr → specrails}/product-backlog.md +7 -7
- package/templates/commands/{sr → specrails}/propose-spec.md +1 -1
- package/templates/commands/{sr → specrails}/refactor-recommender.md +1 -1
- package/templates/commands/{sr → specrails}/retry.md +13 -13
- package/templates/commands/{sr → specrails}/team-debug.md +5 -5
- package/templates/commands/{sr → specrails}/team-review.md +4 -4
- package/templates/commands/{sr → specrails}/telemetry.md +2 -2
- package/templates/commands/{sr → specrails}/update-product-driven-backlog.md +2 -2
- package/templates/commands/{sr → specrails}/vpc-drift.md +4 -4
- package/templates/commands/{sr → specrails}/why.md +5 -5
- package/templates/commands/test.md +2 -2
- package/templates/skills/sr-batch-implement/SKILL.md +18 -18
- package/templates/skills/sr-implement/SKILL.md +8 -8
- package/templates/skills/sr-product-backlog/SKILL.md +7 -7
- package/templates/skills/sr-refactor-recommender/SKILL.md +1 -1
- package/templates/skills/sr-update-backlog/SKILL.md +2 -2
- package/templates/skills/sr-why/SKILL.md +5 -5
- package/update.sh +2 -3
- 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/templates/commands/{sr → specrails}/compat-check.md +0 -0
- /package/templates/commands/{sr → specrails}/health-check.md +0 -0
package/docs/migration-guide.md
CHANGED
|
@@ -11,7 +11,6 @@ Switching is optional. GitHub Issues and JIRA remain fully supported. Local tick
|
|
|
11
11
|
**Switch to local tickets if:**
|
|
12
12
|
- Your team prefers a simple, zero-dependency setup
|
|
13
13
|
- You want tickets version-controlled alongside your code
|
|
14
|
-
- You use specrails-hub and want the visual ticket panel
|
|
15
14
|
- You don't need GitHub/JIRA for other workflows (project boards, external stakeholders)
|
|
16
15
|
|
|
17
16
|
**Stay on GitHub Issues / JIRA if:**
|
|
@@ -37,7 +36,7 @@ Then initialize the ticket store if it doesn't exist yet:
|
|
|
37
36
|
|
|
38
37
|
```bash
|
|
39
38
|
# Inside Claude Code or Codex
|
|
40
|
-
/
|
|
39
|
+
/specrails:implement --setup-local-tickets
|
|
41
40
|
```
|
|
42
41
|
|
|
43
42
|
Or create the file manually:
|
|
@@ -64,7 +63,7 @@ Use the `sr:migrate-from-github` command (requires `gh` CLI):
|
|
|
64
63
|
|
|
65
64
|
```bash
|
|
66
65
|
# Inside Claude Code
|
|
67
|
-
/
|
|
66
|
+
/specrails:migrate-from-github
|
|
68
67
|
```
|
|
69
68
|
|
|
70
69
|
This command:
|
|
@@ -81,13 +80,13 @@ This command:
|
|
|
81
80
|
To import all open issues regardless of label:
|
|
82
81
|
|
|
83
82
|
```bash
|
|
84
|
-
/
|
|
83
|
+
/specrails:migrate-from-github --all
|
|
85
84
|
```
|
|
86
85
|
|
|
87
86
|
To do a dry run (preview without writing):
|
|
88
87
|
|
|
89
88
|
```bash
|
|
90
|
-
/
|
|
89
|
+
/specrails:migrate-from-github --dry-run
|
|
91
90
|
```
|
|
92
91
|
|
|
93
92
|
**After import:** Your GitHub Issues are unchanged. The migration is additive — it only creates local tickets. You can continue using GitHub Issues in parallel until you're ready to stop.
|
|
@@ -98,7 +97,7 @@ Use the `sr:migrate-from-jira` command (requires `jira` CLI or REST API credenti
|
|
|
98
97
|
|
|
99
98
|
```bash
|
|
100
99
|
# Inside Claude Code
|
|
101
|
-
/
|
|
100
|
+
/specrails:migrate-from-jira
|
|
102
101
|
```
|
|
103
102
|
|
|
104
103
|
This command:
|
|
@@ -119,11 +118,11 @@ The original JIRA key is preserved in `metadata.jira_key` so you can cross-refer
|
|
|
119
118
|
|
|
120
119
|
## Step 3: Regenerate commands (optional but recommended)
|
|
121
120
|
|
|
122
|
-
Command templates are generated at `/setup` time with provider-specific instructions baked in. After switching providers, regenerate them so commands use the local file operations instead of GitHub/JIRA CLI calls:
|
|
121
|
+
Command templates are generated at `/specrails:setup` time with provider-specific instructions baked in. After switching providers, regenerate them so commands use the local file operations instead of GitHub/JIRA CLI calls:
|
|
123
122
|
|
|
124
123
|
```bash
|
|
125
124
|
npx specrails-core@latest init --root-dir .
|
|
126
|
-
> /setup --update
|
|
125
|
+
> /specrails:setup --update
|
|
127
126
|
```
|
|
128
127
|
|
|
129
128
|
The `--update` flag regenerates only the backlog commands (`product-backlog`, `update-product-driven-backlog`, `implement`) without re-running the full stack analysis.
|
|
@@ -134,8 +133,8 @@ The `--update` flag regenerates only the backlog commands (`product-backlog`, `u
|
|
|
134
133
|
|
|
135
134
|
To revert to GitHub Issues:
|
|
136
135
|
|
|
137
|
-
1. Edit `.claude/backlog-config.json` and set `
|
|
138
|
-
2. Re-run `/setup --update` to regenerate commands
|
|
136
|
+
1. Edit `.specrails/config.yaml` (or `.claude/backlog-config.json` for scaffold installs) and set `provider: github`
|
|
137
|
+
2. Re-run `/specrails:setup --update` to regenerate commands
|
|
139
138
|
3. Your `local-tickets.json` is preserved — switch back any time
|
|
140
139
|
|
|
141
140
|
Local tickets and external provider data are independent. Switching providers does not delete tickets from either system.
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
## How specrails parallelizes work
|
|
6
6
|
|
|
7
|
-
When you pass multiple issue numbers to `/
|
|
7
|
+
When you pass multiple issue numbers to `/specrails:batch-implement`, specrails spawns one git worktree per feature. Each worktree has its own branch, its own isolated copy of the working tree, and its own full agent pipeline running concurrently. Features do not queue — they run in parallel from Phase 3a (Architecture) through Phase 5 (PR creation).
|
|
8
8
|
|
|
9
9
|
This is not a simulation of parallelism. Each pipeline is a separate Claude Code session with no shared state. The Architect for issue #71 has no visibility into the Architect for issue #63. Each Developer commits to its own branch. Each Reviewer runs CI independently. The worktrees are merged into the base branch at the end of the batch run.
|
|
10
10
|
|
|
@@ -22,7 +22,7 @@ Not every combination of features is safe to run in parallel. A feature is safe
|
|
|
22
22
|
|
|
23
23
|
4. **Wave 1 in the dependency DAG**: the feature has no unimplemented prerequisites. A feature with `Prerequisites: #71` cannot run in the same batch as #71 — it must wait for #71 to ship first.
|
|
24
24
|
|
|
25
|
-
When in doubt, run `/
|
|
25
|
+
When in doubt, run `/specrails:product-backlog` to see the dependency ordering before composing your batch.
|
|
26
26
|
|
|
27
27
|
## What's not safe
|
|
28
28
|
|
|
@@ -38,10 +38,10 @@ Some combinations look independent but are not:
|
|
|
38
38
|
|
|
39
39
|
## Reading the dependency DAG
|
|
40
40
|
|
|
41
|
-
Run `/
|
|
41
|
+
Run `/specrails:product-backlog` before composing any parallel batch. The output includes a prioritized backlog table with dependency metadata. Wave 1 features — those with no unimplemented prerequisites — are your safe parallel batch candidates.
|
|
42
42
|
|
|
43
43
|
```
|
|
44
|
-
/
|
|
44
|
+
/specrails:product-backlog
|
|
45
45
|
|
|
46
46
|
┌─ API ──────────────────────────────────────────┐
|
|
47
47
|
│ # Issue Score Effort Description │
|
|
@@ -72,13 +72,13 @@ Reading the issue bodies:
|
|
|
72
72
|
#71 and #63 are independent of each other and have no prerequisites. They are Wave 1. Run them in parallel:
|
|
73
73
|
|
|
74
74
|
```
|
|
75
|
-
/
|
|
75
|
+
/specrails:batch-implement #71, #63
|
|
76
76
|
```
|
|
77
77
|
|
|
78
78
|
Both pipelines run concurrently. Each produces a PR. After both PRs are merged, #85 is unblocked. Run it alone:
|
|
79
79
|
|
|
80
80
|
```
|
|
81
|
-
/
|
|
81
|
+
/specrails:implement #85
|
|
82
82
|
```
|
|
83
83
|
|
|
84
84
|
Attempting to include #85 in the first batch would have caused the Developer for #85 to run without the rate limiting middleware in place, producing code that imports a module that doesn't exist yet.
|
|
@@ -103,7 +103,7 @@ After all worktree pipelines complete, specrails attempts to merge each feature
|
|
|
103
103
|
|
|
104
104
|
| Pattern | Why it works |
|
|
105
105
|
|---------|-------------|
|
|
106
|
-
| Run `/
|
|
106
|
+
| Run `/specrails:product-backlog` before composing a batch | Surfaces the dependency DAG so you batch only Wave 1 features |
|
|
107
107
|
| Keep batches to 2–4 features | Smaller batches reduce conflict surface area and keep the merge step fast |
|
|
108
108
|
| Ensure all specs are approved before starting the batch | Prevents mid-batch spec revisions that invalidate a running pipeline |
|
|
109
109
|
| Sequence database migration features before features that consume the schema | Eliminates the most common class of parallel dev failures |
|
|
@@ -117,7 +117,7 @@ After all worktree pipelines complete, specrails attempts to merge each feature
|
|
|
117
117
|
|
|
118
118
|
## What's next?
|
|
119
119
|
|
|
120
|
-
- [Workflows & Commands](workflows.md) — full reference for `/
|
|
120
|
+
- [Workflows & Commands](workflows.md) — full reference for `/specrails:batch-implement`, `/specrails:implement`, and `/specrails:product-backlog`
|
|
121
121
|
|
|
122
122
|
---
|
|
123
123
|
|
|
@@ -45,7 +45,7 @@ The difference is not length — it is specificity. The Architect can produce a
|
|
|
45
45
|
|
|
46
46
|
The Product Analyst reads your GitHub Issues labeled `product-driven-backlog` to build the dependency DAG and score your backlog. The issue body structure matters.
|
|
47
47
|
|
|
48
|
-
**The `Prerequisites:` field** is how you tell the Product Analyst that one issue depends on another. When you run `/
|
|
48
|
+
**The `Prerequisites:` field** is how you tell the Product Analyst that one issue depends on another. When you run `/specrails:product-backlog`, the dependency DAG is built from these declarations. Issues without prerequisites are Wave 1 candidates — safe to implement in parallel. Issues with prerequisites are scheduled after their dependencies complete.
|
|
49
49
|
|
|
50
50
|
```
|
|
51
51
|
Prerequisites: #71 (rate limiting middleware must exist before we can display rate limit status)
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
# Plugin Architecture
|
|
2
|
+
|
|
3
|
+
SpecRails is distributed as a **Claude Code plugin** (`sr`). This document explains what that means, how the plugin relates to your project, and the three available distribution channels.
|
|
4
|
+
|
|
5
|
+
## Two-layer model
|
|
6
|
+
|
|
7
|
+
SpecRails separates **logic** (the plugin) from **project data** (your repo).
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
┌─────────────────────────────────────┐
|
|
11
|
+
│ sr plugin (logic) │
|
|
12
|
+
│ agents · skills · hooks · refs │
|
|
13
|
+
│ updated via: claude plugin update │
|
|
14
|
+
└────────────────┬────────────────────┘
|
|
15
|
+
│ /specrails:setup generates
|
|
16
|
+
▼
|
|
17
|
+
┌─────────────────────────────────────┐
|
|
18
|
+
│ .specrails/ (project data) │
|
|
19
|
+
│ config · personas · rules · memory │
|
|
20
|
+
│ lives in your repo, yours to edit │
|
|
21
|
+
└─────────────────────────────────────┘
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
### What lives in the plugin
|
|
25
|
+
|
|
26
|
+
The plugin contains everything that doesn't change per project:
|
|
27
|
+
|
|
28
|
+
| Component | Description |
|
|
29
|
+
|-----------|-------------|
|
|
30
|
+
| **Agent prompts** | sr-architect, sr-developer, sr-reviewer, sr-product-manager, and 10 more |
|
|
31
|
+
| **Skills** | OpenSpec skills (`/opsx:*`), workflow commands (`/specrails:*`) |
|
|
32
|
+
| **Hooks** | Pre/post-tool hooks for agent coordination |
|
|
33
|
+
| **References** | Agent reference docs, API patterns, test conventions |
|
|
34
|
+
|
|
35
|
+
You never edit these directly. To update them, run `claude plugin update sr`.
|
|
36
|
+
|
|
37
|
+
### What lives in your project (`.specrails/`)
|
|
38
|
+
|
|
39
|
+
`/specrails:setup` generates ~8–10 files adapted to your specific codebase:
|
|
40
|
+
|
|
41
|
+
| File | Description |
|
|
42
|
+
|------|-------------|
|
|
43
|
+
| `config.yaml` | Stack overview, CI commands, git workflow, backlog provider |
|
|
44
|
+
| `personas/*.md` | VPC user personas — researched from your domain |
|
|
45
|
+
| `rules/*.md` | Per-layer coding conventions (backend, frontend, etc.) |
|
|
46
|
+
| `agent-memory/` | Persistent agent knowledge — grows across sessions |
|
|
47
|
+
| `pipeline/` | In-flight state for parallel feature builds |
|
|
48
|
+
| `CLAUDE.md` (root) | Project architecture reference for agents |
|
|
49
|
+
|
|
50
|
+
These files are committed to your repo. They are the "project intelligence" that makes agents adapt to your stack.
|
|
51
|
+
|
|
52
|
+
## Distribution channels
|
|
53
|
+
|
|
54
|
+
SpecRails supports three installation paths:
|
|
55
|
+
|
|
56
|
+
### 1. Claude Code plugin (recommended)
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
claude plugin install sr # install
|
|
60
|
+
/specrails:setup # configure for your project
|
|
61
|
+
claude plugin update sr # update logic anytime
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
**Best for:** Most projects. No Node.js required. Plugin updates are one command and don't touch your project data.
|
|
65
|
+
|
|
66
|
+
### 2. Claude Code scaffold
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
npx specrails-core@latest init --root-dir . # copy templates
|
|
70
|
+
/specrails:setup # configure
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
The scaffold copies the full agent+command set into `.claude/` — you own and version those files. Updates require re-running `npx` and re-running `/specrails:setup`.
|
|
74
|
+
|
|
75
|
+
**Best for:** Teams that want to version the agent prompts themselves, or projects that need full offline control.
|
|
76
|
+
|
|
77
|
+
### 3. Codex project
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
npx specrails-core@latest init --root-dir . # same as scaffold
|
|
81
|
+
codex # open Codex
|
|
82
|
+
/specrails:setup # configure
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
Codex does not support the Claude Code plugin system. Use the scaffold method.
|
|
86
|
+
|
|
87
|
+
**Best for:** OpenAI Codex CLI users.
|
|
88
|
+
|
|
89
|
+
## The `/specrails:setup` wizard
|
|
90
|
+
|
|
91
|
+
`/specrails:setup` is a 5-phase setup wizard that generates your project data. It runs once (or re-runs to regenerate).
|
|
92
|
+
|
|
93
|
+
| Phase | Output |
|
|
94
|
+
|-------|--------|
|
|
95
|
+
| **1. Analyze** | Detects stack, CI commands, architecture layers |
|
|
96
|
+
| **2. Personas** | Researches domain, generates VPC user personas |
|
|
97
|
+
| **3. Configure** | Backlog provider, git workflow, agent selection |
|
|
98
|
+
| **4. Generate** | Writes `.specrails/config.yaml`, personas, rules, CLAUDE.md |
|
|
99
|
+
| **5. Cleanup** | Removes wizard scaffolding |
|
|
100
|
+
|
|
101
|
+
Quick mode: `/specrails:setup --lite` — three questions, done in under a minute.
|
|
102
|
+
|
|
103
|
+
## OpenSpec skills
|
|
104
|
+
|
|
105
|
+
The `sr` plugin bundles the full OpenSpec skill set. These are available as `/opsx:*` commands:
|
|
106
|
+
|
|
107
|
+
| Skill | Purpose |
|
|
108
|
+
|-------|---------|
|
|
109
|
+
| `/opsx:ff` | Fast-forward through all change artifacts |
|
|
110
|
+
| `/opsx:apply` | Implement an OpenSpec change |
|
|
111
|
+
| `/opsx:verify` | Verify implementation matches spec |
|
|
112
|
+
| `/opsx:archive` | Archive a completed change |
|
|
113
|
+
| `/opsx:explore` | Explore ideas before writing a spec |
|
|
114
|
+
|
|
115
|
+
OpenSpec is the structured design layer that powers `/specrails:implement` — the architect uses it to produce a technical design before the developer begins coding.
|
|
116
|
+
|
|
117
|
+
## Updating
|
|
118
|
+
|
|
119
|
+
### Update plugin logic
|
|
120
|
+
|
|
121
|
+
```bash
|
|
122
|
+
claude plugin update sr
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
Updates agents, skills, hooks, and references. Does not touch `.specrails/` project data.
|
|
126
|
+
|
|
127
|
+
### Regenerate project data
|
|
128
|
+
|
|
129
|
+
```bash
|
|
130
|
+
/specrails:setup
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
Re-runs the wizard and regenerates `.specrails/`. Useful when your stack changes significantly or you want to refresh personas.
|
|
134
|
+
|
|
135
|
+
---
|
|
136
|
+
|
|
137
|
+
[← Installation](installation.md) · [Core Concepts →](concepts.md)
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
|
|
13
13
|
Claude Code y Codex han convergido arquitectónicamente de forma significativa durante 2025–2026. Comparten el mismo formato de Skills (OpenAI adoptó la spec de Anthropic en diciembre 2025), ambos soportan MCP como mecanismo de extensión, ambos usan ficheros Markdown jerárquicos como instrucciones de agente (`AGENTS.md` vs `CLAUDE.md`), y ambos soportan subagentes y ejecución paralela.
|
|
14
14
|
|
|
15
|
-
El camino de menor resistencia para dar soporte a Codex **no requiere reescribir specrails-core** — requiere refactorizar los comandos `/
|
|
15
|
+
El camino de menor resistencia para dar soporte a Codex **no requiere reescribir specrails-core** — requiere refactorizar los comandos `/specrails:*` de slash commands Claude Code-only a Skills (formato ya compatible con ambas plataformas), y añadir una capa de abstracción mínima en el instalador.
|
|
16
16
|
|
|
17
17
|
| Dimensión | Valoración |
|
|
18
18
|
|-----------|-----------|
|
|
@@ -83,7 +83,7 @@ Esta es la finding más importante de la investigación.
|
|
|
83
83
|
|
|
84
84
|
OpenAI adoptó en diciembre 2025 el **mismo formato `SKILL.md`** que publicó Anthropic. Esto significa que:
|
|
85
85
|
|
|
86
|
-
> **Todos los Skills de specrails (`/
|
|
86
|
+
> **Todos los Skills de specrails (`/specrails:implement`, `/opsx:ff`, etc.) son compatible con Codex sin cambios de formato.**
|
|
87
87
|
|
|
88
88
|
La implicación práctica: si specrails migra sus comandos de workflow de "slash commands Claude Code-only" a "Skills" (lo que en gran medida ya está ocurriendo), esos Skills funcionan en ambas plataformas.
|
|
89
89
|
|
|
@@ -103,12 +103,12 @@ La implicación práctica: si specrails migra sus comandos de workflow de "slash
|
|
|
103
103
|
|
|
104
104
|
#### B. Comandos Slash vs Skills
|
|
105
105
|
|
|
106
|
-
**Estado actual**: Los comandos `/
|
|
106
|
+
**Estado actual**: Los comandos `/specrails:*` son slash commands Claude Code-only, definidos como markdown en `.claude/commands/specrails/`. Codex no permite slash commands user-definables.
|
|
107
107
|
|
|
108
|
-
**Solución (crítica)**: Los Skills ya son el mecanismo correcto. specrails ya tiene muchos `/
|
|
108
|
+
**Solución (crítica)**: Los Skills ya son el mecanismo correcto. specrails ya tiene muchos `/specrails:*` implementados como Skills (el `.claude/skills/` directory). La migración es convertir los comandos restantes a formato Skill.
|
|
109
109
|
|
|
110
110
|
```markdown
|
|
111
|
-
# Antes: .claude/commands/
|
|
111
|
+
# Antes: .claude/commands/specrails/implement.md (Claude Code-only)
|
|
112
112
|
# Después: .claude/skills/sr-implement/SKILL.md (compatible con ambos)
|
|
113
113
|
```
|
|
114
114
|
|
|
@@ -165,7 +165,7 @@ model = "codex-mini-latest"
|
|
|
165
165
|
|
|
166
166
|
#### F. Variables de entorno Claude Code-specific
|
|
167
167
|
|
|
168
|
-
**Estado actual**: El comando `/
|
|
168
|
+
**Estado actual**: El comando `/specrails:implement` detecta `CLAUDE_CODE_ENTRYPOINT` y `CLAUDE_CODE_REMOTE`.
|
|
169
169
|
|
|
170
170
|
**Solución**: Abstracción — detectar environment vars de ambas CLIs o usar las propias del runner.
|
|
171
171
|
|
|
@@ -239,7 +239,7 @@ specrails-hub se comunica con specrails-core vía `integration-contract.json`. E
|
|
|
239
239
|
|
|
240
240
|
### Approach B: Skills-First (Recomendado)
|
|
241
241
|
|
|
242
|
-
**Descripción**: Refactorizar los comandos `/
|
|
242
|
+
**Descripción**: Refactorizar los comandos `/specrails:*` como Skills (ya compatibles con ambas plataformas). El core de workflow no depende de la CLI — funciona igual en Claude Code y Codex. La integración de agentes se hace vía Skills y MCP.
|
|
243
243
|
|
|
244
244
|
**Por qué es el approach correcto**:
|
|
245
245
|
- Skills son el mínimo común denominador entre CLIs
|
|
@@ -298,7 +298,7 @@ Hay señales claras de que Codex está ganando tracción rápidamente (open sour
|
|
|
298
298
|
**Proceder con Approach B (Skills-First) como Phase 1, con roadmap hacia Approach A.**
|
|
299
299
|
|
|
300
300
|
### Fase 1 — Skills-First (Q2 2026, ~3-4 semanas)
|
|
301
|
-
- Migrar comandos `/
|
|
301
|
+
- Migrar comandos `/specrails:*` a Skills format
|
|
302
302
|
- Añadir detección de CLI en install.sh
|
|
303
303
|
- Soporte de `.codex/` directory como alternativa a `.claude/`
|
|
304
304
|
- Hub detection layer
|
|
@@ -323,7 +323,7 @@ Si el board aprueba proceder:
|
|
|
323
323
|
1. **Crear epic SPEA-Codex-Support** en specrails-core project
|
|
324
324
|
2. **Asignar al Tech Lead (specrails-core)** el diseño técnico detallado de la abstracción de provider
|
|
325
325
|
3. **Crear subtareas**:
|
|
326
|
-
- Skills migration completa (`/
|
|
326
|
+
- Skills migration completa (`/specrails:*` → Skills format)
|
|
327
327
|
- install.sh provider detection
|
|
328
328
|
- Hub detection layer
|
|
329
329
|
- Integration testing con Codex CLI
|
|
@@ -335,8 +335,8 @@ Si el board aprueba proceder:
|
|
|
335
335
|
|
|
336
336
|
| specrails (actual) | Claude Code invocation | Codex invocation |
|
|
337
337
|
|-------------------|----------------------|-----------------|
|
|
338
|
-
| `/
|
|
339
|
-
| `/
|
|
338
|
+
| `/specrails:implement` | Slash command | Skill (mismo `SKILL.md`) |
|
|
339
|
+
| `/specrails:product-backlog` | Slash command | Skill |
|
|
340
340
|
| `/opsx:ff` | Slash command | Skill |
|
|
341
341
|
| `/setup` | Slash command | `codex exec "run setup"` |
|
|
342
342
|
| Agent `sr-architect` | `.claude/agents/sr-architect.md` | `.codex/agents/sr-architect.toml` |
|
|
@@ -45,7 +45,7 @@ npx specrails-core@latest init → install.sh (bash) → /setup (Claud
|
|
|
45
45
|
|
|
46
46
|
```
|
|
47
47
|
Claude Code
|
|
48
|
-
├── Commands (/
|
|
48
|
+
├── Commands (/specrails:implement, /specrails:product-backlog, ...)
|
|
49
49
|
├── Skills (/opsx:new, /opsx:apply, /opsx:ff, ...)
|
|
50
50
|
├── Agents (sr-architect, sr-developer, sr-reviewer, ...)
|
|
51
51
|
├── Rules (.claude/rules/ — layer-specific conventions)
|
|
@@ -146,7 +146,7 @@ The current architecture tightly couples specrails to Claude Code's command/skil
|
|
|
146
146
|
│ Specs, Personas, Memory, Config, Analysis │
|
|
147
147
|
├─────────────────────────────────────────────┤
|
|
148
148
|
│ Claude Code (Orchestration) │
|
|
149
|
-
│ /
|
|
149
|
+
│ /specrails:implement, /specrails:batch-implement, agents │
|
|
150
150
|
└─────────────────────────────────────────────┘
|
|
151
151
|
```
|
|
152
152
|
|
|
@@ -168,7 +168,7 @@ Skills and commands already provide strong Claude Code integration. MCP adds com
|
|
|
168
168
|
|
|
169
169
|
#### B. Orchestration Can't Move to MCP
|
|
170
170
|
|
|
171
|
-
The `/
|
|
171
|
+
The `/specrails:implement` pipeline requires Claude Code's Agent tool (subagent spawning, worktree isolation, background execution). MCP tools are request/response — they can't replicate multi-phase orchestration.
|
|
172
172
|
|
|
173
173
|
**Counter:** This is exactly why the recommendation is scoped. Orchestration stays in Claude Code; only knowledge access moves to MCP.
|
|
174
174
|
|
|
@@ -333,8 +333,8 @@ These capabilities require Claude Code's runtime and should NOT be exposed via M
|
|
|
333
333
|
|
|
334
334
|
| Capability | Reason |
|
|
335
335
|
|------------|--------|
|
|
336
|
-
| `/
|
|
337
|
-
| `/
|
|
336
|
+
| `/specrails:implement` pipeline | Requires Agent tool (subagent spawning) |
|
|
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
340
|
| `/setup` wizard | Multi-step interactive configuration |
|
|
@@ -36,11 +36,10 @@ Epic: [SPEA-505](/SPEA/issues/SPEA-505) — Codex Compatibility Approach B
|
|
|
36
36
|
|
|
37
37
|
| Feature | Claude Code | Codex |
|
|
38
38
|
|---------|:-:|:-:|
|
|
39
|
-
| Legacy slash commands `.claude/commands/
|
|
39
|
+
| Legacy slash commands `.claude/commands/specrails/` | ✅ | ❌ |
|
|
40
40
|
| SKILL.md format `.claude/skills/sr-*/` | ✅ | ✅ |
|
|
41
41
|
| `sr:implement` skill | ✅ | ✅ |
|
|
42
42
|
| `sr:product-backlog` skill | ✅ | ✅ |
|
|
43
|
-
| `sr:health-check` skill | ✅ | ✅ |
|
|
44
43
|
| `sr:compat-check` skill | ✅ | ✅ |
|
|
45
44
|
| `sr:why` skill | ✅ | ✅ |
|
|
46
45
|
| `sr:refactor-recommender` skill | ✅ | ✅ |
|