Jump to content

MindAttic.Tickets

From MindAttic Docs

MindAttic.Tickets

A ticket engine and repo job runner for the MindAttic workspace: every repo's milestones and permanent ticket log — each ticket placed in a tree by level (epic → feature → story → task) — live in one database, a local SQL Server instance when configured with data/Tickets.db kept a complete copy, SQLite alone otherwise; queried, checked and maintained by a CLI and a WPF desktop app.

C%23-latest-239120.svg .NET-10-512BD4.svg status-work--in--progress-orange.svg

$ tickets ticket list --status open
╭────────────────────┬────────────┬────────────┬─────────┬────────┬─────────────────────────────────╮
│ Repo               │ ID         │ Date       │ Type    │ Status │ Summary                         │
├────────────────────┼────────────┼────────────┼─────────┼────────┼─────────────────────────────────┤
│ MindAttic.Tickets │ M.TIX-T7  │ 2026-10-12 │ feature │ open   │ /commit logs tickets through …  │
│ MindAttic.Tickets │ M.TIX-T8  │ 2026-10-12 │ feature │ open   │ Launcher Workflow menu item     │
╰────────────────────┴────────────┴────────────┴─────────┴────────┴─────────────────────────────────╯

Scope

The whole product, built and still to build, every epic, feature and story with its ticket, is in docs/SPEC.md. The current finish line, MS-15 (Tickets 7.0: the planning tree), is in docs/RELEASE.md; MS-92 (Tickets 8.0) finishes the product after it.

Why

  • Every change and fix gets a ticket with a stable ID that lives in the repo it belongs to, so the history travels with the code.
  • Answer "what's still open?" or "what got fixed this week?" across every repo with one command.
  • Approve, reject and reorder the work before an agent picks it up, from the CLI or from Tickets Desktop.
  • The rules (next ID, append-only rows, table last, unique project codes) are enforced by a tool, not remembered by an agent.
  • Clean up the workspace without losing anything that only exists on this machine.

Features

