Auto-diagnose test gaps from file changes and track test outcomes

Quickstart

Generate a maintenance plan for the whole project. TestMaintenanceWorkflow.run is an async coroutine, so drive it with asyncio.run (or await it inside an existing event loop):

import asyncio

from attune.workflows import TestMaintenanceWorkflow


async def main() -> None:
    workflow = TestMaintenanceWorkflow(project_root=".")
    result = await workflow.run({"mode": "analyze"})
    print(result["status"])               # "plan_generated"
    print(result["message"])              # "Generated plan with N items"
    for item in result["plan"]["items"]:
        print(item["priority"], item["action"], item["file_path"])


asyncio.run(main())

run returns a plain dict (the plan is result["plan"], already serialized via TestMaintenancePlan.to_dict). The "analyze" mode only plans — it never writes tests. Use "auto" to execute the items flagged auto_executable, or "report" for a health summary.