@abelxiaoxing/cadence 1.0.1 → 1.0.2
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/package.json +1 -1
- package/prompts/abel-implement.md +13 -2
- package/skills/abel-workflow/SKILL.md +7 -1
- package/src/candidate-preflight.ts +1163 -0
- package/src/child-session.ts +46 -5
- package/src/contracts.ts +379 -48
- package/src/file-snapshot.ts +62 -8
- package/src/index.ts +55 -10
- package/src/parent-payload-bridge.ts +442 -0
- package/src/parent-provider.ts +91 -12
- package/src/patch.ts +73 -3
- package/src/result-store.ts +40 -3
- package/src/runtime.ts +775 -66
- package/src/scheduler.ts +1 -0
- package/src/scoped-tools.ts +27 -6
- package/src/submit-tool.ts +3 -1
- package/src/worker.ts +136 -26
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abelxiaoxing/cadence",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "Prompts, skills, and a private orchestration extension exposing the Abel four-stage workflow (/abel-init, /abel-design, /abel-implement, /abel-diagnose) with package-owned professional Agents.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -81,7 +81,8 @@ Implement 不重新作出或请求 Gate A/B 决策;只有 Gate receipts、arti
|
|
|
81
81
|
worker 消费任务契约的普通缩进符号列表(绝非 Markdown 复选框):前置条件、直接依赖、派发上下文、计划写集、冲突/资源锁、验证类型、Red 命令/预期失败原因、Green 预期行为、受影响套件命令、目标范围和 AGENTS 影响。
|
|
82
82
|
|
|
83
83
|
1. **🔴 Red(worker → 父代理)**:worker 只用契约规定的验证类型与范围生成失败验证 diff;父代理审查并应用后运行 Red 命令,必须因契约描述的目标缺陷失败。
|
|
84
|
-
|
|
84
|
+
加载/导入失败、未运行目标测试或失败身份与批准身份不同时,将结果分类为生成的实现产物拒绝并进入有界修正路径。
|
|
85
|
+
若 Red 在预检候选上通过,或批准命令无法在不改变行为、策略、依赖、架构、范围、写集或验证契约的情况下见证批准行为,则 Red 契约无效:立即返回 `/abel-design --change <name>`,不得消耗产物修正预算。
|
|
85
86
|
非行为变更任务以指定的失败静态验证起步;仅人工任务返回 Design。
|
|
86
87
|
2. **🟢 Green(worker → 父代理)**:同一 worker 基于已确认的 Red 证据生成最小实现 diff;父代理审查并应用后运行目标验证。
|
|
87
88
|
失败证据回传 worker,仅允许在声明写集和已批准行为内生成修正 diff。
|
|
@@ -93,6 +94,14 @@ worker 消费任务契约的普通缩进符号列表(绝非 Markdown 复选框
|
|
|
93
94
|
- 校验已索引的路径/命令/根到嵌套路由;运行该任务的 AGENTS 验证命令。
|
|
94
95
|
6. 父代理重跑目标与受影响验证;全绿后,仅在 schema `apply.tracks` 解析出的具体跟踪文件中更新匹配的那个任务复选框;零个/多个匹配 → 停止并返回 design。
|
|
95
96
|
|
|
97
|
+
Syntax, import/load, no-test, malformed-diff, and wrong-Red-identity failures are generated implementation-artifact rejection.
|
|
98
|
+
A wrong-Red result follows the same bounded artifact-correction path.
|
|
99
|
+
Every artifact rejection uses a finite artifact correction budget shared with the phase's mechanical redispatch budget.
|
|
100
|
+
When the artifact correction budget is exhausted, report `implementation-artifact-delivery-blocked`; it must not automatically return, transition, or route to Design.
|
|
101
|
+
An invalid Red contract is one where Red passes against the preflighted candidate, or where the approved command cannot witness the approved behavior without a substantive behavior, policy, dependency, architecture, scope, write-set, or verification-contract change.
|
|
102
|
+
An invalid Red contract must immediately return the contract defect to Design and must not consume the artifact correction budget.
|
|
103
|
+
Only an invalid Red contract or another substantive change to behavior, policy, dependency, architecture, scope, write set, or verification contract may route the branch to Design.
|
|
104
|
+
|
|
96
105
|
父代理拥有主工作区补丁应用、闸门、索引写入与任务完成状态;子代理只接收任务局部索引上下文,只返回统一 diff 与分析,绝不应用补丁、批准决策、编辑索引或推进状态。
|
|
97
106
|
|
|
98
107
|
## 最终评审与收尾
|
|
@@ -128,6 +137,8 @@ AGENTS: {none 的证据 | 更新的索引文件与原因}
|
|
|
128
137
|
If the required input is missing or absent, or the request is ambiguous and not unique, stop before any work and ask the user for the missing or clarified input.
|
|
129
138
|
|
|
130
139
|
Record target, affected suite, and full-suite baselines before writing; keep pre-existing failures separate and never attribute them to the task Red.
|
|
131
|
-
Red must fail with the expected identity
|
|
140
|
+
Red must fail with the expected identity; a wrong reason is a generated implementation-artifact rejection handled by bounded correction.
|
|
141
|
+
If Red passes against the preflighted candidate or the approved command cannot witness the approved behavior, the invalid Red contract returns immediately to Design without consuming the artifact correction budget.
|
|
142
|
+
After Green the target and affected suite must be green, in Red-Green-Refactor order, with a stable AGENTS index at checkpoints and no new failure relative to the recorded baseline.
|
|
132
143
|
A fresh-context handoff validates the Gate receipt, hash, and trace strictly without requesting Gate approval again.
|
|
133
144
|
You must not archive, publish, or commit implicitly: only explicit parent actions may do so.
|
|
@@ -34,7 +34,13 @@ Use Red-Green-Refactor for code, tests, and executable static contracts:
|
|
|
34
34
|
2. **Green:** implement the minimum approved change and run the target verification after every code or test edit.
|
|
35
35
|
3. **Refactor:** improve only in-scope structure or readability while target verification stays green; then run the affected suite.
|
|
36
36
|
|
|
37
|
-
|
|
37
|
+
Syntax, import/load, no-test, malformed-diff, and wrong-Red-identity failures are generated implementation-artifact rejection.
|
|
38
|
+
A wrong-Red result uses the same bounded artifact-correction path.
|
|
39
|
+
Every artifact rejection receives a finite correction budget shared with the phase's mechanical redispatch budget.
|
|
40
|
+
When the artifact correction budget is exhausted, report `implementation-artifact-delivery-blocked`; it must not automatically return, transition, or route to Design.
|
|
41
|
+
An invalid Red contract is one where Red passes against the preflighted candidate, or where the approved command cannot witness the approved behavior without a substantive behavior, policy, dependency, architecture, scope, write-set, or verification-contract change.
|
|
42
|
+
An invalid Red contract must immediately return the contract defect to Design and must not consume the artifact correction budget.
|
|
43
|
+
Only an invalid Red contract or another substantive behavior, policy, dependency, architecture, scope, write-set, or verification-contract change returns the requirement to Design.
|
|
38
44
|
|
|
39
45
|
### Implement affected-suite repair boundary
|
|
40
46
|
|