CtrlK
BlogDocsLog inGet started
Tessl Logo
PluginPublic

statelyai/stately

Find implicit state machines, review state bugs, and check or visualize statecharts with Stately.

Quality

95%

Does it follow best practices?

Run evals on this skill

Adds up to 20 points to the overall score

View guide
SecuritybySnyk

Medium

Suggest reviewing before use

Overview
Quality
Evals
Security
Files

evidence-angles.mdreferences/

Back app documentation with four kinds of evidence

Use this workflow when someone asks what a user can do in an app, wants a first-time-user walkthrough, or wants documentation that shows where the app's behavior differs from its code, tests or docs. It extends app-understanding.md: build the feature inventory first, then model the user journey and gather evidence for each state and transition from four sources.

KindSourceEvidence statusTypical cited paths
CodeSource files that implement the stepinferredapplication source
TestsEnd-to-end or integration tests that exercise the stepobserved*.e2e.*, *.test.*, *.spec.*, or files under e2e/, test/, tests/, __tests__/, scenarios/
DocsThe app's user documentationinferred*.md, *.mdx
Running appA browser crawl of an isolated installcapture run outcomescreenshots attached to the capture run

Cite each test and doc by its own path so a reader can tell the kinds apart.

Each kind answers a different question. Code says what the app is built to do. Tests and docs say what the authors expect. The running app shows what a user gets. Record disagreements as findings. Do not change the model to hide them.

Model the user journey from code

  1. Read the user-facing code: routes, onboarding, navigation, the main editing or composing surface, dialogs, settings and error states.
  2. Save one machine for the journey a new user follows. Name states after the situation the user is in ("No project", "Waiting for your approval") and events after the user's action or the visible outcome ("Add a project", "Agent finished"). Give each state a description of what the user sees and can do, and each transition a one-sentence description of the outcome.
  3. Start the machine at what a first-time user sees on launch.
  4. Where a step hands off to another saved flow, add an invoke whose src is that flow's root key, so the project architecture diagram links them.
  5. Cite every state and transition as path:start-end. Before saving, check that each cited path exists and that each line range is within the file and shows the behavior. Never cite a file you have not opened, and never cite your own working notes or generated output.

Add tests and docs as evidence

  1. Read the test suite and rewrite each test as a Given/When/Then statement about what a user does and sees, without selectors, test IDs or helper names. Classify each one as a user flow, an edge case or an implementation detail.
  2. Read the user docs and extract each documented capability or rule as a Given/When/Then claim with its file and line range.
  3. Match tests and claims to journey states and transitions. A match must describe the same situation, action and outcome, not only the same area.
  4. Append matches to the entity's evidence and keep its existing entries: { "source": "tests/onboarding.e2e.ts:12", "status": "observed", "description": "Test: ..." } and { "source": "docs/user/setup.md:3-7", "status": "inferred", "description": "Docs: ..." }. With edit_stately_model, set the entity's meta key @statelyai.evidence to the full list and keep its other meta keys. Hosts that render MCP apps can show the editor for an edit_stately_model result. For background documentation in such a host, tell the user before editing, or save the citations with save_stately_models.
  5. Report documented capabilities the model lacks, journey steps with no test or doc, and inventory features with no docs. These gaps are findings.

Check the running app

Run the app as a new user would meet it, on an install that cannot reach the user's own accounts or data.

  1. Prefer a container, virtual machine or cloud sandbox with no access to the user's files or credentials. Running the app directly on the user's machine executes third-party code with the user's file system and network access; do it only when the user agrees.
  2. On the user's machine, start the app with an empty environment and a temporary home directory, for example env -i HOME="$TMP/home" PATH="<node>/bin:/usr/bin:/bin" .... Point the app's own data directory at a temporary folder, and turn off any option that adds the current folder as a project. A temporary home alone is not enough when the app reads the login shell's environment; env -i prevents that. It does not stop the app from reading other files the user can read.
  3. Use a small demo repository with a repository-local Git identity. Leave an uncommitted change in it when the journey covers committing.
  4. Before recording anything, open the app's account, provider and project screens. If any real account, email, repository, issue or home-folder listing appears, stop, delete those screenshots and fix the isolation.
  5. Never sign in, enter credentials, install software, follow links that leave the local host, or run commands beyond what the step needs.
  6. Read the journey with read_stately_model. For each state and transition you can reach, do the real action in a browser, check the screen, and save a screenshot. Record observed when the app behaves as modeled, mismatch with what the app did when it differs, and skipped with the reason when the step needs a sign-in, a provider or a remote. Upload each screenshot of an observed step with upload_stately_capture_asset (PNG, JPEG or WebP up to 512 KiB) and pass the returned assetRef on that result. Screenshots of mismatches stay in your report; capture results accept images only for observed outcomes.
  7. Save the results with save_stately_capture_run against the journey's current revision and capture.behaviorRevision. Its sourceRevision must equal the model's source revision. A new run replaces the previous one, so a second pass must include every result you want to keep. Carry an earlier result forward only when the app build, the source revision and that state or transition are unchanged since it was recorded. Otherwise check it again or record it as skipped.
  8. Before publishing screenshots, cover machine names, user names, host names and paths that identify a person. Check the result with OCR or by viewing each image.

Report

Return the journey link, the counts per kind (states and transitions with code, tests, docs and app results), every mismatch in one line, the steps no source covers, and documented capabilities the model lacks. State which steps the crawl could not reach and why.

.mcp.json

LICENSE

README.md

SKILL.md

tile.json