summaryrefslogtreecommitdiff
path: root/AGENTS.md
blob: 1884278b5c749060d55c22a10b0fb37622a9b9e5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
**✅ Here is the complete, clean `AGENTS.md` file** — ready to copy and save.

```markdown
# FastForge – AGENTS.md
**Pebble Intermittent Fasting Tracker Development Guide**  
**Fedora Linux + Rebble Pebble SDK 4.9+ (April 2026)**

This document contains **everything** an agent (or you after a reboot) needs to know to work on FastForge.

---

## 1. One-Time Initial Setup (already completed)

```bash
# 1. System dependencies
sudo dnf update
sudo dnf install -y python3-pip nodejs SDL-devel dtc uv just

# 2. Install pebble-tool via uv
uv tool install pebble-tool --python 3.13

# 3. Install latest SDK
pebble sdk install latest
```

---

## 2. After Every Reboot – Restore uv Environment

After rebooting your laptop, the `pebble` command is usually not in PATH. Run this **every time** you open a new terminal:

```bash
# Restore uv tool path
export PATH="$HOME/.local/bin:$PATH"

# Verify
pebble --version
```

**Make it permanent** (recommended):
```bash
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc
```

---

## 3. Justfile Usage (Recommended Workflow)

We use `just` as the command runner.

### All available commands

```bash
just                  # Show all available commands
just dev              # ← MOST USED: build + install to emulator
just logs             # Live logs (open in a second terminal)
just kill             # Stop the emulator
just clean            # Remove all build artifacts
just rebuild          # Clean + full rebuild + install
just quick            # Quick rebuild + install
just screenshot       # Take a screenshot of the emulator
just sdk-version      # Show current Pebble SDK version
```

**Daily workflow after reboot:**

1. Run the uv environment commands above
2. `cd ~/g/fastforge`
3. `just dev`
4. Open **second terminal** → `just logs`

---

## 4. Full Daily Development Loop

```bash
# 1. Restore environment
export PATH="$HOME/.local/bin:$PATH"

# 2. Go to project
cd ~/g/fastforge

# 3. Edit code (src/c/fastforge.c)

# 4. Build + test
just dev

# 5. Watch logs in another terminal
just logs
```

---

## 5. What to Commit to Git

**Only commit these files:**

- `README.md`
- `AGENTS.md`
- `PLAN.md`
- `Justfile`
- `package.json`
- `wscript`
- `src/c/fastforge.c`
- `.gitignore`

**Never commit:**
- `build/` folder
- `*.pbw`, `*.elf`, `*.bin`, `*.o`, etc.
- Any `.lock-waf*`, `.wafpickle*`, `config.log`

---

## 6. Troubleshooting

- `pebble: command not found` → run the PATH export from section 2
- Emulator doesn’t start → `just kill` then `just dev`
- Build fails → `just clean` then `just rebuild`
- Want to change app version → edit `package.json` → `just dev`

---

**Last updated:** April 6, 2026  
**Maintained for:** All agents working on FastForge

```

---

**How to save it:**

1. Copy everything above (from `# FastForge – AGENTS.md` to the end)
2. Paste into a new file named **`AGENTS.md`** in your `fastforge` folder
3. Save it

You now have a single, complete reference file.

Would you like me to also create the full `main.c` skeleton for FastForge next? Just say **“give me the full FastForge main.c”**.