TIL

Quick, bite-sized things I learn along the way - from terminal tricks and shipping lessons to how to work well with AI agents.

Harnessing the agent (Oct 2026)

  • A rule you give once lives in a rules file. A rule that must always hold lives in a hook. Memory is for facts, not for rules.
  • The third time you explain the same steps, write them down as a skill. Then say its name.
  • Give the agent the ticket, not your summary of it. It reads faster than you type.
  • One task per session. Mixed asks drift.
  • For many repos or many tasks, one subagent each. Review the batch, not the steps.
  • Give autonomous loops a limit: at most five tries, then stop and report.
  • Trust is built per command. Pre-approve the ones that proved safe, keep asking for the rest.
  • A good handoff note has five lines: what merged, what passed, what is deployed where, what is open, what is next.

Stronger software from the agent (Oct 2026)

  • Ask for a picture of the plan before the code. A wrong reading shows in a picture first.
  • Say what you do not want. The gap is always in what you left out.
  • “Tests pass” is a claim. Ask for the test output.
  • Scope creep starts with “while I am here”. Tell it: only what the ticket says.
  • Comments explain why, not what. Ticket numbers go in the commit message, never in the code.
  • A commit message that says why is context for the next session. The agent reads git log too.
  • It sounds just as confident when it invents. Check names, prices and versions before they go in writing.
  • Ask for a review as a reader and as a publisher. The two hats find different problems.
  • Never force-push main. On a PR branch, only with a lease.

From the terminal (Oct 2026)

  • File change events do not cross a Docker bind mount on macOS. Run the file watcher in polling mode.
  • Downloading a tool with npx at container start needs the network every time. Install it in the image instead.
  • In Ruby 4, minitest is a bundled gem. Add it to the Gemfile or bundler will not load it.
  • Nokogiri’s to_html turns curly quotes into entities unless you pass encoding: 'UTF-8'.
  • To amend a commit that is not the latest: git commit --fixup <sha>, then GIT_SEQUENCE_EDITOR=true git rebase -i --autosquash <base>. No editor opens.
  • GitHub’s branch rename endpoint moves the default branch and keeps old links working. No need to delete and recreate.
  • gh can hold several accounts. gh auth switch --user <name> picks one for a repo the default account cannot see.

Working with AI agents (Aug to Oct 2026)

  • The first design an agent proposes often ignores a rule it could have checked. Ask it to list the hard rules and check them before it picks an approach.
  • If you correct the same thing twice, it belongs in a rules file, not in your next message.
  • “It works” and “it is right” are different. Ask for the root cause before the fix, and for proof after it: a log line, a test result, a query.
  • Write the acceptance criteria as failing tests first. Then the agent has a spec it cannot drift from.
  • Scope grows when a design turns into code. Lock the list of files before the first edit, and make the agent stop and ask if it needs another.
  • Expired logins stall more sessions than bugs do. Check auth at session start, before the work begins.
  • List the commands that will be blocked, anything touching production, up front. Run them in one batch instead of mid-flow.
  • An agent will ask questions it could answer from the code. Tell it to look first and ask only what it cannot find.
  • End every session with a written handoff. The next session starts from the note, not from memory.
  • Several sessions at once works, one per task. The bottleneck moves to you, reading the results.

Shipping an Android app (Apr 2026)

  • Google Play makes a new developer find 12 testers who use the app for 14 days straight before a public release. Plan for it.
  • The listing is free. The developer account is 25 dollars. “Zero dollar” was close.
  • The push to the store is paperwork: signed bundle, data safety form, content rating, closed test, review, staged rollout. Dull, not hard.
  • The keyboard is optional. The thinking is not.