Getǣl — Read-only macOS home directory disk usage cartography & APFS telemetry service
getael AGENTS.md
4.8 kB · 63 lines
Markdown
at dev

Agent Instructions — Getǣl #

Getǣl is a strictly read-only macOS Rust web service (127.0.0.1:6174) that scans, caches, monitors, and visualizes home directory disk usage alongside APFS volume and Time Machine local snapshot telemetry.

Non-Negotiable Invariant #

  • Strictly read-only toward user files. Getǣl reads ~ and APFS metadata; it writes only to its own cache (~/Library/Caches/getael/), config (~/.config/getael/), and logs (~/Library/Logs/getael/). The HTTP API exposes GET endpoints exclusively. Never add file deletion, move, rename, or tmutil thinning actions.

Context Pointers #

Read the authoritative document before changing an area—never duplicate its rules here:

  • Architecture, macOS APFS facts, seams, API contract → CONTEXT.md
  • Visual system, color tokens, typography, 8 Lenses, UI anti-patterns → DESIGN.md
  • Canonical domain vocabulary → GLOSSARY.md
  • Ordered implementation sequence and exit criteria → plans/ROADMAP.md and active plans/PHASE-*.md

Skills #

Read a skill's SKILL.md before acting in its domain:

  • Every feature or bugfix → tdd
  • Module interfaces and seams → codebase-design
  • Any Rust code → rust-best-practices and rust-skills
  • Caching, invalidation, or SQLite cache work → caching-strategies
  • Frontend, visualizations, CSS, or UI copy → design-taste-frontend and high-end-visual-design
  • Commits, rebases, PRs → using-git
  • Worktrees → using-git-worktrees
  • Editing AGENTS.md or plan docs → writing-for-agents

Code Quality Bar #

  • Rust: No unwrap() or expect() outside tests. Every unsafe block carries a // SAFETY: comment and sits behind a safe module boundary. All public types derive Debug; error types implement std::error::Error + Send + Sync + 'static. Prefer anyhow in binary entrypoints and thiserror in domain modules.
  • TypeScript (web/): Strict mode enabled; no any, no @ts-ignore, handle all fetch/SSE error branches explicitly.
  • Zero external runtime assets: Self-host all fonts, icons, and scripts inside the embedded web bundle so Getǣl works offline.
  • After every edit: Run the formatter, linter, and tests, fix every issue they report, and report observed output:
    • Rust: cargo fmt --check, cargo clippy --all-targets --all-features -- -D warnings, cargo test
    • Web (web/): npm run typecheck, npm run lint, npm test, npm run build

Testing & Verification #

  • Follow TDD: write a failing test first, make it pass, then refactor.
  • Cover unit tests, regression tests, and end-to-end tests against temporary directory trees and mocked macOS telemetry seams.
  • Prove all tests pass and the compiled server starts and responds cleanly before finishing a task.

Planning & Subagents #

  • Keep plans/ROADMAP.md, active plans/PHASE-*.md, and CONTEXT.md aligned whenever an architectural decision changes.
  • Delegate independent research, test authoring, or parallel frontend/backend slices to subagents where practical.

Git & Tangled Workflow #

  • Forge: Tangled (origin = zip.mu.social@tangled.org:zip.mu.social/getael, owner zip.mu.social / did:plc:lp2lwdajhchgtga2hcrros26, repo DID did:plc:dhwjwpl7fp23j5jnzcnrztwb, Knot knot1.tangled.sh, AppView https://api.tangled.org).

  • Forge CLI: Use tg (https://tangled.org/aly.codes/tg, authenticated as zip.mu.social — verify with tg auth status) instead of gh. Pass --json for machine-readable output.

  • dev is the base branch for all implementation work; main tracks released milestones.

  • Create or reuse a task branch in a Git worktree under ./.worktrees/ branched from the latest dev. Never make task edits directly on dev or main.

  • Use imperative commit messages describing the exact change. End every commit message with this trailer on its own line after a blank line:

    Co-authored-by: <harness> $MODELNAME <noreply@zip.mu.social>

  • Opening a PR: tg pr create submits published commits without pushing and resolves --base from the published target tip. Always git fetch origin dev and git push -u origin <branch> first, then run tg pr create --base dev --title "..." --body-file <file> and return the PR link for review.

  • Updating an open PR: Tangled PRs use immutable rounds; pushing new commits does not update the PR automatically. After pushing fixes, run tg pr update to submit a new round.

  • Issues: Manage issues with tg issue {list,view,create,comment,close} (use tg <cmd> --help for flags). For raw read-only ATProto queries, use Bobbin XRPC (https://api.tangled.org/xrpc/org.tangled.*, e.g. org.tangled.repo.listIssues?subject=did:plc:dhwjwpl7fp23j5jnzcnrztwb).