8000 docs: sharpen the agent guide from past agent mistakes by aorumbayev · Pull Request #146 · kagan-sh/kagan · GitHub
[go: up one dir, main page]

Skip to content

docs: sharpen the agent guide from past agent mistakes - #146

Merged
aorumbayev merged 4 commits into
mainfrom
docs/agent-guide-refresh
Nov 12, 2026
Merged

aorumbayev merged 4 commits into
mainfrom
docs/agent-guide-refresh

Conversation

@aorumbayev
Copy link
Copy Markdown
Member

Adds the lessons reviewers kept sending back to AGENTS.md and the crate files:

  • Renumber decisions and recompute the size ceiling and its Cost sentence after main moves; decisions-check passes on a stolen number.
  • A fix names its cause; no code for a bug that did not reproduce; prove a fix's test fails by undoing the fix.
  • Search for the existing helper before writing one; jscpd runs only in CI.
  • Windows: cfg(windows) builds only in the Windows jobs, a leftover #[cfg] gate moves to the next item, keep shell-free test logic ungated.
  • cargo t is the gate; plain cargo test leaks statics between tests.
  • CI denies every warning (too_many_lines at 100); each #[allow]/#[expect] counts against allow_expect.
  • kg: KG_SOCKET wins over KG_DATA_DIR and is set in every thread, so an isolated app must unset or replace it. first_run.rs reads book/src/start.md.
  • domain: Op doc comments are clap help, so cli.md needs regenerating.
  • ui: reuse wait_until/wait_for_shell; the Arc<Mutex> rule is enforced by crates/ui/clippy.toml.

Stale lines removed: print_stdout "outside kg" (kg is denied too), the long per-tool loading block, and the optional skills list. Root file goes from 114 to 106 lines.

Add the lessons reviewers kept sending back: renumber decisions and
recompute the Cost line after main moves, prove a fix's test fails,
name a fix's cause, reuse before copying, and the Windows cfg and lint
gaps. Fix the isolated-app rule: KG_SOCKET wins over KG_DATA_DIR, and
every thread has it set. Drop stale and generic lines.
@aorumbayev
aorumbayev merged commit d07f044 into main Nov 12, 2026
20 checks passed
@aorumbayev
aorumbayev deleted the docs/agent-guide-refresh branch November 12, 2026 10:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

0