AI decomposition
tkt plan begin plans an epic and stories from docs; you, the coding agent, do the AI work, one step at a time.
tkt checks, gates and writes only what the user approved; it never calls an LLM.
$ tkt plan begin export-spec -g payments --out step.json
Do each step in step.json, then tkt plan submit <dcmp> --step <id> FILE --out step.json. Kinds:
llm- do it to the
schema;question: see questions. fix- fix every
errors[]item, resubmit the whole step under its new id (ERR_DECOMPOSITION_SUBMIT_INVALID; 3rd invalid:failed). ready- show the preview (tickets, assumptions, excluded and shared sections, digest);
tkt plan apply <dcmp> --approve <digest>only after approval. stopped- a source or the method changed (
ERR_DECOMPOSITION_STALE): onlytkt plan discard <dcmp>.
Lost: tkt plan list, then tkt plan step <dcmp> --out step.json. A doc costs about 2 agent runs and 15k-28k output tokens; doc text per decomposition is at most 400 KB.
--replan) writes new ones beside them #168Details8 items
-
begin: doc ids or globs,-g G,--skip GLOB,--method(methods); the group check runs first. Refused: too much text (MAX_DOC_BYTES,ERR_PAYLOAD_TOO_LARGE: begin per doc), no H2s (ERR_BODY_SECTION_MISSING), unknown method (ERR_NOT_FOUND), planned or open docs without--replan(ERR_DECOMPOSITION_APPROVAL). Createsdcmp-<ULID>;from-docsthen skips the doc. -
Always
--out(begin,step,submit): steps hold the whole doc and method; stdout isstep slice-1 llm → step.json. Wrong step:ERR_DECOMPOSITION_STEP_MISMATCH, no strike. -
Stages:
sliceper doc (aitodo.plan.slice.v1: each H2, or a split H2's H3s, once as source or excluded; ≤ 20 units),writeby 4 (aitodo.plan.write.v1: ≤ 2 sentences per section, Given-When-Then, body < 600 tokens, no 20-word copy, refs{ref, anchor?, lineRange?, why}, a repolineRangeN-Mstored asL<N>-L<M>),check(strict gate), repairs, round 2. Exact rules come in the step. -
tkt plan show <dcmp>: preview (withexcluded[],shared[]) or progress;--out(ready) writes an import file bypassing gate and approval.apply(ready; bad digest, or assumptions without--accept-assumptions:ERR_DECOMPOSITION_APPROVAL) regates (--force), then imports all or nothing: epic per doc,featureper story,task/bug/choreper sibling, provenance refs withmethodRev(story-writer@1.10.0#<hash12>),note: methodrefs, aPlanned by dcmp-…note.--approve,--accept-assumptions,--forceonly on the user's say;discarddeletes only the state. -
State
.aitodo/decompositions/(ignored); on a server store forwarded, any writer continues it.tkt plan list:createdBy,lastBy,updatedAt, age. Names: token name; repo store:user.name, else$USER, elseunknown.tkt store moverefuses while one is open (ERR_CONFIRM_REQUIRED;--force-decompositionsdrops them). -
Measured once: 17-67 KB doc, 2.5-4.5 minutes, about $2-3.5 API-equivalent (subscription: usage limits). Permission:
"ask": ["Bash(tkt plan apply:*)"]. -
A step file (
tkt plan step --out):{decomposition, step: {id, stage, kind, attempt, instructions, method, inputs, schema, submit}};fixaddserrors[] {unit?, path, rule, evidence},previous;failed{reason, lastErrors, next}. -
tkt plan show --json:submissions[](step,by,at,valid).
Commands on this page#
tkt plan beginBegin an AI decomposition of docs into an epic and stories, driven by your coding agent→
tkt plan submitSubmit a step's result; prints the next step, or a fix step with the errors (exit 1)→
tkt plan stepPrint the current step again, in full with the method text (after a lost context)→
tkt plan listList the open decompositions: id, docs, state (stale when a source changed), step, age, and who began it and acted last (on a server store any member can continue one)→
tkt plan showShow the preview of a ready decomposition (tickets, gate, assumptions, doc gaps, the approval digest), else its progress; also when stopped or stale (read-only)→
tkt plan applyWrite a ready decomposition the user approved: the strict gate runs again on the current store, then the all-or-nothing import; the decomposition's state is deleted→
tkt plan discardDiscard a decomposition (its state only; nothing was written to the store)→