specrails-core 5.5.1 → 6.0.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.
Files changed (276) hide show
  1. package/README.md +27 -145
  2. package/bin/specrails-core.mjs +12 -554
  3. package/dist/agent-runtime/capabilities.js +0 -1
  4. package/dist/agent-runtime/cli-executor.d.ts +1 -1
  5. package/dist/agent-runtime/cli-executor.js +4 -3
  6. package/dist/agent-runtime/cli-process.js +0 -1
  7. package/dist/agent-runtime/cli.d.ts +8 -0
  8. package/dist/agent-runtime/cli.js +31 -5
  9. package/dist/agent-runtime/codex-schema.js +0 -1
  10. package/dist/agent-runtime/compact/architect.d.ts +3 -272
  11. package/dist/agent-runtime/compact/architect.js +8 -9
  12. package/dist/agent-runtime/compact/chat-client.d.ts +3 -3
  13. package/dist/agent-runtime/compact/chat-client.js +1 -2
  14. package/dist/agent-runtime/compact/developer.d.ts +3 -70
  15. package/dist/agent-runtime/compact/developer.js +13 -14
  16. package/dist/agent-runtime/compact/environment.d.ts +4 -5
  17. package/dist/agent-runtime/compact/environment.js +1 -2
  18. package/dist/agent-runtime/compact/exit-code-honesty.d.ts +2 -1
  19. package/dist/agent-runtime/compact/exit-code-honesty.js +0 -1
  20. package/dist/agent-runtime/compact/guarded-loop.d.ts +2 -18
  21. package/dist/agent-runtime/compact/guarded-loop.js +7 -8
  22. package/dist/agent-runtime/compact/prompt-inputs.d.ts +0 -2
  23. package/dist/agent-runtime/compact/prompt-inputs.js +1 -2
  24. package/dist/agent-runtime/compact/reviewer.d.ts +0 -13
  25. package/dist/agent-runtime/compact/reviewer.js +5 -6
  26. package/dist/agent-runtime/compact/step.d.ts +0 -1
  27. package/dist/agent-runtime/compact/step.js +1 -2
  28. package/dist/agent-runtime/compact/test-reachability.js +0 -1
  29. package/dist/agent-runtime/config.js +0 -1
  30. package/dist/agent-runtime/core-host.d.ts +1 -1
  31. package/dist/agent-runtime/core-host.js +5 -3
  32. package/dist/agent-runtime/durable-store.d.ts +0 -1
  33. package/dist/agent-runtime/durable-store.js +1 -2
  34. package/dist/agent-runtime/efficiency-summary.d.ts +2 -2
  35. package/dist/agent-runtime/efficiency-summary.js +1 -2
  36. package/dist/agent-runtime/efficiency-types.js +0 -1
  37. package/dist/agent-runtime/efficiency.js +0 -1
  38. package/dist/agent-runtime/evaluation-corpus.js +0 -1
  39. package/dist/agent-runtime/evaluation.d.ts +2 -1
  40. package/dist/agent-runtime/evaluation.js +1 -2
  41. package/dist/agent-runtime/executor-types.d.ts +1 -1
  42. package/dist/agent-runtime/executor-types.js +0 -1
  43. package/dist/agent-runtime/executors.js +0 -1
  44. package/dist/agent-runtime/gemini-policy.js +0 -1
  45. package/dist/agent-runtime/graph/artifacts.d.ts +1 -1
  46. package/dist/agent-runtime/graph/artifacts.js +11 -5
  47. package/dist/agent-runtime/graph/nodes.d.ts +1 -1
  48. package/dist/agent-runtime/graph/nodes.js +1 -2
  49. package/dist/agent-runtime/graph/review-policy.js +0 -1
  50. package/dist/agent-runtime/graph/roles.d.ts +2 -5
  51. package/dist/agent-runtime/graph/roles.js +2 -8
  52. package/dist/agent-runtime/graph/state.d.ts +1 -1
  53. package/dist/agent-runtime/graph/state.js +0 -1
  54. package/dist/agent-runtime/graph-checkpointer.d.ts +2 -1
  55. package/dist/agent-runtime/graph-checkpointer.js +0 -1
  56. package/dist/agent-runtime/guardrails.d.ts +3 -3
  57. package/dist/agent-runtime/guardrails.js +1 -2
  58. package/dist/agent-runtime/index.d.ts +2 -1
  59. package/dist/agent-runtime/index.js +2 -2
  60. package/dist/agent-runtime/kimi-acp.js +1 -2
  61. package/dist/agent-runtime/kimi-model.d.ts +6 -0
  62. package/dist/agent-runtime/kimi-model.js +12 -0
  63. package/dist/agent-runtime/openai-executor.d.ts +0 -9
  64. package/dist/agent-runtime/openai-executor.js +6 -7
  65. package/dist/agent-runtime/openspec-tool-server.js +1 -2
  66. package/dist/agent-runtime/openspec.d.ts +0 -2
  67. package/dist/agent-runtime/openspec.js +3 -7
  68. package/dist/agent-runtime/prompts.d.ts +4 -3
  69. package/dist/agent-runtime/prompts.js +0 -1
  70. package/dist/agent-runtime/provider-diagnostic.js +1 -2
  71. package/dist/agent-runtime/recovery.d.ts +46 -0
  72. package/dist/agent-runtime/recovery.js +169 -0
  73. package/dist/agent-runtime/repository-context.d.ts +1 -1
  74. package/dist/agent-runtime/repository-context.js +0 -1
  75. package/dist/agent-runtime/review-context.d.ts +1 -1
  76. package/dist/agent-runtime/review-context.js +0 -1
  77. package/dist/agent-runtime/role-routing.js +0 -1
  78. package/dist/agent-runtime/role-state.js +0 -1
  79. package/dist/agent-runtime/runtime-identity.js +1 -2
  80. package/dist/agent-runtime/tool-event.js +0 -1
  81. package/dist/agent-runtime/verification-plan.d.ts +5 -4
  82. package/dist/agent-runtime/verification-plan.js +1 -2
  83. package/dist/agent-runtime/workflow-types.js +0 -1
  84. package/dist/agent-runtime/workflow.js +0 -1
  85. package/dist/agent-runtime/workspace-tools.d.ts +2 -2
  86. package/dist/agent-runtime/workspace-tools.js +1 -2
  87. package/dist/installer/cli.d.ts +3 -32
  88. package/dist/installer/cli.js +26 -101
  89. package/dist/installer/commands/framework.d.ts +4 -3
  90. package/dist/installer/commands/framework.js +0 -1
  91. package/dist/installer/commands/init.d.ts +4 -25
  92. package/dist/installer/commands/init.js +5 -8
  93. package/dist/installer/phases/framework-lifecycle.d.ts +3 -17
  94. package/dist/installer/phases/framework-lifecycle.js +2 -3
  95. package/dist/installer/phases/install-config.d.ts +7 -8
  96. package/dist/installer/phases/install-config.js +2 -7
  97. package/dist/installer/phases/manifest.d.ts +6 -7
  98. package/dist/installer/phases/manifest.js +2 -7
  99. package/dist/installer/phases/prereqs.d.ts +6 -7
  100. package/dist/installer/phases/prereqs.js +4 -6
  101. package/dist/installer/phases/provider-detect.d.ts +6 -7
  102. package/dist/installer/phases/provider-detect.js +2 -4
  103. package/dist/installer/phases/scaffold.d.ts +9 -10
  104. package/dist/installer/phases/scaffold.js +82 -805
  105. package/dist/installer/util/errors.js +0 -1
  106. package/dist/installer/util/exec.d.ts +3 -2
  107. package/dist/installer/util/exec.js +0 -1
  108. package/dist/installer/util/fs.d.ts +0 -10
  109. package/dist/installer/util/fs.js +1 -2
  110. package/dist/installer/util/git.js +0 -1
  111. package/dist/installer/util/install-transaction.d.ts +2 -2
  112. package/dist/installer/util/install-transaction.js +1 -2
  113. package/dist/installer/util/logger.d.ts +1 -3
  114. package/dist/installer/util/logger.js +0 -1
  115. package/dist/installer/util/paths.js +0 -1
  116. package/dist/installer/util/registry.d.ts +4 -8
  117. package/dist/installer/util/registry.js +2 -3
  118. package/dist/{installer/runtime → pipeline}/pipeline-state.js +0 -3
  119. package/dist/shared/args.d.ts +18 -0
  120. package/dist/shared/args.js +53 -0
  121. package/integration-contract.json +10 -46
  122. package/package.json +3 -10
  123. package/templates/agents/sr-architect.md +15 -310
  124. package/templates/agents/sr-developer.md +15 -269
  125. package/templates/agents/sr-reviewer.md +13 -367
  126. package/templates/codex-skills/rails/sr-architect/SKILL.md +14 -308
  127. package/templates/codex-skills/rails/sr-developer/SKILL.md +14 -201
  128. package/templates/codex-skills/rails/sr-reviewer/SKILL.md +15 -289
  129. package/templates/kimi/specrails/run-skill.mjs +91 -2173
  130. package/bin/tui-installer.mjs +0 -430
  131. package/commands/doctor.md +0 -62
  132. package/dist/agent-runtime/capabilities.js.map +0 -1
  133. package/dist/agent-runtime/cli-executor.js.map +0 -1
  134. package/dist/agent-runtime/cli-process.js.map +0 -1
  135. package/dist/agent-runtime/cli.js.map +0 -1
  136. package/dist/agent-runtime/codex-schema.js.map +0 -1
  137. package/dist/agent-runtime/compact/architect.js.map +0 -1
  138. package/dist/agent-runtime/compact/chat-client.js.map +0 -1
  139. package/dist/agent-runtime/compact/developer.js.map +0 -1
  140. package/dist/agent-runtime/compact/environment.js.map +0 -1
  141. package/dist/agent-runtime/compact/exit-code-honesty.js.map +0 -1
  142. package/dist/agent-runtime/compact/guarded-loop.js.map +0 -1
  143. package/dist/agent-runtime/compact/prompt-inputs.js.map +0 -1
  144. package/dist/agent-runtime/compact/reviewer.js.map +0 -1
  145. package/dist/agent-runtime/compact/step.js.map +0 -1
  146. package/dist/agent-runtime/compact/test-reachability.js.map +0 -1
  147. package/dist/agent-runtime/config.js.map +0 -1
  148. package/dist/agent-runtime/core-host.js.map +0 -1
  149. package/dist/agent-runtime/durable-store.js.map +0 -1
  150. package/dist/agent-runtime/efficiency-summary.js.map +0 -1
  151. package/dist/agent-runtime/efficiency-types.js.map +0 -1
  152. package/dist/agent-runtime/efficiency.js.map +0 -1
  153. package/dist/agent-runtime/evaluation-corpus.js.map +0 -1
  154. package/dist/agent-runtime/evaluation.js.map +0 -1
  155. package/dist/agent-runtime/executor-types.js.map +0 -1
  156. package/dist/agent-runtime/executors.js.map +0 -1
  157. package/dist/agent-runtime/gemini-policy.js.map +0 -1
  158. package/dist/agent-runtime/graph/artifacts.js.map +0 -1
  159. package/dist/agent-runtime/graph/nodes.js.map +0 -1
  160. package/dist/agent-runtime/graph/review-policy.js.map +0 -1
  161. package/dist/agent-runtime/graph/roles.js.map +0 -1
  162. package/dist/agent-runtime/graph/state.js.map +0 -1
  163. package/dist/agent-runtime/graph-checkpointer.js.map +0 -1
  164. package/dist/agent-runtime/guardrails.js.map +0 -1
  165. package/dist/agent-runtime/index.js.map +0 -1
  166. package/dist/agent-runtime/kimi-acp.js.map +0 -1
  167. package/dist/agent-runtime/openai-executor.js.map +0 -1
  168. package/dist/agent-runtime/openspec-tool-server.js.map +0 -1
  169. package/dist/agent-runtime/openspec.js.map +0 -1
  170. package/dist/agent-runtime/prompts.js.map +0 -1
  171. package/dist/agent-runtime/provider-diagnostic.js.map +0 -1
  172. package/dist/agent-runtime/repository-context.js.map +0 -1
  173. package/dist/agent-runtime/review-context.js.map +0 -1
  174. package/dist/agent-runtime/role-routing.js.map +0 -1
  175. package/dist/agent-runtime/role-state.js.map +0 -1
  176. package/dist/agent-runtime/runtime-identity.js.map +0 -1
  177. package/dist/agent-runtime/tool-event.js.map +0 -1
  178. package/dist/agent-runtime/verification-plan.js.map +0 -1
  179. package/dist/agent-runtime/workflow-types.js.map +0 -1
  180. package/dist/agent-runtime/workflow.js.map +0 -1
  181. package/dist/agent-runtime/workspace-tools.js.map +0 -1
  182. package/dist/installer/cli.js.map +0 -1
  183. package/dist/installer/commands/doctor.d.ts +0 -27
  184. package/dist/installer/commands/doctor.js +0 -615
  185. package/dist/installer/commands/doctor.js.map +0 -1
  186. package/dist/installer/commands/framework.js.map +0 -1
  187. package/dist/installer/commands/init.js.map +0 -1
  188. package/dist/installer/commands/update.d.ts +0 -56
  189. package/dist/installer/commands/update.js +0 -257
  190. package/dist/installer/commands/update.js.map +0 -1
  191. package/dist/installer/commands/v5-migration.d.ts +0 -32
  192. package/dist/installer/commands/v5-migration.js +0 -133
  193. package/dist/installer/commands/v5-migration.js.map +0 -1
  194. package/dist/installer/phases/framework-lifecycle.js.map +0 -1
  195. package/dist/installer/phases/install-config.js.map +0 -1
  196. package/dist/installer/phases/manifest.js.map +0 -1
  197. package/dist/installer/phases/prereqs.js.map +0 -1
  198. package/dist/installer/phases/provider-detect.js.map +0 -1
  199. package/dist/installer/phases/scaffold.js.map +0 -1
  200. package/dist/installer/runtime/kimi.d.ts +0 -84
  201. package/dist/installer/runtime/kimi.js +0 -255
  202. package/dist/installer/runtime/kimi.js.map +0 -1
  203. package/dist/installer/runtime/pipeline-state.js.map +0 -1
  204. package/dist/installer/util/errors.js.map +0 -1
  205. package/dist/installer/util/exec.js.map +0 -1
  206. package/dist/installer/util/fs.js.map +0 -1
  207. package/dist/installer/util/git.js.map +0 -1
  208. package/dist/installer/util/install-transaction.js.map +0 -1
  209. package/dist/installer/util/logger.js.map +0 -1
  210. package/dist/installer/util/paths.js.map +0 -1
  211. package/dist/installer/util/prompts.d.ts +0 -23
  212. package/dist/installer/util/prompts.js +0 -49
  213. package/dist/installer/util/prompts.js.map +0 -1
  214. package/dist/installer/util/registry.js.map +0 -1
  215. package/dist/installer/util/template.d.ts +0 -23
  216. package/dist/installer/util/template.js +0 -60
  217. package/dist/installer/util/template.js.map +0 -1
  218. package/docs/README.md +0 -40
  219. package/docs/agent-runtime-efficiency.md +0 -65
  220. package/docs/agent-runtime.md +0 -347
  221. package/docs/agents.md +0 -315
  222. package/docs/changelog.md +0 -168
  223. package/docs/ci-cd.md +0 -60
  224. package/docs/concepts.md +0 -183
  225. package/docs/customization.md +0 -363
  226. package/docs/deployment.md +0 -234
  227. package/docs/getting-started.md +0 -122
  228. package/docs/installation.md +0 -395
  229. package/docs/local-tickets.md +0 -191
  230. package/docs/migration-guide.md +0 -140
  231. package/docs/playbook-oss-maintainer.md +0 -112
  232. package/docs/playbook-parallel-dev.md +0 -124
  233. package/docs/playbook-product-discovery.md +0 -115
  234. package/docs/plugin-architecture.md +0 -144
  235. package/docs/research/codex-compatibility-analysis.md +0 -365
  236. package/docs/research/mcp-feasibility-analysis.md +0 -382
  237. package/docs/testing/test-matrix-codex.md +0 -130
  238. package/docs/updating.md +0 -89
  239. package/docs/user-docs/cli-reference.md +0 -428
  240. package/docs/user-docs/codex-vs-claude-code.md +0 -23
  241. package/docs/user-docs/core-updates.md +0 -70
  242. package/docs/user-docs/faq.md +0 -146
  243. package/docs/user-docs/getting-started-codex.md +0 -194
  244. package/docs/user-docs/getting-started-kimi.md +0 -423
  245. package/docs/user-docs/installation.md +0 -237
  246. package/docs/user-docs/provider-pipelines.md +0 -96
  247. package/docs/user-docs/quick-start.md +0 -161
  248. package/docs/windows.md +0 -78
  249. package/docs/workflows.md +0 -463
  250. package/schemas/profile.v1.json +0 -207
  251. package/templates/claude-md/CLAUDE-quickstart.md +0 -54
  252. package/templates/claude-md/root.md +0 -50
  253. package/templates/codex-skills/batch-implement/SKILL.md +0 -38
  254. package/templates/codex-skills/implement/SKILL.md +0 -38
  255. package/templates/codex-skills/retry/SKILL.md +0 -16
  256. package/templates/commands/specrails/compat-check.md +0 -271
  257. package/templates/commands/specrails/doctor.md +0 -62
  258. package/templates/commands/specrails/explore-spec.md +0 -173
  259. package/templates/commands/specrails/health-check.md +0 -527
  260. package/templates/commands/specrails/memory-inspect.md +0 -261
  261. package/templates/commands/specrails/opsx-diff.md +0 -419
  262. package/templates/commands/specrails/propose-spec.md +0 -102
  263. package/templates/commands/specrails/refactor-recommender.md +0 -169
  264. package/templates/commands/specrails/telemetry.md +0 -552
  265. package/templates/commands/specrails/why.md +0 -96
  266. package/templates/gemini-commands/batch-implement.toml +0 -37
  267. package/templates/gemini-commands/implement.toml +0 -37
  268. package/templates/gemini-commands/retry.toml +0 -15
  269. package/templates/profiles/default.json +0 -14
  270. package/templates/profiles/kimi-default.json +0 -15
  271. package/templates/rules/layer.md +0 -8
  272. package/templates/runtime/provider-pipeline.md +0 -113
  273. package/templates/security/security-exemptions.yaml +0 -20
  274. package/templates/settings/confidence-config.json +0 -17
  275. package/templates/settings/settings.json +0 -15
  276. /package/dist/{installer/runtime → pipeline}/pipeline-state.d.ts +0 -0
