Jump to content

Automata/SPEC

From MindAttic Docs

Automata — 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: An automation driver (docs/ECOSYSTEM.md §2.1): the platform's tool for unattended chores on websites with no API, so no product scripts a browser on its own.

Automata is record-once, replay-many browser automation for Windows, for the owner's own unattended chores on websites that have no API. A task is recorded by doing it once in a live WebView2 pane, refined as a typed step tree, and replayed or scheduled by the headless automata-runner, with an element resolver that keeps working after a site redesign. The finished product is Automata 3.0: every v3 phase built (NEXT_STEPS.md phases 1-36), the gaps that file lists closed, the periodic tick owned by MindAttic.Scheduler, deployed only on R:, documented and tagged v3.0.0, and used end to end by the owner.

2. Scope boundary

2.1 In the product

  • Recording, the step tree editor, and Gherkin or LLM-drafted authoring.
  • The replay and workflow engines with the self-healing resolver.
  • Datasets, harvesting and one SQLite store; settings in MindAttic Vault.
  • The headless runner, schedules, chains, park and resume.
  • Deployment through the shared run menu to R:\MindAttic\Apps\Automata.

2.2 Never in the product

  • Several instances running the same task at once: cut in phase 31 with every other form of concurrency. One browser runs one task at a time, by design (AUT §3).
  • Recording inside a closed shadow root, or attaching a file inside a cross-origin frame: the browser does not expose what either needs. These are refusals, not gaps.
  • New step actions or wait modes beyond the shipped set: WaitMode.UntilSignal stays undemonstrable.
  • Routing the tool-calling LLM adapters through MindAttic.Legion: Legion's finished product has no tool calling, so Automata keeps its own opt-in adapters.
  • Its own Task Scheduler job: the periodic tick belongs to MindAttic.Scheduler (AUT-T20).
  • Open-ended bughunts, test-suite runs and cleanup sweeps: real bugs are filed one by one as fix tickets.

3. Users and roles

  • The owner: records, refines, schedules and reviews tasks.
  • MindAttic.Scheduler: calls automata-runner tick on its schedule.
  • An opt-in LLM: drafts steps or rescues one failed step, never needed for record or replay.

4. Requirements

Status is built (closed ticket, with evidence) or MS-85, the active milestone and the finished product.

E1. Record and author tasks — AUT-T65 — built

Record a task in the live pane, edit it as a step tree, or author it in plain language.

F1.1 Recording — AUT-T66 — built

  • S1.1.1 Record a task by hand — AUT-T67 — built As the owner, I want to record a task by doing it once in the live pane, so that I never write automation code. Acceptance: given a recording, when I act on a page, including behind open shadow roots and same-origin frames, then each action becomes a step. Evidence: NEXT_STEPS.md phases 18, 34.
  • S1.1.2 Chrome Recorder import and export — AUT-T68 — built As the owner, I want to import and export Chrome Recorder flows and the Automata zip and json formats, so that a task travels between machines and tools. Acceptance: given a task, when I export and import it, then its steps and bindings come back intact. Evidence: RecorderFlowIO (d114b22).

F1.2 Step tree editor — AUT-T69 — built

  • S1.2.1 Edit the step tree — AUT-T70 — built As the owner, I want to refine a recording as a nested step tree with one wrench per row, branches, loops and called tasks, so that a recording becomes a reliable task. Acceptance: given a task, when I nest an if or a loop or call another task, then replay follows the tree. Evidence: NEXT_STEPS.md phases 13, 19-21, 26.
  • S1.2.2 Accessible, themeable sidebar — AUT-T71 — built As the owner, I want a WCAG 2.2 AA sidebar with a light theme, wrapping rows and a detachable panel, so that the editor stays usable at any size. Acceptance: given any window size or theme, when I edit, then rows wrap and every control is keyboard reachable. Evidence: NEXT_STEPS.md phases 1, 24, 25.