Tickets and milestones (every repo's, in one database — a local SQL Server instance when configured (tickets db server migrate, M.TIX-T131), with data/Tickets.db kept a complete copy brought up to date after every write, or data/Tickets.db (SQLite) alone otherwise — with links such as requires between any two; each repo's docs/USER_STORIES.md is a generated, read-only view of it, rewritten after every change)

  • ticket new appends a row with the next free CODE-T<n> ID and prints it. It warns (on stderr, still filing) of open tickets in the repo whose summary reads alike, the same check Tickets Desktop's new-ticket dialog shows as you type. --template starts the description from the type's template (fix: symptom, cause, test; feature: story, acceptance; ticket template TYPE prints it), and the Desktop dialog starts from it too, swapping it as the type changes while it's untouched; an untouched template is never filed as a description.
  • ticket close moves a ticket to closed or wont-do and can set its Ref. --ref staged (M.TIX-T635, R21/R33) regenerates the repo's docs/USER_STORIES.md and stages it (git add) for whatever commit comes next, instead of needing a separate view-only commit; --ref HEAD does the same and also folds the view into the current commit by amending it (and records the real, post-amend commit hash as the Ref, not the word "HEAD") - refused, left staged instead, when HEAD is already on its remote tracking branch, so a commit already shared is never rewritten.
  • ticket reopen <ID> [--reason TEXT] [--with-parents] (M.TIX-T372) moves a closed or wont-do ticket back to open, recorded in its history (a status change plus a reopen event with the reason). A ticket a roll-up closed gets back the Ref it had before children done. --with-parents also reopens the part-of ancestors its close rolled up; without it they stay closed and reopen one by one. A ticket labelled continuous (a standing sweep or loop) is never rolled up when its last open child closes; an explicit ticket close still closes it.
  • ticket correct relabels a nonstandard type to the standard vocabulary, the one sanctioned exception to append-only (recorded in the ticket's history).
  • The node graph (M.TIX-T314): links make one unlimited graph across repos. part-of is the child → parent edge at any depth (an epic is just a ticket with children), requires the prerequisite; every edge is stored once and read back from its other end by its inverse (required-by, parent-of, followed-up-by, superseded-by, duplicated-by, implemented-by), and ticket link takes those words too (and contains, child-of), swapping the ends. A link to an ID that names no ticket, story or epic is refused, as is one that would close a requires or part-of cycle (the refusal names the cycle's path). ticket show lists parents, children, prerequisites, required-by and related as ID · Name · status (--json too); ticket graph adds the part-of tree (Part of: and Children:); ticket verify also fails on a part-of cycle and warns of a closed parent with open children.
  • Drawing the graph (M.TIX-T315): ticket graph <ID> --hops N --format dot|mermaid exports the neighbourhood N links out for Graphviz or a markdown page (--json adds its nodes, with weight and repo colour, and edges). Tickets Desktop's Graph tab (Ctrl+8) and the Graph tab of tickets view draw it around a focused ticket: nodes labelled ID · Name, outlined in their repo's colour, sized by graph weight, with their status and type; requires a solid arrow, part-of a thick parent → child tree line, related dashed, other kinds dotted. Part-of trees are laid out in rows (parents above), the rest force-directed, seeded by ID so the picture is the same on every refresh. Pick the hops and link kind, narrow it by repo and status (and, in the Desktop, type, label and search), collapse or expand a parent's children (− / +), and click a ticket to focus it and open its details; the same links are listed as text for screen readers.
  • A self-ranking queue (M.TIX-T316): every open ticket has a graph weight worked out from the node graph on every read (no cache to go stale), counting open tickets only: 10 per ticket that waits for it directly or through others (its required-by closure), 20 per other repo among those, 3 per open ticket part of it at any depth, 2 when it's part of an open parent, 1 per open ticket linked to it any other way. The queue runs explicit priority first (the author's word always wins), then graph weight, then the smallest-estimate rule; ticket queue shows each weight with a one-line why ("unblocks 7 tickets in 3 repos"), --json carries weight and why, and TicketsDb.GraphWeights() / GraphWeight.Order give the Orchestrator the same order. ticket suggest-links proposes likely duplicates/related links between open tickets whose summaries read alike, each with the ticket link command that accepts it; nothing is linked by it.
  • Milestones (M.TIX-T335): a milestone is a checkable point on the way to a goal, across one or more repos: a name, a goal, its repos, an order (lower first) and a state (planned → active → accepting → reached, or dropped), with an ID of its own (MS-1, never a ticket, story or epic ID). milestone new --name --goal --repo --order adds one, milestone list and milestone show <ID> read them (--json too: state, order, activation time, member tickets, checks), milestone activate makes a planned one active, milestone accept moves an active one into acceptance and --reached accepts it as reached (who and when recorded; refused while any acceptance check is fail or unknown, unless --force), milestone drop drops one, milestone edit changes its name, goal, order or repos. Tickets and epics join one with an ordinary part-of link (milestone add <ID> <TICKET>... / remove, or ticket link X part-of MS-1), so a milestone is the top of a part-of tree: an epic's children come with it, milestone show lists the member tickets with their status and a done/total count, and ticket show names the milestone a ticket is on, itself or through its parent. Acceptance checks are evidence, not ticket counts: milestone check add <ID> --kind build|exists|harness|signoff --description … [--repo …] [--target …], check list, check result <ID> <N> pass|fail|unknown --evidence … and check remove store them and what each last came to; running them is the Orchestrator's job. Every change is history (milestone_events). The library has the same: TicketsDb.Milestones(), MilestoneMembers, MilestoneChecks, MilestonesOf, IsOnActiveMilestone, ActiveMilestoneTickets.
  • Milestone scope lock (M.TIX-T347): once a milestone is active (or accepting) its scope is locked. milestone add (and ticket link X part-of MS-1) no longer makes a member: the ticket or epic waits as a pending addition until the owner runs milestone approve <ID> <ITEM> --by <WHO> (it joins, and the history says who approved it) or milestone decline <ID> <ITEM> --by <WHO> [--reason …]; milestone add … --approved-by <WHO> is the owner's one-step add. A planned milestone still takes members directly, and one that's waiting is on no milestone (milestone show, ticket show and the queue don't count it). milestone show lists the pending additions and says how much the milestone has grown since activation ("grown by N ticket(s) since activation, M waiting for approval"); milestone list has it in a Grown column, and --json carries pending, pendingCount and growth (atActivation, added, removed, now, pending, pendingTickets). The library: AddToMilestone (which says what joined and what waits), MilestonePending, ApproveMilestoneAddition, DeclineMilestoneAddition, MilestoneGrowth.
  • Friendly names (M.TIX-T313): every ticket may carry a short (2-6 word) name beside its ID, summary and description (ticket new --name, ticket correct <ID> --name, recorded in its history). ticket list, queue, show, graph, Tickets Desktop and view show ID · Name, falling back to the summary cut short while a ticket has none; --json carries name (and the queue a ready-made caption). ticket names is the one-time backfill, propose then confirm: it proposes a name for every open ticket without one (--output FILE writes them tab-separated to review and edit), and only --apply FILE writes them.
  • The planning tree (M.TIX-T362, M.TIX-T363, M.TIX-T389): where a ticket sits is its one level: label — epic, feature, story or task — set by ticket new --level or ticket level <ID> epic|feature|story|task (replaces any other level label; an epic also carries the plain epic label). ticket new --parent <ID> links the new ticket part-of another, inheriting its priority and starting proposed unless --approved; ticket split <ID> --task "..." (repeatable, or --file PATH) breaks a ticket into level:task children part-of it, of its type, approved like the parent, --sequential chaining requires between them and --name-prefix naming them. ticket orphans lists open tickets (epics aside) with no epic ancestor in their own repo: work no epic accounts for. ticket new --source auto labels a ticket an agent filed unasked (source:auto).
  • ticket show prints a ticket end to end: its row, queue state, assignee, reservation, the session working it, links, history and its commits: those whose subject names it, each with its GitHub link, as the Desktop detail pane lists them too (--diff adds their full diffs); --versions lists every version of it (on SQL Server, where tickets, their approval and priority, their work and links are system-versioned temporal tables, every save is kept, never pruned; on the SQLite file, versions are worked back from its history) and --version N shows one, its changes marked. ticket link connects two tickets or stories (requires is a prerequisite; a cycle is refused).
  • ticket list shows tickets across the workspace, filtered by repo, status, type or date, as a table or --json. --query takes the ticket query language: repo: (a name or a ticket code), type:, status:, label:, approval: and free text (matched against ID, summary, ref and repo; quote it to keep spaces), every term required; commas give alternatives (status:open,wont-do), a leading - negates (--query=-type:chore), * is a wildcard in repo and label. An unknown field or value is refused, saying what's allowed. --format csv|md exports the filtered list as CSV (RFC 4180, a leading =/+/-/@ defused) or a markdown table, and --output FILE writes it to a file (UTF-8; a .csv or .md name picks the format).
  • ticket stats reports ticket metrics from ticket_events: per day, week (Monday to Sunday) or month in UTC (--by, --periods N), the tickets filed, closed and closed wont-do and those open at each period's end; cycle time from filing to closing (median, mean, 85th percentile) overall and by type; and the tickets open at each period's end by repo and by type. --repo/--type narrow it, --json prints it. A reopen takes back the closing before it; a ticket filed already closed counts as throughput but not cycle time; one imported already closed (no history) counts nowhere.
  • filter save <NAME> <QUERY> / filter list / filter delete <NAME> keep named queries in the database (saved_filters); ticket list --filter <NAME> runs one (and --query narrows it). Tickets Desktop shares them.
  • ticket verify fails if the table breaks the rules or a committed row was deleted or reworded. It checks the versions too: a table no longer system-versioned, a history row that runs backwards, or a ticket whose last recorded change isn't what it says now.
  • ticket queue lists a repo's (or every repo's) open tickets in priority order with their approval state; ticket approve/ticket reject --reason move a ticket through review (--undo puts an approval back to proposed; a reject closes the ticket wont-do with the reason as its ref); ticket priority sets where a ticket sits in that order and ticket bump moves it up or down. ticket estimate keeps each ticket's effort estimate in tokens (ticket_queue.estimate, editable in Tickets Desktop too); within one priority the queue runs the smallest estimate first, and ticket estimate --seed fills in open tickets without one from the median cost of finished tickets of the same type and repo in the Orchestrator's TicketCosts.
  • The ticket functions the Orchestrator used to own (M.TIX-T134; the Orchestrator now only runs the work and reads these from the database): ticket assign <ID> <email> assigns a ticket to a member's login (--unassign, --redelegate), ticket block <ID> --by X makes it wait for others (--clear), ticket reserve <ID> 2M sets tokens aside for it (0 releases), ticket working <ID> --login --session records the session working it (--clear), ticket hygiene lists closed tickets that may not be done, and ticket intake files GitHub issues labelled orchestrator and CI failures on main as tickets (--dry-run).
  • codes check finds duplicate project codes, repos without a ticket log, and malformed tables.
  • db migrate, export, check, render, sync import a repo's file once, rebuild it from the database, validate the database, rewrite a stale view, and commit (and push) data/Tickets.db and its readable dump data/Tickets.sql; a sync's commit names the tickets whose rows or history changed since the last one (or --ticket ID), and when a change has nothing to name it opens and closes a chore ticket to carry it instead, so a sync with something to commit always names a ticket. db server (M.TIX-T131) says where the database is kept and each table's row counts on both sides; db server migrate moves it from data/Tickets.db onto a local SQL Server instance (--server, --database or --connection; the database is created), after which data/Tickets.db is kept a complete copy, brought up to date after every write (by the rows that changed where the server tracks them, M.TIX-T344, else each table the write touched rewritten whole); db server back moves it back to SQLite alone. On SQL Server, tickets, their approval and priority, and links are system-versioned: every save is kept, read back with ticket show <ID> --versions. db reconcile rebuilds the SQLite copy whole, checks it against the server by row counts and checksums, then rebuilds or reorganizes fragmented indexes and updates statistics.
  • view opens a read-only page of every repo's tickets and stories, with filters, in MindAttic.Browser (or the default browser). It's a snapshot; run it again to refresh.
  • The Roadmap model (M.TIX-T540, moved here from the Orchestrator): RoadmapSource.Read (library, MindAttic.Tickets.Data) builds a RoadmapTree straight from the store: every repo with open work and its first active milestone (with its acceptance checks passed of all), and under it each open ticket placed by its part-of parents (milestone links aside), with every ancestor and descendant so the percents are right. Each node carries its name, level, status, priority, description, who works or holds it, and done leaves of all leaves: a closed leaf counts 1, a leaf someone is working the working credit, an open one 0, wont-do ones neither. Epics closed within the given number of days stay on it. RoadmapTree.Shown(filter, sort) narrows repos by name or milestone and orders them by portfolio (milestone) order, least done or most open tasks; PathTo(repo, id) finds the drill-down path to a repo or ticket. Rows come from the process's TicketCache, links are read again only when a parent moved or a link changed, and a read with nothing changed returns the last tree.

Tickets Desktop (src/MindAttic.Tickets.Desktop, a WPF app built on MindAttic.Components.Wpf, matching the Orchestrator's look)

  • Tabs Repos | Queue | Audit (Ctrl+1/2/3), filterable by repo, status, type, approval and work (queued, needs approval, blocked) and searchable (Ctrl+F), with closed and wont-do tickets hidden until you show archived (or a query names a status). The Query box takes the same query language as ticket list --query (a query that doesn't parse says why under it), and Saved filter picks, saves and deletes the named queries tickets filter keeps. Export… (Ctrl+E) saves the tickets the current view shows, every filter, the query and the sort applied, as CSV or markdown.
  • Repos: every repo's tickets under its name, with its counts, git state (branch, ahead/behind, changed files) and a Start link that opens the Orchestrator to start a CLI there.
  • Queue: open tickets in the order /allocate hands them out; a claimed ticket shows its live worker (person, login, model, or orphaned) from the Orchestrator's database, read-only, as a link that opens the Orchestrator on it (O on the row).
  • Audit: ticket hygiene (closed fixes and features with no Ref, or that a later ticket says came back, as tickets ticket hygiene; each links to its ticket) and the Orchestrator's last audit run (shared agent files that drifted or are missing, duplicate code across repos), read from its database.
  • Stats (Ctrl+6): what tickets ticket stats reports, for the repo filter, as four read-only tables a screen reader reads as tables (throughput, cycle time by type, open by repo, open by type), by Day, Week or Month.
  • GitHub intake (tickets ticket intake): asks GitHub for issues labelled orchestrator and CI failures on main, shows the dry run, and files exactly those tickets only when you click File; nothing is written to GitHub.
  • Approve, unapprove, reject and reorder (move up/down/to top) queued tickets; file a new ticket (Ctrl+N); close, mark wont-do, correct a ticket's type, add a link, assign it to a member's login or reserve tokens for it from its detail pane.
  • A ticket being worked shows its login and session as links that open the Orchestrator on them (MindAttic.Orchestrator.exe --show <email|session|ticket>; nothing happens beyond a message when the Orchestrator isn't installed).
  • A ticket's detail pane steps through every version of it with its ◀ ▶ arrows (or Left/Right), the rightmost the current one: each shows its version number and time, with what it changed from the version before marked.
  • A ticket with requires links shows a Dependencies section: its chains both ways drawn in rows (what it waits for above it, farthest first; what waits for it below), what holds work up now outlined in red and said in words, each ticket a button that goes to it, and the same graph as an indented text list for screen readers (tickets ticket graph prints it too).
  • Command palette (Ctrl+K, or the Commands… button): one box to jump to any ticket or story by ID or text, fuzzily, or run any command that can run now by name (> lists commands only, # tickets and stories only). Up/Down choose and Enter runs without leaving the box; a screen reader hears the result count and the selected entry as they change. A story opens with its text and links, and any linked ticket opens from there.
  • Roadmap (Ctrl+Shift+M, or Roadmap in the command palette; M.TIX-T541, moved here from the Orchestrator's page): its own window drawing the library's Roadmap model as drill-down columns. The heading gives the overall percent done and how many repos have an active milestone. The Repos column has a search box (repo name or milestone) and three sort buttons (Portfolio order, Least done, Most open tasks); each repo shows its milestone, a progress bar and percent, and its checks passed, open tasks and epics. Clicking a row opens one more column of its children ("Features of M.TIX-T391 · ..."), at any depth, each row with its name, id, level and child count, its description as plain text (trimmed to a set number of lines), a progress bar (done green, started accent, untouched muted) and the initials of who works or holds it. A breadcrumb rail with chevrons above them goes back to any level. Right-click a ticket row to open it in the main window, copy its id, or assign it (M.TIX-T614, as the Orchestrator's page did before it moved here): pick a member to assign the ticket and every one of its open descendants to (or Unassign), approving each and, when the ticket itself is a container (has open children), labelling it gate:tests so it stays open for its test run once its children are done. It re-reads itself live (M.TIX-T615, not only on focus or F5): a ticket change anywhere in the workspace schedules a re-read after the Vault's Live refresh delay setting (debounced, so a burst of changes re-reads once), with a slower poll behind it as a backstop; F5 still refreshes at once and Esc still closes. Its numbers are settings in the Vault's Tickets tab, group Roadmap: column width (420 px), description lines (6), days a closed epic stays (14), the credit a worked open task counts (0.5), the live-refresh debounce (2000 ms) and its backstop poll (120 s).
  • A Sync button (Ctrl+Shift+S) runs tickets db sync and shows the result; F5 refreshes.
  • MindAttic.Tickets.Desktop.exe --root <dir> --ticket <ID> opens on that ticket, selected with its detail pane open (an open one in the Queue, to approve, move or close; a closed one in Repos). Started again while the window is open, it hands the id to that window and brings it forward. The Orchestrator dashboard's ticket links start it this way.
  • MindAttic.Tickets.Desktop.exe --root <dir> --roadmap [<REPO>|<ID>] (M.TIX-T542) opens the Roadmap window: at a repo (its epics column open), at a ticket (every column from its repo down to it open and it selected), or with no target where it was left. This is how other apps open the roadmap, which lives only here: the Orchestrator's Roadmap entry runs it. Started again while the window is open, it hands the target to that window over the same per-session named pipe as --ticket (message ROADMAP:<target>) and brings it forward; a target that isn't a plain name (letters, digits, ., -, _, at most 64) is ignored. A ticket-shaped target (CODE-T123) is a ticket, anything else a repo name; one not on the roadmap says so in the window's heading.
  • run.bat (or run.ps1) opens the MindAttic standard run menu (the shared deploy-lib.ps1, MAT-T177): 1) Redeploy builds Debug (framework-dependent) and Release (a self-contained single exe) to R:\MindAttic\Apps\MindAttic.Tickets\{Debug,Release}, 2) Run Debug and 3) Run Release start them, and 13 is Deploy & Run. The Release build also reinstalls the tickets CLI (via tools/install.ps1, unless -SkipCli) and points the Desktop and Start-menu shortcuts at the repo's run.bat. Switches skip the menu: -Redeploy, -RunDebug, -RunRelease, -DryRun.

Workspace jobs

  • repos status shows each repo's uncommitted, unpushed and stashed work, ignored files that no build regenerates, and its GitHub state (archived, work-in-progress topic). Origins that predate a repo rename are resolved through GitHub's redirect.
  • repos prune lists repos that are archived or untagged on GitHub and deletes the safe ones with --apply and a typed yes. Local-only work blocks a delete unless you name the repo in --override. A repo with no GitHub copy, or one another kept repo loads by relative path (a ProjectReference, a Unity file: package, a solution entry), can't be overridden.
  • repos rollout tickets gives every repo without one a docs/USER_STORIES.md with a unique project code and a ticket log.
  • repos rename renames a repo's folder-name key everywhere the database keys it (backed up first; it doesn't touch anything on disk — rename the folder yourself) and is kept forever in the repo's rename history and in every one of its tickets' history; repos renames lists recorded renames.

Quick start

Prerequisites: the .NET 10 SDK, git on PATH, and (for the GitHub columns and prune) a GitHub token in MindAttic.Vault, set from the Launcher's Settings menu.

git clone https://github.com/mindattic/MindAttic.Tickets.git
cd MindAttic.Tickets
dotnet build MindAttic.Tickets.slnx
dotnet run --project src/MindAttic.Tickets.Cli -- ticket list

You should see every ticket in every repo under D:\Projects\MindAttic.

Commands

tickets ticket new     [--repo X] --type feature|fix|chore|docs|interview --summary "..." [--name "..."] [--ref ...] [--status open|closed|wont-do] [--template | --description "..." | --description-file F]
                       # no --parent and not --level epic: seated under the repo's Intake feature and labelled needs-parent instead of left an orphan (M.TIX-T539)
tickets ticket template feature|fix|chore|docs|interview   # print the type's description template
tickets ticket close   <CODE-Tn> [--repo X] [--ref ... | staged | HEAD] [--wont-do] [--handoff "..."]
                       # --handoff records what the tier above needs to know (M.TIX-T626)
                       # --ref staged|HEAD folds the regenerated docs/USER_STORIES.md into the staged or current commit, no second view-only commit needed (M.TIX-T635)
tickets ticket reopen  <CODE-Tn> [--reason "..."] [--with-parents]
tickets ticket correct <CODE-Tn> --type feature|fix|chore|docs|interview --reason "..."
tickets ticket correct <CODE-Tn> --name "Short friendly name"   # "" clears it; no --reason needed
tickets ticket names   [--repo X] [--output FILE | --apply FILE]   # propose names for unnamed open tickets; write only the reviewed file
tickets ticket reassign <CODE-Tn> <CODE-Tm> --reason "..."   # the old ID is kept in id_history and still resolves
tickets ticket show    <CODE-Tn> [--json] [--diff] [--versions | --version N]
tickets ticket graph   <CODE-Tn> [--json | --format text|json|dot|mermaid] [--hops N]   # requires chains and the part-of tree; dot/mermaid draw the neighbourhood
tickets ticket link    <FROM> requires|related|follow-up-of|supersedes|duplicates|implements|part-of <TO> [--remove] [--note "..."]
                       # or by the other end: required-by|parent-of|contains|child-of|followed-up-by|superseded-by|duplicated-by|implemented-by
tickets ticket list    [--repo X] [--status S] [--type T] [--since YYYY-MM-DD] [--query "repo:X type:fix 'text'"] [--filter NAME] [--json | --format table|json|csv|md] [--output FILE]
tickets ticket stats   [--repo X] [--type T] [--by day|week|month] [--periods N] [--json]   # throughput, cycle time, open by repo and type
tickets filter save    <NAME> <QUERY>   # also: tickets filter list [--json], tickets filter delete <NAME>
tickets ticket verify  [--repo X]
tickets ticket queue   [--repo X] [--json]
tickets ticket approve [<CODE-Tn> ...] [--undo]    # no IDs: list what waits for approval
tickets ticket reject  <CODE-Tn> --reason "..."
tickets ticket priority <CODE-Tn> <PRIORITY>
tickets ticket bump    <CODE-Tn> [--by N]
tickets ticket estimate <CODE-Tn> [<TOKENS> | --clear]   # effort estimate, like 300k; within a priority the queue runs the smallest first
tickets ticket estimate --seed [--repo X] [--overwrite] [--dry-run]   # estimate open tickets from the Orchestrator's TicketCosts medians
tickets ticket assign  <CODE-Tn> [<email>] [--unassign | --redelegate]
tickets ticket block   <CODE-Tn> [--by <CODE-Tm> ...] [--clear]
tickets ticket reserve <CODE-Tn> <TOKENS>          # like 2M or 500k; 0 releases
tickets ticket working <CODE-Tn> [--login <email>] [--session <id>] | --clear
tickets ticket note <CODE-Tn> "<markdown>" [--author <name>]   # append-only comment (- reads stdin); show lists them
tickets ticket hygiene [--repo X] [--json]
tickets ticket intake  [--repo X] [--dry-run]
tickets ticket level   <CODE-Tn> [epic|feature|story|task]   # show, or set, replacing any other level: label
tickets ticket split   <CODE-Tn> --task "..." [--task "..." ...] | --file PATH [--sequential] [--name-prefix X]
tickets ticket orphans [--repo X] [--json]   # open tickets, epics aside, with no epic ancestor in their own repo
tickets codes check
tickets milestone new      --name "..." --goal "..." --repo X [--repo Y ...] [--order N]
tickets milestone list     [--state planned|active|accepting|reached|dropped] [--repo X] [--json]
tickets milestone show     <MS-n> [--json]
tickets milestone activate <MS-n>
tickets milestone accept   <MS-n> [--reached --by WHO] [--force]
tickets milestone drop     <MS-n> [--reason "..."]
tickets milestone edit     <MS-n> [--name "..."] [--goal "..."] [--order N] [--repo X ...]
tickets milestone add      <MS-n> <CODE-Tn> ... [--approved-by WHO]
tickets milestone approve  <MS-n> <ITEM> --by WHO
tickets milestone decline  <MS-n> <ITEM> --by WHO [--reason "..."]
tickets milestone remove   <MS-n> <CODE-Tn> ...
tickets milestone check add    <MS-n> --kind build|exists|harness|signoff --description "..." [--repo X] [--target "..."]
tickets milestone check list   <MS-n> [--json]
tickets milestone check result <MS-n> <N> pass|fail|unknown [--evidence "..."]
tickets milestone check remove <MS-n> <N>
tickets db migrate     [--cutover] [--db FILE]
tickets db export      [--repo X] [--out FILE]
tickets db check       [--fix]
tickets db render      [--repo X]
tickets db sync        [--no-push] [--ticket ID]
tickets db reconcile   [--dry-run]
tickets db server [status]   # where the database is kept, and each table's row counts on both sides
tickets db server migrate [--server NAME] [--database NAME] [--connection STRING] [--replace]
tickets db server back
tickets reason <CODE-Tn> [--dry-run] [--prompt-only] [--provider ID] [--tier high] [--max-tokens N] [--timeout S] [--spec-chars N]
tickets gaps   <CODE-Tn|REPO> [--apply] [--prompt-only] [--provider ID] [--tier high] [--max-tokens N] [--timeout S] [--spec-chars N]
tickets change "<REQUEST>" [--repo X] [--apply] [--fresh] [--outline-chars N] [--prompt-only] [--provider ID] [--tier high] [--max-tokens N] [--timeout S] [--spec-chars N]
tickets view [--repo X] [--out DIR] [--no-open]
tickets repos status [--json]
tickets repos prune  [--apply] [--only A,B] [--override A,B]
tickets repos rollout tickets [--apply]
tickets repos rename   <OLD> <NEW> [--reason "..."]
tickets repos renames  [--repo X]
tickets repos recode   <REPO> <CODE> --reason "..."   # every ticket/story/epic ID moves to the new code; old IDs still resolve
tickets ledger <REPO> [--json] [--check]
tickets assemble <MEMBRANE> [--json]   # gathers what a membrane's required siblings handed off as it closed (M.TIX-T626)
tickets spec check <REPO> [--json]   # how far docs/SPEC.md's '## 4.' section has drifted from the tree, read leniently; read-only (M.TIX-T535)

Build up (MAT-T484; method: mindattic-agent-standard/docs/build-up.md). These commands test a repo's plan against its code; they replaced the PowerShell stopgaps in MindAttic.Agency/shared/buildup/, which now forward here.

  • ledger <REPO> (M.TIX-T552) is the comb: it writes <REPO>/docs/CODE_LEDGER.md (LF, UTF-8 without a BOM), every tracked source file and the ticket that accounts for it. A file is placed first by an assigned row agents write in the ledger (a path, or a folder ending in / covering every file under it unless a longer row overrides it; kept on every regeneration; a row whose How column isn't literally assigned - a typo, or text left from editing - is still kept as an assignment and a warning printed, never silently dropped, M.TIX-T633); then a closed container's ref: built: <files> note, naming its files directly (M.TIX-T631); then a seated ticket whose title names the file's behaviour (its name, camelCase split, read against the title, M.TIX-T631); then by its history: the ticket IDs in the subjects of commits that touched it (resolved through a repo recode's former prefix, M.TIX-T631, so an old-prefix citation isn't counted unseated), or, only when no subject names a ticket, a ticket whose ref names the commit. The ticket must be seated (it has a level and is an epic or has a parent); among several the one that touched the fewest files across its own commits wins (M.TIX-T631: a repo-wide sweep - rename, bughunt, reformat - never outranks a dedicated story just for being a task), then the deepest level (task, story, feature). Each file is accounted, unseated (only tickets outside the tree touched it) or unaccounted. Source is tracked code (C#, XAML, Razor, PowerShell, Python, JS/TS, CSS, HTML, C/C++, Kotlin, Java, Swift, Go, Rust, Lua, GDScript, shaders, Unity UI, SQL, MSBuild .props/.targets), not vendored, generated or built folders, except a repo's own product exceptions (a game's install layout under bin//Plugins/, build-up R16/R20). What counts is one shared setting (M.TIX-T627) — src/MindAttic.Tickets/Buildup/source-patterns.json (extensions, extensionless hook names, vendor-looking paths and product exceptions), embedded into the library and read by SourceFiles.IsSource/Tracked, which ledger, order and plan check (through the ledger it's given) all call — not regex text duplicated in each command. --json also prints the rows; --check exits 1 below 100%.
  • assemble <MEMBRANE> (M.TIX-T626) carries context up the pyramid: a leaf closes with ticket close --handoff "..." (or a separate ticket note <ID> "Handoff: ..."), recording what was built, its interfaces, where it lives, and what the tier above needs to know (TicketsDb.Handoff, the latest note starting "Handoff:"). assemble <MEMBRANE> (the membrane must carry the membrane label) gathers its required siblings' handoffs, each marked still open or with no handoff recorded when it has none, so the assembling CLI gets the parts' context instead of rediscovering it by reading their code cold. --json prints it structured.
  • spec check <REPO> (M.TIX-T535) reads docs/SPEC.md's ## 4. section leniently (by each line's shape - an epic/feature heading, a bold **Sx.y.z story bullet, a bare Task/Story bullet - not a strict grammar) and reports how it's drifted from the live tree: a cited ID that doesn't resolve (dangling-spec-id), a tree epic/feature/story that isn't wont-do and isn't cited anywhere (missing-from-spec), a status that disagrees - SPEC says built but the ticket is open, or names an MS-n it isn't actually on (spec-status-mismatch) - and a wont-do ticket still listed (wont-do-still-listed). Read-only: it never writes the SPEC or the tree. A renderer that regenerates ## 4. from the tree while preserving hand-written prose by ID is a deliberately separate, later story (the formats this was checked against already vary enough between repos - same-line vs. next-line prose, a status like built (M.TIX-T186, T195) citing absorbed tickets - that writing it back out safely needs its own design pass).

reason and gaps are the plan reasoning about itself (M.TIX-T543). Each gathers the container (or, for gaps <REPO>, the repo's open epics), its children's names, summaries, descriptions, labels and requires links, the whole part-of subtree's own requires edges (tasks included, not just direct children), the repo's docs/SPEC.md section naming it, its ## 6. "Interfaces and dependencies" section, and docs/ECOSYSTEM.md's platform owner table, and makes one model call through MindAttic.Legion (keys come from the Vault inside Legion; the first trusted provider with a key answers at the --tier). reason writes the design (Parts, Interfaces, Data, Order, Risks, Owners) into the container's description under ## Design, replacing an earlier one; an "### Owners" line that names a different repo than the owner table already does for that concern is flagged as a warning on stderr, never silently rewritten (Reasoning/DesignCheck.cs, M.TIX-T636). gaps prints missing requires links as tickets ticket link commands for the owner to run, and missing stories (membrane joining work, acceptance the parent needs) with a reason each; --apply files the stories as proposed level-story tickets part-of the container (membranes labelled membrane, with their requires links) for the owner to approve. A reply that names a ticket outside the container is dropped and reported. The prompt building (Reasoning/PlanPrompts.cs) and reply parsing (Reasoning/PlanResponses.cs) are separate deterministic classes; --prompt-only shows the prompt without a call.

change "<REQUEST>" is change intake (M.TIX-T695): the Visionary's mid-build request is placed against the single source and decomposed, steps 2 and 3 of "stop, decompose, resume" (the Orchestrator owns the pause and the resume, M.ORCH-T2532). It hands one model, through the same Legion path as reason (PlanReasonSettings.AskAsync), the request, docs/ECOSYSTEM.md's vision section, the repo's docs/SPEC.md and its ## 6. section, the owner table, and the repo's open tree as an indented outline (open tickets, plus the closed children of open containers so invalidated work can be named; Reasoning/ChangeContext.cs). The reply (Reasoning/ChangeResponses.cs) places the change: fits under a named open container, conflict with the vision or SPEC, or new-scope. The model's placement is not trusted past the owner table (R34): it also lists the platform concerns the change would use and who would own them, and any owner that differs from docs/ECOSYSTEM.md §2.1 turns the plan into a conflict; independently, Reasoning/ChangeGuards.cs reads the request and the proposed summaries for text that turns away from an owner repo ("no longer depends on Legion", "instead of", "bypass", within a few words of its name) or keeps a credential outside Vault (an API key in appsettings, a .env file, the repo), and overrules a "fits" into a conflict with a question naming the owner (a weak fallback model once called "call OpenAI directly with a key in appsettings.json" a fit). A piece the model hangs under a closed ticket is re-seated under the open container the change was placed in; a link that would make finished work wait on new work, or a piece wait on its own container, is dropped. A conflict carries one question and nothing else; --apply files it as a proposed interview ticket labelled change-question, related to the container and never seated in the work tree (Reasoning/ChangeQuestion.cs). Otherwise the reply's pieces (epic/feature/story/task, kind work or gap, parent and requires by ID or piece key) are checked (a piece must sit a level below its parent; anything naming a ticket outside the tree is dropped and reported), then the tickets membranes rule runs over the tree as it would stand after the change (Reasoning/ChangeDecompose.cs, Buildup.Membranes.Missing): a touched container left with two or more open parts and no membrane gets one, an open membrane is linked to require the new parts, and a closed one is reopened with the reason. The plan diff lists each + piece, + link, ~ reopen and (new scope) the SPEC line, then the container's build waves before and after (Buildup/ChangeWaves.cs, Reasoning/ChangeOrder.cs). Nothing is written without --apply; the dry run's reply is cached under the request and the prompt's hash (the reason cache, M.TIX-T640), so --apply right after writes exactly what was reviewed, and a tree that moved on forces a fresh call. --apply files the pieces parents first at the container's priority (the restamp), approved when the change fits and proposed when it is new scope, adds the links, reopens, and for new scope a line under ### Added by tickets change in SPEC section 4 and a change-log row (commit them with the tickets), and leaves a note on the container naming what was filed so a resuming agent reads what moved.

Every command takes --root <DIR> (default D:\Projects\MindAttic). --repo defaults to the repo containing the current directory. Exit codes: 0 success, 1 problems found or the operation failed, 2 bad arguments.

How it works

   tickets CLI  ·  Tickets Desktop (WPF)  ·  Launcher menu  ·  /commit
                 |
        MindAttic.Tickets (library)
           |                                       |
   Data/ (TicketsDb: SQL Server or SQLite)   Repos/ (git + GitHub)
           |                                       |
  SQL Server database (store of record, when configured),    git -C <repo>, api.github.com/user/repos
  data/Tickets.db (its copy, or the store itself), data/Tickets.sql,
  <repo>/docs/USER_STORIES.md (generated view)

Every repo's milestones, tickets (placed in a tree by level and part-of links) and the links between them live in one database: a local SQL Server instance when configured (tickets db server migrate, M.TIX-T131) — tickets, their approval and priority, and links kept system-versioned there, so ticket show <ID> --versions can read any past state — or data/Tickets.db (SQLite) alone otherwise. Either way data/Tickets.db is committed to this repo alongside a readable SQL dump (data/Tickets.sql) so changes show up as text diffs; on SQL Server it's kept a complete copy, brought up to date after every write (by the rows that changed where the server tracks them, else each table the write touched rewritten whole), so git and the commit-msg hook always have something to read. A repo's docs/USER_STORIES.md is rewritten from the database after every change that touches it (and by tickets db render/sync); it's never read back in, so a hand edit is only ever a mistake db check flags. The GitHub token comes from MindAttic.Vault (bucket GitHub, key github), the same one the Launcher's roster filter uses; the CLI (and the Launcher) read it and pass it in.

Project layout

src/MindAttic.Tickets/            library (packed to C:\LocalNuGet)
  Data/      TicketsDb (schema, tickets with their level tree and milestones, links, history, the ticket queue,
             sync-commit subjects, SQL Server or SQLite, M.TIX-T131)
  Stories/   StoryDocument (parses a USER_STORIES.md into ordered blocks; the legacy story/epic/backlog import path)
  Tickets/   Ticket, TicketRules, StoryFile, WorkspaceTickets (the markdown fallback, pre-migration)
  Repos/     RepoStatus, GitHubRepoIndex, DependencyScan, PrunePlanner
  Git.cs, Workspace.cs
src/MindAttic.Tickets.Cli/        the tickets exe (Spectre.Console.Cli)
src/MindAttic.Tickets.Desktop/    Tickets Desktop, a WPF ticket app (net10.0-windows, MindAttic.Components.Wpf)
tests/MindAttic.Tickets.Tests/    NUnit 4
tests/MindAttic.Tickets.Desktop.Tests/  NUnit 4: Tickets Desktop's view model and store against a temporary database
tools/codex.ps1                    Codex doctor + digest
tools/install.ps1                  packs the library and CLI and installs `tickets` as a global tool
run.ps1, run.bat                   the run menu: redeploys Tickets Desktop, runs its Debug or Release copy

Building and testing

dotnet build MindAttic.Tickets.slnx      # TreatWarningsAsErrors, Nullable enabled; also builds Tickets Desktop (Windows)
dotnet test MindAttic.Tickets.slnx
powershell -File tools/codex.ps1 doctor   # docs canon check

The repo-level tests run real git against temporary repos; nothing touches the real workspace.

Install the CLI as a global tickets tool with powershell -File tools/install.ps1 (packs the library and CLI to C:\LocalNuGet and installs or updates the tool from there). Publish and install Tickets Desktop, with its Desktop and Start-menu shortcuts, with powershell -File run.ps1 -Redeploy (add -RunRelease to open it when done).

Limitations

  • Windows-first: the default root is D:\Projects\MindAttic, the CLI is built and tested on Windows, and Tickets Desktop (WPF, net10.0-windows) only runs on Windows at all.
  • Output piped or redirected still carries ANSI color codes in places and doesn't yet honor NO_COLOR. See the Priority backlog in docs/USER_STORIES.md for these and other open gaps (restoring the db from its dump, keeping data/Tickets.db out of ordinary feature commits, concurrent writers on SQLite alone).

Documentation

License

No LICENSE file; all rights reserved.

Part of MindAttic — see more projects at github.com/mindattic. Related: MindAttic.Launcher (workspace launcher) and MindAttic.Vault (credential store).

Pages in this repository

From MindAttic.Tickets/docs/overview.md via MindAttic.Docs; synced automatically, so edit the repo, not this page.