Skip to content

System Overview

PREQSTATION is a task management platform designed for AI-agent-driven development workflows. It bridges developers and AI agents through a central task queue and REST API.

Three-System Architecture

PREQSTATION consists of three interconnected services:

projects-manager

Central web app. Manages tasks, renders the Kanban UI, exposes the REST API, and can relay Telegram/OpenClaw messages.

preqstation-openclaw

Execution skill package. OpenClaw imports it to resolve projects, create worktrees, and launch coding agents.

preqstation-skill

Agent client. MCP server and shell helpers for agents to call projects-manager APIs during execution.

System Diagram

┌──────────────────────────────────────────────────────────────┐
│ projects-manager (Web App) │
│ │
│ Next.js 16 · React 19 · Mantine 8 · Drizzle · Neon PG │
│ │
│ ┌────────────┐ ┌──────────────┐ ┌───────────────────┐ │
│ │ Kanban UI │ │ REST API │ │ Telegram Client │ │
│ │ Dashboard │ │ /api/tasks │ │ /api/telegram/* │ │
│ │ Settings │ │ /api/api-keys│ │ │ │
│ └────────────┘ └──────┬───────┘ └────────┬──────────┘ │
│ │ │ │
└─────────────────────────┼────────────────────┼───────────────┘
│ │
API calls (Bearer token) │ Sends notifications
│ │
│ ▼
│ ┌─────────────────┐
│ │ Telegram │
│ └────────┬────────┘
│ │
│ │ User message / bot relay
│ ▼
│ ┌─────────────────────────────────┐
│ │ OpenClaw (Runtime) │
│ │ │
│ │ Receives request, imports │
│ │ preqstation-openclaw skill │
│ └────────────────┬────────────────┘
│ │
│ Parses intent, creates
│ git worktree, launches
│ coding agent (PTY+bg)
│ │
│ ▼
│ ┌─────────────────────────────────┐
│ │ Coding Agent │
│ │ ("claude-code" / "codex" / │
│ │ "gemini-cli") │
│ │ │
│ │ Runs in isolated worktree │
│ │ Implements code changes │
◄───────────│ Uses preqstation-skill MCP │
│ to report status & results │
└─────────────────────────────────┘

Data Flow

Task Creation and Notification

User creates task in Kanban UI
→ projects-manager stores in PostgreSQL
→ (optional) sends Telegram notification

Agent Trigger via OpenClaw

Developer sends task request to OpenClaw
→ OpenClaw runtime receives message
→ preqstation-openclaw skill triggers
→ Parses: engine key, task ID, project key
→ Resolves project path from agent memory
→ Creates isolated git worktree
→ Launches coding agent (claude/codex/gemini CLI)

Agent Execution and Status Reporting

Coding agent fetches task via preq_get_task, then:
inbox → preq_start_task (run_state → working)
→ preq_plan_task (write plan, → todo, clear run_state)
todo/hold → preq_start_task (run_state → working)
→ Implement + test + deploy per strategy
→ preq_complete_task (→ ready, clear run_state)
ready → preq_start_task (run_state → working)
→ Run verification (tests, build, lint)
→ preq_review_task (→ done, clear run_state)
Telegram dispatch before pickup may set run_state=queued
On any failure → preq_block_task (→ hold)

Tech Stack

LayerTechnology
FrameworkNext.js 16 (App Router)
UIReact 19, Mantine 8, Tabler Icons, Recharts
ORMDrizzle ORM
DatabaseNeon PostgreSQL (Row Level Security)
ValidationZod
AuthSession cookies (HMAC-signed), bcryptjs