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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion plugins/autonomy/.claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "https://json.schemastore.org/claude-code-plugin-manifest.json",
"name": "autonomy",
"version": "0.21.0",
"version": "0.22.0",
"description": "Governed autonomous agent operation: role-topology, binding-seam, wiring-vs-advisor, telemetry, return-accounting, trigger-dispatch, per-work-class guardrail-matrix, standing-routine-catalog, and design-only runner-charter contracts for climbing the AI-adoption ladder, plus a guided-setup skill that discovers an adopting org's state, writes its schema-versioned binding, wires standards-pinned OTLP emission with a zero-cost file-artifact default, wires human-attested return capture at the task boundary, wires signal adapters with one governed dispatch entrypoint, binds the five-class guardrail matrix to an org's isolation substrates with an in-boundary live-validation probe before recording each fail-closed binding, and stands up standing-routine-catalog classes as scheduled temporal signal adapters behind the one governed queue with free scheduling defaults wired as reviewable changes and each routine's work-class mapping homed on the security surface.",
"author": {
"name": "Melodic Software",
Expand Down
13 changes: 13 additions & 0 deletions plugins/autonomy/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,19 @@
All notable changes to the `autonomy` plugin are documented here. Format follows
[Keep a Changelog](https://keepachangelog.com/en/1.1.0/); this plugin uses semantic versioning.

## [0.22.0]

### Added

- **Prerequisite-resolution setup slice** (#2725). Extends `/autonomy:setup` with
`check` (per-identity verdicts + provenance across declared surfaces via
`scripts/check-prerequisite-resolution.mjs`; engine health-check liveness) and
`apply` (detect-diff-reconcile, prose-context proposals into non-security keys,
human ratify → additive `prerequisite_resolution` section with `surface_refs` and
no `surfaces` map; narrowing-only enablement; org-rung interviewed never
auto-written; security binding prepared never written). Spoke:
`context/prerequisite-resolution-slice.md`. Co-located slice test + evals 30–31.

## [0.21.0]

### Added
Expand Down
3 changes: 2 additions & 1 deletion plugins/autonomy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ state and records that binding.
prober — with `deferred-class` marking `join:` rows that have no identities yet. Per-identity
facts live in each `v1` leaf; `generated/identity-prerequisites.json` is the drift-gated
emission derived from those leaves (generator under `skills/setup/scripts/`);
`skills/setup/scripts/resolve-prerequisites.mjs` is the deterministic per-surface resolver.
`skills/setup/scripts/resolve-prerequisites.mjs` is the deterministic per-surface resolver;
the setup skill's prerequisite-resolution slice (`check` / `apply`) consumes it.
- **Runner design pack** (`reference/runner.md`): the architect-ready design contract for the
autonomous-drain runner — the composition spine and its eight seams, the lifecycle state
model, the two-family stop-criteria taxonomy with terminal-handoff escalation and
Expand Down
32 changes: 31 additions & 1 deletion plugins/autonomy/skills/setup/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,35 @@ resolution order.
`signal.routine`, an unresolvable surface, an identity↔surface mismatch, a raw link outside the
ratified prefix, a `producer_identity` mismatch, or an unclassified class is a finding.

## Prerequisite-resolution slice

Extends this skill per its own extension model for
[routine prerequisite resolution](${CLAUDE_PLUGIN_ROOT}/reference/prerequisite-resolution.md).
Detail lives in
[`context/prerequisite-resolution-slice.md`](context/prerequisite-resolution-slice.md).

**Liveness.** The slice `check` is an engine health-check surface: it invokes
[`scripts/resolve-prerequisites.mjs`](scripts/resolve-prerequisites.mjs) end-to-end and
fails loud on internal failure — never a verdict-shaped fallback.

1. **`check`** — for each scheduling surface already recorded under `triggers` / `routines`
(this slice declares no `surfaces` map of its own), report per-identity verdicts with
provenance via
[`scripts/check-prerequisite-resolution.mjs`](scripts/check-prerequisite-resolution.mjs).
A bare repo yields `unsupported` / `unknown` for every identity, never an error.
2. **`apply`** — detect-diff-reconcile against existing `prerequisite_resolution`
declarations; a declaration contradicting a ran-negative probe is a finding (identity
stays negative while the finding is open — ADR 0011 Decision 2). The prose-context pass
reads `CLAUDE.md` / `AGENTS.md` (session-reachable only by reference) / `README` to
*propose* declarations into **non-security keys only**; the human ratifies; the slice
writes the additive section (`surface_refs` + `declarations`, no `surfaces` map).
Narrowing-only enablement: enable in `routines.enabled` only when the verdict clears;
negative/`unknown` routes to the advisory path. Org-rung entitlements are interviewed,
never auto-written. Non-interactive contexts skip ask-and-persist and report assumptions.
Security-binding changes are **prepared**, never written.
Wrapper:
[`scripts/apply-prerequisite-resolution.mjs`](scripts/apply-prerequisite-resolution.mjs).

## Runner note

The [runner design pack](${CLAUDE_PLUGIN_ROOT}/reference/runner.md) is bindable-when-born:
Expand All @@ -454,7 +483,8 @@ surface recorded in two `surfaces` maps resolving as ambiguous — are catalogue
## What this skill does NOT do

- Wire capability slices that have not shipped yet — each lands with its own work package and
extends this skill (the runner charter execution pack is the next such slice).
extends this skill (the runner charter execution pack remains the next such slice after
prerequisite-resolution).
- Estimate, impute, or backfill the two human-attested return fields — ever.
- Mutate platform settings, user settings, or `pluginConfigs`.
- Assume the shape of any particular org or fleet — a run against an unknown repo asks or
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
# Prerequisite-resolution slice

Extends `/autonomy:setup` per the skill's own extension model. Owns the
[routine prerequisite resolution](${CLAUDE_PLUGIN_ROOT}/reference/prerequisite-resolution.md)
question at setup time: which `v1` identities can run against this repository on each
declared scheduling surface, and why.

## Liveness

This slice's `check` is an **engine health-check** surface under
[`liveness-assertion`](../../../../../docs/conventions/liveness-assertion/README.md): it
invokes the deterministic resolver end-to-end and fails loud on internal failure. It never
reports "healthy" from configuration alone, and never invents a verdict-shaped fallback.

## `check` (read-only)

1. Resolve scheduling-surface ids from the existing binding (`triggers.surfaces` and
`routines.surfaces` — merged; the slice never declares its own `surfaces` map).
2. For each surface, run
[`scripts/resolve-prerequisites.mjs`](../scripts/resolve-prerequisites.mjs) against the
project root.
3. Report per-identity verdicts (`supported` / `conditional` / `unsupported` / `unknown`)
with per-signal provenance and any findings (declaration↔probe contradictions).
4. On a bare repo (no binding, no tracker, no CI), every identity reports
`unsupported` or `unknown` — never an error.

Wrapper:
[`scripts/check-prerequisite-resolution.mjs`](../scripts/check-prerequisite-resolution.mjs).

## `apply` (interactive propose → ratify)

1. **Detect-diff-reconcile.** Run the same resolution as `check`. An existing
`prerequisite_resolution` declaration is authoritative input: divergence from probe
results is a **finding**, never a silent overwrite. A ran-negative probe caps a positive
declaration (ADR 0011 Decision 2) — the identity stays `unsupported` while the finding
is open.
2. **Prose-context pass (proposal only).** Read host instruction files (`CLAUDE.md`),
secondary agent-instruction files (`AGENTS.md` — reaches a session only through a
reference), and `README` for *proposed* declarations into **non-security keys only**.
The deterministic resolver never parses prose; prose is never runtime authority.
3. **Human ratifies.** Interactive contexts present proposals one at a time. Non-interactive
and forked contexts skip ask-and-persist rungs and report assumptions (topic-docs rule).
4. **Write additively.** On ratification, write the `prerequisite_resolution` section of
`.claude/autonomy/binding.json`:
- `schema_version`: `"1.0"`
- `surface_refs`: existing scheduling-surface ids (references only — **no `surfaces` map**)
- `declarations`: `{ surface, identity?, need?, state, rung }` entries
5. **Narrowing-only enablement.** An identity may be enabled in `routines.enabled` only when
its verdict clears (`supported`, or `conditional` where the named conditions are accepted).
`unsupported` / `unknown` route to the advisory path. The slice **prepares** any
security-binding change (admission / classification) and **never writes** that surface.
6. **Org-rung entitlements.** Connector entitlements for `prod` / `product` / `org` / `ext`
bind at the Org binding layer. The slice reports which prerequisites await the org rung
and stops — it never auto-writes org-rung values into the repo-local binding.

Wrapper (non-interactive propose / optional `--ratify` for tests):
[`scripts/apply-prerequisite-resolution.mjs`](../scripts/apply-prerequisite-resolution.mjs).

## Binding section shape

```json
{
"prerequisite_resolution": {
"schema_version": "1.0",
"surface_refs": ["ci-cron"],
"declarations": [
{
"surface": "ci-cron",
"identity": "issue-triage-sweep",
"need": "tracker",
"state": "present",
"rung": "repo-local"
}
]
}
}
```

Absent-section tolerance holds. The section MUST NOT carry a `surfaces` map —
[`check-signal-envelope.mjs`](../scripts/check-signal-envelope.mjs) merges every section's
`surfaces` map and treats duplicates as ambiguous.
26 changes: 26 additions & 0 deletions plugins/autonomy/skills/setup/evals/evals.json
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,32 @@
"Restates that the runner-execution home is unborn and nothing else runner-specific is recorded until a build trigger fires",
"Cites the runner design pack rather than restating its stop-criteria taxonomy or severity-resolution content"
]
},
{
"id": 30,
"name": "prerequisite-resolution-check-reports-verdicts-with-provenance",
"prompt": "/autonomy:setup check\n\nWhich routine identities can actually run against this repo, and why?",
"expected_output": "Runs the prerequisite-resolution slice check: for each scheduling surface already recorded in the autonomy binding (the slice declares no surfaces map of its own), invokes the deterministic resolver and reports per-identity verdicts (supported / conditional / unsupported / unknown) with per-signal provenance and any declaration↔probe findings. Names its liveness taxonomy row (engine health-check) and fails loud on resolver failure. On a bare repo every identity is unsupported or unknown — never an error. Performs no writes.",
"files": [],
"expectations": [
"Reports per-identity verdicts with provenance across declared scheduling surfaces",
"States engine health-check liveness taxonomy row / fail-loud posture",
"Bare-repo path yields unsupported/unknown for every identity without error",
"No file writes in check mode"
]
},
{
"id": 31,
"name": "prerequisite-resolution-apply-reconcile-narrowing-no-security-write",
"prompt": "/autonomy:setup apply\n\nDetect our routine prerequisites from CLAUDE.md and enable everything that looks ready.",
"expected_output": "Runs detect-diff-reconcile: existing prerequisite_resolution declarations are authoritative; a declaration contradicting a ran-negative probe is a finding (identity stays unsupported while the finding is open — never a silent overwrite, and a positive verdict never survives on intent alone). The prose-context pass proposes declarations into non-security keys only from CLAUDE.md/AGENTS.md/README; the human ratifies before any write. The additive binding section uses surface_refs and declarations and declares no surfaces map. Enablement is narrowing-only — unsupported/unknown route to the advisory path. Org-rung entitlements are interviewed and never auto-written. Security-binding changes are prepared, never written. Non-interactive contexts skip ask-and-persist and report assumptions.",
"files": [],
"expectations": [
"Declaration↔probe contradiction surfaces as a reconcile finding; identity remains unsupported",
"Prose proposals target non-security keys only; human ratification before write",
"prerequisite_resolution section has surface_refs + declarations and no surfaces map",
"Never writes the security binding; org-rung entitlements interviewed not auto-written; narrowing-only enablement"
]
}
]
}
Loading