Skip to content

an open-source alternative to the dots, bots and muses of the world, run an office of claude code/codex like agents on your laptop, sandboxes or anywhere, uses your existing subscriptions

feat: an interactive task board on the office wall, fed by hive/tasks.json

Gulum67d66901bdd6
diff --git a/src/main/hive.ts b/src/main/hive.ts
index 5b040cdb..21e26d00 100644
--- a/src/main/hive.ts
+++ b/src/main/hive.ts
@@ -460,7 +460,7 @@ export class HiveManager {
: '';
const godLine = meta.isGod
? 'You are the GOD / ORCHESTRATOR of this hive — your job is to ORCHESTRATE, not to implement: maintain live situational awareness and delegate the work. (1) AWARENESS — always know what is going on: keep an accurate picture of every agent (active vs archived/idle), the task board, and all in-flight work; drain your inbox continually and triage every other agent\'s requests, answering clarifications so the team runs autonomously. (2) DELEGATE — decompose work and fan it out to the hive agents via their inboxes (route messages and assign owners; do not do their jobs); do NOT take on grunt implementation yourself. (3) OWN ONLY THE IMPORTANT, high-leverage things — task decomposition, dispatch decisions, sign-offs, conflict resolution, branch integration, and final QA — and remain the sole scribe of board.md. You are otherwise fully autonomous — there is NO separate approval queue. For the genuinely critical (destructive actions, spending real money, scope changes, unresolvable conflicts), ask the human directly in your own session and let the tool-permission prompt gate the action; the human approves natively, including remotely from their phone via /remote-control. Keep the team unblocked. When you DISPATCH a task, write it as a 4-part contract so the agent can run autonomously: (1) OBJECTIVE — the concrete goal; (2) OUTPUT — the expected deliverable/format; (3) TOOLS — what to use or avoid, and any references to read instead of re-deriving; (4) BOUNDARIES — scope limits + the definition of done. Pass references (file paths, message ids, board sections), not pasted content — keep dispatches short.'
- + ` MONITOR the floor by reading ${root}/fleet.json (live per-agent tokens, cost, status, last tool, breaker level, inbox backlog) and ${root}/registry.json — note that running 'claude agents' will NOT list your hive's sibling agents. A full Claude Code command reference is at ${root}/COMMANDS.md (slash commands act ONLY on your own session; CLI commands run in your shell and can target the fleet). You periodically receive scheduler / "Heartbeat" standup requests — on each, review every agent via fleet.json, re-engage anyone stalled, over-budget, or breaker-armed, and keep board.md and tasks.json accurate. Steward the token budget.`
+ + ` MONITOR the floor by reading ${root}/fleet.json (live per-agent tokens, cost, status, last tool, breaker level, inbox backlog) and ${root}/registry.json — note that running 'claude agents' will NOT list your hive's sibling agents. A full Claude Code command reference is at ${root}/COMMANDS.md (slash commands act ONLY on your own session; CLI commands run in your shell and can target the fleet). You periodically receive scheduler / "Heartbeat" standup requests — on each, review every agent via fleet.json, re-engage anyone stalled, over-budget, or breaker-armed, and keep board.md and tasks.json accurate. In tasks.json, ALWAYS set each task's "assignee" to the worker's agent id the moment you dispatch it, and NEVER clear it on status changes — a done card must still say who did the work (the human reads the board by who-did-what). Steward the token budget.`
: meta.isAssistant
? 'You are Michael\'s PREP ASSISTANT. You will be handed short, possibly vague instructions (each begins with "ENRICH TASK:"). For each one: (1) figure out which project it concerns and cd into the most relevant repo — you start in Michael\'s home directory; (2) gather concrete context READ-ONLY (exact file paths, current state, relevant code, conventions, active branch, gotchas) — NEVER modify, create, or delete files; (3) rewrite the instruction into ONE clear, self-contained prompt that Michael can execute autonomously, preserving the user\'s original intent without inventing scope. Then deliver it: write ONE message JSON into your outbox with "to":"god", "act":"request", a short subject, and the finished prompt as the body. Do NOT perform the task yourself — your only output is the improved prompt sent to Michael.'
: 'For anything ambiguous, cross-cutting, or needing sign-off, address a message to "god".';
diff --git a/src/renderer/src/components/CommandCenterPanel.tsx b/src/renderer/src/components/CommandCenterPanel.tsx
index 22ce9ae1..d6c1c2f7 100644
--- a/src/renderer/src/components/CommandCenterPanel.tsx
+++ b/src/renderer/src/components/CommandCenterPanel.tsx
@@ -83,6 +83,14 @@ const TABS: { key: CCTab; label: string; icon: Parameters<typeof Icon>[0]['name'
export function CommandCenterPanel({ agent }: { agent: Agent }) {
const [tab, setTab] = useState<CCTab>('terminal');
+ // External tab requests (the office task board click → 'tasks'). seq-keyed so
+ // clicking the board again re-opens the tab even if it was already requested.
+ const ccTabRequest = useStore((s) => s.ccTabRequest);
+ useEffect(() => {
+ if (ccTabRequest && TABS.some((t) => t.key === ccTabRequest.tab)) {
+ setTab(ccTabRequest.tab as CCTab);
+ }
+ }, [ccTabRequest]);
// A task-card "assign" pre-fills the Floor dispatch box and jumps to it. The
// counter bumps so re-assigning the same card re-seeds the textarea (the seed
// string alone wouldn't change). { seq } makes every assign distinct.
diff --git a/src/renderer/src/components/TasksKanban.tsx b/src/renderer/src/components/TasksKanban.tsx
index eff31ef8..af2a2a57 100644
--- a/src/renderer/src/components/TasksKanban.tsx
+++ b/src/renderer/src/components/TasksKanban.tsx
@@ -107,8 +107,16 @@ export function TasksKanban({ onAssign }: { onAssign: (prefill: string) => void
onAssign(`Task: ${t.title}\nContext: ${desc}\n`);
}, [onAssign]);
+ const restorableAgents = useStore((s) => s.restorableAgents);
+ /** Resolve an assignee id to a display name — falls back to the restorable
+ * roster so a done card keeps its author's name even after that worker's
+ * terminal is gone, then to the raw id. */
const nameFor = (id?: string): string | undefined =>
- id ? (agents.find((a) => a.id === id)?.name ?? id) : undefined;
+ id
+ ? (agents.find((a) => a.id === id)?.name
+ ?? restorableAgents.find((a) => a.id === id)?.name
+ ?? id)
+ : undefined;
return (
<div style={{ flex: 1, minHeight: 0, display: 'flex', flexDirection: 'column', background: 'var(--cth-paper-200)' }}>
diff --git a/src/renderer/src/scene/office/OfficeFloor.tsx b/src/renderer/src/scene/office/OfficeFloor.tsx
index 0e7df3c4..240c3669 100644
--- a/src/renderer/src/scene/office/OfficeFloor.tsx
+++ b/src/renderer/src/scene/office/OfficeFloor.tsx
@@ -1,5 +1,5 @@
import { useEffect, useRef } from 'react';
-import { Application, Container, Ticker, Texture } from 'pixi.js';
+import { Application, Container, Graphics, Ticker, Texture } from 'pixi.js';
// PixiJS uses new Function() internally, blocked by Electron CSP — this patches it.
import 'pixi.js/unsafe-eval';
import { useStore, type Agent } from '@/store/store';
@@ -438,6 +438,94 @@ export function OfficeFloor() {
startBreak(agent.id, rt);
};
+ // ─── The office task board: hive/tasks.json pinned to the wall ─────────
+ // A cork board hangs on the wall band above the open-plan desks, polled
+ // from the task ledger every 5s. Live notes (one per task) pin in urgency
+ // order — red (blocked) → yellow (todo) → blue (doing) — and finished
+ // tasks archive as a green stack on the little table beside it. The board
+ // is INTERACTIVE: clicking it selects the god agent and opens the Command
+ // Center's tasks tab (kanban) in the right panel.
+ const BOARD_TILE: Tile = { x: 8, y: 10 };
+ const NOTE_COLORS: Record<string, number> = {
+ todo: 0xf2df8a, doing: 0x9ecbf0, blocked: 0xf0a3a3, done: 0xa8e0b0
+ };
+ const tsB = mapRenderer.tileSize;
+ const boardG = new Graphics();
+ boardG.eventMode = 'static';
+ boardG.cursor = 'pointer';
+ boardG.position.set(BOARD_TILE.x * tsB, BOARD_TILE.y * tsB);
+ boardG.zIndex = (BOARD_TILE.y + 1) * tsB;
+ boardG.on('pointertap', (ev) => {
+ ev.stopPropagation();
+ const st = useStore.getState();
+ const god = st.agents.find((a) => a.isGod);
+ if (god) st.select(god.id);
+ st.requestCommandCenterTab('tasks');
+ });
+ charLayer.addChild(boardG);
+
+ const drawTaskBoard = (statuses: string[]): void => {
+ boardG.clear();
+ // The cork carries only LIVE work (todo/doing/blocked); finished notes
+ // are archived as a green stack on the little table beside it. Live
+ // notes pin in urgency order: red (blocked) → yellow (todo) → blue
+ // (doing), so trouble always hangs top-left where the eye lands first.
+ const NOTE_RANK: Record<string, number> = { blocked: 0, todo: 1, doing: 2 };
+ const active = statuses
+ .filter((s) => s !== 'done')
+ .sort((a, b) => (NOTE_RANK[a] ?? 3) - (NOTE_RANK[b] ?? 3));
+ const done = statuses.length - active.length;
+ // frame + cork, two tiles wide, hung on the wall face
+ boardG.rect(0, -8, 32, 22).fill(0x6e5639);
+ boardG.rect(1, -7, 30, 20).fill(0xc9b083);
+ // sticky notes, 4 per row, capped at 12 — a fuller ledger stacks a
+ // visibly thicker pile in the corner instead of overflowing the cork
+ const n = Math.min(active.length, 12);
+ for (let i = 0; i < n; i++) {
+ const col = i % 4;
+ const row = Math.floor(i / 4);
+ const x = 3 + col * 7;
+ const y = -4 + row * 6;
+ boardG.rect(x, y, 5, 4).fill(NOTE_COLORS[active[i]] ?? 0xf2eddc);
+ boardG.rect(x + 2, y, 1, 1).fill(0x4a3b52); // pin
+ }
+ if (active.length > 12) {
+ boardG.rect(24, 8, 5, 4).fill(0xe8e0c8);
+ boardG.rect(25, 7, 5, 4).fill(0xf2eddc);
+ boardG.rect(27, 9, 1, 1).fill(0x4a3b52);
+ }
+ // The archive table: every finished task adds a green sheet to the
+ // pile (visible stack capped at 6 — beyond that it just sits proud).
+ boardG.rect(34, 6, 14, 4).fill(0xb08d5e); // table top
+ boardG.rect(34, 10, 14, 4).fill(0x8a6f4d); // table front
+ boardG.rect(35, 14, 2, 2).fill(0x6e5639); // legs
+ boardG.rect(45, 14, 2, 2).fill(0x6e5639);
+ const stack = Math.min(done, 6);
+ for (let i = 0; i < stack; i++) {
+ boardG.rect(37 + (i % 2), 4 - i * 2, 8, 2)
+ .fill({ color: NOTE_COLORS.done, alpha: 1 })
+ .stroke({ color: 0x6e8f6e, width: 0.5 });
+ }
+ };
+ drawTaskBoard([]);
+
+ let lastTaskSig = '∅';
+ const pollTaskBoard = async (): Promise<void> => {
+ try {
+ const raw = await window.cth.hiveTasks() as { tasks?: Array<{ status?: string }> } | Array<{ status?: string }> | null;
+ const arr = Array.isArray(raw) ? raw : (raw?.tasks ?? []);
+ const statuses = arr.map((t) => String(t?.status ?? 'todo'));
+ const sig = statuses.join(',');
+ if (sig !== lastTaskSig) {
+ lastTaskSig = sig;
+ drawTaskBoard(statuses);
+ }
+ } catch { /* keep the last drawing */ }
+ };
+ void pollTaskBoard();
+ const taskBoardPoll = setInterval(() => { void pollTaskBoard(); }, 5000);
+ (app as any).__taskBoardPoll = taskBoardPoll;
+
const addCharacter = async (agent: Agent) => {
const charName = CAST_BY_NAME[agent.character] ? agent.character : DEFAULT_CHARACTER;
const member = CAST_BY_NAME[charName];
@@ -720,6 +808,7 @@ export function OfficeFloor() {
(a as any).__resize?.disconnect?.();
try { (a as any).__unsub?.(); } catch { /* noop */ }
try { (a as any).__offMessage?.(); } catch { /* noop */ }
+ try { clearInterval((a as any).__taskBoardPoll); } catch { /* noop */ }
safeDestroy(a);
}
appRef.current = null;
diff --git a/src/renderer/src/store/store.ts b/src/renderer/src/store/store.ts
index 17cd2575..489fc720 100644
--- a/src/renderer/src/store/store.ts
+++ b/src/renderer/src/store/store.ts
@@ -147,6 +147,10 @@ interface State {
removeArchivedAgent: (id: string) => void;
/** Drop one agent from the restorable list (it was respawned or dismissed). */
removeRestorableAgent: (id: string) => void;
+ /** One-shot request to open a Command-Center tab (e.g. clicking the office
+ * task board → 'tasks'). `seq` makes repeated identical requests distinct. */
+ ccTabRequest: { tab: string; seq: number } | null;
+ requestCommandCenterTab: (tab: string) => void;
/** Unsent composer drafts, per agent — so switching agents (which remounts the
* composer) doesn't eat what the user was typing. */
drafts: Record<string, string>;
@@ -434,6 +438,9 @@ export const useStore = create<State>((set) => ({
persistRestorable(restorableAgents);
return { restorableAgents };
}),
+ ccTabRequest: null,
+ requestCommandCenterTab: (tab) =>
+ set((s) => ({ ccTabRequest: { tab, seq: (s.ccTabRequest?.seq ?? 0) + 1 } })),
drafts: {},
setDraft: (agentId, text) =>
set((s) => ({ drafts: { ...s.drafts, [agentId]: text } })),