AGENTS routes; skill decides; CLI/SQLite acts; hooks automate deterministic edges. Memory and .octocode/ are leads. Never hand-edit .octocode/.
Run live-state actions through the CLI.
When the host supports delegation, ALWAYS batch routine deterministic Awareness CLI reads, writes, and maintenance into one phase.
Use the smallest capable low-cost agent (for example Haiku or Composer 2.5); supply decided scope, require --compact, and cap its receipt at 512 bytes.
The lead retains destructive approval, conflict handling, memory-truth judgment, and verification.
Run directly only when the host cannot delegate.
Lifecycle
<cli>: local node packages/octocode-awareness/out/octocode-awareness.js; installed npx @octocodeai/octocode-awareness. Set OCTOCODE_AGENT_ID per agent/session.
BEFORE/READ+REASON -> DURING/DO -> AFTER/VERIFY -> LEARN? -> CLEAN? -> PROJECT?
- BEFORE:
attend; follownext; state goal, acceptance, affected scope, and evidence. Usememory recall --smartonly if it may change the plan; choose task or WORK. - DURING: declare paths via hooks or
work start; read peers. Ordinary overlap is allowed; never bypass conflict. Hooks never choose plans, locks, success, learning, cleanup, or projection. - AFTER: check while present;
task submit/work end;verify mark;verify audit. Expiry never means success. - OPTIONAL:
reflect record --lessononly for verified reusable outcomes; clean only under pressure; project only for file readers. Loop:attend -> work start -> edit/check -> work end -> verify mark -> verify audit; add--exclusivewhen required.lock wait/pruneare recovery.
Feature map — all features; load owners only for depth
- Orient/state:
attend,workspace status, query,session capture, agent registry. When inspecting storage/session, loadreferences/architecture.mdfor storage boundaries. - Plan/task: dependencies/readiness/claim/heartbeat/submit/release. When choosing plan, task, or WORK, load
references/plan-task-workflow.mdfor task routing. - Work/files:
start/touch/end/list/show. When overlap matters, loadreferences/files-awareness.mdfor peer semantics. - Exclusive work/verify:
work start --exclusive, lock recovery, mark/audit. When exclusivity or debt matters, loadreferences/lock-protocol.mdfor conflict gates.
- Signals/refinements: signal publish/list/reply/ack/resolve/prune; refinement get/set/delete. When peers interact, load
references/coordination-protocol.mdfor peer flow. - Memory: recall/record/forget/archive/restore; correct with
--supersedes. When using memory, loadreferences/memory-recall.mdfor trust rules. - Reflection/review: reflect/review/export harness. When improving, load
references/improve-loop.mdfor acceptance gates. - Knowledge/wiki: docs/staleness,
wiki sync, projections. When choosing output, loadreferences/output-routing.mdfor lean routing. - Hooks/hosts: install/check/remove/run across Claude/Codex/Cursor/Pi. When configuring/debugging, load
references/hooks.md. - Maintenance/contracts: maintenance and schema commands/list/path/json-schema/example/validate. When cleaning/learning, load
references/bookkeeping.mdfor pressure gates. - Recipes: when a start, finish, or command recipe is unknown, load
references/agent-cheatsheet.md; unknown owner only:docs list --compact, thendocs show <name>. - Skill evolution: when shipping a skill change, load
references/skill-evolution.md; useoctocode-graph-evalfor goal/KPI,octocode-researchfor evidence, andoctocode-skillsfor review. Scripts: usescripts/awareness.mjsfor fallback,scripts/schema.mjsfor contracts,scripts/hook-runner.mjsfor events,scripts/extract-hook-files.mjsfor paths,scripts/install.mjs --compactfor diagnosis; runscripts/smoke-multi-agent.mjswhen validating coordination.
Installation and first activation
Load README.md; initialize once, then attend. Claude uses frontmatter; do not install duplicate project hooks. When configuring Codex/Cursor, load references/hooks.md; Pi uses its bridge. Rebuild with yarn workspace @octocodeai/octocode-awareness build; never edit mirrors.