aitododocs Coming soonAutonomous delivery

AI decomposition

Markdown

tkt plan begin plans an epic and stories from docs; you, the coding agent, do the AI work, one step at a time.

Guideabout 5 min7 commands
On this page

tkt checks, gates and writes only what the user approved; it never calls an LLM.

Terminal
$ 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): only tkt 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.

Known limit: Re-planning a doc that already has tickets (--replan) writes new ones beside them #168
Details8 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). Creates dcmp-<ULID>; from-docs then skips the doc.

  • Always --out (begin, step, submit): steps hold the whole doc and method; stdout is step slice-1 llm → step.json. Wrong step: ERR_DECOMPOSITION_STEP_MISMATCH, no strike.

  • Stages: slice per doc (aitodo.plan.slice.v1: each H2, or a split H2's H3s, once as source or excluded; ≤ 20 units), write by 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 repo lineRange N-M stored as L<N>-L<M>), check (strict gate), repairs, round 2. Exact rules come in the step.

  • tkt plan show <dcmp>: preview (with excluded[], 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, feature per story, task/bug/chore per sibling, provenance refs with methodRev (story-writer@1.10.0#<hash12>), note: method refs, a Planned by dcmp-… note. --approve, --accept-assumptions, --force only on the user's say; discard deletes 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, else unknown. tkt store move refuses while one is open (ERR_CONFIRM_REQUIRED; --force-decompositions drops 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}}; fix adds errors[] {unit?, path, rule, evidence}, previous; failed {reason, lastErrors, next}.

  • tkt plan show --json: submissions[] (step, by, at, valid).

Commands on this page#

Generated from the registry: src/aitodo/api/selfdoc_entries/plan.py · plan.decomposev0.1.298