원클릭으로
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": []
}