Skip to content

Commit c50cec7

Browse files
jahoomaclaude
andcommitted
Fold thin docs back into AGENTS.md, restore request flow summary
error-handling.md (2 lines) and git-guidelines.md (3 bullets) were too thin for their own files. Moved them into a Conventions section in AGENTS.md alongside the referral system note. Restored the brief request flow summary that was in the original knowledge.md. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent d2193d4 commit c50cec7

File tree

4 files changed

+17
-18
lines changed

4 files changed

+17
-18
lines changed

AGENTS.md

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,26 @@ Codebuff is a tool for editing codebases via natural-language instructions to Bu
2525
- `agents/` — main agents shipped with codebuff
2626
- `.agents/` — local agent templates (prompt + programmatic agents)
2727

28+
## Request Flow
29+
30+
1. CLI/SDK sends user input + context to the Codebuff web API.
31+
2. Agent runtime streams events/chunks back through SDK callbacks.
32+
3. Tools execute locally (file edits, terminal commands, search) to satisfy tool calls.
33+
34+
## Conventions
35+
36+
- Prefer `ErrorOr<T>` return values (`success(...)`/`failure(...)` in `common/src/util/error.ts`) over throwing.
37+
- Never force-push `main` unless explicitly requested.
38+
- To exclude files from a commit: stage only what you want (`git add <paths>`). Never use `git restore`/`git checkout HEAD -- <file>` to "uncommit" changes.
39+
- Run interactive git commands in tmux (anything that opens an editor or prompts).
40+
- Referral codes are applied via the CLI (web onboarding only instructs the user); see `web/src/app/api/referrals/helpers.ts`.
41+
2842
## Docs
2943

30-
- [`docs/architecture.md`](docs/architecture.md) — Package dependency graph, per-package details, key architectural patterns
44+
- [`docs/architecture.md`](docs/architecture.md) — Package dependency graph, per-package details, architectural patterns
3145
- [`docs/request-flow.md`](docs/request-flow.md) — Full request lifecycle from CLI through server and back
3246
- [`docs/error-schema.md`](docs/error-schema.md) — Server error response formats and client-side handling
33-
- [`docs/error-handling.md`](docs/error-handling.md) — ErrorOr pattern for return values
3447
- [`docs/development.md`](docs/development.md) — Dev setup, worktrees, logs, package management, DB migrations
35-
- [`docs/testing.md`](docs/testing.md)Testing conventions, DI over mocking, tmux CLI testing
48+
- [`docs/testing.md`](docs/testing.md) — DI over mocking, tmux CLI testing
3649
- [`docs/environment-variables.md`](docs/environment-variables.md) — Env var rules, DI helpers, loading order
37-
- [`docs/agents-and-tools.md`](docs/agents-and-tools.md) — Agent system, shell shims, tool definitions, referral system
38-
- [`docs/git-guidelines.md`](docs/git-guidelines.md) — Git safety rules
50+
- [`docs/agents-and-tools.md`](docs/agents-and-tools.md) — Agent system, shell shims, tool definitions

docs/agents-and-tools.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,3 @@ base-lite "fix this bug"
1919

2020
- Tool definitions live in `common/src/tools` and are executed via the SDK helpers + agent-runtime.
2121

22-
## Referral System
23-
24-
Referral codes are applied via the CLI (web onboarding only instructs the user); see `web/src/app/api/referrals/helpers.ts`.

docs/error-handling.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

docs/git-guidelines.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)