Commit graph

308 commits

Author SHA1 Message Date
openhands
4087bced21 fix: feat: landing page refresh — concrete examples, CTA, robots.txt, sitemap (#306)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 20:56:44 +00:00
johba
bbc79e8a4c Merge pull request 'fix: feat: planner triages prediction/unreviewed issues before gap analysis (#304)' (#305) from fix/issue-304 into main 2026-03-19 21:51:21 +01:00
openhands
48dbab215d fix: feat: planner triages prediction/unreviewed issues before gap analysis (#304)
Add Phase 1.5 to planner-agent.sh between AGENTS.md update (Phase 1) and
gap analysis (Phase 2). The new phase fetches all prediction/unreviewed
issues, asks Claude (Sonnet, one-shot) to triage each as ACCEPT_ACTION,
ACCEPT_BACKLOG, or DISMISS, then:
- Creates action issues (with formula YAML front matter) or backlog issues
- Relabels accepted predictions: prediction/unreviewed → prediction/backlog
- Closes dismissed predictions with a reason comment
- Passes accepted predictions as context into Phase 2 gap analysis

Creates prediction/backlog label on first run if missing. Validates emitted
formula names against on-disk formulas/*.toml catalog.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 20:44:39 +00:00
johba
e7f071750f Merge pull request 'fix: fix: agents don't clean up tmux sessions and phase files on completion (#302)' (#303) from fix/issue-302 into main 2026-03-19 21:36:37 +01:00
openhands
eeb8d5450f fix: agents don't clean up tmux sessions and phase files on completion (#302)
review-pr.sh: After APPROVE verdict, kill tmux session, remove phase
file, review output, sentinel files, and review worktree. Same cleanup
for unknown verdicts. REQUEST_CHANGES keeps session alive per #300.

review-poll.sh: Add safety net in stale session cleanup loop — kill
sessions in terminal phase (PHASE:review_complete) even if review-pr.sh
cleanup was interrupted.

dev/phase-handler.sh: Add sentinel file cleanup (/tmp/ci-result-*,
/tmp/review-injected-*) to PHASE:done and PHASE:failed handlers.

dev-agent.sh: Add sentinel file cleanup to idle_timeout/idle_prompt
exit handler. Add belt-and-suspenders done) case to post-loop handler.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 20:30:27 +00:00
johba
5d2b1c1186 Merge pull request 'fix: fix: review-pr.sh exits after REQUEST_CHANGES — should wait for new commits and re-review (#300)' (#301) from fix/issue-300 into main 2026-03-19 21:17:30 +01:00
openhands
b5c854c7a7 fix: review-pr.sh exits after REQUEST_CHANGES — should wait for new commits and re-review (#300)
After REQUEST_CHANGES/DISCUSS, review-pr.sh now writes PHASE:awaiting_changes
(with the reviewed SHA) instead of PHASE:review_complete. review-poll.sh gains
a re-review section that detects awaiting_changes sessions with new commits
and CI passing, then re-invokes review-pr.sh in the same tmux session.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 20:09:22 +00:00
johba
62d8c81069 Merge pull request 'fix: feat: PostToolUse hook detects phase file writes in real-time (eliminates polling latency) (#278)' (#290) from fix/issue-278 into main 2026-03-19 20:59:23 +01:00
openhands
268ddc398c fix: use awk instead of grep -Eo in smoke test for Alpine compatibility (#296)
busybox grep on Alpine handles ERE character classes [(][)] differently
from GNU grep, causing get_fns to miss function definitions like
handle_ci_exhaustion(). awk is portable and works identically on all
platforms.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 19:43:42 +00:00
openhands
809dd93c3b fix: distinguish phase file writes from reads in PostToolUse hook
- Parse tool_name via jq: Write tool checks file_path match,
  Bash tool checks for redirect operator (>) with phase file path
- Reads (cat, head) no longer trigger false-positive markers
- Split guard into separate statements for clarity
- Move marker cleanup inside hook-install guard
- Expand tests: 5 cases covering Bash write, Write tool, Bash read,
  unrelated Bash, and Write to different file

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 18:14:49 +00:00
openhands
ac04dc29a6 fix: feat: PostToolUse hook detects phase file writes in real-time (eliminates polling latency) (#278)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 17:55:06 +00:00
johba
ab3efa2402 fix: replace fragile pane grep with Stop hook for idle detection (#272)
## Summary

- Claude Code v2.1.79 permanently shows `❯` in the input area even while actively thinking, causing `monitor_phase_loop` to false-positive on idle detection and kill working sessions after 90 seconds
- Replace `tmux capture-pane | grep ❯` with a Claude Code Stop hook (`lib/hooks/on-idle-stop.sh`) that writes a marker file only when Claude actually finishes responding
- Hook is installed per-worktree in `.claude/settings.json` by `create_agent_session`; marker cleaned up on inject/kill

## Test plan

- [x] Verified hook installs correctly in fresh worktree
- [x] Verified marker file appears only after Claude finishes responding (not during active thinking)
- [x] Verified live dev-agent session picks up fix and Claude works without being killed
- [x] Verified `agent_inject_into_session` clears marker before new work

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: openhands <openhands@all-hands.dev>
Reviewed-on: https://codeberg.org/johba/disinto/pulls/272
2026-03-19 14:57:54 +01:00
johba
8c9d93b043 Merge pull request 'fix: feat: review + dev-poll skip CI gate for non-code PRs (#266)' (#271) from fix/issue-266 into main 2026-03-19 14:54:51 +01:00
openhands
1ab700c87a fix: feat: review + dev-poll skip CI gate for non-code PRs (#266)
Add diff_has_code_files() and ci_required_for_pr() helpers to
ci-helpers.sh. Non-code PRs (docs/*, formulas/*, evidence/*, *.md)
that have no CI results now skip the CI gate instead of being stuck
forever.

Applied to:
- review-pr.sh: CI gate skipped for non-code PRs
- review-poll.sh: CI gate skipped for non-code PRs
- dev-poll.sh: CI state treated as "success" for non-code PRs in
  orphan, stuck-PR, and backlog merge paths

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 13:48:00 +00:00
johba
65f161951f Merge pull request 'fix: gardener-poll escalation consumer does not handle idle_prompt reason (#268)' (#270) from fix/issue-268 into main 2026-03-19 13:58:46 +01:00
openhands
45745d2bfd fix: gardener-poll escalation consumer does not handle idle_prompt reason (#268)
Widen the escalation dispatch pattern from `idle_timeout*` to also match
`idle_prompt*`. When an idle_prompt escalation arrives, the gardener now
creates an investigation sub-issue with a tailored description (session
returned to prompt without writing a phase signal) instead of silently
falling through to the recipe engine.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 12:55:16 +00:00
johba
d5c2c213a3 fix: bug: gardener hangs forever when Claude finishes without writing phase file (#261) (#263)
Fixes #261

## Changes
Fixed gardener hanging forever when Claude skips phase protocol. Three changes: (1) gardener-agent.sh: replaced 999999s timeout with 7200s (2h, matching dev-agent); (2) lib/agent-session.sh: added idle-prompt detection to monitor_phase_loop — if Claude returns to the ❯ prompt for 3 consecutive polls with no phase file written, exits immediately with _MONITOR_LOOP_EXIT=idle_prompt (only fires when phase file is empty, so awaiting_ci/review waits are unaffected); (3) gardener prompt: removed 'no time limit' wording, replaced with explicit phase-write requirement.

Co-authored-by: openhands <openhands@all-hands.dev>
Reviewed-on: https://codeberg.org/johba/disinto/pulls/263
Reviewed-by: Disinto_bot <disinto_bot@noreply.codeberg.org>
2026-03-19 13:47:10 +01:00
johba
e024b0de03 Merge pull request 'fix: feat: prediction-poll.sh — per-project LLM prediction agent (#140)' (#256) from fix/issue-140 into main 2026-03-19 11:18:51 +01:00
openhands
d2f788239a fix: address review feedback on prediction agent (#140)
- Remove CLAUDE_TIMEOUT no-op override — inherit factory default (7200s) from env.sh
- Use anchored grep -qxF "NO_PREDICTIONS" to avoid false early exits
- Fetch closed PRs (state=closed, merged_at filter) instead of open — captures merged activity signals
- Parse staleness age from filename date (YYYY-MM-DD.json) instead of file mtime
- Log a warning when date -d falls back due to non-GNU date
- Add comment explaining global lock serialisation trade-off

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-19 10:13:22 +00:00
openhands
c06cf81031 fix: feat: prediction-poll.sh — per-project LLM prediction agent (#140)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-19 10:03:45 +00:00
johba
bb85d3848b Merge pull request 'fix: bug: supervisor never delivers disk alerts — crashes during PR scan (#252)' (#254) from fix/issue-252 into main 2026-03-19 10:27:35 +01:00
openhands
1c93267193 fix: clear P0/P1 alerts after early send to prevent duplicate Matrix messages
After sending P0/P1 alerts immediately, reset the variables so they are
excluded from the final consolidated ALL_ALERTS send at the end of the
script.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-19 09:23:47 +00:00
openhands
5632138cc3 fix: bug: supervisor never delivers disk alerts — crashes during PR scan (#252)
Send P0 and P1 alerts to Matrix immediately after detection, before
per-project checks run. Also guard check_project calls with || flog so
any API timeout or jq parse failure inside the per-project scan cannot
kill the script before alert delivery.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-19 09:16:56 +00:00
johba
e12bbbc0f2 Merge pull request 'fix: feat: supervisor auto-retriggers CI after infra-only exhaustion (#185)' (#248) from fix/issue-185 into main 2026-03-19 10:09:13 +01:00
openhands
97ffdca95c fix: address review feedback on escalation triage (#185)
- supervisor-poll.sh: check PR state before retrigger; discard stale escalations
  for closed/merged PRs instead of pushing to their branches
- supervisor-poll.sh: bump escalation ts to now on failed retrigger push, so
  the 30-min cooldown resets and alert flooding is avoided on persistent failures
- ci-helpers.sh: require at least one confirmed infra step before returning
  "infra"; prevents false-positive when all step names are empty strings
- ci-helpers.sh: clarify header comment to distinguish per-function requirements
- AGENTS.md: document classify_pipeline_failure() in ci-helpers.sh table row

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-19 09:03:03 +00:00
johba
b9ba5c9250 docs: agent design principles — determinism/judgment split (#240)
Design principle for all disinto agents.

## Core idea
Split every agent into two layers:
- **Bash orchestrator (thin, deterministic):** session lifecycle, worktrees, locks, phase monitoring
- **Claude via formula (fat, judgment):** understand task, implement, handle reviews/CI/merge, adapt to novel situations

## Why
Agent scripts grow by accretion — every lesson becomes another if/else in bash. Formulas are refineable, learnable, and generalizable. Bash state machines are not.

## Includes
- Design principle with clear split criteria
- "When reviewing, ask these questions" checklist
- Current state assessment for all 5 agent types
- Risk mitigations (phase protocol as safety net)

Reviewers and planner should be aware of this principle when assessing PRs and planning work.

Co-authored-by: openhands <openhands@all-hands.dev>
Reviewed-on: https://codeberg.org/johba/disinto/pulls/240
Reviewed-by: Disinto_bot <disinto_bot@noreply.codeberg.org>
2026-03-19 09:56:37 +01:00
openhands
47eccdb8ae fix: split case pattern so smoke test recognises ci_exhausted labels (#185)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-19 08:53:32 +00:00
openhands
051ff39144 fix: feat: supervisor auto-retriggers CI after infra-only exhaustion (#185)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-19 08:51:30 +00:00
johba
a4877b58db Merge pull request 'fix: Review verdict case mismatch: lowercase verdict submits COMMENT instead of REQUEST_CHANGES (#189)' (#247) from fix/issue-189 into main 2026-03-19 09:38:05 +01:00
openhands
c7a7d98e09 fix: Review verdict case mismatch: lowercase verdict submits COMMENT instead of REQUEST_CHANGES (#189) 2026-03-19 08:34:45 +00:00
johba
4a782528eb Merge pull request 'fix: dev-agent reads issue comments alongside body (#237)' (#241) from fix/issue-237 into main 2026-03-19 09:28:08 +01:00
openhands
7cf1d035e0 fix: use original issue body for dep parsing and PR recovery detection
Prevent human comments appended to ISSUE_BODY from causing false
positive dependency blocks or spurious 'Existing PR:' recovery matches
in parse-deps.sh and the PR recovery guard.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-19 08:25:02 +00:00
johba
e50d467172 Merge pull request 'fix: feat: supervisor cleans up orphaned tmux sessions + worktrees (#235)' (#239) from fix/issue-235 into main 2026-03-19 09:18:45 +01:00
openhands
1557c17e2f fix: address review: phase guard, tmux failure safety, paginated PR lookup (#235)
- Skip cleanup for sessions in needs_human/awaiting_ci/awaiting_review phases
- On tmux display-message failure skip session instead of defaulting to epoch 0
- Use paginated PR lookups (page loop checking page size, not match count)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-19 08:11:51 +00:00
openhands
d40a9c36c5 fix: dev-agent reads issue comments alongside body (#237)
Fetches issue comments via Codeberg API and appends human comments
to the issue body in the Claude prompt. Bot comments (Disinto_bot,
disinto-factory) are filtered out.

One API call, zero new dependencies.
2026-03-19 07:56:11 +00:00
openhands
d982b4592f fix: feat: supervisor cleans up orphaned tmux sessions + worktrees (#235)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-19 07:51:30 +00:00
johba
73e49d54ee Merge pull request 'fix: feat: action-agent — tmux + Claude + formula for operational tasks (#139)' (#236) from fix/issue-139 into main 2026-03-19 08:40:49 +01:00
openhands
4e56d14e6a fix: feat: action-agent — tmux + Claude + formula for operational tasks (#139)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-19 07:25:25 +00:00
johba
3fdd45f617 Merge pull request 'chore: planner update AGENTS.md tree' (#234) from chore/planner-agents-20260319 into main
Reviewed-on: https://codeberg.org/johba/disinto/pulls/234
2026-03-19 08:12:40 +01:00
openhands
6c458b43fb chore: planner update AGENTS.md tree 2026-03-19 07:05:40 +00:00
johba
e782119a15 docs: evidence architecture — sensing, integration, deployment gates (#207)
Captures design decisions from 2026-03-18 session with Johann.

## Key decisions
- **Evidence as integration layer**: formulas adapt external platforms (Analytics, Ponder, DigitalOcean) into structured JSON in `evidence/`; planner reads evidence, not platforms
- **Process types**: sense (holdout, user-test, measure-*) vs mutation (evolution, red-team)
- **Evidence-gated deployment**: no human "ship it" — all dimensions green = deploy
- **Resource allocation**: planner reads evidence staleness + current box load, decides what to run
- **Scope**: disinto is not a general company OS — it is finetuned for money → software → customer → knowledge → market fit

## New file
- `docs/EVIDENCE-ARCHITECTURE.md`

Co-authored-by: openhands <openhands@all-hands.dev>
Reviewed-on: https://codeberg.org/johba/disinto/pulls/207
Reviewed-by: Disinto_bot <disinto_bot@noreply.codeberg.org>
2026-03-19 07:55:21 +01:00
johba
e6eb9e76e0 Merge pull request 'fix: codeberg_api_all does not accept a custom token parameter (#198)' (#226) from fix/issue-198 into main 2026-03-19 02:29:14 +01:00
openhands
17907063f6 fix: codeberg_api_all does not accept a custom token parameter (#198)
Add optional second TOKEN parameter to codeberg_api_all in lib/env.sh,
defaulting to $CODEBERG_TOKEN. Pass $REVIEW_BOT_TOKEN at the dismiss
block in review-pr.sh so reviews are fetched as the review bot account.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-19 01:25:44 +00:00
johba
dfd4e00d34 Merge pull request 'fix: Callbacks can't see the resolved _session from monitor_phase_loop (#200)' (#225) from fix/issue-200 into main 2026-03-19 02:18:15 +01:00
openhands
e853949b47 fix: Callbacks can't see the resolved _session from monitor_phase_loop (#200)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-19 01:05:21 +00:00
johba
ba8bb5637e Merge pull request 'fix: dev/dev-agent.sh still passes string label name to /labels replace endpoint (#202)' (#221) from fix/issue-202 into main 2026-03-19 01:59:22 +01:00
openhands
54fa568935 fix: dev/dev-agent.sh still passes string label name to /labels replace endpoint (#202)
Look up the backlog label ID via the Gitea labels API (with fallback to
1300815) and replace '{"labels":["backlog"]}' with the integer ID form
at both call sites (cleanup() line 135 and idle_timeout handler line 713).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-19 00:45:57 +00:00
johba
bb6a026706 Merge pull request 'fix: fix: bundled dust cleanup — README.md (#208)' (#219) from fix/issue-208 into main 2026-03-19 01:38:51 +01:00
openhands
d24600a553 fix: fix: bundled dust cleanup — README.md (#208)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-19 00:35:45 +00:00
johba
eba88558f1 Merge pull request 'fix: fix: bundled dust cleanup — site (#209)' (#218) from fix/issue-209 into main 2026-03-19 01:28:11 +01:00