Copy-paste these into GitHub Issues. Each section = 1 issue. Suggested Labels:
phase-1,phase-2,phase-3,phase-4,agent,backend,frontend,infra,security,docs
Labels: phase-1, infra
Assignee: R1, R2, R3
Description: Set up the monorepo structure with backend (FastAPI) and frontend (Next.js) projects, shared configs, and CI basics.
Tasks:
apps/backend, apps/frontend, data/, scripts/, tests/)main.py, CORS config, health endpointdocker-compose.yml with ClickHouse service.env.example with all required env varsREADME.md with setup instructionsAcceptance Criteria:
docker-compose up starts ClickHouselocalhost:8000 with /health returning 200localhost:3000Labels: phase-1, agent
Assignee: R1
Description:
Implement the AgentLoop with 4 cognitive layers: Perception → Routing → Memory → Action, using LlamaIndex.
Tasks:
agent/loop.py — main agent orchestrationagent/router.py — intent classification (doc-query vs log-query vs general)models/schemas.py — Pydantic models for tool I/OAcceptance Criteria:
Labels: phase-1, agent, backend
Assignee: R1, R2
Description: Build the RAG pipeline: ingest docs → chunk → embed → FAISS index → retrieval-augmented answers.
Tasks:
scripts/ingest_docs.py — doc chunking + embedding pipelinetools/rag_tool.py — FAISS retrieval + LLM answer generationtools/registry.py — tool registration frameworkdata/faiss_index/Acceptance Criteria:
data/docs/, ingestion creates a FAISS index80% relevance on 10 manual test queries
Labels: phase-1, agent, backend
Assignee: R2
Description: Build a tool that converts natural language queries into ClickHouse SQL, executes them, and returns formatted results.
Tasks:
tools/clickhouse_tool.pyclickhouse-connect or HTTP interfaceAcceptance Criteria:
Labels: phase-1, frontend
Assignee: R3
Description: Build the chat widget UI with streaming responses, message bubbles, and SQL sandbox display.
Tasks:
ChatWidget.tsx — collapsible chat interfaceMessageBubble.tsx — rich messages (text, code, tables)SqlSandbox.tsx — collapsible panel showing executed SQLAcceptance Criteria:
Labels: phase-1, security
Assignee: R2
Description: Implement input-level guardrails to filter off-topic queries and scrub PII before processing.
Tasks:
guardrails/input_guard.pyAcceptance Criteria:
Labels: phase-2, agent, backend
Assignee: R1
Description: Build a tool that indexes codebase function/class signatures and enables semantic search to map errors to source code.
Tasks:
tools/code_search_tool.pyALLOWED_REPOS env var restricts accessible reposAcceptance Criteria:
NullPointerException, agent finds the source file and lineALLOWED_REPOS are accessibleLabels: phase-2, agent, backend
Assignee: R1
Description: Expose all registered tools as MCP server endpoints so external MCP clients (Claude Desktop, Cursor, etc.) can call them.
Tasks:
mcp/server.py using mcp Python SDKAcceptance Criteria:
search_docs toolLabels: phase-2, agent
Assignee: R1
Description:
Build the skills framework for composable multi-tool workflows. Implement DiagnoseErrorSkill as the first skill.
Tasks:
Skill(name, tools, execute())skills/diagnose_error.py: KeDB → Logs → Code → Summaryskills/search_docs.py: multi-source doc searchAcceptance Criteria:
Labels: phase-2, security
Assignee: R2
Description: Implement output-level guardrails for SQL safety validation and response grounding checks.
Tasks:
guardrails/output_guard.pyINSERT, UPDATE, DELETE, DROPAcceptance Criteria:
DROP TABLE SQL is caught and blocked before executionLabels: phase-2, frontend
Assignee: R3
Description: Build rich message components for displaying code snippets, log streams, and error traces in the chat UI.
Tasks:
Acceptance Criteria:
Labels: phase-3, agent
Assignee: R1
Description: Implement auto-retry logic: when a ClickHouse SQL query fails, parse the error, rewrite the SQL, and retry (max 3 attempts).
Tasks:
agent/loop.pyAcceptance Criteria:
Labels: phase-3, agent, backend
Assignee: R2
Description: Build the KeDB: a vector store of resolved issues (error_signature → root_cause → solution) that the agent checks first.
Tasks:
memory/kedb_store.py — vector store for known errorstools/kedb_tool.py — KeDB lookup toolscripts/seed_kedb.py — seed initial known errorsAcceptance Criteria:
Labels: phase-3, agent, frontend
Assignee: R1, R3
Description: Build the HITL approval gate: agent pauses on write actions, emits a plan, and waits for user approval.
Tasks:
ApprovalGate middleware in guardrails/output_guard.pyApprovalCard.tsx — plan preview with Approve/Reject buttonsAcceptance Criteria:
Labels: phase-3, agent, backend
Assignee: R2
Description: Implement scheduled health checks using APScheduler: query ClickHouse for error spikes and generate reports.
Tasks:
scheduler/health_check.py with APSchedulerget_top_errors() — query error rates from ClickHouseDiagnoseErrorSkill on detected anomaliesAcceptance Criteria:
Labels: phase-3, frontend
Assignee: R3
Description: Build “The Deck” — a real-time health dashboard showing alert cards, system status, and proactive insights.
Tasks:
DeckFeed.tsx — scrollable feed of health eventspages/index.tsx as The Deck landing pageAcceptance Criteria:
Labels: phase-3, security
Assignee: R2
Description: Add tool-level guardrails: rate limiting, execution timeouts, and scope restrictions.
Tasks:
guardrails/tool_guard.pyALLOWED_REPOS for GitHub, ALLOWED_TABLES for ClickHouseAcceptance Criteria:
Labels: phase-4, agent
Assignee: R1
Description:
Integrate browser-use + Playwright so the agent can navigate web UIs (Grafana, admin panels) and perform actions via chat commands.
Tasks:
tools/browser_tool.pybrowser-use library with PlaywrightALLOWED_URLS whitelist — restrict to configured domains onlyAcceptance Criteria:
Labels: phase-4, frontend
Assignee: R3
Description: Build the UI for viewing the agent’s browser actions: live screenshot stream and HITL approval for UI actions.
Tasks:
Acceptance Criteria:
Labels: phase-4, agent
Assignee: R1
Description: Implement multi-step reasoning for complex cross-domain queries using Chain of Thought and a correlation engine.
Tasks:
agent/planner.py — ReAct-style multi-step plannerAcceptance Criteria:
Labels: phase-4, agent, backend
Assignee: R2
Description: Build tools to draft GitHub issues and PRs based on agent analysis, gated by HITL approval.
Tasks:
tools/github_tool.pydraft_github_issue — generate issue title, body, labels from analysisdraft_pr — create branch, commit fix, open PRAcceptance Criteria:
Labels: phase-4, security
Assignee: All
Description: Comprehensive security testing across all guardrails and attack surfaces.
Tasks:
Acceptance Criteria:
Labels: phase-4, docs
Assignee: All
Description: Prepare the 5-minute live demo, record it, and finalize all documentation.
Tasks:
Acceptance Criteria: