mspec-research
research step of mspec workflow — investigate via subagent and produce research.md
SKILL.md.claude/skills/mspec-research/SKILL.md
GitHub<!-- @mspec-delta 2026-05-15-063805-fix-command-name-consistency/specs/claude-integration/spec.md -->
<!-- Requirements implemented: FR-017 -->
<!-- Change: fix-command-name-consistency -->
<!-- @mspec-delta 2026-05-15-040857-step-checkbox-update/specs/claude-integration/spec.md -->
<!-- Requirements implemented: FR-015 -->
<!-- Change: step-checkbox-update -->
Procedure
- Run
mspec status --change <change-dir> --jsonfirst. - Run
mspec continue --change <change-dir> --jsonto fetch the ready-madesubagent_prompt. - Read
requiresartifacts (proposal.md,specs/*/spec.md). - Invoke the
mspec-researchersubagent via the Task tool withsubagent_prompt. It will perform web search and codebase analysis. - Receive the
research.mdbody (Decisions / Web References / Codebase Findings / Open Choices) and write it to disk. - For any
Open Choices, ask the user via AskUserQuestion (1 question per call) and update the file. - Append the
## Constitution Check(Phase 0 only). 7a.readme.mdの## Artifacts節の- [ ] research.mdを- [x] research.mdに更新する。 - Run
mspec validate --change <change-dir>. validate が失敗した場合は- [x] research.mdを- [ ] research.mdにロールバックする。 block: true— stop and ask the user to run/mspec:continue.
Observation (Agent Experience Log)
After the subagent completes (step 4), record the run:
mspec agent-run record research \
--change <change-name> \
--bytes <sum-of-input-artifact-bytes> \
--artifacts <space-separated-artifact-paths>
Example: mspec agent-run record research --change 2026-05-25-my-feature --bytes 4821 --artifacts proposal.md specs/my-cap/spec.md
This appends one JSONL entry to changes/<change>/.agent-runs.jsonl. Do NOT include prompt text or file contents.
Verification (C2)
mspec validate --change <change>— アーティファクト整合性チェックmspec anchor check --change <change>— アンカー解決確認
Learning (C3)
このスキルの実行で発生した学習候補を記録する:
<!-- LEARNING: <パターン説明> | source: <FR-ID> | confidence: low|medium|high -->
mspec learn コマンドが archive 済み changes からこれらを収集してpost-condition候補をproposeする。