con un clic
rust-worker
General-purpose Rust implementation worker for Switchboard codebase
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Menú
General-purpose Rust implementation worker for Switchboard codebase
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Basado en la clasificación ocupacional SOC
| name | rust-worker |
| description | General-purpose Rust implementation worker for Switchboard codebase |
NOTE: Startup and cleanup are handled by worker-base. This skill defines the WORK PROCEDURE.
Any feature that involves writing Rust code in the Switchboard workspace: new crates, new modules, wiring existing code, fixing bugs, adding tests, creating documentation.
None.
Read the feature description carefully. Understand preconditions, expected behavior, and verification steps.
Investigate existing code relevant to this feature. Read the files you'll modify. Understand patterns, imports, error handling conventions. Check .factory/library/architecture.md for system-level context.
Write tests first (TDD). For each behavior in expectedBehavior:
#[cfg(test)] module in the same file (following existing convention)tempfile::TempDir for any file/DB operationscargo test -p <crate> -- <test_name> to confirm the test fails (red)Implement the feature to make tests pass (green):
thiserror errors, tracing logging, ULID IDspub(crate) for internal APIs, pub only for cross-crate interfacesRun full validation:
cargo test --workspace --exclude app — all tests passcargo clippy --workspace --exclude app --all-targets -- -D warnings — zero warningscargo fmt --check — formattedManual verification (for features with observable behavior):
cargo build -p sb-cliinteractiveChecks entryCommit atomically. Each logical unit of work gets its own commit. Use conventional commit messages: feat(crate): description, fix(crate): description, test(crate): description.
{
"salientSummary": "Implemented the mark_done evidence guard in sb-mcp. Added regex scanner for TODO/FIXME/XXX/mock_/stub_ patterns in git diff of changed files. Ran cargo test -p sb-mcp (12 passing including 4 new evidence guard tests). Manual verification: piped mark_done JSON-RPC with a planted TODO in a test file, confirmed rejection with file:line locations in the error response.",
"whatWasImplemented": "mark_done MCP tool handler with configurable regex evidence guard. Scans git diff of changed files in the commit referenced by commit_sha evidence. Returns error with file:line locations if markers found. Supports require_evidence=false override (logged to event store). Added 4 unit tests covering: happy path, TODO rejection, FIXME rejection, and override path.",
"whatWasLeftUndone": "",
"verification": {
"commandsRun": [
{ "command": "cargo test -p sb-mcp", "exitCode": 0, "observation": "12 tests passed, 0 failed" },
{ "command": "cargo clippy --workspace --exclude app --all-targets -- -D warnings", "exitCode": 0, "observation": "No warnings" },
{ "command": "cargo fmt --check", "exitCode": 0, "observation": "Formatted" }
],
"interactiveChecks": [
{ "action": "Piped mark_done JSON-RPC with task containing TODO in changed file", "observed": "Received error response: todo_markers_present with paths [\"src/auth.rs:42\"]" },
{ "action": "Piped mark_done with require_evidence=false", "observed": "Received success response, event logged with override flag" }
]
},
"tests": {
"added": [
{
"file": "crates/sb-mcp/src/tools/mark_done.rs",
"cases": [
{ "name": "test_mark_done_happy_path", "verifies": "Task with clean commit completes successfully" },
{ "name": "test_mark_done_rejects_todo", "verifies": "TODO marker in changed file causes rejection" },
{ "name": "test_mark_done_rejects_fixme", "verifies": "FIXME marker in changed file causes rejection" },
{ "name": "test_mark_done_override", "verifies": "require_evidence=false bypasses check with audit log" }
]
}
]
},
"discoveredIssues": []
}