AI SDLC Kit
Guide

Discovery Phase

How to use the AI SDLC Kit Discovery phase to go from raw idea to a set of implementable epics.

What is the Discovery phase?

The Discovery phase is the first stage of Flow A. It takes a raw, unstructured idea and transforms it β€” through a sequence of four agents and five prompts β€” into a fully structured project: a technical spec, a set of ordered epics, and a context memory that all future agents will use.

The Discovery phase is always optional. If you already have a clear, defined task, go directly to Flow B (starting with /task-init).


The four Discovery agents

AgentFilePersonaProduces
🧭 Discoverydiscovery.agent.mdProduct thinker, no technical biasidea.md
πŸ—‚οΈ PMpm.agent.mdProduct Manager focused on user journeys and business rulesnon-technical-spec.md
πŸ§‘β€πŸ’Ό Tech Leadtech-lead.agent.mdEngineering lead bridging PM and architecturePRD.md
πŸ—οΈ Architectarchitect.agent.mdSenior systems architect, TypeScript specialisttechnical-spec.md, epics.md, per-epic artefacts

The five Discovery prompts

PromptAgentReadsProducesHITL?
/discovery-refine🧭 Discoveryidea.txtidea.mdβœ… Required
/discovery-specπŸ—‚οΈ PMidea.mdnon-technical-spec.mdβœ… Required
/discovery-prdπŸ§‘β€πŸ’Ό Tech Leadnon-technical-spec.mdPRD.mdβœ… Required
/discovery-tech-specπŸ—οΈ ArchitectPRD.md + codebasetechnical-spec.md + CONTEXT.md (initial)βœ… Required
/discovery-epicsπŸ—οΈ Architecttechnical-spec.mdepics.mdβœ… Required

Step-by-step walkthrough

Step 1 β€” Refine the idea

/discovery-refine

The 🧭 Discovery agent reads doc-specs/idea.txt and produces doc-specs/idea.md. It operates without technical bias β€” no frameworks, no architecture, no implementation details. It preserves the original intent, structures it, and flags ambiguities.

βœ… HITL: review idea.md before continuing.

  • Was the original idea preserved accurately?
  • Are there assumptions that should not have been made?
  • Are open questions clearly flagged?

Step 2 β€” Generate the functional spec

/discovery-spec

The πŸ—‚οΈ PM agent reads idea.md and produces doc-specs/non-technical-spec.md with:

  • Personas and target users
  • User journeys and key scenarios
  • Business rules and constraints
  • Functional acceptance criteria
  • Open questions

βœ… HITL: review non-technical-spec.md.

  • Are user flows clear and complete?
  • Are business rules captured correctly?
  • Is anything missing before moving to PRD?

Step 3 β€” Generate the PRD

/discovery-prd

The πŸ§‘β€πŸ’Ό Tech Lead agent reads non-technical-spec.md and produces doc-specs/PRD.md with:

  • Executive overview
  • Objectives and success criteria
  • Scope (included / excluded)
  • Assumptions and dependencies
  • Functional requirements (FRs)
  • Non-functional requirements (NFRs)
  • Acceptance criteria
  • Open questions

βœ… HITL: review PRD.md.

  • Is the scope correctly bounded?
  • Do the NFRs make sense?
  • Are acceptance criteria testable?

Step 4 β€” Generate the technical spec

/discovery-tech-spec

The πŸ—οΈ Architect agent reads PRD.md and inspects the codebase (via search/codebase) to produce doc-specs/technical-spec.md with:

  • Architecture decisions and rationale
  • Components and module boundaries
  • Contracts and interfaces
  • Data flows and persistence strategy
  • Auth and security boundaries
  • Testing strategy
  • Risks and open technical questions

It also creates the initial doc-specs/CONTEXT.md.

βœ… HITL: review technical-spec.md.

  • Are architecture decisions justified?
  • Are risks and dependencies registered?
  • Are there ambiguities that must be resolved before epics?

Step 5 β€” Generate the epics

/discovery-epics

The πŸ—οΈ Architect agent reads technical-spec.md and PRD.md and produces doc-specs/epics.md. Epics are ordered by technical dependency (not business priority) β€” each epic must be deliverable independently without depending on a later epic being done first.

βœ… HITL: review epics.md.

  • Does the sequencing make technical sense?
  • Is each epic small enough to be implemented independently?
  • Are dependencies between epics accurate?

Generated artefacts

ArtefactLocationDescription
idea.mddoc-specs/idea.mdStructured version of the raw idea
non-technical-spec.mddoc-specs/non-technical-spec.mdFunctional spec: personas, journeys, rules
PRD.mddoc-specs/PRD.mdProduct Requirements Document
technical-spec.mddoc-specs/technical-spec.mdArchitecture decisions, components, flows
epics.mddoc-specs/epics.mdOrdered list of deliverable epics
CONTEXT.mddoc-specs/CONTEXT.mdInitial context memory β€” updated after each epic

After Discovery

Once epics.md is approved, move to the Spec phase β€” one epic at a time.