Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

mpiton/forgent

Repository files navigation

Forgent

Autonomous multi-agent development framework in Rust/Tauri. Orchestrates Claude Code CLI on a kanban board with isolated Git worktrees. Functional clone of Aperant, rewritten as hexagonal + DDD, v1 scope reduced to Claude Code CLI + GitHub.

CI Smoke E2E Release CodSpeed License: AGPL v3 Rust Node pnpm

Status: pre-1.0, Sprint 1 closure — backend hexagonal foundation + first IPC (tasks_list) + frontend skeleton boot. Smoke E2E gate green on main.

Stack

  • Backend Rust (stable) + Tauri 2 + tokio + libsql + git2 + portable-pty
  • Frontend React 19 + TypeScript + Vite + Zustand + XState + Radix + Tailwind 4 + xterm.js + CodeMirror 6
  • Tooling: pnpm, oxlint, oxfmt, lefthook, vitest, cargo-deny, cargo-llvm-cov
  • E2E tests: tauri-pilot

Prerequisites

  • Claude Code CLI installed separately: https://code.claude.com/docs/en/setup#native-install-recommended
  • Rust (1.95.0+) via rustup — exact version auto-installed from rust-toolchain.toml
  • Node.js ≥ 20 (LTS recommended)
  • pnpm 10.33.2 — install via Corepack: corepack enable && corepack prepare pnpm@10.33.2 --activate
  • Dev tooling: cargo install cargo-deny cargo-llvm-cov cargo-mutants
  • Smoke / E2E: cargo install tauri-pilot-cli --version "=0.5.2" --locked (pinned to match tauri-plugin-pilot in src-tauri/Cargo.toml)
  • OS-specific:
    • Linux: libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
    • macOS: Xcode Command Line Tools (xcode-select --install)
    • Windows: WebView2 Runtime (preinstalled on Windows 11)

Quickstart

Boot the app from a fresh clone in under 5 minutes:

git clone https://github.com/mpiton/forgent.git
cd forgent
./scripts/install-hooks.sh # verifies tooling, runs pnpm install --frozen-lockfile, installs lefthook hooks
pnpm exec tauri dev # builds + runs the app (first build downloads + compiles ~700 crates, ~5-10 min on a cold machine)

On second runs the dev build is incremental (a few seconds).

Windows: ./scripts/install-hooks.sh is a Bash script — run it under Git Bash or WSL. PowerShell/cmd.exe will not execute it directly. Everything else (pnpm, tauri-pilot, cargo) runs natively in any shell.

Verify the Sprint 1 smoke flow

Start the app in pilot mode, then probe IPC from a second terminal:

# terminal 1: pilot-gated dev server
pnpm exec tauri dev --features pilot
# terminal 2: probe the first IPC command
tauri-pilot ipc tasks_list --args '{"projectId":1}'

The probe returns the empty task list seeded by migration V001. The full one-shot acceptance gate (boot + log markers + DB freshness + IPC) lives in scripts/smoke-e2e.sh; the Sprint 2 scenario (scripts/smoke-sprint-2.sh, task T-224) extends it with project creation, task creation via the wizard, drag-to-Code, and a kill-and-restart cycle that asserts tasks.phase persistence via sqlite3 -readonly probe + DOM re-render under kanban-column-code-list. Both scenarios run as a strategy.matrix.scenario in the Smoke E2E workflow (invoked on demand via workflow_dispatch — GitHub Actions → Smoke E2E → "Run workflow") plus locally before tagging a Sprint release. The badge above reflects the last manual run.

What works in Sprint 1

  • Backend boot: hexagonal layout (domain/ / application/ / infrastructure/ / interfaces/) wired through AppContainer::build composition root.
  • Persistence: libsql connection pool + migration V001 (projects, tasks, runs, phase_events) executed on startup.
  • First IPC: tasks_list Tauri command exposing domain/tasks via LibsqlTaskRepo.
  • Event bus: EventPublisher port + TauriEventPublisher adapter wired to the frontend through tauri::Emitter.
  • Tracing: tracing subscriber with token-redaction layer (gh*_, sk-ant-, token= scrubbed before fan-out).
  • Frontend skeleton: Sidebar + WelcomeScreen, Zustand useTaskStore, i18n react-i18next (FR + EN), UI primitives (Button, Switch, Separator, KeyboardHint, Dialog, Tooltip, Toast, Tabs).
  • Codegen: scripts/codegen-types.ts + generated src/shared/types/{Task,Phase,Status,Priority,AppEvent,AppError,commands}.ts mirroring Rust types via specta.
  • Quality gates: architecture test enforcing forbidden imports in domain/, cargo-llvm-cov --fail-under-lines 75 enforced in CI, pnpm exec knip + cargo deny check on pre-push.
  • Smoke E2E gate: scripts/smoke-e2e.sh + .github/workflows/smoke-e2e.yml boot the pilot-gated dev server and assert on log markers, DB freshness, and IPC response.

The pipeline (Backlog → Spec → Plan → Code → QA → PR → Done), worktree isolation, Claude Code CLI spawn, and post-PR loops land in Sprints 2+.

Architecture

Hexagonal + DDD bounded contexts:

src-tauri/src/
├── domain/ # Pure logic, ZERO I/O (tasks, agents, prompts, pr_fix, ...)
├── application/ # Cross-context use cases (orchestrator, pr_loops, di)
├── infrastructure/ # Driven adapters (libsql, git2, portable-pty, github_api, ...)
└── interfaces/ # Driving adapters (tauri_commands, tauri_events)

Dependency rule: arrows point inward only (interfaces → application → domain ← infrastructure). The domain/ layer has zero I/O — no tokio, no tauri, no libsql, no reqwest. Only std + serde + thiserror + time + uuid. An architecture test (src-tauri/tests/architecture.rs) enforces the forbidden-import set on every CI run. Composition happens exclusively in application/di.rs via AppContainer::build.

Pipeline phases

Backlog → Spec → Plan → Code → QA → PR → Done

The agent stops at PR creation. Final merge is human. No auto-merge.

Post-PR (buttons on the card):

  • Fix PR comments (F-089): agent processes review comments + replies humanly (no AI slop)
  • Fix CI (F-090): agent classifies + fixes CI failure or comments

Out of v1 scope (H1)

  • No Claude OAuth on Forgent side (delegated to CLI)
  • No MCP management (delegated to CLI)
  • No PR auto-merge
  • No GitLab, Linear, alternative AI providers (OpenAI, Google, etc.), Bedrock, Azure, Codex
  • No npm / yarn (pnpm only)
  • No ESLint / Prettier / Biome (oxlint + oxfmt only)

Contributing

Read CONTRIBUTING.md for the workflow. TDD mandatory, pre-commit/pre-push hooks enabled.

License

AGPL-3.0

About

Autonomous multi-agent dev framework — Tauri/Rust orchestrating Claude Code CLI on a Git-worktree kanban

Topics

Resources

Contributing

Security policy

Stars

Watchers

Forks

Sponsor this project

Packages

Contributors

AltStyle によって変換されたページ (->オリジナル) /