Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .agent-loop/CURRENT_STATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ authority; these records do not grant or withhold it.
| [WS-CI-001](initiatives/WS-CI-001-backend-ci-acceleration/STATUS.md) | Semantic distributed backend lanes complete | Treat further CI optimization as a fresh measured bounded change |
| [WS-CI-002](initiatives/WS-CI-002-deterministic-agent-gates/STATUS.md) | `WS-CI-002-01` complete through PR #311; Agent Gates is deterministic per PR head | Preserve protected-branch review as the independent approval authority |
| [WS-CI-003](initiatives/WS-CI-003-atomic-chunk-state/STATUS.md) | `WS-CI-003-01` complete | Require every chunk PR to land its final contract and initiative state atomically |
| [WS-CI-004](initiatives/WS-CI-004-review-evidence-integrity/STATUS.md) | Exact-target protocol, nine-reviewer adoption, and final-head closure are merged through PRs #341-#343; `WS-CI-004-04` is complete with explicit impact-cone and adversarial review proof | Human review `WS-CI-004-04`; do not start another successor automatically |
| [WS-CI-004](initiatives/WS-CI-004-review-evidence-integrity/STATUS.md) | Exact-target, nine-reviewer, final-head, impact-cone, and adversarial-proof work is merged through PR #345; `WS-CI-004-05` semantic-completeness hardening is complete | Human review and merge `WS-CI-004-05`; do not start another successor automatically |
Comment thread
coderabbitai[bot] marked this conversation as resolved.
| [WS-DB-001](initiatives/WS-DB-001-v01-schema-baseline/STATUS.md) | v0.1 schema baseline complete through PRs #316 and #317 | Extend `0001_v01_baseline` only through future bounded migrations |
| [WS-SEC-001](initiatives/WS-SEC-001-dependency-alert-remediation/STATUS.md) | `WS-SEC-001-01` is complete with patched runtime and tooling dependencies | Handle future security alerts through fresh bounded dependency changes |
| [WS-DOCS-001](initiatives/WS-DOCS-001-current-v01-documentation/STATUS.md) | Current v0.1 entry documentation complete | Keep current pages synchronized with merged capability changes |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
| `WS-CI-004-02` | Adopt the shared protocol across all nine reviewer agents and matching skills, with the shared evaluation harness | L1 | Complete through PR #342 |
| `WS-CI-004-03` | Close final-head approval and durable merged-state gaps exposed by PR #340 | L1 | Complete |
| `WS-CI-004-04` | Require explicit impact-cone and adversarial proof in exact-head reviews | L1 | Complete |
| `WS-CI-004-05` | Require atomic behavior traceability and residual escape analysis | L1 | Complete |

This is sequencing guidance, not an implementation queue. Create one bounded
contract only when a human explicitly starts that step. One implementation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,16 @@

## Current status

`WS-CI-004-01` through `WS-CI-004-03` are merged. `WS-CI-004-04` is complete.
`WS-CI-004-01` through `WS-CI-004-04` are merged. `WS-CI-004-05` is complete.

## Current focus

Preserve exact-final-head review convergence, last-push human approval, resolved
review conversations, durable final-state wording, explicit impact-cone
inspection, and adversarial probes without changing product behavior or
creating a second permission system.
creating a second permission system. `WS-CI-004-05` closes the semantic-
completeness gap exposed when PR #346 initially mapped a compound criterion only
partially.

## Chunk status

Expand All @@ -20,13 +22,16 @@ creating a second permission system.
| `WS-CI-004-02` | Merged | Nine reviewer skills and agents plus deterministic evaluation harness landed through PR #342 |
| `WS-CI-004-03` | Complete | Last-push approval, conversation resolution, and non-temporal final-state enforcement |
| `WS-CI-004-04` | Complete | Impact-cone and adversarial proof required in reviewer session receipts |
| `WS-CI-004-05` | Complete | Atomic behavior traceability and residual escape analysis |

## Durable current state

The shared protocol, schema, target sensor, reviewer adoption, final-head
closure, and explicit review-depth proof are complete. GitHub remains the sole
contribution and merge authority; repository evidence remains advisory.
closure, explicit review-depth proof, and semantic-completeness hardening are
complete. GitHub remains the sole contribution and merge authority;
repository evidence remains advisory.

## Next action

Human review of `WS-CI-004-04`. Do not start another successor automatically.
Preserve `WS-CI-004-05` behavior during human review and merge. Do not start
another successor automatically.
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
# Chunk Contract: WS-CI-004-05 — Semantic Review Completeness

## Merge state

- Outcome on merge: `complete`

## Goal

Require reviewers to decompose material requirements into independently
checkable behavior atoms and trace each atom through its owner, implementation,
proof, and execution custody before issuing a passing verdict.

