Skip to content

Commit f6e9256

Browse files
committed
docs: separate per-machine setup from project guidance
CLAUDE.md and AGENTS.md are checked in, so they read identically on every machine — but they asserted which machine you were on, where the deployment lived, and what was running locally. All 38 lines of CLAUDE.md except the AGENTS.md import were one person's fleet: hostnames, a Tailnet name, a LAN IP, a WSL2 quirk. Three tiers now: - AGENTS.md keeps the generic principle — a stopped local stack does not mean Chronicle is unavailable, check before claiming unverified, do not start a duplicate deployment, mutations need the user's say-so — and names no host. - CLAUDE.md says where per-machine detail belongs and nothing else. - CLAUDE.local.md (new .gitignore entry) holds the fleet specifics. It also stated the deployment host "will not have uncommitted local changes", which is false — that checkout carries 22 modified files, and planning a pull around the claim would have been wrong. Three hardcoded personal LAN addresses went with it. The worst was a CLI default in shipped code: extras/asr-services/client.py dialled 192.168.0.110 for anyone who ran it without --asr-url; it now defaults to localhost and reads $ASR_URL. The screenshots skill and a vault-sync comment used the same address as illustration and now use placeholders.
1 parent 1173813 commit f6e9256

6 files changed

Lines changed: 39 additions & 53 deletions

