Dispositions: one per-hook decision catalog, an ASK and DEFER contract, and one failure and error rule

Open
#535 2 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Documentation
Clarity
Clearly specified
Activity status
Active
Tech stack
json, typescript

Research direction

Start with docs/spec/instrument/specification.md and docs/spec/instrument/hooks.md, then compare the referenced hook schemas under specification/v0.1.0/hooks/ and response-envelope.json. Review the linked issues and PRs, especially #32 and #496, before editing because several items overlap active or planned work. Done means all seven disposition, ASK, DEFER, reasoning, failure, and error-contract items are resolved or explicitly handed off, with partial PRs using Refs.

Written by the indexing model from the issue text.

Description

priority:P1 scope:in-focus status:accepted type:bug workstream:spec

Yaron Sheffer (@yaronf) reviewed the ACS docs and specification at release 0.1.4 and wrote up his notes in yaronf/ACS-Notes. This issue groups his notes on legal dispositions, ASK, DEFER, reasoning, and the decision-failure and error contract. Each item is one of his notes, re-checked against integration at db457a8, and the line numbers are at that commit. The last two items touch the same §6.4 paragraph and §17.1 error object as Bar Kaduri's pending spec PR for issue #32 (fail closed by default), so they should feed that PR rather than compete with it.

  • The §5 hook table (docs/spec/instrument/specification.md lines 108 to 128) marks only preCompact, skillRegister, and skillLoad as decision-eligible, while the Hooks overview (docs/spec/instrument/hooks.md lines 27 to 47) marks fourteen hooks eligible, so a reader of §5 cannot tell an unmarked hook from an audit-only one. State the legal dispositions per hook in one catalog and link the other surface to it. Issue #146 (overloaded "not decision-eligible") and issue #148 (eligibility missing from most schemas) do not cover §5, and PR #341 fixes only the postCompact contradiction inside hooks.md (line 40 against line 232).
  • The concepts page (docs/concepts/agents.md line 19) and §9 (specification.md line 317) have the Guardian consult a named Approver, but §9.2 (lines 335 and 346) speaks of clients that route ASK and need approver UX, and ask-details.json line 7 makes approver required. Say whether the Guardian MAY return ask with no designated Approver, who presents the approval UI, and when the Approver may be left out entirely (never raise ASK, substitute DEFER or DENY only). Issue #175 (approver's answer has no path back) assumes the approver answers the Observed Agent and PR #496 (defer/subscribe) assumes it answers the Guardian, so this choice should come first.
  • A DEFER gives the Observed Agent no next step (§6 at specification.md line 144, defer-details.json lines 18 to 31, and the §9.2 substitute at line 339), since required_context says nothing about where the inputs go and human_approval carries no approver or question. PR #496 (defer/subscribe, for issue #14) adds the subscription and drops timeout_decision: ask, but it leaves how an approver's answer or the required_context inputs reach the Guardian "outside this section". Close those two paths in PR #496 or a follow-up, and give the cascade bound a value and an outcome, which issue #456 (deferral limit has no defined outcome) tracks.
  • Every DENY, MODIFY, ASK, and DEFER must carry reasoning (specification.md line 139, response-envelope.json lines 46 and 114), and the Observed Agent receives that text, so a deployment that keeps its policy confidential hands a map of the boundary to the party it controls. Allow these decisions to carry no explanation, with reason_codes and the audit record kept on a channel the agent does not see. PR #475 (Guardian reasoning into Claude Code additionalContext) shows the text reaching the model today.
  • The decision-failure rule still sits under "6.4 Honoring decisions" (specification.md lines 196 and 200), and PR #273 has since added where failures are logged (line 202) and the failure classes (session-end.json lines 23 to 29). Lift it into its own protocol-failure section that says whether the step is denied or the session ends, and make the §6.3 fail-closed rule (line 190), the §6.5 MODIFY fallback (lines 210 and 214), and the §17.1 recovery column (lines 483 to 492) instances of it. Bar Kaduri's planned spec PR for issue #32 (refusals fail closed, default deny) rewrites the same §6.4 paragraph and recovery column, so raise this as input to that PR rather than as a separate change.
  • The §17.1 prose (specification.md line 481) puts message and a reason inside data, response-envelope.json lines 120 to 130 require message on the error object and type data as {}, and the table reads data.supported_versions, data.method, data.skew_window_ms, and a singular reason_code (lines 486, 488, 491, and 492) that no schema defines. Keep the JSON-RPC message on the error object, give data a schema for the fields the recovery column reads, and use the reason_codes array for the deny form of a chain mismatch. The planned issue #32 spec PR adds error.signature to the same schema object, and PR #242 (reason codes in §17.2) registers chain_mismatch without fixing line 492, so either can carry the fix.
  • Folded from issue #148 (disposition eligibility in the schemas). Most hook schemas still say nothing about which dispositions they accept (23 of the 29 files under specification/v0.1.0/hooks/), and response-envelope.json allows all five dispositions on every method, so a validator cannot tell whether a disposition is legal for the hook that was called. Carry the per-hook catalog from the first item into the schemas, and say what a runtime does when a Guardian returns a disposition the hook does not allow. That is a different failure from the §6.5 and §9.2 client-capability substitutions, which cover a client that cannot honor a legal disposition.

A PR that fixes only some of these items should say Refs with this issue number rather than Closes, so the issue stays open until the last item lands.

Dominant language
TypeScript
Stars
183
Forks
56
Avg merge
3d 1h
Merged PRs (30d)
67

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from GenAI-Security-Project/agent-control-standard

All issues in GenAI-Security-Project/agent-control-standard

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.