From clippy
Investigation and design phase with V1 evidence standards. Two modes — interactive (activated by composer, menu-driven) or autonomous (invoked directly with --autonomous, self-looping, returns structured results). Use autonomous mode when an external orchestrator needs pre-implementation investigation.
How this skill is triggered — by the user, by Claude, or both
Slash command
/clippy:investigate-designThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
**Instructions for AI assistant.** This skill performs investigation and
Instructions for AI assistant. This skill performs investigation and design work.
Check the invocation args for --autonomous:
Interactive mode (default, no flag): Activated by clippy:composer.
Menu-driven. Human says "c" to continue, "i" to implement. Show menus
after each cycle. Return to composer with completion signal.
Autonomous mode (--autonomous in args): Invoked directly by an
external caller. Self-looping — run investigation cycles internally
until READY or max cycles (default 5, configurable via --max-cycles N).
No menus. Write tracker to .ai/investigation/tracker.yaml when done. Return
structured results.
Everything below applies to BOTH modes unless marked [INTERACTIVE ONLY] or [AUTONOMOUS ONLY].
Before starting investigation, check: does this project have source code?
Codebase exists (source files, package.json, go.mod, etc.): Normal investigation — read code, find patterns, design approach.
No codebase (empty project or only .ai/ state): Fresh design mode — clarify the user's idea, propose architecture, produce design artifacts. See FRESH DESIGN MODE section below.
Detection is automatic from the project directory contents. No flag needed.
You perform investigation and design work.
Interactive: Return to clippy:composer with completion signal.
Autonomous: Loop internally, write results to disk, return structured
summary.
Entry:
clippy:composer. User's task in context.Progressive Disclosure — Load these when needed:
references/CHECKLISTS.mdreferences/READINESS.mdreferences/VERIFICATION_EXAMPLES.mdDEFAULT BEHAVIOR:
AUGMENTATION:
PROPOSAL OVERVIEW (part of first cycle, before investigation steps): State once: What we're building (1-2 sentences). Then proceed with investigation steps. Do not repeat in subsequent cycles.
FOR each investigation cycle:
Propose design solutions when architectural violations discovered — do not defer design decisions to later cycles
Decide how to reuse or follow discovered patterns
Verify design decisions against relevant checklist items
Document in tracker DESIGN section as decisions are made
Plan implementation strategy when context is fresh: Affected components, approach, verification steps
EVALUATE ARCHITECTURAL ALTERNATIVES before planning strategy:
SOURCE TRACEABILITY — for each DESIGN entry created this cycle:
Source: convention (X). Not a spec gap.Group related checklist items (e.g. C1.1+C1.2, C2.1+C2.2, C1.5+C1.6+C2.2, U1.1+U1.2). Batch read_file for same components. Document all findings, not only the most obvious.
When designing features involving data operations (filtering, searching, querying, transformation):
Reading type/constraint definitions alone insufficient. Verify usage/validation patterns per V1.
PRINCIPLE: Verify systemic patterns, not isolated instances.
GOAL: Distinguish patterns from outliers, mistakes, or isolated instances.
Verification count:
Tool usage:
BEFORE marking [VERIFIED]: (1) Read code from 2-3+ distinct components/contexts per V1. (2) List component/context names; count [N]. Insufficient → [PARTIALLY VERIFIED] unless exception (justify). (3) Check violations? (4) Read actual code via read_file (not grep/snippets)? (5) Evidence includes component:line, count, pattern, discovery path? (6) No violations OR documented in ARCHITECTURAL ISSUES? (7) Decision: all pass → [VERIFIED]; exception → [VERIFIED] with justification; incomplete → [PARTIALLY VERIFIED]; else [PENDING].
When marking [VERIFIED]: Collect internally: component names, distinct count, component:line refs, discovery path. Output: summary line + indented "Pattern: explanation"; no detailed lists in output.
NOT sufficient for [VERIFIED]: V1 incomplete, same-component-only, no systematic search, filenames/comments only, assumed pattern, grep alone, codebase_search snippets without read_file, component names not listed/counted.
Architectural violation (C1/C2/C3/P1/U1)?
All relevant categories checked? Check ALL relevant C1/C2/C3/P1/U1 for scope. Document per category even if no violation.
Blocking issues? Design proposed for violation? NO → propose in DESIGN.
1. Design Direction [DIRECTION]: High-level approach identified when findings discovered. Does NOT require concrete details.
2. Concrete Design Decisions: Specific implementation details after investigating patterns. Mark [PENDING] if investigation needed, [VERIFIED] when complete.
Caller/integration steps → resolve with investigation (read_file, document file/call site/replacement) before [READY]. "Will resolve: during IMPLEMENT" ONLY when: detail cannot be determined without writing code, OR step explicitly out-of-scope. Otherwise → add "c" and resolve.
C3.3 (New components follow established patterns):
C1.6 / C2.1 (Duplication / Error handling consistency):
Single structure tracks findings, design, assumptions, and scope:
🔍 FINDINGS:
🔍 Description | Category/label | [PENDING] | Next: search query
🔶 Description | Category/label | [PARTIALLY VERIFIED] | 1 component: name (needs 2-3+)
✅ Description | Category/label | [VERIFIED] | N components, X instances
Pattern: concise explanation
📐 DESIGN:
🎯 Direction | Category | [DIRECTION] | High-level approach | Source: [user input / codebase evidence / convention]
✅ Decision | Category | [VERIFIED] | Summary | Rationale: explanation | Source: [user input / codebase evidence / user decision]
🔶 Decision | Category | [CONDITIONAL] | Summary | Depends on: [assumption] | Source: [source]
🔍 Decision | Category | [PENDING] | Summary | Needs: Investigation of [specific patterns] | Source: [investigating]
⚠️ ARCHITECTURAL ISSUES:
❌ Issue | Category | Violates: [pattern] | Impact: what this means | Found at: location
🚧 DESIGN ISSUES:
🚧 Issue | Category | Blocks: [what] | Needs: [investigation/action]
❓ ASSUMPTIONS:
❓ Assumption | Category | Needs verification: [what to check]
Context: where/why assumed
If wrong: [concrete consequence — what breaks or needs redesign]
Resolution: what investigation would resolve this
(Empty: "*(No assumptions made during this investigation)*")
🙋 USER DECISIONS: (shown only when non-empty)
🙋 Decision needed | Category | Options: A / B / C | Impact: what this constrains
Context: what in task description (or its absence) created this gap
Resolved by: user clarification
(When resolved → move to DESIGN as [VERIFIED] with Source: user decision)
(When resolved by codebase evidence during investigation → move to DESIGN with Source: codebase evidence)
✅ IN SCOPE:
✅ Area | Category | Currently investigating/designing
⏸️ OUT OF SCOPE:
⏸️ Area | Category | Not being addressed now
🔧 IMPLEMENTATION DETAILS:
✅ Step 1: [Description] | [RESOLVED] | File: path, Operation: identifier, Dependencies: [list]
🔍 Step 2: [Description] | [PENDING] | Why: [explanation] | Will resolve: [when/how]
🚦 IMPLEMENTATION READINESS: [READY] / [NOT READY]
(If NOT READY: List blocking items)
Tracker rules:
(0) 📌 This turn: 2-4 lines (what changed, next, blocker)
(1) 🎯 INVESTIGATION CYCLE N: [scope] (N cumulative; increment after "c")
(2) 📝 Plan updated: YES/NO; if YES, which sections
(3) 📋 Tracker: all sections. Unchanged → "as before"; full detail for new/revised
(4) 🔍 Evidence gathered: 1-2 sentences
(5) ➡️ Next proposal: 1-2 sentences — what the next cycle would cover OR what implementation would do. ⚠️ if ISSUES or [NOT READY].
(6) 👉 Recommended: c or i — one bolded letter + ≤10-word reason. Standalone line, visually scannable.
(7) ☰ Menu — show the composer's INVESTIGATE & DESIGN menu inline at end of each cycle response
Per-cycle vs terminal: Each investigation cycle ends with the menu (item 6) — the AI does NOT emit a completion signal after each cycle. The terminal 🔚 INVESTIGATE & DESIGN PHASE COMPLETE signal is emitted ONLY when the composer activates implementation (after user says "i" and [READY] is confirmed). During normal "c" cycling, the investigation skill includes the menu directly.
No per-cycle output to the user. Run cycles internally. Between cycles, evaluate the tracker:
If all YES → READY. Proceed to completion. If NO and cycles < max → run another cycle. If NO and cycles = max → NOT_READY. Proceed to completion with blockers.
USER DECISIONS in autonomous mode: If a decision requires human judgment (multiple viable options with different user-visible behavior), do NOT guess. Include it in the return as unresolved. If the decision is derivable from codebase evidence or conventions, resolve it with "Source: codebase evidence" and document the reasoning.
OUTPUT RULES: Lead with 📌. Tracker = single source. Plan updated NO → deltas OK; YES or first → full tracker.
Per iteration: (1) Identify NEW targets: areas not yet investigated, patterns for concrete design, deeper existing findings, resolve ASSUMPTIONS. (2) Use V1 rigor. (3) Document new findings; update DESIGN. (4) Incorporate discovery: new [PENDING]/ASSUMPTIONS → tracker; design adjustments → tracker. (5) Re-evaluate previous conclusions when new evidence contradicts. (6) Do NOT re-verify [VERIFIED] without new evidence. (7) Update DESIGN ISSUES, ASSUMPTIONS, IN/OUT SCOPE. (8) New DESIGN entries have Source stated? USER DECISIONS created where needed?
Before showing tracker: All violations this cycle documented? All relevant C1/C2/C3/P1/U1 checked? Any additional observations from reading the code documented? Violations and findings separate by category/label? No "secondary" skipped? Findings labeled (C1.4, U1.1, or descriptive label)? Previous conclusions re-evaluated when warranted? New unknowns in tracker?
CRITICAL: Iteration = NEW areas only; reuse verified findings. Discovery → add unknowns/adjustments to tracker.
When no codebase exists, the investigation workflow adapts. There's nothing to investigate — instead, you design from the user's idea.
.ai/design/DESIGN.md.ai/design/STACK.md (languages, frameworks, testing approach).ai/design/contracts/ (API shapes, data models, event formats).ai/constraints.yaml with design-phase invariants
(discovered_by: design, confidence: inferred)After validation passes: [READY]. The design artifacts are the output — they replace what codebase investigation would normally produce.
Subsequent units in the same build WILL have a codebase (the prior units were implemented). Those units use normal investigation mode.
In both modes, write design decisions and investigation results to disk when they reach VERIFIED/RESOLVED status. This ensures:
| Artifact | When | Path |
|---|---|---|
| Architecture design | After user confirms | .ai/design/DESIGN.md |
| Tech stack | After VERIFIED | .ai/design/STACK.md |
| Contract per interface | After VERIFIED | .ai/design/contracts/<name>.yaml |
| Constraints discovered | As discovered | .ai/constraints.yaml (append) |
| Investigation tracker | After each cycle (autonomous) or at completion (interactive) | .ai/investigation/tracker.yaml or .ai/investigation/tracker-<unit>.yaml |
Create .ai/ directory structure as needed. Don't wait for completion
to write — write incrementally as artifacts become VERIFIED.
When writing tracker to disk, use structured YAML:
status: READY | NOT_READY
cycles: N
findings:
- description: "..."
category: "C1.4"
status: VERIFIED
components: [component_a, component_b]
design:
- decision: "..."
status: VERIFIED
rationale: "..."
source: codebase_evidence
architectural_issues:
- issue: "..."
category: "C2.1"
impact: "..."
assumptions: []
implementation_details:
- step: "..."
status: RESOLVED
file: "path"
operation: "identifier"
constraints_discovered:
- description: "..."
affects: [component_a, component_b]
confidence: inferred | verified
🔚 INVESTIGATE & DESIGN PHASE COMPLETE
Implementation Readiness: [READY] or [NOT READY]
[Summary of findings, design, implementation details status]
Returning to composer for menu
Step 1: Write tracker to disk.
Write the full tracker state to .ai/investigation/tracker.yaml (create the
directory if needed). Format as YAML with sections: findings, design,
architectural_issues, design_issues, assumptions, user_decisions,
implementation_details, readiness_status.
Step 2: Return structured summary.
🔚 CLIPPY AUTONOMOUS INVESTIGATION COMPLETE
Status: READY | NOT_READY
Cycles: N
Findings:
Verified: N
Pending: N
Architectural issues: N
Design:
Decisions: N (verified: N, pending: N)
Implementation steps: N (resolved: N, pending: N)
Constraints discovered:
- [cross-component invariants found during investigation]
Unresolved (requires caller/human input):
- [USER DECISIONS that couldn't be resolved from codebase evidence]
- [ASSUMPTIONS that need external verification]
Blockers (if NOT_READY):
- [specific items preventing READY status]
Tracker written to: .ai/investigation/tracker.yaml
The caller reads the summary for high-level status and the tracker file for detailed findings, design decisions, and implementation approach.
Last Updated: April 2026 (v2.3 - Added autonomous mode: --autonomous flag for external callers, internal cycle looping, structured return, tracker-to-disk output. Previous: v2.2.)
npx claudepluginhub gunther-schulz/coding-clippyGuides design exploration before implementation, using parallel investigation agents to explore user intent, requirements, and impact. Invoked automatically for creative work.
Refines rough ideas into fully-formed designs via phased process: Socratic questioning for understanding, alternative exploration with trade-offs, and incremental validation before coding.
Plans implementation by investigating code, writing specs and plans, and validating with a peer agent. Useful before coding for planning, design approach, or scoping.