F1.3 Language and LLM help — AUT-T72 — built

  • S1.3.1 Author a task in Gherkin — AUT-T73 — built As the owner, I want to write a task as Gherkin or have the LLM draft steps, so that I can start a task without recording it. Acceptance: given Gherkin text, when I import it, then it becomes steps, and bad values become diagnostics. Evidence: NEXT_STEPS.md phase 6; FlowAuthoringService; AUT-T30 (4030502).
  • S1.3.2 LLM rescues one failed step — AUT-T74 — built As the owner, I want an opt-in LLM to repair one step that fails to resolve, so that a run survives a redesign. Acceptance: given a failing step, when repair is on, then only that step is sent, and masked steps never are. Evidence: NEXT_STEPS.md phase 27; AUT-T31 (12f53f3).

E2. Replay engine — AUT-T75 — built

Replay a task faithfully, with self-healing resolution and real control flow.

F2.1 Self-healing resolver — AUT-T76 — built

  • S2.1.1 Elements survive a redesign — AUT-T77 — built As the owner, I want every element remembered eight ways and re-learned on a fallback match, so that a task keeps working when the markup changes. Acceptance: given a changed page, when the first fingerprint misses, then a fallback finds the element and the task saves the healed fingerprint. Evidence: NEXT_STEPS.md phases 30, 35; FingerprintResolver.

F2.2 Workflow engine — AUT-T78 — built

  • S2.2.1 Bindings, outputs and parameters — AUT-T79 — built As the owner, I want steps to bind values, emit outputs and take parameters, so that one task serves many inputs. Acceptance: given a task with a parameter, when it runs with a value, then later steps read it. Evidence: NEXT_STEPS.md phases 4, 5, 15, 16.
  • S2.2.2 Waits and zoom as steps — AUT-T80 — built As the owner, I want waits that really wait and zoom as a step, so that slow or dense pages replay reliably. Acceptance: given a wait step, when the condition is not met, then the run waits until it is or times out. Evidence: NEXT_STEPS.md phases 14, 33.

E3. Data and storage — AUT-T81 — built

F3.1 Datasets and harvesting — AUT-T82 — built

  • S3.1.1 Harvest a page into a dataset — AUT-T83 — built As the owner, I want to harvest a list on a page into a dataset, nested fields as columns, and loop a task over it, so that one recording handles many rows. Acceptance: given a list page, when I harvest it, then each item becomes a row; an empty harvest is refused. Evidence: NEXT_STEPS.md phases 9, 11, 22.

F3.2 One database — AUT-T84 — built

  • S3.2.1 One SQLite store — AUT-T85 — built As the owner, I want everything in one SQLite database with a one-time legacy import, so that nothing is lost between versions. Acceptance: given an older install, when 3.0 starts, then its data is imported once and files are only for sharing. Evidence: NEXT_STEPS.md phase 36; AUT-LAW-1.
  • S3.2.2 Settings in the Vault — AUT-T86 — built As the owner, I want Automata's provider, theme and LLM keys to live in MindAttic Vault, so that they are set once. Acceptance: given a Vault setting, when I change it, then Automata applies it live. Evidence: fab8d57 (AUT-T27).

E4. Unattended runs — AUT-T87 — built

F4.1 Headless runner — AUT-T88 — built

  • S4.1.1 Run a task headless — AUT-T89 — built As the owner, I want automata-runner to run a task in an off-screen lane, so that tasks run without the window. Acceptance: given a task id, when I run it from the command line, then it completes off-screen, one at a time. Evidence: NEXT_STEPS.md phases 7, 31.
  • S4.1.2 Runs tab — AUT-T90 — built As the owner, I want a Runs tab with each run's events and outputs, so that I see what happened while I was away. Acceptance: given finished runs, when I open the tab, then each shows its events and outputs. Evidence: NEXT_STEPS.md phase 7b.

F4.2 Scheduling — AUT-T91 — built

  • S4.2.1 Schedule a task — AUT-T92 — built As the owner, I want to schedule a task with several triggers and chains, so that chores run on their own. Acceptance: given a schedule, when a trigger fires on tick, then the task and its chain run; an unfireable schedule is refused. Evidence: NEXT_STEPS.md phases 8, 8b, 8e.
  • S4.2.2 Park and resume long waits — AUT-T93 — built As the owner, I want a long wait to park, release its lane and resume on a later tick, so that waits cost nothing. Acceptance: given a long wait, when it parks, then a later tick resumes it with its values intact. Evidence: NEXT_STEPS.md phases 8c, 8d.

