edge AGENTS.md

Project instructions for OpenStrap Edge, a Flutter app that reads data from a WHOOP 4.0 band over Bluetooth and analyzes it on the device.

In plain words
What is it for?
Use them when working on the protocol, analytics, database, or user-interface parts of the OpenStrap project, while checking the actual source for current versions and behavior.
Why use it?
They document hard rules, repository boundaries, and known failure patterns so changes do not break the app’s data flow or place code in the wrong repository.

Instructions file for CodexOpenCode

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/openstrap/edge/agents-md
Clone the repo
git clone --depth 1 https://github.com/OpenStrap/edge

Made for: Codex, OpenCode.

Per session 4,019 This file is loaded in full into every session.
When invoked 4,019 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.04019 $0.04019
Opus 5 $0.02010 $0.02010
Sonnet 5 $0.00804 $0.00804
Haiku 4.5 $0.00402 $0.00402

Measured yesterday against content hash 4e8484edcc06, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

edge AGENTS.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

AGENTS.md · 257 lines

How it starts

The opening of the file, as written. The whole thing — 257 lines — stays where its author put it; the contents beside it link to each section on GitHub.

AGENTS.md — OpenStrap edge

Reviewer context. This doc drifts from code between edits — check kAlgoVersion (lib/compute/derivation_engine.dart), schemaVersion (lib/data/db.dart), and the version: line in pubspec.yaml directly rather than trusting a number written here. Where a source comment disagrees with an implementation, the implementation wins — header comments here go stale (e.g. lib/compute/substrate.dart's file header still describes a wake-to-wake day model that calendarDays() no longer implements; it walks local midnight to local midnight). The same drift applies to §2's table and every line-number citation in §3 below — line numbers move on every edit, symbol names don't; verify against the source, not this doc.

1. What this is

A Flutter app for a reverse-engineered WHOOP 4.0 band. Fully on-device, local-first: BLE offload → SQLite → on-device analytics → UI. No backend owns user data. Network use is limited to OTA update pointers, opt-in telemetry/Crashlytics, and BYOK LLM calls.

Three sibling repos, strict separation — push work to the right one:

  • OpenStrap/protocol — bytes: GATT, framing, CRC, opcodes, record decode.
  • OpenStrap/analytics — metrics: HRV, sleep staging, readiness, strain.
  • OpenStrap/edge (this repo) — flows, BLE link management, storage, UI.

New opcode/record → protocol. New metric → analytics. New screen/flow/table → edge. A PR implementing a metric inside edge/lib/compute is in the wrong repo unless it is pure orchestration.

2. Architecture map (lib/, well over 200 files — these five are the biggest by far)

Line counts drift constantly; don't trust a number here, wc -l the file.

file owns
data/db.dart LocalDb: schema ladder (onUpgrade), all CRUD, coach views
compute/derivation_engine.dart DerivationEngine, kAlgoVersion, day scheduling, isolate offload
state/app_state.dart AppState ChangeNotifier — BLE↔DB↔UI orchestration
ble/ble_engine.dart GATT connect/drain/history-sync state machine
data/local_repository_impl.dart read seam: day_result/metric_series → screen shapes; zero compute on read

Read the full file on GitHub · 257 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 257 lines · 4,019 tokens per session scan A 4e8484edcc06

Subscribe to this mod's changes

edge AGENTS.md is an instructions file published in the GitHub repository OpenStrap/edge (500 stars, last pushed 2d ago), licensed MIT. It adds 4,019 tokens to every session, about $0.0201 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.