Jump to content

MindAttic.Tickets/SPEC

From MindAttic Docs

MindAttic.Tickets — Product specification

The complete product, written down before it is built (owner, 2026-11-30, MAT-T360). Every epic, feature and story the finished product will have is listed here, built or not. The ticket tree mirrors this file one to one: every ID below is a ticket. Nothing gets built unless it is here, and anything taken out of here is closed wont-do in the tree. docs/RELEASE.md says which part of this the current milestone delivers.

1. Product definition

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 epic > feature > story > task tree, and Tickets computes the build order (the waves) that the waterfall shows.

MindAttic.Tickets is the workspace's ticket engine: a .NET library, the tickets CLI and the Tickets Desktop WPF app that keep every MindAttic repo's tickets, their links, their place in the epic > feature > story > task tree, milestones and full history in one store (local SQL Server, with a committed SQLite copy and SQL dump), and run workspace-wide repo jobs. It is for the owner, who plans and approves work, and for the agents and the Orchestrator, which file, claim and close tickets through it. The finished product is a ticket engine whose tree is the only planning model, whose desktop app shows that tree live, and whose store can always be rebuilt and proven from git.

2. Scope boundary

2.1 In the product

  • The ticket log: filing, lifecycle, names, descriptions, notes, history, queries, export, metrics.
  • The planning graph: links, levels, split and roll-up, the self-ranking queue, approval, priority, estimates, claims.
  • Milestones with a lifecycle, scope lock and acceptance checks.
  • The store: SQL Server of record, the committed SQLite copy and dump, versions, indexes, cache, reconcile, restore.
  • Workspace jobs: repo status, safe prune, rollout, rename, recode.
  • Tickets Desktop: every view of the above, live, keyboard- and screen-reader-usable.
  • The read-only tickets view page in MindAttic.Browser.

