| name | design-interrogation |
| description | Structured design interrogation โ interview the user relentlessly about a plan, architecture, or technical decision until every branch of the decision tree is resolved. Use whenever a user says "grill me", "stress-test my plan", "poke holes in this", "challenge my design", "interview me about this design", or wants a rigorous review of any design, architecture, or technical proposal โ even if they don't use these exact words. When in doubt, trigger this skill.
|
Design Interrogation
Relentless, structured interrogation of a plan or design. Walk every branch of the
decision tree, resolve dependencies between decisions one-by-one, and reach a shared
understanding before closing.
What This Skill Does
- Interviews the user on every aspect of their plan, one focused question at a time
- Maps the decision tree, tracking which branches are resolved, deferred, or blocked
- Recommends a concrete answer with reasoning for each question asked
- Explores the codebase to answer questions that can be resolved without user input
- Summarizes all decisions and open items when interrogation is complete
Interrogation Protocol
Session Start โ Load Required Skills
Before asking the first question, load these three skills. They are active throughout the
entire session โ not just at the end:
| Skill | Load | Role During Session |
|---|
ubiquitous-language | Required โ load first | Captures domain terms as they emerge; draft written to UBIQUITOUS_LANGUAGE.md immediately |
usecase-specification | Required โ load second | Drafts use cases as flows resolve; each bounded context gets a draft file |
user-story | Required โ load third | Drafts stories as acceptance criteria are agreed; finalized with Gherkin at session end |
Then create the decision log (see Progressive Document Capture below) and start Phase -1.
Phase -1: Document Intake
Before asking any question, check if the user has existing documents to share.
Before we start: do you have any existing documents I should read first?
(business case, PRD, architecture spec, migration plan, functional design)
If so, share them โ I'll save them to docs/input/ and extract what's already decided.
If documents are provided:
- Save them to
docs/input/ (e.g. docs/input/business-case.md)
- Read and analyze them โ identify any bounded contexts already named in the documents
- Extract all decisions already made โ log them to
session-decisions.md as Pre-Resolved
- Run extractions in parallel using the skills below โ do NOT define extraction logic here:
- Announce: "Extracted [N] use cases and [M] user stories โ [X] gaps marked [OPEN]."
- Proceed to Phase 0 with only the open questions remaining
If no documents โ proceed directly to Phase 0.
Phase 0: Strategic Anchor
Before starting depth-first interrogation, ask these four questions together in a single
response. They establish the business context and architectural shape in one round and
allow the rest of the session to be focused โ or skipped โ accordingly.
Present all four at once, clearly numbered A1โA4:
A1 โ Business Case
Is this greenfield (new system), migration (replacing an existing system), or
an extension of an existing system?
My recommendation: [infer from context the user provided]
A2 โ Purpose & Scope
What are we building and what is explicitly out of scope?
My recommendation: [scoped interpretation based on what the user described]
A3 โ Architecture Shape
Event-driven with event sourcing, event-driven with state-based persistence,
or direct request/response?
My recommendation: [based on domain complexity and existing stack]
A4 โ Hard Constraints
What is non-negotiable? (team size, deadline, existing stack, compliance,
cloud vs. on-premise)
My recommendation: [infer from codebase โ check Directory.Packages.props and
Aspire AppHost for existing choices before asking]
After all four are answered, adapt the interrogation order based on A1:
- Greenfield โ standard dimension order (1 โ 2 โ 3 โ โฆ โ 8)
- Migration โ pull Dimension 8 (Migration & Rollout) forward after Dimension 2
- Extension โ run codebase-first checks before any question; most decisions are pre-resolved
Then proceed to Phase 1 if 2+ BCs were identified, otherwise depth-first on the
highest-impact open dimension.
Phase 1: Parallel BC Interrogation
When Phase 0 (A2) identifies 2 or more bounded contexts, spawn one sub-agent per BC
and run them in parallel. Each agent covers Dimensions 2โ6 for its BC only.
Trigger:
BCs identified in A2 โฅ 2?
YES โ Spawn N BC agents in parallel (one per BC)
NO โ Continue single-agent depth-first from Phase 0
Per-BC dimensions:
| Dimension | BC-specific questions |
|---|
| 2 โ Domain Model | Aggregates, entities, value objects for this BC |
| 3 โ BC Internals | Scope boundary โ what is inside this BC? |
| 4 โ Data Flow | Commands, queries, events flowing through this BC |
| 5 โ Integration Points | Which external systems does this BC touch? |
| 6 โ Failure Modes | What happens when this BC's core component fails? |
Each BC agent writes immediately to:
session-decisions.md โ its own BC section
docs/bounded-contexts/{BC}/use-cases.md โ draft use cases as flows resolve
docs/bounded-contexts/{BC}/user-stories.md โ draft stories as criteria are agreed
- Follows the depth-first rule within its own BC
Coordination agent (main session) batches one open question per BC per round:
**BC: OrderManagement โ Question 1 โ Domain Model**
[question + recommendation]
**BC: Inventory โ Question 1 โ Domain Model**
[question + recommendation]
After all BC agents complete:
- Cross-BC integration questions (how do BCs communicate?)
- Dimension 7 โ Non-functionals (global, single agent)
- Dimension 8 โ Migration & Rollout (global, single agent)
Question Format
Ask one question at a time. Each question must be specific, answerable, and accompanied
by a concrete recommendation. Use this format:
Question N โ [Topic]
[The question, clearly stated.]
My recommendation: [Your concrete recommendation and the reasoning behind it.]
Do not list multiple questions at once. Depth-first: fully resolve one branch before
moving to the next sibling.
Decision Dimensions
Cover these areas in dependency order โ skip dimensions that are clearly irrelevant
or already resolved:
| # | Dimension | Key Questions |
|---|
| 1 | Purpose & Scope | What is being built? What is explicitly out of scope? |
| 2 | Domain Model | What are the aggregates, entities, and value objects? |
| 3 | Bounded Contexts | Where are domain boundaries? How do contexts communicate? |
| 4 | Data Flow | How do commands, queries, and events move through the system? |
| 5 | Integration Points | What external systems, APIs, or services are involved? |
| 6 | Failure Modes | What happens when each component fails? |
| 7 | Non-Functionals | Performance, scalability, security, observability requirements |
| 8 | Migration & Rollout | How is this deployed? What is the rollout strategy? |
Codebase Exploration
Before asking the user about something that can be determined from the codebase,
explore the codebase first. Announce what you found:
I checked the codebase and found that X is already handled by Y โ moving on.
Use the Read, Grep, and Glob tools to inspect relevant files. Do not ask the user
to confirm what the code already tells you.
Decision Tree Tracking
Maintain a mental model of the decision tree during interrogation:
- Open โ decision not yet reached
- Resolved โ decision made, no open sub-questions
- Deferred โ user consciously chose to decide later
- Blocked โ cannot proceed without external information
When a decision opens new sub-questions (e.g., choosing an event-driven approach
raises questions about the event schema), explore those sub-questions before moving
to the next top-level topic.
Progressive Document Capture
Do not wait until the end of the session to write output. Capture decisions, domain terms, use
cases, and user stories as they emerge โ this ensures nothing is lost if the session is
interrupted, and makes Steps 4โ6 a finalization pass rather than a cold generation from memory.
Session Start โ Create Decision Log
Before asking the first question, create the decision log file:
docs/session-decisions.md
Use this header:
# Session Decisions โ {SolutionName}
> Live decision log. Updated after each resolved question. Finalized into the full architecture document at session end.
## Decisions
| # | Dimension | Decision | Rationale |
|---|-----------|----------|-----------|
After Each Resolved Question
Immediately append to session-decisions.md:
| {N} | {Dimension} | {chosen approach} | {brief rationale} |
Announce:
๐ Logged to session-decisions.md.
When a Domain Term Emerges
As soon as a term is used and agreed upon, append it to UBIQUITOUS_LANGUAGE.md (create the
file if it does not yet exist, mark it [DRAFT] in the title until the full ubiquitous-language
skill finalizes it):
## [DRAFT] Ubiquitous Language โ {SolutionName}
| Term | Definition | Bounded Context | Notes |
|------|-----------|-----------------|-------|
| {Term} | {Definition} | {BC} | [DRAFT] |
When a Use Case Becomes Clear
As soon as the main flow of a bounded context resolves, use usecase-specification
skill Mode 1 to write the draft entry to
docs/bounded-contexts/{BoundedContext}/use-cases.md.
โ Follow the draft entry format defined in
usecase-specification/SKILL.md โ Mode 1.
Do NOT use a custom format here.
When User Stories Emerge
As soon as acceptance criteria for a feature are agreed, use user-story
skill Mode 1 to write the draft entry to
docs/bounded-contexts/{BoundedContext}/user-stories.md.
โ Follow the draft entry format defined in
user-story/SKILL.md โ Mode 1.
Do NOT use a custom format here.
Steps 4โ6 Become Finalization
When interrogation is complete, Steps 4โ6 do not generate from scratch โ they complete and
finalize the drafts already written:
- Remove all
[DRAFT] markers
- Fill gaps in use cases (alternate flows, Gherkin)
- Add Gherkin to user stories, validate INVEST
- Complete the architecture document from
session-decisions.md
Architecture Document
Step 1: Load Relevant Instruction Files
Before writing the architecture document, load any instruction files that apply to the
technology choices made during interrogation. If your project maintains instruction files
in .github/instructions/ or .ai/reference/, load those relevant to:
- Core architecture (Clean Architecture layers, DDD, naming conventions)
- CQRS and error handling
- Data access and ORM patterns
- Authentication and authorization
- Observability and testing patterns
Step 2: Check for Violations
Scan the draft architecture document for these FORBIDDEN patterns:
| โ Forbidden | โ
Replace With |
|---|
SQL DDL (CREATE TABLE, ALTER TABLE) | EF Core IEntityTypeConfiguration<T> |
| Hardcoded connection strings | Aspire .WithReference() or environment variables |
MediatR (_mediator.Send(), services.AddMediatR()) | Direct ICommandHandler<T,R> injection |
DateTime (timezone-naive) | DateTimeOffset |
| Missing pattern rationale | Add ADR explaining why the pattern was chosen |
Step 3: Document Pattern Rationale
For each major pattern, include a brief ADR explaining why this implementation was chosen.
Refer to .ai/project/architecture.md for the ADR template.
Step 4: Finalize Session Deliverables (MANDATORY)
The three required skills were loaded at session start and have been capturing drafts throughout
the interrogation. This step finalizes those drafts โ it is not a cold generation from memory.
| # | Deliverable | Skill | Output File | Action |
|---|
| 1 | Ubiquitous Language Glossary | ubiquitous-language | UBIQUITOUS_LANGUAGE.md | Complete draft โ remove [DRAFT], resolve ambiguities, add missing terms |
| 2 | Use Case Specifications | usecase-specification | docs/bounded-contexts/{BC}/use-cases.md | Complete draft โ fill alternate flows, add Gherkin for every flow |
| 3 | User Stories | user-story | docs/bounded-contexts/{BC}/user-stories.md | Complete draft โ add Gherkin, validate INVEST, ensure โฅ3 criteria per story |
Finalization Order
Execute in this sequence โ each builds on the previous:
-
Ubiquitous Language first โ finalize all draft terms; canonical vocabulary must be locked
before use cases and stories are completed.
-
Use Case Specifications second โ complete all draft use cases using finalized terminology.
Add Gherkin for every main and alternate flow.
-
User Stories third โ complete all draft stories using finalized terminology and use cases.
Add Gherkin traced to every acceptance criterion. Validate INVEST.
Announce Each Deliverable
Before starting each deliverable:
Deliverable 1 of 3 โ Ubiquitous Language
Finalizing draft terms from the interrogationโฆ
After completing each:
โ
UBIQUITOUS_LANGUAGE.md finalized โ N terms defined, M ambiguities resolved.
Skip Only With Explicit User Consent
If the user says "skip use cases" or "no stories needed", mark the deliverable as Deferred
and include it in the closing summary. Never silently skip.
Step 5: Solution Generation Handoff
The session deliverables are direct pipeline inputs for solution generation:
| Document | Consumed By | Role |
|---|
docs/architecture/{SolutionName}-architecture.md | solution-generator | Primary input โ generator derives all parameters from it |
UBIQUITOUS_LANGUAGE.md | solution-generator | Domain naming, aggregate identification |
docs/bounded-contexts/{BC}/use-cases.md | vertical-slices | Each use case โ blueprint JSON + Gherkin .feature files |
docs/bounded-contexts/{BC}/user-stories.md | vertical-slices | Each story โ individual vertical slice blueprint JSON |
Pipeline execution order:
- Run
solution-generator โ pass architecture document as input
- Translate each user story to a
vertical-slices blueprint JSON for feature-by-feature implementation
- Run
gap-review โ mandatory after generation, validates against original design decisions
Closing Summary
When all branches are Resolved or Deferred, present a structured summary:
## Interrogation Summary
### Decisions Made
- [Topic]: [chosen approach and brief rationale]
### Deferred Decisions
- [Topic]: Deferred because [reason]
### Remaining Open Questions
- [Any unknowns that require external input]
### Session Deliverables
| Deliverable | Status | File |
|-------------|--------|------|
| Architecture Document | โ
Complete | `docs/architecture/{SolutionName}-architecture.md` |
| Ubiquitous Language | โ
Complete / โธ๏ธ Deferred | `UBIQUITOUS_LANGUAGE.md` |
| Use Case Specifications | โ
Complete / โธ๏ธ Deferred | `docs/bounded-contexts/{BC}/use-cases.md` |
| User Stories | โ
Complete / โธ๏ธ Deferred | `docs/bounded-contexts/{BC}/user-stories.md` |
### Recommended Next Steps
1. Run [`solution-generator`](../solution-generator/SKILL.md) โ pass architecture document as input
2. For each BC: translate user stories to [`vertical-slices`](../vertical-slices/SKILL.md) blueprint JSON
3. Run [`gap-review`](../gap-review/SKILL.md) after generation
Example Exchange
User: grill me on my new notification service
Claude:
Question 1 โ Delivery Channels
Which notification channels must the service support at launch โ email only, or
also SMS, push notifications, or in-app?
My recommendation: Start with email and in-app. SMS adds third-party costs and
compliance complexity (GDPR/TCPA). Push requires device registration infrastructure.
Both can be added in v2 once the channel abstraction is validated.
After the user answers, follow the dependency tree. If the user says
"email and in-app", the next question targets the email provider decision โ not
an unrelated topic.
Related Skills
| Skill | When to Load |
|---|
architect | Architectural decisions need to be formalized beyond the architecture document |
solution-generator | After interrogation โ scaffold the solution |
vertical-slices | Translate stories to implementation blueprints |
gap-review | Validate the generated solution |