Skip to content

feat(autonomy): return-accounting convention, capture slice, live-proven demo (WP3)#356

Merged
kyle-sexton merged 34 commits into
mainfrom
feat/autonomy-return-accounting
Jul 19, 2026
Merged

feat(autonomy): return-accounting convention, capture slice, live-proven demo (WP3)#356
kyle-sexton merged 34 commits into
mainfrom
feat/autonomy-return-accounting

Conversation

@kyle-sexton

@kyle-sexton kyle-sexton commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

Summary

WP3 return-accounting package (T5), on the merged WP2 telemetry contract (#343):

  • Convention doc plugins/autonomy/reference/return-accounting.md: three-layer data model (machine/deterministic, human-attested, agent/LLM), the two Boris questions verbatim as the human fields (counterfactual would-have-done-anyway + manual-effort band), six-band effort scale <1h / 1-4h / 4h-1d / 1d-1w / 1w-1mo / >1mo (user-locked), capture at the task boundary (work-item close / PR merge) as tracker-resident marker records, autonomous-class scope only, agents never estimate the return fields.
  • Guided-setup capture slice: close-boundary templates + marker-record shape, idempotent at-close capture, attestation upsert.
  • WP1 PLAN Phase 6 → [DONE] (fleet binding doc merged in docs(process): add the autonomy fleet binding instance standards#196).

Live demo evidence (executed this effort)

Throwaway private repo kyle-sexton/autonomy-demo-scratch issue #1: unattested marker record written at close; a re-fired close stayed idempotent (count 1, no downgrade); attestation upsert recorded with platform actor + source citation; DuckDB join against the WP2 committed OTLP fixture matched the join key string-identically (autonomy.work_item.url).

Near-duplicate audit: the capture slice composes the work-item tracker seam and the WP2 telemetry contract — no second telemetry or tracker surface created.

No linked issue

Related

🤖 Generated with Claude Code

PLAN (published at effort-end close-out)

ai-ladder-wp3-return-accounting

Brief

TLDR

Return-accounting convention (T5): a lightweight, tracker-resident record captured at the task
boundary of autonomous-class work, answering Boris's two return questions (counterfactual +
manual-effort band), joined to machine cost telemetry by the WP2 work-item attribute. No new
capability, no new cost; agents prompt and aggregate but never estimate return fields.

Goal

Any adopting org can capture return data — would-have-done-anyway plus manual-effort band — at
every autonomous-class task boundary, as a tracker-resident record joinable to its cost
telemetry by work-item ID, via guided setup, with zero paid dependencies.

Locked decisions

# Decision
D1 Package scope: WP3 ships (i) the return-accounting convention doc and (ii) the capture slice of the guided-setup capability, both in the capability-distribution home (WP1 D4). "No new capability" (T5) means no standalone estimation/reporting product — not zero setup surface; the convention answers nobody's return questions if no surface ever asks them. Fleet dogfood wiring = work-item backlog, out of package.
D2 Data model imported from T5 unchanged: three layers — (1) machine/deterministic: automation cost from existing session telemetry + lifecycle metadata from tracker timestamps; (2) human-attested: counterfactual yes/no/partial + manual-effort band; (3) agent/LLM: prompts for layer 2 at the task boundary, analyzes/aggregates over 1+2, NEVER estimates return fields (revisit trigger: models proven capable at effort estimation). Capture scope: autonomous-class work only (classes per T3 matrix); interactive exempt; expansion trigger: post-aggregation spend concentrating in interactive work.
D3 Record shape: the contract defines the record SCHEMA — work-item ID (WP2 D3 namespace token), counterfactual enum, effort band, timestamp, attestor role — and the tracker binding seam decides the surface: native tracker fields where the tracker supports them, structured comment as the universal floor (every tracker has comments; custom fields are entitlement/vendor-specific). Exact schema tokens and comment template at architect. RESOLVED 2026-07-18 (architect round, interview-locked): the "work-item ID" join value is the item's canonical web URL — attribute autonomy.work_item.url, record field work_item_url — never a tracker-short ID; the Plan's Phase 1 schema governs.
D4 Effort bands: fixed contract-owned ordinal scale. Five contiguous bands — <1h, 1–4h, 4h–1d, 1d–1w, >1w SUPERSEDED 2026-07-18 (stress-test evidence, user-locked): six contiguous bands — <1h, 1-4h, 4h-1d, 1d-1w, 1w-1mo, >1mo — the open >1w top band erased the largest avoided-effort signal; the Plan's Phase 1 schema is the governing serialization. Deliberate deviation from the T5 draft (<1h / 1–4h / 1–2d / 1w+), which left 4h–1d and 2d–1w unmapped. Org-custom bands rejected: breaks cross-org aggregation (same argument that rejected per-adopter reverse-DNS in WP2 D3).
D5 Prompt: Boris's two thread questions near-verbatim as the canonical basis — "would you have spent engineering effort on this anyway?" (yes/no/partial) and "what would it have cost in manual eng-hours?" (band). Two fields only; non-blocking at the task boundary; a skipped prompt is recorded as unattested — missing data stays visible, never imputed or estimated. Exact template wording at architect.
D6 Cost-join mechanics: join-key-only. The return record and the cost telemetry both carry the work-item ID (WP2 D3 attribute); cost values are never duplicated into the tracker record; the join happens sink-side at query time (WP2 D5 query-on-read). Aggregation/reporting transport stays WP2's sink concern.
D7 Guided-setup capture slice is discovery-first per WP1 D7: detect the adopting org's tracker and close-flow; wire the prompt at the task boundary where the surface is machine-editable and reviewable (WP1 D6 — always as reviewable changes); advise with steps + cost surfaced where the surface is GUI-only or entitlement-gated.

Constraints

  • Any fleet repo name in normative contract text is a defect (WP1 acceptance criterion).
  • Zero new cost by default; no paid dependency on any capture path.
  • Telemetry is never presented as return — usage measures activity, not return (T5); the
    machine layer informs the cost side of the join only.
  • No agent/LLM surface estimates, imputes, or backfills the two human-attested fields.
  • Band set and counterfactual enum are contract-stable: changes are reviewed contract
    migrations, never per-org variation.
  • Boris-alignment is the standing acceptance criterion: two human fields = his two questions,
    convention-before-capability, no step-skipping, trust before scale.

Acceptance criteria

  • Convention doc names roles and contract vocabulary only; record schema precise enough that
    architect fills mechanics without reopening the contract.
  • The record consumes the WP2 D3 work-item attribute as-is — no modification to the WP2
    contract required.
  • One conforming path demonstrates: autonomous-class work item closes → tracker-resident
    return record exists → joinable to that item's cost telemetry by work-item ID at the sink.
  • Prompt carries exactly two fields, non-blocking; a skip is visible as an unattested record.
  • No capability in the package estimates return fields or reimplements a native tracker or
    telemetry surface.
  • Guided setup takes an adopter to the capture-enabled state as reviewable changes with zero
    paid dependencies.

Captured assumptions

  • Boris's two return questions come from his X thread (post 3), not the "Step & your role"
    table; verbatim capture is durable in design-threads T5. The table doc (now on disk:
    docs/topics/ai-adoption-ladder/design/boris-step-and-your-role.txt, source Google Doc linked from
    wayfind issues Map: AI adoption ladder — climb 2→3 (plugins fleet) #239Unify session and CI verification telemetry? #247) carries the related "is this something an engineer would have
    done?" variant — the thread wording is canonical for the prompt.
  • The claude.ai artifact endpoint is intermittently erroring; the Google Doc is the reliable
    re-anchor copy.
  • The five-band contiguous scale is a deliberate correction of the T5 draft's gaps, locked
    under the round's recommendation pre-authorization.
    SUPERSEDED 2026-07-18: the contiguous
    scale is now SIX bands per the D4 supersession above; migration authority for any further
    band change is a reviewed contract migration, governed by the Plan's Phase 1 schema.
  • Tracker lifecycle metadata (layer 1b) is derivable from tracker exports/timestamps without
    new instrumentation.

Out-of-scope (deferred with triggers)

  • Aggregation/reporting transport — WP2 sink concern; join is query-side.
  • Interactive-work capture — trigger: post-aggregation spend concentrates in interactive work.
  • Per-class precision graduation (matrix column) — trigger: aggregate proves need.
  • Fleet dogfood wiring (close-flow hooks, tracker config) — work-item backlog; trigger: WP3
    build lands.
  • Return-field estimation by models — trigger: models proven capable at effort estimation
    (conditional constraint, revisit then).

Deferred questions

  • Exact record schema tokens + structured-comment template — /architect.
  • Exact prompt template wording (two questions, skip affordance) — /architect.
  • Tracker binding-shape catalog (native-field vs comment per tracker class) — /architect.
  • Band label spellings/serialization — /architect.

Plan

Consumes the WP2 join key as-is: attribute autonomy.work_item.url, value = the item's
canonical web URL (interview-locked in the batched WP2 round). Live-verified tracker facts
grounding the binding catalog (2026-07-18): GitHub now ships native issue fields
(org-managed, issues-only, REST+GraphQL); Jira custom fields on all plans; GitLab work-item
custom fields since 17.11; Linear has no custom fields by design — so the structured comment
remains the universal floor, native fields are the where-supported branch (D3 confirmed, not
reopened). No external effort-band standard exists to cite; bands stay contract-defined (D4).

Prerequisites: WP1 implementation merged; the WP2 package PR merged (this convention doc cites
the telemetry contract — dead-link avoidance). Fresh branch after both.

Phase 1: Return-accounting convention doc [DONE]

File Action What changes
plugins/autonomy/reference/return-accounting.md Create The T5 convention as tool-agnostic normative text. Three-layer data model (D2) with the never-estimate rule and its conditional revisit trigger. Record schema (D3): schema_version (string, from v1 — hook-envelope precedent), work_item_url (the join key; value contract defined by the telemetry contract's autonomy.work_item.url — pointer, not restated), attested (boolean), counterfactual (yes | no | partial), effort_band (six contiguous ordinal tokens: <1h, 1-4h, 4h-1d, 1d-1w, 1w-1mo, >1mo — user-locked 2026-07-18 on stress-test evidence, superseding D4's five-band set: the open >1w top band erased the largest avoided-effort signal; serialized as those exact strings, ordinal order defined by the contract, never lexical), attested_at (ISO 8601 UTC), attested_by (the attesting human's platform identity, captured from the attestation action), attestor_role (requester | reviewer | maintainer | other). Composition rule: effort_band answers the manual-cost question for the WHOLE delivered item regardless of counterfactual value; partial qualifies the counterfactual only — aggregation derives avoided cost from the pair, the attestor never prorates. Presence rules: an unattested record carries attested: false with counterfactual/effort_band/attested_at/attested_by/attestor_role ABSENT (never null-imputed); an attested record carries all fields. Record lifecycle — attestation is ASYNCHRONOUS by construction (autonomous-class work has no human at the close boundary): the machine posts the unattested record at close plus an attestation request routed to the accountable human; attestation later upserts the same record to attested: true. A never-attested record stays visible as unattested. Attestation routing for requester-less classes (standing routines, scheduled sweeps): the binding declares a standing attestation owner per class, or marks the class attestation-exempt with its cost reported separately — never a perpetually-unattested default. Record integrity: a conforming record is authored by the deployment's bound automation identity; consumers MUST ignore marker-matching records from any other author; attestor identity derives from the PLATFORM actor of the attestation action — on the comment floor the upsert itself is bot-authored, so the record's attested_by MUST be copied from, and the record MUST cite, the attestation source event (the human's reply/reaction whose platform actor answered) — the self-declared attestor_role field is descriptive, never the trust anchor. Aggregation guidance: report the attestation rate as a first-class health signal (a collapsed rate invalidates the dataset as promotion evidence) and separate requester-attested from independently-attested rows (self-attested counterfactual is a conflict of interest). Duplicate tolerance: the standalone capture path's find-then-create has an inherent create-create race — dedupe on read is ATTESTATION-PRESERVING: an attested bot-authored record outranks any unattested one; only among equally-attested records does the latest win. Write rule, same property: the close trigger creates the unattested record only when no marker-matching bot-authored record exists — a re-fired or retried close NEVER overwrites or downgrades an existing record's attestation fields. Capture point: task boundary (work-item close / PR merge); scope: autonomous-class work per the T3 class vocabulary. Tracker binding seam: record surface resolves per tracker class — native fields where the class supports them (org-managed issue fields, project-scheme fields, work-item fields), structured comment as the universal floor: hidden marker <!-- autonomy:return-accounting:v1 --> + one fenced JSON block, marker-keyed upsert (find-then-edit, else create — established in the wider bot ecosystem; NEW to this repo's seams). Prompt: Boris's two questions near-verbatim ("Would you have spent engineering effort on this anyway?" yes/no/partial; "What would it have cost in manual eng-hours?" band), exactly two fields, non-blocking, explicit skip affordance. Join is query-side by the join key only against cost telemetry (resource-scoped on agent-session signals per the telemetry contract); cost values never duplicated into the tracker record (D6). Zero vendor/fleet names; tracker-product specifics live in SKILL.md.

Sanity Check:

  • grep -c 'autonomy.work_item.url' plugins/autonomy/reference/return-accounting.md ≥ 1
  • grep -c 'return-accounting:v1' plugins/autonomy/reference/return-accounting.md ≥ 1
  • All six band tokens present: grep -c -- '1w-1mo' plugins/autonomy/reference/return-accounting.md ≥ 1 (spot token) and the schema block lists exactly 6 bands
  • grep -ci 'attestation rate' plugins/autonomy/reference/return-accounting.md ≥ 1 and grep -ci 'bound automation identity' plugins/autonomy/reference/return-accounting.md ≥ 1 (integrity + health-signal clauses present)
  • grep -ci 'estimate' plugins/autonomy/reference/return-accounting.md ≥ 1 (never-estimate rule stated)
  • Vendor+fleet deny-list grep empty over the file; node scripts/validate-plugin-contracts.mjs exit 0; lychee passes

Phase 2: Guided-setup capture slice [DONE]

First work item — fresh-docs mandate (repo CLAUDE.md): re-fetch official skills/hooks docs
before editing SKILL.md; re-verify tracker API surfaces cited in templates at implementation.

File Action What changes
plugins/autonomy/skills/setup/SKILL.md Modify Add the capture slice to discovery + apply: detect the adopting org's tracker class and close-flow surface; WIRE where machine-editable + reviewable — a close-triggered snippet posting the UNATTESTED record + an attestation request addressed to the accountable human (the close flow never blocks; attestation is the async upsert), native-field write where entitled; ADVISE with steps + cost surfaced where GUI-only or entitlement-gated (org-gated native fields, plan-gated automation); private-repo CI-minutes cost surfaced on the wire path (metered pool — non-zero). Where the work-items plugin is present, record writes ROUTE THROUGH its comment adapter (race-safe, multi-tracker) with marker-keyed upsert added as a new layer on top of its append-only surface — never a parallel comment writer; standalone snippet only for adopters without that seam. Record surface choice + tracker class land as an ADDITIVE section of the WP1 schema-versioned binding (absent-section tolerance; no schema major bump).
plugins/autonomy/skills/setup/evals/evals.json Modify Add capture-slice cases: tracker-detect + comment-floor wire path, native-field advisory path (entitlement-gated), skip-produces-unattested-record, refusal case (never estimates or backfills the two human fields), upsert idempotency under a re-fired close (count stays 1), requester-less class routing (standing owner or exempt — never silent unattested default).
plugins/autonomy/skills/setup/templates/ (WP2's snippet home) Create Close-boundary capture snippet: prompt text (the two canonical questions verbatim), marker-keyed upsert comment template with the fenced JSON record, unattested-on-skip shape. Surface-class-parameterized; fleet names banned.
plugins/autonomy/README.md Modify Shipped-capability list grows; roadmap row flips.
plugins/autonomy/.claude-plugin/plugin.json Modify Description extends; semver minor bump (repo versioning rule).

Sanity Check:

  • /skill-quality:check + validate-evals pass; claude plugin validate --strict exit 0
  • grep -rc 'return-accounting:v1' plugins/autonomy/skills/setup/templates/ ≥ 1
  • grep -rc 'engineering effort on this anyway' plugins/autonomy/skills/setup/templates/ ≥ 1 (canonical question verbatim)
  • grep -c 'attested: false' plugins/autonomy/reference/return-accounting.md ≥ 1 (async/unattested lifecycle stated)
  • Fleet-name sweep exit 0

Phase 3: Conforming-path demonstration [DONE]

Acceptance-criterion probe, scratch consumer repo: close a demo work item → the
close-triggered capture posts the unattested marker-keyed record (comment floor) + attestation
request → attest via upsert → join to demo COST telemetry (the COMMITTED WP2 Phase 3 fixture's
agent-session cost metric — durable interface, no WP2 pipeline re-run) by
autonomy.work_item.url in a DuckDB query. The fixture's baked autonomy.work_item.url value
is SUBSTITUTED with the demo item's canonical URL as demo-input preparation before the join
query (the scratch item's URL cannot match a pre-committed value; substitution touches the
demo copy only, never the committed fixture). Zero paid dependencies.

Sanity Check:

  • The tracker item carries exactly one comment matching <!-- autonomy:return-accounting:v1 --> with a parseable JSON record (re-running the capture upserts, count stays 1)
  • The close-time record shows attested: false with the five attestation fields absent; the post-attestation upsert shows attested: true with all fields present, attested_by matching the attestation source event's platform actor
  • Re-firing the close AFTER attestation leaves the attested record untouched (no downgrade to unattested)
  • DuckDB join query returns ≥ 1 row pairing the record's work_item_url with an agent-session COST metric whose resource attribute autonomy.work_item.url is string-identical
  • Demo transcript + query output in the PR body

Phase 4: Gates [DONE]

Same in-repo gate roster as the WP2 package: validate-plugins, run-plugin-tests,
validate-plugin-contracts, markdown/typos/lychee, claude plugin validate --strict, catalog
regen check. Near-duplicate audit statement: capture composes the work-items close-flow seam,
never duplicates it; no capability estimates return fields.

Sanity Check:

  • All gate scripts exit 0; node scripts/generate-catalog.mjs in-sync
  • Near-duplicate + never-estimate audit statements present in the PR body

Blast radius

MEDIUM — ~7 files in one plugin, but the record schema is a new public contract consumed by
every adopter and by the WP2 join; new-convention trigger matches. Git-revertible; automated
gates cover shared surfaces.

Stress-test summary

Step 3 fresh-context plan review (shared with WP2): async-attestation lifecycle was
unspecified (no human exists at an autonomous close — fixed: unattested-at-close + async
upsert); marker-upsert correctly reframed as new-to-this-repo layered on the work-items
comment adapter; unattested field presence pinned; join derivation made pointer-only.
Step 4 /devils-advocate (shared): folded — record integrity (bot-authored records only,
platform-actor attestor identity, self-declared role never the trust anchor), attestation-rate
health signal + requester/independent split, requester-less class routing rule, standalone
create-create race stated with attestation-preserving dedupe (attested outranks unattested;
latest wins only among equals; a re-fired close never downgrades), six-band set (user-locked,
supersedes D4 five bands), partial×band composition rule, committed WP2 fixture as the demo
interface. Residual accepted: comment-surface forgery is mitigated by authorship filtering,
not eliminated — native-field surfaces inherit platform ACLs and are the stronger branch where
entitled.

Execution shape

Fully sequential 1 → 2 → 3 → 4 — Phase 2 wires what Phase 1 specifies; Phase 3 exercises
Phase 2's snippet against the committed WP2 fixture; Phase 4 gates. Parallel saving
immaterial. Cross-package: this PR merges after the WP2 PR (contract citation + fixture
dependency); both wait on WP1 implementation.

Phase Surface Basis
1 main-session normative convention authoring, coupled to T5 + WP2 contract + interview locks
2 main-session setup-skill + template judgment, tracker-API re-verification gate
3 main-session scratch-repo runtime probe with divergence judgment
4 main-session gate runs

Open questions

  • Fleet dogfood wiring (close-flow hooks, tracker config): backlog items file via the
    work-items flow after this package lands (out of package per D1).

Decisions made (gate-passed)

Decision What it changes in the plan Basis (evidence)
Convention doc filename reference/return-accounting.md Phase 1 target path WP1 layout convention (concern-named contract docs in reference/)
Marker token <!-- autonomy:return-accounting:v1 --> + fenced JSON record, marker-keyed upsert Phase 1 schema + Phase 2 templates Live-verified ecosystem precedent (find-comment/create-or-update-comment upsert pattern); versioned marker enables schema migration
Comment floor universal; native fields the where-supported branch Phase 1 binding-seam catalog Live verification: GitHub fields org-gated issues-only; Linear none by design; Jira all plans; GitLab 17.11+; comments universal
Band serialization = exact display strings, contract-ordinal order Phase 1 schema User-locked band set; strings are self-describing, JSON-safe
attestor_role enum requester|reviewer|maintainer|other (descriptive, platform actor is the trust anchor) Phase 1 schema Stress-test HIGH #4 fold; overridable at approval
partial×band composition rule (band = whole-item manual cost; aggregation derives avoided cost) Phase 1 contract clause Stress-test MEDIUM #9; Boris Q2 asks whole manual cost
Record integrity: bot-authored records only, foreign-author records ignored, attestation-rate health signal, requester/independent aggregation split Phase 1 contract clauses + Phase 2 eval Stress-test HIGH #4
Requester-less class routing (binding-declared standing owner or attestation-exempt) Phase 1 clause + binding field Stress-test MEDIUM #8; T7 routine classes have no requester by construction
Standalone-path race stated + attestation-preserving dedupe (attested outranks unattested; latest wins only among equals; close never downgrades) Phase 1 clause + Phase 2 eval Stress-test HIGH #5 + review fold; work-items adapter is the race-safe path where present
Demo joins against the committed WP2 fixture Phase 3 input Stress-test MEDIUM #10

No [FALLBACK] tags — every remaining item traces to the Brief, an interview lock, or a
verified stress-test fold.

Handoff to implementation

User-approval gates

  • Any change to the six-band set or the counterfactual enum after this approval is a
    reviewed contract migration — re-enter /architect review, never inline.
  • Tracker-API surfaces cited in templates re-verify at implementation (fresh-docs); a
    divergence (e.g. field entitlements changed) STOPs and re-surfaces.

Execution shape ([EXEC-SHAPE] tagged)

Sequential 1→4, all main-session (table above). PLAN.md phase tags advance in the same commit
as each phase; scratch-repo demo per Phase 3; divergence escalation applies to every phase.

Mechanical work

Commit per phase on the implementation branch (suggest feat/autonomy-return-accounting);
gates re-run in full at Phase 4; commits via the repo's commit conventions; PR body carries
the demo transcript + never-estimate/near-duplicate audit statements + this PLAN in a
<details> block at close-out.

kyle-sexton and others added 4 commits July 18, 2026 17:18
The T5 convention as tool-agnostic normative text: three-layer data
model with the never-estimate rule and its conditional revisit trigger;
v1 record schema (join key by pointer to the telemetry contract,
six-band ordinal scale, presence rules, partial-by-counterfactual
composition); asynchronous attestation lifecycle with requester-less
routing; marker-keyed structured-comment floor + native-field branch;
bot-authored record integrity with platform-actor attestation evidence;
attestation-preserving dedupe and write rules; query-side join with
attestation-rate health signal and requester/independent split;
telemetry-is-not-return boundary.

Co-Authored-By: Claude Fable 5 (1M context) <noreply@anthropic.com>
… (WP3 phase 2)

Capture slice in setup: tracker-class + close-flow discovery,
close-triggered unattested-record wire with async attestation request,
native-field branch where entitled with the marker-keyed comment floor
as universal fallback, work-items comment-seam routing (upsert layered
on its append-only surface, never a parallel writer), advisory paths
for GUI-only/entitlement-gated surfaces with metered-minutes caveat,
attestation-owner routing for requester-less classes, additive capture
section in the binding. Close-boundary templates carry the two
canonical questions verbatim and the attestation-preserving write and
upsert rules. Four new eval cases incl. the never-estimate refusal and
refired-close idempotency; v0.3.0 manifest + README + catalog.

Co-Authored-By: Claude Fable 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 (1M context) <noreply@anthropic.com>
The fleet binding doc merged in melodic-software/standards#196.

Co-authored-by: Claude Fable 5 (1M context) <noreply@anthropic.com>
@claude

claude Bot commented Jul 18, 2026

Copy link
Copy Markdown

Claude finished @kyle-sexton's task in 2m 14s —— View job


PR Review: feat(autonomy): return-accounting convention, capture slice, live-proven demo (WP3)

Todo List

  • Gather context and read changed files
  • Review plugin manifest changes (plugin.json)
  • Review convention doc (return-accounting.md)
  • Review skill and template changes (SKILL.md, return-capture.md)
  • Review eval additions (evals.json)
  • Review documentation updates (READMEs, PLAN.md)
  • Post consolidated review feedback

Summary

Clean WP3 implementation. The three-layer data model, asynchronous attestation lifecycle, attestation-preserving dedupe logic, and the never-estimate invariant are all well-specified and internally consistent. The four new evals cover the critical behavioral contracts. A few issues below, ranging from a structural clarity gap (most important) to a minor formatting artifact.


Issues

1. Template presents a single tracker comment as two separate code blocksreturn-capture.md lines 22–32 (structural clarity)

The "Marker-keyed record comment (universal floor)" section renders the HTML comment marker and the JSON record body as two independent fenced code blocks. The convention doc is explicit that these form one tracker comment: "a hidden marker `` plus one fenced JSON block holding the record" (return-accounting.md, line 81–82). An implementer reading the template cold could reasonably conclude they should post two separate comments — which would break the marker-keyed upsert logic entirely (the lookup would find the HTML comment but it wouldn't carry the JSON, and vice versa).

Suggest collapsing into a single block that shows the complete comment body:

```


```json
{
  "schema_version": "1",
  "work_item_url": "<canonical-item-url>",
  "attested": false
}
```
```

Or at minimum add a sentence: "These two blocks together form the complete comment body — both appear in the same tracker comment." Fix this →


2. Missing eval: native-fields wire pathevals.json (coverage gap)

The telemetry evals have symmetrical coverage for both paths (eval 6 = existing-stack, eval 7 = free-default). The capture evals cover the comment floor (eval 9) but not the alternative path when the tracker entitles native custom fields. The SKILL.md capture slice explicitly specifies two surfaces: "Native-field write where entitled (the stronger surface — platform ACLs govern); the marker-keyed structured comment otherwise." A test covering the native-fields path would prevent silent regression to always wiring the comment floor regardless of entitlement.

Suggested eval capture-native-fields-wire-path: prompt like "Wire return-accounting capture; our tracker supports custom org-managed item fields and we're entitled to write them." — expects: detects entitled native-field surface, selects it over the comment floor, records native_fields as the record surface in the binding's capture section.


3. Missing trailing newline in evals.json — line 161 (formatting)

The diff ends with \ No newline at end of file, meaning the PR removed the terminal newline that was in the original file. Every text file in this repo should end with a newline per POSIX convention. Fix this →


4. Awkward mid-sentence line break in return-accounting.md lines 84–86 (prose artifact)

Record integrity: a conforming record is authored by the deployment's
bound automation identity; consumers MUST ignore marker-matching records from any other
author. Attestor
identity derives from the PLATFORM actor...

"Attestor" appears as a dangling word at the end of one sentence and the beginning of the next. This is a soft-wrap artifact that survived into the file. See line 86–88. Fix this →


5. schema_version string format diverges between the binding and the return record (minor consistency)

binding.json uses "schema_version": "1.0" (SKILL.md, line 66) while the return-accounting record schema uses "schema_version": "1" (no minor version). Both are strings per their respective contracts, but a cross-document consumer scanning for schema_version conventions would see two different patterns. Not a breaking issue since they're separate contracts with separate parsers, but worth a note in the convention doc acknowledging the difference (e.g., "record schema_version uses major-only tokens; the binding uses semver strings").


What's working well

  • Asynchronous attestation lifecycle is specified precisely — non-blocking close, async upsert, perpetual unattested visibility, never-imputed. The never-imputed invariant is threaded through the convention, skill, template, and three of the four new evals consistently.
  • Attestation-preserving dedupe (attested outranks unattested; latest wins only among equally-attested) is the correct policy and is stated in both the convention and the upsert section of the template — the create-create race is acknowledged rather than papered over.
  • plugin.json keywords are now sorted alphabetically — clean.
  • Eval 11 (refuses to estimate from diff size) is exactly the right adversarial probe for the most likely misuse of this capability.
  • Eval 12 (idempotent on re-fired close) directly maps to the real operational scenario (double-fire webhook) — this kind of concrete failure scenario makes a good eval.
  • SKILL.md "What this skill does NOT do" was updated to remove the now-shipped capture slice from the not-yet-shipped list and add the explicit never-estimate prohibition — that's the right maintenance pattern.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 026d67d5a0

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread plugins/autonomy/skills/setup/SKILL.md Outdated
Comment thread plugins/autonomy/skills/setup/templates/return-capture.md Outdated
Address the review wave: a bare reaction carries no counterfactual or
effort band, so only a reply with both values attests (reply missing a
value is re-prompted, never upserted); and the work-items tracker
binding offers provider-specific comment mechanics, not a race-safe
comment seam — the marker upsert and attestation-preserving dedupe are
this contract's own obligations on either path.

Co-authored-by: Claude Fable 5 (1M context) <noreply@anthropic.com>
@claude

claude Bot commented Jul 18, 2026

Copy link
Copy Markdown

Claude finished @kyle-sexton's task in 2m 38s —— View job


PR Review: feat(autonomy): return-accounting convention, capture slice, live-proven demo (WP3)

Todo List

  • Gather context and read changed files
  • Review convention doc (return-accounting.md)
  • Review skill and template changes (SKILL.md, return-capture.md)
  • Review plugin manifest changes (plugin.json)
  • Review eval additions (evals.json)
  • Review documentation updates (READMEs, PLAN.md)
  • Post consolidated review feedback

What the fix commit (47c0e1f) resolved

The fix(autonomy): correct attestation trigger and comment-path framing commit directly addresses both Codex P1 findings:

  • Codex P1 (SKILL.md) — work-items seam misrepresented as race-safe: ✅ RESOLVED. Step 3 of the capture slice now correctly states that work-items comment mechanics are provider-specific, not a race-safe seam, and that no marker upsert primitive exists to reuse. The marker-keyed upsert is this contract's own obligation on either path.

  • Codex P1 (return-capture.md) — bare reactions triggering attestation: ✅ RESOLVED. The attestation upsert section now explicitly requires a REPLY with BOTH values; bare reactions are explicitly blocked, and a reply missing either value is re-prompted without upsert.

Both P1s are correctly addressed in the current HEAD.


Remaining issues

1. Template still presents one tracker comment as two separate code blocksreturn-capture.md lines 22–32

The "Marker-keyed record comment" section still shows the HTML marker and the JSON record body as two independent fenced code blocks. The convention doc is explicit that these form one tracker comment: "a hidden marker `` plus one fenced JSON block holding the record" (return-accounting.md line 81). An implementer reading cold could post two separate tracker comments — which breaks the marker-keyed upsert logic entirely (the lookup finds the marker comment but it has no JSON, and the JSON block is a loose orphan).

The fix from the prior review wave applies unchanged: either collapse into one block showing the complete comment body, or add "These two blocks together form the complete comment body — both appear in the same tracker comment." Fix this →


2. Missing trailing newline in evals.json — line 161

The diff still ends with \ No newline at end of file. The fix commit did not touch evals.json, so this remains. Fix this →


3. Dangling "Attestor" at line 86 of return-accounting.mdline 86

The prose still reads ...from any other\nauthor. Attestor\nidentity derives from the PLATFORM actor... — "Attestor" stranded as the trailing word of one soft-wrapped line, making it read as a sentence fragment. The fix commit touched return-accounting.md for the attestation-source clarification but did not reflow this sentence. Fix this →


4. No eval for the native-fields wire pathevals.json (coverage gap)

Evals 6 and 7 give symmetrical coverage for both telemetry paths (existing-stack and free-default). Eval 9 covers the comment-floor capture path, but there is still no counterpart for the native-field path. SKILL.md step 2 explicitly specifies two surfaces: "Native-field write where entitled (the stronger surface — platform ACLs govern); the marker-keyed structured comment otherwise." A regression that silently always wires the comment floor regardless of entitlement would go undetected.

Suggested eval capture-native-fields-wire-path: prompt along the lines of "Wire return-accounting capture; our tracker supports custom org-managed item fields and we're entitled to write them." — expects: detects entitled native-field surface, selects it over the comment floor, records native_fields as the record surface in the binding's capture section.


5. schema_version token format differs between binding and return record (minor, docs-only)

binding.json uses "schema_version": "1.0" (SKILL.md line 66) while the return-accounting record schema uses "schema_version": "1" (no minor version). They are separate contracts with separate parsers so it is not breaking, but a cross-document consumer scanning for schema_version conventions sees two patterns. Worth a sentence in return-accounting.md acknowledging the difference (e.g., "record schema_version uses major-only tokens; the binding uses semver strings — they are separate version spaces").


What's working well

  • Both Codex P1 concerns correctly addressed in 47c0e1f — the attestation trigger fix is precise (reply with both values; re-prompt on missing value; reaction blocked) and the comment-path framing is accurate and clearly stated.
  • Never-estimate invariant is threaded consistently through the convention doc, the skill, the template, and three of the four new evals.
  • Attestation-preserving dedupe is stated correctly in both the convention and the upsert section — create-create race is acknowledged with the right policy (attested outranks unattested; latest wins only among equals).
  • Eval 11 (refuses to estimate from diff size) and Eval 12 (idempotent on re-fired close) are well-targeted adversarial probes for the most likely misuse and operational edge cases respectively.
  • plugin.json keywords sorted alphabetically; version bumped appropriately to 0.3.0.

Issues 1–3 are quick mechanical fixes. Issue 4 (native-fields eval) is the only substantive gap still open.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 47c0e1f3eb

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread plugins/autonomy/skills/setup/SKILL.md Outdated
Comment thread plugins/autonomy/skills/setup/templates/return-capture.md Outdated
…source key

Address the review wave: the close trigger now fires only for items
carrying the binding-recorded autonomous-work discriminator (role label
or bound-automation closure) — the convention's capture scope — with the
guardrail matrix named as the refinement path; and the attestation
source citation becomes a schema key (attestation_source, normalized
reply-event URL) on the contract's record schema and both surfaces.

Co-authored-by: Claude Fable 5 (1M context) <noreply@anthropic.com>
@claude

claude Bot commented Jul 18, 2026

Copy link
Copy Markdown

Claude finished @kyle-sexton's task in 2m 48s —— View job


PR Review: feat(autonomy): return-accounting convention, capture slice, live-proven demo (WP3)

Todo List

  • Load tools
  • Read changed files at HEAD (db3d73b)
  • Assess what the latest commit fixed vs. prior reviews
  • Verify remaining issues from prior review waves
  • Post consolidated review

What db3d73b resolved

Both Codex P1/P2 concerns from the second wave are correctly addressed in db3d73b:

  • Codex P1 — gate capture to autonomous-class work: ✅ RESOLVED. SKILL.md step 2 now explicitly gates the close trigger, names the discriminator (tracker binding's autonomous-eligible role label and/or closure by the bound automation identity), and correctly frames this as an interim boundary until the guardrail matrix ships. The "not a parallel class vocabulary" language is the right guard against premature vocabulary proliferation.

  • Codex P2 — define the attestation-source field in the record schema: ✅ RESOLVED. attestation_source is now a named field in the schema table (return-accounting.md line 32), included in the presence rules (line 33–36), added to the attested record example in the template (line 60), and the upsert spec names both the key and the normalization rule. The note that on native fields it maps to a field of the same name (template line 43) closes the multi-surface mapping gap.


Remaining issues

1. Template still presents one tracker comment as two separate code blocksreturn-capture.md lines 22–32

This was flagged in both prior review waves and was not touched by either fix commit. The "Marker-keyed record comment" section still shows the HTML marker and the JSON body as two independent fenced blocks. The convention doc is unambiguous: "a hidden marker `` plus one fenced JSON block holding the record" (return-accounting.md line 81) — one comment, not two. An implementer reading the template cold could reasonably create two separate tracker comments, which breaks the marker-keyed upsert entirely: the lookup finds the marker comment but it carries no JSON, and the JSON block is a loose orphan.

Minimal fix: add one sentence before the first code block — "These two blocks together form the complete comment body — both appear in the same tracker comment." Fix this →


2. Missing trailing newline in evals.json — line 161

The diff still ends with \ No newline at end of file. db3d73b did not touch this file. Fix this →


3. Dangling "Attestor" at return-accounting.md line 87line 87

Still reads: ...from any other\nauthor. Attestor\nidentity derives from the PLATFORM actor... — "Attestor" stranded as the last word of a soft-wrapped line before "identity derives from." db3d73b touched return-accounting.md for the attestation_source addition but did not reflow this sentence. Fix this →


4. No eval for the native-fields wire pathevals.json (coverage gap, persistent)

Eval 9 covers the comment-floor capture path. There is still no counterpart for the entitled native-field path despite SKILL.md step 2 explicitly specifying two surfaces: "Native-field write where entitled (the stronger surface — platform ACLs govern); the marker-keyed structured comment otherwise." The asymmetry means a regression that silently always wires the comment floor regardless of entitlement goes undetected.

Suggested eval capture-native-fields-wire-path (eval 13): prompt like "Wire return-accounting capture; our tracker supports custom org-managed item fields and we're entitled to write them." — expects: detects the entitled native-field surface, selects it over the comment floor, records native_fields as the record surface in the binding's capture section, and maps attestation_source to a field of the same name.


5. schema_version token format inconsistency (minor, docs-only — acknowledged in prior waves)

binding.json uses "schema_version": "1.0" (SKILL.md line 66) while the return record uses "schema_version": "1". Separate contracts with separate parsers, not breaking. Worth one sentence in return-accounting.md to prevent future confusion: "record schema_version uses major-only tokens; the binding uses semver strings — they are separate version spaces."


What's working well

  • Autonomous-class gating is well-specified — the "and/or" of role-label and bot-identity as the interim discriminator is realistic for a pre-guardrail-matrix world, and the text correctly labels it as interim rather than inventing a new class vocabulary.
  • attestation_source coverage is thorough: schema table, presence rules, upsert spec, attested record example, and the native-field mapping note ("maps to a field of the same name") all align.
  • Never-estimate invariant remains consistently threaded through convention, skill, template, and three evals.
  • Attestation-preserving dedupe and the create-create race acknowledgment are correct in both the convention and template.
  • The "What this skill does NOT do" maintenance pattern (remove shipped items, add new prohibitions) is the right way to keep the list trustworthy over time.

Issues 1–3 are quick mechanical fixes. Issue 4 (native-fields eval) is the only substantive behavioral gap remaining.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: db3d73bcfb

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread plugins/autonomy/skills/setup/templates/return-capture.md Outdated
The telemetry strip rule is the work-item join key's normalization;
comment-event URLs identify the event in query or fragment, so the
citation stores the platform-served URL unstripped.

Co-authored-by: Claude Fable 5 (1M context) <noreply@anthropic.com>
@claude

claude Bot commented Jul 18, 2026

Copy link
Copy Markdown

Claude finished @kyle-sexton's task in 1m 49s —— View job


PR Review: feat(autonomy): return-accounting convention, capture slice, live-proven demo (WP3)

Todo List

  • Load tools
  • Read changed files at HEAD (c3ab1f6)
  • Assess what the latest commit fixed vs. prior reviews
  • Verify remaining issues from prior review waves
  • Post consolidated review

What c3ab1f6 resolved

The Codex P1 finding from the third wave is correctly addressed:

  • Codex P1 — preserve query and fragment in attestation_source: ✅ RESOLVED. Both the schema table (return-accounting.md line 32) and the attestation upsert spec (return-capture.md lines 43–45) now explicitly state that query and fragment are PRESERVED, and that the telemetry contract's strip rule applies only to the work-item join key. The fix correctly distinguishes event-URL normalization from work-item join-key normalization — which is the precise root of the Codex finding.

Remaining issues

1. Template still presents one tracker comment as two separate code blocksreturn-capture.md lines 22–32

Flagged in all three prior review waves; untouched by any fix commit. The "Marker-keyed record comment" section shows the HTML marker and the JSON body as two independent fenced code blocks. The convention is unambiguous: "a hidden marker `` plus one fenced JSON block holding the record" (return-accounting.md line 82) — one comment, not two. An implementer reading cold could post two separate tracker comments, breaking the marker-keyed upsert: the lookup finds the marker block but it carries no JSON; the JSON block is an orphan.

Minimal fix: add one sentence before the first code block — "These two blocks together form the complete comment body — both appear in the same tracker comment." Fix this →


2. Missing trailing newline in evals.json — line 161

c3ab1f6 did not touch evals.json, so the missing terminal newline from the third wave review still stands. The file closes with } on line 161 without a trailing newline. Fix this →


3. Dangling "Attestor" at return-accounting.md line 87line 87

c3ab1f6 touched return-accounting.md (the attestation_source schema field update) but did not reflow this sentence. Current state at lines 85–88:

Record integrity: a conforming record is authored by the deployment's
bound automation identity; consumers MUST ignore marker-matching records from any other
author. Attestor
identity derives from the PLATFORM actor of the attestation action...

"Attestor" stranded as the trailing word of a soft-wrapped line, reading as a fragment. Fix this →


4. No eval for the native-fields wire pathevals.json (coverage gap, persistent across all four waves)

Eval 9 covers the comment-floor capture path. There is still no counterpart for the entitled native-field path despite SKILL.md step 2 explicitly specifying two surfaces: "Native-field write where entitled (the stronger surface — platform ACLs govern); the marker-keyed structured comment otherwise." A regression silently always wiring the comment floor regardless of entitlement would go undetected.

Suggested eval 13 capture-native-fields-wire-path: prompt like "Wire return-accounting capture; our tracker supports custom org-managed item fields and we're entitled to write them." — expects: detects the entitled native-field surface, selects it over the comment floor, records native_fields as the record surface in the binding's capture section, and maps attestation_source to a field of the same name.


5. schema_version token format inconsistency (minor, docs-only — carried from all prior waves)

binding.json uses "schema_version": "1.0" (SKILL.md line 66) while the return record uses "schema_version": "1" (no minor component). Separate contracts with separate parsers, so not breaking. Worth one sentence in return-accounting.md preventing future confusion: "record schema_version uses major-only tokens; the binding uses semver strings — they are separate version spaces."


What's working well

  • Codex P1 (c3ab1f6) addressed precisely: the fix correctly scopes the normalization rules — event-URL query/fragment preserved for identity auditability; telemetry strip rule confined to the work-item join key. The justification in the commit message ("comment-event URLs identify the event in query or fragment") is the right framing.
  • Never-estimate invariant consistently threaded through convention, skill, template, and three evals.
  • Attestation-preserving dedupe and create-create race acknowledgment correct in both the convention and template.
  • Attestation trigger (reply with both values; re-prompt on missing value; bare reaction blocked) is well-specified.
  • attestation_source coverage: schema table, presence rules, upsert spec, attested record example, native-field mapping note all align.

Issues 1–3 are quick mechanical fixes. Issue 4 (native-fields eval) is the only substantive behavioral gap still open.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c3ab1f675a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread plugins/autonomy/skills/setup/SKILL.md Outdated
Comment thread plugins/autonomy/skills/setup/templates/return-capture.md Outdated
…h the owner

Address the review wave: bot closure alone no longer admits an item to
return capture — the autonomous-eligible role label is the
discriminator; and the attestation upsert requires the reply's platform
actor to be the item's accountable human (requester or standing owner),
so any other participant's reply never attests.

Co-authored-by: Claude Fable 5 (1M context) <noreply@anthropic.com>
@claude

claude Bot commented Jul 18, 2026

Copy link
Copy Markdown

Claude finished @kyle-sexton's task in 1m 57s —— View job


PR Review: feat(autonomy): return-accounting convention, capture slice, live-proven demo (WP3)

Todo List

  • Load tools
  • Read changed files at HEAD (29e2c1f)
  • Assess what the latest commit fixed vs. prior reviews
  • Verify remaining issues from prior review waves
  • Post consolidated review

What 29e2c1f resolved

Both Codex P1 findings from the fourth wave are correctly addressed:

  • Codex P1 — label is the capture gate: ✅ RESOLVED. SKILL.md step 2 now reads "the snippet fires only when the closing item carries the tracker binding's autonomous-eligible role label — THE discriminator. Closure by the bound automation identity is not sufficient on its own (the bot closes interactive items too) and is at most a corroborating signal; an unlabeled item never enters capture." This is the precise fix — label-only gate, bot-closure demoted to corroborating evidence.

  • Codex P1 — attestation actor must match the owner: ✅ RESOLVED. The attestation upsert section in return-capture.md now explicitly requires "a REPLY whose platform actor IS the item's accountable human — the requester the request was addressed to, or the binding's standing attestation owner for requester-less classes; a reply from any other participant is never upserted."


Remaining issues

1. Template still presents one tracker comment as two separate code blocksreturn-capture.md lines 22–32 (flagged in all five prior review waves — untouched by any fix commit)

The "Marker-keyed record comment" section still shows the HTML marker and the JSON record body as two independent fenced code blocks. The convention is unambiguous: "a hidden marker `` plus one fenced JSON block holding the record" (return-accounting.md line 82) — one comment, not two. An implementer reading cold could post two separate tracker comments, breaking the marker-keyed upsert: the lookup finds the marker block but it carries no JSON; the JSON block is a loose orphan.

Minimal fix: add one sentence immediately before the first code block — "These two blocks together form the complete comment body — both appear in the same tracker comment." Fix this →


2. Missing trailing newline in evals.json (persistent from wave 2)

The closing } on line 161 of evals.json still has no trailing newline. 29e2c1f did not touch this file. Every text file should end with a newline per POSIX convention. Fix this →


3. Dangling "Attestor" at return-accounting.md line 87 (persistent from wave 2)line 87

Current state at lines 85–89:

Record integrity: a conforming record is authored by the deployment's
bound automation identity; consumers MUST ignore marker-matching records from any other
author. Attestor
identity derives from the PLATFORM actor of the attestation action...

"Attestor" is stranded as the trailing word of a soft-wrapped line before "identity derives from," reading as a sentence fragment. None of the four fix commits reflowed this passage despite each touching return-accounting.md for other edits. Fix this →


4. No eval for the native-fields wire pathevals.json (persistent from wave 1)

Eval 9 covers the comment-floor capture path. There is still no counterpart for the entitled native-field path despite SKILL.md step 2 explicitly specifying two surfaces: "Native-field write where entitled (the stronger surface — platform ACLs govern); the marker-keyed structured comment otherwise." A regression that silently always wires the comment floor regardless of entitlement would go undetected.

Suggested eval 13 capture-native-fields-wire-path: prompt like "Wire return-accounting capture; our tracker supports custom org-managed item fields and we're entitled to write them." — expects: detects the entitled native-field surface, selects it over the comment floor, records native_fields as the record surface in the binding's capture section, and maps attestation_source to a field of the same name. This is the only substantive behavioral gap still open.


5. schema_version token format inconsistency (minor, docs-only — carried from all prior waves)

binding.json uses "schema_version": "1.0" (SKILL.md line 66) while the return record uses "schema_version": "1". Separate contracts with separate parsers, not breaking. Worth one sentence in return-accounting.md to prevent future confusion: "record schema_version uses major-only tokens; the binding uses semver strings — they are separate version spaces."


What's working well

  • Both Codex P1 findings (29e2c1f) addressed precisely: the label-gate fix correctly identifies the bot-closure heuristic as a corroborating signal only, and the actor-check fix uses the accountable-human / standing-attestation-owner structure already established by the routing contract.
  • Label-gate correctly deferred: the text labels this as the "interim boundary, not a parallel class vocabulary" — the right framing while the guardrail matrix is still deferred.
  • Never-estimate invariant consistently threaded through convention, skill, template, and three evals across all iterations.
  • Attestation-preserving dedupe and create-create race acknowledgment are correct and stable across all fix commits.
  • attestation_source coverage: schema table, presence rules, upsert spec, attested record example, native-field mapping note, and query/fragment preservation all align correctly at HEAD.

Issues 1–3 are quick mechanical fixes. Issue 4 (native-fields eval) is the only substantive behavioral gap remaining.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 29e2c1f9cf

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread plugins/autonomy/skills/setup/SKILL.md Outdated
Comment thread plugins/autonomy/skills/setup/SKILL.md Outdated
@kyle-sexton

Copy link
Copy Markdown
Contributor Author

Re: latest claude[bot] review (commit 29e2c1f) — classifying the 5 remaining issues:

# Finding Classification Evidence Reacted
1 Template shows one tracker comment as two separate fenced blocks (return-capture.md lines 22–32) VALID — fixing Confirmed against return-accounting.md: "a hidden marker <!-- ... --> plus one fenced JSON block holding the record" is one comment. Adding the exact clarifying sentence suggested across all five review waves, immediately before the first block. 👍
2 Missing trailing newline in evals.json VALID — fixed .editorconfig's [*] rule requires insert_final_newline = true; this was also the ci-status/hygiene CI failure (editorconfig-checker: "Wrong line endings or no final newline"). Appended the missing \n. 👍
3 Dangling "Attestor" soft-wrap artifact, return-accounting.md ~line 87 VALID — fixing Confirmed the passage wraps ...author. / Attestor / identity derives... across three lines with "Attestor" stranded at a line end. Rewrapping so "Attestor identity derives..." starts cleanly on its own line. 👍
4 No eval for the native-fields capture path VALID — fixing Confirmed eval 9 only covers the comment-floor path; SKILL.md step 2 names native-fields as the stronger, entitlement-gated surface with no counterpart eval. Adding eval 13 capture-native-fields-wire-path per the suggested prompt/expectations, aligned to the record_surface: native_fields schema value now defined in the binding's capture section (added in this same commit to resolve two Codex P1 findings on the same slice). 👍
5 schema_version token format differs between the binding ("1.0") and the return record ("1") VALID — fixing Both confirmed at their cited lines; separate contracts/parsers so not breaking, but adding the suggested one-sentence clarification to return-accounting.md to prevent future cross-document confusion. 👍

Fix commit follows in a moment; will reply here with the SHA.

… schema

Address the review wave: the capture trigger now requires BOTH the
autonomous-eligible role label AND closure by the bound automation
identity (label alone is a pre-work eligibility marker, not proof of
autonomous execution); the capture section of the binding gains a
concrete key schema (tracker_class, record_surface, automation_identity,
routing) so the actor check and requester-less routing have somewhere
deterministic to read from. Also: the return-capture template now states
the marker and JSON blocks form one tracker comment, the return-accounting
convention's dangling "Attestor" line is reflowed and gains a note on the
binding-vs-record schema_version token difference, and evals.json adds
the native-fields capture-path eval and its missing trailing newline
(also the CI hygiene/ci-status failure this fixes).

Co-authored-by: Claude Fable 5 (1M context) <noreply@anthropic.com>
@claude

claude Bot commented Jul 18, 2026

Copy link
Copy Markdown

Claude finished @kyle-sexton's task in 5m 35s —— View job


PR Review: feat(autonomy): return-accounting convention, capture slice, live-proven demo (WP3)

Todo List

  • Load tools
  • Read changed files at HEAD (efadf01)
  • Assess what the latest commit fixed vs. prior reviews
  • Verify persistent issues from prior review waves
  • Post consolidated review

What efadf01 resolved

All 5 persistent findings from Kyle's wave-5 classification response and both Codex P1s from commit 29e2c1f are correctly addressed:

  • Issue 1 — two separate code blocks for one comment: ✅ RESOLVED. return-capture.md line 20–21 now reads: "…never overwrites or downgrades an existing record). These two blocks together form the complete comment body — both appear in the same tracker comment:" — the exact sentence suggested across all five prior waves.

  • Issue 2 — missing trailing newline in evals.json: ✅ RESOLVED. The diff confirms the \ No newline at end of file marker is gone; the file now ends with }\n.

  • Issue 3 — dangling "Attestor" soft-wrap: ✅ RESOLVED. return-accounting.md lines 89–95 now reads: "…from any other author. Attestor identity derives from the PLATFORM actor…" — reflowed so Attestor no longer stands alone at a line end.

  • Issue 4 — no eval for native-fields wire path: ✅ RESOLVED. Eval 13 capture-native-fields-wire-path added to evals.json lines 161–172 with all four recommended expectations plus the attestation_source-maps-to-same-named-native-field expectation.

  • Issue 5 — schema_version token format inconsistency: ✅ RESOLVED. return-accounting.md lines 34–36 now clarifies: "This record's schema_version uses major-only tokens ("1", never "1.0"); the setup skill's own binding schema_version uses semver strings — the two are separate version spaces with independent parsers."

  • Codex P1 — require execution evidence before capture: ✅ RESOLVED. SKILL.md step 2, lines 141–152 now requires both conditions simultaneously — the label (class-scope discriminator, marking pickup eligibility not execution proof) AND the close actor being the bound automation identity (execution-evidence discriminator). The parenthetical explanation for each is precise.

  • Codex P1 — define the capture binding schema: ✅ RESOLVED. SKILL.md step 6, lines 166–178 now defines a concrete 4-key schema table (tracker_class, record_surface, automation_identity, routing) with the all-or-nothing constraint: "a present section MUST carry all four keys — a partial section is a configuration error, not a silent partial wire."


Remaining issue

1. Malformed closing code fence in return-capture.md at line 68 — pre-existing across all prior waves, still unresolved

return-capture.md line 68 reads:

}
``` Consumers ignore marker records from any author other than the bound
automation identity, and dedupe attestation-preservingly (attested outranks unattested;
latest wins only among equals).

The closing triple-backtick fence and the Consumers ignore… prose are on the same line. Per CommonMark (which GitHub uses), a closing fence must consist only of the backtick sequence plus optional trailing spaces — any non-whitespace after the backticks invalidates it as a closing fence. As a result, the fenced JSON code block for the attested record never closes in GitHub's renderer: the Consumers ignore… sentence, the blank line, and the entire ## Close-trigger shape section all render as code text inside the unclosed block.

Minimal fix: split the line so the closing backticks are alone and the prose follows on a new line:

}

Consumers ignore marker records from any author other than the bound
automation identity, and dedupe attestation-preservingly (attested outranks unattested;
latest wins only among equals).


[Fix this →](https://claude.ai/code?q=In%20plugins%2Fautonomy%2Fskills%2Fsetup%2Ftemplates%2Freturn-capture.md%2C%20line%2068%20reads%20%22%60%60%60%20Consumers%20ignore%20marker%20records%20from%20any%20author%20other%20than%20the%20bound%22%20%E2%80%94%20the%20closing%20triple-backtick%20fence%20and%20the%20prose%20are%20on%20the%20same%20line%2C%20which%20is%20an%20invalid%20CommonMark%20closing%20fence%20(non-whitespace%20after%20the%20backticks).%20The%20code%20block%20never%20closes%20on%20GitHub%20and%20the%20entire%20%22Close-trigger%20shape%22%20section%20renders%20as%20code.%20Fix%3A%20put%20the%20closing%20%60%60%60%20on%20its%20own%20line%2C%20then%20start%20%22Consumers%20ignore%20marker%20records%20from%20any%20author%20other%20than%20the%20bound%20automation%20identity%2C%20and%20dedupe%20attestation-preservingly%20(attested%20outranks%20unattested%3B%20latest%20wins%20only%20among%20equals).%22%20on%20a%20new%20paragraph%20below%20it.%20Branch%3A%20feat%2Fautonomy-return-accounting&repo=melodic-software/claude-code-plugins)

---

### What's working well

- **Both Codex P1s from `29e2c1f`** addressed correctly in `efadf01`: the two-gate trigger (label + automation actor) is the right pragmatic solution as an interim boundary, with precise per-gate justification distinguishing _eligibility_ from _execution evidence_.
- **`routing` key design** is clean: requester-less classes get explicit standing_owner or attestation_exempt entries; requester-present classes need no entry (the requester IS the routing). No silent-unrouted case possible.
- **All-or-nothing constraint** on the `capture` section ("a partial section is a configuration error, not a silent partial wire") is the right configuration safety property — mirrors the telemetry section's absent-vs-present contract.
- **Eval 13** covers all four recommended expectations plus the `attestation_source` native-field mapping, giving symmetrical coverage with evals 6+7 on the telemetry paths.
- **Never-estimate invariant** remains consistently threaded through convention, skill, template, and evals across all iterations.

Issue 1 above is a one-line fix that unblocks the `## Close-trigger shape` section from rendering as code. Everything else at HEAD is correct.

@kyle-sexton

Copy link
Copy Markdown
Contributor Author

Fixed in efadf01 (all 5 items from the classification above):

  1. return-capture.md now states the marker + JSON blocks form one comment.
  2. evals.json trailing newline restored (also the hygiene/ci-status CI failure — editorconfig-checker flagged the missing final newline).
  3. return-accounting.md's "Attestor" line reflowed.
  4. Eval 13 capture-native-fields-wire-path added.
  5. return-accounting.md now notes the record's major-only schema_version is a separate version space from the binding's semver schema_version.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: efadf01f4c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread plugins/autonomy/skills/setup/SKILL.md Outdated
Comment thread plugins/autonomy/skills/setup/SKILL.md Outdated
Comment thread plugins/autonomy/skills/setup/SKILL.md Outdated
… fix vendor-token gate

Address the follow-up review wave on efadf01: name label-plus-automation-
actor closure as a proxy for execution evidence (not proof), deferring a
first-class dispatch/execution-provenance signal to the guardrail matrix
rather than inventing one ad hoc; key the capture binding's `routing`
object by the bound tracker's recurring-schedule row id (or an
interview-persisted identifier absent that binding) instead of an
undefined class name; and state that an attestation-exempt class's close
trigger posts no record and no request at all, per return-accounting.md's
no-perpetually-unattested rule.

Also fixes the `plugin-gate` contract-check regression efadf01 introduced:
the vendor-token ban on autonomy's reference/ docs matched the literal
".claude" path in the schema_version note; reworded without the path.

Co-authored-by: Claude Fable 5 (1M context) <noreply@anthropic.com>
@claude

claude Bot commented Jul 18, 2026

Copy link
Copy Markdown

Claude finished @kyle-sexton's task in 3m 28s —— View job


PR Review: feat(autonomy): return-accounting convention, capture slice, live-proven demo (WP3)

Todo List

  • Load tools
  • Read changed files at HEAD (dcded56)
  • Assess what the latest commit fixed vs. prior reviews
  • Verify remaining issues from prior review waves
  • Post consolidated review

What dcded56 resolved

All three Codex P1 findings from the efadf01 wave are addressed:

  • Codex P1 — Execution-evidence gap: ✅ RESOLVED. SKILL.md lines 151–157 now explicitly acknowledges the gate is "a PROXY for execution evidence, not a bound dispatch record" and that a close action by the automation identity after human-performed work "is not distinguished from one following genuine autonomous work by this gate alone." The first-class dispatch/provenance signal is explicitly deferred to the guardrail matrix. The gap is documented and scoped rather than silently present.

  • Codex P1 — Attestation-exempt class close behavior: ✅ RESOLVED. SKILL.md step 5, lines 169–173 now specifies that an exempt class's close trigger posts NEITHER the unattested record NOR the attestation request, citing return-accounting.md's prohibition on perpetually-unattested defaults. The exempt-class cost path is explicitly routed outside the record schema.

  • Codex P1 — Work-class discriminator for routing: ✅ RESOLVED. SKILL.md step 6, line 182 changes the routing key from "keyed by requester-less class name" to "keyed by a per-surface identifier for each requester-less recurring surface — the bound work-item tracker's own recurring-schedule row id where that binding exists, else an identifier the setup interview asks for and persists." This avoids the deferred class-taxonomy dependency entirely by grounding the key in tracker-native schedule IDs.


Remaining issues

1. Malformed closing code fence in return-capture.md at line 68 (persistent across all prior waves — untouched by any fix commit)

return-capture.md line 68 still reads:

}
``` Consumers ignore marker records from any author other than the bound
automation identity...

The closing triple-backtick and the prose are on the same line. Per CommonMark (which GitHub uses), a closing fence must consist only of the backtick sequence plus optional trailing spaces — any non-whitespace after the backticks invalidates it as a closing fence. The fenced JSON block for the attested record never closes in GitHub's renderer; the Consumers ignore… prose and the entire ## Close-trigger shape section all render as code text inside the unclosed block. dcded56 touched only return-accounting.md and SKILL.md, so this is still live.

Minimal fix: put the closing backticks on their own line, then start the prose as a new paragraph:

}

Consumers ignore marker records from any other author...


[Fix this →](https://claude.ai/code?q=In%20plugins%2Fautonomy%2Fskills%2Fsetup%2Ftemplates%2Freturn-capture.md%2C%20line%2068%20reads%20%22%60%60%60%20Consumers%20ignore%20marker%20records%20from%20any%20author%20other%20than%20the%20bound%22%20%E2%80%94%20the%20closing%20triple-backtick%20fence%20and%20the%20prose%20are%20on%20the%20same%20line%2C%20which%20is%20an%20invalid%20CommonMark%20closing%20fence%20(non-whitespace%20after%20the%20backticks).%20The%20code%20block%20never%20closes%20on%20GitHub%20and%20the%20%22Close-trigger%20shape%22%20section%20renders%20as%20code.%20Fix%3A%20put%20the%20closing%20%60%60%60%20on%20its%20own%20line%2C%20then%20start%20%22Consumers%20ignore%20marker%20records%20from%20any%20author%20other%20than%20the%20bound%20automation%20identity%2C%20and%20dedupe%20attestation-preservingly%20(attested%20outranks%20unattested%3B%20latest%20wins%20only%20among%20equals).%22%20as%20a%20new%20paragraph%20below%20it.%20Branch%3A%20feat%2Fautonomy-return-accounting&repo=melodic-software/claude-code-plugins)

---

**2. Routing granularity inconsistency introduced by `dcded56`** — [`return-accounting.md` line 61](https://github.com/melodic-software/claude-code-plugins/blob/dcded56a66d010642ec9321d8c3d901d1dba01e9/plugins/autonomy/reference/return-accounting.md#L61) vs. [SKILL.md line 182](https://github.com/melodic-software/claude-code-plugins/blob/dcded56a66d010642ec9321d8c3d901d1dba01e9/plugins/autonomy/skills/setup/SKILL.md#L182)

`return-accounting.md` still reads: _"the binding declares a standing attestation owner **per class**"_ — one entry per class. SKILL.md step 6 now keys routing by _"a per-surface identifier for each requester-less recurring surface — the bound work-item tracker's own recurring-schedule row id."_ These are different granularities: a class like "standing routines" may have multiple schedule instances (weekly security scan, monthly dep update), each with its own tracker schedule ID. The convention doc implies one routing entry per class; the binding schema implies one entry per schedule instance. An implementer reading both docs would see contradictory guidance.

`dcded56` correctly changed the binding schema to use surface IDs (that's the right fix for the Codex finding), but did not update the convention doc to match. A one-sentence update to `return-accounting.md` line 61 is sufficient: replace _"per class"_ with _"per requester-less recurring-surface instance (keyed by the tracker-native schedule ID or a setup-interviewed identifier)"_.

[Fix this →](https://claude.ai/code?q=In%20plugins%2Fautonomy%2Freference%2Freturn-accounting.md%20line%2060-63%2C%20the%20passage%20reads%20%22the%20binding%20declares%20a%20standing%20attestation%20owner%20per%20class%2C%20or%20marks%20the%20class%20attestation-exempt%22%20but%20SKILL.md%20step%206%20now%20keys%20routing%20by%20per-surface%20identifier%20(tracker-native%20schedule%20row%20id)%2C%20not%20class%20name.%20Update%20the%20convention%20doc%20to%20say%20%22the%20binding%20declares%20a%20standing%20attestation%20owner%20per%20requester-less%20recurring-surface%20instance%20(keyed%20by%20the%20tracker-native%20schedule%20ID%20or%20a%20setup-interviewed%20identifier)%2C%20or%20marks%20that%20surface%20attestation-exempt%22%20to%20align%20with%20the%20binding%20schema%20SKILL.md%20step%206%20defines.%20Branch%3A%20feat%2Fautonomy-return-accounting&repo=melodic-software/claude-code-plugins)

---

### What's working well

- **Execution-evidence gap framing** is exactly right: name the proxy as a proxy, state the specific case it cannot distinguish (human-performed work closed by the bot), and explicitly label the proper signal as future work for the guardrail matrix. This is better than either overclaiming proof or leaving the behavior undocumented.
- **Attestation-exempt close behavior** is now unambiguous: no record, no request, cost tracked separately. The cite to `return-accounting.md`'s prohibition grounds it normatively.
- **Per-surface-ID routing key** is a clean solution to the class-taxonomy dependency — using the tracker's own schedule IDs (or interview-supplied IDs) makes the binding grounded and deterministic without needing the deferred guardrail matrix.
- All fixes from the wave-5 classification (issues 1–5) remain correctly resolved at HEAD — the trailing newline in `evals.json` is confirmed present (`}\n` terminal byte verified), the two-code-block clarifying sentence is in place, "Attestor" is reflowed, eval 13 is included, and the schema_version version-space note is present.
- **Never-estimate invariant** remains consistently threaded through the convention, skill, template, and evals.

Issue 1 (malformed fence) is a one-line render fix. Issue 2 (routing language) is a one-sentence doc alignment. Both are quick mechanical changes.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: dcded56a66

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread plugins/autonomy/skills/setup/SKILL.md Outdated
Address the follow-up review on dcded56: the capture slice only wired
the close trigger (posts the unattested record), with no described
mechanism for the reply that attests it — trackers like GitHub don't
re-fire a close workflow on a later comment. Adds step 3 (WIRE the
reply-triggered attestation handler where machine-editable) and a
companion "Attestation-reply trigger shape" section in return-capture.md,
performing the same marker-keyed upsert from its own trigger surface;
advisory where no reply-triggered surface is machine-editable. Eval 9
updated to cover the new wiring step.

Co-authored-by: Claude Fable 5 (1M context) <noreply@anthropic.com>
@claude

claude Bot commented Jul 18, 2026

Copy link
Copy Markdown

Claude finished @kyle-sexton's task in 2m 54s —— View job


PR Review: feat(autonomy): return-accounting convention, capture slice, live-proven demo (WP3)

Todo List

  • Load tools
  • Read changed files at HEAD (648828a)
  • Assess what the latest commit fixed vs. prior reviews
  • Verify remaining issues from prior review waves
  • Post consolidated review

What 648828a resolved

The Codex P1 finding from the dcded56 wave is correctly addressed:

  • Codex P1 — Wire an attestation-event handler: ✅ RESOLVED. SKILL.md step 3 now explicitly wires the reply-triggered attestation handler as its own step, correctly noting that it routes through the ADVISE step (step 5) when no reply-triggered surface is machine-editable rather than silently wiring only the close half. The companion "Attestation-reply trigger shape" section in return-capture.md correctly requires the actor check before parsing, frames the upsert as "not a second contract," and handles the advisory case. Eval 9 updated to include the companion handler as an expectation.

Remaining issues

1. Malformed closing code fence in return-capture.md at line 68 (persistent across all prior waves — untouched by any fix commit)

return-capture.md line 68 still reads:

}
``` Consumers ignore marker records from any author other than the bound
automation identity, and dedupe attestation-preservingly (attested outranks unattested;
latest wins only among equals).