## Why this chunk exists

Exact-head review, impact-cone inspection, and adversarial probes prevent stale
or shallow receipts, but PR #346 demonstrated that a reviewer can still accept
a polished criterion-to-test table while one material behavior has no named
proof. Review must establish semantic completeness, not merely the presence of
a matrix.

## Risk class

L1 — reviewer protocol, skills, agents, evidence schema, and evaluation harness.

## Allowed files

```text
.agents/skills/reviewer-evidence-protocol/SKILL.md
.agents/skills/{architecture-review,security-review,qa-review,test-delta-review,docs-review,product-ops-review,ci-integrity-review,reuse-dedup-review,senior-engineer-review}/SKILL.md
.codex/agents/*-reviewer.toml
.agent-loop/templates/INTERNAL_REVIEW_RECEIPT.schema.json
.agent-loop/initiatives/WS-CI-004-review-evidence-integrity/{CHUNK_MAP.md,STATUS.md,REVIEWER_MATRIX.md}
.agent-loop/initiatives/WS-CI-004-review-evidence-integrity/chunks/WS-CI-004-05-semantic-review-completeness.md
.agent-loop/initiatives/WS-CI-004-review-evidence-integrity/evaluations/{CASES.json,EXPECTATIONS.json}
.agent-loop/initiatives/WS-CI-004-review-evidence-integrity/reviews/WS-CI-004-05-external-review-response.md
.agent-loop/CURRENT_STATE.md
scripts/{reviewer_contracts.py,test_reviewer_contracts.py,test_review_target.py}
```

## Not allowed

```text
backend product/runtime behavior or migrations
hosted or committed exact-head receipt custody
new merge authority, automatic merge, or universal reviewer fanout
coverage, CI, branch-protection, or existing test weakening
```

## Acceptance criteria

- [x] Every material criterion is decomposed into atomic observable behaviors,
including actors, resources/tenants, lifecycle states, failures, and
forbidden side effects where relevant.
- [x] Every behavior atom maps to its owner, implementation source, named proof,
and execution custody; missing or narrative-only mappings block PASS.
- [x] Every final review states a residual escape hypothesis and how the reviewer
attempted to falsify it.
- [x] Architecture, security, QA, test-delta, docs, product/ops, CI, reuse, and
senior-review skills and agents contain specialty-specific completeness
probes instead of generic boilerplate alone.
- [x] The canonical receipt schema rejects missing trace rows or residual escape
analysis, requires all trace rows to be verified for a passing verdict,
and advances the breaking receipt contract to schema version 2.
- [x] Realistic multi-file evaluation fixtures reproduce the semantic omission
observed during PR #346 review without leaking the expected answer.
- [x] Session evidence remains advisory and GitHub remains the sole merge authority.

## Completion evidence

| Behavior | Owner | Implementation source | Named proof | Execution custody | Result |
|---|---|---|---|---|---|
| Atomize material criteria | Shared reviewer protocol | `reviewer-evidence-protocol/SKILL.md` and nine specialty agents/skills | `test_all_agent_skill_contracts_compose_with_protocol` plus blind `qa-compound-trace` replay | local deterministic tests and exact-head QA review | verified |
| Trace every atom through owner, implementation, proof and custody | Shared protocol and receipt schema | protocol steps 6-7 and receipt `traceability` | receipt schema tests and reviewer-contract mutation tests | local deterministic tests | verified |
| Require residual escape falsification | Shared protocol and receipt schema | protocol step 8 and receipt `residual_escape` | `test_final_verdict_requires_verified_trace_and_closed_escape` | local deterministic tests | verified |
| Preserve specialty-specific depth | Nine specialty reviewer owners | matching skills and `.codex/agents/*-reviewer.toml` | `scripts/reviewer_contracts.py` and exact-head reviewer fanout | local validation and advisory review sessions | verified |
| Reproduce the PR #346 omission | Evaluation harness | `CASES.json` / `EXPECTATIONS.json` | blind `qa-compound-trace` classification plus fixture validation | isolated QA review and local tests | verified |
| Keep evidence advisory | GitHub authority boundary | receipt `custody`, schema closed fields, contract non-goals | authority-field adversarial schema probe and security review | local deterministic tests and advisory review session | verified |

## Verification commands

```bash
python3 -m unittest -v scripts.test_reviewer_contracts scripts.test_review_target
python3 scripts/reviewer_contracts.py
python3 scripts/check_chunk_state_sync.py --base-ref origin/main
python3 scripts/check_active_state_projections.py
python3 scripts/check_markdown_links.py
python3 scripts/check_stale_workstream_wording.py
python3 scripts/check_stale_review_contracts.py
git diff --check
Comment thread
coderabbitai[bot] marked this conversation as resolved.
```

## Required reviewers

