aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.claude/rules/locating-craig.md48
-rw-r--r--.claude/rules/todo-format.md46
-rw-r--r--.claude/rules/triggers.md1
3 files changed, 95 insertions, 0 deletions
diff --git a/.claude/rules/locating-craig.md b/.claude/rules/locating-craig.md
new file mode 100644
index 000000000..c327e3fa9
--- /dev/null
+++ b/.claude/rules/locating-craig.md
@@ -0,0 +1,48 @@
+# Locating Craig
+
+Applies to: `**/*`
+
+When a task needs to know where Craig physically is — a local guide, "what's
+near me", travel logistics, the timezone or weather for his actual spot,
+distance to an appointment — don't ask him. Run the `whereami` command and read
+the result.
+
+## The Rule
+
+`whereami` scans nearby WiFi access points and geolocates the machine it runs
+on. That only tracks *Craig* on the machine that travels with him: **velox**,
+his laptop. On any other machine (ratio, the desktop) it reports that machine's
+fixed location, not Craig's, so the result is only meaningful on velox.
+
+The gate is the machine, stated positively:
+
+1. Check the host with `uname -n`.
+2. **On velox** — run `whereami` whenever location matters, instead of asking.
+ Treat its reverse-geocoded address as Craig's current location.
+3. **Any other host** — don't trust `whereami` as Craig's location. Fall back to
+ asking, or to known context (trip notes, calendar, reminders).
+
+Prefer running it over asking — Craig confirmed he'd rather the agent just
+check. The output gives coordinates, a reverse-geocoded address, and an
+OpenStreetMap link; WiFi-centroid drift of a block or two is normal.
+
+## When whereami can't answer
+
+If `whereami` fails — no WiFi to scan, no network, the geolocation API or its
+BeaconDB fallback unreachable — it can't locate Craig. Fall back to asking or to
+known context, exactly as on a non-velox host. Never fabricate or guess a
+location from a stale reading.
+
+## Keep the location out of shared artifacts
+
+A reverse-geocoded address is personal data. It can drive a task, but it must
+not leak into anything team-visible — commit messages, PR descriptions, tickets,
+or public docs (see the content-scope rule in `commits.md`).
+
+## Why
+
+Craig travels with velox, so on that machine the agent can know his location for
+free rather than interrupting to ask. The command and its design (WiFi BSSID
+scan → Google Geolocation API with a BeaconDB fallback → OSM reverse-geocode)
+were built 2026-06-24 specifically to replace useless cellular-IP lookup that
+reported the carrier gateway instead of the device.
diff --git a/.claude/rules/todo-format.md b/.claude/rules/todo-format.md
index 5c3496690..55530de2c 100644
--- a/.claude/rules/todo-format.md
+++ b/.claude/rules/todo-format.md
@@ -33,6 +33,52 @@ When a project's `todo.org` lacks the section, add it before filing or
grading further tasks — propose the priority semantics and tag set from the
project's existing usage, and confirm with Craig.
+### Bug priority from severity × frequency (mandatory where a codebase exists)
+
+Some projects carry a codebase — source the project maintains under version
+control — even when the project isn't primarily a "code project." home and work
+both have one. Wherever a project has a codebase, a task representing a bug
+*against that codebase* does not get its priority argued: it is **dictated** by
+the severity × frequency matrix below. This is not opt-in. Features keep their
+per-project `[#A]`–`[#D]` roadmap judgment; codebase bugs do not.
+
+Two facts set a bug's priority:
+
+- **Severity** — how bad it is when it occurs (service down / data loss /
+ security or privacy leak at one end; a cosmetic nit at the other).
+- **Frequency** — how often a user hits it (every user every time → rare edge
+ case).
+
+```
+| Frequency / Severity | Critical | Major | Minor | Cosmetic |
+|------------------------+----------+-------+-------+----------|
+| Every user, every time | P1 | P1 | P2 | P3 |
+| Most users, frequently | P1 | P2 | P3 | P4 |
+| Some users, sometimes | P2 | P3 | P3 | P4 |
+| Rare edge case | P2 | P3 | P4 | P4 |
+```
+
+P-level → priority letter (fixed — not a per-project knob):
+
+- P1 → `[#A]`
+- P2 → `[#B]`
+- P3 → `[#C]`
+- P4 → `[#D]`
+
+Release vehicle is illustrative and project-dependent: P1 = current
+release/patch, P2 = next patch, P3 = next major, P4 = backlog. A project with no
+release train maps the letters and skips the vehicle. A "no open `[#A]` bugs"
+release gate therefore means "no open P1."
+
+Each project still defines, in its scheme header, what
+Critical/Major/Minor/Cosmetic and the frequency rows mean *for its own
+codebase* — the bands are concrete per codebase, but the matrix structure and
+the letter mapping are fixed.
+
+**Severity-alone carve-out:** privacy or security leaks, compliance violations,
+and safety issues are graded on severity alone — one occurrence with the right
+consequences is a showstopper no matter how rarely it would be hit.
+
## The Rule
A todo entry has two parts:
diff --git a/.claude/rules/triggers.md b/.claude/rules/triggers.md
index a8d5e772c..3c4ea6d19 100644
--- a/.claude/rules/triggers.md
+++ b/.claude/rules/triggers.md
@@ -19,6 +19,7 @@ The `ai` script handles tmux session creation, window placement, and the per-pro
**Resolving X.** Match against project basenames discoverable by `ai` — directories under `~/code/`, `~/projects/`, and `~/.emacs.d` that contain `.ai/protocols.org`.
- Exact basename match (case-insensitive) → invoke `ai <path>` directly.
+- Dot-stripped match → a dotted basename is addressed with its dots removed, so `emacsd` matches `.emacs.d` and `dotfiles` matches `.dotfiles`. Strip dots from both the spoken name and each candidate basename when comparing; an exact match still wins over a dot-stripped one. (`inbox-send` resolves the same way, so the spoken name is consistent across both.)
- No match → list all available basenames, ask which to launch.
- Multiple partial matches (X is a substring of two or more candidates) → list the matching basenames, ask which.