Define what a MODIFY replaces, starting with modified_content

Open
#534 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
48/100
Issue type
Documentation
Clarity
Clearly specified
Activity status
Active
Tech stack
json, typescript

Research direction

Start with docs/spec/instrument/hooks.md and docs/spec/instrument/specification.md, then compare the relevant hook definitions with specification/v0.1.0/modifications.json at the referenced integration commit. Resolve all four MODIFY semantics items, including the size-forced preCompact behavior; check the existing examples and related issue #181 and PR #517. Done means each item's replacement target, delivery or audit effect, provenance and hash behavior, or forced-compaction outcome is specified consistently.

Written by the indexing model from the issue text.

Description

priority:P2 scope:deferred status:accepted type:proposal 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 MODIFY semantics across hooks. Each item is one of his notes, re-checked against integration at db457a8, and the line numbers are at that commit.

  • A wholesale MODIFY is typed as a string (specification/v0.1.0/modifications.json lines 8 to 11, and §6.3 at docs/spec/instrument/specification.md line 187 calls it "an opaque replacement string"), but hook payloads are objects, and userMessage.content is an array of typed parts. Type modified_content as the replacement payload object with the same shape as the hook's params.payload, or at least as an open object, and keep redactions and parameter_overrides for partial edits. Issue #181 (the reference host adapter fails closed on modified_content) is the implementer pain this causes.
  • The agentTrigger Decision line (docs/spec/instrument/hooks.md line 106) says the Guardian MAY rewrite the trigger payload "before activation", which does not say which bytes change or who consumes them. If MODIFY changes what the agent receives when it starts on the trigger, say "before delivery to the agent" as userMessage does on line 132. If the rewrite only changes the audit record, say that instead.
  • A postCompact MODIFY has no defined target (docs/spec/instrument/hooks.md line 232), because modified_content is one string standing in for an object of summary, provenance, compacted entries, and chain hashes, and only an unnamed JSON-pointer redaction of /summary/value fits the example. Say that a postCompact MODIFY replaces summary.value in the context window, what provenance the replacement carries (§6.3 line 194 defines no Guardian-injected origin), and which of the two summaries the chain hash covers. PR #517 (postCompact fields a sender cannot fill) moves the post-compaction hash from the payload to the response chain_hash, so the hash question applies to that field once it merges.
  • hooks.md line 220 lets a Guardian DENY preCompact until trusted re-grounding, but when triggered_by is size_threshold the runtime is already out of room, so a refusal leaves no usable context and no defined next step. Say what happens instead of an open-ended block: drop specific entries, compact with the tainted lineage preserved, or end the session. Treat size-forced compaction as inevitable and put the control on what the summary may claim.

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.