Skip to content

AI Phase Transitions & Spec Generation #5

@tkowalczyk

Description

@tkowalczyk

Parent PRD

#1

What to build

Extend the AI system prompts so Claude auto-transitions through four phases: discovery → requirements (PRD) → implementation plan → task breakdown. Each transition is clearly communicated to the client in plain, non-technical language.

System prompts: Encode the full interview methodology. The AI should know when discovery is sufficiently complete to move on, synthesize findings into a structured requirements doc, break that into a phased plan, and finally produce a task list.

Output parsing: When the final phase completes, parse the AI's structured output into a markdown spec and individual tasks. Store the spec in the Spec table and tasks in the Task table. Update project status to "review."

Context management: For long conversations spanning multiple days, implement summarization when approaching context limits — summarize earlier phases and inject the summary so the AI maintains coherence.

Prompt storage: System prompts should be stored in config/DB, not hardcoded in source, so the methodology can be iterated without code changes.

Acceptance criteria

  • AI transitions from discovery → requirements → plan → tasks automatically
  • Each phase transition is clearly signaled to the client in plain language
  • Final output contains a structured markdown spec and numbered task list
  • Spec is parsed and stored in the Spec table
  • Tasks are parsed and stored individually in the Task table
  • Project status updates to "review" on completion
  • Long conversations (50+ messages) maintain coherence via summarization
  • System prompts are configurable without code changes

Blocked by

User stories addressed

  • User story 4
  • User story 19
  • User story 20
  • User story 21
  • User story 22
  • User story 23

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions