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
"command": "echo '\n\n---\n\n📋 TESTING REMINDER: After completing this task, create and run E2E tests to verify the changes work correctly. Tests should go in tests/e2e/ using Playwright.\n\n---\n'",
5
-
"description": "Remind Claude to create E2E tests for all changes"
6
-
}
3
+
"UserPromptSubmit": [
4
+
{
5
+
"hooks": [
6
+
{
7
+
"type": "command",
8
+
"command": "echo '\n\n---\n\n📋 TESTING REMINDER: After completing this task, create and run E2E tests to verify the changes work correctly. Tests should go in tests/e2e/ using Playwright.\n\n---\n'"
Copy file name to clipboardExpand all lines: AGENTS.md
+48Lines changed: 48 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,49 @@
2
2
3
3
These instructions mirror the workflow Claude Code already follows in Conductor so every coding agent behaves consistently.
4
4
5
+
## Token-Efficient Tooling (use FIRST, before grep/Read sprees)
6
+
7
+
This repo is indexed by **codegraph** (684 files, 5693 nodes). Use it as the default code-lookup tool. Hook also rewrites shell commands via **rtk** for 60-90% bash savings. Default response mode is **caveman** for terse output.
8
+
9
+
### Decision tree — code exploration
10
+
11
+
| Intent | Tool | Why |
12
+
|--------|------|-----|
13
+
| "How does X work / where does X live / trace flow X→Y" |`mcp__codegraph__codegraph_explore`| ONE call returns verbatim source grouped by file. Replaces many Read/Grep. |
14
+
| "Just the location of symbol named X" |`mcp__codegraph__codegraph_search`| Cheapest — name + path only. |
15
+
| "What calls this / what does this call / blast radius" |`codegraph_callers` / `codegraph_callees` / `codegraph_impact`| Edges already indexed; grep can't follow dynamic dispatch. |
16
+
| Pinpoint known file edit |`Read` + `Edit`| Codegraph not needed for known path. |
17
+
| Truly open-ended cross-cutting search |`Agent` w/ `Explore` or `cavecrew-investigator`| Compressed output, protects main context. |
18
+
19
+
**Rule:** Before any 3+ Grep/Read combo for "where is X", call `codegraph_explore` first. Treat codegraph as a pre-built index — don't re-run searches it already answers.
20
+
21
+
### rtk (Rust Token Killer)
22
+
23
+
- Bash commands auto-rewritten by hook — transparent, 0 overhead. No action needed.
24
+
-`rtk gain` to audit savings; `rtk discover` to find missed opportunities.
25
+
- Don't bypass rtk with raw shell unless debugging.
26
+
27
+
### caveman mode
28
+
29
+
- Active by default (full). Drops articles/filler. Code blocks, commits, security warnings stay normal.
30
+
- Toggle: `/caveman lite|full|ultra`, off via "stop caveman".
31
+
32
+
### Delegation — cavecrew subagents
33
+
34
+
Use when scope is bounded AND output would bloat main context:
35
+
-`cavecrew-investigator` — read-only locator ("where is X / what calls Y / map this dir"). ~60% smaller tool result vs vanilla Explore.
@@ -26,6 +69,11 @@ These instructions mirror the workflow Claude Code already follows in Conductor
26
69
- Playwright E2E: `npm run e2e`, smoke subset via `npm run e2e:smoke`, headed/UI via `npm run e2e:ui`
27
70
- Sample-app DB reset: `npm run db:reset` (or `npm run setup:db` inside `my-sonicjs-app`)
28
71
72
+
### Local secrets (`my-sonicjs-app/.dev.vars`)
73
+
-`wrangler dev` reads `my-sonicjs-app/.dev.vars` for local secrets. Auth refuses to initialize without `BETTER_AUTH_SECRET` (>=16 chars); requests to `/auth/*` then return 500 with "BETTER_AUTH_SECRET is missing or too short".
74
+
-`npm run workspace` (and `npm run db:reset` → `setup-worktree-db.sh`) auto-create `.dev.vars` with a fresh `openssl rand -hex 32` secret. Re-runs are idempotent — won't overwrite.
75
+
- Manual fix if file is missing: `cd my-sonicjs-app && cp .dev.vars.example .dev.vars` then set `BETTER_AUTH_SECRET="$(openssl rand -hex 32)"`. `.dev.vars` is gitignored — never commit it. For prod/preview use `wrangler secret put BETTER_AUTH_SECRET`.
76
+
29
77
## Coding Style & Patterns
30
78
- TypeScript-first ES modules. Keep exported/public signatures fully typed; lean on Zod validation where applicable.
31
79
- Use established folder conventions for routes (`packages/core/src/routes`), templates (`packages/core/src/templates`), plugins (`packages/core/src/plugins`), and Drizzle schema (`packages/core/src/db`).
0 commit comments