From 26c806e75d8599cf0df84debd20ab9a2d2afa3ec Mon Sep 17 00:00:00 2001 From: Alex Barclay Date: Sat, 25 Jul 2026 08:20:05 -0600 Subject: [PATCH 1/4] docs: publication README (engine architecture + evidence) + MIT LICENSE --- LICENSE | 21 ++++ README.md | 304 ++++++++++++++++-------------------------------------- 2 files changed, 109 insertions(+), 216 deletions(-) create mode 100644 LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..dc36cf4 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 Alex Barclay + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md index fd8181b..47b6eaf 100644 --- a/README.md +++ b/README.md @@ -1,265 +1,137 @@ -# DevTeam.AI – Autonomous Development Team +# AppForge -> A fully autonomous, parallel-first, iterative multi-agent system that replicates a 12-14 person modern software development team. +**A parallel, MCP-coordinated multi-agent engine that takes a product idea from clarification → design → code → test → deploy → iterate, run by independent worker processes with human approval gates and automatic budget control.** -## Vision +AppForge models a ~14-person software team as **16 specialized agents** that a scheduler dispatches across a **six-phase dependency graph**. The orchestration is not a single async loop — it is a genuine **MCP state server** plus a pool of **independent OS worker processes** that claim and execute work concurrently, coordinating shared state without collision. -DevTeam.AI transforms a natural-language product idea into a fully deployed application through an orchestrated team of 16 specialized AI agents. The system handles the complete software development lifecycle: **idea → clarification → design → code → test → deploy → iterate → ship**—with minimal human input beyond explicit approval gates. The human user acts as the Product Owner, providing the initial vision and approving key milestones, while the AI agents handle everything else autonomously and in parallel. +> **Status:** the orchestration engine is complete and tested (154 tests, ~87% coverage). Agents run in a deterministic **mock mode** by default (free, fast, reproducible) with a real-Anthropic mode available; the value here is the *orchestration architecture*, which is real and proven — not a finished app generator. -## Features - -- **16 Specialized Agents**: From Clarifying PM to DevOps, each agent mirrors a real-world engineering role -- **Parallel Execution**: Agents work concurrently wherever possible, maximizing throughput -- **Human-in-the-Loop Gates**: Strategic approval points ensure quality without micromanagement -- **Budget Control**: BudgetGuard agent enforces spending limits with automatic model downgrades -- **Swappable Components**: Every agent, LLM provider, and prompt can be swapped with minimal code changes -- **Hybrid LLM Support**: Use proprietary models (Claude 3.5 Sonnet, GPT-4o) or open-source alternatives (Llama 3.1, Mistral) -- **External Prompts**: All prompts live in versioned directories for easy iteration and A/B testing - -## Current Status - -**Phase 2: Agent Framework + BudgetGuard** — verified -**Phase 3: Clarification Loop MVP** — in progress on `feat/alignment-phase3-mvp` - -See [Roadmap](#roadmap) for upcoming phases. - -## Design docs +--- -Active sub-project (Phase 3 MVP + alignment): +## Why it's built this way -- Spec: [`docs/superpowers/specs/2026-04-21-alignment-phase3-mvp-design.md`](docs/superpowers/specs/2026-04-21-alignment-phase3-mvp-design.md) -- Plan: [`docs/superpowers/plans/2026-04-21-alignment-phase3-mvp.md`](docs/superpowers/plans/2026-04-21-alignment-phase3-mvp.md) +Most "AI dev team" demos are one process running agents in a loop. AppForge is deliberately the opposite, to make three properties true and testable: -Foundational: +- **Parallel by default** — any task whose dependencies are met is claimable immediately by any free worker; nothing is serialized that doesn't have to be. +- **Coordinated, not chaotic** — a single authoritative state server resolves the dependency order; workers never collide even under real multi-process contention. +- **Safe to run unattended** — humans approve only at gates; a budget guard downgrades models automatically as spend rises. -- [Core Design Document](docs/CoreDesignDocument.md) -- [Roadmap Details](docs/Roadmap.md) -- [Approval Gate Protocol](docs/approval-gate-protocol.md) -- [Budget Enforcement Rules](docs/budget-enforcement-rules.md) -- [Testing Strategy](docs/testing-strategy.md) +## Architecture -## Quick Start +``` + appforge run "" React UI (Socket.IO) + ─────────────┐ │ + ▼ ▼ + ┌─────────────────────────────────────────┐ + │ MCP State Server (FastMCP, HTTP) │ ← single source of truth + │ • owns the phase + task DAG │ + │ • scheduler: readiness / gates / budget │ + │ • single SQLite writer (WAL) │ + └──────▲──────────────▲───────────────▲────┘ + claim/complete claim/complete claim/complete (atomic CAS) + │ │ │ + ┌────┴───┐ ┌─────┴──┐ ┌───────┴─┐ + │Worker 1│ │Worker 2│ … │Worker N │ ← independent OS processes + └────────┘ └────────┘ └─────────┘ +``` -### Prerequisites +- **MCP state server** (`backend/engine/state_server.py`) — a real [Model Context Protocol](https://modelcontextprotocol.io) server (FastMCP, streamable-HTTP) wrapping a single-writer SQLite store. It is the only writer of run state and exposes the coordination surface as MCP tools (`claim_next_task`, `complete_task`, `submit_approval`, …). +- **Six-phase dependency graph** (`config/phases.yaml`) — **Clarify → Design → Code → Test → Deploy → Iterate**, with a fine-grained task DAG inside each phase. Approval gates sit after Clarify and Design. +- **Independent worker processes** (`backend/engine/worker.py`) — separate `python -m backend.engine.worker` processes that atomically claim ready tasks, run the responsible agent, and report results. Collision-freedom comes from a guarded single-statement claim + versioned compare-and-swap; a lease/heartbeat + reaper give at-least-once execution with exactly-once effect. +- **16 agents** (`config/agents.yaml`) — the source of truth for the roster (Clarifying PM, Solution Architect, Tech Lead, UI/UX, Frontend, Backend, Database, AI/ML, DevOps, Security, QA, Technical Writer, Delivery Summarizer, Product Owner, plus the Orchestrator and BudgetGuard infrastructure roles). Each maps to a phase and a model; swapping mock ↔ real is one env flag. +- **Human approval gates** — a gated phase pauses until `submit_approval(approved)`; rejection re-opens the phase for revision. +- **Budget enforcement + auto-downgrade** (`backend/agents/budget_guard.py`, `config/budget.yaml`) — as cumulative spend crosses 85%, the scheduler swaps subsequent agents to cheaper models at claim time (quality-critical agents are skip-listed); 95% pauses for acknowledgement, 100% hard-stops. +- **Live web UI** (`backend/main.py`) — a Socket.IO bridge streams live engine runs into a React graph UI (agent nodes light up as tasks run, approval cards appear at gates, the budget meter tracks spend). -- Python 3.11 or higher -- [uv](https://github.com/astral-sh/uv) package manager -- Node.js 20+ and npm (for the frontend) +## Does it actually do these things? (evidence, not assertion) -### Installation +Each headline property has a runnable proof: -```bash -# Clone the repository -git clone https://github.com/your-username/devteam-ai-2025.git -cd devteam-ai-2025 +| Claim | Proof | +|---|---| +| MCP-based state server | `tests/engine/test_server_state.py` — two independent MCP clients share state through the server | +| Six-phase dependency graph | `tests/engine/test_worker.py` — a run drives all six phases to `complete` (Clarify→…→Iterate); `test_scheduler.py` covers the readiness/gate logic | +| Independent processes, no collision | **`tests/engine/test_concurrency_no_collision.py`** — 8 real worker subprocesses drain 12 contended tasks; the persisted DB proves each ran **exactly once**, no double-ownership | +| Human approval gates | `tests/engine/test_server_gate.py` — downstream work stays blocked until approval; reject re-opens | +| Budget enforcement + auto-downgrade | `tests/engine/test_budget_downgrade_live.py` — a real run crosses 85% and the Test-phase agents are issued downgraded models | -# Install Python dependencies (creates virtual environment automatically) -uv sync --group dev -``` +A committed **documented run** lives at [`docs/runs/2026-07-24/`](docs/runs/2026-07-24/) — a real pipeline across multiple worker PIDs, all six phases complete, the gate approved, and the live model downgrade visible in [`run-summary.md`](docs/runs/2026-07-24/run-summary.md). -## Running locally (development) +## Running it -Backend (FastAPI + Socket.IO on `:8000`): +Requires Python 3.11+ and [uv](https://github.com/astral-sh/uv). ```bash uv sync -uv run -- python -m backend.main ``` -Frontend (Vite dev server on `:5173`): +**CLI (headless):** run the full pipeline across N worker processes. ```bash -cd frontend && npm install && npm run dev +uv run python -m backend.engine.run run "Build a todo app" --workers 4 ``` -Then open . - -### Environment Variables - -Create a `.env` file in the project root: +**Web UI (live):** the FastAPI + Socket.IO backend drives the React frontend. ```bash -# Required for the Phase 3 Clarifying PM agent -ANTHROPIC_API_KEY=sk-ant-... -ANTHROPIC_MODEL=claude-3-5-sonnet-latest - -# Optional alt provider -OPENAI_API_KEY=sk-... - -# Persistence (LangGraph SqliteSaver) -SQLITE_PATH=./data/checkpoints.sqlite - -# Clarifier guardrail -MAX_CLARIFYING_QUESTIONS=5 - -# Optional: LangSmith for tracing -LANGCHAIN_TRACING_V2=true -LANGCHAIN_API_KEY=ls-... - -# Budget limit (USD) -BUDGET_LIMIT=200.0 +uv run python -m backend.main # backend on :8000 +cd frontend && npm install && npm run dev # UI on :5173 ``` -## Swapping Agents +Then open and start a project. -DevTeam.AI supports hot-swapping agent implementations with less than 10 lines of configuration change. +Agents run in **mock mode** by default (`MOCK_AGENTS=true`). To use real Claude models, set `ANTHROPIC_API_KEY` and `MOCK_AGENTS=false`. -### Using the CLI +### Tests ```bash -# List all registered agents -python scripts/swap_agent.py --list - -# Show agent details -python scripts/swap_agent.py --show frontend - -# Swap an agent (dry run first) -python scripts/swap_agent.py --name frontend --module agent_stubs --class FrontendStub --dry-run - -# Apply the swap -python scripts/swap_agent.py --name frontend --module agent_stubs --class FrontendStub - -# Reset to default implementation -python scripts/swap_agent.py --reset frontend +uv run pytest tests/ -q # full suite (154 tests) +uv run ruff check backend/ tests/ && uv run black --check backend/ tests/ ``` -### Programmatic Swapping +## How a run flows -```python -from backend.agents.registry import get_registry +1. **Clarify** — the Clarifying PM (consulting the Product Owner) turns the idea into a PRD. **Gate:** approve the PRD. +2. **Design** — Solution Architect (ADR), Tech Lead (task breakdown), and UI/UX Designer run in parallel. **Gate:** approve the plan. +3. **Code** — Database → Backend → Frontend (dependency-ordered), AI/ML in parallel. +4. **Test** — QA and Security in parallel. +5. **Deploy** — DevOps and Technical Writer. +6. **Iterate** — Delivery Summarizer closes the loop. -registry = get_registry() +Workers pull whatever is ready; the scheduler only ever blocks on real data dependencies or an open approval gate. -# Swap frontend agent to use a stub implementation -registry.swap_agent( - agent_id="frontend", - module="agent_stubs", - class_name="FrontendStub" -) -``` +## Tech stack -### Hot Reload +- **Orchestration:** custom MCP-coordinated engine (`backend/engine/`) — FastMCP (`mcp` SDK) over streamable-HTTP, `aiosqlite` (WAL), a pure scheduler, and multiprocess workers. +- **Agents:** `InstrumentedAgent` base + a registry with hot-swap; Anthropic SDK for real models, deterministic mocks otherwise. +- **API / UI:** FastAPI + Socket.IO backend, React 18 + TypeScript + Vite + Zustand + React Flow frontend. +- **Tooling:** uv, ruff, black, pytest (+ coverage gate). -Enable automatic hot-reload to pick up configuration changes without restarting: +## Repository layout -```python -registry = AgentRegistry( - config_path="config/agents.yaml", - auto_reload=True, - reload_interval=5.0 # Check every 5 seconds -) ``` - -## Development - -### Code Quality - -```bash -# Run linter -uv run -- ruff check . - -# Run formatter -uv run -- black . - -# Run all tests -uv run -- python -m pytest tests/ - -# Run Phase 2 tests specifically -uv run -- python -m pytest tests/ -k "agent or budget" - -# Frontend tests -cd frontend && npm test +backend/engine/ # the orchestration engine + state_server.py # MCP state server (single writer) + worker.py # independent worker process + scheduler.py # pure readiness / gate / budget logic + store.py # SQLite store: atomic claim, CAS, single-tx complete + run.py # CLI / run controller + webbridge.py # engine snapshot -> Socket.IO events +config/ # agents.yaml (16), phases.yaml (6), budget.yaml +backend/main.py # FastAPI + Socket.IO web bridge +frontend/ # React graph UI +docs/ # design spec, plans, and the documented run +tests/ # unit + engine + integration suite ``` -### Project Structure +The design spec and the phased implementation plans (each built test-first and independently reviewed) are under [`docs/superpowers/`](docs/superpowers/). -``` -devteam-ai/ -├── backend/ # FastAPI + Socket.IO server -│ ├── agents/ # Agent implementations -│ │ ├── base_agent.py # InstrumentedAgent base class -│ │ ├── budget_guard.py # BudgetGuard cost enforcement -│ │ ├── clarifying_pm.py # Phase 3 PM agent (real Anthropic calls) -│ │ ├── mock_agent.py # Mock agents for testing -│ │ └── registry.py # Agent registry with hot-reload -│ ├── orchestrator.py # LangGraph workflow + SqliteSaver checkpoints -│ ├── prompt_loader.py # Jinja2 prompt loader -│ ├── config.py # Settings (env vars) -│ └── main.py # ASGI app entry point -├── frontend/ # React 18 + Vite + Zustand -│ ├── src/ -│ └── package.json -├── config/ -│ ├── agents.yaml # Agent configurations (all 16 agents) -│ ├── budget.yaml # Budget thresholds and limits -│ └── llm.yaml # LLM provider settings -├── prompts/ -│ └── v1/ # Versioned prompt templates (16 agents) -├── scripts/ -│ └── swap_agent.py # CLI for swapping agent implementations -├── phases/ # Phase briefs and specs -├── tests/ # pytest suite -└── pyproject.toml # Project configuration (UV) -``` +## Honest status & known gaps -## Roadmap - -| Phase | Milestone | Status | -|-------|-----------|--------| -| 0 | Repository Bootstrap | ✅ Complete | -| 1 | Minimal Viable Graph | ✅ Complete | -| 2 | Agent Framework + BudgetGuard | ✅ Complete | -| 3 | Clarification Loop MVP | 🚧 In progress | -| 4 | Parallel Planning Sprint | Planned | -| 5 | Memory & Persistence | Planned | -| 6 | Specialist Agents (Todo MVC) | Planned | -| 7 | Cross-Cutting Agents | Planned | -| 8 | Preview Deployment | Planned | -| 9 | Human Iteration Loop | Planned | -| 10 | Metrics Dashboard | Planned | -| 11 | Open-Source Eco Mode | Planned | -| 12 | Production Ship | Planned | -| 13 | Self-Improvement Loop | Planned | -| 14 | Public Template Release | Planned | - -## The 16 Agents - -| Agent | Role | Phase | -|-------|------|-------| -| Orchestrator | Supervisor routing | 1 | -| BudgetGuard | Cost watchdog | 2 | -| Clarifying PM | Requirements gathering | 3 | -| Product Owner | User intent mirror | 3 | -| Solution Architect | Technical design | 4 | -| Tech Lead | Task breakdown | 4 | -| UI/UX Designer | Design systems | 5 | -| Frontend | React/TypeScript | 6 | -| Backend | API/Server | 6 | -| Database | Data layer | 6 | -| AI/ML | ML features | 6 | -| DevOps | Infrastructure | 7 | -| Security | AppSec | 7 | -| QA/Test | Testing | 7 | -| Technical Writer | Documentation | 7 | -| Delivery Summarizer | Status updates | 10 | - -## Technology Stack - -- **Orchestration**: LangGraph (CrewAI planned, not yet wired in) -- **LLM Interface**: Anthropic SDK directly (LangChain ChatModel kept as a fallback for future providers) -- **Frontend**: React 18 + TypeScript + Vite + Zustand -- **API Server**: FastAPI + Socket.IO -- **Persistence**: SQLite via LangGraph `SqliteSaver` -- **Vector Store**: Chroma / FAISS (planned) - -## Contributing - -This project follows a phased development approach. Please review the current phase brief before contributing. +- **Proven:** the coordination core, multi-process collision-freedom, approval gates, and live budget downgrade — all under test. +- **Mock by design:** the documented run and tests use mock agents (deterministic, free). Real-Anthropic mode works but isn't required to exercise the architecture; **real token-cost accounting** is a tracked follow-up (costs are currently simulated). +- **Single-user web bridge:** the live UI targets local single-user use; multi-tenant lifecycle hardening (per-connection dedup, reconnect durability) is future work. ## License -MIT License - see LICENSE file for details. - ---- - -**DevTeam.AI** - From idea to deployed app, autonomously. +MIT (see the `LICENSE` file). From ee758b65e11b906c0933b39321903a7fcde71f08 Mon Sep 17 00:00:00 2001 From: Alex Barclay Date: Sat, 25 Jul 2026 09:35:31 -0600 Subject: [PATCH 2/4] chore: rename DevTeam.AI to AppForge + stamp v1.0.0 The project has been AppForge since the MCP engine rewrite, but the package metadata, prompts, config comments, and UI still said DevTeam.AI. Rename the product and package everywhere in active code, and point the placeholder project URLs at the real repository. - pyproject: name devteam-ai -> appforge, version 0.1.0 -> 1.0.0, classifier Alpha -> Production/Stable, your-repo URLs -> adbarc92 - frontend: package version 0.0.0 -> 1.0.0, page title "frontend" -> "AppForge" (backend/main.py already declared 1.0.0) - prompts, config/*.yaml, agents, tests, CI, phase briefs: DevTeam.AI -> AppForge; DEVTEAM_PHASE -> APPFORGE_PHASE - uv.lock regenerated for the rename + version docs/superpowers/{plans,specs} are left untouched: they are dated design records that quote code verbatim, so rewriting them would falsify history. --- .github/workflows/ci.yml | 2 +- .gitignore | 2 +- backend/agents/__init__.py | 2 +- backend/agents/base_agent.py | 4 +- backend/agents/budget_guard.py | 2 +- backend/agents/mock_agent.py | 2 +- backend/agents/registry.py | 2 +- config/agents.yaml | 2 +- config/budget.yaml | 2 +- config/llm.yaml | 4 +- docs/CoreDesignDocument.md | 2 +- docs/Roadmap.md | 2 +- docs/testing-strategy.md | 4 +- frontend/index.html | 2 +- frontend/package.json | 2 +- frontend/src/App.tsx | 2 +- phases/00-brief.md | 10 +- phases/14-brief.md | 2 +- prompts/v1/ai_ml.jinja | 4 +- prompts/v1/backend.jinja | 4 +- prompts/v1/budget_guard.jinja | 4 +- prompts/v1/database.jinja | 4 +- prompts/v1/delivery_summarizer.jinja | 4 +- prompts/v1/devops.jinja | 4 +- prompts/v1/frontend.jinja | 4 +- prompts/v1/orchestrator.jinja | 4 +- prompts/v1/product_owner.jinja | 4 +- prompts/v1/qa_test.jinja | 4 +- prompts/v1/security.jinja | 4 +- prompts/v1/technical_writer.jinja | 4 +- pyproject.toml | 16 +-- scripts/swap_agent.py | 4 +- tests/__init__.py | 2 +- tests/unit/test_agent_registry.py | 2 +- tests/unit/test_budget_guard.py | 2 +- tests/unit/test_placeholder.py | 2 +- uv.lock | 166 +++++++++++++-------------- 37 files changed, 146 insertions(+), 146 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0c4b662..690fd1f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -# DevTeam.AI - Continuous Integration +# AppForge - Continuous Integration name: CI on: diff --git a/.gitignore b/.gitignore index 55ebaa5..6ab93bb 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ -# DevTeam.AI .gitignore +# AppForge .gitignore # Comprehensive Python + Node.js project ignores # Byte-compiled / optimized / DLL files diff --git a/backend/agents/__init__.py b/backend/agents/__init__.py index 68a4c23..6d48917 100644 --- a/backend/agents/__init__.py +++ b/backend/agents/__init__.py @@ -1,5 +1,5 @@ """ -DevTeam.AI - Agent Module +AppForge - Agent Module This module contains all agent implementations for the autonomous development team. Agents are added in phases as the system evolves. diff --git a/backend/agents/base_agent.py b/backend/agents/base_agent.py index 36dce74..09bafdb 100644 --- a/backend/agents/base_agent.py +++ b/backend/agents/base_agent.py @@ -1,5 +1,5 @@ """ -DevTeam.AI - Base Agent Class +AppForge - Base Agent Class Phase 2: Universal Agent Framework The InstrumentedAgent is the base class for all agents in the system. @@ -140,7 +140,7 @@ class InstrumentedAgent(ABC): """ Base agent with event emission for UI updates. - All agents in DevTeam.AI inherit from this class. It provides: + All agents in AppForge inherit from this class. It provides: - Structured logging bound to agent name - Status emission via callback (for Socket.IO/Streamlit) - Standardized execute() interface diff --git a/backend/agents/budget_guard.py b/backend/agents/budget_guard.py index a4db149..9905a1d 100644 --- a/backend/agents/budget_guard.py +++ b/backend/agents/budget_guard.py @@ -1,5 +1,5 @@ """ -DevTeam.AI - BudgetGuard Agent +AppForge - BudgetGuard Agent Phase 2: Cost Enforcement and Model Downgrading BudgetGuard monitors spending, enforces budget thresholds, and can diff --git a/backend/agents/mock_agent.py b/backend/agents/mock_agent.py index 0ddd522..72fbfdb 100644 --- a/backend/agents/mock_agent.py +++ b/backend/agents/mock_agent.py @@ -1,5 +1,5 @@ """ -DevTeam.AI - Mock Agent +AppForge - Mock Agent Phase 2: Configurable Mock for Testing The MockAgent provides a configurable mock implementation diff --git a/backend/agents/registry.py b/backend/agents/registry.py index 5982d5b..6be8000 100644 --- a/backend/agents/registry.py +++ b/backend/agents/registry.py @@ -1,5 +1,5 @@ """ -DevTeam.AI - Agent Registry +AppForge - Agent Registry Phase 2: Hot-swappable Agent Framework The AgentRegistry loads agent configurations from YAML, instantiates agents, diff --git a/config/agents.yaml b/config/agents.yaml index c9099c2..58a4bc2 100644 --- a/config/agents.yaml +++ b/config/agents.yaml @@ -1,4 +1,4 @@ -# DevTeam.AI Agent Configuration +# AppForge Agent Configuration # All 16 agents with placeholder LLM configuration # Version: 1.0 diff --git a/config/budget.yaml b/config/budget.yaml index d5c2092..4133c3e 100644 --- a/config/budget.yaml +++ b/config/budget.yaml @@ -1,4 +1,4 @@ -# DevTeam.AI Budget Configuration +# AppForge Budget Configuration # Based on budget-enforcement-rules.md v1.0 # Managed by BudgetGuard Agent diff --git a/config/llm.yaml b/config/llm.yaml index ed9c29e..28100af 100644 --- a/config/llm.yaml +++ b/config/llm.yaml @@ -1,4 +1,4 @@ -# DevTeam.AI - LLM Configuration +# AppForge - LLM Configuration # Phase 1: Skeleton configuration for LLM providers # Actual API calls will be enabled in Phase 3 @@ -136,7 +136,7 @@ tracing: langsmith: enabled: false api_key_env: LANGSMITH_API_KEY - project: devteam-ai + project: appforge opentelemetry: enabled: false endpoint: http://localhost:4317 diff --git a/docs/CoreDesignDocument.md b/docs/CoreDesignDocument.md index f29424a..9d7595a 100644 --- a/docs/CoreDesignDocument.md +++ b/docs/CoreDesignDocument.md @@ -1,4 +1,4 @@ -# AI Development Team Orchestrator – “DevTeam.AI” +# AI Development Team Orchestrator – “AppForge” **Core Design Document v1.1** (Updated December 2025) ### Vision diff --git a/docs/Roadmap.md b/docs/Roadmap.md index 58920de..930ef31 100644 --- a/docs/Roadmap.md +++ b/docs/Roadmap.md @@ -16,6 +16,6 @@ | 11 | Full Open-Source Eco Mode | Same Todo MVC built with zero proprietary calls (opt-in) | SQLite + local LLMs only | | 12 | Production Ship + Handover | Production URL, admin creds, final cost report | | | 13 | Self-Improvement Loop (optional DSPy optimiser) | Measurable speed/quality gain after 3 feedback cycles | | -| 14 | Public Template Release | “Use this template” button + full docs → anyone has their own DevTeam.AI in <5 min | One-click fork | +| 14 | Public Template Release | “Use this template” button + full docs → anyone has their own AppForge in <5 min | One-click fork | All phases remain 100% human-testable with zero coding required. \ No newline at end of file diff --git a/docs/testing-strategy.md b/docs/testing-strategy.md index 2446314..386f428 100644 --- a/docs/testing-strategy.md +++ b/docs/testing-strategy.md @@ -1,7 +1,7 @@ # Testing Strategy v1.0 ## Purpose -Define a consistent validation approach for every DevTeam.AI phase, spanning unit, integration, regression, and manual thought-experiment tests. Testing artifacts live alongside code so checklist verification stays under 3 minutes. +Define a consistent validation approach for every AppForge phase, spanning unit, integration, regression, and manual thought-experiment tests. Testing artifacts live alongside code so checklist verification stays under 3 minutes. ## Test Categories 1. **Unit Tests** @@ -53,7 +53,7 @@ Define a consistent validation approach for every DevTeam.AI phase, spanning uni ## Automation Hooks - GitHub Actions pipeline stages: `lint`, `test-unit`, `test-integration`, `report`. -- Phase-specific jobs toggled via matrix keyed by `DEVTEAM_PHASE`. +- Phase-specific jobs toggled via matrix keyed by `APPFORGE_PHASE`. - BudgetGuard cancels long-running suites if spend threshold already exceeded (Phase 2). ## Failure Handling diff --git a/frontend/index.html b/frontend/index.html index 0fca6f0..f5e7e84 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -4,7 +4,7 @@ - frontend + AppForge
diff --git a/frontend/package.json b/frontend/package.json index 355980f..05b5d40 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,7 +1,7 @@ { "name": "frontend", "private": true, - "version": "0.0.0", + "version": "1.0.0", "type": "module", "scripts": { "dev": "vite", diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index c4b520c..e3c1a20 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -31,7 +31,7 @@ function NewProject() { onSubmit={onSubmit} className="max-w-xl w-full space-y-4 bg-white p-8 rounded shadow" > -

DevTeam.AI

+

AppForge

Describe the thing you want to build. The Clarifying PM will ask up to 6 questions and produce a PRD. diff --git a/phases/00-brief.md b/phases/00-brief.md index 7e39df2..10a16e2 100644 --- a/phases/00-brief.md +++ b/phases/00-brief.md @@ -5,7 +5,7 @@ Everything must be 100% local-first (no Redis, no external services yet). ### REQUIRED FILES & EXACT CONTENTS -1. GitHub repository (public or private) named `devteam-ai-2025` (or your preferred name) +1. GitHub repository (public or private) named `appforge` (or your preferred name) 2. Folder structure exactly as: ├── agents/ # empty for now ├── config/ @@ -14,7 +14,7 @@ Everything must be 100% local-first (no Redis, no external services yet). │ └── v1/ │ └── clarifying_pm.jinja # strong initial clarification prompt (≥300 words) ├── phases/ # this brief will live here -├── app.py # minimal Streamlit UI with title "DevTeam.AI" and a text input box +├── app.py # minimal Streamlit UI with title "AppForge" and a text input box ├── requirements.txt # pinned versions (see list below) ├── pyproject.toml # black + ruff configuration ├── .gitignore @@ -34,7 +34,7 @@ pyyaml gitpython rich text4. `README.md` must contain: -- Project title "DevTeam.AI – Autonomous Development Team" +- Project title "AppForge – Autonomous Development Team" - One-paragraph vision - Local run instructions (pip install -e . → streamlit run app.py) - Link to Core Design Document v1.1 (paste full text or link) @@ -43,9 +43,9 @@ text4. `README.md` must contain: (Implementation Agent must copy this verbatim at the end of its patch) [ ] GitHub repository exists and is clonable (provide URL) -[ ] Running `git clone && cd devteam-ai-2025` works +[ ] Running `git clone && cd appforge` works [ ] `pip install -e .` completes with zero errors -[ ] `streamlit run app.py` launches a browser page showing "DevTeam.AI" title and an input box (no crash) +[ ] `streamlit run app.py` launches a browser page showing "AppForge" title and an input box (no crash) [ ] `ruff check .` returns no errors [ ] `black --check .` passes [ ] `.github/workflows/ci.yml` exists and GitHub Actions shows green check within 2 minutes of commit diff --git a/phases/14-brief.md b/phases/14-brief.md index 287a281..83c0e7f 100644 --- a/phases/14-brief.md +++ b/phases/14-brief.md @@ -1,7 +1,7 @@ # Phase 14 Brief - Public Template Release ## Purpose -Package DevTeam.AI into a reusable template that others can clone, deploy, and run within five minutes, including documentation, onboarding scripts, and license terms. +Package AppForge into a reusable template that others can clone, deploy, and run within five minutes, including documentation, onboarding scripts, and license terms. ## Prerequisites - Phase 13 checklist: Self-improvement loop operational. diff --git a/prompts/v1/ai_ml.jinja b/prompts/v1/ai_ml.jinja index 4f32d92..9f65730 100644 --- a/prompts/v1/ai_ml.jinja +++ b/prompts/v1/ai_ml.jinja @@ -1,8 +1,8 @@ -{# DevTeam.AI - AI/ML Agent Prompt #} +{# AppForge - AI/ML Agent Prompt #} {# Phase 6: Specialist Implementation #} {# Authority: approval_required (fine-tuning only) #} -You are the AI/ML Agent for DevTeam.AI. +You are the AI/ML Agent for AppForge. ## Role {{ role | default("ML Engineer") }} diff --git a/prompts/v1/backend.jinja b/prompts/v1/backend.jinja index b41aca1..bdc6492 100644 --- a/prompts/v1/backend.jinja +++ b/prompts/v1/backend.jinja @@ -1,8 +1,8 @@ -{# DevTeam.AI - Backend Agent Prompt #} +{# AppForge - Backend Agent Prompt #} {# Phase 6: Specialist Implementation #} {# Authority: autonomous #} -You are the Backend Agent for DevTeam.AI. +You are the Backend Agent for AppForge. ## Role {{ role | default("Senior Backend Engineer") }} diff --git a/prompts/v1/budget_guard.jinja b/prompts/v1/budget_guard.jinja index dbe29ba..77fef36 100644 --- a/prompts/v1/budget_guard.jinja +++ b/prompts/v1/budget_guard.jinja @@ -1,8 +1,8 @@ -{# DevTeam.AI - BudgetGuard Agent Prompt #} +{# AppForge - BudgetGuard Agent Prompt #} {# Phase 2: Agent Framework + BudgetGuard #} {# Authority: autonomous #} -You are the BudgetGuard Agent for DevTeam.AI. +You are the BudgetGuard Agent for AppForge. ## Role {{ role | default("Cost watchdog") }} diff --git a/prompts/v1/database.jinja b/prompts/v1/database.jinja index 8f4f3c2..1331e28 100644 --- a/prompts/v1/database.jinja +++ b/prompts/v1/database.jinja @@ -1,8 +1,8 @@ -{# DevTeam.AI - Database Agent Prompt #} +{# AppForge - Database Agent Prompt #} {# Phase 6: Specialist Implementation #} {# Authority: autonomous #} -You are the Database Agent for DevTeam.AI. +You are the Database Agent for AppForge. ## Role {{ role | default("Data Engineer + DBA") }} diff --git a/prompts/v1/delivery_summarizer.jinja b/prompts/v1/delivery_summarizer.jinja index f8d32bc..77ebcb1 100644 --- a/prompts/v1/delivery_summarizer.jinja +++ b/prompts/v1/delivery_summarizer.jinja @@ -1,8 +1,8 @@ -{# DevTeam.AI - Delivery Summarizer Agent Prompt #} +{# AppForge - Delivery Summarizer Agent Prompt #} {# Phase 10: Delivery #} {# Authority: autonomous #} -You are the Delivery Summarizer Agent for DevTeam.AI. +You are the Delivery Summarizer Agent for AppForge. ## Role {{ role | default("Scrum Master") }} diff --git a/prompts/v1/devops.jinja b/prompts/v1/devops.jinja index bb314bc..da0d1a4 100644 --- a/prompts/v1/devops.jinja +++ b/prompts/v1/devops.jinja @@ -1,8 +1,8 @@ -{# DevTeam.AI - DevOps Agent Prompt #} +{# AppForge - DevOps Agent Prompt #} {# Phase 7: Cross-Cutting Concerns #} {# Authority: autonomous #} -You are the DevOps Agent for DevTeam.AI. +You are the DevOps Agent for AppForge. ## Role {{ role | default("SRE + Platform Engineer") }} diff --git a/prompts/v1/frontend.jinja b/prompts/v1/frontend.jinja index 7fabc34..941e52b 100644 --- a/prompts/v1/frontend.jinja +++ b/prompts/v1/frontend.jinja @@ -1,8 +1,8 @@ -{# DevTeam.AI - Frontend Agent Prompt #} +{# AppForge - Frontend Agent Prompt #} {# Phase 6: Specialist Implementation #} {# Authority: approval_required (final UI polish only) #} -You are the Frontend Agent for DevTeam.AI. +You are the Frontend Agent for AppForge. ## Role {{ role | default("Senior Frontend Engineer") }} diff --git a/prompts/v1/orchestrator.jinja b/prompts/v1/orchestrator.jinja index e349dcd..9a6f4b4 100644 --- a/prompts/v1/orchestrator.jinja +++ b/prompts/v1/orchestrator.jinja @@ -1,8 +1,8 @@ -{# DevTeam.AI - Orchestrator Agent Prompt #} +{# AppForge - Orchestrator Agent Prompt #} {# Phase 1: Minimal Viable Graph #} {# Authority: autonomous #} -You are the Orchestrator Agent for DevTeam.AI. +You are the Orchestrator Agent for AppForge. ## Role {{ role | default("Dumb but reliable supervisor") }} diff --git a/prompts/v1/product_owner.jinja b/prompts/v1/product_owner.jinja index b8b51d1..e72528d 100644 --- a/prompts/v1/product_owner.jinja +++ b/prompts/v1/product_owner.jinja @@ -1,8 +1,8 @@ -{# DevTeam.AI - Product Owner Agent Prompt #} +{# AppForge - Product Owner Agent Prompt #} {# Phase 3: Requirements #} {# Authority: autonomous #} -You are the Product Owner Agent for DevTeam.AI. +You are the Product Owner Agent for AppForge. ## Role {{ role | default("Mirror of user intent") }} diff --git a/prompts/v1/qa_test.jinja b/prompts/v1/qa_test.jinja index 0ea4604..2378d2d 100644 --- a/prompts/v1/qa_test.jinja +++ b/prompts/v1/qa_test.jinja @@ -1,8 +1,8 @@ -{# DevTeam.AI - QA/Test Agent Prompt #} +{# AppForge - QA/Test Agent Prompt #} {# Phase 7: Cross-Cutting Concerns #} {# Authority: autonomous #} -You are the QA/Test Agent for DevTeam.AI. +You are the QA/Test Agent for AppForge. ## Role {{ role | default("QA Lead") }} diff --git a/prompts/v1/security.jinja b/prompts/v1/security.jinja index c727f98..e2a5226 100644 --- a/prompts/v1/security.jinja +++ b/prompts/v1/security.jinja @@ -1,8 +1,8 @@ -{# DevTeam.AI - Security Agent Prompt #} +{# AppForge - Security Agent Prompt #} {# Phase 7: Cross-Cutting Concerns #} {# Authority: approval_required (high-risk only) #} -You are the Security Agent for DevTeam.AI. +You are the Security Agent for AppForge. ## Role {{ role | default("AppSec Engineer") }} diff --git a/prompts/v1/technical_writer.jinja b/prompts/v1/technical_writer.jinja index 69f6a15..7e6bf53 100644 --- a/prompts/v1/technical_writer.jinja +++ b/prompts/v1/technical_writer.jinja @@ -1,8 +1,8 @@ -{# DevTeam.AI - Technical Writer Agent Prompt #} +{# AppForge - Technical Writer Agent Prompt #} {# Phase 7: Cross-Cutting Concerns #} {# Authority: autonomous #} -You are the Technical Writer Agent for DevTeam.AI. +You are the Technical Writer Agent for AppForge. ## Role {{ role | default("Docs Engineer") }} diff --git a/pyproject.toml b/pyproject.toml index cd8ac67..1705130 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,12 +1,12 @@ [project] -name = "devteam-ai" -version = "0.1.0" +name = "appforge" +version = "1.0.0" description = "Autonomous Development Team - A parallel-first multi-agent system" readme = "README.md" license = {text = "MIT"} requires-python = ">=3.11" authors = [ - {name = "DevTeam.AI Contributors"} + {name = "AppForge Contributors"} ] keywords = [ "ai", @@ -17,7 +17,7 @@ keywords = [ "software-development", ] classifiers = [ - "Development Status :: 3 - Alpha", + "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3", @@ -59,10 +59,10 @@ dev = [ appforge = "backend.engine.run:main" [project.urls] -Homepage = "https://github.com/your-repo/devteam-ai-2025" -Documentation = "https://github.com/your-repo/devteam-ai-2025#readme" -Repository = "https://github.com/your-repo/devteam-ai-2025" -Issues = "https://github.com/your-repo/devteam-ai-2025/issues" +Homepage = "https://github.com/adbarc92/appforge" +Documentation = "https://github.com/adbarc92/appforge#readme" +Repository = "https://github.com/adbarc92/appforge" +Issues = "https://github.com/adbarc92/appforge/issues" # Black configuration [tool.black] diff --git a/scripts/swap_agent.py b/scripts/swap_agent.py index 8a693ac..11a63f8 100644 --- a/scripts/swap_agent.py +++ b/scripts/swap_agent.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 """ -DevTeam.AI - Agent Swap CLI +AppForge - Agent Swap CLI Phase 2: Hot-swappable Agent Framework Swap any agent implementation with <10 lines of configuration change. @@ -169,7 +169,7 @@ def reset_agent(config_path: Path, agent_id: str) -> None: def main(): parser = argparse.ArgumentParser( - description="Swap agent implementations in DevTeam.AI", + description="Swap agent implementations in AppForge", formatter_class=argparse.RawDescriptionHelpFormatter, epilog=""" Examples: diff --git a/tests/__init__.py b/tests/__init__.py index a7e99b7..ce96baf 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -1,5 +1,5 @@ """ -DevTeam.AI - Test Suite +AppForge - Test Suite Tests are organized by type: - unit/: Individual component tests diff --git a/tests/unit/test_agent_registry.py b/tests/unit/test_agent_registry.py index ad57c7b..a79dcf4 100644 --- a/tests/unit/test_agent_registry.py +++ b/tests/unit/test_agent_registry.py @@ -1,5 +1,5 @@ """ -DevTeam.AI - Agent Registry Tests +AppForge - Agent Registry Tests Phase 2: Agent Framework + BudgetGuard Tests for the agent registry including: diff --git a/tests/unit/test_budget_guard.py b/tests/unit/test_budget_guard.py index e6a6ccc..908157f 100644 --- a/tests/unit/test_budget_guard.py +++ b/tests/unit/test_budget_guard.py @@ -1,5 +1,5 @@ """ -DevTeam.AI - BudgetGuard Tests +AppForge - BudgetGuard Tests Phase 2: Agent Framework + BudgetGuard Tests for BudgetGuard including: diff --git a/tests/unit/test_placeholder.py b/tests/unit/test_placeholder.py index d19c7f3..e65f951 100644 --- a/tests/unit/test_placeholder.py +++ b/tests/unit/test_placeholder.py @@ -1,5 +1,5 @@ """ -DevTeam.AI - Placeholder Test +AppForge - Placeholder Test This file ensures pytest can run even before real tests are added. It will be replaced with actual tests in Phase 1. diff --git a/uv.lock b/uv.lock index 842a24e..42f7504 100644 --- a/uv.lock +++ b/uv.lock @@ -195,6 +195,89 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/38/0e/27be9fdef66e72d64c0cdc3cc2823101b80585f8119b5c112c2e8f5f7dab/anyio-4.12.1-py3-none-any.whl", hash = "sha256:d405828884fc140aa80a3c667b8beed277f1dfedec42ba031bd6ac3db606ab6c", size = 113592, upload-time = "2026-01-06T11:45:19.497Z" }, ] +[[package]] +name = "appforge" +version = "1.0.0" +source = { virtual = "." } +dependencies = [ + { name = "aiosqlite" }, + { name = "fastapi" }, + { name = "jinja2" }, + { name = "langchain" }, + { name = "langchain-anthropic" }, + { name = "langchain-community" }, + { name = "langchain-openai" }, + { name = "mcp" }, + { name = "pydantic", version = "2.11.10", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.14'" }, + { name = "pydantic", version = "2.13.4", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.14'" }, + { name = "python-dotenv" }, + { name = "python-socketio" }, + { name = "pyyaml" }, + { name = "rich" }, + { name = "structlog" }, + { name = "uvicorn", extra = ["standard"] }, +] + +[package.optional-dependencies] +dev = [ + { name = "black" }, + { name = "httpx" }, + { name = "mypy" }, + { name = "pytest" }, + { name = "pytest-asyncio" }, + { name = "pytest-cov" }, + { name = "ruff" }, +] + +[package.dev-dependencies] +dev = [ + { name = "black" }, + { name = "httpx" }, + { name = "mypy" }, + { name = "pytest" }, + { name = "pytest-asyncio" }, + { name = "pytest-cov" }, + { name = "ruff" }, +] + +[package.metadata] +requires-dist = [ + { name = "aiosqlite", specifier = ">=0.20.0" }, + { name = "black", marker = "extra == 'dev'", specifier = ">=24.0.0" }, + { name = "fastapi", specifier = ">=0.115.0" }, + { name = "httpx", marker = "extra == 'dev'", specifier = ">=0.27.0" }, + { name = "jinja2", specifier = ">=3.1.0" }, + { name = "langchain", specifier = ">=0.3.0" }, + { name = "langchain-anthropic", specifier = ">=0.3.0" }, + { name = "langchain-community", specifier = ">=0.3.0" }, + { name = "langchain-openai", specifier = ">=0.2.0" }, + { name = "mcp", specifier = ">=1.16,<2" }, + { name = "mypy", marker = "extra == 'dev'", specifier = ">=1.11.0" }, + { name = "pydantic", specifier = ">=2.9.0" }, + { name = "pytest", marker = "extra == 'dev'", specifier = ">=8.0.0" }, + { name = "pytest-asyncio", marker = "extra == 'dev'", specifier = ">=0.24.0" }, + { name = "pytest-cov", marker = "extra == 'dev'", specifier = ">=5.0.0" }, + { name = "python-dotenv", specifier = ">=1.0.0" }, + { name = "python-socketio", specifier = ">=5.11.0" }, + { name = "pyyaml", specifier = ">=6.0.0" }, + { name = "rich", specifier = ">=13.7.0" }, + { name = "ruff", marker = "extra == 'dev'", specifier = ">=0.7.0" }, + { name = "structlog", specifier = ">=24.0.0" }, + { name = "uvicorn", extras = ["standard"], specifier = ">=0.32.0" }, +] +provides-extras = ["dev"] + +[package.metadata.requires-dev] +dev = [ + { name = "black", specifier = ">=24.0.0" }, + { name = "httpx", specifier = ">=0.27.0" }, + { name = "mypy", specifier = ">=1.11.0" }, + { name = "pytest", specifier = ">=8.0.0" }, + { name = "pytest-asyncio", specifier = ">=0.24.0" }, + { name = "pytest-cov", specifier = ">=5.0.0" }, + { name = "ruff", specifier = ">=0.7.0" }, +] + [[package]] name = "attrs" version = "25.4.0" @@ -612,89 +695,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/c3/be/d0d44e092656fe7a06b55e6103cbce807cdbdee17884a5367c68c9860853/dataclasses_json-0.6.7-py3-none-any.whl", hash = "sha256:0dbf33f26c8d5305befd61b39d2b3414e8a407bedc2834dea9b8d642666fb40a", size = 28686, upload-time = "2024-06-09T16:20:16.715Z" }, ] -[[package]] -name = "devteam-ai" -version = "0.1.0" -source = { virtual = "." } -dependencies = [ - { name = "aiosqlite" }, - { name = "fastapi" }, - { name = "jinja2" }, - { name = "langchain" }, - { name = "langchain-anthropic" }, - { name = "langchain-community" }, - { name = "langchain-openai" }, - { name = "mcp" }, - { name = "pydantic", version = "2.11.10", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.14'" }, - { name = "pydantic", version = "2.13.4", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.14'" }, - { name = "python-dotenv" }, - { name = "python-socketio" }, - { name = "pyyaml" }, - { name = "rich" }, - { name = "structlog" }, - { name = "uvicorn", extra = ["standard"] }, -] - -[package.optional-dependencies] -dev = [ - { name = "black" }, - { name = "httpx" }, - { name = "mypy" }, - { name = "pytest" }, - { name = "pytest-asyncio" }, - { name = "pytest-cov" }, - { name = "ruff" }, -] - -[package.dev-dependencies] -dev = [ - { name = "black" }, - { name = "httpx" }, - { name = "mypy" }, - { name = "pytest" }, - { name = "pytest-asyncio" }, - { name = "pytest-cov" }, - { name = "ruff" }, -] - -[package.metadata] -requires-dist = [ - { name = "aiosqlite", specifier = ">=0.20.0" }, - { name = "black", marker = "extra == 'dev'", specifier = ">=24.0.0" }, - { name = "fastapi", specifier = ">=0.115.0" }, - { name = "httpx", marker = "extra == 'dev'", specifier = ">=0.27.0" }, - { name = "jinja2", specifier = ">=3.1.0" }, - { name = "langchain", specifier = ">=0.3.0" }, - { name = "langchain-anthropic", specifier = ">=0.3.0" }, - { name = "langchain-community", specifier = ">=0.3.0" }, - { name = "langchain-openai", specifier = ">=0.2.0" }, - { name = "mcp", specifier = ">=1.16,<2" }, - { name = "mypy", marker = "extra == 'dev'", specifier = ">=1.11.0" }, - { name = "pydantic", specifier = ">=2.9.0" }, - { name = "pytest", marker = "extra == 'dev'", specifier = ">=8.0.0" }, - { name = "pytest-asyncio", marker = "extra == 'dev'", specifier = ">=0.24.0" }, - { name = "pytest-cov", marker = "extra == 'dev'", specifier = ">=5.0.0" }, - { name = "python-dotenv", specifier = ">=1.0.0" }, - { name = "python-socketio", specifier = ">=5.11.0" }, - { name = "pyyaml", specifier = ">=6.0.0" }, - { name = "rich", specifier = ">=13.7.0" }, - { name = "ruff", marker = "extra == 'dev'", specifier = ">=0.7.0" }, - { name = "structlog", specifier = ">=24.0.0" }, - { name = "uvicorn", extras = ["standard"], specifier = ">=0.32.0" }, -] -provides-extras = ["dev"] - -[package.metadata.requires-dev] -dev = [ - { name = "black", specifier = ">=24.0.0" }, - { name = "httpx", specifier = ">=0.27.0" }, - { name = "mypy", specifier = ">=1.11.0" }, - { name = "pytest", specifier = ">=8.0.0" }, - { name = "pytest-asyncio", specifier = ">=0.24.0" }, - { name = "pytest-cov", specifier = ">=5.0.0" }, - { name = "ruff", specifier = ">=0.7.0" }, -] - [[package]] name = "distro" version = "1.9.0" From 5a68448e0a2f32ee4b0a0b7f568fa33a2b24abd1 Mon Sep 17 00:00:00 2001 From: Alex Barclay Date: Sat, 25 Jul 2026 09:35:40 -0600 Subject: [PATCH 3/4] docs: v1.0 status doc, README badges, and publication polish Declare the project complete for now at v1.0 and give it a single accurate entry point. - docs/STATUS.md: new canonical, living status doc (state summary + newest-first session log). Supersedes the dated Status-*.md snapshots, which still described the retired LangGraph orchestrator. - README: CI/version/tests/coverage/python/license badges; a Configuration table for the env vars read by backend/config.py; the CLI flag table for run.py; frontend test command; v1.0 framing. - README: rebuild the architecture diagram, whose box borders were 41/42/43 chars on different lines and whose worker stems did not line up. Entry point now shows the invocation that actually works (python -m backend.engine.run) rather than the appforge console script, which is declared but not installed. - CLAUDE.md: replace the stale "Active session pickup" block, which pointed new sessions at Status-2026_06_02.md and Phase 6 work that the engine rewrite made moot; flag the LangGraph-era sections as historical. --- CLAUDE.md | 23 ++++++++------- README.md | 76 +++++++++++++++++++++++++++++++++++------------ docs/STATUS.md | 80 ++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 150 insertions(+), 29 deletions(-) create mode 100644 docs/STATUS.md diff --git a/CLAUDE.md b/CLAUDE.md index 8ecda14..cd3fb6c 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -1,20 +1,21 @@ -# CLAUDE.md - AI Assistant Context for DevTeam.AI +# CLAUDE.md - AI Assistant Context for AppForge - + ## Active session pickup -Phases 0–4 are merged to `main` (Phase 4 Parallel Planning Sprint shipped 2026-06-02). Before starting new work, read [`docs/Status-2026_06_02.md`](docs/Status-2026_06_02.md). It documents: +**AppForge is at v1.0 and feature-frozen — complete for now.** There is no work in flight. Read [`docs/STATUS.md`](docs/STATUS.md) (the canonical, living status doc) before starting anything. -- the roadmap position (Phase 5 ~60%; **Phase 6 — Specialist Agents is next and now unblocked**), -- key Phase 4 facts a new session needs (`ENABLE_PHASE4` is default ON; the list-return fan-out → `planning_fan_in` (emits the card once) → `planning_approval` (interrupt only) shape; the `kind:"prd"|"plan"` gate discriminator; `load_snapshot` detects the plan gate by artifact presence), -- tracked non-blocking follow-ups (real token cost threading, LangSmith tracing, Phase-5 multi-project recall). +Two things to know before trusting the rest of this file: -Once Phase 6 (or other new work) has its own branch and status doc, this block is stale — delete it. +- **The LangGraph orchestrator was retired** in the 2026-07 rewrite (commit `155155e`). The engine is now an MCP state server + independent worker processes under `backend/engine/`. Sections below that describe `backend/orchestrator.py`, `backend/graph.py`, `SqliteSaver` checkpoints, or `ENABLE_PHASE4` are **historical**. +- **The dated `docs/Status-*.md` files are frozen history**, as are `docs/Roadmap.md` and `docs/CoreDesignDocument.md`. `docs/STATUS.md` supersedes them. + +The current architecture, the evidence tests behind each claim, and the ranked follow-up list live in [`README.md`](README.md) and [`docs/STATUS.md`](docs/STATUS.md). ## Project Overview -**DevTeam.AI** is a fully autonomous, parallel-first, iterative multi-agent system that replicates a 12-14 person modern software development team. The system takes a natural-language idea from a human user (acting as Product Owner) and orchestrates specialized AI agents to clarify requirements, design solutions, write code, test, deploy, and iterate until the product is shipped. +**AppForge** is a fully autonomous, parallel-first, iterative multi-agent system that replicates a 12-14 person modern software development team. The system takes a natural-language idea from a human user (acting as Product Owner) and orchestrates specialized AI agents to clarify requirements, design solutions, write code, test, deploy, and iterate until the product is shipped. **Core Vision**: From idea → clarification → design → code → test → deploy → iterate → ship, with minimal human input beyond explicit approval gates. @@ -158,7 +159,7 @@ def create_agent(name: str, emit_callback: Callable) -> Any: ## File Structure ``` -devteam-ai/ +appforge/ ├── backend/ │ ├── agents/ # Agent implementations │ │ ├── base_agent.py # InstrumentedAgent base class @@ -275,7 +276,7 @@ Then open . ### Phase-Based Development -DevTeam.AI follows a 15-phase roadmap (see Roadmap.md). Each phase: +AppForge follows a 15-phase roadmap (see Roadmap.md). Each phase: 1. Has a testable deliverable 2. Must pass all tests from prior phases (regression) 3. May require human approval before advancing @@ -451,7 +452,7 @@ uv run pytest tests/unit/ uv run pytest tests/integration/ # Phase-specific -DEVTEAM_PHASE=3 uv run pytest tests/regression/ +APPFORGE_PHASE=3 uv run pytest tests/regression/ ``` ### Coverage Requirements diff --git a/README.md b/README.md index 47b6eaf..0f3b85d 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,17 @@ # AppForge +[![CI](https://github.com/adbarc92/appforge/actions/workflows/ci.yml/badge.svg)](https://github.com/adbarc92/appforge/actions/workflows/ci.yml) +[![Version](https://img.shields.io/badge/version-1.0.0-blue)](https://github.com/adbarc92/appforge/releases/tag/v1.0.0) +[![Tests](https://img.shields.io/badge/tests-154%20backend%20%2B%2028%20frontend-brightgreen)](#tests) +[![Coverage](https://img.shields.io/badge/coverage-87%25-brightgreen)](#tests) +[![Python](https://img.shields.io/badge/python-3.11%2B-blue)](https://www.python.org/downloads/) +[![License](https://img.shields.io/badge/license-MIT-yellow)](LICENSE) + **A parallel, MCP-coordinated multi-agent engine that takes a product idea from clarification → design → code → test → deploy → iterate, run by independent worker processes with human approval gates and automatic budget control.** AppForge models a ~14-person software team as **16 specialized agents** that a scheduler dispatches across a **six-phase dependency graph**. The orchestration is not a single async loop — it is a genuine **MCP state server** plus a pool of **independent OS worker processes** that claim and execute work concurrently, coordinating shared state without collision. -> **Status:** the orchestration engine is complete and tested (154 tests, ~87% coverage). Agents run in a deterministic **mock mode** by default (free, fast, reproducible) with a real-Anthropic mode available; the value here is the *orchestration architecture*, which is real and proven — not a finished app generator. +> **Status: v1.0 — complete for now.** The orchestration engine is finished, tested (154 backend + 28 frontend tests, ~87% coverage), and feature-frozen; there is no work in flight. Agents run in a deterministic **mock mode** by default (free, fast, reproducible) with a real-Anthropic mode available; the value here is the *orchestration architecture*, which is real and proven — not a finished app generator. Full detail in [`docs/STATUS.md`](docs/STATUS.md). --- @@ -19,20 +26,20 @@ Most "AI dev team" demos are one process running agents in a loop. AppForge is d ## Architecture ``` - appforge run "" React UI (Socket.IO) - ─────────────┐ │ - ▼ ▼ - ┌─────────────────────────────────────────┐ - │ MCP State Server (FastMCP, HTTP) │ ← single source of truth - │ • owns the phase + task DAG │ - │ • scheduler: readiness / gates / budget │ - │ • single SQLite writer (WAL) │ - └──────▲──────────────▲───────────────▲────┘ - claim/complete claim/complete claim/complete (atomic CAS) - │ │ │ - ┌────┴───┐ ┌─────┴──┐ ┌───────┴─┐ - │Worker 1│ │Worker 2│ … │Worker N │ ← independent OS processes - └────────┘ └────────┘ └─────────┘ + python -m backend.engine.run React UI (Socket.IO) + ────────────────────────────┐ │ + ▼ ▼ + ┌──────────────────────────────────────────┐ + │ MCP State Server (FastMCP, HTTP) │ ← single source of truth + │ • owns the phase + task DAG │ + │ • scheduler: readiness / gates / budget │ + │ • single SQLite writer (WAL) │ + └──────▲─────────────▲─────────────▲───────┘ + claim/complete claim/complete claim/complete (atomic CAS) + │ │ │ + ┌────┴───┐ ┌────┴───┐ ┌────┴───┐ + │Worker 1│ │Worker 2│ … │Worker N│ ← independent OS processes + └────────┘ └────────┘ └────────┘ ``` - **MCP state server** (`backend/engine/state_server.py`) — a real [Model Context Protocol](https://modelcontextprotocol.io) server (FastMCP, streamable-HTTP) wrapping a single-writer SQLite store. It is the only writer of run state and exposes the coordination surface as MCP tools (`claim_next_task`, `complete_task`, `submit_approval`, …). @@ -71,6 +78,12 @@ uv sync uv run python -m backend.engine.run run "Build a todo app" --workers 4 ``` +| Flag | Default | Effect | +|---|---|---| +| `--workers N` | `4` | Number of independent worker processes to spawn | +| `--budget-limit N` | `200.0` | Spend ceiling in USD that drives downgrade / pause / hard-stop | +| `--no-auto-approve` | off | Stop at each approval gate instead of auto-approving (headless runs auto-approve by default) | + **Web UI (live):** the FastAPI + Socket.IO backend drives the React frontend. ```bash @@ -82,11 +95,33 @@ Then open and start a project. Agents run in **mock mode** by default (`MOCK_AGENTS=true`). To use real Claude models, set `ANTHROPIC_API_KEY` and `MOCK_AGENTS=false`. +### Configuration + +Behaviour is set by `config/*.yaml` (the roster, the phase DAG, the budget thresholds) and overridden by environment variables, read in [`backend/config.py`](backend/config.py): + +| Variable | Default | Purpose | +|---|---|---| +| `MOCK_AGENTS` | `true` | Deterministic mock agents — no API calls, no cost | +| `ANTHROPIC_API_KEY` | — | Required only when `MOCK_AGENTS=false` | +| `ANTHROPIC_MODEL` | `claude-sonnet-4-6` | Default model for real agent calls | +| `BUDGET_LIMIT` | `200.0` | Spend ceiling in USD driving the downgrade thresholds | +| `MAX_CLARIFYING_QUESTIONS` | `6` | Cap on Clarifying PM follow-ups before a PRD is forced | +| `LOG_LEVEL` / `DEBUG` | `INFO` / `false` | structlog level; `DEBUG=true` also hot-reloads prompts | +| `ENGINE_WORKER_COUNT` | `4` | Default worker pool size | +| `ENGINE_LEASE_TTL` | `120.0` | Seconds a claimed task stays leased before the reaper reclaims it | +| `ENGINE_HEARTBEAT_INTERVAL` | `20.0` | Worker heartbeat period | +| `ENGINE_REAPER_INTERVAL` | `30.0` | How often expired leases are swept | +| `ENGINE_MAX_ATTEMPTS` | `3` | Attempts before a task is failed permanently | +| `APPFORGE_PHASES` | `config/phases.yaml` | Path override for the phase/task DAG | + +The lease, heartbeat, and reaper settings are what make worker crashes recoverable: a worker that dies mid-task has its lease expire and the task returns to the ready set. + ### Tests ```bash -uv run pytest tests/ -q # full suite (154 tests) +uv run pytest tests/ -q # backend suite (154 tests, ~87% coverage) uv run ruff check backend/ tests/ && uv run black --check backend/ tests/ +cd frontend && npm test # frontend suite (28 tests) ``` ## How a run flows @@ -128,10 +163,15 @@ The design spec and the phased implementation plans (each built test-first and i ## Honest status & known gaps +**v1.0 is where this project stops for now.** It set out to prove that a multi-agent development team could be coordinated by a real MCP state server and genuinely independent worker processes rather than one async loop — that is done, tested, and documented. What remains below are deliberate boundaries, not unfinished business. + - **Proven:** the coordination core, multi-process collision-freedom, approval gates, and live budget downgrade — all under test. -- **Mock by design:** the documented run and tests use mock agents (deterministic, free). Real-Anthropic mode works but isn't required to exercise the architecture; **real token-cost accounting** is a tracked follow-up (costs are currently simulated). +- **Mock by design:** the documented run and tests use mock agents (deterministic, free). Real-Anthropic mode works but isn't required to exercise the architecture; **real token-cost accounting** is the top follow-up (costs are currently simulated, so the downgrade *mechanism* is real while the dollar figures driving it are not). - **Single-user web bridge:** the live UI targets local single-user use; multi-tenant lifecycle hardening (per-connection dedup, reconnect durability) is future work. +- **Historical docs:** `docs/Roadmap.md`, `docs/CoreDesignDocument.md`, and the dated `docs/Status-*.md` files describe the earlier LangGraph-based design that the engine replaced. They are kept as history; [`docs/STATUS.md`](docs/STATUS.md) is the current one. + +If the project is picked up again, [`docs/STATUS.md`](docs/STATUS.md) carries the ranked list of what to do first. ## License -MIT (see the `LICENSE` file). +MIT — see [`LICENSE`](LICENSE). diff --git a/docs/STATUS.md b/docs/STATUS.md new file mode 100644 index 0000000..65d7227 --- /dev/null +++ b/docs/STATUS.md @@ -0,0 +1,80 @@ +# AppForge — Project Status + +> Canonical, living status document. The **State summary** below is rewritten in place each session; the **Session log** is appended newest-first. +> The dated `Status-YYYY_MM_DD.md` files in this directory are frozen history and describe the retired LangGraph architecture — do not treat them as current. + +--- + +## State summary + +**Version:** 1.0.0 · **Branch:** `publication-prep` · **Status: complete for now (feature-frozen).** + +AppForge v1.0 is the finished form of what this project set out to prove: a **parallel, MCP-coordinated multi-agent orchestration engine** in which a real MCP state server and a pool of independent OS worker processes drive a product idea through a six-phase dependency graph (Clarify → Design → Code → Test → Deploy → Iterate), with human approval gates and automatic budget-driven model downgrade. + +The engine is done, tested, documented, and published under MIT. There is no in-flight work and no next phase queued. Further work would be enhancement, not completion. + +### Readiness + +| Signal | State | +|---|---| +| Backend suite | **154 passed** (`uv run pytest tests/`) | +| Coverage | **86.93%** (gate: 70%) | +| Frontend suite | **28 passed** across 6 files (`cd frontend && npm test`) | +| Lint / format | `ruff check` clean · `black --check` clean (66 files) | +| Version | `pyproject.toml` 1.0.0 · `frontend/package.json` 1.0.0 · `backend/main.py` FastAPI 1.0.0 | +| License | MIT (`LICENSE`) | + +### What v1.0 contains + +- **MCP state server** (`backend/engine/state_server.py`) — FastMCP over streamable-HTTP wrapping a single-writer SQLite (WAL) store; the only writer of run state, exposing coordination as MCP tools. +- **Independent worker processes** (`backend/engine/worker.py`) — separate OS processes claiming ready tasks via a guarded single-statement claim + versioned CAS; lease/heartbeat + reaper give at-least-once execution with exactly-once effect. +- **Six-phase task DAG** (`config/phases.yaml`) with a pure scheduler (`backend/engine/scheduler.py`, 100% covered) resolving readiness, gates, and budget. +- **16 agents** (`config/agents.yaml`), deterministic mock mode by default with a real-Anthropic mode behind one env flag. +- **Approval gates** after Clarify and Design; rejection re-opens the phase. +- **Budget enforcement + live claim-time downgrade** (`backend/agents/budget_guard.py`, `config/budget.yaml`) — 85% downgrades, 95% pauses for ack, 100% hard-stops. +- **Live web UI** — `backend/main.py` bridges engine snapshots to Socket.IO for the React + React Flow graph UI. +- **Evidence, not assertion** — every headline claim has a runnable proof test (see the table in [`README.md`](../README.md)), plus a committed documented run at [`docs/runs/2026-07-24/`](runs/2026-07-24/). + +### Known gaps (accepted at 1.0, not defects) + +- **Simulated token cost.** Agents report placeholder costs; real Anthropic usage metadata is not threaded into BudgetGuard. The downgrade *mechanism* is real and proven — the dollar figures driving it are not. +- **Mock by design.** The documented run and the whole suite use deterministic mock agents. Real-Anthropic mode works but is not what the tests exercise; AppForge is an orchestration architecture, not a finished app generator. +- **Single-user web bridge.** The live UI targets local single-user use. Multi-tenant lifecycle hardening (per-connection dedup, reconnect durability) is unbuilt. +- **Stale packaging metadata.** `pyproject.toml` still carries the pre-rename package name `devteam-ai` and placeholder `your-repo` project URLs, and lists LangChain dependencies the retired orchestrator no longer needs. +- **Historical docs.** `docs/Roadmap.md`, `docs/CoreDesignDocument.md`, and the dated `Status-*.md` files describe the LangGraph-era design and are kept as history only. + +### Next steps + +None required — the project is feature-frozen at 1.0. If it is picked up again, the highest-value candidates, in order: + +1. Thread real Anthropic token usage into BudgetGuard so budget figures are actual, not simulated. +2. Clean the packaging metadata (`devteam-ai` → `appforge`, real repository URLs, drop unused LangChain deps). +3. Harden the web bridge for multi-user / reconnect durability. +4. Refresh or archive the LangGraph-era design docs so `docs/` matches the shipped engine. + +--- + +## Session log + +### 2026-07-25 — v1.0.0 release stamp + +- Bumped `pyproject.toml` to `1.0.0` and its classifier from `3 - Alpha` to `5 - Production/Stable`; bumped `frontend/package.json` from `0.0.0` to `1.0.0` (`backend/main.py` already declared 1.0.0). +- Verified the release state before stamping it: 154 backend tests passed, 86.93% coverage, 28 frontend tests passed, ruff and black clean. +- Created this canonical `docs/STATUS.md`, superseding the dated `Status-*.md` snapshots (which describe the retired LangGraph architecture). +- Marked the project **complete for now** in `README.md` and replaced the stale "Active session pickup" block in `CLAUDE.md`, which still pointed sessions at `Status-2026_06_02.md` and Phase 6 work that the engine rewrite made moot. +- **State delta:** unversioned work-in-progress → feature-frozen v1.0.0 with a single accurate status entry point. + +### 2026-07-23 → 2026-07-24 — MCP orchestration engine (Plans A–D) + +The rewrite that produced v1.0, built test-first across four reviewed plans under [`docs/superpowers/plans/`](superpowers/plans/): + +- **Plan A — coordination core:** SQLite store with atomic claim, versioned CAS, single-transaction complete; pure scheduler; phase/task models. +- **Plan B — server + workers:** the FastMCP state server and independent `python -m backend.engine.worker` processes; lease/heartbeat/reaper. +- **Plan C — evidence:** the proof suite, including `test_concurrency_no_collision.py` (8 real worker subprocesses drain 12 contended tasks, each executed exactly once) and `test_budget_downgrade_live.py`; plus the committed documented run in [`docs/runs/2026-07-24/`](runs/2026-07-24/). +- **Plan D — web bridge:** `backend/main.py` drives the engine over Socket.IO; pure snapshot→event mappers in `webbridge.py`; the LangGraph orchestrator, its coupled tests, and dead config were retired. + +Design spec: [`docs/superpowers/specs/2026-07-23-parallel-mcp-orchestration-engine-design.md`](superpowers/specs/2026-07-23-parallel-mcp-orchestration-engine-design.md). + +### Earlier (2026-04 → 2026-06) — LangGraph era, superseded + +Phases 0–4 of the original roadmap (bootstrap, agent framework + BudgetGuard, clarification loop, parallel planning sprint) shipped on a LangGraph supervisor. That orchestrator was **retired** in the 2026-07 rewrite (commit `155155e`). Frozen detail lives in [`Status-2026_05_03.md`](Status-2026_05_03.md), [`Status-2026_06_01.md`](Status-2026_06_01.md), and [`Status-2026_06_02.md`](Status-2026_06_02.md); the agent roster, prompts, BudgetGuard, and React UI survive into v1.0. From ba82ca8a6455109399acb8379cc28320568f7ab2 Mon Sep 17 00:00:00 2001 From: Alex Barclay Date: Sat, 25 Jul 2026 11:19:38 -0600 Subject: [PATCH 4/4] docs: point version badge at the releases index The v1.0.0 tag is held local until the #7 -> #8 -> #9 stack lands on main, so a badge linking straight to releases/tag/v1.0.0 would 404. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0f3b85d..51c3fa4 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # AppForge [![CI](https://github.com/adbarc92/appforge/actions/workflows/ci.yml/badge.svg)](https://github.com/adbarc92/appforge/actions/workflows/ci.yml) -[![Version](https://img.shields.io/badge/version-1.0.0-blue)](https://github.com/adbarc92/appforge/releases/tag/v1.0.0) +[![Version](https://img.shields.io/badge/version-1.0.0-blue)](https://github.com/adbarc92/appforge/releases) [![Tests](https://img.shields.io/badge/tests-154%20backend%20%2B%2028%20frontend-brightgreen)](#tests) [![Coverage](https://img.shields.io/badge/coverage-87%25-brightgreen)](#tests) [![Python](https://img.shields.io/badge/python-3.11%2B-blue)](https://www.python.org/downloads/)