Octocode Awareness
Use for shared-repo awareness (memory, locks, signals, hooks, handoffs, reflection, wiki). Canonical CLI: node scripts/awareness.mjs inside an installed skill, or node packages/octocode-awareness/dist/bin/awareness.js in this monorepo. Use npx @octocodeai/octocode-awareness only when neither local path exists. Below, <cli> means that chosen binary.
Canonical store: global ~/.octocode/memory/awareness.sqlite3, scoped by workspace/artifact/repo/ref. <repo>/.octocode/ is generated by repo inject; it is not the DB.
First command: <cli> attend --workspace "$PWD" --query "<current task>" --compact; then schema commands --compact and docs list --compact. When you need copy-runnable recipes, read references/agent-cheatsheet.md.
Before / During / After
- Before:
<cli> attend --workspace "$PWD" --query "<task>" --compact; then followreferences/agent-cheatsheet.md(status, recall, refinements, signals). For code evidence, loadreferences/octocode.mdbefore runningnpx octocode search. - During:
<cli> lock acquire --agent-id "$OCTOCODE_AGENT_ID" --workspace "$PWD" --target-file <path> --rationale "<why>" --test-plan "<verify>" --compact; thenlock wait|release,signal publish|reply|ack|resolve,memory record, andagent register|listwhen coordinating or storing facts. - After:
<cli> verify audit|mark ...;reflect record|mine-weakness|export-harness ...;session capture ...;repo inject ...when projections should refresh (then rootAGENTS.mdpointer — Must-Know). - Ongoing:
<cli> maintenance digest --dry-run ...;lock prune/memory forget --dry-run/signal prune;<cli> docs list --compactthendocs show <name>;docs staleness ...; for skill install/update/lint load siblingoctocode-skills(bundled next to this skill) ornpx octocode skill ....
Must-Know
- Agents load root
AGENTS.mdby default. Afterrepo inject, append a short pointer there to.octocode/AGENTS.mdif missing — never rewrite the whole file or dump the wiki into root. - Recall is lexical FTS + salience by default.
--semanticranks only whenOCTOCODE_EMBED_CMDis set; otherwise it warns and stays lexical. - Code/GitHub/package search uses
npx octocode search ... --no-color(or Octocode MCP) — not a vendored binary in this skill. - Prefer operational commands over organ metaphors. Read
references/homeostatic-loop.mdonly when explaining attend/workboard/digest or memory/wiki bloat. - Read
references/self-reflection-dialogue.mdwhen a hard idea needs role dialogue or multi-agent self-review. - Before relying on hooks, read
references/hooks.md; Claude may run frontmatter hooks, while Codex/Cursor/Pi need host wiring. Hooks:pre-edit|post-edit|harness-guard|stop-verify|notify-deliver|session-end.
References
references/agent-cheatsheet.md— when you need copy-runnable attend → claim → verify → reflect recipes (includes agent/docs commands).references/homeostatic-loop.md— when explaining the awareness organ model,attend, workboards, memory hygiene, or sleep/digest.references/self-reflection-dialogue.md— when using role dialogue to improve ideas without persona or memory bloat.references/full-flow.md— when onboarding or checking the whole CLI/skill/hooks/wiki/reflection loop.references/memory-recall.md— before planning/editing with memories, recall flags, semantic limits, or stale facts.references/coordination-protocol.md— before locking, waiting, releasing, signaling, verifying, or managing refinements.references/files-awareness.md— before editing dirty/concurrent workspaces, reading status, handling collisions, or session capture.references/hooks.md— before installing, checking, tuning, removing, or auditing hooks for Claude/Codex/Cursor/Pi.references/repo-context-management.md— before generating or trusting.octocode/wiki projections.references/data-model.md— when checking SQLite schema, scoped rows, tasks, locks, signals, or memory refs.references/octocode.md— when code/GitHub/package research is needed vianpx octocode search.
Installation / Init Flow
- Install:
npx octocode skill --add --path "{{path_to_skills_location}}/octocode-awareness" --platform commonand the sibling.../octocode-skills(or--namefor each). Prefer--platform claude|cursor|codex|pi|all;common→~/.agents/skills. Update with--force. - Init:
<cli> maintenance init --compact; thenworkspace status,schema commands, anddocs listwith--compact. - Hooks: preview
<cli> hooks install --host codex --project-dir <repo> --dry-run --compact; after approval install +hooks check --host codex --strict --compact(same forcursor/claude). - Agent smoke:
<cli> attend --workspace "$PWD" --query "smoke" --compactthenworkspace status --workspace "$PWD" --compact. - Lint/update skills: load sibling
octocode-skillsthen run itsskill-lintscript on this folder. Package scripts:scripts/schema.mjs(schemas),scripts/install.mjs --check-only(install check),scripts/smoke-multi-agent.mjs(smoke),scripts/hook-runner.mjs(hook dispatch),scripts/extract-hook-files.mjs(hook file paths),scripts/install-hooks.mjs(legacy hook installer).