@abelxiaoxing/cadence 1.3.0 → 1.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +172 -13
- package/agents/design-explorer.md +17 -11
- package/agents/diagnosis-worker.md +9 -1
- package/agents/implementation-worker.md +3 -1
- package/config/plan-draft.example.json +122 -0
- package/config/plan-draft.multiple-tasks.example.json +345 -0
- package/package.json +9 -5
- package/prompts/abel-design.md +141 -38
- package/prompts/abel-diagnose.md +10 -1
- package/prompts/abel-implement.md +118 -20
- package/prompts/abel-init.md +9 -2
- package/src/activity-contracts.ts +82 -0
- package/src/apply-transaction.ts +16 -14
- package/src/artifact-store.ts +17 -0
- package/src/candidate-artifact.ts +143 -0
- package/src/candidate-patch.ts +33 -12
- package/src/candidate-workspace.ts +74 -0
- package/src/canonical.ts +16 -0
- package/src/change-contract-schema.ts +191 -0
- package/src/change-contract.ts +273 -0
- package/src/change-verification.ts +896 -0
- package/src/child-model.ts +129 -0
- package/src/child-session.ts +296 -328
- package/src/contracts.ts +325 -109
- package/src/control-contracts.ts +51 -1
- package/src/delivery-compiler.ts +241 -141
- package/src/delivery-revision.ts +42 -0
- package/src/design-control.ts +182 -15
- package/src/design-diagnostics.ts +150 -0
- package/src/design-journal.ts +216 -72
- package/src/durable-contracts.ts +210 -0
- package/src/durable-workflow.ts +963 -0
- package/src/evidence-draft.ts +122 -0
- package/src/implement-graph.ts +14 -16
- package/src/implement-plan.ts +70 -0
- package/src/index.ts +341 -1405
- package/src/isolation-backend.ts +84 -23
- package/src/model-source.ts +22 -0
- package/src/package-candidate.ts +224 -0
- package/src/package-delivery.ts +486 -0
- package/src/package-verification.ts +509 -0
- package/src/package-workflow.ts +253 -0
- package/src/packet-runtime.ts +27 -48
- package/src/parent-provider.ts +86 -198
- package/src/phase-execution.ts +2248 -0
- package/src/pi-adapter.ts +19 -0
- package/src/plan-draft-summary.ts +146 -0
- package/src/plan-draft.ts +493 -0
- package/src/route-policy.ts +1 -11
- package/src/run-state.ts +4 -16
- package/src/run-store.ts +5 -144
- package/src/scoped-grep-worker.mjs +23 -0
- package/src/scoped-tools.ts +312 -116
- package/src/sqlite-schema.ts +171 -0
- package/src/storage-schema.ts +352 -0
- package/src/subagent-activity.ts +46 -67
- package/src/submit-tool.ts +40 -61
- package/src/task-ledger.ts +14 -55
- package/src/transport-budget.ts +32 -0
- package/src/verification-capability.ts +298 -102
- package/src/verification-environment.ts +213 -0
- package/src/verification-identity.ts +77 -0
- package/src/worker-broker.ts +134 -91
- package/src/workflow-engine.ts +28 -8285
- package/src/workflow-policy.ts +1388 -0
- package/src/workflow-recovery-policy.ts +95 -0
- package/src/workflow-scheduling.ts +105 -0
- package/src/workflow-state-machine.ts +4086 -0
- package/src/workflow-status.ts +384 -0
- package/src/workspace-io-entry.mjs +58 -0
- package/src/workspace-io-worker.mjs +991 -0
- package/src/workspace-io.ts +84 -0
- package/src/workspace-store.ts +125 -19
- package/skills/abel-workflow/SKILL.md +0 -205
- package/src/empty-resource-loader.ts +0 -38
- package/src/parent-payload-bridge.ts +0 -523
package/prompts/abel-design.md
CHANGED
|
@@ -6,13 +6,21 @@ tags: [abel, design, openspec, PBT, evidence]
|
|
|
6
6
|
argument-hint: "<requirement> | --change <change_name>"
|
|
7
7
|
---
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
This procedure applies only when the user explicitly invokes `/abel-design`.
|
|
10
|
+
Reading this file, mentioning the command, or finding OpenSpec artifacts does not activate it.
|
|
11
|
+
Read the complete value inside `<abel-request>` without tokenizing it a second time.
|
|
10
12
|
|
|
11
13
|
<abel-request>
|
|
12
14
|
$ARGUMENTS
|
|
13
15
|
</abel-request>
|
|
14
16
|
|
|
15
17
|
<!-- ABEL:PROMPT:abel-design -->
|
|
18
|
+
|
|
19
|
+
This stage is scoped to the invoked task.
|
|
20
|
+
Direct answers and same-task continuations stay in this stage.
|
|
21
|
+
If the user ends the workflow or requests an unrelated task, first send `{"action":"finish"}` to `abel_dispatch`, then handle the new task normally with the restored tools.
|
|
22
|
+
Exit preserves resumable work and never means completion or discard.
|
|
23
|
+
Never start another stage automatically.
|
|
16
24
|
<!-- ABEL:START -->
|
|
17
25
|
|
|
18
26
|
# Design outcome
|
|
@@ -20,9 +28,37 @@ $ARGUMENTS
|
|
|
20
28
|
Design resolves product and technical decisions, collects cited evidence, and compiles one trusted delivery.
|
|
21
29
|
It never launches an implementation Worker, creates a product-code candidate, applies a product diff, runs Red/Green/Refactor, or mutates the main workspace.
|
|
22
30
|
|
|
23
|
-
If
|
|
31
|
+
If no requirement can be identified or several changes cannot be distinguished, ask one focused question about the target.
|
|
32
|
+
Otherwise make Design `start` the first control call, before repository discovery.
|
|
33
|
+
It creates only private resumable identity and does not approve scope.
|
|
34
|
+
Then resolve discoverable unknowns from repository evidence and choose reversible defaults within existing authority; only unresolved substantive choices require a user decision.
|
|
24
35
|
An explicit `--change <name>` resumes only that existing change; never reinterpret a misspelling as a new requirement.
|
|
25
36
|
|
|
37
|
+
## Durable Design identity
|
|
38
|
+
|
|
39
|
+
Use the same `action: "design"` envelope from the first call through finalization.
|
|
40
|
+
Call `start` once with either the complete new requirement or an explicit existing change name, then use the returned `runId` for every later Design operation.
|
|
41
|
+
For a new requirement, the control plane normalizes and hashes the transient text itself; the raw requirement is not written to the durable journal.
|
|
42
|
+
After Gate A fixes its name, bind that same provisional run with `bind-change` rather than starting a second run.
|
|
43
|
+
Use `status` by `runId` to recover local lifecycle and Design facts without a model or endpoint request.
|
|
44
|
+
A completed Design run is immutable; an explicit later `--change <change>` starts the next durable Design revision for that change while preserving prior approval facts for receipt verification.
|
|
45
|
+
|
|
46
|
+
```json
|
|
47
|
+
{"action":"design","request":{"operation":"start","requirement":"<complete-requirement>","operationId":"<unique-operation>"}}
|
|
48
|
+
{"action":"design","request":{"operation":"start","change":"<existing-change>","operationId":"<unique-operation>"}}
|
|
49
|
+
{"action":"design","request":{"operation":"status","runId":"<run-id>"}}
|
|
50
|
+
{"action":"design","request":{"operation":"bind-change","runId":"<run-id>","operationId":"<unique-operation>","change":"<gate-a-approved-change>"}}
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Focused evidence collection
|
|
54
|
+
|
|
55
|
+
For a local change with known paths, read applicable repository instructions, the package manifest, the affected implementation and existing tests in the same assistant turn when independent.
|
|
56
|
+
Expand to callers, fixtures or architecture only for a concrete unresolved impact or verification question.
|
|
57
|
+
Once observable behavior, authorized scope, existing-test impact and an executable verification command are established, proceed to the accepted contract and draft.
|
|
58
|
+
Do not continue broad directory traversal or read Cadence implementation sources to reconstruct its protocol; use the current tool schema, its installed example paths and returned field diagnostics.
|
|
59
|
+
The `start` / `status` response includes a current-step hint; it is guidance, not new approval authority.
|
|
60
|
+
Evidence packets are optional: use them only for independent evidence gaps that justify another model call.
|
|
61
|
+
|
|
26
62
|
## Write boundary
|
|
27
63
|
|
|
28
64
|
- During verified Design, the parent tool set is mechanically limited to the previously active `read`, `grep`, `find`, and `ls` tools plus `abel_dispatch`.
|
|
@@ -47,22 +83,6 @@ Identical replay is idempotent and conflicting reuse of an operation id fails cl
|
|
|
47
83
|
{"action":"design","request":{"operation":"delete-artifact","runId":"<run-id>","operationId":"<unique-operation>","path":"specs/<capability>/spec.md"}}
|
|
48
84
|
```
|
|
49
85
|
|
|
50
|
-
## Durable Design identity
|
|
51
|
-
|
|
52
|
-
Use the same `action: "design"` envelope from the first call through finalization.
|
|
53
|
-
Call `start` once with either the complete new requirement or an explicit existing change name, then use the returned `runId` for every later Design operation.
|
|
54
|
-
For a new requirement, the control plane normalizes and hashes the transient text itself; the raw requirement is not written to the durable journal.
|
|
55
|
-
After Gate A fixes its name, bind that same provisional run with `bind-change` rather than starting a second run.
|
|
56
|
-
Use `status` by `runId` to recover local lifecycle and Design facts without a model or endpoint request.
|
|
57
|
-
A completed Design run is immutable; an explicit later `--change <change>` starts the next durable Design revision for that change while preserving prior approval facts for receipt verification.
|
|
58
|
-
|
|
59
|
-
```json
|
|
60
|
-
{"action":"design","request":{"operation":"start","requirement":"<complete-requirement>","operationId":"<unique-operation>"}}
|
|
61
|
-
{"action":"design","request":{"operation":"start","change":"<existing-change>","operationId":"<unique-operation>"}}
|
|
62
|
-
{"action":"design","request":{"operation":"status","runId":"<run-id>"}}
|
|
63
|
-
{"action":"design","request":{"operation":"bind-change","runId":"<run-id>","operationId":"<unique-operation>","change":"<gate-a-approved-change>"}}
|
|
64
|
-
```
|
|
65
|
-
|
|
66
86
|
## Read-only evidence packets
|
|
67
87
|
|
|
68
88
|
Use `abel_dispatch` with `action: "run"` only for bounded Design evidence.
|
|
@@ -112,6 +132,31 @@ Do not put prompts, transcripts, hidden reasoning, credentials, environment valu
|
|
|
112
132
|
Ask the user only for substantive choices: observable behavior, scope/non-goals, data/security/privacy/compatibility/migration policy, new dependencies, architecture/policy, irreversible changes, and technical choices with real trade-offs.
|
|
113
133
|
Resolve reversible details mechanically from one established repository convention and do not ask them repeatedly.
|
|
114
134
|
|
|
135
|
+
Aim for one consolidated user decision round for a clear requirement.
|
|
136
|
+
Investigate repository evidence before asking about implementation details.
|
|
137
|
+
Present the observable contract, any substantive technical trade-offs, and your recommended defaults together; include authorization to mechanically compile and seal the plan within those choices.
|
|
138
|
+
An explicit acceptance of that complete proposal covers both its behavior and the presented technical choices.
|
|
139
|
+
Do not ask a second time merely because the compiler has now produced the exact task DAG or receipt.
|
|
140
|
+
Ask a further focused question only when new evidence changes a substantive choice that was not covered by the accepted proposal.
|
|
141
|
+
Explain that difference, retain all other decisions, and group related unresolved choices into the same question.
|
|
142
|
+
Existing instructions and accepted same-task decisions are authorization evidence; do not require the user to restate them.
|
|
143
|
+
Design settles the goal, main decisions, explicit constraints, and non-goals.
|
|
144
|
+
Make the implementation delegation clear in the accepted proposal: the parent will choose its recommended solution for later implementation choices within those constraints, record material decisions, and continue to verified results without another selection or confirmation round.
|
|
145
|
+
Do not ask the user to approve this delegation separately or attempt to enumerate every future implementation detail.
|
|
146
|
+
|
|
147
|
+
## Structured authority for new work
|
|
148
|
+
|
|
149
|
+
Use a structured `ChangeContract` as the Gate A `contract` for new designs: `goal`, `acceptance` (stable `id`, accepted `statement`, complete structured `verification`), `constraints` (stable `id` and `statement`), and `policy` (`writeRoots`, allowed dependency names in `dependencies`, and `verificationModes`).
|
|
150
|
+
Use `behavior` by default; explicitly permit `mechanical` or `refactor` only for suitable work.
|
|
151
|
+
Present the accepted goal, constraints and scope together with the recommended choices.
|
|
152
|
+
Do not include secrets or raw conversation in the contract.
|
|
153
|
+
|
|
154
|
+
Code normalizes and hashes the object.
|
|
155
|
+
The journal retains the normalized authority and injects it into compiled plans; callers do not compute hashes.
|
|
156
|
+
Keep acceptance IDs and statements stable when reshaping a plan.
|
|
157
|
+
Compilation rejects missing acceptance verification, outside-policy writes/dependencies, or substituted authority.
|
|
158
|
+
Historical prose approvals remain readable; their existence does not authorize new scope.
|
|
159
|
+
|
|
115
160
|
Gate A approves the complete WHAT: goal, observable scenarios, failures, scope/non-goals, compatibility/migration/security policy, and success criteria.
|
|
116
161
|
Before approval, present the unresolved behavior decisions together.
|
|
117
162
|
After explicit approval:
|
|
@@ -122,19 +167,61 @@ After explicit approval:
|
|
|
122
167
|
4. materialize schema-ready behavior artifacts one at a time.
|
|
123
168
|
|
|
124
169
|
```json
|
|
125
|
-
{"action":"design","request":{"operation":"approve-gate","runId":"<run-id>","operationId":"<unique-operation>","gate":"gate-a","contract":"<
|
|
170
|
+
{"action":"design","request":{"operation":"approve-gate","runId":"<run-id>","operationId":"<unique-operation>","gate":"gate-a","contract":{"goal":"<accepted goal>","acceptance":[{"id":"<acceptance-id>","statement":"<accepted behavior>","verification":{"kind":"static-check","id":"<acceptance-verifier-id>","runner":{"kind":"node","script":"<observed-test-path>"},"args":[],"classification":"expected-green"}}],"constraints":[],"policy":{"writeRoots":["<approved-source-path>","<approved-test-path>"],"dependencies":[],"verificationModes":["behavior"]}}}}
|
|
126
171
|
```
|
|
127
172
|
|
|
128
173
|
The control plane generates the canonical behavior-contract hash; the returned proof contains its approval revision, contract hash, and owner-private record hash.
|
|
129
174
|
`gate-a.yaml` is installed later by code-owned finalization, not hand-authored here.
|
|
130
175
|
|
|
131
176
|
Gate A is not tool permission and carries no session/model/timestamp identity.
|
|
177
|
+
A later behavior decision invalidates both Gates; a later technical decision or changed plan compilation invalidates Gate B only.
|
|
178
|
+
Compiling identical canonical bytes after unchanged decisions preserves the existing plan revision and both Gates, even with a new operation id.
|
|
132
179
|
|
|
133
180
|
## Technical contract and ImplementPlan
|
|
134
181
|
|
|
135
182
|
Derive HOW from Gate A plus repository evidence.
|
|
136
183
|
Ask only unresolved substantive technical decisions, then build a complete task DAG with stable Requirement → Scenario → Verification → Task references.
|
|
137
184
|
|
|
185
|
+
Start from the package's [single-task PlanDraft example](../config/plan-draft.example.json), resolved relative to this prompt's installed path.
|
|
186
|
+
It describes a small Node consumer with `package.json`, `src/add.mjs` exporting `add`, and one existing `test/add.test.mjs` that uses Node assertions and currently covers `add(0, 0) === 0`.
|
|
187
|
+
The Red phase preserves that assertion and adds `add(2, 3) === 5` with the failure marker `[ADD:positive-integers]`; Green repairs the function.
|
|
188
|
+
The example's nested `changeContract` also shows the structured Gate A shape.
|
|
189
|
+
Replace its goal, acceptance, paths, context, impact evidence, and verification commands with observed repository facts before approval; its sample evidence is not evidence about the current project.
|
|
190
|
+
Use the project's actual full suite when adapting this single-test example.
|
|
191
|
+
The control plane inherits the approved `changeContract`, so the draft may omit that duplicate object.
|
|
192
|
+
Keep author input separate from the complete sealed execution plan; execution never reads author shorthand.
|
|
193
|
+
Reuse an atomic command through `verificationDefinitions` and `{ "use": "name" }`; place `expectedFailure` on its Red use.
|
|
194
|
+
Definitions contain an existing atomic verifier's command fields, without identity, classification, bindings, nested references, or arbitrary use-site overrides.
|
|
195
|
+
Inline atomic contracts may also omit `id` and `classification`; the compiler derives stable purpose identities and phase classifications.
|
|
196
|
+
In PlanDraft, omit a package-script `command` (including in a named definition or package-script runner) to bind the literal package.json script value before identity generation.
|
|
197
|
+
An explicit `command` must be that exact manifest value, never a launcher such as `npm run test`.
|
|
198
|
+
Gate A acceptance verifiers remain complete explicit contracts; use the observed literal script value there.
|
|
199
|
+
Explicit task `read` supplies common reads to its phases, unioned with any phase-local `read`; writes, deletes, roots, dependencies, and output producers remain explicit.
|
|
200
|
+
The compiler also supplies fixed baseline/repair boundary fields and `agents.managedOnly`; retain recovery attempt limits and observed AGENTS impact.
|
|
201
|
+
It supplies an empty AGENTS checkpoint only when every explicitly declared impact is `none`.
|
|
202
|
+
The [dependent-task example](../config/plan-draft.multiple-tasks.example.json) shows a Red-produced test consumed by another task's ordered verification, with an explicit dependency and producer.
|
|
203
|
+
Ordered `steps` remain complete inline contracts; reuse means separate verification executions, never reuse of a prior successful report.
|
|
204
|
+
Omit `tracking` to generate parent-owned `tasks.md` metadata from the task ids; an explicitly supplied block must match those ids and the fixed tracking policy.
|
|
205
|
+
In the author portion of `tasks.md`, write one checkbox with each backticked task ID, its objective and its owned backticked `specs/<capability>/spec.md#Requirement title/Scenario title` references.
|
|
206
|
+
Every Scenario must have exactly one reference.
|
|
207
|
+
Do not copy generated phase verifier IDs into this text.
|
|
208
|
+
Compilation installs their code-owned `ABEL:VERIFICATION-BINDINGS` region while preserving the author text.
|
|
209
|
+
Editing tasks afterward requires recompilation before finalization.
|
|
210
|
+
Omit phase `verificationInputs`: the compiler derives the exact paths from each verification contract and binds them to a unique declared output or an existing workspace file.
|
|
211
|
+
Keep supporting sources and fixtures in `read`; input derivation never adds read/write paths, outputs, or dependencies.
|
|
212
|
+
Omit each `relatedTests` entry's `disposition` and `regressionTaskId` to derive ownership from task writes; retain its observed `path` and `evidence`.
|
|
213
|
+
An ambiguous producer or test owner requires an explicit correction; explicitly supplied fields are checked, never silently replaced.
|
|
214
|
+
Scope, verification choices, recovery limits, and necessary AGENTS operations remain explicit.
|
|
215
|
+
|
|
216
|
+
Mechanical tasks may write document/data/config files (`.md`, `.txt`, `.json`, `.yaml`, `.yml`, `.toml`, `.lock`).
|
|
217
|
+
Refactor tasks preserve accepted verifier inputs.
|
|
218
|
+
Both must declare no public behavior change and require an explicitly allowed mode in Gate A. Specify task `verificationMode` and Green (plus optional Refactor); omit Red in the draft.
|
|
219
|
+
The compiler handles its internal compatibility representation.
|
|
220
|
+
Runtime captures baseline and executes Green with affected, cumulative and post-apply verification, without generating a Red candidate.
|
|
221
|
+
Behavior tasks continue to require Red/Green.
|
|
222
|
+
|
|
223
|
+
An AGENTS checkpoint additionally requires its exact target path in `policy.writeRoots`; a broad source root does not grant AGENTS authority.
|
|
224
|
+
|
|
138
225
|
Each task must seal:
|
|
139
226
|
|
|
140
227
|
- stable id, objective, exact dependencies and edge reasons;
|
|
@@ -145,21 +232,31 @@ Each task must seal:
|
|
|
145
232
|
- AGENTS impact/target and managed-only ownership;
|
|
146
233
|
- precise context sufficient for a fresh Worker without a conversation transcript.
|
|
147
234
|
|
|
235
|
+
Seal the supporting repository files needed by the whole task, including callers, types, fixtures, and conventions; Workers may read the union of that task's approved phase paths.
|
|
236
|
+
Writes and deletes remain phase-local.
|
|
237
|
+
This task-wide read authority is part of the proposal, not an ad hoc escalation during Implement.
|
|
238
|
+
Keep tasks small enough for one complete patch using compact exact replacements, and separate independent outputs during planning.
|
|
239
|
+
|
|
148
240
|
Impact closure must name affected existing tests and fixtures; a suite made only from newly added tests is insufficient.
|
|
241
|
+
In `impactClosure.relatedTests`, `current-task` means this task edits that test: its path must appear in a phase's `write` set.
|
|
242
|
+
Use `regression-task` with `regressionTaskId` when another planned task owns the edit; use `unaffected` with evidence when an existing test is preserved without edits, even if it remains in `affectedSuite`.
|
|
243
|
+
Do not expand write sets merely to satisfy a disposition label.
|
|
149
244
|
For public UI or API work, seal the relevant route authorization, page state, API response and contract, public HTML/template/theme behavior, and an approved browser E2E check when those surfaces are affected.
|
|
150
245
|
|
|
151
246
|
The plan admits only shell-free `vitest`, `package-script`, `static-check`, or ordered `steps` contracts.
|
|
152
|
-
|
|
247
|
+
`dev-browser` is required only by an approved browser E2E contract; its absence does not block unrelated tasks or stages.
|
|
248
|
+
Pin local runners, package scripts, arguments, `minTests`, and `noInstall` behavior; sealed classifications are derived from phase/purpose when omitted.
|
|
153
249
|
Reject shell operators, implicit downloads, absolute/escaping paths, missing local capability, and unsupported verification shapes during Design readiness.
|
|
154
250
|
|
|
155
|
-
After current Gate A approval, send the
|
|
251
|
+
After current Gate A approval, send the author draft through `write-artifact` only to the relative path `plan-draft.json`.
|
|
156
252
|
Before mutation-owning compilation, use the read-only typed preflight; it validates the same fixed draft and returns task/output counts plus hashes without installing canonical files or journaling a plan revision:
|
|
157
253
|
|
|
158
254
|
```json
|
|
159
255
|
{"action":"design","request":{"operation":"validate-plan-draft","runId":"<run-id>"}}
|
|
160
256
|
```
|
|
161
257
|
|
|
162
|
-
If preflight fails,
|
|
258
|
+
If preflight fails, correct the returned diagnostic batch using `field`, `path`, `expectedPaths`, `actualPaths`, and code-owned `hint` where available.
|
|
259
|
+
Path lists marked `pathsTruncated` are partial; inspect only the identified boundary when more detail is needed.
|
|
163
260
|
Do not bisect the draft blindly or repeat an unchanged validation/finalization request.
|
|
164
261
|
After preflight succeeds, invoke code-owned compilation:
|
|
165
262
|
|
|
@@ -167,35 +264,33 @@ After preflight succeeds, invoke code-owned compilation:
|
|
|
167
264
|
{"action":"design","request":{"operation":"compile-plan","runId":"<run-id>","operationId":"<unique-operation>"}}
|
|
168
265
|
```
|
|
169
266
|
|
|
170
|
-
The compiler reads only that fixed safe path, validates capability and graph closure again,
|
|
267
|
+
The compiler reads only that fixed safe path, validates capability and graph closure again, installs the generated verification bindings into the existing `tasks.md` and canonical `implement-plan.json` under the same compilation lease, and records the plan only after both writes succeed.
|
|
268
|
+
It returns the plan’s raw and canonical hashes.
|
|
171
269
|
Do not hand-assemble canonical plan bytes, hashes, generated task Markdown, or receipts.
|
|
172
270
|
The canonical `ImplementPlan` contains:
|
|
173
271
|
|
|
174
272
|
- tasks and regular-file outputs;
|
|
175
273
|
- target/affected/full-suite baselines and normalized failure identity policy;
|
|
176
274
|
- change-level affected, full-suite, and post-apply verification;
|
|
177
|
-
- an explicit `artifactCorrection.maxAttempts` of 2-3
|
|
275
|
+
- an explicit `artifactCorrection.maxAttempts` of 2-3 attempts for a verification obligation and phase, including the initial attempt; operation ids, rollback lineage, route changes, task renaming, and rewording do not replenish it;
|
|
178
276
|
- bounded in-boundary repair policy and attribution classes `pre-existing | introduced | unresolved | environment`;
|
|
179
277
|
- parent-owned `tasks.md` tracking;
|
|
180
278
|
- when required, one sealed managed-block AGENTS operation per approved target, including impact, owning task ids, complete marker-bounded content, and verification.
|
|
181
279
|
|
|
182
|
-
Use the
|
|
280
|
+
Use the code-owned readiness proof to require an executable static closure with no diagnostics.
|
|
183
281
|
A write set grants authority but never proves that an output exists.
|
|
184
282
|
Every absent future input must be a unique declared output from a transitive dependency.
|
|
185
283
|
|
|
186
284
|
## Gate B and trusted delivery
|
|
187
285
|
|
|
188
|
-
Gate B
|
|
189
|
-
|
|
286
|
+
Gate B is a code-owned plan certificate, not a second user decision round.
|
|
287
|
+
The accepted proposal covers behavior, substantive technical choices, and authority to compile their realization.
|
|
288
|
+
Ask about any newly discovered substantive choice before recording that changed decision; preserve all existing decisions by id instead of restating their contract text.
|
|
289
|
+
`compile-plan` atomically records the validated plan and its Gate B proof after the current Gate A and substantive decisions.
|
|
290
|
+
Do not request a separate Gate B confirmation or an extra approve-gate call after successful compilation.
|
|
291
|
+
Finalization still validates strict OpenSpec artifacts, traceability, graph closure, and the current private proofs.
|
|
190
292
|
|
|
191
|
-
|
|
192
|
-
First approve Gate B; the control plane accepts only a plan compiled after the current Gate A approval and latest substantive decisions, then binds that stored canonical hash so the caller never copies or recomputes it:
|
|
193
|
-
|
|
194
|
-
```json
|
|
195
|
-
{"action":"design","request":{"operation":"approve-gate","runId":"<run-id>","operationId":"<unique-operation>","gate":"gate-b"}}
|
|
196
|
-
```
|
|
197
|
-
|
|
198
|
-
Then request finalization:
|
|
293
|
+
Request finalization:
|
|
199
294
|
|
|
200
295
|
```json
|
|
201
296
|
{"action":"design","request":{"operation":"finalize-delivery","runId":"<run-id>","operationId":"<unique-operation>"}}
|
|
@@ -205,6 +300,8 @@ Finalization revalidates both current private Gate proofs, the stored plan, stri
|
|
|
205
300
|
It atomically installs canonical `gate-a.yaml`, writes `ready.yaml` last, rereads the installed delivery, removes `plan-draft.json`, marks the Design run completed, and returns `deliveryRevision` plus `receiptHash`.
|
|
206
301
|
Any failure leaves Design nonterminal and installs no new `ready.yaml`.
|
|
207
302
|
|
|
303
|
+
Finalization serializes artifact mutation through an expiring ownership lease; never bypass a lease conflict or manually repair code-owned receipt bytes.
|
|
304
|
+
|
|
208
305
|
The canonical receipts bind the Gate A and Gate B approval revisions, canonical contract hashes, and owner-private record hashes.
|
|
209
306
|
`ready.yaml` references the plan path, raw-byte hash, canonical plan hash, executable verification closure, Gate A hash, artifact hashes, and traceability hash.
|
|
210
307
|
It does not embed caller-owned runtime task state, completed/blocked arrays, snapshots, launch identities, or retry budgets.
|
|
@@ -216,15 +313,21 @@ Every other byte remains bound.
|
|
|
216
313
|
|
|
217
314
|
On resume, validate current artifacts and receipts first.
|
|
218
315
|
Use Design `status` to recover bounded accepted-evidence identities/hashes, latest decision revisions, Gate currentness, and compiled-plan identity without relying on a prior child session.
|
|
316
|
+
A new revision of a completed change inherits decisions, Gate authority, and the canonical plan from the latest completed owner-private finalization for that same root and change.
|
|
317
|
+
Evidence packets are not inherited as current observations: recheck affected repository facts.
|
|
318
|
+
Technical-only changes keep Gate A; changed behavior invalidates both Gates.
|
|
219
319
|
Preserve decisions whose bound content did not change.
|
|
220
|
-
A mechanical hash, formatting, checkbox, stale path, or traceability repair regenerates only invalidated artifacts and does not reopen a
|
|
221
|
-
Reopen Gate A only for changed behavior authority;
|
|
320
|
+
A mechanical hash, formatting, checkbox, stale path, or traceability repair regenerates only invalidated artifacts and does not reopen a user decision.
|
|
321
|
+
Reopen Gate A only for changed behavior authority; ask about changed substantive technical authority only when it is not already accepted.
|
|
322
|
+
The compiler regenerates Gate B as needed without a separate confirmation.
|
|
222
323
|
Report the exact invalidated decision/artifact instead of restarting the whole Design process.
|
|
223
324
|
|
|
224
325
|
Endpoint/transport failure in an evidence packet pauses that packet and retains other evidence.
|
|
225
326
|
Missing package scripts/runners or a non-executable verification contract must be corrected before Gate B; they must not be deferred as an Implement surprise.
|
|
226
327
|
|
|
227
|
-
Report `READY_TO_IMPLEMENT` only when strict validation passes, both
|
|
328
|
+
Report `READY_TO_IMPLEMENT` only when strict validation passes, user decisions are resolved and both private proofs are current, all artifacts/hashes/traceability resolve, and the canonical plan is executable.
|
|
329
|
+
After successful code-owned finalization, return one brief readiness response with the change and delivery revision.
|
|
330
|
+
Do not reread receipts, survey directories or restate the full decision history after that success; finalization has already reread and validated the delivery.
|
|
228
331
|
Successful finalization deactivates private dispatch before an unrelated later request.
|
|
229
332
|
Gate waits remain active for direct follow-up; if the user explicitly ends an unfinished Design interaction, send `{"action":"finish"}`.
|
|
230
333
|
Otherwise report the current Design state, retained evidence, and the one unresolved decision or artifact that prevents readiness.
|
package/prompts/abel-diagnose.md
CHANGED
|
@@ -3,7 +3,9 @@ description: Diagnose and minimally repair one or more existing bugs
|
|
|
3
3
|
argument-hint: "<problem-description>"
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
This procedure applies only when the user explicitly invokes `/abel-diagnose`.
|
|
7
|
+
Reading this file, mentioning the command, or finding OpenSpec artifacts does not activate it.
|
|
8
|
+
Read the complete value inside `<abel-request>` without tokenizing it a second time.
|
|
7
9
|
|
|
8
10
|
<abel-request>
|
|
9
11
|
$ARGUMENTS
|
|
@@ -11,6 +13,12 @@ $ARGUMENTS
|
|
|
11
13
|
|
|
12
14
|
<!-- ABEL:PROMPT:abel-diagnose -->
|
|
13
15
|
|
|
16
|
+
This stage is scoped to the invoked task.
|
|
17
|
+
Direct answers and same-task continuations stay in this stage.
|
|
18
|
+
If the user ends the workflow or requests an unrelated task, first send `{"action":"finish"}` to `abel_dispatch`, then handle the new task normally with the restored tools.
|
|
19
|
+
Exit preserves resumable work and never means completion or discard.
|
|
20
|
+
Never start another stage automatically.
|
|
21
|
+
|
|
14
22
|
The request must uniquely identify one or more existing defects.
|
|
15
23
|
If required input is missing or ambiguous, stop before work and ask one focused question.
|
|
16
24
|
|
|
@@ -41,6 +49,7 @@ For each defect, keep this order:
|
|
|
41
49
|
Run the regression after every edit and the affected suite after refactoring.
|
|
42
50
|
6. Compare the full suite with baseline and require no introduced failure.
|
|
43
51
|
Classify any AGENTS impact and apply only a verified managed-region update at a stable parent checkpoint.
|
|
52
|
+
Preserve every byte outside `<!-- ABEL:AGENTS-INDEX:START -->` and `<!-- ABEL:AGENTS-INDEX:END -->`; never give a Worker an AGENTS write path or put runtime/session ids, credentials, or approval state in the index.
|
|
44
53
|
|
|
45
54
|
If reproduction is unavailable, root-cause evidence is insufficient, the regression cannot witness the defect, or an external capability is unavailable, return `paused` with the exact safe evidence and a concrete resume condition.
|
|
46
55
|
Do not invent a repair.
|
|
@@ -6,13 +6,21 @@ tags: [abel, implement, openspec, TDD, recovery]
|
|
|
6
6
|
argument-hint: "<change_name>"
|
|
7
7
|
---
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
This procedure applies only when the user explicitly invokes `/abel-implement`.
|
|
10
|
+
Reading this file, mentioning the command, or finding OpenSpec artifacts does not activate it.
|
|
11
|
+
Read the complete value inside `<abel-request>` without tokenizing it a second time.
|
|
10
12
|
|
|
11
13
|
<abel-request>
|
|
12
14
|
$ARGUMENTS
|
|
13
15
|
</abel-request>
|
|
14
16
|
|
|
15
17
|
<!-- ABEL:PROMPT:abel-implement -->
|
|
18
|
+
|
|
19
|
+
This stage is scoped to the invoked task.
|
|
20
|
+
Direct answers and same-task continuations stay in this stage.
|
|
21
|
+
If the user ends the workflow or requests an unrelated task, first send `{"action":"finish"}` to `abel_dispatch`, then handle the new task normally with the restored tools.
|
|
22
|
+
Exit preserves resumable work and never means completion or discard.
|
|
23
|
+
Never start another stage automatically.
|
|
16
24
|
<!-- ABEL:START -->
|
|
17
25
|
|
|
18
26
|
# Implement outcome
|
|
@@ -22,14 +30,22 @@ If it is missing, absent, or ambiguous, stop before execution and ask for the un
|
|
|
22
30
|
|
|
23
31
|
Implement is a durable, resumable execution stage.
|
|
24
32
|
The private control plane owns task scheduling, Red-Green-Refactor progression, candidate application, verification attribution, repair, task checkbox updates, AGENTS checkpoints, and the final transaction.
|
|
25
|
-
The parent interprets state and
|
|
33
|
+
The parent interprets state, owns implementation decisions, and follows automatic continuations; it must not reproduce those mechanics manually.
|
|
34
|
+
Design has already established the goal, main choices, and explicit constraints.
|
|
35
|
+
Invoking Implement delegates remaining implementation choices to the parent model's recommended solution.
|
|
36
|
+
Choose the best supported option, record the concise decision and rationale in the same change, and continue without asking the user to select an option or confirm it again.
|
|
37
|
+
Respect explicit Design constraints and non-goals; when a proposed option conflicts, choose a compliant alternative.
|
|
38
|
+
A Worker request is evidence for the parent, not permission for the Worker to widen its own authority.
|
|
39
|
+
Do not end the turn merely because a control call returns a nonterminal state.
|
|
40
|
+
Follow its parent-owned continuation until verified completion or a concrete blocker that cannot be resolved within available capabilities and budgets.
|
|
41
|
+
Keep routine decisions and repairs internal; give brief progress updates during sustained work and include material implementation choices in the final result.
|
|
26
42
|
|
|
27
43
|
## Trusted admission
|
|
28
44
|
|
|
29
|
-
Before the first Worker launch, load the current `ready.yaml` and referenced canonical `implement-plan.json`; verify the Gate A binding, raw and canonical hashes, OpenSpec strict/planning status, Requirement → Scenario → Verification → Task traceability, capability closure, exact path/output contracts, repair policy, tracking contract, and sealed AGENTS operations.
|
|
45
|
+
Before the first Worker launch, load the current `ready.yaml` and referenced canonical `implement-plan.json`; verify both current owner-private Gate proofs and the finalization fact binding the exact delivery revision, receipt hash, and canonical plan hash, plus the Gate A binding, raw and canonical hashes, OpenSpec strict/planning status, Requirement → Scenario → Verification → Task traceability, capability closure, exact path/output contracts, repair policy, tracking contract, and sealed AGENTS operations.
|
|
30
46
|
|
|
31
47
|
An invalid or incomplete delivery is one aggregated `delivery-invalid` admission result.
|
|
32
|
-
|
|
48
|
+
Inspect every safe diagnostic together and use the returned parent-owned amendment continuation to repair an executable delivery before resuming.
|
|
33
49
|
Do not launch a Worker, consume a retry, mutate the main workspace, or infer a missing contract.
|
|
34
50
|
|
|
35
51
|
Gate approval is not tool permission.
|
|
@@ -37,7 +53,7 @@ A fresh context validates existing approval facts and does not ask the user to a
|
|
|
37
53
|
|
|
38
54
|
## Closed control surface
|
|
39
55
|
|
|
40
|
-
|
|
56
|
+
For durable run operations, use `abel_dispatch` only with the change commands below; never send `version`; never send `action: "run"`; and never send `admit-graph`, `task-attempt`, caller-owned snapshots, completed/blocked arrays, or apply identities.
|
|
41
57
|
|
|
42
58
|
```json
|
|
43
59
|
{"command":"start","stage":"abel-implement","change":"<change>","operationId":"<unique-operation>"}
|
|
@@ -48,16 +64,17 @@ Use `abel_dispatch` only with the change commands below; never send `version`; n
|
|
|
48
64
|
{"command":"discard","stage":"abel-implement","change":"<change>","operationId":"<unique-operation>"}
|
|
49
65
|
```
|
|
50
66
|
|
|
51
|
-
When
|
|
67
|
+
When a revised delivery is ready, resume the same run; the engine discovers and validates its `deliveryRevision` and `receiptHash` locally.
|
|
52
68
|
The engine revalidates retained phase/repair facts, invalidates only incompatible tasks, rebuilds tracking, and preserves compatible work.
|
|
53
69
|
|
|
54
70
|
`status` is local and must remain useful when every Worker endpoint is unavailable.
|
|
71
|
+
`discard` is an explicit destructive request; leaving the workflow uses `{"action":"finish"}` and preserves the run instead.
|
|
55
72
|
Repeating the same operation id returns its committed outcome.
|
|
56
73
|
Use a new operation id for a new attempt.
|
|
57
74
|
|
|
58
75
|
For an approval-needed retained run, a later explicit Implement invocation must inspect local `status`.
|
|
59
76
|
When a newer owner-private-proof-bound receipt is present, status exposes its exact pair in `availableDelivery`, adds `resume` to `legalCommands`, and fills the matching `conditionalCommands` arguments.
|
|
60
|
-
|
|
77
|
+
Ordinary resume resolves that pair locally; do not require the user to copy revision or hash data from a prior conversation.
|
|
61
78
|
Discovery never admits the delivery: `resume` still performs the full artifact, traceability, capability, and currentness validation before any Worker starts.
|
|
62
79
|
|
|
63
80
|
## Execution and verification
|
|
@@ -65,7 +82,7 @@ Discovery never admits the delivery: `resume` still performs the full artifact,
|
|
|
65
82
|
Before any candidate, the engine records target-contract, task-affected, and full-suite baselines with normalized failure identities.
|
|
66
83
|
A pre-existing failure remains separate and never satisfies Red or becomes evidence that this change caused it.
|
|
67
84
|
|
|
68
|
-
For each ready task the engine runs:
|
|
85
|
+
For each ready behavior task the engine runs:
|
|
69
86
|
|
|
70
87
|
1. Red in a disposable child revision; the declared target must fail with the approved identity.
|
|
71
88
|
2. Green with the minimum approved implementation; the declared target and task-affected contract must pass relative to baseline.
|
|
@@ -86,32 +103,93 @@ The main workspace stays unchanged before that transaction.
|
|
|
86
103
|
Ordinary failures stay inside this Implement run:
|
|
87
104
|
|
|
88
105
|
- `artifact`, wrong-Red identity, invalid/incomplete patch operation, stale candidate, or transport failure: use the bounded automatic attempt policy; after exhaustion pause with the last safe code and retain the last committed revision.
|
|
89
|
-
- Artifact correction
|
|
90
|
-
|
|
91
|
-
|
|
106
|
+
- Artifact, stale-candidate, and verification correction share the sealed `artifactCorrection.maxAttempts` of 2-3 attempts per verification obligation and phase, including the initial attempt.
|
|
107
|
+
Automatic retries carry the safe failure code, strategy, and available failure identities to the next Worker.
|
|
108
|
+
Exhaustion survives process restart and `resume`.
|
|
109
|
+
Operation ids, route binding, rollback revisions, task renaming, and contract rewording never clear it.
|
|
110
|
+
Dedicated private incident records own the budget; displayed attempt diagnostics are not authority.
|
|
111
|
+
A run shares one cumulative work budget: 24 plus three units per largest admitted phase count, bounded by the host limit captured at run start (default 512).
|
|
112
|
+
Recompiling, renaming or returning to a previous plan size never adds credit; a genuinely larger admitted decomposition may increase capacity without refunding consumption.
|
|
113
|
+
Execution reserves work durably before launch, including nested repair proposals; restart and post-launch cancellation do not refund consumed work.
|
|
114
|
+
- `environment` or `verification-adapter`: the executor pauses without speculative edits.
|
|
115
|
+
The parent inspects local diagnostics and restores available prerequisites using existing authorized capabilities, then resumes; baseline facts and completed phases are reused.
|
|
116
|
+
Do not request user input for a prerequisite the parent can restore.
|
|
117
|
+
Missing external credentials or unavailable services are reported only after local alternatives have been checked.
|
|
92
118
|
- `pre-existing`: keep as baseline evidence.
|
|
93
119
|
It does not authorize a code change and does not fail completion unless the change worsens it.
|
|
94
120
|
- `introduced` in a task-affected contract: reopen the owning task as `repairable`, perform the minimum bounded repair inside its approved paths, record `repair-verified`, and re-run attribution automatically.
|
|
95
121
|
- `unresolved` full-suite attribution: pause with failure identities and retained cumulative state; resume after evidence resolves ownership.
|
|
96
122
|
- `workspace-revision-stale`, conflict, cancellation, process interruption, or apply recovery: preserve user edits and resume from the last durable checkpoint.
|
|
97
|
-
Cancellation is budget-neutral.
|
|
123
|
+
Cancellation before execution is budget-neutral; cancellation after launch does not count as a product failure and does not refund consumed work.
|
|
98
124
|
During a partially visible final apply, recovery must settle before pause or discard.
|
|
99
|
-
- `result-limit
|
|
125
|
+
- `result-limit` or a task-splitting request inside existing authority: automatically try a compact complete patch using exact replacements under the same bounded policy.
|
|
126
|
+
If it still cannot fit, the executor pauses as `needs-task-split` or `task-split-needed` and supplies an amendment continuation.
|
|
127
|
+
The parent recommends a smaller task decomposition, compiles the revised DAG, and resumes; never accept a partial patch or bypass compilation of the task DAG.
|
|
100
128
|
|
|
101
129
|
No item above carries stage-routing metadata or asks the user to restart the approved workflow.
|
|
102
130
|
|
|
131
|
+
Treat ordinary recovery as internal work.
|
|
132
|
+
Workers may request additional ordinary regular-file reads within sealed task roots.
|
|
133
|
+
The parent grants exact paths, retains their content dependencies across phases and restart, and binds them to merge and final currentness; hidden files, private-key files, out-of-root paths, and writes do not receive this discovery permission.
|
|
134
|
+
Do not ask permission to correct approved code/tests, use task-wide approved read context, or retry within the sealed policy.
|
|
135
|
+
Use local status and read-only diagnostics to identify environmental prerequisites before asking the user; resume once a concrete capability has been restored, and reuse baseline facts and completed phases.
|
|
136
|
+
When status reports `recovery.exhausted`, do not issue unchanged `resume` calls.
|
|
137
|
+
Inspect retained evidence.
|
|
138
|
+
If status supplies a parent-owned amendment continuation, use it for a concrete plan correction; otherwise explain the specific missing capability or exhausted budget once.
|
|
139
|
+
Rewriting prose or renaming tasks is not a correction and never replenishes execution budgets.
|
|
140
|
+
A rebind may repair endpoint configuration but does not grant a new incident budget; do not repeatedly rebind and resume the same failure.
|
|
141
|
+
If a revised delivery already exists, local status also discovers its exact revision/hash for an exhausted run; resume with `availableDelivery` without asking the user to copy receipt data.
|
|
142
|
+
When `recovery.additionalAttempt` is present, the parent may make a concrete decision to retry once within remaining work capacity.
|
|
143
|
+
Copy that object into an ordinary resume request's optional `recovery` field; do not invent incident keys or failure sequences.
|
|
144
|
+
The default reason is `parent-directed-retry`; `route-changed` and `context-extended` additionally require control-plane evidence.
|
|
145
|
+
This consumes one launch without resetting automatic correction history; another failure pauses again.
|
|
146
|
+
Do not turn the availability of this option into an unconditional retry loop or another user approval round.
|
|
147
|
+
Environment, resource and report protocol failures are unavailable verification, not product failures; restore prerequisites and reverify retained candidates.
|
|
148
|
+
An unavailable endpoint, missing external credential, or irreducibly oversized task is not proof that product Design must restart.
|
|
149
|
+
|
|
103
150
|
## The only approval-needed boundary
|
|
104
151
|
|
|
105
|
-
Use `approval-needed` only when continuing requires authority not present in the sealed delivery: new observable behavior, architecture or policy; a new/changed dependency; an undeclared write/delete
|
|
152
|
+
Use `approval-needed` only when continuing requires authority not present in the sealed delivery: new observable behavior, architecture or policy; a new/changed dependency; an undeclared write/delete target or a read outside sealed discovery roots; expanded conflict/resource authority; a changed verification contract; an AGENTS target/impact/managed block change; or another irreversible scope decision.
|
|
106
153
|
|
|
107
154
|
Classify only codes in the closed authority table.
|
|
108
155
|
An unknown Worker, verifier, or internal approval code is an `approval-code-invalid` integrity pause; never guess a category or Gate from keywords.
|
|
109
156
|
|
|
110
|
-
Report
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
157
|
+
Report all known missing authority together using `blockers` and `decisionBatch.items`; merge related choices and reuse accepted same-task decisions.
|
|
158
|
+
The parent resolves new implementation choices with its recommended option under the accepted Design; do not ask the user for another decision round.
|
|
159
|
+
`approval-needed` is an internal requirement to compile updated authority before a Worker continues, not a request for user input.
|
|
160
|
+
`decisionBatch.resolution` identifies the parent as decision owner and `continuation` identifies the automatic next action.
|
|
161
|
+
Follow it in this turn.
|
|
162
|
+
`owner` and `automatic` are status metadata, not tool arguments.
|
|
163
|
+
For amendment use the exact `decisionBatch.continuation` envelope plus `request`; for resume send the closed command envelope with a new operationId.
|
|
164
|
+
A changed batch must cite the new evidence; never ask separately for each task's copy of the same decision.
|
|
165
|
+
Retain the Implement stage and original run.
|
|
166
|
+
`decisionBatch.continuation` supplies the exact `action: "amend"`, change, and batchId for the narrow private artifact revision channel.
|
|
167
|
+
After selecting the recommended solution, use that envelope with a `request` containing the existing closed Design artifact operations: start the same change, retain inherited decisions, record the parent-selected changes, write the required change artifacts, compile, and finalize.
|
|
168
|
+
This is implementation delegation from the accepted Design, not a fabricated new user answer.
|
|
169
|
+
The same channel is available for the allowlisted `delivery-invalid`, `needs-task-split`, and `task-split-needed` technical pauses; these do not need a user decision or a fabricated approval-needed classification.
|
|
170
|
+
Each run permits 64 mutating amendment attempts in a dedicated persistent budget.
|
|
171
|
+
Failed writes/compilations consume that budget, successful operation replay is free, and restart or a new batch does not replenish it.
|
|
172
|
+
Read-only status/preflight does not consume it.
|
|
173
|
+
Fix the exact structured diagnostic before retrying compilation.
|
|
174
|
+
Do not repeatedly submit unchanged invalid artifacts; once `amendmentBudget.exhausted` is true, stop mutation and report the retained result truthfully.
|
|
175
|
+
For example, begin the revision with the returned change and batchId:
|
|
176
|
+
|
|
177
|
+
```json
|
|
178
|
+
{"action":"amend","change":"<same-change>","batchId":"<current-batch-id>","request":{"operation":"start","change":"<same-change>","operationId":"<unique-operation>"}}
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
Use the returned private revision runId on subsequent amendment requests.
|
|
182
|
+
This channel does not activate Design, admit evidence packets, allow a different change, or grant product/AGENTS file writes.
|
|
183
|
+
Keep the approved goal and explicit constraints stable.
|
|
184
|
+
Automatic amendments retain Gate A and the structured ChangeContract.
|
|
185
|
+
They cannot renew Gate A, replace behavior decisions, or rewrite proposal/spec artifacts.
|
|
186
|
+
Resolve implementation gaps within the accepted goal, constraints and policy; when no conforming solution exists, report that concrete contract blocker and preserve progress rather than repeatedly attempting an invalid amendment.
|
|
187
|
+
Never weaken acceptance criteria just to obtain a passing result.
|
|
188
|
+
The compiler supplies Gate B automatically.
|
|
189
|
+
Finish all known items in the batch before finalizing, then issue ordinary resume.
|
|
190
|
+
Local delivery discovery supplies the newer verified revision/hash; do not ask the user to copy receipts or switch commands.
|
|
191
|
+
An unchanged resume cannot bypass a pending decision, and stale batch ids or unrelated revision runIds are rejected.
|
|
192
|
+
The user may explicitly choose a full Design discussion, but it is not the recovery instruction for an Implement blocker.
|
|
115
193
|
A generated artifact defect, endpoint outage, stale snapshot, environment failure, pre-existing failure, introduced in-boundary repair, approved documentation/test edit, or approved AGENTS checkpoint is never `approval-needed`.
|
|
116
194
|
|
|
117
195
|
## AGENTS and tracking
|
|
@@ -120,9 +198,14 @@ Design-time AGENTS read-only authority does not carry into Implement.
|
|
|
120
198
|
Gate B seals `none | update-existing | create-index | remove-index`, exact targets, owning task ids, verification, and the complete managed block.
|
|
121
199
|
The parent control plane applies those operations only in the private cumulative revision, preserves all human text outside `<!-- ABEL:AGENTS-INDEX:START -->` and `<!-- ABEL:AGENTS-INDEX:END -->`, and never gives an AGENTS write path to a Worker.
|
|
122
200
|
|
|
201
|
+
`remove-index` deletes a file only if no human content remains.
|
|
202
|
+
Runtime/session ids, credentials, approval state, and dirty-state ledgers never enter an index.
|
|
203
|
+
|
|
123
204
|
Task checkboxes are parent-owned progress facts.
|
|
124
205
|
The loader may normalize only `[x]`/`[X]` to `[ ]` for the sealed task ids when checking the delivery hash; every other byte remains integrity-bound.
|
|
125
206
|
|
|
207
|
+
When an approved browser E2E check requires `dev-browser` and it is unavailable, pause only that check; continue independent work when safe.
|
|
208
|
+
|
|
126
209
|
## Truthful completion
|
|
127
210
|
|
|
128
211
|
Treat `queued`, `connecting`, `waiting-first-response`, `running`, `validating`, `retrying`, `verifying`, `paused`, `approval-needed`, `applying`, and `recovering` as nonterminal activity states.
|
|
@@ -131,9 +214,24 @@ Tool-call settlement is not success.
|
|
|
131
214
|
Report success only when the durable state is `completed`, final application and post-apply verification committed, and private run content was cleaned.
|
|
132
215
|
Terminal `completed`, `discarded`, or `rejected` settlement deactivates private dispatch; a nonterminal pause or approval wait keeps it active for direct follow-up.
|
|
133
216
|
|
|
134
|
-
On a nonterminal result
|
|
217
|
+
On a nonterminal result with an automatic parent continuation, execute it and continue working; do not present internal Gate names, batch ids, receipts, or resume commands as user tasks.
|
|
218
|
+
If automatic recovery is unavailable after investigation or its budget is exhausted, report the concrete blocker, retained progress, and only the external input needed to proceed.
|
|
219
|
+
Respect explicit cancellation and never resume it automatically.
|
|
135
220
|
Never hide an incomplete run behind a success checkmark.
|
|
136
221
|
|
|
137
222
|
Do not archive, publish, release, stage, or commit implicitly.
|
|
138
223
|
|
|
139
224
|
<!-- ABEL:END -->
|
|
225
|
+
|
|
226
|
+
## Evidence modes and environment identity
|
|
227
|
+
|
|
228
|
+
Follow the compiled task `verificationMode`.
|
|
229
|
+
The default `behavior` mode retains Red/Green.
|
|
230
|
+
Explicitly approved `mechanical` and `refactor` modes start execution at Green after baseline capture; do not invent a failing test or request a Red Worker.
|
|
231
|
+
The compiler checks mode authority, path suitability and protected verifier inputs.
|
|
232
|
+
All modes retain cumulative verification, output checks and transactional apply.
|
|
233
|
+
|
|
234
|
+
`verification-environment-changed` is an unavailable environment, not a product regression.
|
|
235
|
+
Installed dependency and runner content is bound to evidence; resume in a changed environment rebuilds baseline and revalidates retained phases.
|
|
236
|
+
Reuse compatible sealed candidates.
|
|
237
|
+
Do not edit product code to compensate for missing or drifting tools.
|
package/prompts/abel-init.md
CHANGED
|
@@ -3,14 +3,16 @@ description: Initialize or safely repair an Abel OpenSpec project
|
|
|
3
3
|
argument-hint: "[project-path]"
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
This procedure applies only when the user explicitly invokes `/abel-init`.
|
|
7
|
+
Reading this file, mentioning the command, or finding OpenSpec artifacts does not activate it.
|
|
8
8
|
Read the complete value inside `<abel-request>` without tokenizing it a second time.
|
|
9
9
|
|
|
10
10
|
<abel-request>
|
|
11
11
|
$ARGUMENTS
|
|
12
12
|
</abel-request>
|
|
13
13
|
|
|
14
|
+
<!-- ABEL:PROMPT:abel-init -->
|
|
15
|
+
|
|
14
16
|
The request is an optional project path; when absent, use the current working directory.
|
|
15
17
|
Resolve and report the canonical target root before action.
|
|
16
18
|
|
|
@@ -34,6 +36,8 @@ Resolve and report the canonical target root before action.
|
|
|
34
36
|
5. Resolve and validate the selected schema and templates before claiming readiness.
|
|
35
37
|
6. Create or repair only verified `<!-- ABEL:AGENTS-INDEX:START -->` … `<!-- ABEL:AGENTS-INDEX:END -->` managed regions.
|
|
36
38
|
Preserve every byte of human content outside those markers and do not cross nested repositories.
|
|
39
|
+
Keep the index descriptive: file locations and ordinary project commands only; never instruct ordinary tasks to enter an Abel workflow.
|
|
40
|
+
Never record runtime/session ids, credentials, approval state, or dirty-state ledgers.
|
|
37
41
|
7. Re-run all probes after writes.
|
|
38
42
|
A second identical Init must produce no additional changes.
|
|
39
43
|
|
|
@@ -43,3 +47,6 @@ Do not probe `git-commit`, external `dev-browser`, or a dedicated time Skill; no
|
|
|
43
47
|
|
|
44
48
|
Report one final result with the root, selected toolchain, actions actually taken, OpenSpec capability/schema/template evidence, AGENTS files changed or unchanged, research-Skill paths or remediation, and `ready | partial | paused`.
|
|
45
49
|
Never report success from the initial probe when the post-write recheck did not pass.
|
|
50
|
+
|
|
51
|
+
Init ends with that report; later ordinary tasks use normal engineering behavior.
|
|
52
|
+
Never start another Abel stage, archive, publish, release, stage, or commit implicitly.
|