Skip to content

Plan 2: Build loop core (sequential)#1

Open
fernandoleyra wants to merge 11 commits intomainfrom
frinkloop/v0.2-build-loop
Open

Plan 2: Build loop core (sequential)#1
fernandoleyra wants to merge 11 commits intomainfrom
frinkloop/v0.2-build-loop

Conversation

@fernandoleyra
Copy link
Copy Markdown
Owner

Summary

Plan 2 of the FrinkLoop redesign — the autonomous build loop's spine. Sequential only; parallel fan-out is Plan 4.

  • Real stop.sh and post-iteration.sh hooks with state-aware control flow
  • lib/loop.sh — task-flow helpers (pick_next_task, mark_task_done, queue_fix_task, mark_milestone_done, active_milestone)
  • lib/verify.sh — per-task / per-milestone / final verification gates with qa.json artifact
  • lib/recovery.sh — dirty-tree detection + blocker on resume
  • New qa-result.schema.json (Draft-07)
  • Schema bump: state.last_iteration_at (optional)
  • Real bodies for mvp-loop skill, planner/builder/qa agents
  • Real frinkloop-resume and frinkloop-pause slash commands
  • Ralph-style invariant PROMPT.md template

11 commits, 65 tests passing (28 from Plan 1 + 37 new).

Test plan

  • CI/manual: npm install && bats tests/plan-1/ tests/plan-2/ → 65/65 pass
  • Visual: review the mvp-loop SKILL.md and confirm the per-iteration algorithm matches spec §9
  • Visual: confirm Stop hook exit-code convention (0 = exit, 2 = continue) is what Claude Code expects on this version (Plan 9 will harden this)

🤖 Generated with Claude Code

fernandoleyra and others added 11 commits May 1, 2026 01:25
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…fact

Adds verify_task (kind-driven, writes qa.json), verify_milestone, and
verify_final helpers. Adds qa-result.schema.json for artifact validation.
4/4 new tests pass; full suite 39/39, zero regressions.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…rol flow

stop.sh: exits 2 (continue loop) when status=running + pending tasks exist;
exits 0 for all terminal states or missing state. post-iteration.sh:
increments iteration_count and appends JSONL line via state.sh helpers.
6 new tests added (tests/plan-2/test_hooks.bats); full suite 44→50 green.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…aths

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
fernandoleyra added a commit that referenced this pull request May 1, 2026
This repo is now exclusively the source of the FrinkLoop Claude Code
plugin. The plugin lives at ~/.claude/plugins/frinkloop/ once installed,
and per-project state goes inside each project's own .frinkloop/ dir.

Removed:
- agents/, core/, memory/, config/, scripts/, templates/, projects/, logs/
- frinkloop.py (old python entrypoint), FRINKLOOP_PLAY.md
- pytest.ini, requirements.txt, .env.example
- legacy python tests in tests/test_*.py
- two mkdir-brace-expansion artifact dirs

Updated:
- CLAUDE.md rewritten to describe plugin-as-skill architecture
- .gitignore trimmed to plugin-relevant entries
- package.json test script switched to "bats -r tests/"

Verified: bats -r tests/ → 28/28 on main (Plan 1 surface).
PRs #1-#9 (Plans 2-10) remain stacked on their own branches.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.

1 participant