Skip to content

Commit e05e10d

Browse files
authored
Merge pull request #57 from ClaydeCode/clayde/issue-56-update-readme
Fix #56: Clean up the readme
2 parents 542c9a3 + 329d188 commit e05e10d

1 file changed

Lines changed: 72 additions & 70 deletions

File tree

README.md

Lines changed: 72 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,13 @@ Clayde is a persistent autonomous AI software agent that lives on a dedicated VM
1212

1313
Clayde is assigned GitHub issues in software repositories. For each issue it:
1414

15-
1. Researches the codebase to understand the context
16-
2. Writes an implementation plan and posts it as a GitHub comment
17-
3. Waits for human approval (a 👍 reaction)
18-
4. Implements the solution on a new branch
19-
5. Opens a pull request and posts a summary comment
15+
1. Researches the codebase and writes a **preliminary plan**, posting it as a GitHub comment
16+
2. Waits for human approval (a 👍 reaction) before continuing
17+
3. For **large issues**: writes a **detailed implementation plan** and posts it as another comment, then waits for approval again before touching any code. For **small issues**: skips directly to implementation after preliminary approval.
18+
4. Implements the solution on a new branch, opens a pull request, and posts a summary comment
19+
5. Addresses any review comments left on the PR
20+
21+
At any point while waiting for approval, new comments on the issue will trigger a plan update — Clayde revises the plan and posts a summary of what changed.
2022

2123
Clayde runs as a Docker container in a continuous loop (default: every 5 minutes), driven by a state machine persisted in `data/state.json`.
2224