Architecture, security, QA, test-delta, CI integrity, senior engineering,
reuse/dedup, and documentation.

## Human review focus

Confirm the change forces semantic proof without turning reviewer prose into a
second permission system or adding unnecessary process ceremony.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
{"id":"product_ops-handoff","reviewer":"product_ops","class":"handoff","task":"Review the supplied change within your specialty.","evidence":"The contributor lifecycle is correct, but a CI workflow skips failed tests."},

{"id":"qa-positive","reviewer":"qa","class":"positive","task":"Review the supplied change within your specialty.","evidence":"Acceptance requires denial for an expired lease, but tests cover only the successful active-lease path."},
{"id":"qa-compound-trace","reviewer":"qa","class":"positive","task":"Review this planning diff and its claimed criterion-to-test coverage. The supplied excerpts are from separate changed files.","evidence":"Contract acceptance criterion: child mutation, binding suspension, unit retirement, competing publication, revocation, replay, cross-project use, wrong session/transaction, close failure, and rollback all fail closed without mutation. Verification table: PREP denial/session/close failure maps to test_policy_publication_authorization.py; child mutation/binding suspension/unit retirement/competing publication maps to test_policy_publication_concurrency.py; duplicate replay maps to test_policy_publication_recovery.py. Trust bundle claims the matrices cover every material acceptance criterion."},
{"id":"qa-negative","reviewer":"qa","class":"negative","task":"Review the supplied change within your specialty.","evidence":"A private refactor preserves observable behavior and all boundary and negative assertions remain unchanged."},
{"id":"qa-stale","reviewer":"qa","class":"stale_replay","task":"Re-evaluate after the supplied update.","evidence":"Prior finding QA-8 reported no expired-lease regression. The new head adds it; replay QA-8 and verify the behavior."},
{"id":"qa-output","reviewer":"qa","class":"output_contract","task":"Assess whether a final review result is possible.","evidence":"Tests ran on head aaa, but the requested final head is bbb."},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
{"case_id":"product_ops-handoff","outcome":"handoff","required_finding_ids":[],"handoff_specialty":"ci_integrity"},

{"case_id":"qa-positive","outcome":"finding","required_finding_ids":[],"handoff_specialty":null},
{"case_id":"qa-compound-trace","outcome":"finding","required_finding_ids":[],"handoff_specialty":null},
{"case_id":"qa-negative","outcome":"clear","required_finding_ids":[],"handoff_specialty":null},
{"case_id":"qa-stale","outcome":"replayed","required_finding_ids":["QA-8"],"handoff_specialty":null},
{"case_id":"qa-output","outcome":"provisional","required_finding_ids":[],"handoff_specialty":null},
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# WS-CI-004-05 External Review Response

## Comments addressed

- `CR-347-002` Major: acceptance criteria were implemented but remained
unchecked. Valid. Every criterion is now checked and mapped through owner,
implementation source, named proof, execution custody, and result.
- `CR-347-003` Minor: the contract did not list the stale-wording checks or
record reviewer-session closure. Valid. Verification now names both stale
checks, the docs reviewer requires link/stale evidence, and all requested
internal reviewer sessions were closed before this response.
- `CR-347-004` Major: specialty-skill adoption checks did not enforce the full
shared semantic contract. Valid. Stable requirement IDs now cover
atomization, owner, implementation source, named proof, execution custody,
result, residual escape, and fail-closed PASS behavior for both skills and
custom agent TOMLs, with independent mutation proof.
- `CR-347-005` Minor: both receipt test suites needed unavailable and multi-row
PASS rejection. Valid. Both suites now exercise those boundaries while
preserving PROVISIONAL acceptance for unavailable proof.

## Comments not applied

- `CR-347-001` Major requested that durable state use `in review` until merge.
Not valid under the repository's atomic chunk-state contract. `AGENTS.md`
requires the same PR to land its declared final outcome and prohibits
`in review`, `pending review`, or `ready for review` as state that can reach
`main`. GitHub open PRs remain the transient-work view; the branch projection
describes the outcome that this PR will atomically land.

## Human decisions needed

None beyond normal approval and merge ownership.

## Commands rerun

Reviewer contract/schema tests, skill validation, reviewer contract validation,
chunk-state sync, active-state projections, Markdown links, stale wording,
stale review contracts, and diff checks.

## Remaining risks