The closing triple-backtick and the Consumers ignore… prose are on the same line. Per CommonMark (which GitHub uses), a closing fence must consist only of the backtick sequence plus optional trailing spaces — any non-whitespace after the backticks invalidates it as a closing fence. The fenced JSON block for the attested record never closes in GitHub's renderer; the Consumers ignore… prose, the blank line, and the entire ## Close-trigger shape and ## Attestation-reply trigger shape sections all render as code text inside the unclosed block.

Minimal fix: put the closing backticks on their own line, then start the prose as a new paragraph:

}

Consumers ignore marker records from any author other than the bound
automation identity, and dedupe attestation-preservingly (attested outranks unattested;
latest wins only among equals).


[Fix this →](https://claude.ai/code?q=In%20plugins%2Fautonomy%2Fskills%2Fsetup%2Ftemplates%2Freturn-capture.md%2C%20line%2068%20reads%20%22%60%60%60%20Consumers%20ignore%20marker%20records%20from%20any%20author%20other%20than%20the%20bound%22%20%E2%80%94%20the%20closing%20triple-backtick%20fence%20and%20the%20prose%20are%20on%20the%20same%20line%2C%20which%20is%20an%20invalid%20CommonMark%20closing%20fence.%20The%20JSON%20code%20block%20never%20closes%20in%20GitHub%E2%80%99s%20renderer%20and%20everything%20after%20it%20(the%20%22Consumers%20ignore%22%20paragraph%2C%20%22Close-trigger%20shape%22%2C%20and%20%22Attestation-reply%20trigger%20shape%22%20sections)%20renders%20as%20code.%20Fix%3A%20put%20the%20closing%20%60%60%60%20on%20its%20own%20line%2C%20then%20start%20%22Consumers%20ignore%20marker%20records%20from%20any%20author%20other%20than%20the%20bound%20automation%20identity%2C%20and%20dedupe%20attestation-preservingly%20(attested%20outranks%20unattested%3B%20latest%20wins%20only%20among%20equals).%22%20as%20a%20new%20paragraph.%20Branch%3A%20feat%2Fautonomy-return-accounting&repo=melodic-software/claude-code-plugins)

---

**2. Routing granularity inconsistency** *(introduced by `dcded56`, carried through `648828a`)* — [`return-accounting.md` line 61](https://github.com/melodic-software/claude-code-plugins/blob/648828a7cf53b2c538a1523390318e394a073fa8/plugins/autonomy/reference/return-accounting.md#L61) vs. [SKILL.md step 7, line 191](https://github.com/melodic-software/claude-code-plugins/blob/648828a7cf53b2c538a1523390318e394a073fa8/plugins/autonomy/skills/setup/SKILL.md#L191)

`return-accounting.md` line 61 still reads: _"the binding declares a standing attestation owner **per class**"_ — one entry per class. SKILL.md step 7 keys routing by _"a per-surface identifier for each requester-less recurring surface — the bound work-item tracker's own recurring-schedule row id."_ These are different granularities: a class like "standing routines" can have multiple schedule instances (weekly security scan, monthly dep-update), each with its own tracker schedule ID. An implementer reading both docs would see contradictory guidance.

`dcded56` correctly changed the binding schema to surface IDs (the right fix for that Codex finding), but `return-accounting.md` line 61 was not updated to match and none of the subsequent commits have touched it.

One-sentence fix for `return-accounting.md` line 61: replace _"per class"_ with _"per requester-less recurring-surface instance (keyed by the tracker-native schedule ID or a setup-interviewed identifier)"_.

[Fix this →](https://claude.ai/code?q=In%20plugins%2Fautonomy%2Freference%2Freturn-accounting.md%20around%20line%2061%2C%20the%20passage%20reads%20%22the%20binding%20declares%20a%20standing%20attestation%20owner%20per%20class%2C%20or%20marks%20the%20class%20attestation-exempt%22%20but%20SKILL.md%20step%207%20now%20keys%20routing%20by%20per-surface%20identifier%20(tracker-native%20schedule%20row%20id)%2C%20not%20class%20name.%20Update%20the%20convention%20doc%20to%20say%20%22the%20binding%20declares%20a%20standing%20attestation%20owner%20per%20requester-less%20recurring-surface%20instance%20(keyed%20by%20the%20tracker-native%20schedule%20ID%20or%20a%20setup-interviewed%20identifier)%2C%20or%20marks%20that%20surface%20attestation-exempt%22%20to%20align%20with%20the%20binding%20schema%20defined%20in%20SKILL.md%20step%207.%20Branch%3A%20feat%2Fautonomy-return-accounting&repo=melodic-software/claude-code-plugins)

---

### What's working well

- **Reply-triggered handler** is specified precisely: actor check required first, both values required in the reply, single upsert contract framed clearly, advisory path for no-machine-editable surface stated rather than silently omitting the second half. The pattern of "same upsert, own trigger surface" avoids any ambiguity about whether a second record contract is implied.
- **Step 5 routing** for the advisory case (when no reply-triggered surface exists) is the right fallback — step 3 explicitly points to step 5 rather than calling capture complete.
- **Eval 9 update** correctly extends coverage: "Wires a reply-triggered handler performing the same upsert, not a second contract" aligns exactly with what step 3 and the template section specify.
- **CI-minutes caveat** in step 5 was updated to cover both close- and reply-triggered runs — a detail easy to miss and correctly caught.
- **Never-estimate invariant** remains consistently threaded through convention, skill, template, and evals.
- All fixes from the wave-5 classification (issues 1–5 of `efadf01`) remain correctly resolved at HEAD.

Issue 1 (malformed fence) is a one-line fix that unblocks two full template sections from rendering as code. Issue 2 (routing language) is a one-sentence doc alignment. Both are quick mechanical changes.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 648828a7cf

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread plugins/autonomy/skills/setup/SKILL.md Outdated
…apture

An automation-performed not-planned closure of a labeled item passed
both gate predicates and would post a record asserting autonomous
completion of undone work. The capture gate gains a third predicate:
the closure outcome must be completed/delivered; not-planned,
cancelled, and duplicate closures never capture.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@claude

claude Bot commented Jul 19, 2026

Copy link
Copy Markdown

Claude finished @kyle-sexton's task in 3m 29s —— View job


PR Review: feat(autonomy): return-accounting convention, capture slice, live-proven demo (WP3)

Todo List

  • Load tools
  • Read changed files at HEAD (bfd6620)
  • Assess what the latest commit fixed vs. prior reviews
  • Verify persistent issues from prior review waves
  • Post consolidated review

What 5b1fdc2 and bfd6620 resolved

Two Codex findings from the a2a46da wave are correctly addressed across these two commits:

  • Codex P2 — Reject native records edited by non-automation actors: ✅ RESOLVED in 5b1fdc2. return-accounting.md lines 141–150 now requires that on the audit-trail path the handler confirms the bound automation identity CREATED the close-time record AND that EVERY subsequent revision of the record fields was likewise written by it. A later non-automation edit of any record field (a hand-edited counterfactual or effort_band) makes the record non-conforming — rejected for attestation and ignored on read, exactly as a foreign-authored marker comment. Under ACL restriction the restriction itself proves both creation and revisions.

  • Codex P2 — Recover an interrupted comment request backfill: ✅ RESOLVED in 5b1fdc2. return-capture.md lines 42–51 now specifies the IDEMPOTENT-RECOVERABLE backfill: any later automation pass (a re-fired close, the reply handler) that finds the marker record with attestation_request missing fills it from the marker comment's own identity without touching any other field (the create-only rule protects the record's attestation fields, not this machine backfill), so a failed self-edit or a fast reply never orphans attestation.

  • Codex P1 — Exclude not-planned closures from return capture: ✅ RESOLVED in bfd6620. SKILL.md step 2, lines 152–159 now gates capture on ALL THREE conditions: the autonomous-eligible label AND the bound automation close actor AND a COMPLETED/delivered closure outcome. A not-planned, cancelled, or duplicate closure never captures even when the automation performs it — the parenthetical ("nothing was delivered, so a record would assert autonomous completion of undone work") states the correct justification.


Remaining issues

1. Malformed closing code fence in return-capture.md at line 98 (persistent across all review waves — untouched by any fix commit)

return-capture.md line 98 still reads:

}
``` Consumers ignore marker records from any author other than the bound
automation identity, and dedupe attestation-preservingly (attested outranks unattested;
latest wins only among equals).

The closing triple-backtick fence and the Consumers ignore… prose are on the same line. Per CommonMark (which GitHub uses), a closing fence must consist only of the backtick sequence plus optional trailing spaces — any non-whitespace after the backticks invalidates it as a closing fence. The fenced JSON block for the attested record never closes in GitHub's renderer; the Consumers ignore… paragraph, the entire ## Close-trigger shape section, and the entire ## Attestation-reply trigger shape section all render as code text inside the unclosed block. This has been flagged in every single review wave and has survived every fix commit untouched — it now conceals the IDEMPOTENT-RECOVERABLE backfill text and the merged-change fan-out text added in the last several commits.

Minimal fix: put the closing backticks on their own line, then start the prose as a new paragraph. Fix this →


2. Dangling "Attestor" at return-accounting.md line 116 (re-introduced by a58d7e0, persistent through bfd6620)lines 115–117

Current state at lines 114–117:

edited field set would be indistinguishable from an authentic attestation, and the comment
floor applies. Attestor
identity derives from the PLATFORM actor of the attestation action — on the comment floor

"Attestor" is stranded as the trailing word of a soft-wrapped line before "identity derives from." Both 5b1fdc2 and bfd6620 touched return-accounting.md (for the audit-trail revision rule and related additions) without reflowing this sentence. Fix this →


3. Routing granularity inconsistency (introduced by dcded56, persistent through bfd6620)return-accounting.md lines 71–73 vs. SKILL.md step 7

return-accounting.md lines 71–73 still read: "the binding declares a standing attestation owner per class, or marks the class attestation-exempt with its cost reported separately" — one entry per class. SKILL.md step 7 keys routing by "a per-surface identifier for each requester-less recurring surface (standing routines, scheduled sweeps) — the bound work-item tracker's own recurring-schedule row id where that binding exists." A class like "standing routines" may have multiple schedule instances (weekly security scan, monthly dep-update), each with its own tracker schedule ID. The same paragraph at lines 78–83 describes the per-surface stamp requirement, making the opening "per class" statement internally inconsistent with the rest of the paragraph. Neither 5b1fdc2 nor bfd6620 updated this passage.

One-sentence fix: replace "per class" with "per requester-less recurring-surface instance (keyed by the tracker-native schedule ID or a setup-interviewed identifier)". Fix this →


4. Missing @-mention placement in the canonical prompt template (persistent since the d0ea782 wave)return-capture.md lines 8–16

The ## Marker-keyed record comment section (lines 21–26) specifies that the comment's three-part body includes the canonical prompt "addressed (platform @-mention) to the accountable human." However, the ## The prompt section — the text an implementer copies — has no @<accountable-human> placeholder showing WHERE the @-mention goes. An implementer combining the prompt text with the required @-mention has no template signal for placement. Neither 5b1fdc2 nor bfd6620 touched the prompt section.

Minimal fix: add @<accountable-human> as the first line of the prompt blockquote:

> @<accountable-human> — This item was completed by autonomous work. Two questions:

Or add a note after the blockquote: "Address the @-mention to the resolved accountable human (requester via requester_source, or standing owner) at the top of the prompt — before the opening sentence." Fix this →


What's working well

  • Codex P1 fix (bfd6620) is correct: the three-gate framing is precise and the parenthetical justification ("nothing was delivered, so a record would assert autonomous completion of undone work") states the invariant's consequence directly. The fix cleanly extends the existing "neither alone suffices" reasoning to cover the third discriminator.
  • Codex P2 fixes (5b1fdc2) are correct and symmetric: the audit-trail revision rule ("every subsequent revision") closes the forgery gap on mutable-field surfaces cleanly — the hand-edited field case is now explicitly non-conforming rather than undefined. The IDEMPOTENT-RECOVERABLE backfill is the right design — using "any later automation pass" as the recovery agent means the backfill never requires its own retry mechanism and the attest: reply handler becomes self-healing by construction.
  • All substantive prior-wave fixes remain correctly in place at HEAD: two-gate trigger extended to three-gate, reply-triggered handler, per-surface routing key, null-tolerance ladder, native-fields branching (close and attestation), close-time-record precondition, audit-trail authorship check (creation + revisions), both v1 limitation disclosures, requester_source key, attestor_role derivation, native-field provenance requirement, updated evals 9 and 13, reply-correlation rule (attestation_request), item-stamp routing, adapter comment mechanics, three-part comment body, attestation_owner snapshot, automation-identity trust-anchor exclusion of history, field-change-only advisory path, merged-change fan-out, and unbound-requester_source advisory on both halves — all remain correctly resolved.
  • Never-estimate invariant consistently threaded through convention, skill, template, and evals.
  • Attestation-preserving dedupe and the create-create race acknowledgment correct in both convention and template.

Issues 1–3 are quick mechanical fixes (one-line fence split, one-word reflow, one-phrase doc alignment). Issue 4 is a minor prompt-template clarity addition. Issue 1 (malformed fence) is the highest-urgency fix since it has been breaking rendering of three full template sections in GitHub throughout the entire PR.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: bfd6620572

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread plugins/autonomy/skills/setup/SKILL.md
…m the automation

An item-author requester_source on a bot-filed item (or a bot
standing_owner) could snapshot a machine identity as attestation_owner,
letting the automation attest its own record and bypass the
never-estimate rule. The contract now requires the resolved owner to be
a human platform account distinct from the bound automation identity;
a non-human resolution produces no owned record - route to the class's
standing owner, else that item's capture stays advisory. Setup
validates declared standing owners the same way.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@claude

claude Bot commented Jul 19, 2026

Copy link
Copy Markdown

Claude finished @kyle-sexton's task in 3m 1s —— View job


PR Review: feat(autonomy): return-accounting convention, capture slice, live-proven demo (WP3)

Todo List

  • Load tools
  • Read changed files at HEAD (d7e81b6)
  • Assess what the latest commit fixed vs. prior reviews
  • Verify remaining issues from prior review waves
  • Post consolidated review

What d7e81b6 resolved

The Codex P1 from the bfd6620 wave is correctly addressed:

  • Codex P1 — Require human identities for attestation owners: ✅ RESOLVED. The fix is applied consistently across both specification layers:

    • return-accounting.md line 34 — the attestation_owner field now states: "The resolved owner MUST be a human platform account distinct from the bound automation identity — a resolution yielding a bot/app account (e.g. a bot-filed item under an item-author source) or the automation itself produces NO owned record: the item routes to its class's declared standing owner where one exists, else capture for that item stays advisory (a machine owner would let the automation attest its own record, bypassing the never-estimate rule)."
    • SKILL.md step 6, lines 218–223 — setup now validates every declared standing_owner is a human platform account distinct from automation_identity, and the close trigger applies the contract's human-owner rule to each resolution: a bot/app or automation-matching identity produces no owned record — route to the class's standing owner, else advisory.

    The fix correctly handles both the standing_owner (validated at setup time) and the requester_source (applied at close time) paths. Self-attestation by the automation is structurally excluded and the justification ("bypassing the never-estimate rule") is the precise normative grounding.


Remaining issues

1. Malformed closing code fence in return-capture.md at line 98 (persistent across ALL review waves — untouched by any fix commit)

return-capture.md line 98 still reads:

}
``` Consumers ignore marker records from any author other than the bound
automation identity, and dedupe attestation-preservingly (attested outranks unattested;
latest wins only among equals).

The closing triple-backtick fence and the Consumers ignore… prose are on the same line. Per CommonMark (which GitHub uses), a closing fence must consist only of the backtick sequence plus optional trailing spaces — any non-whitespace after the backticks invalidates it as a closing fence. The fenced JSON block for the attested record never closes in GitHub's renderer; the Consumers ignore… paragraph, the entire ## Close-trigger shape section, and the entire ## Attestation-reply trigger shape section all render as code text inside the unclosed block. d7e81b6 touched only SKILL.md and return-accounting.md, leaving this untouched.

Minimal fix: put the closing backticks on their own line, then start the prose as a new paragraph. Fix this →


2. Dangling "Attestor" at return-accounting.md line 116 (re-introduced by a58d7e0, persistent through d7e81b6)lines 115–117

Current state at lines 114–117:

edited field set would be indistinguishable from an authentic attestation, and the comment
floor applies. Attestor
identity derives from the PLATFORM actor of the attestation action — on the comment floor

"Attestor" is stranded as the trailing word of a soft-wrapped line before "identity derives from." d7e81b6 touched return-accounting.md (for the attestation_owner human-identity requirement) but did not reflow this sentence. Fix this →


3. Routing granularity inconsistency (introduced by dcded56, persistent through d7e81b6)return-accounting.md lines 71–73 vs. SKILL.md step 7

return-accounting.md lines 71–73 still read: "the binding declares a standing attestation owner per class, or marks the class attestation-exempt with its cost reported separately" — one entry per class. SKILL.md step 7 keys routing by "a per-surface identifier for each requester-less recurring surface (standing routines, scheduled sweeps) — the bound work-item tracker's own recurring-schedule row id where that binding exists." A class like "standing routines" may have multiple schedule instances (weekly security scan, monthly dep-update), each with its own tracker schedule ID. The same paragraph at lines 78–83 describes the per-surface stamp requirement, making the opening "per class" statement internally inconsistent with the rest of the paragraph. d7e81b6 touched return-accounting.md but updated only line 34 (the attestation_owner field), not the routing language.

One-sentence fix: replace "per class" with "per requester-less recurring-surface instance (keyed by the tracker-native schedule ID or a setup-interviewed identifier)". Fix this →


4. Missing @-mention placement in the canonical prompt template (persistent since the d0ea782 wave)return-capture.md lines 8–16

The ## Marker-keyed record comment section (lines 21–26) specifies that the comment body includes the canonical prompt "addressed (platform @-mention) to the accountable human." However, the ## The prompt (canonical, exactly two fields) section — the text an implementer copies — has no @<accountable-human> placeholder showing WHERE the @-mention goes. d7e81b6 touched only SKILL.md and return-accounting.md and did not update the prompt section.

Minimal fix: add @<accountable-human> as the first line of the prompt blockquote:

> @<accountable-human> — This item was completed by autonomous work. Two questions:

Or add a note after the blockquote: "Address the @-mention to the resolved accountable human (requester via requester_source, or standing owner) at the top of the prompt — before the opening sentence." Fix this →


What's working well

  • Codex P1 fix (d7e81b6) is correct and complete: both paths — standing_owner validated at setup time and requester_source resolutions validated at close time — are covered. The fallback chain (route to class standing owner → advisory) is the right design, and "self-attestation would bypass the never-estimate rule" is the correct normative grounding.
  • Human-owner rule composition: the convention doc's rule (line 34) and the skill's enforcement (step 6, lines 218–223) are aligned and cross-reference through the same language. A bot-filed ordinary item with no standing owner correctly ends up advisory rather than silently wiring a machine owner, which is the safe disposition.
  • All substantive prior-wave fixes remain correctly in place at HEAD: three-gate trigger (label + automation actor + completed outcome), reply-triggered handler, per-surface routing key in SKILL.md, null-tolerance ladder, native-fields branching (close and attestation), close-time-record precondition, audit-trail authorship check (creation + revisions), both v1 limitation disclosures, requester_source key, attestor_role derivation, native-field provenance requirement, updated evals 9 and 13, reply-correlation rule (attestation_request), item-stamp routing, adapter comment mechanics, three-part comment body, attestation_owner snapshot, automation-identity trust-anchor exclusion, field-change-only advisory path, merged-change fan-out, unbound-requester_source advisory on both halves, and idempotent-recoverable backfill — all remain correctly resolved.
  • Never-estimate invariant consistently threaded through convention, skill, template, and evals.

Issues 1–3 are quick mechanical fixes (one-line fence split, one-word reflow, one-phrase doc alignment). Issue 4 is a minor prompt-template clarity addition. Issue 1 (malformed fence) is the highest-urgency fix since it has been breaking rendering of three full template sections in GitHub throughout the entire PR.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d7e81b6363

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread plugins/autonomy/skills/setup/templates/return-capture.md Outdated
Comment thread plugins/autonomy/skills/setup/templates/return-capture.md Outdated
…est recovery

The reply-trigger shape's native branch checked creation only; it now
requires the audit trail to attribute every subsequent record-field
revision to the bound automation (an altered attestation_owner rejects
the record before the snapshot is trusted). The native-field
attestation_request citation gains the same idempotent recovery as the
comment floor: a later automation pass locates its own bot-authored
request comment and fills the missing field, or re-posts the request,
never touching attestation fields.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@claude

claude Bot commented Jul 19, 2026

Copy link
Copy Markdown

Claude finished @kyle-sexton's task in 3m 43s —— View job


PR Review: feat(autonomy): return-accounting convention, capture slice, live-proven demo (WP3)

Todo List

  • Load tools
  • Read changed files at HEAD (c6f0fec)
  • Assess what the latest commit fixed vs. prior reviews
  • Verify persistent issues from prior review waves
  • Post consolidated review

What c6f0fec resolved

Both Codex P2 findings from the d7e81b6 wave are correctly addressed:

  • Codex P2 — Verify every audited native-field revision before attesting: ✅ RESOLVED. return-capture.md lines 136–141 now reads: "...on an audit-trail-selected surface additionally confirms the trail attributes the record's CREATION and EVERY SUBSEQUENT REVISION of the record fields to the bound automation identity (presence alone is forgeable where fields are not ACL-restricted, and a later non-automation edit — notably an altered attestation_owner — makes the record non-conforming and rejected before the owner snapshot is trusted or any attested field written)." The fix is correct — creation and revisions are required, matching the convention doc's rule.

  • Codex P2 — Recover missing native attestation-request citations: ✅ RESOLVED. return-capture.md lines 51–55 now reads: "On native fields it is the URL of the posted request comment, with the SAME recovery property: if the request posted but persisting the field failed, any later automation pass locates its own request comment on the item (bot-authored, carrying the canonical prompt) and fills the missing field — or re-posts the request when none exists — without touching any attestation field." The recovery design is symmetric with the comment-floor's idempotent-recoverable backfill.


Remaining issues

1. Malformed closing code fence in return-capture.md at line 102 (persistent across ALL review waves — untouched by any fix commit)

return-capture.md line 102 still reads:

}
``` Consumers ignore marker records from any author other than the bound
automation identity, and dedupe attestation-preservingly (attested outranks unattested;
latest wins only among equals).

The closing triple-backtick and the Consumers ignore… prose are on the same line. Per CommonMark (which GitHub uses), a closing fence must consist only of the backtick sequence plus optional trailing spaces — any non-whitespace after the backticks invalidates it as a closing fence. The fenced JSON block for the attested record never closes in GitHub's renderer; the Consumers ignore… paragraph, the entire ## Close-trigger shape section, and the entire ## Attestation-reply trigger shape section all render as code text inside the unclosed block — including the revision-verification and native-request-recovery text just added by c6f0fec, which means all the new correct content is invisible to readers on GitHub. This finding has survived every single fix commit since wave 6.

Minimal fix: put the closing backticks on their own line, then start the prose as a new paragraph. Fix this →


2. Dangling "Attestor" at return-accounting.md line 116 (re-introduced by a58d7e0, persistent through c6f0fec)lines 115–117

Current state at lines 114–117:

edited field set would be indistinguishable from an authentic attestation, and the comment
floor applies. Attestor
identity derives from the PLATFORM actor of the attestation action — on the comment floor

"Attestor" is stranded as the trailing word of a soft-wrapped line before "identity derives from." c6f0fec touched only return-capture.md and did not address this. Fix this →


3. Routing granularity inconsistency (introduced by dcded56, persistent through c6f0fec)return-accounting.md lines 71–73 vs. SKILL.md step 7

return-accounting.md lines 71–73 still read: "the binding declares a standing attestation owner per class, or marks the class attestation-exempt" — one entry per class. SKILL.md step 7 keys routing by "a per-surface identifier for each requester-less recurring surface (standing routines, scheduled sweeps) — the bound work-item tracker's own recurring-schedule row id where that binding exists." A class like "standing routines" may have multiple schedule instances (weekly security scan, monthly dep-update), each with its own tracker schedule ID. The same paragraph already describes the per-surface stamp requirement at lines 78–83, making the opening "per class" statement internally inconsistent with the rest of the paragraph. c6f0fec touched only return-capture.md and did not update this passage.

One-sentence fix: replace "per class" with "per requester-less recurring-surface instance (keyed by the tracker-native schedule ID or a setup-interviewed identifier)". Fix this →


4. Missing @-mention placement in the canonical prompt template (persistent since the d0ea782 wave)return-capture.md lines 8–16

The ## Marker-keyed record comment section (lines 21–26) specifies that the comment body includes the canonical prompt "addressed (platform @-mention) to the accountable human." However, the ## The prompt (canonical, exactly two fields) section — the text an implementer copies — has no @<accountable-human> placeholder showing WHERE the @-mention goes. An implementer combining the two sections has no template signal for placement: the @-mention could precede the opening sentence, follow it, or appear anywhere. c6f0fec touched only the ## Attestation-reply trigger shape section and did not update the prompt section.

Minimal fix: add @<accountable-human> as the first line of the prompt blockquote:

> @<accountable-human> — This item was completed by autonomous work. Two questions:

Or add a note after the blockquote: "Address the @-mention to the resolved accountable human (requester via requester_source, or standing owner) at the top of the prompt." Fix this →


5. SKILL.md step 3 does not cover revision verification (new finding from c6f0fec)SKILL.md lines 196–199 vs. return-capture.md lines 136–140

c6f0fec correctly updated the template's native-field reply handler to require confirming "CREATION and EVERY SUBSEQUENT REVISION of the record fields" through the audit trail. However, SKILL.md step 3 still reads only: "the handler confirms through the trail that the bound automation identity created the record." The convention doc (return-accounting.md lines 141–150) already covers revisions correctly; the skill is now the lagging document.

An implementer wiring from SKILL.md would not know to check revisions, missing the protection against hand-edited attestation_owner or other record fields after close on the audit-trail path. A one-phrase addition aligns SKILL.md with the template and convention doc: replace "created the record" with "created the record and that every subsequent revision of its fields was likewise written by it" (matching the convention doc's framing). Fix this →


What's working well

  • Both Codex P2 fixes (c6f0fec) are correct: the revision-verification requirement is exactly right — creation alone is insufficient on the audit-trail path since a later field edit (notably attestation_owner) would pass the creation check; checking every revision closes that gap. The native-request recovery is correctly symmetric with the comment-floor's idempotent-recoverable backfill: "bot-authored, carrying the canonical prompt" is a distinguishable signal, and re-posting when none exists is the right fallback.
  • All substantive prior-wave fixes remain correctly in place at HEAD: three-gate trigger (label + automation actor + completed outcome), reply-triggered handler, per-surface routing key in SKILL.md, null-tolerance ladder, native-fields branching (close and attestation), close-time-record precondition, audit-trail authorship check, both v1 limitation disclosures, requester_source key, attestor_role derivation, native-field provenance requirement, updated evals 9 and 13, reply-correlation rule (attestation_request), item-stamp routing, adapter comment mechanics, three-part comment body, attestation_owner snapshot, automation-identity trust-anchor exclusion of history, field-change-only advisory path, merged-change fan-out, unbound-requester_source advisory on both halves, and the not-planned closure exclusion — all remain correctly resolved.
  • Never-estimate invariant consistently threaded through convention, skill, template, and evals.
  • Attestation-preserving dedupe and the create-create race acknowledgment correct in both convention and template.

Issues 1–3 are quick mechanical fixes (one-line fence split, one-word reflow, one-phrase doc alignment). Issue 4 is a minor prompt-template clarity addition. Issue 5 is a one-phrase SKILL.md alignment. Issue 1 (malformed fence) is the highest-urgency fix since it has been breaking rendering of three full template sections in GitHub throughout the entire PR — including all the correctly-specified content added in the last several commits.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c6f0fec707

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread plugins/autonomy/skills/setup/SKILL.md Outdated
…it-trail path

Step 3's concrete handler wiring checked creation only, while the
contract and template already require every subsequent record-field
revision to be automation-authored; the setup step now carries the same
check - a record with any non-automation revision is rejected before
the owner snapshot is trusted.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@claude

claude Bot commented Jul 19, 2026

Copy link
Copy Markdown

Claude finished @kyle-sexton's task in 2m 42s —— View job


PR Review: feat(autonomy): return-accounting convention, capture slice, live-proven demo (WP3)

Todo List

  • Load tools
  • Read changed files at HEAD (2fd8599)
  • Assess what the latest commit fixed vs. prior reviews
  • Verify persistent issues from prior review waves
  • Post consolidated review

What 2fd8599 resolved

The Codex P1 from the c6f0fec wave is correctly addressed:

  • Codex P1 — SKILL.md step 3 does not cover revision verification: ✅ RESOLVED. SKILL.md lines 197–202 now reads: "…the handler confirms through the trail that the bound automation identity created the record AND authored every subsequent revision of the record fields (any field-writer could forge a conforming unattested set, or alter an existing one — attestation_owner, counterfactual — after creation; a record with any non-automation revision is non-conforming and rejected before the owner snapshot is trusted) — only then writing the attested fields directly on that same item." This aligns step 3 with the template (return-capture.md lines 137–141) and the convention doc (return-accounting.md lines 143–150), which already required both creation and revisions. All three specification layers now agree.

Remaining issues

1. Malformed closing code fence in return-capture.md at line 102 (persistent across ALL review waves — untouched by any fix commit)

return-capture.md line 102 still reads:

}
``` Consumers ignore marker records from any author other than the bound
automation identity, and dedupe attestation-preservingly (attested outranks unattested;
latest wins only among equals).

