Initial commit: DevClaw OpenClaw plugin

Multi-project dev/qa pipeline orchestration with 4 agent tools:
- task_pickup: atomic task pickup with model selection and session reuse
- task_complete: DEV done, QA pass/fail/refine with label transitions
- queue_status: task queue and worker status across projects
- session_health: zombie detection and state consistency checks

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Lauren ten Hoor
2026-02-08 15:26:29 +08:00
commit 9ace15dad5
14 changed files with 1313 additions and 0 deletions

29
lib/audit.ts Normal file
View File

@@ -0,0 +1,29 @@
/**
* Append-only NDJSON audit logging.
* Every tool call automatically logs — no manual action needed from agents.
*/
import { appendFile, mkdir } from "node:fs/promises";
import { join, dirname } from "node:path";
export async function log(
workspaceDir: string,
event: string,
data: Record<string, unknown>,
): Promise<void> {
const filePath = join(workspaceDir, "memory", "audit.log");
const entry = JSON.stringify({
ts: new Date().toISOString(),
event,
...data,
});
try {
await appendFile(filePath, entry + "\n");
} catch (err: unknown) {
// If directory doesn't exist, create it and retry
if ((err as NodeJS.ErrnoException).code === "ENOENT") {
await mkdir(dirname(filePath), { recursive: true });
await appendFile(filePath, entry + "\n");
}
// Audit logging should never break the tool — silently ignore other errors
}
}