specrails-core 5.3.0 → 5.4.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/dist/agent-runtime/capabilities.d.ts +27 -0
- package/dist/agent-runtime/capabilities.js +73 -0
- package/dist/agent-runtime/capabilities.js.map +1 -0
- package/dist/agent-runtime/cli-executor.d.ts +9 -0
- package/dist/agent-runtime/cli-executor.js +100 -30
- package/dist/agent-runtime/cli-executor.js.map +1 -1
- package/dist/agent-runtime/cli.d.ts +1 -0
- package/dist/agent-runtime/cli.js +59 -11
- package/dist/agent-runtime/cli.js.map +1 -1
- package/dist/agent-runtime/codex-schema.d.ts +4 -0
- package/dist/agent-runtime/codex-schema.js +31 -0
- package/dist/agent-runtime/codex-schema.js.map +1 -0
- package/dist/agent-runtime/config.d.ts +4 -0
- package/dist/agent-runtime/config.js +110 -9
- package/dist/agent-runtime/config.js.map +1 -1
- package/dist/agent-runtime/core-host.d.ts +9 -1
- package/dist/agent-runtime/core-host.js +55 -20
- package/dist/agent-runtime/core-host.js.map +1 -1
- package/dist/agent-runtime/efficiency-summary.d.ts +67 -0
- package/dist/agent-runtime/efficiency-summary.js +52 -0
- package/dist/agent-runtime/efficiency-summary.js.map +1 -0
- package/dist/agent-runtime/efficiency-types.d.ts +60 -0
- package/dist/agent-runtime/efficiency-types.js +8 -0
- package/dist/agent-runtime/efficiency-types.js.map +1 -0
- package/dist/agent-runtime/efficiency.d.ts +5 -0
- package/dist/agent-runtime/efficiency.js +35 -0
- package/dist/agent-runtime/efficiency.js.map +1 -0
- package/dist/agent-runtime/evaluation-corpus.d.ts +13 -0
- package/dist/agent-runtime/evaluation-corpus.js +8 -0
- package/dist/agent-runtime/evaluation-corpus.js.map +1 -0
- package/dist/agent-runtime/evaluation.d.ts +43 -0
- package/dist/agent-runtime/evaluation.js +171 -0
- package/dist/agent-runtime/evaluation.js.map +1 -0
- package/dist/agent-runtime/executor-types.d.ts +35 -2
- package/dist/agent-runtime/executor-types.js.map +1 -1
- package/dist/agent-runtime/executors.d.ts +1 -0
- package/dist/agent-runtime/executors.js +4 -0
- package/dist/agent-runtime/executors.js.map +1 -1
- package/dist/agent-runtime/graph/artifacts.d.ts +8 -22
- package/dist/agent-runtime/graph/artifacts.js +99 -73
- package/dist/agent-runtime/graph/artifacts.js.map +1 -1
- package/dist/agent-runtime/graph/nodes.d.ts +3 -0
- package/dist/agent-runtime/graph/nodes.js +73 -26
- package/dist/agent-runtime/graph/nodes.js.map +1 -1
- package/dist/agent-runtime/graph/roles.d.ts +4 -1
- package/dist/agent-runtime/graph/roles.js +100 -36
- package/dist/agent-runtime/graph/roles.js.map +1 -1
- package/dist/agent-runtime/graph/state.d.ts +8 -0
- package/dist/agent-runtime/graph/state.js.map +1 -1
- package/dist/agent-runtime/index.d.ts +7 -1
- package/dist/agent-runtime/index.js +7 -1
- package/dist/agent-runtime/index.js.map +1 -1
- package/dist/agent-runtime/kimi-acp.d.ts +4 -0
- package/dist/agent-runtime/kimi-acp.js +20 -9
- package/dist/agent-runtime/kimi-acp.js.map +1 -1
- package/dist/agent-runtime/openai-executor.d.ts +8 -0
- package/dist/agent-runtime/openai-executor.js +28 -10
- package/dist/agent-runtime/openai-executor.js.map +1 -1
- package/dist/agent-runtime/openspec-tool-server.d.ts +1 -0
- package/dist/agent-runtime/openspec-tool-server.js +37 -0
- package/dist/agent-runtime/openspec-tool-server.js.map +1 -0
- package/dist/agent-runtime/openspec.d.ts +123 -0
- package/dist/agent-runtime/openspec.js +263 -0
- package/dist/agent-runtime/openspec.js.map +1 -0
- package/dist/agent-runtime/prompts.d.ts +5 -1
- package/dist/agent-runtime/prompts.js +59 -40
- package/dist/agent-runtime/prompts.js.map +1 -1
- package/dist/agent-runtime/provider-diagnostic.d.ts +2 -0
- package/dist/agent-runtime/provider-diagnostic.js +25 -0
- package/dist/agent-runtime/provider-diagnostic.js.map +1 -0
- package/dist/agent-runtime/repository-context.d.ts +25 -0
- package/dist/agent-runtime/repository-context.js +100 -0
- package/dist/agent-runtime/repository-context.js.map +1 -0
- package/dist/agent-runtime/review-context.d.ts +14 -0
- package/dist/agent-runtime/review-context.js +41 -0
- package/dist/agent-runtime/review-context.js.map +1 -0
- package/dist/agent-runtime/role-routing.d.ts +10 -0
- package/dist/agent-runtime/role-routing.js +29 -0
- package/dist/agent-runtime/role-routing.js.map +1 -0
- package/dist/agent-runtime/role-state.d.ts +19 -0
- package/dist/agent-runtime/role-state.js +24 -0
- package/dist/agent-runtime/role-state.js.map +1 -0
- package/dist/agent-runtime/runtime-identity.d.ts +11 -0
- package/dist/agent-runtime/runtime-identity.js +33 -0
- package/dist/agent-runtime/runtime-identity.js.map +1 -0
- package/dist/agent-runtime/tool-event.d.ts +3 -0
- package/dist/agent-runtime/tool-event.js +24 -0
- package/dist/agent-runtime/tool-event.js.map +1 -0
- package/dist/agent-runtime/verification-plan.d.ts +55 -0
- package/dist/agent-runtime/verification-plan.js +206 -0
- package/dist/agent-runtime/verification-plan.js.map +1 -0
- package/dist/agent-runtime/workflow-types.d.ts +17 -1
- package/dist/agent-runtime/workflow.js +28 -1
- package/dist/agent-runtime/workflow.js.map +1 -1
- package/dist/agent-runtime/workspace-tools.d.ts +4 -0
- package/dist/agent-runtime/workspace-tools.js +182 -20
- package/dist/agent-runtime/workspace-tools.js.map +1 -1
- package/dist/installer/phases/scaffold.js +39 -109
- package/dist/installer/phases/scaffold.js.map +1 -1
- package/dist/installer/runtime/pipeline-state.d.ts +142 -1
- package/dist/installer/runtime/pipeline-state.js +477 -28
- package/dist/installer/runtime/pipeline-state.js.map +1 -1
- package/docs/agent-runtime-efficiency.md +65 -0
- package/docs/agent-runtime.md +86 -15
- package/integration-contract.json +2 -1
- package/package.json +5 -2
- package/schemas/agent-runtime.schema.json +25 -3
- package/schemas/fixtures/runtime-efficiency-summary.v1.json +790 -0
- package/templates/codex-skills/batch-implement/SKILL.md +33 -58
- package/templates/codex-skills/implement/SKILL.md +21 -124
- package/templates/codex-skills/retry/SKILL.md +8 -34
- package/templates/commands/specrails/batch-implement.md +21 -16
- package/templates/commands/specrails/implement.md +17 -276
- package/templates/commands/specrails/retry.md +6 -34
- package/templates/gemini-commands/batch-implement.toml +34 -28
- package/templates/gemini-commands/implement.toml +34 -55
- package/templates/gemini-commands/retry.toml +10 -16
|
@@ -1,63 +1,38 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: batch-implement
|
|
3
|
-
description: "
|
|
3
|
+
description: "Run or resume implementation through the installed programmatic agent runtime."
|
|
4
4
|
license: MIT
|
|
5
|
-
compatibility: "Codex-native root-level role delegation. One aggregate change per run; hosted worktrees stay under host ownership."
|
|
6
5
|
---
|
|
7
6
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
EVERY batch ticket open.
|
|
41
|
-
5. Delivery/CI: follow implement ownership exactly. Host-owned Git records ship/ci
|
|
42
|
-
skipped and returns evidence; Core-owned authorized delivery records each selected
|
|
43
|
-
repository outcome and required CI. Partial delivery keeps the batch incomplete.
|
|
44
|
-
6. Backlog: only Core-owned backlog may close participating tickets at
|
|
45
|
-
context.backlogPath after required delivery and live-vs-frozen requirements match.
|
|
46
|
-
Preserve unrelated data and revisions. Host-owned backlog stays untouched.
|
|
47
|
-
|
|
48
|
-
Before any role, inspect status.resumePhase; reuse every still-valid phase without
|
|
49
|
-
respawning. Use available worker capabilities and capability-aware cleanup from
|
|
50
|
-
implement; never invent close_agent or native model override support.
|
|
51
|
-
|
|
52
|
-
On a provider turn limit, continue the same role from explicit saved progress;
|
|
53
|
-
never launch a nested coordinator or repeat valid earlier stages. Retry resumes
|
|
54
|
-
this same aggregate change/journal. Two continuations without progress block.
|
|
55
|
-
|
|
56
|
-
`--parallel` is a preference, not permission to create unmanaged worktrees or
|
|
57
|
-
assume ten available agent slots. The aggregate pipeline is sequential by default;
|
|
58
|
-
keep hosted worktrees in the supplied repositories. Do not claim parallel work
|
|
59
|
-
when it did not run. Do not override models on a full-history fork.
|
|
60
|
-
|
|
61
|
-
Report one table with every ticket and actual implemented/reviewed outcome, the
|
|
62
|
-
aggregate verification receipt, archive result and outstanding groups. No ticket
|
|
63
|
-
is done until the whole aggregate close succeeds.
|
|
7
|
+
# Programmatic implementation
|
|
8
|
+
|
|
9
|
+
Implement the requested spec or batch through the installed agent runtime. The runtime owns architecture, development, verification, review and archive; do not delegate these phases yourself or launch a second coordinator.
|
|
10
|
+
|
|
11
|
+
## Freeze the requested scope
|
|
12
|
+
|
|
13
|
+
Use the supplied absolute `SPECRAILS_EXECUTION_CONTEXT` unchanged. It defines runId, specs and acceptance criteria, artifactRoot, selected repositories and ownership. For standalone use, admit the exact requested tickets once with:
|
|
14
|
+
|
|
15
|
+
```sh
|
|
16
|
+
node .specrails/runtime/pipeline.mjs init --change <stable-change> --tickets "<requested-ids>"
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
For a free-form request use `--scope-request <absolute-json>` with the user's specs and criteria. Use the returned absolute context path. Never select a different run by modification time or replace scope from mutable backlog. Multiple tickets share one aggregate context and one runtime invocation.
|
|
20
|
+
|
|
21
|
+
## Execute
|
|
22
|
+
|
|
23
|
+
```sh
|
|
24
|
+
node .specrails/runtime/agent-runtime.mjs run --context <absolute-context> --config .specrails/agent-runtime.json --change <stable-change>
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Desktop launches this runtime directly and freezes its resolved global connections and project settings. Standalone installations provide a local configuration. If required runtime/configuration files are missing, repair the Core installation; do not fall back to a prompt-orchestrated implementation.
|
|
28
|
+
|
|
29
|
+
Wait for the foreground process. Report its structured status, acceptance and verification evidence. A process failure or pause preserves progress; it does not authorize a replacement run. Resume only the exact saved execution:
|
|
30
|
+
|
|
31
|
+
```sh
|
|
32
|
+
node .specrails/runtime/agent-runtime.mjs status --context <absolute-context>
|
|
33
|
+
node .specrails/runtime/agent-runtime.mjs resume --context <absolute-context>
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Answers, approvals and recovery flags must correspond to the pending request and user authorization. Resume keeps the saved models, scope and configuration. Never manually rewrite phase receipts, bypass review, or treat provider prose as completion.
|
|
37
|
+
|
|
38
|
+
Honor the context's ownership throughout: Desktop owns worktrees, commits, PRs and backlog delivery. Runtime success prepares a reviewed candidate; host delivery remains a separate action. Preview requests must not invoke mutating execution.
|
|
@@ -1,141 +1,38 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: implement
|
|
3
|
-
description: "
|
|
3
|
+
description: "Run or resume implementation through the installed programmatic agent runtime."
|
|
4
4
|
license: MIT
|
|
5
|
-
compatibility: "Codex-native role delegation with explicit handoffs and the installed SpecRails pipeline runtime. Use only capabilities exposed by the host."
|
|
6
5
|
---
|
|
7
6
|
|
|
8
|
-
|
|
9
|
-
instructions; the installed runtime supplies immutable scope, phase status and
|
|
10
|
-
actual verification evidence. A completed valid phase needs no new model call.
|
|
7
|
+
# Programmatic implementation
|
|
11
8
|
|
|
12
|
-
|
|
13
|
-
multiple `#N` references. More than one ID routes directly to
|
|
14
|
-
`.codex/skills/batch-implement/SKILL.md` with the original arguments and complete
|
|
15
|
-
frozen context. Do not ask the user to resend or spawn a nested implement.
|
|
9
|
+
Implement the requested spec or batch through the installed agent runtime. The runtime owns architecture, development, verification, review and archive; do not delegate these phases yourself or launch a second coordinator.
|
|
16
10
|
|
|
17
|
-
##
|
|
11
|
+
## Freeze the requested scope
|
|
18
12
|
|
|
19
|
-
|
|
20
|
-
with supplied context, explicit ticket IDs, or a free-form scope request; then
|
|
21
|
-
read `status`. Do not initialize another run on retry or replace frozen requirements
|
|
22
|
-
with live ticket text. OpenSpec lives under `context.artifactRoot`; the compatibility
|
|
23
|
-
path `${SPECRAILS_REPO_DIR:-.}/openspec/changes/<slug>/` applies only after resolving
|
|
24
|
-
that variable to artifactRoot. Source/tests use the selected repository ID/path;
|
|
25
|
-
backlog uses `context.backlogPath`, independent of cwd.
|
|
13
|
+
Use the supplied absolute `SPECRAILS_EXECUTION_CONTEXT` unchanged. It defines runId, specs and acceptance criteria, artifactRoot, selected repositories and ownership. For standalone use, admit the exact requested tickets once with:
|
|
26
14
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
referenced installed roles. Only installed custom-* roles may supplement or fulfill
|
|
31
|
-
a routed task group; they do not bypass the canonical phase gates.
|
|
15
|
+
```sh
|
|
16
|
+
node .specrails/runtime/pipeline.mjs init --change <stable-change> --tickets "<requested-ids>"
|
|
17
|
+
```
|
|
32
18
|
|
|
33
|
-
|
|
34
|
-
Invoke required architect/developer/reviewer roles as real workers and collect their
|
|
35
|
-
terminal outcomes. Full-history forks inherit the current model; do not pass model
|
|
36
|
-
or reasoning overrides unsupported by that fork mode. Report unsupported profile
|
|
37
|
-
model overrides honestly. Use `close_agent` only when that capability exists and
|
|
38
|
-
only after the worker finished; never invent a cleanup tool or interrupt running
|
|
39
|
-
work to simulate completion. Avoid parallel writers in shared candidate roots.
|
|
19
|
+
For a free-form request use `--scope-request <absolute-json>` with the user's specs and criteria. Use the returned absolute context path. Never select a different run by modification time or replace scope from mutable backlog. Multiple tickets share one aggregate context and one runtime invocation.
|
|
40
20
|
|
|
41
|
-
|
|
42
|
-
phase, absolute runtime/context paths, all frozen criteria, repository ownership,
|
|
43
|
-
change/plan/tasks paths, prior outcome and next action. Do not rely on inherited
|
|
44
|
-
conversation memory. A task start, turn limit or process exit alone is not success.
|
|
45
|
-
Continue from durable progress; two continuations without progress become blocked.
|
|
21
|
+
## Execute
|
|
46
22
|
|
|
47
|
-
|
|
23
|
+
```sh
|
|
24
|
+
node .specrails/runtime/agent-runtime.mjs run --context <absolute-context> --config .specrails/agent-runtime.json --change <stable-change>
|
|
25
|
+
```
|
|
48
26
|
|
|
49
|
-
|
|
27
|
+
Desktop launches this runtime directly and freezes its resolved global connections and project settings. Standalone installations provide a local configuration. If required runtime/configuration files are missing, repair the Core installation; do not fall back to a prompt-orchestrated implementation.
|
|
50
28
|
|
|
51
|
-
|
|
52
|
-
`phase --phase <phase> --status running`. Record done only after validating actual
|
|
53
|
-
outcomes and runtime gates. Record blocked/failed with a concrete reason; dependent
|
|
54
|
-
phases remain incomplete. Reopening a phase invalidates dependent completion.
|
|
55
|
-
If every phase is valid, report existing completion without new worker calls.
|
|
29
|
+
Wait for the foreground process. Report its structured status, acceptance and verification evidence. A process failure or pause preserves progress; it does not authorize a replacement run. Resume only the exact saved execution:
|
|
56
30
|
|
|
57
|
-
|
|
31
|
+
```sh
|
|
32
|
+
node .specrails/runtime/agent-runtime.mjs status --context <absolute-context>
|
|
33
|
+
node .specrails/runtime/agent-runtime.mjs resume --context <absolute-context>
|
|
34
|
+
```
|
|
58
35
|
|
|
59
|
-
|
|
60
|
-
installed official OpenSpec fast-forward workflow. Require proposal, design, specs,
|
|
61
|
-
tasks and medium/high design-confidence.json. Missing/malformed/low confidence
|
|
62
|
-
blocks development; record the unresolved issue and retain artifacts for retry.
|
|
63
|
-
Do not edit a ticket and silently substitute the new description into this run.
|
|
64
|
-
Changed requirements need a newly admitted scope.
|
|
36
|
+
Answers, approvals and recovery flags must correspond to the pending request and user authorization. Resume keeps the saved models, scope and configuration. Never manually rewrite phase receipts, bypass review, or treat provider prose as completion.
|
|
65
37
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
Invoke `$sr-developer` or the validated profile role for each task group. Keep
|
|
69
|
-
source writes in its selected repositories, serialize dependencies/shared files,
|
|
70
|
-
and persist real task progress. A BLOCKED outcome stops downstream phases.
|
|
71
|
-
Scoped checks support development; once all groups are implemented, execute one
|
|
72
|
-
full CI-equivalent check request through the installed helper. Derive actual checks
|
|
73
|
-
from each selected repository and include required cross-repository integration.
|
|
74
|
-
All tasks and current full evidence must pass before recording developer done.
|
|
75
|
-
|
|
76
|
-
### Reviewer and bounded repair
|
|
77
|
-
|
|
78
|
-
Invoke `$sr-reviewer` with complete criteria, candidate inventory and current
|
|
79
|
-
verification receipt. Ordinary review does not archive. Require explicit semantic
|
|
80
|
-
acceptance, safe behavior and required regression coverage; green baseline tests
|
|
81
|
-
with missing implementation are incomplete. Reuse unchanged full verification;
|
|
82
|
-
review edits require one fresh final full request on the resulting candidate.
|
|
83
|
-
|
|
84
|
-
Read canonical `<context.artifactRoot>/openspec/changes/<slug>/confidence-score.json`.
|
|
85
|
-
Require overall ≥70, security ≥75 and every other aspect ≥60 (or stricter configured
|
|
86
|
-
thresholds), all tasks complete and no unresolved explicit blocker. Missing or
|
|
87
|
-
ambiguous verdicts/scores fail closed. A numeric score never converts a blocked
|
|
88
|
-
security or design finding into clean acceptance.
|
|
89
|
-
|
|
90
|
-
For concrete recoverable findings, reopen developer and invoke it once with those
|
|
91
|
-
exact findings, then re-review and refresh evidence. An architectural blocker
|
|
92
|
-
returns to architect; do not infer its category from a score range. If the one
|
|
93
|
-
repair round does not resolve acceptance, preserve work and record blocked.
|
|
94
|
-
Only then may the runtime record reviewer done.
|
|
95
|
-
|
|
96
|
-
### Archive
|
|
97
|
-
|
|
98
|
-
Run `archive-check` immediately before archiving. Nonzero means stop. After success,
|
|
99
|
-
invoke `$sr-reviewer` with ARCHIVE_ONLY=true and ARCHIVE_AUTHORIZED=true and the
|
|
100
|
-
same explicit handoff, or run the installed official archive workflow directly
|
|
101
|
-
as coordinator. Preserve approved confidence bytes; no rescoring or code changes.
|
|
102
|
-
Confirm the exact active change is gone, its archive exists under
|
|
103
|
-
`<context.artifactRoot>/openspec/changes/archive/<date>-<slug>/` and canonical specs
|
|
104
|
-
synced before `phase --phase archive --status done`. Do not emulate an official
|
|
105
|
-
archive with file moves or accept incomplete-task prompts. A failed archive remains
|
|
106
|
-
resumable; it never closes specs or restarts valid development automatically.
|
|
107
|
-
|
|
108
|
-
### Delivery and CI
|
|
109
|
-
|
|
110
|
-
For `context.ownership.git === "host"`, record ship and ci skipped with the ownership
|
|
111
|
-
reason and return evidence to the host. Do not stage, commit, push or open PRs.
|
|
112
|
-
For Core-owned git, perform only the delivery already authorized by user/settings,
|
|
113
|
-
in each selected repository. `GIT_AUTO=false` and preview disable shipping even if
|
|
114
|
-
Core owns git. Preserve unrelated changes; stage only the reviewed candidate.
|
|
115
|
-
Record actual per-repository commits/PRs and required CI results before phase done.
|
|
116
|
-
Partial delivery stays incomplete. CI retry checks existing delivery, without
|
|
117
|
-
creating duplicate commits or PRs. No authorized delivery means a concrete blocker,
|
|
118
|
-
not a fabricated successful ship phase.
|
|
119
|
-
|
|
120
|
-
### Backlog and report
|
|
121
|
-
|
|
122
|
-
Host-owned backlog remains untouched. Core-owned backlog may close only after all
|
|
123
|
-
required delivery succeeds, current evidence remains valid, and live participating
|
|
124
|
-
ticket requirements still match frozen IDs/descriptions/criteria/repository scope.
|
|
125
|
-
A mismatch leaves that ticket open and reports the conflict. Read/write only
|
|
126
|
-
`context.backlogPath` (fallback context.backlogRoot/.specrails/local-tickets.json),
|
|
127
|
-
preserve unrelated tickets/fields, and apply the store's revision protocol. Workers
|
|
128
|
-
never close tickets. A free-form scope without a real ticket has no ticket mutation.
|
|
129
|
-
|
|
130
|
-
Report run/change, frozen tickets/roots, reused and newly completed phases,
|
|
131
|
-
verification commands, confidence, archive and each repository's actual delivery.
|
|
132
|
-
Distinguish ready-for-host-delivery from delivered. Include concrete remaining
|
|
133
|
-
blockers; no complete/done claim while a required gate or repository is incomplete.
|
|
134
|
-
|
|
135
|
-
## Preview and apply
|
|
136
|
-
|
|
137
|
-
`--dry-run`/`--preview` uses the runtime preview contract and reports UNVERIFIED
|
|
138
|
-
PREVIEW. Tests on untouched source are baseline evidence only. `--apply` resumes the
|
|
139
|
-
exact existing preview journal, verifies unchanged base/cache and runs checks on
|
|
140
|
-
actual applied source through `apply-preview`; continue the ordinary review,
|
|
141
|
-
confidence and archive gates. Preview never grants shipping/backlog ownership.
|
|
38
|
+
Honor the context's ownership throughout: Desktop owns worktrees, commits, PRs and backlog delivery. Runtime success prepares a reviewed candidate; host delivery remains a separate action. Preview requests must not invoke mutating execution.
|
|
@@ -1,42 +1,16 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: retry
|
|
3
|
-
description: "
|
|
3
|
+
description: "Run or resume implementation through the installed programmatic agent runtime."
|
|
4
4
|
license: MIT
|
|
5
|
-
compatibility: "Codex-native root-level role delegation; no nested implement or assumed provider conversation memory."
|
|
6
5
|
---
|
|
7
6
|
|
|
8
|
-
|
|
9
|
-
Resolve `${SPECRAILS_REPO_DIR:-.}` only as the legacy source default; the installed
|
|
10
|
-
pipeline helper and SPECRAILS_EXECUTION_CONTEXT provide the authoritative roots.
|
|
11
|
-
Call `status` for the existing run/change. Report its completed phases and
|
|
12
|
-
`resumePhase`. Do not search other projects or guess a change from a matching title.
|
|
13
|
-
When there is no journal, report the missing run/context and require explicit new
|
|
14
|
-
admission; do not silently initialize a replacement retry scope. Never erase existing
|
|
15
|
-
code or use a checked task alone as proof of implementation.
|
|
7
|
+
# Resume a programmatic implementation
|
|
16
8
|
|
|
17
|
-
|
|
18
|
-
roles DIRECTLY from this root agent. Do not spawn `$implement` as a sub-agent.
|
|
19
|
-
Use `spawn_agent`, `send_message` and `wait_agent` only for `$sr-architect`,
|
|
20
|
-
`$sr-developer`, `$sr-reviewer` or explicitly configured installed custom roles.
|
|
21
|
-
Preserve the configured provider model; do not pass model/reasoning_effort on
|
|
22
|
-
full-history forks. Give every role the bounded explicit handoff from the shared
|
|
23
|
-
contract, including unchanged frozen acceptance criteria and exact prior findings.
|
|
9
|
+
Resolve the exact saved context for the requested run. Do not initialize a replacement, guess the latest change, or discard work.
|
|
24
10
|
|
|
25
|
-
|
|
26
|
-
-
|
|
27
|
-
-
|
|
28
|
-
|
|
29
|
-
developer with those exact findings, then reviewer again (at most one fix round).
|
|
30
|
-
- Never assume a `MAX_TURNS` or successful process exit completed a phase. Save the
|
|
31
|
-
checkpoint and invoke the same role with the pending work; two continuations
|
|
32
|
-
without file/task/evidence progress stop as blocked with the outstanding action.
|
|
33
|
-
- Archive uses `archive-check`, followed by reviewer archive-only authorization;
|
|
34
|
-
missing/low confidence or stale checks never become success through retry.
|
|
35
|
-
- Ship resumes only missing authorized Core-owned delivery; CI checks existing
|
|
36
|
-
delivery without shipping again. Host-owned ship/ci record skipped; backlog and
|
|
37
|
-
worktrees remain with their owner. Backlog closure also compares live requirements
|
|
38
|
-
with frozen scope at context.backlogPath, as implement requires.
|
|
11
|
+
```sh
|
|
12
|
+
node .specrails/runtime/agent-runtime.mjs status --context <absolute-context>
|
|
13
|
+
node .specrails/runtime/agent-runtime.mjs resume --context <absolute-context>
|
|
14
|
+
```
|
|
39
15
|
|
|
40
|
-
|
|
41
|
-
intentionally skipped phase. Report the run, change, resumed roles, verification,
|
|
42
|
-
archive outcome and any remaining blocker. No recursive retry loops.
|
|
16
|
+
Use the saved scope and configuration. Pass an answer, approval or recovery flag only for the corresponding pending request with user authorization. The runtime selects the next phase and preserves valid completed work; never invoke roles directly or edit phase receipts. Preserve host ownership of Git, worktrees and backlog. Report the structured result and outstanding delivery actions.
|
|
@@ -1,27 +1,32 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Programmatic implementation
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Implement the requested spec or batch through the installed agent runtime. The runtime owns architecture, development, verification, review and archive; do not delegate these phases yourself or launch a second coordinator.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Freeze the requested scope
|
|
6
6
|
|
|
7
|
-
Use
|
|
7
|
+
Use the supplied absolute `SPECRAILS_EXECUTION_CONTEXT` unchanged. It defines runId, specs and acceptance criteria, artifactRoot, selected repositories and ownership. For standalone use, admit the exact requested tickets once with:
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
```sh
|
|
10
|
+
node .specrails/runtime/pipeline.mjs init --change <stable-change> --tickets "<requested-ids>"
|
|
11
|
+
```
|
|
10
12
|
|
|
11
|
-
|
|
13
|
+
For a free-form request use `--scope-request <absolute-json>` with the user's specs and criteria. Use the returned absolute context path. Never select a different run by modification time or replace scope from mutable backlog. Multiple tickets share one aggregate context and one runtime invocation.
|
|
12
14
|
|
|
13
|
-
|
|
14
|
-
2. One architect designs shared contracts and task groups labeled with ticket/repository ID. Cross-repository behavior belongs to the same acceptance matrix.
|
|
15
|
-
3. Execute dependency-ordered groups in supplied roots; serialize shared-file/contract changes. Profile routing selects appropriate roles; each handoff includes exact context/runtime paths.
|
|
16
|
-
4. Collect foreground terminal results. Task start or unsupported PASS is not completion.
|
|
17
|
-
5. Scoped tests support development; one full receipt covers the aggregate candidate and cross-repository integration. Reviewer reuses it unchanged; edits need a fresh final full pass.
|
|
15
|
+
## Execute
|
|
18
16
|
|
|
19
|
-
|
|
17
|
+
```sh
|
|
18
|
+
node .specrails/runtime/agent-runtime.mjs run --context <absolute-context> --config .specrails/agent-runtime.json --change <stable-change>
|
|
19
|
+
```
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
Desktop launches this runtime directly and freezes its resolved global connections and project settings. Standalone installations provide a local configuration. If required runtime/configuration files are missing, repair the Core installation; do not fall back to a prompt-orchestrated implementation.
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
Wait for the foreground process. Report its structured status, acceptance and verification evidence. A process failure or pause preserves progress; it does not authorize a replacement run. Resume only the exact saved execution:
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
```sh
|
|
26
|
+
node .specrails/runtime/agent-runtime.mjs status --context <absolute-context>
|
|
27
|
+
node .specrails/runtime/agent-runtime.mjs resume --context <absolute-context>
|
|
28
|
+
```
|
|
26
29
|
|
|
27
|
-
|
|
30
|
+
Answers, approvals and recovery flags must correspond to the pending request and user authorization. Resume keeps the saved models, scope and configuration. Never manually rewrite phase receipts, bypass review, or treat provider prose as completion.
|
|
31
|
+
|
|
32
|
+
Honor the context's ownership throughout: Desktop owns worktrees, commits, PRs and backlog delivery. Runtime success prepares a reviewed candidate; host delivery remains a separate action. Preview requests must not invoke mutating execution.
|