Skip to content

Commit c12aa48

Browse files
committed
docs: fix I-02 semantics across all invariant tables
The internal invariants.md and AGENTS.md had I-02 mapped to budget enforcement (size/depth/field count). The weaver-spec defines I-02 as 'Every Execution Is Authorized and Auditable'. Fix all affected files to use the correct weaver-spec definition: - AGENTS.md: I-02 → authorization + auditability; add note that budget enforcement is an agent-kernel implementation constraint (not a separate weaver-spec invariant number) - docs/agent-context/invariants.md: same correction; add blockquote clarifying budget enforcement's relationship to I-01 - README.md I-02 'How satisfied' cell: replace claim that PolicyEngine evaluates every invocation (incorrect — it runs at grant time only) with accurate two-phase description: PolicyEngine at grant time, verify() at invoke(), TraceStore always - ci.yml: drop version numbers from stub comment to avoid v0.1.0/v0.2.0 mismatch (whoever activates the stub will pin the right version) - CHANGELOG: fix job name reference conformance → conformance_stub
1 parent 7e42c07 commit c12aa48

5 files changed

Lines changed: 11 additions & 5 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ jobs:
6565
run: pip install -e ".[dev]"
6666

6767
# Placeholder: activate once dgenio/weaver-spec#4 ships the conformance runner.
68-
# weaver-spec v0.2.0 and weaver-contracts 0.2.0 are published on PyPI.
68+
# weaver-spec and weaver-contracts are published on PyPI.
6969
# weaver_contracts.conformance does not yet exist (dgenio/weaver-spec#4).
7070
# Replace this step with:
7171
# pip install weaver-contracts # PyPI dist name uses a hyphen

AGENTS.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,12 @@ agent-kernel is part of the **Weaver ecosystem**:
2525

2626
This repo must conform to weaver-spec invariants. Key invariants (all equally critical):
2727
- **I-01**: Every tool output must pass through a context boundary before reaching the LLM.
28-
- **I-02**: Context boundaries must enforce budgets (size, depth, field count).
28+
- **I-02**: Every execution must be authorized and auditable (preceded by a policy decision, followed by a trace event).
2929
- **I-06**: Tokens must bind principal + capability + constraints; no reuse across principals.
3030

31+
Note: Budget enforcement (size, depth, field count) is an agent-kernel implementation
32+
constraint that satisfies I-01 — it is not a separate weaver-spec invariant number.
33+
3134
Full spec: [dgenio/weaver-spec](https://github.com/dgenio/weaver-spec)
3235

3336
## Domain vocabulary

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99

1010
### Added
1111
- Declared weaver-spec v0.1.0 compatibility in README: invariants I-01 (firewall), I-02 (authorization + audit), and I-06 (scoped tokens) are satisfied.
12-
- Added placeholder `conformance` CI job that will activate once the weaver-spec conformance suite ships (dgenio/weaver-spec#4).
12+
- Added placeholder `conformance_stub` CI job that will activate once the weaver-spec conformance suite ships (dgenio/weaver-spec#4).
1313

1414
## [0.4.0] - 2026-03-14
1515

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ The following invariants are satisfied:
118118
| Invariant | Description | How agent-kernel satisfies it |
119119
|-----------|-------------|-------------------------------|
120120
| **I-01** | LLM never sees raw tool output by default | `Context Firewall` always transforms `RawResult → Frame`; raw driver output is not returned by default, and non-admin principals cannot obtain `raw` response mode |
121-
| **I-02** | Every execution is authorized and auditable | `PolicyEngine` evaluates every invocation; `TraceStore` records every `ActionTrace`; `HMACTokenProvider` validates tokens before execution |
121+
| **I-02** | Every execution is authorized and auditable | `PolicyEngine` authorizes at grant time; a valid `CapabilityToken` (HMAC-verified on every `invoke()`) carries the authorization decision; `TraceStore` records every `ActionTrace` |
122122
| **I-06** | CapabilityTokens are scoped | Tokens bind `principal_id + capability_id + constraints` with an explicit TTL; `revoke(token_id)` / `revoke_all(principal_id)` are supported |
123123

124124
See [docs/agent-context/invariants.md](docs/agent-context/invariants.md) for the full internal invariant list and [weaver-spec INVARIANTS.md](https://github.com/dgenio/weaver-spec/blob/main/docs/INVARIANTS.md) for the specification.

docs/agent-context/invariants.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,12 @@ All three are equally critical — there is no priority ordering.
1111
| Invariant | Requirement | Where enforced |
1212
|-----------|-------------|----------------|
1313
| **I-01** | Every tool output must pass through a context boundary before reaching the LLM | `Firewall.transform()` in `firewall/transform.py` |
14-
| **I-02** | Context boundaries must enforce budgets (size, depth, field count) | `Budgets` in `firewall/budgets.py` |
14+
| **I-02** | Every execution must be authorized and auditable (CapabilityToken validated before execution; TraceEvent recorded after) | `HMACTokenProvider.verify()` + `TraceStore.record()` in `kernel.py`; `PolicyEngine.evaluate()` at grant time in `grant_capability()` |
1515
| **I-06** | Tokens must bind principal + capability + constraints; no reuse across principals | `HMACTokenProvider.verify()` in `tokens.py` |
1616

17+
> **Budget enforcement** (size, depth, field count via `Budgets` in `firewall/budgets.py`) is an
18+
> implementation constraint that strengthens I-01. It has no separate invariant number in weaver-spec.
19+
1720
## Forbidden shortcuts — "never do" list
1821

1922
These constraints are non-negotiable. Violating any one silently degrades security.

0 commit comments

Comments
 (0)