選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

contextual-discovery.md 2.6KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. **Language:** Use `{communication_language}` for all output.
  2. **Output Language:** Use `{document_output_language}` for documents.
  3. **Output Location:** `{planning_artifacts}`
  4. **Paths:** Bare paths (e.g. `agents/foo.md`) resolve from the skill root.
  5. # Stage 2: Contextual Discovery
  6. **Goal:** Armed with the user's stated intent, intelligently gather and synthesize all available context — documents, project knowledge, and web research — so later stages work from a rich, relevant foundation.
  7. ## Subagent Fan-Out
  8. Now that you know what the brief is about, fan out subagents in parallel to gather context. Each subagent receives the product intent summary so it knows what's relevant.
  9. **Launch in parallel:**
  10. 1. **Artifact Analyzer** (`agents/artifact-analyzer.md`) — Scans `{planning_artifacts}` and `{project_knowledge}` for relevant documents. Also scans any specific paths the user provided. Returns structured synthesis of what it found.
  11. 2. **Web Researcher** (`agents/web-researcher.md`) — Searches for competitive landscape, market context, trends, and relevant industry data. Returns structured findings scoped to the product domain.
  12. ### Graceful Degradation
  13. If subagents are unavailable or fail:
  14. - Read only the most relevant 1-2 documents in the main context and summarize (don't full-read everything — limit context impact in degraded mode)
  15. - Do a few targeted web searches inline
  16. - Never block the workflow because a subagent feature is unavailable
  17. ## Synthesis
  18. Once subagent results return (or inline scanning completes):
  19. 1. **Merge findings** with what the user already told you
  20. 2. **Identify gaps** — what do you still need to know to write a solid brief?
  21. 3. **Note surprises** — anything from research that contradicts or enriches the user's assumptions?
  22. ## Mode-Specific Behavior
  23. **Guided mode:**
  24. - Present a concise summary of what you found: "Here's what I learned from your documents and web research..."
  25. - Highlight anything surprising or worth discussing
  26. - Share the gaps you've identified
  27. - Ask: "Anything else you'd like to add, or shall we move on to filling in the details?"
  28. - Route to `prompts/guided-elicitation.md`
  29. **Yolo mode:**
  30. - Absorb all findings silently
  31. - Skip directly to `prompts/draft-and-review.md` — you have enough to draft
  32. - The user will refine later
  33. **Headless mode:**
  34. - Absorb all findings
  35. - Skip directly to `prompts/draft-and-review.md`
  36. - No interaction
  37. ## Stage Complete
  38. This stage is complete when subagent results (or inline scanning fallback) have returned and findings are merged with user context. Route per mode:
  39. - **Guided** → `prompts/guided-elicitation.md`
  40. - **Yolo / Headless** → `prompts/draft-and-review.md`