You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CLAUDE.md
+36-9Lines changed: 36 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,13 +4,28 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
4
4
5
5
## Project Overview
6
6
7
-
**Foreman** is a minimal Python harness acting as an always-on AI co-maintainer for OSS repositories. It manages process lifecycle, credential injection, message routing, and GitHub event polling. All intelligence lives in containerized agents. The harness owns all GitHub API calls — agents only produce decision + action lists over HTTP, so credentials never enter agent containers.
7
+
**Foreman** is a minimal Python harness acting as an always-on AI co-maintainer for OSS repositories.
8
+
It manages process lifecycle, credential injection, message routing, and GitHub event polling.
9
+
All intelligence lives in containerized agents.
10
+
The harness owns all GitHub API calls — agents only produce decision + action lists over HTTP,
11
+
so credentials never enter agent containers.
8
12
9
-
The MVP target: a maintainer installs Foreman, configures one repo, and has issues triaged (labeled, responded to, or closed) without writing code — in under 30 minutes.
13
+
The MVP target: a maintainer installs Foreman, configures one repo, and has issues triaged
14
+
(labeled, responded to, or closed) without writing code — in under 30 minutes.
15
+
16
+
## Spec-driven Development
17
+
18
+
New features are developed by hashing out an idea.
19
+
This idea is then turned into a spec.
20
+
The spec is turned into a plan.
21
+
The plan is iteratively implemented.
22
+
23
+
All files for a feature are written in Markdown and live in the `docs/specs/<feature-name>/` directory.
10
24
11
25
## Commands
12
26
13
27
### Setup
28
+
14
29
```bash
15
30
uv sync # install all dependency groups (dev, test, docs)
16
31
pre-commit install # install git hooks
@@ -31,6 +46,7 @@ pre-commit run --all-files # run all linters/formatters
31
46
```
32
47
33
48
### Entry point (once implemented)
49
+
34
50
```bash
35
51
uv run foreman start --config config.yaml
36
52
```
@@ -39,7 +55,7 @@ uv run foreman start --config config.yaml
39
55
40
56
The system follows a strict vertical ownership model:
→ Harness HTTP server (server.py) — fetches memory, builds TaskMessage, POSTs to agent
@@ -48,25 +64,28 @@ GitHub API polling (poller.py)
48
64
→ Memory (memory.py) — logs every action, updates per-issue summaries
49
65
```
50
66
51
-
**Key constraint:** The harness executes all GitHub API calls. Agents produce `DecisionMessage` (decision + action list) — they never call GitHub directly.
67
+
**Key constraint:** The harness executes all GitHub API calls.
68
+
Agents produce `DecisionMessage` (decision + action list) — they never call GitHub directly.
├── credentials.py # Env var resolution; get_github_token()
@@ -89,14 +108,17 @@ agents/
89
108
### Memory (SQLite)
90
109
91
110
Two tables in `~/.agent-harness/memory.db` (path overridable in config):
111
+
92
112
-`action_log` — every decision logged before execution
93
113
-`memory_summary` — per-repo+issue LLM-generated summary injected into task context on next dispatch
94
114
95
-
SQLite is used directly via stdlib `sqlite3` — **never mock it in tests**; use a real temp-file DB via `pytest tmp_path`.
115
+
SQLite is used directly via stdlib `sqlite3` — **never mock it in tests**;
116
+
use a real temp-file DB via `pytest tmp_path`.
96
117
97
118
### Configuration (YAML)
98
119
99
-
All secrets are `${VAR}` environment variable references — the config file itself never contains raw secrets. See `config.example.yaml` for the full schema.
120
+
All secrets are `${VAR}` environment variable references — the config file itself never contains raw secrets.
121
+
See `config.example.yaml` for the full schema.
100
122
101
123
## Code Style
102
124
@@ -106,27 +128,32 @@ All secrets are `${VAR}` environment variable references — the config file its
106
128
-**Type hints:** required on all public functions and methods; `--keep-runtime-typing`
0 commit comments