Skip to content

autoresearch: tidy-up helper to pause and resume a campaign - #76

Merged
GiggleLiu merged 1 commit into
mainfrom
autoresearch-tidy-up
Sep 25, 2026
Merged

GiggleLiu merged 1 commit into
mainfrom
autoresearch-tidy-up

Conversation

@GiggleLiu

Copy link
Copy Markdown
Member

Resolves #66 as a pause, not an end state.

What it does

references/tidy-up.md + helpers/tidy_attempts.py, entered from the dispatcher on "tidy / pause / close" or offered when the user answers 0 at a soft gate.

  • inventory (read-only) lists every attempt-NNN worktree/branch with LOG.md hypothesis, validator status/score, uncommitted work, detected build artifacts, and push state, and decides per attempt: keep (has LOG.md, report.json, or code changes), drop (empty worktree), ask (changes but no LOG.md, or a >10 MB untracked file that matches no artifact pattern). Terminal output is counts plus the ask rows only; the full table goes to a JSON snapshot.
  • apply does the git work in bulk: ignores artifacts, commits each kept worktree on its own branch, pushes when a remote exists, removes the worktree directory; deletes dropped worktrees and branches; leaves ask rows alone until a second pass with --drop / --keep. Re-running on the same snapshot is safe.
  • record writes research/ATTEMPTS.md: STATE.md position, one row per attempt (kind, parent, status, score, branch, disposition pushed / local only / dropped, hypothesis, dropped rows kept from the snapshot), a local-only warning when there is no remote, and how to resume.

No new stage. STATE.md gains an optional last_tidy: date. attempt-protocol.md now says worktrees stay until a tidy-up; run.md's soft gate offers the tidy-up on 0.

Verification

tests/test_tidy_attempts.py builds a fixture repo with four worktrees (scored with an artifact and an uncommitted edit; validator error; code without LOG.md; empty), with and without a bare remote. It checks classification, the commit/ignore/push/remove behaviour, the untouched ask row, the idempotent second pass, the record contents including the dropped row and local-only warning, and the CLI summary.

python3 scripts/validate_skills.py   # 16 skills OK
pytest -q                            # 299 passed

🤖 Generated with Claude Code

Add references/tidy-up.md and helpers/tidy_attempts.py. The helper
inventories every attempt worktree/branch, decides keep/drop/ask by rule,
packs kept attempts onto their own branches (build artifacts ignored,
pushed when a remote exists, worktree removed), deletes empty ones, and
writes research/ATTEMPTS.md with each attempt's hypothesis, validator
outcome, and disposition. Only genuinely uncertain rows are batched into
one question at the end. The stage is unchanged so the campaign resumes
from the soft gate; STATE.md gains an optional last_tidy date.

Closes #66

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@GiggleLiu
GiggleLiu merged commit 855fd57 into main Sep 25, 2026
1 check passed
@GiggleLiu
GiggleLiu deleted the autoresearch-tidy-up branch September 25, 2026 06:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support closing unresolved autoresearch campaigns

1 participant