Expand description
Embedded default agents & skills (#2895; roster expanded to 31 agents in
Slice E3, #2958; pm added as a 4th tcode-own default for #3437).
Why: A fresh project has no .claude/agents/ or .claude/skills/ yet;
bundling a working default set at compile time (mirroring, not sharing,
trusty-mpm’s embed pattern) gives every project a usable harness before
any project-level config exists. Disk-based config always wins when present.
What: EmbeddedAgent/DEFAULT_AGENTS (32 dispatchable tcode agents: the
original 4 (engineer/qa-agent/code-reviewer/pm), authored as
Markdown+frontmatter as of #2897 Slice C, plus 28 coding-relevant tm
agents bundled and wired in as of Slice E, #2958);
EmbeddedSkill/DEFAULT_SKILLS (trusty-mpm’s universal skill set, minus
the tm-* orchestration skills).
Test: assets::tests::*.
Embedded default agents & skills for trusty-code (#2895).
Why: A fresh project has no .claude/agents/ or .claude/skills/ yet, so
tcode would otherwise start with zero agents and zero skills — a cold,
unusable default. Bundling a working default set at compile time (mirroring
the embed pattern trusty-mpm uses in crates/trusty-mpm/src/core/bundle.rs,
but without trusty-mpm’s disk-materialize install step — these are parsed
in-memory only) gives every project a usable harness out of the box while
disk-based .claude/agents/ and .claude/skills/ always take precedence
when present (see agents::load_all_agents and
skills::discover_skill_metadata’s embedded-fallback branches).
What: EmbeddedAgent/DEFAULT_AGENTS — the 33-agent dispatchable
roster (Slice E3, #2958, plus pm added for #3437 and ticketing for
#4027): tcode’s own 4 defaults (engineer, qa-agent, code-reviewer,
pm, no extends: chain — projected via
agents::md_loader::project_embedded_md) plus the 29 tm agents (the 28
coding-relevant ones Bob selected in #2958, plus ticketing) (extends:-chained
through the 5 BASE-* templates — projected via
agents::md_loader::project_embedded_md_with_extends, which resolves
against EMBEDDED_TM_AGENT_SOURCES). Authored as Markdown+frontmatter
(.md) as of #2897 Slice C (previously native TOML; Slice D subsequently
retired the TOML loader for USER .claude/agents/*.toml configs entirely
— see agents::mod’s docs). Both projection paths share one
frontmatter->AgentConfig mapping with the disk .md loader
(agents::md_loader::load_md_agent) — see that module’s docs.
EmbeddedSkill/DEFAULT_SKILLS — trusty-mpm’s universal skill set
(format-identical SKILL.md files), reused verbatim per Bob’s reuse
directive; the tm-* orchestration skills are excluded because they drive
trusty-mpm MCP tools tcode does not have.
§Tools-restriction deviation (Slice E3, #2958, Bob’s 2026-07-18 ruling)
Four of the 28 roster agents — qa, code-critic, code-analyzer,
web-qa — carry an explicit restrictive tools: override in their tcode
FORK (assets/agents/{qa,code-critic,code-analyzer,web-qa}.md) that is NOT
present in the shared asset they were derived from
(trusty_agents_common::agent_assets). These four are the only agent .md
files trusty-code still keeps a second copy of: every other roster agent is
embedded straight from the shared crate, so it cannot drift. This is a
deliberate, Bob-approved deviation, not drift: those four are
reviewer-intent agents and get
the same read-only tool allowlist tcode’s own code-reviewer default uses
(no write_file/edit/bash). documentation and research stay
byte-identical and unrestricted per Bob’s explicit ruling — they build
docs and research reports, not verdicts. NOTE for the file itself: the
shared frontmatter parser
(trusty_agents_common::agents::builder::split_frontmatter) does NOT
tolerate #-comment lines inside a frontmatter block (verified
empirically — a bare #-prefixed line there is a hard FrontmatterParse
error, not a tolerated comment), so no inline marker could be added to
those four files without breaking the compose step; this doc comment is
the marker of record. The deferred E4 CI staleness guard (diffing tcode’s
copies against trusty-mpm’s source) MUST whitelist the tools: line in
exactly these four files rather than flagging them as drift.
§Prose deviation follow-up (Slice E3 review round, #3041)
Adding the tools: override alone left three of the four files
internally contradictory: their prose still instructed write/bash actions
the new allowlist denies (web-qa.md’s “Technical Testing Protocol” told
the agent to create test scripts, run CI=true npm test, and shell out to
ps aux; qa.md’s methodology told it to “Implement”/“Execute” test
suites directly; code-analyzer.md’s “Large-Volume Analysis” told it to
generate-and-run a Python script). A code-critic review of PR #3041 (WARN,
two HIGH + one MEDIUM findings) caught this. web-qa.md, qa.md, and
code-analyzer.md were reworded in the SAME PR to a genuinely read-only
frame: findings plus concrete, ready-to-run recommendations (drafted
scenarios, specified test cases, recommended commands) handed off to an
engineer/ops/CI to execute, never executed by the agent itself.
code-critic.md needed no prose change at the time — its review-only body
had no execute-oriented instructions. This is an ADDITIONAL deviation from
trusty-mpm byte-parity beyond the tools: line alone; the deferred E4
staleness guard must whitelist the reworded prose sections in these three
files too, not just the tools: line.
code-critic.md gained its own reworded section later (owner ruling
2026-08-12, PR #5596): trusty-mpm’s upstream copy started instructing the
agent to post its verdict via gh pr review --comment directly. tcode’s
copy has no bash/gh tool, so the “Posting the Verdict” section was
reworded to the same read-only frame as the three files above — it
specifies the exact command for the caller to run, never runs it itself.
code-critic.md now joins web-qa.md/qa.md/code-analyzer.md as a
four-of-four reworded-prose deviation, not three-of-four; the E4 staleness
guard whitelists it the same way (pinned-hash reconciliation, not
byte-parity).
§Non-coding cross-product roster addition (#4027, epic #4021)
ticketing joined this roster (same treatment research got) so
trusty-agents’ widened dispatch_task bridge (#4026) can reach ONE roster
instead of growing a second dispatch leg into trusty-mpm — the owner’s OQ-4
ruling. It carries no tcode-specific tools: restriction and is not a
pinned deviation: it is embedded directly from the shared crate, so it stays
in lockstep by construction. Its non-coding property is enforced where the
owner’s OQ-7 ruling put enforcement — the BRIDGE’s fail-closed
NON_CODING_TARGETS floor in
crates/trusty-agents/src/tools/cross_product.rs — not by an asset-level
allowlist that a direct tcode run-task invocation would bypass anyway.
§E4 guard (issue #2958, scripts/check_agent_assets.sh)
The byte-parity half of this gate is gone because what it compared is gone:
30 duplicated .md files became one shared copy each, and a file cannot
drift from itself. What the gate still checks is what the compiler cannot
see — it pins the 4 deviated files’ SHARED source hash
(scripts/agent-asset-pins.tsv) so an edit behind one of them fails for
deliberate reconciliation, and it rejects any .md appearing in this
directory that is neither a pinned deviation nor a declared tcode-only
default, which is how a deleted duplicate stays deleted. See that script’s
header and .github/workflows/agent-assets.yml.
Test: assets::tests::* — every embedded agent .md parses and projects
to a field-identical AgentConfig vs. the retired TOML fixtures (the
original 3), every roster name resolves through the extends composer with
no BASE template dispatchable and no name collision, the four restricted
agents’ composed AgentConfig carries the read-only tool list, and
documentation/research remain unrestricted. Every skill name is unique
and every skill’s frontmatter name: matches its table key.
Structs§
- Embedded
Skill - One embedded default skill: its catalog name and raw
SKILL.mdsource.
Enums§
- Embedded
Agent - One embedded default agent: either self-contained (tcode’s own 3
defaults, no
extends:chain) or a roster agent whoseextends:chain is resolved at load time againstEMBEDDED_TM_AGENT_SOURCES(Slice E3, #2958).
Constants§
- BASE_
AGENT_ NAMES - The 5
BASE-*extends-template names — composition bases only, never meant to be dispatched directly (issue #3465 follow-up: the Agents catalog listing was surfacing these to end users). - DEFAULT_
AGENTS - The 33-agent dispatchable default roster, embedded at compile time
(Slice E3, #2958, plus
pmadded for #3437 andticketingfor #4027): tcode’s original 3 defaults pluspmplus the 29 tm roster agents. The 5BASE-*extends templates inEMBEDDED_TM_AGENT_SOURCESare deliberately NOT entries here — they are extends-sources only, never dispatchable — and trusty-mpm’s ownengineeragent is excluded from the roster upstream (#2958’s roster decision) precisely because it would collide with tcode’sengineerbelow;assets::tests::no_name_collisions_across_the_33_agent_rosterpins that no collision exists in the final table. - DEFAULT_
SKILLS - trusty-mpm’s universal skill set, embedded at compile time (
tm-*orchestration skills excluded — see module docs). - EMBEDDED_
TM_ AGENT_ SOURCES - The embedded tm agent catalog’s raw sources (Slice E2, #2958): the 5
BASE-*extends templates plus the 29 roster agents (the 28 coding-relevant ones Bob selected in #2958, plusticketingfrom #4027) (mpm/memory/cloud-vendor agents excluded – see the issue’s roster decision). Keyed by each asset’s ORIGINAL embedded filename ("BASE-QA.md","rust-engineer.md", …) rather than a pre-lowercased bare name, becausetrusty_agents_common::agents::builder_in_memory::InMemorySources::insertalready lowercases and strips a trailing.mdon both insert and lookup (Slice E1, PR #3013) – so("BASE-QA.md", ...)resolves anextends: base-qareference with no extra normalisation needed here.