Analysis

An analysis works out what an application does and writes it down, with the source lines behind every claim. It maps the application, explores it from its entry points, writes the document you asked for, and checks each claim against the code before it finishes.

Use it to get a first specification of a system nobody documented, to document one feature before you change it, or to answer a question that needs more than one conversation: which jobs touch the customer table, where a late fee is calculated.

A completed analysis: the four stages, the goal, the counters, the live graph and the timeline

Before you start

  • The application has at least one indexed repository. An analysis reads the current revision of each.
  • A model is configured under Manage > AI > LLM Providers. The analysis sends the code it reads to that model.
  • You are an administrator. Anyone who may read the application can watch the analysis and read what it writes.

Start an analysis

Choose Analyze on the application page. The first time, Start analysis opens the goal dialog; once an analysis exists, New analysis does.

The goal dialog: the whole application, a specification, one feature or something else, and the model sessions
Goal What you get
The whole application The inventory, the workflows, the units explained, and a specification.
A specification of the application The same, with the specification written for that purpose.
The documentation of one feature Describe the feature (for example, "how a late payment fee is charged"). The analysis first works out which entry points and units the feature needs, then explores only those and writes the feature's documentation.
Something else Say in a sentence what the analysis should produce, and for whom.

Model sessions is how many model sessions the analysis may use (40 by default). Each session works one bounded task, such as tracing one entry point or explaining one batch of units. A larger application, or a broader goal, needs more. When the budget runs out, the analysis records what it could not get to and finishes the stages that need no model.

The four stages

flowchart LR M[Map] --> E[Explore] --> W[Write] --> C[Check]
Stage What Atlas does without a model What the model sessions do
Map Counts files and lines per language, lists build and deployment files and data objects, and ranks entry-point candidates: HTTP handlers, scheduled jobs, message listeners, UI handlers, main methods, triggers and the programs JCL steps run. Writes inventory.md. Confirm the entry points and describe the system. With a narrower goal, record what the goal needs.
Explore Picks entry points by how much code they reach, then orders the units they reach so a unit's callees come before it, in batches of up to 12 units or 700 lines. Records the units no entry point reaches. Trace each entry point inward (validation, orchestration, rules, data, external calls, output) into workflows/*.md. Explain each batch of units: what it does, its rules, its data access, its calls to other systems. Link facts that support or contradict a workflow.
Write Write the goal's document as spec/index.md, with one section per workflow.
Check Re-resolves every citation against the source and demotes the claims whose lines no longer exist. Writes README.md: the numbers, the open questions and the list of documents. Check claims against the source, and propose characterization scenarios: inputs and the outputs the code should produce, for tests before a change.

Evidence

Everything an analysis concludes is a finding: an entry point, a workflow, a unit, a rule, a data access, an integration, a disagreement between two findings, a missing link, an open question, a scenario. A finding names the symbols it is about and cites the lines it rests on, and findings link to each other: one supports or contradicts another.

A finding's confidence comes from its citations, not from the model's wording:

Confidence Means
Supported Every line range it cites exists in the revisions analyzed.
Hypothesis At least one citation does not resolve. Treat it as a lead.
Verified A check read the cited source and confirmed the claim.
Rejected A check found the source says otherwise.

Read Hypotheses before you rely on a document: they are where the model went beyond what it could show.

Watching a run

The analysis page updates as the run goes.

  • The stage strip shows where the run is.
  • The counters show entry points, units explained out of the units in scope, units read, findings, verified findings, hypotheses, documents and sessions used.
  • The graph draws what the analyst touches as it touches it: a unit it read is a card, one it only saw is a dot, findings and documents connect what they are about. Older nodes fade as newer work arrives, and all of them come back when the run ends. Follow the analyst keeps the view on the latest work; Whole graph fits everything.
  • Timeline lists the run's events: stages, tasks, findings, links, checks and documents. Select one to open what it is about.
  • Documents and Findings list what the run wrote and recorded so far. A document opens as it is now, and Open in the library opens it in the Library.

Stop cancels the run; everything it recorded so far stays. Resume continues a stopped run, skipping the tasks it finished. A run the server stopped (a restart, an update) is paused rather than restarted: resuming it is your decision.

The documents

Document Written in Contains
inventory.md Map Languages, build and deployment files, data objects, entry-point candidates and why each was picked.
workflows/<entry point>.md Explore What happens from one entry point inward, step by step, with citations.
spec/index.md Write The document the goal asked for.
README.md Check The analysis in numbers, the open questions and the list of documents.

The documents are collaborative: people can edit them while the analysis writes, and later stages read them as they are, edits included. See The Library.

What an analysis does not do

  • It does not run the code. Everything comes from the index and the source text.
  • It does not see dynamic calls, reflection, configuration-driven dispatch or languages no indexer covers, except where a model session reads the text and says so in a finding.
  • It does not decide what is correct. A verified finding matches the source; whether the source does what the business needs is for a person to judge.
  • The quality of the prose depends on the model you configure.

Referenced by