F4.3 Deploy — AUT-T94 — built

  • S4.3.1 Automata on R: — AUT-T50 — built As the owner, I want Automata.App and automata-runner deployed to R:\MindAttic\Apps\Automata\Debug and \Release, so that I launch the current build. Evidence: 7177f42.

E5. Ship-ready engine — AUT-T53 — MS-85

The engine gaps NEXT_STEPS.md lists, closed.

F5.1 Every demo checks out — AUT-T55 — MS-85

  • AUT-T60 Fix verify-demos failures (task): the park example parks again, wolf-tshirts is accounted for, and node tools/verify-demos.mjs passes every check.

F5.2 Scheduler hand-off — AUT-T56 — MS-85

  • AUT-T20 (task): the app stops registering MindAttic.Automata.Tick; automata-runner tick stays for MindAttic.Scheduler to call.

F5.3 Datasets can be removed — AUT-T57 — MS-85

  • AUT-T61 Delete a dataset (task): a per-dataset delete in the Data tab, confirmed, which hides the dataset per HOUSE-LAW-2, with NUnit coverage.

F5.4 Deploy on R: — AUT-T95 — MS-85

  • AUT-T51 Automata C: cleanup (task): C:\Apps\Automata is gone; Automata runs only from R:.

E6. Polish and release 3.0 — AUT-T54 — MS-85

Docs and tag that describe 3.0 as it ships; this is the polish-and-release step.

F6.1 Documentation describes 3.0 — AUT-T58 — MS-85

  • AUT-T17 (task): docs/overview.md current for 3.0, and NEXT_STEPS.md's phase log moved to docs/HISTORY.md.

F6.2 Release tag — AUT-T59 — MS-85

  • AUT-T62 Tag v3.0.0 (task): after the milestone checks pass, v3.0.0 is tagged on main, and the owner records a Google search by hand, refines it and replays it (MS-85 sign-off check).

5. Non-functional requirements

  • Windows only: WPF host and WebView2 browser; .NET 10.
  • One browser runs one task at a time.
  • The sidebar meets WCAG 2.2 AA; every StepAction, WaitMode and ConditionOp has a seeded demo (AUT-LAW-5).
  • Data lives in %LocalAppData%\MindAttic\Automata\automata.db; deletes hide rows (HOUSE-LAW-2).
  • LLM keys and settings come from MindAttic Vault; no credential is stored in the repo.

6. Interfaces and dependencies

  • Platform owners it relies on (docs/ECOSYSTEM.md): credentials and settings: MindAttic.Vault; scheduled runs: MindAttic.Scheduler; logging: MindAttic.Log; documents: MindAttic.Export; UI: MindAttic.Components; capture: MindAttic.Media.Capture; browser mechanics: Auto.WebNav; shipping: run.ps1 to R:\MindAttic\Apps.
  • Uses: AutoWebNav 5.0.0 (browser mechanics), MindAttic.Components.Wpf, MindAttic.Media.Capture, MindAttic.Vault, MindAttic.Export, MindAttic.Log.
  • Used by: MindAttic.Scheduler, which calls automata-runner tick.

7. Release sequence

  1. MS-85, Automata 3.0: owner-verified record, replay and schedule (active): epics AUT-T53 and AUT-T54. Reaching it finishes the product; nothing the docs describe lies beyond it.

8. Change log

Date Change to scope Ticket
2026-11-30 Specification written from overview, BIBLE, NEXT_STEPS.md, the code and the ticket history; built work filed as AUT-T65..T94; the deploy cleanup seated under AUT-T95 MAT-T390
2026-11-30 MAT-T462 single-source pass: 4 renamed, 0 buckets dissolved (3.0 documentation is the milestone's polish-and-release), 2 requires added, 1 platform link (Scheduler owns the tick); place in the ecosystem and platform owners named MAT-T467
Part of Automata.
From Automata/docs/SPEC.md via MindAttic.Docs; synced automatically, so edit the repo, not this page.