How Council works
Council is the mode where Tuffcode argues with itself before you see a diff. A planner writes the task list, workers run in parallel inside isolated worktrees, a reviewer scores the result, and the plan waits for your approval before anything starts.
Most coding agents run one model in one conversation. That works until the task is bigger than a single context window, or until you want a second opinion before code lands. Council is built for those two cases.
The four roles
Every subagent type in Tuffcode has its own prompt, its own model and its own tool profile. A cheap explorer does not burn the same model as a worker, and a reviewer cannot edit the files it is judging.
| Role | Job | Can touch |
|---|---|---|
| planner | Decompose the goal into a JSON task list with owned paths. | Read, glob, grep, read-only shell |
| worker | Implement and verify one task. | All tools, writes confined to its worktree |
| reviewer | Judge the diff against the brief with a nine point rubric. | Read, glob, grep, read-only shell |
| notetaker | Extract durable facts and write them to memory. | Read, glob, grep, memory tools |
The tool profile is enforced twice: the schemas sent to the model only list the tools the role may use, and the policy refuses a call outside the profile with an error that names the allowed tools, so the model can recover instead of ending the turn.
The flow, step by step
-
You write a goal
Switch the thread to Council and describe the change in one or two sentences. This is a goal, not a prompt. "Document the answer constant and re-export it" is enough.
-
The planner writes a plan
The planner reads the repository and returns a task list. Each task names the files it owns. If two tasks claim overlapping paths, the plan is rejected before any worker starts, because that is how parallel branches turn into merge conflicts.
-
You approve the plan
The board shows the plan with its tasks and owned files, and waits. Approve it, or write a note and send it back for a revision. Nothing runs until you decide.
-
Workers run in parallel
Each task gets its own git worktree and its own branch, so two workers can edit different files at the same time without touching your checkout. The board shows every node as queued, running, passed, failed, blocked or cancelled.
-
Review, then report
The reviewer scores each diff against the brief. The report lists what changed, what passed, what was reverted and why. A goal that fails says so with the provider error text, not just a red badge.
-
Ship it
Read the diff line by line, comment on a line, commit, push, and open a draft pull request from the same thread. Worktree threads get the full path, including Create PR.
Why worktrees matter
A worktree is a real checkout on its own branch, sharing one object database with your repository. That gives you three things a shared folder cannot:
- Parallel edits without collisions. Two agents can write at once because they are not writing to the same directory.
- A clean abort. If a task goes wrong, delete the worktree. Your checkout was never involved.
- A reviewable unit. The diff of one worktree is one task, which is exactly the size a reviewer can judge.
Threads that do not need isolation run in the project folder instead, and still get diff, checkpoints and commit.
Modes and permissions
Council is one of three modes. Work is a normal agent thread. Plan investigates and writes a plan without editing. Council adds the planner, the parallel workers and the reviewer.
Underneath, every tool call passes a permission mode: read only, ask, accept edits, or full auto. Council starts goals in manual autonomy unless you change the default, so the plan always parks for approval.
Memory across sessions
Council reads from the same memory the rest of the app uses. Facts, standing rules and decisions are stored as typed entries with a graph of links, retrieved by relevance under a token budget, and injected with the reason they were included. A notetaker subagent can write to memory during a run, and you can read or edit every entry yourself.
That is why a second Council run on the same repository starts with context the first run learned, instead of starting as a stranger.
When Council is the wrong tool
If the change is one file, or you already know the exact edit, use Work. Council adds planning and review overhead that only pays for itself when the task has more than one step, when two models should disagree, or when you want the plan in writing before anyone touches the tree.