# ArchForge Orbit Project Brief

ArchForge Orbit is a working AI agent system for software engineering workflows.

The product accepts a public GitHub repository, clones it into an isolated workspace, indexes the source tree, detects entrypoints and test/build hints, and produces an architecture-oriented workspace for learning and patch planning.

## Core Capabilities

- GitHub repository import and persistence.
- Source tree browsing and in-browser file reading.
- AI or heuristic architecture analysis.
- Mermaid architecture map generation.
- Learning units tied to real file evidence.
- AI architecture tutor with repository context.
- OpenCode/Codex-style agent exploration records.
- Patch plan generation for small engineering tasks.
- Local/SSH runner boundaries for build and test validation.

## Technical Stack

- Next.js App Router
- React
- TypeScript
- Tailwind CSS
- SQLite through better-sqlite3 and Drizzle
- Vercel AI SDK with OpenAI-compatible model adapters
- Git CLI based repository import
- Mermaid diagrams

## Why This Needs Significant Token Budget

The system is intentionally context-heavy. A useful run may include repository facts, multiple source files, grep evidence, README/build metadata, architecture summaries, learning units, chat history, and patch-plan constraints. Real repository analysis therefore consumes far more tokens than a short Q&A flow, especially when the user iterates across several files and asks the agent to reason about module boundaries, risks, and verification commands.

## Demo Evidence

A reviewer can verify the system by importing a public repository, opening the generated workspace, running architecture analysis, checking file evidence, and generating a patch plan. The app stores imported repositories, analyses, runner plans, and agent runs in SQLite so the demo state remains visible across sessions.
