← ClaudeAtlas

fold-taskslisted

Folds open swarm ledger tasks that change the same code into one grouped task, so one agent delivers them in one pull request and the unfrozen task count drops. Code finds candidate groups, checks the fold plan and applies it with the ledger's task group command; the agent judges which candidates belong together. Use when the operator says "fold tasks", "fold-tasks", "merge duplicate tasks", "group these tasks", "too many open tasks", or when a master or dispatcher sees open tasks that touch the same code.
the-cloud-clockwork/agentihooks · ★ 1 · AI & Automation · score 67
Install: claude install-skill the-cloud-clockwork/agentihooks
# Fold Tasks `SLUG` is the ledger and `NAME` this session's agent name, as in every `agentihooks ledger` call. Every command below is `agentihooks ledger --slug SLUG --as NAME fold ...`. A fold makes the lead task carry each folded task's change as a numbered seam; the members leave the claim queue and return to it if the lead's agent stops. ## Steps 1. **Candidates.** Run `fold candidates`. It prints the pool size, the tasks left out by reason (frozen, in flight, planner chain, grouped, not code) and candidate groups: each task's card and every signal linking two tasks (shared territory, shared code names, title words). Done when the JSON is read. No group → report that nothing folds and stop. 2. **Judge.** Read each candidate's descriptions and territories, never titles alone. Keep a group only when its changes belong in one reviewable pull request; a shared broad folder alone is not enough. Drop an oversized member (a corpus for every detector, a whole new subsystem) rather than make a giant pull request; split a group when it holds two unrelated changes. Run `agentihooks scratch new` and write `plan.json` there: ```json {"groups": [{"lead": "ID", "members": ["ID"], "seams": ["one plain sentence per task, lead first"], "done": "plain sentence, or empty for the default"}]} ``` Seams and done are plain words read by the operator: no task ids, no paths, no dashes. Name the command, hook or behaviour instead. Done when every kept group is in the plan. 3. **C