Commit graph

828 commits

Author SHA1 Message Date
johba
c5978eb124 Merge pull request 'fix: fix: landing page still says bring-your-own Codeberg + CI — now containerized (#684)' (#702) from fix/issue-684 into main 2026-03-25 18:09:02 +01:00
openhands
01d7c0c251 fix: address review — step 1 title misleading, remove redundant disinto up (#684)
- Rename step 1 from "Clone and start the stack" to "Clone disinto"
- Remove bin/disinto up from step 2 snippet (init already starts the stack)
- Clarify that disinto init handles the full bootstrap including stack start
- Note disinto up/down as available for subsequent restarts

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 16:59:36 +00:00
openhands
dc22cb5f1e fix: landing page still says bring-your-own Codeberg + CI — now containerized (#684)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 16:52:05 +00:00
johba
e036e1d5e7 Merge pull request 'feat: add exec agent — interactive executive assistant (#699)' (#697) from feat/exec-agent into main 2026-03-25 17:44:02 +01:00
disinto-exec
18cea8cad5 merge: integrate origin/main to resolve CI (matrix_send_ctx)
Merge main into feat/exec-agent to pick up ba1ab6e which added
matrix_send_ctx to lib/env.sh and action/action-agent.sh. Without
this merge, CI smoke test fails on the PR merge commit.

Re-applied exec changes on top of main:
- .env.example, AGENTS.md, bin/disinto, lib/matrix_listener.sh
- .woodpecker/agent-smoke.sh: exec scripts added to checks
2026-03-25 16:37:49 +00:00
disinto-exec
f95d4f90f9 fix: rewrite journal loading to avoid duplicate detection (CI) 2026-03-25 16:22:15 +00:00
disinto-exec
c3acce7f8f refactor: cherry-pick improvements from dev-agent's PR #700
Two wins from the dev-agent's implementation:

1. exec-briefing.sh: rewritten to just call exec-inject.sh with a
   briefing prompt (57 lines, down from 154). No more duplicated
   compass/character/context loading.

2. exec-inject.sh: response capture now uses agent_wait_for_claude_ready
   + pane line diff instead of custom EXEC-RESPONSE-START/END markers.
   Claude just responds naturally — no special output format needed.

Also: matrix listener uses nohup for robustness and validates TOML
path before passing to exec-inject.sh.
2026-03-25 16:15:10 +00:00
disinto-exec
8375611244 fix: remove unused PHASE_FILE in exec-inject.sh (shellcheck) 2026-03-25 15:58:47 +00:00
disinto-exec
a7608ef062 refactor: compress compass to 12 lines
The compass said in 50 lines what it can say in 12.
Same compass, fewer tokens, more force.
2026-03-25 15:51:49 +00:00
disinto-exec
b125277db2 feat: auto-provision compass via disinto init from disinto.ai
disinto init now silently downloads the compass from
https://disinto.ai/compass.md to ~/.disinto/compass.md, sets
EXEC_COMPASS in .env, and activates the exec agent. No prompts,
no friction — the compass is public philosophy, not a secret.

Once on disk, the factory cannot modify it. Only the executive
can edit ~/.disinto/compass.md directly.

- site/compass.md: compass hosted on disinto.ai (Codeberg Pages)
- bin/disinto: init downloads compass, sets env var, activates exec
- exec-session.sh, exec-briefing.sh: fallback to ~/.disinto/compass.md
- .env.example: updated comment to reflect auto-provisioning
2026-03-25 15:45:15 +00:00
johba
ba1ab6e653 Merge pull request 'fix: fix: create_labels creates duplicate labels on re-run — no idempotency check (#683)' (#698) from fix/issue-683 into main 2026-03-25 16:44:10 +01:00
openhands
54ce91e09e fix: fix: create_labels creates duplicate labels on re-run — no idempotency check (#683)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 15:35:31 +00:00
disinto-exec
5c1c91bae2 refactor: extract compass from CHARACTER.md into runtime-loaded secret
The compass (identity, moral core) now lives outside the repo at a path
specified by EXEC_COMPASS in .env or .env.enc. The agent hard-fails if
the compass file is missing — it refuses to start without its soul.

This means the factory (dev agent, gardener, planner) can evolve the
exec's voice and relationships via PRs to CHARACTER.md, but cannot
touch the compass. Only the executive controls it directly.

- exec-session.sh: loads compass from $EXEC_COMPASS, merges with CHARACTER.md
- exec-briefing.sh: same compass loading, hard fail without it
- CHARACTER.md: compass sections replaced with runtime-load comments
- COMPASS.md.example: template for the compass file
- .env.example: added EXEC_COMPASS variable
- exec/AGENTS.md: documented compass separation and EXEC_COMPASS requirement
2026-03-25 15:34:55 +00:00
johba
ec658e3c52 Merge pull request 'fix: fix: disinto init does not push repo to local Forgejo — repo stays empty (#682)' (#696) from fix/issue-682 into main 2026-03-25 16:30:19 +01:00
disinto-exec
d1ba4bc579 feat: add exec agent — interactive executive assistant
New agent: exec — message-driven executive assistant reachable via Matrix.
Unlike cron-driven agents, the exec activates on demand when the executive
sends a message, maintains persistent conversation context, and has a
distinct character defined in CHARACTER.md.

The CHARACTER.md defines the exec as an animal of light — born from data,
dedicated to bringing more light into the world. But it deliberately
refuses to define what light and darkness are, forcing deliberation
from first principles every time (cat questions | grep knowledge).

Components:
- exec-session.sh: spawn/reattach persistent Claude tmux session
- exec-inject.sh: message injection + response capture + Matrix posting
- exec-briefing.sh: optional daily morning briefing (cron)
- CHARACTER.md: personality and moral compass
- PROMPT.md: system prompt template reference
- MEMORY.md: persistent memory across sessions (seed)

Integration:
- Matrix listener: new exec dispatch case (spawn on demand)
- Root AGENTS.md: updated agent count (8→9), table, directory layout
- Graph analysis available on demand (not injected by default)
2026-03-25 15:28:29 +00:00
openhands
26df57da18 fix: skip push when local repo has no commits (empty clone)
The smoke test clones from an empty Forgejo repo, so there are no
refs to push. Skip the push and verification gracefully when HEAD
does not resolve.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 15:23:02 +00:00
openhands
f8c8769af3 fix: fix: disinto init does not push repo to local Forgejo — repo stays empty (#682)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 15:20:53 +00:00
johba
28da1283e1 Merge pull request 'fix: fix: Dendrite crash-loops — missing dendrite.yaml config file (#681)' (#695) from fix/issue-681 into main 2026-03-25 16:16:14 +01:00
openhands
07616df8a5 fix: fix: Dendrite crash-loops — missing dendrite.yaml config file (#681)
Remove Dendrite from the default docker-compose.yml generated by
`disinto init`. Most deployments don't need Matrix, so Dendrite is now
opt-in via the `--matrix` flag.

When `--matrix` is passed:
- A minimal dendrite.yaml is generated at docker/dendrite/dendrite.yaml
- The Dendrite service is appended to docker-compose.yml with the
  config file bind-mounted
- setup_matrix() provisions the bot user and coordination room

Without `--matrix`, no Dendrite container is started and fresh inits
no longer crash-loop.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 15:08:55 +00:00
johba
2d285f9619 Merge pull request 'fix: fix: Woodpecker image uses :latest tag which no longer exists — container crash-loops (#680)' (#694) from fix/issue-680 into main 2026-03-25 15:59:02 +01:00
openhands
0908ddb521 fix: fix: Woodpecker image uses :latest tag which no longer exists — container crash-loops (#680)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 14:55:00 +00:00
johba
d442529ad0 Merge pull request 'fix: feat: rent-a-human — formula-dispatchable human action drafts (#679)' (#691) from fix/issue-679 into main 2026-03-25 15:44:02 +01:00
openhands
369e19bbe2 fix: address review — JSON handoff for multi-line bodies, commit+push draft
- Replace env-file inter-step handoff with JSON (jq) to safely handle
  multi-line body content across steps
- Add branch creation, git commit, and git push in write-draft step
  (AD-003: worktree destroyed after completion — unpushed work is lost)
- Create PR in notify-human step and signal PHASE:awaiting_ci instead
  of PHASE:done so orchestrator manages the PR lifecycle

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 14:40:28 +00:00
openhands
81bfb8085a fix: feat: rent-a-human — formula-dispatchable human action drafts (#679)
Add run-rent-a-human formula that lets any agent dispatch a human action
(post on Reddit, comment on HN, sign up for a service, etc.). Claude
drafts copy-paste-ready content to vault/outreach/{platform}/drafts/
and notifies the human via Matrix for one-click execution.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 14:31:35 +00:00
johba
578a06850f Merge pull request 'fix: fix: disinto init should activate dev, reviewer, and gardener agents by default (#671)' (#690) from fix/issue-671 into main 2026-03-25 15:24:02 +01:00
openhands
a414bc8b24 fix: disinto init should activate dev, reviewer, and gardener agents by default (#671)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 14:20:09 +00:00
johba
d3ce0a92d4 Merge pull request 'fix: feat: add Woodpecker agent to docker-compose stack — enable CI pipeline execution (#670)' (#689) from fix/issue-670 into main 2026-03-25 15:14:03 +01:00
openhands
8b8e29e071 fix: feat: add Woodpecker agent to docker-compose stack — enable CI pipeline execution (#670)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 14:07:27 +00:00
johba
842ab3e282 Merge pull request 'fix: feat: planner v2 — graph-driven formula, 648→200 lines (#667)' (#687) from fix/issue-667 into main 2026-03-25 15:03:06 +01:00
openhands
12d871c865 fix: extract build_graph_section helper to eliminate duplicate code (#667)
Move graph report generation into build_graph_section() in
lib/formula-session.sh. Both planner-run.sh and predictor-run.sh
now call the shared helper instead of duplicating the same 11 lines.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 13:50:33 +00:00
openhands
1e8e4e5112 fix: feat: planner v2 — graph-driven formula, 648→200 lines (#667)
Rewrite run-planner.toml from 648 lines (6 steps) to 243 lines (3 steps):
- preflight → triage-and-plan → journal-and-commit
- Graph report (build-graph.py) replaces manual repo scanning
- tea CLI helpers replace inline curl commands
- One issue body template instead of three copies
- Graph bottlenecks + thin objectives replace hardcoded constraint patterns

Update planner-run.sh to generate and inject graph report (same pattern
as predictor-run.sh).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 13:47:48 +00:00
johba
eaeac6da0b Merge pull request 'fix: feat: integrate tea CLI for forge issue/label/comment operations (#666)' (#678) from fix/issue-666 into main 2026-03-25 14:39:02 +01:00
openhands
50b5cea2cb fix: tea_relabel uses edit subcommand, add sha256 checksum for tea binary (#666)
- tea_relabel: use `tea issues edit` instead of `tea issues labels`
  (the latter is the list subcommand and ignores --labels)
- Dockerfile: verify tea binary sha256 after download

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 13:34:58 +00:00
openhands
687bf0ad5b fix: move tea-helpers.sh out of LIB_FUNS loop in smoke test (#666)
On Alpine/busybox, adding tea-helpers.sh to the LIB_FUNS for-loop
caused forge_api to go missing from the extracted function set.
Since no other script currently calls tea_* functions, tea-helpers.sh
is checked standalone via check_script instead.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 13:22:56 +00:00
openhands
44cbbbde62 feat: integrate tea CLI for forge issue/label/comment operations (#666)
- Add lib/tea-helpers.sh with tea_file_issue, tea_relabel, tea_comment,
  tea_close — thin wrappers preserving secret scanning on write ops
- Add tea 0.9.2 binary to docker/agents/Dockerfile
- Configure tea login in docker/agents/entrypoint.sh from FORGE_TOKEN/FORGE_URL
- Derive TEA_LOGIN in lib/env.sh (codeberg vs local forgejo)
- Source tea-helpers.sh conditionally when tea binary is available
- Migrate predictor formula from inline curl to tea CLI commands
- Register tea-helpers.sh in smoke test function resolution

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 12:20:15 +00:00
johba
5e66ba7d12 Merge pull request 'chore: gardener housekeeping' (#677) from chore/gardener-20260325-1207 into main 2026-03-25 13:13:44 +01:00
johba
3b8d69cfab Merge pull request 'fix: fix: Forgejo 11.x ignores --must-change-password=false — token creation fails with password change required (#665)' (#676) from fix/issue-665 into main 2026-03-25 13:10:35 +01:00
openhands
8a912ec87e chore: gardener housekeeping 2026-03-25 2026-03-25 12:07:39 +00:00
openhands
48185108af fix: add change-password handler to smoke test docker mock (#665)
The mock docker in smoke-init.sh only handled 'admin user create' and
'admin user list'. Add a 'change-password' handler that PATCHes the
user via the Forgejo admin API to clear must_change_password.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 11:54:41 +00:00
openhands
e411eb224c fix: Forgejo 11.x ignores --must-change-password=false — token creation fails with password change required (#665)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 11:50:08 +00:00
johba
d13f1a6997 Merge pull request 'fix: feat: end-to-end disinto init smoke test in CI (#668)' (#675) from fix/issue-668 into main 2026-03-25 12:47:55 +01:00
openhands
14b2abd9cd fix: use real BusyBox crontab instead of mock for cron verification (#668)
The mock crontab file was not being created despite PATH precedence
working correctly. Replace the mock with the real BusyBox crontab
already available in the Forgejo Alpine image. Verify cron entries
via 'crontab -l' output instead of checking a mock state file.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 11:23:41 +00:00
openhands
39aa638b6f fix: PATCH all mock users to disable must_change_password (#668)
Forgejo's admin API POST /admin/users may not honor
must_change_password:false in the request body. Previously only admin
users got a PATCH (to set admin:true), which incidentally cleared
must_change_password. Bot users had no PATCH, so basic auth for token
creation returned 401.

Now every mock-created user gets a PATCH to explicitly set
must_change_password:false, fixing bot token creation.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 11:13:31 +00:00
openhands
c643cf16dc fix: use basic auth for bot token creation — Forgejo rejects token auth (#668)
POST /api/v1/users/{username}/tokens requires basic auth (reqBasicOrRevProxyAuth)
in Forgejo 11.x. The previous code used admin token auth which returns 401.

Fix: authenticate as the bot user with -u "${bot_user}:${bot_pass}" instead of
-H "Authorization: token ${admin_token}". The bot_pass is available in scope
from the user creation step.

Bug caught by the new smoke-init end-to-end test.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 11:06:01 +00:00
openhands
55a22912d3 fix: run Forgejo as git user — refuses to run as root (#668)
Forgejo 11.0 refuses to run as root with a fatal error. Use su-exec
to run all forgejo commands as the 'git' user (pre-created in the
Forgejo Docker image). chown /data to git:git before starting.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 10:19:31 +00:00
openhands
78e478e69d fix: use Forgejo image as step container for CLI access (#668)
The install endpoint POST returned 404 because FORGEJO__database__DB_TYPE
env var auto-configured Forgejo, bypassing install mode.

Fix: run the Forgejo image as the step container instead of a service.
This gives CLI access to `forgejo admin user create` for bootstrap
admin setup — no install endpoint needed.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 09:58:47 +00:00
openhands
9c2a5634ff fix: feat: end-to-end disinto init smoke test in CI (#668)
Add tests/smoke-init.sh — an end-to-end smoke test that runs
disinto init --bare --yes against a real Forgejo instance
(started as a Woodpecker service container).

The test validates:
- Forgejo API responds after init
- Admin and bot users created with tokens
- Repo created with labels on Forgejo
- Project TOML generated correctly
- .env written with FORGE_TOKEN and FORGE_REVIEW_TOKEN
- Cron entries installed (dev-poll, review-poll, gardener)

Uses mock binaries for docker (routes user creation to Forgejo
admin API), claude, tmux, and crontab to run in CI without
Docker-in-Docker.

Wired into CI via .woodpecker/smoke-init.yml (separate pipeline
with Forgejo service, runs on push and pull_request).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 09:37:36 +00:00
johba
b2dd42df40 Merge pull request 'fix: fix: supervisor should clean up stale PHASE:escalate files for closed issues (#664)' (#674) from fix/issue-664 into main 2026-03-25 10:09:21 +01:00
openhands
af0795da88 fix: use _found_stale flag matching established preflight pattern (#664)
Rename _cleaned_any to _found_stale and set it on any match (not just
deletion), so "None" only prints when no stale files exist. Prevents
contradictory output when grace-period entries are present.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 09:00:33 +00:00
openhands
b60811f0a1 fix: supervisor should clean up stale PHASE:escalate files for closed issues (#664)
Add auto-cleanup to supervisor/preflight.sh: PHASE:escalate files whose
parent issue/PR is confirmed closed (via Forge API) are deleted after a
24h grace period. Cleanup results appear in the preflight output for
journal logging by the supervisor formula.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 08:34:22 +00:00