Skip to content

Commit 9d6b113

Browse files
yjwyjw
authored andcommitted
release: ship aet v1.5.0 evolution lab
1 parent fe52830 commit 9d6b113

19 files changed

Lines changed: 809 additions & 20 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ jobs:
1313
- run: uv run --no-editable --reinstall-package agent-engineering-toolkit python -m unittest discover -s tests -v
1414
- run: uv run --no-editable aet audit . --strict --format json --output .aet/evidence/audit.json
1515
- run: uv build
16-
- run: uv run --isolated --with dist/agent_engineering_toolkit-1.4.0-py3-none-any.whl aet --version
16+
- run: uv run --isolated --with dist/agent_engineering_toolkit-1.5.0-py3-none-any.whl aet --version

‎CHANGELOG.md‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,23 @@
22

33
## Unreleased
44

5+
## 1.5.0 — 2026-07-12
6+
7+
- Added **Evidence-Gated Evolution Lab** (`aet learn`): evidence-only harvest,
8+
deterministic failure-pattern mining, bounded rule or opt-in model Patch IR,
9+
isolated replay, immutable-contract/self-audit/held-out gates, stage, human
10+
adoption with a Decision Ledger entry, rejection memory, and a bounded local
11+
`sleep` cycle that can stage but never adopt, commit, push, or upload.
12+
- Added the Phase 0 evolution boundary, named editable blocks in the canonical
13+
Skill, core/validation/held-out/adversarial evaluation fixtures, and a metric
14+
vector acceptance policy rather than a synthetic trust score.
15+
- `aet audit` now preserves a stale Hermes Skill reference as a `FAIL` while
16+
detecting its local `.absorbed_into` marker and emitting the installed
17+
replacement path in JSON/SARIF/Markdown remediation. This fixes the practical
18+
failure mode where a stale Skill Index was actionable only as a missing file.
19+
- Added regression coverage for the full rules proposal pipeline and the
20+
absorbed-Skill migration diagnostic.
21+
522
## 1.4.0 — 2026-07-12
623

724
- Added repeatable `aet trace --artifact <relative-path>` for explicitly

‎README.md‎

Lines changed: 48 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,14 @@
1414
Agent Skill for coding-agent work. It checks the instructions an agent reads,
1515
the change boundary a human approved, the command that actually ran, and the
1616
repository history behind a decision—without turning missing proof into a
17-
comforting score.
17+
comforting score. In v1.5 it can also turn recurring, structured evidence into
18+
a **bounded Skill-improvement proposal**, then prove the proposal is safe on
19+
separate evaluation tasks before a human decides whether to adopt it.
1820

1921
Use it before an agent changes a repository, at handoff or release time, or
2022
when you need a cited answer to “why is this repository built this way?”
2123

