Commit graph

78 commits

Author SHA1 Message Date
Agent
ee99f185e6 fix: feat: generic journal aspect — post-session reflection + lessons-learned context injection (#97)
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/pr/ci Pipeline was successful
2026-04-01 09:28:49 +00:00
Agent
2d72e0e565 fix: refactor: tighten planner issue filing — template-or-vision gate (#95)
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/pr/ci Pipeline was successful
2026-04-01 08:57:14 +00:00
Agent
dc545a817b fix: chore(26a): delete action-agent.sh, action-poll.sh, and action/AGENTS.md (#65)
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/pr/ci Pipeline was successful
- Delete action/ directory and all its contents
- Remove action-bot from bin/disinto bot token mapping and collaborator lists
- Remove FORGE_ACTION_TOKEN from lib/env.sh and .env.example
- Remove action-bot from FORGE_BOT_USERNAMES in lib/env.sh and .env.example
- Update .woodpecker/agent-smoke.sh to remove action script checks
- Update AGENTS.md: remove action agent from description and table
- Update lib/AGENTS.md: remove action-agent references from sourced by columns
- Update docs/PHASE-PROTOCOL.md: remove action-agent reference
- Update docs/AGENT-DESIGN.md: remove action-agent from agent table
- Update planner/AGENTS.md: update action formula execution reference
- Update README.md: update formula-driven execution reference

Part of #26 — retire action-agent system.
2026-03-31 19:42:25 +00:00
Claude
de2e7dc1fb fix: Migrate planner, predictor, supervisor to SDK (#6)
Some checks failed
ci/woodpecker/push/ci Pipeline failed
ci/woodpecker/pr/ci Pipeline failed
Replace tmux-based run_formula_and_monitor() with synchronous agent_run()
from lib/agent-sdk.sh, matching the pattern established in gardener-run.sh.

Key changes per agent:
- Drop agent-session.sh, use agent-sdk.sh (SID_FILE, LOGFILE)
- Remove SESSION_NAME, PHASE_FILE, PHASE_POLL_INTERVAL (tmux/phase artifacts)
- Strip phase protocol from prompt footer (SDK mode needs no phase signals)
- Preserve all prompt composition: context blocks, memory, journal, preflight

Shared helpers added to lib/formula-session.sh:
- build_sdk_prompt_footer(): build_prompt_footer minus phase protocol
- formula_worktree_setup(): fetch + cleanup + create worktree + EXIT trap

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 13:06:34 +00:00
openhands
c5c24cda67 fix: Extract lib/worktree.sh — create, recover, cleanup (#797)
Extract reusable worktree management into lib/worktree.sh:
- worktree_create: git worktree add + checkout + submodules
- worktree_recover: detect existing worktree, reuse or recreate
- worktree_cleanup: remove worktree + clear Claude Code project cache
- worktree_cleanup_stale: scan /tmp for orphaned worktrees, skip preserved
- worktree_preserve: mark worktree for debugging (skip stale cleanup)

Update callers:
- dev-agent.sh: use worktree_create/worktree_recover/worktree_cleanup
- action-agent.sh: use worktree_cleanup/worktree_preserve
- formula-session.sh: delegate cleanup_stale_crashed_worktrees, use worktree_preserve
- All formula agents source lib/worktree.sh

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 19:06:31 +00:00
johba
71fe89cdd0 fix: {project}-ops repo — separate operations from code (#757) (#767)
Fixes #757

## Changes
Separate operations from code into {project}-ops repo pattern. Added OPS_REPO_ROOT infrastructure (env.sh, load-project.sh, formula-session.sh with ensure_ops_repo helper). Updated all 8 agent scripts and 7 formulas to read/write vault items, journals, evidence, prerequisites, RESOURCES.md, and knowledge from the ops repo. Added setup_ops_repo() to disinto init for automatic ops repo creation and seeding. Removed migrated data from code repo (vault data dirs, planner journal/memory/prerequisites, supervisor journal/best-practices, evidence, RESOURCES.md). Updated all documentation. 55 files changed, ShellCheck clean, all 38 phase tests pass.

Co-authored-by: openhands <openhands@all-hands.dev>
Reviewed-on: https://codeberg.org/johba/disinto/pulls/767
Reviewed-by: Disinto_bot <disinto_bot@noreply.codeberg.org>
2026-03-26 19:55:12 +01:00
openhands
1f9b5e6444 chore: gardener housekeeping 2026-03-26 2026-03-26 18:14:35 +00:00
openhands
89628e50e2 fix: Per-agent Forgejo accounts — identity and permissions via authorship (#747)
Each agent now gets its own Forgejo account (dev-bot, review-bot,
planner-bot, gardener-bot, vault-bot, supervisor-bot, predictor-bot,
action-bot) with a dedicated API token. This enables:

- Audit trail: every forge action attributable to a specific agent
- Permission boundaries: agents act under their own identity
- Vault authorization model: vault-bot comments = proof of approval

Changes:
- bin/disinto: setup_forge() creates all 8 bot accounts during init,
  stores per-agent tokens (FORGE_*_TOKEN) in .env, adds all bots as
  repo collaborators
- lib/env.sh: exports per-agent token vars with fallback to FORGE_TOKEN
  for backwards compat; sets FORGE_BOT_USERNAMES default to all 8 bots
- Agent scripts: each agent overrides FORGE_TOKEN with its per-agent
  token after sourcing env.sh (gardener, planner, supervisor, predictor,
  vault, action)
- .env.example: documents all per-agent token fields

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 16:16:13 +00:00
openhands
23949083c0 fix: Remove Matrix integration — notifications move to forge + OpenClaw (#732)
Remove all Matrix/Dendrite infrastructure:
- Delete lib/matrix_listener.sh (long-poll daemon), lib/matrix_listener.service
  (systemd unit), lib/hooks/on-stop-matrix.sh (response streaming hook)
- Remove matrix_send() and matrix_send_ctx() from lib/env.sh
- Remove MATRIX_HOMESERVER auto-detection, MATRIX_THREAD_MAP from lib/env.sh
- Remove [matrix] section parsing from lib/load-project.sh
- Remove Matrix hook installation from lib/agent-session.sh
- Remove notify/notify_ctx helpers and Matrix thread tracking from
  dev/dev-agent.sh and action/action-agent.sh
- Remove all matrix_send calls from dev-poll.sh, phase-handler.sh,
  action-poll.sh, vault-poll.sh, vault-fire.sh, vault-reject.sh,
  review-poll.sh, review-pr.sh, supervisor-poll.sh, formula-session.sh
- Remove Matrix listener startup from docker/agents/entrypoint.sh
- Remove append_dendrite_compose() and setup_matrix() from bin/disinto
- Remove --matrix flag from disinto init
- Clean Matrix references from .env.example, projects/*.toml.example,
  formulas/*.toml, AGENTS.md, BOOTSTRAP.md, README.md, RESOURCES.md,
  PHASE-PROTOCOL.md, and all agent AGENTS.md/PROMPT.md files

Status visibility now via Codeberg PR/issue activity. Human interaction
via vault items through forge. Proactive alerts via OpenClaw heartbeats.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 14:53:56 +00:00
openhands
36cd0c1817 fix: Planner files vault items for human-blocked constraints (#723)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 13:01:36 +00:00
openhands
f2064ba67c fix: Remove escalation — planner routes through vault instead (#721)
Remove ESCALATED signal and escalation handling from planner, supervisor,
and gardener. When blocked on external resources or human decisions, these
agents now file vault procurement items (vault/pending/*.md) instead of
escalating directly to the human.

Changes:
- Planner formula: ESCALATED signal replaced with HUMAN_BLOCKED; files
  vault items and marks prerequisites as blocked-on-vault
- Supervisor formula/prompt: escalation sections replaced with vault item
  filing; preflight now reports pending vault items instead of escalation
  replies
- Gardener formula: ESCALATE action replaced with VAULT action; files
  vault/pending/*.md for human decisions
- Groom-backlog formula: same ESCALATE→VAULT replacement
- Gardener shell: PHASE:escalate replaced with PHASE:failed for merge
  blocks and CI exhaustion; escalation reply consumption removed
- Supervisor shell: escalation reply consumption removed from both
  supervisor-run.sh and legacy supervisor-poll.sh
- Prerequisite tree: #466 updated from "escalated" to "blocked-on-vault"

The vault is the factory's only interface to the human for resources and
approvals. Dev/action agents retain PHASE:escalate for operational session
issues (CI timeouts, merge blocks) which are a different mechanism.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 09:09:58 +00:00
openhands
b6c2b611e3 chore: planner run 2026-03-26 2026-03-26 07:18:30 +00:00
openhands
ec5de7d2e0 chore: gardener housekeeping 2026-03-26 2026-03-26 06:06:51 +00:00
Gardener
99933bef7b chore: gardener housekeeping 2026-03-26 2026-03-26 00:05:34 +00:00
openhands
86c8ef4720 fix: feat: kill prediction/backlog — planner must act or dismiss, with action budget (#686)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 17:16:13 +00: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
openhands
8a912ec87e chore: gardener housekeeping 2026-03-25 2026-03-25 12:07:39 +00:00
openhands
b7976fcce4 chore: planner run 2026-03-25
- Triaged 6 predictions: 2 promoted (#663, #664), 1 watched, 3 dismissed
- Updated prerequisite tree: #568 DONE, #466 ESCALATED, added operational reliability objective
- Filed 3 issues: #663 (guard logging), #664 (stale phase cleanup), #668 (init smoke test)
- Prioritized top 5 constraints: #466, #661, #663, #664, #668
2026-03-25 07:22:42 +00:00
openhands
40093e92e2 chore: gardener housekeeping 2026-03-25 2026-03-25 06:06:48 +00:00
openhands
b8dc01b06f chore: gardener housekeeping 2026-03-25 2026-03-25 00:07:52 +00:00
openhands
e535ed776f fix: feat: active-state files — per-cron guard with self-off semantics (#622)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 21:46:59 +00:00
openhands
d9427ebe78 chore: gardener housekeeping 2026-03-23 2026-03-23 18:05:26 +00:00
openhands
a66bd91721 fix: Replace Codeberg dependency with local Forgejo instance (#611)
- Add setup_forge() to bin/disinto: provisions Forgejo via Docker,
  creates admin + bot users (dev-bot, review-bot), generates API
  tokens, creates repo, and pushes code — all automated
- Rename env vars: CODEBERG_TOKEN→FORGE_TOKEN, REVIEW_BOT_TOKEN→
  FORGE_REVIEW_TOKEN, CODEBERG_REPO→FORGE_REPO, CODEBERG_API→
  FORGE_API, CODEBERG_WEB→FORGE_WEB, CODEBERG_BOT_USERNAMES→
  FORGE_BOT_USERNAMES (with backwards-compat fallbacks)
- Rename API helpers: codeberg_api()→forge_api(), codeberg_api_all()
  →forge_api_all() (with compat aliases)
- Add forge_url field to project TOML; load-project.sh derives
  FORGE_API/FORGE_WEB from forge_url + repo
- Update parse_repo_slug() to accept any host URL, not just codeberg
- Forgejo data stored under ~/.disinto/forgejo/ (not in factory repo)
- Update all 58 files: agent scripts, formulas, docs, site HTML

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 16:57:12 +00:00
openhands
0775514bf8 chore: gardener housekeeping 2026-03-23 2026-03-23 12:47:32 +00:00
openhands
38f4b385cc chore: gardener housekeeping 2026-03-23
- Update all AGENTS.md watermarks to f6fb79d (current HEAD)
- lib/AGENTS.md: document nudge behavior in agent-session.sh stop hook
- pending-actions.json: enrich #598 body + promote to backlog
2026-03-23 12:08:26 +00:00
openhands
ff0a04bd64 chore: planner run 2026-03-23 2026-03-23 07:06:47 +00:00
openhands
d8cf0a39bc fix: restore closing --> on AGENTS.md watermark HTML comments
The sed watermark-update pattern stripped the closing --> from 9 of 10
AGENTS.md files, making entire file bodies invisible in rendered markdown.
Fix by appending --> to the affected lines.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-23 06:09:19 +00:00
openhands
30cc5688bd chore: gardener housekeeping 2026-03-23
- Update AGENTS.md watermarks to current HEAD (9ec0c02)
- lib/AGENTS.md: document parse-deps.sh inline scan now skips fenced
  code blocks to prevent false positives from code examples in issue bodies
- No blocked issues to review
- Pending actions: none

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-23 06:03:14 +00:00
openhands
d2db178d30 chore: gardener housekeeping 2026-03-23
- Update AGENTS.md watermarks to current HEAD (e8df73e)
- No code changes since last gardener run — watermark-only refresh
- No blocked issues to review
- Pending actions: none

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-23 00:47:57 +00:00
openhands
149211c78d chore: gardener housekeeping 2026-03-23
- dev/AGENTS.md: document two-tier priority queue (priority+backlog first,
  then plain backlog); note do_merge() HTTP 405 already-merged detection
- gardener/AGENTS.md: document merge-through protocol (stay alive through
  CI/review/merge); note session kill on PHASE:escalate
- lib/AGENTS.md: add ensure_priority_label() to ci-helpers.sh entry;
  document optional CALLBACK param in run_formula_and_monitor()
- predictor/AGENTS.md: update watermark (content already current from v2 PR)
- Update watermarks for action, planner, review, supervisor, vault, root

Grooming actions:
- #574: added ## Affected files section (lib/parse-deps.sh) to meet quality gate
- #568: escalated — needs human decision on guard/merge architecture
- #466: escalated — dep #393 closed; needs decision on external vs in-repo example

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-23 00:23:02 +00:00
openhands
b8e5e1ab65 fix: fix: revert dispatch-idle-formulas step and implement strategic dispatch instead (reverts #546/PR#549) (#550)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 12:36:19 +00:00
openhands
f37546c6fc chore: gardener housekeeping 2026-03-22
- Update all AGENTS.md watermarks to current HEAD (251d160)
- dev/AGENTS.md: document dev-poll's early direct-merge scan (before lock
  check) — approved PRs now merge without waiting for active dev sessions;
  chore/gardener PRs merge without issue numbers in branch name
- planner/AGENTS.md: document dispatch-idle-formulas phase (step 4); note
  that planner reads both factory and project-specific formulas; clarify
  that all planner artifacts use $PROJECT_REPO_ROOT, not $FACTORY_ROOT

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-22 12:07:31 +00:00
openhands
db69a79b2e fix: planner formula uses $FACTORY_ROOT for per-project artifacts — causes cross-repo contamination (#541)
Replace $FACTORY_ROOT/planner/ and $FACTORY_ROOT/vault/ references with
$PROJECT_REPO_ROOT/planner/ and $PROJECT_REPO_ROOT/vault/ in the planner
formula and planner-run.sh. Planner artifacts (journal, memory, prerequisite
tree) and vault state are per-project, not factory-owned. The old paths
caused cross-repo contamination when the planner ran for non-disinto projects.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 10:00:36 +00:00
openhands
ea4c55dbbf chore: gardener housekeeping 2026-03-22 2026-03-22 10:43:58 +01:00
openhands
a35318284a chore: planner run 2026-03-22 2026-03-22 07:07:20 +00:00
openhands
5822dc89d9 fix: feat: unified escalation — single PHASE:escalate path for all agents (#510)
Replace PHASE:needs_human with PHASE:escalate across all agent types.
Consolidates 6 overlapping escalation mechanisms into one unified path:
detect → notify via Matrix → session stays alive → human reply injected → resume.

Key changes:
- PHASE:escalate replaces PHASE:needs_human everywhere (16 files)
- CI exhausted now escalates instead of immediately marking blocked
- Matrix listener routes free-text replies to vault tmux sessions
- Vault agent writes PHASE:escalate files for procurement requests
- Supervisor monitors PHASE:escalate sessions in health checks
- 24h timeout on escalation → blocked label + session killed
- All 38 phase protocol tests updated and passing

Supersedes #462, #458, #465.
2026-03-21 19:39:04 +00:00
openhands
07551fab48 fix: feat: planner v2 — prerequisite tree + resource-aware executive (#502)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 18:28:38 +00:00
openhands
b4f1666a80 chore: gardener housekeeping 2026-03-21 2026-03-21 18:07:37 +00:00
openhands
a9b8144401 fix: bundled dust cleanup — AGENTS.md (#420)
- Add phase-handler.sh to dev Key files (#332)
- Document ci_required_for_pr() in ci-helpers.sh (#347)
- Update planner trigger: weekly → daily, note optional project arg (#416)
- Add dev-agent.sh, action-agent.sh to formula-session.sh sourced-by (#418)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 16:02:29 +00:00
openhands
446e6ef0a8 fix: Remove legacy predictor (prediction-poll.sh + prediction-agent.sh + cron entry) (#419)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 15:40:07 +00:00
openhands
24cf01028a chore: gardener housekeeping 2026-03-21
- Update AGENTS.md watermarks (all 10 files) to HEAD 038581e5
- Content already current from recent gardener migration and setup PRs

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-21 14:33:26 +00:00
openhands
f480cbe5d0 chore: gardener housekeeping 2026-03-21
Progressive disclosure split of AGENTS.md (487→152 lines):
- Extracted per-directory AGENTS.md files for all 8 agents + lib/
- Root AGENTS.md now serves as a table of contents with summary table
- All watermarks updated to 16e430e

Grooming results:
- Promoted #469 (WATCH flow missing curl) and #436 (idle_pane_count bug) to backlog
- 12 dust items classified, no groups ripe for bundling yet
- No blocked issues, no AD violations
2026-03-21 12:44:23 +00:00
johba
d7ca59dd2f Merge pull request 'chore: planner run journal 2026-03-21' (#471) from chore/planner-20260321-0906 into main 2026-03-21 11:54:33 +01:00
openhands
16c41a0b03 chore: planner run 2026-03-21 2026-03-21 09:06:49 +00:00
openhands
83ec300c0e fix: feat: planner journal pattern — daily raw files + periodic summarization (#361)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 08:57:06 +00:00
openhands
d0e40ead22 chore: planner run 2026-03-21 2026-03-21 09:42:06 +01:00
openhands
26d20af48c fix: address review — scratch file survives crash, cap read size, fix instruction (#262)
- Remove SCRATCH_FILE from action-agent cleanup() trap so it survives crashes
- Change instruction to note contents already injected (avoid wasted tool call)
- Cap scratch file read at 8KB via head -c 8192
- Move predictor scratch instruction after formula (consistent placement)
- Remove redundant FINAL_PHASE re-reads in planner/predictor

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 20:58:32 +00:00
openhands
7199bbf9b5 fix: feat: agents flush context to scratch file before compaction (#262)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 20:12:45 +00:00
johba
4377c0812f Merge pull request 'feat: disinto predictor — daily cron-driven formula (#406)' (#417) from action/issue-406 into main 2026-03-20 19:09:02 +01:00