From a26dc5c2b0f69cbb2fac5ff628c1c037434ac735 Mon Sep 17 00:00:00 2001 From: openhands Date: Sun, 22 Mar 2026 16:06:31 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20projects/=20directory=20should=20be=20gi?= =?UTF-8?q?tignored=20=E2=80=94=20it=20is=20local=20installation=20config,?= =?UTF-8?q?=20not=20shared=20code=20(#561)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add projects/*.toml to .gitignore - Remove existing TOML files from git tracking (git rm --cached) - Add .toml.example templates with placeholder values - Update BOOTSTRAP.md with new section on project TOML setup - Update AGENTS.md directory layout description Existing local installations are unaffected — gitignore only prevents tracked files from being committed, local copies persist. Co-Authored-By: Claude Opus 4.6 (1M context) --- .gitignore | 2 ++ AGENTS.md | 2 +- BOOTSTRAP.md | 34 +++++++++++++++++++++++++++------- projects/disinto.toml | 26 -------------------------- projects/disinto.toml.example | 26 ++++++++++++++++++++++++++ projects/harb.toml | 28 ---------------------------- projects/harb.toml.example | 26 ++++++++++++++++++++++++++ projects/versi.toml | 21 --------------------- projects/versi.toml.example | 21 +++++++++++++++++++++ 9 files changed, 103 insertions(+), 83 deletions(-) delete mode 100644 projects/disinto.toml create mode 100644 projects/disinto.toml.example delete mode 100644 projects/harb.toml create mode 100644 projects/harb.toml.example delete mode 100644 projects/versi.toml create mode 100644 projects/versi.toml.example diff --git a/.gitignore b/.gitignore index 86a5ce3..313bb30 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,8 @@ # Secrets .env +# Per-box project config (generated by disinto init) +projects/*.toml # Runtime state *.log diff --git a/AGENTS.md b/AGENTS.md index 1060c37..e1ea520 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -27,7 +27,7 @@ disinto/ ├── vault/ vault-poll.sh, vault-agent.sh, vault-fire.sh — action gating + procurement ├── action/ action-poll.sh, action-agent.sh — operational task execution ├── lib/ env.sh, agent-session.sh, ci-helpers.sh, ci-debug.sh, load-project.sh, parse-deps.sh, matrix_listener.sh -├── projects/ *.toml — per-project config +├── projects/ *.toml.example — templates; *.toml — local per-box config (gitignored) ├── formulas/ Issue templates (TOML specs for multi-step agent tasks) └── docs/ Protocol docs (PHASE-PROTOCOL.md, EVIDENCE-ARCHITECTURE.md) ``` diff --git a/BOOTSTRAP.md b/BOOTSTRAP.md index e29be3b..2d3fab3 100644 --- a/BOOTSTRAP.md +++ b/BOOTSTRAP.md @@ -52,7 +52,27 @@ WOODPECKER_DB_NAME=woodpecker CLAUDE_TIMEOUT=7200 # seconds per Claude invocation ``` -## 2. Claude Code Global Settings +## 2. Configure Project TOML + +Each project needs a `projects/.toml` file with box-specific settings +(absolute paths, Woodpecker CI IDs, Matrix credentials). These files are +**gitignored** — they are local installation config, not shared code. + +To create one: + +```bash +# Automatic — generates TOML, clones repo, sets up cron: +disinto init https://codeberg.org/org/repo + +# Manual — copy a template and fill in your values: +cp projects/myproject.toml.example projects/myproject.toml +vim projects/myproject.toml +``` + +The repo ships `projects/*.toml.example` templates showing the expected +structure. See any `.toml.example` file for the full field reference. + +## 3. Claude Code Global Settings Configure `~/.claude/settings.json` with **only** permissions and `skipDangerousModePermissionPrompt`. Do not add hooks to the global settings — `agent-session.sh` injects per-worktree hooks automatically. @@ -78,7 +98,7 @@ claude --dangerously-skip-permissions # Exit after it initializes successfully ``` -## 3. File Ownership +## 4. File Ownership Everything under `/home/debian` must be owned by `debian:debian`. Root-owned files cause permission errors when agents run as the `debian` user. @@ -93,7 +113,7 @@ Verify no root-owned files exist in agent temp directories: find /tmp/dev-* /tmp/harb-* /tmp/review-* -not -user debian 2>/dev/null ``` -## 4. Prepare the Target Repo +## 5. Prepare the Target Repo ### Required: CI pipeline @@ -177,7 +197,7 @@ entire repo as "new", generating a noisy first-run diff. See `formulas/run-planner.toml` (agents-update step) for the full AGENTS.md conventions. -## 5. Write Good Issues +## 6. Write Good Issues Dev-agent works best with issues that have: @@ -192,7 +212,7 @@ Dev-agent works best with issues that have: Dev-agent checks that all referenced issues are closed (= merged) before starting work. If any are open, the issue is skipped and checked again next cycle. -## 6. Install Cron +## 7. Install Cron ```bash crontab -e @@ -251,7 +271,7 @@ FACTORY_ROOT=/home/you/disinto The staggered offsets prevent agents from competing for resources. Each project gets its own lock file (`/tmp/dev-agent-{name}.lock`) derived from the `name` field in its TOML, so concurrent runs across projects are safe. -## 7. Verify +## 8. Verify ```bash # Should complete with "all clear" (no problems to fix) @@ -272,7 +292,7 @@ tail -30 dev/dev-agent.log tail -30 review/review.log ``` -## 8. Optional: Matrix Notifications +## 9. Optional: Matrix Notifications If you want real-time notifications and human-in-the-loop escalation: diff --git a/projects/disinto.toml b/projects/disinto.toml deleted file mode 100644 index f684308..0000000 --- a/projects/disinto.toml +++ /dev/null @@ -1,26 +0,0 @@ -# projects/disinto.toml — disinto develops itself -# -# The factory is its own project. Issues filed on johba/disinto -# are picked up by dev-poll, reviewed by review-poll, groomed by gardener. - -name = "disinto" -repo = "johba/disinto" -repo_root = "/home/debian/dark-factory" -primary_branch = "main" - -[ci] -woodpecker_repo_id = 4 -stale_minutes = 60 - -[services] -containers = [] - -[matrix] -room_id = "!ynKSMyWU7OSkbNjR:matrix.allf.in" -bot_user = "@disinto-factory:matrix.allf.in" -token_env = "DISINTO_MATRIX_TOKEN" - -[monitoring] -check_prs = true -check_dev_agent = true -check_pipeline_stall = false diff --git a/projects/disinto.toml.example b/projects/disinto.toml.example new file mode 100644 index 0000000..94ec15b --- /dev/null +++ b/projects/disinto.toml.example @@ -0,0 +1,26 @@ +# projects/disinto.toml.example — Template for disinto self-management +# +# Copy to projects/disinto.toml and fill in box-specific values, +# or run: disinto init https://codeberg.org/johba/disinto + +name = "disinto" +repo = "johba/disinto" +repo_root = "/home/YOU/dark-factory" +primary_branch = "main" + +[ci] +woodpecker_repo_id = 0 +stale_minutes = 60 + +[services] +containers = [] + +[matrix] +room_id = "!your_room_id:matrix.example.org" +bot_user = "@disinto-factory:matrix.example.org" +token_env = "DISINTO_MATRIX_TOKEN" + +[monitoring] +check_prs = true +check_dev_agent = true +check_pipeline_stall = false diff --git a/projects/harb.toml b/projects/harb.toml deleted file mode 100644 index 3bcb84c..0000000 --- a/projects/harb.toml +++ /dev/null @@ -1,28 +0,0 @@ -# projects/harb.toml — Project config for johba/harb -# -# This file defines project-specific settings for disinto agents. -# -# push3-evolution subsystem: fitness_flags field is comma-separated -# (tools/push3-evolution/seeds/manifest.schema.json, harb#987) - -name = "harb" -repo = "johba/harb" -repo_root = "/home/debian/harb" -primary_branch = "master" - -[ci] -woodpecker_repo_id = 2 -stale_minutes = 60 - -[services] -containers = ["ponder"] - -[matrix] -room_id = "!LvLgiDVUbZKcRYga:matrix.allf.in" -bot_user = "@harb-factory:matrix.allf.in" -token_env = "MATRIX_TOKEN" - -[monitoring] -check_prs = true -check_dev_agent = true -check_pipeline_stall = true diff --git a/projects/harb.toml.example b/projects/harb.toml.example new file mode 100644 index 0000000..aacbb13 --- /dev/null +++ b/projects/harb.toml.example @@ -0,0 +1,26 @@ +# projects/harb.toml.example — Template for johba/harb +# +# Copy to projects/harb.toml and fill in box-specific values, +# or run: disinto init https://codeberg.org/johba/harb + +name = "harb" +repo = "johba/harb" +repo_root = "/home/YOU/harb" +primary_branch = "master" + +[ci] +woodpecker_repo_id = 0 +stale_minutes = 60 + +[services] +containers = ["ponder"] + +[matrix] +room_id = "!your_room_id:matrix.example.org" +bot_user = "@harb-factory:matrix.example.org" +token_env = "MATRIX_TOKEN" + +[monitoring] +check_prs = true +check_dev_agent = true +check_pipeline_stall = true diff --git a/projects/versi.toml b/projects/versi.toml deleted file mode 100644 index c39afee..0000000 --- a/projects/versi.toml +++ /dev/null @@ -1,21 +0,0 @@ -# projects/versi.toml — Project config for johba/versi -# -# This file defines project-specific settings for disinto agents. -# Drop a new TOML file here to add another project — no code changes needed. - -name = "versi" -repo = "johba/versi" -repo_root = "/home/admin/versi" -primary_branch = "main" - -[ci] -woodpecker_repo_id = 3 -stale_minutes = 60 - -[services] -containers = [] - -[monitoring] -check_prs = true -check_dev_agent = true -check_pipeline_stall = true diff --git a/projects/versi.toml.example b/projects/versi.toml.example new file mode 100644 index 0000000..d9e0431 --- /dev/null +++ b/projects/versi.toml.example @@ -0,0 +1,21 @@ +# projects/versi.toml.example — Template for johba/versi +# +# Copy to projects/versi.toml and fill in box-specific values, +# or run: disinto init https://codeberg.org/johba/versi + +name = "versi" +repo = "johba/versi" +repo_root = "/home/YOU/versi" +primary_branch = "main" + +[ci] +woodpecker_repo_id = 0 +stale_minutes = 60 + +[services] +containers = [] + +[monitoring] +check_prs = true +check_dev_agent = true +check_pipeline_stall = true