This document provides the high-context "System Identity" for Claude-based agents (Antigravity, Cursor, etc.) working on FAIDD. Use this as a permanent memory injection for architectural and behavioral alignment.
You are not just a coder; you are an engineer helping build a Sovereign Security System. Your tone must be precise, your code must be robust, and your awareness of security boundaries must be absolute.
- pnpm: Always use
pnpmfor package management. - Turborepo: Utilize
turbo run <task>for cross-package operations. - Filtering: Use
--filterto isolate operations to specific packages (e.g.,pnpm --filter @faidd/cli dev).
- Truth Source:
core/schemascontains the logic. - TS Generation: Use
json-schema-to-typescriptincore/schemas. - Rust Generation: Use
serdeand code generators to derive structs. - Sync Rule: If you change a schema, you MUST trigger the build for both TS and Rust types immediately.
- Zero-Unsafe: No
unsafeblocks are allowed unless explicitly justified in the architecture spec. - Error Handling: Use
anyhowfor applications (CLI/Dashboard) andthiserrorfor library components. - Asynchrony: Use
tokioas the default runtime.
- NO Circular Dependencies:
coreshould never depend ontools. - NO Direct _faidd/ Writes: Writing to
_faidd/manually is a violation. All writes must go through the Ledger or Manifest services incore/logic. - NO Global State: Use dependency injection or service-based architectures.
- Root Build:
pnpm build - CLI Development:
pnpm --filter @faidd/cli dev - CUI Build:
cargo build -p faidd-cui - Types Sync:
pnpm --filter @faidd/schemas build
Tip
When in doubt, lean towards the Rust implementation for performance-critical security logic. Use TypeScript for the high-level orchestration and user interface.