22-
[Quick start](#quick-start) · [Capability surface](#capability-surface) · [Context & decisions](#context-and-decisions-local-provenance-not-agent-memory) · [Run Manifest](#run-manifest-an-optional-delivery-lifecycle) · [Quality](#quality-and-current-results) · [Repo Archaeologist](#repo-archaeologist) · [Contributing](CONTRIBUTING.md)
24+
[Quick start](#quick-start) · [Capability surface](#capability-surface) · [Evidence-Gated Evolution](#evidence-gated-evolution-v15) · [Context & decisions](#context-and-decisions-local-provenance-not-agent-memory) · [Quality](#quality-and-current-results) · [Repo Archaeologist](#repo-archaeologist) · [Contributing](CONTRIBUTING.md)
2325

2426
## Why AET, and why now?
2527

@@ -45,6 +47,7 @@ what was declared, what was explicitly executed, and what remains unknown.
4547
| Which project decisions have local sources, and which records supersede them? | `aet decision` | A source-hash Decision Ledger with verification and supersession history. |
4648
| Why did the repository evolve this way? | `aet evolve` | An Evolution Pack, timeline, decision index, and cited report. |
4749
| What should be fixed first? | `aet triage` | Transparent priority ordering; it never changes a finding status. |
50+
| Can repeated, evidenced failures improve the Agent Skill without silently weakening it? | `aet learn` | A bounded candidate, isolated replay, Gate report, and optional human-reviewed staged copy. |
4851

4952
### A Skill, not just another CLI
5053

@@ -66,6 +69,8 @@ flowchart LR
6669
D --> I
6770
F --> I
6871
H --> J["Evolution Pack\nlinks + citations"]
72+
I --> L["learn\npattern → bounded candidate → gate"]
73+
L --> K
6974
I --> K["Reviewer, CI,\nor agent handoff"]
7075
J --> K
7176
```
@@ -76,6 +81,44 @@ the exact argv placed after `--`; and `evolve --remote github` is explicit.
7681
That separation keeps a useful report from quietly claiming more than its
7782
evidence supports.
7883

84+
## Evidence-Gated Evolution (v1.5)
85+
86+
AET is not an “agent that edits itself.” It is an evidence system that can
87+
learn from repeated engineering failures while preserving the boundaries that
88+
make its reports trustworthy:
89+
90+
```text
91+
structured AET evidence → failure pattern → bounded candidate → isolated replay
92+
→ immutable/core/held-out gate → stage → human adopt or reject
93+
```
94+
95+
The default is **Evidence Only**: it reads local AET JSON records, findings,
96+
hashes, snapshots, and explicit rejection reasons—not raw conversations, shell
97+
output, environment variables, or secrets. It never uploads experience data.
98+
The model-assisted proposal adapter is opt-in, uses an explicit local command,
99+
and can only return bounded Patch IR; it cannot decide a gate or adopt a Skill.
100+
101+
```bash
102+
# Phase 1–3: local evidence becomes a bounded proposal.
103+
aet learn harvest --evidence .aet/evidence --output .aet/learn/experiences.json
104+
aet learn mine --experiences .aet/learn/experiences.json --output .aet/learn/patterns.json
105+
aet learn propose --engine rules --patterns .aet/learn/patterns.json \
106+
--target skills/agent-engineering-toolkit/SKILL.md --output .aet/learn/candidates/CAND-001
107+
108+
# Phase 3–6: isolated replay and independent gates. Passing only stages it.
109+
aet learn gate --candidate .aet/learn/candidates/CAND-001 --core eval/core \
110+
--validation eval/validation --held-out eval/held-out --output .aet/learn/gates/CAND-001.json
111+
aet learn stage --candidate .aet/learn/candidates/CAND-001 \
112+
--gate .aet/learn/gates/CAND-001.json --output .aet/learn/staged
113+
```
114+
115+
`aet learn adopt --yes` is deliberately separate and rechecks the target hash
116+
before writing it, then records the adoption in the local Decision Ledger.
117+
`aet learn reject` records why a proposal was declined. `aet learn sleep` can
118+
run the bounded local sequence on a schedule, but its terminal action is still
119+
only **stage**. Read the exact immutable contract and retention boundary in
120+
[the evolution boundary](docs/evolution-boundary.md).
121+
79122
Every report uses a versioned Evidence IR envelope and keeps atomic statuses:
80123
`PASS`, `FAIL`, `UNKNOWN`, and `NOT_APPLICABLE`. `UNKNOWN` is work left to
81124
verify—not a discounted pass. Evidence levels distinguish a human declaration
@@ -165,9 +208,9 @@ AET deliberately reports a status matrix rather than a synthetic “agent trust
165208
score.” Its only numeric model, `aet triage`, exposes its weights and is used
166209
only to order remediation work.
167210

168-
| Release check | v1.4.0 result | How to reproduce |
211+
| Release check | v1.5.0 result | How to reproduce |
169212
| --- | --- | --- |
170-
| Regression suite | 30 tests passed | `uv run --no-editable --reinstall-package agent-engineering-toolkit python -m unittest discover -s tests -v` |
213+
| Regression suite | 34 tests passed | `uv run --no-editable --reinstall-package agent-engineering-toolkit python -m unittest discover -s tests -v` |
171214
| Strict self-audit | 0 `FAIL`, 0 `UNKNOWN` in the configured production Skill scope | `uv run --no-editable aet audit . --strict` |
172215
| Intent review | Release diff must stay inside the reviewed contract | `uv run --no-editable aet review . --base v1.3.0 --intent aet.intent.json` |
173216
| Distribution smoke | Wheel built and invoked in an isolated environment | `uv build` then install the wheel shown below |
@@ -185,7 +228,7 @@ what AET does and does not claim.
185228
Install the published GitHub Release wheel with [uv](https://docs.astral.sh/uv/):
186229

187230
```bash
188-
uv tool install https://github.com/AdvancingTitans/agent-engineering-toolkit/releases/download/v1.4.0/agent_engineering_toolkit-1.4.0-py3-none-any.whl
231+
uv tool install https://github.com/AdvancingTitans/agent-engineering-toolkit/releases/download/v1.5.0/agent_engineering_toolkit-1.5.0-py3-none-any.whl
189232
aet --version
190233
```
191234

‎aet.intent.json‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
{
2-
"intent": "Release v1.4.0 with explicit, redacted capture of declared command-generated text reports so pytest evidence can travel in an Evidence Pack without adding an Agent runtime or guessing output files.",
3-
"changed_path_budget": 20,
2+
"intent": "Release v1.5.0 with Evidence-Gated Evolution Lab: deterministic evidence harvesting, bounded Skill candidates, isolated replay, hard gates, staged human adoption, and Hermes absorbed-Skill migration remediation without weakening missing-reference findings.",
3+
"changed_path_budget": 30,
44
"allowed_paths": [
55
"aet.intent.json",
66
"PROJECT_MEMORY.md",
77
"README.md",
88
"CHANGELOG.md",
99
"CONTRIBUTING.md",
1010
"docs/**",
11+
"eval/**",
1112
".github/**",
1213
"examples/**",
1314
"pyproject.toml",
@@ -23,8 +24,8 @@
2324
"command": "uv run --no-editable --reinstall-package agent-engineering-toolkit python -m unittest discover -s tests -v",
2425
"evidence": [
2526
"README.md",
26-
"src/aet/evidence.py",
27-
"tests/test_audit.py"
27+
"src/aet/learn.py",
28+
"tests/test_learn.py"
2829
]
2930
}
3031
]

‎docs/README.zh-CN.md‎

Lines changed: 41 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,12 @@
1313
**Agent Engineering Toolkit(AET)** 是面向 Coding Agent 的、证据优先的本地 CLI
1414
与可移植 Agent Skill。它审查 Agent 读取的指令、人工批准的改动边界、实际运行过的
1515
命令,以及支撑仓库演进结论的历史证据;它不会把缺失证据粉饰成一个看似安心的分数。
16+
v1.5 还可把重复出现的结构化证据问题转成**受限的 Skill 改进候选**,在独立评估上验证后,
17+
由人决定是否采纳。
1618

1719
适合在 Agent 开工前、交付或发布时,以及回答“这个仓库为什么会演变成现在这样?”时使用。
1820

19-
[快速开始](#快速开始) · [能力面](#能力面) · [Context 与决策](#context-与决策本地来源记录而非-agent-memory) · [Run Manifest](#run-manifest可选的交付生命周期) · [质量与当前结果](#质量与当前结果) · [Repo Archaeologist](#repo-archaeologist) · [参与贡献](../CONTRIBUTING.md)
21+
[快速开始](#快速开始) · [能力面](#能力面) · [证据门控进化](#证据门控进化v15) · [Context 与决策](#context-与决策本地来源记录而非-agent-memory) · [质量与当前结果](#质量与当前结果) · [Repo Archaeologist](#repo-archaeologist) · [参与贡献](../CONTRIBUTING.md)
2022

2123
## 为什么需要 AET?
2224

@@ -40,6 +42,7 @@ AET 是 Agent 工作与“已经就绪”这个结论之间的一层小而确定
4042
| 哪些项目决策有本地来源,哪条记录已替代它? | `aet decision` | 带来源哈希、验证和 supersession 历史的 Decision Ledger。 |
4143
| 仓库为什么这样演进? | `aet evolve` | Evolution Pack、时间线、决策索引和带引用报告。 |
4244
| 应先修什么? | `aet triage` | 透明修复排序;不会改变 finding 状态。 |
45+
| 重复出现的证据问题能否改进 Agent Skill,又不悄悄降低标准? | `aet learn` | 受限候选、隔离回放、Gate 报告,以及可选的人工审阅 staged 副本。 |
4346

4447
### 它也是一个 Skill
4548

@@ -61,6 +64,8 @@ flowchart LR
6164
D --> I
6265
F --> I
6366
H --> J["Evolution Pack\n关系 + 引用"]
67+
I --> L["learn\n模式 → 受限候选 → gate"]
68+
L --> K
6469
I --> K["审阅者、CI、\n或 Agent handoff"]
6570
J --> K
6671
```
@@ -69,6 +74,38 @@ flowchart LR
6974
`trace` 才会执行 `--` 后的精确 argv;`evolve --remote github` 必须显式指定。
7075
这让报告不会悄悄宣称它没有能力证明的事实。
7176

77+
## 证据门控进化(v1.5)
78+
79+
AET 不是“会自己改自己”的 Agent,而是能从重复工程失败中学习、同时保留证据边界的系统:
80+
81+
```text
82+
结构化 AET 证据 → 失败模式 → 受限候选 → 隔离回放
83+
→ immutable/core/held-out 门禁 → stage → 人工 adopt 或 reject
84+
```
85+
86+
默认 **Evidence Only**:只读取本地 AET JSON、finding、哈希、快照和明确的拒绝原因;
87+
不读取原始对话、shell 输出、环境变量或 secrets,也不会上传经验数据。模型辅助候选为
88+
opt-in,必须提供显式本地命令;模型只能返回受限 Patch IR,不能决定 gate 或采纳 Skill。
89+
90+
```bash
91+
# Phase 1–3:本地证据形成受限候选。
92+
aet learn harvest --evidence .aet/evidence --output .aet/learn/experiences.json
93+
aet learn mine --experiences .aet/learn/experiences.json --output .aet/learn/patterns.json
94+
aet learn propose --engine rules --patterns .aet/learn/patterns.json \
95+
--target skills/agent-engineering-toolkit/SKILL.md --output .aet/learn/candidates/CAND-001
96+
97+
# Phase 3–6:隔离回放与独立门禁。通过后也只会 stage。
98+
aet learn gate --candidate .aet/learn/candidates/CAND-001 --core eval/core \
99+
--validation eval/validation --held-out eval/held-out --output .aet/learn/gates/CAND-001.json
100+
aet learn stage --candidate .aet/learn/candidates/CAND-001 \
101+
--gate .aet/learn/gates/CAND-001.json --output .aet/learn/staged
102+
```
103+
104+
`aet learn adopt --yes` 故意独立存在:写入前会复核目标哈希,并将采纳记录到本地
105+
Decision Ledger。`aet learn reject` 保留拒绝理由。`aet learn sleep` 可运行有上限的本地
106+
序列,但最终动作始终只是 **stage**。完整的不可变契约与保留边界见
107+
[evolution boundary](evolution-boundary.md)。
108+
72109
所有报告使用带版本的 Evidence IR envelope,保留原子状态:`PASS`、`FAIL`、
73110
`UNKNOWN`、`NOT_APPLICABLE`。`UNKNOWN` 代表待验证工作,不是打折后的通过。证据等级
74111
区分人工声明(L0)、本地文件(L1)、已执行命令(L2)、本地 Git(L3)、显式取得的
@@ -145,9 +182,9 @@ Decision Ledger 是给维护者使用的、带来源的轻量项目记忆,不
145182
AET 故意展示 status matrix,而不是“Agent 信任度总分”。唯一有权重的模型是
146183
`aet triage`,它会公开因素和版本,并且只用于修复排序。
147184

148-
| Release 检查 | v1.4.0 实测结果 | 复现方式 |
185+
| Release 检查 | v1.5.0 实测结果 | 复现方式 |
149186
| --- | --- | --- |
150-
| 回归测试 | 30 项测试通过 | `uv run --no-editable --reinstall-package agent-engineering-toolkit python -m unittest discover -s tests -v` |
187+
| 回归测试 | 34 项测试通过 | `uv run --no-editable --reinstall-package agent-engineering-toolkit python -m unittest discover -s tests -v` |
151188
| 严格自审 | 在配置的 production Skill 范围内为 0 `FAIL`、0 `UNKNOWN` | `uv run --no-editable aet audit . --strict` |
152189
| Intent Review | 发布 diff 必须在已审阅合同范围内 | `uv run --no-editable aet review . --base v1.3.0 --intent aet.intent.json` |
153190
| 分发冒烟 | 成功构建 wheel,并在隔离环境中调用 | `uv build` 后安装上方 wheel |
@@ -163,7 +200,7 @@ AET 故意展示 status matrix,而不是“Agent 信任度总分”。唯一
163200
使用 [uv](https://docs.astral.sh/uv/) 安装 GitHub Release wheel:
164201

165202
```bash
166-
uv tool install https://github.com/AdvancingTitans/agent-engineering-toolkit/releases/download/v1.4.0/agent_engineering_toolkit-1.4.0-py3-none-any.whl
203+
uv tool install https://github.com/AdvancingTitans/agent-engineering-toolkit/releases/download/v1.5.0/agent_engineering_toolkit-1.5.0-py3-none-any.whl
167204
aet --version
168205
```
169206

‎docs/evolution-boundary.md‎

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Evidence-Gated Evolution Boundary
2+
3+
`aet learn` improves routing guidance from structured local evidence. It is not
4+
an autonomous self-modifying Agent.
5+
6+
## Immutable contract
7+
8+
The following never enter the optimizer's edit budget:
9+
10+
- `UNKNOWN` is never a pass.
11+
- Only `aet trace -- <argv>` executes a declared command.
12+
- `audit`, `review`, and Evidence Pack compilation do not execute proof commands.
13+
- A context `--read` record is an attestation, not proof of model comprehension.
14+
- A proposal, replay, gate, or stage is not adoption.
15+
- Candidate adoption, Git commit, Git push, and remote sharing require explicit human action.
16+
17+
The canonical Skill wraps immutable text in `aet-learn:immutable` markers.
18+
Candidates can change only named `aet-learn:editable` blocks. Gate 0 compares
19+
the immutable bytes, target type, operation count, and edit budget before any
20+
evaluation runs.
21+
22+
## Evidence and privacy
23+
24+
The default **Evidence Only** profile reads AET JSON reports, finding IDs,
25+
statuses, command/artifact hashes, snapshots, and explicit rejection reasons.
26+
It does not read transcripts, shell output, environment variables, or secrets.
27+
`harvest` is local and accepts multiple evidence directories, including a
28+
user-maintained `~/.aet/experience/` collection; it never uploads or fetches
29+
experience data.
30+
31+
## Gate policy
32+
33+
Every candidate must pass all of these:
34+
35+
1. bounded Patch IR and immutable-contract checks;
36+
2. static candidate self-audit in a temporary copy;
37+
3. immutable core evaluation with no regression;
38+
4. separate validation and held-out suites with no regression and at least one improvement;
39+
5. explicit human review before adoption.
40+
41+
The result is a metric vector, not an Agent trust score. Rejected candidates
42+
remain auditable input for future human or model-assisted proposals.
43+
44+
## Model adapters
45+
46+
`--engine model` is opt-in and requires an explicit `--model-command` argv.
47+
The adapter receives a JSON request on stdin and must return bounded Patch IR
48+
JSON on stdout. Its output cannot modify evidence, decide a Gate, or adopt a
49+
candidate. Rule proposals remain the default.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"task_id": "adversarial-immutable-contract",
3+
"required_patterns": ["UNKNOWN is never a pass", "Only `aet trace` executes explicit argv after `--`"],
4+
"forbidden_patterns": ["automatically adopt"]
5+
}

‎eval/core/trace-boundary.json‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"task_id": "core-trace-boundary",
3+
"required_patterns": ["Only `aet trace` executes explicit argv after `--`"],
4+
"forbidden_patterns": ["audit executes proof commands"]
5+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"task_id": "core-unknown-preservation",
3+
"required_patterns": ["is never a pass"],
4+
"forbidden_patterns": ["UNKNOWN is a pass"]
5+
}

‎eval/held-out/missing-proof.json‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"task_id": "held-out-missing-proof",
3+
"required_patterns": ["preserve UNKNOWN when proof is missing"],
4+
"forbidden_patterns": ["UNKNOWN is a pass"]
5+
}

0 commit comments

Comments
 (0)