Instruction file imported from Code-Munkiz/ham (
.cursor/rules/commands.mdc). Copyright stays with the author.
Ham Commands
/audit-context-engine
Run the Context Engine Auditor checklist against src/memory_heist.py.
- Read
src/memory_heist.py. - Walk the Context Engine Hardening skill checklist (
.cursor/skills/context-engine-hardening/SKILL.md), including continuation/parser marker coupling. - Report findings as a table: item, status (pass/fail), detail.
- Do not auto-fix. Present findings for review.
/wire-agent-context
Wire shared repo context into Hermes-supervised role prompts in src/swarm_agency.py (context assembly only; no CrewAI).
- Read the Agent Context Wiring skill (
.cursor/skills/agent-context-wiring/SKILL.md). - Read
src/swarm_agency.pyandsrc/memory_heist.py. - Add
from src.memory_heist import ContextBuilder(or equivalent) if missing. - Single discovery pass: build one
ProjectContext(or oneContextBuilderthat shares a single discovered context) and vary only render budgets per agent. Do not create multipleContextBuilder()instances that each run a fullProjectContext.discover()(duplicate scans and git calls). - Prefer loading per-agent budgets from
.ham.json/ config (discover_config) over long-term hardcoded magic numbers; use code defaults only as fallback. - Inject per-role rendered context strings into each active role backstory/prompt surface.
- Run lints. Present diff for review. Update
VISION.mdstatus if wiring completes a milestone.
/review-role-boundaries
Audit all agent definitions for role boundary violations.
- Read the Role Boundaries rule (
.cursor/rules/role-boundaries.mdc). - Read
src/swarm_agency.py. - For each agent, check: does its
goal,tools, and task assignments stay within its charter? - Report violations as a table: agent, field, violation, suggested fix.
/test-context-regressions
Generate or run regression tests for src/memory_heist.py.
- Read the Repo Context Regression Testing skill (
.cursor/skills/repo-context-regression-testing/SKILL.md). - If
tests/test_memory_heist.pyexists, read it and check coverage against the skill's test categories. - If it does not exist, generate it with
pytest+tmp_pathfixtures covering all 6 categories. - Run
pytest tests/test_memory_heist.py -vand report results.
/rebrand-memory-heist
Scan src/memory_heist.py for any remaining Claude/Claw references and replace with Ham equivalents.
- Read
src/memory_heist.py. - Grep for
claude,Claude,CLAUDE,claw,Claw,stolen,Stolen(case-insensitive). - If matches found, apply replacements per the memory-heist-conventions rule.
- If no matches, report clean.
/refresh-swarm-contract
Re-validate the entire swarm against VISION.md.
- Read
VISION.md. - Read all pillar modules:
src/swarm_agency.py,src/tools/droid_executor.py,src/hermes_feedback.py,src/memory_heist.py,src/llm_client.py. - For each pillar, check: does the module's current code match the role described in
VISION.md? - Check: is
memory_heist.pyimported and used by the active orchestration path (currentlyswarm_agency.py)? - Check: do current role definitions respect supervisory-vs-execution boundaries?
- Report as a table: pillar, module, vision role, actual status, gaps.
- If the table fixes factual drift, apply updates to
VISION.md(status table and next milestone) per the vision-sync rule.