diff --git a/.github/workflows/README.md b/.github/workflows/README.md index 87449876f7..fa4c066585 100644 --- a/.github/workflows/README.md +++ b/.github/workflows/README.md @@ -106,7 +106,7 @@ App 15368 is GitHub Actions, the app the current checks are pinned to. | packages.yml | `types`, `agent` | Python 3.12 | Python 3.12 | Python 3.10 and 3.12 | | packages.yml | `verify-clean-install` | Python 3.12 | Python 3.12 | Python 3.10 and 3.12 | | packages.yml | `flow-lint`, `flow-critical`, `flow-onprem-offline` | yes | yes | yes | -| ci.yml | `smoke` (with the file-size ratchet against the base), `ci` | yes | yes | no | +| ci.yml | `smoke` (with the file-size ratchet against the base and the generated-page check), `ci` | yes | yes | no | | packages.yml | `flow-unit` | 3 shards packed by measured time, fast lane (without `nightly_only.txt`) | no | 2 shards, without the `live ` entries (nightly runs them) | | packages.yml | `flow-native-census` | no | no | Windows and macOS | | packages.yml | `capture-linux` | Python 3.12 | Python 3.12 | Python 3.10 (ubuntu-22.04), 3.11, 3.12 | @@ -131,6 +131,23 @@ App 15368 is GitHub Actions, the app the current checks are pinned to. | codeql.yml | `Analyze` (Python, JavaScript/TypeScript, Rust) | per changed language | per changed language | all languages on main (one analysis at a time, newest waiting push wins) and weekly | | secret-scan.yml, dependency-review.yml, platform-manifest.yml | all | yes | yes | yes | | docs.yml, link-check.yml (internal), production-lifecycle.yml, release-health.yml (self-test) | all | yes | no | main only | +| refresh-generated.yml | `refresh` (opens a draft pull request that regenerates CAPABILITIES.md and llms-full.txt) | no | no | when their sources change on main, daily, and on dispatch | + +## Generated pages + +CAPABILITIES.md and llms-full.txt are generated, and nearly every pull request +changes their sources. When each pull request regenerated them, every merge +made the other open pull requests conflict. Now a pull request edits only the +sources (a row file under `capabilities/`, a command file, README.md, ...), +and `refresh-generated.yml` regenerates both pages after the change lands. It +opens a draft pull request from `bot/refresh-generated--` and closes the +one it replaces; it never pushes to main. GitHub starts no workflows for a +pull request the workflow token opens, so the pull request is a draft, and +marking it ready runs CI. On a pull request, the smoke job's +`build_capabilities.py --check-pr HEAD^1` fails only a hand edit of a page (a +page that matches neither its sources nor the base), since the refresh would +drop it. Main can trail its sources until the refresh merges; nothing strict +runs on main or nightly, so a pending refresh never turns main red. Ubuntu package callers use the composite at the immutable `OpenAdaptAI/OpenAdapt/.github/actions/apt-install@94f724c7dc0b0995a7108b7b99bbb53f0749cb68`. diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a036013b03..54a4ff4707 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -61,6 +61,14 @@ jobs: # file this change grew (or whose budget row it edited), so a file # someone else left over budget never fails an unrelated change. run: python3 scripts/check_file_size_ratchet.py --base HEAD^1 + - name: No generated page was edited by hand + # CAPABILITIES.md and llms-full.txt are generated from sources (row + # files under capabilities/, README.md, ...). A change edits the + # sources only; refresh-generated.yml regenerates the pages after it + # lands. This fails only when the change edits a page so that it no + # longer matches its sources, an edit the next refresh would drop. A + # page that merely trails its sources passes. + run: python3 scripts/build_capabilities.py --check-pr HEAD^1 - uses: astral-sh/setup-uv@1db35dd8eee11c5894872e0b383ae6c406cf738d # v10.4.0 with: enable-cache: true diff --git a/.github/workflows/link-check.yml b/.github/workflows/link-check.yml index 6d8679c52c..ca54ec0b0a 100644 --- a/.github/workflows/link-check.yml +++ b/.github/workflows/link-check.yml @@ -44,6 +44,7 @@ env: --exclude-path '(^|/)(legacy|node_modules|\.venv|growth-worktrees|\.claude)/' --exclude-path 'CHANGELOG\.md$' --exclude-path '/\.github/' + --exclude-path '(^|/)capabilities/' './**/*.md' jobs: @@ -70,8 +71,14 @@ jobs: exit 0 fi files="$(git diff --name-only --diff-filter=d HEAD^1 HEAD -- '*.md' \ - | grep -Ev '(^|/)(legacy|node_modules|\.venv|growth-worktrees|\.claude|\.github)/|(^|/)CHANGELOG\.md$' \ + | grep -Ev '^capabilities/|(^|/)(legacy|node_modules|\.venv|growth-worktrees|\.claude|\.github)/|(^|/)CHANGELOG\.md$' \ | sed "s/.*/'&'/" | tr '\n' ' ' || true)" + # Row files under capabilities/ link relative to CAPABILITIES.md, + # where they print: check the page assembled from them instead. + if git diff --name-only HEAD^1 HEAD -- capabilities | grep -q .; then + python3 scripts/build_capabilities.py + files="$files 'CAPABILITIES.md'" + fi echo "paths=$files" >> "$GITHUB_OUTPUT" echo "Checking: ${files:-nothing}" diff --git a/.github/workflows/refresh-generated.yml b/.github/workflows/refresh-generated.yml new file mode 100644 index 0000000000..23f38cb7e9 --- /dev/null +++ b/.github/workflows/refresh-generated.yml @@ -0,0 +1,156 @@ +name: Refresh generated pages + +# CAPABILITIES.md and llms-full.txt are generated from sources (row files +# under capabilities/, packages/flow/docs/commands/, README.md, the Flow docs +# and changelog). Pull requests change only the sources: when every pull +# request also regenerated the pages, each merge to main made every other +# open pull request conflict. This workflow regenerates both pages from main +# and opens a draft pull request with the result. It never pushes to main. +# +# The pull request is opened with the workflow's own token, and GitHub starts +# no workflows for that, so it opens as a draft: marking it ready for review +# (a person's action) runs CI as usual. A newer refresh closes the older one. +# On a pull request, ci.yml only checks that neither page was edited by hand +# (scripts/build_capabilities.py --check-pr). + +on: + push: + branches: [main] + paths: + - "capabilities/**" + - "packages/flow/docs/commands/**" + - "README.md" + - "packages/flow/docs/SURFACES.md" + - "packages/flow/docs/LIMITS.md" + - "packages/flow/CHANGELOG.md" + - "packages/flow/pyproject.toml" + - "scripts/build_capabilities.py" + - "scripts/build_command_map.py" + - "scripts/build_llms_full.py" + # A merged refresh runs once more, finds nothing to do, and closes any + # refresh pull request it made obsolete. + - "CAPABILITIES.md" + - "llms-full.txt" + schedule: + - cron: "17 6 * * *" + workflow_dispatch: + +permissions: + contents: read + +concurrency: + group: refresh-generated + cancel-in-progress: true + +jobs: + refresh: + name: refresh CAPABILITIES.md and llms-full.txt + runs-on: ubuntu-latest + timeout-minutes: 10 + permissions: + contents: write + pull-requests: write + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + ref: main + # The step below pushes the refresh branch (never main). + persist-credentials: true + - name: Regenerate, and open or replace the refresh pull request + env: + GH_TOKEN: ${{ github.token }} + run: | + set -euo pipefail + # Stop, rather than drop a row, when the page changed outside the + # generator (a pull request whose CI passed before --check-pr). + python3 scripts/build_capabilities.py --guard + python3 scripts/build_capabilities.py + python3 scripts/build_llms_full.py + python3 scripts/build_capabilities.py --check + python3 scripts/build_llms_full.py --check + + prefix="bot/refresh-generated-" + open_prs="$(gh pr list --repo "$GITHUB_REPOSITORY" --state open \ + --author "app/github-actions" --limit 100 \ + --json number,headRefName,body \ + --jq "map(select(.headRefName | startswith(\"$prefix\")))")" + + if git diff --quiet -- CAPABILITIES.md capabilities/CAPABILITIES.md.sha256 llms-full.txt; then + echo "CAPABILITIES.md and llms-full.txt are current." + for number in $(jq -r '.[].number' <<<"$open_prs"); do + gh pr close "$number" --repo "$GITHUB_REPOSITORY" --delete-branch \ + --comment "main already has these pages; nothing to refresh." + done + exit 0 + fi + + digest="$(cat CAPABILITIES.md llms-full.txt | sha256sum | cut -c1-16)" + if jq -e --arg d "content: $digest" 'any(.[]; .body | contains($d))' <<<"$open_prs" >/dev/null; then + echo "An open refresh pull request already has this content ($digest)." + exit 0 + fi + + # Lines the refresh drops from CAPABILITIES.md, for the reviewer: a + # row edited or removed through its row file shows here, and so + # would a hand edit of the page that never reached a row file. + removed="$(git diff -U0 -- CAPABILITIES.md | grep -E '^-[^-]' | cut -c2-200 | head -20 || true)" + sha="$(git rev-parse --short=12 HEAD)" + # The run id keeps a rerun on the same commit off an old branch. + branch="${prefix}${sha}-${GITHUB_RUN_ID}" + git switch -c "$branch" + git add CAPABILITIES.md capabilities/CAPABILITIES.md.sha256 llms-full.txt + git -c user.name="github-actions[bot]" \ + -c user.email="41898282+github-actions[bot]@users.noreply.github.com" \ + commit -q -m "docs: refresh CAPABILITIES.md and llms-full.txt" + git push -q origin "HEAD:refs/heads/$branch" + + body="$(printf '%s\n' \ + "Regenerated from main at ${sha} by \`.github/workflows/refresh-generated.yml\`:" \ + "\`python scripts/build_capabilities.py\` and \`python scripts/build_llms_full.py\`." \ + "" \ + "This is a draft because GitHub runs no workflows for a pull request the workflow token opens. Mark it ready for review to run CI, then merge it like any other." \ + "" \ + "Lines this refresh removes from CAPABILITIES.md (an edited or removed row shows here; anything else is a hand edit to move into capabilities/ first):" \ + "" \ + '```' \ + "${removed:-(none)}" \ + '```' \ + "" \ + "content: ${digest}")" + url="$(gh pr create --repo "$GITHUB_REPOSITORY" --draft --base main \ + --head "$branch" \ + --title "docs: refresh CAPABILITIES.md and llms-full.txt" \ + --body "$body")" + echo "opened $url" + for number in $(jq -r '.[].number' <<<"$open_prs"); do + gh pr close "$number" --repo "$GITHUB_REPOSITORY" --delete-branch \ + --comment "Superseded by $url." + done + + blocked: + name: refresh blocked issue + needs: refresh + if: failure() + runs-on: ubuntu-latest + timeout-minutes: 5 + permissions: + issues: write + steps: + - name: Open, or comment on, the issue + env: + GH_TOKEN: ${{ github.token }} + RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} + run: | + set -euo pipefail + title="CAPABILITIES.md refresh blocked" + body="The refresh of CAPABILITIES.md and llms-full.txt stopped: ${RUN_URL} + + Usually the page on main was edited by hand, so regenerating it would drop that edit. The run log lists the lines no file under capabilities/ produces. Add a row file for each (or edit section.md) and run python scripts/build_capabilities.py in the same pull request." + number="$(gh issue list -R "$GITHUB_REPOSITORY" --state open \ + --search "\"$title\" in:title" --json number,title \ + -q "map(select(.title == \"$title\")) | .[0].number // empty")" + if [ -n "$number" ]; then + gh issue comment "$number" -R "$GITHUB_REPOSITORY" --body "$body" + else + gh issue create -R "$GITHUB_REPOSITORY" --title "$title" --body "$body" + fi diff --git a/CLAUDE.md b/CLAUDE.md index a1bbd8d190..28c3e5871b 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -11,11 +11,16 @@ under `packages/flow`, next to `packages/agent`, `packages/types` and `packages/capture`. The standalone openadapt-flow, openadapt-agent and openadapt-types repositories are frozen; changes go here. [CAPABILITIES.md](CAPABILITIES.md) is the map of what exists and how proven -it is; update it in the same pull request as any capability change. For a -new `openadapt-flow` command, add `packages/flow/docs/commands//.md` -and run `python scripts/build_command_map.py` (a test enforces it). Refresh the review brief with `python scripts/build_llms_full.py` when you -change README.md, CAPABILITIES.md, SURFACES.md, LIMITS.md or the flow -CHANGELOG, and always before a release. +it is. It is generated from `capabilities/`, one file per table row: in the +same pull request as any capability change, add or update your row file +(`capabilities/-
/-.md`, one table line) or the +section's `section.md`. For a new `openadapt-flow` command, add +`packages/flow/docs/commands//.md` (a test enforces it). Do not +regenerate or hand-edit CAPABILITIES.md or llms-full.txt in a pull request: +`.github/workflows/refresh-generated.yml` opens a draft pull request that +refreshes both after the change lands, and CI fails a hand edit. Before a +release, merge the open refresh pull request (or run the workflow) so the +review brief names the new version. The current product compiles demonstrated GUI workflows into deterministic, locally executable programs. Healthy runs make no model calls. Training, diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index edebd53ca8..fd97802749 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -76,6 +76,12 @@ package availability, repository text, or a sibling repository. - Test durable behavior and package contracts rather than ordinary copy. - Keep changes focused and update the canonical documentation when behavior changes. +- A capability change documents itself in the same pull request: add or edit + its row file under `capabilities/` (one file per row of the + [CAPABILITIES.md](CAPABILITIES.md) tables; `capabilities/README.md` says + how). Don't edit or regenerate `CAPABILITIES.md` or `llms-full.txt`: a + workflow regenerates them after your change lands, so your pull request + doesn't conflict with the others that add rows. CI fails a hand edit. - Never place customer-derived data, deployment recipes, or secrets in a public fixture or package artifact. diff --git a/capabilities/00-what-openadapt-can-do/section.md b/capabilities/00-what-openadapt-can-do/section.md new file mode 100644 index 0000000000..ac85c576d9 --- /dev/null +++ b/capabilities/00-what-openadapt-can-do/section.md @@ -0,0 +1,23 @@ +# What OpenAdapt can do + +OpenAdapt turns a task that a person or an AI agent does once in an +application into a program that repeats it with new inputs. The program makes +the same entry every time with no calls to a hosted AI model, checks that the +entry landed in the right record by reading it back, and stops instead of +guessing. It is for web, desktop and remote-desktop applications with no +usable API. EMRs and payer portals are examples of highly regulated settings +where those checks matter most. + +This page indexes what OpenAdapt implements, with the status, the evidence and +the code for each capability: + +- [Ten capabilities](#openadapt-in-ten-capabilities) and [often missed](#often-missed) +- [The core: a checked entry](#the-core-a-checked-entry-every-time), + [approvals](#approvals), [branching work](#branching-work-not-one-linear-path) +- [Surfaces](#surfaces), [the fastest layer](#the-fastest-layer-the-app-allows), + [when the app changes](#when-the-app-changes) +- [Computer-use agents](#computer-use-agents), + [recording, privacy and proof](#recording-privacy-and-proof) +- [Every command](#every-command-by-capability) and + [measured results](#measured-results) + diff --git a/capabilities/01-openadapt-in-ten-capabilities/section.md b/capabilities/01-openadapt-in-ten-capabilities/section.md new file mode 100644 index 0000000000..f8c89726d3 --- /dev/null +++ b/capabilities/01-openadapt-in-ten-capabilities/section.md @@ -0,0 +1,75 @@ +## OpenAdapt in ten capabilities + +Each capability is implemented in the +[OpenAdapt monorepo](https://github.com/OpenAdaptAI/OpenAdapt). "Released" +means it ships in the current PyPI packages; "on main" means merged into the +monorepo and installable from source. + +1. **Learns from any successful run, a person's or an agent's.** A person + records a task, or a computer-use agent does it once and OpenAdapt compiles + the verified run into a program (`openadapt_flow.jit`, released; + prompt-to-program `compile-agent`, on main; the agent acts through code by + default, not screenshots, and every save the gate detects in its run is read + back, [#1305](https://github.com/OpenAdaptAI/OpenAdapt/pull/1305)). Agents can drive the recording + through the web, native Windows, RDP and Citrix backends. An agent connected over MCP can + teach itself a new workflow and then call it as a tool + (`openadapt-agent serve --teach`, + [#1335](https://github.com/OpenAdaptAI/OpenAdapt/pull/1335)). +2. **Compiles to the fastest layer the app allows.** Page structure first (DOM, + Windows UI Automation, macOS Accessibility), direct API calls where the app's + own traffic allows them (`ApiActuator`, released; compiled from captured + traffic in [#1261](https://github.com/OpenAdaptAI/OpenAdapt/pull/1261)), + and pixels only + where nothing else exists, such as a remote desktop. It is not a pixel-macro + recorder. +3. **Builds branching programs, not one linear path.** One program from several + demonstrations (`induce`, `disambiguate`), a branch learned from several + halts fixed the same way (`teach-branch`), candidate branches mined from many + real runs in the background (shadow mode, + [#1212](https://github.com/OpenAdaptAI/OpenAdapt/pull/1212)), and a router + that sends each item to the right verified variant. Shadow mining and the + router are on main; the rest is released. +4. **Works across surfaces in one workflow.** Backends for web, native Windows + and macOS, Linux, RDP and Citrix. Programs chain across surfaces passing confirmed values + (`compose`, `process`, released), and one program can switch surfaces, tabs + and popups mid-run ([#1197](https://github.com/OpenAdaptAI/OpenAdapt/pull/1197)). +5. **Confirms the right record before every write and reads it back after.** + The record check reads the system of record (API, database, FHIR with SMART + Backend Services, or a separate signed-in session), never just the screen. + `record --verify` proposes those checks from what the demonstration changed. + Released. +6. **Stops instead of improvising, and never retries an uncertain save.** A run + that can't prove a save ends `HALTED_BEFORE_EFFECT` or + `RECONCILIATION_REQUIRED`, never "success". A ledger of what changed before + a stop, with undo steps a person approves, is on main. The rest is + released. +7. **Approvals are bound to exactly what will be saved.** Each save waits for a + person by default and can be answered on a paired phone with one card per + decision. The approval is bound to the exact screenshot and form state, and + the form is read again before saving, so what was approved is what is saved. + Person-signed grants let named agents answer. Released. +8. **Repairs itself, with a person approving.** Governed repair (propose, + review, campaign, canary, rollback), agent-demonstrated fixes for a halted + run, and fleet drift patches shared with no patient data (moved as files + or through a local reference hub) are released. + Self-repair, where an agent proposes a fix and Flow probes it up to the save + without saving, is on main, and so are fixes of up to three new steps. + Self-repair is qualified on browser runs ([benchmark/auto_repair](packages/flow/benchmark/auto_repair/README.md)) + and end to end on native macOS AX ([#1715](https://github.com/OpenAdaptAI/OpenAdapt/pull/1715)). Outside a browser it + runs with `repair.session` ([#1717](https://github.com/OpenAdaptAI/OpenAdapt/pull/1717)), and native and pixel backends + admit its new clicks by element identity ([#1709](https://github.com/OpenAdaptAI/OpenAdapt/pull/1709)). Teaching the fix + for a halted run (`--hold-on-halt`) and rollback are tested on browser runs. +9. **Is a safety layer underneath any agent.** An agent's MCP calls, a task + ledger that keeps a long job's rules, items, questions and checked saves on + the server ([#1332](https://github.com/OpenAdaptAI/OpenAdapt/pull/1332)), a guarded save around any agent's write + ([#1258](https://github.com/OpenAdaptAI/OpenAdapt/pull/1258)), a guard for + an agent you already run that holds its browser's saves with no change to + the agent ([#1357](https://github.com/OpenAdaptAI/OpenAdapt/pull/1357)), `verify-run` + to judge any executor's write from the system of record, and Agent Skills and + a CLI for coding agents. Released except where a PR is named. +10. **Runs locally and keeps data private.** Healthy runs make no calls to a + hosted AI model and send nothing out. Personal and health data are redacted from text, + screenshots and structure (scrub-by-default for anything that leaves the + machine is on main); a strict no-outbound mode, an unattended on-prem + service, and signed, timestamped receipts are released. + diff --git a/capabilities/02-often-missed/0010-learns-branching-programs-from-several.md b/capabilities/02-often-missed/0010-learns-branching-programs-from-several.md new file mode 100644 index 0000000000..ddfd5ba298 --- /dev/null +++ b/capabilities/02-often-missed/0010-learns-branching-programs-from-several.md @@ -0,0 +1 @@ +| Learns branching programs from several demonstrations, from repeated halts, and from many background runs. | `induce`, `teach-branch`, [SHADOW_MINING.md](packages/capture/docs/SHADOW_MINING.md), [LEARN_FROM_MANY_RUNS.md](packages/flow/docs/LEARN_FROM_MANY_RUNS.md) | diff --git a/capabilities/02-often-missed/0020-chains-programs-across-surfaces-and-one-program.md b/capabilities/02-often-missed/0020-chains-programs-across-surfaces-and-one-program.md new file mode 100644 index 0000000000..3407d92422 --- /dev/null +++ b/capabilities/02-often-missed/0020-chains-programs-across-surfaces-and-one-program.md @@ -0,0 +1 @@ +| Chains programs across surfaces, and one program can switch surfaces, tabs and popups mid-run. | `compose`, `process`, [#1197](https://github.com/OpenAdaptAI/OpenAdapt/pull/1197) | diff --git a/capabilities/02-often-missed/0030-uses-page-structure-first-on-web-windows-macos.md b/capabilities/02-often-missed/0030-uses-page-structure-first-on-web-windows-macos.md new file mode 100644 index 0000000000..a25ea889ed --- /dev/null +++ b/capabilities/02-often-missed/0030-uses-page-structure-first-on-web-windows-macos.md @@ -0,0 +1 @@ +| Uses page structure first on web, Windows, macOS and Linux, with pixels as the fallback for remote desktops. Benchmarks labelled "vision-only" ran a deliberately pixel-only arm. | [RESOLUTION_LADDER.md](packages/flow/docs/RESOLUTION_LADDER.md) | diff --git a/capabilities/02-often-missed/0040-replaces-a-single-html-form-submission-with-the.md b/capabilities/02-often-missed/0040-replaces-a-single-html-form-submission-with-the.md new file mode 100644 index 0000000000..b96c3e6a85 --- /dev/null +++ b/capabilities/02-often-missed/0040-replaces-a-single-html-form-submission-with-the.md @@ -0,0 +1 @@ +| Replaces a single HTML form submission with the request the app itself sends, compiled from the network traffic captured while recording, then reads the record back. URL-encoded and file-less multipart saves, the clicked button's value, and saves the page's script sends to another endpoint are covered. JSON saves (GraphQL mutations included) are bound by JSON pointer and sent with the headers the app's own script sends in the session. Uploads, multi-step wizards and governed runs still use the screen steps. | `api`, [API_TIER.md](packages/flow/docs/API_TIER.md) | diff --git a/capabilities/02-often-missed/0050-builds-the-record-check-itself-after-a-save-the.md b/capabilities/02-often-missed/0050-builds-the-record-check-itself-after-a-save-the.md new file mode 100644 index 0000000000..131627e934 --- /dev/null +++ b/capabilities/02-often-missed/0050-builds-the-record-check-itself-after-a-save-the.md @@ -0,0 +1 @@ +| Builds the record check itself. After a save, the app usually reads the record back to show it; `scaffold-verifier` finds that read in the captured traffic or a read-only database, builds the check from it and tries to break it before a person reviews it. No API or SQL needs to be written by hand. | [EFFECT_KIT.md](packages/flow/docs/EFFECT_KIT.md#a-record-check-built-from-the-apps-own-reads-scaffold-verifier) | diff --git a/capabilities/02-often-missed/0060-checks-a-save-on-desktop-rdp-and-citrix-apps.md b/capabilities/02-often-missed/0060-checks-a-save-on-desktop-rdp-and-citrix-apps.md new file mode 100644 index 0000000000..92d84c7ef7 --- /dev/null +++ b/capabilities/02-often-missed/0060-checks-a-save-on-desktop-rdp-and-citrix-apps.md @@ -0,0 +1 @@ +| Checks a save on desktop, RDP and Citrix apps with no API at all, by looking the record up in the app's own screens in a separate session. | [EFFECT_KIT.md](packages/flow/docs/EFFECT_KIT.md#separate-session-desktop-read-back-desktop_readback) | diff --git a/capabilities/02-often-missed/0070-reads-a-web-save-back-a-second-time-when-the-app.md b/capabilities/02-often-missed/0070-reads-a-web-save-back-a-second-time-when-the-app.md new file mode 100644 index 0000000000..e868268e8d --- /dev/null +++ b/capabilities/02-often-missed/0070-reads-a-web-save-back-a-second-time-when-the-app.md @@ -0,0 +1 @@ +| Reads a web save back a second time when the app has no API or database read: a separate, freshly signed-in session reads a search view the save didn't show, counts duplicates, reads the app's audit log for collateral changes, and settles portal saves that are "pending review" with a later read. It is graded a screen read-back, never the system-of-record check. On OpenEMR and Dolibarr, direct or behind a bad-VPN proxy, the only planted fault it confirmed was a collateral edit when no audit view was declared. | [EFFECT_KIT.md](packages/flow/docs/EFFECT_KIT.md#when-a-ui-read-counts), [benchmark/ui_second_read](packages/flow/benchmark/ui_second_read/RESULTS.md) | diff --git a/capabilities/02-often-missed/0080-keeps-pixel-path-runs-working-across-display.md b/capabilities/02-often-missed/0080-keeps-pixel-path-runs-working-across-display.md new file mode 100644 index 0000000000..e4bfc7544f --- /dev/null +++ b/capabilities/02-often-missed/0080-keeps-pixel-path-runs-working-across-display.md @@ -0,0 +1 @@ +| Keeps pixel-path runs working across display scaling from 100% to 175% and font smoothing on or off, and stops rather than saves when the record changed. | [benchmark/pixel_scale](packages/flow/benchmark/pixel_scale/README.md) | diff --git a/capabilities/02-often-missed/0090-lists-every-change-made-before-a-stop-and-rolls.md b/capabilities/02-often-missed/0090-lists-every-change-made-before-a-stop-and-rolls.md new file mode 100644 index 0000000000..03f2200c05 --- /dev/null +++ b/capabilities/02-often-missed/0090-lists-every-change-made-before-a-stop-and-rolls.md @@ -0,0 +1 @@ +| Lists every change made before a stop and rolls it back with compensations a person approved once, then proves it by reading the whole database: equal to the read from before the run is `ROLLED_BACK`, anything else names the exact rows. | `undo`, `rollback`, [ROLLBACK.md](packages/flow/docs/ROLLBACK.md), [AFTER_A_STOP.md](packages/flow/docs/AFTER_A_STOP.md) | diff --git a/capabilities/02-often-missed/0100-clears-a-known-interruption-a-session-warning-a.md b/capabilities/02-often-missed/0100-clears-a-known-interruption-a-session-warning-a.md new file mode 100644 index 0000000000..b409f99d8f --- /dev/null +++ b/capabilities/02-often-missed/0100-clears-a-known-interruption-a-session-warning-a.md @@ -0,0 +1 @@ +| Clears a known interruption (a session warning, a banner, a tour) by itself, only when the dismissal is provably read-only: matched by its text and control, a closed set of non-committing labels, no write seen by the browser write fence or the system-of-record read-back, and the step's normal identity check afterwards. Anything else stops the run. Classes are per-app data. | [INTERRUPTION_RECOVERY.md](packages/flow/docs/INTERRUPTION_RECOVERY.md) | diff --git a/capabilities/02-often-missed/0110-repairs-itself-when-the-app-changes-governed.md b/capabilities/02-often-missed/0110-repairs-itself-when-the-app-changes-governed.md new file mode 100644 index 0000000000..501d8d90f2 --- /dev/null +++ b/capabilities/02-often-missed/0110-repairs-itself-when-the-app-changes-governed.md @@ -0,0 +1 @@ +| Repairs itself when the app changes: governed repair, agent-demonstrated fixes, fleet patches, and self-repair probed up to the save. | [REPAIR_LIFECYCLE.md](packages/flow/docs/REPAIR_LIFECYCLE.md) | diff --git a/capabilities/02-often-missed/0120-repairs-a-change-that-needs-new-steps-such-as-a.md b/capabilities/02-often-missed/0120-repairs-a-change-that-needs-new-steps-such-as-a.md new file mode 100644 index 0000000000..d7df34d8c1 --- /dev/null +++ b/capabilities/02-often-missed/0120-repairs-a-change-that-needs-new-steps-such-as-a.md @@ -0,0 +1 @@ +| Repairs a change that needs new steps, such as a new required dialog or a control moved into a menu: up to three new steps, each with its own record check, probed up to the save before one person approves. | [SELF_REPAIR.md](packages/flow/docs/SELF_REPAIR.md), [#1325](https://github.com/OpenAdaptAI/OpenAdapt/pull/1325) | diff --git a/capabilities/02-often-missed/0130-compiles-a-computer-use-agent-s-verified-run.md b/capabilities/02-often-missed/0130-compiles-a-computer-use-agent-s-verified-run.md new file mode 100644 index 0000000000..62dd61be53 --- /dev/null +++ b/capabilities/02-often-missed/0130-compiles-a-computer-use-agent-s-verified-run.md @@ -0,0 +1 @@ +| Compiles a computer-use agent's verified run, with no human demonstration needed. | [JIT.md](packages/flow/docs/JIT.md) | diff --git a/capabilities/02-often-missed/0140-the-agent-that-does-a-task-once-acts-through.md b/capabilities/02-often-missed/0140-the-agent-that-does-a-task-once-acts-through.md new file mode 100644 index 0000000000..742fc16f1f --- /dev/null +++ b/capabilities/02-often-missed/0140-the-agent-that-does-a-task-once-acts-through.md @@ -0,0 +1 @@ +| The agent that does a task once acts through code by default, not a screenshot-and-click loop: it reads the page or accessibility tree, acts by role and name, keeps notes with a sandboxed read-only shell, and asks for a screenshot only when it needs one. Every save the save gate detects is read back from the system of record before the agent goes on. Scoreboard arm 7, MockMed items 21 to 40: 18 of 18 normal items correct at $0.0093 an item; the wrong-patient save landed and the read-back then stopped the run; the scoreboard counts 1 silent wrong save by its word rule, a safe stop on hand review ([HAND_REVIEW.md](packages/flow/benchmark/scoreboard/raw/mockmed/code_agent/2026-10-25-rb/HAND_REVIEW.md)). The program compiled from it: 18 of 18 at $0. | `CODE_AS_ACTION.md` in [#1305](https://github.com/OpenAdaptAI/OpenAdapt/pull/1305) | diff --git a/capabilities/02-often-missed/0150-binds-each-approval-to-the-exact-screenshot-and.md b/capabilities/02-often-missed/0150-binds-each-approval-to-the-exact-screenshot-and.md new file mode 100644 index 0000000000..3f4276383c --- /dev/null +++ b/capabilities/02-often-missed/0150-binds-each-approval-to-the-exact-screenshot-and.md @@ -0,0 +1 @@ +| Binds each approval to the exact screenshot and form state, and re-reads the form before saving. | [APPROVAL_MODES.md](packages/flow/docs/APPROVAL_MODES.md) | diff --git a/capabilities/02-often-missed/0160-has-a-written-threat-model-for-prompt-injection.md b/capabilities/02-often-missed/0160-has-a-written-threat-model-for-prompt-injection.md new file mode 100644 index 0000000000..d18c2b5353 --- /dev/null +++ b/capabilities/02-often-missed/0160-has-a-written-threat-model-for-prompt-injection.md @@ -0,0 +1 @@ +| Has a written threat model for prompt injection against the agent that teaches or repairs a program, with tests. | [THREAT_MODEL.md](packages/flow/docs/THREAT_MODEL.md) | diff --git a/capabilities/02-often-missed/0170-fills-inputs-from-a-referral-pdf-fax-image-or.md b/capabilities/02-often-missed/0170-fills-inputs-from-a-referral-pdf-fax-image-or.md new file mode 100644 index 0000000000..43762d161b --- /dev/null +++ b/capabilities/02-often-missed/0170-fills-inputs-from-a-referral-pdf-fax-image-or.md @@ -0,0 +1 @@ +| Fills inputs from a referral PDF, fax image or email, and holds back anything unclear for a person. | `intake`, [INTAKE.md](packages/flow/docs/INTAKE.md) | diff --git a/capabilities/02-often-missed/0180-ships-as-one-monorepo-with-separately.md b/capabilities/02-often-missed/0180-ships-as-one-monorepo-with-separately.md new file mode 100644 index 0000000000..612987630a --- /dev/null +++ b/capabilities/02-often-missed/0180-ships-as-one-monorepo-with-separately.md @@ -0,0 +1 @@ +| Ships as one monorepo with separately installable packages (flow, agent, types, capture, privacy, desktop and tray), each released from the monorepo. | [README](README.md) | diff --git a/capabilities/02-often-missed/0190-makes-no-calls-to-a-hosted-ai-model-on-healthy.md b/capabilities/02-often-missed/0190-makes-no-calls-to-a-hosted-ai-model-on-healthy.md new file mode 100644 index 0000000000..ffd7b3b567 --- /dev/null +++ b/capabilities/02-often-missed/0190-makes-no-calls-to-a-hosted-ai-model-on-healthy.md @@ -0,0 +1 @@ +| Makes no calls to a hosted AI model on healthy runs. Model training (openadapt-ml) is separate research. | [README](README.md) | diff --git a/capabilities/02-often-missed/section.md b/capabilities/02-often-missed/section.md new file mode 100644 index 0000000000..f2163383c8 --- /dev/null +++ b/capabilities/02-often-missed/section.md @@ -0,0 +1,6 @@ +## Often missed + +| What OpenAdapt does | Where | +| --- | --- | + + diff --git a/capabilities/03-the-full-map/section.md b/capabilities/03-the-full-map/section.md new file mode 100644 index 0000000000..06e206b19f --- /dev/null +++ b/capabilities/03-the-full-map/section.md @@ -0,0 +1,18 @@ +## The full map + +Every capability, with its status, its evidence and where it lives. + +Status: + +- **Released**: in the current releases: `openadapt` 1.19.0 and openadapt-flow + 2.5.0 on PyPI, and Desktop 0.25.0 for Desktop rows. +- **On main**: merged into the monorepo; installable from source. + +Evidence: + +- **Real app**: run against a real third-party application, such as a local + OpenEMR or openIMIS. +- **Synthetic**: run against OpenAdapt's own test apps (MockMed and fixtures). + +All patient and claim data in every test and benchmark is synthetic. + diff --git a/capabilities/04-the-core-a-checked-entry-every-time/0010-compile-one-or-more-demonstrations-into-a.md b/capabilities/04-the-core-a-checked-entry-every-time/0010-compile-one-or-more-demonstrations-into-a.md new file mode 100644 index 0000000000..1f41a1ed66 --- /dev/null +++ b/capabilities/04-the-core-a-checked-entry-every-time/0010-compile-one-or-more-demonstrations-into-a.md @@ -0,0 +1 @@ +| Compile one or more demonstrations into a deterministic program | Released | Real app (OpenEMR referral, 62 timed runs) | `openadapt-flow record`, `compile`; [packages/flow](packages/flow/README.md) | diff --git a/capabilities/04-the-core-a-checked-entry-every-time/0020-try-the-three-acts-on-a-real-app-openadapt.md b/capabilities/04-the-core-a-checked-entry-every-time/0020-try-the-three-acts-on-a-real-app-openadapt.md new file mode 100644 index 0000000000..117a8fbe60 --- /dev/null +++ b/capabilities/04-the-core-a-checked-entry-every-time/0020-try-the-three-acts-on-a-real-app-openadapt.md @@ -0,0 +1 @@ +| Try the three acts on a real app: `openadapt quickstart --app openemr` runs the certified OpenEMR referral program in Docker, five referrals at once checked in OpenEMR's record, then a possible duplicate stopped before saving; without Docker or a clone it says so and exits 2 | On main ([#1431](https://github.com/OpenAdaptAI/OpenAdapt/pull/1431)) | Real app (local OpenEMR 8.0.0.3, synthetic patients) | `openadapt quickstart --app openemr`; [docs/quickstart](docs/quickstart/README.md#on-a-real-app---app-openemr) | diff --git a/capabilities/04-the-core-a-checked-entry-every-time/0030-run-the-quickstart-without-taking-over-the.md b/capabilities/04-the-core-a-checked-entry-every-time/0030-run-the-quickstart-without-taking-over-the.md new file mode 100644 index 0000000000..618dba2917 --- /dev/null +++ b/capabilities/04-the-core-a-checked-entry-every-time/0030-run-the-quickstart-without-taking-over-the.md @@ -0,0 +1 @@ +| Run the quickstart without taking over the screen: `uvx --python 3.12 openadapt@latest quickstart` keeps the browser hidden and shows progress in the terminal (`--watch` shows the window, `--open` opens the Seal page), runs a run whose starting screen never settles once more in a new folder and otherwise says why in plain words, and reruns itself with Python 3.12 under `uvx` on an unsupported Python. Flow's page settle hands a page that draws no frames (a covered headed window) to the screenshot check instead of waiting out its timeout | On main ([#2365](https://github.com/OpenAdaptAI/OpenAdapt/pull/2365)) | Unit tests; headless terminal captures at 80, 120 and 250 columns for Terminal.app, WezTerm and iTerm2 settings; a headed covered-window run is not reproduced here | `openadapt quickstart`; [openadapt/quickstart](openadapt/quickstart/__init__.py), [_page_quiescence.py](packages/flow/openadapt_flow/backends/_page_quiescence.py) | diff --git a/capabilities/04-the-core-a-checked-entry-every-time/0040-classify-common-local-edits-without-a-person.md b/capabilities/04-the-core-a-checked-entry-every-time/0040-classify-common-local-edits-without-a-person.md new file mode 100644 index 0000000000..0bb1396a47 --- /dev/null +++ b/capabilities/04-the-core-a-checked-entry-every-time/0040-classify-common-local-edits-without-a-person.md @@ -0,0 +1 @@ +| Classify common local edits without a person (select-all, Enter in a field or dropdown, an in-form tab, an informational dialog's dismiss), only when the recording's network capture shows no write and a runtime check confirms only the expected change | Released ([#1366](https://github.com/OpenAdaptAI/OpenAdapt/pull/1366)) | Synthetic; OpenEMR referral recording re-admitted offline (violations 12 to 1 under `permissive`) | [LOCAL_EDIT_CLASSIFICATION.md](packages/flow/docs/design/LOCAL_EDIT_CLASSIFICATION.md), `compiler/local_edit.py` | diff --git a/capabilities/04-the-core-a-checked-entry-every-time/0050-keep-the-empty-search-result-a-person-confirmed.md b/capabilities/04-the-core-a-checked-entry-every-time/0050-keep-the-empty-search-result-a-person-confirmed.md new file mode 100644 index 0000000000..e99d8140f9 --- /dev/null +++ b/capabilities/04-the-core-a-checked-entry-every-time/0050-keep-the-empty-search-result-a-person-confirmed.md @@ -0,0 +1 @@ +| Keep the empty search result a person confirmed through (a duplicate check's "No matches were found.") as an exact check after the click that opens the dialog and again right before Confirm, so a run whose dialog lists a match stops before the save; only fixed-vocabulary search-result statements shown once, never text with a name or search term, and a confirmation dialog without one is noted in `compile_notes.json` | On main | Real app frames (an OpenEMR referral recording, compiled offline) | `compiler/empty_result_guard.py` | diff --git a/capabilities/04-the-core-a-checked-entry-every-time/0060-mine-that-check-in-any-language-induction-keeps.md b/capabilities/04-the-core-a-checked-entry-every-time/0060-mine-that-check-in-any-language-induction-keeps.md new file mode 100644 index 0000000000..94ddda899d --- /dev/null +++ b/capabilities/04-the-core-a-checked-entry-every-time/0060-mine-that-check-in-any-language-induction-keeps.md @@ -0,0 +1 @@ +| Mine that check in any language: induction keeps the one line a named dialog adds (not its title or buttons, not a question, no typed value or number) when two or more demonstrations whose typed values all differ show the same line, refuses when the demonstrations disagree on a mined check instead of copying the first one's, and qualification then needs a business-rule run that halts at it | On main | Synthetic (a search dialog recorded in Chromium by the real recorder, German statement, real OCR) | `compiler/empty_result_guard.py`, `compiler/induction.py` | diff --git a/capabilities/04-the-core-a-checked-entry-every-time/0070-qualify-against-a-rule-the-app-itself-enforces.md b/capabilities/04-the-core-a-checked-entry-every-time/0070-qualify-against-a-rule-the-app-itself-enforces.md new file mode 100644 index 0000000000..bc370ea501 --- /dev/null +++ b/capabilities/04-the-core-a-checked-entry-every-time/0070-qualify-against-a-rule-the-app-itself-enforces.md @@ -0,0 +1 @@ +| Qualify against a rule the app itself enforces: verify.yaml `business_rules` seed the conflicting record (an existing chart for the same person, checked in the read-back), and the certified bundle must stop at the rule's check before the save with nothing written on every trial, or certification is withdrawn | On main | Unit tests; the OpenEMR fixture's verify.yaml declares the existing-duplicate rule | [QUALIFY_A_WORKFLOW.md](packages/flow/docs/QUALIFY_A_WORKFLOW.md) | diff --git a/capabilities/04-the-core-a-checked-entry-every-time/0080-right-record-check-before-any-write-structure.md b/capabilities/04-the-core-a-checked-entry-every-time/0080-right-record-check-before-any-write-structure.md new file mode 100644 index 0000000000..1671c418d1 --- /dev/null +++ b/capabilities/04-the-core-a-checked-entry-every-time/0080-right-record-check-before-any-write-structure.md @@ -0,0 +1 @@ +| Right-record check before any write (structure, then OCR, then pixels) | Released | Real app and synthetic | [RESOLUTION_LADDER.md](packages/flow/docs/RESOLUTION_LADDER.md), `runtime/identity.py` | diff --git a/capabilities/04-the-core-a-checked-entry-every-time/0090-read-the-saved-record-back-from-the-system-of.md b/capabilities/04-the-core-a-checked-entry-every-time/0090-read-the-saved-record-back-from-the-system-of.md new file mode 100644 index 0000000000..c0e9bd5a88 --- /dev/null +++ b/capabilities/04-the-core-a-checked-entry-every-time/0090-read-the-saved-record-back-from-the-system-of.md @@ -0,0 +1 @@ +| Read the saved record back from the system of record (API, database, FHIR, separate session) | Released | Real app (OpenEMR 12 of 12 fields) | [VERIFICATION.md](packages/flow/docs/VERIFICATION.md), `runtime/effects/` | diff --git a/capabilities/04-the-core-a-checked-entry-every-time/0100-read-values-out-of-an-app-as-a-workflow-step.md b/capabilities/04-the-core-a-checked-entry-every-time/0100-read-values-out-of-an-app-as-a-workflow-step.md new file mode 100644 index 0000000000..cac74a7402 --- /dev/null +++ b/capabilities/04-the-core-a-checked-entry-every-time/0100-read-values-out-of-an-app-as-a-workflow-step.md @@ -0,0 +1 @@ +| Read values out of an app as a workflow step (READ), with a records format, a signed review queue and export to CSV or a database | Released ([#1229](https://github.com/OpenAdaptAI/OpenAdapt/pull/1229), [#1215](https://github.com/OpenAdaptAI/OpenAdapt/pull/1215), [#1218](https://github.com/OpenAdaptAI/OpenAdapt/pull/1218)–[#1224](https://github.com/OpenAdaptAI/OpenAdapt/pull/1224)) | Synthetic (mock desktop apps) | `openadapt_flow/interchange/` | diff --git a/capabilities/04-the-core-a-checked-entry-every-time/0110-stop-before-the-effect-instead-of-improvising.md b/capabilities/04-the-core-a-checked-entry-every-time/0110-stop-before-the-effect-instead-of-improvising.md new file mode 100644 index 0000000000..ee975aa9bb --- /dev/null +++ b/capabilities/04-the-core-a-checked-entry-every-time/0110-stop-before-the-effect-instead-of-improvising.md @@ -0,0 +1 @@ +| Stop before the effect instead of improvising (`HALTED_BEFORE_EFFECT`) | Released | Real app and synthetic | `runtime/replayer.py` | diff --git a/capabilities/04-the-core-a-checked-entry-every-time/0120-never-retry-an-uncertain-save-reconciliation.md b/capabilities/04-the-core-a-checked-entry-every-time/0120-never-retry-an-uncertain-save-reconciliation.md new file mode 100644 index 0000000000..278307bbc9 --- /dev/null +++ b/capabilities/04-the-core-a-checked-entry-every-time/0120-never-retry-an-uncertain-save-reconciliation.md @@ -0,0 +1 @@ +| Never retry an uncertain save (`RECONCILIATION_REQUIRED`) | Released | Synthetic (fault server) | [VERIFICATION.md](packages/flow/docs/VERIFICATION.md) | diff --git a/capabilities/04-the-core-a-checked-entry-every-time/0130-one-check-level-scale-0-to-5-from-unchecked-to.md b/capabilities/04-the-core-a-checked-entry-every-time/0130-one-check-level-scale-0-to-5-from-unchecked-to.md new file mode 100644 index 0000000000..6775a2b08c --- /dev/null +++ b/capabilities/04-the-core-a-checked-entry-every-time/0130-one-check-level-scale-0-to-5-from-unchecked-to.md @@ -0,0 +1 @@ +| One check-level scale, 0 to 5, from "unchecked" to "counterparty confirmed" | Released | Unit tests | `openadapt_flow/check_level.py` | diff --git a/capabilities/04-the-core-a-checked-entry-every-time/0140-check-a-value-where-a-careful-person-would-look.md b/capabilities/04-the-core-a-checked-entry-every-time/0140-check-a-value-where-a-careful-person-would-look.md new file mode 100644 index 0000000000..a3ea9e0b54 --- /dev/null +++ b/capabilities/04-the-core-a-checked-entry-every-time/0140-check-a-value-where-a-careful-person-would-look.md @@ -0,0 +1 @@ +| Check a value where a careful person would look again: an effect location (`openadapt.effect-location/v1`) is pack data for one place an intended value shows (path and start condition, locator, expected value, codec, expected count, optional baseline). One summary row can cover two values ("Name (DOB)"), and a date can be split over three fields. Every planned value is `held`, `refuted` or `not_checked`; a place that can't be reached, found or read is `not_checked`. The check level follows the start condition (a new session is level 3), and the engine holds no application words | PR [#2500](https://github.com/OpenAdaptAI/OpenAdapt/pull/2500), not yet used by a runner | Unit tests and the fail-open harness (synthetic readings only) | `openadapt_flow/effect_location/`, [EFFECT_LOCATION.md](packages/flow/docs/EFFECT_LOCATION.md) | diff --git a/capabilities/04-the-core-a-checked-entry-every-time/0150-judge-any-executor-s-write-including-an-agent-s.md b/capabilities/04-the-core-a-checked-entry-every-time/0150-judge-any-executor-s-write-including-an-agent-s.md new file mode 100644 index 0000000000..3047c41909 --- /dev/null +++ b/capabilities/04-the-core-a-checked-entry-every-time/0150-judge-any-executor-s-write-including-an-agent-s.md @@ -0,0 +1 @@ +| Judge any executor's write, including an agent's or a script's, from the system of record | Released | Synthetic | `openadapt-flow verify-run`, [VERIFY_RUN.md](packages/flow/docs/VERIFY_RUN.md) | diff --git a/capabilities/04-the-core-a-checked-entry-every-time/0160-judge-an-ensure-the-record-exists-write-found.md b/capabilities/04-the-core-a-checked-entry-every-time/0160-judge-an-ensure-the-record-exists-write-found.md new file mode 100644 index 0000000000..b75a2da819 --- /dev/null +++ b/capabilities/04-the-core-a-checked-entry-every-time/0160-judge-an-ensure-the-record-exists-write-found.md @@ -0,0 +1 @@ +| Judge an "ensure the record exists" write (found, created once with every value, or needs review) through a FHIR server's read path only: searches, AuditEvent and `_history`, never the database; the coverage claim names that read path. An agent's own correction of the record it created counts as one write when the audit trail and history show only that agent, no other reader, and the same record in every version | Released ([#1640](https://github.com/OpenAdaptAI/OpenAdapt/pull/1640), corrections [#1655](https://github.com/OpenAdaptAI/OpenAdapt/pull/1655)) | Real app (Medplum 5.2.8; three blind fault suites: 17/18, 17/20, 19/20; no fault passed in the last two. Corrections, on 15 blind cases and the 37 public ones: false stops 8 to 2 and 9 to 4 for Claude, no harm passed that the old rule caught) | `openadapt_flow/ensure_record.py`, [ENSURE_RECORD.md](packages/flow/docs/ENSURE_RECORD.md) | diff --git a/capabilities/04-the-core-a-checked-entry-every-time/0170-generate-an-ensure-record-contract-from-three.md b/capabilities/04-the-core-a-checked-entry-every-time/0170-generate-an-ensure-record-contract-from-three.md new file mode 100644 index 0000000000..abb3453434 --- /dev/null +++ b/capabilities/04-the-core-a-checked-entry-every-time/0170-generate-an-ensure-record-contract-from-three.md @@ -0,0 +1 @@ +| Generate an ensure-record contract from three demonstrations, the server's CapabilityStatement and its SearchParameter definitions: field paths and `[system=…]` filters, comparison kinds, value maps, identity, search parameters, the closed record and the change feed. It refuses when unsure, asks a person to confirm an identity for a type with no reviewed template, and self-checks every demonstration plus a perturbation per field | Released ([#1653](https://github.com/OpenAdaptAI/OpenAdapt/pull/1653)) | Real app (Medplum 5.2.8: all 16 hand-written Patient lines regenerated; one blind write type, Immunization: 78 s of person time, 2 lines edited after the person declined the proposed identity; blind suite 23/24, no fault passed) | `openadapt_flow/generate/ensure_contract.py`, [RESULTS.md](packages/flow/benchmark/contract_autogen/results/RESULTS.md) | diff --git a/capabilities/04-the-core-a-checked-entry-every-time/0180-a-stop-card-for-a-stopped-write-the-exact-record.md b/capabilities/04-the-core-a-checked-entry-every-time/0180-a-stop-card-for-a-stopped-write-the-exact-record.md new file mode 100644 index 0000000000..886fb726d5 --- /dev/null +++ b/capabilities/04-the-core-a-checked-entry-every-time/0180-a-stop-card-for-a-stopped-write-the-exact-record.md @@ -0,0 +1 @@ +| A stop card for a stopped write: the exact record difference and who else wrote, with Undo or Fix that reads back, or Open in the app; cost modelled from published operators and timed machine steps, as pre-registered | Released ([#1653](https://github.com/OpenAdaptAI/OpenAdapt/pull/1653)) | Real app (Medplum 5.2.8, blind suite: 16 stops, 14 one-tap with no failed read-back; modelled 42 s per caught harm against 420; one wrong category on a false stop, gone in the re-measure with `void`: 24/24, 15 stops, no wrong category, no failed read-back) | `benchmark/stop_card/`, [PREREG_REVIEW.md](packages/flow/benchmark/stop_card/PREREG_REVIEW.md) | diff --git a/capabilities/04-the-core-a-checked-entry-every-time/0190-generate-openadapt-verify-v1-contracts-from-a.md b/capabilities/04-the-core-a-checked-entry-every-time/0190-generate-openadapt-verify-v1-contracts-from-a.md new file mode 100644 index 0000000000..28ec6e338c --- /dev/null +++ b/capabilities/04-the-core-a-checked-entry-every-time/0190-generate-openadapt-verify-v1-contracts-from-a.md @@ -0,0 +1 @@ +| Generate `openadapt.verify/v1` contracts from a MySQL, MariaDB or PostgreSQL schema, the kinds of write with their parameter names, and one demonstration write per example: one contract per field set (an update gets one for each set of fields it may change), and `choose` builds any other set of the kind's fields the same way from the same pinned inputs, list parameters by length, a `found` twin for a record already in place, the whole-database frame on every dialect (it compares the contract's own tables too, so an excused column holds only on the rows the write declares, and the recheck sees a late change to a look-alike row), rows the app adds on its own declared by count, a recheck window the person confirms, and `frame.versions` (a lost update) from a version column or the app's audit trail of saves. Equal ids are never taken for a join (a row's own key, the column a path arrived by), a join only equal ids support is a question when a supported place also fits, and a pin needs two rows that agree. Every undecided point is one numbered question; every contract is loaded and dry-read against the live store before it is written; a needed `TRIGGER` grant or view is applied with a flag or the kind is refused. A field no demonstration gives is placed at the main table's column of its name, or at the one text column whose name holds its words (never a key column); a create may leave out a text field whose column can't hold NULL and has an empty default, and the contract checks it empty; the `found` twin checks only the task's values, a soft-delete column and yes/no flags, so a record a person entered with other values is found, and a row the write would log beside it is not required; `choose` turns a list of plain values into the demonstrated one-key items, treats an empty list as nothing given, and reads an update's only changes given as null as emptying those fields ([#2418](https://github.com/OpenAdaptAI/OpenAdapt/pull/2418)). Not yet: OpenAPI metadata; a value the app defaults sent explicitly (a currency equal to an app-level default) is still refuted | [#1672](https://github.com/OpenAdaptAI/OpenAdapt/pull/1672) | Real app (first study, instance copies; questions for a person: Dolibarr 4, Redmine 2, EspoCRM 3, against 11 hand decisions each; every in-scope planted fault stopped (22/22, 19/19, 21/21); correct writes confirmed 32/43, 32/38, 27/40; evidence in the private study repository) | `python -m openadapt_flow.generate.verify_contract`, [GENERATE_CONTRACTS.md](packages/flow/docs/GENERATE_CONTRACTS.md) | diff --git a/capabilities/04-the-core-a-checked-entry-every-time/0200-set-up-generated-contracts-with-no-person.md b/capabilities/04-the-core-a-checked-entry-every-time/0200-set-up-generated-contracts-with-no-person.md new file mode 100644 index 0000000000..d952668c1c --- /dev/null +++ b/capabilities/04-the-core-a-checked-entry-every-time/0200-set-up-generated-contracts-with-no-person.md @@ -0,0 +1 @@ +| Set up generated contracts with no person answers: answer the generator's questions by fixed rules (its own bookkeeping proposal with time stamps checked against the clock, nothing added), validate them in a sandbox copy of the store beside the app's own (a database or schema the setup makes and drops) by replaying held-out correct writes and planting faults built from each write's recorded diff, never from the contract (missing, wrong value, wrong or look-alike record, duplicate, unrelated edit, a row in another table, a delayed change, a changed bookkeeping cell), and admit a kind only when every held-out write is confirmed and every fault stopped; a kind not admitted has no contract and is listed in `EXCEPTIONS.md`. Not yet: log tables, counters and derived columns, learned excuses, value maps | (this PR) | Unit (real PostgreSQL: one kind admitted with every planted fault stopped, one listed as an exception; a control without the clock check lets the time-stamp fault through). Development apps pending | `python -m openadapt_flow.generate.zero_touch`, [ZERO_TOUCH_DESIGN.md](packages/flow/docs/research/ZERO_TOUCH_DESIGN.md) | diff --git a/capabilities/04-the-core-a-checked-entry-every-time/0210-void-in-an-ensure-record-contract-values-that.md b/capabilities/04-the-core-a-checked-entry-every-time/0210-void-in-an-ensure-record-contract-values-that.md new file mode 100644 index 0000000000..d9c4f412f2 --- /dev/null +++ b/capabilities/04-the-core-a-checked-entry-every-time/0210-void-in-an-ensure-record-contract-values-that.md @@ -0,0 +1 @@ +| `void` in an ensure-record contract: values that make a record assert nothing (`status="entered-in-error"`). A record holding one is never the person, is not a duplicate, and a created one needs review; it names values to leave out, never values to keep, and can't name an identity field | Released ([#1657](https://github.com/OpenAdaptAI/OpenAdapt/pull/1657)) | Real app (Medplum 5.2.8: 8 live cases written in advance, 8/8 with the line, 5/8 and one silent pass without it; frozen blind Immunization suite 24/24); adversarial review recorded | `openadapt_flow/ensure_record.py`, [RESULTS.md](packages/flow/benchmark/fhir_medplum/void/results/RESULTS.md), [REVIEW_VOID.md](packages/flow/benchmark/fhir_medplum/void/REVIEW_VOID.md) | diff --git a/capabilities/04-the-core-a-checked-entry-every-time/0220-check-a-patient-registration-on-a-commercial-ehr.md b/capabilities/04-the-core-a-checked-entry-every-time/0220-check-a-patient-registration-on-a-commercial-ehr.md new file mode 100644 index 0000000000..e4888900af --- /dev/null +++ b/capabilities/04-the-core-a-checked-entry-every-time/0220-check-a-patient-registration-on-a-commercial-ehr.md @@ -0,0 +1 @@ +| Check a patient registration on a commercial EHR through its public FHIR sandbox: Epic (open.epic, R4), read through FHIR search and read with SMART backend auth; the frame is the search set, since the sandbox has no AuditEvent or `_history` | Released ([#1656](https://github.com/OpenAdaptAI/OpenAdapt/pull/1656)) | Real app (Epic public sandbox, August 2026 release; blind round 12/13 with none passed as verified, the miss a false refusal fixed in the contract; caught Epic dropping the phone on a 201 create) | `benchmark/commercial_ehr/`, [FINDINGS.md](packages/flow/benchmark/commercial_ehr/FINDINGS.md) | diff --git a/capabilities/04-the-core-a-checked-entry-every-time/0230-a-public-benchmark-a-vendor-reruns-with-their.md b/capabilities/04-the-core-a-checked-entry-every-time/0230-a-public-benchmark-a-vendor-reruns-with-their.md new file mode 100644 index 0000000000..d648a9cb74 --- /dev/null +++ b/capabilities/04-the-core-a-checked-entry-every-time/0230-a-public-benchmark-a-vendor-reruns-with-their.md @@ -0,0 +1 @@ +| A public benchmark a vendor reruns with their own agent: `openadapt bench medplum --agent ` runs 37 written-for-it cases (Patient, AllergyIntolerance, Appointment) against a local Medplum through a fault proxy, and scores the agent's claim, a read-back and OpenAdapt's verifier against an end-state oracle | On main ([#1652](https://github.com/OpenAdaptAI/OpenAdapt/pull/1652)) | Real app (Medplum 5.2.8; Claude Sonnet 5.5: OpenAdapt missed 1 of 9 harms with 4 false stops, all corrections that changed the record's identity, against 8 missed by the claim and the read-back; cold run from clone to scorecard 5 min) | [README](packages/flow/benchmark/fhir_medplum/public/README.md), [RESULTS.md](packages/flow/benchmark/fhir_medplum/public/RESULTS.md) | diff --git a/capabilities/04-the-core-a-checked-entry-every-time/0240-a-pre-registered-leaderboard-of-computer-use.md b/capabilities/04-the-core-a-checked-entry-every-time/0240-a-pre-registered-leaderboard-of-computer-use.md new file mode 100644 index 0000000000..13fc8fe51d --- /dev/null +++ b/capabilities/04-the-core-a-checked-entry-every-time/0240-a-pre-registered-leaderboard-of-computer-use.md @@ -0,0 +1 @@ +| A pre-registered leaderboard of computer-use agents doing the same 37 public cases in Medplum's own web app: the app's FHIR calls pass through the fault proxy inside the browser, the harness signs in, and the end-state oracle scores how often an agent says done when the record is wrong (`python -m benchmark.fhir_medplum.leaderboard.run --agent `) | On main ([#1737](https://github.com/OpenAdaptAI/OpenAdapt/pull/1737)) | Real app (Medplum 5.2.8 web app, 3 runs per case: said done with the record wrong in 25.2% of runs for Claude Sonnet 5.5 and 29.7% for GPT-6.1-sol, intervals overlapping, and 18.2% for local Fara-7B, which reached the 40-minute limit in 84 of 110 runs; neither API agent misreported a clean case; every collateral write was said done; protocol and hashes committed before any scored run) | [README](packages/flow/benchmark/fhir_medplum/leaderboard/README.md), [REPORT.md](packages/flow/benchmark/fhir_medplum/leaderboard/REPORT.md), [PROTOCOL.md](packages/flow/benchmark/fhir_medplum/leaderboard/PROTOCOL.md) | diff --git a/capabilities/04-the-core-a-checked-entry-every-time/0250-write-leaderboard-v2-the-same-pre-registered.md b/capabilities/04-the-core-a-checked-entry-every-time/0250-write-leaderboard-v2-the-same-pre-registered.md new file mode 100644 index 0000000000..0dac411346 --- /dev/null +++ b/capabilities/04-the-core-a-checked-entry-every-time/0250-write-leaderboard-v2-the-same-pre-registered.md @@ -0,0 +1 @@ +| Write leaderboard v2: the same pre-registered question on five apps (Medplum, OpenEMR, Dolibarr, EspoCRM, Redmine) with a fault proxy at each app's front door, a database oracle per app, Wilson intervals and a private held-out set (`python -m benchmark.write_leaderboard_v2.run --agent --app `) | On main ([#2227](https://github.com/OpenAdaptAI/OpenAdapt/pull/2227)) | Real apps (local containers, synthetic records; 40 public cases and 15 held-out, 3 runs each): said done with the record wrong in 23.3% of public runs for Claude Sonnet 5.5 (28/120, CI 16.7-31.7) and 17.5% for GPT-6.1-sol (21/120, CI 11.7-25.3), intervals overlapping, held-out 20.0% for both; no clean-case misreport; collateral changes said done in 15 of 15 Claude runs and 11 of 15 GPT-6.1-sol runs (3 of the rest saved nothing, 1 saved and said NOT DONE); GPT-6.1-sol saved no OpenEMR patient because of an ambiguous task field; Gemini and Nova not run | [README](packages/flow/benchmark/write_leaderboard_v2/README.md), [RESULTS.md](packages/flow/benchmark/write_leaderboard_v2/RESULTS.md), [PROTOCOL.md](packages/flow/benchmark/write_leaderboard_v2/PROTOCOL.md) | diff --git a/capabilities/04-the-core-a-checked-entry-every-time/0260-prove-that-nothing-outside-the-declared-change.md b/capabilities/04-the-core-a-checked-entry-every-time/0260-prove-that-nothing-outside-the-declared-change.md new file mode 100644 index 0000000000..b8732f6670 --- /dev/null +++ b/capabilities/04-the-core-a-checked-entry-every-time/0260-prove-that-nothing-outside-the-declared-change.md @@ -0,0 +1 @@ +| Prove that nothing outside the declared change moved (frame conditions), and attribute concurrent edits by other users through the app's audit log (by record, or by owner for a user's own rows such as their UI settings) or a modified-by field; the receipt signs which parts were checked | On main | Synthetic (MockMed, SQLite audit log) | `verify-run`, [VERIFICATION_COVERAGE.md](packages/flow/docs/VERIFICATION_COVERAGE.md) | diff --git a/capabilities/04-the-core-a-checked-entry-every-time/0270-admit-a-record-check-only-after-a-fault-suite.md b/capabilities/04-the-core-a-checked-entry-every-time/0270-admit-a-record-check-only-after-a-fault-suite.md new file mode 100644 index 0000000000..6869920506 --- /dev/null +++ b/capabilities/04-the-core-a-checked-entry-every-time/0270-admit-a-record-check-only-after-a-fault-suite.md @@ -0,0 +1 @@ +| Admit a record check only after a fault suite written to a store copy shows it catches every fault class it claims, including writes outside its read (another table, a side row for the saved record), and sign each class's result into the receipt | Released | Synthetic (in-memory REST store, SQLite copy); OpenEMR stand-in built from the pinned fixture's dump | `openadapt_flow/fault_gate.py`, `scaffold-verifier --fault-gate`, `verify-run` `admission:` | diff --git a/capabilities/04-the-core-a-checked-entry-every-time/0280-measure-a-record-check-against-faults-written.md b/capabilities/04-the-core-a-checked-entry-every-time/0280-measure-a-record-check-against-faults-written.md new file mode 100644 index 0000000000..06c8208745 --- /dev/null +++ b/capabilities/04-the-core-a-checked-entry-every-time/0280-measure-a-record-check-against-faults-written.md @@ -0,0 +1 @@ +| Measure a record check against faults written from an independent spec instead of from the check: the OpenEMR referral intake, 17 public cases and five blind held-out suites of 17 cases (private, hashes published), each frozen before the check it runs against; results that a suite shaped are kept and marked as not counting | [#1810](https://github.com/OpenAdaptAI/OpenAdapt/pull/1810) | OpenEMR stand-in (SQLite copy of the pinned fixture's dump): the whole-database contract on the counted held-out runs 16/17, 14/17, 17/17, 17/17 with no fault passed as verified. Live OpenEMR 8.0.0.3 (2026-11-04): gate not met on any suite, 14/17, 12/17, 14/17, 13/17. No fault passed, but every clean save was refused (frame: unexplained OAuth-token, address and form-column rows; one contract names a table live OpenEMR lacks). The read-list candidate passed 3 faults on held-out 1; the public suite on live OpenEMR 8.0.0.3 for two earlier contracts | `benchmark/verification_coverage/independent/`, [README](packages/flow/benchmark/verification_coverage/independent/README.md) | diff --git a/capabilities/04-the-core-a-checked-entry-every-time/0290-check-that-the-saved-record-matches-its-source.md b/capabilities/04-the-core-a-checked-entry-every-time/0290-check-that-the-saved-record-matches-its-source.md new file mode 100644 index 0000000000..167161f9a3 --- /dev/null +++ b/capabilities/04-the-core-a-checked-entry-every-time/0290-check-that-the-saved-record-matches-its-source.md @@ -0,0 +1 @@ +| Check that the saved record matches its source document, not only the parameters: intake keeps each value's line, a second reading must agree before a guarded save, and a round trip compares the read-back with the document | Released | Synthetic (MockMed, text referral) | `openadapt_flow/provenance.py`, `intake`, `verify-run --provenance`, guarded save | diff --git a/capabilities/04-the-core-a-checked-entry-every-time/0300-check-one-write-from-python-without-the-cli-one.md b/capabilities/04-the-core-a-checked-entry-every-time/0300-check-one-write-from-python-without-the-cli-one.md new file mode 100644 index 0000000000..965a685fc0 --- /dev/null +++ b/capabilities/04-the-core-a-checked-entry-every-time/0300-check-one-write-from-python-without-the-cli-one.md @@ -0,0 +1 @@ +| Check one write from Python, without the CLI: one API (`openadapt_flow.verifier`: `begin_write`, `verify_write`; 2.4.1's `capture` form still works, deprecated) with one outcome (`CONFIRMED`, `REFUTED`, `UNCERTAIN`), the receipt, which parts were checked, and the result's scope (read path, stores read, time window, what it doesn't cover) | Released | Synthetic (SQLite; MockMed's fault server over real HTTP) | `openadapt_flow/verifier.py`, [VERIFIER_API.md](packages/flow/docs/VERIFIER_API.md) | diff --git a/capabilities/04-the-core-a-checked-entry-every-time/0310-install-the-write-checker-alone-pip-install.md b/capabilities/04-the-core-a-checked-entry-every-time/0310-install-the-write-checker-alone-pip-install.md new file mode 100644 index 0000000000..84eec97509 --- /dev/null +++ b/capabilities/04-the-core-a-checked-entry-every-time/0310-install-the-write-checker-alone-pip-install.md @@ -0,0 +1 @@ +| Install the write checker alone: `pip install openadapt-verify` (21 distributions, about 41 MB, no vision, OCR, browser, GUI or NumPy stack; Flow 3 moved those to its `vision` extra) runs Flow's own verifier, ledger, journal, SQL guards and receipts. `openadapt-verify quickstart` checks three scripted agent writes (correct, wrong value, claimed but not saved) against REST, SQLite, FHIR, PostgreSQL and MySQL, each `CONFIRMED`, `REFUTED` or `UNCERTAIN` with a checked signed receipt; `@verified` and `checked_write` wrap a plain Python write in one line | On main | Synthetic (disposable local stores and PostgreSQL and MySQL containers; a clean-venv CI job enforces the install budget and an import test refuses the vision modules) | [packages/verify](packages/verify/README.md), `openadapt_verify/quickstart.py`, `openadapt_verify/guard.py` | diff --git a/capabilities/04-the-core-a-checked-entry-every-time/0320-audit-your-own-automation-s-success-check.md b/capabilities/04-the-core-a-checked-entry-every-time/0320-audit-your-own-automation-s-success-check.md new file mode 100644 index 0000000000..dcf5d163dd --- /dev/null +++ b/capabilities/04-the-core-a-checked-entry-every-time/0320-audit-your-own-automation-s-success-check.md @@ -0,0 +1 @@ +| Audit your own automation's success check: `openadapt-verify audit` puts an HTTP proxy in front of the app, runs your command through it N times, changes the save (the first write whose body carries a declared value, or that matches `--write-path`) once per run (not saved with a replayed success reply, rejected, a value blanked or changed, saved twice, an extra changed copy, the reply lost after the save, and a rewritten record field when given one), and counts the runs where the command reported success but the contract's independent read path shows a wrong or missing save, plus false alarms; table and JSON report. HTTP/1.x only, no app code, no WebSocket or server-sent events; a stale overwrite and a change outside the read path are not run | On main | Synthetic (two scripted HTTP clients against the quickstart's REST store: a script that trusts the 2xx reply reported success on 10 of 12 bad saves and failure on 2 saves that landed, one that reads its record back through the app on 4 of 12, missing the duplicate and extra writes) | `openadapt-verify audit`, [packages/verify](packages/verify/README.md#audit-your-automations-success-check), `openadapt_verify/audit.py` | diff --git a/capabilities/04-the-core-a-checked-entry-every-time/0330-never-send-a-write-twice-while-its-outcome-is.md b/capabilities/04-the-core-a-checked-entry-every-time/0330-never-send-a-write-twice-while-its-outcome-is.md new file mode 100644 index 0000000000..217d8aa524 --- /dev/null +++ b/capabilities/04-the-core-a-checked-entry-every-time/0330-never-send-a-write-twice-while-its-outcome-is.md @@ -0,0 +1 @@ +| Never send a write twice while its outcome is unknown: an append-only ledger on local disk (pluggable backend), keyed by the write's identity, that every adapter, the MCP tools and the CLI consult before sending; a read-back against the attempt's own baseline resolves it, and a refuted write waits for a person (`openadapt verify ledger list`, `reconcile`, `release`) | Released | Synthetic (MockMed's fault server: a worker killed between the send and the read-back, killed during a timed-out send, killed before the send, a late write, and two worker processes started together on one write) | `openadapt_flow/write_ledger.py`, [VERIFIER_API.md](packages/flow/docs/VERIFIER_API.md#the-uncertain-write-ledger) | diff --git a/capabilities/04-the-core-a-checked-entry-every-time/0340-commit-one-record-update-through-a-transaction.md b/capabilities/04-the-core-a-checked-entry-every-time/0340-commit-one-record-update-through-a-transaction.md new file mode 100644 index 0000000000..a1366551de --- /dev/null +++ b/capabilities/04-the-core-a-checked-entry-every-time/0340-commit-one-record-update-through-a-transaction.md @@ -0,0 +1 @@ +| Commit one record update through a transaction lens: `openadapt-verify tx-run` (or `tx_verified` in Python) reads the target record, sends the update, reads it back and judges the intended fields and every other field (frame) with one comparison policy, and signs a receipt. Without a separately supplied SQLite row authority every HTTP write is refused; `--prototype-unqualified` runs it with an `UNCERTAIN` result at best and no automatic undo. `tx-induce` proposes a lens from a HAR trace and can probe a declared sandbox, but its probe report never authorizes execution, and an observed mismatch never becomes an accepted value mapping. Induction takes route roles from what each request did, so a create sent as `PUT` and an update sent as `POST` are recognized, and the sandbox probe checks an update route of any method for replace semantics. A field that only looks like a timestamp stays in the frame unless the probe sees the server change it. Induction refuses a trace that shows no write it can attribute to a record (an update at the record's URL, or a create whose record is then read there) instead of guessing a route; the CLI allows a guessed item route only when it certifies the lens on a sandbox. When the probe cannot create its own record, an update lens is left in replace mode (whole-record writes), and a certification fault the server refuses is reported as not delivered, never as a pass. Undo refuses to overwrite a change made after the write. The wire tap hands a redirect that stays on the tapped origin back to the client and refuses one that leaves it; it never follows a redirect itself. A field the server is seen rewriting between `NULL` and `""` gets a `null_empty` codec, learned per field by the probe or from the trace, so that change alone is not a clobber; any other change on the field still is. Not checked: server-side effects outside the target record, such as triggers or background jobs | On main ([#2293](https://github.com/OpenAdaptAI/OpenAdapt/pull/2293)) | Synthetic (local SQLite and HTTP fixture servers), plus induction and the replace probe on one open-source task app (recorded trace in CI, live tests in the lab) | `openadapt-verify tx-induce`, `tx-run`, `openadapt_flow/tx/`, `openadapt_verify/tx.py` | diff --git a/capabilities/04-the-core-a-checked-entry-every-time/0350-verify-a-write-to-an-api-or-saas-system-with-no.md b/capabilities/04-the-core-a-checked-entry-every-time/0350-verify-a-write-to-an-api-or-saas-system-with-no.md new file mode 100644 index 0000000000..3ee098fc56 --- /dev/null +++ b/capabilities/04-the-core-a-checked-entry-every-time/0350-verify-a-write-to-an-api-or-saas-system-with-no.md @@ -0,0 +1 @@ +| Verify a write to an API or SaaS system with no database to diff: `openadapt proxy --api systems.tx.yaml` serves `api_read` and `api_write` beside the SQL tools on the same MCP endpoint and keeps the API credentials out of the agent's environment. Each write is sent once under a key derived from the task and the record, never the payload. A retry returns the first result, a regenerated payload is refused, and a crash between the send and the ledger is recovered by finding the write. The key goes out as `Idempotency-Key` where the API honors one, or as a FHIR conditional create. The record is then read back and judged with the tx codecs, including `null_empty`. The system's own event or audit log is read from an id-placed cursor, and the write's own event must appear with no other resource changed by the same credentials. A FHIR `AuditEvent` search, an event stream and a REST activity feed are all declared as data in the tx file. Every outcome gets a `record/run/v1` receipt. Scope is the resource and the actor: changes by other callers, and changes the log doesn't record, aren't checked. A whole-record (`replace`) update or a delete over another caller's edit is refused by the server when the route declares a `precondition` (`If-Match` from the read's `ETag` or a version field) with enforcement evidence: a probe recorded in the pack, or one the adapter runs once per route. Without a precondition it is never `VERIFIED`, only `COMPLETED_UNVERIFIED` (`unconditional_write`; `precondition_unproven` without evidence), and `api_write` reports it as an error. A retry that returns a stored result is capped the same way | [#2437](https://github.com/OpenAdaptAI/OpenAdapt/pull/2437), stacked on [#2428](https://github.com/OpenAdaptAI/OpenAdapt/pull/2428) | Real apps (Medplum 5.2.8 `AuditEvent`, Gitea 1.24.6 activity feed, synthetic data): 0 of 400 clean writes stopped on each; Medplum rerun with its `If-Match` probe recorded in the pack, 400 of 400 `VERIFIED`. Every planted fault the log exposes was stopped: wrong value, duplicate, partial write and same-actor collateral change, 50 of 50 per class, except that on Medplum a duplicate update no longer lands (the server refused all 50 second PUTs with 412). Known misses: a collateral title edit on Gitea, which its feed doesn't record (0 of 50 stopped), and another caller's change on either system (0 of 50). 50 of 50 regenerated-payload retries were refused on each. Stripe not run (no test-mode key) | [API_VERIFICATION.md](packages/flow/docs/API_VERIFICATION.md), [benchmark/api_scoped](packages/flow/benchmark/api_scoped/RESULTS.md), `openadapt_flow/txplan/scoped.py`, `openadapt_flow/txplan/audit.py` | diff --git a/capabilities/04-the-core-a-checked-entry-every-time/0360-reconcile-one-prior-authorization-or-claim.md b/capabilities/04-the-core-a-checked-entry-every-time/0360-reconcile-one-prior-authorization-or-claim.md new file mode 100644 index 0000000000..366eab1056 --- /dev/null +++ b/capabilities/04-the-core-a-checked-entry-every-time/0360-reconcile-one-prior-authorization-or-claim.md @@ -0,0 +1 @@ +| Reconcile one prior authorization or claim across the EHR (FHIR), the clearinghouse (X12 278 and 277 files) and the payer (Da Vinci PAS): each leg is a verifier contract judged by the same record checks, and the result names each break (`not_received`, `mismatch`, `not_written_back`, `duplicate`, `not_accepted`) with `CONFIRMED`/`REFUTED`/`UNCERTAIN` and a Scope; absence before a deadline is `UNCERTAIN`, an unreadable store is never agreement, a rejected or returned 277 is never agreement, and a judged record or value with two distinct candidates in the read (repeated segments, list elements, join targets, a group's latest) is never `CONFIRMED` | On main | HL7 Da Vinci PAS reference implementation and Medplum run locally, synthetic X12: 36 of 36 planted breaks found, 0 of 27 faulty units `CONFIRMED`, 17 of 17 clean units `CONFIRMED` (units 1 to 47; the 3 status-category units added later are covered by unit tests); a Hypothesis property test over generated multi-candidate reads; Epic's public sandbox read-only as the EHR leg | `openadapt-flow reconcile`, [RECONCILE.md](packages/flow/docs/RECONCILE.md), [results](packages/flow/benchmark/reconcile/RESULTS.md) | diff --git a/capabilities/04-the-core-a-checked-entry-every-time/0370-catch-a-write-that-lands-after-the-verdict-a.md b/capabilities/04-the-core-a-checked-entry-every-time/0370-catch-a-write-that-lands-after-the-verdict-a.md new file mode 100644 index 0000000000..8310044159 --- /dev/null +++ b/capabilities/04-the-core-a-checked-entry-every-time/0370-catch-a-write-that-lands-after-the-verdict-a.md @@ -0,0 +1 @@ +| Catch a write that lands after the verdict (a background job, a trigger, a delayed side record): a `CONFIRMED` with a recheck due is provisional (`provisional`, `recheck_due_at`); the recheck reads the whole database again and refutes the earlier result when a change since the post-save read has no explanation, and a recheck that doesn't confirm holds the write in the ledger. Run it from Python (`verifier.recheck`) or MCP (`verify_recheck`). A write after the recheck's read is not seen (`frame.database.recheck_after_s`, no default window) | Released ([#1639](https://github.com/OpenAdaptAI/OpenAdapt/pull/1639)); provisional result, MCP tool and ledger hold ([#1669](https://github.com/OpenAdaptAI/OpenAdapt/pull/1669)) | Real app (Dolibarr 21 and EspoCRM 10 on MariaDB 11.4, 180 s window: 4 of 4 planted late writes at 125 to 130 s refuted at the recheck, correct writes confirmed; EspoCRM's cron daemon needs its job tables declared; Redmine 6.1 on PostgreSQL 17, 180 s window: the first-contact study's late writes F19 and F20 refuted at the recheck, correct writes confirmed); synthetic (SQLite); opt-in live OpenEMR test | `openadapt_flow/verifier.py`, `runtime/effects/late_write.py`, [VERIFY_RUN.md](packages/flow/docs/VERIFY_RUN.md#writes-that-land-later) | diff --git a/capabilities/04-the-core-a-checked-entry-every-time/0380-diff-the-whole-database-for-the-frame-frame.md b/capabilities/04-the-core-a-checked-entry-every-time/0380-diff-the-whole-database-for-the-frame-frame.md new file mode 100644 index 0000000000..8273e89e27 --- /dev/null +++ b/capabilities/04-the-core-a-checked-entry-every-time/0380-diff-the-whole-database-for-the-frame-frame.md @@ -0,0 +1 @@ +| Diff the whole database for the frame (`frame.database`) on SQLite, MySQL, MariaDB and PostgreSQL. On MySQL and MariaDB every column type is read exactly (binary strings, `BIT`, geometries and vectors as hex, `FLOAT` widened to `DOUBLE`, `JSON` as stored text, decimals at full precision). On PostgreSQL every column type is read as text by a declared rule in a session pinned to UTC and exact float output, and a type without a rule, a table the account can't read in full, or an unreadable sequence is refused. So a row the save adds, changes or removes outside the declared records, such as an extra planned call or a stream note, is refuted unless a declared effect, a side record, an attributed concurrent write or an allow-listed bookkeeping table explains it | Released ([#1661](https://github.com/OpenAdaptAI/OpenAdapt/pull/1661)); PostgreSQL ([#1673](https://github.com/OpenAdaptAI/OpenAdapt/pull/1673)) | Real app (Dolibarr 21 on MariaDB 11.4: all 387 tables read where the frame raised `TypeError`; EspoCRM on MariaDB 11.4: the first-contact study's extra call and stream note refuted, correct opportunities verified; Redmine 6.1 on PostgreSQL 17: 58 tables read, a stray upload in a table the contract doesn't read refuted, correct writes verified); live MariaDB and PostgreSQL type tests | [VERIFY_RUN.md](packages/flow/docs/VERIFY_RUN.md#the-whole-database), `runtime/effects/db_snapshot.py` | diff --git a/capabilities/04-the-core-a-checked-entry-every-time/0390-learn-then-enforce-excuse-the-app-s-own-per.md b/capabilities/04-the-core-a-checked-entry-every-time/0390-learn-then-enforce-excuse-the-app-s-own-per.md new file mode 100644 index 0000000000..c9d5497804 --- /dev/null +++ b/capabilities/04-the-core-a-checked-entry-every-time/0390-learn-then-enforce-excuse-the-app-s-own-per.md @@ -0,0 +1 @@ +| Learn, then enforce: excuse the app's own per-request writes on the acting user's own rows (the user's `last_login`, a token's `last_seen`, a first-login row) that make the whole-database frame refute every correct write. `learn collect` records each check's moved rows and the agent's request-body field names from a shadow run; `learn propose` proposes only moves on the acting user's rows (users table named once, user columns from the schema's foreign keys), never a column the agent sent or the contract names, as an exact column set seen in 3 of every 5 checks; one `learn approve` by a person writes `frame.learned` with the proposal's digest. At check time the relation is derived again from the run's actor: never another user's row, another column, a removal, more added rows than learned, or a row added for someone else. Collateral on the written row is never learned (a `relation: target` entry is refused at load); the generator's bookkeeping answer excuses those columns. Not yet: tables over `max_rows` | [#1679](https://github.com/OpenAdaptAI/OpenAdapt/pull/1679) | Real app (three held-out apps on MariaDB and PostgreSQL, replayed agent writes: correct writes of the kinds with an approved excuse confirmed 0 -> 74 of 100, the rest stopped at begin or by app rows that are neither the write's nor the actor's; 0 of 42 planted harms passed); adversarial tests on SQLite, MySQL and PostgreSQL | `openadapt-flow learn`, [LEARNED_EXCUSES.md](packages/flow/docs/LEARNED_EXCUSES.md) | diff --git a/capabilities/04-the-core-a-checked-entry-every-time/0400-catch-a-lost-update-another-user-saves-a-change.md b/capabilities/04-the-core-a-checked-entry-every-time/0400-catch-a-lost-update-another-user-saves-a-change.md new file mode 100644 index 0000000000..9210b9768a --- /dev/null +++ b/capabilities/04-the-core-a-checked-entry-every-time/0400-catch-a-lost-update-another-user-saves-a-change.md @@ -0,0 +1 @@ +| Catch a lost update: another user saves a change to the record while the agent works, and the agent saves its stale copy over it. Before and after look like a correct update, so `frame.versions` reads the target's versions (FHIR or SQL version history, a version column, or the app's audit or action-history table) before and after the write. A version by another author, or more than one version step when no author is read, refutes the write; a version that can't be read or attributed stops it | Released ([#1662](https://github.com/OpenAdaptAI/OpenAdapt/pull/1662)) | Real app (HAPI FHIR and EspoCRM, first-contact study fault scripts: both lost updates refuted, correct updates verified, every other case's verdict unchanged) | [VERIFY_RUN.md](packages/flow/docs/VERIFY_RUN.md#lost-updates), `runtime/effects/versions.py` | diff --git a/capabilities/04-the-core-a-checked-entry-every-time/0410-guarded-save-a-safety-layer-any-agent-wraps.md b/capabilities/04-the-core-a-checked-entry-every-time/0410-guarded-save-a-safety-layer-any-agent-wraps.md new file mode 100644 index 0000000000..0669059255 --- /dev/null +++ b/capabilities/04-the-core-a-checked-entry-every-time/0410-guarded-save-a-safety-layer-any-agent-wraps.md @@ -0,0 +1 @@ +| Guarded save: a safety layer any agent wraps around one write (check the record, hold for approval, read back) | Released ([#1258](https://github.com/OpenAdaptAI/OpenAdapt/pull/1258)) | Synthetic | `GUARDED_SAVE.md` | diff --git a/capabilities/04-the-core-a-checked-entry-every-time/0420-a-person-s-approval-in-desktop-is-signed-with-a.md b/capabilities/04-the-core-a-checked-entry-every-time/0420-a-person-s-approval-in-desktop-is-signed-with-a.md new file mode 100644 index 0000000000..eddf4ba1ca --- /dev/null +++ b/capabilities/04-the-core-a-checked-entry-every-time/0420-a-person-s-approval-in-desktop-is-signed-with-a.md @@ -0,0 +1 @@ +| A person's approval in Desktop is signed with a key kept behind Touch ID on a Mac: one-prompt setup in the app, a prompt for every answer, and Flow never sees the key | Released ([#1500](https://github.com/OpenAdaptAI/OpenAdapt/pull/1500)) | Unit tests; opt-in test on a real Secure Enclave | `packages/desktop/openadapt_desktop/approver_keychain.py`, [APPROVAL_MODES.md](packages/flow/docs/APPROVAL_MODES.md#the-approver-key) | diff --git a/capabilities/04-the-core-a-checked-entry-every-time/0430-the-approver-root-desktop-trusts-can-be-pinned.md b/capabilities/04-the-core-a-checked-entry-every-time/0430-the-approver-root-desktop-trusts-can-be-pinned.md new file mode 100644 index 0000000000..4ebf5f6a75 --- /dev/null +++ b/capabilities/04-the-core-a-checked-entry-every-time/0430-the-approver-root-desktop-trusts-can-be-pinned.md @@ -0,0 +1 @@ +| The approver root Desktop trusts can be pinned by an administrator, in a file this user can't write (macOS, Linux, Windows); Desktop checks the owner, mode or ACL and refuses links. A Mac without one uses the root it set up behind Touch ID, read with Keychain prompts off; the two disagreeing is refused | Released | Unit tests per attack on real files; Windows ACL rules unit-tested, real-ACL test on Windows CI; opt-in test against the real login Keychain | `openadapt-desktop approver-pin`, `packages/desktop/openadapt_desktop/approver_anchor.py`, [APPROVAL_MODES.md](packages/flow/docs/APPROVAL_MODES.md#the-approver-key) | diff --git a/capabilities/04-the-core-a-checked-entry-every-time/0440-review-stops-every-stop-as-one-card-with-the.md b/capabilities/04-the-core-a-checked-entry-every-time/0440-review-stops-every-stop-as-one-card-with-the.md new file mode 100644 index 0000000000..ec4111dd64 --- /dev/null +++ b/capabilities/04-the-core-a-checked-entry-every-time/0440-review-stops-every-stop-as-one-card-with-the.md @@ -0,0 +1 @@ +| Review stops: every stop as one card with the evidence side by side (the item next to each possible match, field by field), answered with one key or tap on the computer or a paired phone, signed with the approver key, with batches for similar stops. The queue presents and collects; a changed or expired card changes nothing | Released ([#1519](https://github.com/OpenAdaptAI/OpenAdapt/pull/1519)) | Unit tests; a keystroke-level estimate on 20 soak stops (26.7 s to 8.2 s to decide, a model, not a person) | `packages/desktop/openadapt_desktop/stop_queue.py`, [benchmark/stop_queue](packages/desktop/benchmark/stop_queue/README.md) | diff --git a/capabilities/04-the-core-a-checked-entry-every-time/0450-draft-a-record-check-from-the-demonstration-s.md b/capabilities/04-the-core-a-checked-entry-every-time/0450-draft-a-record-check-from-the-demonstration-s.md new file mode 100644 index 0000000000..a7176b8c27 --- /dev/null +++ b/capabilities/04-the-core-a-checked-entry-every-time/0450-draft-a-record-check-from-the-demonstration-s.md @@ -0,0 +1 @@ +| Draft a record check from the demonstration's write steps (`scaffold-verifier`) | Released | Synthetic | `openadapt-flow scaffold-verifier` (a person fills in the draft) | diff --git a/capabilities/04-the-core-a-checked-entry-every-time/0460-build-a-working-record-check-from-the-reads-the.md b/capabilities/04-the-core-a-checked-entry-every-time/0460-build-a-working-record-check-from-the-reads-the.md new file mode 100644 index 0000000000..5829af0e7f --- /dev/null +++ b/capabilities/04-the-core-a-checked-entry-every-time/0460-build-a-working-record-check-from-the-reads-the.md @@ -0,0 +1 @@ +| Build a working record check from the reads the app made while the person viewed the saved record, and test it against injected bad writes before anyone reviews it | Released ([#1284](https://github.com/OpenAdaptAI/OpenAdapt/pull/1284)) | Synthetic (MockMed, OpenEMR fixture) | `openadapt-flow scaffold-verifier` | diff --git a/capabilities/04-the-core-a-checked-entry-every-time/0470-when-the-demonstration-never-reads-the-saved.md b/capabilities/04-the-core-a-checked-entry-every-time/0470-when-the-demonstration-never-reads-the-saved.md new file mode 100644 index 0000000000..458c5cc68f --- /dev/null +++ b/capabilities/04-the-core-a-checked-entry-every-time/0470-when-the-demonstration-never-reads-the-saved.md @@ -0,0 +1 @@ +| When the demonstration never reads the saved record back, find the read by probing the collection and item reads the captured write implies (GET only, local copy of the app only, every probe in the proof) and use one only when it returns the written values and no write outside it could pass unseen. Before refusing a collection read, look for a prefix root that holds every record of the collection and the siblings the app read, and read the whole store from it; otherwise refuse or leave the read unavailable for a person. Also sees a save with an unfamiliar button label from its POST, and marks a generated REST read complete when it was declared or seen whole and unpaged | On main | Synthetic (local test app; zero-config benchmark on MockMed and MockLoan) | `openadapt-flow scaffold-verifier --probe-reads`, `openadapt_flow/read_discovery.py` | diff --git a/capabilities/04-the-core-a-checked-entry-every-time/0480-check-a-save-on-desktop-rdp-or-citrix-by-looking.md b/capabilities/04-the-core-a-checked-entry-every-time/0480-check-a-save-on-desktop-rdp-or-citrix-by-looking.md new file mode 100644 index 0000000000..5d8e449cc3 --- /dev/null +++ b/capabilities/04-the-core-a-checked-entry-every-time/0480-check-a-save-on-desktop-rdp-or-citrix-by-looking.md @@ -0,0 +1 @@ +| Check a save on desktop, RDP or Citrix by looking the record up in a separate read-only session | Released ([#1280](https://github.com/OpenAdaptAI/OpenAdapt/pull/1280)) | Synthetic (WinForms, RDP and Citrix stand-ins) | `runtime/effects/` | diff --git a/capabilities/04-the-core-a-checked-entry-every-time/0490-learn-the-record-check-from-the-recording-when.md b/capabilities/04-the-core-a-checked-entry-every-time/0490-learn-the-record-check-from-the-recording-when.md new file mode 100644 index 0000000000..467a3fde45 --- /dev/null +++ b/capabilities/04-the-core-a-checked-entry-every-time/0490-learn-the-record-check-from-the-recording-when.md @@ -0,0 +1 @@ +| Learn the record check from the recording, when the person looks the record up after saving | Released ([#1290](https://github.com/OpenAdaptAI/OpenAdapt/pull/1290)) | Synthetic | `record --verify` | diff --git a/capabilities/04-the-core-a-checked-entry-every-time/0500-a-record-check-s-duplicate-key-can-be-several.md b/capabilities/04-the-core-a-checked-entry-every-time/0500-a-record-check-s-duplicate-key-can-be-several.md new file mode 100644 index 0000000000..000e4ea0d7 --- /dev/null +++ b/capabilities/04-the-core-a-checked-entry-every-time/0500-a-record-check-s-duplicate-key-can-be-several.md @@ -0,0 +1 @@ +| A record check's duplicate key can be several fields together, such as last name, first name and birth date: the check fails when more than one record carries all of them, counting records that were already there | Released ([#1393](https://github.com/OpenAdaptAI/OpenAdapt/issues/1393)) | Synthetic (OpenEMR-shaped patient rows) | verify.yaml `record.duplicate_key: [lname, fname, DOB]`, `confirm_params(idempotency_key=[...])`, `Effect.composite_key` | diff --git a/capabilities/04-the-core-a-checked-entry-every-time/0510-checked-later-a-save-confirmed-by-a-later-report.md b/capabilities/04-the-core-a-checked-entry-every-time/0510-checked-later-a-save-confirmed-by-a-later-report.md new file mode 100644 index 0000000000..fd9b57ce2b --- /dev/null +++ b/capabilities/04-the-core-a-checked-entry-every-time/0510-checked-later-a-save-confirmed-by-a-later-report.md @@ -0,0 +1 @@ +| Checked later: a save confirmed by a later report or acknowledgment, never counted as done until then | Released ([#1297](https://github.com/OpenAdaptAI/OpenAdapt/pull/1297)) | Synthetic | `SAVED_AWAITING_CHECK` | diff --git a/capabilities/04-the-core-a-checked-entry-every-time/0520-counterparty-confirmations-for-payer-claims-each.md b/capabilities/04-the-core-a-checked-entry-every-time/0520-counterparty-confirmations-for-payer-claims-each.md new file mode 100644 index 0000000000..d122b27bd9 --- /dev/null +++ b/capabilities/04-the-core-a-checked-entry-every-time/0520-counterparty-confirmations-for-payer-claims-each.md @@ -0,0 +1 @@ +| Counterparty confirmations for payer claims: each claim with a deferred check is a handoff, and the payer's 999 or 277CA moves it to `acknowledged` (received or accepted, status only) or back to `sent` with a reason (rejected, no answer by the deadline, two claims on one key). The deferred check settles exactly as before | In a pull request | Synthetic (X12 999 and 277CA fixtures, unit tests) | `deferred settle`, `openadapt_flow/handoffs/payer.py`, [COUNTERPARTY_CONFIRMATIONS.md](packages/flow/docs/COUNTERPARTY_CONFIRMATIONS.md) | diff --git a/capabilities/04-the-core-a-checked-entry-every-time/0530-counterparty-confirmations-by-read-back-the.md b/capabilities/04-the-core-a-checked-entry-every-time/0530-counterparty-confirmations-by-read-back-the.md new file mode 100644 index 0000000000..d96f6a13c3 --- /dev/null +++ b/capabilities/04-the-core-a-checked-entry-every-time/0530-counterparty-confirmations-by-read-back-the.md @@ -0,0 +1 @@ +| Counterparty confirmations by read-back: the sender records what it sent (as digests), then reads the other party's system by a profile (data) and reports `recorded_as_intended`, `recorded_differently` with the differing field ids, or `sent` with a reason (not found, matched twice, unreachable). One comparator for every producer | In a pull request | Real app: a second, synthetic OpenEMR 7.0.3 as the receiving clinic, written through its REST API and read back through FHIR with a read-only token; 180 of 180 runs as expected over 9 cases, 0 false alarms in 40 correctly recorded referrals, [results](packages/flow/benchmark/handoff_receiver/results/2026-11-21.json) | `openadapt_flow/handoffs/`, [COUNTERPARTY_CONFIRMATIONS.md](packages/flow/docs/COUNTERPARTY_CONFIRMATIONS.md) | diff --git a/capabilities/04-the-core-a-checked-entry-every-time/0540-open-handoffs-by-state-with-who-still-needs-to.md b/capabilities/04-the-core-a-checked-entry-every-time/0540-open-handoffs-by-state-with-who-still-needs-to.md new file mode 100644 index 0000000000..d51fb4972d --- /dev/null +++ b/capabilities/04-the-core-a-checked-entry-every-time/0540-open-handoffs-by-state-with-who-still-needs-to.md @@ -0,0 +1 @@ +| Open handoffs by state, with who still needs to follow up | In a pull request | Unit tests | `openadapt handoff list` | diff --git a/capabilities/04-the-core-a-checked-entry-every-time/0550-receipts-carry-the-run-s-handoffs-as.md b/capabilities/04-the-core-a-checked-entry-every-time/0550-receipts-carry-the-run-s-handoffs-as.md new file mode 100644 index 0000000000..51684a7d22 --- /dev/null +++ b/capabilities/04-the-core-a-checked-entry-every-time/0550-receipts-carry-the-run-s-handoffs-as.md @@ -0,0 +1 @@ +| Receipts carry the run's handoffs as counterparty confirmation lines (`predicate.confirmations[]` in `record/run/v1`), written by the after-run receipt hook | In a pull request | Unit tests, and a real replayer run whose receipt carries its claim's `sent` line and verifies | `openadapt_flow/handoffs/line.py`, `receipt_record.py` | diff --git a/capabilities/04-the-core-a-checked-entry-every-time/0560-follow-up-receipts-each-later-change-in-a.md b/capabilities/04-the-core-a-checked-entry-every-time/0560-follow-up-receipts-each-later-change-in-a.md new file mode 100644 index 0000000000..22484d2419 --- /dev/null +++ b/capabilities/04-the-core-a-checked-entry-every-time/0560-follow-up-receipts-each-later-change-in-a.md @@ -0,0 +1 @@ +| Follow-up receipts: each later change in a handoff's state is a separately signed `record/run/v1` record naming the original receipt (`follows`), and the chain verifies in order (`verify_chain`) | In a pull request | Unit tests: a three-record chain verifies; wrong original, out of sequence, changed fields and empty updates are refused | `openadapt handoff list --run RUN --sign-updates`, `openadapt_flow/handoffs/followup.py` | diff --git a/capabilities/04-the-core-a-checked-entry-every-time/0570-keep-the-server-s-own-answer-to-a-save-as-lower.md b/capabilities/04-the-core-a-checked-entry-every-time/0570-keep-the-server-s-own-answer-to-a-save-as-lower.md new file mode 100644 index 0000000000..c0cbbe733c --- /dev/null +++ b/capabilities/04-the-core-a-checked-entry-every-time/0570-keep-the-server-s-own-answer-to-a-save-as-lower.md @@ -0,0 +1 @@ +| Keep the server's own answer to a save as lower-level evidence on the receipt | Released ([#1298](https://github.com/OpenAdaptAI/OpenAdapt/pull/1298)) | Synthetic | receipts | diff --git a/capabilities/04-the-core-a-checked-entry-every-time/0580-a-ledger-of-what-changed-before-a-stop-a-write.md b/capabilities/04-the-core-a-checked-entry-every-time/0580-a-ledger-of-what-changed-before-a-stop-a-write.md new file mode 100644 index 0000000000..0b90dff057 --- /dev/null +++ b/capabilities/04-the-core-a-checked-entry-every-time/0580-a-ledger-of-what-changed-before-a-stop-a-write.md @@ -0,0 +1 @@ +| A ledger of what changed before a stop, a write-ordering lint, and undo steps a person approves | Released ([#1263](https://github.com/OpenAdaptAI/OpenAdapt/pull/1263)) | Synthetic (MockMed) | change ledger | diff --git a/capabilities/04-the-core-a-checked-entry-every-time/0590-propose-an-undo-for-each-saving-step-another.md b/capabilities/04-the-core-a-checked-entry-every-time/0590-propose-an-undo-for-each-saving-step-another.md new file mode 100644 index 0000000000..b785b6c63c --- /dev/null +++ b/capabilities/04-the-core-a-checked-entry-every-time/0590-propose-an-undo-for-each-saving-step-another.md @@ -0,0 +1 @@ +| Propose an undo for each saving step (another recording, captured traffic, or the old value), keep it only if a test copy shows every record restored, and offer it after a stop once a person approves it | Released ([#1346](https://github.com/OpenAdaptAI/OpenAdapt/pull/1346)) | Synthetic (MockMed, MockLoan, live browser) | `openadapt-flow undo propose`, `undo accept`; [AFTER_A_STOP.md](packages/flow/docs/AFTER_A_STOP.md) | diff --git a/capabilities/04-the-core-a-checked-entry-every-time/0600-roll-a-stopped-run-back-on-its-own-the-approved.md b/capabilities/04-the-core-a-checked-entry-every-time/0600-roll-a-stopped-run-back-on-its-own-the-approved.md new file mode 100644 index 0000000000..3cfdd3407d --- /dev/null +++ b/capabilities/04-the-core-a-checked-entry-every-time/0600-roll-a-stopped-run-back-on-its-own-the-approved.md @@ -0,0 +1 @@ +| Roll a stopped run back on its own: the approved compensation for each change, latest first, an uncertain write only when a fresh read shows it landed, then a read of the whole database: every row the run touched back as it was and nothing else changed (`ROLLED_BACK`), or the exact rows a person repairs (`RECONCILIATION_REQUIRED`). A compensation runs only while every change in the store is positively the run's own by the app's audit log, so another user's work is never compensated away, and a hard delete runs only where the deployment allows it (void, restore or discard otherwise). `rollback qualify` stops the run before and after every save on a test copy and keeps only compensations that restore the whole store. On a desktop or remote-display backend a screen compensation runs only after the run's and the compensation's start screens are checked on the same backend | On main ([#1634](https://github.com/OpenAdaptAI/OpenAdapt/pull/1634)); desktop in [#1771](https://github.com/OpenAdaptAI/OpenAdapt/pull/1771) | MockMed, live browser through the CLI; SQLite whole-database tests (web and desktop paths) | `openadapt-flow rollback qualify`, `rollback:` in deployment.yaml; [ROLLBACK.md](packages/flow/docs/ROLLBACK.md) | diff --git a/capabilities/04-the-core-a-checked-entry-every-time/0610-leave-the-screen-clean-after-an-item-that-halted.md b/capabilities/04-the-core-a-checked-entry-every-time/0610-leave-the-screen-clean-after-an-item-that-halted.md new file mode 100644 index 0000000000..32b1cbd873 --- /dev/null +++ b/capabilities/04-the-core-a-checked-entry-every-time/0610-leave-the-screen-clean-after-an-item-that-halted.md @@ -0,0 +1 @@ +| Leave the screen clean after an item that halted before any write: close dialogs and cancel forms with the recordings' own controls, re-enter, confirm the start screen and read the records back before the session takes another item. A session that doesn't come back is marked dirty and takes no more items; a cleanup that changed a record makes the item's write uncertain and stops the run. `cleanup qualify` tries the cleanup after every step on a test copy and refuses one that changes a record | Released ([#1607](https://github.com/OpenAdaptAI/OpenAdapt/pull/1607)) | Synthetic (scripted three-screen app through the real replayer and pool) and real app (pinned OpenEMR: a halted New Patient item left the confirmation dialog open; re-entry closed it, the form was empty, no patient row changed and the next item's first steps ran with no model calls; a signed-out screen was marked dirty; [results](packages/flow/benchmark/halt_cleanup/results/openemr.json)) | `openadapt-flow cleanup qualify`; [HALT_CLEANUP.md](packages/flow/docs/HALT_CLEANUP.md) | diff --git a/capabilities/04-the-core-a-checked-entry-every-time/section.md b/capabilities/04-the-core-a-checked-entry-every-time/section.md new file mode 100644 index 0000000000..1dc2c92488 --- /dev/null +++ b/capabilities/04-the-core-a-checked-entry-every-time/section.md @@ -0,0 +1,12 @@ +## The core: a checked entry, every time + +A person, or a computer-use agent once, shows a task. OpenAdapt compiles it +into a program that makes the same entry every time with no model calls. It +confirms the right record before acting, reads the saved record back from the +system of record instead of trusting the screen, and stops instead of +improvising or retrying when something is off. + +| Capability | Status | Evidence | Where | +| --- | --- | --- | --- | + + diff --git a/capabilities/05-approvals/0010-each-save-waits-for-a-person-by-default.md b/capabilities/05-approvals/0010-each-save-waits-for-a-person-by-default.md new file mode 100644 index 0000000000..0cb1c05f71 --- /dev/null +++ b/capabilities/05-approvals/0010-each-save-waits-for-a-person-by-default.md @@ -0,0 +1 @@ +| Each save waits for a person by default | Released | Synthetic | [APPROVAL_MODES.md](packages/flow/docs/APPROVAL_MODES.md) | diff --git a/capabilities/05-approvals/0020-approve-or-decline-a-save-on-a-paired-phone-with.md b/capabilities/05-approvals/0020-approve-or-decline-a-save-on-a-paired-phone-with.md new file mode 100644 index 0000000000..66e618e71e --- /dev/null +++ b/capabilities/05-approvals/0020-approve-or-decline-a-save-on-a-paired-phone-with.md @@ -0,0 +1 @@ +| Approve or decline a save on a paired phone, with one card per decision and swipe or tap | Released (Desktop) | Synthetic | openadapt-desktop `portal/shell` | diff --git a/capabilities/05-approvals/0030-person-signed-grants-let-named-agents-or-systems.md b/capabilities/05-approvals/0030-person-signed-grants-let-named-agents-or-systems.md new file mode 100644 index 0000000000..c7499e26f7 --- /dev/null +++ b/capabilities/05-approvals/0030-person-signed-grants-let-named-agents-or-systems.md @@ -0,0 +1 @@ +| Person-signed grants let named agents or systems answer saves | Released | Unit tests | `openadapt-flow approver-grant` | diff --git a/capabilities/05-approvals/0040-admit-once-then-stop-only-on-problems.md b/capabilities/05-approvals/0040-admit-once-then-stop-only-on-problems.md new file mode 100644 index 0000000000..5922e60403 --- /dev/null +++ b/capabilities/05-approvals/0040-admit-once-then-stop-only-on-problems.md @@ -0,0 +1 @@ +| Admit once, then stop only on problems | Released ([#1212](https://github.com/OpenAdaptAI/OpenAdapt/pull/1212)), behind a readiness gate | Synthetic | [APPROVAL_MODES.md](packages/flow/docs/APPROVAL_MODES.md) | diff --git a/capabilities/05-approvals/0050-show-the-field-values-a-save-writes-on-the-phone.md b/capabilities/05-approvals/0050-show-the-field-values-a-save-writes-on-the-phone.md new file mode 100644 index 0000000000..565dfad5b2 --- /dev/null +++ b/capabilities/05-approvals/0050-show-the-field-values-a-save-writes-on-the-phone.md @@ -0,0 +1 @@ +| Show the field values a save writes on the phone | Released ([#1257](https://github.com/OpenAdaptAI/OpenAdapt/pull/1257)) | Unit tests | `console/save_approvals.py` | diff --git a/capabilities/05-approvals/0060-answer-exception-cards-from-any-run-on-this.md b/capabilities/05-approvals/0060-answer-exception-cards-from-any-run-on-this.md new file mode 100644 index 0000000000..94c8897dbd --- /dev/null +++ b/capabilities/05-approvals/0060-answer-exception-cards-from-any-run-on-this.md @@ -0,0 +1 @@ +| Answer exception cards from any run on this computer in Desktop's stop queue and on a paired phone: each card (a one-time code prompt, an unexpected dialog, a sign-in partway through, a stall, a possible duplicate, an ambiguous record, a task it can't finish) offers only the run's own closed choices, is answered one at a time, and the answer is signed with the stop queue's approver key. Desktop reads only card files that are regular, owned by this user and readable by no one else, and lists at most 200. The cards come from Flow's exception registry ([#2494](https://github.com/OpenAdaptAI/OpenAdapt/pull/2494)); the Flow 2.4.1 that Desktop runs has none, so cards appear only from runs of a newer Flow | In PR [#2492](https://github.com/OpenAdaptAI/OpenAdapt/pull/2492) (openadapt-desktop 0.31.0) | Unit tests with Flow's card fixture and answer contract; synthetic | openadapt-desktop `exception_queue.py`, `stop_queue.py` | diff --git a/capabilities/05-approvals/0070-show-why-an-agent-asked-for-a-save-who-asked-its.md b/capabilities/05-approvals/0070-show-why-an-agent-asked-for-a-save-who-asked-its.md new file mode 100644 index 0000000000..92344c16a9 --- /dev/null +++ b/capabilities/05-approvals/0070-show-why-an-agent-asked-for-a-save-who-asked-its.md @@ -0,0 +1 @@ +| Show why an agent asked for a save: who asked, its own reason (as a quote), the screen text it saw, and any of that text that reads like an instruction to an agent | Released ([#1359](https://github.com/OpenAdaptAI/OpenAdapt/pull/1359)) | Unit tests, synthetic | `ApprovalProvenance` in `approval_mode/item_approval.py`; the phone card in openadapt-desktop `portal/shell` | diff --git a/capabilities/05-approvals/0080-let-any-agent-stop-and-ask-a-person-with-one.md b/capabilities/05-approvals/0080-let-any-agent-stop-and-ask-a-person-with-one.md new file mode 100644 index 0000000000..a3309d0a12 --- /dev/null +++ b/capabilities/05-approvals/0080-let-any-agent-stop-and-ask-a-person-with-one.md @@ -0,0 +1 @@ +| Let any agent stop and ask a person, with one closed question and one signed answer: seven kinds (`second_factor`, `unexpected_dialog`, `session_expired`, `timeout_or_stall`, `possible_duplicate`, `ambiguous_record`, `cannot_complete`), five answers, a `raise_exception` MCP tool that blocks until answered, detectors that say when to ask, and `exceptions watch`, which reads a Chromium agent's page over CDP, raises `second_factor`, `unexpected_dialog`, `session_expired` and (opt-in) `timeout_or_stall` cards without the agent, and blocks the page's saves while a card is open. Only a verified `continue` or `done_by_person` lets the run go on; a decline, an expiry or an unverifiable answer stops it before any write. The MCP tool can't make an agent that ignores it stop; the watch must start after the guard attaches, and doesn't cover non-browser agents, WebSocket saves, other tabs, a save sent before its next look at the page, `possible_duplicate`, or a run with no watch running. Cards in Desktop's stop queue and on a paired phone ship with openadapt-desktop 0.31.0 in [#2492](https://github.com/OpenAdaptAI/OpenAdapt/pull/2492). The share of cases that need a person is unmeasured | In PR [#2494](https://github.com/OpenAdaptAI/OpenAdapt/pull/2494) | Unit tests and synthetic end-to-end tests: a scripted agent on a one-time-code page over real MCP stdio (one write after `done_by_person`, zero after `abort`, `skip`, an expiry or a key off the roster, read from the app's own state); and, in headless Chromium on MockMed with the guard attached, an agent that never calls the tool hits a synthetic code prompt, the watch raises the card and blocks its save, and after `done_by_person` one save lands and reads back VERIFIED | `openadapt-flow exceptions`, [EXCEPTION_QUEUE.md](packages/flow/docs/EXCEPTION_QUEUE.md) | diff --git a/capabilities/05-approvals/section.md b/capabilities/05-approvals/section.md new file mode 100644 index 0000000000..41dd6d9e67 --- /dev/null +++ b/capabilities/05-approvals/section.md @@ -0,0 +1,6 @@ +## Approvals + +| Capability | Status | Evidence | Where | +| --- | --- | --- | --- | + + diff --git a/capabilities/06-branching-work-not-one-linear-path/0010-learn-one-program-with-branches-from-two-or-more.md b/capabilities/06-branching-work-not-one-linear-path/0010-learn-one-program-with-branches-from-two-or-more.md new file mode 100644 index 0000000000..aa6b4e346a --- /dev/null +++ b/capabilities/06-branching-work-not-one-linear-path/0010-learn-one-program-with-branches-from-two-or-more.md @@ -0,0 +1 @@ +| Learn one program with branches from two or more recordings, or say which recordings are missing | Released | Synthetic | `openadapt-flow induce`, `disambiguate`; [CAPABILITIES.md (flow)](packages/flow/docs/CAPABILITIES.md) | diff --git a/capabilities/06-branching-work-not-one-linear-path/0020-learn-a-guarded-branch-from-several-halts-fixed.md b/capabilities/06-branching-work-not-one-linear-path/0020-learn-a-guarded-branch-from-several-halts-fixed.md new file mode 100644 index 0000000000..e484def350 --- /dev/null +++ b/capabilities/06-branching-work-not-one-linear-path/0020-learn-a-guarded-branch-from-several-halts-fixed.md @@ -0,0 +1 @@ +| Learn a guarded branch from several halts fixed the same way | Released | Synthetic | `openadapt-flow teach-branch`, `learning/branch_teach.py` | diff --git a/capabilities/06-branching-work-not-one-linear-path/0030-run-a-program-over-a-worklist.md b/capabilities/06-branching-work-not-one-linear-path/0030-run-a-program-over-a-worklist.md new file mode 100644 index 0000000000..b817b95154 --- /dev/null +++ b/capabilities/06-branching-work-not-one-linear-path/0030-run-a-program-over-a-worklist.md @@ -0,0 +1 @@ +| Run a program over a worklist | Released | Real app | `openadapt-flow for-each` | diff --git a/capabilities/06-branching-work-not-one-linear-path/0040-learn-a-worklist-loop-from-recordings-that.md b/capabilities/06-branching-work-not-one-linear-path/0040-learn-a-worklist-loop-from-recordings-that.md new file mode 100644 index 0000000000..2538f3dba2 --- /dev/null +++ b/capabilities/06-branching-work-not-one-linear-path/0040-learn-a-worklist-loop-from-recordings-that.md @@ -0,0 +1 @@ +| Learn a worklist loop from recordings that search a record, open it, work it and go back to the list, even when the last row skips the return or rows differ (a field some rows lack, a write some rows get behind a screen check a person accepts). Each pass selects the row's own record by its values, verifies it, and checks that row's write. Certified and governed runs refuse it until qualification covers it | Released ([#1435](https://github.com/OpenAdaptAI/OpenAdapt/pull/1435)) | Synthetic (held-out rows run through the interpreter against an in-memory app) | `openadapt-flow induce`; `Step.target_param` | diff --git a/capabilities/06-branching-work-not-one-linear-path/0050-score-whether-a-program-generalizes-by-running.md b/capabilities/06-branching-work-not-one-linear-path/0050-score-whether-a-program-generalizes-by-running.md new file mode 100644 index 0000000000..9a7304228a --- /dev/null +++ b/capabilities/06-branching-work-not-one-linear-path/0050-score-whether-a-program-generalizes-by-running.md @@ -0,0 +1 @@ +| Score whether a program generalizes by running held-out items: each item runs through the replayer with its own inputs and record check, and an independent check the program never sees says whether the intended record got exactly the intended change (generalized, halted safely, silent wrong, wrong effect, unconfirmed write); a loop program runs each item as a one-row worklist. `induce --held-out` stays a structural shape check that runs nothing | Released ([#1527](https://github.com/OpenAdaptAI/OpenAdapt/pull/1527)) | Synthetic (an induced worklist loop scored on held-out rows against an in-memory chart app) | `openadapt_flow.validation.behavioral_generalization` | diff --git a/capabilities/06-branching-work-not-one-linear-path/0060-typed-business-decisions-inside-a-run.md b/capabilities/06-branching-work-not-one-linear-path/0060-typed-business-decisions-inside-a-run.md new file mode 100644 index 0000000000..bf7bb44bcc --- /dev/null +++ b/capabilities/06-branching-work-not-one-linear-path/0060-typed-business-decisions-inside-a-run.md @@ -0,0 +1 @@ +| Typed business decisions inside a run | Released | Synthetic | `business_decision` states, `openadapt-flow business-decisions` | diff --git a/capabilities/06-branching-work-not-one-linear-path/0070-watch-many-real-runs-in-the-background-and-mine.md b/capabilities/06-branching-work-not-one-linear-path/0070-watch-many-real-runs-in-the-background-and-mine.md new file mode 100644 index 0000000000..face5cda96 --- /dev/null +++ b/capabilities/06-branching-work-not-one-linear-path/0070-watch-many-real-runs-in-the-background-and-mine.md @@ -0,0 +1 @@ +| Watch many real runs in the background and mine candidate branches (shadow mode) | Released ([#1212](https://github.com/OpenAdaptAI/OpenAdapt/pull/1212)) | Synthetic | [SHADOW_MINING.md](packages/capture/docs/SHADOW_MINING.md), [LEARN_FROM_MANY_RUNS.md](packages/flow/docs/LEARN_FROM_MANY_RUNS.md) | diff --git a/capabilities/06-branching-work-not-one-linear-path/0080-fill-a-workflow-s-inputs-from-a-referral-pdf-fax.md b/capabilities/06-branching-work-not-one-linear-path/0080-fill-a-workflow-s-inputs-from-a-referral-pdf-fax.md new file mode 100644 index 0000000000..1ba26ecf89 --- /dev/null +++ b/capabilities/06-branching-work-not-one-linear-path/0080-fill-a-workflow-s-inputs-from-a-referral-pdf-fax.md @@ -0,0 +1 @@ +| Fill a workflow's inputs from a referral PDF, fax image or email | Released | Synthetic | `openadapt-flow intake`, [INTAKE.md](packages/flow/docs/INTAKE.md) | diff --git a/capabilities/06-branching-work-not-one-linear-path/0090-use-spoken-narration-while-recording-to-propose.md b/capabilities/06-branching-work-not-one-linear-path/0090-use-spoken-narration-while-recording-to-propose.md new file mode 100644 index 0000000000..6658d8e23f --- /dev/null +++ b/capabilities/06-branching-work-not-one-linear-path/0090-use-spoken-narration-while-recording-to-propose.md @@ -0,0 +1 @@ +| Use spoken narration while recording to propose the rule behind a branch | Released ([#1291](https://github.com/OpenAdaptAI/OpenAdapt/pull/1291)) | Synthetic (generated audio) | `openadapt-capture[audio,privacy]` | diff --git a/capabilities/06-branching-work-not-one-linear-path/0100-settle-a-disagreement-between-recordings-by.md b/capabilities/06-branching-work-not-one-linear-path/0100-settle-a-disagreement-between-recordings-by.md new file mode 100644 index 0000000000..881c1bee30 --- /dev/null +++ b/capabilities/06-branching-work-not-one-linear-path/0100-settle-a-disagreement-between-recordings-by.md @@ -0,0 +1 @@ +| Settle a disagreement between recordings by trying both paths on a test copy of the app and reading the record back | Released ([#1276](https://github.com/OpenAdaptAI/OpenAdapt/pull/1276), [#1289](https://github.com/OpenAdaptAI/OpenAdapt/pull/1289)) | Synthetic (MockMed; desktop and remote test copies) | `induce --probe-on` | diff --git a/capabilities/06-branching-work-not-one-linear-path/0110-route-each-item-to-the-right-verified-variant-of.md b/capabilities/06-branching-work-not-one-linear-path/0110-route-each-item-to-the-right-verified-variant-of.md new file mode 100644 index 0000000000..eb7e27ff11 --- /dev/null +++ b/capabilities/06-branching-work-not-one-linear-path/0110-route-each-item-to-the-right-verified-variant-of.md @@ -0,0 +1 @@ +| Route each item to the right verified variant of a program | Released ([#1264](https://github.com/OpenAdaptAI/OpenAdapt/pull/1264)) | Synthetic | `variants`, `route` | diff --git a/capabilities/06-branching-work-not-one-linear-path/section.md b/capabilities/06-branching-work-not-one-linear-path/section.md new file mode 100644 index 0000000000..fa25b5d504 --- /dev/null +++ b/capabilities/06-branching-work-not-one-linear-path/section.md @@ -0,0 +1,6 @@ +## Branching work, not one linear path + +| Capability | Status | Evidence | Where | +| --- | --- | --- | --- | + + diff --git a/capabilities/07-surfaces/0010-web-playwright-chromium.md b/capabilities/07-surfaces/0010-web-playwright-chromium.md new file mode 100644 index 0000000000..babece4f7b --- /dev/null +++ b/capabilities/07-surfaces/0010-web-playwright-chromium.md @@ -0,0 +1 @@ +| Web (Playwright, Chromium) | Released | Real apps on local test copies (OpenEMR, Odoo, Frappe Lending, openIMIS) and Medplum; CI runs in-tree apps on every build | [SURFACES.md](packages/flow/docs/SURFACES.md) | diff --git a/capabilities/07-surfaces/0020-native-windows-ui-automation.md b/capabilities/07-surfaces/0020-native-windows-ui-automation.md new file mode 100644 index 0000000000..cdc47b3709 --- /dev/null +++ b/capabilities/07-surfaces/0020-native-windows-ui-automation.md @@ -0,0 +1 @@ +| Native Windows (UI Automation) | Released | Synthetic (a WinForms test app in a Windows 11 VM, 3 of 3 trials); CI on a GitHub-hosted Windows runner on every change to the Windows path and nightly: record, compile and replay of the WinForms Patient Notes app through the real win_agent, judged from its SQLite record, with a near-identical sibling roster that must not be written, and a non-gating governed run of the same workflow under the Standard profile with a person's signed approval, a hold and a resume, whose resume currently stops before the save on a false form change (fail-closed, nothing written; [#2189](https://github.com/OpenAdaptAI/OpenAdapt/issues/2189)), followed by a gating check that fails the job on any sibling, held or unverified write ([desktop-replay.yml](.github/workflows/desktop-replay.yml)); on a real Windows 11 ARM machine, record, compile and replay of the same kind of WinForms test form with an owned confirm dialog, 3 of 3 trials, each also refusing a target covered by another app's window and one blocked by a modal dialog before any input | [SURFACES.md](packages/flow/docs/SURFACES.md) | diff --git a/capabilities/07-surfaces/0030-native-macos-accessibility.md b/capabilities/07-surfaces/0030-native-macos-accessibility.md new file mode 100644 index 0000000000..330917f381 --- /dev/null +++ b/capabilities/07-surfaces/0030-native-macos-accessibility.md @@ -0,0 +1 @@ +| Native macOS (Accessibility) | Released | Synthetic (TextEdit, 3 of 3 file effects, driving the backend directly); a real third-party app, calibre (Qt, SQLite library): record, compile (certified under `clinical-write`) and a `standard` run checked against the library's database, `VERIFIED` with only the target book changed; a same-title book by another author stopped at the identity check and two identical books were refused as ambiguous, each with nothing written ([benchmark/macos_native](packages/flow/benchmark/macos_native/README.md)) | [SURFACES.md](packages/flow/docs/SURFACES.md) | diff --git a/capabilities/07-surfaces/0040-native-linux-at-spi-x11.md b/capabilities/07-surfaces/0040-native-linux-at-spi-x11.md new file mode 100644 index 0000000000..e4cd81d983 --- /dev/null +++ b/capabilities/07-surfaces/0040-native-linux-at-spi-x11.md @@ -0,0 +1 @@ +| Native Linux (AT-SPI, X11) | Released | Real AT-SPI in CI (`flow-linux-atspi`, Xvfb with a window manager): a GTK3 fixture (3 verified effects, 3 ambiguous and 3 stale targets refused) and a GTK3 chart app with SQLite: record, compile (certified under `clinical-write`), a `standard` run `VERIFIED` against the database, another patient's chart and a look-alike chart stopped before the save, and a repaired notice admitted on its AT-SPI element identity ([benchmark/repair_every_backend](packages/flow/benchmark/repair_every_backend/README.md)) | [LINUX_NATIVE.md](packages/flow/docs/desktop/LINUX_NATIVE.md) | diff --git a/capabilities/07-surfaces/0050-rdp-pixels-aardwolf-or-headless-freerdp-with-a.md b/capabilities/07-surfaces/0050-rdp-pixels-aardwolf-or-headless-freerdp-with-a.md new file mode 100644 index 0000000000..ef11b1bf8d --- /dev/null +++ b/capabilities/07-surfaces/0050-rdp-pixels-aardwolf-or-headless-freerdp-with-a.md @@ -0,0 +1 @@ +| RDP (pixels; Aardwolf or headless FreeRDP with a session pool) | Released | A Windows 11 VM over Aardwolf RDP, 3 of 3 (transport and input), plus a FreeRDP batch; through the stock Remote Desktop client on a real H.264/AVC444 session, 105 scripted runs on two apps (OpenEMR in Edge and a WinForms test app): 55 saves confirmed in the database, 0 wrong-record saves, 40 false stops ranked by cause | [SURFACES.md](packages/flow/docs/SURFACES.md), `backends/xfreerdp.py`, [benchmark/rdp_avc_real](packages/flow/benchmark/rdp_avc_real/README.md) | diff --git a/capabilities/07-surfaces/0060-remote-and-virtual-desktop-sessions-rdp-user.md b/capabilities/07-surfaces/0060-remote-and-virtual-desktop-sessions-rdp-user.md new file mode 100644 index 0000000000..3aae8f2eda --- /dev/null +++ b/capabilities/07-surfaces/0060-remote-and-virtual-desktop-sessions-rdp-user.md @@ -0,0 +1 @@ +| Remote and virtual desktop sessions (RDP user sessions, Citrix and other virtual desktops), with OpenAdapt installed inside the session (`in_session`): the same structure-first path as a local desktop | Released | The Windows path's evidence (above): a WinForms test app in a Windows 11 VM, 3 of 3 (synthetic) | [SURFACES.md](packages/flow/docs/SURFACES.md) | diff --git a/capabilities/07-surfaces/0070-citrix-from-outside-the-session-pixels-only.md b/capabilities/07-surfaces/0070-citrix-from-outside-the-session-pixels-only.md new file mode 100644 index 0000000000..ebabca70e9 --- /dev/null +++ b/capabilities/07-surfaces/0070-citrix-from-outside-the-session-pixels-only.md @@ -0,0 +1 @@ +| Citrix from outside the session, pixels only (`remote_display`), the fallback when nothing can be installed inside | Exploratory | A Citrix stand-in with no DOM: 3 healthy runs, 3 stops on drift | [LIMITS.md](packages/flow/docs/LIMITS.md) | diff --git a/capabilities/07-surfaces/0080-chain-programs-across-surfaces-passing-confirmed.md b/capabilities/07-surfaces/0080-chain-programs-across-surfaces-passing-confirmed.md new file mode 100644 index 0000000000..c6fc893d17 --- /dev/null +++ b/capabilities/07-surfaces/0080-chain-programs-across-surfaces-passing-confirmed.md @@ -0,0 +1 @@ +| Chain programs across surfaces, passing confirmed values | Released | Synthetic | `openadapt-flow compose`, `process`; [PROCESS_CONTRACT.md](packages/flow/docs/PROCESS_CONTRACT.md) | diff --git a/capabilities/07-surfaces/0090-one-program-that-switches-surfaces-tabs-and.md b/capabilities/07-surfaces/0090-one-program-that-switches-surfaces-tabs-and.md new file mode 100644 index 0000000000..e97364dce8 --- /dev/null +++ b/capabilities/07-surfaces/0090-one-program-that-switches-surfaces-tabs-and.md @@ -0,0 +1 @@ +| One program that switches surfaces, tabs and popups mid-run | Released ([#1197](https://github.com/OpenAdaptAI/OpenAdapt/pull/1197)) | Real Chromium; Windows switch on a mock | [#1197](https://github.com/OpenAdaptAI/OpenAdapt/pull/1197) | diff --git a/capabilities/07-surfaces/0100-record-and-replay-native-or-listed-browser.md b/capabilities/07-surfaces/0100-record-and-replay-native-or-listed-browser.md new file mode 100644 index 0000000000..f54d156da9 --- /dev/null +++ b/capabilities/07-surfaces/0100-record-and-replay-native-or-listed-browser.md @@ -0,0 +1 @@ +| Record and replay native or listed browser choices using one generic contract; require one enabled semantic match and exact committed-field read-back, and refuse unmapped held-out labels before selection; retain browser dialog answers with producer-document and dialog-kind checks | Experimental, PR [#2295](https://github.com/OpenAdaptAI/OpenAdapt/pull/2295) | Synthetic Chromium fixtures cover native, ARIA, plain lists, searchable libraries, asynchronous options, cascades and calendars; historical measurement SHAs and configurations are listed separately. Real-app evidence is partial: OpenEMR native choices read back, and OpenMRS relationship choices recorded/compiled; neither completed a verified save because an existing identity guard stopped the run. Governed receipt-bound choices refuse before input. | [CHOICES.md](packages/flow/docs/CHOICES.md), [benchmark/choice_widgets](packages/flow/benchmark/choice_widgets/README.md) | diff --git a/capabilities/07-surfaces/0110-halt-when-a-workflow-qualified-with-page.md b/capabilities/07-surfaces/0110-halt-when-a-workflow-qualified-with-page.md new file mode 100644 index 0000000000..05e9aafde0 --- /dev/null +++ b/capabilities/07-surfaces/0110-halt-when-a-workflow-qualified-with-page.md @@ -0,0 +1 @@ +| Halt when a workflow qualified with page structure runs on a pixels-only surface | Released | Synthetic | `openadapt-flow qualify` | diff --git a/capabilities/07-surfaces/0120-stop-before-acting-when-another-shown-row-has.md b/capabilities/07-surfaces/0120-stop-before-acting-when-another-shown-row-has.md new file mode 100644 index 0000000000..b0dabf1852 --- /dev/null +++ b/capabilities/07-surfaces/0120-stop-before-acting-when-another-shown-row-has.md @@ -0,0 +1 @@ +| Stop before acting when another shown row has the same identity; when the rows carry an app-owned record id (a `data-*` id, the row link), act on the row with the recorded id; on a surface that cannot count the rows, stop before any step that leads into a write | Released ([#1504](https://github.com/OpenAdaptAI/OpenAdapt/pull/1504)) | Real browser (headless Chromium worklist with identical rows) | `runtime/identity_census.py`; `PlaywrightBackend.identity_candidates_at` | diff --git a/capabilities/07-surfaces/0130-read-a-dialog-target-s-identity-on-the-topmost.md b/capabilities/07-surfaces/0130-read-a-dialog-target-s-identity-on-the-topmost.md new file mode 100644 index 0000000000..66a48e8e89 --- /dev/null +++ b/capabilities/07-surfaces/0130-read-a-dialog-target-s-identity-on-the-topmost.md @@ -0,0 +1 @@ +| Read a dialog target's identity on the topmost modal dialog alone, not the page behind it, and stop when no dialog holds the target | On main ([#1615](https://github.com/OpenAdaptAI/OpenAdapt/pull/1615)) | Real app (local OpenEMR, synthetic data): at the duplicate dialog with the form scrolled to 8 positions behind it, 0 of 8 false stops, against 8 of 8 before; a dialog listing a possible duplicate still stops | `PlaywrightBackend.dialog_region_at`, `Anchor.dialog_region`; [dialog_identity_2026-10-28](packages/flow/benchmark/openemr_throughput/dialog_identity_2026-10-28/README.md) | diff --git a/capabilities/07-surfaces/0140-lift-look-alike-identity-stops-with-a-complete.md b/capabilities/07-surfaces/0140-lift-look-alike-identity-stops-with-a-complete.md new file mode 100644 index 0000000000..ae556aca70 --- /dev/null +++ b/capabilities/07-surfaces/0140-lift-look-alike-identity-stops-with-a-complete.md @@ -0,0 +1 @@ +| Lift look-alike identity stops with a complete known-ID list | Released | Synthetic (rendered record list) | `openadapt-flow known-ids` | diff --git a/capabilities/07-surfaces/0150-take-extra-looks-before-stopping-on-a-look-alike.md b/capabilities/07-surfaces/0150-take-extra-looks-before-stopping-on-a-look-alike.md new file mode 100644 index 0000000000..fa739bebde --- /dev/null +++ b/capabilities/07-surfaces/0150-take-extra-looks-before-stopping-on-a-look-alike.md @@ -0,0 +1 @@ +| Take extra looks before stopping on a look-alike record ID: fresh frames, the known-ID list, and a select-and-copy of the ID where the surface allows it | Released ([#1333](https://github.com/OpenAdaptAI/OpenAdapt/pull/1333)) | Synthetic (dense record list in a browser) | `runtime.identity_copy_look` in deployment.yaml; [IDENTITY_LOOKS.md](packages/flow/benchmark/identity_looks/IDENTITY_LOOKS.md) | diff --git a/capabilities/07-surfaces/0160-check-an-icon-only-click-target-s-hover-response.md b/capabilities/07-surfaces/0160-check-an-icon-only-click-target-s-hover-response.md new file mode 100644 index 0000000000..5b4831da49 --- /dev/null +++ b/capabilities/07-surfaces/0160-check-an-icon-only-click-target-s-hover-response.md @@ -0,0 +1 @@ +| Check an icon-only click target's hover response (highlight, tooltip) before clicking on a pixel surface, and re-check the target and identity regions on a fresh frame right before every pixel click | Released ([#1334](https://github.com/OpenAdaptAI/OpenAdapt/pull/1334)) | Synthetic (in-process kiosk) | `Recorder(capture_hover=True)`; [hover_identity](packages/flow/benchmark/hover_identity/README.md) | diff --git a/capabilities/07-surfaces/section.md b/capabilities/07-surfaces/section.md new file mode 100644 index 0000000000..3b83b34e6c --- /dev/null +++ b/capabilities/07-surfaces/section.md @@ -0,0 +1,6 @@ +## Surfaces + +| Surface | Status | Evidence | Where | +| --- | --- | --- | --- | + + diff --git a/capabilities/08-the-fastest-layer-the-app-allows/0010-page-structure-dom-ui-automation-accessibility.md b/capabilities/08-the-fastest-layer-the-app-allows/0010-page-structure-dom-ui-automation-accessibility.md new file mode 100644 index 0000000000..3cdf25a11e --- /dev/null +++ b/capabilities/08-the-fastest-layer-the-app-allows/0010-page-structure-dom-ui-automation-accessibility.md @@ -0,0 +1 @@ +| Page structure (DOM, UI Automation, Accessibility) first, then template, OCR and geometry | Released | Real apps on the web; synthetic on Windows and macOS | [RESOLUTION_LADDER.md](packages/flow/docs/RESOLUTION_LADDER.md) | diff --git a/capabilities/08-the-fastest-layer-the-app-allows/0020-run-a-step-as-a-direct-api-call-apiactuator.md b/capabilities/08-the-fastest-layer-the-app-allows/0020-run-a-step-as-a-direct-api-call-apiactuator.md new file mode 100644 index 0000000000..451d851c52 --- /dev/null +++ b/capabilities/08-the-fastest-layer-the-app-allows/0020-run-a-step-as-a-direct-api-call-apiactuator.md @@ -0,0 +1 @@ +| Run a step as a direct API call (`ApiActuator`, `ApiBinding`) | Released, hand-authored bindings | Synthetic benchmarks | `runtime/actuators/api.py` | diff --git a/capabilities/08-the-fastest-layer-the-app-allows/0030-capture-a-recording-s-network-traffic-and.md b/capabilities/08-the-fastest-layer-the-app-allows/0030-capture-a-recording-s-network-traffic-and.md new file mode 100644 index 0000000000..f2144f27ea --- /dev/null +++ b/capabilities/08-the-fastest-layer-the-app-allows/0030-capture-a-recording-s-network-traffic-and.md @@ -0,0 +1 @@ +| Capture a recording's network traffic and compile a clean save into an API step, with the same record check | Released ([#1269](https://github.com/OpenAdaptAI/OpenAdapt/pull/1269)) | Synthetic patients on a local OpenEMR test copy | network capture, `ApiBinding` | diff --git a/capabilities/08-the-fastest-layer-the-app-allows/0040-fall-back-from-the-api-step-to-page-structure.md b/capabilities/08-the-fastest-layer-the-app-allows/0040-fall-back-from-the-api-step-to-page-structure.md new file mode 100644 index 0000000000..167d100eb6 --- /dev/null +++ b/capabilities/08-the-fastest-layer-the-app-allows/0040-fall-back-from-the-api-step-to-page-structure.md @@ -0,0 +1 @@ +| Fall back from the API step to page structure when the API is unavailable, before anything is sent | Released ([#1269](https://github.com/OpenAdaptAI/OpenAdapt/pull/1269)) | Synthetic | [#1269](https://github.com/OpenAdaptAI/OpenAdapt/pull/1269) | diff --git a/capabilities/08-the-fastest-layer-the-app-allows/0050-run-a-form-s-own-script-before-an-api-save.md b/capabilities/08-the-fastest-layer-the-app-allows/0050-run-a-form-s-own-script-before-an-api-save.md new file mode 100644 index 0000000000..04de4df24f --- /dev/null +++ b/capabilities/08-the-fastest-layer-the-app-allows/0050-run-a-form-s-own-script-before-an-api-save.md @@ -0,0 +1 @@ +| Run a form's own script before an API save instead of refusing the form: field handlers, `onsubmit`, submit listeners and custom validate.js rules (OpenEMR's `pastDate`) run on the run's values in a scratch copy of the session with every write blocked, and the save is sent only when the page lets the submit through and would send the same body | On main | Synthetic (headless Chromium against a local test page) | [API_TIER.md](packages/flow/docs/API_TIER.md#what-happens-at-run-time), `runtime/actuators/form_eval.py` | diff --git a/capabilities/08-the-fastest-layer-the-app-allows/0060-compare-paired-gui-api-database-changes-with-api.md b/capabilities/08-the-fastest-layer-the-app-allows/0060-compare-paired-gui-api-database-changes-with-api.md new file mode 100644 index 0000000000..5b9a7310ac --- /dev/null +++ b/capabilities/08-the-fastest-layer-the-app-allows/0060-compare-paired-gui-api-database-changes-with-api.md @@ -0,0 +1 @@ +| Compare paired GUI/API database changes with `api admit --footprint`: changed rows retain their identity and before/after values, and unexplained field differences refuse. Variation alone does not establish server ownership. | This PR | Synthetic headless Chromium and SQLite; generated insert ID/time differences conservatively refuse | `openadapt_flow/api_footprint.py` | diff --git a/capabilities/08-the-fastest-layer-the-app-allows/0070-propose-api-steps-for-saves-a-page-s-script.md b/capabilities/08-the-fastest-layer-the-app-allows/0070-propose-api-steps-for-saves-a-page-s-script.md new file mode 100644 index 0000000000..710ee96dd1 --- /dev/null +++ b/capabilities/08-the-fastest-layer-the-app-allows/0070-propose-api-steps-for-saves-a-page-s-script.md @@ -0,0 +1 @@ +| Propose API steps for saves a page's script sends as JSON or as a GraphQL mutation: each typed value bound to its one JSON leaf, constants sent as recorded, values the page makes on each save refused, the app's own auth headers reused from the live session in memory only, and a GraphQL answer with errors halts | This PR | Headless Chromium against a local single-page app; EspoCRM, Medplum and Wiki.js fixtures | [API_TIER.md](packages/flow/docs/API_TIER.md#json-and-graphql-saves) | diff --git a/capabilities/08-the-fastest-layer-the-app-allows/0080-propose-api-steps-for-more-save-shapes-multipart.md b/capabilities/08-the-fastest-layer-the-app-allows/0080-propose-api-steps-for-more-save-shapes-multipart.md new file mode 100644 index 0000000000..b61d97e2fe --- /dev/null +++ b/capabilities/08-the-fastest-layer-the-app-allows/0080-propose-api-steps-for-more-save-shapes-multipart.md @@ -0,0 +1 @@ +| Propose API steps for more save shapes: multipart saves with no file (encoded as Chromium encodes them), the clicked submit button's `name=value`, empty file inputs, forms with no `action`, and saves the page's script sends to another endpoint (run through the page's own script before every save); success addresses keep a record's path with numbers and hashes generalized | This PR | Headless Chromium against local test pages, and recordings from Redmine, WordPress, NetBox, Dolibarr and Trac fixtures | [API_TIER.md](packages/flow/docs/API_TIER.md#what-the-compiler-checks) | diff --git a/capabilities/08-the-fastest-layer-the-app-allows/0090-declare-the-other-writes-in-an-api-step-s-span.md b/capabilities/08-the-fastest-layer-the-app-allows/0090-declare-the-other-writes-in-an-api-step-s-span.md new file mode 100644 index 0000000000..e30d44d6a9 --- /dev/null +++ b/capabilities/08-the-fastest-layer-the-app-allows/0090-declare-the-other-writes-in-an-api-step-s-span.md @@ -0,0 +1 @@ +| Declare the other writes in an API step's span as an ordered sequence: the page's own background requests (another document's script, loaded before the form, to an endpoint the form doesn't name) are listed and not sent; a write a step caused is sent in its recorded place before the save, read back by that step's record check, and a failure stops the run with nothing after it sent and nothing retried | On main | Synthetic | [API_TIER.md](packages/flow/docs/API_TIER.md#other-writes-in-the-span) | diff --git a/capabilities/08-the-fastest-layer-the-app-allows/0100-approve-an-api-step-s-exact-request-under-per.md b/capabilities/08-the-fastest-layer-the-app-allows/0100-approve-an-api-step-s-exact-request-under-per.md new file mode 100644 index 0000000000..402f063387 --- /dev/null +++ b/capabilities/08-the-fastest-layer-the-app-allows/0100-approve-an-api-step-s-exact-request-under-per.md @@ -0,0 +1 @@ +| Approve an API step's exact request under per-item approval: one digest binds the request bytes, the record and the record check, and a changed request is not sent | Released ([#1355](https://github.com/OpenAdaptAI/OpenAdapt/pull/1355)) | Synthetic | [API_TIER.md](packages/flow/docs/API_TIER.md#under-an-approval-mode) | diff --git a/capabilities/08-the-fastest-layer-the-app-allows/0110-run-an-api-step-in-a-durable-run-checkpoint-the.md b/capabilities/08-the-fastest-layer-the-app-allows/0110-run-an-api-step-in-a-durable-run-checkpoint-the.md new file mode 100644 index 0000000000..63db14fc9b --- /dev/null +++ b/capabilities/08-the-fastest-layer-the-app-allows/0110-run-an-api-step-in-a-durable-run-checkpoint-the.md @@ -0,0 +1 @@ +| Run an API step in a durable run: checkpoint the span after the save is sent, never resend or redo a save that may have landed, and reconcile it by reading the record back | Released ([#1358](https://github.com/OpenAdaptAI/OpenAdapt/pull/1358)) | Synthetic | [API_TIER.md](packages/flow/docs/API_TIER.md#in-a-durable-run) | diff --git a/capabilities/08-the-fastest-layer-the-app-allows/0120-run-an-admitted-api-step-under-a-governed-run.md b/capabilities/08-the-fastest-layer-the-app-allows/0120-run-an-admitted-api-step-under-a-governed-run.md new file mode 100644 index 0000000000..42fb4fdf53 --- /dev/null +++ b/capabilities/08-the-fastest-layer-the-app-allows/0120-run-an-admitted-api-step-under-a-governed-run.md @@ -0,0 +1 @@ +| Run an admitted API step under a governed run authorization and the Standard or Regulated profile: the authorization names the API step by digest, the person who admits it names the right-record parameter, and the outcome reads `VERIFIED` | Released ([#1361](https://github.com/OpenAdaptAI/OpenAdapt/pull/1361)) | Synthetic | [API_TIER.md](packages/flow/docs/API_TIER.md#under-governance) | diff --git a/capabilities/08-the-fastest-layer-the-app-allows/0130-run-an-admitted-api-step-under-a-managed-cloud.md b/capabilities/08-the-fastest-layer-the-app-allows/0130-run-an-admitted-api-step-under-a-managed-cloud.md new file mode 100644 index 0000000000..d16d1facd7 --- /dev/null +++ b/capabilities/08-the-fastest-layer-the-app-allows/0130-run-an-admitted-api-step-under-a-managed-cloud.md @@ -0,0 +1 @@ +| Run an admitted API step under a managed (Cloud) dispatch whose authorization names it: the API step rows are inside the dispatch digest Cloud signs, and each send still needs Cloud's delivery permit | On main | Synthetic | [API_TIER.md](packages/flow/docs/API_TIER.md#under-governance) | diff --git a/capabilities/08-the-fastest-layer-the-app-allows/0140-run-an-admitted-api-step-under-a-signed.md b/capabilities/08-the-fastest-layer-the-app-allows/0140-run-an-admitted-api-step-under-a-signed.md new file mode 100644 index 0000000000..e7bbb90fc2 --- /dev/null +++ b/capabilities/08-the-fastest-layer-the-app-allows/0140-run-an-admitted-api-step-under-a-signed.md @@ -0,0 +1 @@ +| Run an admitted API step under a signed production qualification admission when its qualified effect contract names the API path, and let a qualification case run the path its contract names | On main | Synthetic | [API_TIER.md](packages/flow/docs/API_TIER.md#under-governance) | diff --git a/capabilities/08-the-fastest-layer-the-app-allows/0150-defer-an-api-save-s-read-back-with-pipelined.md b/capabilities/08-the-fastest-layer-the-app-allows/0150-defer-an-api-save-s-read-back-with-pipelined.md new file mode 100644 index 0000000000..5c81c203bf --- /dev/null +++ b/capabilities/08-the-fastest-layer-the-app-allows/0150-defer-an-api-save-s-read-back-with-pipelined.md @@ -0,0 +1 @@ +| Defer an API save's read-back with pipelined read-back, as for a GUI save, and keep self-repair's probes and resumed run on the repaired GUI step | Released ([#1362](https://github.com/OpenAdaptAI/OpenAdapt/pull/1362)) | Synthetic | [API_TIER.md](packages/flow/docs/API_TIER.md#with-parallel-workers-pipelined-read-back-and-self-repair) | diff --git a/capabilities/08-the-fastest-layer-the-app-allows/0160-defer-the-last-record-check-under-durable-and.md b/capabilities/08-the-fastest-layer-the-app-allows/0160-defer-the-last-record-check-under-durable-and.md new file mode 100644 index 0000000000..f0c3c67caa --- /dev/null +++ b/capabilities/08-the-fastest-layer-the-app-allows/0160-defer-the-last-record-check-under-durable-and.md @@ -0,0 +1 @@ +| Defer the last record check under durable and governed runs: the durable pause holds the check, so a crash re-runs only the check and never resends the save | On main | Synthetic | [THROUGHPUT.md](packages/flow/docs/THROUGHPUT.md#under-durable-and-governed-runs) | diff --git a/capabilities/08-the-fastest-layer-the-app-allows/0170-run-an-admitted-api-step-inside-a-multi-surface.md b/capabilities/08-the-fastest-layer-the-app-allows/0170-run-an-admitted-api-step-inside-a-multi-surface.md new file mode 100644 index 0000000000..293dcbc286 --- /dev/null +++ b/capabilities/08-the-fastest-layer-the-app-allows/0170-run-an-admitted-api-step-inside-a-multi-surface.md @@ -0,0 +1 @@ +| Run an admitted API step inside a multi-surface program, bound to its one browser surface and that surface's origin; its folded steps record the surface | On main | Synthetic | [API_TIER.md](packages/flow/docs/API_TIER.md#in-a-multi-surface-program) | diff --git a/capabilities/08-the-fastest-layer-the-app-allows/0180-say-for-every-feature-under-every-run-profile.md b/capabilities/08-the-fastest-layer-the-app-allows/0180-say-for-every-feature-under-every-run-profile.md new file mode 100644 index 0000000000..47ab7d0fb3 --- /dev/null +++ b/capabilities/08-the-fastest-layer-the-app-allows/0180-say-for-every-feature-under-every-run-profile.md @@ -0,0 +1 @@ +| Say, for every feature under every run profile, whether it works or is refused and why, checked against the runtime in CI | Released ([#1364](https://github.com/OpenAdaptAI/OpenAdapt/pull/1364)) | Synthetic | [COMPATIBILITY.md](packages/flow/docs/COMPATIBILITY.md) | diff --git a/capabilities/08-the-fastest-layer-the-app-allows/0190-run-a-worklist-on-several-workers-at-once-one.md b/capabilities/08-the-fastest-layer-the-app-allows/0190-run-a-worklist-on-several-workers-at-once-one.md new file mode 100644 index 0000000000..708a71b8e2 --- /dev/null +++ b/capabilities/08-the-fastest-layer-the-app-allows/0190-run-a-worklist-on-several-workers-at-once-one.md @@ -0,0 +1 @@ +| Run a worklist on several workers at once, one signed-in session each, each item claimed once, with a stop on any worker stopping all | Released ([#1296](https://github.com/OpenAdaptAI/OpenAdapt/pull/1296)) | Synthetic patients on a local OpenEMR test copy | `--workers`, [THROUGHPUT.md](packages/flow/docs/THROUGHPUT.md) | diff --git a/capabilities/08-the-fastest-layer-the-app-allows/0200-read-a-save-back-while-the-next-item-runs.md b/capabilities/08-the-fastest-layer-the-app-allows/0200-read-a-save-back-while-the-next-item-runs.md new file mode 100644 index 0000000000..972ba00b20 --- /dev/null +++ b/capabilities/08-the-fastest-layer-the-app-allows/0200-read-a-save-back-while-the-next-item-runs.md @@ -0,0 +1 @@ +| Read a save back while the next item runs (pipelined read-back, REST, FHIR, GraphQL or SQL record checks) | Released ([#1296](https://github.com/OpenAdaptAI/OpenAdapt/pull/1296)) | Synthetic | `--readback-window`, [THROUGHPUT.md](packages/flow/docs/THROUGHPUT.md) | diff --git a/capabilities/08-the-fastest-layer-the-app-allows/0210-read-a-paged-rest-or-fhir-record-list-whole-fhir.md b/capabilities/08-the-fastest-layer-the-app-allows/0210-read-a-paged-rest-or-fhir-record-list-whole-fhir.md new file mode 100644 index 0000000000..46914d7f77 --- /dev/null +++ b/capabilities/08-the-fastest-layer-the-app-allows/0210-read-a-paged-rest-or-fhir-record-list-whole-fhir.md @@ -0,0 +1 @@ +| Read a paged REST or FHIR record list whole (FHIR `next` links and `total`, REST `records_next_path`), or not at all: a page elsewhere, a failed page, a redirect or a count that doesn't match the total is unreadable | Released ([#1538](https://github.com/OpenAdaptAI/OpenAdapt/pull/1538)) | Synthetic (local FHIR and REST servers) | `effects: kind: rest` `records_next_path`, `kind: fhir`; [EFFECT_KIT.md](packages/flow/docs/EFFECT_KIT.md) | diff --git a/capabilities/08-the-fastest-layer-the-app-allows/0220-read-a-rest-list-whose-last-page-leaves-the-next.md b/capabilities/08-the-fastest-layer-the-app-allows/0220-read-a-rest-list-whose-last-page-leaves-the-next.md new file mode 100644 index 0000000000..d868f0fcd8 --- /dev/null +++ b/capabilities/08-the-fastest-layer-the-app-allows/0220-read-a-rest-list-whose-last-page-leaves-the-next.md @@ -0,0 +1 @@ +| Read a REST list whose last page leaves the next link out (`records_next_absent_is_last` with `records_next_path`): the page is the whole read only when the link's parent object is there without it; a page with a next link still needs snapshot semantics | On main | Real app (local OpenEMR 8.0.0.3, synthetic patients: one 200-row page read complete; a 2-row page with a next link refused) and unit tests | `effects: kind: rest` `records_next_absent_is_last`; `benchmark/openemr_local/verify.yaml` | diff --git a/capabilities/08-the-fastest-layer-the-app-allows/0230-check-screen-text-read-from-the-clock-a-date.md b/capabilities/08-the-fastest-layer-the-app-allows/0230-check-screen-text-read-from-the-clock-a-date.md new file mode 100644 index 0000000000..9d26bc257f --- /dev/null +++ b/capabilities/08-the-fastest-layer-the-app-allows/0230-check-screen-text-read-from-the-clock-a-date.md @@ -0,0 +1 @@ +| Check screen text read from the clock (a date picker's month, a pre-filled date) against the run's clock instead of the recorded literal; another date still fails (a whole OCR line, field for field) | On main | Real app (the OpenEMR referral program, recorded in October, qualified in November) and a headless browser test that records today and replays next month and next January | `Postcondition.text_clock`, `openadapt_flow/clock_text.py`, `python -m openadapt_flow.compiler.clock_pass` | diff --git a/capabilities/08-the-fastest-layer-the-app-allows/0240-a-faster-speed-profile-that-keeps-every-check.md b/capabilities/08-the-fastest-layer-the-app-allows/0240-a-faster-speed-profile-that-keeps-every-check.md new file mode 100644 index 0000000000..1402300597 --- /dev/null +++ b/capabilities/08-the-fastest-layer-the-app-allows/0240-a-faster-speed-profile-that-keeps-every-check.md @@ -0,0 +1 @@ +| A faster speed profile that keeps every check (one insert per plain text field, shorter page-quiet wait) | Released ([#1296](https://github.com/OpenAdaptAI/OpenAdapt/pull/1296)) | Synthetic | `runtime.speed: fast`, [THROUGHPUT.md](packages/flow/docs/THROUGHPUT.md) | diff --git a/capabilities/08-the-fastest-layer-the-app-allows/0250-fewer-browser-calls-per-screen-step-one-call-per.md b/capabilities/08-the-fastest-layer-the-app-allows/0250-fewer-browser-calls-per-screen-step-one-call-per.md new file mode 100644 index 0000000000..bf07062bae --- /dev/null +++ b/capabilities/08-the-fastest-layer-the-app-allows/0250-fewer-browser-calls-per-screen-step-one-call-per.md @@ -0,0 +1 @@ +| Fewer browser calls per screen step: one call per frame boundary in every DOM proof | On main | Real app (local OpenEMR 8.0.0.3, synthetic referrals): median 23.2 s to 20.1 s per referral, N = 14 each, interleaved, same checks at every step; about 3,970 to 2,390 Playwright calls per run | [screen_path_speed](packages/flow/benchmark/screen_path_speed/README.md) | diff --git a/capabilities/08-the-fastest-layer-the-app-allows/0260-derive-the-at-rest-key-once-per-checkpoint-store.md b/capabilities/08-the-fastest-layer-the-app-allows/0260-derive-the-at-rest-key-once-per-checkpoint-store.md new file mode 100644 index 0000000000..e50b4eb67e --- /dev/null +++ b/capabilities/08-the-fastest-layer-the-app-allows/0260-derive-the-at-rest-key-once-per-checkpoint-store.md @@ -0,0 +1 @@ +| Derive the at-rest key once per checkpoint store instead of once per checkpoint, with the container format unchanged | On main | Real app (local OpenEMR 8.0.0.3, synthetic referrals, encrypted durable run to the save): 2,667 to 2 scrypt runs, about 520 s to 14 s; synthetic (MockMed tutorial): 131 to 1, 40.8 s to 14.7 s median (N = 10 each) | [screen_path_speed](packages/flow/benchmark/screen_path_speed/README.md#mockmed-tutorial-the-at-rest-key-fix) | diff --git a/capabilities/08-the-fastest-layer-the-app-allows/0270-record-where-each-step-s-time-goes-in-every-run.md b/capabilities/08-the-fastest-layer-the-app-allows/0270-record-where-each-step-s-time-goes-in-every-run.md new file mode 100644 index 0000000000..cf483bb1aa --- /dev/null +++ b/capabilities/08-the-fastest-layer-the-app-allows/0270-record-where-each-step-s-time-goes-in-every-run.md @@ -0,0 +1 @@ +| Record where each step's time goes in every run report | Released ([#1296](https://github.com/OpenAdaptAI/OpenAdapt/pull/1296)) | Real app and synthetic | `timings` in `report.json` | diff --git a/capabilities/08-the-fastest-layer-the-app-allows/section.md b/capabilities/08-the-fastest-layer-the-app-allows/section.md new file mode 100644 index 0000000000..35a74138af --- /dev/null +++ b/capabilities/08-the-fastest-layer-the-app-allows/section.md @@ -0,0 +1,6 @@ +## The fastest layer the app allows + +| Capability | Status | Evidence | Where | +| --- | --- | --- | --- | + + diff --git a/capabilities/09-when-the-app-changes/0010-governed-repair-propose-review-campaigns.md b/capabilities/09-when-the-app-changes/0010-governed-repair-propose-review-campaigns.md new file mode 100644 index 0000000000..0324d92a33 --- /dev/null +++ b/capabilities/09-when-the-app-changes/0010-governed-repair-propose-review-campaigns.md @@ -0,0 +1 @@ +| Governed repair: propose, review, campaigns, approval, staging, canary, rollback | Released | Synthetic | `openadapt-flow repair`, [REPAIR_LIFECYCLE.md](packages/flow/docs/REPAIR_LIFECYCLE.md) | diff --git a/capabilities/09-when-the-app-changes/0020-a-calling-agent-demonstrates-the-fix-for-a.md b/capabilities/09-when-the-app-changes/0020-a-calling-agent-demonstrates-the-fix-for-a.md new file mode 100644 index 0000000000..cc67370045 --- /dev/null +++ b/capabilities/09-when-the-app-changes/0020-a-calling-agent-demonstrates-the-fix-for-a.md @@ -0,0 +1 @@ +| A calling agent demonstrates the fix for a halted run; the result is a repair candidate | Released (2.1.0) | Synthetic | `run --hold-on-halt`, `repair/agent_teach.py` | diff --git a/capabilities/09-when-the-app-changes/0030-font-and-layout-drift-halts-with-a-named-reason.md b/capabilities/09-when-the-app-changes/0030-font-and-layout-drift-halts-with-a-named-reason.md new file mode 100644 index 0000000000..d0d9d48a4d --- /dev/null +++ b/capabilities/09-when-the-app-changes/0030-font-and-layout-drift-halts-with-a-named-reason.md @@ -0,0 +1 @@ +| Font and layout drift halts with a named reason | Released | Synthetic | `runtime/layout_drift.py` | diff --git a/capabilities/09-when-the-app-changes/0040-self-repair-an-agent-proposes-a-fix-for-one.md b/capabilities/09-when-the-app-changes/0040-self-repair-an-agent-proposes-a-fix-for-one.md new file mode 100644 index 0000000000..7468d40380 --- /dev/null +++ b/capabilities/09-when-the-app-changes/0040-self-repair-an-agent-proposes-a-fix-for-one.md @@ -0,0 +1 @@ +| Self-repair: an agent proposes a fix for one halted click, Flow probes it up to the save without saving, a person approves | Released ([#1265](https://github.com/OpenAdaptAI/OpenAdapt/pull/1265)) | Synthetic (MockMed redesign) | `run --self-repair`, [#1265](https://github.com/OpenAdaptAI/OpenAdapt/pull/1265) | diff --git a/capabilities/09-when-the-app-changes/0050-a-scroll-that-never-finds-the-next-click-s.md b/capabilities/09-when-the-app-changes/0050-a-scroll-that-never-finds-the-next-click-s.md new file mode 100644 index 0000000000..ad813faab0 --- /dev/null +++ b/capabilities/09-when-the-app-changes/0050-a-scroll-that-never-finds-the-next-click-s.md @@ -0,0 +1 @@ +| A scroll that never finds the next click's target halts on that click, so self-repair can take a relabelled control behind a scroll; the refusal for unreviewed-risk steps names them | Released ([#1337](https://github.com/OpenAdaptAI/OpenAdapt/pull/1337)) | Synthetic; openIMIS drift row checked offline on its recorded frames | `runtime/replayer.py`, `qualify set-risk` | diff --git a/capabilities/09-when-the-app-changes/0060-self-repair-across-several-new-steps-a-bridge-of.md b/capabilities/09-when-the-app-changes/0060-self-repair-across-several-new-steps-a-bridge-of.md new file mode 100644 index 0000000000..16e39e3308 --- /dev/null +++ b/capabilities/09-when-the-app-changes/0060-self-repair-across-several-new-steps-a-bridge-of.md @@ -0,0 +1 @@ +| Self-repair across several new steps: a bridge of up to three actions for a new required dialog or a control moved into a menu, each new step armed with a record check and probed up to the save, one person approving | Released ([#1325](https://github.com/OpenAdaptAI/OpenAdapt/pull/1325)) | Synthetic (MockMed menu and provider drifts, scripted agent; [benchmark/auto_repair](packages/flow/benchmark/auto_repair/README.md)) | `run --self-repair`, [SELF_REPAIR.md](packages/flow/docs/SELF_REPAIR.md) | diff --git a/capabilities/09-when-the-app-changes/0070-self-repair-s-new-clicks-outside-a-browser-on-a.md b/capabilities/09-when-the-app-changes/0070-self-repair-s-new-clicks-outside-a-browser-on-a.md new file mode 100644 index 0000000000..2413ff852b --- /dev/null +++ b/capabilities/09-when-the-app-changes/0070-self-repair-s-new-clicks-outside-a-browser-on-a.md @@ -0,0 +1 @@ +| Self-repair's new clicks outside a browser: on a native app a click is admitted by its accessibility element (role, name, ancestry, window; unique in the pinned window), on pixels only by the record check, and either way only when a system-of-record verifier covers every save under `standard` or `regulated`; the new step carries the dialog around it as a screen pre-check, and only a person approves the fix | On main ([#1709](https://github.com/OpenAdaptAI/OpenAdapt/pull/1709)) | Synthetic, partly live: on OpenAdapt's native Cocoa test app with SQLite, through live macOS AX, the stop, the element identity read, the admission and the refusals without a record check ran with no wrong write; qualified end to end on macOS AX ([#1715](https://github.com/OpenAdaptAI/OpenAdapt/pull/1715)): stop, admitted click, probe, replay and fault campaigns, one approval, resumed run `VERIFIED`; and on its GTK3 counterpart through live Linux AT-SPI, in CI, the same end to end. `run --self-repair` and repair by default start the app for each probe from `repair.session` ([#1717](https://github.com/OpenAdaptAI/OpenAdapt/pull/1717); [benchmark/repair_every_backend](packages/flow/benchmark/repair_every_backend/README.md)) | `openadapt_flow/repair/element_identity.py`, [REPAIR_ON_EVERY_BACKEND.md](packages/flow/docs/REPAIR_ON_EVERY_BACKEND.md) | diff --git a/capabilities/09-when-the-app-changes/0080-keep-pixel-path-runs-working-across-display.md b/capabilities/09-when-the-app-changes/0080-keep-pixel-path-runs-working-across-display.md new file mode 100644 index 0000000000..1ae55459b7 --- /dev/null +++ b/capabilities/09-when-the-app-changes/0080-keep-pixel-path-runs-working-across-display.md @@ -0,0 +1 @@ +| Keep pixel-path runs working across display scaling and font smoothing changes | Released ([#1286](https://github.com/OpenAdaptAI/OpenAdapt/pull/1286)) | Synthetic (in-process RDP and canvas renderings: 17 of 24 healthy runs across 100–175%, up from 3; 0 wrong saves) | [benchmark/pixel_scale](packages/flow/benchmark/pixel_scale/README.md) | diff --git a/capabilities/09-when-the-app-changes/0090-find-icons-again-on-citrix-rdp-and-vnc-after-a.md b/capabilities/09-when-the-app-changes/0090-find-icons-again-on-citrix-rdp-and-vnc-after-a.md new file mode 100644 index 0000000000..af3794141a --- /dev/null +++ b/capabilities/09-when-the-app-changes/0090-find-icons-again-on-citrix-rdp-and-vnc-after-a.md @@ -0,0 +1 @@ +| Find icons again on Citrix, RDP and VNC after a display-scale, zoom, font, theme or codec change, with a local model that counts look-alikes and stops on a tie (`--local-grounding`, off by default) | Released ([#1596](https://github.com/OpenAdaptAI/OpenAdapt/pull/1596)) | Synthetic (Chromium-drawn clinic screen, pixels only: icons found under 21 of 26 conditions, template matching 8; 0 wrong targets in 65; whole runs unchanged, 4 of 39 in both arms, because the layout, identity and census checks stop first). Held out on real AVC444 RDP frames: 0 wrong picks, 6 right, 75 abstentions in 81 | [benchmark/pixel_grounding](packages/flow/benchmark/pixel_grounding/README.md), `runtime/local_grounder.py` | diff --git a/capabilities/09-when-the-app-changes/0100-pre-approved-repairs-a-signed-policy-lists-low.md b/capabilities/09-when-the-app-changes/0100-pre-approved-repairs-a-signed-policy-lists-low.md new file mode 100644 index 0000000000..c8d91b6c2c --- /dev/null +++ b/capabilities/09-when-the-app-changes/0100-pre-approved-repairs-a-signed-policy-lists-low.md @@ -0,0 +1 @@ +| Pre-approved repairs: a signed policy lists low-risk changes that apply without a person, a test-record run before each queue, and one approval for every item halted the same way | Released ([#1294](https://github.com/OpenAdaptAI/OpenAdapt/pull/1294)) | Synthetic | standard changes | diff --git a/capabilities/09-when-the-app-changes/0110-repair-a-pinned-bundle-the-fix-runs-the-pinned.md b/capabilities/09-when-the-app-changes/0110-repair-a-pinned-bundle-the-fix-runs-the-pinned.md new file mode 100644 index 0000000000..59a00548ec --- /dev/null +++ b/capabilities/09-when-the-app-changes/0110-repair-a-pinned-bundle-the-fix-runs-the-pinned.md @@ -0,0 +1 @@ +| Repair a pinned bundle: the fix runs the pinned bundle's own qualification campaign on a test copy, keeps every write, effect, identity rule and record check, and is re-admitted with signed lineage (at most three repairs, no revoked key) that the pin verifies | On main | Synthetic | [SELF_REPAIR.md](packages/flow/docs/SELF_REPAIR.md#a-pinned-bundle-re-qualify-and-re-admit) | diff --git a/capabilities/09-when-the-app-changes/0120-repair-by-default-once-a-repair-agent-is.md b/capabilities/09-when-the-app-changes/0120-repair-by-default-once-a-repair-agent-is.md new file mode 100644 index 0000000000..264c64f2af --- /dev/null +++ b/capabilities/09-when-the-app-changes/0120-repair-by-default-once-a-repair-agent-is.md @@ -0,0 +1 @@ +| Repair by default: once a repair agent is configured (outside a browser, with `repair.session`, [#1717](https://github.com/OpenAdaptAI/OpenAdapt/pull/1717)), every stop that wrote nothing goes to it without anyone starting it; a stop after a possible write goes to reconciliation; every stop is a row in a ledger with the funnel from stop to resumed item | Released ([#1360](https://github.com/OpenAdaptAI/OpenAdapt/pull/1360)) | Synthetic (MockMed, 22 drift modes, real Claude agent: 6 of 21 repairable stops resumed and verified, 0 wrong saves in 66 runs); routing over recorded OpenEMR stops; live openIMIS relabel: 3 of 3 reached repair and stopped with no wrong save; silent-saves 1.1.0 UI-change blocks: 18 of 28 items that always stopped now correct, 0 wrong | `run` (on by default, `--no-auto-repair`), `repair:` in `deploy.yaml`, [benchmark/auto_repair](packages/flow/benchmark/auto_repair/README.md) | diff --git a/capabilities/09-when-the-app-changes/0130-repair-a-relabeled-save-button-prove-from-the.md b/capabilities/09-when-the-app-changes/0130-repair-a-relabeled-save-button-prove-from-the.md new file mode 100644 index 0000000000..78d91db3cd --- /dev/null +++ b/capabilities/09-when-the-app-changes/0130-repair-a-relabeled-save-button-prove-from-the.md @@ -0,0 +1 @@ +| Repair a relabeled save button: prove from the recorded identity hash that only the label changed (same control id, kind and form), re-qualify the fix on the new release, and have a person admit the certified copy afresh, since a save button's identity is part of the record check | Released | Real app (local OpenEMR, synthetic data): after the save button was relabeled, the stopped item re-ran and saved once after 8.3 operator minutes and 763 s of re-qualification; 896 s from stop to done ([#1513](https://github.com/OpenAdaptAI/OpenAdapt/pull/1513)) | `openadapt_flow/repair/relabel.py`, [SELF_REPAIR.md](packages/flow/docs/SELF_REPAIR.md#a-relabeled-control-proof-that-only-the-label-changed) | diff --git a/capabilities/09-when-the-app-changes/0140-a-duplicate-check-that-reads-the-app-s-match.md b/capabilities/09-when-the-app-changes/0140-a-duplicate-check-that-reads-the-app-s-match.md new file mode 100644 index 0000000000..bbbc6d282b --- /dev/null +++ b/capabilities/09-when-the-app-changes/0140-a-duplicate-check-that-reads-the-app-s-match.md @@ -0,0 +1 @@ +| A duplicate check that reads the app's match list (`no_duplicate_candidate`): stop only on a listed record with the item's last name or date of birth, fail closed on an unreadable or unloaded list | Released | Real app (local OpenEMR, synthetic data): false stops per 100 items 70.4 before, 16.4 after; 0 silent wrongs in 30 saves ([#1513](https://github.com/OpenAdaptAI/OpenAdapt/pull/1513)) | [DUPLICATE_CHECK.md](packages/flow/docs/DUPLICATE_CHECK.md) | diff --git a/capabilities/09-when-the-app-changes/0150-a-duplicate-check-that-asks-the-system-of-record.md b/capabilities/09-when-the-app-changes/0150-a-duplicate-check-that-asks-the-system-of-record.md new file mode 100644 index 0000000000..d638f0d843 --- /dev/null +++ b/capabilities/09-when-the-app-changes/0150-a-duplicate-check-that-asks-the-system-of-record.md @@ -0,0 +1 @@ +| A duplicate check that asks the system of record (generic FHIR R4 `Patient` search; OpenEMR REST and SQL adapters): every page read, stop on an exact match, send a close match to a person, proceed otherwise, fail closed on any read problem. Close matching is heuristic and misses some duplicates; it is not patient identity resolution. One source for qualification, runs and resume; a program can pin it | On main | Synthetic: unit and HTTP tests; live OpenEMR 8.0.0.3 search decided 6 of 6 known referrals right through FHIR | [DUPLICATE_CHECK.md](packages/flow/docs/DUPLICATE_CHECK.md) | diff --git a/capabilities/09-when-the-app-changes/0160-a-switched-off-problems-only-gate-asks-a-person.md b/capabilities/09-when-the-app-changes/0160-a-switched-off-problems-only-gate-asks-a-person.md new file mode 100644 index 0000000000..08d266ffb7 --- /dev/null +++ b/capabilities/09-when-the-app-changes/0160-a-switched-off-problems-only-gate-asks-a-person.md @@ -0,0 +1 @@ +| A switched-off `problems_only` gate asks a person before the save instead of stopping the item | Released | Synthetic; real app in [#1513](https://github.com/OpenAdaptAI/OpenAdapt/pull/1513) | [APPROVAL_MODES.md](packages/flow/docs/APPROVAL_MODES.md#when-the-mode-turns-itself-off) | diff --git a/capabilities/09-when-the-app-changes/0170-fleet-drift-patches-a-verified-fix-with-no.md b/capabilities/09-when-the-app-changes/0170-fleet-drift-patches-a-verified-fix-with-no.md new file mode 100644 index 0000000000..5554e6fc1c --- /dev/null +++ b/capabilities/09-when-the-app-changes/0170-fleet-drift-patches-a-verified-fix-with-no.md @@ -0,0 +1 @@ +| Fleet drift patches: a verified fix with no patient data, shared across sites under policy, moved as files or through a local reference hub | Released, local reference hub | Simulator | `openadapt-flow fleet`, [FLEET_DRIFT_PATCHES.md](packages/flow/docs/FLEET_DRIFT_PATCHES.md) | diff --git a/capabilities/09-when-the-app-changes/0180-opt-in-fallback-from-a-wrapped-task-s-compiled.md b/capabilities/09-when-the-app-changes/0180-opt-in-fallback-from-a-wrapped-task-s-compiled.md new file mode 100644 index 0000000000..6d2c23b49b --- /dev/null +++ b/capabilities/09-when-the-app-changes/0180-opt-in-fallback-from-a-wrapped-task-s-compiled.md @@ -0,0 +1 @@ +| Opt-in fallback from a wrapped task's compiled program to the agent on drift: only when the hold is a terminal halt whose report is `HALTED_BEFORE_EFFECT` with no step needing reconciliation, bound to the admitted bundle, with zero replay model calls and a record check whose reads both succeeded and found no change. Never on `RECONCILIATION_REQUIRED`, a lost reply, `RECORD_CHECK_FAILED`, an unreadable system of record or a receipt that is not `VERIFIED`. The agent is built only once a fallback may start and runs through compile-agent's harness (right-record check, origin fence, read-back) with a person approving each save at a pre-commit gate (the terminal, or a signed item approval from a paired phone or `openadapt-flow item-approval approve`) and its own spend cap. A fallback is `VERIFIED` only when the final task-scoped read confirms the save; otherwise it is `RECONCILIATION_REQUIRED` with both readings kept. Its draft is never admitted, and a verified run opens a repair candidate for a person to approve. The default stays the hold. `openadapt-flow wrap-dispatch` runs only the admitted program (a miss runs nothing), stores the whole result with the request, and exposes the hold (`status`, `release`, `evict`); release refuses a fallback that is still running | Experimental, this PR | Synthetic: unit tests on the real cache, hold, report and item-approval checks (answers signed with a test approver key on a real roster, through the decision portal's functions and the `item-approval approve` command); MockMed in headless Chromium with a scripted fallback agent, program run in-process ([benchmark/wrap_fallback](packages/flow/benchmark/wrap_fallback/README.md)). No real model agent has run it | `openadapt-flow wrap-dispatch` (`--fallback-gate item-approval`), `openadapt_flow.wrap.fallback`, `openadapt_flow.wrap.approval_gate`, [WRAP_FALLBACK.md](packages/flow/docs/WRAP_FALLBACK.md) | diff --git a/capabilities/09-when-the-app-changes/section.md b/capabilities/09-when-the-app-changes/section.md new file mode 100644 index 0000000000..f002baca34 --- /dev/null +++ b/capabilities/09-when-the-app-changes/section.md @@ -0,0 +1,6 @@ +## When the app changes + +| Capability | Status | Evidence | Where | +| --- | --- | --- | --- | + + diff --git a/capabilities/10-computer-use-agents/0010-compile-a-computer-use-agent-s-successful-run.md b/capabilities/10-computer-use-agents/0010-compile-a-computer-use-agent-s-successful-run.md new file mode 100644 index 0000000000..98fb065141 --- /dev/null +++ b/capabilities/10-computer-use-agents/0010-compile-a-computer-use-agent-s-successful-run.md @@ -0,0 +1 @@ +| Compile a computer-use agent's successful run into a program (JIT); later runs make no model calls | Released | Synthetic (a recorded Claude run on MockMed) | `openadapt_flow.jit`, [JIT.md](packages/flow/docs/JIT.md) | diff --git a/capabilities/10-computer-use-agents/0020-reuse-a-compiled-program-only-for-the-record.md b/capabilities/10-computer-use-agents/0020-reuse-a-compiled-program-only-for-the-record.md new file mode 100644 index 0000000000..f155145149 --- /dev/null +++ b/capabilities/10-computer-use-agents/0020-reuse-a-compiled-program-only-for-the-record.md @@ -0,0 +1 @@ +| Reuse a compiled program only for the record check and app environment it was admitted under (a changed record check or a new app version at the same origin is refused) | Released ([#1360](https://github.com/OpenAdaptAI/OpenAdapt/pull/1360)) | Unit tests | `TaskSignature(record_check=, environment=)`, `WebApp(environment_id=)`, [JIT.md](packages/flow/docs/JIT.md) | diff --git a/capabilities/10-computer-use-agents/0030-code-as-action-is-the-default-run-1-agent.md b/capabilities/10-computer-use-agents/0030-code-as-action-is-the-default-run-1-agent.md new file mode 100644 index 0000000000..a78e09ae1d --- /dev/null +++ b/capabilities/10-computer-use-agents/0030-code-as-action-is-the-default-run-1-agent.md @@ -0,0 +1 @@ +| Code as action is the default run-1 agent (compile-agent, and `teach_run` in the MCP teach tools): one terminal tool (structure first, actions by role and name, a sandboxed read-only shell, screenshots on request); every action is a structured step checked against the compiled program, and every save the gate detects is read back from the system of record | Released ([#1305](https://github.com/OpenAdaptAI/OpenAdapt/pull/1305)) | Real app (local OpenEMR) and synthetic | `ClaudeAgent(vision="code")`, `CODE_AS_ACTION.md` ([#1305](https://github.com/OpenAdaptAI/OpenAdapt/pull/1305)) | diff --git a/capabilities/10-computer-use-agents/0040-admit-a-draft-by-a-person-an-admitter-key-or-an.md b/capabilities/10-computer-use-agents/0040-admit-a-draft-by-a-person-an-admitter-key-or-an.md new file mode 100644 index 0000000000..68b06f2c40 --- /dev/null +++ b/capabilities/10-computer-use-agents/0040-admit-a-draft-by-a-person-an-admitter-key-or-an.md @@ -0,0 +1 @@ +| Admit a draft by a person, an admitter key, or an agent under a person-signed policy, including self-admission when the policy allows it | Released | Unit tests | [JIT_ADMISSION.md](packages/flow/docs/JIT_ADMISSION.md) | diff --git a/capabilities/10-computer-use-agents/0050-mcp-server-your-agent-decides-what-to-enter.md b/capabilities/10-computer-use-agents/0050-mcp-server-your-agent-decides-what-to-enter.md new file mode 100644 index 0000000000..cf0ede6934 --- /dev/null +++ b/capabilities/10-computer-use-agents/0050-mcp-server-your-agent-decides-what-to-enter.md @@ -0,0 +1 @@ +| MCP server: your agent decides what to enter, OpenAdapt makes the entry and checks it | Released | Synthetic sandbox | `openadapt-agent`, [packages/agent](packages/agent/README.md) | diff --git a/capabilities/10-computer-use-agents/0060-agent-to-agent-handoffs-when-one-agent-hands-a.md b/capabilities/10-computer-use-agents/0060-agent-to-agent-handoffs-when-one-agent-hands-a.md new file mode 100644 index 0000000000..f41fd65702 --- /dev/null +++ b/capabilities/10-computer-use-agents/0060-agent-to-agent-handoffs-when-one-agent-hands-a.md @@ -0,0 +1 @@ +| Agent-to-agent handoffs: when one agent hands a result to another, the run's signed receipt (`record/run/v1`) goes with it (`openadapt handoff send`, inline, detached beside a file, or POSTed to a webhook), and the receiver checks it against keys it pins (`openadapt handoff verify`). The verdict gives the signer role from the receiver's registry, integrity, checks passed and not checked, and "confirmed in the other party's system" lines; it always says a valid signature proves who signed, not that the claim is true, binds the payload as the receipt's `payload` subject (re-signed by the run's own key; other bytes or no payload subject are refused), and counts a confirmation as independent only when it was read from the other party's system. Over MCP, `serve --handoffs` adds `get_handoff` and `verify_handoff`. The private openings never travel | On main ([#2414](https://github.com/OpenAdaptAI/OpenAdapt/pull/2414)) | Unit tests over receipts from Flow's own writer and the shared `record/run/v1` confirmation vectors and the shared payload vectors (good, tampered, unknown signer, bound, mismatched and missing payload, detached file, local webhook); MCP and A2A end to end with the stubbed run process; a two-party test of 20 handoffs over HTTP (0 false accepts, 0 true rejects); one real headless MockMed run handed off over the CLI and checked against the receiver's own record ([benchmark/handoff_real_run](packages/flow/benchmark/handoff_real_run/README.md)); `--ledger` tested against #2415's `HandoffLedger` | `openadapt handoff`, `openadapt_flow/handoff.py`, [HANDOFFS.md](packages/flow/docs/HANDOFFS.md), draft format [HANDOFF_RECEIPTS.md](packages/flow/docs/HANDOFF_RECEIPTS.md) | diff --git a/capabilities/10-computer-use-agents/0070-a2a-agent2agent-protocol-adapter-openadapt-agent.md b/capabilities/10-computer-use-agents/0070-a2a-agent2agent-protocol-adapter-openadapt-agent.md new file mode 100644 index 0000000000..f2f3ee77a0 --- /dev/null +++ b/capabilities/10-computer-use-agents/0070-a2a-agent2agent-protocol-adapter-openadapt-agent.md @@ -0,0 +1 @@ +| A2A (Agent2Agent) protocol adapter: `openadapt agent serve --a2a` serves compiled workflows as A2A 1.0 skills with the official `a2a-sdk` (`openadapt[a2a]`): Agent Card at `/.well-known/agent-card.json`, JSON-RPC and HTTP+JSON, runs as tasks with status updates, the run's receipt as a handoff artifact when Flow wrote one (sandbox and strict at-rest runs have none), a `verify_handoff` skill, and the draft extension `https://openadapt.ai/extensions/handoff-receipt/v1`. Every call passes the MCP server's gate; person confirmations are not served; only `done` is completed. Loopback by default, a bearer token anywhere else, browser `Origin` and unknown `Host` refused | On main ([#2414](https://github.com/OpenAdaptAI/OpenAdapt/pull/2414)) | Synthetic: the official `a2a-sdk` 1.3.1 client against the server over HTTP on 127.0.0.1, with a governed run whose Flow process is stubbed and whose receipt Flow's writer signs; the official A2A TCK (a2aproject/a2a-tck at 5e6f37c): 110 automated checks passed and 11 failed, MUST 76.0%. The failures are 10 SDK-scenario tests that expect the TCK's own scripted agent, and the SDK's error Content-Type ([benchmark/a2a_tck](packages/flow/benchmark/a2a_tck/README.md)) | `openadapt_flow/agent/a2a_server.py`, [A2A.md](packages/flow/docs/A2A.md) | diff --git a/capabilities/10-computer-use-agents/0080-teach-over-mcp-an-agent-does-a-new-task-once.md b/capabilities/10-computer-use-agents/0080-teach-over-mcp-an-agent-does-a-new-task-once.md new file mode 100644 index 0000000000..a43d7f793d --- /dev/null +++ b/capabilities/10-computer-use-agents/0080-teach-over-mcp-an-agent-does-a-new-task-once.md @@ -0,0 +1 @@ +| Teach over MCP: an agent does a new task once through OpenAdapt; the run is read back, compiled and admitted (a person confirms the record check; the agent admits only under a person-signed policy), and becomes a tool it calls with no model calls. Web, and Windows, macOS, Linux, RDP and Citrix with a person approving each save | On main ([#1335](https://github.com/OpenAdaptAI/OpenAdapt/pull/1335)) | Synthetic (MockMed over MCP, and through the real RDP and Citrix backends); a native Cocoa app with SQLite through `MacOSBackend`, taught, confirmed, admitted under a signed policy and called (canary and taught run `VERIFIED`, 0 model calls; [teach_desktop](packages/flow/benchmark/teach_desktop/README.md)) | `openadapt-agent serve --teach`, [packages/agent](packages/agent/README.md#teach-a-new-workflow-from-your-agent) | diff --git a/capabilities/10-computer-use-agents/0090-turn-a-read-only-browser-task-into-a-tool-for.md b/capabilities/10-computer-use-agents/0090-turn-a-read-only-browser-task-into-a-tool-for.md new file mode 100644 index 0000000000..179628e62d --- /dev/null +++ b/capabilities/10-computer-use-agents/0090-turn-a-read-only-browser-task-into-a-tool-for.md @@ -0,0 +1 @@ +| Turn a read-only browser task into a tool for the coding agent you already use: `openadapt setup` registers the MCP server and a skill in Claude Code, Cursor, Codex and Gemini CLI (idempotent, `--dry-run`, `--undo`); `openadapt setup --app deploy.yaml --verify verify.yaml` sets the agent up to teach saves in one web, desktop, RDP or Citrix app instead, each read back from the system of record. Read-only teaching runs only where a guard stops writes before they leave (the browser); `serve --teach-browser --config` naming a desktop, RDP or Citrix app is refused; the agent does the task once through `teach_start`/`teach_act`/`teach_finish`, the task must end in a download, the file is checked (columns, a column between two inputs or equal to one, fewest rows), the compiled steps are replayed once with no model, and the agent gets a `taught_` tool that downloads a checked file with new inputs. The browser sends no POST, PUT, PATCH or DELETE and stays on one site; a compiled run stops when a control is missing, matches more than one element, or is relabelled | Released ([#1502](https://github.com/OpenAdaptAI/OpenAdapt/pull/1502)) | Real headless Chromium on the local example portal (scripted MCP client, in CI); a real Claude Code agent taught the export from the guide's prompt and called the tool with new dates (2026-10-24, one run) | `openadapt setup`, `openadapt-agent serve --teach-browser`, [FIRST_TOOL.md](packages/flow/docs/FIRST_TOOL.md) | diff --git a/capabilities/10-computer-use-agents/0100-verify-any-agent-s-own-writes-openadapt-verify.md b/capabilities/10-computer-use-agents/0100-verify-any-agent-s-own-writes-openadapt-verify.md new file mode 100644 index 0000000000..2c8fbe47a0 --- /dev/null +++ b/capabilities/10-computer-use-agents/0100-verify-any-agent-s-own-writes-openadapt-verify.md @@ -0,0 +1 @@ +| Verify any agent's own writes: `openadapt verify` reads the system of record before and after a write, against a contract the operator owns (REST, FHIR, SQL, GraphQL), and returns a verified receipt (`openadapt.effect-receipt/v1`) or a refusal (`REFUTED`, `UNCERTAIN`), never an unverified success. Python SDK (`openadapt.verify`, which is `openadapt_flow.verifier`: `begin_write`, `verify_write`, `verified_write`) wraps a write in any agent framework; the MCP server (`openadapt verify serve`) offers `verify_begin`, `verify_check` and `verify_recheck` to any MCP client | Released ([#1589](https://github.com/OpenAdaptAI/OpenAdapt/pull/1589)) | Synthetic (MockMed's fault server over real HTTP: correct write, wrong record, not saved, saved twice, unreadable store) | `openadapt verify`, [VERIFY_WRITES.md](packages/flow/docs/VERIFY_WRITES.md) | diff --git a/capabilities/10-computer-use-agents/0110-see-what-your-own-agent-gets-wrong-with-no-risk.md b/capabilities/10-computer-use-agents/0110-see-what-your-own-agent-gets-wrong-with-no-risk.md new file mode 100644 index 0000000000..6f46b8a960 --- /dev/null +++ b/capabilities/10-computer-use-agents/0110-see-what-your-own-agent-gets-wrong-with-no-risk.md @@ -0,0 +1 @@ +| See what your own agent gets wrong, with no risk: `openadapt shadow` is a loopback pass-through proxy beside the agent. It checks each write against the system of record (FHIR through `ensure_record`; SQL through the verifier's whole-database frame), checks each `CONFIRMED` again later, and writes `report.html` and `report.json`. It never blocks, changes or resends a write; the only delay is the read before a write (at most `hold_ms`) | [#1678](https://github.com/OpenAdaptAI/OpenAdapt/pull/1678) | Real app (Medplum 5.2.8, 37 cases through a fault proxy: scripted agent 18 of 18 harms caught, 0 correct writes refuted; Claude Sonnet 5.5 9 of 9 caught, 4 correct but corrected writes refuted; 0 writes by the shadow; 15 to 25 ms median added per write; setup 76.5 s machine time, 3 decisions); real app, SQL mode (Dolibarr 21 on MariaDB 11.4, 13 cases: 8 of 8 harms caught, 5 of 5 correct writes confirmed, 292 ms median added); synthetic (SQLite) | `openadapt shadow`, [SHADOW_MODE.md](packages/flow/docs/SHADOW_MODE.md), [SHADOW_RESULTS.md](packages/flow/benchmark/fhir_medplum/public/SHADOW_RESULTS.md) | diff --git a/capabilities/10-computer-use-agents/0120-score-a-candidate-before-it-saves-anything.md b/capabilities/10-computer-use-agents/0120-score-a-candidate-before-it-saves-anything.md new file mode 100644 index 0000000000..6f86bf6cb6 --- /dev/null +++ b/capabilities/10-computer-use-agents/0120-score-a-candidate-before-it-saves-anything.md @@ -0,0 +1 @@ +| Score a candidate before it saves anything: `openadapt-flow readiness` imports 20 to 50 tasks a person did (the save from the browser recording's network capture, else a read-back through the verify config's reader, else refused), runs the candidate agent (`--agent-cmd`) or compiled program (`--program`) on each task in its own headless browser (DevTools on a pipe only, reached through a loopback relay that refuses any request without the run's random token; the page can reach only the app's origins) where the shadow hold refuses every non-GET request to the app origin (autosaves, drafts and locks included) after recording the write it would have made, and a browser-level hold hands every request of every other tab, popup, browser context and worker to the same hold (a write from one of them makes the case `NOT_CHECKED`, reason `extra_target`, and `scope_ok` false). It compares the write field by field with the person's save (identifiers such as `02134` compare as exact text; any extra held write fails the match; uncompared never counts as matched; a prefilled form or other contamination makes a case not comparable), and writes a one-page `scorecard.html` and an aggregates-only `scorecard.json` (matched N of M, risks, field errors, agent and human time, model cost and its source, estimated savings with its formula). Each candidate runs under the flight recorder's egress (`--egress scrubbed` by default, `blocked` or `unscrubbed`) with the OS egress block, and cost is metered by the proxy; a candidate that reports model calls the proxy didn't see is refused for that task. Each imported task names its target record in the candidate's inputs (`record_`). `--keep-session` carries a signed-in session across tasks. A card whose scope failed states what failed in place of the claim. What is checked: no non-GET request to the app origin left any tab, popup, browser context or worker except listed sign-in requests; not covered: GET requests with side effects, WebSocket writes, writes before attach | On main ([#2498](https://github.com/OpenAdaptAI/OpenAdapt/pull/2498)) | Synthetic (MockMed, 20 recorded tasks; scripted agent with 5 planted field errors and 2 wrong-record cases: precision and recall 1.0, 0 writes in the app's own store; an adversarial agent's six routes around the tab (popup form, `window.open`, `Target.createTarget`, a new browser context, a shared worker, a dedicated worker) land 0 writes in the store) | `openadapt-flow readiness`, [READINESS.md](packages/flow/docs/READINESS.md), [benchmark/readiness](packages/flow/benchmark/readiness/README.md) | diff --git a/capabilities/10-computer-use-agents/0130-skill-cache-for-framework-agents-an-agent-in-any.md b/capabilities/10-computer-use-agents/0130-skill-cache-for-framework-agents-an-agent-in-any.md new file mode 100644 index 0000000000..017e47f3a4 --- /dev/null +++ b/capabilities/10-computer-use-agents/0130-skill-cache-for-framework-agents-an-agent-in-any.md @@ -0,0 +1 @@ +| Skill cache for framework agents: an agent in any framework does a browser task through compile-agent's harness as plain tools (`BrowserTools`); when the system of record shows exactly the task's record and the operator confirms the checks, the run is canaried, admitted and emitted as an MCP server. A repeat of the same task (instruction, record, app, contract, environment) calls that tool instead of the agent: no model calls, the program's checks and this task's record check on every run, eviction after a failed run | Released | Synthetic (MockMed, LangGraph on `claude-sonnet-5-5`, 3 trials, repeats on the same record: run 1 6 model calls and $0.022; runs 2 to 10 27/27 VERIFIED, 0 model calls, 7.8 s median); Trac 1.6: run 1 verified, not admitted | `openadapt_flow.integrations.agents.skills`, [benchmark/skill_cache](packages/flow/benchmark/skill_cache/README.md) | diff --git a/capabilities/10-computer-use-agents/0140-publish-a-wrapped-task-as-a-hosted-endpoint-with.md b/capabilities/10-computer-use-agents/0140-publish-a-wrapped-task-as-a-hosted-endpoint-with.md new file mode 100644 index 0000000000..1534e34e56 --- /dev/null +++ b/capabilities/10-computer-use-agents/0140-publish-a-wrapped-task-as-a-hosted-endpoint-with.md @@ -0,0 +1 @@ +| Publish a wrapped task as a hosted endpoint with one credential: `openadapt wrap publish --task TASK` uses only `OPENADAPT_API_KEY`. It finds the task's admitted program, re-verifies its admission signature, refuses a held task, a program without a read-back check (no saving step, a save with no effect contract, or no confirmed `verify.yaml`), symbolic links and a non-public app URL, and stages the bundle with its read-back configuration. It sanitizes the bundle and the recording it was compiled from (the generated wrap files declare each field as content, always scrubbed, or structural, kept only with its machine shape, so schema ids, step ids, digests and the signed admission survive the scrub byte-for-byte), shows one summary and asks once (`--yes` for scripts), finds the key's organization (`GET /api/v1/whoami`, or `--org`), registers the local admission public key with it once, attests the program from the wrap run's own signed recording and attended canary (strict lint with no warn or error finding, certification, VERIFIED replay) against a challenge from the organization's API-key route, uploads it through the governed bundle push to `POST /api/v1/org/{org}/workflow` (or `PUT .../workflow/{id}/definition`), then reads the Cloud workflow definition and prints the endpoint URL and `curl` examples from the acknowledged `execute_path` and `qualification_id`. Each refusal is one line with a code. The upload carries the program's value-free Standard run shape. A managed run of the program rests on its signed admission: `openadapt-flow run --managed-dispatch-file` checks the admission against the registered admission key, requires the authorization to name that admission and match the shape, and reads back through the bundled `verify.yaml`. The CLI, public runtime and deployment API carry one-use verification bound to that dispatch's admission, bundle, inputs, policy, run, session and current trust registry; resume verifies a fresh proof. Each input checks that scope again after preparation and requires a signed v3 permit with a receiver-checked exclusive start deadline. API sequences acknowledge every request separately. Missing receipts or late completion evidence halt further input and require reconciliation. Publish refuses, before anything is uploaded, an admission mode a hosted run cannot verify (only a person's admission or a registered CI admitter key), and an admitter-key admission whose key the organization has not registered (`GET /api/v1/org/{org}/admitter-keys`). The recording stays on the machine; only its sanitized hash is attested. Regulated is refused (`openadapt_flow.jit.hosted_authority`) | On main | Unit tests (real bundle, record check, staging, local sanitization and signed wrap evidence; the attestation's recording binding checked on real derivatives; the whoami, admission-key, challenge, workflow upload and definition routes mocked at the HTTP boundary); no run against a live Cloud deployment. Relies on the API-key workflow routes in openadapt-cloud#430 (merged 2026-11-14), which accept this v2 attestation only behind a flag that is off by default; the whoami route is not in #430 yet | `openadapt_flow.wrap.publish`, [WRAP_PUBLISH.md](packages/flow/docs/WRAP_PUBLISH.md), `packages/flow/tests/test_wrap_publish.py`, `packages/flow/tests/test_jit_hosted_authority.py`, `packages/flow/tests/test_jit_hosted_managed_replay.py` | diff --git a/capabilities/10-computer-use-agents/0150-wrapped-tasks-that-sign-in-during-openadapt-wrap.md b/capabilities/10-computer-use-agents/0150-wrapped-tasks-that-sign-in-during-openadapt-wrap.md new file mode 100644 index 0000000000..ac8fc2a4c5 --- /dev/null +++ b/capabilities/10-computer-use-agents/0150-wrapped-tasks-that-sign-in-during-openadapt-wrap.md @@ -0,0 +1 @@ +| Wrapped tasks that sign in: during `openadapt wrap`'s first run the recorder finds a password field (`type=password`, or `autocomplete` `current-password`/`new-password`) and the username field paired with it (`autocomplete=username`, or a unique text, email or phone candidate paired across all password controls in the composed form; ambiguous or unreadable controls refuse declared inputs) from the page's markup alone. Automatic withholding requires that observation seam; a missing or noncallable seam refuses before capture or actor entry. Screen-only native backends use the existing explicit person-secret handoff instead of this automatic path. Their inputs become secret parameters: the recording, program, run records, receipts and publish upload keep the name and never the value, the observed field regions are blacked out in recording frames (arbitrary field movement or echoes are not proven redacted), a credential field given text that matches no declared input is refused before typing, a form with exactly a username and current password is classified as sign-in without lowering independent keyword risk, and replay run screenshots contain black frames while checks use the original pixels in memory. Secret environment/vault aliases must be unambiguous, and managed params files cannot supply secret values. The canary and cached runs type them from `OPENADAPT_FLOW_SECRET_`, set from memory for one run; `publish` lists them as `secret_parameters`, outside the call's inputs | On main ([#2294](https://github.com/OpenAdaptAI/OpenAdapt/pull/2294), merged 2026-11-20) | Synthetic (a sign-in notes app in headless Chromium through the real wrap path: first run, canary, admission, publish staging, and a cached run under mcp 2, with a byte scan for the values in every file; unit tests with a fake backend for detection, frame redaction, refusals and the sign-in submit rule). Genuine RDP/Citrix backends refuse automatic withholding before input; explicit person-secret handoff remains tested. Hosted runs need an endpoint vault set (openadapt-cloud) | `openadapt_flow.recorder` (`withhold_credentials`), `openadapt_flow.secret_inputs`, [WRAP_PUBLISH.md](packages/flow/docs/WRAP_PUBLISH.md#tasks-that-sign-in), `packages/flow/tests/test_wrap_sign_in.py`, `packages/flow/tests/e2e/test_wrap_sign_in_e2e.py` | diff --git a/capabilities/10-computer-use-agents/0160-verified-write-tools-for-agent-frameworks.md b/capabilities/10-computer-use-agents/0160-verified-write-tools-for-agent-frameworks.md new file mode 100644 index 0000000000..004102b8d9 --- /dev/null +++ b/capabilities/10-computer-use-agents/0160-verified-write-tools-for-agent-frameworks.md @@ -0,0 +1 @@ +| Verified write tools for agent frameworks: `verified(tool, contract=...)` wraps a Claude Agent SDK, OpenAI Agents SDK, LangGraph or CrewAI write tool in one line. The contract and any values the operator pins come from the operator, never the agent's arguments; the store is read before and after; the agent gets a receipt or a refusal, and a refused write is held instead of retried | Released | Synthetic (each framework's own agent loop with a scripted model, writing through the example app's order form over real HTTP: verified save, a save the app drops, a save it keeps twice); one real-model run per framework, opt-in | `openadapt_flow.integrations.agents`, extras `claude-agent-sdk`, `openai-agents`, `langgraph` (CrewAI: install `crewai` beside it); [AGENT_FRAMEWORKS.md](packages/flow/docs/AGENT_FRAMEWORKS.md) | diff --git a/capabilities/10-computer-use-agents/0170-teach-a-browser-write-as-a-verified-tool-with.md b/capabilities/10-computer-use-agents/0170-teach-a-browser-write-as-a-verified-tool-with.md new file mode 100644 index 0000000000..08804bdccf --- /dev/null +++ b/capabilities/10-computer-use-agents/0170-teach-a-browser-write-as-a-verified-tool-with.md @@ -0,0 +1 @@ +| Teach a browser write as a verified tool: with write contracts and a person's signed teach authorization (`serve --teach-browser --contracts DIR --teach-authorization STATEMENT`), the agent teaches a save once. Run 1 starts only when the statement covers the write (origin, contract, write adapter, the record's fields and values) and runs under it; it is verified in the system of record before the `taught_` tool exists. Every call checks the statement and the tool's signature again, makes the write and returns a verified receipt or a refusal. Sign-in values come from the server's environment and never reach the agent or the program. Controls in named iframes are found through their frame | On main ([#1589](https://github.com/OpenAdaptAI/OpenAdapt/pull/1589), [#1763](https://github.com/OpenAdaptAI/OpenAdapt/pull/1763)) | Synthetic (the example app's sign-in and order form in headless Chromium over MCP: verified save, a save the app drops, a save it keeps twice, a page that swaps the record during run 1; refusals for a missing, uncovering, expired, edited or wrongly signed statement) | `openadapt-agent serve --teach-browser --contracts --teach-authorization`, [VERIFY_WRITES.md](packages/flow/docs/VERIFY_WRITES.md#teach-a-write-as-a-tool) | diff --git a/capabilities/10-computer-use-agents/0180-guard-an-agent-you-already-run-attach-to-its-own.md b/capabilities/10-computer-use-agents/0180-guard-an-agent-you-already-run-attach-to-its-own.md new file mode 100644 index 0000000000..a279b98781 --- /dev/null +++ b/capabilities/10-computer-use-agents/0180-guard-an-agent-you-already-run-attach-to-its-own.md @@ -0,0 +1 @@ +| Guard an agent you already run: attach to its own Chromium over CDP (one added line), hold each save until the record on screen is the one the task names, block it and tell the agent why when it isn't, read the save back; a run that reads back correctly becomes a draft program with a record check from scaffold-verifier, which a person confirms and admits, then a `taught_*` tool with no model calls. `--observe-only` never blocks. The approval card shows each field's value now, the value the held save sends (read by the app's `write_adapter`; without one the card says the values were not read and not checked before saving, and shows a screenshot and the form's values on screen taken when the save is held; with neither a value nor a readable screenshot no approval is offered and the run ends `ESCALATED` `values_unread`), the task's value beside it and its source; each save gets a ledger row with no values whose outcome follows the guard's own verdict, and a 0600 diff; the read-back goes through a `ReadbackProvider` where only an independent read can verify | Released ([#1357](https://github.com/OpenAdaptAI/OpenAdapt/pull/1357), stacked on [#1335](https://github.com/OpenAdaptAI/OpenAdapt/pull/1335)); card values, ledger row and `ReadbackProvider` in PR [#2492](https://github.com/OpenAdaptAI/OpenAdapt/pull/2492) | Synthetic (MockMed, scripted Playwright agent, `effect_e2e` faults; the approval card in headless Chromium with and without MockMed's write adapter) | `openadapt-flow guard`, [GUARD_AN_AGENT.md](packages/flow/docs/GUARD_AN_AGENT.md) | diff --git a/capabilities/10-computer-use-agents/0190-flight-recorder-for-an-agent-you-already-run.md b/capabilities/10-computer-use-agents/0190-flight-recorder-for-an-agent-you-already-run.md new file mode 100644 index 0000000000..1564e1f2db --- /dev/null +++ b/capabilities/10-computer-use-agents/0190-flight-recorder-for-an-agent-you-already-run.md @@ -0,0 +1 @@ +| Flight recorder for an agent you already run: `openadapt flight -- CMD` puts a loopback proxy in front of the model API the agent calls (`ANTHROPIC_BASE_URL`, `OPENAI_BASE_URL`), meters and prices each call (an unpriced model's cost is recorded as unknown), honours a `--max-cost-usd` cap and logs each computer action. Scrubbing: the strings in the request (message text, tool-call arguments, tool results, URLs cut to their origin) and the screenshots it recognises (PNG, JPEG, GIF, BMP, TIFF, WEBP) are scrubbed before they are sent (see "What the scrubber does not cover" in FLIGHT_RECORDER.md); a request that can't be scrubbed is answered 502 and never sent, and the run refuses to start when openadapt-privacy, its spaCy model or tesseract is missing. Each value becomes a run token (`[PERSON_1]`, the same in text and on screen, painted over with the token written in); tokens in tool-call inputs are turned back into the real values before the response reaches the agent, so it can type them; the map stays local (`pseudonyms.json`, 0600). Measured on 50 synthetic records: 97.6 to 98.0% of fields in text and 97.2% in rendered screenshots, every miss a name; 93.1% of non-personal words on a synthetic work-list screen stay readable (30.9% with Presidio's image redaction). The agent still can't read a name it must check; task success with scrubbing on is not measured. The scrubber covers ordinary agent traffic in standard encodings (base64 in any wrapping, JSON escapes; image signatures are searched across the whole request and dense base64-like text refuses, per string and across the request). Images are recognised and scrubbed in PNG, JPEG, GIF, BMP, TIFF and WEBP; other image formats are refused only when the density backstops catch them, and a page with text on a flat background, uncompressed in another format, can get through; the backstops can refuse ordinary content that looks encoded (git SHAs, many camelCase identifiers, random tokens), and because the history is resent a refused turn refuses the rest of the run; an agent that deliberately re-encodes data (hex, percent-encoding, a custom scheme) can get it past the scrubber, so a hostile agent is out of scope and the egress block and provider choice are the controls there. Egress: on macOS the agent runs under `sandbox-exec` with outbound network denied except loopback; elsewhere `flight` refuses to run unless `--allow-unenforced-egress` is given (recorded). A run whose agent reports more model calls than the proxy saw, or that tried a direct call through the proxy variables, exits 3 and is marked refused; a kernel-blocked connection is blocked but not counted. Python API: `openadapt_flow.flight.egress.ScrubbedEgress`. Gate: a one-line executor swap (`GatedComputer` for the Anthropic computer tool, `GatedComputerCall` for an OpenAI `computer_call` loop) holds every action not known to be safe: a click or drag passes only on focus/view roles or a short list of labels (Cancel, Close, Back, Search, Open...; non-English and unreadable labels are held; OCR names a target only with text inside it); keys pass only on a short navigation list, or for editing inside a known text field; typing passes only when focus is known to be in a text field (from the accessibility hook, or the last click landed on one), and typed text with any control character is held; a focus move followed by more input in one action, Ctrl/Cmd+S, Ctrl/Cmd+Enter and any unknown action are held for a person (terminal y/N, or an item-approval request Desktop or a phone answers). It sees clicks and keys, not autosave. Writes `flight.json` (`openadapt.flight-run/v1`), `egress.json`, a scrubbed timeline and `timeline.html`. Image scrubbing covers text in the image, not faces | Experimental, PR [#2493](https://github.com/OpenAdaptAI/OpenAdapt/pull/2493) | Synthetic (fake provider, scripted agent loop on MockMed in headless Chromium under the macOS egress block, the real Presidio scrubber on a 50-record synthetic PHI corpus ([recall](packages/flow/benchmark/flight/scrub_recall/README.md))); one real Claude run whose Save click was held, recorded before the scrubbing and gate changes ([flight](packages/flow/benchmark/flight/README.md)) | `openadapt-flow flight`, `openadapt_flow.flight`, [FLIGHT_RECORDER.md](packages/flow/docs/FLIGHT_RECORDER.md) | diff --git a/capabilities/10-computer-use-agents/0200-check-a-coding-agent-s-writes-to-declared.md b/capabilities/10-computer-use-agents/0200-check-a-coding-agent-s-writes-to-declared.md new file mode 100644 index 0000000000..898b924be7 --- /dev/null +++ b/capabilities/10-computer-use-agents/0200-check-a-coding-agent-s-writes-to-declared.md @@ -0,0 +1 @@ +| Check a coding agent's writes to declared systems of record: `openadapt hooks install --agent claude-code` (or `codex`) writes project-local hooks (Claude Code `PreToolUse`/`PostToolUse`/`PostToolUseFailure`/`Stop`, Codex `PreToolUse`/`PostToolUse`/`Stop`). For a call that writes to a database, HTTP API or MCP tool declared in `openadapt.systems.yaml`, the pre-check allows, asks or blocks it by the write's approval mode (Codex can't ask from a hook, so `ask` is a deny until `openadapt hooks approve`); an undeclared write to a declared system is blocked or asked about; the read-back uses the verifier's contract (`openadapt.verify/v1`), a failed read-back is `UNCERTAIN` and the same call is then held; every outcome gets a signed `record/run/v1` receipt. Advisory: hooks see tool calls, so an agent with its own credentials and shell can bypass them; `--strict` (credential broker) is refused until a broker exists for these systems | Experimental, PR [#2411](https://github.com/OpenAdaptAI/OpenAdapt/pull/2411) | Synthetic (a scripted harness sends each agent's documented hook input to the installed hook command; one run of live headless Claude Code 2.1.305 and Codex CLI 0.144.4 sessions, both against a local SQLite file and HTTP API: declared writes VERIFIED, an out-of-scope delete blocked, a broken read-back UNCERTAIN, and a Python write that builds the path at run time not seen, [hooks_live](packages/flow/benchmark/hooks_live/README.md)) | `openadapt hooks`, `openadapt_flow/hooks/`, [HOOKS.md](packages/flow/docs/HOOKS.md) | diff --git a/capabilities/10-computer-use-agents/0210-hold-the-database-credentials-and-give-the-agent.md b/capabilities/10-computer-use-agents/0210-hold-the-database-credentials-and-give-the-agent.md new file mode 100644 index 0000000000..61470807df --- /dev/null +++ b/capabilities/10-computer-use-agents/0210-hold-the-database-credentials-and-give-the-agent.md @@ -0,0 +1 @@ +| Hold the database credentials and give the agent scoped tools: `openadapt proxy --postgres URL -- claude` (or `--sqlite`) serves an MCP endpoint on loopback with a per-run token and takes the credentials out of the agent's environment. Each SQL write is dry-run in a rolled-back transaction with its exact row-level diff (triggers and cascades included), approved by policy (`--auto-approve-max-rows`) or by a person (`y`, `openadapt plan approve`) against the plan digest, used once, committed only if its diff matches the plan, read back, and undone from its row images with a read-back proof. A regenerated statement over rows already written in the task is held for a person (`possible_replay`). Each stage gets a signed `record/run/v1` receipt with the approval block. The dry run covers effects inside the database only, and a write is `VERIFIED` only when the catalog shows nothing that could write outside the frame (foreign tables, rules, triggers, user functions or types, `TRUNCATE` and other DDL); otherwise it is capped at `COMPLETED_UNVERIFIED`. The lab counts were measured before that inventory existed | Experimental, this PR | Lab: PostgreSQL 16, 120 statements of 8 kinds, 0 missed effects, 0 false diffs, 120/120 verified undos, 0/20 regenerated statements applied (control 20/20 doubled), the independent `capture_database` read-back agreed on 120/120, 8-12 s from empty venv to first diff; one real MCP SDK session; one live headless Claude Code session (held, then applied and undone) | `openadapt proxy`, `openadapt_flow/txplan/proxy.py`, [TRANSACTIONS.md](packages/flow/docs/TRANSACTIONS.md) | diff --git a/capabilities/10-computer-use-agents/0220-dry-run-apply-undo-and-release-a-batch-of-writes.md b/capabilities/10-computer-use-agents/0220-dry-run-apply-undo-and-release-a-batch-of-writes.md new file mode 100644 index 0000000000..00c79ec3a5 --- /dev/null +++ b/capabilities/10-computer-use-agents/0220-dry-run-apply-undo-and-release-a-batch-of-writes.md @@ -0,0 +1 @@ +| Dry-run, apply, undo and release a batch of writes to external systems: `openadapt plan create/approve/apply/undo/release/cancel` over an `openadapt.tx.yaml` of REST collections, SQL tables and mail. The diff comes from a staged transaction (SQL), a computed shadow with declared server-set and derived fields (REST) or the holdback queue (email). Approval is single-use and bound to the plan digest, a stale plan is refused, each write's idempotency key comes from the task and the record slot (never the payload), and a retry with a different payload is refused (the ACRFence action-replay attack). The undo is verified by reading back each record and the whole frame. Irreversible writes wait in a cancelable holdback queue. A REST `replace` update or delete is `VERIFIED` only on a route whose `precondition` (`If-Match`) has enforcement evidence: a recorded probe, or a probe the adapter runs once per route. Without it the write is at best `COMPLETED_UNVERIFIED`, since another caller's edit after the plan read could be erased unseen. A REST undo sends the version it checked, and an undo without an enforced precondition ends `COMPLETED_UNVERIFIED`, never `ROLLED_BACK`. A SQL write whose rows change outside the current schema is refused, PostgreSQL deferred constraint triggers included. A SQL write is `VERIFIED` only when the catalog shows nothing that could write outside the frame; no function body is read to decide that. On PostgreSQL: no user-defined object (oid 16384 or more, any namespace) reachable through `pg_depend` from the frame relations, no user column type, no user function or SQL-running built-in in the planned statement as `EXPLAIN (VERBOSE)` resolves it, no planned DDL, and no event trigger, user cast or operator, foreign table, `dblink` or `postgres_fdw` in the database. On MySQL: database-level `SELECT` and `TRIGGER` grants, and no routines. Any trigger on a frame relation (MySQL: in the database) caps the write. The inventory is read before and after the write in its transaction, and a change between the two to the triggers, rules, casts, event triggers or column types that decide what the write runs caps it. An open item caps the write at `COMPLETED_UNVERIFIED` with a `not_covered` code; it doesn't refuse it. Replays and adoptions keep these caps. The lab counts below predate these rules and were not rerun: the Vikunja lab spec declares a `replace` update with no precondition, so those updates and their undos now end `COMPLETED_UNVERIFIED`, and the Dolibarr SQL counts assume an empty scope inventory that was not measured | Experimental, this PR | Lab: Vikunja 2.7.1, Dolibarr 21.0.4 on MariaDB, Mailpit; 100 writes each; 0 missed effects, 0 false diffs, 200/200 verified undos (REST, SQL), 50/50 cancelled emails never sent, 50/50 released exactly once, 0/60 regenerated retries through (control 60/60 doubled), 0/10 after a crash after send; seeded faults caught 20/20 | `openadapt plan`, `openadapt_flow/txplan/`, [TRANSACTIONS.md](packages/flow/docs/TRANSACTIONS.md) | diff --git a/capabilities/10-computer-use-agents/0230-task-ledger-per-job-rules-locked-when-the-job.md b/capabilities/10-computer-use-agents/0230-task-ledger-per-job-rules-locked-when-the-job.md new file mode 100644 index 0000000000..2831708bd1 --- /dev/null +++ b/capabilities/10-computer-use-agents/0230-task-ledger-per-job-rules-locked-when-the-job.md @@ -0,0 +1 @@ +| Task ledger per job: rules locked when the job opens and enforced on every run, item status set only from OpenAdapt's own results, and yes-or-no questions a person answers on the phone or in Desktop, including when a run stops | Released ([#1332](https://github.com/OpenAdaptAI/OpenAdapt/pull/1332)) | Synthetic (30-item MockMed worklist, scripted agent, no model calls) | MCP tools `open_job`, `get_job`, `add_items`, `record_evidence`, `ask_user`, `get_answer`, `change_constraint`, `close_job`; [Track a long job](packages/agent/README.md#track-a-long-job) | diff --git a/capabilities/10-computer-use-agents/0240-limit-a-teaching-agent-to-the-declared-task-on.md b/capabilities/10-computer-use-agents/0240-limit-a-teaching-agent-to-the-declared-task-on.md new file mode 100644 index 0000000000..fefd40c9ec --- /dev/null +++ b/capabilities/10-computer-use-agents/0240-limit-a-teaching-agent-to-the-declared-task-on.md @@ -0,0 +1 @@ +| Limit a teaching agent to the declared task on every teach path (`compile_agent`, `compile-agent`, teach over MCP, the airbag guard): typed text must be a declared value, links and browser requests to other origins are refused, writes are checked before they are sent, and the record is read back before a draft exists. Injected instructions in record notes, banners, tooltips, alt text and server responses are blocked or caught on MockMed through each path (scripted agent; a live-model mode is off by default). Self-repair refuses a control that leaves the app | Released ([#1359](https://github.com/OpenAdaptAI/OpenAdapt/pull/1359), [#1386](https://github.com/OpenAdaptAI/OpenAdapt/pull/1386)) | Synthetic | `openadapt_flow.teach_scope`, [THREAT_MODEL.md](packages/flow/docs/THREAT_MODEL.md) | diff --git a/capabilities/10-computer-use-agents/0250-teach-authorization-a-person-signs-what-a.md b/capabilities/10-computer-use-agents/0250-teach-authorization-a-person-signs-what-a.md new file mode 100644 index 0000000000..40cc59a921 --- /dev/null +++ b/capabilities/10-computer-use-agents/0250-teach-authorization-a-person-signs-what-a.md @@ -0,0 +1 @@ +| Teach authorization: a person signs what a teaching agent may do (task, origins, inputs, the one write, forbidden actions and controls) with their approver key, and every teach path is bound to it or refused. Verified with the approver roster's own verifier, so an unknown, removed or wrong key, an unpinned root, a changed statement or another task refuses. Admission of every JIT draft needs one (`teach_auth_not_recorded` otherwise), as do an agent-demonstrated fix's approval and self-repair of an agent-taught program; browser-teach writes are bound to it, and the airbag handoff's drafts are refused | On main ([#1436](https://github.com/OpenAdaptAI/OpenAdapt/pull/1436)) | Synthetic (real approver keys, real roster, real admission) | `openadapt-flow teach-authorization`, [TEACH_AUTHORIZATION.md](packages/flow/docs/TEACH_AUTHORIZATION.md) | diff --git a/capabilities/10-computer-use-agents/0260-compile-an-agent-s-first-verified-run-from-a.md b/capabilities/10-computer-use-agents/0260-compile-an-agent-s-first-verified-run-from-a.md new file mode 100644 index 0000000000..0f66deead7 --- /dev/null +++ b/capabilities/10-computer-use-agents/0260-compile-an-agent-s-first-verified-run-from-a.md @@ -0,0 +1 @@ +| Compile an agent's first verified run from a prompt (`compile-agent`), and a code-as-action authoring agent | Released ([#1277](https://github.com/OpenAdaptAI/OpenAdapt/pull/1277), [#1305](https://github.com/OpenAdaptAI/OpenAdapt/pull/1305)); the agent harness behind it runs on every backend, on main ([#1283](https://github.com/OpenAdaptAI/OpenAdapt/pull/1283)) | Synthetic | `compile-agent` | diff --git a/capabilities/10-computer-use-agents/0270-an-agent-records-a-native-app-by-control.md b/capabilities/10-computer-use-agents/0270-an-agent-records-a-native-app-by-control.md new file mode 100644 index 0000000000..cc6a4a9187 --- /dev/null +++ b/capabilities/10-computer-use-agents/0270-an-agent-records-a-native-app-by-control.md @@ -0,0 +1 @@ +| An agent records a native app by control: `AuthoringSession.observe()` lists the app's controls from UI Automation (Windows), Accessibility (macOS) or AT-SPI (Linux), each with its element identity (role, name, ancestry, window, process); a click by node is re-read before input and refused when that identity changed, has a twin in the window, or the tree was cut short. `compile-agent --config` and `serve-execute --config` build the app from the deployment's backend | [#1870](https://github.com/OpenAdaptAI/OpenAdapt/pull/1870) | Windows 11 Pro x64, Patient Notes (in-tree WinForms, synthetic SQLite): 11 of 11 identities re-read equal, five clicks recorded by UIA locator, the note read back from SQLite; macOS Calculator, read only: 20 of 20; Linux, the GTK3 fixture in Xvfb: recorded by control, the effect file as oracle, a click on one of two identical buttons refused ([benchmark/native_authoring](packages/flow/benchmark/native_authoring/README.md)) | `openadapt_flow/authoring.py`, `authoring_tree()` on each native backend | diff --git a/capabilities/10-computer-use-agents/0280-score-harness-optimizers-harness-meta-harness-on.md b/capabilities/10-computer-use-agents/0280-score-harness-optimizers-harness-meta-harness-on.md new file mode 100644 index 0000000000..134eb674c2 --- /dev/null +++ b/capabilities/10-computer-use-agents/0280-score-harness-optimizers-harness-meta-harness-on.md @@ -0,0 +1 @@ +| Score harness optimizers (Harness², Meta-Harness) on GUI tasks with the record read-back as the reward, with full trace export | Released ([#1299](https://github.com/OpenAdaptAI/OpenAdapt/pull/1299), [#1300](https://github.com/OpenAdaptAI/OpenAdapt/pull/1300), [#1301](https://github.com/OpenAdaptAI/OpenAdapt/pull/1301)) | Synthetic (scripted proposer) | `benchmark/harness/harness2/` (source checkout) | diff --git a/capabilities/10-computer-use-agents/0290-turn-one-recorded-mockmed-workflow-into-a-task.md b/capabilities/10-computer-use-agents/0290-turn-one-recorded-mockmed-workflow-into-a-task.md new file mode 100644 index 0000000000..b3d4ec7089 --- /dev/null +++ b/capabilities/10-computer-use-agents/0290-turn-one-recorded-mockmed-workflow-into-a-task.md @@ -0,0 +1 @@ +| Turn one recorded MockMed workflow into a task environment (instruction, starting state, reference trajectory, success check against the system of record) and audit that environment's own success check with the verifier audit kit before it is used: the recording's API writes and store diff become parameterized tasks, three checks are derived from the capture, and only one with no false accepts and no false rejects is kept. The check mined from the recording passes an extra write to another patient, a duplicate and a write after the success claim; a replay-the-recorded-calls check rejects a permitted extra read | On main (research demo) | Synthetic (one MockMed recording, 3 synthetic variants, 7 of the kit's 8 families scored (partial_write not applicable); the families are the kit's own, so a clean audit of the kept check is a self-check, not an independent one) | [demo/refinery](demo/refinery/README.md), `openadapt_flow.verifier_audit` | diff --git a/capabilities/10-computer-use-agents/0300-grade-an-rl-environment-on-the-whole-record.md b/capabilities/10-computer-use-agents/0300-grade-an-rl-environment-on-the-whole-record.md new file mode 100644 index 0000000000..01592e6a41 --- /dev/null +++ b/capabilities/10-computer-use-agents/0300-grade-an-rl-environment-on-the-whole-record.md @@ -0,0 +1 @@ +| Grade an RL environment on the whole record: after the episode, read every table of the app's database outside the agent's browser, check the intended change, check that nothing else changed (minus a calibrated noise profile), check a reply against the record, and check the agent's success or failure claim against the record. The Dolibarr 20 ERP environment uses it (customers, contacts, products, invoices, payments, orders, stock; reset in under 3 s from a baseline built on the operator's machine) | On main (research environment) | Local real app (Dolibarr 20 from its upstream image, synthetic seed): every reference solution earns the reward; do-nothing policies earn only the tasks whose honest report is failure; 4 public example tasks, the rest held out | `openadapt_flow.rl_env.record_grader`, [environments/openenv/dolibarr_erp](packages/flow/environments/openenv/dolibarr_erp/README.md), `benchmark/dolibarr_erp` | diff --git a/capabilities/10-computer-use-agents/0310-one-scoreboard-comparing-the-agent-alone-with.md b/capabilities/10-computer-use-agents/0310-one-scoreboard-comparing-the-agent-alone-with.md new file mode 100644 index 0000000000..fe0314d306 --- /dev/null +++ b/capabilities/10-computer-use-agents/0310-one-scoreboard-comparing-the-agent-alone-with.md @@ -0,0 +1 @@ +| One scoreboard comparing the agent alone with OpenAdapt across tasks (correctness by read-back, cost, time, items per hour) | Released ([#1303](https://github.com/OpenAdaptAI/OpenAdapt/pull/1303)) | Synthetic and local OpenEMR and openIMIS test copies | `benchmark/scoreboard/` | diff --git a/capabilities/10-computer-use-agents/0320-pull-a-skill-from-the-registry-pull-app-task.md b/capabilities/10-computer-use-agents/0320-pull-a-skill-from-the-registry-pull-app-task.md new file mode 100644 index 0000000000..de85cca4f4 --- /dev/null +++ b/capabilities/10-computer-use-agents/0320-pull-a-skill-from-the-registry-pull-app-task.md @@ -0,0 +1 @@ +| Pull a skill from the registry (`pull app/task@version`) and run it only after qualifying it on your own instance: `pull` marks it and expires any certification it carries, `skill bind` records your addresses and the names of the variables that hold credentials (never their values), `skill qualify` runs its bundled record check there, and `run`, `replay`, `emit-skill`, `emit-mcp` and `openadapt-agent` refuse it until then, and on any other instance. `openadapt-agent` refuses it before Flow starts, with reason `not_ready_to_run` and failed check `skill_not_qualified`, and refuses a pulled skill when no app address is set. The index and its archives carry a keyless Sigstore attestation from the registry release workflow, checked offline against a pinned identity, and expire and can't be rolled back; a release refuses a planned entry, and a re-stamp release (`registry-restamp-*`) renews the expiry and refuses any other change; a shipped record check runs no code and reads only your binding | Released; the `openadapt-agent` check, and a qualified skill passing the check, on main ([#2261](https://github.com/OpenAdaptAI/OpenAdapt/pull/2261)) | Unit tests; agent path through the real `openadapt-flow run` process | `openadapt-flow skill`, [SKILLS_REGISTRY.md](packages/flow/docs/design/SKILLS_REGISTRY.md) | diff --git a/capabilities/10-computer-use-agents/section.md b/capabilities/10-computer-use-agents/section.md new file mode 100644 index 0000000000..833148b371 --- /dev/null +++ b/capabilities/10-computer-use-agents/section.md @@ -0,0 +1,6 @@ +## Computer-use agents + +| Capability | Status | Evidence | Where | +| --- | --- | --- | --- | + + diff --git a/capabilities/11-recording-privacy-and-proof/0010-record-mouse-keyboard-screen-video-and.md b/capabilities/11-recording-privacy-and-proof/0010-record-mouse-keyboard-screen-video-and.md new file mode 100644 index 0000000000..93543f64db --- /dev/null +++ b/capabilities/11-recording-privacy-and-proof/0010-record-mouse-keyboard-screen-video-and.md @@ -0,0 +1 @@ +| Record mouse, keyboard, screen video and accessibility trees on one clock (Windows, macOS, Linux X11) | Released (capture 1.3.0) | Real OS | [packages/capture](packages/capture/README.md) | diff --git a/capabilities/11-recording-privacy-and-proof/0020-find-and-redact-personal-and-health-data-in-text.md b/capabilities/11-recording-privacy-and-proof/0020-find-and-redact-personal-and-health-data-in-text.md new file mode 100644 index 0000000000..6a0169ede8 --- /dev/null +++ b/capabilities/11-recording-privacy-and-proof/0020-find-and-redact-personal-and-health-data-in-text.md @@ -0,0 +1 @@ +| Find and redact personal and health data in text, screenshots and structure | Released (privacy 1.1.3) | Unit tests | [packages/privacy](packages/privacy/README.md), [PRIVACY.md](packages/flow/docs/PRIVACY.md) | diff --git a/capabilities/11-recording-privacy-and-proof/0030-scrub-by-default-before-anything-leaves-the.md b/capabilities/11-recording-privacy-and-proof/0030-scrub-by-default-before-anything-leaves-the.md new file mode 100644 index 0000000000..8f08a44f46 --- /dev/null +++ b/capabilities/11-recording-privacy-and-proof/0030-scrub-by-default-before-anything-leaves-the.md @@ -0,0 +1 @@ +| Scrub by default before anything leaves the machine | Released ([#1262](https://github.com/OpenAdaptAI/OpenAdapt/pull/1262)) | Unit tests | `openadapt-privacy` | diff --git a/capabilities/11-recording-privacy-and-proof/0040-start-and-stop-desktop-recordings-from-the-menu.md b/capabilities/11-recording-privacy-and-proof/0040-start-and-stop-desktop-recordings-from-the-menu.md new file mode 100644 index 0000000000..4a99ecf3a9 --- /dev/null +++ b/capabilities/11-recording-privacy-and-proof/0040-start-and-stop-desktop-recordings-from-the-menu.md @@ -0,0 +1 @@ +| Start and stop Desktop recordings from the menu bar or system tray, and see Desktop's state and how many cloud runs need a person | Released (tray 0.3.7) | Unit tests; CI runs the tray client against Desktop's socket server | [packages/tray](packages/tray/README.md) | diff --git a/capabilities/11-recording-privacy-and-proof/0050-show-in-the-menu-bar-when-a-recording-started-by.md b/capabilities/11-recording-privacy-and-proof/0050-show-in-the-menu-bar-when-a-recording-started-by.md new file mode 100644 index 0000000000..8a9cbe16b9 --- /dev/null +++ b/capabilities/11-recording-privacy-and-proof/0050-show-in-the-menu-bar-when-a-recording-started-by.md @@ -0,0 +1 @@ +| Show in the menu bar when a recording started by `openadapt-flow record` or `capture record` is ready and when it ends, and start and stop `openadapt-flow record` from the macOS menu bar, without OpenAdapt Desktop | On main ([#1481](https://github.com/OpenAdaptAI/OpenAdapt/pull/1481)) | Unit tests with a stand-in control client; run once on one Mac with a real `openadapt-flow record --backend macos` window recording (ready 6.6 s after start, stop reported as saved) | [packages/tray](packages/tray/README.md#recording-without-openadapt-desktop) | diff --git a/capabilities/11-recording-privacy-and-proof/0060-each-package-installs-on-its-own-within-a-size.md b/capabilities/11-recording-privacy-and-proof/0060-each-package-installs-on-its-own-within-a-size.md new file mode 100644 index 0000000000..f99616d3a6 --- /dev/null +++ b/capabilities/11-recording-privacy-and-proof/0060-each-package-installs-on-its-own-within-a-size.md @@ -0,0 +1 @@ +| Each package installs on its own within a size budget, checked in CI (privacy without desktop, capture without plotting) | Released ([#1270](https://github.com/OpenAdaptAI/OpenAdapt/pull/1270), [#1271](https://github.com/OpenAdaptAI/OpenAdapt/pull/1271), [#1279](https://github.com/OpenAdaptAI/OpenAdapt/pull/1279)) | CI | `.github/workflows/packages.yml` | diff --git a/capabilities/11-recording-privacy-and-proof/0070-see-a-compiled-program-as-a-map-every-step-exact.md b/capabilities/11-recording-privacy-and-proof/0070-see-a-compiled-program-as-a-map-every-step-exact.md new file mode 100644 index 0000000000..274c0d9dc6 --- /dev/null +++ b/capabilities/11-recording-privacy-and-proof/0070-see-a-compiled-program-as-a-map-every-step-exact.md @@ -0,0 +1 @@ +| See a compiled program as a map (every step, exact edge, loop and stop rule, with each step's checks) and play a recorded run over it; one React package that Desktop, app.openadapt.ai and openadapt.ai share | On main ([packages/program-graph](packages/program-graph/README.md)) | Real compiled OpenEMR referral program and a recorded scoreboard run, both on synthetic data | `@openadapt/program-graph`; `openadapt-flow visualize --format json` | diff --git a/capabilities/11-recording-privacy-and-proof/0080-named-sections-for-every-compiled-program-who.md b/capabilities/11-recording-privacy-and-proof/0080-named-sections-for-every-compiled-program-who.md new file mode 100644 index 0000000000..375171cde7 --- /dev/null +++ b/capabilities/11-recording-privacy-and-proof/0080-named-sections-for-every-compiled-program-who.md @@ -0,0 +1 @@ +| Named sections for every compiled program ("Who: title, first name, last name", "Contact", "Create New Patient"), found without a model from the save, the recorded form structure, the fields and any narration; a person can rename, merge or split them on the review screen | Released | Unit tests; the certified OpenEMR referral bundle and a real recording of it on a local test copy with made-up patients | `openadapt-flow sections`; [SECTIONS.md](packages/flow/docs/SECTIONS.md) | diff --git a/capabilities/11-recording-privacy-and-proof/0090-encrypt-phi-at-rest-every-bundle-file-that-can.md b/capabilities/11-recording-privacy-and-proof/0090-encrypt-phi-at-rest-every-bundle-file-that-can.md new file mode 100644 index 0000000000..5efa694808 --- /dev/null +++ b/capabilities/11-recording-privacy-and-proof/0090-encrypt-phi-at-rest-every-bundle-file-that-can.md @@ -0,0 +1 @@ +| Encrypt PHI at rest: every bundle file that can hold patient data under one sealed index (unknown files refused), web recordings from the first frame, and the run directories of sealed bundles; compile, induce, scaffold-verifier, qualify, admit, run, resume, undo, visualize, explain, emit-skill, for-each, sections, check mark, compose, process, variants, route, teach and push read them in memory through one artifact reader and refuse without the key; teach keeps its skill library and taught bundle sealed, and push keeps its sanitized review copy and approved archive encrypted until the upload | On main | Synthetic (no-plaintext audit-hook test over record, compile and a VERIFIED run; per-frame cost measured) | `openadapt-flow seal`, `record`; [phi_at_rest.md](packages/flow/docs/phi_at_rest.md) | diff --git a/capabilities/11-recording-privacy-and-proof/0100-encryption-at-rest-under-a-configured-or-locally.md b/capabilities/11-recording-privacy-and-proof/0100-encryption-at-rest-under-a-configured-or-locally.md new file mode 100644 index 0000000000..bcf303b2bb --- /dev/null +++ b/capabilities/11-recording-privacy-and-proof/0100-encryption-at-rest-under-a-configured-or-locally.md @@ -0,0 +1 @@ +| Encryption at rest under a configured or locally generated key (0600): durable checkpoints and attended state by default; with `OPENADAPT_FLOW_AT_REST=strict`, every recording, bundle and run directory too. Each plaintext write is logged on stderr and in a ledger that Desktop shows as a notice | On main | Synthetic (key, opt-out, strict-mode, run-directory and attended-state audit-hook tests) | `openadapt_flow.at_rest`; [phi_at_rest.md](packages/flow/docs/phi_at_rest.md#default-opt-out-and-strict-mode) | diff --git a/capabilities/11-recording-privacy-and-proof/0110-receipts-one-signed-record-per-run-with-any.md b/capabilities/11-recording-privacy-and-proof/0110-receipts-one-signed-record-per-run-with-any.md new file mode 100644 index 0000000000..9e1099a040 --- /dev/null +++ b/capabilities/11-recording-privacy-and-proof/0110-receipts-one-signed-record-per-run-with-any.md @@ -0,0 +1 @@ +| Receipts: one signed record per run, with any outcome (`receipt.json`, a DSSE envelope over an in-toto `record/run/v1` statement): one line per write with its check, strength and what it didn't check; digests, enums, counts and salted commitments only, never screenshots, typed values, URLs or page text; the outcome copied, never upgraded; signer roles from a pinned registry (this computer, customer key, OpenAdapt Cloud countersignature, public log, demo), unknown key, role or schema fails closed; a public card is the same envelope with only allow-listed values opened (`openadapt.public-disclosure/v1`) | Branch ([#2394](https://github.com/OpenAdaptAI/OpenAdapt/pull/2394)) | Unit tests with synthetic runs (stopped runs, tampered report and payload, unknown signer, embedded image refused); 15 shared vectors for the Python, Cloud and web verifiers | `openadapt verify `, `openadapt receipt verify\|view\|publish\|unpublish`; [RECEIPTS.md](packages/flow/docs/RECEIPTS.md); [vectors](packages/types/tests/vectors/record-run-v1/README.md) | diff --git a/capabilities/11-recording-privacy-and-proof/0120-older-signed-formats-still-verify-labelled-older.md b/capabilities/11-recording-privacy-and-proof/0120-older-signed-formats-still-verify-labelled-older.md new file mode 100644 index 0000000000..90b30b3b8a --- /dev/null +++ b/capabilities/11-recording-privacy-and-proof/0120-older-signed-formats-still-verify-labelled-older.md @@ -0,0 +1 @@ +| Older signed formats still verify, labelled "older format": offline and public Seals (`local-seal/v1`, `public-seal/v1`), Cloud-signed Execute receipts (`seal-signature/v1`), run summaries (`run-receipt/v2`), write and transaction receipts; Seals countersigned and timestamped | Released | Unit tests, real TSA tokens | `openadapt verify`; `openadapt-flow countersign`, `local-seal`; [OFFLINE_SEALS.md](packages/flow/docs/OFFLINE_SEALS.md) | diff --git a/capabilities/11-recording-privacy-and-proof/0130-encrypt-a-bundle-at-rest-under-one-encrypted.md b/capabilities/11-recording-privacy-and-proof/0130-encrypt-a-bundle-at-rest-under-one-encrypted.md new file mode 100644 index 0000000000..2314b13563 --- /dev/null +++ b/capabilities/11-recording-privacy-and-proof/0130-encrypt-a-bundle-at-rest-under-one-encrypted.md @@ -0,0 +1 @@ +| Encrypt a bundle at rest under one encrypted index | Released | Unit tests | `openadapt-flow encrypt` (`seal` is a hidden alias for one release) | diff --git a/capabilities/11-recording-privacy-and-proof/0140-offline-seals-signed-with-a-key-the-customer.md b/capabilities/11-recording-privacy-and-proof/0140-offline-seals-signed-with-a-key-the-customer.md new file mode 100644 index 0000000000..280305d738 --- /dev/null +++ b/capabilities/11-recording-privacy-and-proof/0140-offline-seals-signed-with-a-key-the-customer.md @@ -0,0 +1 @@ +| Offline Seals signed with a key the customer holds: a key file, the OS keychain, or a PKCS#11 token or HSM; pinned keys with rotation and revocation; no fallback to a generated key | On main ([#1392](https://github.com/OpenAdaptAI/OpenAdapt/pull/1392)) | Unit tests with synthetic data (keychain and PKCS#11 through stand-ins) | `openadapt-flow local-seal --key`, `local-seal key create`, `pin`, `revoke`; `openadapt seal verify FOLDER` checks every sealed run in a folder; [OFFLINE_SEALS.md](packages/flow/docs/OFFLINE_SEALS.md#customer-held-keys) | diff --git a/capabilities/11-recording-privacy-and-proof/0150-anchor-an-offline-seal-in-the-public-sigstore.md b/capabilities/11-recording-privacy-and-proof/0150-anchor-an-offline-seal-in-the-public-sigstore.md new file mode 100644 index 0000000000..83ad9d04d3 --- /dev/null +++ b/capabilities/11-recording-privacy-and-proof/0150-anchor-an-offline-seal-in-the-public-sigstore.md @@ -0,0 +1 @@ +| Anchor an offline Seal in the public Sigstore Rekor transparency log (opt-in; sends one digest and the public key), and verify the anchor offline from the stored inclusion proof | Released ([#1394](https://github.com/OpenAdaptAI/OpenAdapt/pull/1394)) | Unit tests against a simulated Rekor log; real public Rekor entries and Sigstore TSA tokens for the landing demo's referral runs, verified offline in tests; Ed25519ph matches the RFC 8032 test vector | `openadapt-flow local-seal anchor`, `local-seal verify --require-anchor`; [OFFLINE_SEALS.md](packages/flow/docs/OFFLINE_SEALS.md#optional-anchor-a-seal-in-a-public-transparency-log) | diff --git a/capabilities/11-recording-privacy-and-proof/0160-signed-write-receipts-a-verifier-verdict-with.md b/capabilities/11-recording-privacy-and-proof/0160-signed-write-receipts-a-verifier-verdict-with.md new file mode 100644 index 0000000000..6b90903e02 --- /dev/null +++ b/capabilities/11-recording-privacy-and-proof/0160-signed-write-receipts-a-verifier-verdict-with.md @@ -0,0 +1 @@ +| Signed write receipts: a verifier verdict with its scope (stores read, window, strength) and a plain not-checked list, signed as a COSE_Sign1 (IETF SCITT shape) and logged in a local Merkle transparency log; checked offline against pinned keys; a receipt that claims more than its scope is neither issued nor accepted; optional Rekor anchor | On main | Unit tests on the real verifier (SQLite) and shadow proxy; COSE checked through python-cwt | `openadapt-flow receipt verify`, `receipt keys export`, `receipt anchor`; `verify_write(..., write_receipt=True)`; `shadow --receipts`; [WRITE_RECEIPTS.md](packages/flow/docs/WRITE_RECEIPTS.md) | diff --git a/capabilities/11-recording-privacy-and-proof/0170-per-run-accounting-ledger-for-any-executor-an.md b/capabilities/11-recording-privacy-and-proof/0170-per-run-accounting-ledger-for-any-executor-an.md new file mode 100644 index 0000000000..3a36d7a3dd --- /dev/null +++ b/capabilities/11-recording-privacy-and-proof/0170-per-run-accounting-ledger-for-any-executor-an.md @@ -0,0 +1 @@ +| Per-run accounting ledger for any executor (an OpenAdapt agent, a compiled program, another agent, a person): one value-free row per run with the outcome (VERIFIED, ESCALATED, CAUGHT_ERROR, FAILED, UNKNOWN) and a closed reason, a person's minutes from approval, question, exception and second-factor intervals, model calls and cost (unknown is null, never zero), field names with their checks, and the read-back tier; values only in a local 0600 sidecar; collected from the files guard, verify-run, compiled runs, wrap, item approvals and compile-agent already write, plus readiness shadow runs, guard ledger rows, P7 fallback results and P6 exception answers; a person's decline is ESCALATED, not a caught error | On main | Unit tests with synthetic data: the outcome rule as a table over every engine outcome enum, fixtures for each source (copies of the shadow, guarded-save, fallback and exception files from a synthetic MockMed end-to-end run), the real commit guard against MockMed's fault server end to end, exports scanned for every fixture value and checked with the real Presidio scrubber, push payloads validated against the JSON Schema, push refused with no key | `openadapt-flow ledger add`, `list`, `show`, `summary`, `export`, `push`; [RUN_LEDGER.md](packages/flow/docs/RUN_LEDGER.md) | diff --git a/capabilities/11-recording-privacy-and-proof/0180-see-a-run-s-seal-offline-one-html-page-that.md b/capabilities/11-recording-privacy-and-proof/0180-see-a-run-s-seal-offline-one-html-page-that.md new file mode 100644 index 0000000000..3a08a88ccb --- /dev/null +++ b/capabilities/11-recording-privacy-and-proof/0180-see-a-run-s-seal-offline-one-html-page-that.md @@ -0,0 +1 @@ +| See a run's Seal offline: one HTML page that checks the Ed25519 signature over the run's exact report in the browser, draws the Seal from it, replays the run over its program map, and lets the reader tamper with a copy; no network requests; the quickstart ends on the person's own. One screen: map left, Seal and verdict top right, Summary, Steps, Evidence and Raw tabs; light and dark | On main ([#1566](https://github.com/OpenAdaptAI/OpenAdapt/pull/1566)) | A real quickstart run's Seal opened from `file://` in Chromium (valid, tampered, no requests; a link to one step, keyboard tabs and steps, theme switch, phone layout); RFC 8032 test vectors; a published OpenEMR Seal's Rekor entry and timestamp | `openadapt seal view RUN_DIR`; `openadapt quickstart`; [`@openadapt/seal-view`](packages/seal-view/README.md) | diff --git a/capabilities/11-recording-privacy-and-proof/0190-sign-in-to-from-the-terminal.md b/capabilities/11-recording-privacy-and-proof/0190-sign-in-to-from-the-terminal.md new file mode 100644 index 0000000000..08bad397ad --- /dev/null +++ b/capabilities/11-recording-privacy-and-proof/0190-sign-in-to-from-the-terminal.md @@ -0,0 +1 @@ +| Sign in to OpenAdapt Cloud from the terminal: `openadapt login` with no token prints a sign-in link (opened only with `--open`), listens on 127.0.0.1 for the browser's redirect, and redeems Cloud's one-use code with an S256 PKCE verifier that never leaves the process. A first-time user gets a workspace on the way. The credential goes to the OS keychain entry `push` and `report-run` read; a stored token is re-validated as before, and `--token` and `--no-browser` keep the token path | On main | Unit tests with a real loopback listener (state mismatch, refusal, malformed code, timeout, browser opened only on request); end to end against Cloud's `/auth/loopback` and pairing routes in mock mode, both Connect and Cancel | `openadapt login`; [browser_login.py](packages/flow/openadapt_flow/browser_login.py) | diff --git a/capabilities/11-recording-privacy-and-proof/0200-publish-a-run-s-seal-online-a-signed-public-card.md b/capabilities/11-recording-privacy-and-proof/0200-publish-a-run-s-seal-online-a-signed-public-card.md new file mode 100644 index 0000000000..48c015b738 --- /dev/null +++ b/capabilities/11-recording-privacy-and-proof/0200-publish-a-run-s-seal-online-a-signed-public-card.md @@ -0,0 +1 @@ +| Publish a run's Seal online: a signed public card (counts, outcomes, each step's check, digests; the program name only with `--names` or for the tutorial; never inputs, intents, screenshots, URLs or halt text) shown in full and uploaded only after a yes, with a delete token; check a hosted link here. The quickstart offers its checked and its stopped run's Seals in one question, showing every public field and the full path to each file; `--show` prints the exact upload | On main ([#2266](https://github.com/OpenAdaptAI/OpenAdapt/pull/2266)) | Unit tests with synthetic reports: planted values absent from the file, 64-step card within 4,096 bytes, stopped runs, mock uploads with real sockets blocked; 29 golden vectors shared with Cloud's verifier | `openadapt-flow local-seal public`; `openadapt seal publish`, `unpublish`, `seal verify `; [OFFLINE_SEALS.md](packages/flow/docs/OFFLINE_SEALS.md#public-seals-a-summary-you-can-post) | diff --git a/capabilities/11-recording-privacy-and-proof/0210-run-authorizations-signed-with-the-authorizer-s.md b/capabilities/11-recording-privacy-and-proof/0210-run-authorizations-signed-with-the-authorizer-s.md new file mode 100644 index 0000000000..0bf0afc657 --- /dev/null +++ b/capabilities/11-recording-privacy-and-proof/0210-run-authorizations-signed-with-the-authorizer-s.md @@ -0,0 +1 @@ +| Run authorizations signed with the authorizer's GitHub SSH key (`ssh-keygen -Y sign`, after a summary of what it allows), naming the signing key and bound to the bundle digest, items, profile and Seal keys, and referenced by each Seal; the identity checked against github.com (`--live`) or pinned allowed signers; a pseudonymous operator profile counted from anchored Seals only | Released ([#1401](https://github.com/OpenAdaptAI/OpenAdapt/pull/1401)) | Unit tests with synthetic data; signatures checked against OpenSSH's `ssh-keygen` both ways | `openadapt-flow local-seal authorize`, `local-seal run --authorization`, `local-seal profile`; [OFFLINE_SEALS.md](packages/flow/docs/OFFLINE_SEALS.md#run-authorizations-who-authorized-the-runs) | diff --git a/capabilities/11-recording-privacy-and-proof/0220-run-reports-redacted-before-they-are-sealed.md b/capabilities/11-recording-privacy-and-proof/0220-run-reports-redacted-before-they-are-sealed.md new file mode 100644 index 0000000000..e4613b7a5e --- /dev/null +++ b/capabilities/11-recording-privacy-and-proof/0220-run-reports-redacted-before-they-are-sealed.md @@ -0,0 +1 @@ +| Run reports redacted before they are sealed: session and CSRF tokens, OAuth grants and credential headers become `` and are listed in `redactions`; a Seal refuses a report that still holds one; per-app policy | Released ([#1407](https://github.com/OpenAdaptAI/OpenAdapt/pull/1407)) | Unit tests with generated tokens; 7,773 local reports scanned, only OpenEMR `token_main` matched | `openadapt-flow redact-report`, `local-seal run --allow-unredacted`; [REPORT_REDACTION.md](packages/flow/docs/REPORT_REDACTION.md) | diff --git a/capabilities/11-recording-privacy-and-proof/0230-strict-no-outbound-mode-and-an-unattended-on.md b/capabilities/11-recording-privacy-and-proof/0230-strict-no-outbound-mode-and-an-unattended-on.md new file mode 100644 index 0000000000..cf071d1326 --- /dev/null +++ b/capabilities/11-recording-privacy-and-proof/0230-strict-no-outbound-mode-and-an-unattended-on.md @@ -0,0 +1 @@ +| Strict no-outbound mode and an unattended on-prem service | Released | Synthetic | `openadapt-flow no-outbound`, `service`; [ON_PREM.md](packages/flow/docs/ON_PREM.md) | diff --git a/capabilities/11-recording-privacy-and-proof/0240-windows-service-wrapper-for-the-outbound-byoc.md b/capabilities/11-recording-privacy-and-proof/0240-windows-service-wrapper-for-the-outbound-byoc.md new file mode 100644 index 0000000000..7d850d0f6e --- /dev/null +++ b/capabilities/11-recording-privacy-and-proof/0240-windows-service-wrapper-for-the-outbound-byoc.md @@ -0,0 +1 @@ +| Windows service wrapper for the outbound BYOC connector: virtual service account, restricted config ACL, rotating log, delayed start and SCM recovery | Branch ([#2292](https://github.com/OpenAdaptAI/OpenAdapt/pull/2292)) | Windows-hosted CI proves service lifecycle and refusal of an ungoverned stub job; it does not prove a desktop job through an interactive-session agent | `openadapt-flow connector service install`, `start`, `stop`, `remove`, `status`; [BYOC_CONNECTOR.md](packages/flow/docs/BYOC_CONNECTOR.md#windows-service) | diff --git a/capabilities/11-recording-privacy-and-proof/section.md b/capabilities/11-recording-privacy-and-proof/section.md new file mode 100644 index 0000000000..aa3ee225ce --- /dev/null +++ b/capabilities/11-recording-privacy-and-proof/section.md @@ -0,0 +1,6 @@ +## Recording, privacy and proof + +| Capability | Status | Evidence | Where | +| --- | --- | --- | --- | + + diff --git a/capabilities/12-every-command-by-capability/section.md b/capabilities/12-every-command-by-capability/section.md new file mode 100644 index 0000000000..d642813cd4 --- /dev/null +++ b/capabilities/12-every-command-by-capability/section.md @@ -0,0 +1,10 @@ +## Every command, by capability + +Each `openadapt-flow` command, grouped by the capability it serves. Each +command has one file under +[`packages/flow/docs/commands/`](packages/flow/docs/commands/): to add a +command, add `/.md` and run `python scripts/build_command_map.py`. +A test fails when a command has no file or this list is out of date. + + + diff --git a/capabilities/13-measured-results/section.md b/capabilities/13-measured-results/section.md new file mode 100644 index 0000000000..7a26cacc26 --- /dev/null +++ b/capabilities/13-measured-results/section.md @@ -0,0 +1,50 @@ +## Measured results + +- **OpenEMR referral, 62 timed runs each, warm.** OpenAdapt took a median of + 29.7 s and a computer-use agent (Claude) 36.5 s. Both saved 62 of 63 + referrals correctly. OpenAdapt made no model calls; the agent cost about + $0.08 per referral. Raw data and + figures: [benchmark/openemr_referral_timing](packages/flow/benchmark/openemr_referral_timing/). +- **Guard an agent you already run, MockMed.** A scripted Playwright agent + in its own browser, 90 runs at a high shared load (median load average 29). + Of the 8 `effect_e2e` faults that leave a wrong record, the agent alone + reported 6 as saved; with the guard, the read-back caught 7 and 1 (a stray + write to a table the REST read doesn't cover) got through; the compiled + program caught all 8. The guard blocked the saves it can see: a save on the + wrong patient and a second submit. Same-load pairs: the guarded agent took + 6.3 s (6 actions, each a model call for a real agent), the compiled tool + 4.4 s with no model calls: + [GUARD_AN_AGENT.md](packages/flow/docs/GUARD_AN_AGENT.md#measured-on-mockmed). +- **Fault test.** We injected 8 kinds of bad save, 9 runs each, alongside + clean runs: 72 runs left a wrong record behind. A check that trusts the screen's "Saved" banner reported 54 of those + as success; reading the record back over the app's REST API missed 9; the + complete database read path caught all 72. The fault set and method are in + [EFFECT_E2E.md](packages/flow/benchmark/effect_e2e/EFFECT_E2E.md). +- **OpenEMR referral: agent, screen program and API step.** Median wall time + per referral, from a fresh browser through sign-in, the entry and the read-back: + agent alone 36.5 s (62 of 63 correct, the 14 to 15 Oct study); compiled program + on the screen 22.5 s (18 of 18); the same program with the API step 3.3 s + (18 of 18). The program rows ran on 19 Oct, interleaved on one copy, with + the approval gate off; the benchmark harness admitted the API step: + [SCOREBOARD.md](packages/flow/benchmark/scoreboard/SCOREBOARD.md#openemr-agent-screen-program-and-api-step). +- **An agent's claims versus the read-back, on OpenEMR.** With faults injected + in the fixture's database (partial, wrong value, duplicate, not persisted, + another chart deleted, another chart edited; 5 items each), Claude Sonnet 5.5 + computer use claimed success on all 30 bad saves. `verify-run` caught 25 and + confirmed 5 of 5 clean saves with no false alarms: + [SCOREBOARD.md](packages/flow/benchmark/scoreboard/SCOREBOARD.md#the-agents-claims-versus-the-read-back). +- **An agent's claims versus the read-back.** Claude Sonnet 5.5 computer use, + working alone on a test app whose server broke the save in 6 ways (5 items + each), reported all 30 bad saves as done. `verify-run` flagged all 30 and + confirmed all 10 clean saves, with no false alarms. The app shows "saved" + before the server answers, so this measures what the screen can't show, not + the agent's care: + [SCOREBOARD.md](packages/flow/benchmark/scoreboard/SCOREBOARD.md#the-agents-claims-versus-the-read-back). +- **openIMIS claims.** On a test copy of openIMIS, the open-source insurance + and claims system that runs Nepal's national health insurance scheme, the + compiled program entered 149 synthetic claims with no model calls: 148 read + back correct and none were saved wrong: + [SCOREBOARD.md](packages/flow/benchmark/scoreboard/SCOREBOARD.md#openimis). + +The systems each result ran on are listed in +[LIMITS.md](packages/flow/docs/LIMITS.md#validated-on). diff --git a/capabilities/CAPABILITIES.md.sha256 b/capabilities/CAPABILITIES.md.sha256 new file mode 100644 index 0000000000..e187e92e51 --- /dev/null +++ b/capabilities/CAPABILITIES.md.sha256 @@ -0,0 +1 @@ +9427a5c058de97037b890ea149f74d0723a85384151825a8fa413e9b11f2ca65 diff --git a/capabilities/README.md b/capabilities/README.md new file mode 100644 index 0000000000..7e0ff90a4a --- /dev/null +++ b/capabilities/README.md @@ -0,0 +1,4 @@ + +`CAPABILITIES.md.sha256` is the hash of the page as the script last wrote it. +The refresh stops (and opens an issue) when the page on main no longer +matches it, instead of dropping a hand edit. diff --git a/packages/flow/docs/commands/README.md b/packages/flow/docs/commands/README.md index 5400a574fc..f7d284a3b1 100644 --- a/packages/flow/docs/commands/README.md +++ b/packages/flow/docs/commands/README.md @@ -4,14 +4,11 @@ One file per command: `/.md`. The group directory names the capability; its `README.md` holds the title, and the numeric prefix sets the order. A command's file is empty or holds a one-line note. -To add a command, add its file to the right group and run: - -```bash -python scripts/build_command_map.py -``` - -That rewrites the "Every command, by capability" list in the root -`CAPABILITIES.md`. `packages/flow/tests/test_capabilities_map.py` fails when a -command has no file, a file names no command, or the list is out of date. -Because each command is its own file and the list has one command per line, two -pull requests that each add a command rarely edit the same line. +To add a command, add its file to the right group. Don't regenerate the root +`CAPABILITIES.md` in your pull request: after it lands, +`.github/workflows/refresh-generated.yml` rebuilds the "Every command, by +capability" list (with `scripts/build_capabilities.py`, which calls +`scripts/build_command_map.py`). `packages/flow/tests/test_capabilities_map.py` +fails when a command has no file or a file names no command. Because each +command is its own file, two pull requests that each add a command never edit +the same file. diff --git a/packages/flow/tests/test_capabilities_map.py b/packages/flow/tests/test_capabilities_map.py index ef5e6d2f1a..73167808bd 100644 --- a/packages/flow/tests/test_capabilities_map.py +++ b/packages/flow/tests/test_capabilities_map.py @@ -2,9 +2,10 @@ Reviews of OpenAdapt keep missing capabilities that ship because nothing tied the capability map to the code. A new command fails this test until it has a -file under packages/flow/docs/commands// and the list in CAPABILITIES.md -is regenerated with scripts/build_command_map.py. One file per command keeps -two pull requests that each add a command from editing the same line. +file under packages/flow/docs/commands//. One file per command keeps two +pull requests that each add a command from editing the same line. The list in +CAPABILITIES.md is regenerated after the change lands, by the refresh workflow +(.github/workflows/refresh-generated.yml), not in each pull request. """ from __future__ import annotations @@ -43,8 +44,7 @@ def test_every_command_has_a_capability_file() -> None: documented = _command_map().documented_verbs() missing = sorted(set(_verbs()) - set(documented)) assert not missing, ( - f"add packages/flow/docs/commands//.md for {missing}, " - "then run: python scripts/build_command_map.py" + f"add packages/flow/docs/commands//.md for {missing}" ) stale = sorted(set(documented) - set(_verbs())) assert not stale, f"no such openadapt-flow command; remove the files for {stale}" @@ -52,9 +52,14 @@ def test_every_command_has_a_capability_file() -> None: assert not duplicated, f"each command belongs to one capability: {duplicated}" -def test_capability_map_command_list_is_current() -> None: +def test_the_assembled_capability_map_holds_the_command_list() -> None: command_map = _command_map() - text = command_map.MAP.read_text(encoding="utf-8") - assert command_map.splice(text, command_map.render()) == text, ( - "run: python scripts/build_command_map.py" + spec = importlib.util.spec_from_file_location( + "build_capabilities", REPO / "scripts" / "build_capabilities.py" ) + assert spec and spec.loader + module = importlib.util.module_from_spec(spec) + spec.loader.exec_module(module) + page = module.assemble() + assert command_map.render() in page + assert page.rfind(command_map.HEADING, 0, page.index(command_map.BEGIN)) != -1 diff --git a/scripts/build_capabilities.py b/scripts/build_capabilities.py new file mode 100644 index 0000000000..d55f9eece7 --- /dev/null +++ b/scripts/build_capabilities.py @@ -0,0 +1,333 @@ +"""Assemble CAPABILITIES.md from capabilities/, one file per table row. + +Almost every pull request adds or edits a capability row, and most add it at +the end of the same table. When CAPABILITIES.md was edited by hand, every +merge to main made the other open pull requests conflict. Now the page is +assembled from files: + + capabilities/-
/section.md the section's prose and table header + capabilities/-
/-.md one table row, exactly as printed + +A row file holds one line, the Markdown table row. Rows print in the order of +their numeric prefix (then by name), so a new row takes a number after the +last one, or between two rows to sit between them. Two pull requests that +pick the same number both keep their rows. In section.md, the line +```` is where the rows go, and +```` is where the command list +from packages/flow/docs/commands/ goes. + +A pull request edits only these files. It does not regenerate CAPABILITIES.md +or llms-full.txt: a workflow (.github/workflows/refresh-generated.yml) opens a +pull request that refreshes both after changes land on main. + + python scripts/build_capabilities.py # rewrite CAPABILITIES.md + python scripts/build_capabilities.py --check # fail unless it is current + python scripts/build_capabilities.py --check-pr BASE # the pull-request check + python scripts/build_capabilities.py --guard # fail if the page was edited by hand + python scripts/build_capabilities.py --split # rebuild capabilities/ from CAPABILITIES.md + +``--check-pr BASE`` passes when each generated file (CAPABILITIES.md, +llms-full.txt) is current or was not changed since BASE. It fails when a pull +request edits a generated file by hand, because the next refresh would drop +the edit. ``--guard`` runs before each refresh: it fails when +CAPABILITIES.md no longer matches the hash this script last wrote +(capabilities/CAPABILITIES.md.sha256), for example after a pull request whose +CI passed before this check existed, and lists the lines no source produces. + +``--split`` is the one-time migration, kept so it can be re-run on the newest +main before the split lands. After that, never run it: it rebuilds the row +files from the committed page, so it deletes every row that so far exists +only as a row file. +""" + +from __future__ import annotations + +import hashlib +import importlib.util +import json +import re +import shutil +import subprocess +import sys +from pathlib import Path + +ROOT = Path(__file__).resolve().parent.parent +OUT = ROOT / "CAPABILITIES.md" +SOURCES = ROOT / "capabilities" +SECTION = "section.md" +# The sha256 of CAPABILITIES.md as this script last wrote it. A page whose +# hash differs was changed by something other than this script, such as a +# pull request whose CI passed before --check-pr existed; --guard stops the +# refresh there instead of dropping that change. +STAMP = SOURCES / "CAPABILITIES.md.sha256" +ROWS = "" +COMMANDS = "" +_ROW_FILE = re.compile(r"^(\d+)-[a-z0-9][a-z0-9-]*\.md$") +_SECTION_DIR = re.compile(r"^(\d+)-[a-z0-9][a-z0-9-]*$") + + +def _load(name: str): + spec = importlib.util.spec_from_file_location(name, ROOT / "scripts" / f"{name}.py") + assert spec and spec.loader + module = importlib.util.module_from_spec(spec) + spec.loader.exec_module(module) + return module + + +def _rel(path: Path) -> Path: + return path.relative_to(ROOT) if path.is_relative_to(ROOT) else path + + +def _visible(path: Path) -> bool: + """Skip what editors and the OS leave behind (.DS_Store, foo.md~, .swp).""" + return not path.name.startswith((".", "__")) and not path.name.endswith("~") + + +def _numbered(paths, pattern: re.Pattern[str]) -> list[Path]: + found = [] + for path in paths: + match = pattern.match(path.name) + if match is None: + raise SystemExit( + f"{_rel(path)}: name it -" + + (".md" if pattern is _ROW_FILE else "") + ) + found.append((int(match.group(1)), path.name, path)) + return [path for _, _, path in sorted(found)] + + +def sections(root: Path = SOURCES) -> list[Path]: + return _numbered( + (p for p in root.iterdir() if p.is_dir() and _visible(p)), _SECTION_DIR + ) + + +def rows(section: Path) -> list[str]: + """Return a section's table rows, in order, each checked to be one row.""" + files = ( + p + for p in section.iterdir() + if p.is_file() and p.name != SECTION and _visible(p) + ) + lines = [] + for path in _numbered(files, _ROW_FILE): + text = path.read_text("utf-8") + line = text[:-1] if text.endswith("\n") else text + if "\n" in line or "\r" in line or not line.startswith("|"): + raise SystemExit( + f"{_rel(path)} must hold exactly one Markdown table row " + "(one line starting with '|')" + ) + lines.append(line) + return lines + + +def assemble(root: Path = SOURCES) -> str: + """Return CAPABILITIES.md as the files under capabilities/ describe it.""" + for path in root.iterdir(): + if ( + path.is_file() + and _visible(path) + and path.name not in ("README.md", STAMP.name) + ): + # A row here would never print: stop instead of dropping it. + raise SystemExit(f"{_rel(path)}: put row files in a section directory") + commands = _load("build_command_map").render() + parts = [] + for section in sections(root): + text = (section / SECTION).read_text("utf-8") + table = rows(section) + lines = text.split("\n") + if table and lines.count(ROWS) != 1: + raise SystemExit(f"{_rel(section)}/{SECTION} needs one '{ROWS}' line") + if not table and ROWS in lines: + raise SystemExit(f"{_rel(section)} has '{ROWS}' but no row files") + out = [] + for line in lines: + if line == ROWS: + out.extend(table) + elif line == COMMANDS: + out.append(commands) + else: + out.append(line) + parts.append("\n".join(out)) + return "".join(parts) + + +# --------------------------------------------------------------------------- # +# The migration: CAPABILITIES.md -> capabilities/ +# --------------------------------------------------------------------------- # +def _path_tokens() -> list[str]: + """Words a public path must not hold (source-policy.public.json).""" + policy = ROOT / "source-policy.public.json" + if not policy.exists(): + return [] + tokens = json.loads(policy.read_text("utf-8"))["enforcement"]["path_tokens"] + return [token.replace("_", "-") for token in tokens] + + +def _slug(text: str, limit: int = 48) -> str: + """A file name from a row's first cell, or a section heading.""" + text = re.sub(r"\[([^\]]*)\]\([^)]*\)", r"\1", text) + words = re.sub(r"[^a-z0-9]+", " ", text.lower()).split() + slug = "" + for word in words: + if slug and len(slug) + 1 + len(word) > limit: + break + slug = f"{slug}-{word}" if slug else word[:limit] + for token in _path_tokens(): + slug = re.sub(r"-+", "-", slug.replace(token, "")).strip("-") + return slug or "row" + + +def split(text: str) -> dict[str, str]: + """Return {relative path: content} for capabilities/, from a CAPABILITIES.md. + + assemble() of the result gives ``text`` back byte for byte. + """ + command_map = _load("build_command_map") + begin, end = text.index(command_map.BEGIN), text.index(command_map.END) + text = text[:begin] + COMMANDS + text[end + len(command_map.END) :] + lines = text.splitlines(keepends=True) + chunks: list[list[str]] = [[]] + for line in lines: + if line.startswith("## ") and chunks[-1]: + chunks.append([]) + chunks[-1].append(line) + files: dict[str, str] = {} + for number, chunk in enumerate(chunks): + heading = chunk[0].lstrip("#").strip() + directory = f"{number:02d}-{_slug(heading, 40)}" + table = [i for i, line in enumerate(chunk) if line.startswith("|")] + body = chunk + if table: + first, last = table[0], table[-1] + if table != list(range(first, last + 1)): + raise SystemExit(f"section '{heading}' has more than one table") + header, row_lines = chunk[first : first + 2], chunk[first + 2 : last + 1] + if not row_lines: + raise SystemExit(f"section '{heading}' has a table with no rows") + body = chunk[:first] + header + [ROWS + "\n"] + chunk[last + 1 :] + used: set[str] = set() + for index, row in enumerate(row_lines, 1): + cell = row.strip().strip("|").split("|", 1)[0] + name = _slug(cell) + unique, n = name, 2 + while unique in used: + unique, n = f"{name}-{n}", n + 1 + used.add(unique) + files[f"{directory}/{index * 10:04d}-{unique}.md"] = ( + row if row.endswith("\n") else row + "\n" + ) + files[f"{directory}/{SECTION}"] = "".join(body) + return files + + +def write_split(text: str, root: Path = SOURCES) -> None: + # Replace the section directories; keep capabilities/README.md. + for directory in (p for p in root.iterdir() if p.is_dir()) if root.exists() else (): + shutil.rmtree(directory) + for relative, content in split(text).items(): + path = root / relative + path.parent.mkdir(parents=True, exist_ok=True) + path.write_text(content, "utf-8") + + +# --------------------------------------------------------------------------- # +# Checks +# --------------------------------------------------------------------------- # +def _stamp(text: str) -> str: + return hashlib.sha256(text.encode("utf-8")).hexdigest() + "\n" + + +def generated() -> dict[Path, str]: + """Each generated, committed file and what it should hold now.""" + page = assemble() + return { + OUT: page, + STAMP: _stamp(page), + ROOT / "llms-full.txt": _load("build_llms_full").build(), + } + + +def guard() -> int: + """Fail when CAPABILITIES.md changed since this script last wrote it.""" + page = OUT.read_text("utf-8") + if STAMP.exists() and STAMP.read_text("utf-8") == _stamp(page): + return 0 + assembled = assemble() + if page == assembled: + # Regenerated outside this script (or the stamp was not updated): + # the page matches its sources, so the refresh drops nothing. + return 0 + sources = set(assembled.splitlines()) + extra = [line for line in page.splitlines() if line not in sources] + print( + "CAPABILITIES.md was changed by something other than " + "scripts/build_capabilities.py, so regenerating it would drop that " + "change. Move each line below into its row file (or section.md), then " + "regenerate the page in the same pull request. Lines on the page " + "that no source produces:", + file=sys.stderr, + ) + for line in extra or ["(none: the page only trails its sources; regenerate it)"]: + print(f" {line[:200]}", file=sys.stderr) + return 1 + + +def _changed_since(base: str, path: Path) -> bool: + result = subprocess.run( + ["git", "-C", str(ROOT), "diff", "--quiet", base, "--", str(_rel(path))], + check=False, + ) + if result.returncode not in (0, 1): + raise SystemExit(f"git diff {base} failed") + return result.returncode == 1 + + +def main(argv: list[str]) -> int: + if "--split" in argv: + write_split(OUT.read_text("utf-8")) + if assemble() != OUT.read_text("utf-8"): + raise SystemExit("the split does not assemble back to CAPABILITIES.md") + STAMP.write_text(_stamp(assemble()), "utf-8") + print(f"wrote {SOURCES.relative_to(ROOT)}/ from CAPABILITIES.md") + return 0 + if "--guard" in argv: + return guard() + if "--check-pr" in argv: + base = argv[argv.index("--check-pr") + 1] + bad = [] + for path, text in generated().items(): + current = path.read_text("utf-8") if path.exists() else "" + if current != text and _changed_since(base, path): + bad.append(_rel(path)) + for path in bad: + print( + f"{path} is generated and this change edits it by hand. Make the " + "change in its sources instead (a row file under capabilities/, " + "capabilities/*/section.md, README.md, ...), then undo the edit: " + f"git checkout {base} -- {path}. A branch from before the split " + "can run python scripts/migrate_branch_to_split_files.py during " + "its merge of main.", + file=sys.stderr, + ) + return 1 if bad else 0 + text = assemble() + if "--check" in argv: + current = STAMP.read_text("utf-8") if STAMP.exists() else "" + if OUT.read_text("utf-8") != text or current != _stamp(text): + print( + "CAPABILITIES.md is out of date; run python scripts/build_capabilities.py", + file=sys.stderr, + ) + return 1 + return 0 + OUT.write_text(text, "utf-8") + STAMP.write_text(_stamp(text), "utf-8") + print(f"wrote {OUT.relative_to(ROOT)}") + return 0 + + +if __name__ == "__main__": + raise SystemExit(main(sys.argv[1:])) diff --git a/scripts/build_command_map.py b/scripts/build_command_map.py index 5a3bedaf94..95cec09dc1 100644 --- a/scripts/build_command_map.py +++ b/scripts/build_command_map.py @@ -1,4 +1,4 @@ -"""Render CAPABILITIES.md's "Every command, by capability" list from files. +"""Render the "Every command, by capability" list in CAPABILITIES.md from files. Each openadapt-flow command has one file, packages/flow/docs/commands//.md. The group directory names the capability (its README.md holds the title; the @@ -7,15 +7,23 @@ one command per line, so two pull requests that add commands rarely touch the same line. - python scripts/build_command_map.py # rewrite the section +scripts/build_capabilities.py places the list where +capabilities/-every-command-by-capability/section.md has the line +````. A pull request adds the +command's file and does not regenerate CAPABILITIES.md; the refresh workflow +(.github/workflows/refresh-generated.yml) does that after it lands. Running +this script rewrites the whole CAPABILITIES.md, like build_capabilities.py. + + python scripts/build_command_map.py # rewrite CAPABILITIES.md python scripts/build_command_map.py --check # fail if it is out of date -packages/flow/tests/test_capabilities_map.py fails when a command has no file, -a file names no command, or the section is out of date. +packages/flow/tests/test_capabilities_map.py fails when a command has no file +or a file names no command. """ from __future__ import annotations +import importlib.util import sys from pathlib import Path @@ -66,18 +74,12 @@ def splice(text: str, block: str) -> str: def main(argv: list[str]) -> int: - text = MAP.read_text("utf-8") - updated = splice(text, render()) - if "--check" in argv: - if updated != text: - print( - "CAPABILITIES.md command list is out of date; " - "run: python scripts/build_command_map.py" - ) - return 1 - return 0 - MAP.write_text(updated, "utf-8") - return 0 + path = Path(__file__).resolve().parent / "build_capabilities.py" + spec = importlib.util.spec_from_file_location("build_capabilities", path) + assert spec and spec.loader + module = importlib.util.module_from_spec(spec) + spec.loader.exec_module(module) + return module.main([arg for arg in argv if arg == "--check"]) if __name__ == "__main__": diff --git a/scripts/build_llms_full.py b/scripts/build_llms_full.py index 2c55db5427..6d7616819f 100644 --- a/scripts/build_llms_full.py +++ b/scripts/build_llms_full.py @@ -7,10 +7,18 @@ python scripts/build_llms_full.py # rewrite llms-full.txt python scripts/build_llms_full.py --check # fail if it is out of date + +A pull request does not regenerate llms-full.txt. Every page it quotes changes +often, so a committed copy per pull request made every open pull request +conflict whenever one merged. The refresh workflow +(.github/workflows/refresh-generated.yml) opens a pull request that refreshes +it after its sources change on main; on a pull request, CI only checks that +the file was not edited by hand (scripts/build_capabilities.py --check-pr). """ from __future__ import annotations +import importlib.util import re import sys from pathlib import Path @@ -60,6 +68,23 @@ def fix(match: re.Match[str]) -> str: return re.sub(r"\[([^\]]+)\]\(([^)\s]+)\)", fix, text) +def source_text(path: str) -> str: + """A source page as its sources describe it. + + CAPABILITIES.md is assembled from capabilities/, not read from the + committed file, which can trail its row files until the refresh workflow + runs. + """ + if path != "CAPABILITIES.md": + return (ROOT / path).read_text("utf-8") + script = ROOT / "scripts" / "build_capabilities.py" + spec = importlib.util.spec_from_file_location("build_capabilities", script) + assert spec and spec.loader + module = importlib.util.module_from_spec(spec) + spec.loader.exec_module(module) + return module.assemble() + + def build() -> str: version = flow_version() parts = [ @@ -73,7 +98,7 @@ def build() -> str: "Source: https://github.com/OpenAdaptAI/OpenAdapt", ] for path, title in SOURCES: - body = (ROOT / path).read_text("utf-8").strip() + body = source_text(path).strip() parts += ["", "---", "", f"", "", absolute_links(body, path)] notes = latest_changelog(version) if notes: diff --git a/scripts/migrate_branch_to_split_files.py b/scripts/migrate_branch_to_split_files.py index cfe071329c..922c8bc0bb 100644 --- a/scripts/migrate_branch_to_split_files.py +++ b/scripts/migrate_branch_to_split_files.py @@ -7,7 +7,10 @@ * the "Every command, by capability" list in CAPABILITIES.md, now one file per command in packages/flow/docs/commands// (#1345), rendered by scripts/build_command_map.py; -* packages/flow/public-artifacts.json, now a path-only list (#1342). +* packages/flow/public-artifacts.json, now a path-only list (#1342); +* the capability tables in CAPABILITIES.md, now one file per row under + capabilities/, with CAPABILITIES.md and llms-full.txt regenerated on main by + the refresh workflow instead of in each pull request. Run it on your branch while the merge of main is still in progress: @@ -20,7 +23,10 @@ It compares your branch with the merge base, so it moves only what your branch changed: claims it added, changed or removed go to claims/.yaml, commands it added, moved or removed go to docs/commands/, and the generated files are -regenerated from the result. It never overwrites a claim or command that main +regenerated from the result. Capability rows it added, changed or removed go +to capabilities/
/-.md, and CAPABILITIES.md and +llms-full.txt are reset to main's copy, since a pull request no longer +regenerates them. It never overwrites a claim or command that main also changed; it lists those for you to merge by hand. It stages what it resolved and does not commit. @@ -30,6 +36,8 @@ from __future__ import annotations +import difflib +import importlib.util import re import subprocess import sys @@ -41,6 +49,8 @@ COMMANDS_DIR = f"{FLOW}/docs/commands" INVENTORY = f"{FLOW}/public-artifacts.json" CAPABILITIES = "CAPABILITIES.md" +CAPABILITY_ROWS = "capabilities" +LLMS_FULL = "llms-full.txt" COMMANDS_HEADING = "## Every command, by capability" GENERATED_BEGIN = "" GENERATED_END = "" @@ -336,6 +346,154 @@ def regenerate_command_list(root: Path, report: list[str], manual: list[str]) -> report.append("regenerated the command list in CAPABILITIES.md") +# --------------------------------------------------------------------------- # +# CAPABILITIES.md tables -> capabilities/
/-.md +# --------------------------------------------------------------------------- # +def capability_sections(text: str | None) -> dict[str, tuple[list[str], list[str]]]: + """{heading: (prose lines, table rows)}; the header lines count as prose.""" + sections: dict[str, tuple[list[str], list[str]]] = {} + heading = "" + for line in (text or "").splitlines(): + if line.startswith("## "): + heading = line + prose, rows = sections.setdefault(heading, ([], [])) + if line.startswith("|") and not re.match(r"^\|(?:\s*:?-+:?\s*\|)+\s*$", line): + rows.append(line) + else: + prose.append(line) + # A table's first line is its header, not a row. + for prose, rows in sections.values(): + if rows: + prose.append(rows.pop(0)) + return sections + + +def _row_files(directory: Path) -> list[tuple[int, Path, str]]: + found = [] + for path in directory.glob("[0-9]*.md"): + number = int(path.name.split("-", 1)[0]) + found.append((number, path, path.read_text("utf-8").rstrip("\n"))) + return sorted(found, key=lambda item: (item[0], item[1].name)) + + +def _section_dirs(root: Path) -> dict[str, Path]: + found = {} + for directory in sorted( + p for p in (root / CAPABILITY_ROWS).iterdir() if p.is_dir() + ): + section = directory / "section.md" + if section.exists(): + first = section.read_text("utf-8").split("\n", 1)[0] + found[first if first.startswith("## ") else ""] = directory + return found + + +def _row_slug(root: Path, row: str) -> str: + """The file name build_capabilities.py --split gives a row.""" + script = Path(__file__).resolve().parent / "build_capabilities.py" + spec = importlib.util.spec_from_file_location("build_capabilities", script) + assert spec and spec.loader + module = importlib.util.module_from_spec(spec) + spec.loader.exec_module(module) + return module._slug(row.strip().strip("|").split("|", 1)[0]) + + +def _place_row(root: Path, directory: Path, row: str, after: str | None) -> Path: + files = _row_files(directory) + numbers = [number for number, _, _ in files] + index = next((i for i, (_, _, text) in enumerate(files) if text == after), None) + if after is None: + number = numbers[0] // 2 if numbers else 10 + elif index is None: + number = (numbers[-1] if numbers else 0) + 10 + elif index + 1 < len(files): + low, high = numbers[index], numbers[index + 1] + number = low + (high - low) // 2 + else: + number = numbers[index] + 10 + name, n = _row_slug(root, row), 2 + target = directory / f"{number:04d}-{name}.md" + while target.exists(): + target, n = directory / f"{number:04d}-{name}-{n}.md", n + 1 + target.write_text(row + "\n", "utf-8") + return target + + +def migrate_capability_rows( + root: Path, base: str, report: list[str], manual: list[str] +) -> None: + ours = capability_sections(show(root, "HEAD", CAPABILITIES)) + before = capability_sections(show(root, base, CAPABILITIES)) + directories = _section_dirs(root) + for heading in sorted(set(ours) | set(before)): + mine, original = ours.get(heading, ([], [])), before.get(heading, ([], [])) + name = heading.removeprefix("## ") or "the page header" + directory = directories.get(heading) + if mine[0] != original[0]: + where = ( + f"{directory.relative_to(root)}/section.md" + if directory + else "capabilities/" + ) + manual.append( + f"CAPABILITIES.md: your branch changed the text of '{name}'; " + f"make the same edit in {where}" + ) + if mine[1] == original[1]: + continue + if directory is None: + manual.append(f"CAPABILITIES.md: no section '{name}' under capabilities/") + continue + removed = [row for row in original[1] if row not in mine[1]] + added = [row for row in mine[1] if row not in original[1]] + # An edited row is a removed row and an added row that read alike: + # rewrite its file in place, so it keeps its name and its order. + for old_row in list(removed): + if not added: + break + best = max( + added, + key=lambda row: difflib.SequenceMatcher(None, old_row, row).ratio(), + ) + if difflib.SequenceMatcher(None, old_row, best).ratio() < 0.6: + continue + match = [p for _, p, text in _row_files(directory) if text == old_row] + if not match: + continue + match[0].write_text(best + "\n", "utf-8") + git(root, "add", "--", str(match[0].relative_to(root))) + report.append(f"updated {match[0].relative_to(root)}") + removed.remove(old_row) + added.remove(best) + for row in removed: + match = [p for _, p, text in _row_files(directory) if text == row] + if match: + git(root, "rm", "-q", "-f", "--", str(match[0].relative_to(root))) + report.append(f"removed {match[0].relative_to(root)}") + else: + manual.append( + f"'{name}': main also changed or removed a row your branch " + f"changed or removed: {row[:80]}..." + ) + for row in added: + if any(text == row for _, _, text in _row_files(directory)): + continue + index = mine[1].index(row) + after = mine[1][index - 1] if index else None + target = _place_row(root, directory, row, after) + git(root, "add", "--", str(target.relative_to(root))) + report.append(f"added {target.relative_to(root)}") + # A pull request no longer regenerates the pages: keep main's copies. + for path in (CAPABILITIES, LLMS_FULL): + if show(root, "MERGE_HEAD", path) is not None: + git(root, "checkout", "MERGE_HEAD", "--", path) + git(root, "add", "--", path) + report.append( + "kept main's CAPABILITIES.md and llms-full.txt (the refresh workflow " + "regenerates them after your change lands)" + ) + + # --------------------------------------------------------------------------- # # public-artifacts.json -> path-only list # --------------------------------------------------------------------------- # @@ -388,6 +546,8 @@ def main(argv: list[str]) -> int: regenerate_command_list(root, report, manual) if _inventory_schema(show(root, "MERGE_HEAD", INVENTORY)) == 2: regenerate_inventory(root, report) + if has_tree(root, "MERGE_HEAD", CAPABILITY_ROWS): + migrate_capability_rows(root, base, report, manual) for line in report: print(f" done: {line}") diff --git a/tests/test_build_capabilities.py b/tests/test_build_capabilities.py new file mode 100644 index 0000000000..756764e9d3 --- /dev/null +++ b/tests/test_build_capabilities.py @@ -0,0 +1,176 @@ +"""CAPABILITIES.md is assembled from capabilities/, one file per table row. + +A pull request adds or edits its own row file and leaves the generated pages +(CAPABILITIES.md, llms-full.txt) alone; the refresh workflow regenerates them +after the change lands. These tests keep the sources well formed and the +pull-request check honest: it passes a stale page, and fails a hand edit that +the next refresh would drop. +""" + +from __future__ import annotations + +import importlib.util +import subprocess +from pathlib import Path + +import pytest + +ROOT = Path(__file__).resolve().parents[1] +SCRIPT = ROOT / "scripts" / "build_capabilities.py" + + +@pytest.fixture() +def mod(): + spec = importlib.util.spec_from_file_location("build_capabilities_test", SCRIPT) + assert spec and spec.loader + module = importlib.util.module_from_spec(spec) + spec.loader.exec_module(module) + return module + + +def test_the_sources_assemble_and_split_back_to_the_same_files(mod, tmp_path): + page = mod.assemble() + mod.write_split(page, tmp_path / "capabilities") + assert mod.assemble(tmp_path / "capabilities") == page + assert page.startswith("# What OpenAdapt can do\n") + + +def test_every_table_row_is_its_own_file(mod): + page = mod.assemble() + files = sorted(mod.SOURCES.glob("*/[0-9]*.md")) + assert files, "no row files under capabilities/" + for path in files: + line = path.read_text("utf-8").rstrip("\n") + assert page.count(line + "\n") >= 1, path + # No table row lives in a section's prose. + for section in mod.SOURCES.glob(f"*/{mod.SECTION}"): + text = section.read_text("utf-8").splitlines() + rows = [line for line in text if line.startswith("|")] + assert len(rows) in (0, 2), f"{section}: keep only the table header here" + + +def _section(tmp_path: Path, rows: dict[str, str]) -> Path: + root = tmp_path / "capabilities" + section = root / "01-a" + section.mkdir(parents=True) + (section / "section.md").write_text( + "## A\n\n| X | Y |\n| --- | --- |\n\n\nAfter.\n", + "utf-8", + ) + for name, text in rows.items(): + (section / name).write_text(text, "utf-8") + return root + + +def test_rows_print_by_number_then_name(mod, tmp_path): + root = _section( + tmp_path, + { + "0020-b.md": "| b | 2 |\n", + "0100-z.md": "| z | 10 |\n", + "0020-a.md": "| a | 2 |\n", + "0005-first.md": "| first | 0 |", + }, + ) + assert mod.assemble(root) == ( + "## A\n\n| X | Y |\n| --- | --- |\n" + "| first | 0 |\n| a | 2 |\n| b | 2 |\n| z | 10 |\n\nAfter.\n" + ) + + +@pytest.mark.parametrize( + "name,text", + [ + ("0010-two-rows.md", "| a | 1 |\n| b | 2 |\n"), + ("0010-prose.md", "not a row\n"), + ("Row.md", "| a | 1 |\n"), + ], +) +def test_a_malformed_row_file_fails_the_build(mod, tmp_path, name, text): + with pytest.raises(SystemExit): + mod.assemble(_section(tmp_path, {name: text})) + + +def _git(cwd: Path, *args: str) -> str: + return subprocess.run( + ["git", "-C", str(cwd), *args], check=True, capture_output=True, text=True + ).stdout + + +def test_the_pr_check_passes_stale_pages_and_fails_hand_edits( + mod, tmp_path, monkeypatch +): + repo = tmp_path / "repo" + repo.mkdir() + _git(repo, "init", "-q") + page, brief = repo / "CAPABILITIES.md", repo / "llms-full.txt" + page.write_text("old page\n", "utf-8") + brief.write_text("old brief\n", "utf-8") + _git(repo, "add", ".") + _git(repo, "-c", "user.name=t", "-c", "user.email=t@t", "commit", "-qm", "base") + base = _git(repo, "rev-parse", "HEAD").strip() + monkeypatch.setattr(mod, "ROOT", repo) + monkeypatch.setattr( + mod, "generated", lambda: {page: "new page\n", brief: "new brief\n"} + ) + main = mod.main + + # The sources changed and the pages trail them: a normal pull request. + assert main(["--check-pr", base]) == 0 + # Regenerated in the pull request: allowed (it may conflict, though). + page.write_text("new page\n", "utf-8") + assert main(["--check-pr", base]) == 0 + # A hand edit, which the next refresh would silently drop. + page.write_text("old page\n| a hand-added row |\n", "utf-8") + assert main(["--check-pr", base]) == 1 + page.write_text("old page\n", "utf-8") + brief.write_text("old brief, edited\n", "utf-8") + assert main(["--check-pr", base]) == 1 + + +def test_the_committed_stamp_matches_the_page_the_sources_build(mod): + # Seeded with the split; every regeneration rewrites it with the page. + assert mod.guard() == 0 + + +def test_the_guard_stops_a_refresh_that_would_drop_a_hand_edit( + mod, tmp_path, monkeypatch, capsys +): + page, stamp = tmp_path / "CAPABILITIES.md", tmp_path / "stamp" + monkeypatch.setattr(mod, "OUT", page) + monkeypatch.setattr(mod, "STAMP", stamp) + monkeypatch.setattr(mod, "assemble", lambda: "| a |\n| b |\n") + page.write_text("| a |\n", "utf-8") + stamp.write_text(mod._stamp("| a |\n"), "utf-8") + # The page trails its sources (a new row file): the refresh may go on. + assert mod.guard() == 0 + # A pull request whose CI predates --check-pr added a row to the page. + page.write_text("| a |\n| hand-added |\n", "utf-8") + assert mod.guard() == 1 + assert "| hand-added |" in capsys.readouterr().err + + +def test_the_guard_passes_a_page_that_matches_its_sources(mod, tmp_path, monkeypatch): + # Regenerated without updating the stamp: nothing would be dropped. + page, stamp = tmp_path / "CAPABILITIES.md", tmp_path / "stamp" + monkeypatch.setattr(mod, "OUT", page) + monkeypatch.setattr(mod, "STAMP", stamp) + monkeypatch.setattr(mod, "assemble", lambda: "| a |\n| b |\n") + page.write_text("| a |\n| b |\n", "utf-8") + stamp.write_text(mod._stamp("| a |\n"), "utf-8") + assert mod.guard() == 0 + + +def test_editor_and_os_leftovers_are_ignored(mod, tmp_path): + root = _section( + tmp_path, {"0010-a.md": "| a | 1 |\n", ".DS_Store": "x", "0010-a.md~": "y"} + ) + (root / ".DS_Store").write_text("x", "utf-8") + assert "| a | 1 |" in mod.assemble(root) + + +def test_a_row_file_outside_a_section_fails_the_build(mod, tmp_path): + root = _section(tmp_path, {"0010-a.md": "| a | 1 |\n"}) + (root / "0100-lost.md").write_text("| lost | 1 |\n", "utf-8") + with pytest.raises(SystemExit): + mod.assemble(root) diff --git a/tests/test_cli_documented_tasks.py b/tests/test_cli_documented_tasks.py index fc8fea5272..d8dda6b471 100644 --- a/tests/test_cli_documented_tasks.py +++ b/tests/test_cli_documented_tasks.py @@ -67,14 +67,22 @@ def test_wrap_help_is_discovered_as_an_actual_launcher_command(): assert len(names) == 16 -def test_review_brief_matches_the_unmodified_canonical_generator(): +def test_review_brief_comes_from_the_unmodified_canonical_generator(): # Use the actual generator's pure build function. Never splice or approve - # a manually copied README section in the generated review brief. + # a manually copied README section in the generated review brief. A pull + # request does not regenerate llms-full.txt (the refresh workflow does), so + # this checks the generator's output; CI's `build_capabilities.py + # --check-pr` fails a hand edit of the committed file. generator = runpy.run_path( str(ROOT / "scripts/build_llms_full.py"), run_name="llms_source_contract" ) - assert (ROOT / "llms-full.txt").read_text(encoding="utf-8") == generator[ - "build" - ](), ( - "Run python scripts/build_llms_full.py, then --check in the qualified environment" + capabilities = runpy.run_path( + str(ROOT / "scripts/build_capabilities.py"), run_name="capabilities_contract" ) + brief = generator["build"]() + assert generator["absolute_links"]( + (ROOT / "README.md").read_text(encoding="utf-8").strip(), "README.md" + ) in brief + assert generator["absolute_links"]( + capabilities["assemble"]().strip(), "CAPABILITIES.md" + ) in brief diff --git a/tests/test_migrate_split_files.py b/tests/test_migrate_split_files.py index 11ea526d08..7d7b8aadbe 100644 --- a/tests/test_migrate_split_files.py +++ b/tests/test_migrate_split_files.py @@ -90,3 +90,94 @@ def test_resolve_takes_main_only_inside_the_command_list() -> None: # The map-row conflict is not ours to decide. assert "<<<<<<< HEAD\n| branch row |" in resolved assert resolved.count("<<<<<<<") == 1 + + +PAGE = """\ +# Title + +Intro. + +## Core + +| Capability | Status | +| --- | --- | +| One | Released | +| Two | Released | +| Three | Released | + +## Other + +Prose. +""" + + +def _git(cwd: Path, *args: str) -> str: + import subprocess + + return subprocess.run( + ["git", "-C", str(cwd), "-c", "user.name=t", "-c", "user.email=t@t", *args], + check=True, + capture_output=True, + text=True, + ).stdout + + +def _write(root: Path, files: dict[str, str]) -> None: + for name, text in files.items(): + path = root / name + path.parent.mkdir(parents=True, exist_ok=True) + path.write_text(text, "utf-8") + + +def test_capability_rows_move_to_row_files(tmp_path, monkeypatch) -> None: + repo = tmp_path / "repo" + repo.mkdir() + _git(repo, "init", "-q", "-b", "main") + _write(repo, {"CAPABILITIES.md": PAGE, "llms-full.txt": "brief\n"}) + _git(repo, "add", ".") + _git(repo, "commit", "-qm", "base") + # The branch, from before the split: adds a row after Two, edits Three. + _git(repo, "checkout", "-qb", "feature") + branch_page = PAGE.replace( + "| Two | Released |\n", "| Two | Released |\n| Mine | On main |\n" + ).replace("| Three | Released |", "| Three | Released, faster |") + _write(repo, {"CAPABILITIES.md": branch_page, "llms-full.txt": "brief, mine\n"}) + _git(repo, "commit", "-qam", "feature") + # main: the split, and another pull request's new row (page not refreshed). + _git(repo, "checkout", "-q", "main") + _write( + repo, + { + "capabilities/00-title/section.md": "# Title\n\nIntro.\n\n", + "capabilities/01-core/section.md": ( + "## Core\n\n| Capability | Status |\n| --- | --- |\n" + "\n\n" + ), + "capabilities/01-core/0010-one.md": "| One | Released |\n", + "capabilities/01-core/0020-two.md": "| Two | Released |\n", + "capabilities/01-core/0030-three.md": "| Three | Released |\n", + "capabilities/01-core/0040-four.md": "| Four | Released |\n", + "capabilities/02-other/section.md": "## Other\n\nProse.\n", + }, + ) + _git(repo, "add", ".") + _git(repo, "commit", "-qm", "split") + _git(repo, "checkout", "-q", "feature") + _git(repo, "merge", "-q", "--no-commit", "--no-ff", "main") + + monkeypatch.chdir(repo) + assert migrate.main([]) == 0 + core = repo / "capabilities/01-core" + rows = sorted(p.name for p in core.glob("0*.md")) + assert rows == [ + "0010-one.md", + "0020-two.md", + "0025-mine.md", + "0030-three.md", + "0040-four.md", + ] + assert (core / "0025-mine.md").read_text() == "| Mine | On main |\n" + assert (core / "0030-three.md").read_text() == "| Three | Released, faster |\n" + # The generated pages are main's; the refresh workflow rebuilds them. + assert (repo / "CAPABILITIES.md").read_text() == PAGE + assert (repo / "llms-full.txt").read_text() == "brief\n" diff --git a/tests/test_quickstart_command.py b/tests/test_quickstart_command.py index e1beeeabc6..8b143e3c6a 100644 --- a/tests/test_quickstart_command.py +++ b/tests/test_quickstart_command.py @@ -9,6 +9,7 @@ from __future__ import annotations import re +import runpy from pathlib import Path from openadapt import cli @@ -22,9 +23,18 @@ def test_the_launcher_names_the_documented_command(): assert f" {COMMAND}\n" in cli._python_fix() +def _texts() -> dict[str, str]: + # llms-full.txt as its generator writes it: a pull request does not + # regenerate the committed copy (the refresh workflow does). + generator = runpy.run_path(str(ROOT / "scripts/build_llms_full.py")) + return { + "README.md": (ROOT / "README.md").read_text(encoding="utf-8"), + "llms-full.txt": generator["build"](), + } + + def test_readme_and_llms_full_use_the_documented_command(): - for name in ("README.md", "llms-full.txt"): - text = (ROOT / name).read_text(encoding="utf-8") + for name, text in _texts().items(): assert f"{COMMAND} --break-it" in text, name # No other uvx spelling of the quickstart. for match in re.finditer(r"uvx [^\n`]*?quickstart", text): diff --git a/tests/test_shipped_only_copy.py b/tests/test_shipped_only_copy.py index df3a1075ee..23ef214ae6 100644 --- a/tests/test_shipped_only_copy.py +++ b/tests/test_shipped_only_copy.py @@ -15,6 +15,9 @@ PUBLIC = [ ROOT / "README.md", ROOT / "CAPABILITIES.md", + # CAPABILITIES.md's sources: a new row is checked before the refresh + # workflow regenerates the page. + *sorted((ROOT / "capabilities").rglob("*.md")), ROOT / "llms.txt", *sorted((ROOT / "packages").glob("*/README.md")), ]