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: ASK ME - first-class human feedback through the task system

Gulum98486f9af55d
diff --git a/src/main/hive.ts b/src/main/hive.ts
index 21e26d00..99ec5f24 100644
--- a/src/main/hive.ts
+++ b/src/main/hive.ts
@@ -46,6 +46,15 @@ export interface HiveMessage {
created_at: string;
}
+/** One question→answer exchange with the human, recorded ON the task card so
+ * the decision trail stays with the work it unblocked. */
+export interface HumanQA {
+ q: string;
+ a?: string;
+ askedAt?: string;
+ answeredAt?: string;
+}
+
export interface HiveTask {
id: string;
title: string;
@@ -55,6 +64,10 @@ export interface HiveTask {
dependsOn: string[];
priority: number;
createdAt: string;
+ /** First-class human feedback: the god appends {q} when a card can only
+ * proceed with the human's input (status goes blocked); the harness UI
+ * fills in {a}. The full history stays on the card forever. */
+ humanQA?: HumanQA[];
}
export interface AgentMeta {
@@ -460,7 +473,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. 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.`
+ + ` 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). HUMAN FEEDBACK is first-class in the ledger: when a task can only proceed with the human's input, set its status to "blocked" and append the concrete question to the card's "humanQA" array (push {"q":"...","askedAt":"<iso>"}; keep every past entry — the Q&A history documents the card's decisions). The harness surfaces open questions on the office floor's ASK ME board; the human's answer lands in the same entry ("a") AND arrives as an inbox message to you — read it, act on it, and unblock the card so work continues. Do NOT park human questions in separate files (no HumanQuestion.md) and never sit waiting on the human in your own session. 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/preload/index.ts b/src/preload/index.ts
index 2e224ddd..c6786842 100644
--- a/src/preload/index.ts
+++ b/src/preload/index.ts
@@ -32,6 +32,14 @@ export interface HiveRegistry {
agents: Record<string, HiveAgentMeta & { status: string; lastSeen: number; archived?: boolean }>;
}
+/** One question→answer exchange with the human, recorded ON the task card. */
+export interface HumanQA {
+ q: string;
+ a?: string;
+ askedAt?: string;
+ answeredAt?: string;
+}
+
/** A card on the task kanban, persisted to hive/tasks.json. */
export interface HiveTask {
id: string;
@@ -42,6 +50,9 @@ export interface HiveTask {
dependsOn: string[];
priority: number;
createdAt: string;
+ /** First-class human feedback: god appends {q}, the harness UI fills {a};
+ * the full history stays on the card. */
+ humanQA?: HumanQA[];
}
/** A message the router just delivered, with its resolved recipient ids. Drives
diff --git a/src/renderer/src/components/AskMeTab.tsx b/src/renderer/src/components/AskMeTab.tsx
new file mode 100644
index 00000000..4edb9c2a
--- /dev/null
+++ b/src/renderer/src/components/AskMeTab.tsx
@@ -0,0 +1,191 @@
+import { useCallback, useEffect, useRef, useState } from 'react';
+import { PixelButton } from './PixelButton';
+import { PixelBadge } from './PixelBadge';
+import { useStore } from '@/store/store';
+import { type HiveTask, openQuestion, waitsOnHuman } from './TasksKanban';
+
+/**
+ * ASK ME — first-class human feedback through the task system.
+ *
+ * Tasks the god can only move with the human's input sit here: each card shows
+ * its open question, a place to answer, and the CASCADE of downstream tasks
+ * that are stuck waiting on this one — so "why isn't X done?" reads as "ah,
+ * because I still owe an answer here."
+ *
+ * Sending an answer does two things atomically-ish:
+ * 1. writes it into the card's humanQA entry in hive/tasks.json (the
+ * decision is documented ON the task, forever), and
+ * 2. mails the god so it picks the answer up, unblocks the card, and the
+ * work continues — no separate HumanQuestion.md side-channel anymore.
+ */
+
+const POLL_MS = 5000;
+
+function parse(raw: unknown): HiveTask[] {
+ const list = (raw && typeof raw === 'object' && Array.isArray((raw as { tasks?: unknown }).tasks))
+ ? (raw as { tasks: HiveTask[] }).tasks
+ : [];
+ return list.filter((t) => !!t && typeof t === 'object');
+}
+
+/** All tasks transitively waiting on `id` (dependents chain), cycle-safe. */
+function dependentsTree(id: string, all: HiveTask[], seen = new Set<string>()): HiveTask[] {
+ if (seen.has(id)) return [];
+ seen.add(id);
+ const direct = all.filter((t) => Array.isArray(t.dependsOn) && t.dependsOn.includes(id) && t.status !== 'done');
+ return direct.flatMap((d) => [d, ...dependentsTree(d.id, all, seen)]);
+}
+
+export function AskMeTab() {
+ const agents = useStore((s) => s.agents);
+ const restorable = useStore((s) => s.restorableAgents);
+ const [tasks, setTasks] = useState<HiveTask[]>([]);
+ const [drafts, setDrafts] = useState<Record<string, string>>({});
+ const [sending, setSending] = useState<string | null>(null);
+ const timer = useRef<ReturnType<typeof setInterval> | null>(null);
+
+ const refresh = useCallback(async () => {
+ try { setTasks(parse(await window.cth.hiveTasks())); } catch { /* keep last good */ }
+ }, []);
+
+ useEffect(() => {
+ refresh();
+ timer.current = setInterval(refresh, POLL_MS);
+ return () => { if (timer.current) clearInterval(timer.current); };
+ }, [refresh]);
+
+ const nameFor = (id?: string): string | undefined =>
+ id ? (agents.find((a) => a.id === id)?.name ?? restorable.find((a) => a.id === id)?.name ?? id) : undefined;
+
+ const waiting = tasks.filter(waitsOnHuman);
+
+ const sendAnswer = async (task: HiveTask) => {
+ const text = (drafts[task.id] ?? '').trim();
+ const open = openQuestion(task);
+ if (!text || !open || sending) return;
+ setSending(task.id);
+ try {
+ // 1) Document the answer ON the card.
+ const next = tasks.map((t) => {
+ if (t.id !== task.id) return t;
+ const qa = (t.humanQA ?? []).map((e) =>
+ e === open || (e.q === open.q && !e.a)
+ ? { ...e, a: text, answeredAt: new Date().toISOString() }
+ : e
+ );
+ return { ...t, humanQA: qa };
+ });
+ await window.cth.hiveWriteTasks(next);
+ setTasks(next);
+ // 2) Tell the god, so the card gets unblocked and work continues.
+ await window.cth.hiveSend({
+ to: 'god',
+ act: 'inform',
+ subject: `HUMAN ANSWER on task "${task.title}"`,
+ body: [
+ `The human answered the open question on task ${task.id} ("${task.title}"):`,
+ `Q: ${open.q}`,
+ `A: ${text}`,
+ 'The answer is also recorded in the card\'s humanQA. Act on it, unblock the card, and continue the work.'
+ ].join('\n')
+ }, 'human');
+ setDrafts((d) => ({ ...d, [task.id]: '' }));
+ } catch { /* leave the draft so the user can retry */ }
+ setSending(null);
+ };
+
+ return (
+ <div style={{ flex: 1, minHeight: 0, overflowY: 'auto', background: 'var(--cth-paper-200)', padding: 10, display: 'flex', flexDirection: 'column', gap: 10 }}>
+ {waiting.length === 0 && (
+ <div style={{ textAlign: 'center', padding: '24px 12px', color: 'var(--cth-ink-500)', fontSize: 13 }}>
+ Nothing needs you right now. 🌿<br />
+ <span style={{ fontSize: 11, color: 'var(--cth-ink-300)' }}>
+ When the team blocks a task on your input, it shows up here (and on the ASK ME board on the floor).
+ </span>
+ </div>
+ )}
+ {waiting.map((t) => {
+ const open = openQuestion(t)!;
+ const stuck = dependentsTree(t.id, tasks);
+ return (
+ <div key={t.id} style={{
+ background: 'var(--cth-paper-100)', boxShadow: 'inset 0 0 0 1px var(--cth-ink-700)',
+ display: 'flex', flexDirection: 'column'
+ }}>
+ {/* header: title + assignee */}
+ <div style={{
+ display: 'flex', alignItems: 'center', gap: 8, padding: '6px 9px',
+ background: 'var(--cth-lilac-light, #ece2f5)', boxShadow: 'inset 0 -1px 0 var(--cth-ink-700)'
+ }}>
+ <span style={{ fontFamily: 'var(--cth-font-ui)', fontSize: 13, color: 'var(--cth-ink-900)', flex: 1, minWidth: 0, overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' }}>
+ {t.title}
+ </span>
+ {nameFor(t.assignee) && <PixelBadge status="blocked" label={nameFor(t.assignee)!} />}
+ </div>
+
+ <div style={{ padding: 9, display: 'flex', flexDirection: 'column', gap: 8 }}>
+ {/* the question */}
+ <div style={{ fontSize: 13, lineHeight: '19px', color: 'var(--cth-ink-900)', whiteSpace: 'pre-wrap' }}>
+ {open.q}
+ </div>
+
+ {/* answer box */}
+ <textarea
+ value={drafts[t.id] ?? ''}
+ onChange={(e) => setDrafts((d) => ({ ...d, [t.id]: e.target.value }))}
+ onKeyDown={(e) => { if (e.key === 'Enter' && (e.metaKey || e.ctrlKey)) void sendAnswer(t); }}
+ rows={3}
+ placeholder="Your answer… (Ctrl+Enter to send)"
+ style={{
+ width: '100%', boxSizing: 'border-box', padding: '6px 8px', resize: 'vertical',
+ background: 'var(--cth-paper-100)', border: 'none',
+ boxShadow: 'inset 0 0 0 1px var(--cth-ink-700)',
+ fontFamily: 'var(--cth-font-ui)', fontSize: 13, lineHeight: '18px',
+ color: 'var(--cth-ink-900)', outline: 'none'
+ }}
+ />
+ <div style={{ display: 'flex', alignItems: 'center', gap: 8 }}>
+ <PixelButton
+ variant="primary" size="sm"
+ disabled={!(drafts[t.id] ?? '').trim() || sending === t.id}
+ onClick={() => void sendAnswer(t)}
+ >
+ {sending === t.id ? 'sending…' : 'answer & unblock'}
+ </PixelButton>
+ {(t.humanQA?.filter((e) => e.a).length ?? 0) > 0 && (
+ <span style={{ fontSize: 10, color: 'var(--cth-ink-500)', fontFamily: 'var(--cth-font-display)' }}>
+ {t.humanQA!.filter((e) => e.a).length} EARLIER ANSWER{t.humanQA!.filter((e) => e.a).length === 1 ? '' : 'S'} ON THIS CARD
+ </span>
+ )}
+ </div>
+
+ {/* the cascade: what's stuck behind this answer */}
+ {stuck.length > 0 && (
+ <div style={{ display: 'flex', flexDirection: 'column', gap: 3 }}>
+ <div style={{ fontFamily: 'var(--cth-font-display)', fontSize: 8, color: 'var(--cth-coral)' }}>
+ BLOCKING {stuck.length} DOWNSTREAM TASK{stuck.length === 1 ? '' : 'S'}
+ </div>
+ {stuck.slice(0, 6).map((d, i) => (
+ <div key={d.id} style={{
+ display: 'flex', alignItems: 'center', gap: 6,
+ paddingLeft: 8 + Math.min(i, 3) * 8,
+ fontSize: 12, color: 'var(--cth-ink-700)'
+ }}>
+ <span style={{ color: 'var(--cth-ink-300)' }}>└</span>
+ <span style={{ width: 7, height: 7, flexShrink: 0, background: d.status === 'blocked' ? 'var(--cth-coral)' : 'var(--cth-sky)', boxShadow: 'inset 0 0 0 1px var(--cth-ink-900)' }} />
+ <span style={{ overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' }}>{d.title}</span>
+ {nameFor(d.assignee) && <span style={{ fontSize: 10, color: 'var(--cth-ink-500)' }}>({nameFor(d.assignee)})</span>}
+ </div>
+ ))}
+ {stuck.length > 6 && (
+ <div style={{ paddingLeft: 14, fontSize: 11, color: 'var(--cth-ink-300)' }}>… +{stuck.length - 6} more</div>
+ )}
+ </div>
+ )}
+ </div>
+ </div>
+ );
+ })}
+ </div>
+ );
+}
diff --git a/src/renderer/src/components/CommandCenterPanel.tsx b/src/renderer/src/components/CommandCenterPanel.tsx
index d6c1c2f7..38b8fde5 100644
--- a/src/renderer/src/components/CommandCenterPanel.tsx
+++ b/src/renderer/src/components/CommandCenterPanel.tsx
@@ -6,6 +6,7 @@ import { SpritePortrait } from './SpritePortrait';
import { PtyTerminalView } from './PtyTerminalView';
import { MessageQueueComposer } from './MessageQueueComposer';
import { TasksKanban } from './TasksKanban';
+import { AskMeTab } from './AskMeTab';
import { disposeTerminal } from './terminalPool';
import { Icon } from './Icon';
import { MemoryGraphPanel } from './MemoryGraphPanel';
@@ -20,7 +21,7 @@ import { buildSpawnCommand, AGENT_MODELS } from '@/store/config';
* per-agent model + dispatch + assistant access), a memory view, and a live
* activity feed / board / usage meter. */
-type CCTab = 'terminal' | 'floor' | 'tasks' | 'memory' | 'graph' | 'activity' | 'handbook';
+type CCTab = 'terminal' | 'floor' | 'tasks' | 'human' | 'memory' | 'graph' | 'activity' | 'handbook';
/** A recurring auto-dispatched mission (mirrors the main-process config type). */
interface ScheduledMission {
@@ -75,6 +76,7 @@ const TABS: { key: CCTab; label: string; icon: Parameters<typeof Icon>[0]['name'
{ key: 'terminal', label: 'terminal', icon: 'terminal' },
{ key: 'floor', label: 'monitor', icon: 'mcp' },
{ key: 'tasks', label: 'tasks', icon: 'check' },
+ { key: 'human', label: 'ask me', icon: 'bell' },
{ key: 'memory', label: 'memory', icon: 'sparkle' },
{ key: 'graph', label: 'graph', icon: 'web' },
{ key: 'activity', label: 'activity', icon: 'bell' },
@@ -197,6 +199,7 @@ export function CommandCenterPanel({ agent }: { agent: Agent }) {
}}
/>
)}
+ {tab === 'human' && <AskMeTab />}
{tab === 'memory' && (
<MemoryTab godId={agent.id} who={selectedMemoryAgent ?? undefined} onWho={setSelectedMemoryAgent} />
)}
diff --git a/src/renderer/src/components/TasksKanban.tsx b/src/renderer/src/components/TasksKanban.tsx
index b239603f..76ca1057 100644
--- a/src/renderer/src/components/TasksKanban.tsx
+++ b/src/renderer/src/components/TasksKanban.tsx
@@ -9,6 +9,13 @@ import { useStore } from '@/store/store';
* re-declared locally so the renderer doesn't reach into the preload package
* (same convention as store/config.ts). Structurally compatible with
* window.cth.hiveWriteTasks. */
+export interface HumanQA {
+ q: string;
+ a?: string;
+ askedAt?: string;
+ answeredAt?: string;
+}
+
export interface HiveTask {
id: string;
title: string;
@@ -18,6 +25,24 @@ export interface HiveTask {
dependsOn: string[];
priority: number;
createdAt: string;
+ /** First-class human feedback: the god appends {q} when a card needs the
+ * human; the ASK ME view fills in {a}. Full history stays on the card. */
+ humanQA?: HumanQA[];
+}
+
+/** The card's currently open question for the human, if any. */
+export function openQuestion(t: HiveTask): HumanQA | undefined {
+ if (!Array.isArray(t.humanQA)) return undefined;
+ for (let i = t.humanQA.length - 1; i >= 0; i--) {
+ const e = t.humanQA[i];
+ if (e && typeof e.q === 'string' && !e.a) return e;
+ }
+ return undefined;
+}
+
+/** Waiting on the human = blocked with an unanswered question on the card. */
+export function waitsOnHuman(t: HiveTask): boolean {
+ return t.status === 'blocked' && !!openQuestion(t);
}
type Status = HiveTask['status'];
@@ -63,7 +88,17 @@ function parseTasks(raw: unknown): HiveTask[] {
? (t.status as Status) : 'todo',
dependsOn: Array.isArray(t.dependsOn) ? t.dependsOn.filter((d): d is string => typeof d === 'string') : [],
priority: typeof t.priority === 'number' ? t.priority : 3,
- createdAt: typeof t.createdAt === 'string' ? t.createdAt : new Date().toISOString()
+ createdAt: typeof t.createdAt === 'string' ? t.createdAt : new Date().toISOString(),
+ humanQA: Array.isArray(t.humanQA)
+ ? (t.humanQA as unknown[])
+ .filter((e): e is Record<string, unknown> => !!e && typeof e === 'object' && typeof (e as { q?: unknown }).q === 'string')
+ .map((e) => ({
+ q: e.q as string,
+ a: typeof e.a === 'string' ? e.a : undefined,
+ askedAt: typeof e.askedAt === 'string' ? e.askedAt : undefined,
+ answeredAt: typeof e.answeredAt === 'string' ? e.answeredAt : undefined
+ }))
+ : undefined
}));
}
@@ -244,6 +279,14 @@ function TaskCard({ task, accent, assigneeName, onOpen }: {
</span>
)}
</span>
+ {waitsOnHuman(task) && (
+ <span title="waiting on YOUR answer — see the ASK ME tab" style={{
+ alignSelf: 'center', marginRight: 6, flexShrink: 0,
+ fontFamily: 'var(--cth-font-display)', fontSize: 10, padding: '2px 5px 1px',
+ background: 'var(--cth-lilac)', color: 'var(--cth-ink-900)',
+ boxShadow: 'inset 0 0 0 1px var(--cth-ink-900)'
+ }}>?</span>
+ )}
</button>
);
}
@@ -311,6 +354,41 @@ function TaskDetail({ task, all, assigneeName, onMove, onAssign, onClose }: {
{task.description?.trim() || <span style={{ color: 'var(--cth-ink-300)' }}>(no description on this card)</span>}
</div>
+ {/* The human Q&A trail — every decision documented on the card */}
+ {(task.humanQA?.length ?? 0) > 0 && (
+ <div style={{ display: 'flex', flexDirection: 'column', gap: 4 }}>
+ <div style={{ fontFamily: 'var(--cth-font-display)', fontSize: 8, color: 'var(--cth-ink-500)' }}>
+ HUMAN Q&A
+ </div>
+ {task.humanQA!.map((e, i) => (
+ <div key={i} style={{ display: 'flex', flexDirection: 'column', gap: 2 }}>
+ <div style={{
+ padding: '5px 7px', background: 'var(--cth-lilac-light, #ece2f5)',
+ boxShadow: 'inset 0 0 0 1px var(--cth-ink-300)',
+ fontSize: 12, lineHeight: '17px', color: 'var(--cth-ink-900)', whiteSpace: 'pre-wrap'
+ }}>
+ <span style={{ fontFamily: 'var(--cth-font-display)', fontSize: 8, marginRight: 6 }}>Q</span>
+ {e.q}
+ </div>
+ {e.a ? (
+ <div style={{
+ padding: '5px 7px', background: 'var(--cth-mint-light, #d9eed9)',
+ boxShadow: 'inset 0 0 0 1px var(--cth-ink-300)',
+ fontSize: 12, lineHeight: '17px', color: 'var(--cth-ink-900)', whiteSpace: 'pre-wrap'
+ }}>
+ <span style={{ fontFamily: 'var(--cth-font-display)', fontSize: 8, marginRight: 6 }}>A</span>
+ {e.a}
+ </div>
+ ) : (
+ <div style={{ fontSize: 11, color: 'var(--cth-coral)', fontFamily: 'var(--cth-font-display)' }}>
+ AWAITING YOUR ANSWER — ASK ME TAB
+ </div>
+ )}
+ </div>
+ ))}
+ </div>
+ )}
+
{/* Dependencies, resolved to titles */}
{deps.length > 0 && (
<div style={{ display: 'flex', flexDirection: 'column', gap: 4 }}>
diff --git a/src/renderer/src/scene/office/OfficeFloor.tsx b/src/renderer/src/scene/office/OfficeFloor.tsx
index 27e5ab9e..a3afd940 100644
--- a/src/renderer/src/scene/office/OfficeFloor.tsx
+++ b/src/renderer/src/scene/office/OfficeFloor.tsx
@@ -541,6 +541,53 @@ export function OfficeFloor() {
};
drawTaskBoard([]);
+ // ─── The ASK ME board: tasks waiting on the HUMAN, first class ─────────
+ // Hangs on the right wall run (between the second doorway and the war
+ // room): one lilac note per open question the god parked for the human.
+ // It pulses while anything waits — clicking it opens the Command Center's
+ // ASK ME tab, where the human reads the questions, answers, and the
+ // answers flow back to the god (documented on the card itself).
+ const askG = new Graphics();
+ askG.eventMode = 'static';
+ askG.cursor = 'pointer';
+ askG.position.set(14 * tsB + 25, 10 * tsB);
+ askG.zIndex = 11 * tsB;
+ askG.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('human');
+ });
+ charLayer.addChild(askG);
+ let askCount = 0;
+ let askPulse = 0;
+ const drawAskBoard = (pulse: number): void => {
+ askG.clear();
+ // lilac-framed board with a big "?" identity
+ askG.rect(0, -8, 30, 22).fill(0x5b4a6b);
+ askG.rect(1, -7, 28, 3).fill(0xcdb4e8);
+ askG.rect(1, -4, 28, 17).fill(0xc9b083);
+ if (askCount === 0) {
+ // quiet: a faint "?" watermark
+ askG.rect(13, -1, 4, 2).fill({ color: 0x8a755f, alpha: 0.8 });
+ askG.rect(15, 1, 2, 4).fill({ color: 0x8a755f, alpha: 0.8 });
+ askG.rect(15, 7, 2, 2).fill({ color: 0x8a755f, alpha: 0.8 });
+ } else {
+ const n = Math.min(askCount, 8);
+ for (let i = 0; i < n; i++) {
+ const x = 3 + (i % 4) * 7;
+ const y = -2 + Math.floor(i / 4) * 6;
+ askG.rect(x, y, 5, 4).fill(0xcdb4e8);
+ askG.rect(x + 2, y, 1, 1).fill(0x4a3b52);
+ }
+ // attention pulse around the frame while questions wait
+ const a = 0.35 + 0.3 * Math.sin(pulse * 4);
+ askG.rect(-2, -10, 34, 26).stroke({ color: 0xcdb4e8, width: 2, alpha: a });
+ }
+ };
+ drawAskBoard(0);
+
// ─── Board choreography: every ledger move is ACTED on the floor ───────
// Michael walks over and pins fresh cards; an assigned worker walks to
// the TODO board, takes its note and carries it home; finishing carries
@@ -645,6 +692,9 @@ export function OfficeFloor() {
startMove(mv);
}
}
+ // the ASK ME board pulses for attention while questions wait
+ askPulse += dt;
+ if (askCount > 0) drawAskBoard(askPulse);
// global watchdog: if anything has been in flight too long, hard-sync
moveWatchdog += dt;
if (moveWatchdog > 30 && busyActors.size > 0) {
@@ -671,13 +721,23 @@ export function OfficeFloor() {
let firstPoll = true;
const pollTaskBoard = async (): Promise<void> => {
try {
- const raw = await window.cth.hiveTasks() as { tasks?: Array<{ id?: string; status?: string; assignee?: string }> } | null;
+ const raw = await window.cth.hiveTasks() as { tasks?: Array<{ id?: string; status?: string; assignee?: string; humanQA?: Array<{ q?: string; a?: string }> }> } | null;
const arr = (raw && Array.isArray(raw.tasks)) ? raw.tasks : [];
const ledger: LedgerTask[] = arr.map((t, i) => ({
id: typeof t?.id === 'string' && t.id ? t.id : `idx-${i}`,
status: String(t?.status ?? 'todo'),
assignee: typeof t?.assignee === 'string' && t.assignee ? t.assignee : undefined
}));
+ // tasks waiting on the HUMAN feed the ASK ME board's note count
+ const newAsk = arr.filter((t) =>
+ String(t?.status) === 'blocked'
+ && Array.isArray(t?.humanQA)
+ && t!.humanQA!.some((e) => e && typeof e.q === 'string' && !e.a)
+ ).length;
+ if (newAsk !== askCount) {
+ askCount = newAsk;
+ drawAskBoard(askPulse);
+ }
if (firstPoll) {
// cold start: no theatre, just show the truth
firstPoll = false;