agentleFS
priyesh0453priyesh0453/weekly-update/AGENTS.md

weekly-update

AGENTS.md0 starsChanged 44 days agoMITView on GitHub

This repository is weekly-update: a bash 3.2 tool that keeps a Mac's Dock apps and macOS current once a week, published as a reference design people adapt. These instructions apply to any AI coding agent working in it. Read first: README.md, docs/ARCHITECTURE.md, docs/CONFIG.md (every config key with its range and default), and the skill at skills/weekly-update/SKILL.md, which explains how to run the tool safely and how to change its config. docs/LIMITATIONS.md lists what I have not tested and how install…

  • Installs packages
  • Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.

    Of the AGENTS.md files we read, the 31,774 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.

  • In this repositoryOne other file it gives its agents.

The file

We split this AGENTS.md into the rules it gives an agent

3 rules. About 0 are common, 0 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Very specific:

    Never add a config key that makes the unattended pass quit an app, call sudo, install macOS updates, or start at load.

    line 30
  2. Very specific:

    Keep the invariants in docs/ARCHITECTURE.md.

    line 31
  3. Very specific:

    Do not edit anything in lib/.

    line 32

≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

Instructions for AI coding agents

This repository is weekly-update: a bash 3.2 tool that keeps a Mac's Dock apps and macOS current once a week, published as a reference design people adapt. These instructions apply to any AI coding agent working in it.

Read first: README.md, docs/ARCHITECTURE.md, docs/CONFIG.md (every config key with its range and default), and the skill at skills/weekly-update/SKILL.md, which explains how to run the tool safely and how to change its config. docs/LIMITATIONS.md lists what I have not tested and how install and the uninstaller decide what is this tool's.

Safe to run

These only read, or run against test doubles in a temporary folder:

  • ./bin/weekly-update --help, --version, help MODE
  • ./bin/weekly-update check and ./bin/weekly-update status (report only; write nothing)
  • ./bin/weekly-update plist (prints the LaunchAgent the config renders to)
  • ./bin/weekly-update run --dry-run and ./bin/weekly-update auto --dry-run (no lock, no refresh, no history, no change)
  • ./install.sh --dry-run, ./uninstall.sh --dry-run and ./bin/weekly-update-uninstall --dry-run
  • ./bin/weekly-update-verify (the static tripwire)
  • /bin/bash tests/run-all.sh (the test suite; 12 of the system tools the scripts drive are replaced by test doubles, and a few read-only calls, such as ps and pgrep, read the real process table; it takes about 15 to 20 minutes under the sandbox I use for the tests, and longer on a busy Mac)
  • shellcheck -x -s bash on bin/*, install.sh, uninstall.sh, tests/*.sh and tests/shims/* (on the pinned lib/*.sh it prints info-level notes only), and /bin/bash -n on any script

Never run without the person asking in this conversation

  • ./install.sh, ./uninstall.sh, bin/weekly-update-uninstall (only their --dry-run forms, listed above, are safe)
  • ./bin/weekly-update with no mode, or with run, auto, scheduled or setup: these upgrade apps, ask to quit apps, or install macOS updates
  • brew upgrade, brew install, brew uninstall, brew cleanup, softwareupdate --install, sudo, launchctl bootstrap, launchctl bootout, defaults write

Show the person the command instead and let them run it.

Rules for changes

  • Never add a config key that makes the unattended pass quit an app, call sudo, install macOS updates, or start at load.
  • Keep the invariants in docs/ARCHITECTURE.md. If a change moves a risky command, move its check in bin/weekly-update-verify and add a probe in tests/test-gate.sh.
  • Do not edit anything in lib/. It is vendored and pinned by lib/MANIFEST.sha256; tests/test-manifest.sh fails when a file in lib/ does not match that manifest or is not listed in it. Work around it in bin/.
  • Stock macOS bash 3.2 only: no associative arrays, no mapfile, no ${var,,}. Every executable script starts with #!/bin/bash.
  • ASCII only. Comments explain why, never what.
  • Every behaviour change comes with a scenario in tests/, and /bin/bash tests/run-all.sh must exit 0. Report the commands you ran and their exit status (a dry run of the runtime exits 0 even when its report lists failures, so also report its last lines; the install and uninstall dry runs exit 1 for the ownership stops, such as an agent whose owner is unknown (and, for install, another program's agent at its own label), and 2 when run as root or, for install, on a config it cannot render; they neither take the run lock nor make a folder, so only the real run reports a pass in progress or a tool folder it cannot write to, and it then unloads, moves and installs nothing and exits 1, though a first install may leave the empty folders and the empty run.lock file it made; without the install manifest (a tool folder removed by hand), the uninstaller's dry run also exits 0 when the config cannot be rendered but it found an agent of this tool, which the real run removes before it exits 1; with the manifest in place the config is not rendered); never claim a test passed that you did not run.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.