2.7 KiB
2.7 KiB
CHRONOGRID P2P - AI CONTEXT & ARCHITECTURAL MANDATES
-
DATA SOVEREIGNTY & LOCAL-FIRST MANDATE:
- Never generate code that transmits data to third-party cloud endpoints or SaaS providers.
- All network synchronization MUST utilize
crates/chronogrid_netover libp2p / QUIC with Noise XK encryption.
-
TECH STACK BOUNDARIES:
- Presentation: Flutter (Win32 for Windows, GTK3 for Linux, Android NDK).
- Core Logic & Storage: Rust (
crates/chronogrid_core) with SQLCipher & Automerge CRDT. - FFI Bridge: Use
flutter_rust_bridgeC-ABI generation ONLY.
-
SINGLE SOURCE OF TRUTH:
- Prior to modifying data structures, consult
docs/API_CONTRACTS/schema.sqlanddocs/ARCHITECTURE/01-OSAD-system-architecture.md. - Update documentation in
/docsconcurrently with code changes.
- Prior to modifying data structures, consult
-
AUTONOMOUS TASK EXECUTION PROTOCOL: When instructed to "Execute next task" or run an autonomous cycle, perform the following 7 steps in sequence:
Step 1: STATE DISCOVERY
- Read
.clinerulesanddocs/ARCHITECTURE/01-OSAD-system-architecture.md. - Inspect files in
docs/TASKS/to locate the FIRST incomplete task ([ ]) in chronological order. - Read
DECISION_LOG.mdto review the latest architectural context. - Explicitly state the Task ID and title being tackled.
Step 2: FEATURE BRANCH CREATION
- Ensure working on
mainand updated:git checkout main && git pull origin main - Create a dedicated feature branch:
git checkout -b feature/<task-id>-<short-description>
Step 3: IMPLEMENTATION
- Read relevant specs in
/docs(schema.sql,security-and-crypto.md, etc.). - Write code required ONLY for the target task while respecting all local-first mandates.
Step 4: TESTING & VERIFICATION
- Run the local verification suite:
powershell -File scripts/verify_agent_work.ps1 - Run crate unit tests:
cargo test --package <crate_name> - Iteratively fix any compiler or test errors until all checks pass cleanly.
Step 5: DOCUMENTATION & ADL UPDATE
- Update the task status to
[x]indocs/TASKS/. - If architectural decisions or schema adjustments were made, log them in
DECISION_LOG.mdand create a record indocs/ARCHITECTURE/ADR/.
Step 6: COMMIT & MERGE
- Stage changes:
git add . - Commit:
git commit -m "feat(<scope>): complete <Task ID> - <Task Title>" - Merge into main:
git checkout main && git merge feature/<task-id>-<short-description> --no-ff -m "chore: merge feature/<task-id> into main"
Step 7: REMOTE PUSH & CLEANUP
- Push main:
git push origin main - Remove feature branch:
git branch -d feature/<task-id>-<short-description> - Provide a concise summary of completed work, test status, and the upcoming task for the next cycle.
- Read