package/docs/agents.md DELETED
@@ -1,315 +0,0 @@
1
- # Agents
2
-
3
- SpecRails ships with **14 specialized agents**. Each has a clear role, a dedicated AI model, and knows exactly when to stay in its lane.
4
-
5
- ## Why specialized agents?
6
-
7
- A single "do everything" prompt gets mediocre results. By splitting responsibilities, each agent:
8
-
9
- - Has a **focused system prompt** optimized for its task
10
- - Uses the **right model** for the job (Opus for creative work, Sonnet for implementation, Haiku for analysis)
11
- - Maintains **its own memory** across sessions
12
- - Loads only the **relevant conventions** for its scope
13
-
14
- The result: better quality at every stage, with clear accountability.
15
-
16
- ## Agent roster
17
-
18
- ### Product Manager
19
-
20
- | | |
21
- |-|-|
22
- | **Color** | Blue |
23
- | **Model** | Opus (creative reasoning) |
24
- | **Trigger** | `/opsx:explore`, `/specrails:auto-propose-backlog-specs` |
25
- | **Role** | Feature ideation and product strategy |
26
-
27
- The Product Manager is the **starting point** of the pipeline. It researches your competitive landscape (via web search), evaluates ideas against your user personas using the VPC framework, and produces prioritized feature recommendations.
28
-
29
- **Why Opus?** Product thinking requires creative reasoning and nuanced judgment — weighing user needs, market trends, and technical feasibility simultaneously. Opus excels at this kind of open-ended analysis.
30
-
31
- **What it produces:**
32
- - Feature ideas organized by area
33
- - VPC scores per persona (0–5)
34
- - Effort estimates
35
- - Competitive inspiration sources
36
-
37
- ---
38
-
39
- ### Product Analyst
40
-
41
- | | |
42
- |-|-|
43
- | **Color** | Cyan |
44
- | **Model** | Haiku (fast, read-only) |
45
- | **Trigger** | `/specrails:get-backlog-specs` |
46
- | **Role** | Backlog analysis and reporting |
47
-
48
- The Product Analyst is a **read-only** agent. It reads your backlog, specs, and archived changes to produce structured reports. It never writes code or makes decisions — it just gives you the data.
49
-
50
- **Why Haiku?** Analysis tasks need speed, not deep reasoning. Haiku is fast and cheap, perfect for reading and summarizing large amounts of data.
51
-
52
- **What it produces:**
53
- - Prioritized backlog tables grouped by area
54
- - Top 3 recommendations ranked by VPC score / effort ratio
55
- - Spec gap analysis (what's specified vs. what's implemented)
56
-
57
- ---
58
-
59
- ### Architect
60
-
61
- | | |
62
- |-|-|
63
- | **Color** | Green |
64
- | **Model** | Sonnet |
65
- | **Trigger** | `/opsx:ff`, `/opsx:continue`, `/specrails:implement` (Phase 3a) |
66
- | **Role** | System design and task breakdown |
67
-
68
- The Architect translates **what to build** into **how to build it**. It reads the relevant specs, analyzes the codebase, and produces a detailed implementation design with ordered tasks.
69
-
70
- **Why it matters:** Without architecture, developers write code that works locally but breaks the system. The Architect considers cross-cutting concerns, API contracts, data flows, and migration needs before a single line of code is written.
71
-
72
- **What it produces:**
73
- - Change summary and impact analysis
74
- - Implementation design (technical approach per layer)
75
- - Ordered task breakdown with dependencies
76
- - Risks and considerations
77
- - Backwards compatibility impact report (Phase 6 auto-check against API surface)
78
-
79
- The Architect also records decision rationale in `.claude/agent-memory/explanations/` — queryable later with `/specrails:why`.
80
-
81
- ---
82
-
83
- ### Developer
84
-
85
- | | |
86
- |-|-|
87
- | **Color** | Purple |
88
- | **Model** | Sonnet |
89
- | **Trigger** | `/opsx:apply`, `/specrails:implement` (Phase 3b) |
90
- | **Role** | Full-stack implementation |
91
-
92
- The Developer is the **workhorse**. It reads the Architect's design, loads the relevant layer conventions, and writes production-quality code across all layers. It follows a strict process: understand, plan, implement, verify.
93
-
94
- Before starting implementation, the Developer reads any **failure records** from `.claude/agent-memory/failures/` that match the current task — using past mistakes as guardrails. After implementation, it records decision rationale in `.claude/agent-memory/explanations/`.
95
-
96
- **What it produces:**
97
- - Production code across all affected layers
98
- - Follows existing patterns and conventions
99
- - Runs CI-equivalent checks before declaring "done"
100
-
101
- ---
102
-
103
- ### Backend Developer & Frontend Developer
104
-
105
- | | |
106
- |-|-|
107
- | **Colors** | Purple (backend), Blue (frontend) |
108
- | **Model** | Sonnet |
109
- | **Trigger** | `/specrails:implement` with parallel pipeline |
110
- | **Role** | Layer-specific implementation |
111
-
112
- For large full-stack features, SpecRails can split work between **Backend Developer** and **Frontend Developer** running in **parallel git worktrees**. Each has a lighter prompt focused on their stack and runs only the relevant CI checks.
113
-
114
- **Why split?** A backend API and a React component have nothing in common. Splitting them lets each developer focus on their domain, and the work happens concurrently instead of sequentially.
115
-
116
- ---
117
-
118
- ### Test Writer
119
-
120
- | | |
121
- |-|-|
122
- | **Color** | Cyan |
123
- | **Model** | Sonnet |
124
- | **Trigger** | `/specrails:implement` (Phase 3c) |
125
- | **Role** | Automated test generation |
126
-
127
- After the Developer finishes, the Test Writer generates comprehensive tests for the new code. It auto-detects your test framework, reads 3 existing tests to learn your patterns, and targets >80% coverage of new code.
128
-
129
- **Why a separate agent?** Developers writing their own tests tend to test what they built, not what could break. A separate Test Writer approaches the code fresh, testing edge cases and failure modes the developer might miss.
130
-
131
- **What it produces:**
132
- - Test files following your project's conventions
133
- - Coverage targeting >80% of new code
134
- - Never modifies implementation files
135
-
136
- **Supported frameworks:** Jest, Vitest, Mocha, pytest, RSpec, Go test, cargo test, PHPUnit
137
-
138
- ---
139
-
140
- ### Doc Sync
141
-
142
- | | |
143
- |-|-|
144
- | **Color** | Yellow |
145
- | **Model** | Sonnet |
146
- | **Trigger** | `/specrails:implement` (Phase 3d) |
147
- | **Role** | Keep documentation in sync with code |
148
-
149
- Doc Sync detects and updates your project's documentation after implementation:
150
-
151
- - **Changelog** — adds entries in Keep-a-Changelog format
152
- - **README** — updates feature lists, usage sections, API references
153
- - **API docs** — updates docs in `docs/` or `docs/api/`
154
-
155
- **Why automate docs?** Because nobody updates them manually. Docs drift from code within days. By running Doc Sync in the pipeline, documentation stays accurate by default.
156
-
157
- ---
158
-
159
- ### Frontend Reviewer
160
-
161
- | | |
162
- |-|-|
163
- | **Color** | Cyan |
164
- | **Model** | Sonnet |
165
- | **Trigger** | `/specrails:implement` (Phase 4b, parallel) |
166
- | **Role** | Frontend-specific quality audit |
167
-
168
- The Frontend Reviewer runs in parallel with the Backend Reviewer during Phase 4b, specializing in client-side concerns that a generalist reviewer might miss.
169
-
170
- **What it scans for:**
171
- - **Bundle size** — detects imports that bloat the client bundle
172
- - **WCAG accessibility** — missing ARIA labels, keyboard navigation, contrast issues
173
- - **Render performance** — unnecessary re-renders, missing memoization, large lists without virtualization
174
-
175
- ---
176
-
177
- ### Backend Reviewer
178
-
179
- | | |
180
- |-|-|
181
- | **Color** | Cyan |
182
- | **Model** | Sonnet |
183
- | **Trigger** | `/specrails:implement` (Phase 4b, parallel) |
184
- | **Role** | Backend-specific quality audit |
185
-
186
- The Backend Reviewer runs in parallel with the Frontend Reviewer during Phase 4b, specializing in server-side concerns.
187
-
188
- **What it scans for:**
189
- - **N+1 queries** — database calls inside loops without eager loading
190
- - **Connection pools** — missing pool configuration or pool exhaustion risks
191
- - **Pagination** — unbounded list queries that could return millions of rows
192
- - **Missing indexes** — foreign keys and filter columns without index coverage
193
-
194
- ---
195
-
196
- ### Security Reviewer
197
-
198
- | | |
199
- |-|-|
200
- | **Color** | Orange |
201
- | **Model** | Sonnet |
202
- | **Trigger** | `/specrails:implement` (Phase 4) |
203
- | **Role** | Security audit |
204
-
205
- The Security Reviewer scans new code for:
206
-
207
- - **Secrets** — AWS keys, API tokens, database URLs, private keys, hardcoded passwords
208
- - **OWASP vulnerabilities** — SQL injection, XSS, insecure deserialization, command injection, path traversal
209
-
210
- Findings are graded by severity (Critical → High → Medium → Info). Critical findings **block the pipeline**.
211
-
212
- **Important:** This agent scans and reports only — it never fixes code. Fixes are the Developer's responsibility, triggered by the Reviewer if issues are found.
213
-
214
- You can suppress known false positives via `.claude/security-exemptions.yaml`.
215
-
216
- ---
217
-
218
- ### Reviewer
219
-
220
- | | |
221
- |-|-|
222
- | **Color** | Red |
223
- | **Model** | Sonnet |
224
- | **Trigger** | `/specrails:implement` (Phase 4b), after all developers complete |
225
- | **Role** | Final quality gate |
226
-
227
- The Reviewer is the **last agent before ship**. It:
228
-
229
- 1. Runs **every CI check** in the exact order your CI pipeline runs them
230
- 2. **Fixes failures** autonomously (up to 3 retry cycles per issue)
231
- 3. Reviews **code quality**, test quality, and consistency
232
- 4. Produces a **confidence score** (0–100%) across 5 quality aspects
233
- 5. Writes structured **failure records** to `.claude/agent-memory/failures/` for any non-trivial issues found
234
- 6. Records decision rationale in `.claude/agent-memory/explanations/`
235
-
236
- **Why not just run CI?** Because the Reviewer can _fix_ what it finds. A lint error, a missing import, a flaky test setup — the Reviewer patches them and re-runs. By the time it creates the PR, CI will pass.
237
-
238
- **Confidence scoring:** After each review, the Reviewer outputs a score (0–100%) across five aspects: correctness, test coverage, security, performance, and maintainability. Scores below the configured threshold trigger a warning or block the pipeline entirely. See [Confidence thresholds](customization.md#confidence-thresholds) to configure this behavior.
239
-
240
- **What it produces:**
241
- - CI check results table (pass/fail per check)
242
- - List of issues found and fixed
243
- - Files modified during fixes
244
- - Confidence score report (Phase 4b-conf)
245
-
246
- ---
247
-
248
- ### Merge Resolver
249
-
250
- | | |
251
- |-|-|
252
- | **Color** | Yellow |
253
- | **Model** | Sonnet |
254
- | **Trigger** | `/specrails:merge-resolve`, `/specrails:implement` (Phase 4a, after worktree merge) |
255
- | **Role** | AI-powered merge conflict resolution |
256
-
257
- When a multi-feature pipeline merges worktrees and produces conflict markers, the Merge Resolver analyzes each conflict block using the OpenSpec context bundles from both features. It applies resolutions where confidence is high enough and leaves clean markers for the conflicts it cannot safely resolve.
258
-
259
- **Configuration (in `.claude/agents/sr-merge-resolver.md`):**
260
- - `tone`: `terse` (default) or `verbose`
261
- - `risk_tolerance`: `conservative` (default) or `aggressive`
262
- - `confidence_threshold`: 0–100, default `70`
263
-
264
- **What it produces:**
265
- - Resolved conflict blocks written in place
266
- - Structured resolution report (file, block, confidence, resolution or left-as-marker)
267
-
268
- ---
269
-
270
- ### Performance Reviewer
271
-
272
- | | |
273
- |-|-|
274
- | **Color** | Yellow |
275
- | **Model** | Sonnet |
276
- | **Trigger** | `/specrails:implement` (Phase 4, after Security Reviewer) |
277
- | **Role** | Performance regression detection |
278
-
279
- The Performance Reviewer benchmarks modified code paths after implementation, compares metrics against configured thresholds, and outputs a structured report. It never fixes code — findings above the threshold trigger the Developer to address them before the pipeline continues.
280
-
281
- **Configuration:** Create `.specrails/perf-thresholds.yml` to set custom thresholds per metric. The agent falls back to built-in defaults if the file is missing.
282
-
283
- **What it produces:**
284
- - Execution time, memory usage, and throughput metrics for modified paths
285
- - Pass/fail report against configured thresholds
286
- - `PERF_STATUS` result consumed by the pipeline orchestrator
287
-
288
- ---
289
-
290
- ## Agent memory
291
-
292
- Every agent stores observations in `.claude/agent-memory/<agent>/MEMORY.md`. This memory persists across sessions, so agents get smarter over time:
293
-
294
- ```
295
- .claude/agent-memory/
296
- ├── sr-architect/MEMORY.md
297
- ├── sr-developer/MEMORY.md
298
- ├── sr-reviewer/MEMORY.md
299
- ├── failures/ # Structured failure records (written by Reviewer)
300
- ├── explanations/ # Decision rationale (written by Architect, Developer, Reviewer)
301
- └── ...
302
- ```
303
-
304
- Memory is automatic — you don't need to manage it. Agents read relevant memories at the start of each task and write new observations as they work. Use `/specrails:why` to search the explanations directory in plain language.
305
-
306
- ## What's next?
307
-
308
- See how agents work together in the pipeline:
309
-
310
- - [Workflows & Commands](workflows.md) — the commands that orchestrate agent collaboration
311
- - [Customization](customization.md) — tweak agent prompts, add new agents
312
-
313
- ---
314
-
315
- [← Core Concepts](concepts.md) · [Workflows & Commands →](workflows.md)
package/docs/changelog.md DELETED
@@ -1,168 +0,0 @@
1
- # Changelog
2
-
3
- All notable changes to SpecRails are listed here, newest first.
4
-
5
- ---
6
-
7
- ## [Unreleased]
8
-
9
- ### Breaking changes
10
-
11
- - **`/specrails:setup` renamed to `/specrails:enrich`** — The setup wizard is now invoked as `/specrails:enrich`. The `--lite` flag is now `--quick` (both are accepted during the transition period). Update any scripts or documentation that reference `/specrails:setup`.
12
-
13
- ### New features
14
-
15
- - **TUI installer** — `npx specrails-core@latest init` now launches an interactive terminal UI before copying files. Select which agents to install and choose a model preset (balanced/budget/max). Results are saved to `.specrails/install-config.yaml`.
16
- - **`/specrails:enrich --from-config`** — Non-interactive enrichment mode. Reads `.specrails/install-config.yaml` (written by the TUI installer) and runs the full AI analysis without prompts.
17
- - **`/specrails:enrich --quick`** — Quick setup mode: three questions, sensible defaults, done in under a minute.
18
- - **`npx specrails-core enrich`** — New CLI subcommand that runs `/specrails:enrich` via Claude CLI directly from the terminal.
19
- - **`install-config.yaml` schema** — Declarative configuration file for reproducible installations. Supports agent selection, model presets, and per-agent model overrides.
20
- - **`integration-contract.json`** — Hub integration contract describing provider commands, tier configurations, checkpoint names, and model presets for hub integrations.
21
-
22
- ---
23
-
24
- ## [1.7.0](https://github.com/fjpulidop/specrails-core/compare/v1.6.1...v1.7.0) — 2026-03-20
25
-
26
- ### New commands
27
-
28
- - **`/specrails:merge-conflict`** — Smart merge conflict resolver. Analyzes conflict context, understands intent of both sides, and proposes the correct resolution with an explanation.
29
- - **`/specrails:refactor-recommender` (enhanced)** — Now includes VPC context-aware scoring: debt items are ranked against persona Jobs/Pains/Gains for product-aligned prioritization.
30
-
31
- ### Agents
32
-
33
- - **Performance Regression Detector** — New agent with CI workflow integration. Automatically detects performance regressions across runs and annotates PRs with regression reports.
34
-
35
- ### Pipeline Monitor
36
-
37
- - **Zombie job detection and auto-termination** — The web-manager now detects stalled jobs and terminates them automatically to keep the queue healthy.
38
-
39
- ---
40
-
41
- ## [1.6.1](https://github.com/fjpulidop/specrails-core/compare/v1.6.0...v1.6.1) — 2026-03-20
42
-
43
- ### Bug fixes
44
-
45
- - **Docs cleanup** — Removed DeckDex-contaminated documentation files that had been incorrectly included in the package.
46
-
47
- ---
48
-
49
- ## [1.6.0](https://github.com/fjpulidop/specrails-core/compare/v1.5.0...v1.6.0) — 2026-03-20
50
-
51
- ### Improvements
52
-
53
- - **`/specrails:setup --update` template checksums** — The update command now checks command template checksums before overwriting, so manual customizations are detected and preserved rather than silently clobbered.
54
-
55
- ---
56
-
57
- ## [1.5.0](https://github.com/fjpulidop/specrails-core/compare/v1.4.0...v1.5.0) — 2026-03-20
58
-
59
- ### New commands
60
-
61
- - **`/specrails:opsx-diff`** — Change diff visualizer. Shows a structured, human-readable diff of what changed between two points in time across agents, commands, and templates.
62
- - **`/specrails:telemetry`** — Agent telemetry and cost tracking. Reports per-agent token usage, run counts, and cost estimates with trend analysis.
63
-
64
- ### Agents
65
-
66
- - **OSS Maintainer persona Kai** — Formalized the OSS Maintainer persona. Kai helps you think through open-source positioning, community management, and contributor onboarding.
67
-
68
- ---
69
-
70
- ## [1.4.0](https://github.com/fjpulidop/specrails-core/compare/v1.3.0...v1.4.0) — 2026-03-20
71
-
72
- ### New commands
73
-
74
- - **`/specrails:vpc-drift`** — Detects when your VPC personas have drifted from what your product actually delivers. Compares persona Jobs/Pains/Gains against the backlog and agent memory; produces per-persona alignment scores and concrete update recommendations.
75
- - **`/specrails:memory-inspect`** — Inspect and manage agent memory directories. Shows per-agent stats, recent entries, and stale file detection with optional pruning.
76
-
77
- ---
78
-
79
- ## [1.3.0](https://github.com/fjpulidop/specrails-core/compare/v1.2.0...v1.3.0) — 2026-03-20
80
-
81
- ### New commands
82
-
83
- - **`/specrails:retry`** — Smart failure recovery. Resumes a failed `/specrails:implement` pipeline from the last successful phase without restarting from scratch. Reads saved pipeline state to identify what completed, then re-executes only the remaining phases.
84
-
85
- ### Agents
86
-
87
- - **Agent personality customization** — Edit agent prompts after installation to tune tone, priorities, and decision-making for your team's style. See [Customization](customization.md).
88
-
89
- ---
90
-
91
- ## [1.2.0](https://github.com/fjpulidop/specrails-core/compare/v1.1.0...v1.2.0) — 2026-03-20
92
-
93
- ### Improvements
94
-
95
- - **`/specrails:health-check` extended with static code analysis** — Now includes complexity metrics, dead code detection, and architectural pattern analysis in addition to test coverage and dependency health.
96
-
97
- ---
98
-
99
- ## [1.1.0](https://github.com/fjpulidop/specrails-core/compare/v1.0.1...v1.1.0) — 2026-03-20
100
-
101
- ### Agents
102
-
103
- - **Doc Sync agent enhanced** — Added drift detection with severity levels. The agent now classifies documentation drift as `critical`, `major`, or `minor` and prioritizes accordingly.
104
- - **Test Writer wired into `/specrails:setup`** — New installations now include the Test Writer agent by default.
105
- - **Security Reviewer wired into `/specrails:setup`** — New installations now include the Security Reviewer agent by default.
106
-
107
- ### Onboarding
108
-
109
- - **Onboarding v1 (RFC-001)** — Formalized the setup wizard flow and agent installation sequence.
110
-
111
- ---
112
-
113
- ## [1.0.1](https://github.com/fjpulidop/specrails-core/compare/v1.0.0...v1.0.1) — 2026-03-19
114
-
115
- ### Bug fixes
116
-
117
- - Updated README and CLAUDE.md for the `specrails-core` rename.
118
-
119
- ---
120
-
121
- ## [1.0.0](https://github.com/fjpulidop/specrails-core/releases/tag/v1.0.0) — 2026-03-19
122
-
123
- Initial stable release.
124
-
125
- ### ⚠ Breaking changes
126
-
127
- All commands renamed from `/<name>` to `/specrails:<name>`. All agent files renamed from `<name>.md` to `sr-<name>.md`. Existing installations are auto-migrated by `update.sh`.
128
-
129
- ### What shipped in 1.0
130
-
131
- **12 specialized agents**
132
- - Product Manager, Architect, Developer, Backend Developer, Frontend Developer
133
- - Test Writer, Reviewer, Backend Reviewer, Frontend Reviewer
134
- - Security Reviewer, Doc Sync, Product Analyst
135
-
136
- **11 commands**
137
- - `/specrails:implement` — full 8-phase pipeline (architecture → code → tests → docs → review → PR)
138
- - `/specrails:batch-implement` — parallel multi-feature orchestrator using git worktrees
139
- - `/specrails:health-check` — codebase quality dashboard with regression detection
140
- - `/specrails:compat-check` — backwards compatibility analyzer and migration guide generator
141
- - `/specrails:get-backlog-specs` — VPC-scored backlog view with safe implementation ordering
142
- - `/specrails:auto-propose-backlog-specs` — AI-powered product discovery via personas
143
- - `/specrails:refactor-recommender` — tech debt scanner ranked by impact/effort
144
- - `/specrails:why` — semantic search over agent decision records
145
- - `/specrails:retry` — smart failure recovery (added in 1.3)
146
- - `/specrails:vpc-drift` — persona drift detection (added in 1.4)
147
- - `/specrails:propose-spec` — structured feature proposal generator
148
-
149
- **Pipeline Monitor (web-manager)**
150
- - Real-time job queue dashboard
151
- - Live log streaming via WebSocket
152
- - Analytics: daily throughput, status breakdown, job history
153
- - Chat panel for in-context help
154
-
155
- **Update system**
156
- - Content-aware selective updates — only changed files are overwritten
157
- - Customizations (agent prompts, personas, layer rules) are preserved across updates
158
- - `update.sh` auto-migrates command namespace changes
159
-
160
- **Distribution**
161
- - `npx specrails-core@latest init`
162
- - `curl | bash` installer
163
- - `--root-dir` flag for monorepo support
164
- - `--yes` flag for non-interactive CI installs
165
-
166
- ---
167
-
168
- [← Updating](updating.md)
package/docs/ci-cd.md DELETED
@@ -1,60 +0,0 @@
1
- # Core CI and publishing
2
-
3
- Core's release workflow publishes the **same npm tarball that passed CI**. It does not rebuild a replacement package inside the publish step. These workflows do not run provider models or publish from pull requests.
4
-
5
- ## Quality gates
6
-
7
- `CI` runs for pushes to `main`, pull requests to `main`, and manual dispatches. Feature branches are checked through their PR, avoiding two complete matrix runs for every update. The post-merge main push still runs the entire release gate. It has read-only repository permissions, cancels superseded runs on the same branch/PR, and has bounded job timeouts.
8
-
9
- - Typecheck/build on the exact supported Node minimum, **20.19.0**.
10
- - Full Vitest and release-guard tests on **Linux, macOS and Windows**, with **Node 20.19.0, 22 and 24**.
11
- - Windows distributes the two slow runtime integration suites across three jobs by collected test locations; a fourth job runs every other test file. Parameterized cases stay together. The partition runner checks its selected inventory against Vitest before running, failing if any assigned test is missing or extra. Linux/macOS and coverage run the complete suite without partitioning.
12
- - Coverage on Node 24 with the existing configured thresholds (not lowered).
13
- - A checksum-verified actionlint binary validates workflow syntax, expressions and action inputs (shellcheck is not included).
14
- - A checksum-verified Gitleaks binary scans Git history with redacted output.
15
- - On Node 24 on each OS, `scripts/verify-package.mjs` packs the built package, checks its file inventory, installs the tarball into an isolated temporary consumer with lifecycle scripts disabled, and executes both published CLI entry points. It materializes/assembles all four providers and runs the assembled pipeline helper against four frozen fixture scopes. No global install, real project registry, provider login or model call is used.
16
-
17
- The Linux package smoke uploads `core-package` for 14 days, containing the `.tgz` and `release-manifest.json` (package/version, Git SHA and SHA-512 integrity). The manifest is only written after the consumer smoke succeeds.
18
-
19
- Local checks, after installing dependencies:
20
-
21
- ```sh
22
- npm run ci # typecheck, guard regressions, coverage, packaged-consumer smoke
23
- npm run test:scripts # hermetic release and CI partition regressions
24
- npm run check:package # build and consumer smoke; prints its temporary artifact directory
25
- # To choose where the verified tarball is kept:
26
- node scripts/verify-package.mjs /absolute/path/to/temporary-package-output
27
- ```
28
-
29
- To reproduce a Windows test partition locally, run `node scripts/ci-tests.mjs runtime-1` (or `runtime-2`, `runtime-3`, `general`). Add `--list-only` to a runtime partition to verify its inventory without executing tests.
30
-
31
- The package check reuses the npm dependency cache (including the cache populated by `npm ci` and setup-node) with `--prefer-offline`; it may download missing production dependencies from npm. The temporary consumer, user configuration and credential isolation remain in place. Its generated output directory should be outside the checkout. Release-guard unit tests are hermetic and do not access npm or GitHub.
32
-
33
- ## Automatic release
34
-
35
- 1. A push to `main` starts `Release`. It waits for a successful `CI` **push run on the exact same main commit**, including the entire matrix, coverage, secret scan and package check. A success on an older commit or a PR does not qualify. Failed/cancelled CI fails the gate; waiting is bounded to 30 minutes.
36
- 2. An additional current-main check skips obsolete pushes before changing release metadata. Release Please opens/updates the release PR, or creates the release/tag after that PR was merged. It has only the repository/PR write permissions it needs. The CI jobs do not receive those permissions.
37
- 3. Before publishing, the workflow verifies that the stable `vX.Y.Z` tag points at the tested commit, that this commit is in `origin/main`, and that the tag, package.json, both root lockfile version fields and Release Please manifest agree. If main advanced while Release Please was working and it tagged a different SHA, publication fails closed.
38
- 4. It downloads the tarball from that successful CI run and verifies its identity and integrity. It refuses to move npm `latest` backwards. An existing version is accepted only when its published integrity matches the verified artifact exactly.
39
- 5. It publishes the `.tgz` with `--ignore-scripts --provenance --access public`, then sends downstream notifications. Only the publication job has `id-token: write`; the npm token is exposed only to the final publish step.
40
-
41
- All automatic and manual releases share one non-cancelling concurrency group, so simultaneous runs cannot race the stable dist-tag.
42
-
43
- ## Credentials and notifications
44
-
45
- - `RELEASE_PAT` (recommended): a repository-scoped token with permission to maintain release branches, PRs and releases (Contents and Pull requests write). Release Please prefers this secret, allowing its generated PR events to start the normal required CI. A GitHub App installation token with equivalent permissions is also suitable if the workflow is configured to mint one; this workflow does not create an App or credentials.
46
- - `GITHUB_TOKEN` fallback: retained so existing installations can maintain release metadata without a new secret. GitHub currently creates runs for token-generated PR `opened`, `synchronize` and `reopened` events **in an approval-required state**. The workflow warns when using this fallback: a maintainer with write access must select **Approve workflows to run** on the release PR after bot updates. Configure `RELEASE_PAT` for automatic CI without that approval prompt; do not bypass required checks or branch protection. Other token-generated events, including tag pushes, remain suppressed. Repository settings must permit Actions to create PRs. Publication is in this same workflow and does not depend on a new tag-triggered run. See [GitHub's current event-triggering rules](https://docs.github.com/en/actions/how-tos/write-workflows/choose-when-workflows-run/trigger-a-workflow#triggering-a-workflow-from-a-workflow). [Release Please also recommends a separate CI-capable credential](https://github.com/googleapis/release-please-action#other-actions-on-release-please-prs).
47
- - `NPM_TOKEN`: existing token authentication remains supported; use a narrowly scoped token that can publish `specrails-core`. Do not remove it until npm trusted publishing has been configured for this repository and **`release.yml`**. Publishing runs on Node 24 and enforces npm >=11.5.1. The workflow requests OIDC and provenance but does not change npm account settings. See [npm trusted publishing](https://docs.npmjs.com/trusted-publishers/).
48
- - `CROSS_REPO_TOKEN`: must permit repository dispatch to `fjpulidop/specrails-desktop` and `fjpulidop/specrails-web`. It is available only to the notification job.
49
-
50
- Both consumers receive `repository_dispatch` event `specrails-core-released`. Desktop receives `{"core_version":"X.Y.Z"}` and validates the exact released integration contract; the website retains its historical `{"core_version":"vX.Y.Z"}` convention. Notification failure leaves a visible failed workflow, even when npm publication already succeeded.
51
-
52
- ## Recover a failed publication or notification
53
-
54
- Use **Actions → Release → Run workflow**, from the trusted main workflow, and provide an **existing** stable tag (`vX.Y.Z`). This path does not create a tag or bump versions. It checks main ancestry/version agreement, runs typecheck, release-guard tests and the full suite with coverage, then rebuilds, packs and consumer-tests that exact tag on Linux/Node 24 in a read-only preparation job. A separate publication job downloads those verified bytes; dependency installs and tests never have OIDC or npm credentials.
55
-
56
- Manual recovery deliberately works without an old CI artifact. It does not rerun the full historical OS/Node matrix; normal automatic releases require that matrix. Tags predating these validation scripts cannot use this recovery path. If an identical version is already on npm, publication is skipped and both notifications are retried. Different bytes at that version, an older version than `latest`, missing tags or incompatible versions stop the run. npm versions are immutable; do not force around a mismatch.
57
-
58
- For a failed initial CI gate, first repair/rerun CI for that commit, then rerun Release. Expired artifacts or a tag created at another main SHA can be recovered with the existing-tag manual path. If downstream notification failed, rerunning only its job is also sufficient and does not touch npm.
59
-
60
- The workflows and hermetic fixtures validate the release machinery locally; successful native Windows/macOS CI, token permissions, OIDC configuration and a real publication can only be confirmed by their respective hosted runs.