photoncloud-monorepo/flaredb/.specify/memory/constitution.md
centra 8f94aee1fa Fix R8: Convert submodule gitlinks to regular directories
- Remove gitlinks (160000 mode) for chainfire, flaredb, iam
- Add workspace contents as regular tracked files
- Update flake.nix to use simple paths instead of builtins.fetchGit

This resolves the nix build failure where submodule directories
appeared empty in the nix store.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-09 16:51:20 +09:00

41 lines
2 KiB
Markdown

# FlareDB Feature Constitution
## Core Principles
### I. Test-First (NON-NEGOTIABLE)
- Write tests before implementation for new functionality.
- Follow Red-Green-Refactor; do not merge untested code.
- All critical paths require unit tests; integration tests required when services/protocols change.
### II. Reliability & Coverage
- CI must run `cargo test` (or equivalent) for all touched crates.
- Integration verification must cover cross-service interactions when contracts change.
- Regressions on previously passing tests are not acceptable.
### III. Simplicity & Readability
- Prefer standard crates over bespoke solutions; avoid unnecessary complexity (YAGNI).
- Code must be self-explanatory; add concise comments only for non-obvious logic.
- Keep APIs minimal and coherent; avoid naming drift.
### IV. Observability
- Services must log structured, human-readable errors; fatal errors exit non-zero.
- gRPC/CLI surfaces should emit actionable diagnostics on failure.
### V. Versioning & Compatibility
- Protocol and API changes must call out compatibility impact; breaking changes require explicit agreement.
- Generated artifacts must be reproducible (lockfiles or pinned versions where applicable).
## Additional Constraints
- Technology stack: Rust stable, gRPC via tonic/prost, RocksDB for storage, tokio runtime.
- Nix flake is the canonical dev environment; commands should respect it when present.
## Development Workflow
- Tests before code; integration tests when touching contracts or cross-service logic.
- Code review (human or designated process) must confirm constitution compliance.
- Complexity must be justified; large changes should be broken down into tasks aligned with user stories.
## Governance
- This constitution supersedes other practices for this feature; conflicts must be resolved by adjusting spec/plan/tasks, not by ignoring principles.
- Amendments require an explicit update to this document with rationale and date.
**Version**: 1.0.0 | **Ratified**: 2025-11-30 | **Last Amended**: 2025-11-30