symcc

Task kinds, each with its own workflow (epics as one kind) #

Decision 2026-11-17: the owner chose not to build per-kind workflows (overcomplicated for symcc); steps 2-4 were built and then removed in T-348. Kinds stay labels; a single optional checker before merge (T-349) replaces the workflow stages.

Short answer. Every task already has a kind (after T-328: change, bug, feature, refactor, docs, investigation, each a file in kinds/ or .symcc/kinds/). This design gives each kind a workflow: an ordered list of stages written in the kind's file. A stage is a worker run, an automatic check, an approval (gate), or (for an epic only) a set of child tasks. One task keeps one row, one branch and one folder; each worker stage is a fresh worker in that same folder. epic is one more kind: its spec is the plan, its children are normal tasks, and it ends with an acceptance check of the whole feature.

This doc is a design, not code. It names the real files and functions it changes, as they are at commit 06d327b, plus T-328 (kinds as files), which is now merged. Anything I could not confirm is marked (guess).


0. How symcc works today (what this builds on) #


1. The kind file format #

A kind is one text: kinds/<name>.ts in the plugin (T-333; kinds/index.ts exports BUILT_IN_KIND_TEXTS), or the Markdown file .symcc/kinds/<name>.md in the project (the owner's copy wins, like roles; today's kinds/ folder has change, bug, feature, refactor, docs and investigation, and epic is added by build step 8). The front matter is read by the lead to choose; the body is the list of stages.

Front matter #

