Welcome to GeNCorE Command Center
Relevant source files
The following files were used as context for generating this wiki page:
GeNCorE Command Center is a specialized web-based interface designed to manage AI agents, specifically GitHub Copilot, Claude, and Codex. It serves as a central hub for tasking these agents and managing the resulting pull requests within the GentelmeN-CorE repository ecosystem. The system is built with Next.js 15 and leverages the GitHub REST API to orchestrate workflows between human users and autonomous agents.
Sources: README.md:1-5, package.json:2-10
System Architecture and Core Components
The application is structured as a Next.js App Router project with a clear separation between client-side dashboards and server-side API routes that interface with GitHub.
Core Components
- Dashboard (
/): Provides a high-level view of agent statuses and active Pull Requests. - Task Panel (
/task): A form-based interface to issue new assignments to AI agents by creating GitHub Issues. - Review Panel (
/review): A dedicated interface for reviewing, approving, and merging pull requests generated by agents. - Auth Middleware: Protects all routes using a session-based HMAC-SHA256 cookie validation.
Sources: README.md:9-15, app/page.tsx:7-15, middleware.ts:25-50
System Workflow Diagram
The following diagram illustrates the high-level flow from task assignment to pull request management.
AI Agent Ecosystem
The system identifies and manages three specific AI agents. Each agent has unique visual markers and metadata used for task assignment and PR identification.
Agent Profiles
| Agent | Identifier | Emoji | GitHub Login | Issue Label | Color Theme |
|---|---|---|---|---|---|
| GitHub Copilot | copilot | 🟣 | copilot | agent:copilot | Purple |
| Claude (Anthropic) | claude | 🟠| claude[bot] | agent:claude | Orange |
| Codex (OpenAI) | codex | 🔵 | codex[bot] | agent:codex | Blue |
Sources: lib/agents.ts:30-65, README.md:80-85
Agent Detection Logic
The system automatically identifies which agent is responsible for a Pull Request by inspecting the branch name (head.ref) and the author's login.
export function detectAgentFromPR(headRef: string, authorLogin: string): AgentConfig | null {
const branch = headRef.toLowerCase();
const author = authorLogin.toLowerCase();
if (branch.includes('copilot') || author.includes('copilot')) return AGENTS_BY_ID.copilot;
if (branch.includes('claude') || author.includes('claude')) return AGENTS_BY_ID.claude;
if (branch.includes('codex') || author.includes('codex')) return AGENTS_BY_ID.codex;
return null;
}
Sources: lib/agents.ts:85-110
Task Management System
Tasks are initiated through the /task route. When a user submits a task, the system interacts with the GitHub Issues API to create a structured request.
Task Creation Process
- Selection: User selects an agent (
AgentId). - Description: User provides a detailed task description.
- API Execution: The server creates an Issue with the agent as an
assigneeand applies the specificissueLabel. - Local History: The client saves the task to
localStoragefor quick reference.
Review and Merge Operations
The Review module allows human operators to manage the lifecycle of agent-produced code.
Operation Types
- Approve: Submits a
POSTrequest to/api/reviewwith theAPPROVEevent. - Request Changes: Prompts the user for a comment and submits a
REQUEST_CHANGESevent. - Merge: Executes a PR merge (defaulting to the
squashmethod) via the/api/mergeendpoint.
Sources: app/review/page.tsx:45-120, app/api/merge/route.ts:45-60
API Endpoint Specifications
| Endpoint | Method | Required Fields | GitHub Action |
|---|---|---|---|
/api/prs | GET | N/A | Fetches 20 open PRs |
/api/review | POST | prNumber, event | Creates a PR review |
/api/merge | POST | prNumber | Merges the PR (squash) |
Sources: app/api/prs/route.ts:15-30, app/api/review/route.ts:35-50, app/api/merge/route.ts:25-35
Security Implementation
Security is handled via a multi-layered approach to protect both the GitHub credentials and the panel access.
- Authentication: The
ADMIN_TOKENenvironment variable is required. Access is gated by amiddleware.tsthat checks for a validauthcookie. - Token Protection: The raw
ADMIN_TOKENis never stored in the browser. Instead, anHMAC-SHA256hash of the token is used as the session identifier. - Server-Side Secrets:
GITHUB_TOKENis strictly server-side and never exposed to the frontend. - Input Validation: PR numbers are validated as safe integers to prevent Server-Side Request Forgery (SSRF) when constructing GitHub API URLs.
Sources: README.md:95-105, middleware.ts:30-60, lib/auth.ts:15-30, app/api/merge/route.ts:30-35
Technical Summary
GeNCorE Command Center provides a robust, mobile-optimized (iPhone/Brave) interface for orchestrating AI developer agents. By centralizing tasking via GitHub Issues and PR management via a custom review board, it bridges the gap between high-level human requirements and autonomous agent execution.
Sources: README.md:85-90, app/layout.tsx:10-15