Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# CLAUDE.md - AI Assistant Context for DevTeam.AI

<!-- BEGIN: ACTIVE-SESSION-PICKUP — remove this block once Phase 6 work begins on its own branch -->
## 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:

- 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).

Once Phase 6 (or other new work) has its own branch and status doc, this block is stale — delete it.
<!-- END: ACTIVE-SESSION-PICKUP -->

## 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.
Expand Down
51 changes: 51 additions & 0 deletions docs/Status-2026_06_02.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Session Pickup — 2026-06-02

**Branch:** `main` (no feature branch in flight — everything from this session is merged)
**Roadmap:** [`docs/Roadmap.md`](Roadmap.md)

> This is project-level state, not branch-specific: the session ended with all work merged to `main`. The next session starts fresh on `main` and branches for new work.

## Where we are on the roadmap

| Phase | Status | Notes |
|---|---|---|
| 0 Repo & Bootstrap | done | CI modernized (uv+node, 4 jobs) |
| 1 Minimal Viable Graph | done* | *LangSmith tracing is config-only in `config/llm.yaml`, not wired into execution — a small open gap |
| 2 Agent Framework + BudgetGuard | done (verified) | |
| 3 Clarification Loop MVP | done | real Anthropic clarifying_pm + mock fallback; PRD gate |
| **4 Parallel Planning Sprint** | **done (this session)** | Architect/Tech Lead/Designer fan-out → combined gate → summarizer; `ENABLE_PHASE4` default ON |
| 5 Memory & Persistence | ~60% | `AsyncSqliteSaver` + `load_snapshot` + reload-resume done; **multi-project "recall by name" + chat-transcript persistence remain** |
| 6 Specialist Agents (Todo MVC) | **NEXT — now unblocked** | Phase 4 produces exactly what they consume (ADR + task breakdown with `owner_agent` + design spec) |
| 7–14 | not started | |

Latest `main`: PR #3 (Phase 4) on top of PR #2 (cleanup). Backend 127 / frontend 28 / Playwright 4 passing; ~85% coverage; CI green on all 5 jobs.

## Key Phase 4 facts the next session needs

- **`ENABLE_PHASE4` is default ON** (`backend/config.py`). Pure Phase-3 regression tests (`tests/integration/test_approval_flow.py`, `tests/e2e/test_phase3_demo.py`) are explicitly pinned to `ENABLE_PHASE4=false` — keep that when touching them.
- **Graph shape** (`backend/graph.py`): a conditional-edge router returning a **list of node names** fans out to the three planning nodes (verified to work in this LangGraph version); they edge into `planning_fan_in` (emits the `approval_required kind:"plan"` card **once**) → `planning_approval` (`interrupt()` only — never emit here, it re-runs on resume). Reject re-fans-out to **all three** (list return), not one.
- **Two approval gates share one mechanism.** `approval_required` carries `kind: "prd" | "plan"`; the frontend only calls `setPRD` when `kind !== "plan"` (so the plan card never clobbers the PRD). `phase_complete` keeps `prd` (does not clear it).
- **Parallel-write safety:** each planning node returns ONLY its own field (`adr`/`tasks`/`design_spec`); never co-write a channel in the superstep or LangGraph raises `InvalidUpdateError`.
- **`load_snapshot` detects the plan gate by artifact presence**, NOT `planning_approval_status == "pending"` — the durable checkpoint has that field `None` at the gate (the fan-in node returns `{}`).
- **Budget** under concurrency: a single `can_spend(3 × estimate)` pre-check in the PRD-approval branch (per-node `can_spend` is not atomic).

Design + plan (with a 3-round critique log): [`docs/superpowers/specs/2026-06-02-phase4-parallel-planning-design.md`](superpowers/specs/2026-06-02-phase4-parallel-planning-design.md) · [`docs/superpowers/plans/2026-06-02-phase4-parallel-planning.md`](superpowers/plans/2026-06-02-phase4-parallel-planning.md).

## Known limitations / tracked non-blocking follow-ups

- **Real Anthropic token cost is not threaded into BudgetGuard** — planning agents (like `clarifying_pm`) return `cost: 0.0`; a `_PLANNING_COST_ESTIMATE` placeholder drives the gate. Thread real usage from the Anthropic response metadata.
- **`config/agents.yaml` `uiux_designer.model`** lags the system default (`claude-sonnet-4-6`) — inert today (real agents read `Config.anthropic_model`), but a latent inconsistency.
- **Driver failure `phase_complete`** is now phase-aware (4 when phase4 on); the duplicated `_CLARIFYING_COST_ESTIMATE`/`_PLANNING_COST_ESTIMATE` 0.05 constants are accepted tech-debt.
- **Designer PNG, per-agent selective gates, slash-command Playwright tests, and LangSmith tracing (Phase 1)** remain deferred.
- **Phase 5 remainder:** multi-project recall by name + chat-transcript persistence (the checkpoint stores no transcript; `load_snapshot` reconstructs it from Q/A).

## What to pick up next

**Phase 6 — Specialist Agents (Round 1: Todo MVC).** Brainstorm → spec → plan → implement the Frontend/Backend/Database agents that consume the Phase 4 plan artifacts (the Tech Lead's `tasks` carry `owner_agent` assignments) to generate a working Todo app. Same flow used for Phases 3–4 (brainstorming → writing-plans → subagent-driven-development). Optionally first close the small Phase-1 LangSmith gap and/or the Phase-5 multi-project recall.

## Servers / commands

- Backend: `MOCK_AGENTS=true ENABLE_PHASE4=true uv run -- python -m backend.main` (127.0.0.1:8000)
- Frontend: `cd frontend && npm run dev` (5173) · E2E: `cd e2e && npx playwright test` (boots both servers)
- Tests: `uv run pytest tests/ --cov=backend` · `cd frontend && npm test`
- If a local full-suite run flakes on a stale db: `rm -f data/checkpoints.db*` (CI is unaffected; `tests/conftest.py` isolates `SQLITE_PATH`).
Loading