You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: AGENTS.md
+31-26Lines changed: 31 additions & 26 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
4
4
5
5
## Project Overview
6
6
7
-
HALPI2 Rust Daemon is a reimplementation of the HALPI2 power monitor and watchdog daemon in Rust for improved performance, reliability, and resource utilization. It maintains 100% API compatibility with the Python `halpid` version 4.x.
7
+
HALPI2 Rust Daemon (`halpid`) is the power monitor and watchdog daemon for HALPI2, written in Rust. It is 100% API-compatible with the legacy Python `halpid` version 4.x.
8
8
9
9
## Development Environment
10
10
@@ -19,7 +19,7 @@ Open the project in VSCode and select "Reopen in Container". This provides:
19
19
### Option 2: Cross-Compilation (Limited)
20
20
Cross-compilation from macOS works for building but NOT for testing:
21
21
```bash
22
-
./run build:cross --release # Compiles for ARM64 Linux
22
+
./run cross-build --release # Compiles for ARM64 Linux
23
23
```
24
24
Note: Tests cannot run via cross-compilation - use dev container instead.
25
25
@@ -32,52 +32,57 @@ Use the `./run` script for all development tasks:
32
32
33
33
### Core Development
34
34
-`./run build [--release]` - Build all workspace members
35
-
-`./run build:daemon [--release]` - Build halpid daemon only
36
-
-`./run build:cli [--release]` - Build halpi CLI only
35
+
-`./run build-daemon [--release]` - Build halpid daemon only
36
+
-`./run build-cli [--release]` - Build halpi CLI only
37
37
-`./run clean` - Clean all build artifacts
38
38
-`./run check` - Run cargo check and clippy
39
-
-`./run fmt` - Format code with rustfmt
40
-
-`./run fmt:check` - Check code formatting
39
+
-`./run format` - Format code with rustfmt
40
+
-`./run check-format` - Check code formatting
41
41
42
42
### Cross-Compilation
43
-
-`./run build:cross [--release]` - Build for ARM64 Linux (aarch64-unknown-linux-musl)
-`./run docker-build [--release]` - Build in Docker container
58
+
-`./run docker-cross-build [--release]` - Cross-compile for ARM64 Linux in Docker
59
+
-`./run docker-build-deb` - Build Debian package for ARM64 in Docker
55
60
56
61
### Development Utilities
57
-
-`./run dev:daemon` - Run daemon in development mode
58
-
-`./run dev:clean:all` - Deep clean (cargo + artifacts + packages)
59
-
-`./run dev:version:bump <version>` - Bump version to specified version
60
-
-`./run dev:version:show` - Show current version
62
+
-`./run run-daemon` - Run daemon in development mode
63
+
-`./run clean-all` - Deep clean (cargo + artifacts + packages)
64
+
-`./run bumpversion <version>` - Bump version to specified version
65
+
-`./run version` - Show current version
61
66
62
67
### CI/CD
63
-
-`./run ci:check` - Run CI verification checks
64
-
-`./run ci:build` - Full CI build pipeline
68
+
-`./run ci-check` - Run CI verification checks
69
+
-`./run ci-build` - Full CI build pipeline
65
70
66
71
### Common Workflows
67
72
```bash
68
73
# Development cycle
69
-
./run build && ./run dev:daemon
74
+
./run build && ./run run-daemon
70
75
71
76
# Full check before commit
72
-
./run ci:check
77
+
./run ci-check
73
78
74
79
# Build release for Raspberry Pi
75
-
./run build:cross --release
76
-
./run package:deb:cross
80
+
./run cross-build --release
81
+
./run cross-build-deb
77
82
78
83
# Version management
79
-
./run dev:version:show
80
-
./run dev:version:bump 5.1.0
84
+
./run version
85
+
./run bumpversion 5.1.0
81
86
```
82
87
83
88
## Pre-Commit Checklist for Claude Code
@@ -217,7 +222,7 @@ When implementing features, always verify compatibility with the Python version:
217
222
**Important**: This daemon is Linux-only. It cannot be built natively on macOS or other platforms due to I2C hardware dependencies (the `i2cdev` crate requires Linux).
218
223
219
224
**Development Workflow**:
220
-
-**On macOS**: Use `./run build:cross` which compiles FOR Linux (target_os = "linux"), so all Linux-specific code is active
225
+
-**On macOS**: Use `./run cross-build` which compiles FOR Linux (target_os = "linux"), so all Linux-specific code is active
221
226
-**Testing on macOS**: Run tests in Docker container (Linux environment)
222
227
-**On Linux**: Native builds work fine with `./run build`
0 commit comments