Expand description
Skill files a composed tcode agent body points at by absolute path (#7727).
Why: the shared BASE-AGENT.md tells an agent to open a skill file with its
read tool at {{TM_SKILLS}}/<skill>/SKILL.md. trusty-mpm resolves that
placeholder to its own deployed skills tier; tcode has no such tier, and its
read_file is confined to the run’s project or scratch root, so a pointer
into any other real directory is one the agent cannot open.
What: REFERENCED_SKILL_FILES embeds every file a roster pointer names.
Two resolutions exist:
- The project roster deploy writes the files beneath
<project>/.trusty-code/skill-refs(project_skill_refs_dir,materialize_skill_refs); the pointers land inside the project root. - An in-process compose (embedded fallback, a disk agent carrying the
placeholder) resolves to
user_skill_refs_dirwith no disk I/O (resolve_skill_refs).read_filebuilt withReadFileTool::with_skill_refsserves exactly those paths fromembedded_skill_ref, so the pointer opens in bound and projectless runs alike and compose never depends on a writable home.
Neither directory is a skill-discovery directory, so these copies never
shadow the embedded skill catalog.
Test: agents::skill_refs::tests, tools::fs::read::tests::skill_ref_*.
Constants§
- REFERENCED_
SKILL_ FILES (path relative to the skills root, file content)for every skill file a shared roster pointer names. Byte copies of trusty-mpm’s bundled skills, pinned byreferenced_copies_match_trusty_mpm_skills.- SKILL_
REFS_ DIRNAME - Directory name, beneath a
.trusty-coderoot, holding the referenced files.
Functions§
- embedded_
skill_ ref - The embedded content for
relative, a path beneath a skill-refs root. - materialize_
skill_ refs - Write every
REFERENCED_SKILL_FILESentry beneath a pinneddir. - project_
skill_ refs_ dir <project>/.trusty-code/skill-refs— the root the project roster deploy uses.- resolve_
skill_ refs - Resolve the skills-root placeholder in a composed body against
dir. - user_
skill_ refs_ dir ~/.trusty-code/skill-refs— the address in-process composes resolve to.