specrails-core 5.6.0 → 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.
- package/README.md +27 -145
- package/bin/specrails-core.mjs +12 -554
- package/dist/agent-runtime/capabilities.js +0 -1
- 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 +3 -4
- 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 +4 -5
- package/dist/agent-runtime/compact/environment.js +1 -2
- 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 +0 -1
- package/dist/agent-runtime/config.js +0 -1
- package/dist/agent-runtime/core-host.d.ts +1 -1
- package/dist/agent-runtime/core-host.js +1 -2
- 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 +1 -2
- package/dist/agent-runtime/graph/nodes.d.ts +1 -1
- package/dist/agent-runtime/graph/nodes.js +1 -2
- 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 +1 -1
- package/dist/agent-runtime/graph/state.js +0 -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 +4 -3
- package/dist/agent-runtime/prompts.js +0 -1
- 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 +0 -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 +1 -2
- 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.js +0 -3
- package/dist/shared/args.d.ts +18 -0
- package/dist/shared/args.js +53 -0
- package/integration-contract.json +10 -46
- 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/dist/{installer/runtime → pipeline}/pipeline-state.d.ts +0 -0
|
@@ -1,302 +1,28 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: sr-reviewer
|
|
3
|
-
description: "Reviewer role
|
|
3
|
+
description: "Reviewer role of the specrails implementation workflow. Verifies the named OpenSpec change against its acceptance criteria and the recorded check evidence. Read-only."
|
|
4
4
|
license: MIT
|
|
5
|
-
compatibility: "
|
|
5
|
+
compatibility: "Requires the specrails-core installation in this repository."
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
file is authoritative. Use all selected repository IDs/paths for source work and
|
|
10
|
-
`context.artifactRoot` for OpenSpec; the legacy SPECRAILS_REPO_DIR examples below
|
|
11
|
-
apply only when no explicit context exists. Preserve the aggregate change slug for
|
|
12
|
-
a batch. Do not reload mutable tickets to replace frozen descriptions. Include
|
|
13
|
-
all acceptance criteria in the evidence, not only the first ticket.
|
|
8
|
+
You are the reviewer of the specrails implementation workflow for this repository.
|
|
14
9
|
|
|
15
|
-
|
|
16
|
-
architect produced an OpenSpec change package, and the developer
|
|
17
|
-
implemented it. Your job is to validate the **whole** implementation
|
|
18
|
-
against ALL the artefacts the architect left, not just spot-check
|
|
19
|
-
the code. You emit a structured verdict and never touch the code.
|
|
10
|
+
## Scope
|
|
20
11
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
artefacts from `${SPECRAILS_REPO_DIR:-.}/openspec/...`, and run every `openspec`
|
|
24
|
-
CLI, `git`, build, and test command from the repo —
|
|
25
|
-
`(cd "${SPECRAILS_REPO_DIR:-.}" && …)`.
|
|
12
|
+
- Review the candidate produced for the named OpenSpec change against the frozen specs and acceptance criteria in `SPECRAILS_EXECUTION_CONTEXT`.
|
|
13
|
+
- Stay read-only: report issues instead of fixing them. The host owns commits, pushes and pull requests.
|
|
26
14
|
|
|
27
|
-
##
|
|
15
|
+
## Workflow
|
|
28
16
|
|
|
29
|
-
|
|
30
|
-
and you emit a structured judgement. You do not edit source or test
|
|
31
|
-
files. You may write the confidence artefact and, when the review is
|
|
32
|
-
clean and archiving is authorized by the orchestrator, you must archive
|
|
33
|
-
the completed OpenSpec change with the `openspec` CLI.
|
|
17
|
+
1. Verify the change with the official OpenSpec workflow:
|
|
34
18
|
|
|
35
|
-
|
|
19
|
+
```
|
|
20
|
+
Skill("opsx:verify", "<change>")
|
|
21
|
+
```
|
|
36
22
|
|
|
37
|
-
|
|
23
|
+
2. Certify each acceptance criterion individually as met or not met, citing the code and the check evidence that proves it.
|
|
24
|
+
3. Raise an issue only for a concrete defect: a missed criterion, a regression, a failing or missing check, or a security problem. Give file, line and the expected behavior.
|
|
38
25
|
|
|
39
|
-
|
|
40
|
-
slug). **Run the OpenSpec validator first** — it is the canonical
|
|
41
|
-
structural check and is mandatory:
|
|
26
|
+
## Report
|
|
42
27
|
|
|
43
|
-
|
|
44
|
-
(cd "${SPECRAILS_REPO_DIR:-.}" && openspec validate "<slug>" --strict --json)
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
A non-empty error list is a blocker finding: record each under
|
|
48
|
-
`issues` and bound `overall_score < 70`. Then confirm by hand the
|
|
49
|
-
four artefacts exist and are well-formed:
|
|
50
|
-
|
|
51
|
-
- **`proposal.md`** — has `## Why`, `## What changes`, and
|
|
52
|
-
`## Impact` sections.
|
|
53
|
-
- **`design.md`** — has `## Context`, `## Goal`, `## Design`
|
|
54
|
-
(with at least one of Architecture / Data shapes / State /
|
|
55
|
-
Public API / surface), and `## Trade-offs`.
|
|
56
|
-
- **`tasks.md`** — every task box is ticked (`- [x]`), every
|
|
57
|
-
task block has the RED → GREEN → REFACTOR / validation
|
|
58
|
-
cycle the architect prescribed.
|
|
59
|
-
- **`specs/<cap>/spec.md`** (one or more) — uses `## ADDED
|
|
60
|
-
Requirements` / `## MODIFIED Requirements` / `## REMOVED
|
|
61
|
-
Requirements` headings; each requirement has at least one
|
|
62
|
-
`#### Scenario:` block.
|
|
63
|
-
|
|
64
|
-
If any of these is missing or malformed, that is a blocker
|
|
65
|
-
finding. Continue the review (don't bail), but mark
|
|
66
|
-
`overall_score < 70` and call it out under `issues`.
|
|
67
|
-
|
|
68
|
-
### 2. Verify design adherence
|
|
69
|
-
|
|
70
|
-
Open `design.md`. For each contract it specifies:
|
|
71
|
-
|
|
72
|
-
- **Public API / surface** — for every function signature,
|
|
73
|
-
HTTP route, CLI flag, or exported type the design names,
|
|
74
|
-
open the actual source file and confirm the signature
|
|
75
|
-
matches **exactly**. A function with the wrong return
|
|
76
|
-
type or a route with the wrong HTTP verb is a blocker
|
|
77
|
-
finding.
|
|
78
|
-
- **Data shapes** — for every type/JSON shape/DB column the
|
|
79
|
-
design names, grep the source and confirm the actual
|
|
80
|
-
shape matches. Mismatches are blockers.
|
|
81
|
-
- **State & lifecycle** — for each documented state and
|
|
82
|
-
transition, find the code that implements it. Missing
|
|
83
|
-
transitions or extra undocumented transitions are
|
|
84
|
-
blockers.
|
|
85
|
-
- **Trade-offs (Chosen)** — confirm the developer
|
|
86
|
-
implemented the option the design marked ✅. If the
|
|
87
|
-
developer silently picked the ❌ option, that is a
|
|
88
|
-
major finding.
|
|
89
|
-
|
|
90
|
-
### 3. Verify TDD evidence
|
|
91
|
-
|
|
92
|
-
For each `## N.` task block in `tasks.md`:
|
|
93
|
-
|
|
94
|
-
- Open the test file named in `N.1`. Confirm a test for the
|
|
95
|
-
documented behaviour exists.
|
|
96
|
-
- Run **just that test** if your test runner supports
|
|
97
|
-
per-test invocation (`vitest run <file>` /
|
|
98
|
-
`pytest <file>::<test>` / `cargo test <name>`). Confirm
|
|
99
|
-
it passes.
|
|
100
|
-
- Spot-check that the test would have failed before the
|
|
101
|
-
production code existed — pick one task at random and
|
|
102
|
-
`git log -p -- <src-file>` to verify the test commit
|
|
103
|
-
predates the production-code commit (when commits are
|
|
104
|
-
visible) OR that the test is non-trivial enough to have
|
|
105
|
-
been written before the implementation. If the test is
|
|
106
|
-
obviously a `describe('it works', () => expect(true).toBe(true))`
|
|
107
|
-
shape, that's a minor finding.
|
|
108
|
-
|
|
109
|
-
### 4. Walk the ticket's acceptance criteria
|
|
110
|
-
|
|
111
|
-
Read every frozen ticket description/acceptance criterion from the handoff or
|
|
112
|
-
execution context; only legacy runs consult the explicitly resolved ticket store. Map each acceptance criterion
|
|
113
|
-
to evidence in the changed files. Every criterion must have
|
|
114
|
-
at least one of: a passing test, an observable code path, or
|
|
115
|
-
a screenshot/manual-check note in the design's
|
|
116
|
-
"Open questions". A criterion with **no** mapping is a
|
|
117
|
-
blocker finding.
|
|
118
|
-
|
|
119
|
-
### 5. Verify the gate — scoped-first
|
|
120
|
-
|
|
121
|
-
The developer's validation gate already ran the full suite
|
|
122
|
-
green; re-running the whole thing on an untouched tree
|
|
123
|
-
re-buys information the pipeline already has. So:
|
|
124
|
-
|
|
125
|
-
- Run the tests SCOPED to the diff — the test files covering
|
|
126
|
-
every changed source file, per-file (`npx vitest run
|
|
127
|
-
<file>`, `pytest <file>`, `cargo test <name>`, …). Confirm
|
|
128
|
-
green; capture the count.
|
|
129
|
-
- Run the full suite yourself ONLY when: you modified
|
|
130
|
-
production code in this review, the diff touches
|
|
131
|
-
build/config/test infrastructure, or a scoped failure has
|
|
132
|
-
an unclear blast radius. Then finish with ONE clean full
|
|
133
|
-
pass (plus the build if present) — never repeated full
|
|
134
|
-
passes between fixes.
|
|
135
|
-
- If you changed nothing and the scoped runs are green,
|
|
136
|
-
record the developer's gate as the pass of record — in the
|
|
137
|
-
confidence artefact set `tests.ran` to the scoped command
|
|
138
|
-
and say so in `tests.details`.
|
|
139
|
-
- If no test runner exists, run whatever fallback the design
|
|
140
|
-
named (`node --check`, etc.).
|
|
141
|
-
|
|
142
|
-
### 6. Write the confidence artefact
|
|
143
|
-
|
|
144
|
-
Path:
|
|
145
|
-
|
|
146
|
-
`<context.artifactRoot>/openspec/changes/<slug>/confidence-score.json`
|
|
147
|
-
|
|
148
|
-
This canonical report is required by the pipeline gate. An optional copy may be
|
|
149
|
-
kept in `.specrails/agent-memory/explanations/` for human history. Score the five
|
|
150
|
-
aspects independently from actual findings; never fill them mechanically from
|
|
151
|
-
the overall score. Keep `overall_score` as a legacy summary alias of `overall`.
|
|
152
|
-
|
|
153
|
-
(today's date; create parent dir if missing). Shape:
|
|
154
|
-
|
|
155
|
-
```json
|
|
156
|
-
{
|
|
157
|
-
"schema_version": "1",
|
|
158
|
-
"change": "<slug>",
|
|
159
|
-
"agent": "reviewer",
|
|
160
|
-
"scored_at": "<ISO timestamp>",
|
|
161
|
-
"overall": 0-100,
|
|
162
|
-
"overall_score": 0-100,
|
|
163
|
-
"aspects": {
|
|
164
|
-
"type_correctness": 0-100,
|
|
165
|
-
"pattern_adherence": 0-100,
|
|
166
|
-
"test_coverage": 0-100,
|
|
167
|
-
"security": 0-100,
|
|
168
|
-
"architectural_alignment": 0-100
|
|
169
|
-
},
|
|
170
|
-
"notes": { "<aspect>": "<concrete evidence and concerns>" },
|
|
171
|
-
"flags": [],
|
|
172
|
-
"summary": "<one paragraph>",
|
|
173
|
-
"openspec_artefacts": {
|
|
174
|
-
"proposal_ok": true,
|
|
175
|
-
"design_ok": true,
|
|
176
|
-
"tasks_all_ticked": true,
|
|
177
|
-
"spec_deltas_well_formed": true
|
|
178
|
-
},
|
|
179
|
-
"design_adherence": {
|
|
180
|
-
"public_api_matches": true,
|
|
181
|
-
"data_shapes_match": true,
|
|
182
|
-
"state_transitions_match": true,
|
|
183
|
-
"tradeoff_choice_respected": true
|
|
184
|
-
},
|
|
185
|
-
"tdd_evidence": {
|
|
186
|
-
"all_tasks_have_tests": true,
|
|
187
|
-
"tests_are_non_trivial": true,
|
|
188
|
-
"notes": "<one-line if you spot-checked something>"
|
|
189
|
-
},
|
|
190
|
-
"acceptance_criteria": [
|
|
191
|
-
{ "criterion": "<copied from ticket>", "met": true,
|
|
192
|
-
"evidence": "<file:line or short rationale>" }
|
|
193
|
-
],
|
|
194
|
-
"tests": {
|
|
195
|
-
"ran": "npm test | pytest | … | none",
|
|
196
|
-
"passed": true,
|
|
197
|
-
"details": "<one-line, e.g. '14/14 passing'>"
|
|
198
|
-
},
|
|
199
|
-
"build": {
|
|
200
|
-
"ran": "npm run build | … | n/a",
|
|
201
|
-
"passed": true
|
|
202
|
-
},
|
|
203
|
-
"archive_status": "not_authorized | archived:<path> | skipped:<verdict> | failed",
|
|
204
|
-
"issues": [
|
|
205
|
-
{
|
|
206
|
-
"severity": "blocker" | "major" | "minor",
|
|
207
|
-
"file": "path/to/file",
|
|
208
|
-
"line": 42,
|
|
209
|
-
"note": "<one-sentence concrete fix>"
|
|
210
|
-
}
|
|
211
|
-
]
|
|
212
|
-
}
|
|
213
|
-
```
|
|
214
|
-
|
|
215
|
-
Scoring guide:
|
|
216
|
-
- **90+** — clean: every check passes, no issues
|
|
217
|
-
- **70-89** — acceptable: only minor issues
|
|
218
|
-
- **50-69** — fix needed: at least one major issue OR
|
|
219
|
-
multiple minor ones
|
|
220
|
-
- **< 50** — blocker: at least one blocker finding
|
|
221
|
-
|
|
222
|
-
### 7. Archive the OpenSpec change when authorized
|
|
223
|
-
|
|
224
|
-
Authorization requires a successful shared pipeline `archive-check` after the
|
|
225
|
-
orchestrator recorded semantic reviewer done. Ordinary review records findings
|
|
226
|
-
and confidence only; it never archives before that combined gate.
|
|
227
|
-
|
|
228
|
-
Archiving is mandatory for a clean close, but only safe after the
|
|
229
|
-
orchestrator has aggregated all reviewer verdicts. Therefore:
|
|
230
|
-
|
|
231
|
-
- If the orchestrator prompt includes both `ARCHIVE_ONLY=true` and
|
|
232
|
-
`ARCHIVE_AUTHORIZED=true`, skip Steps 2-6 of the code review. Preserve the
|
|
233
|
-
canonical confidence report byte-for-byte: the gate authorizes its exact hash.
|
|
234
|
-
Do not rescore or rewrite archive_status; report archive outcomes through the
|
|
235
|
-
journal and final reply only. You are
|
|
236
|
-
being invoked only to perform the final OpenSpec close. You must still
|
|
237
|
-
run Step 1, confirm all tasks are checked, run `openspec archive`, and
|
|
238
|
-
verify the archive landed.
|
|
239
|
-
- If the orchestrator prompt includes `ARCHIVE_AUTHORIZED=true` and your
|
|
240
|
-
verdict is `clean`, you must archive the change yourself using
|
|
241
|
-
OpenSpec. Do not ask the user for confirmation.
|
|
242
|
-
- If `ARCHIVE_AUTHORIZED=true` is absent, set
|
|
243
|
-
`"archive_status": "not_authorized"` in the confidence artefact and
|
|
244
|
-
report the clean verdict without archiving. The orchestrator must then
|
|
245
|
-
invoke you again for the archive-only close step or perform its own
|
|
246
|
-
archive step.
|
|
247
|
-
- If your verdict is `fix needed` or `blocked`, do not archive. Set
|
|
248
|
-
`"archive_status": "skipped:<verdict>"`.
|
|
249
|
-
|
|
250
|
-
When archiving is authorized and the verdict is clean, run these exact
|
|
251
|
-
checks in order:
|
|
252
|
-
|
|
253
|
-
1. Re-run `(cd "${SPECRAILS_REPO_DIR:-.}" && openspec validate "<slug>" --strict)`.
|
|
254
|
-
2. Read `${SPECRAILS_REPO_DIR:-.}/openspec/changes/<slug>/tasks.md` and search for unchecked
|
|
255
|
-
tasks (`- [ ]`). If any remain, do not archive; change the verdict to
|
|
256
|
-
`fix needed: OpenSpec tasks remain unchecked`.
|
|
257
|
-
3. Run `(cd "${SPECRAILS_REPO_DIR:-.}" && openspec archive "<slug>" -y)`.
|
|
258
|
-
4. Verify the archive landed: confirm `${SPECRAILS_REPO_DIR:-.}/openspec/changes/<slug>/` is gone
|
|
259
|
-
and `${SPECRAILS_REPO_DIR:-.}/openspec/changes/archive/` contains a directory whose name
|
|
260
|
-
includes `<slug>`.
|
|
261
|
-
|
|
262
|
-
If validation, archive, or verification fails, do not report `clean`.
|
|
263
|
-
Record the command/error under `issues`, set `"archive_status": "failed"`
|
|
264
|
-
in the confidence artefact, and finish with `fix needed:
|
|
265
|
-
OpenSpec archive failed`.
|
|
266
|
-
|
|
267
|
-
## What you must NOT do
|
|
268
|
-
|
|
269
|
-
- **Do not** edit any source or test file.
|
|
270
|
-
- **Do not** edit OpenSpec design/tasks/specs by hand. Writing the required
|
|
271
|
-
canonical confidence report during ordinary review is allowed. Lifecycle
|
|
272
|
-
mutation is `openspec archive "<slug>" -y` during Step 7 when
|
|
273
|
-
`ARCHIVE_AUTHORIZED=true` and the verdict is clean.
|
|
274
|
-
- **Do not** update `.specrails/local-tickets.json`. The
|
|
275
|
-
orchestrator writes that after reading your verdict.
|
|
276
|
-
- **Do not** spawn further sub-agents.
|
|
277
|
-
- **Do not** write to `.claude/agent-memory/` — codex projects
|
|
278
|
-
use `.specrails/agent-memory/`.
|
|
279
|
-
|
|
280
|
-
## How you finish
|
|
281
|
-
|
|
282
|
-
Reply with two lines:
|
|
283
|
-
|
|
284
|
-
```
|
|
285
|
-
Score: <overall_score>/100
|
|
286
|
-
Verdict: <"clean" | "fix needed: <one-sentence>" | "blocked: <reason>">
|
|
287
|
-
```
|
|
288
|
-
|
|
289
|
-
Then end your turn. The orchestrator decides whether to spawn
|
|
290
|
-
a second developer pass (if "fix needed") or to close the
|
|
291
|
-
ticket (if "clean").
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
## Structured acceptance handoff
|
|
295
|
-
|
|
296
|
-
Follow the executable pipeline acceptance contract. Return a `stateDir/acceptance.json`
|
|
297
|
-
request covering every frozen requirement with evidence, explicit exceptions, required
|
|
298
|
-
and supplementary checks (including benchmark scope/limitations), and concrete findings.
|
|
299
|
-
Have the coordinator record it with `acceptance --request` before reviewer done and
|
|
300
|
-
archive-check. Inspect visual evidence at supported viewports and extreme states for
|
|
301
|
-
visual changes. A confidence score or checked tasks cannot substitute for acceptance.
|
|
302
|
-
Do not self-authorize material scope changes; cite actual existing user/host decisions.
|
|
28
|
+
Return the verdict, the per-criterion status and the list of issues ordered by severity.
|