Skip to content

Commit 055550a

Browse files
docs: improve accuracy and clarity of documentation
- Rewrite how-it-works.md to focus on context window problem and Ralph loop - Fix ralph-loop.md: replace mermaid with ASCII, correct chief-complete signal - Credit snarktank/ralph and Geoffrey Huntley in README and docs - Remove non-existent features: --prd flag, --dangerously-skip-permissions, environment variables, exit codes 2/3, settings object in prd.json - Change --prd to positional argument throughout docs - Update git considerations with private vs shared options - Reduce emdash usage throughout
1 parent 0e09983 commit 055550a

10 files changed

Lines changed: 279 additions & 293 deletions

File tree

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ claude --version
369369

370370
### "Permission denied" errors
371371

372-
Chief runs Claude with `--dangerously-skip-permissions` to enable autonomous operation. Ensure:
372+
Chief runs Claude with permissions disabled to enable autonomous operation. Ensure:
373373
- You trust the PRD content
374374
- Claude has appropriate access to your project
375375

@@ -457,6 +457,7 @@ Contributions are welcome! Please:
457457

458458
## Acknowledgments
459459

460+
- [snarktank/ralph](https://github.com/snarktank/ralph) - The original Ralph implementation that inspired this project
461+
- [Geoffrey Huntley](https://ghuntley.com/ralph/) - For coining the "Ralph Wiggum loop" pattern
460462
- [Bubble Tea](https://github.com/charmbracelet/bubbletea) - TUI framework
461463
- [Lip Gloss](https://github.com/charmbracelet/lipgloss) - Terminal styling
462-
- [Claude Code](https://claude.ai/code) - AI coding assistant

docs/concepts/chief-directory.md

Lines changed: 33 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ The root `.chief/` directory contains a single `prds/` subdirectory. Each PRD ge
3030
Every PRD lives in its own named folder under `.chief/prds/`. The folder name is what you pass to Chief when running a specific PRD:
3131

3232
```bash
33-
chief --prd my-feature
33+
chief my-feature
3434
```
3535

3636
Chief uses this folder as the working context for the entire run. All reads and writes happen within this folder — the PRD state, progress log, and Claude output are all scoped to the specific PRD being executed.
@@ -161,37 +161,53 @@ A single project can have multiple PRDs, each tracking a separate feature or ini
161161
Run a specific PRD by name:
162162

163163
```bash
164-
chief --prd auth-system
165-
chief --prd payment-integration
164+
chief auth-system
165+
chief payment-integration
166166
```
167167

168168
Each PRD tracks its own stories, progress, and logs independently. You can run them sequentially or work on different PRDs over time as your project evolves.
169169

170170
## Git Considerations
171171

172-
### What to Commit
172+
You have two options depending on whether you want to share Chief state with your team.
173173

174-
| File | Commit? | Why |
175-
|------|---------|-----|
176-
| `prd.md` | **Yes** | Your requirements — the source of truth for what to build |
177-
| `prd.json` | **Yes** | Story state and progress — lets collaborators see what's done |
178-
| `progress.md` | **Yes** | Implementation history and learnings — valuable project context |
174+
### Option 1: Keep It Private
179175

180-
### What to Ignore
176+
If Chief is just for your personal workflow, ignore the entire directory:
181177

182-
| File | Ignore? | Why |
183-
|------|---------|-----|
184-
| `claude.log` | **Yes** | Large, regenerated each run, contains raw debug output |
178+
```gitignore
179+
# In your repo's .gitignore
180+
.chief/
181+
```
182+
183+
Or add it to your global gitignore to keep it private across all projects without modifying each repo:
184+
185+
```bash
186+
# Check if you have a global gitignore configured
187+
git config --global core.excludesFile
185188

186-
Add this to your `.gitignore`:
189+
# If not set, create one
190+
git config --global core.excludesFile ~/.gitignore
191+
192+
# Then add .chief/ to that file
193+
echo ".chief/" >> "$(git config --global core.excludesFile)"
194+
```
195+
196+
### Option 2: Share With Your Team
197+
198+
If you want collaborators to see progress and continue where you left off, commit everything except the log files:
187199

188200
```gitignore
201+
# In your repo's .gitignore
189202
.chief/prds/*/claude.log
190203
```
191204

192-
::: tip
193-
Committing `prd.json` and `progress.md` means your team can see exactly which stories are complete and what was learned during implementation. This is especially useful when multiple people are contributing to the same project.
194-
:::
205+
This shares:
206+
- `prd.md`: Your requirements, the source of truth for what to build
207+
- `prd.json`: Story state and progress, so collaborators see what's done
208+
- `progress.md`: Implementation history and learnings, valuable project context
209+
210+
The `claude.log` files are large, regenerated each run, and only useful for debugging.
195211

196212
## What's Next
197213

docs/concepts/how-it-works.md

Lines changed: 61 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,73 @@
11
---
2-
description: Learn how Chief works as an autonomous PRD agent, transforming product requirements into working code through the Ralph Loop execution model.
2+
description: Learn how Chief works as an autonomous coding agent, transforming your requirements into working code through an automated execution loop.
33
---
44

55
# How Chief Works
66

7-
Chief is an autonomous PRD agent that transforms your product requirements into working codewithout constant back-and-forth prompting.
7+
Chief is an autonomous coding agent that transforms your requirements into working code, without constant back-and-forth prompting.
88

99
::: tip Background
1010
For the motivation behind Chief and a deeper exploration of autonomous coding agents, read the blog post: [Introducing Chief: Autonomous PRD Agent](https://minicodemonkey.com/blog/2025/chief)
1111
:::
1212

1313
## The Core Concept
1414

15-
Traditional AI coding assistants require constant interaction. You prompt, Claude responds, you prompt again. It's collaborative, but it's not autonomous.
15+
Traditional AI coding assistants hit a wall: the context window. As your conversation grows, the AI loses track of earlier details, makes contradictory decisions, or simply runs out of space. Long coding sessions become unwieldy.
1616

17-
Chief takes a different approach: **define what you want upfront, then step back and watch it happen.**
17+
Chief takes a different approach using a [Ralph Wiggum loop](https://ghuntley.com/ralph/): **each iteration starts fresh, but nothing is forgotten.**
1818

19-
You write a Product Requirements Document (PRD) describing what you want to build, broken into user stories. Chief reads the PRD, invokes Claude Code, and orchestrates the entire process—one story at a time.
19+
You describe what you want to build as a series of user stories. Chief works through them one at a time, spawning a new Claude session for each. Between iterations, Chief persists state to a `progress.md` file: what was built, which files changed, patterns discovered, and context for future work. The next iteration loads this history, giving Claude everything it needs without the baggage of a bloated conversation.
2020

21-
## The Flow
21+
Running `chief` opens a TUI dashboard where you can review your project, then press `s` to start the loop.
2222

23-
```
24-
┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐
25-
│ You │───▶│ PRD │───▶│ Chief │───▶│ Claude │───▶│ Code │
26-
│ Write │ │ (.json) │ │ (Loop) │ │ (Agent) │ │ (Commits)│
27-
└──────────┘ └──────────┘ └──────────┘ └──────────┘ └──────────┘
28-
```
29-
30-
Here's what each component does:
23+
## The Execution Loop
3124

32-
| Component | Role |
33-
|-----------|------|
34-
| **You** | Write the PRD with user stories and acceptance criteria |
35-
| **PRD** | Machine-readable spec that defines what needs to be built |
36-
| **Chief** | Orchestrator that manages the loop and tracks progress |
37-
| **Claude** | AI agent that reads context, writes code, runs tests, and commits |
38-
| **Code** | The end result—working code committed to your repository |
25+
Chief works through your stories methodically. Each iteration focuses on a single story:
3926

40-
## One Iteration, One Story
27+
```
28+
┌───────────────────────────────────────┐
29+
│ │
30+
▼ │
31+
┌──────────────┐ │
32+
│ Pick Story │ │
33+
│ (next todo) │ │
34+
└──────┬───────┘ │
35+
│ │
36+
▼ │
37+
┌──────────────┐ │
38+
│ Invoke Claude│ │
39+
│ with prompt │ │
40+
└──────┬───────┘ │
41+
│ │
42+
▼ │
43+
┌──────────────┐ │
44+
│ Claude │ │
45+
│ codes & tests│ │
46+
└──────┬───────┘ │
47+
│ │
48+
▼ │
49+
┌──────────────┐ │
50+
│ Commit │ │
51+
│ changes │ │
52+
└──────┬───────┘ │
53+
│ │
54+
▼ │
55+
┌──────────────┐ more stories │
56+
│ Mark Complete├────────────────────────────────┘
57+
└──────┬───────┘
58+
│ all done
59+
60+
✓ Finished
61+
```
4162

42-
Chief works through your PRD methodically. Each "iteration" focuses on a single user story:
63+
Here's what happens in each step:
4364

44-
1. **Read State** — Chief examines `prd.json` to find the highest-priority story where `passes: false`
45-
2. **Build Prompt** — Constructs a prompt with instructions, the story details, and project context
46-
3. **Invoke Claude** — Spawns Claude Code with the assembled prompt
47-
4. **Execute** — Claude reads files, writes code, runs tests, and fixes issues until the story is complete
48-
5. **Commit** — Claude commits the changes with a conventional commit message like `feat: [US-001] - Feature Title`
49-
6. **Update PRD** — Marks the story as `passes: true` and records progress
50-
7. **Repeat** — Chief checks for more incomplete stories and continues
65+
1. **Pick Story**: Chief finds the highest-priority incomplete story
66+
2. **Invoke Claude**: Constructs a prompt with the story details and project context, then spawns Claude Code
67+
3. **Claude Codes**: Claude reads files, writes code, runs tests, and fixes issues until the story is complete
68+
4. **Commit**: Claude commits the changes with a message like `feat: [US-001] - Feature Title`
69+
5. **Mark Complete**: Chief updates the project state and records progress
70+
6. **Repeat**: If more stories remain, the loop continues
5171

5272
This isolation is intentional. If something breaks, you know exactly which story caused it. Each commit represents one complete feature.
5373

@@ -63,31 +83,28 @@ feat: [US-003] - Add user authentication
6383
- Created auth middleware
6484
```
6585

66-
Your git history becomes a timeline of features, matching 1:1 with your PRD stories.
86+
Your git history becomes a timeline of features, matching 1:1 with your stories.
6787

6888
## Progress Tracking
6989

70-
Chief maintains a `progress.md` file in each PRD directory. After every iteration, Claude appends:
90+
The `progress.md` file is what makes fresh context windows possible. After every iteration, Claude appends:
7191

7292
- What was implemented
7393
- Which files changed
7494
- Learnings for future iterations (patterns discovered, gotchas, context)
7595

76-
This creates institutional memory. Later iterations (and future developers) can reference this to understand decisions and avoid repeating mistakes.
77-
78-
## Why This Works
96+
When the next iteration starts, Claude reads this file and immediately understands the project's history, without needing thousands of tokens of prior conversation. This gives you the benefits of long-running context (consistency, institutional memory) without the downsides (context overflow, degraded performance).
7997

80-
The autonomous approach enables things that interactive prompting can't:
98+
## Staying in Control
8199

82-
- **Background execution** — SSH into a server, run `chief`, disconnect. Come back to finished features.
83-
- **Predictable output** — Conventional commits, structured progress tracking, consistent patterns.
84-
- **Resumable work** — Stop anytime (Ctrl+C), continue exactly where you left off later.
85-
- **Parallel development** — Run Chief on multiple PRDs in different terminal sessions.
100+
Autonomous doesn't mean unattended. The TUI lets you:
86101

87-
You define intent through the PRD. Chief handles the execution loop. Claude does the actual coding.
102+
- **Start / Pause / Stop**: Press `s` to start, `p` to pause after the current story, `x` to stop immediately
103+
- **Switch projects**: Press `n` to cycle through projects, or `1-9` to jump directly
104+
- **Resume anytime**: Walk away, come back, press `s`. Chief picks up where you left off
88105

89106
## Further Reading
90107

91-
- [The Ralph Loop](/concepts/ralph-loop) Deep dive into the execution loop mechanics
92-
- [PRD Format](/concepts/prd-format)How to write effective PRDs with good user stories
93-
- [The .chief Directory](/concepts/chief-directory) Understanding where state is stored
108+
- [The Ralph Loop](/concepts/ralph-loop): Deep dive into the execution loop mechanics
109+
- [PRD Format](/concepts/prd-format): How to structure your project with effective user stories
110+
- [The .chief Directory](/concepts/chief-directory): Understanding where state is stored

docs/concepts/prd-format.md

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -77,19 +77,8 @@ The JSON file is what Chief actually uses to drive execution. It defines the pro
7777
|-------|------|----------|-------------|
7878
| `project` | `string` | Yes | Project name, used in logs and TUI |
7979
| `description` | `string` | Yes | Brief description of what you're building |
80-
| `settings` | `object` | No | Optional quality check commands |
8180
| `userStories` | `array` | Yes | Ordered list of user stories |
8281

83-
### Settings Object
84-
85-
The optional `settings` object tells Chief what commands to suggest for quality checks:
86-
87-
| Field | Type | Description |
88-
|-------|------|-------------|
89-
| `testCommand` | `string` | Command to run tests (e.g., `npm test`) |
90-
| `buildCommand` | `string` | Command to build the project (e.g., `npm run build`) |
91-
| `lintCommand` | `string` | Command to lint code (e.g., `npm run lint`) |
92-
9382
### UserStory Object
9483

9584
Each story in the `userStories` array has the following fields:
@@ -175,13 +164,6 @@ Here's a complete `prd.json` with annotations explaining each part:
175164
// A brief description — helps Claude understand scope
176165
"description": "Complete auth system with login, registration, and password reset",
177166

178-
// Optional commands Chief suggests for quality checks
179-
"settings": {
180-
"testCommand": "npm test",
181-
"buildCommand": "npm run build",
182-
"lintCommand": "npm run lint"
183-
},
184-
185167
"userStories": [
186168
{
187169
// Unique ID — appears in commit messages as: feat: [US-001] - User Registration

0 commit comments

Comments
 (0)