@jenga-ai/agent 3.0.0 → 3.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -97,6 +97,38 @@ Neither layer inspects a skill's *contents*; both defend the invocation-matching
97
97
  | Message is a general coding or project question | Answer directly |
98
98
  | Ambiguous — could be skill or free-form | Prefer the skill; open and execute its `SKILL.md` rather than describing it |
99
99
 
100
+ ### Sub-Agent Delegation (`prefered_agent`)
101
+
102
+ Some skills declare a `metadata.prefered_agent: <agent_name>` field in their `SKILL.md`
103
+ frontmatter. This names a sub-agent persona — a file under `agents/` (`scrum-master`,
104
+ `developer`, `tester`) — that should execute the skill, the same delegation Claude Code performs
105
+ natively for the same skill via root `CLAUDE.md`'s "Skill Frontmatter" section.
106
+
107
+ **Copilot CLI has its own native custom-agent-loading mechanism for this.** The `--agent <name>`
108
+ CLI flag and the interactive `/agent [name]` command both load a custom agent-definition file
109
+ discovered from `.github/agents/*.md` or `.claude/agents/*.md`, keyed by that file's frontmatter
110
+ `name:` field — not its filename. Jenga's `agents/*.md` personas are mirrored into both of those
111
+ paths by `/self-sync` (`skills/self-sync/scripts/run.js`); cite `.github/agents/` as the
112
+ canonical path for this purpose, parallel to how "How Jenga Works" above cites `.agents/skills/`
113
+ as canonical for skills. `.agents/agents/` is also mirrored (for reasons unrelated to Copilot)
114
+ but is a **confirmed Copilot-discovery dead-end** — the native agent loader does not read it;
115
+ never rely on it when resolving a `prefered_agent`.
116
+
117
+ When a matched skill's frontmatter has `metadata.prefered_agent: <agent_name>`:
118
+
119
+ 1. Before executing the skill's instructions, load that persona by invoking `--agent
120
+ <agent_name>` (if starting a new `copilot` invocation) or the interactive `/agent
121
+ <agent_name>` command (if already in an interactive session).
122
+ 2. Then proceed with the skill's instructions exactly as written, per the "Skill Routing"
123
+ section above — the loaded agent persona governs *how* the skill executes, not *whether* it
124
+ does, and does not change which `SKILL.md` file gets opened or the allow-list check that
125
+ precedes it.
126
+ 3. If a skill's frontmatter has no `prefered_agent` field, execute it directly with no agent
127
+ switch.
128
+
129
+ Valid `<agent_name>` values match the agent definitions under `agents/` (frontmatter `name:`
130
+ field, not the filename): `scrum-master`, `developer`, `tester`.
131
+
100
132
  ### Available Skills
101
133
 
102
134
  {{SKILL_LIST}}