feat: audience attribute (human | agent) on technique output declarations (#224 V4)#227
Merged
Conversation
m2ux
added a commit
that referenced
this pull request
Jul 14, 2026
Record draft PR #227 in the Links table now that the PR exists.
Add an optional audience enum (human | agent) to technique output / artifact declarations, threaded end-to-end and additively: - schema: audience on OutputItemDefinitionSchema plus the hand-maintained technique.schema.json (kept in lockstep) - loader: parse the audience reserved sub-section on an output entry; strict-mode schema rejects invalid values - get_activity: composeActivityArtifacts carries audience into the artifacts contract and _meta.artifacts - docs: technique-protocol-specification section 3.2 documents the attribute, the agent-audience JSON convention, and human-vs-agent authoring guidance (decision test plus anti-patterns; per-artifact schemas are out of scope for this PR) - lint: standalone scripts/check-audience.ts guards the agent-JSON convention across the corpus - tests: parser, schema, projection carry-through, and contract coverage Declarations without audience remain valid (backward-compatible). PR #1 of epic #224 (V4). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: Mike Clay <mike.clay@shielded.io>
8 tasks
m2ux
added a commit
that referenced
this pull request
Jul 14, 2026
Close-out for #224 V4: 14-COMPLETE.md (summary + retrospective), test plan finalized with source links. Worktree removed; PR #227 ready and approved, open pending merge. Work-package workflow complete. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: Mike Clay <mike.clay@shielded.io>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds an optional
audienceattribute (human | agent) to technique output /#### artifactdeclarations so each artifact's intended reader — and therefore its on-disk format — is known at authoring time. Purely additive and behaviour-neutral (absent ⇒human), this is PR #1 of epic #224 (cluster 2 / backlog item V4) and the RC4 enabler for converting agent-state artifacts to compact structured data.🐛 Issue 📐 Engineering
Motivation
Technique output declarations carry no signal about who each produced artifact is for. Human-facing artifacts (reviews, plans) and agent-only state artifacts are declared identically, so every artifact is authored as prose — verbose to produce, costly in tokens, and unreliable for an agent to read back later in the same run. Without an explicit reader marker, the downstream verbosity-reduction work (V5+) has no principled basis for deciding which artifacts may become compact structured data.
This change introduces the
audiencemarker as the enabling primitive. On its own it changes nothing a reader sees and no workflow behaviour, but it lets later work serialize agent-audience artifacts as JSON with confidence about the intended reader.Changes
audienceattribute on output /#### artifactdeclarations, the agent-⇒-JSON on-disk convention under theartifactPrefixrule, and authoring guidance (decision test, per-side anti-patterns, V5 out-of-scope note).audienceenum (human/agent) to the technique output schema, validated under strict parsing so an out-of-set value is rejected loudly at load.audienceon parsed outputs, passed through verbatim.get_activityartifacts contract, so an artifact's format is known at write time; the projection round-trip needed no source edit.check:audienceguard flags any agent-audience output whose artifact name is not JSON, baseline-snapshotted (empty by design) and wired into the lint suite with a regression guard.🤖 AI Assistance
📌 Submission Checklist
🔱 Fork Strategy
🗹 TODO before merging