skip to content
FILESYSTEM.md

Agent Operations

Last updated:

View Markdown source

Agent procedure

Operate in a structured loop. Map these abstract ops to your harness tools (bash, read_file, write_file, grep, etc.).

Loop

  1. Orient — inspect the tree before writing
  2. Plan — state intended paths and effects
  3. Execute — perform explicit file ops
  4. Log — append results to LOGS/

Orient (MUST before large edits)

list .
list PROJECTS/
list MEMORY/daily/
grep -r "<task keyword>" PROJECTS/ MEMORY/ # when searching

Prefer path-scoped searches over whole-disk scans.

If your harness is Claude Code–like, map these ops using Claude Code mapping.

Plan (SHOULD)

State:

Do not treat planning prose as execution. Execution must be an explicit tool call.

Execute (MUST be explicit)

Conceptual form:

EXECUTE: write_file
PATH: PROJECTS/<name>/draft.md
CONTENT: ...

Rules:

Log (MUST)

append_file LOGS/YYYY-MM-DD.log
# include: goal, paths touched, outcome, errors

If LOGS/ is missing, create it before continuing durable work.

Search patterns (SHOULD)

NeedPrefer
Exact string / config valuegrep / path read
“Something like X”Optional vector index, then verify via file read
Prior decisionsMEMORY/daily/, then MEMORY/learned/
Reusable how-toSKILLS/<name>/SKILL.md

Recovery (SHOULD)

On failure:

  1. Re-read FILESYSTEM.md safety section if unsure about boundaries
  2. Check LOGS/ for the last successful step
  3. Prefer append/fix over destroying prior artifacts

Human notes

The loop makes agent work auditable. If an agent only “thinks” without logging, postmortems become guesswork.

Anti-patterns