aitododocs Coming soonAutonomous delivery

Docs and gotchas

Markdown

The store's docs and gotchas (doc://<id>, gotcha://<id>) are edited in place, never with sed: every byte outside the edited part stays.

Conceptabout 7 min24 commands
On this page
  • Docs: tkt doc append (a row or an item: it joins the table or list), tkt doc section set|append, tkt doc replace.
  • Gotchas: the body tkt gotcha edit <id> --file new.md, one section tkt gotcha section set|append; every command prints a severity change.
  • Give every doc and gotcha a --description: a ref carries it even as a pointer.
  • Who references it: tkt doc refs <id> (also tkt gotcha refs): every kind; via says how: own ref, affects, mention (not bound if nothing binds it), inherited group:<id>/epic:<id>, appliesTo, or derived via SG-2 (a milestone or release, through a member); all: tkt gotcha list --refs.
Details7 items

doc append: scope --section H (see Sections) or the whole doc; no blank line before it, --new-block adds one. A text of only table rows (| … |) goes under the scope's last table even when a list follows; --table N picks another; a wrong cell count or table: ERR_TABLE_INVALID, nothing written. --after "<text>" inserts after the one line containing it. The frontmatter stays byte for byte except timestamp: when there is one, tkt doc append|replace, tkt doc section set|append and tkt gotcha edit|section set it to now, in UTC, whenever they change the body. doc replace: swaps an exact text that occurs once (--old, --new / --new-file; --new "" deletes); 0: ERR_TEXT_NO_MATCH, more: ERR_TEXT_AMBIGUOUS. --text and --file exclude each other; for Markdown with backticks use --file - with a heredoc.

Sections: --section H, tkt doc section set|append and tkt gotcha section set|append find the full heading at any level (H2 to H6), like the --anchor of tkt doc get; ### H keeps one level, ## H (2) is the second ## H. A section ends at the next heading of its level or higher. A title at two levels: ERR_BODY_SECTION_AMBIGUOUS; a short form (10.2): ERR_BODY_SECTION_MISSING; both list the exact forms, nothing written. Only a heading found nowhere is created, at the end, at its #s' level (## by default).

new / edit: an existing id is ERR_ID_DUPLICATE unless --force (tkt doc new --force overwrites all; tkt gotcha new --force replaces the body and keeps the fields not given). edit writes only the fields given, '' clears one; a severity change prints severity critical → warn. A doc's --description (300 chars) is its summary when the budget runs out; tkt doctor flags a bad path (ERR_APPLIES_TO_INVALID) and an unknown group.

Groups: the body tkt group section set|append, whole with tkt group edit <id> --file body.md; tkt group get --raw prints the whole file; tkt group edit merges the anchor field by field (--no-repo-anchor clears it), --body / --file replace the whole body; tkt group delete deletes a non-empty group only with --force. Never hand-write _group.md.

get: a plain tkt doc get <id>, tkt gotcha get <id> or tkt group get <id> prints the header and metadata lines, then the whole body verbatim: no markup is read ([x] stays), nothing is wrapped. For a group that is every section of the descriptor; --raw adds the frontmatter.

  • Metadata of tkt doc new|edit and tkt gotcha new|edit: --type (docs: concept, howto, reference, decision, plan), --title, --description, --tag, --timestamp, --applies-path, --applies-keyword, --applies-group. tkt gotcha edit --json: severityChange {from, to} or null.
  • The Referenced by block of tkt doc get and tkt gotcha get names five per kind, the rest as +N more with the refs command; --json referencedBy is the whole list, as the refs command's --json (with shownAs, unbound, derived).

Commands on this page#

tkt doc newCreate a managed doc (an existing one only with --force), with optional metadata→ tkt doc editChange a doc's metadata (type, title, description, tags, appliesTo); the body stays→ tkt doc deleteDelete a managed doc→ tkt doc appendAppend to the doc (or a section at any heading level)→ tkt doc replaceReplace one exact, unique text in the doc (e.g. its status line)→ tkt doc getShow a managed doc, or with --anchor the table rows / section a ref with that anchor delivers→ tkt doc listList all managed docs→ tkt doc refsList the tickets and groups that reference a doc, and how (contextRef, requiredReading, mention, inherited from a group:<id> or epic:<id>, or its appliesTo matches them: appliesTo:group:<id>, appliesTo:keyword:<k>, appliesTo:path:<glob>), with the sections they name→ tkt doc section setReplace a section's content, up to the next heading of the same or a higher level (heading kept; created at the end only when the heading exists nowhere)→ tkt doc section appendAppend to a section at any heading level (= doc append --section; created at the end only when the heading exists nowhere)→ tkt gotcha newCreate a managed gotcha (an existing one only with --force), with optional metadata→ tkt gotcha editChange a gotcha's body (--body / --file), severity or metadata; only the fields given change→ tkt gotcha deleteDelete a managed gotcha→ tkt gotcha getShow a managed gotcha, or with --anchor the section / table rows a ref with that anchor delivers→ tkt gotcha listList all managed gotchas→ tkt gotcha refsList who references or inherits a gotcha: the groups that name it (requiredReading, contextRef), the tickets under them (group:<id>), an epic's children (epic:<id>), and the tickets that name it themselves (contextRef, mention) or that its appliesTo matches (appliesTo:group:<id>, appliesTo:keyword:<k>, appliesTo:path:<glob>)→ tkt gotcha section setReplace a section's content, up to the next heading of the same or a higher level (heading kept; created at the end only when the heading exists nowhere)→ tkt gotcha section appendAppend after the section's last line, at any heading level (no blank line unless --new-block; created at the end only when the heading exists nowhere)→ tkt group section setReplace a section's content (heading kept; empty content clears it)→ tkt group section appendAppend content after the section's last line (no blank line unless --new-block)→ tkt group editEdit a group (partial update)→ tkt group getShow a group: its header, then the descriptor body (overview and every section) verbatim→ tkt group listList all groups→ tkt group deleteDelete a group→
Generated from the registry: src/aitodo/api/selfdoc_entries/context.py · context.docsv0.1.298