The closing triple-backtick fence and the Consumers ignore… prose are on the same line. Per CommonMark (which GitHub uses), a closing fence must consist only of the backtick sequence plus optional trailing spaces — any non-whitespace after the backticks invalidates it as a closing fence. The fenced JSON block for the attested record never closes in GitHub's renderer; the Consumers ignore… paragraph, the entire ## Close-trigger shape section (including the merge fan-out text), and the entire ## Attestation-reply trigger shape section (including the revision-verification, native-request-recovery, and attestation-upsert text) all render as code inside the unclosed block. 2fd8599 touched only SKILL.md, leaving this untouched.

Minimal fix: put the closing backticks on their own line, then start the prose as a new paragraph:

}
```

Consumers ignore marker records from any author other than the bound
automation identity, and dedupe attestation-preservingly (attested outranks unattested;
latest wins only among equals).

Fix this →


2. Dangling "Attestor" at return-accounting.md line 116 (re-introduced by a58d7e0, persistent through 2fd8599)lines 115–117

Current state at lines 114–117:

edited field set would be indistinguishable from an authentic attestation, and the comment
floor applies. Attestor
identity derives from the PLATFORM actor of the attestation action — on the comment floor

"Attestor" is stranded as the trailing word of a soft-wrapped line before "identity derives from." 2fd8599 touched only SKILL.md and did not address this. Fix this →


3. Routing granularity inconsistency (introduced by dcded56, persistent through 2fd8599)return-accounting.md lines 71–72 vs. SKILL.md step 7

return-accounting.md lines 71–72 still read: "the binding declares a standing attestation owner per class, or marks the class attestation-exempt" — one entry per class. SKILL.md step 7 keys routing by "a per-surface identifier for each requester-less recurring surface (standing routines, scheduled sweeps) — the bound work-item tracker's own recurring-schedule row id." A class like "standing routines" may have multiple schedule instances (weekly security scan, monthly dep-update), each with its own tracker schedule ID. The same paragraph at lines 78–83 already describes the per-surface stamp requirement, making the "per class" opening statement internally inconsistent with the rest of the paragraph. 2fd8599 touched only SKILL.md and did not update the convention doc.

One-sentence fix: replace "per class" with "per requester-less recurring-surface instance (keyed by the tracker-native schedule ID or a setup-interviewed identifier)". Fix this →


4. Missing @-mention placement in the canonical prompt template (persistent since the d0ea782 wave)return-capture.md lines 8–16

The ## Marker-keyed record comment section (lines 21–26) specifies that the comment body includes the canonical prompt "addressed (platform @-mention) to the accountable human." However, the ## The prompt (canonical, exactly two fields) section — the text an implementer copies — has no @<accountable-human> placeholder showing WHERE the @-mention goes. An implementer combining the two sections has no template signal for placement: the @-mention could precede the opening sentence, follow it, or appear anywhere. 2fd8599 touched only SKILL.md and did not update the prompt section.

Minimal fix: add @<accountable-human> as the first line of the prompt blockquote:

> @<accountable-human> — This item was completed by autonomous work. Two questions:

Or add a note after the blockquote: "Address the @-mention to the resolved accountable human (requester via requester_source, or standing owner) at the top of the prompt — before the opening sentence." Fix this →


What's working well

  • Codex P1 fix (2fd8599) is correct and complete: the revision-verification requirement is now uniform across all three specification layers — convention doc, template, and skill. The expanded parenthetical in SKILL.md ("any field-writer could forge a conforming unattested set, or alter an existing one — attestation_owner, counterfactual — after creation") correctly names the concrete attack vectors and the consequence ("a record with any non-automation revision is non-conforming and rejected before the owner snapshot is trusted") makes the guard's necessity explicit.
  • All substantive fixes from the full PR history remain correctly resolved at HEAD: three-gate trigger (label + automation actor + completed outcome), reply-triggered handler, per-surface routing key in SKILL.md, null-tolerance ladder, native-fields branching (close and attestation), close-time-record precondition, audit-trail authorship check (creation + revisions, now in all three layers), both v1 limitation disclosures, requester_source key, attestor_role derivation, native-field provenance requirement, updated evals 9 and 13, reply-correlation rule (attestation_request), item-stamp routing, adapter comment mechanics, three-part comment body, attestation_owner snapshot, automation-identity trust-anchor exclusion of history, field-change-only advisory path, merged-change fan-out, unbound-requester_source advisory on both halves, idempotent-recoverable backfill, not-planned closure exclusion, and human-only attestation-owner requirement — all remain correctly resolved.
  • Never-estimate invariant consistently threaded through convention, skill, template, and evals.
  • Attestation-preserving dedupe and the create-create race acknowledgment correct in both convention and template.

Issues 1–3 are quick mechanical fixes (one-line fence split, one-word reflow, one-phrase doc alignment). Issue 4 is a minor prompt-template clarity addition. Issue 1 (malformed fence) is the highest-urgency fix since it has been breaking rendering of three full template sections in GitHub throughout the entire PR.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2fd859932b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread plugins/autonomy/skills/setup/templates/return-capture.md Outdated
Any participant can post the public marker text; the reply path's
lookup could select the foreign comment (uneditable) and fail a valid
attestation while the real bot record stayed unattested. The lookup now
filters by the bound automation identity's authorship, matching the
record-integrity rule the close path and consumers already apply.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@claude

claude Bot commented Jul 19, 2026

Copy link
Copy Markdown

Claude finished @kyle-sexton's task in 2m 56s —— View job


PR Review: feat(autonomy): return-accounting convention, capture slice, live-proven demo (WP3)

Todo List

  • Load tools
  • Read changed files at HEAD (47080c7)
  • Assess what the latest commit fixed vs. prior reviews
  • Verify persistent issues from prior review waves
  • Post consolidated review

What 47080c7 resolved

The Codex P1 from the 2fd8599 wave is correctly addressed:

  • Codex P1 — Restrict reply lookup to the automation-authored marker: ✅ RESOLVED. SKILL.md step 3, lines 189–194 now reads: "on the comment floor, find the marker comment AUTHORED BY THE BOUND AUTOMATION IDENTITY and edit it in place (the lookup filters by author per the record-integrity rule — a foreign-posted marker is ignored, never selected or allowed to shadow the real record — and the bot-authored marker's absence enforces the contract's attestation-never-creates rule structurally: no close-time record, nothing to edit)." return-capture.md lines 131–135 mirrors this precisely. The author filter is the correct fix — a foreign-authored marker can no longer be selected (and fail an upsert) or block a valid attestation of the real bot record.

Remaining issues

1. Malformed closing code fence in return-capture.md at line 102 (persistent across ALL review waves — untouched by any fix commit)

return-capture.md line 102 still reads:

}
``` Consumers ignore marker records from any author other than the bound
automation identity, and dedupe attestation-preservingly (attested outranks unattested;
latest wins only among equals).