Natural-language semantic completeness still requires reviewer judgment beyond
the structural guarantees of JSON Schema and deterministic contract checks.
44 changes: 41 additions & 3 deletions .agent-loop/templates/INTERNAL_REVIEW_RECEIPT.schema.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://workstream.local/schemas/internal-review-receipt-v1.json",
"$id": "https://workstream.local/schemas/internal-review-receipt-v2.json",
"title": "Workstream Internal Review Receipt",
"type": "object",
"additionalProperties": false,
"required": ["schema_version", "custody", "target", "reviewer", "inspections", "evidence", "impact_cone", "adversarial_probes", "findings", "uncertainty", "freshness", "verdict"],
"required": ["schema_version", "custody", "target", "reviewer", "inspections", "evidence", "impact_cone", "adversarial_probes", "traceability", "residual_escape", "findings", "uncertainty", "freshness", "verdict"],
"properties": {
"schema_version": {"const": 1},
"schema_version": {"const": 2},
"custody": {"const": "advisory_session"},
"target": {"$ref": "#/$defs/target"},
"reviewer": {
Expand Down Expand Up @@ -67,6 +67,34 @@
}
}
},
"traceability": {
"type": "array",
"minItems": 1,
"items": {
"type": "object",
"additionalProperties": false,
"required": ["criterion", "behavior", "owner", "implementation_source", "proof_source", "execution_custody", "result"],
"properties": {
"criterion": {"type": "string", "minLength": 1},
"behavior": {"type": "string", "minLength": 1},
"owner": {"type": "string", "minLength": 1},
"implementation_source": {"type": "string", "minLength": 1},
"proof_source": {"type": "string", "minLength": 1},
"execution_custody": {"type": "string", "minLength": 1},
"result": {"enum": ["verified", "missing", "unavailable"]}
}
}
},
"residual_escape": {
"type": "object",
"additionalProperties": false,
"required": ["hypothesis", "method", "result"],
"properties": {
"hypothesis": {"type": "string", "minLength": 1},
"method": {"type": "string", "minLength": 1},
"result": {"enum": ["falsified", "survives", "unavailable"]}
}
},
"findings": {
"type": "array",
"items": {"$ref": "#/$defs/finding"}
Expand Down Expand Up @@ -111,6 +139,16 @@
"properties": {"result": {"const": "pass"}}
},
"minContains": 1
},
"traceability": {
"items": {
"type": "object",
"required": ["result"],
"properties": {"result": {"const": "verified"}}
}
},
"residual_escape": {
"properties": {"result": {"const": "falsified"}}
}
}
}
Expand Down
10 changes: 10 additions & 0 deletions .agents/skills/architecture-review/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ inspect relevant unchanged owners and consumers, replay prior findings, separate
executed from inspected evidence, state uncertainty and freshness, and hand off
non-architecture findings without inventing another specialty's verdict.
Use canonical reviewer IDs from the initiative `REVIEWER_MATRIX.md` in handoffs.
Atomize every material criterion. For every behavior atom, record its owner, implementation source, named proof,
execution custody, and result. Missing or narrative-only rows block PASS.

## Focus

Expand All @@ -32,6 +34,13 @@ Use canonical reviewer IDs from the initiative `REVIEWER_MATRIX.md` in handoffs.

Architecture drift is blocking even when tests pass.

## Completeness probe

Build an owner/consumer/public-port matrix for every changed boundary. Trace
construction, runtime composition, persistence ownership, and every known
consumer. Search for private imports and parallel paths. Treat an uninspected
consumer or unmapped ownership transition as missing proof.

## Output

```text
Expand All @@ -40,6 +49,7 @@ Protocol envelope: target / run / evidence / findings / uncertainty / freshness
Boundary violations:
Abstraction risks:
Coupling risks:
Atomic traceability and residual escape:
Simpler alternative:
Required fixes:
```
Expand Down
10 changes: 10 additions & 0 deletions .agents/skills/ci-integrity-review/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ inspect relevant unchanged workflows and commands, replay prior findings,
separate executed from inspected evidence, state uncertainty and freshness, and
hand off non-CI findings without inventing another specialty's verdict.
Use canonical reviewer IDs from the initiative `REVIEWER_MATRIX.md` in handoffs.
Atomize every material criterion. For every behavior atom, record its owner, implementation source, named proof,
execution custody, and result. Missing or narrative-only rows block PASS.

## Inspect

Expand All @@ -35,13 +37,21 @@ Use canonical reviewer IDs from the initiative `REVIEWER_MATRIX.md` in handoffs.
- Removed lint/typecheck/test gate.
- Package script changed to hide errors.

## Completeness probe

Trace each required gate from trigger and path filter through job dependency,
command, exit propagation, artifact/coverage aggregation, and protected-branch
status. Probe cancellation, skipped-job, empty-selection, and rerun behavior;
green status alone is not proof that the intended command ran.

## Output

```text
Result: PASS / PASS WITH LOW RISKS / FAIL
Protocol envelope: target / run / evidence / findings / uncertainty / freshness
CI files changed:
Integrity concerns:
Gate traceability and residual escape:
Required fixes:
```

Expand Down
Loading
Loading