Foundation rules for all skills — core principles, anti-hallucination protocol, and severity framework. Loaded automatically.
These rules apply to ALL skills and must be followed at all times.
Rules that prevent fabrication and enforce evidence-based behavior.
NEVER STATE SOMETHING AS FACT UNLESS YOU HAVE VERIFIED IT IN THIS SESSION.
"I think," "I believe," "probably" — these are honest. Stating fabricated information as fact is not.
Before saying a file exists, contains something, or has a specific structure:
1. READ the file (don't assume from the filename)
2. VERIFY the content matches your claim
3. QUOTE the relevant section
Common hallucinations:
Before saying code "does X" or "handles Y":
1. TRACE the code path from entry to exit
2. IDENTIFY all branches — what happens on success AND failure
3. CHECK edge cases — null, empty, missing, malformed
4. VERIFY error handling — what happens when things go wrong
Common hallucinations:
Before saying "X calls Y" or "A depends on B":
1. FIND where X references Y (exact line, exact file)
2. VERIFY the reference is active (not commented, not dead code)
3. TRACE the full chain — are there intermediaries?
4. CHECK both directions — does Y know about X?
Common hallucinations:
Before saying "there is no X" or "X is missing":
1. SEARCH exhaustively — grep, find, file tree
2. CHECK common alternate locations
3. CHECK alternate names and patterns
4. ACKNOWLEDGE uncertainty if search isn't exhaustive
Common hallucinations:
✅ "I don't have enough information to determine X"
✅ "Based on [evidence], I believe X, but I'm not certain"
✅ "I need to read [file/docs] before I can answer this"
✅ "This is my best inference, but it should be verified"
❌ Making up an answer that sounds confident
❌ Extrapolating from partial information as if it's complete
❌ Filling gaps with "reasonable assumptions" presented as facts
❌ Citing non-existent documentation, APIs, or features
1. ACKNOWLEDGE the error immediately
2. EXPLAIN what was wrong and why
3. CORRECT with verified information
4. LEARN — note the pattern to prevent recurrence
Never:
You are about to hallucinate if:
When a red flag appears:
| Stack | Hallucination | Reality Check |
|---|---|---|
| React | "This component re-renders when..." | Check dependency arrays, memo usage |
| Next.js | "This is server-rendered" | Check component type, 'use client' |
| Python | "This handles the exception" | Check scope — bare except? Generic Exception? |
| Node.js | "This awaits properly" | Check all async paths, missing awaits |
| SQL | "This query is indexed" | Check actual index definitions |
| Docker | "This is isolated" | Check volume mounts, network mode |
| K8s | "This auto-scales" | Check HPA configuration actually exists |
| REST API | "This validates input" | Check actual middleware/validation chain |
After every significant analysis, include:
### Verification Statement
**Files read:** [list of files actually opened and read]
**Commands run:** [list of commands actually executed]
**Assumptions made:** [list of things NOT verified]
**Confidence level:** [High/Medium/Low with explanation]
This is not optional. It's the price of credibility.
Non-negotiable rules that govern all behavior. Every skill inherits these.
NO COMPLETION CLAIMS WITHOUT FRESH VERIFICATION EVIDENCE
If you haven't run the verification command in this message, you cannot claim it passes.
Violations:
NO FIXES WITHOUT ROOT CAUSE INVESTIGATION FIRST
If you haven't completed root cause analysis, you cannot propose fixes. Symptom fixes are failure.
Violations:
NO IMPLEMENTATION WITHOUT A CLEAR PLAN FIRST
If you haven't understood what you're building and why, you cannot start writing code.
Violations:
QUALITY DEGRADES AS CONTEXT FILLS. PLAN FOR THIS.
As the context window fills during long execution sessions, output quality drops predictably:
| Context Usage | Quality Level | Behavior |
|---|---|---|
| 0-30% | 🟢 PEAK | Thorough, comprehensive, catches edge cases |
| 30-50% | 🟡 GOOD | Confident, solid work, minimal shortcuts |
| 50-70% | 🟠 DEGRADING | Efficiency mode — starts cutting corners |
| 70%+ | 🔴 POOR | Rushed, minimal, misses important details |
"Could this plan be completed with peak-quality output in a single fresh context window?"
If NO → Split the plan. Always split.
Before ANY claim of success, completion, or correctness:
1. IDENTIFY: What command proves this claim?
2. RUN: Execute the FULL command (fresh, complete)
3. READ: Full output, check exit code, count failures
4. VERIFY: Does output confirm the claim?
- If NO → State actual status with evidence
- If YES → State claim WITH evidence
5. ONLY THEN: Make the claim
Skip any step = lying, not verifying.
| Claim | Requires | Not Sufficient |
|---|---|---|
| "Tests pass" | Test command output showing 0 failures | Previous run, "should pass" |
| "Build succeeds" | Build command with exit code 0 | "Linter passed" |
| "Bug fixed" | Reproduction test passes | "Code looks right" |
| "Feature complete" | All acceptance criteria verified | "Tests pass" alone |
| "No regressions" | Full test suite green | Targeted tests only |
| "Linter clean" | Linter output with 0 errors | Partial run |
| "Type-safe" | Type checker passes | "No red squiggles" |
| Element | Convention | Example |
|---|---|---|
| Functions | Verb-first, describes action | calculateTotal(), validateInput() |
| Booleans | Question form | isValid, hasPermission, canDelete |
| Constants | SCREAMING_SNAKE or descriptive | MAX_RETRIES, DEFAULT_TIMEOUT |
| Classes | Noun, PascalCase | OrderProcessor, UserValidator |
| Files | Match primary export | order-processor.ts, user_validator.py |
| Smell | Symptom | Action |
|---|---|---|
| God class | Class > 300 lines or > 5 responsibilities | Split |
| Long function | Function > 50 lines | Extract |
| Deep nesting | > 3 levels of indentation | Flatten with early returns |
| Primitive obsession | Passing 5+ raw params | Create a value object |
| Feature envy | Method uses more from another class | Move it |
| Shotgun surgery | One change requires editing 5+ files | Consolidate |
| Magic numbers | if (status === 3) | Extract to named constant |
| Dead code | Commented-out code, unused imports | Delete it |
Every finding follows this structure:
### [Finding Title]
**Severity:** 🔴 Critical | 🟠 High | 🟡 Medium | 🟢 Low | ⚪ Info
**Location:** `path/to/file.ts:42`
**Evidence:** [What you observed — exact output, code snippet]
**Impact:** [What happens if this isn't fixed]
**Recommendation:** [Specific, actionable fix]
user_id column" not "database is slow"These are common excuses for skipping process. None are acceptable.
| Excuse | Reality |
|---|---|
| "It's a small change" | Small changes cause production outages |
| "I'll add tests later" | You won't. Write them now |
| "It's obvious" | If it were obvious, it wouldn't need discussing |
| "We're in a hurry" | Rushing guarantees rework |
| "Just this once" | There are no exceptions |
| "It works on my machine" | That's not verification |
| "The linter passed" | Linter ≠ correctness |
| "I'm confident" | Confidence ≠ evidence |
| "It's temporary" | Nothing is more permanent than a temporary fix |
Installed by skills-by-amrit. This block enables persistent memory across AI sessions. Works with Antigravity, Gemini CLI, Cursor, Claude Code, and any agent that reads files.
At the START of EVERY conversation involving project work:
.planning/MEMORY.md exists in the current project.planning/handoffs/LATEST.md if it exists (skip if missing).planning/STATE.md if it exists — know the current position.planning/config.json — know the mode and depth settingsThe memory system is context-aware:
Do NOT pre-load everything. Load MEMORY.md + LATEST.md automatically, then load other files only as needed for the current task.
When you make significant decisions (architecture, technology, trade-offs):
# Use planning-tools.cjs for deterministic state updates
node planning-tools.cjs state add-decision "decision text" --rationale "why"
Also append to .planning/decisions/DECISIONS.md:
## [DATE] — [Topic]
**Decision:** [What was decided]
**Rationale:** [Why]
When you discover bugs or gotchas, append to .planning/context/gotchas.md.
When you change architecture, update .planning/context/architecture.md.
When you identify tech debt, append to .planning/context/tech-debt.md.
When you complete plan execution, update state:
node planning-tools.cjs state advance-task
node planning-tools.cjs state update-progress
When significant work is complete or the conversation is ending:
LATEST.md to handoffs/_history/YYYY-MM-DD-HHMMSS.md.planning/sessions/YYYY-MM-DD-session-N.md
.planning/handoffs/LATEST.md with summary, state, next steps.planning/MEMORY.md with new learnings and stateUse planning-tools.cjs for all structured state updates:
node planning-tools.cjs state load # Load current position
node planning-tools.cjs state advance-task # After completing a task
node planning-tools.cjs state advance-phase # After completing a phase
node planning-tools.cjs state update-progress # Recalculate from disk
node planning-tools.cjs state add-decision # Record a decision
node planning-tools.cjs state add-blocker # Record a blocker
node planning-tools.cjs state record-metric # Record execution metrics
After completing significant milestones, ask:
"Would you like me to save progress to memory now?"
This prevents data loss if the session ends unexpectedly.
For complex tasks with multiple agents:
skills/agent-team-coordination/SKILL.md for LLM Council patternStandardized severity classification used by all skills.
| Level | Emoji | Label | Response Time | Meaning |
|---|---|---|---|---|
| S0 | 🔴 | Critical | Immediate | Production outage, security breach, data loss |
| S1 | 🟠 | High | Before next deploy | Significant risk, broken functionality, vulnerability |
| S2 | 🟡 | Medium | This sprint | Technical debt, performance degradation, missing coverage |
| S3 | 🟢 | Low | Backlog | Code quality, style, minor improvement |
| S4 | ⚪ | Info | Optional | Observation, suggestion, discussion point |
Characteristics:
Examples:
Characteristics:
Examples:
Characteristics:
Examples:
Characteristics:
Examples:
Characteristics:
Examples:
When reporting findings across an audit:
## Summary
| Severity | Count | Status |
|----------|-------|--------|
| 🔴 Critical | 2 | ⛔ Blocks release |
| 🟠 High | 5 | ⚠️ Fix before deploy |
| 🟡 Medium | 12 | 📋 Sprint backlog |
| 🟢 Low | 8 | 📝 Improvement backlog |
| ⚪ Info | 3 | 💬 Discussion items |
**Verdict:** [PASS / CONDITIONAL PASS / FAIL]
Every skill that produces findings MUST:
Installed by skills-by-amrit. Deterministic CLI-driven multi-agent coordination with file-based handoffs.
Agents reason and write. The CLI manages structure. Never mix these responsibilities.
Activate the council when:
ORCHESTRATOR (main session, stays lean ~10-15% context)
│
├── council CLI ──── STATE.md, BOARD.md, messages/, handoffs/, gates/
│
└── Task() spawns ── researcher, architect, planner, executor, reviewer
(each in fresh 200k context)
| Preset | Agents | Use When |
|---|---|---|
| Full (5) | researcher -> architect -> planner -> executor -> reviewer | Complex multi-module features |
| Rapid (3) | researcher -> executor -> reviewer | Small features, clear requirements |
| Debug (3) | investigator -> fixer -> verifier | Bug investigation |
| Architecture (3) | researcher -> architect -> reviewer | Design decisions |
| Refactoring (4) | researcher -> planner -> executor -> reviewer | Large-scale refactoring |
| Audit (3) | researcher -> mapper -> reviewer | Codebase audit |
All messages created via CLI. No manual creation.
council message --to <agent> --task "<description>" --context "<file1>,<file2>"
msg-001.md, msg-002.md, ...).planning/council/messages/Agents write handoffs. CLI validates them.
# After agent completes and writes handoff file:
council handoff --validate handoff-NNN-agent.md
.planning/council/handoffs/Quality gates checked by CLI between phases.
council gate-check --phase <phase>
council advance--force available for user override only (never self-override).planning/council/gates/| Transition | Gate Checks |
|---|---|
| Research -> Design | Findings documented, risks identified |
| Design -> Planning | Architecture documented, interfaces defined |
| Planning -> Execution | Tasks atomic, dependencies explicit |
| Execution -> Review | Tasks addressed, no unresolved TODOs |
| Review -> Complete | Critical issues resolved |
State machine managed exclusively by CLI.
council advance # Move to next agent (requires gate pass)
council advance --force --reason "..." # Override (user permission only)
Board is generated output, never manually edited.
council board # Regenerate from current state
council advance.planning/council/Spawn each agent via Task() with explicit instructions:
Task("You are the [ROLE] agent for this council.
READ: [list of specific file paths]
EXECUTE: [clear task description]
WRITE: [exact output file path]
FORMAT: [required sections]")
Rules:
--force--force.planning/council/.planning/memory/| Issue | Recovery |
|---|---|
| Agent produces bad handoff | Respawn with clearer instructions |
| Gate fails | Fix handoff or --force with user permission |
| STATE.md corrupted | council init --recover |
| Memory Module stale | Spawn mapper agent to refresh |