Folder audit

From peteromallet/Arnold · View interactive version

Folder audit is an AI agent skill from the GitHub repository peteromallet/Arnold. Walk a directory tree and audit whether each folder's children belong at the right level of abstraction. Produces a structured JSON audit plus a nested Markdown annotated tree.

How to use this skill

Skill file

folder-audit

What it does

The folder-audit pipeline inspects a target directory, builds a tree of

folders up to a configurable depth, and asks an LLM auditor to classify every

immediate child as fit, misplaced, duplicate, naming_mismatch, etc.

It emits two artifacts in the plan directory:

Running it

The pipeline is built around the native Arnold AgentStep. The audit stage

injects a worker callable that dispatches to Codex by default. A local profile

is provided at profiles/standard.toml.

Default mode (Codex worker)

python -m arnold run folder-audit \
  --inputs target_dir=/path/to/repo,max_depth=2,chunk_size=5,max_workers=3 \
  --plan-dir /tmp/folder-audit-plan

The default profile resolves the audit stage to codex. If you want to use a

different model, override the profile:

python -m arnold run folder-audit \
  --inputs target_dir=/path/to/repo,max_depth=2,chunk_size=5,max_workers=3 \
  --profile @folder-audit:standard \
  --plan-dir /tmp/folder-audit-plan

Using pre-generated subagent results

For faster iteration or when you want to supply audits from another agent

harness, pass an agent_results JSON file:

python -m arnold run folder-audit \
  --inputs target_dir=/path/to/repo,agent_results=/tmp/agent_results.json \
  --plan-dir /tmp/folder-audit-plan

The agent_results file must be a JSON object with a top-level folders

array. The pipeline will compute a summary and reconcile the entries with the

real filesystem tree when rendering audit.md.

Inputs

| Key | Default | Description |

|---|---|---|

| target_dir | required | Directory to audit |

| max_depth | 8 | How many levels deep to walk |

| chunk_size | 5 | Folders per Codex call |

| max_workers | 3 | Parallel Codex calls per level |

| agent_results | none | Path to external audit JSON |

Taxonomy

Worker injection

AuditStep subclasses Arnold's AgentStep. The worker is supplied at pipeline

construction time:

from arnold.pipelines.folder_audit import build_pipeline

pipeline = build_pipeline(worker=my_worker)

If no worker is supplied, build_pipeline() uses a default worker that calls

codex exec. In tests, pass a fake worker to avoid network calls.

Testing

python -m pytest tests/pipelines/test_folder_audit.py -v
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.