Repository navigation
docs(skills): name the media-treatment policy targets instead of alluding to them - #2879
Conversation
…ding to them Two routing surfaces pointed agents at media "policies" and "contracts" without naming a file. An agent that goes looking and finds nothing fills the gap with an invented rule. - skills/hyperframes/SKILL.md: "Load its media-treatment policy" now names references/media-treatments.md and states the policy governs how footage is treated, never whether media may be used. - skills/general-video/SKILL.md: "adoption, resolution, provider, provenance, and reuse contracts" now names references/resolve.md and references/setup-providers.md. Drops "provenance", which is ledger bookkeeping in operations.md, not a contract to follow. - The scaffolded project templates carried the same unnamed pointer and ship to every hyperframes init; both updated and kept byte-identical.
ac01e8a to
e453cf3
Compare
vanceingalls
left a comment
There was a problem hiding this comment.
Grade: A — verified at head e453cf3e
Verified claims
- Four unnamed-pointer sites updated with resolvable paths.
skills/hyperframes/SKILL.mdL99-107 andskills/general-video/SKILL.mdL23 both now name the target file as a../media-use/references/<file>.mdpath that resolves from the file that contains it — target files present at HEAD (media-treatments.md,resolve.md,setup-providers.md). - Zero occurrences of
media-treatment policyremain in any of the four touched files at HEAD SHA (verified via file-contents grep). - Template parity preserved.
packages/cli/src/templates/_shared/CLAUDE.mdand.../AGENTS.mdshare the same git blob SHA6b10521743a7fb44512a6eb780a5936c852e01f2at HEAD (both 7133 bytes) → byte-identical after both received the same one-line change. - Scope disclaimer ("It governs how footage is treated, never whether media may be used") is applied to the three surfaces where the observed hallucination originated (routing SKILL.md + both templates); it's the specific counter-message to the "agent invented a licensing gate" failure mode described in the session log.
skills/general-video/SKILL.mdchange is path-naming only, which reads correct — the entry to general-video is already in-domain, so the disclaimer's need doesn't repeat there. - "Drops
provenance" is defensible. The word appears inreferences/operations.md:60as ledger bookkeeping ("it records provenance and auto-promotes"), inresolve.md:106as disk-artifact description ("candidates, scores, provenance stay on disk"), and inmedia-treatment-recipes.md:433as a treatment consideration ("false provenance"). None of these is a contract an agent can load, so removing "provenance" from the routing-surface pointer is right-shaped. skills-manifest.jsonhash-only regen forgeneral-video(87f2 → 49f5) andhyperframes(02b4 → db16) — matches the two SKILL.md changes; other entries untouched.
Root-cause fit
The PR body's session-log trace is the correct diagnosis: an unnamed "policy" pointer → the agent looks for it in the wrong location → improvises a licensing gate → user believes it. Fix is minimal (name the file as a resolvable path; add the "governs treatment, not use" scope) and matches the observed defect surface. The scope disclaimer directly counters the specific hallucination axis (licensing/use-permission) that showed up in the shared session.
No findings
Diff scope is deliberately minimal; every changed line is warranted. Approving.
— Review by Via
james-russo-rames-d-jusso
left a comment
There was a problem hiding this comment.
Reviewed at e453cf3.
Traced the JSONL against the fix. The failure mode had two components and this PR closes both:
- Wrong destination. The agent went to
/media-use, openedSKILL.md+references/operations.md, and never openedreferences/media-treatments.md— because the pointer that sent it there ("media-treatment policy") was not a resolvable filename. The new wording names../media-use/references/media-treatments.mddirectly, using the same../<skill>/references/<file>.mdform already established 16× elsewhere acrossskills/*/SKILL.md. - Licensing-gate hallucination. The agent inflated "media-treatment policy" into a "media policy" that governs whether real footage may be used, then went hunting for asset-delivery/licensing metadata that doesn't exist in the framework. The added "it governs how footage is treated, never whether media may be used" is exactly the negative scope needed — and it matches the target file's own opening ("Permission and scope" section discusses whether-to-apply-a-treatment, never whether-media-may-be-used).
Also spot-checked:
- Cross-repo sweep clean.
heygen-com/hyperframes-internalorigin/mainhas zero occurrences of "media-treatment policy" or "media policy" — no half-migrated pointer left in the sidecar. - Sibling skill files clean. Grepped every
skills/*/*.mdunder this repo at head: the remaining "policy" occurrences are unrelated body text (autoplay-policy, "policy statements" as monotone-content example, an in-fixture quote about USD policy) — no other unnamed routing pointer. - Templates stayed byte-identical.
packages/cli/src/templates/_shared/{CLAUDE,AGENTS}.mdstill match (diff -q→ identical), preserving the invariantcoreSkillContent.test.tsrelies on. - Manifest hashes recompute cleanly.
general-videoandhyperframesare the only two entries that changed inskills-manifest.json, matching the two SKILL.md edits; "Skills: manifest in sync" CI check is green. - Test-plan preservation intact. The three anchor strings
coreSkillContent.test.tsasserts (/media-use,media-treatments, "seek-safe motion") all survive the new wording. - The "provenance" drop from
general-video/SKILL.mdis well-scoped. Per the PR body, "provenance" appeared once as ledger bookkeeping inreferences/operations.md, not as an agent-followable contract — grepping confirms every otherprovenanceoccurrence is either Figma-specific (.media/manifest.jsonlprovenance) or.media/inventory bookkeeping, i.e. not a routing surface an agent would go looking for as a "contract" to follow.
The "name-a-resolvable-path AND state what the doc is-not-about" pattern is worth carrying forward whenever a routing surface points at a policy or contract — it closes both the wrong-destination class AND the invented-scope class in one line. No changes requested.
— Review by Rames D Jusso
…ding to them (heygen-com#2879) Two routing surfaces pointed agents at media "policies" and "contracts" without naming a file. An agent that goes looking and finds nothing fills the gap with an invented rule. - skills/hyperframes/SKILL.md: "Load its media-treatment policy" now names references/media-treatments.md and states the policy governs how footage is treated, never whether media may be used. - skills/general-video/SKILL.md: "adoption, resolution, provider, provenance, and reuse contracts" now names references/resolve.md and references/setup-providers.md. Drops "provenance", which is ledger bookkeeping in operations.md, not a contract to follow. - The scaffolded project templates carried the same unnamed pointer and ship to every hyperframes init; both updated and kept byte-identical.
What
Two agent-facing routing surfaces told agents to follow a media "policy" or "contracts" without naming a resolvable file. This names the files as paths, and scopes the media-treatment policy to what it actually governs.
skills/hyperframes/SKILL.md— "Load its media-treatment policy before editing" now reads "Read../media-use/references/media-treatments.mdbefore editing a treatment; it governs how footage is treated, never whether media may be used."skills/general-video/SKILL.md— "follow its adoption, resolution, provider, provenance, and reuse contracts" now names../media-use/references/resolve.mdand../media-use/references/setup-providers.md. Drops "provenance": it appears once inreferences/operations.mdas ledger bookkeeping, not as a contract an agent can follow.packages/cli/src/templates/_shared/CLAUDE.mdandAGENTS.mdcarried the same unnamed pointer and ship into everyhyperframes initproject. Both updated, kept byte-identical.skills-manifest.jsonregenerated by the pre-commit hook.Paths use the
../<skill>/references/<file>.mdform already used 16 times acrossskills/*/SKILL.md, so they resolve from the file that contains them. The existing`/skill` → `references/x.md`arrow convention elsewhere ingeneral-video/SKILL.mdis left alone; it names its owning skill and is not the defect here.Why
From a real Codex session log building an outro from a customer's own site.
skills/hyperframes/SKILL.md, which at the time said "Load its media-treatment policy before editing."/media-use, opensSKILL.mdandreferences/operations.md, neither of which contains the word "policy", and never opensreferences/media-treatments.md, where it lives.Nothing was ever actually blocked, the agent downloaded and used the asset seconds later. An unnamed "policy" was enough for a model to invent its contents and for a user to believe it. The skill files involved were byte-identical to
main, so this is not a stale-install problem.How
Name the target file, as a path that resolves, at every point the routing surface refers to a policy or contract. Say what the media-treatment policy is not about. Both are the same defect: a pointer an agent cannot follow becomes a rule an agent makes up.
Scope is deliberately limited to unnamed policy/contract pointers.
Test plan
bunx vitest run src/commands/coreSkillContent.test.ts src/commands/figma/skillContent.test.tsinpackages/cli— 15 passed.coreSkillContent.test.tsasserts the media-treatment discovery gate is present in both templates; the three strings it checks are preserved.Resolved every backticked path-like
.mdreference in both changed skill files from that file's own directory:skills/hyperframes/SKILL.mdhas zero unresolved. Inskills/general-video/SKILL.mdthe three paths this PR touches resolve; the 12 that remain unresolved by literal path are the pre-existing arrow-convention refs, each preceded by its owning skill, and are untouched.Verified
packages/cli/src/templates/_shared/CLAUDE.mdandAGENTS.mdare still byte-identical.Verified zero occurrences of "media-treatment policy" remain in the repo.
Unit tests added/updated
Manual testing performed
Documentation updated (if applicable)