LLM rules

This commit is contained in:
Greg Shuflin committed 2025-06-14 00:16:16 -07:00
1 parent 5ab96906b1
commit b202423857
2 files changed
+26 -6

No files matched your search

+1
View File
@@ -0,0 +1 @@
Read the CLAUDE.md rules at the root of the repository and heed them.
+25 -6
View File
@@ -1,17 +1,36 @@
# CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
## Build Commands
# Project Overview
This codebase is the beginning of a pretty ambitious project to build a personal server runtime/overlay OS.
The idea is that users should be able to have a conceptual personal server
operating system that is instantiated on several nodes that all communicate
with each other and share personal documents in a decentralized way. A node
might be a smartphone, a desktop or laptop PC, a browser extension, a headless
server running in a cloud; and a user can have arbitrarily many nodes. Personal
data could be files like PDF documents, music/video files; but also things like
"how many minutes into this podcast did I listen to", "how long into this
youtube video did I watch", "which Twitter/X/BlueSky/Mastodon feeds have I read and/or archived", etc.
This project is inspired by Urbit, and in particular the Urbit concept of a
planet with subordinate moons - each node in this system is effectively a moon,
without any central planet. Like in Urbit, each node has an individual
cryptographic keypair to sign and encrypt messages; but also nodes have access
to a global keypair that signifies ownership of the node at large. Eventually,
different sets of nodes should be able to communicate with each other in an
encrypted and authenticated way.
# Build Commands
- Android: `./gradlew build` or `./gradlew assemble`
- Rust: `just build-rust` or `cd rust && cargo build --target aarch64-linux-android --release`
- Run tests: `./gradlew test` (unit tests), `./gradlew connectedAndroidTest` (instrumented)
- Run single test: `./gradlew test --tests "ExampleUnitTest.testName"`
## Code Style
# Code Style
- Kotlin: Follow Kotlin conventions with 4-space indentation
- Rust: Follow Rust idioms, use `thiserror` for error types and `anyhow` for propagation
- Rust: Follow Rust idioms, use `thiserror` for error types and `anyhow` for propagation.
Rust code should conform to the style guidelines enforced by `cargo fmt` and `cargo clippy`.
- Naming: camelCase for variables/functions, PascalCase for classes/interfaces
- Errors: Use typed errors with meaningful messages
- Architecture: Jetpack Compose for UI, JNI for Rust integration
- Types: Use explicit types for public APIs, leverage type inference for local variables
- Types: Use explicit types for public APIs, leverage type inference for local variables