specrails-core 5.6.0 → 6.0.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 +27 -145
- package/bin/specrails-core.mjs +12 -554
- package/dist/agent-runtime/capabilities.js +0 -1
- package/dist/agent-runtime/change-scope.d.ts +63 -0
- package/dist/agent-runtime/change-scope.js +297 -0
- package/dist/agent-runtime/cli-executor.d.ts +1 -1
- package/dist/agent-runtime/cli-executor.js +1 -2
- package/dist/agent-runtime/cli-process.js +0 -1
- package/dist/agent-runtime/cli.js +4 -5
- package/dist/agent-runtime/codex-schema.js +0 -1
- package/dist/agent-runtime/compact/architect.d.ts +3 -272
- package/dist/agent-runtime/compact/architect.js +8 -9
- package/dist/agent-runtime/compact/chat-client.d.ts +3 -3
- package/dist/agent-runtime/compact/chat-client.js +1 -2
- package/dist/agent-runtime/compact/developer.d.ts +3 -70
- package/dist/agent-runtime/compact/developer.js +13 -14
- package/dist/agent-runtime/compact/environment.d.ts +16 -5
- package/dist/agent-runtime/compact/environment.js +32 -3
- package/dist/agent-runtime/compact/exit-code-honesty.d.ts +2 -1
- package/dist/agent-runtime/compact/exit-code-honesty.js +0 -1
- package/dist/agent-runtime/compact/guarded-loop.d.ts +2 -18
- package/dist/agent-runtime/compact/guarded-loop.js +7 -8
- package/dist/agent-runtime/compact/prompt-inputs.d.ts +0 -2
- package/dist/agent-runtime/compact/prompt-inputs.js +1 -2
- package/dist/agent-runtime/compact/reviewer.d.ts +0 -13
- package/dist/agent-runtime/compact/reviewer.js +5 -6
- package/dist/agent-runtime/compact/step.d.ts +0 -1
- package/dist/agent-runtime/compact/step.js +1 -2
- package/dist/agent-runtime/compact/test-reachability.js +6 -3
- package/dist/agent-runtime/config.js +0 -1
- package/dist/agent-runtime/core-host.d.ts +2 -2
- package/dist/agent-runtime/core-host.js +2 -3
- package/dist/agent-runtime/durable-store.d.ts +0 -1
- package/dist/agent-runtime/durable-store.js +1 -2
- package/dist/agent-runtime/efficiency-summary.d.ts +2 -2
- package/dist/agent-runtime/efficiency-summary.js +1 -2
- package/dist/agent-runtime/efficiency-types.js +0 -1
- package/dist/agent-runtime/efficiency.js +0 -1
- package/dist/agent-runtime/evaluation-corpus.js +0 -1
- package/dist/agent-runtime/evaluation.d.ts +2 -1
- package/dist/agent-runtime/evaluation.js +1 -2
- package/dist/agent-runtime/executor-types.d.ts +1 -1
- package/dist/agent-runtime/executor-types.js +0 -1
- package/dist/agent-runtime/executors.js +0 -1
- package/dist/agent-runtime/gemini-policy.js +0 -1
- package/dist/agent-runtime/graph/artifacts.d.ts +1 -1
- package/dist/agent-runtime/graph/artifacts.js +5 -3
- package/dist/agent-runtime/graph/convergence.d.ts +26 -0
- package/dist/agent-runtime/graph/convergence.js +62 -0
- package/dist/agent-runtime/graph/nodes.d.ts +1 -1
- package/dist/agent-runtime/graph/nodes.js +170 -24
- package/dist/agent-runtime/graph/review-policy.js +0 -1
- package/dist/agent-runtime/graph/roles.d.ts +2 -5
- package/dist/agent-runtime/graph/roles.js +2 -8
- package/dist/agent-runtime/graph/state.d.ts +6 -1
- package/dist/agent-runtime/graph/state.js +2 -1
- package/dist/agent-runtime/graph-checkpointer.d.ts +2 -1
- package/dist/agent-runtime/graph-checkpointer.js +0 -1
- package/dist/agent-runtime/guardrails.d.ts +3 -3
- package/dist/agent-runtime/guardrails.js +1 -2
- package/dist/agent-runtime/index.d.ts +1 -1
- package/dist/agent-runtime/index.js +1 -2
- package/dist/agent-runtime/kimi-acp.js +1 -2
- package/dist/agent-runtime/kimi-model.d.ts +6 -0
- package/dist/agent-runtime/kimi-model.js +12 -0
- package/dist/agent-runtime/openai-executor.d.ts +0 -9
- package/dist/agent-runtime/openai-executor.js +6 -7
- package/dist/agent-runtime/openspec-tool-server.js +1 -2
- package/dist/agent-runtime/openspec.d.ts +0 -2
- package/dist/agent-runtime/openspec.js +1 -6
- package/dist/agent-runtime/prompts.d.ts +11 -5
- package/dist/agent-runtime/prompts.js +46 -17
- package/dist/agent-runtime/provider-diagnostic.js +1 -2
- package/dist/agent-runtime/recovery.js +1 -2
- package/dist/agent-runtime/repository-context.d.ts +1 -1
- package/dist/agent-runtime/repository-context.js +19 -1
- package/dist/agent-runtime/review-context.d.ts +1 -1
- package/dist/agent-runtime/review-context.js +0 -1
- package/dist/agent-runtime/role-routing.js +0 -1
- package/dist/agent-runtime/role-state.js +0 -1
- package/dist/agent-runtime/runtime-identity.js +1 -2
- package/dist/agent-runtime/tool-event.js +0 -1
- package/dist/agent-runtime/verification-plan.d.ts +5 -4
- package/dist/agent-runtime/verification-plan.js +9 -5
- package/dist/agent-runtime/workflow-types.js +0 -1
- package/dist/agent-runtime/workflow.js +0 -1
- package/dist/agent-runtime/workspace-tools.d.ts +2 -2
- package/dist/agent-runtime/workspace-tools.js +1 -2
- package/dist/installer/cli.d.ts +3 -32
- package/dist/installer/cli.js +26 -101
- package/dist/installer/commands/framework.d.ts +4 -3
- package/dist/installer/commands/framework.js +0 -1
- package/dist/installer/commands/init.d.ts +4 -25
- package/dist/installer/commands/init.js +5 -8
- package/dist/installer/phases/framework-lifecycle.d.ts +3 -17
- package/dist/installer/phases/framework-lifecycle.js +2 -3
- package/dist/installer/phases/install-config.d.ts +7 -8
- package/dist/installer/phases/install-config.js +2 -7
- package/dist/installer/phases/manifest.d.ts +6 -7
- package/dist/installer/phases/manifest.js +2 -7
- package/dist/installer/phases/prereqs.d.ts +6 -7
- package/dist/installer/phases/prereqs.js +4 -6
- package/dist/installer/phases/provider-detect.d.ts +6 -7
- package/dist/installer/phases/provider-detect.js +2 -4
- package/dist/installer/phases/scaffold.d.ts +9 -10
- package/dist/installer/phases/scaffold.js +82 -805
- package/dist/installer/util/errors.js +0 -1
- package/dist/installer/util/exec.d.ts +3 -2
- package/dist/installer/util/exec.js +0 -1
- package/dist/installer/util/fs.d.ts +0 -10
- package/dist/installer/util/fs.js +1 -2
- package/dist/installer/util/git.js +0 -1
- package/dist/installer/util/install-transaction.d.ts +2 -2
- package/dist/installer/util/install-transaction.js +1 -2
- package/dist/installer/util/logger.d.ts +1 -3
- package/dist/installer/util/logger.js +0 -1
- package/dist/installer/util/paths.js +0 -1
- package/dist/installer/util/registry.d.ts +4 -8
- package/dist/installer/util/registry.js +2 -3
- package/dist/{installer/runtime → pipeline}/pipeline-state.d.ts +11 -0
- package/dist/{installer/runtime → pipeline}/pipeline-state.js +56 -5
- package/dist/shared/args.d.ts +18 -0
- package/dist/shared/args.js +53 -0
- package/integration-contract.json +11 -47
- package/package.json +3 -10
- package/templates/agents/sr-architect.md +15 -310
- package/templates/agents/sr-developer.md +15 -269
- package/templates/agents/sr-reviewer.md +13 -367
- package/templates/codex-skills/rails/sr-architect/SKILL.md +14 -308
- package/templates/codex-skills/rails/sr-developer/SKILL.md +14 -201
- package/templates/codex-skills/rails/sr-reviewer/SKILL.md +15 -289
- package/templates/kimi/specrails/run-skill.mjs +91 -2173
- package/bin/tui-installer.mjs +0 -430
- package/commands/doctor.md +0 -62
- package/dist/agent-runtime/capabilities.js.map +0 -1
- package/dist/agent-runtime/cli-executor.js.map +0 -1
- package/dist/agent-runtime/cli-process.js.map +0 -1
- package/dist/agent-runtime/cli.js.map +0 -1
- package/dist/agent-runtime/codex-schema.js.map +0 -1
- package/dist/agent-runtime/compact/architect.js.map +0 -1
- package/dist/agent-runtime/compact/chat-client.js.map +0 -1
- package/dist/agent-runtime/compact/developer.js.map +0 -1
- package/dist/agent-runtime/compact/environment.js.map +0 -1
- package/dist/agent-runtime/compact/exit-code-honesty.js.map +0 -1
- package/dist/agent-runtime/compact/guarded-loop.js.map +0 -1
- package/dist/agent-runtime/compact/prompt-inputs.js.map +0 -1
- package/dist/agent-runtime/compact/reviewer.js.map +0 -1
- package/dist/agent-runtime/compact/step.js.map +0 -1
- package/dist/agent-runtime/compact/test-reachability.js.map +0 -1
- package/dist/agent-runtime/config.js.map +0 -1
- package/dist/agent-runtime/core-host.js.map +0 -1
- package/dist/agent-runtime/durable-store.js.map +0 -1
- package/dist/agent-runtime/efficiency-summary.js.map +0 -1
- package/dist/agent-runtime/efficiency-types.js.map +0 -1
- package/dist/agent-runtime/efficiency.js.map +0 -1
- package/dist/agent-runtime/evaluation-corpus.js.map +0 -1
- package/dist/agent-runtime/evaluation.js.map +0 -1
- package/dist/agent-runtime/executor-types.js.map +0 -1
- package/dist/agent-runtime/executors.js.map +0 -1
- package/dist/agent-runtime/gemini-policy.js.map +0 -1
- package/dist/agent-runtime/graph/artifacts.js.map +0 -1
- package/dist/agent-runtime/graph/nodes.js.map +0 -1
- package/dist/agent-runtime/graph/review-policy.js.map +0 -1
- package/dist/agent-runtime/graph/roles.js.map +0 -1
- package/dist/agent-runtime/graph/state.js.map +0 -1
- package/dist/agent-runtime/graph-checkpointer.js.map +0 -1
- package/dist/agent-runtime/guardrails.js.map +0 -1
- package/dist/agent-runtime/index.js.map +0 -1
- package/dist/agent-runtime/kimi-acp.js.map +0 -1
- package/dist/agent-runtime/openai-executor.js.map +0 -1
- package/dist/agent-runtime/openspec-tool-server.js.map +0 -1
- package/dist/agent-runtime/openspec.js.map +0 -1
- package/dist/agent-runtime/prompts.js.map +0 -1
- package/dist/agent-runtime/provider-diagnostic.js.map +0 -1
- package/dist/agent-runtime/recovery.js.map +0 -1
- package/dist/agent-runtime/repository-context.js.map +0 -1
- package/dist/agent-runtime/review-context.js.map +0 -1
- package/dist/agent-runtime/role-routing.js.map +0 -1
- package/dist/agent-runtime/role-state.js.map +0 -1
- package/dist/agent-runtime/runtime-identity.js.map +0 -1
- package/dist/agent-runtime/tool-event.js.map +0 -1
- package/dist/agent-runtime/verification-plan.js.map +0 -1
- package/dist/agent-runtime/workflow-types.js.map +0 -1
- package/dist/agent-runtime/workflow.js.map +0 -1
- package/dist/agent-runtime/workspace-tools.js.map +0 -1
- package/dist/installer/cli.js.map +0 -1
- package/dist/installer/commands/doctor.d.ts +0 -27
- package/dist/installer/commands/doctor.js +0 -615
- package/dist/installer/commands/doctor.js.map +0 -1
- package/dist/installer/commands/framework.js.map +0 -1
- package/dist/installer/commands/init.js.map +0 -1
- package/dist/installer/commands/update.d.ts +0 -56
- package/dist/installer/commands/update.js +0 -257
- package/dist/installer/commands/update.js.map +0 -1
- package/dist/installer/commands/v5-migration.d.ts +0 -32
- package/dist/installer/commands/v5-migration.js +0 -133
- package/dist/installer/commands/v5-migration.js.map +0 -1
- package/dist/installer/phases/framework-lifecycle.js.map +0 -1
- package/dist/installer/phases/install-config.js.map +0 -1
- package/dist/installer/phases/manifest.js.map +0 -1
- package/dist/installer/phases/prereqs.js.map +0 -1
- package/dist/installer/phases/provider-detect.js.map +0 -1
- package/dist/installer/phases/scaffold.js.map +0 -1
- package/dist/installer/runtime/kimi.d.ts +0 -84
- package/dist/installer/runtime/kimi.js +0 -255
- package/dist/installer/runtime/kimi.js.map +0 -1
- package/dist/installer/runtime/pipeline-state.js.map +0 -1
- package/dist/installer/util/errors.js.map +0 -1
- package/dist/installer/util/exec.js.map +0 -1
- package/dist/installer/util/fs.js.map +0 -1
- package/dist/installer/util/git.js.map +0 -1
- package/dist/installer/util/install-transaction.js.map +0 -1
- package/dist/installer/util/logger.js.map +0 -1
- package/dist/installer/util/paths.js.map +0 -1
- package/dist/installer/util/prompts.d.ts +0 -23
- package/dist/installer/util/prompts.js +0 -49
- package/dist/installer/util/prompts.js.map +0 -1
- package/dist/installer/util/registry.js.map +0 -1
- package/dist/installer/util/template.d.ts +0 -23
- package/dist/installer/util/template.js +0 -60
- package/dist/installer/util/template.js.map +0 -1
- package/docs/README.md +0 -40
- package/docs/agent-runtime-efficiency.md +0 -65
- package/docs/agent-runtime.md +0 -393
- package/docs/agents.md +0 -315
- package/docs/changelog.md +0 -168
- package/docs/ci-cd.md +0 -60
- package/docs/concepts.md +0 -183
- package/docs/customization.md +0 -363
- package/docs/deployment.md +0 -234
- package/docs/getting-started.md +0 -122
- package/docs/installation.md +0 -395
- package/docs/local-tickets.md +0 -191
- package/docs/migration-guide.md +0 -140
- package/docs/playbook-oss-maintainer.md +0 -112
- package/docs/playbook-parallel-dev.md +0 -124
- package/docs/playbook-product-discovery.md +0 -115
- package/docs/plugin-architecture.md +0 -144
- package/docs/research/codex-compatibility-analysis.md +0 -365
- package/docs/research/mcp-feasibility-analysis.md +0 -382
- package/docs/testing/test-matrix-codex.md +0 -130
- package/docs/updating.md +0 -89
- package/docs/user-docs/cli-reference.md +0 -428
- package/docs/user-docs/codex-vs-claude-code.md +0 -23
- package/docs/user-docs/core-updates.md +0 -70
- package/docs/user-docs/faq.md +0 -146
- package/docs/user-docs/getting-started-codex.md +0 -194
- package/docs/user-docs/getting-started-kimi.md +0 -423
- package/docs/user-docs/installation.md +0 -237
- package/docs/user-docs/provider-pipelines.md +0 -96
- package/docs/user-docs/quick-start.md +0 -161
- package/docs/windows.md +0 -78
- package/docs/workflows.md +0 -463
- package/schemas/profile.v1.json +0 -207
- package/templates/claude-md/CLAUDE-quickstart.md +0 -54
- package/templates/claude-md/root.md +0 -50
- package/templates/codex-skills/batch-implement/SKILL.md +0 -38
- package/templates/codex-skills/implement/SKILL.md +0 -38
- package/templates/codex-skills/retry/SKILL.md +0 -16
- package/templates/commands/specrails/compat-check.md +0 -271
- package/templates/commands/specrails/doctor.md +0 -62
- package/templates/commands/specrails/explore-spec.md +0 -173
- package/templates/commands/specrails/health-check.md +0 -527
- package/templates/commands/specrails/memory-inspect.md +0 -261
- package/templates/commands/specrails/opsx-diff.md +0 -419
- package/templates/commands/specrails/propose-spec.md +0 -102
- package/templates/commands/specrails/refactor-recommender.md +0 -169
- package/templates/commands/specrails/telemetry.md +0 -553
- package/templates/commands/specrails/why.md +0 -96
- package/templates/gemini-commands/batch-implement.toml +0 -37
- package/templates/gemini-commands/implement.toml +0 -37
- package/templates/gemini-commands/retry.toml +0 -15
- package/templates/profiles/default.json +0 -14
- package/templates/profiles/kimi-default.json +0 -15
- package/templates/rules/layer.md +0 -8
- package/templates/runtime/provider-pipeline.md +0 -113
- package/templates/security/security-exemptions.yaml +0 -20
- package/templates/settings/confidence-config.json +0 -17
- package/templates/settings/settings.json +0 -15
package/docs/workflows.md
DELETED
|
@@ -1,463 +0,0 @@
|
|
|
1
|
-
# Workflows & Commands
|
|
2
|
-
|
|
3
|
-
SpecRails commands are Claude Code slash commands that orchestrate the agent pipeline. Here's every command, what it does, and when to use it.
|
|
4
|
-
|
|
5
|
-
## The main workflow: `/specrails:implement`
|
|
6
|
-
|
|
7
|
-
This is the command you'll use most. It takes a feature request and drives it through the entire pipeline — from architecture to shipped PR.
|
|
8
|
-
|
|
9
|
-
### Usage
|
|
10
|
-
|
|
11
|
-
```
|
|
12
|
-
/specrails:implement #85 # From a GitHub Issue
|
|
13
|
-
/specrails:implement #85, #71, #63 # Multiple issues (parallel)
|
|
14
|
-
/specrails:implement "add dark mode toggle" # Text description
|
|
15
|
-
/specrails:implement UI, Analytics # By area (explores + selects)
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
### Flags
|
|
19
|
-
|
|
20
|
-
| Flag | Effect |
|
|
21
|
-
|------|--------|
|
|
22
|
-
| `--dry-run` / `--preview` | Run the full pipeline without git operations or PRs |
|
|
23
|
-
| `--apply <name>` | Apply a previously cached dry-run |
|
|
24
|
-
|
|
25
|
-
### Pipeline phases
|
|
26
|
-
|
|
27
|
-
When you run `/specrails:implement #85`, here's what happens:
|
|
28
|
-
|
|
29
|
-
```
|
|
30
|
-
Phase -1 Environment check
|
|
31
|
-
↓ prerequisites verified
|
|
32
|
-
Phase 0 Parse input, detect mode + snapshot issue state
|
|
33
|
-
↓ feature(s) identified
|
|
34
|
-
Phase 3a.0 Conflict check — verify issue unchanged since Phase 0
|
|
35
|
-
↓ no external modifications detected
|
|
36
|
-
Phase 3a Architect → design + tasks + compat check
|
|
37
|
-
↓ implementation plan ready
|
|
38
|
-
Phase 3b Developer → write code
|
|
39
|
-
↓ implementation complete
|
|
40
|
-
Phase 3c Test Writer → generate tests
|
|
41
|
-
↓ tests passing
|
|
42
|
-
Phase 3d Doc Sync → update docs
|
|
43
|
-
↓ docs in sync
|
|
44
|
-
Phase 4 Security Reviewer → scan
|
|
45
|
-
↓ no critical findings
|
|
46
|
-
Phase 4b Layer reviewers (Frontend + Backend, parallel)
|
|
47
|
-
+ Generalist Reviewer → run CI + fix issues
|
|
48
|
-
↓ CI green
|
|
49
|
-
Phase 4b-conf Confidence gate → score 0–100% across 5 aspects
|
|
50
|
-
↓ score meets threshold (or override)
|
|
51
|
-
Phase 4c.0 Conflict check — verify issue unchanged before ship
|
|
52
|
-
↓ no external modifications detected
|
|
53
|
-
Phase 5 Create PR
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
### Single vs. multi-feature
|
|
57
|
-
|
|
58
|
-
| Mode | Behavior |
|
|
59
|
-
|------|----------|
|
|
60
|
-
| **Single feature** | Sequential pipeline, one branch |
|
|
61
|
-
| **Multiple features** | Parallel pipelines in **git worktrees**, auto-merged |
|
|
62
|
-
|
|
63
|
-
For multiple features, each gets its own isolated worktree. Agents run concurrently, and results are merged automatically at the end.
|
|
64
|
-
|
|
65
|
-
### Example output
|
|
66
|
-
|
|
67
|
-
```
|
|
68
|
-
/specrails:implement #85
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
```
|
|
72
|
-
┌─ Phase 3a: Architecture ──────────────────────┐
|
|
73
|
-
│ Architect analyzed issue #85 │
|
|
74
|
-
│ Design: REST endpoint + middleware + migration │
|
|
75
|
-
│ Tasks: 4 ordered steps │
|
|
76
|
-
└─────────────────────────────────────────────────┘
|
|
77
|
-
|
|
78
|
-
┌─ Phase 3b: Implementation ────────────────────┐
|
|
79
|
-
│ Developer completed 4/4 tasks │
|
|
80
|
-
│ Files: 6 created, 2 modified │
|
|
81
|
-
└─────────────────────────────────────────────────┘
|
|
82
|
-
|
|
83
|
-
┌─ Phase 3c: Tests ─────────────────────────────┐
|
|
84
|
-
│ Test Writer generated 12 tests │
|
|
85
|
-
│ Coverage: 87% of new code │
|
|
86
|
-
└─────────────────────────────────────────────────┘
|
|
87
|
-
|
|
88
|
-
┌─ Phase 4b: Review ────────────────────────────┐
|
|
89
|
-
│ Frontend Reviewer: bundle +2kb, WCAG ok │
|
|
90
|
-
│ Backend Reviewer: no N+1, indexes ok │
|
|
91
|
-
│ ✓ lint ✓ typecheck ✓ tests │
|
|
92
|
-
│ Fixed: 1 import, 1 lint warning │
|
|
93
|
-
└─────────────────────────────────────────────────┘
|
|
94
|
-
|
|
95
|
-
┌─ Phase 4b-conf: Confidence ───────────────────┐
|
|
96
|
-
│ Correctness: 92% Tests: 87% Security: 95% │
|
|
97
|
-
│ Performance: 88% Maintainability: 90% │
|
|
98
|
-
│ Overall: 90% — threshold met │
|
|
99
|
-
└─────────────────────────────────────────────────┘
|
|
100
|
-
|
|
101
|
-
PR #42 created: feat: add health check endpoint
|
|
102
|
-
```
|
|
103
|
-
|
|
104
|
-
---
|
|
105
|
-
|
|
106
|
-
## `/specrails:batch-implement`
|
|
107
|
-
|
|
108
|
-
Orchestrates **multiple independent features** in parallel using git worktrees. Use this when you have several unrelated features to ship at once.
|
|
109
|
-
|
|
110
|
-
```
|
|
111
|
-
/specrails:batch-implement #85, #71, #63
|
|
112
|
-
```
|
|
113
|
-
|
|
114
|
-
Each feature gets its own worktree, its own agent pipeline, and its own PR. Features run concurrently for maximum speed.
|
|
115
|
-
|
|
116
|
-
---
|
|
117
|
-
|
|
118
|
-
## `/specrails:get-backlog-specs`
|
|
119
|
-
|
|
120
|
-
View your prioritized product backlog, ranked by VPC fit and effort.
|
|
121
|
-
|
|
122
|
-
```
|
|
123
|
-
/specrails:get-backlog-specs # Full backlog
|
|
124
|
-
/specrails:get-backlog-specs UI, API # Filter by area
|
|
125
|
-
```
|
|
126
|
-
|
|
127
|
-
### What it shows
|
|
128
|
-
|
|
129
|
-
The Product Analyst reads your backlog (local tickets in `.specrails/local-tickets.json` by default, or GitHub Issues labeled `product-driven-backlog` if configured) and produces:
|
|
130
|
-
|
|
131
|
-
- **Backlog table** per area — sorted by Total Persona Score
|
|
132
|
-
- **Top 3 recommendations** — ranked by VPC score / effort ratio, filtered to Wave 1 of the safe implementation order
|
|
133
|
-
- **Metadata** — area, persona fit scores, effort estimate, description
|
|
134
|
-
- **Safe Implementation Order** — dependency DAG built from `Prerequisites:` fields in issue bodies; cycles are detected and reported; topological sort determines the order
|
|
135
|
-
|
|
136
|
-
### Example output
|
|
137
|
-
|
|
138
|
-
```
|
|
139
|
-
┌─ API ──────────────────────────────────────────┐
|
|
140
|
-
│ # Issue Score Effort Description │
|
|
141
|
-
│ 1 #85 12/15 Medium Health check endpoint │
|
|
142
|
-
│ 2 #71 10/15 Low Rate limiting │
|
|
143
|
-
│ 3 #63 8/15 High GraphQL migration │
|
|
144
|
-
└─────────────────────────────────────────────────┘
|
|
145
|
-
|
|
146
|
-
Safe Implementation Order (Wave 1):
|
|
147
|
-
1. #71 — Rate limiting (no prerequisites)
|
|
148
|
-
2. #85 — Health check (requires #71)
|
|
149
|
-
3. #63 — GraphQL migration (requires #85)
|
|
150
|
-
```
|
|
151
|
-
|
|
152
|
-
---
|
|
153
|
-
|
|
154
|
-
## `/specrails:auto-propose-backlog-specs`
|
|
155
|
-
|
|
156
|
-
Generate new feature ideas through product discovery. The Product Manager (Opus) researches your competitive landscape and generates ideas evaluated against your personas.
|
|
157
|
-
|
|
158
|
-
```
|
|
159
|
-
/specrails:auto-propose-backlog-specs # All areas
|
|
160
|
-
/specrails:auto-propose-backlog-specs UI, API # Focus areas
|
|
161
|
-
```
|
|
162
|
-
|
|
163
|
-
### What it does
|
|
164
|
-
|
|
165
|
-
1. Reads all persona files (VPC profiles)
|
|
166
|
-
2. Researches competitors via web search
|
|
167
|
-
3. Generates 2–4 feature ideas per area
|
|
168
|
-
4. Scores each against every persona (0–5)
|
|
169
|
-
5. Creates tickets in your active backlog provider (local tickets by default; GitHub Issues or JIRA if configured) or displays for manual creation
|
|
170
|
-
|
|
171
|
-
---
|
|
172
|
-
|
|
173
|
-
## `/specrails:refactor-recommender`
|
|
174
|
-
|
|
175
|
-
Scan for refactoring opportunities ranked by impact/effort ratio.
|
|
176
|
-
|
|
177
|
-
```
|
|
178
|
-
/specrails:refactor-recommender
|
|
179
|
-
```
|
|
180
|
-
|
|
181
|
-
Identifies duplicates, long functions, large files, dead code, outdated patterns, and complex logic. Optionally creates GitHub Issues for tracking.
|
|
182
|
-
|
|
183
|
-
---
|
|
184
|
-
|
|
185
|
-
## `/specrails:compat-check`
|
|
186
|
-
|
|
187
|
-
Analyze the backwards compatibility impact of a proposed change before implementation.
|
|
188
|
-
|
|
189
|
-
```
|
|
190
|
-
/specrails:compat-check #85 # Check a specific issue
|
|
191
|
-
/specrails:compat-check #85 --save # Check and save as the new API baseline
|
|
192
|
-
```
|
|
193
|
-
|
|
194
|
-
The Architect's Phase 6 auto-check runs this analysis as part of every `/specrails:implement` pipeline. You can also run it standalone to evaluate a change before committing to it.
|
|
195
|
-
|
|
196
|
-
### What it detects
|
|
197
|
-
|
|
198
|
-
| Category | Examples |
|
|
199
|
-
|----------|---------|
|
|
200
|
-
| **Removed endpoints** | Deleted routes, removed methods |
|
|
201
|
-
| **Changed signatures** | Parameter renames, type changes, reordered args |
|
|
202
|
-
| **Changed response shapes** | Added required fields, removed fields, type widening |
|
|
203
|
-
| **Behavioral changes** | Changed defaults, altered error codes, modified side effects |
|
|
204
|
-
|
|
205
|
-
When breaking changes are found, `compat-check` generates a **migration guide** describing what callers need to update.
|
|
206
|
-
|
|
207
|
-
---
|
|
208
|
-
|
|
209
|
-
## `/specrails:why`
|
|
210
|
-
|
|
211
|
-
Search agent explanation records in plain language.
|
|
212
|
-
|
|
213
|
-
```
|
|
214
|
-
/specrails:why "why did we switch to event sourcing"
|
|
215
|
-
/specrails:why "why is pagination implemented this way"
|
|
216
|
-
/specrails:why "explain the auth middleware design"
|
|
217
|
-
```
|
|
218
|
-
|
|
219
|
-
The Architect, Developer, and Reviewer record decision rationale in `.claude/agent-memory/explanations/` as they work. `/specrails:why` searches these records semantically and surfaces the relevant context.
|
|
220
|
-
|
|
221
|
-
This is useful for onboarding, code review, and revisiting past decisions without digging through git history.
|
|
222
|
-
|
|
223
|
-
---
|
|
224
|
-
|
|
225
|
-
## OpenSpec commands
|
|
226
|
-
|
|
227
|
-
These commands manage the structured design-to-code workflow powered by [OpenSpec](https://openspec.dev).
|
|
228
|
-
|
|
229
|
-
### `/opsx:ff` — Fast Forward
|
|
230
|
-
|
|
231
|
-
Create a change and generate **all artifacts at once** (proposal → design → tasks → context bundle). Use this when you know what you want to build and don't need to step through each artifact.
|
|
232
|
-
|
|
233
|
-
```
|
|
234
|
-
/opsx:ff
|
|
235
|
-
```
|
|
236
|
-
|
|
237
|
-
### `/opsx:new` — New Change
|
|
238
|
-
|
|
239
|
-
Start a new change with the step-by-step artifact workflow. Creates a proposal first, then you advance through each artifact.
|
|
240
|
-
|
|
241
|
-
```
|
|
242
|
-
/opsx:new
|
|
243
|
-
```
|
|
244
|
-
|
|
245
|
-
### `/opsx:continue` — Continue Change
|
|
246
|
-
|
|
247
|
-
Resume work on an in-progress change. Creates the next artifact in the sequence.
|
|
248
|
-
|
|
249
|
-
```
|
|
250
|
-
/opsx:continue
|
|
251
|
-
```
|
|
252
|
-
|
|
253
|
-
### `/opsx:apply` — Apply Change
|
|
254
|
-
|
|
255
|
-
Implement the tasks from a designed change. Hands off to the Developer agent.
|
|
256
|
-
|
|
257
|
-
```
|
|
258
|
-
/opsx:apply
|
|
259
|
-
```
|
|
260
|
-
|
|
261
|
-
### `/opsx:verify` — Verify Change
|
|
262
|
-
|
|
263
|
-
Validate that implementation matches the change artifacts before archiving.
|
|
264
|
-
|
|
265
|
-
```
|
|
266
|
-
/opsx:verify
|
|
267
|
-
```
|
|
268
|
-
|
|
269
|
-
### `/opsx:archive` — Archive Change
|
|
270
|
-
|
|
271
|
-
Finalize and archive a completed change. Moves it from active to archived.
|
|
272
|
-
|
|
273
|
-
```
|
|
274
|
-
/opsx:archive
|
|
275
|
-
```
|
|
276
|
-
|
|
277
|
-
### `/opsx:explore` — Explore
|
|
278
|
-
|
|
279
|
-
Open-ended thinking mode. Use for brainstorming, investigating problems, or clarifying requirements before creating a change.
|
|
280
|
-
|
|
281
|
-
```
|
|
282
|
-
/opsx:explore
|
|
283
|
-
```
|
|
284
|
-
|
|
285
|
-
### `/specrails:opsx-diff` — Spec Change Diff
|
|
286
|
-
|
|
287
|
-
Visualize the before/after diff of an OpenSpec change — what behavioral requirements are being added, modified, or removed.
|
|
288
|
-
|
|
289
|
-
```
|
|
290
|
-
/specrails:opsx-diff <change-name>
|
|
291
|
-
/specrails:opsx-diff my-feature --format json
|
|
292
|
-
/specrails:opsx-diff my-feature --summary-only
|
|
293
|
-
```
|
|
294
|
-
|
|
295
|
-
| Flag | Effect |
|
|
296
|
-
|------|--------|
|
|
297
|
-
| `<change-name>` | Kebab-case name of the change to diff (required) |
|
|
298
|
-
| `--format json` | Emit structured JSON instead of markdown |
|
|
299
|
-
| `--summary-only` | Show file-level summary only, skip inline line-level diff |
|
|
300
|
-
|
|
301
|
-
Compares the current specs against the named OpenSpec change. Useful during review to confirm a change matches its design intent before archiving.
|
|
302
|
-
|
|
303
|
-
### Typical OpenSpec flow
|
|
304
|
-
|
|
305
|
-
```
|
|
306
|
-
/opsx:ff → Architect creates all artifacts
|
|
307
|
-
/opsx:apply → Developer implements
|
|
308
|
-
/opsx:verify → Validate implementation
|
|
309
|
-
/opsx:archive → Finalize and archive
|
|
310
|
-
```
|
|
311
|
-
|
|
312
|
-
Or step by step:
|
|
313
|
-
|
|
314
|
-
```
|
|
315
|
-
/opsx:new → Create proposal
|
|
316
|
-
/opsx:continue → Create design
|
|
317
|
-
/opsx:continue → Create tasks
|
|
318
|
-
/opsx:continue → Create context bundle
|
|
319
|
-
/opsx:apply → Implement
|
|
320
|
-
/opsx:archive → Archive
|
|
321
|
-
```
|
|
322
|
-
|
|
323
|
-
---
|
|
324
|
-
|
|
325
|
-
## `/specrails:telemetry`
|
|
326
|
-
|
|
327
|
-
Inspect per-agent execution metrics: token usage, estimated API cost, run count, average duration, and success/failure rate.
|
|
328
|
-
|
|
329
|
-
```
|
|
330
|
-
/specrails:telemetry
|
|
331
|
-
/specrails:telemetry --period today
|
|
332
|
-
/specrails:telemetry --agent sr-developer
|
|
333
|
-
/specrails:telemetry --format json
|
|
334
|
-
/specrails:telemetry --save
|
|
335
|
-
```
|
|
336
|
-
|
|
337
|
-
### Flags
|
|
338
|
-
|
|
339
|
-
| Flag | Effect |
|
|
340
|
-
|------|--------|
|
|
341
|
-
| `--period <filter>` | Time window: `today`, `week` (default), or `all` |
|
|
342
|
-
| `--agent <name>` | Focus on a single agent (e.g. `sr-developer`) |
|
|
343
|
-
| `--format <fmt>` | Output format: `markdown` (default) or `json` |
|
|
344
|
-
| `--save` | Write a snapshot to `.claude/telemetry/` after display |
|
|
345
|
-
|
|
346
|
-
Reads Claude CLI JSONL session logs and agent-memory files to produce a cost dashboard with trend indicators and optimization recommendations.
|
|
347
|
-
|
|
348
|
-
---
|
|
349
|
-
|
|
350
|
-
## `/specrails:merge-resolve`
|
|
351
|
-
|
|
352
|
-
Resolve git conflict markers using AI-powered context analysis.
|
|
353
|
-
|
|
354
|
-
```
|
|
355
|
-
/specrails:merge-resolve
|
|
356
|
-
/specrails:merge-resolve --files src/api/routes.ts src/db/schema.ts
|
|
357
|
-
/specrails:merge-resolve --context openspec/changes/
|
|
358
|
-
```
|
|
359
|
-
|
|
360
|
-
### Flags
|
|
361
|
-
|
|
362
|
-
| Flag | Effect |
|
|
363
|
-
|------|--------|
|
|
364
|
-
| `--files <paths>` | Explicit file paths or globs to process (default: auto-detect from working tree) |
|
|
365
|
-
| `--context <dir>` | Directory of OpenSpec context bundles (default: `openspec/changes/`) |
|
|
366
|
-
| `--threshold <n>` | Minimum confidence threshold to auto-apply a resolution |
|
|
367
|
-
|
|
368
|
-
For each conflict block, the command reads the OpenSpec context bundles from the features that produced the conflict, infers the correct resolution, and writes it in place. Conflicts it cannot safely resolve are left with clean markers for manual review. Always review the result before committing.
|
|
369
|
-
|
|
370
|
-
---
|
|
371
|
-
|
|
372
|
-
## `/specrails:retry`
|
|
373
|
-
|
|
374
|
-
Resume a failed `/specrails:implement` run from the last successful phase — without restarting from scratch.
|
|
375
|
-
|
|
376
|
-
```
|
|
377
|
-
/specrails:retry <feature-name> # Resume from the failed phase
|
|
378
|
-
/specrails:retry --list # List all available pipeline states
|
|
379
|
-
/specrails:retry <feature-name> --from architect # Force resume from a specific phase
|
|
380
|
-
/specrails:retry <feature-name> --dry-run # Resume in preview mode
|
|
381
|
-
```
|
|
382
|
-
|
|
383
|
-
When a pipeline fails mid-run (e.g., the reviewer hits a flaky CI issue), SpecRails saves pipeline state to `.claude/pipeline-state/<feature-name>.json`. `/specrails:retry` reads that state, identifies which phases completed, and re-executes only the remaining phases.
|
|
384
|
-
|
|
385
|
-
Valid `--from` phase values: `architect`, `developer`, `test-writer`, `doc-sync`, `reviewer`, `ship`, `ci`.
|
|
386
|
-
|
|
387
|
-
---
|
|
388
|
-
|
|
389
|
-
## `/specrails:vpc-drift`
|
|
390
|
-
|
|
391
|
-
Detect when your VPC personas have drifted from what your product actually delivers.
|
|
392
|
-
|
|
393
|
-
```
|
|
394
|
-
/specrails:vpc-drift # Analyze all personas
|
|
395
|
-
/specrails:vpc-drift --persona "Alex,Sara" # Filter to specific personas
|
|
396
|
-
/specrails:vpc-drift --verbose # Show full attribute lists
|
|
397
|
-
/specrails:vpc-drift --format json # Emit report as JSON
|
|
398
|
-
```
|
|
399
|
-
|
|
400
|
-
Compares persona Jobs/Pains/Gains against the product backlog, implemented features, and agent memory to surface alignment gaps. Produces a per-persona alignment score and concrete recommendations for updating your VPC.
|
|
401
|
-
|
|
402
|
-
Run this when your backlog feels disconnected from your users, or after a major product pivot.
|
|
403
|
-
|
|
404
|
-
---
|
|
405
|
-
|
|
406
|
-
## `/specrails:memory-inspect`
|
|
407
|
-
|
|
408
|
-
Inspect agent memory directories to understand what your agents remember and clean up stale data.
|
|
409
|
-
|
|
410
|
-
```
|
|
411
|
-
/specrails:memory-inspect # Inspect all agent memory
|
|
412
|
-
/specrails:memory-inspect sr-developer # Inspect a specific agent
|
|
413
|
-
/specrails:memory-inspect --stale 14 # Flag files older than 14 days
|
|
414
|
-
/specrails:memory-inspect --prune # Delete stale files (after confirmation)
|
|
415
|
-
```
|
|
416
|
-
|
|
417
|
-
Agents write persistent memory to `.claude/agent-memory/sr-*/`. Over time this can accumulate stale or orphaned files. `/specrails:memory-inspect` shows per-agent stats (file count, size, last modified), recent entries, and actionable cleanup recommendations.
|
|
418
|
-
|
|
419
|
-
---
|
|
420
|
-
|
|
421
|
-
## `/specrails:propose-spec`
|
|
422
|
-
|
|
423
|
-
Explore a feature idea and produce a structured proposal ready for the OpenSpec pipeline.
|
|
424
|
-
|
|
425
|
-
```
|
|
426
|
-
/specrails:propose-spec "add rate limiting to the API"
|
|
427
|
-
```
|
|
428
|
-
|
|
429
|
-
The command explores your codebase to understand existing patterns, then produces a structured proposal with: problem statement, proposed solution, out-of-scope items, acceptance criteria, technical considerations, and a complexity estimate.
|
|
430
|
-
|
|
431
|
-
Use this before creating a GitHub Issue when you want a well-formed spec rather than a rough idea.
|
|
432
|
-
|
|
433
|
-
---
|
|
434
|
-
|
|
435
|
-
## Preview mode
|
|
436
|
-
|
|
437
|
-
Any workflow can be run in preview mode to see what would happen without making changes:
|
|
438
|
-
|
|
439
|
-
```
|
|
440
|
-
/specrails:implement --dry-run #85
|
|
441
|
-
```
|
|
442
|
-
|
|
443
|
-
Preview mode runs the full pipeline but skips:
|
|
444
|
-
- Git operations (no commits, no branches)
|
|
445
|
-
- PR creation
|
|
446
|
-
- Backlog updates
|
|
447
|
-
|
|
448
|
-
The results are cached. Apply them later with:
|
|
449
|
-
|
|
450
|
-
```
|
|
451
|
-
/specrails:implement --apply health-check-endpoint
|
|
452
|
-
```
|
|
453
|
-
|
|
454
|
-
---
|
|
455
|
-
|
|
456
|
-
## What's next?
|
|
457
|
-
|
|
458
|
-
- [Customization](customization.md) — adapt agents, rules, and personas to your project
|
|
459
|
-
- [Updating](updating.md) — keep SpecRails up to date
|
|
460
|
-
|
|
461
|
-
---
|
|
462
|
-
|
|
463
|
-
[← Agents](agents.md) · [Customization →](customization.md)
|
package/schemas/profile.v1.json
DELETED
|
@@ -1,207 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "https://raw.githubusercontent.com/fjpulidop/specrails-core/main/schemas/profile.v1.json",
|
|
4
|
-
"title": "specrails agent profile (v1)",
|
|
5
|
-
"description": "Declarative configuration for the specrails implement pipeline. Describes which agents participate, which models they run with, and how tasks are routed to specialists. Consumed by `implement.md` and produced by tools like specrails-desktop.",
|
|
6
|
-
"type": "object",
|
|
7
|
-
"required": ["schemaVersion", "name", "orchestrator", "agents", "routing"],
|
|
8
|
-
"additionalProperties": false,
|
|
9
|
-
"properties": {
|
|
10
|
-
"schemaVersion": {
|
|
11
|
-
"const": 1,
|
|
12
|
-
"description": "Profile schema version. v1 is the only supported value at this time."
|
|
13
|
-
},
|
|
14
|
-
"name": {
|
|
15
|
-
"type": "string",
|
|
16
|
-
"pattern": "^[a-z0-9][a-z0-9-]*$",
|
|
17
|
-
"minLength": 1,
|
|
18
|
-
"maxLength": 64,
|
|
19
|
-
"description": "Human-readable identifier for this profile (kebab-case)."
|
|
20
|
-
},
|
|
21
|
-
"description": {
|
|
22
|
-
"type": "string",
|
|
23
|
-
"maxLength": 512,
|
|
24
|
-
"description": "Optional short summary of when to use this profile."
|
|
25
|
-
},
|
|
26
|
-
"provider": {
|
|
27
|
-
"type": "string",
|
|
28
|
-
"enum": ["claude", "codex", "gemini", "kimi"],
|
|
29
|
-
"description": "Optional provider binding. Omitted profiles retain the legacy Claude model-alias contract. Provider-bound profiles retain exact model identifiers; Kimi additionally enforces its safe process-boundary grammar."
|
|
30
|
-
},
|
|
31
|
-
"orchestrator": {
|
|
32
|
-
"type": "object",
|
|
33
|
-
"required": ["model"],
|
|
34
|
-
"additionalProperties": false,
|
|
35
|
-
"properties": {
|
|
36
|
-
"model": {
|
|
37
|
-
"$ref": "#/$defs/providerModelId",
|
|
38
|
-
"description": "Provider model identifier used to run the top-level implement orchestrator."
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
},
|
|
42
|
-
"agents": {
|
|
43
|
-
"type": "array",
|
|
44
|
-
"minItems": 1,
|
|
45
|
-
"items": { "$ref": "#/$defs/agentEntry" },
|
|
46
|
-
"description": "Ordered chain of agents that participate in the pipeline when this profile is active. Every profile (default + custom) must include the baseline trio (sr-architect, sr-developer, sr-reviewer) — the pipeline depends on all three, and they are the only agents the installer ships. Additional agents are user-authored 'custom-*' agents added on top of the baseline; a profile entry whose agent file does not exist is warned and skipped at run time.",
|
|
47
|
-
"allOf": [
|
|
48
|
-
{
|
|
49
|
-
"description": "Required baseline agent: sr-architect",
|
|
50
|
-
"contains": {
|
|
51
|
-
"type": "object",
|
|
52
|
-
"properties": { "id": { "const": "sr-architect" } },
|
|
53
|
-
"required": ["id"]
|
|
54
|
-
}
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
"description": "Required baseline agent: sr-developer",
|
|
58
|
-
"contains": {
|
|
59
|
-
"type": "object",
|
|
60
|
-
"properties": { "id": { "const": "sr-developer" } },
|
|
61
|
-
"required": ["id"]
|
|
62
|
-
}
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
"description": "Required baseline agent: sr-reviewer",
|
|
66
|
-
"contains": {
|
|
67
|
-
"type": "object",
|
|
68
|
-
"properties": { "id": { "const": "sr-reviewer" } },
|
|
69
|
-
"required": ["id"]
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
]
|
|
73
|
-
},
|
|
74
|
-
"routing": {
|
|
75
|
-
"type": "array",
|
|
76
|
-
"minItems": 0,
|
|
77
|
-
"description": "Ordered routing rules. The first rule whose `tags` intersects the task's tag set wins. If a `default: true` entry is present it MUST be the last element. Custom profiles may omit routing entirely — tasks then fall through to the first developer-shaped agent in the chain.",
|
|
78
|
-
"items": { "$ref": "#/$defs/routingRule" }
|
|
79
|
-
}
|
|
80
|
-
},
|
|
81
|
-
"allOf": [
|
|
82
|
-
{
|
|
83
|
-
"if": {
|
|
84
|
-
"anyOf": [
|
|
85
|
-
{ "not": { "required": ["provider"] } },
|
|
86
|
-
{
|
|
87
|
-
"required": ["provider"],
|
|
88
|
-
"properties": { "provider": { "const": "claude" } }
|
|
89
|
-
}
|
|
90
|
-
]
|
|
91
|
-
},
|
|
92
|
-
"then": {
|
|
93
|
-
"properties": {
|
|
94
|
-
"orchestrator": {
|
|
95
|
-
"properties": { "model": { "$ref": "#/$defs/modelAlias" } }
|
|
96
|
-
},
|
|
97
|
-
"agents": {
|
|
98
|
-
"items": {
|
|
99
|
-
"properties": { "model": { "$ref": "#/$defs/modelAlias" } }
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
},
|
|
105
|
-
{
|
|
106
|
-
"if": {
|
|
107
|
-
"required": ["provider"],
|
|
108
|
-
"properties": { "provider": { "const": "kimi" } }
|
|
109
|
-
},
|
|
110
|
-
"then": {
|
|
111
|
-
"properties": {
|
|
112
|
-
"orchestrator": {
|
|
113
|
-
"properties": { "model": { "$ref": "#/$defs/kimiModelId" } }
|
|
114
|
-
},
|
|
115
|
-
"agents": {
|
|
116
|
-
"items": {
|
|
117
|
-
"properties": { "model": { "$ref": "#/$defs/kimiModelId" } }
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
],
|
|
124
|
-
"$defs": {
|
|
125
|
-
"modelAlias": {
|
|
126
|
-
"type": "string",
|
|
127
|
-
"enum": ["sonnet", "opus", "haiku"],
|
|
128
|
-
"description": "Accepted model alias. Resolved to the current concrete model ID by the pipeline."
|
|
129
|
-
},
|
|
130
|
-
"providerModelId": {
|
|
131
|
-
"type": "string",
|
|
132
|
-
"minLength": 1,
|
|
133
|
-
"maxLength": 256,
|
|
134
|
-
"pattern": "^\\S(?:.*\\S)?$",
|
|
135
|
-
"description": "Exact provider model identifier or user-configured alias. Core retains this value verbatim and applies documented provider-specific validation/normalization."
|
|
136
|
-
},
|
|
137
|
-
"kimiModelId": {
|
|
138
|
-
"type": "string",
|
|
139
|
-
"minLength": 1,
|
|
140
|
-
"maxLength": 128,
|
|
141
|
-
"pattern": "^[A-Za-z0-9][A-Za-z0-9._/:-]*$",
|
|
142
|
-
"description": "Kimi model identifier accepted at the shell-free process boundary."
|
|
143
|
-
},
|
|
144
|
-
"agentEntry": {
|
|
145
|
-
"type": "object",
|
|
146
|
-
"required": ["id"],
|
|
147
|
-
"additionalProperties": false,
|
|
148
|
-
"properties": {
|
|
149
|
-
"id": {
|
|
150
|
-
"type": "string",
|
|
151
|
-
"pattern": "^(sr|custom)-[a-z0-9][a-z0-9-]*$",
|
|
152
|
-
"description": "Agent identifier. MUST correspond to the selected provider's role artifact."
|
|
153
|
-
},
|
|
154
|
-
"model": {
|
|
155
|
-
"$ref": "#/$defs/providerModelId",
|
|
156
|
-
"description": "Exact provider model override for this agent. When omitted, the provider default is used."
|
|
157
|
-
},
|
|
158
|
-
"required": {
|
|
159
|
-
"type": "boolean",
|
|
160
|
-
"default": false,
|
|
161
|
-
"description": "If true, the agent cannot be routed past. Baseline agents (sr-architect, sr-developer, sr-reviewer) SHOULD be marked required."
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
},
|
|
165
|
-
"routingRule": {
|
|
166
|
-
"oneOf": [
|
|
167
|
-
{
|
|
168
|
-
"type": "object",
|
|
169
|
-
"required": ["tags", "agent"],
|
|
170
|
-
"additionalProperties": false,
|
|
171
|
-
"properties": {
|
|
172
|
-
"tags": {
|
|
173
|
-
"type": "array",
|
|
174
|
-
"minItems": 1,
|
|
175
|
-
"items": {
|
|
176
|
-
"type": "string",
|
|
177
|
-
"pattern": "^[a-z0-9][a-z0-9-]*$"
|
|
178
|
-
},
|
|
179
|
-
"description": "Task tags that trigger this rule. Rule wins if any tag intersects."
|
|
180
|
-
},
|
|
181
|
-
"agent": {
|
|
182
|
-
"type": "string",
|
|
183
|
-
"pattern": "^(sr|custom)-[a-z0-9][a-z0-9-]*$",
|
|
184
|
-
"description": "Agent to route the task to when this rule wins."
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
},
|
|
188
|
-
{
|
|
189
|
-
"type": "object",
|
|
190
|
-
"required": ["default", "agent"],
|
|
191
|
-
"additionalProperties": false,
|
|
192
|
-
"properties": {
|
|
193
|
-
"default": {
|
|
194
|
-
"const": true,
|
|
195
|
-
"description": "Marks this rule as the terminal catch-all. Exactly one entry with `default: true` is allowed, and it MUST be the last element of `routing`."
|
|
196
|
-
},
|
|
197
|
-
"agent": {
|
|
198
|
-
"type": "string",
|
|
199
|
-
"pattern": "^(sr|custom)-[a-z0-9][a-z0-9-]*$",
|
|
200
|
-
"description": "Agent to route the task to when no earlier rule matched."
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
]
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
}
|