cc-sdd — Prompts
Excerpt 1: kiro-discovery Skill — Discovery Routing (Step 2)
Source: tools/cc-sdd/templates/agents/claude-code-skills/skills/kiro-discovery/SKILL.md
Prompting technique: Structured decision-tree routing with explicit paths; uses minimal-context preflight before loading heavy context. Delegates codebase exploration to a subagent to keep main context lean.
### Step 2: Determine Action Path
Based on the user's request and the metadata from Step 1, determine which path applies:
**Path A: Existing spec covers this**
- The request is an extension, enhancement, or fix within an existing spec's domain
- Every meaningful part of the request fits that same spec boundary
- Any remaining small follow-up work can be handled directly without creating a new spec
- Skip remaining steps
**Path B: No spec needed**
- The request is a bug fix, config change, simple refactor, or trivial addition
- No meaningful part of the request needs a new or updated spec boundary
- The request does not need to update an existing spec either
- Skip remaining steps
**Path C: New single-scope feature**
- The request is new, doesn't overlap with existing specs, and fits in one spec
**Path D: Multi-scope decomposition needed**
- The request spans multiple domains or would produce 20+ tasks in a single spec
**Path E: Mixed decomposition**
- The request contains a mix of: existing spec extensions, one or more new spec candidates, and optional direct-implementation work
- Use this path only when at least one genuinely new spec boundary is needed
For Path C/D/E, present the determined path (or mixed decomposition) to the user and confirm before proceeding.
For Path A/B, recommend the next action and stop.
Excerpt 2: kiro-impl Skill — Implementer Subagent Dispatch
Source: tools/cc-sdd/templates/agents/claude-code-skills/skills/kiro-impl/SKILL.md
Prompting technique: Iteration discipline enforced as explicit constraint; context-window management via one-line summaries; TDD RED → GREEN protocol.
#### Autonomous Mode (subagent dispatch)
**Iteration discipline**: Process exactly ONE sub-task (e.g., 1.1) per iteration. Do NOT batch multiple sub-tasks into a single subagent dispatch. Each iteration follows the full cycle: dispatch implementer → review → commit → re-read tasks.md → next.
**Context management**: At the start of each iteration, re-read `tasks.md` to determine the next actionable sub-task. Do NOT rely on accumulated memory of previous iterations. After completing each iteration, retain only a one-line summary (e.g., "1.1: READY_FOR_REVIEW, 3 files changed") and discard the full status report and reviewer details.
For each task (one at a time):
**a) Dispatch implementer**:
- Read `templates/implementer-prompt.md` from this skill's directory
- Construct a prompt by combining the template with task-specific context:
- Task description and boundary scope
- Paths to spec files: requirements.md, design.md, tasks.md
- Exact requirement and design section numbers this task must satisfy (using source numbering, NOT invented `REQ-*` aliases)
- Task-relevant steering context and parent-discovered validation commands (tests/build/smoke as relevant)
- Whether the task is behavioral (Feature Flag Protocol) or non-behavioral
Excerpt 3: kiro-discovery — Subagent Delegation for Context Efficiency
Source: tools/cc-sdd/templates/agents/claude-code-skills/skills/kiro-discovery/SKILL.md
Prompting technique: Explicit context-budget cap; offloads heavy exploration to a subagent returning a max-200-line summary.
**Delegate to subagent via Agent tool** (keeps exploration out of main context):
- **Codebase exploration**: Dispatch a subagent to explore the codebase and return a structured summary. Example prompt: "Explore this project's codebase. Summarize: (1) tech stack and frameworks, (2) directory structure and key modules, (3) patterns and conventions used, (4) areas relevant to [user's request]. Return a summary under 200 lines."
- The subagent uses Read/Glob/Grep to explore, then returns findings. Only the summary enters the main context.
- For Path D/E, also ask the subagent to identify natural domain boundaries, existing module separation, and which areas look like existing-spec extensions vs new boundaries.
- Skip subagent dispatch for small/obvious requests where the top-level directory listing from Step 1 is sufficient.
**Context budget**: Keep total content loaded into main context under ~500 lines. The subagent handles the heavy exploration.