specrails 0.2.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/.claude/skills/openspec-apply-change/SKILL.md +156 -0
- package/.claude/skills/openspec-archive-change/SKILL.md +114 -0
- package/.claude/skills/openspec-bulk-archive-change/SKILL.md +246 -0
- package/.claude/skills/openspec-continue-change/SKILL.md +118 -0
- package/.claude/skills/openspec-explore/SKILL.md +290 -0
- package/.claude/skills/openspec-ff-change/SKILL.md +101 -0
- package/.claude/skills/openspec-new-change/SKILL.md +74 -0
- package/.claude/skills/openspec-onboard/SKILL.md +529 -0
- package/.claude/skills/openspec-sync-specs/SKILL.md +138 -0
- package/.claude/skills/openspec-verify-change/SKILL.md +168 -0
- package/README.md +226 -0
- package/VERSION +1 -0
- package/bin/specrails.js +41 -0
- package/commands/setup.md +851 -0
- package/install.sh +488 -0
- package/package.json +34 -0
- package/prompts/analyze-codebase.md +87 -0
- package/prompts/generate-personas.md +61 -0
- package/prompts/infer-conventions.md +72 -0
- package/templates/agents/sr-architect.md +194 -0
- package/templates/agents/sr-backend-developer.md +54 -0
- package/templates/agents/sr-backend-reviewer.md +139 -0
- package/templates/agents/sr-developer.md +146 -0
- package/templates/agents/sr-doc-sync.md +167 -0
- package/templates/agents/sr-frontend-developer.md +48 -0
- package/templates/agents/sr-frontend-reviewer.md +132 -0
- package/templates/agents/sr-product-analyst.md +36 -0
- package/templates/agents/sr-product-manager.md +148 -0
- package/templates/agents/sr-reviewer.md +265 -0
- package/templates/agents/sr-security-reviewer.md +178 -0
- package/templates/agents/sr-test-writer.md +163 -0
- package/templates/claude-md/root.md +50 -0
- package/templates/commands/sr/batch-implement.md +282 -0
- package/templates/commands/sr/compat-check.md +271 -0
- package/templates/commands/sr/health-check.md +396 -0
- package/templates/commands/sr/implement.md +972 -0
- package/templates/commands/sr/product-backlog.md +195 -0
- package/templates/commands/sr/refactor-recommender.md +169 -0
- package/templates/commands/sr/update-product-driven-backlog.md +272 -0
- package/templates/commands/sr/why.md +96 -0
- package/templates/personas/persona.md +43 -0
- package/templates/personas/the-maintainer.md +78 -0
- package/templates/rules/layer.md +8 -0
- package/templates/security/security-exemptions.yaml +20 -0
- package/templates/settings/confidence-config.json +17 -0
- package/templates/settings/settings.json +15 -0
- package/templates/web-manager/README.md +107 -0
- package/templates/web-manager/client/index.html +12 -0
- package/templates/web-manager/client/package-lock.json +1727 -0
- package/templates/web-manager/client/package.json +20 -0
- package/templates/web-manager/client/src/App.tsx +83 -0
- package/templates/web-manager/client/src/components/AgentActivity.tsx +19 -0
- package/templates/web-manager/client/src/components/CommandInput.tsx +81 -0
- package/templates/web-manager/client/src/components/LogStream.tsx +57 -0
- package/templates/web-manager/client/src/components/PipelineSidebar.tsx +65 -0
- package/templates/web-manager/client/src/components/SearchBox.tsx +34 -0
- package/templates/web-manager/client/src/hooks/usePipeline.ts +62 -0
- package/templates/web-manager/client/src/hooks/useWebSocket.ts +59 -0
- package/templates/web-manager/client/src/main.tsx +9 -0
- package/templates/web-manager/client/tsconfig.json +21 -0
- package/templates/web-manager/client/tsconfig.node.json +11 -0
- package/templates/web-manager/client/vite.config.ts +13 -0
- package/templates/web-manager/package-lock.json +3327 -0
- package/templates/web-manager/package.json +30 -0
- package/templates/web-manager/server/hooks.test.ts +196 -0
- package/templates/web-manager/server/hooks.ts +71 -0
- package/templates/web-manager/server/index.test.ts +186 -0
- package/templates/web-manager/server/index.ts +99 -0
- package/templates/web-manager/server/spawner.test.ts +319 -0
- package/templates/web-manager/server/spawner.ts +89 -0
- package/templates/web-manager/server/types.ts +46 -0
- package/templates/web-manager/tsconfig.json +14 -0
- package/templates/web-manager/vitest.config.ts +8 -0
- package/update.sh +877 -0
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: openspec-verify-change
|
|
3
|
+
description: Verify implementation matches change artifacts. Use when the user wants to validate that implementation is complete, correct, and coherent before archiving.
|
|
4
|
+
license: MIT
|
|
5
|
+
compatibility: Requires openspec CLI.
|
|
6
|
+
metadata:
|
|
7
|
+
author: openspec
|
|
8
|
+
version: "1.0"
|
|
9
|
+
generatedBy: "1.1.1"
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
Verify that an implementation matches the change artifacts (specs, tasks, design).
|
|
13
|
+
|
|
14
|
+
**Input**: Optionally specify a change name. If omitted, check if it can be inferred from conversation context. If vague or ambiguous you MUST prompt for available changes.
|
|
15
|
+
|
|
16
|
+
**Steps**
|
|
17
|
+
|
|
18
|
+
1. **If no change name provided, prompt for selection**
|
|
19
|
+
|
|
20
|
+
Run `openspec list --json` to get available changes. Use the **AskUserQuestion tool** to let the user select.
|
|
21
|
+
|
|
22
|
+
Show changes that have implementation tasks (tasks artifact exists).
|
|
23
|
+
Include the schema used for each change if available.
|
|
24
|
+
Mark changes with incomplete tasks as "(In Progress)".
|
|
25
|
+
|
|
26
|
+
**IMPORTANT**: Do NOT guess or auto-select a change. Always let the user choose.
|
|
27
|
+
|
|
28
|
+
2. **Check status to understand the schema**
|
|
29
|
+
```bash
|
|
30
|
+
openspec status --change "<name>" --json
|
|
31
|
+
```
|
|
32
|
+
Parse the JSON to understand:
|
|
33
|
+
- `schemaName`: The workflow being used (e.g., "spec-driven")
|
|
34
|
+
- Which artifacts exist for this change
|
|
35
|
+
|
|
36
|
+
3. **Get the change directory and load artifacts**
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
openspec instructions apply --change "<name>" --json
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
This returns the change directory and context files. Read all available artifacts from `contextFiles`.
|
|
43
|
+
|
|
44
|
+
4. **Initialize verification report structure**
|
|
45
|
+
|
|
46
|
+
Create a report structure with three dimensions:
|
|
47
|
+
- **Completeness**: Track tasks and spec coverage
|
|
48
|
+
- **Correctness**: Track requirement implementation and scenario coverage
|
|
49
|
+
- **Coherence**: Track design adherence and pattern consistency
|
|
50
|
+
|
|
51
|
+
Each dimension can have CRITICAL, WARNING, or SUGGESTION issues.
|
|
52
|
+
|
|
53
|
+
5. **Verify Completeness**
|
|
54
|
+
|
|
55
|
+
**Task Completion**:
|
|
56
|
+
- If tasks.md exists in contextFiles, read it
|
|
57
|
+
- Parse checkboxes: `- [ ]` (incomplete) vs `- [x]` (complete)
|
|
58
|
+
- Count complete vs total tasks
|
|
59
|
+
- If incomplete tasks exist:
|
|
60
|
+
- Add CRITICAL issue for each incomplete task
|
|
61
|
+
- Recommendation: "Complete task: <description>" or "Mark as done if already implemented"
|
|
62
|
+
|
|
63
|
+
**Spec Coverage**:
|
|
64
|
+
- If delta specs exist in `openspec/changes/<name>/specs/`:
|
|
65
|
+
- Extract all requirements (marked with "### Requirement:")
|
|
66
|
+
- For each requirement:
|
|
67
|
+
- Search codebase for keywords related to the requirement
|
|
68
|
+
- Assess if implementation likely exists
|
|
69
|
+
- If requirements appear unimplemented:
|
|
70
|
+
- Add CRITICAL issue: "Requirement not found: <requirement name>"
|
|
71
|
+
- Recommendation: "Implement requirement X: <description>"
|
|
72
|
+
|
|
73
|
+
6. **Verify Correctness**
|
|
74
|
+
|
|
75
|
+
**Requirement Implementation Mapping**:
|
|
76
|
+
- For each requirement from delta specs:
|
|
77
|
+
- Search codebase for implementation evidence
|
|
78
|
+
- If found, note file paths and line ranges
|
|
79
|
+
- Assess if implementation matches requirement intent
|
|
80
|
+
- If divergence detected:
|
|
81
|
+
- Add WARNING: "Implementation may diverge from spec: <details>"
|
|
82
|
+
- Recommendation: "Review <file>:<lines> against requirement X"
|
|
83
|
+
|
|
84
|
+
**Scenario Coverage**:
|
|
85
|
+
- For each scenario in delta specs (marked with "#### Scenario:"):
|
|
86
|
+
- Check if conditions are handled in code
|
|
87
|
+
- Check if tests exist covering the scenario
|
|
88
|
+
- If scenario appears uncovered:
|
|
89
|
+
- Add WARNING: "Scenario not covered: <scenario name>"
|
|
90
|
+
- Recommendation: "Add test or implementation for scenario: <description>"
|
|
91
|
+
|
|
92
|
+
7. **Verify Coherence**
|
|
93
|
+
|
|
94
|
+
**Design Adherence**:
|
|
95
|
+
- If design.md exists in contextFiles:
|
|
96
|
+
- Extract key decisions (look for sections like "Decision:", "Approach:", "Architecture:")
|
|
97
|
+
- Verify implementation follows those decisions
|
|
98
|
+
- If contradiction detected:
|
|
99
|
+
- Add WARNING: "Design decision not followed: <decision>"
|
|
100
|
+
- Recommendation: "Update implementation or revise design.md to match reality"
|
|
101
|
+
- If no design.md: Skip design adherence check, note "No design.md to verify against"
|
|
102
|
+
|
|
103
|
+
**Code Pattern Consistency**:
|
|
104
|
+
- Review new code for consistency with project patterns
|
|
105
|
+
- Check file naming, directory structure, coding style
|
|
106
|
+
- If significant deviations found:
|
|
107
|
+
- Add SUGGESTION: "Code pattern deviation: <details>"
|
|
108
|
+
- Recommendation: "Consider following project pattern: <example>"
|
|
109
|
+
|
|
110
|
+
8. **Generate Verification Report**
|
|
111
|
+
|
|
112
|
+
**Summary Scorecard**:
|
|
113
|
+
```
|
|
114
|
+
## Verification Report: <change-name>
|
|
115
|
+
|
|
116
|
+
### Summary
|
|
117
|
+
| Dimension | Status |
|
|
118
|
+
|--------------|------------------|
|
|
119
|
+
| Completeness | X/Y tasks, N reqs|
|
|
120
|
+
| Correctness | M/N reqs covered |
|
|
121
|
+
| Coherence | Followed/Issues |
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
**Issues by Priority**:
|
|
125
|
+
|
|
126
|
+
1. **CRITICAL** (Must fix before archive):
|
|
127
|
+
- Incomplete tasks
|
|
128
|
+
- Missing requirement implementations
|
|
129
|
+
- Each with specific, actionable recommendation
|
|
130
|
+
|
|
131
|
+
2. **WARNING** (Should fix):
|
|
132
|
+
- Spec/design divergences
|
|
133
|
+
- Missing scenario coverage
|
|
134
|
+
- Each with specific recommendation
|
|
135
|
+
|
|
136
|
+
3. **SUGGESTION** (Nice to fix):
|
|
137
|
+
- Pattern inconsistencies
|
|
138
|
+
- Minor improvements
|
|
139
|
+
- Each with specific recommendation
|
|
140
|
+
|
|
141
|
+
**Final Assessment**:
|
|
142
|
+
- If CRITICAL issues: "X critical issue(s) found. Fix before archiving."
|
|
143
|
+
- If only warnings: "No critical issues. Y warning(s) to consider. Ready for archive (with noted improvements)."
|
|
144
|
+
- If all clear: "All checks passed. Ready for archive."
|
|
145
|
+
|
|
146
|
+
**Verification Heuristics**
|
|
147
|
+
|
|
148
|
+
- **Completeness**: Focus on objective checklist items (checkboxes, requirements list)
|
|
149
|
+
- **Correctness**: Use keyword search, file path analysis, reasonable inference - don't require perfect certainty
|
|
150
|
+
- **Coherence**: Look for glaring inconsistencies, don't nitpick style
|
|
151
|
+
- **False Positives**: When uncertain, prefer SUGGESTION over WARNING, WARNING over CRITICAL
|
|
152
|
+
- **Actionability**: Every issue must have a specific recommendation with file/line references where applicable
|
|
153
|
+
|
|
154
|
+
**Graceful Degradation**
|
|
155
|
+
|
|
156
|
+
- If only tasks.md exists: verify task completion only, skip spec/design checks
|
|
157
|
+
- If tasks + specs exist: verify completeness and correctness, skip design
|
|
158
|
+
- If full artifacts: verify all three dimensions
|
|
159
|
+
- Always note which checks were skipped and why
|
|
160
|
+
|
|
161
|
+
**Output Format**
|
|
162
|
+
|
|
163
|
+
Use clear markdown with:
|
|
164
|
+
- Table for summary scorecard
|
|
165
|
+
- Grouped lists for issues (CRITICAL/WARNING/SUGGESTION)
|
|
166
|
+
- Code references in format: `file.ts:123`
|
|
167
|
+
- Specific, actionable recommendations
|
|
168
|
+
- No vague suggestions like "consider reviewing"
|
package/README.md
ADDED
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
# specrails
|
|
2
|
+
|
|
3
|
+
**Agent Workflow System installer for Claude Code.**
|
|
4
|
+
|
|
5
|
+
Install a complete product-driven development workflow into any repository: specialized AI agents, orchestration commands, VPC-based product discovery, and per-layer coding conventions — all adapted to your codebase automatically.
|
|
6
|
+
|
|
7
|
+
## What it does
|
|
8
|
+
|
|
9
|
+
specrails gives your project a team of specialized AI agents that work together through a structured pipeline:
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
Product Discovery → Architecture → Implementation → Review → Ship
|
|
13
|
+
(sr-product-manager) (sr-architect) (sr-developer) (sr-reviewer) (PR)
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Every artifact — agents, commands, rules, personas — is generated specifically for your project by analyzing your actual codebase, tech stack, and target users. Not generic templates: fully contextualized to your architecture, CI pipeline, and coding conventions.
|
|
17
|
+
|
|
18
|
+
## What gets installed
|
|
19
|
+
|
|
20
|
+
| Category | Files | Purpose |
|
|
21
|
+
|----------|-------|---------|
|
|
22
|
+
| **Agents** | `.claude/agents/*.md` | Specialized AI agents (sr-architect, sr-developer, sr-reviewer, sr-product-manager, sr-product-analyst, and optional layer-specific developers) |
|
|
23
|
+
| **Personas** | `.claude/agents/personas/*.md` | Value Proposition Canvas profiles for your target users, generated from competitive research |
|
|
24
|
+
| **Commands** | `.claude/commands/sr/*.md` | Workflow orchestrators (`/sr:implement`, `/sr:product-backlog`, `/sr:update-product-driven-backlog`) |
|
|
25
|
+
| **Rules** | `.claude/rules/*.md` | Per-layer coding conventions, loaded conditionally by file path |
|
|
26
|
+
| **Memory** | `.claude/agent-memory/` | Persistent knowledge directories — agents learn across sessions |
|
|
27
|
+
| **Config** | `.claude/settings.json`, `CLAUDE.md` | Permissions, project context, architecture reference |
|
|
28
|
+
|
|
29
|
+
## How it works
|
|
30
|
+
|
|
31
|
+
Installation happens in two steps — a shell script for scaffolding, then Claude for the intelligent parts.
|
|
32
|
+
|
|
33
|
+
### Step 1: Install (shell script)
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
./specrails/install.sh
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
The installer:
|
|
40
|
+
|
|
41
|
+
1. **Checks prerequisites** — git, Claude Code CLI, npm, OpenSpec CLI, GitHub CLI
|
|
42
|
+
2. **Offers to install missing tools** — npm via nvm, OpenSpec via npm
|
|
43
|
+
3. **Detects existing setup** — warns if `.claude/` or `openspec/` already exist
|
|
44
|
+
4. **Scaffolds temporary files** — copies templates and the `/setup` command into `.claude/`
|
|
45
|
+
|
|
46
|
+
### Step 2: Setup (inside Claude Code)
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
claude # open Claude Code in your repo
|
|
50
|
+
> /setup # run the setup wizard
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Claude runs an interactive 5-phase wizard:
|
|
54
|
+
|
|
55
|
+
| Phase | What happens | Interaction |
|
|
56
|
+
|-------|-------------|-------------|
|
|
57
|
+
| **1. Codebase Analysis** | Reads your repo structure, detects stack, layers, CI commands, and coding conventions | Confirm or modify detected architecture |
|
|
58
|
+
| **2. User Personas** | Asks who your target users are, researches the competitive landscape online, generates full VPC personas | Describe your users, approve generated personas |
|
|
59
|
+
| **3. Configuration** | Choose backlog provider (GitHub Issues / JIRA / none), access mode (read/write or read-only), git workflow (auto or manual), agents, and commands | Select options |
|
|
60
|
+
| **4. File Generation** | Fills all templates with your project's context and writes final files | Automatic |
|
|
61
|
+
| **5. Cleanup** | Removes scaffolding (`/setup` command, templates), adds `specrails/` to `.gitignore` | Confirm cleanup |
|
|
62
|
+
|
|
63
|
+
After setup, the scaffolding self-destructs — only the final, project-specific files remain.
|
|
64
|
+
|
|
65
|
+
## Prerequisites
|
|
66
|
+
|
|
67
|
+
| Tool | Required | Purpose |
|
|
68
|
+
|------|----------|---------|
|
|
69
|
+
| **Git** | Yes | Repository detection |
|
|
70
|
+
| **Claude Code** | Yes | AI agent runtime — [install](https://docs.anthropic.com/en/docs/claude-code) |
|
|
71
|
+
| **npm** | Recommended | Needed to install OpenSpec CLI |
|
|
72
|
+
| **OpenSpec CLI** | Recommended | Spec-driven design workflow (`/opsx:ff`, `/opsx:apply`) |
|
|
73
|
+
| **GitHub CLI** (`gh`) | Optional | Backlog sync to GitHub Issues, PR creation |
|
|
74
|
+
| **JIRA CLI** (`jira`) | Optional | Backlog sync to JIRA (alternative to GitHub Issues) |
|
|
75
|
+
|
|
76
|
+
The installer will check for each tool and offer to install missing ones.
|
|
77
|
+
|
|
78
|
+
> **Note:** You only need one backlog provider — GitHub Issues or JIRA. The `/setup` wizard asks which one you use. If you don't use either, backlog commands are skipped but `/sr:implement "description"` still works.
|
|
79
|
+
|
|
80
|
+
## Usage after installation
|
|
81
|
+
|
|
82
|
+
Once setup is complete, you have three main commands:
|
|
83
|
+
|
|
84
|
+
### `/sr:implement` — Build features
|
|
85
|
+
|
|
86
|
+
The full pipeline: architect designs, developer implements, reviewer validates, then ships a PR.
|
|
87
|
+
|
|
88
|
+
```
|
|
89
|
+
/sr:implement #85, #71 # implement specific GitHub Issues
|
|
90
|
+
/sr:implement "add dark mode" # implement from a text description
|
|
91
|
+
/sr:implement UI, Analytics # explore areas and pick the best ideas
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
Handles 1 to N features. Single features run sequentially; multiple features run in parallel using git worktrees.
|
|
95
|
+
|
|
96
|
+
### `/sr:product-backlog` — View prioritized backlog
|
|
97
|
+
|
|
98
|
+
Reads GitHub Issues labeled `product-driven-backlog`, sorts by VPC persona score, and recommends the top 3 for the next sprint.
|
|
99
|
+
|
|
100
|
+
```
|
|
101
|
+
/sr:product-backlog # show all areas
|
|
102
|
+
/sr:product-backlog UI, Decks # filter by area
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
### `/sr:update-product-driven-backlog` — Discover new features
|
|
106
|
+
|
|
107
|
+
Runs product discovery using your VPC personas. Analyzes the codebase, evaluates ideas against each persona's jobs/pains/gains, and creates GitHub Issues for the best ones.
|
|
108
|
+
|
|
109
|
+
```
|
|
110
|
+
/sr:update-product-driven-backlog # explore all areas
|
|
111
|
+
/sr:update-product-driven-backlog Analytics # focus on one area
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
## The agents
|
|
115
|
+
|
|
116
|
+
| Agent | Model | Role |
|
|
117
|
+
|-------|-------|------|
|
|
118
|
+
| **sr-architect** | Sonnet | Designs features: creates proposal, technical design, task breakdown, and context bundles via OpenSpec |
|
|
119
|
+
| **sr-developer** | Sonnet | Implements features: reads the architect's artifacts and writes production code across all layers |
|
|
120
|
+
| **sr-backend-developer** | Sonnet | Specialized backend implementation (lighter prompt, backend-only CI) |
|
|
121
|
+
| **sr-frontend-developer** | Sonnet | Specialized frontend implementation (lighter prompt, frontend-only CI) |
|
|
122
|
+
| **sr-reviewer** | Sonnet | Final quality gate: runs exact CI checks, fixes issues, records learnings for future developers |
|
|
123
|
+
| **sr-product-manager** | Opus | Product discovery: competitive analysis, VPC evaluation, feature ideation |
|
|
124
|
+
| **sr-product-analyst** | Haiku | Read-only backlog analysis: prioritization, gap analysis, reporting |
|
|
125
|
+
|
|
126
|
+
The `/sr:implement` pipeline automatically routes tasks to the right developer agent based on layer tags in the task breakdown.
|
|
127
|
+
|
|
128
|
+
## Value Proposition Canvas (VPC)
|
|
129
|
+
|
|
130
|
+
Every feature idea is evaluated against your project's user personas using the VPC framework:
|
|
131
|
+
|
|
132
|
+
```
|
|
133
|
+
+-----------------------------+ +-----------------------------+
|
|
134
|
+
| VALUE PROPOSITION | | CUSTOMER SEGMENT |
|
|
135
|
+
| | | |
|
|
136
|
+
| Products & Services <---+--->| Customer Jobs |
|
|
137
|
+
| Pain Relievers <---+--->| Pains |
|
|
138
|
+
| Gain Creators <---+--->| Gains |
|
|
139
|
+
+-----------------------------+ +-----------------------------+
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
Each persona scores features 0-5 based on how well they address their specific jobs, pains, and gains. Features are ranked by total persona score / effort ratio. This grounds every product decision in real user needs rather than gut feeling.
|
|
143
|
+
|
|
144
|
+
## Project structure
|
|
145
|
+
|
|
146
|
+
```
|
|
147
|
+
specrails/
|
|
148
|
+
├── install.sh # Step 1: shell installer
|
|
149
|
+
├── README.md # This file
|
|
150
|
+
├── commands/
|
|
151
|
+
│ └── setup.md # Step 2: Claude Code /setup wizard
|
|
152
|
+
├── templates/ # Structural references for file generation
|
|
153
|
+
│ ├── agents/
|
|
154
|
+
│ │ ├── sr-architect.md # Design & task breakdown agent
|
|
155
|
+
│ │ ├── sr-developer.md # Full-stack implementation agent
|
|
156
|
+
│ │ ├── sr-backend-developer.md # Backend-specialized agent
|
|
157
|
+
│ │ ├── sr-frontend-developer.md # Frontend-specialized agent
|
|
158
|
+
│ │ ├── sr-reviewer.md # CI/CD quality gate agent
|
|
159
|
+
│ │ ├── sr-product-manager.md # Product discovery agent
|
|
160
|
+
│ │ └── sr-product-analyst.md # Read-only analysis agent
|
|
161
|
+
│ ├── commands/
|
|
162
|
+
│ │ └── sr/
|
|
163
|
+
│ │ ├── implement.md # Implementation pipeline orchestrator
|
|
164
|
+
│ │ ├── product-backlog.md # Backlog viewer with VPC scoring
|
|
165
|
+
│ │ └── update-product-driven-backlog.md # Product discovery & issue sync
|
|
166
|
+
│ ├── personas/
|
|
167
|
+
│ │ └── persona.md # VPC persona template
|
|
168
|
+
│ ├── rules/
|
|
169
|
+
│ │ └── layer.md # Per-layer convention template
|
|
170
|
+
│ ├── claude-md/
|
|
171
|
+
│ │ └── root.md # Root CLAUDE.md template
|
|
172
|
+
│ └── settings/
|
|
173
|
+
│ └── settings.json # Permission template
|
|
174
|
+
└── prompts/
|
|
175
|
+
├── analyze-codebase.md # Guide for codebase analysis
|
|
176
|
+
├── generate-personas.md # Guide for VPC persona generation
|
|
177
|
+
└── infer-conventions.md # Guide for convention detection
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
## Supported stacks
|
|
181
|
+
|
|
182
|
+
specrails is stack-agnostic. The `/setup` wizard detects and adapts to whatever you're using:
|
|
183
|
+
|
|
184
|
+
- **Backend**: Python/FastAPI, Node/Express, Go/Gin, Rust/Actix, Java/Spring, Ruby/Rails, .NET
|
|
185
|
+
- **Frontend**: React, Vue, Angular, Svelte, Next.js, Nuxt
|
|
186
|
+
- **Database**: PostgreSQL, MySQL, SQLite, MongoDB, Redis
|
|
187
|
+
- **CI/CD**: GitHub Actions, GitLab CI, Jenkins, Makefile
|
|
188
|
+
- **Testing**: pytest, vitest, jest, go test, cargo test, rspec
|
|
189
|
+
|
|
190
|
+
The setup wizard reads your actual CI config, dependency files, and source code to generate accurate conventions — not guesses.
|
|
191
|
+
|
|
192
|
+
## Design principles
|
|
193
|
+
|
|
194
|
+
1. **Two-step install**: Shell for prerequisites, Claude for intelligence. No API keys needed beyond Claude Code auth.
|
|
195
|
+
2. **Self-cleaning**: All scaffolding artifacts are removed after setup. Only final files remain.
|
|
196
|
+
3. **Context-first**: Every generated file references real paths, real patterns, and real CI commands from your codebase.
|
|
197
|
+
4. **Persona-driven**: Product decisions are grounded in researched user personas, not assumptions.
|
|
198
|
+
5. **Institutional memory**: Agents learn across sessions via persistent memory directories. The reviewer's learnings feed back to developers.
|
|
199
|
+
6. **Parallel-safe**: Multiple features can be implemented simultaneously using git worktrees with automatic merge.
|
|
200
|
+
|
|
201
|
+
## FAQ
|
|
202
|
+
|
|
203
|
+
**Can I customize the agents after installation?**
|
|
204
|
+
Yes. The generated files in `.claude/` are yours to edit. They're plain markdown — modify agent personalities, adjust CI commands, add new rules, or create new personas.
|
|
205
|
+
|
|
206
|
+
**Can I re-run setup?**
|
|
207
|
+
The `/setup` command deletes itself after completion. To re-run, execute `install.sh` again to re-scaffold, then run `/setup`.
|
|
208
|
+
|
|
209
|
+
**Does this work without OpenSpec?**
|
|
210
|
+
Partially. The `/sr:implement` command and sr-architect agent rely on OpenSpec for structured design artifacts. Without it, you can still use the product discovery commands and individual agents directly.
|
|
211
|
+
|
|
212
|
+
**Does this work without GitHub CLI?**
|
|
213
|
+
Yes, with limitations. If you use GitHub Issues as your backlog provider, `gh` is needed for backlog commands. But you can use JIRA instead, or skip backlog commands entirely. The `/sr:implement` command still works with text descriptions — it just skips PR creation and tells you to create it manually.
|
|
214
|
+
|
|
215
|
+
**Can I use JIRA instead of GitHub Issues?**
|
|
216
|
+
Yes. During `/setup` Phase 3, choose "JIRA" as your backlog provider. If the JIRA CLI isn't installed, the wizard offers to install it (go-jira via brew, or REST API mode with no CLI needed). You'll also choose whether access is read & write (create tickets, add comments on completion) or read-only (read tickets for context but never modify JIRA).
|
|
217
|
+
|
|
218
|
+
**Can I skip automatic git operations?**
|
|
219
|
+
Yes. During `/setup` Phase 3, choose "Manual" for the git workflow. The pipeline will still architect, develop, and review — but it stops after review and shows you a summary of all changes. You handle branching, committing, and PRs yourself.
|
|
220
|
+
|
|
221
|
+
**How much does it cost to run?**
|
|
222
|
+
Depends on usage. The sr-product-manager agent uses Opus (most capable, most expensive) for deep product thinking. All other agents use Sonnet or Haiku. A full `/sr:implement` cycle for one feature typically costs a few dollars in API usage through Claude Code.
|
|
223
|
+
|
|
224
|
+
## License
|
|
225
|
+
|
|
226
|
+
MIT
|
package/VERSION
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
0.2.0
|
package/bin/specrails.js
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const { execSync } = require("child_process");
|
|
4
|
+
const { resolve } = require("path");
|
|
5
|
+
|
|
6
|
+
const ROOT = resolve(__dirname, "..");
|
|
7
|
+
const COMMANDS = {
|
|
8
|
+
init: "install.sh",
|
|
9
|
+
update: "update.sh",
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
const args = process.argv.slice(2);
|
|
13
|
+
const subcommand = args[0];
|
|
14
|
+
|
|
15
|
+
if (!subcommand) {
|
|
16
|
+
console.log(`specrails — Agent Workflow System for Claude Code
|
|
17
|
+
|
|
18
|
+
Usage:
|
|
19
|
+
specrails init [--root-dir <path>] Install into a repository
|
|
20
|
+
specrails update [--only <component>] Update an existing installation
|
|
21
|
+
|
|
22
|
+
More info: https://github.com/fjpulidop/specrails`);
|
|
23
|
+
process.exit(0);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
const script = COMMANDS[subcommand];
|
|
27
|
+
|
|
28
|
+
if (!script) {
|
|
29
|
+
console.error(`Unknown command: ${subcommand}\n`);
|
|
30
|
+
console.error("Available commands: init, update");
|
|
31
|
+
process.exit(1);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
const forwarded = args.slice(1).join(" ");
|
|
35
|
+
const cmd = `bash "${resolve(ROOT, script)}" ${forwarded}`.trim();
|
|
36
|
+
|
|
37
|
+
try {
|
|
38
|
+
execSync(cmd, { stdio: "inherit", cwd: process.cwd() });
|
|
39
|
+
} catch (err) {
|
|
40
|
+
process.exit(err.status || 1);
|
|
41
|
+
}
|