The closing triple-backtick fence and the Consumers ignore… prose are on the same line. Per CommonMark (which GitHub uses), a closing fence must consist only of the backtick sequence plus optional trailing spaces — any non-whitespace after the backticks invalidates it as a closing fence. The fenced JSON block for the attested record never closes in GitHub's renderer; the Consumers ignore… paragraph, the entire ## Close-trigger shape section, and the entire ## Attestation-reply trigger shape section (including the author-filtering text just added by 47080c7) all render as code text inside the unclosed block. This finding has been raised in every single review wave and has survived every fix commit untouched.

Minimal fix: put the closing backticks on their own line, then start the prose as a new paragraph:

}
```

Consumers ignore marker records from any author other than the bound
automation identity, and dedupe attestation-preservingly (attested outranks unattested;
latest wins only among equals).

Fix this →


2. Dangling "Attestor" at return-accounting.md line 116 (re-introduced by a58d7e0, persistent through 47080c7)lines 115–117

Current state at lines 115–117:

floor applies. Attestor
identity derives from the PLATFORM actor of the attestation action — on the comment floor

"Attestor" is stranded as the trailing word of a soft-wrapped line before "identity derives from." 47080c7 touched only SKILL.md and return-capture.md and did not address this. Fix this →


3. Routing granularity inconsistency (introduced by dcded56, persistent through 47080c7)return-accounting.md lines 71–72 vs. SKILL.md step 7

return-accounting.md lines 71–72 still read: "the binding declares a standing attestation owner per class, or marks the class attestation-exempt" — one entry per class. SKILL.md step 7 keys routing by "a per-surface identifier for each requester-less recurring surface (standing routines, scheduled sweeps) — the bound work-item tracker's own recurring-schedule row id where that binding exists." A class like "standing routines" may have multiple schedule instances (weekly security scan, monthly dep-update), each with its own tracker schedule ID. The same paragraph already describes the per-surface stamp requirement at lines 78–83, making the opening "per class" statement internally inconsistent with the rest of the paragraph. 47080c7 touched only SKILL.md (step 3 area) and return-capture.md and did not update the convention doc.

One-sentence fix: replace "per class" with "per requester-less recurring-surface instance (keyed by the tracker-native schedule ID or a setup-interviewed identifier)". Fix this →


4. Missing @-mention placement in the canonical prompt template (persistent since the d0ea782 wave)return-capture.md lines 8–16

The ## Marker-keyed record comment section (lines 21–26) specifies that the comment's three-part body includes the canonical prompt "addressed (platform @-mention) to the accountable human." However, the ## The prompt (canonical, exactly two fields) section — the text an implementer copies — has no @<accountable-human> placeholder showing WHERE the @-mention goes. An implementer combining the prompt text with the required @-mention has no template signal for placement: the @-mention could precede the opening sentence, follow it, or appear anywhere. 47080c7 updated the attestation-reply shape of return-capture.md but did not touch the prompt section.

Minimal fix: add @<accountable-human> as the first line of the prompt blockquote:

> @<accountable-human> — This item was completed by autonomous work. Two questions:

Or add a note after the blockquote: "Address the @-mention to the resolved accountable human (requester via requester_source, or standing owner) at the top of the prompt — before the opening sentence." Fix this →


What's working well

  • Codex P1 fix (47080c7) is correct and complete: the author-filter is applied consistently at both the SKILL.md step 3 level and the template's ## Attestation-reply trigger shape section. The phrasing — "a foreign-posted marker is ignored, never selected or allowed to shadow the real record" — is exactly right. The structural argument ("the bot-authored marker's absence enforces the contract's attestation-never-creates rule structurally: no close-time record, nothing to edit") correctly ties the author filter to the existing attestation-never-creates invariant rather than introducing a parallel gate.
  • All substantive prior-wave fixes remain correctly in place at HEAD: three-gate trigger (label + automation actor + completed outcome), reply-triggered handler, per-surface routing key in SKILL.md, null-tolerance ladder, native-fields branching (close and attestation), close-time-record precondition, audit-trail authorship check (creation + revisions, in all three layers), both v1 limitation disclosures, requester_source key, attestor_role derivation, native-field provenance requirement, updated evals 9 and 13, reply-correlation rule (attestation_request), item-stamp routing, adapter comment mechanics, three-part comment body, attestation_owner snapshot, automation-identity trust-anchor exclusion of history, field-change-only advisory path, merged-change fan-out, unbound-requester_source advisory on both halves, idempotent-recoverable backfill, not-planned closure exclusion, and human-only attestation-owner requirement — all remain correctly resolved.
  • Never-estimate invariant consistently threaded through convention, skill, template, and evals.
  • Attestation-preserving dedupe and the create-create race acknowledgment correct in both convention and template.

Issues 1–3 are quick mechanical fixes (one-line fence split, one-word reflow, one-phrase doc alignment). Issue 4 is a minor prompt-template clarity addition. Issue 1 (malformed fence) is the highest-urgency fix since it has been breaking rendering of three full template sections in GitHub throughout the entire PR — including all the correctly-specified content added across the commit history.

@kyle-sexton
kyle-sexton merged commit 10da77b into main Jul 19, 2026
14 checks passed
@kyle-sexton
kyle-sexton deleted the feat/autonomy-return-accounting branch July 19, 2026 03:11
kyle-sexton added a commit that referenced this pull request Jul 19, 2026
…ils, routines, runner design pack) (#359)

## Summary

Architect-round Plans for the four remaining ai-adoption-ladder work
packages, on the merged WP1-WP3 foundations (#330, #343, #356):

- **WP4 trigger-dispatch**
(`docs/topics/ai-ladder-wp4-trigger-dispatch/PLAN.md`): T1 contract —
four signal-surface classes
(`tracker-vcs-event`/`temporal`/`agent-internal`/`channel-feed`), six
adapter obligations, signal envelope (`signal.*` marker record incl.
`signal.work_class` stamped from the security surface), kick + drain
dispatch through the one work-item queue entrypoint,
`check-signal-envelope.mjs` enforcement surface, scratch-repo demo.
- **WP5 guardrails** (`ai-ladder-wp5-guardrails/PLAN.md`): T2+T3+#241 —
matrix hub + 4 leaves, two-surface binding split (security binding in
settings-as-code home, `executor_class`, admission decision table +
classification rules), `check-security-binding.mjs` with eval-mode
promotion-ceiling semantics, probe-before-bind isolation slice,
free-tier CI positive probe + fail-closed demo.
- **WP6 routines** (`ai-ladder-wp6-routines/PLAN.md`): T7 — catalog hub
(39 classes) + 10 v1 leaves (dead-code sweep excluded per D4
correction), contract-owned catalog-to-matrix mapping rules, setup slice
with detect-diff-reconcile of existing schedulers, novel-class
derivation probe.
- **WP7 runner design pack** (`ai-ladder-wp7-runner/PLAN.md`): T4
graduation — spine + 8 seam specs, lifecycle state model, two-family
stop criteria, terminal-handoff escalation with severity/ack knobs,
topology seam map. ZERO build artifacts; build stays trigger-gated;
birth decisions USER-RESERVED.

Merge order pinned: WP4 before WP5 (absent admission binding fail-closes
to human-gated — no ungoverned window), WP6 after both, WP7 last.

Review: WP4+WP5 stress-tested by a fresh-context reviewer (14 findings,
all folded — headline: work-class classification obligation +
`executor_class` on the security binding). WP6+WP7 stress-tested by a
second fresh-context pass (10 findings, FIX-THEN-SHIP both, all folded —
headline: routine→class mappings land on the WP5 security surface, never
the repo-local agent-writable section; D2 gains a hybrid DET+AGT branch,
a `not-a-routine` catalog flag, and provenance/structural axes reaching
C4/C5; WP7's escalation severity refinement adds the WP5
schema+validator edits it requires as genuinely additive optional keys,
C5→L3 cited from the matrix cell, vendor-hosted merge cap restated on
the cloud-backend path).

No linked issue

## Related

- #330 (contract set + WP1-WP3 plans)
- #343 (WP2 telemetry), #356 (WP3 return accounting)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Fable 5 (1M context) <noreply@anthropic.com>
kyle-sexton added a commit that referenced this pull request Jul 19, 2026
…elope check (WP4) (#372)

WP4 trigger-dispatch package (T1), per the merged PLAN (all four phases
complete on this branch).

No linked issue

## Related

- #359 (WP4–WP7 plans, incl. this package's PLAN as merged)
- #356 (WP3 return accounting — the marker-record precedent the envelope
serialization follows)
- #343 (WP2 telemetry — the trace-tree obligation this contract imports)

## What ships

- **`plugins/autonomy/reference/trigger-dispatch.md`** (new contract):
four signal-surface classes (`tracker-vcs-event` / `temporal` /
`agent-internal` / `channel-feed`), two recorded attributes (provenance,
transport incl. `push-lifecycle` expiry fail-close + poll-detector
backstop), six class-generic adapter obligations (normalize+enqueue
only; layered idempotent dedup with create-then-reconcile and a
live-duplicate drain guard; provenance + durable raw link; traceparent
propagation; admission enforcement at the seam with absent-binding
fail-close; closed-loop ack), security-surface work-class stamping with
verified `agent-internal` parent provenance and higher-of class
resolution, the schema-versioned signal envelope (marker `<!--
autonomy:signal:v1 -->`), kick + drain dispatch with the one-entrypoint
invariant and execution-surface attestation, executor surface classes
with security-owned `executor_class`.
- **Setup trigger/dispatch slice** (`skills/setup/SKILL.md`):
discovery-first per-class surface interview, DIY-floor kick + hourly
drain as reviewable changes, plan-gated surfaces advisory with cost,
execution-surface recording with the attestation caveat stated,
fail-closed absent-admission wiring, additive `triggers` binding section
(shared `surfaces` map shape that later scheduling sections reuse).
- **Templates**: `templates/trigger-adapters.md` (per-class adapter
shapes, six obligations inline), `templates/ack-reply.md` (one-line ack,
item URL first).
- **Enforcement**: `scripts/check-signal-envelope.mjs` — validates the
envelope marker record (required keys, enums, W3C traceparent,
agent-internal `signal.parent_item` as normalized canonical URL,
deterministic raw-link origin branching via the binding's surfaces
maps), exit contract 0/1/2 mirroring `check-emission-conformance.mjs`.
- Five new setup evals; plugin 0.4.0; README + catalog.

## Conforming-path demo (scratch repo, live)

Run on `kyle-sexton/autonomy-demo-scratch` (private throwaway) with the
work-items capability's tracker seam installed
(`tools/work-item-tracker/` copied per its documented install path) and
a repo-local binding carrying the `triggers` section. No admission
binding present → the fail-closed path is what the demo proves. No paid
service touched.

1. **Stub signal**: label `autonomy:trigger` applied to source issue
[#2](kyle-sexton/autonomy-demo-scratch#2);
labeled-event id `28172185501` fetched from the issue timeline
(surface-native unique event id → `signal.identity`).
2. **Dedup pre-search** for the identity: `[]` (no existing item).
3. **Enqueue via the seam** (`work-item-tracker.sh create-item`): queue
item [#3](kyle-sexton/autonomy-demo-scratch#3)
created carrying the full envelope — class/transport/provenance,
identity, raw link
(`https://api.github.com/repos/kyle-sexton/autonomy-demo-scratch/issues/events/28172185501`),
traceparent `00-dab5c21d6389b65c950f6b13f14af7e3-de1b63c53960913b-01`
(the trigger-hop trace context observed on the enqueue record), NO
`signal.work_class` (no classification rules bound → unclassified),
label `needs-human`.
4. **Create-then-reconcile re-search**: exactly one item (#3) matches
the identity — no duplicate to close.
5. **Ack echo** on the source surface: [comment on
#2](kyle-sexton/autonomy-demo-scratch#2 (comment))
— `Queued as
kyle-sexton/autonomy-demo-scratch#3 (autonomy:
tracker-vcs-event signal)`.
6. **Envelope conformance**: `check-signal-envelope.mjs <item-3-body>
--binding .claude/autonomy/binding.json` → `Signal-envelope conformance
OK: 1 envelope(s) checked.` exit 0.
7. **Drain claims via the seam lease** (autonomous drain mode, the ONE
entrypoint): `work-item-tracker.sh claim
github:kyle-sexton/autonomy-demo-scratch#3` → lease acquired (`holder:
kyle-sexton`, lease comment `5014153239`), exit 0.
8. **Fail-closed refusal, audited live**: admission check before
execution found NO admission binding → autonomous execution REFUSED,
[refusal comment on
#3](kyle-sexton/autonomy-demo-scratch#3 (comment)),
claim released; final state `OPEN`, labels `["needs-human"]`, assignees
`[]`. This also exercises the unclassified → human-gated path (no
security binding → no `signal.work_class`).

No second dispatch path was exercised anywhere: the event kick and the
drain both funnel into the seam lease.

## Near-duplicate audit

The dispatch entrypoint composes the work-item queue capability's
EXISTING autonomous drain mode and race-safe seam lease — no second
claim or dispatch mechanism was created anywhere in this package. The
adapter templates normalize and enqueue only; the drain-side
live-duplicate guard and the create-then-reconcile rule reuse the
queue's own primitives.

## Gates

- `scripts/validate-plugins.sh` exit 0; `node
scripts/validate-plugin-contracts.mjs` exit 0 (vendor deny-list clean
over `reference/`); `node scripts/generate-catalog.mjs --check` in sync.
- `claude plugin validate plugins/autonomy --strict` pass; skill-quality
`check-skill.sh setup` PASS (2 pre-existing WARNs: line soft-target,
gotchas surface); `evals.json` valid against the bundled schema (ajv
draft2020).
- markdownlint 0 errors; typos clean; lychee (offline) 0 errors. Full
plugin test suite rides CI (local run exceeds the shell timeout;
prior-session finding).
- Checker exit contract verified with fixtures: no-args → 2 + usage;
valid tracker/temporal-local → 0; temporal without `--binding`, ci-cron
origin with `file:` link, unrecorded surface, agent-internal missing
`signal.parent_item` → 1 each.

## Boris check

The 2→3 cell ("break up your work into loops and routines; let Claude
kick off Claude") is instantiated as governed queue + kick; the step-3
trap is honored (audit trail before scale — envelope, ack, lease,
refusal are all tracker-resident audit records; no agent-count
machinery); the step-1 guardrail is untouched; the telemetry trace tree
is the kick-off audit trail (traceparent on the enqueue record).

Fresh-docs mandate: GitHub Actions events reference and the Claude Code
headless reference re-fetched this session before the SKILL.md edit
(cited in the Phase 2 commit).

<details>
<summary>PLAN.md (as merged, tags advanced)</summary>

See `docs/topics/ai-ladder-wp4-trigger-dispatch/PLAN.md` on this branch
— all four phase tags [DONE], decisions table and stress-test summary
carried in the file.

</details>

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
kyle-sexton added a commit that referenced this pull request Jul 19, 2026
…rule, snapshot exit-code taxonomy, cross-PR dependency channel (#456)

Closes #373.

Implements the four enhancements plus one gotcha from issue #373 in the
`babysit-prs` skill. The source retrospective the issue cites
(`.work/handoffs/babysit-autopilot-retro.md`) is not present in the
checkout
(`.work/` is gitignored), so every edit was driven by the issue body
plus the
live skill files; the retro is provenance only. All doc edits are
pointer-style
(they point at the existing rule/clause, never restate it).

## (a) No-monitor hard STOP at the merge / gate-completion step

Added in both `SKILL.md` (Guarded mutations) and `reference/safety.md`
(Pinned-Command Degradation): once a PR is proven ready, or its merge is
deferred to a human, report and stop — never arm a watch/monitor. Both
point
at the existing no-background-monitor clause in the Worker Contract
(`reference/orchestration.md`) rather than restating it.

## (b) Bare-wrapper pipe rule

`reference/safety.md` Guarded Mutation Wrappers now states that the
wrapper's
JSON must be parsed in a separate step — never `wrapper | python` / `|
jq` —
because an interpreter-in-pipeline trips the auto-mode safety classifier
and
blocks the call before the wrapper runs.

## (c) Snapshot exit-code taxonomy

`scripts/pr_queue_snapshot.py` previously collapsed every non-fatal
error into
exit `1`, so a purely-advisory head-ref alias-check error was
indistinguishable from a substantive per-PR hydration failure. The
split:

| code | meaning | state written |
| --- | --- | --- |
| `0` | valid snapshot, no errors | yes |
| `1` | valid snapshot, ≥1 substantive error (per-PR hydration or
discovery failure) | yes |
| `2` | fatal — exception before a snapshot existed | no |
| `3` | valid snapshot, advisory-only (head-ref alias cross-check)
errors | yes |

Substantive errors take precedence over advisory (a run with both
returns `1`).
The advisory marker is a single-source constant
(`babysit_delta.HEAD_REF_ALIAS_ERROR_MARKER`) used at both
message-construction
sites (queue path in `babysit_delta.py`, single-PR path in
`pr_queue_snapshot.py`) so they cannot drift. Taxonomy documented in the
module
docstring; new `scripts/tests/test_pr_queue_snapshot.py` covers 0/1/2/3
including the advisory-vs-substantive distinction and precedence.

**Consumers checked** (exit codes are a caller contract): every `*.md`,
`*.sh`,
`*.py`, `engine.test.sh`, orchestration doc, and `bin/` wrapper
referencing the
snapshot. No live consumer keys on the script's `$?` — the docs
(`orchestration.md`, `SKILL.md`, `loop.md`) invoke it and parse the JSON
snapshot; `babysit-python.sh` uses `exec` (child exit code passes
through
unchanged); no `bin/` wrapper or sibling script branches on it.
Introducing `3`
therefore breaks no caller that treated `1` as "any error".

## (d) Worker→main cross-PR dependency channel

New `Cross-PR Dependency Signalling` section in
`reference/orchestration.md`
formalizing a worker signalling a discovered cross-PR coupling (e.g.
medley#1567 ↔ #1597, #224#356) back to the main agent, which owns
cross-PR
ordering. Points at the existing `SendMessage` mechanism (documented
there for
main→worker), explicitly reversed.

## Gotcha: self-blocking CI check

Recorded in the `SKILL.md` Gotchas list: a newly required check whose
own fix
PR carries that same check cannot be gate-merged and needs a one-time
human
admin-merge bootstrap. The concurrent-same-identity yield rationale is
already
covered by the Checkout/Push invariants (head-SHA recheck + worker lease
+
`foreign_activity` suppressor) and is deliberately not duplicated.

## Verification

- `bash engine.test.sh`: `Ran 186 tests … OK`; ruff `All checks
passed!`;
  guarded-wrapper behavior checks all PASS.
- markdownlint-cli2 on the four changed `.md` files: 0 issues.
- Plugin bumped `0.9.0` → `0.9.1` (`jq -e .version` confirms) with a
matching
  `## [0.9.1]` CHANGELOG entry.
- No trailing whitespace / final-newline issues in any changed file.

## Related

- #322 (PR-B) — retro source for these enhancements.
- #324 — sibling review-trigger reconciliation (F8 posting-guard
follow-on territory).
- #326, #327 — same babysit-prs safety-hardening cluster.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
kyle-sexton added a commit that referenced this pull request Jul 20, 2026
## Summary

Effort-end housekeeping for the AI-adoption-ladder effort: all seven
work packages are merged,
so the per-WP topic slices come out per the close-out convention
(publish the PLAN, then prune
the slice).

- WP4–WP7 PLANs were already spliced into their PR bodies at each
close-out (#372, #377,
  #600, #676).
- WP1–WP3 PLANs are now published the same way into #333, #343, and #356
(each merged PR body
gained a `PLAN (published at effort-end close-out)` details block), so
every slice's content
  has a durable home on its merged PR before the directory is removed.
- The WP map in `docs/topics/ai-adoption-ladder/index.md` now records
delivery PRs instead of
live slugs. The effort hub itself (index, design evidence, research
docs) stays.

No content is lost: every deleted PLAN.md is byte-recoverable from git
history and readable in
its merged PR's details block.

## Related

No linked issue (effort-end housekeeping; the WP map issue #239 is
already closed).

- #239 (WP map: AI adoption ladder — the effort this closes out)
- #333 / #343 / #356 (WP1–WP3 delivery PRs, PLANs published into their
bodies in this
  close-out)
- #372 / #377 / #600 / #676 (WP4–WP7 delivery PRs, PLANs published at
their own close-outs)

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
kyle-sexton added a commit that referenced this pull request Jul 20, 2026
…ger row (#698)

## Summary

D1 sweep for #353: the WP1–WP7 PLAN out-of-package notes (mined from the
merged PR bodies #333/#343/#356/#372/#377/#600/#676) contained 31
deferred notes; every note that named no tracking issue and had no
contract-recorded trigger now has a durable home:

- **README roadmap** gains four trigger-gated rows: fleet guardrail
materializations (WP5), fleet routine stand-up + existing-scheduler
reconciliation (WP6), vendor-binding capability templates (WP6), cost
enforcement / hard spend caps (WP5, 3→4 trigger).
- **Trigger register** gains the second-binding-consumer cross-repo
drift check (WP1).
- **`reference/return-accounting.md`** records the per-work-class
precision-graduation deferral beside its band-stability rule (WP3).
- **CHANGELOG.md created** for the autonomy plugin (first entry;
0.1.0–0.7.0 history stays in the WP PR bodies) + version bump to 0.7.1 —
starts the CHANGELOG-parity posture #663 gates on.

All other mined notes were already covered: tracked issues (#351, #352,
#694#697), contract-recorded triggers (telemetry immutable-ID,
return-accounting expansion/revisit), delivered sibling WPs, resolved
`/architect` questions, or the user-held dormant triggers (runner build
T4, L3 backend, merge serialization, mid-run interrupt, org-enablement,
cross-team). Full disposition table lands as a comment on #353 at close.

Documentation only — no contract semantics change.

## Related

- #685 (effort-end prune that moved the PLAN records into the merged PR
bodies)
- #663 (CHANGELOG-parity gate this PR's new CHANGELOG.md starts
satisfying)
- WP delivery PRs mined: #333, #343, #356, #372, #377, #600, #676

Closes #353

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant