Skip to content

Commit 2039200

Browse files
iaminaweclaude
andcommitted
docs: add generate-context prompt to workflow documentation
Update README.md to include the generate-context prompt as an optional pre-setup step in the SDD workflow: - Add "Optional Pre-Setup" section explaining when and why to use generate-context - Update workflow overview from 3 to 4 prompts - Include generate-context in TLDR, Workflow Essentials, and usage examples - Add SYSTEM.md to Core Artifacts section - Position generate-context as first-time/existing codebase analysis tool This aligns documentation with the workflow diagram showing optional pre-setup for reverse-engineering existing context. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent ba75202 commit 2039200

File tree

1 file changed

+37
-7
lines changed

1 file changed

+37
-7
lines changed

README.md

Lines changed: 37 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,20 +23,28 @@
2323
uvx --from git+https://github.com/liatrio-labs/spec-driven-workflow sdd-generate-commands generate --yes
2424
```
2525

26-
2. In your AI tool of choice, use `/generate-spec` with your idea:
26+
2. *(Optional, first time)* Run `/generate-context` to analyze your existing codebase:
27+
28+
```text
29+
/generate-context
30+
```
31+
32+
→ AI analyzes your codebase → Context document created in `docs/001-SYSTEM.md`
33+
34+
3. In your AI tool of choice, use `/generate-spec` with your idea:
2735

2836
```text
2937
/generate-spec I want to add user authentication to my app
3038
```
3139

3240
→ AI asks clarifying questions → You provide answers → Spec created in `tasks/0001-spec-user-auth.md`
3341

34-
3. Continue the flow:
42+
4. Continue the flow:
3543

3644
- Run `/generate-task-list-from-spec` → Task list created in `tasks/tasks-0001-spec-user-auth.md`
3745
- Use `/manage-tasks` → Execute tasks one-by-one with proof artifacts
3846

39-
4. **SHIP IT** 🚢💨
47+
5. **SHIP IT** 🚢💨
4048

4149
## Highlights
4250

@@ -62,19 +70,38 @@ MCP technology remains available as an optional integration, but the heart of th
6270

6371
All prompts live in `prompts/` and are designed for use inside your preferred AI assistant.
6472

73+
### Optional Pre-Setup
74+
75+
**`generate-context`** (`prompts/generate-context.md`): **Optional first step** for analyzing existing codebases before starting spec development. Use this when:
76+
- Working with an existing codebase the AI hasn't seen before
77+
- Need to understand repository architecture, patterns, and conventions
78+
- Want to document technical decisions and design rationale
79+
- Setting up context for multiple specs in the same project
80+
81+
This prompt performs comprehensive codebase analysis and generates a `docs/00N-SYSTEM.md` file documenting architecture, tech stack, patterns, and conventions that inform all subsequent spec development.
82+
83+
### Core SDD Workflow
84+
6585
1. **`generate-spec`** (`prompts/generate-spec.md`): Ask clarifying questions, then author a junior-friendly spec with demoable slices.
6686
2. **`generate-task-list-from-spec`** (`prompts/generate-task-list-from-spec.md`): Transform the approved spec into actionable parent tasks and sub-tasks with proof artifacts.
6787
3. **`manage-tasks`** (`prompts/manage-tasks.md`): Coordinate execution, update task status, and record outcomes as you deliver value.
6888
69-
Each prompt writes Markdown outputs into `tasks/`, giving you a lightweight backlog that is easy to review, share, and implement.
89+
Each prompt writes Markdown outputs into `tasks/` or `docs/`, giving you a lightweight backlog that is easy to review, share, and implement.
7090
7191
## How does it work?
7292
7393
The workflow is driven by Markdown prompts that function as reusable playbooks for the AI agent. Reference the prompts directly, or invoke them via supported tooling, to keep the AI focused on structured outcomes. Users can manage context with their existing workflows (GitHub CLI, Atlassian MCP, etc.), and optionally let the MCP server automate portions of the process.
7494
7595
## Workflow Overview
7696
77-
Three prompts in `/prompts` define the full lifecycle. Use them sequentially to move from concept to completed work.
97+
Four prompts in `/prompts` define the full lifecycle. Use them sequentially to move from concept to completed work.
98+
99+
### Optional Pre-Setup — Generate Codebase Context ([prompts/generate-context.md](./prompts/generate-context.md))
100+
101+
- **When to use:** Working with an existing codebase or starting multiple specs in the same project
102+
- **What it does:** Analyzes existing codebase architecture, extracts patterns and conventions, and documents technical decisions
103+
- **Output:** Creates `docs/00N-SYSTEM.md` with comprehensive codebase context that informs all subsequent spec generation
104+
- **Skip when:** Starting a greenfield project or the AI already has sufficient context about your codebase
78105
79106
### Stage 1 — Generate the Spec ([prompts/generate-spec.md](./prompts/generate-spec.md))
80107
@@ -133,8 +160,9 @@ sequenceDiagram
133160
134161
## Core Artifacts
135162
136-
- **Specs:** `000X-spec-<feature>.md` — canonical requirements, demo slices, and success metrics.
137-
- **Task Lists:** `tasks-000X-spec-<feature>.md` — parent/subtask checklist with relevant files and proof artifacts.
163+
- **Codebase Context (Optional):** `docs/00N-SYSTEM.md` — comprehensive codebase analysis documenting architecture, patterns, conventions, and technical decisions that inform spec development.
164+
- **Specs:** `tasks/000X-spec-<feature>.md` — canonical requirements, demo slices, and success metrics.
165+
- **Task Lists:** `tasks/tasks-000X-spec-<feature>.md` — parent/subtask checklist with relevant files and proof artifacts.
138166
- **Status Keys:** `[ ]` not started, `[~]` in progress, `[x]` complete, mirroring the manage-tasks guidance.
139167
- **Proof Artifacts:** URLs, CLI commands, screenshots, or tests captured per task to demonstrate working software.
140168
@@ -144,6 +172,7 @@ The SDD workflow can be used in three ways, from simplest to most automated:
144172
145173
### Option 1: Manual Copy-Paste (No Tooling Required)
146174
175+
0. **Optional: Generate codebase context (first time only):** If working with an existing codebase, copy or reference `prompts/generate-context.md` to analyze the repository and generate a comprehensive context document in `/docs`. This step helps the AI understand your codebase architecture and patterns for all subsequent specs.
147176
1. **Kick off a spec:** Copy or reference `prompts/generate-spec.md` inside your preferred AI chat. Provide the feature idea, answer the clarifying questions, and review the generated spec before saving it under `/tasks`.
148177
2. **Plan the work:** Point the assistant to the new spec and walk through `prompts/generate-task-list-from-spec.md`. Approve parent tasks first, then request the detailed subtasks and relevant files. Commit the result to `/tasks`.
149178
3. **Execute with discipline:** Follow `prompts/manage-tasks.md` while implementing. Update statuses as you work, attach proof artifacts, and pause for reviews at each demoable slice.
@@ -194,6 +223,7 @@ Run the prompts as an MCP server for programmatic access. This option is most us
194223

195224
### Workflow Essentials
196225

226+
0. **(Optional, first time)** Run `/generate-context` or open `prompts/generate-context.md` to analyze your codebase and generate architecture documentation in `docs/`.
197227
1. Open `prompts/generate-spec.md` inside your AI assistant and follow the instructions to produce a new spec in `tasks/`.
198228
2. Point the assistant at the generated spec and run `prompts/generate-task-list-from-spec.md` to create the implementation backlog.
199229
3. Use `prompts/manage-tasks.md` while executing work to keep status, demo criteria, and proof artifacts up to date.

0 commit comments

Comments
 (0)