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
Copy file name to clipboardExpand all lines: AGENTS.md
+160-1Lines changed: 160 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -263,6 +263,45 @@ Actively resist overcomplication. Before finishing any implementation, ask:
263
263
264
264
Prefer the boring, obvious solution. Cleverness is expensive. If 100 lines suffice, 1000 lines is a failure.
265
265
266
+
### No Insecure Fallbacks
267
+
268
+
Never add a "fallback" auth path, credential mechanism, or compatibility shim that is less secure than the primary path. If the primary path is GitHub App OAuth, do not also document `GITHUB_PAT` as a fallback. If the primary path is per-workspace encrypted credentials, do not also support a shared env var.
269
+
270
+
Rules:
271
+
272
+
-**One auth path.** Design the secure path. Ship only that. No "operator fallback" that bypasses the security model.
273
+
-**No deferred security.** Do not spread a security fix across milestones. If the credential model is broken, fix it now — do not document "M1: insecure, M2: fix it."
274
+
-**No throwaway code.** If code will be replaced next milestone, do not write it. Write the real thing or write nothing.
275
+
-**No backward-compatibility shims for unreleased software.** If the product has no users yet, there is no backward compatibility to maintain. Delete the old path.
276
+
277
+
```
278
+
❌ Bad: "Primary: GitHub App. Fallback: GITHUB_PAT env var for self-hosted."
279
+
✅ Good: "Auth: GitHub App OAuth. No other path."
280
+
281
+
❌ Bad: "M1: single PAT. M2: per-workspace credentials."
282
+
✅ Good: "Per-workspace credentials from day one."
283
+
```
284
+
285
+
### No Process Launches — Native SDK Only
286
+
287
+
Never shell out to external processes (subprocess, `std.process.Child`, `execve`, `spawn`) for core functionality. If a capability exists as a native library or SDK, use it. Process launches are only acceptable for personal developer tools explicitly approved by the user.
288
+
289
+
Rules:
290
+
291
+
-**Git operations:** Use libgit2 (native C library with Zig bindings), not `git` CLI subprocess.
292
+
-**HTTP calls:** Use native HTTP client, not `curl` subprocess.
293
+
-**File operations:** Use native filesystem APIs, not `find`/`grep`/`sed` subprocess.
294
+
-**Build tools:** Zig build system, not shell scripts wrapping other tools.
295
+
-**Exception:** Personal developer tools (e.g., `pass-cli`, `gh`, `glab`, `oracle`) are allowed because the user chose them. Core product code must not depend on subprocess launches.
✅ Good: "uses libgit2 for clone, checkout, and push — native calls, no subprocess"
303
+
```
304
+
266
305
### Dead Code Hygiene
267
306
268
307
After any refactor: identify newly unreachable or redundant code. List it explicitly. Never silently remove without user confirmation.
@@ -352,9 +391,32 @@ glab pipeline view
352
391
353
392
- If CI is red, iterate until green: inspect logs, fix, push, re-check.
354
393
394
+
## Standard Make Target Taxonomy
395
+
396
+
Every repo must expose these targets. Agents use these as the canonical entry points — never raw `bun run`/`cargo`/`go` commands unless a Make target does not exist.
- Tailscale auth key (only for automated node enrollment)
469
531
532
+
## Knowledge Base (QMD)
533
+
534
+
Use `qmd` (Query Markup Documents) to search indexed reference material when implementing features that relate to sandbox agents, infrastructure patterns, or prior research.
**Workflow:** When asked to research or compare implementations, run `qmd query` or `qmd search` first to leverage indexed knowledge before general reasoning.
0 commit comments