Repository navigation
RFC: Enterprise-Grade Roadmap & Architectural Specifications for AutoMaintainer 2.0 #146
Replies: 5 comments 5 replies
Community Feedback on RFC: AutoMaintainer 2.0 Architectural SpecificationsThank you for putting together this comprehensive RFC. The transition toward a formal graph topology with deterministic loop and harness engineering is the exact evolution needed for AutoMaintainer 2.0. Here is our perspective and feedback on the core architectural questions and execution priorities: 1. Client Interface Priority: AutoMaintainer CLI First (
|
|
Here is my feedback : Which interface is most important? (CLI, SDK, or WebIDE) What rules work best to keep the AI safe and prevent loops? What new features should be added? |
|
@purvanshjoshi we can also get hands on Harness Deepseek opensource model |
|
Hi — I’m @manyagkarle13 (contributor). For example, when a maintainer approves, rejects, or modifies an AI-generated plan, the system could optionally store that decision along with the relevant context and reason. Future agent runs could retrieve these decisions when working on similar changes, helping the agent follow established project-specific preferences and avoid repeating previously rejected approaches. This could also work alongside the existing reflection and rollback mechanisms, giving the agent not only knowledge of the codebase, but also a history of human-approved engineering decisions. I’d be interested to know if this could fit into the proposed Knowledge Graph/Vector Memory layer, or if maintaining this type of feedback history would introduce too much complexity. |
Feedback: hosting model + what web → CLI → SDK sequencing costs usReviewed the current tree against this RFC. Two things worth folding in. 1. HF Spaces won't carry a public launch — and the terminal is whyThe single container in
The Web IDE terminal means we aren't hosting a web app, we're hosting untrusted RCE — which decides the container runtime. §1 already specifies gVisor micro-containers for Proposal: control plane (stateless FastAPI: auth, quotas, run records — no git, no bash, no Credentials: replace the PAT at Our Supabase Realtime log bus is the piece that already scales correctly — keep it. 2. CLI is a second runtime, not a thin clientRe @krrish2803's CLI+WebIDE priority — worth being explicit that these don't share an execution path. A CLI user has the repo checked out locally and expects agents to run against their working tree, including uncommitted changes. They won't accept "we clone from GitHub into our cloud VM."
If Related: Cheap now, expensive after launch
Verdict: the sandbox/control-plane split is a sound long-run bet and serves all three surfaces. Items 1–4 are days now and quarters later. The Runner abstraction is the one that decides whether the CLI is a client or a second codebase. One caveat on the local runner: agents would execute on user machines with user credentials against a real working tree — different security and support story than the sandbox. Suggest |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
RFC: Enterprise-Grade Architecture & Feature Roadmap for AutoMaintainer 2.0
As AutoMaintainer transitions from a multi-agent proof-of-concept into a production-ready, industry-standard Autonomous AI Software Engineering Platform (competing with Devin, OpenHands, and GitHub Copilot Workspace), we are establishing this Request for Comments (RFC).
This proposal outlines the architectural specifications, data flows, security sandboxing, graph/loop engineering principles, harness engineering for CLI/SDK/IDE, and technical blueprints for the next phase of development.
1. Dynamic Sandboxed Test Execution and Self-Healing Loop (
test_node)Problem Statement
Currently, the Implementer Node modifies files and relies purely on LLM static review to verify correctness. Without runtime execution, agent changes risk syntax errors, broken imports, and regression bugs escaping into pull requests.
Architectural Blueprint
Integrate an automated execution node (
test_runner_node) between the Implementer and Reviewer in the LangGraph agent state graph.flowchart TD A["Architect Node"] --> B["Implementer Node"] B --> C["Sandboxed Test Runner Node"] C -->|"Tests Pass"| D["Reviewer Node"] C -->|"Tests Fail (iterations < 3)"| E["Traceback and Failure Extractor"] E -->|"Error Context and Diff"| B C -->|"Tests Fail (iterations >= 3)"| D D -->|"Approved"| F["Maintainer / PR Node"] D -->|"Iterate"| BTechnical Specifications:
pytest,python -m unittest,tox,poetry run pytestnpm test,yarn test,pnpm test,jest,vitestcargo test,go test ./...stdout,stderr, assertion diffs, and file tracebacks.2. Human-in-the-Loop (HITL) Plan Approval and Interactive Checkpoints
Problem Statement
In mission-critical enterprise codebases, engineers require supervisory control to review and refine technical designs before an AI agent touches code.
Architectural Blueprint
Leverage LangGraph's native breakpoint capability (
interrupt_before=["implementer"]) with asynchronous state persistence in Supabase.sequenceDiagram autonumber actor User as Engineer / Tech Lead participant UI as Next.js Dashboard participant API as FastAPI Backend participant Graph as LangGraph Engine User->>UI: Trigger Issue / Task UI->>API: POST /start (repo, issue_id) API->>Graph: Execute architect_node Graph-->>API: Yield Plan and Interrupt API->>UI: Broadcast Plan via Supabase (WAITING_APPROVAL) UI->>User: Render Interactive Plan Approval Modal User->>UI: Modify Constraints / Whitelist Files / Approve UI->>API: POST /runs/{run_id}/resume (approved_plan) API->>Graph: Resume Graph Execution (implementer_node)Technical Specifications:
AgentStateto Supabasecheckpointstable so runs can resume seamlessly across browser restarts.3. Native GitHub App and ChatOps Engine (
@automaintainer)Problem Statement
Requiring developers to navigate to a separate dashboard creates friction. Integrating directly into the GitHub issue/PR workflow delivers zero-friction developer adoption.
Architectural Blueprint
A lightweight GitHub App webhook listener (
/api/webhooks/github) with cryptographic payload verification.Technical Specifications:
issues.labeled: Automatically starts an agent run when an issue is labeledautomaintainorneeds-ai.issue_comment.created: Listens for maintainer commands on PRs or issues.@automaintainer /fix-ci— Reads GitHub Actions failure logs, replicates the issue, and pushes a fixing commit to the PR branch.@automaintainer /add-tests [file]— Generates unit and integration tests with high code coverage.@automaintainer /explain— Summarizes architectural intent and potential blast radius for reviewers.@automaintainer /refactor— Applies clean code, performance optimizations, and typing improvements.4. Persistent Codebase Knowledge Graph and Vector Memory
Problem Statement
Re-parsing repository files from scratch on every run causes high token overhead and forgets historical architectural context, coding styles, and previous PR solutions.
Architectural Blueprint
A hybrid retrieval architecture combining AST Tree-Sitter Knowledge Graphs with Dense Semantic Vector Search stored in Supabase
pgvector.flowchart LR subgraph Ingestion["Ingestion Pipeline"] A["Git Repository"] --> B["Tree-Sitter AST Parser"] A --> C["Docstrings and ADRs"] A --> D["Historical Merged PRs"] B --> E["Symbol and Dependency Graph"] C --> F["Embedding Model (text-embedding-3)"] D --> F E --> G[("Supabase pgvector + Graph")] F --> G end subgraph Query["Query Pipeline"] H["Target Issue / Prompt"] --> I["Hybrid Search Engine"] G --> I I --> J["Enriched Context for Agents"] endTechnical Specifications:
CONTRIBUTING.md, linting configurations, and merged PR conventions so generated code matches the exact idiom of the host project.5. Multi-Model Intelligent Routing and Automatic Failover Engine
Problem Statement
Hardcoding a single model provider (e.g., Groq Llama 3) creates vulnerability to rate limits (HTTP 429), context length limits, and API outages.
Architectural Blueprint
An intelligent, cost-aware LLM Gateway that routes agent tasks based on reasoning complexity.
6. Visual PR Impact Engine with Mermaid.js Diagrams
Problem Statement
Reviewing multi-file AI pull requests can be mentally exhausting for maintainers without visual architectural diffs.
Architectural Blueprint
The Maintainer Node automatically constructs standardized PR descriptions containing:
run_idparameter to/stop7. Graph Engineering: Formalizing Stateful Multi-Agent Topologies
Core Principles of Graph Engineering
Graph Engineering is the disciplined design of stateful, deterministic, and modular computational graphs for autonomous AI systems. Moving beyond unstructured agent loops, Graph Engineering treats agent interactions as explicit finite state machines (FSMs) with strictly defined state transitions, schemas, and reducers.
flowchart TD subgraph GlobalGraph["Global AutoMaintainer Graph"] StartNode(["START"]) --> ArchNode["Architect Node"] ArchNode --> RouterBranch{"Plan Approved?"} RouterBranch -->|"Yes"| SubgraphExec["Nested Implementation Subgraph"] RouterBranch -->|"No / Interrupted"| CheckpointWait["State Checkpoint (HITL Wait)"] CheckpointWait -->|"Resume"| SubgraphExec subgraph SubgraphExec["Nested Implementation Subgraph"] direction TB CodeSynth["Code Synthesizer"] --> SandboxTest["Sandboxed Test Runner"] SandboxTest --> QualityGate{"Tests Pass?"} QualityGate -->|"No (iter < k)"| ReflectionNode["Failure Reflection Engine"] ReflectionNode --> CodeSynth QualityGate -->|"Yes / Exhausted"| SubgraphOut(["Yield to Reviewer"]) end SubgraphExec --> ReviewNode["Reviewer Node"] ReviewNode --> FinalGate{"Approval Status"} FinalGate -->|"LGTM"| PRNode["Maintainer / PR Node"] FinalGate -->|"Needs Work"| ArchNode PRNode --> EndNode(["END"]) endKey Graph Engineering Constructs in AutoMaintainer 2.0:
TypedDictand Pydantic v2 models.8. Loop Engineering: Convergence, Bounded Iterations, and Feedback Dynamics
Core Principles of Loop Engineering
Loop Engineering governs the iterative dynamics of autonomous agents. Without rigorous loop engineering, self-correcting agents suffer from context poisoning, infinite cyclic regressions, and divergent code degeneration.
flowchart LR subgraph LoopDynamics["Tri-Phase Convergence Loop"] direction TB S1["1. Synthesis Phase: Generates Unified Diff"] --> S2["2. Execution Phase: Sandboxed Verification"] S2 --> S3["3. Reflection Phase: Root-Cause Analysis"] S3 --> S4{"Convergence Check"} S4 -->|"Pass"| ExitSuccess["Exit Loop (Converged)"] S4 -->|"Fail (Monotonic Progress)"| S1 S4 -->|"Fail (Degraded / Max Iter)"| RollbackState["Rollback to Best Known Checkpoint"] endKey Loop Engineering Mechanisms in AutoMaintainer 2.0:
9. Harness Engineering: Core Abstraction for CLI, SDK, and WebIDE
Core Principles of Harness Engineering
Harness Engineering is the systematic construction of execution adapters, runtime boundaries, and interface protocols that decouple the core agent reasoning engine from the host environment. By creating a unified Core Agent Protocol (CAP), the exact same agent brain powers the AutoMaintainer CLI, the Enterprise SDK, the WebIDE, and the SWE-bench Evaluation Testbed.
flowchart TD subgraph ClientSurfaces["Multi-Surface Distribution Layer"] CLI["AutoMaintainer CLI (TUI / Headless)"] SDK_Py["Enterprise Python SDK"] SDK_TS["TypeScript / Node.js SDK"] WebIDE["Next.js WebIDE (Monaco + PTY)"] Bench["SWE-bench Evaluation Harness"] end subgraph CAP_Layer["Unified Core Agent Protocol (CAP / gRPC / JSON-RPC)"] Adapter["Streaming Event Bridge & Lifecycle Multiplexer"] end subgraph AgentCore["AutoMaintainer Core Agent Engine"] GraphEngine["LangGraph Execution Topology"] SandboxBridge["Sandboxed Execution Bridge"] MemoryStore["pgvector Semantic Memory"] end ClientSurfaces --> Adapter Adapter --> AgentCoreKey Harness Specifications in AutoMaintainer 2.0:
A. The AutoMaintainer CLI Harness (
automaintainer-cli)Rich/Textualproviding live split-view agent tree visualization, terminal logs, and interactive plan approval inside developer shells.automaintainer run --repo . --issue 142 --non-interactive --output-format sarif0for success/PR created,1for execution failure,2for quality gate/test failure,3for budget exhaustion) enabling deterministic CI gating.B. The AutoMaintainer Enterprise SDK Harness (
@automaintainer/sdk&automaintainer-sdk)asyncio) and TypeScript client libraries exposing declarative run management, event streams, and token budgeting:C. The WebIDE Engine Harness
D. The Evaluation & Benchmark Test Harness (SWE-bench)
10. Phased Roadmap and Implementation Plan
flowchart LR subgraph P1["Phase 1: Quality and Self-Healing"] direction TB A1["Sandboxed Test Runner Node"] --> A2["Traceback and Self-Healing Loop"] end subgraph P2["Phase 2: Graph, Loop and Harness Foundations"] direction TB B1["Nested Subgraphs and Reducers"] --> B2["Core Agent Protocol and Checkpoints"] end subgraph P3["Phase 3: Multi-Surface Ecosystem"] direction TB C1["CLI and Enterprise SDK Release"] --> C2["WebIDE LSP and GitHub App"] end subgraph P4["Phase 4: Intelligence and Benchmarks"] direction TB D1["Persistent pgvector Memory"] --> D2["SWE-bench Evaluation Harness"] end P1 --> P2 P2 --> P3 P3 --> P4Community Feedback and Discussion
We invite maintainers, contributors, and the open-source community to weigh in:
Please share your thoughts, suggestions, and feedback below.
All reactions