KeyNeededMeaning
descriptionyesOne line the lead reads to pick the kind (from T-328)
mergesno, default yesno = nothing is committed or merged (today's investigation)
merge_testsno, default yesno = the final merge skips the test command when every changed file is a doc file (isDocFile, review.ts:49); if any code changed, tests run anyway
offnoLike roles: the lead never picks it for a new task

Stages #

Each stage is a ## <name> heading, then a few key: value lines, then free text: the stage's instructions for the worker (only worker stages use the text). Stage names are short words (letters, digits, -); they show on the board.

Exactly one of these keys says what the stage is:

KeyValuesWhat runs
worker:a role name, or task (the task's own role)A fresh worker in the task's folder
check:tests, scope, new test fails on old code, no test files changed, or run: <shell command>symcc itself, no model
gate:owner or leadWaits for an approve or reject
children:from specEpic only: waits for its child tasks

Optional keys:

KeyMeaningDefault
files:task (the task's files) or tests (only test files inside the task's files, by isTestFile, review.ts:29) or spec (only the epic's spec file)task
on fail:back to <stage>, <N> times; after N, the task goes to failed and the lead is told (it asks the owner if it can't decide)a check goes back to the worker stage just before it, auto_retries times; a worker stage that fails has no automatic go-back (today's behavior: failed)
minutes:this stage's time limit for a workerthe board's max_minutes
model:overrides the role's model for this stagethe role's

Every merging kind ends with a built-in merge step that is not written in the file: today's checkAndMerge (commit, scope, bring up to date, tests, merge). It shows on the board as merge. A check stage that already ran the tests on the same commit means merge doesn't test again, unless the target branch moved (this is today's testsRun rule in upToDateTestMove).

A file that can't be used (no description, unknown stage key, on fail naming a stage that doesn't exist, a loop with no count, a children: stage outside epic) is skipped with a note, the same way a broken role file is (skippedRoleNote, roles.ts:96).

The built-in kinds, in full #

kinds/change.ts (the default; today's flow exactly)

---
description: any change to the project that fits no other kind; one worker, then tests and merge
---
## code
worker: task
Do the task.

## tests
check: tests
on fail: back to code, 2 times

kinds/bug.ts

---
description: something is broken; first prove it with a test that fails, then fix it
---
## reproduce
worker: tester
files: tests
Write a test that shows the bug: it must fail on the code as it is now, for the reason in the
task. Don't change any code that isn't a test. Say in your report which test shows the bug.

## fails-first
check: new test fails on old code
on fail: back to reproduce, 2 times

## fix
worker: task
Make the test from the reproduce stage pass without weakening it. Change the code, not the test.

## tests
check: tests
on fail: back to fix, 2 times

kinds/feature.ts

---
description: new behavior; build it with tests, then a fresh worker tries to break it
---
## code
worker: task
Build the feature and add tests for it.

## tests
check: tests
on fail: back to code, 2 times

## break
worker: checker
files: tests
Read the diff of this task against the branch it merges into. Try to break it: edge cases,
error paths, what the task says must still work. Add tests that fail where it is wrong. If you
find nothing, change nothing and say so.

## tests-again
check: tests
on fail: back to code, 2 times

(checker is a new built-in role, roles/checker.md: "tries to break a change by writing tests; never changes code". It needs no web.)

kinds/refactor.ts

---
description: cleaner code with the same behavior; the tests must pass without being changed
---
## code
worker: refactor
Make the change the task asks for. Don't change what the code does.

## same-tests
check: no test files changed
on fail: back to code, 1 time

## tests
check: tests
on fail: back to code, 2 times

kinds/docs.ts

---
description: documentation only - README, guides, comments; no tests run when only docs changed
merge_tests: no
---
## write
worker: docs
Write or fix the docs the task is about.

kinds/investigation.ts (today's behavior)

---
description: an answer for the owner, not a change; nothing is committed or merged
merges: no
---
## research
worker: researcher
Find the answer and hand it back in full.

## read
gate: owner

kinds/epic.ts (section 5 explains it)

---
description: a big feature that needs a written plan and several tasks; the owner approves the plan first
---
## spec
worker: planner
files: spec
Write the spec at the path in the task: goal, behavior, edge cases, what must not change,
how we know it works, and the task list (title, kind, role, files, after for each).

## approve-spec
gate: owner

## build
children: from spec

## accept
worker: checker
files: tests
Check the whole feature on this branch against the spec. Add acceptance tests for what the spec
promises. List every gap in your report.

## accept-tests
check: tests
on fail: back to build, 2 times

## approve
gate: owner

(planner is a new built-in role, roles/planner.md: reads the code like researcher but has no web and writes only the spec.)


2. How a stage runs and hands off #

What is stored on the task #

New fields on BoardTask (hooks/core/board-file.ts:90), cleaned in cleanTask:

The loop #

A new pure function nextStage(kind, task, result) in a new hooks/core/stages.ts says what comes next: the next stage, a go-back (on fail), failed, or the merge step. All the I/O stays in workers.ts:

  1. pump / startWorker start a worker only when the task's current stage is a worker: stage.
  2. finishWork keeps its order (question → waiting, refused edit → waiting, stopped, error). Only the "finished" branch changes: for a merging kind it commits (commitTry, review.ts:180) and runs the scope check for that stage's files:, then calls runStages, a new function that runs check stages one after another in the task's folder until it reaches a worker stage (the task goes back to todo with stage set, and the next pump starts a fresh worker), a gate (the task waits), or the end (the merge step, today's checkAndMerge + settle).
  3. Failing a check: if the stage has on fail and backs[stage] is under its count, the task goes to todo at the named stage, with the check's output saved (today's test_output field, renamed to check_output, so any check can feed the next worker). Otherwise failed and the lead is told, like today's "still failing" path in settle.

What the next worker gets #

The prompt (WORKER_PROMPT) gains two placeholders, added to both prompts in hooks/core/prompts.ts (PROMPT_PLACEHOLDERS):

Time limits and retries per stage #


3. The built-in checks in practice #

All run in the task's folder after symcc committed the stage's work, through $.process.run(['/bin/sh','-c', cmd], { cwd }), as tests do now (review.ts, in upToDateTestMove). Today's test loop is pulled out into runTests($, dir, cmds) so both the tests check and the merge step use it.


4. Gates: owner and lead #

How they work #

The board mode #

Keep the board-wide mode (off / review / auto) and needs_review. They mean: "add an owner gate just before merge". So:

Why keep it: the m key and /symcc-mode are the owner's quick "I want to see everything for a while" switch. Kind gates are about what a kind needs; the mode is about what the owner wants today. They add up and never clash.

tests_with_changes: review (untestedChange, review.ts:58) also stays: it adds the same owner gate for code with no test.


5. Epics #

Id: T-n with kind epic #

An epic is T-12 with kind: epic, not E-12. Why:

Spec file #

docs/specs/T-12-<slug>.md (slug from the title, the same way noteTopic in task.ts makes research note names). It is the epic's only file during the spec stage (files: spec). It stays in the project after the epic is done: later tasks and people can read why the feature is built the way it is.

The stages #

  1. spec: the lead writes what it knows from the chat into the epic's details (goal, what the owner said, limits). A planner worker reads the code and writes the spec file: goal, behavior, edge cases, what must not change, how we know it works, the task list with kind, role, files and after for each.
  2. approve-spec (owner gate): the owner reads the spec (Enter on the epic shows it). Reject with a reason: a fresh planner rewrites it.
  3. build (children): the lead is woken: "T-12's spec is approved: add its tasks with symcc add and parent: T-12". The stage passes when the epic has at least one child and every child is done. A child that is failed or dropped keeps it waiting, and the lead is told (the same as a stuck after in the board health check, hooks/core/health.ts).
  4. accept: a fresh checker in the epic's folder (now at the merged epic branch) tests the whole feature against the spec and adds acceptance tests.
  5. accept-tests: runs the tests. If they fail, the epic goes back to build: the lead gets the checker's report and adds child tasks for the gaps; when those are done, accept runs again. At most 2 times, then the epic fails and the lead asks the owner.
  6. approve (owner gate), then the merge step merges symcc/T-12 into the owner's branch with today's checkAndMerge. The epic is done; its children were already done.

Dropping an epic asks the lead what to do with open children (drop them too, or free them by moving their merge_into to the owner's branch). It never drops them by itself.

Who decides it's an epic #

The lead, from its instructions (hooks/plugin/tools.ts, around line 275): "use epic when the request needs 4 or more tasks, or the owner should agree on behavior before work starts". A scout may say "this looks like an epic" in its report; the lead decides.


6. Board, panel, commands and lead tools #

Board row #

Today the row's right side is the kind tag and role (roleTag, kindTag, hooks/core/panel.ts:106-109). It becomes the kind and a stage strip:

T-5   Login fails with spaces      bug · reproduce ✓ · fix ▶ · merge
T-7   Export button                feature · code ✓ · break ▶ · merge
T-9   Is the cache worth it?       investigation · research ✓ · read ◆
T-12  CSV export                   epic · spec ✓ · build 3/6 ▶ · accept · merge
        T-13  Export endpoint      change · done
        T-14  Export button        feature · code ▶

Task page #

A Stages section: each stage, its result, its try and report, how many go-backs are left. For an epic: the spec (first lines, and its path) and the children list.

Lead tools and slash commands #


7. Migration from today's board #


8. Costs #

Each worker stage is one worker run (the biggest cost: tokens and minutes). Checks cost only test time. Gates cost nothing but waiting.

KindWorker runs when all goes wellTest runs
docs10 when only docs changed
change11
refactor11
investigation10
bug23 (fails-first, tests, again at merge on the base)
feature2 (code, break)2 to 3
epic2 (spec, accept) + each child's costper child, plus accept

Every go-back adds one more worker run. A feature whose checker finds a gap costs at least 3.

The lead chooses by its own judgment (decision 1), and uses change for small fixes. It is today's flow, the cheapest kind that still runs the tests. The lead picks bug when there is a clear wrong behavior to prove, and feature when it is new behavior worth a second look.


9. Decisions #

The owner answered the open questions on 2026-11-17.

  1. Cost. The lead picks bug or feature by its own judgment, not only when the owner asks. It uses change for small fixes.
  2. A checker test that expects the wrong thing. The code worker may say in its report that the test is wrong. After 2 go-backs the lead decides. There is no extra lead gate.
  3. Running only the new tests. Yes, as an option: run: may use a {files} placeholder. Without it, the full test command runs.
  4. The second fails-on-base run at merge. Yes, it is done (one extra test run per bug).
  5. Epic branch. The epic keeps its own branch symcc/T-n. Children merge into it, and it merges into the owner's branch only after the owner accepts the epic (section 5).
  6. Who writes the spec. A planner worker writes the spec file, from the details the lead gives (section 5).
  7. Review mode and epics. In review mode each child waits for the owner too, because children are normal tasks.

10. Build plan #

T-328 (kinds as files, all still one stage; merged), T-329 (symcc kinds tool and Kinds view) and T-330 (docs) are already on the board, so this plan starts at step 2. All of it touches hooks/plugin/workers.ts and hooks/plugin/review.ts, so it must land before the Host refactor (T-240..T-246, backlog), which changes the same files. Each task lists tests/ (the memory rule). Each step's tests run in claude plugin test ., the project's test command.

#TitleFilesAfterHow it is tested
2Kinds: read stages from the kind filenew hooks/core/stages.ts, hooks/core/kinds.ts and hooks/plugin/kinds.ts (T-328's kinds parser), kinds/*.ts (each still one worker stage + tests), tests/T-328New tests/stages.test.ts: every built-in kind file parses into the expected stage list; files with an unknown key, a bad on fail target, children: outside epic are skipped with the right note; the merge step is added for merges: yes
3Multi-stage workflows: stage on the task, run stages in order, on fail go-backshooks/core/board-file.ts (stage, stages, backs, check_output, migration in migrateTask), hooks/core/stages.ts (nextStage), hooks/plugin/workers.ts (finishWork, runStages, settle, WORKER_PROMPT), hooks/core/prompts.ts + prompts/*.ts ({{stage}}, {{earlier_stages}}), hooks/core/roles.ts (tryLabel), hooks/plugin/git.ts (copyReports from stages), tests/2Unit tests of nextStage (pass, go-back with count, go-back used up → failed). A run test in the style of tests/merge.test.ts with a test-only two-worker kind: two fresh workers run in the same folder, the second prompt names the first report, there is one merge. Migration test in tests/board.test.ts: a review change and a todo change get the right stage
4Stages: per-stage time limit and retrieshooks/core/task.ts (timeLimitOf), hooks/plugin/workers.ts (timedOut, askOvertime), hooks/core/settings.ts (onTestFail takes the stage count), tests/3Tests: a stage with minutes: 5 asks for more time at 5 minutes, not max_minutes; a tests check with on fail … 1 time fails on the second failure while auto_retries is 2
5Gates: owner and lead, and the board mode as an added owner gatehooks/core/review.ts (needsReview → gatesFor, reviewTask, rejectTask), hooks/plugin/workers.ts (approve), hooks/plugin/tools.ts (approve/reject text, lead rules), hooks/core/panel.ts (statusCell: lead check), tests/3Tests: a lead gate wakes the lead and doesn't show under NEEDS YOU; the lead's approve moves to the next stage; review mode adds exactly one owner gate before merge and none for investigation; reject goes back to the worker stage before the gate
6Built-in checks: tests, scope, no test files changed, new test fails on old code, run:hooks/plugin/review.ts (pull runTests out of upToDateTestMove; new checkStage), hooks/core/review.ts (pure parts: which files are new tests, does the output name them), hooks/plugin/git.ts (throwaway worktree at base), tests/3Tests with a real git repo from tests/project.ts: a new test that passes on old code fails the check; one that fails passes it; a typo test that fails without naming its file fails it; a refactor diff that edits a test file fails no test files changed; the throwaway worktree is gone afterwards, also when the test command times out
7Built-in kinds with their real stages, and the checker and planner roleskinds/bug.ts, kinds/feature.ts, kinds/refactor.ts, kinds/docs.ts, roles/checker.md, roles/planner.md, hooks/core/roles.ts (BUILT_IN_ROLES), hooks/plugin/tools.ts (when to pick which kind), tests/4, 5, 6Tests: each built-in kind parses as written in section 1; a bug task runs reproduce → fails-first → fix → tests → merge with fake workers; docs with only .md changes runs no tests, with a .ts change runs them; tests/help-lead.test.ts checks the lead's kind advice
8Epic kind: parent, epic branch, children stage, spec, acceptancekinds/epic.ts, hooks/core/task.ts (parent in addTask / patchTask, spec path), hooks/core/board-file.ts (parent), hooks/plugin/workers.ts (children stage, bring epic branch up to date), hooks/plugin/git.ts, hooks/core/health.ts (a failed child), hooks/plugin/tools.ts (parent on add/change, epic rules), tests/7Tests: a child gets merge_into: symcc/T-n and starts from it; build passes only when all children are done and at least one exists; a failed child tells the lead once; failing accept tests send the epic back to build and wake the lead; the epic merges its branch into the owner's branch at the end
9Board view: stage strip, epic progress and fold (with backlog idea T-51)hooks/core/panel.ts (rowExtra, roleTag, statusCell, fold), hooks/plugin/ui/list.tsx, hooks/plugin/ui/task-page.tsx (Stages section), hooks/core/details.ts, tests/3, 8tests/pane.test.tsx: the rows in section 6 render as shown, the strip shrinks to the current stage on a narrow panel, an epic folds and opens, children aren't listed twice
10Docs: kinds and workflows in the guidedocs/guide.md, README.md, CHANGELOG.md7, 8, 9Docs only; tests/help-lead.test.ts still passes

Steps 4, 5 and 6 can run side by side once 3 is done if they keep to their files; they all touch workers.ts, so the lead should chain them with after unless it splits the edits cleanly.


What I couldn't check #

T-328 is merged. Its real names: hooks/core/kinds.ts, hooks/plugin/kinds.ts and the built-in kind files (now kinds/<name>.ts, since T-333) (no epic kind yet).

Add build step 2 behind T-328 (now merged), and steps 3 to 10 chained with after as in the table.