Dashboard

From SethGammon/Citadel · View interactive version

Dashboard is an AI agent skill from the GitHub repository SethGammon/Citadel. Real-time harness observability dashboard. Reads campaigns, fleet sessions, telemetry, and pending queues to present a snapshot of harness state at a glance. Invoked by /dashboard, /do status, or phrases like "what's happening" and "show activity".

How to use this skill

Skill file

/dashboard — Harness Observability Dashboard

When to Use

Inputs

None required. Works with whatever state exists on disk.

Protocol

Step 0: RUN DASHBOARD IMPLEMENTATION

Run the local dashboard implementation from the project root:

node scripts/dashboard.js

If the package scripts are available, this equivalent command is also valid:

npm run dashboard

The script is read-only. It renders a user-facing control-plane snapshot from

.planning/, telemetry, hook config, coordination state, worktrees, and cost

data. Use the manual collection protocol below only as a fallback if the script

is missing or fails in the current project.

Step 1: COLLECT STATE

Read the following sources. Each is optional — if a file or directory doesn't

exist, treat it as empty. Never crash on missing state.

Campaigns:

needs-completion and show:

node scripts/campaign.js complete <slug> --archive

report needs-archive and show the same archive command.

Evidence row is still pending, missing, or points at a missing local package,

report a repair before campaign completion:

node scripts/package-delivery.js <slug>

Cost Data (two sources, prefer real):

Fleet Sessions:

Recent Telemetry:

short description field. Format as relative time.

Recent Hook Activity (separate from general telemetry):

Hook Overhead (timing percentiles):

Routine Quota (account-wide 15 runs / 24h cap):

{"ts": "<ISO timestamp>", "kind": "RemoteTrigger" | "CronCreate" | "ScheduleWakeup"}

account; see docs/ROUTINE-QUOTA.md)

populates it when a routine mechanism is actually used. Local runners

(local-watch.js, local-daemon.js, local-schedule.js) never consume quota

and must not be counted.

Pending Queues:

Hook Value Data (for HOOKS VALUE section):

Hook Problem Taxonomy:

safety-block with info severity; they prove protection fired and do not

create a repair action by themselves.

severity; these are actionable.

severity; this is actionable.

approval-needed with medium severity; this is actionable.

tool-call entry in audit.jsonl, classify it as resolved-approval with

info severity; it should not create a repair action. Treat git push -u

and git push as equivalent for the same branch, and allow a small

near-simultaneous timestamp skew between hook and tool-call entries.

it as stale-approval with low severity; it should not create a current

repair action.

not create a repair action from stale entries.

present. Safety blocks remain visible in PROBLEMS and HOOKS VALUE.

Health:

.claude/hooks.json if template not present); use 0 if neither exists

Step 2: FORMAT RELATIVE TIMESTAMPS

Convert ISO timestamps: <60s → "just now" | <60min → "{N} min ago" | <24h → "{N} hr ago" | else → "{N} days ago". Display unparseable timestamps as-is.

Step 3: RENDER DASHBOARD

Output verbatim, substituting real values. Always show section headers even when content is "(none active)".

=== Citadel Dashboard ===
As of: {relative timestamp of most recent event, or "now"}

NEXT ACTION
  Command: {exact command}
  Why: {why this is next}
  Confidence: {low | medium | high}
  Repair available: {yes | no}
  Runbook: {docs or skill path}

REPAIR CONSOLE
  {repair|review} | {confidence} | {label}
    command: {exact command}
    why: {short reason}
    runbook: {docs or skill path}

CAMPAIGNS
  {slug}: Phase {N}/{total} — {direction, max 60 chars, ellipsis if truncated}
  Last event: {most recent telemetry entry for this campaign, or "no telemetry"}
  (none active)

COSTS
  This session: ${cost} | {duration} min | ${rate}/min | {messages} msgs | {agents} agents
  Today:        ${today_total} across {today_sessions} sessions
  All time:     ${all_time_total} across {all_time_sessions} sessions ({data_source})

  By campaign:
    {slug}: ${total_cost} across {sessions} sessions ({agents} agents, {minutes} min)
    _unattached: ${total_cost} across {sessions} sessions
  (no cost data recorded yet)

