agentleFS
matthewdonsemail-labmatthewdonsemail-lab/log/skills/commitLog/SKILL.md

commitLog

Skill63 starsChanged yesterdayMITView on GitHub

Write the day-log entry every log-cli commit needs, in the private devlog (LOG_DEVLOG_DIR, default ~/.logCli/devlog/<date>.md, indexed by log.md there), never in the repo. On commit, the pre-commit hook parses the staged code into an abstract syntax tree (AST), writes which declarations and tests were added, changed or removed into a template entry, and feeds that back to the agent. The agent then writes What changed, Why and Checked from the AST before the commit can go through.

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Never edit old entries: Only add.

    line 29
  2. Distinctive:

    Nothing from the day log goes in the repo: Never copy an entry into a tracked file.

    line 32
  3. Very specific:

    If the commit also adds a rule from matt, skills/captureRule/SKILL.md applies too.

    line 78

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill 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
SKILL.md

commitLog

The day log is the running record of the work, one entry per commit. It is private: the repo is public, and day logs quote requests, people and infra steps. It lives in LOG_DEVLOG_DIR (default ~/.logCli/devlog/), one file per day, <date>.md (the day in UTC, newest entry at the bottom), and log.md in the same folder is the index of every day, newest first. lefthook's pre-commit (lefthook.yml) runs scripts/commitLog/commitLog.mjs, which uses scripts/commitLog/astSummary.mjs:

  • .ts / .mjs files are parsed with the TypeScript compiler API.
  • .py files are parsed with Python's own ast module.
  • For each file it compares the syntax tree before and after the change and lists what was added, changed or removed: top-level functions, classes, interfaces, types, enums, consts, re-exports, and test titles in *.test.ts. Formatting-only edits don't count as changes.

Hard boundaries

  1. Every commit gets an entry. No --no-verify, ever.
  2. Never edit the AST block. The tool writes it. If it looks wrong, fix scripts/commitLog/astSummary.mjs, not the entry. The hook rejects a block that doesn't match the staged code, and rewrites it.
  3. Never edit old entries. Only add.
  4. Write the three fields from the AST, in plain words, naming the real behaviour, commands and results. No <fill in> left.
  5. Nothing from the day log goes in the repo. Never copy an entry into a tracked file. The hook stages nothing.

The routine

GIT_CONFIG_COUNT=0 git add <files>
GIT_CONFIG_COUNT=0 git commit -m "..."
# 1st try: the hook prints the AST of the staged change, appends the entry
#          to today's ~/.logCli/devlog/<date>.md, updates the index log.md
#          there, remembers the entry as this checkout's pending one, and stops
# write What changed / Why / Checked under the AST block in that file
GIT_CONFIG_COUNT=0 git commit -m "..."
# 2nd try: the hook re-parses the staged code; if it matches the block and the
#          fields are written, the commit goes through

The pending entry is kept per checkout in <devlog>/.pending/, and lefthook's post-commit clears it once the commit lands, so a commit stopped by a later hook keeps its written entry. If you change code after the entry was written, the hook updates the AST block in place and stops once more. Re-read your What changed line and commit again.

To see the AST for any commit: node scripts/commitLog/astSummary.mjs <commit>. With no argument it shows the staged change.

The entry

## 2026-10-18 05:40Z · feat/branchName

AST (generated from the staged code by scripts/commitLog/astSummary.mjs, don't edit):
- `src/camofox/worker/helpers/fromCamofoxStatus.ts`: added function fromCamofoxStatus
- `src/cli/live/index.ts`: added const connectCommand · removed const loginCommand

What changed: <fill in>
Why: <fill in>
Checked: <fill in>
  • What changed: the behaviour behind the AST lines. Example: "log facebook connect replaces log login for Facebook sessions", not "edited index.ts".
  • Why: the request or bug behind it. Quote matt's ask when there is one.
  • Checked: the exact command and its result (bun run check: 62 pass), plus any real run. Say what you didn't check.

If the commit also adds a rule from matt, skills/captureRule/SKILL.md applies too.

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.