Files
msd-core/scripts/research-profiles.cjs
Tom Boucher cf68841220 enh(#1243): consume Claude plugin-provided skills in agent_skills (epic #1258 Phase B) (#1261)
* feat(#1243): consume Claude plugin-provided skills via native Skill-tool directive + grant Skill to agent_skills-consumer agents

- Relax global skill name validation to accept namespaced form `^[A-Za-z0-9_-]+(:[A-Za-z0-9_-]+)*$`
- Namespaced names (containing colon) on claude runtime emit a Skill-tool load directive instead of a @-include line
- Namespaced names on non-claude runtimes are skipped with a warning
- Bare unresolved names retain existing warn-and-skip behavior (no promotion to directive)
- Grant `Skill` tool to all 22 agent_skills consumer agents; 5 generated agents updated via research-profiles.cjs + regen, 17 hand-authored agents edited directly
- Add 16 TDD tests in describe('bug #1243') covering happy/mixed/precedence/negative/cross-runtime/regression/grant cases

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* docs(#1243): document plugin-provided skills in agent_skills

Update the Agent Skills Injection reference in CONFIGURATION.md with
the three entry forms (project-relative, global:<name>,
global:<plugin>:<skill>), the Claude-only runtime behaviour of the
namespaced form and the warn-skip on other runtimes, the plugin
pre-install prerequisite, and the consumer-agent Skill tool grant.

Add docs/how-to/attach-a-plugin-skill-to-a-gsd-agent.md with a
step-by-step guide for installing the plugin, locating the namespaced
skill name, wiring it into agent_skills, and verifying injection.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(#1243): align agent_skills docs with emitted block format + mixed-block regression test (code-review)

- Replace two-section mixed-block example (bogus "Load these plugin-provided skills using the Skill tool:" header) with the actual single-section inline format in CONFIGURATION.md and docs/how-to/attach-a-plugin-skill-to-a-gsd-agent.md
- Fix quoted warning text in how-to doc to exactly match the emitted string: [agent-skills] WARNING: Plugin-namespaced skill "global:<name>" requires a Skill-tool-capable runtime (claude) — skipping on runtime "<runtime>"
- Replace phantom agent slugs (gsd-checker, gsd-researcher, gsd-advisor, gsd-synthesizer) in CONFIGURATION.md Supported Agent Types with real agents/gsd-*.md examples (gsd-plan-checker, gsd-phase-researcher, gsd-code-reviewer, gsd-ui-auditor, gsd-research-synthesizer)
- Add byte-identical mixed-block regression test: one path-resolvable global skill + one plugin-namespaced skill on claude runtime → asserts r.ir.block === single-section interleaved block, no secondary header

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* chore(#1243): regenerate agent-size baseline for the Skill-tool grant

The 22 agent_skills-consumer agents each grew +7 bytes from adding `Skill`
to their tools list; refresh the committed per-agent size baseline (#1074 guard).

* chore(#1243): add Added changeset fragment

* fix(#1243): traceable allow-test-rule ref + separator-agnostic byte-identical tests (CI)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-15 00:49:12 -04:00

150 lines
5.9 KiB
JavaScript

#!/usr/bin/env node
'use strict';
/**
* research-profiles.cjs — hand-authored profile table for the 7 researcher agents.
*
* Each profile field is derived verbatim from the agent's current committed state so
* that the initial --check in gen-research-agents.cjs is green by construction.
*
* Fields:
* name — verbatim frontmatter `name:` value
* description — verbatim frontmatter `description:` value
* color — verbatim frontmatter `color:` value
* tools — verbatim frontmatter `tools:` value (single string, comma-separated)
* requiredIncludes — @~/.claude/gsd-core/references/<file>.md strings the body MUST contain
* requiredSeamCalls — `gsd_run query <cmd>` strings the body MUST contain
* outputContract — strings the body MUST contain (output path, return marker, etc.)
*/
const PROFILES = [
{
name: 'gsd-project-researcher',
description:
'Researches domain ecosystem before roadmap creation. Produces files in .planning/research/ consumed during roadmap creation. Spawned by /gsd:new-project or /gsd:new-milestone orchestrators.',
color: 'cyan',
tools:
'Read, Write, Bash, Grep, Glob, Skill, WebSearch, WebFetch, mcp__context7__*, mcp__firecrawl__*, mcp__exa__*, mcp__tavily__*, mcp__ref__*, mcp__jina__*',
requiredIncludes: [
'@~/.claude/gsd-core/references/research-documentation-lookup.md',
'@~/.claude/gsd-core/references/research-philosophy.md',
'@~/.claude/gsd-core/references/research-verification-protocol.md',
],
requiredSeamCalls: [
'gsd_run query research-plan',
'gsd_run query research-store put',
'gsd_run query classify-confidence',
],
outputContract: [
'.planning/research/',
'## RESEARCH COMPLETE',
],
},
{
name: 'gsd-phase-researcher',
description:
'Researches how to implement a phase before planning. Produces RESEARCH.md consumed by gsd-planner. Spawned by /gsd:plan-phase orchestrator.',
color: 'cyan',
tools:
'Read, Write, Edit, Bash, Grep, Glob, Skill, WebSearch, WebFetch, mcp__context7__*, mcp__firecrawl__*, mcp__exa__*, mcp__tavily__*, mcp__ref__*, mcp__jina__*',
requiredIncludes: [
'@~/.claude/gsd-core/references/research-documentation-lookup.md',
'@~/.claude/gsd-core/references/research-philosophy.md',
'@~/.claude/gsd-core/references/research-verification-protocol.md',
],
requiredSeamCalls: [
'gsd_run query research-plan',
'gsd_run query research-store put',
'gsd_run query classify-confidence',
'gsd_run query package-legitimacy check',
],
outputContract: [
'.planning/phases/XX-name/{phase_num}-RESEARCH.md',
'## RESEARCH COMPLETE',
],
},
{
name: 'gsd-advisor-researcher',
description:
'Researches a single gray area decision and returns a structured comparison table with rationale. Spawned by discuss-phase advisor mode.',
color: 'cyan',
tools: 'Read, Bash, Grep, Glob, Skill, WebSearch, WebFetch, mcp__context7__*',
requiredIncludes: [
'@~/.claude/gsd-core/references/research-documentation-lookup.md',
],
requiredSeamCalls: [],
outputContract: [
'| Option | Pros | Cons | Complexity | Recommendation |',
'**Rationale:**',
],
},
{
name: 'gsd-ai-researcher',
description:
'Researches a chosen AI framework\'s official docs to produce implementation-ready guidance — best practices, syntax, core patterns, and pitfalls distilled for the specific use case. Writes the Framework Quick Reference and Implementation Guidance sections of AI-SPEC.md. Spawned by /gsd:ai-integration-phase orchestrator.',
color: 'green',
tools:
'Read, Write, Edit, Bash, Grep, Glob, WebFetch, WebSearch, mcp__context7__*',
requiredIncludes: [
'@~/.claude/gsd-core/references/research-documentation-lookup.md',
],
requiredSeamCalls: [],
outputContract: [
'AI-SPEC.md',
'Section 3',
'Section 4',
],
},
{
name: 'gsd-domain-researcher',
description:
'Researches the business domain and real-world application context of the AI system being built. Surfaces domain expert evaluation criteria, industry-specific failure modes, regulatory context, and what "good" looks like for practitioners in this field — before the eval-planner turns it into measurable rubrics. Spawned by /gsd:ai-integration-phase orchestrator.',
color: 'purple',
tools:
'Read, Write, Edit, Bash, Grep, Glob, WebSearch, WebFetch, mcp__context7__*',
requiredIncludes: [
'@~/.claude/gsd-core/references/research-documentation-lookup.md',
],
requiredSeamCalls: [],
outputContract: [
'AI-SPEC.md',
'Section 1b',
],
},
{
name: 'gsd-ui-researcher',
description:
'Produces UI-SPEC.md design contract for frontend phases. Reads upstream artifacts, detects design system state, asks only unanswered questions. Spawned by /gsd:ui-phase orchestrator.',
color: 'purple',
tools:
'Read, Write, Edit, Bash, Grep, Glob, Skill, WebSearch, WebFetch, mcp__context7__*, mcp__firecrawl__*, mcp__exa__*, mcp__tavily__*, mcp__ref__*, mcp__jina__*',
requiredIncludes: [
'@~/.claude/gsd-core/references/research-documentation-lookup.md',
],
requiredSeamCalls: [
'gsd_run query commit',
],
outputContract: [
'UI-SPEC.md',
'## UI-SPEC COMPLETE',
],
},
{
name: 'gsd-research-synthesizer',
description:
'Synthesizes research outputs from parallel researcher agents into SUMMARY.md. Spawned by /gsd:new-project after 4 researcher agents complete.',
color: 'purple',
tools: 'Read, Write, Bash, Skill',
requiredIncludes: [],
requiredSeamCalls: [
'gsd_run query commit',
],
outputContract: [
'.planning/research/SUMMARY.md',
'## SYNTHESIS COMPLETE',
],
},
];
module.exports = { PROFILES };