ROUTINE QUOTA
  Runs (last 24h): {N}/15
  WARNING: {N} of 15 routine runs used in the last 24h. Hitting the cap pauses every routine on the account. See docs/ROUTINE-QUOTA.md.
  (remote-run logging populates .planning/telemetry/routine-runs.jsonl - local runners do not consume quota)

HOOKS VALUE
  Circuit breaker: {N} trips (prevented token spirals)
  Quality gate:    {N} violations caught pre-commit
  Protect-files:   {N} blocks (path traversal, secrets)
  External gate:   {N} actions gated
  Total hook fires today: {N}
  (raw facts only -- no inflated savings claims)

FLEET SESSIONS
  {slug}: Wave {N} — {agent count} agents — {status}
  (none active)

RECENT ACTIVITY (last 10 events)
  {relative time} | {hook/event name} | {description}
  (no telemetry recorded yet)

HOOK ACTIVITY (last 10 hook fires)
  {relative time} | {hook name} | {duration_ms}ms | {outcome: pass/block/warn}
  (no hook timing recorded yet — set CITADEL_DEBUG=true in settings.json for verbose output)

HOOK OVERHEAD (sorted by p95 descending)
  hook                        count      p50      p95      max
  {hook name}                   {N}   {N}ms    {N}ms    {N}ms
  (no hook timing data recorded yet)

PROBLEMS
  Actionable: {N} | Safety blocks: {N} | Resolved approvals: {N} | Stale: {N}
  {relative time} | {severity} | {category} | {hook name} | {description}
  (none recorded)

PENDING
  Doc sync:     {N} items queued
  Merge reviews: {N} items queued
  Intake items:  {N} in .planning/intake/

HEALTH
  Circuit breaker trips this session: {N}
  Audit entries today:                {N}
  Hooks installed:                    {N}
  Operator tier:                      {novice | familiar | trusted} ({N} sessions, {N} campaigns)

QUICK COMMANDS
  /do continue    — resume active campaign
  /do rollback    — restore last checkpoint
  /telemetry      — cost breakdown, hook activity, telemetry settings
  /triage prs     — review open PRs
  /pr-watch       — watch PR CI
  /learn          — extract patterns from last completed campaign

Step 4: FRINGE CASE HANDLING

.planning/ missing: All zeros, "(none active)"; add "Run /do setup --express to initialize."

harness.json missing or malformed: Show "not configured" for hooks count; do not crash.

Malformed campaign file: Skip it; note (N campaign file(s) skipped — malformed).

Large telemetry files: Read last 50 lines only.

Missing timestamps: Fall back to file modification time; display entry without timestamp if unavailable.

All campaigns completed: Note "No active campaigns" at top of CAMPAIGNS section.

Completed campaign still active: Show the exact node scripts/campaign.js complete <slug> --archive repair command; suggesting /do continue here is wrong because the campaign is already finished.

Campaign ready for review package: Show the exact node scripts/package-delivery.js <slug> repair command before showing campaign completion.

All fleet sessions idle: Note "No active fleet sessions" under FLEET SESSIONS.

routine-runs.jsonl missing or no runs in window: Show Runs (last 24h): 0/15 plus the one-line population hint; only show the WARNING line when more than 12 runs are counted.

Mixed state: Proceed with whatever state exists; note each missing directory inline.

Doc-sync backlog: Surface /learn --doc-sync as a repair action with skills/learn/SKILL.md as runbook.

Dirty worktree: Surface git status --short as a review action; do not suggest destructive cleanup.

Only safety blocks recorded: Show them in PROBLEMS and HOOKS VALUE, but do not surface /telemetry as NEXT ACTION.

Actionable hook problem recorded: Surface /telemetry as repair action with skills/telemetry/SKILL.md as runbook.

Contextual Gates

Disclosure: "Displaying harness dashboard. No files modified."

Reversibility: green — read-only; no files modified

Trust gates:

Quality Gates

Exit Protocol

/dashboard does not produce a HANDOFF block. It is a read-only observability

tool. After displaying the dashboard, wait for the next user command.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.