Skip to content

Commit 544d565

Browse files
committed
docs: update documentation with git integration and new features
- Document git integration (auto-commit, auto-push, signoff) - Update environment variables and config file examples - Update CLI usage examples - Update source code structure in AGENTS.md - Fix idea handling description (crash-safe deletion) Signed-off-by: leocavalcante <[email protected]>
1 parent 4cdd7e1 commit 544d565

File tree

3 files changed

+51
-6
lines changed

3 files changed

+51
-6
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,4 @@ jobs:
4444
run: bun install
4545

4646
- name: Check formatting and lint
47-
run: bunx biome check src/
47+
run: bunx biome check src/ tests/

AGENTS.md

Lines changed: 48 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
# AGENTS.md - Opencoder Development Guide
1+
# AGENTS.md - OpenCoder Development Guide
22

33
This file provides instructions for AI coding agents working in this repository.
44

55
## Project Overview
66

7-
Opencoder is a CLI application written in **TypeScript** that uses the OpenCode SDK to run a fully autonomous development loop. It creates plans and executes them continuously without stopping.
7+
OpenCoder is a CLI application written in **TypeScript** that uses the OpenCode SDK to run a fully autonomous development loop. It creates plans and executes them continuously without stopping.
88

99
- **Language**: TypeScript
1010
- **Runtime**: Bun (1.0+ required)
@@ -88,13 +88,15 @@ src/
8888
builder.ts # OpenCode SDK wrapper with event streaming
8989
evaluator.ts # Evaluation response parsing
9090
loop.ts # Main autonomous loop
91+
git.ts # Git operations (commit, push, change detection)
9192
9293
tests/
9394
config.test.ts # Config module tests
9495
state.test.ts # State persistence tests
9596
plan.test.ts # Plan parsing tests
9697
ideas.test.ts # Ideas queue tests
9798
evaluator.test.ts # Evaluation parsing tests
99+
git.test.ts # Git operations tests
98100
```
99101

100102
## Code Style Guidelines
@@ -265,6 +267,9 @@ OPENCODER_MAX_RETRIES=3
265267
OPENCODER_BACKOFF_BASE=10
266268
OPENCODER_LOG_RETENTION=30
267269
OPENCODER_TASK_PAUSE_SECONDS=2
270+
OPENCODER_AUTO_COMMIT=true
271+
OPENCODER_AUTO_PUSH=true
272+
OPENCODER_COMMIT_SIGNOFF=false
268273
```
269274

270275
### Config File (.opencode/opencoder/config.json)
@@ -275,7 +280,10 @@ OPENCODER_TASK_PAUSE_SECONDS=2
275280
"buildModel": "anthropic/claude-sonnet-4",
276281
"verbose": false,
277282
"maxRetries": 3,
278-
"taskPauseSeconds": 2
283+
"taskPauseSeconds": 2,
284+
"autoCommit": true,
285+
"autoPush": true,
286+
"commitSignoff": false
279287
}
280288
```
281289

@@ -293,11 +301,45 @@ opencoder -P anthropic/claude-opus-4 -B anthropic/claude-sonnet-4
293301

294302
# Verbose output
295303
opencoder -m anthropic/claude-sonnet-4 -v
304+
305+
# Disable automatic git operations
306+
opencoder -m anthropic/claude-sonnet-4 --no-auto-commit --no-auto-push
307+
308+
# Enable commit signoff (DCO)
309+
opencoder -m anthropic/claude-sonnet-4 -s
296310
```
297311

312+
## Git Integration
313+
314+
OpenCoder includes automatic git operations after tasks and cycles:
315+
316+
### Features
317+
318+
- **Auto-commit**: Automatically commits changes after each successful task
319+
- **Auto-push**: Automatically pushes commits after each completed cycle
320+
- **Commit signoff**: Adds `Signed-off-by` line for DCO compliance
321+
322+
### Configuration
323+
324+
| Option | CLI Flag | Env Var | Default |
325+
|--------|----------|---------|---------|
326+
| Auto-commit | `--no-auto-commit` | `OPENCODER_AUTO_COMMIT` | `true` |
327+
| Auto-push | `--no-auto-push` | `OPENCODER_AUTO_PUSH` | `true` |
328+
| Signoff | `-s, --signoff` | `OPENCODER_COMMIT_SIGNOFF` | `false` |
329+
330+
### Commit Message Generation
331+
332+
Commit messages are automatically generated based on task descriptions using conventional commit prefixes:
333+
334+
- `fix:` - Bug fixes, resolving issues
335+
- `feat:` - New features, additions, implementations
336+
- `test:` - Test-related changes
337+
- `docs:` - Documentation updates
338+
- `refactor:` - Code refactoring, improvements
339+
298340
## Ideas Queue Feature
299341

300-
Opencoder includes an **ideas queue system** that allows users to provide specific tasks for the autonomous loop to work on.
342+
OpenCoder includes an **ideas queue system** that allows users to provide specific tasks for the autonomous loop to work on.
301343

302344
### How It Works
303345

@@ -351,7 +393,8 @@ bun run dev -- -m anthropic/claude-sonnet-4 -p test-project
351393
### Implementation Notes
352394

353395
- Ideas take **full precedence** over user hints
354-
- Idea files are **deleted before plan** (prevents retry loops)
396+
- Idea files are **deleted after plan is successfully saved** (crash-safe)
397+
- Selected idea is **tracked in state** for crash recovery
355398
- Empty/invalid ideas are **automatically cleaned up**
356399
- No naming conventions required - any `.md` file works
357400

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ But what if you want the AI to **work for you** while you're away?
2727

2828
### The "Aha!" Moment
2929

30+
This concept is inspired by [Dax Raad](https://github.com/daxraad) from OpenCode, who shares in [this video](https://youtu.be/o3gmwzo-Mik?si=Q6u_8vAv4hw7cIQ8) that while AI is incredibly powerful, it doesn't replace the human creativity needed for high-level product decisions. Identifying a product's "aha moment" requires empathy and ruthless simplification that machines cannot replicate. The core elements of entrepreneurship - crafting unique ideas, designing intuitive experiences, and the difficult day-to-day strategic thinking - remain as demanding and human-centric as ever.
31+
3032
OpenCoder's insight is simple but powerful:
3133

3234
> **What if the AI never stopped improving your project?**

0 commit comments

Comments
 (0)