toolkit/packages/skills/instincts/SKILL.md
Atomic behavioral instincts system. Captures micro-learnings as lightweight YAML entries with confidence scoring (0.3-0.9). Project-scoped instincts are stored locally; universal instincts feed into the reflect-kb GraphRAG knowledge base for cross-project retrieval. Use when: (1) A behavioral pattern should be remembered but is too small for a full learning note, (2) Building up project-specific conventions, (3) User wants quick lightweight corrections captured, (4) Accumulating micro-patterns during a session, (5) User requests /instincts.
npx skillsauth add stevengonsalvez/agents-in-a-box instinctsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Not every learning needs a full knowledge note. Some are tiny:
pnpm not npm here"These are instincts — atomic rules with confidence that grow stronger through reinforcement and decay through contradiction.
| Command | Action |
|---------|--------|
| /instincts | Show active instincts for current project |
| /instincts add | Manually add an instinct |
| /instincts review | Review and adjust confidence of existing instincts |
| /instincts promote | Promote high-confidence instincts to global learnings |
| /instincts prune | Remove low-confidence or stale instincts |
Each instinct is a single YAML entry:
- id: inst-20260310-a1b2c3
rule: "Use pnpm instead of npm for this project"
confidence: 0.7
scope: project # project | domain | universal
category: tooling # tooling | style | api | testing | architecture | convention
created: 2026-03-10
last_reinforced: 2026-03-10
reinforcement_count: 1
source: "User corrected npm to pnpm"
tags: [pnpm, npm, package-manager]
Stored in .agents/instincts.yaml at the project root:
# .agents/instincts.yaml
# Auto-managed by /instincts skill. Edit manually if needed.
version: 1
instincts:
- id: inst-20260310-a1b2c3
rule: "Use pnpm instead of npm"
confidence: 0.7
scope: project
category: tooling
created: 2026-03-10
last_reinforced: 2026-03-10
reinforcement_count: 1
source: "User corrected npm to pnpm"
tags: [pnpm, npm]
When an instinct reaches high confidence (>=0.8) and universal scope,
promote it to the reflect-kb knowledge base via the reflect CLI:
# Promote instinct to a full learning note
if command -v reflect >/dev/null 2>&1; then
reflect add docs/solutions/instincts/{instinct-id}.md \
--entities docs/solutions/instincts/{instinct-id}.entities.yaml
elif [[ -x "$HOME/.local/bin/reflect" ]]; then
"$HOME/.local/bin/reflect" add docs/solutions/instincts/{instinct-id}.md \
--entities docs/solutions/instincts/{instinct-id}.entities.yaml
fi
| Confidence | Meaning | Source | |------------|---------|--------| | 0.3 | Weak signal | Single observation, no explicit confirmation | | 0.5 | Moderate | Confirmed once or observed multiple times | | 0.7 | Strong | Explicitly stated by user or confirmed 3+ times | | 0.9 | Certain | Repeatedly reinforced, never contradicted |
Reinforcement: confidence = min(0.9, confidence + 0.1)
Contradiction: confidence = max(0.0, confidence - 0.3)
Decay: confidence = max(0.0, confidence - 0.05) per 30 days inactive
Thresholds:
< 0.3 — Auto-prune (too weak to keep)0.3 - 0.5 — Low confidence, apply cautiously0.5 - 0.7 — Moderate confidence, apply by default>= 0.8 — High confidence, candidate for promotion to globalWhen a new observation contradicts an existing instinct:
/instincts reviewInstincts are captured from:
During conversation, watch for:
# Check if we already have an instinct for this topic
grep -i "{keyword}" .agents/instincts.yaml 2>/dev/null
| Signal Source | Initial Confidence | |--------------|-------------------| | Explicit user correction ("always do X") | 0.7 | | User approval of approach | 0.5 | | Repeated observation (3+ times) | 0.5 | | Single observation | 0.3 | | From /reflect low-confidence signal | 0.3 |
Append to .agents/instincts.yaml. Create the file if it doesn't exist.
At session start, load active instincts:
.agents/instincts.yamlWhen running /instincts promote:
docs/solutions/instincts/{id}.md
d. Index via learnings addpromoted: true (don't delete — keep for local quick reference)When running /instincts prune:
/reflect captures HIGH/MEDIUM signals as full learnings.agents/instincts.yaml at session startdocumentation
Report reflect drain spend over a time window — tokens split by cached (cache_read), uncached writes (cache_creation), and io (input+output), with a $ estimate, grouped by day / outcome / model / transcript. Reads the drainer's cost log and surfaces outlier runs and cache-reuse health (the 41.5M-token failure mode = low cache reuse + high cache writes). Use to answer "what is reflection costing me" for the last day / week.
development
Show fleet status — every claude session running on the host, merged across ainb + claude-peers broker + background jobs. Use when you need to enumerate sessions before composing an action, see which sessions have a peer registered (broker-routable) vs tmux-only, check the `summary` of each session, or pipe the list into jq for filtering. Default output: text table. Pass --format json for LLM consumption.
testing
Ordered multi-step prompts to fleet targets, ack-gated between steps via JSONL assistant-turn-end detection. Use for cycles like disconnect→reconnect→verify, or any flow where step N+1 requires step N to have completed first. The skill BLOCKS until each target's transcript shows the next assistant turn finishing OR per-step timeout fires (default 300s).
development
Center control panel — enumerate every claude session that is blocked waiting on something: a user answer (AskUserQuestion fired), an API error retry, an idle assistant turn-end with no follow-up, or an explicit WAITING: marker. Returns rich JSON with signal kind + context per session. Use this when you've stepped away from the fleet and want one place to see everything that wants your attention and answer it.