@@ -26,45 +28,66 @@ Clayde runs as a Docker container in a continuous loop (default: every 5 minutes
2628

2729
Each issue moves through the following states:
2830

29-
```
30-
(new issue) ──► planning ──► awaiting_approval ──► implementing ──► done
31-
↘ failed
31+
```mermaid
32+
stateDiagram-v2
33+
[*] --> preliminary_planning
34+
preliminary_planning --> awaiting_preliminary_approval
35+
awaiting_preliminary_approval --> awaiting_preliminary_approval: new comment → plan updated
36+
awaiting_preliminary_approval --> planning: 👍 approved (large issue)
37+
awaiting_preliminary_approval --> implementing: 👍 approved (small issue)
38+
planning --> awaiting_plan_approval
39+
awaiting_plan_approval --> awaiting_plan_approval: new comment → plan updated
40+
awaiting_plan_approval --> implementing: 👍 approved
41+
implementing --> pr_open
42+
pr_open --> addressing_review: review comments received
43+
addressing_review --> pr_open
44+
pr_open --> done: PR approved
45+
implementing --> failed: error
46+
done --> [*]
47+
failed --> [*]
3248
```
3349

3450
| State | Description |
3551
|---|---|
36-
| `planning` | Claude is researching and writing a plan |
37-
| `awaiting_approval` | Plan posted as comment; waiting for 👍 from an approver |
38-
| `implementing` | Claude is implementing the solution |
39-
| `done` | PR opened; issue complete |
52+
| `preliminary_planning` | Claude explores the codebase and writes a short overview with clarifying questions |
53+
| `awaiting_preliminary_approval` | Preliminary plan posted; waiting for 👍 from an approver. New comments trigger a plan update. Small issues skip to `implementing` on approval; large issues proceed to `planning`. |
54+
| `planning` | Claude writes a detailed implementation plan |
55+
| `awaiting_plan_approval` | Full plan posted; waiting for 👍 from an approver. New comments trigger a plan update. |
56+
| `implementing` | Claude implements the solution on a new branch |
57+
| `pr_open` | PR opened; monitoring for review comments |
58+
| `addressing_review` | Claude is addressing PR review comments |
59+
| `done` | PR approved; issue complete |
4060
| `failed` | Error occurred; requires manual reset to retry |
4161
| `interrupted` | Claude hit a usage/rate limit; retried automatically next cycle |
4262

4363
---
4464

45-
## Safety Gates
65+
## Safety & Content Filtering
4666

47-
Two independent checks must pass before any work begins:
67+
Clayde uses **content filtering** rather than gatekeeping which issues to work on. It will only act on content that is visible:
4868

49-
**1. Issue-level gate** (before planning)
50-
The issue must be created by a whitelisted user, or have a 👍 reaction from a whitelisted user on the issue itself.
69+
- An issue body or comment is **visible** if it was written by a whitelisted user, or has a 👍 reaction from a whitelisted user.
70+
- If an issue has no visible content at all, it is skipped.
71+
- Blocked issues (those with "blocked by #N" or "depends on #N" in the body) are also skipped.
5172

52-
**2. Plan approval gate** (before implementation)
53-
The plan comment must have a 👍 reaction from any whitelisted user.
73+
Two approval gates then guard forward progress:
5474

55-
Whitelisted users are configured via `CLAYDE_WHITELISTED_USERS` in `data/config.env`.
75+
1. **Preliminary plan approval** — a 👍 from a whitelisted user on the preliminary plan comment is required before the full plan is written.
76+
2. **Plan approval** — a 👍 from a whitelisted user on the full plan comment is required before implementation begins.
5677

57-
This two-tier system ensures Clayde only acts on trusted issues and only implements plans that have been explicitly reviewed and approved.
78+
Whitelisted users are configured via `CLAYDE_WHITELISTED_USERS` in `data/config.env`.
5879

5980
---
6081

6182
## Capabilities
6283

6384
- **Multi-repo support**: Clones and works on any GitHub repository it has access to
85+
- **Two-phase planning**: Preliminary exploration followed by a detailed plan, each gated by human approval
6486
- **Full issue lifecycle**: Plan → approval → implement → PR, with comments at each stage
87+
- **PR review handling**: Reads and addresses reviewer feedback automatically
6588
- **Rate-limit resilience**: Detects Claude usage limits and automatically retries
6689
- **Safety gates**: Whitelist + approval checks prevent unauthorized work
67-
- **Observability**: OpenTelemetry tracing with JSONL file export and optional OTLP export
90+
- **Observability**: OpenTelemetry tracing with JSONL file export
6891
- **Dual Claude backend**: Use the Anthropic API (pay-per-token) or the Claude Code CLI (subscription-based)
6992

7093
---
@@ -87,16 +110,34 @@ This two-tier system ensures Clayde only acts on trusted issues and only impleme
87110

88111
## Setup
89112

90-
### 1. Create the data directory
113+
### 1. Create a dedicated bot GitHub account
114+
115+
Create a GitHub account for your bot (e.g. `my-bot`). This is the account that will be assigned issues and open pull requests.
116+
117+
### 2. Create a GitHub Personal Access Token for the bot
118+
119+
From the bot account, create a classic personal access token with the full **`repo`** scope.
120+
121+
### 3. Configure the instance
91122

92123
```bash
93124
mkdir -p data/logs data/repos
94125
cp config.env.template data/config.env
95126
```
96127

97-
Edit `data/config.env` and fill in the required values (see Configuration below).
128+
Edit `data/config.env`:
98129

99-
### 2. Choose a Claude backend
130+
```
131+
CLAYDE_GITHUB_TOKEN=github_pat_...
132+
CLAYDE_GITHUB_USERNAME=my-bot
133+
CLAYDE_GIT_EMAIL=my-bot@example.com
134+
CLAYDE_ENABLED=true
135+
CLAYDE_WHITELISTED_USERS=your-username,my-bot
136+
```
137+
138+
See [Configuration](#configuration) for all available settings.
139+
140+
### 4. Choose a Claude backend
100141

101142
Clayde supports two backends for invoking Claude, selected by `CLAYDE_CLAUDE_BACKEND` in `data/config.env`:
102143

@@ -127,13 +168,17 @@ Runs the Claude Code CLI as a subprocess. Uses your Claude Pro/Max subscription
127168

128169
The `docker-compose.yml` mounts `~/.claude/.credentials.json` from the host directly into the container. Token refreshes, logouts, and account switches on the host are immediately reflected.
129170

130-
### 3. Start the container
171+
### 5. Start the container
131172

132173
```bash
133174
docker compose up -d
134175
```
135176

136-
Clayde will start its loop, checking for assigned issues every 5 minutes (configurable via `CLAYDE_LOOP_INTERVAL_S`).
177+
Clayde will start its loop, checking for assigned issues every 5 minutes (configurable via `CLAYDE_INTERVAL`).
178+
179+
### 6. Assign issues to your bot
180+
181+
In any repository the bot has access to, assign issues to the bot account. Clayde will pick them up automatically on the next loop cycle.
137182

138183
---
139184

@@ -149,50 +194,7 @@ Clayde will start its loop, checking for assigned issues every 5 minutes (config
149194
| `CLAYDE_GIT_EMAIL` | Git commit author email (required) |
150195
| `CLAYDE_ENABLED` | Set to `true` to activate |
151196
| `CLAYDE_WHITELISTED_USERS` | Comma-separated trusted GitHub usernames |
197+
| `CLAYDE_INTERVAL` | Loop interval in seconds (default: `300`) |
152198
| `CLAYDE_CLAUDE_BACKEND` | `api` (default) or `cli` |
153199
| `CLAYDE_CLAUDE_API_KEY` | Anthropic API key (required when backend=`api`) |
154200
| `CLAYDE_CLAUDE_MODEL` | Model to use (default: `claude-opus-4-6`) |
155-
156-
---
157-
158-
## Deploying Your Own Instance
159-
160-
Clayde is designed to be deployed by anyone. To run your own instance:
161-
162-
### 1. Create a dedicated bot GitHub account
163-
164-
Create a GitHub account for your bot (e.g. `my-bot`). This is the account that will be assigned issues and open pull requests.
165-
166-
### 2. Create a GitHub Personal Access Token for the bot
167-
168-
From the bot account, create a classic personal access token with the full **`repo`** scope.
169-
170-
### 3. Configure the instance
171-
172-
```bash
173-
mkdir -p data/logs data/repos
174-
cp config.env.template data/config.env
175-
```
176-
177-
Edit `data/config.env`:
178-
179-
```
180-
CLAYDE_GITHUB_TOKEN=github_pat_...
181-
CLAYDE_GITHUB_USERNAME=my-bot
182-
CLAYDE_GIT_EMAIL=my-bot@example.com
183-
CLAYDE_ENABLED=true
184-
CLAYDE_WHITELISTED_USERS=your-username,my-bot
185-
```
186-
187-
### 4. Choose a Claude backend and start
188-
189-
Follow the backend instructions in the [Setup](#setup) section above, then run:
190-
191-
```bash
192-
docker compose up -d
193-
```
194-
195-
### 5. Assign issues to your bot
196-
197-
In any repository the bot has access to, assign issues to the bot account. Clayde will pick them up automatically on the next loop cycle.
198-

0 commit comments

Comments
 (0)