ワンクリックで
surface-worker
Handles messaging surface adapters, approval cards, commands, and web pages
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Handles messaging surface adapters, approval cards, commands, and web pages
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
View and search the AGIT audit trail. Show timeline of all agent actions with signatures, reversibility classes, and verification links.
Cryptographic signing + audit trail for every tool call. FIDES Ed25519 signatures + AGIT commit log. Every action is signed before execution, committed to an immutable audit trail, and classified into a reversibility class.
Undo, cancel, or compensate agent actions. Manages the 5-class reversibility model for all tool executions.
Handles sandbox (Daytona/E2B), browser automation (Steel), computer use, and tier gating
Handles FIDES/AGIT integration, reversibility model, tool registry, and step middleware
Handles infrastructure, database, auth, and build system features
| name | surface-worker |
| description | Handles messaging surface adapters, approval cards, commands, and web pages |
NOTE: Startup and cleanup are handled by worker-base. This skill defines the WORK PROCEDURE.
Features involving: approval card renderers (Slack, Telegram, Discord, WhatsApp, Web), surface adapters (Teams, Google Chat, iMessage, Signal), slash commands (/undo, /doctor), web pages (/timeline, /settings/schedules), Chat SDK integration.
None.
Read context: Read mission.md, .factory/library/architecture.md, .factory/research/chat-sdk.md. Read existing messaging adapters at services/api/src/messaging/ and bot code at services/api/src/bot/ to understand current patterns.
Write tests first (TDD): For card renderers, test that the output matches the platform's expected format. For adapters, test event handling and routing.
Approval card renderers: Each surface needs a function that takes an ApprovalCard type and returns the platform-native format:
text + reply_markup.inline_keyboardembeds (badge color as hex) + components (action rows)New surface adapters: Use Chat SDK (@chat-adapter/*). Follow the existing patterns in services/api/src/messaging/. Each adapter must:
Slash commands: Parse /undo and /doctor from incoming messages before passing to the agent. The command parser should work across all surfaces.
Web pages: Follow existing Next.js App Router patterns in apps/web/src/app/. Use shadcn/ui components, Tailwind 4, Phosphor icons. Use Convex hooks (useQuery, useMutation) for data.
Verify:
bun run build passesbiome check . passes{
"salientSummary": "Built shared ApprovalCard type, implemented Slack Block Kit renderer with 4-color badge system, Telegram inline keyboard renderer, Discord components renderer, and WhatsApp interactive renderer. 16 tests passing across all platforms.",
"whatWasImplemented": "services/api/src/messaging/types.ts — ApprovalCard + BadgeColor types. services/api/src/messaging/slack.ts — renderSlackApprovalCard(). Telegram, Discord, WhatsApp renderers similarly. Tests for all 4 renderers verifying platform-specific output format.",
"whatWasLeftUndone": "",
"verification": {
"commandsRun": [
{ "command": "cd services/api && bunx vitest run src/messaging/__tests__/", "exitCode": 0, "observation": "16 tests passed" },
{ "command": "bun run build", "exitCode": 0, "observation": "Clean build" }
],
"interactiveChecks": []
},
"tests": {
"added": [
{ "file": "services/api/src/messaging/__tests__/approval-cards.test.ts", "cases": [
{ "name": "Slack card has section, context, actions blocks", "verifies": "Block Kit structure" },
{ "name": "Telegram card has inline keyboard", "verifies": "Telegram API format" },
{ "name": "Badge color matches reversibility class", "verifies": "4-color system consistency" }
]}
]
},
"discoveredIssues": []
}