specrails-core 3.6.0 → 3.7.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 +11 -11
- package/bin/specrails-core.js +106 -13
- package/bin/tui-installer.mjs +309 -0
- package/commands/enrich.md +1565 -0
- package/docs/README.md +1 -1
- package/docs/changelog.md +17 -0
- package/docs/customization.md +2 -2
- package/docs/getting-started.md +5 -5
- package/docs/installation.md +61 -15
- package/docs/migration-guide.md +3 -3
- package/docs/plugin-architecture.md +13 -11
- package/docs/user-docs/faq.md +11 -11
- package/docs/user-docs/getting-started-codex.md +6 -6
- package/docs/user-docs/installation.md +9 -7
- package/docs/user-docs/quick-start.md +5 -3
- package/install.sh +328 -63
- package/package.json +5 -3
- package/templates/commands/specrails/enrich.md +1637 -0
- package/templates/commands/specrails/reconfig.md +1 -1
- package/templates/settings/integration-contract.json +88 -0
- package/update.sh +20 -14
|
@@ -21,7 +21,7 @@ If the file does not exist, stop and display:
|
|
|
21
21
|
```
|
|
22
22
|
No .specrails/agents.yaml found.
|
|
23
23
|
|
|
24
|
-
Run /specrails:
|
|
24
|
+
Run /specrails:enrich to generate the config file, then edit it before running /specrails:reconfig.
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
If the file exists, parse it. Validate all `model:` values — only `opus`, `sonnet`, and `haiku` are accepted. If an invalid value is found, display a warning and skip that agent:
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": "3.0",
|
|
3
|
+
"providers": {
|
|
4
|
+
"claude": {
|
|
5
|
+
"enrichCommand": "/specrails:enrich",
|
|
6
|
+
"enrichArgs": ["--from-config"],
|
|
7
|
+
"updateCommand": "/specrails:enrich",
|
|
8
|
+
"updateArgs": ["--update"],
|
|
9
|
+
"cli": {
|
|
10
|
+
"initArgs": [],
|
|
11
|
+
"enrichArgs": ["--dangerously-skip-permissions", "--output-format", "stream-json", "-p", "/specrails:enrich"],
|
|
12
|
+
"enrichFromConfigArgs": ["--dangerously-skip-permissions", "--output-format", "stream-json", "-p", "/specrails:enrich --from-config"]
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"codex": {
|
|
16
|
+
"enrichCommand": "$enrich",
|
|
17
|
+
"enrichArgs": ["--from-config"],
|
|
18
|
+
"updateCommand": "$enrich",
|
|
19
|
+
"updateArgs": ["--update"],
|
|
20
|
+
"cli": {
|
|
21
|
+
"initArgs": [],
|
|
22
|
+
"enrichArgs": ["exec", "run enrich"],
|
|
23
|
+
"enrichFromConfigArgs": ["exec", "run enrich --from-config"]
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"tiers": {
|
|
28
|
+
"quick": {
|
|
29
|
+
"description": "Template-based install with minimal defaults. No AI codebase analysis. Agents are functional immediately.",
|
|
30
|
+
"enrichFlag": "--quick",
|
|
31
|
+
"checkpoints": ["base_install", "agent_selection", "agent_generation"],
|
|
32
|
+
"requiresEnrich": false
|
|
33
|
+
},
|
|
34
|
+
"full": {
|
|
35
|
+
"description": "Full AI-powered install. Analyzes codebase, generates VPC personas, creates personalized agents.",
|
|
36
|
+
"enrichFlag": "--from-config",
|
|
37
|
+
"checkpoints": ["codebase_analysis", "vpc_discovery", "persona_synthesis", "agent_generation", "command_generation"],
|
|
38
|
+
"requiresEnrich": true
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"configSchema": {
|
|
42
|
+
"file": ".specrails/install-config.yaml",
|
|
43
|
+
"version": 1,
|
|
44
|
+
"fields": {
|
|
45
|
+
"version": "number — schema version, currently 1",
|
|
46
|
+
"provider": "string — claude | codex | auto",
|
|
47
|
+
"tier": "string — full | quick",
|
|
48
|
+
"agents.selected": "string[] — agent names to install",
|
|
49
|
+
"agents.excluded": "string[] — agent names to skip",
|
|
50
|
+
"models.preset": "string — balanced | budget | max",
|
|
51
|
+
"models.defaults.model": "string — sonnet | opus | haiku (overrides preset)",
|
|
52
|
+
"models.overrides": "Record<string, string> — per-agent model (highest priority)",
|
|
53
|
+
"quick_context.product_description": "string — product description seed for VPC discovery",
|
|
54
|
+
"quick_context.target_users": "string — target users seed for VPC discovery",
|
|
55
|
+
"agent_teams": "boolean — install team-review and team-debug commands"
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
"checkpoints": {
|
|
59
|
+
"base_install": "Templates and directory structure copied",
|
|
60
|
+
"agent_selection": "Agent list finalized from config or TUI",
|
|
61
|
+
"codebase_analysis": "Codebase language/framework/architecture detected",
|
|
62
|
+
"vpc_discovery": "VPC personas researched and drafted",
|
|
63
|
+
"persona_synthesis": "Final persona files written",
|
|
64
|
+
"agent_generation": "All selected agents generated with placeholders filled",
|
|
65
|
+
"command_generation": "All workflow commands installed and configured"
|
|
66
|
+
},
|
|
67
|
+
"modelPresets": {
|
|
68
|
+
"balanced": {
|
|
69
|
+
"description": "Flagship models for architects and PMs, efficient models for others",
|
|
70
|
+
"defaults": { "model": "sonnet" },
|
|
71
|
+
"overrides": { "sr-architect": "opus", "sr-product-manager": "opus" }
|
|
72
|
+
},
|
|
73
|
+
"budget": {
|
|
74
|
+
"description": "All agents use the most cost-efficient model",
|
|
75
|
+
"defaults": { "model": "haiku" },
|
|
76
|
+
"overrides": {}
|
|
77
|
+
},
|
|
78
|
+
"max": {
|
|
79
|
+
"description": "All agents use the most capable model",
|
|
80
|
+
"defaults": { "model": "opus" },
|
|
81
|
+
"overrides": {}
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
"legacyCompat": {
|
|
85
|
+
"setupCommandAlias": true,
|
|
86
|
+
"note": "During transition, /specrails:setup may still be installed as an alias in some repos. Hub should prefer /specrails:enrich."
|
|
87
|
+
}
|
|
88
|
+
}
|
package/update.sh
CHANGED
|
@@ -168,14 +168,20 @@ generate_manifest() {
|
|
|
168
168
|
\"${relpath}\": \"${checksum}\""
|
|
169
169
|
done < <(find "$SCRIPT_DIR/templates" -type f -not -path '*/node_modules/*' -not -name 'package-lock.json' -print0 | sort -z)
|
|
170
170
|
|
|
171
|
-
# Include commands/
|
|
172
|
-
local
|
|
173
|
-
|
|
171
|
+
# Include commands/enrich.md
|
|
172
|
+
local enrich_checksum
|
|
173
|
+
enrich_checksum="sha256:$(shasum -a 256 "$SCRIPT_DIR/commands/enrich.md" | awk '{print $1}')"
|
|
174
174
|
if [ -n "$artifacts_json" ]; then
|
|
175
175
|
artifacts_json="${artifacts_json},"
|
|
176
176
|
fi
|
|
177
177
|
artifacts_json="${artifacts_json}
|
|
178
|
-
\"commands/specrails/
|
|
178
|
+
\"commands/specrails/enrich.md\": \"${enrich_checksum}\""
|
|
179
|
+
|
|
180
|
+
# Include commands/doctor.md
|
|
181
|
+
local doctor_checksum
|
|
182
|
+
doctor_checksum="sha256:$(shasum -a 256 "$SCRIPT_DIR/commands/doctor.md" | awk '{print $1}')"
|
|
183
|
+
artifacts_json="${artifacts_json},
|
|
184
|
+
\"commands/specrails/doctor.md\": \"${doctor_checksum}\""
|
|
179
185
|
|
|
180
186
|
# Include prompts/
|
|
181
187
|
if [[ -d "$SCRIPT_DIR/prompts" ]]; then
|
|
@@ -299,18 +305,18 @@ except Exception:
|
|
|
299
305
|
fi
|
|
300
306
|
done < <(find "$SCRIPT_DIR/templates" -type f -not -path '*/node_modules/*' -not -name 'package-lock.json' -print0 | sort -z)
|
|
301
307
|
|
|
302
|
-
# Also check commands/
|
|
303
|
-
if [[ "$HAS_CHANGES" == false ]] && [[ -f "$SCRIPT_DIR/commands/
|
|
304
|
-
|
|
305
|
-
|
|
308
|
+
# Also check commands/enrich.md
|
|
309
|
+
if [[ "$HAS_CHANGES" == false ]] && [[ -f "$SCRIPT_DIR/commands/enrich.md" ]]; then
|
|
310
|
+
enrich_checksum="sha256:$(shasum -a 256 "$SCRIPT_DIR/commands/enrich.md" | awk '{print $1}')"
|
|
311
|
+
manifest_enrich="$(python3 -c "
|
|
306
312
|
import json, sys
|
|
307
313
|
try:
|
|
308
314
|
data = json.load(open(sys.argv[1]))
|
|
309
|
-
print(data['artifacts'].get('commands/specrails/
|
|
315
|
+
print(data['artifacts'].get('commands/specrails/enrich.md', data['artifacts'].get('commands/enrich.md', '')))
|
|
310
316
|
except Exception:
|
|
311
317
|
print('')
|
|
312
318
|
" "$local_manifest" 2>/dev/null || echo "")"
|
|
313
|
-
if [[ "$
|
|
319
|
+
if [[ "$enrich_checksum" != "$manifest_enrich" ]]; then
|
|
314
320
|
HAS_CHANGES=true
|
|
315
321
|
fi
|
|
316
322
|
fi
|
|
@@ -522,11 +528,11 @@ except Exception:
|
|
|
522
528
|
return 1 # Unchanged
|
|
523
529
|
}
|
|
524
530
|
|
|
525
|
-
# Update /specrails:
|
|
531
|
+
# Update /specrails:enrich command (selective)
|
|
526
532
|
mkdir -p "$REPO_ROOT/.claude/commands/specrails"
|
|
527
|
-
if _file_changed "$SCRIPT_DIR/commands/
|
|
528
|
-
cp "$SCRIPT_DIR/commands/
|
|
529
|
-
ok "Updated /specrails:
|
|
533
|
+
if _file_changed "$SCRIPT_DIR/commands/enrich.md" "commands/specrails/enrich.md"; then
|
|
534
|
+
cp "$SCRIPT_DIR/commands/enrich.md" "$REPO_ROOT/.claude/commands/specrails/enrich.md"
|
|
535
|
+
ok "Updated /specrails:enrich command"
|
|
530
536
|
updated_count=$(( updated_count + 1 ))
|
|
531
537
|
fi
|
|
532
538
|
|