Skip to content

kromahlusenii-ops/ham / ham

Set up and maintain Hierarchical Agent Memory (HAM) for Codex using scoped local memory files. Trigger on "go ham", "set up HAM", "ham commands", "ham help", "ham route", "ham remove", "ham update", "ham status", "ham benchmark", "ham baseline start", "ham baseline stop", "ham metrics clear", "HAM savings", "HAM stats", "HAM dashboard", "HAM sandwich", "HAM insights", "HAM carbon", or "HAM audit".

FileKindSize
SKILL.mdskill md10.6 KB
agents/openai.yamlconfig181 B
references/platforms.mdmarkdown1.1 KB
references/setup-and-scopes.mdmarkdown2.2 KB
references/templates.mdmarkdown1.8 KB

references/setup-and-scopes.md

View on GitHub
# Setup And Scopes

Use this reference when creating or updating file-based HAM memory.

## File Model

HAM in this repo shape uses:

- `CLAUDE.md` for root and scoped working context
- `.memory/decisions.md` for accepted architectural decisions
- `.memory/patterns.md` for reusable implementation patterns
- `.memory/inbox.md` for unconfirmed observations
- `.memory/audit-log.md` for audit summaries
- `.memory/baseline.json` for before/after savings comparison
- `.ham/version` and `.ham/metrics/state.json` for versioning and baseline mode

## Scope Selection

- Root `CLAUDE.md`: stack, global rules, shared workflows
- Scoped `CLAUDE.md`: subtree-specific purpose, conventions, integrations, patterns, gotchas
- Deeply nested `CLAUDE.md`: only when a nested area has distinct rules that would otherwise cause mistakes

Prefer fewer scoped files with high signal over a large number of thin files.

## Setup Sequence

1. Inspect the repo structure and main platform boundaries.
2. Read any existing `CLAUDE.md`, `.memory/*`, `.ham/*`, and `.gitignore` before editing.
3. Create or update the root `CLAUDE.md`.
4. Add scoped `CLAUDE.md` files only in major code areas with distinct guidance.
5. Seed `.memory/decisions.md` with durable architectural choices already visible in the repo.
6. Seed `.memory/patterns.md` with conventions likely to recur.
7. Put speculative findings in `.memory/inbox.md`.
8. Preserve user edits and merge instead of replacing.

## Scoped CLAUDE Heuristic

Create a scoped `CLAUDE.md` only if at least one of these is true:

- The directory has its own conventions or integration rules.
- A future agent is likely to make the wrong change there without local guidance.
- Keeping the detail in root `CLAUDE.md` would bloat the global context.

## Memory Quality Bar

Good HAM memory is:

- short enough to scan quickly
- specific enough to change implementation choices
- stable enough to survive multiple sessions
- scoped narrowly enough to avoid polluting unrelated work

Do not store:

- step-by-step task transcripts
- temporary debugging notes that will go stale immediately
- secrets, credentials, personal data, or copied large source files
- generic advice Codex already knows
rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first.Stars: 194kUpdated Claude CodeCodexVerifiedInstall