build-dashclaw — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited build-dashclaw (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Guide for contributing to the DashClaw codebase. Covers architecture, adding new capabilities, testing, and CI.
DashClaw is organized into 3 tiers:
app/api/)7 mandatory endpoints that define DashClaw's governance category:
| Route | Method | Purpose |
|---|---|---|
/api/guard | POST | Policy evaluation — "can I do this?" |
/api/actions | POST, PATCH, GET | Action lifecycle recording |
/api/approvals | POST | Human approval decisions |
/api/assumptions | POST, GET | Reasoning integrity tracking |
/api/signals | GET | Real-time anomaly detection |
/api/policies | GET, POST | Guard policy management |
/api/health | GET | System readiness |
The 7-route boundary is CI-enforced. Adding a new core route requires justification.
app/(extensions)/)Modular operational intelligence:
app/api/_archive/)Legacy features from the "Agent Platform" era. Physically isolated.
| Layer | Technology |
|---|---|
| Runtime | Node.js 20+ |
| Framework | Next.js 16 (App Router) |
| Database | Postgres (Neon recommended) |
| ORM | Drizzle ORM |
| Auth | NextAuth.js v4 |
| UI | React 18, Tailwind CSS 3 |
| Testing | Vitest + jsdom |
| Package Manager | npm |
All IDs are TEXT with crypto-random prefixed values:
import { randomBytes } from 'crypto';
const id = `act_${randomBytes(16).toString('hex')}`;ID prefixes: ar_ (actions), oc_live_/oc_test_ (API keys), sp_ (scoring profiles), pt_ (prompt templates), etc.
No direct SQL in route handlers. All data access goes through repository modules:
app/lib/repositories/*.repository.jsRoute handlers import from repositories, never inline SQL.
Request → Strip client org headers → Rate limit → Route matching
→ Public routes: pass through
→ Protected routes: x-api-key (fast path: timing-safe compare)
→ Inject org context from resolved keyWhen adding a new feature to DashClaw:
app/lib/repositories/<name>.repository.js (all SQL here)app/lib/<name>.js (business logic)app/api/<name>/route.js (imports from repository)sdk/dashclaw.js (camelCase)sdk-python/dashclaw/client.py (snake_case)docs/sdk-parity.md with new method countsThe v1 SDK has 187 methods across 31 categories. When promoting to v2:
High priority (core governance):
registerOpenLoop() + resolveOpenLoop() — Decision integrityevents() — Real-time SSE eventsheartbeat() + startHeartbeat() — Agent telemetryMedium priority (analytics):
getRecommendations() + recommendAction() — Adaptive learninggetLearningVelocity() + getLearningCurves() — Learning analyticsgetSignals() — Decision integrity signalsSee knowledge/legacy-sdk-reference.md for the full inventory with all method signatures.
# Run all tests (watch mode)
npm run test
# Run tests once (CI mode)
npm run test -- --run
# Run specific test file
npx vitest run app/lib/__tests__/guard.test.jsTests live alongside their modules or in __tests__/ directories.
Three mandatory CI checks:
# 1. Governance boundary — enforces 7-route API limit
npm run governance:boundary:check
# 2. OpenAPI contract — detects API drift
npm run openapi:check
# 3. Tests
npm run test -- --runAll three must pass before merge.
| File | What to Read |
|---|---|
PROJECT_DETAILS.md | Canonical system map (source of truth) |
CLAUDE.md | Contributing conventions |
app/lib/guard.js | Risk scoring engine |
app/lib/signals.js | Anomaly detection logic |
sdk/dashclaw.js | V2 SDK implementation |
sdk/legacy/dashclaw-v1.js | V1 SDK (187 methods) |
schema/schema.js | Database schema (Drizzle) |
middleware.js | Auth chain |
docs/sdk-parity.md | SDK method parity matrix |
PROJECT_DETAILS.md and CLAUDE.md~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.