بنقرة واحدة
tool-worker
Handles reference tool implementations with full reversibility lifecycle
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Handles reference tool implementations with full reversibility lifecycle
التثبيت باستخدام 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 | tool-worker |
| description | Handles reference tool implementations with full reversibility lifecycle |
NOTE: Startup and cleanup are handled by worker-base. This skill defines the WORK PROCEDURE.
Features involving: individual tool implementations (file.write, email.send, calendar.create_event, db.migrate, stripe.charge), tool-specific reverse handlers, and tool-specific tests.
None.
Read context: Read mission.md, .factory/library/architecture.md. Read the tool registry at services/api/src/tools/registry.ts and step middleware at services/api/src/orchestrator/step.ts to understand the integration points.
TDD — tests FIRST: Write the test file BEFORE the implementation file. Each tool needs tests for:
classify() returns correct ReversibilityClass and ReversibilityMetadataexecute() performs the expected actionreverse() performs the expected undo/cancel/compensate (where applicable)runToolStep middlewareImplement the tool: Each tool file at services/api/src/tools/{tool-name}.ts must export:
export const toolName = {
classify(args: ToolArgs): ReversibilityMetadata { ... },
execute(args: ToolArgs, ctx: ToolContext): Promise<ToolResult> { ... },
reverse?(actionId: string, ctx: ToolContext): Promise<ReverseResult> { ... },
};
Register in tool registry: Import and register the tool in services/api/src/tools/registry.ts.
Class-specific behavior:
Mock external services: Use mock/stub for external APIs (email service, calendar API, Stripe). Structure mocks so real services can be swapped in later.
Verify:
bun run build passesbiome check . passes{
"salientSummary": "Implemented file.write tool with undoable reversibility — snapshot before write, restore on reverse. 6 tests written first (TDD), all passing. Tool registered in registry with classify() returning undoable.",
"whatWasImplemented": "services/api/src/tools/file-write.ts with classify(), execute(), reverse(). services/api/src/tools/__tests__/file-write.test.ts with 6 test cases.",
"whatWasLeftUndone": "",
"verification": {
"commandsRun": [
{ "command": "cd services/api && bunx vitest run src/tools/__tests__/file-write.test.ts", "exitCode": 0, "observation": "6 tests passed" },
{ "command": "bun run build", "exitCode": 0, "observation": "Clean build" }
],
"interactiveChecks": []
},
"tests": {
"added": [
{ "file": "services/api/src/tools/__tests__/file-write.test.ts", "cases": [
{ "name": "classify returns undoable", "verifies": "Correct reversibility class" },
{ "name": "execute writes file and stores snapshot", "verifies": "Write + snapshot creation" },
{ "name": "reverse restores from snapshot", "verifies": "Undo restores original content" },
{ "name": "reverse fails if no snapshot exists", "verifies": "Error handling for missing snapshot" }
]}
]
},
"discoveredIssues": []
}