File tree

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,10 @@ certs/*.pem
103103
docs/plans/
104104
docs/research/
105105

106+
# Per-user, per-machine agent guidance (fleet hostnames, LAN addresses).
107+
# Project-wide guidance belongs in AGENTS.md / CLAUDE.md, which are checked in.
108+
CLAUDE.local.md
109+
106110
# Legacy per-service SSL (kept for cleanup)
107111
extras/speaker-recognition/ssl/*
108112
backends/advanced/ssl/*

AGENTS.md

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15,29 +15,34 @@ This supports a comprehensive web dashboard for management.
1515

1616
## Live Deployment Location
1717

18-
The normal live Chronicle deployment is hosted on the Tailnet machine **`kraken`**. Run
19-
`hostname` before acting on this section — this file is checked in and reads the same on
20-
every machine, including Kraken itself, where the deployment is *local* and there is no
21-
remote host to reach. On any other machine a stopped or unconfigured local stack does
22-
not mean Chronicle is unavailable.
18+
A Chronicle deployment often runs on a **different machine** from the checkout you are
19+
working in — commonly a home server reached over a Tailnet. A stopped or unconfigured
20+
local stack therefore does not mean Chronicle is unavailable.
21+
22+
This file is checked in and reads the same everywhere, so it deliberately names no
23+
host. Run `hostname` first, then read `CLAUDE.local.md` (gitignored, per-user) for the
24+
addresses that apply to the machine you are on — including the case where the checkout
25+
you are in *is* the deployment, and everything is local.
2326

2427
For read-only checks of the running application (health checks, API inspection, or
2528
browser/screenshot verification):
2629

27-
1. Try `https://kraken.parrot-census.ts.net` first. Use HTTPS; plain HTTP redirects.
28-
2. If that name is unavailable, inspect the current Tailscale mesh with
29-
`tailscale status --json` and resolve the online peer whose `HostName` is `Kraken`
30-
**and whose `OS` is `linux`** — Kraken runs under WSL2, so the Windows host
31-
advertises the same hostname and answers pings while serving no Chronicle.
32-
Prefer its returned `DNSName`; use its current Tailscale IP only as a temporary
33-
fallback. Do not persist a `100.x` address because it may change.
30+
1. Use the deployment address from `CLAUDE.local.md`, if there is one. Prefer HTTPS;
31+
plain HTTP usually redirects. A self-signed or internal-CA cert needs `curl -k`.
32+
2. Otherwise inspect the current Tailscale mesh with `tailscale status --json` and
33+
resolve the online peer serving Chronicle. Match on `OS` as well as `HostName` — a
34+
host running under WSL2 advertises the same hostname from both the Windows host and
35+
the Linux guest, and only the guest serves anything. Prefer the returned `DNSName`;
36+
use a Tailscale IP only as a temporary fallback, and never persist a `100.x` address
37+
because it may change.
3438
3. If the host is reachable but the Chronicle endpoint is unclear, use the repository's
3539
`discovery.py`/minidisc support to discover the `chronicle-backend` service on the
3640
Tailnet.
3741

38-
Do not start a duplicate local deployment merely to inspect the live application.
39-
Remote deployment, restarts, or other mutations on Kraken still require the user's
40-
request to change or deploy the running system.
42+
Do not assume a remote deployment's checkout is clean or matches `origin` — check
43+
`git status` there before pulling. Do not start a duplicate local deployment merely to
44+
inspect the live application. Remote deployment, restarts, or other mutations still
45+
require the user's request to change or deploy the running system.
4146

4247
## Initial Setup & Configuration
4348

CLAUDE.md

Lines changed: 8 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -2,37 +2,13 @@
22

33
@AGENTS.md
44

5-
## Verifying against a running backend
5+
## Machine- and deployment-specific guidance
66

7-
**First work out which machine you are on — this file is checked in, so it reads the
8-
same on every one of them.** Run `hostname`:
7+
This file is checked in, so it reads the same on every machine and must not assert
8+
which one you are on, where the live deployment is, or what is running locally.
99

10-
| hostname | what it is | how to verify |
11-
|---|---|---|
12-
| `rainbow` | Ankush's dev workstation (CachyOS). Usually **no** Chronicle stack running. | Reach Kraken over the network, as below. |
13-
| `Kraken` | The live deployment (Ubuntu 24.04 under WSL2). The stack is running **locally**. | Check it locally — `podman ps`, `curl localhost:8000/health`. Do **not** go looking for a remote Kraken; you are it. |
14-
15-
Anything below about reaching Kraken applies when you are *not* on Kraken. Do not
16-
describe a machine as macOS unless `uname -s` actually says `Darwin`.
17-
18-
If there is no Chronicle stack on the machine you are on, that does not mean you
19-
cannot verify your work. The live deployment runs on **`kraken`** and is reachable
20-
from `rainbow` without any tunnel:
21-
22-
- `https://kraken.parrot-census.ts.net` (Tailnet, preferred)
23-
- `https://192.168.0.110/` over LAN — self-signed cert, so use `curl -k`. Caddy on
24-
`:443` fronts the **vite dev server**, and the backend is on `:8000`.
25-
26-
Before reporting something as "not verified because nothing is running locally",
27-
check Kraken first. See AGENTS.md → "Live Deployment Location" for the full
28-
resolution order.
29-
30-
Note that Kraken runs in WSL2, so **two** Tailscale peers answer to the hostname
31-
`Kraken` — the Linux guest (which runs Chronicle) and the Windows host. When
32-
resolving it from `tailscale status --json`, take the one whose `OS` is `linux`.
33-
34-
Kraken runs *deployed* code from `~/workspaces/friend-lite` on that host, so it will
35-
not have uncommitted local changes. To exercise new backend code end-to-end, stand up
36-
the pieces you need locally (a `podman run` Mongo plus the FastAPI app is usually
37-
enough) rather than deploying to Kraken — deploying touches a live system and needs
38-
Ankush's say-so first.
10+
Those belong in `CLAUDE.local.md` (gitignored, per-user, loaded automatically when
11+
present). If you need the deployment address, hostnames, or credentials for the
12+
environment you are in, read that file — and if it is absent, ask rather than
13+
assuming a stopped local stack means Chronicle is unavailable. See AGENTS.md →
14+
"Live Deployment Location".

backends/advanced/src/advanced_omi_backend/routers/modules/vault_sync_routes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
SYNCTHING_URL = os.getenv("VAULT_SYNC_SYNCTHING_URL", "http://vault-syncthing:8384")
3333
SYNCTHING_API_KEY = os.getenv("VAULT_SYNC_API_KEY", "")
3434
# Externally reachable sync address(es) handed to the Mac — comma-separated, e.g.
35-
# "tcp://my-host.ts.net:22000,tcp://192.168.0.110:22000"; the client dials each
35+
# "tcp://my-host.ts.net:22000,tcp://10.0.0.5:22000"; the client dials each
3636
# until one connects (Tailnet when remote, LAN IP when a device has no Tailscale).
3737
# Empty -> the Mac relies on Syncthing's own discovery/relays to find the server.
3838
SYNCTHING_ADDRESS = os.getenv("VAULT_SYNC_ADDRESS", "")

extras/asr-services/client.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import argparse
88
import asyncio
99
import logging
10+
import os
1011
from pathlib import Path
1112

1213
from easy_audio_interfaces.audio_interfaces import ResamplingBlock
@@ -319,8 +320,8 @@ async def main():
319320
parser.add_argument(
320321
"--asr-url",
321322
type=str,
322-
default="tcp://192.168.0.110:8765",
323-
help="ASR service URL (default: %(default)s)",
323+
default=os.getenv("ASR_URL") or "tcp://127.0.0.1:8765",
324+
help="ASR service URL, or set ASR_URL (default: %(default)s)",
324325
)
325326
parser.add_argument(
326327
"-v",

skills/screenshots/SKILL.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,12 @@ uv run --with playwright python skills/screenshots/scripts/capture_dashboard.py
5252

5353
For public pages, omit `--authenticate`. Use `--backend-url`, `--env-file`, and `--output-dir` when the deployment differs. It rejects login redirects and blank pages rather than saving misleading screenshots.
5454

55-
For a same-origin HTTPS proxy such as Chronicle's LAN deployment, point both URLs at the proxy and allow its development certificate:
55+
For a same-origin HTTPS proxy such as a LAN deployment behind Caddy, point both URLs at the proxy and allow its development certificate (substitute your own host — see your local agent config for the deployment address):
5656

5757
```bash
5858
uv run --with playwright python skills/screenshots/scripts/capture_dashboard.py \
59-
--base-url https://192.168.0.110 \
60-
--backend-url https://192.168.0.110 \
59+
--base-url https://<deployment-host> \
60+
--backend-url https://<deployment-host> \
6161
--ignore-https-errors \
6262
--authenticate \
6363
--route conversation=/conversations/<conversation-id>

0 commit comments

Comments
 (0)