Skip to content

reference-impl v0.6.0

Choose a tag to compare

@renatodarrigo renatodarrigo released this 25 Apr 02:36
· 884 commits to main since this release

0.6.0 — 2026-04-24

First feature release after the CLV-15 / cross-browser-UI-review line of
patches. Introduces an autonomous DAG walker that drives a Plan's task_dag
through Delivery concurrently.

Added

  • /cloverleaf-run-plan <PLAN-ID> skill — autonomous DAG walker.
    Reads an approved Plan, computes ready tasks, spawns one claw-drive
    Session B per ready task (default max_concurrent: 3, configurable via
    --max-concurrent=N), monitors them, surfaces only escalations and
    per-task final-gate approvals to the human. Resumable across
    invocations. --reset flag to wipe walk-state and start over. Each
    task runs in a dedicated git worktree (/tmp/walker-<PLAN-ID>-<TASK-ID>)
    so parallel Sessions don't race on HEAD; the walker itself performs
    the final git merge --no-ff on main in the primary repo after human
    approval. Session B does NOT invoke /cloverleaf-merge in walker mode.
  • lib/dag-walker.ts — computeReadyTasks(plan, walkState, maxConcurrent)
    pure function for DAG scheduling; detectCycle(plan) Tarjan-style cycle
    guard.
  • lib/walk-state.ts — atomic read/write of
    .cloverleaf/runs/plan/<PLAN-ID>/walk-state.json.
  • Four new cloverleaf-cli subcommands: dag-ready-tasks,
    dag-detect-cycle, walk-state-read, walk-state-write. The walker
    skill body invokes these to bridge bash to the TypeScript library.
  • scripts/acceptance-walker.sh (run via npm run acceptance:walker) —
    release-gate harness for the walker's data plane. Synthesises a tmp
    Cloverleaf consumer repo with a 3-peer Plan and exercises the seven
    CLI/walk-state behaviours that compose the walker's tick loop: cycle
    detection on clean Plan, dag-ready-tasks at full and capped concurrency,
    walk-state write+read round-trip, slot-accounting against a running
    task, all-merged exit set, and cycle detection on a 2-cycle Plan. No
    Claude tokens consumed; complements the manual dogfood for full
    Session-orchestration validation.

Changed

  • /cloverleaf-merge skill gains a Q&A affordance at the final-gate
    prompt. Users can ask clarifying questions (which get answered from
    pipeline context and re-prompted) before giving the y/N verdict.
    Only y/Y/yes/YES proceeds to merge; n/N/no/NO declines. Any other
    response is treated as a question. The walker depends on this
    behaviour, but manual merges get the same affordance as a side-effect.
  • Event filenames scoped per work item (<workItemId>-<NNN>-<type>.json
    instead of the old global per-project <PROJECT>-<NNN>-<type>.json).
    The global counter collided across parallel Delivery worktrees at
    merge time. Per-work-item scoping makes sibling-task events unique by
    construction so they merge cleanly. lib/ids.ts::nextEventId(repoRoot, workItemId) is the new signature; the previous (repoRoot, project)
    form is replaced.

Tests

547 tests passing, up from 506 in v0.5.5. New suites:

  • tests/dag-walker.test.ts — 13 tests (9 for computeReadyTasks, 4 for
    detectCycle).
  • tests/walk-state.test.ts — 7 tests (path construction, round-trip,
    atomic write, tmp-file cleanup, malformed JSON).
  • tests/cli.test.ts — +4 tests for the new walker subcommands.
  • tests/skills.test.ts — +13 tests asserting /cloverleaf-run-plan
    skill-body shape + 3 tests for the /cloverleaf-merge Q&A loop.

Compatibility

  • Standard stays at 0.4.1. No schema, contract, or state-machine changes.
  • Existing /cloverleaf-run <TASK-ID> unchanged. The walker invokes it
    per-task inside each Session B.
  • The /cloverleaf-merge change is additive — existing y/Y/yes/YES
    and n/N/no/NO responses continue to work exactly as before. Only
    arbitrary text was previously treated as decline; now it's a question.