Final Project
Control Panel
Build a local Control Panel for defining agent pipelines, running them against a repository, and reviewing the results. I should be able to see what is running, what passed, and what needs my attention.
Use these four pages as implementation prompts in order. Save the requirements and decisions in the project so a fresh session can continue the work.
Use A Simple Stack
Build the frontend with plain HTML, CSS, and browser JavaScript, following this website's structure. Use Python with FastAPI, Uvicorn, and SQLite for the backend. Serve pages and JSON endpoints from the same local application, bound to 127.0.0.1.
Separate The Responsibilities
Keep the interface, storage, runner, and agent adapters separate. The browser requests actions; Python validates them and owns state changes. Start with one worker running one pipeline at a time, while the web server remains responsive.
Create Three Screens
Provide an overview, a pipeline editor, and a run detail page with shared navigation. Use the Preview image for the overview's arrangement. Make every screen usable on a narrow display and with a keyboard.
Show The Queue
Show counts for queued, active, waiting, and ready-for-approval runs. List each run's pipeline, repository, stage, status, and last update. Put decisions needing attention first. Derive counts and recent activity from stored events.
Create A Run
Add a New Run form for selecting a pipeline, local Git repository, starting revision, and agent profile. Creating a run queues it; Start is a separate action. An empty installation should explain which setup is needed first.
Open The Details
Show requirements, stage progress, attempts, agent output, checks, and changed files. Explain why a run stopped and which action can resume it. Poll while work is active, retain the last result during connection failures, and render logs as text.
Freeze The Definition
Give pipelines and runs stable identifiers and UTC timestamps. Version each pipeline definition. When creating a run, copy its requirements, gates, limits, and resolved agent settings. Editing the pipeline later must leave that copy unchanged.
Store Progress Outside The Agent
Persist runs, attempts, evidence, approvals, and releases in SQLite. Keep logs and patches in a data directory outside agent workspaces. Link evidence to its attempt and tested artifact. Use transactions for related writes and enforce foreign keys.
Name The Run States
- pending: created and awaiting execution.
- running: implementing, checking, or documenting.
- repairing: making a permitted repair.
- waiting_review: stopped for a decision or recovery.
- completed: verified, approved, and released.
- failed: ended without release.
Record the current stage, operation, and waiting reason. Completed and failed are terminal states. Only release can set completed.
Control Transitions On The Server
Reject actions that do not match the current state or decision. Concurrent requests must not start duplicate work or apply approval twice. An agent's completion statement cannot advance a run without the required evidence.
Connect The Screens
Provide read endpoints that list the pipelines, list the runs, and return a single run by its identifier. Return an empty list for an empty collection, report an unknown identifier as not found, and return readable JSON for every error. The following pages add saving, execution, and release.
Document The Setup
Record the Python environment, pinned dependencies, startup commands, and data directory configuration. Add short repository instructions and a specifications/README.md linking to storage, editor, and execution notes. Keep credentials out of example configuration.
Verify Persistence
Follow the setup from a clean checkout. Confirm useful empty states and visible connection errors. Save a pipeline and pending run through storage, restart the application, and reopen both with the same identifiers and frozen definition.
Continue with Pipeline Editor, then Run Engine and Verify It Works.
September, 2026