2.2 Never in the product

  • A hosted tracker or GitHub Issues as the store (BIBLE §3; the M.TIX-T50 spike's question is closed): the store stays local.
  • A model call outside the plan-reasoning commands, or any not routed through MindAttic.Legion (M.TIX-LAW-5).
  • The legacy story/epic/backlog tables and commands, story renumbering and duplicate-story checks (M.TIX-T170): the ticket tree replaces them (M.TIX-T390).
  • Client-machine writes to the host's store (M.TIX-T323): remote use is RDP onto the host.
  • A Blazor or web shell for Tickets Desktop.
  • The 50-item Desktop polish umbrella (M.TIX-T175): palette extras, swimlanes, WIP limits, spacing and contrast audits, shortcut legends.
  • Repos tab extras such as stash counts and GitHub topic badges (M.TIX-T376).
  • Keeping data/Tickets.db out of every feature commit: the commit gate deliberately lets the database and USER_STORIES.md ride along with the ticket being committed.
  • Proving concurrent writers on SQLite alone: SQL Server is the store of record; SQLite alone is a fallback.

3. Users and roles

  • The owner plans: approves and reorders the queue, shapes the tree, runs milestones, works in Tickets Desktop.
  • Agents (every CLI, every login) file, claim, note and close tickets through the CLI; commits name their ticket.
  • The Orchestrator reads the queue, claims and milestones from the store and runs the work.
  • Hooks (commit-msg, commit gate) check that a commit's ticket exists.

4. Requirements

Status is built (closed ticket, with evidence) or MS-n: the milestone in §7 that delivers it.

E1. Ticket log — M.TIX-T503 — built

F1.1 Filing and lifecycle — M.TIX-T504 — built

  • S1.1.1 File, close, list, verify — M.TIX-T1 — built. As an agent, I file a ticket with the next free ID and close it, so every change has a permanent record. Acceptance: given a repo, when I run ticket new, then it prints the next CODE-Tn and ticket verify passes.
  • S1.1.2 Append-only notes — M.TIX-T72 — built. As an agent, I add markdown notes to a ticket without rewording it. Acceptance: ticket note appends; ticket show lists it.
  • S1.1.3 Description apart from summary — M.TIX-T73 — built. As the owner, a ticket has a markdown description and its summary can be reworded only as a recorded correction.
  • S1.1.4 Templates and similar-ticket warning — M.TIX-T88 — built. As the owner, filing offers the type's template and warns of a similar open ticket.
  • S1.1.5 Interview tickets — M.TIX-T114 — built. As the owner, a question for me is its own ticket type.
  • S1.1.6 Reassign IDs and recode repos — M.TIX-T121 — built. As the owner, I give a ticket a new ID or a repo a new code and old IDs still resolve.
  • S1.1.7 Summary rewording verb — M.TIX-T147 — built. As the owner, ticket correct --summary --reason rewords a summary, recorded in history.
  • S1.1.8 Link changes in history — M.TIX-T159 — built. As the Orchestrator, link changes appear in ticket_events.
  • S1.1.9 Reopen — M.TIX-T372 — built. As the owner, ticket reopen brings a closed ticket back, optionally with the parents its close rolled up.

F1.2 Query, export and metrics — M.TIX-T505 — built

  • S1.2.1 Labels and components — M.TIX-T74 — built. As the owner, I label tickets and filter by label.
  • S1.2.2 Query language and saved filters — M.TIX-T78 — built. As the owner, --query "repo:X type:fix 'text'" and named filters work in the CLI and Desktop.
  • S1.2.3 Ticket-to-commit links — M.TIX-T85 — built. As the owner, a ticket lists the commits that name it, with GitHub links.
  • S1.2.4 Metrics — M.TIX-T86 — built. As the owner, ticket stats and the Stats view show throughput, cycle time and open counts.
  • S1.2.5 Export — M.TIX-T87 — built. As the owner, I export a filtered list as CSV or markdown.

F1.3 Generated views and viewer — M.TIX-T506 — built

  • S1.3.1 Read-only viewer — M.TIX-T10 — built. As the owner, tickets view opens a static page of every repo's tickets in MindAttic.Browser.
  • S1.3.2 Codex reads the database — M.TIX-T21 — built. As an agent, the codex digest and doctor read from the database.
  • S1.3.3 Generated USER_STORIES.md — M.TIX-T27 — built. As an agent, each repo's docs/USER_STORIES.md is rewritten from the database and a hand edit is flagged by db check.

E2. Planning graph and queue — M.TIX-T507 — built

F2.1 Node graph — M.TIX-T312 — built

  • S2.1.1 Friendly names — M.TIX-T313 — built. As the owner, every ticket shows ID · Name.
  • S2.1.2 Unified links — M.TIX-T314 — built. As an agent, part-of, requires, supersedes and the other links form one graph across repos, cycles refused.
  • S2.1.3 Graph view — M.TIX-T315 — built. As the owner, the Desktop Graph tab and ticket graph --format dot|mermaid draw a ticket's neighbourhood.
  • S2.1.4 Self-ranking queue — M.TIX-T316 — built. As the Orchestrator, the queue runs priority, then graph weight, then smallest estimate, with a one-line why.

F2.2 Planning tree — M.TIX-T508 — built

  • S2.2.1 Levels, split and roll-up — M.TIX-T509 — built (M.TIX-T361, T362-T365, T387-T389). As the owner, ticket level, new --parent --level, split, roll-up close, --unplanned, orphans, --cascade and --source auto keep work in the tree.

F2.3 Queue, approval and work — M.TIX-T510 — built

  • S2.3.1 Queue data — M.TIX-T65 — built. As the owner, approval and priority live in ticket_queue, set by approve, reject, priority, bump.
  • S2.3.2 Estimates — M.TIX-T75 — built. As the Orchestrator, estimates seeded from TicketCosts order equal priorities.
  • S2.3.3 Ticket functions from the Orchestrator — M.TIX-T134 — built. As the Orchestrator, assign, block, reserve, working, hygiene and intake live here.
  • S2.3.4 Divvy — M.TIX-T326 — built. As the owner, ticket divvy splits a repo's open tickets between members' logins.

E3. Milestones — M.TIX-T511 — built

F3.1 Milestones and scope lock — M.TIX-T512 — built

  • S3.1.1 Milestone lifecycle and checks — M.TIX-T513 — built (M.TIX-T335). As the owner, a milestone has a goal, repos, checks and moves planned > active > accepting > reached.
  • S3.1.2 Scope lock — M.TIX-T514 — built (M.TIX-T347). As the owner, additions to an active milestone wait for my approval and its growth is shown.

E4. Ticket store — M.TIX-T515 — built

F4.1 Database store and versions — M.TIX-T516 — built

  • S4.1.1 One database — M.TIX-T20 — built. As an agent, every repo's tickets live in one database committed with a readable dump.
  • S4.1.2 SQL Server store — M.TIX-T131 — built. As the owner, the store of record is local SQL Server with data/Tickets.db kept a complete copy.
  • S4.1.3 Temporal versions — M.TIX-T137 — built. As the owner, ticket show --versions reads any past state.

F4.2 Indexed, versioned, cached store — M.TIX-T410 — built

  • Tasks M.TIX-T412 (indexes), T413 (batched reads), T414 (per-ticket versions), T415 (TicketCache), T416 (db reconcile) — built.

E5. Workspace jobs and integrations — M.TIX-T517 — built

F5.1 Repo jobs — M.TIX-T518 — built

  • S5.1.1 Safe prune with overrides — M.TIX-T5 — built. As the owner, repos prune deletes only what is safe; local-only work needs --override.
  • S5.1.2 Clone through the standard — M.TIX-T90 — built. As the owner, a new repo is cloned, tagged wip and offered by the Launcher.
  • S5.1.3 Repo rename — M.TIX-T98 — built. As the owner, repos rename moves a repo's key everywhere, kept in its history.

F5.2 Agent and app integrations — M.TIX-T519 — built

  • S5.2.1 /commit logs through tickets — M.TIX-T7 — built.
  • S5.2.2 Launcher menu item — M.TIX-T8 — built.
  • S5.2.3 Root-session commits only its own code — M.TIX-T13 — built.
  • S5.2.4 Logs to MindAttic.Log — M.TIX-T92 — built.

E6. Tickets Desktop — M.TIX-T520 — built

F6.1 The first Desktop — M.TIX-T63 — built

  • S6.1.1 Scaffold and icon — M.TIX-T64; S6.1.2 Queue view — M.TIX-T66; S6.1.3 Tickets list — M.TIX-T67; S6.1.4 Detail pane — M.TIX-T68; S6.1.5 New-ticket dialog (Ctrl+N) — M.TIX-T69; S6.1.6 Live refresh — M.TIX-T70 — all built.

F6.2 Views and power tools — M.TIX-T521 — built

  • S6.2.1 Claims shown — M.TIX-T76; S6.2.2 Board — M.TIX-T77; S6.2.3 Bulk actions — M.TIX-T79; S6.2.4 Undo (Ctrl+Z) — M.TIX-T80; S6.2.5 Command palette (Ctrl+K) — M.TIX-T81; S6.2.6 Stories view (legacy, replaced in MS-15) — M.TIX-T82; S6.2.7 Dependency graph — M.TIX-T83; S6.2.8 Activity feed and toasts — M.TIX-T84; S6.2.9 Open on a ticket (--ticket) — M.TIX-T117; S6.2.10 The one place to manage tickets — M.TIX-T133; S6.2.11 Repos, Queue, Audit tabs — M.TIX-T135; S6.2.12 Hygiene view — M.TIX-T138; S6.2.13 Milestones view — M.TIX-T522 (M.TIX-T336) — all built.

F6.3 Bus and deploy — M.TIX-T523 — built

  • S6.3.1 Message bus — M.TIX-T158; S6.3.2 Independent deploy — M.TIX-T174; S6.3.3 Sibling deploy removed — M.TIX-T148 — built. The shared run menu deploy is M.TIX-T384 (under MAT-T290).

E7. The ticket tree is the only plan — M.TIX-T390 — MS-15

F7.1 Freeze legacy writes — M.TIX-T394 — built

  • Task M.TIX-T402 — built.

F7.2 Legacy tables archived and dropped — M.TIX-T395 — MS-15

  • Task M.TIX-T403 (archive with verified counts) — built.
  • Task M.TIX-T404 — MS-15. As the owner, the stories/epics/backlog tables and commands are gone and USER_STORIES.md renders from tickets only. Acceptance: given the archive in data/, when the migration runs, then the tables are dropped and db check is clean.

E8. The plan is visible in Desktop — M.TIX-T391 — MS-15

F8.1 Milestone tree view — M.TIX-T396 — MS-15

  • Task M.TIX-T405 — MS-15. As the owner, the Stories view becomes milestone > epic > feature > story > task with done/total on each node.
  • Task M.TIX-T188 — MS-15. As the owner, clicking an epic filters the Queue and Board to that epic.
  • Story M.TIX-T540 — built. The roadmap model (repos > milestones > epics > features > stories with progress, checks and open-task counts, in portfolio order, least done or most open tasks) is computed by the Tickets library from its own store.
  • Story M.TIX-T541 — built. Tickets Desktop shows the drill-down roadmap at parity with the Orchestrator's former page: repo search and three sorts, one column per opened row at any depth, a breadcrumb rail, progress bars, names, ids, child counts and descriptions.
  • Story M.TIX-T542 — built. Other apps open the roadmap at a repo or ticket through Tickets Desktop: --roadmap [REPO|ID], handed to an open window over the single-instance pipe.
  • Story M.TIX-T614 — built. The roadmap right-clicks a row to assign it and every open ticket under it to a member (or unassign), as the Orchestrator's page did before it moved here: approving the branch and labelling a container gate:tests so it stays open for its test run once its children are done.
  • Story M.TIX-T615 — built. The roadmap re-reads itself live while open (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), with a slower backstop poll behind it.

F8.2 Execution order — M.TIX-T397 — built (M.TIX-T186, T195)

E9. Desktop matches the family — M.TIX-T392 — MS-15

F9.1 Incremental refresh — M.TIX-T235 — built (M.TIX-T369, T370, T371)

F9.2 Shared family controls — M.TIX-T398 — MS-15 (UI controls are owned by MindAttic.Components)

  • Tasks M.TIX-T176, T177, T179 — built.
  • Task M.TIX-T178 — MS-15. As the owner, PromptWindow is an MaModal-hosted dialog.
  • Task M.TIX-T180 — MS-15. As the owner, the new-ticket dialog is MaModal content with the shared chrome and focus trap.

E10. Tickets 7.0 released — M.TIX-T393 — MS-15 (the milestone's closing epic)

F10.1 Workspace integration — M.TIX-T399 — built (M.TIX-T337)

F10.2 Hardening and docs — M.TIX-T400 — built (M.TIX-T381, T406)

F10.3 Polish and release 7.0 — M.TIX-T401 — MS-15 (requires F7.2, F8.1, F9.2, F10.4)

  • Task M.TIX-T407 (bump and deploy 7.0.0) — built.
  • Task M.TIX-T385 — MS-15. The old C:\Apps\MindAttic.Tickets.Desktop deploy is deleted.

F10.4 Reported defects closed — M.TIX-T502 — MS-15

  • Task M.TIX-T421 — MS-15. The 53 Desktop tests failing with a DBNull cast (M.TIX-T421..T473) pass again: one root cause.
  • Task M.TIX-T419 — MS-15. The sync CLI test sets up through ticket levels, not the frozen epic new.
  • Task M.TIX-T418 — MS-15. ticket note <ID> - reads the note from stdin.
  • Task M.TIX-T417 — MS-15. The Assign menu names the global login's real alias.

E11. Tickets 8.0: recoverable, visible, waved — M.TIX-T524 — MS-92

The finished engine: the store restores from its dump, the viewer shows links and history, Tickets computes the build waves itself, then 8.0 is released.

F11.1 Restore from dump — M.TIX-T525 — MS-92

  • S11.1.1 db restore from dump — M.TIX-T526 — MS-92 (requires F10.3, the end of MS-15). As the owner, tickets db restore rebuilds the store from data/Tickets.sql and proves it matches, so a corrupt or conflicted binary is never data loss. Acceptance: given the committed dump, when I restore into a scratch store, then row counts match per table, db check is clean and every view renders unchanged.
  • S11.2.1 View shows links and history — M.TIX-T528 — MS-92. As the owner, tickets view shows a ticket's links both ways, its history and notes, and IDs in text link to their ticket. Acceptance: given a blocked ticket, when I open it in the view, then I see what it waits for.

F11.4 Build waves from the plan — M.TIX-T531 — MS-92 (575)

  • S11.4.1 tickets waterfall command — M.TIX-T532 — MS-92. As the owner and the Orchestrator, tickets waterfall [--json] lists every open leaf by wave (wave 0 = nothing open to wait for; a container prerequisite counts as its leaves; cycles reported), so that the plan's owner computes build order and MindAttic.Agency's shared/waterfall/build-waterfall.ps1 only renders it. Acceptance: given the workspace, when the command runs, then its waves match the script's and no leaf is missing.

F11.3 Polish and release 8.0 — M.TIX-T529 — MS-92

  • S11.3.1 Release 8.0 with sign-off — M.TIX-T530 — MS-92 (requires T526, T528, T532). As the owner, 8.0.0 is deployed to R: Debug and Release with the CLI reinstalled, the docs match it, and I sign it off as the finished product.

Added by MAT-T477 (owner stories and cross-repo links)

  • F M.TIX-T533 Desktop updates live over Relay (epic M.TIX-T524, MS-92)
    • S M.TIX-T534 Desktop hears changes over Relay: requires M.RLY-T87; related M.RLY-T89. Given Tickets Desktop is open, when any agent closes, files or links a ticket, then the change shows within seconds, delivered over Relay.

The plan reasons about itself — M.TIX-T543 (added by M.TIX-T695)

Change intake: stop, decompose, resume — M.TIX-T695 — open

The Visionary's mid-build change is placed against the single source, decomposed into the right pieces, and work resumes from handoffs. Tickets owns steps 2-3 (tickets change "<request>" [--repo X] [--apply], dry run by default); the Orchestrator owns the pause and resume (M.ORCH-T2532).

  • Place a change — M.TIX-T697 (task T701). As the Visionary, one sentence is placed against docs/ECOSYSTEM.md §1 and the repo's SPEC and open tree: fits under a named container, conflicts, or is new scope. Acceptance: the placement and its reason print, from one model call through Legion.
  • Conflict becomes question — M.TIX-T698 (task T702). Acceptance: a conflicting request files exactly one interview ticket (proposed) holding one precise question, and nothing else.
  • Decompose into pieces — M.TIX-T699 (tasks T703, T704). Acceptance: leaves with level, parent and requires; the membranes the change leaves missing (the tickets membranes rule); links between new and existing parts; invalidated work named for reopening with its reason; the container's build waves before and after.
  • Plan diff and apply — M.TIX-T700 (task T705). Acceptance: the dry run writes nothing and prints the diff; --apply writes exactly the reviewed diff (fitting work approved, new scope proposed with a SPEC line and change-log row).
  • Change intake works as one (membrane) — M.TIX-T706 (requires T697-T700). Acceptance: one recorded joined run on a real repo mid-build, the plan diff shown.

Filed after this spec was written (MAT-T478)

Open tickets filed after the last spec pass, listed under their parent until the spec tree is rendered from the plan (M.TIX-T535).

  • Under M.TIX-T531 Build waves from the plan
    • M.TIX-T535 (story) Spec tree section rendered from the plan

5. Non-functional requirements

  • Windows, .NET 10; the solution builds with 0 warnings (TreatWarningsAsErrors, Nullable).
  • The store is append-only: ticket rows are never deleted; only status, ref and the sanctioned, logged corrections change.
  • No LLM calls of its own: the plan-reasoning commands (reason, gaps, change) ask one model through MindAttic.Legion, whose keys live only in MindAttic.Vault; no credential in the repo (the GitHub token comes from MindAttic.Vault).
  • Many agents write at once: SQL Server is the store of record; the SQLite copy is kept current after every write.
  • Tickets Desktop is usable by keyboard alone and announces changes to screen readers; it refreshes by delta.
  • Destructive workspace jobs preview by default and never lose what exists only on this machine.

6. Interfaces and dependencies

  • Platform concerns it uses (ECOSYSTEM §2.1): credentials: MindAttic.Vault (GitHub token); UI controls: MindAttic.Components.Wpf; logging: MindAttic.Log; browser: MindAttic.Browser (tickets view); app-to-app messages: the Orchestrator's bus today, MindAttic.Relay later; shipping: run.ps1 over Agency's deploy-lib. Outside: local SQL Server, git, the GitHub API (repo index).
  • Concern it owns: the plan, including build order (F11.4).
  • Used by: every agent and CLI (tickets global tool), the commit-msg hook and commit gate, MindAttic.Orchestrator (queue, claims, milestones, the app bus), MindAttic.Launcher, and every repo's generated docs/USER_STORIES.md.

7. Release sequence

  1. MS-15 — MindAttic.Tickets 7.0: the planning tree (active; docs/RELEASE.md): E7-E10, ending with F10.3 Ship 7.0.
  2. MS-92 — MindAttic.Tickets 8.0: the finished ticket engine (planned): E11, ending with F11.3 Polish and release 8.0. When it is reached the product is finished; further work is bug fixes only.

8. Change log

Date Change to scope Ticket
2026-11-30 Specification written from README, BIBLE, docs, code and the ticket history; built product mirrored as closed epics E1-E6; MS-92 added for the last of the product MAT-T363
2026-11-30 MAT-T462 single-source pass: 9 renamed (every open epic to an outcome; E10 "Tickets 7.0 released" is the closing epic, its "hygiene" bucket wording dropped; F10.4 "Reported defects closed"); new F11.4 Build waves from the plan (M.TIX-T531/T532) so the plan owner, not Agency, computes the waterfall; 8 requires added MAT-T463
2026-11-30 MAT-T477 owner story for Relay adoption MAT-T477
2026-11-30 MAT-T478 spec drift repaired: 1 open tickets filed after the spec listed in section 4 MAT-T478
2026-12-01 Change intake (Visionary request): feature T695 under T543 with stories T697-T700, membrane T706; pause/resume filed as M.ORCH-T2532; §5 "No LLM calls" corrected to name the Legion-routed reasoning commands M.TIX-T695
From MindAttic.Tickets/docs/SPEC.md via MindAttic.Docs; synced automatically, so edit the repo, not this page.