The Optimize view is a health report for one project. It scans the project, scores it across several quality dimensions, measures how much of the code is covered by tests, and — if you ask — lets an AI read the results and recommend what to improve first.

Optimize View: Project Health & AI Deep Analysis

What you see

Open a project and click the Optimize sub-tab (next to Develop, Testing, Archive, Setting). If the tab contains more than one project, a row of project buttons at the top lets you pick which one to look at. Before the first scan the view only says No scan data available for this project and offers Scan Now.

Overall Score

A single progress bar with the weighted average of all scanned dimensions, the time of the last scan, and two buttons: Scan Now and AI Deep Analysis.

Sections

One row per scanned dimension (contracts, testing, code metrics, project structure…), each with its own score bar and key numbers. Click a row to expand its details.

Testing section

Coverage by Directory, Worst Covered Files (the bottom 20), High Risk Files (red HIGH RISK badge) and Zero Coverage. Download HTML Report saves the breakdown as a stand-alone HTML file.

AI Deep Analysis

Appears below the sections once you run it: the AI's prioritized list of recommendations, with the time it was produced.

Code Coverage

At the bottom: Run Coverage, Run Tests, the latest result with an HTML Report link, and a history table (date, percentages, status, trend) with Clear History.

How to use it

  1. Open the project's Optimize sub-tab and click Scan Now. The scan is a static analysis — it does not change anything in your project. Results are kept until the next scan; AITM also rescans automatically after each merged task.
  2. Read the Overall Score, then expand the sections with the lowest scores to see what pulls the number down.
  3. Click Run Coverage to run the project's tests with coverage measurement. Large projects are processed in parts and the run can take a while; it continues in the background. Run Tests runs the tests without coverage.
  4. Expand the testing section and start with High Risk Files and Zero Coverage — the places where a change is most likely to break something unnoticed.
  5. Click AI Deep Analysis to have the AI turn the numbers into a prioritized list of improvements. This needs a configured AI provider and costs AI usage like any other request.
  6. Use Download HTML Report / HTML Report when you want to share the coverage results outside AITM.

AI Deep Analysis

The AI receives the full scan output (scores, high-risk files, metric breakdowns) and returns a prioritized list of improvements. The result is displayed below the action buttons and stays there until the next Deep Analysis run. The analysis only reports — Optimize itself never edits your code or your settings.

When coverage does not run

If a coverage run is skipped or failed, the reason is shown in orange — most often the project has no coverage tool installed or no test command AITM can use. In that case a Configure with AI button appears: it opens a dialog where the AI inspects the project and proposes the coverage setup for you. If a run gives up after several attempts, the failure box shows how far it got and offers Discuss in chat and Resume after fix.

Summary Model & Provider

Before a Deep Analysis run, you can pick which AI model and provider generates the optimization summary, instead of always using the default. This gives you direct control over the cost/quality tradeoff — pick a faster, cheaper model for a quick pass, or a stronger model when you want the most thorough findings — and lets you route the summary through whichever provider you already prefer or have credentials configured for.

From finding to fix

Turn a recommendation into work by creating a task for it (see Creating a Task). The 12-step pipeline (branch → architect → code → compliance-check → review → fix → test → e2e → verify → snapshot → docs → chain-audit, see The Pipeline) then implements it, tests it, and merges it into dev. Because AITM rescans after each merged task, you see the score react to the fix.

Tips

  • The score is a guide, not a grade — a low section score tells you where to look, not that something is broken.
  • A scan is quick and free; AI Deep Analysis and Run Coverage consume AI credit and machine time respectively, so run them when you intend to act on the result.
  • Coverage numbers reflect the last coverage run, not the last scan — check the date in the history table.
  • Clear History removes stored coverage runs for the project; it cannot be undone.