MindAttic.Tickets
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.
$ 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 newappends a row with the next freeCODE-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.--templatestarts the description from the type's template (fix: symptom, cause, test; feature: story, acceptance;ticket template TYPEprints 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 closemoves a ticket toclosedorwont-doand can set its Ref.--ref staged(M.TIX-T635, R21/R33) regenerates the repo'sdocs/USER_STORIES.mdand stages it (git add) for whatever commit comes next, instead of needing a separate view-only commit;--ref HEADdoes 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 (astatuschange plus areopenevent with the reason). A ticket a roll-up closed gets back the Ref it had beforechildren done.--with-parentsalso reopens the part-of ancestors its close rolled up; without it they stay closed and reopen one by one. A ticket labelledcontinuous(a standing sweep or loop) is never rolled up when its last open child closes; an explicitticket closestill closes it.ticket correctrelabels 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-ofis the child → parent edge at any depth (an epic is just a ticket with children),requiresthe 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), andticket linktakes those words too (andcontains,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 arequiresorpart-ofcycle (the refusal names the cycle's path).ticket showlists parents, children, prerequisites, required-by and related asID · Name · status(--jsontoo);ticket graphadds the part-of tree (Part of:andChildren:);ticket verifyalso 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|mermaidexports the neighbourhood N links out for Graphviz or a markdown page (--jsonadds itsnodes, with weight and repo colour, andedges). Tickets Desktop's Graph tab (Ctrl+8) and the Graph tab oftickets viewdraw it around a focused ticket: nodes labelledID · 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 queueshows each weight with a one-line why ("unblocks 7 tickets in 3 repos"),--jsoncarriesweightandwhy, andTicketsDb.GraphWeights()/GraphWeight.Ordergive the Orchestrator the same order.ticket suggest-linksproposes likelyduplicates/relatedlinks between open tickets whose summaries read alike, each with theticket linkcommand 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, ordropped), with an ID of its own (MS-1, never a ticket, story or epic ID).milestone new --name --goal --repo --orderadds one,milestone listandmilestone show <ID>read them (--jsontoo: state, order, activation time, member tickets, checks),milestone activatemakes a planned one active,milestone acceptmoves an active one into acceptance and--reachedaccepts it as reached (who and when recorded; refused while any acceptance check is fail or unknown, unless--force),milestone dropdrops one,milestone editchanges its name, goal, order or repos. Tickets and epics join one with an ordinarypart-oflink (milestone add <ID> <TICKET>.../remove, orticket 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 showlists the member tickets with their status and a done/total count, andticket shownames 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 …andcheck removestore 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(oraccepting) its scope is locked.milestone add(andticket link X part-of MS-1) no longer makes a member: the ticket or epic waits as a pending addition until the owner runsmilestone approve <ID> <ITEM> --by <WHO>(it joins, and the history says who approved it) ormilestone 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 showand the queue don't count it).milestone showlists 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 listhas it in aGrowncolumn, and--jsoncarriespending,pendingCountandgrowth(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 andviewshowID · Name, falling back to the summary cut short while a ticket has none;--jsoncarriesname(and the queue a ready-madecaption).ticket namesis the one-time backfill, propose then confirm: it proposes a name for every open ticket without one (--output FILEwrites them tab-separated to review and edit), and only--apply FILEwrites them. - The planning tree (M.TIX-T362, M.TIX-T363, M.TIX-T389): where a ticket sits is its one
level:label —epic,feature,storyortask— set byticket new --levelorticket level <ID> epic|feature|story|task(replaces any other level label; an epic also carries the plainepiclabel).ticket new --parent <ID>links the new ticketpart-ofanother, inheriting its priority and starting proposed unless--approved;ticket split <ID> --task "..."(repeatable, or--file PATH) breaks a ticket intolevel:taskchildren part-of it, of its type, approved like the parent,--sequentialchainingrequiresbetween them and--name-prefixnaming them.ticket orphanslists open tickets (epics aside) with no epic ancestor in their own repo: work no epic accounts for.ticket new --source autolabels a ticket an agent filed unasked (source:auto). ticket showprints 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 (--diffadds their full diffs);--versionslists 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 Nshows one, its changes marked.ticket linkconnects two tickets or stories (requiresis a prerequisite; a cycle is refused).ticket listshows tickets across the workspace, filtered by repo, status, type or date, as a table or--json.--querytakes 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|mdexports the filtered list as CSV (RFC 4180, a leading=/+/-/@defused) or a markdown table, and--output FILEwrites it to a file (UTF-8; a.csvor.mdname picks the format).ticket statsreports ticket metrics fromticket_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/--typenarrow it,--jsonprints 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--querynarrows it). Tickets Desktop shares them.ticket verifyfails 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 queuelists a repo's (or every repo's) open tickets in priority order with their approval state;ticket approve/ticket reject --reasonmove a ticket through review (--undoputs an approval back to proposed; a reject closes the ticket wont-do with the reason as its ref);ticket prioritysets where a ticket sits in that order andticket bumpmoves it up or down.ticket estimatekeeps 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, andticket estimate --seedfills 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 Xmakes it wait for others (--clear),ticket reserve <ID> 2Msets tokens aside for it (0 releases),ticket working <ID> --login --sessionrecords the session working it (--clear),ticket hygienelists closed tickets that may not be done, andticket intakefiles GitHub issues labelledorchestratorand CI failures on main as tickets (--dry-run). codes checkfinds duplicate project codes, repos without a ticket log, and malformed tables.db migrate,export,check,render,syncimport a repo's file once, rebuild it from the database, validate the database, rewrite a stale view, and commit (and push)data/Tickets.dband its readable dumpdata/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 migratemoves it fromdata/Tickets.dbonto a local SQL Server instance (--server,--databaseor--connection; the database is created), after whichdata/Tickets.dbis 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 backmoves it back to SQLite alone. On SQL Server, tickets, their approval and priority, and links are system-versioned: every save is kept, read back withticket show <ID> --versions.db reconcilerebuilds the SQLite copy whole, checks it against the server by row counts and checksums, then rebuilds or reorganizes fragmented indexes and updates statistics.viewopens 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 aRoadmapTreestraight 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 itspart-ofparents (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'sTicketCache, 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 queriestickets filterkeeps. 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 statsreports, 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 labelledorchestratorand 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
requireslinks 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 graphprints 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:testsso 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 syncand 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(messageROADMAP:<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(orrun.ps1) opens the MindAttic standard run menu (the shareddeploy-lib.ps1, MAT-T177):1) Redeploybuilds Debug (framework-dependent) and Release (a self-contained single exe) toR:\MindAttic\Apps\MindAttic.Tickets\{Debug,Release},2) Run Debugand3) Run Releasestart them, and13is Deploy & Run. The Release build also reinstalls theticketsCLI (viatools/install.ps1, unless-SkipCli) and points the Desktop and Start-menu shortcuts at the repo'srun.bat. Switches skip the menu:-Redeploy,-RunDebug,-RunRelease,-DryRun.
Workspace jobs
repos statusshows each repo's uncommitted, unpushed and stashed work, ignored files that no build regenerates, and its GitHub state (archived,work-in-progresstopic). Origins that predate a repo rename are resolved through GitHub's redirect.repos prunelists repos that are archived or untagged on GitHub and deletes the safe ones with--applyand a typedyes. 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 (aProjectReference, a Unityfile:package, a solution entry), can't be overridden.repos rollout ticketsgives every repo without one adocs/USER_STORIES.mdwith a unique project code and a ticket log.repos renamerenames 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 renameslists 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 anassignedrow 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 literallyassigned- 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'sref: 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 whoserefnames 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 isaccounted,unseated(only tickets outside the tree touched it) orunaccounted. 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 underbin//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 bySourceFiles.IsSource/Tracked, whichledger,orderandplan check(through the ledger it's given) all call — not regex text duplicated in each command.--jsonalso prints the rows;--checkexits 1 below 100%.assemble <MEMBRANE>(M.TIX-T626) carries context up the pyramid: a leaf closes withticket close --handoff "..."(or a separateticket 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 themembranelabel) 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.--jsonprints it structured.spec check <REPO>(M.TIX-T535) readsdocs/SPEC.md's## 4.section leniently (by each line's shape - an epic/feature heading, a bold**Sx.y.zstory bullet, a bareTask/Storybullet - 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 saysbuiltbut the ticket is open, or names anMS-nit 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 likebuilt (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, keepingdata/Tickets.dbout of ordinary feature commits, concurrent writers on SQLite alone).
Documentation
- docs/BIBLE.md: what this project is and isn't, and its laws.
- docs/USER_STORIES.md: this repo's own ticket log and generated story view, with the backlog.
- docs/AMENDMENTS.md: pending decisions.
- docs/VIEWER.md: how
tickets viewworks and why it's a static snapshot. - AGENTS.md: agent instructions.
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
- MindAttic.Tickets — Project Bible — MindAttic.Tickets is the workspace's ticket engine and repo job runner: a .NET library plus a tickets CLI that keeps every repo's…
- MindAttic.Tickets — Release charter — The workspace's ticket engine: a .NET library, the tickets CLI and the Tickets Desktop WPF app that hold every repo's tickets, links,…
- MindAttic.Tickets — Product specification — Place in the ecosystem: Tickets is the platform owner of the plan (docs/ECOSYSTEM.md §2.1): every request in every repo is a ticket in the…
- Tickets viewer (planned as M.TIX-T11, built as M.TIX-T10) — A read-only window onto the ticket database: every repo's stories and tickets, with filters, in MindAttic.Browser.