ワンクリックで
activity-ledger-patterns
When fetching activity data for UI display, or debugging why activity-based features show empty/stale data.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
When fetching activity data for UI display, or debugging why activity-based features show empty/stale data.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
How the multi-backend adapter system works — AgentAdapter interface, ACP protocol, session resume, and how to add new provider adapters
When debugging why an agent has the wrong provider/model, or when modifying agent creation or delegation flows.
How to get agents to use group chats for peer coordination in flightdeck-based crews. Covers hub-and-spoke anti-pattern, auto-grouping triggers, and file-lock-linked groups. Use when setting up multi-agent crews with 3+ agents or diagnosing why agents aren't collaborating directly.
When fetching from the `/coordination/activity` API and you only need specific action types (e.g., `progress_update`, `task_completed`, `delegated`).
Architecture decisions and patterns from Flightdeck development (Phases 2–4). Covers feature architecture, state management, component patterns, and API design.
Known bugs and root causes encountered during Flightdeck development. Check this list before debugging — you may be hitting a known issue.
| name | activity-ledger-patterns |
| description | When fetching activity data for UI display, or debugging why activity-based features show empty/stale data. |
When to use: When fetching activity data for UI display, or debugging why activity-based features show empty/stale data.
The ActivityLedger (packages/server/src/coordination/activity/ActivityLedger.ts) is a buffered, DB-backed event log. All agent actions (status changes, messages, locks, progress updates, delegations) are logged here.
activityLedger.log(agentId, agentRole, actionType, summary, details, projectId)flush() writes batch to activity_log SQLite tableActivityEntry is also emitted via EventEmitter for real-time listenersgetRecent(limit, projectId?) — most recent N entries (any type)getByType(actionType, limit, projectId?) — most recent N of a specific typegetByAgent(agentId, limit, projectId?) — most recent N from a specific agentgetSince(timestamp, projectId?) — all entries after a timestampNever fetch generic activities and filter client-side when looking for a specific type.
// BAD — fetches 50 of ANY type, then filters client-side
const all = await apiFetch('/coordination/activity?limit=50');
const progress = all.filter(a => a.actionType === 'progress_update');
// Result: empty array if progress_update is >50 entries behind the latest
Activity types have vastly different frequencies:
status_change: ~15,000 entries (dominates)message_sent: ~3,000lock_acquired: ~1,200progress_update: ~100 (rare — easily buried)A limit=50 generic query will almost never contain progress_update entries.
// GOOD — use server-side type filter
const progress = await apiFetch('/coordination/activity?type=progress_update&limit=15');
The API at GET /coordination/activity (defined in packages/server/src/routes/coordination.ts:66-81) supports these query params:
type — filters by actionType (calls getByType())agentId — filters by agent (calls getByAgent())since — returns all after timestamp (calls getSince())limit — max results (default 50, max 1000)projectId — scope to a single projectThe HomeDashboard fetches activity data once on mount with no polling interval. For real-time updates, add either:
setInterval polling loop (simple, 15-30s interval)activity event from ActivityLedger| File | Lines | Role |
|---|---|---|
packages/server/src/coordination/activity/ActivityLedger.ts | 31-58 | log() — buffered write |
packages/server/src/coordination/activity/ActivityLedger.ts | 108-119 | getByType() — server-side type filter |
packages/server/src/routes/coordination.ts | 66-81 | API endpoint with type/agent/since params |
packages/web/src/components/HomeDashboard/HomeDashboard.tsx | 292 | Frontend fetch call |