T-7UDE-related-files-tab
State: planning/proposed · Impact: medium · Complexity: medium
A skill’s aux column lists the peer files the bundle carries and nothing else, so the notes it embeds, the notes it links, the names that resolve to nothing and the container that carries it are invisible from the note being edited. The compiler already computes most of that closure and throws it away. This task exposes it as one read and renders it as a Related tree, which is also what turns a dangling wikilink into a one-click “create this”.
| Location | Role today |
|---|---|
solutions/agent-pants/crates/agent-adapt-core/src/compile.rs#Closure | Per emitted file: contributing_notes (the owner plus everything transitively embedded) and unresolved (link targets that resolved to nothing) |
solutions/agent-pants/crates/agent-adapt-core/src/compile.rs#compile_note | Produces CompiledNote { body, resources, closures } — the closure exists only to make staleness computable |
solutions/agent-pants/crates/agent-adapt-core/src/compile.rs#scan_wiki_tokens | The one scanner that tells an embed from a link. Private to the module |
solutions/determined/crates/determined-agent-skills/src/lib.rs#get_roster | The vault scan behind agentSkillGetRoster |
solutions/determined/crates/determined-core/src/wire/mod.rs#AgentSkillNoteDetail | Carries resources, the resolved plugin and marketplace, and the resolved kind — and no link or embed list |
solutions/determined/experiences/agent-pants/app/pages/apps/agent-pants/notes/[...path].vue | The aux “Files” panel lists data.resources and reveals one in the rail |
solutions/determined/experiences/agent-pants/app/composables/useAgentPantsUi.ts#useAgentPantsFocusResource | The channel the Files panel uses to ask the tree to reveal a peer file |
solutions/determined/experiences/agent-pants/app/components/ApComponentTree.vue | Watches that channel and expands to the file row |
Proposed
Section titled “Proposed”A new read call agentSkillGetRelated(entry) answers {embeds, links, resources, carried_by} for
one note: the notes its body embeds (transitively, as the compiler resolves them), the notes it
links without embedding, the peer files the bundle ships, and the plugin or marketplace that
carries it. A link target that resolves to nothing comes back in links marked missing rather
than being dropped.
A new ApRelatedTree.vue renders that as one grouped tree in the aux region, each row carrying
its kind’s glyph from KIND_ICON. A click routes by row type: a note opens in the editor, a
resource opens in the code viewer from T-MVW5-code-editor-package, a missing target opens the
wizard seeded with that name. It replaces the Files panel, which becomes the Resources group inside
it.
Approach
Section titled “Approach”- Make the scanner reachable from outside
compile.rs—pub(crate)plus apub fnthat returns the split, or makescan_wiki_tokensitself public. Open decision in this step: whether Related runs a scan or a compile. A compile already resolves embeds transitively and recordsunresolved, but it also renders every resource’s bytes; a scan-only pass is the default here, with the compile reserved for the transitive case if the scan cannot reach it. - Add
get_related(vault_dir, entry)todetermined-agent-skills, joining the scan with the roster (to resolve a target to a note) and with the note’s resolvedpluginandmarketplace(forcarried_by). - Add the wire types to
solutions/determined/crates/determined-core/src/wire/mod.rsand the v1 wrapper tocrates/determined-platform/src/api/v1/agent_skills.rs; the transports and the TypeScript client regenerate from there. useAgentSkillRelated(path)beside the other note composables.- New
ApRelatedTree.vue: four groups — Embeds, Links, Resources, Carried by. Each row carries its kind glyph; a missing row renders muted, with a “create” affordance. - Wire the clicks: a note routes to
/apps/agent-pants/notes/<path>, a resource opens the code viewer, a missing target opensApNewComponentWizardwith the name seeded throughwizardSeed.ts. - Replace the aux Files panel on
notes/[...path].vuewith the tree, keepinguseAgentPantsFocusResourceso a resource row can still reveal itself in the component tree. - Tests: a Rust test over a fixture note that embeds one note, links a second and links a third that does not exist; a component test for the four groups and the missing-row affordance.
| Area | Note |
|---|---|
solutions/agent-pants/crates/agent-adapt-core/src/compile.rs | Expose the embed/link split the scanner already computes |
solutions/determined/crates/determined-agent-skills/src/lib.rs | Add get_related, joining the scan with the roster |
solutions/determined/crates/determined-core/src/wire/mod.rs | Wire types for the related answer and its rows |
solutions/determined/crates/determined-platform/src/api/v1/agent_skills.rs | v1 wrapper the transports generate from |
solutions/determined/packages/vault-platform-client/src/generated/transport.ts | Regenerated client for agentSkillGetRelated |
solutions/determined/experiences/agent-pants/app/composables/useAgentSkillRelated.ts | Fetch keyed by note path |
solutions/determined/experiences/agent-pants/app/components/ApRelatedTree.vue | The grouped, kind-coloured tree and its click routing |
solutions/determined/experiences/agent-pants/app/pages/apps/agent-pants/notes/[...path].vue | The Files panel gives way to the Related tree |
solutions/determined/experiences/agent-pants/app/utils/wizardSeed.ts | Seed a create from a missing link target |
Acceptance criteria
Section titled “Acceptance criteria”- AC-1: A Rust test over a fixture note that embeds one note, links a second and links a third that does not exist returns one embed, two links, and the third marked missing.
- AC-2: A note embedded two hops deep appears in
embeds— the answer is transitive, matching the compiler’s closure. - AC-3: The Related tree shows Embeds, Links, Resources and Carried by, and a group with no rows is not rendered.
- AC-4: Each note row carries the glyph its kind carries in the component tree.
- AC-5: Clicking a note row navigates to that note’s editor; clicking a resource row opens it in the code viewer; clicking a missing row opens the wizard with the name pre-filled.
- AC-6: A skill inside a plugin inside a marketplace lists both containers under Carried by.
- AC-7: The aux “Files” panel is gone from
notes/[...path].vueand its resources are the Resources group.
Out of scope
Section titled “Out of scope”- Backlinks from other notes into this one.
carried_byis containment, not incoming links. - Rendering an embed’s content inline, which is T-LN3V-transclusion-rendering-in-agent-manager.
- A vault-wide graph view.
- Editing anything from the tree; every row navigates.
- Repairing a broken link in place; the missing row seeds a create and nothing more.
Dependencies
Section titled “Dependencies”- T-RR9V-tabs-carry-entity-icons-and-views gives the pane an active document to follow. Hard: the tree needs a subject when the stage is a tab.
- T-MVW5-code-editor-package supplies the surface a resource row opens into. Hard: without it a resource row has nowhere to go.
Discovery context
Section titled “Discovery context”The user’s planning request of 2026-09-07 asked for a Related tab showing everything a note links,
embeds, carries and is carried by. Member of milestone M-BMFD. The closure this reads is
already computed for staleness — compile.rs records contributing_notes and unresolved per
emitted file — so the data exists and only the read is missing.
Depends on
Section titled “Depends on”T-RR9V-tabs-carry-entity-icons-and-views, T-MVW5-code-editor-package