# Rules

> Use as the master reference for all core principles, anti-hallucination protocol, severity framework, and skill activation rules. Every other skill inherits from this. Read this first in any new session.

- **Type:** Skill
- **Install:** `agentstack add skill-boparaiamrit-skills-by-amrit-rules`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [boparaiamrit](https://agentstack.voostack.com/s/boparaiamrit)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [boparaiamrit](https://github.com/boparaiamrit)
- **Source:** https://github.com/boparaiamrit/skills-by-amrit/tree/main/skills/_rules

## Install

```sh
agentstack add skill-boparaiamrit-skills-by-amrit-rules
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Core Rules — Master Reference

## Overview

This is the foundational skill that all other skills inherit from. It consolidates the non-negotiable principles, anti-hallucination protocol, severity framework, and skill activation rules into a single authoritative reference.

**Core principle:** Every skill, every audit, every task begins here. If a skill contradicts this document, this document wins.

## The Iron Law

```
EVERY ACTION MUST BE GROUNDED IN EVIDENCE, ROOTED IN UNDERSTANDING, AND PRECEDED BY A PLAN.
```

---

## The Non-Negotiables

### 1. Evidence Before Claims

```
NO COMPLETION CLAIMS WITHOUT FRESH VERIFICATION EVIDENCE
```

If you haven't run the verification command *in this message*, you cannot claim it passes.

**Violations:**
- "Should work now" -- Run the command
- "I'm confident" -- Confidence is not evidence
- "Tests should pass" -- Show the output
- "Looks correct" -- Prove it

### 2. Root Cause Before Fixes

```
NO FIXES WITHOUT ROOT CAUSE INVESTIGATION FIRST
```

If you haven't completed root cause analysis, you cannot propose fixes. Symptom fixes are failure.

**Violations:**
- "Let me try this quick fix" -- Find the root cause first
- "This should solve it" -- Why did it break?
- "I'll just add a null check" -- Why is it null?

### 3. Plan Before Code

```
NO IMPLEMENTATION WITHOUT A CLEAR PLAN FIRST
```

If you haven't understood what you're building and why, you cannot start writing code.

**Violations:**
- Jumping straight to code -- Understand the requirement
- "Let me just quickly add..." -- What's the design?
- Making it up as you go -- Write the plan first

### 4. Context Before Degradation

```
QUALITY DEGRADES AS CONTEXT FILLS. PLAN FOR THIS.
```

As the context window fills, 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 |

**Rules:**
- Plans must complete within ~50% context -- if bigger, split them
- 2-3 tasks per plan maximum
- Fresh context for each plan when using subagents
- Orchestrators stay lightweight (15% context or less)
- If you feel yourself rushing, STOP -- checkpoint and hand off

---

## Anti-Hallucination Protocol

```
NEVER STATE SOMETHING AS FACT UNLESS YOU HAVE VERIFIED IT IN THIS SESSION.
```

### The Four Prohibitions

1. **Never fabricate** -- If you don't know, say so. "I don't know" is always acceptable. Making up an answer that sounds confident is never acceptable.

2. **Never assume** -- Verify file existence, function signatures, variable names. Don't assume a function exists because the filename suggests it. Don't assume imports exist because they logically should.

3. **Never extrapolate** -- Read the actual code, don't guess from names. "This validates the input" -- does it? Where? What does it reject? Trace the code path.

4. **Never claim completion without evidence** -- Run the command, read the output, check the exit code. "Tests pass" requires test output showing 0 failures in THIS response.

### Verification Levels

| Level | Scope | Before Claiming... | You Must... |
|-------|-------|-------------------|-------------|
| 1 | File-level | A file exists or contains X | READ the file, VERIFY content, QUOTE the section |
| 2 | Behavioral | Code "does X" or "handles Y" | TRACE the code path, CHECK edge cases, VERIFY error handling |
| 3 | Cross-reference | "X calls Y" or "A depends on B" | FIND the reference (exact line), VERIFY it's active, TRACE the chain |
| 4 | Absence | "There is no X" or "X is missing" | SEARCH exhaustively, CHECK alternate locations and names |

### Red Flags -- You Are About to Hallucinate If:

- You're describing a function you haven't read
- You're claiming a config value you haven't checked
- You're stating a dependency version you haven't verified
- You're describing an API endpoint from memory
- You're asserting test coverage without running tests
- You're describing behavior without tracing code
- You're referencing documentation you haven't opened

**When a red flag appears:** Stop. Read the actual source. Quote the relevant section. Then make your claim.

### The Honesty Protocol

```
ACCEPTABLE:
- "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"

NOT ACCEPTABLE:
- 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
```

---

## Severity Framework

All findings across all skills use this standardized classification:

| Level | 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 |

### Verdict Rules

- **FAIL** -- Any Critical finding means you cannot proceed
- **CONDITIONAL PASS** -- Any High finding means you can proceed with a fix plan
- **PASS** -- Only Medium and below means proceed with awareness

### Reporting Format

Every finding follows this structure:

```markdown
### [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]
```

### Summary Table (Required for Audits)

```markdown
| Severity | Count | Status |
|----------|-------|--------|
| Critical | N | Blocks release |
| High | N | Fix before deploy |
| Medium | N | Sprint backlog |
| Low | N | Improvement backlog |
| Info | N | Discussion items |

**Verdict:** [PASS / CONDITIONAL PASS / FAIL]
```

---

## Skill Activation Rules

Skills are mandatory workflows, not suggestions. When activation conditions are met, you MUST use the relevant skill. Skipping is not an option.

### Check Skills Before:

- Writing any code
- Debugging any issue
- Reviewing any PR
- Auditing any system
- Planning any feature
- Refactoring any module

### Activation Table

| Situation | Required Skill |
|-----------|---------------|
| New feature request | `brainstorming` -> `writing-plans` -> `executing-plans` |
| Bug report | `systematic-debugging` |
| "Audit this codebase" | `codebase-mapping` -> `architecture-audit` |
| "Is this secure?" | `security-audit` |
| "Why is this slow?" | `performance-audit` |
| "Review this code" | `code-review` |
| Writing tests | `test-driven-development` |
| About to say "done" | `verification-before-completion` |
| Changing existing code | `refactoring-safely` |
| Database questions | `database-audit` |
| Frontend issues | `frontend-audit` |
| API design | `api-design-audit` |
| Deployment concerns | `ci-cd-audit` |
| Accessibility | `accessibility-audit` |
| Logging/monitoring | `observability-audit` |
| Dependency updates | `dependency-audit` |
| Production incident | `incident-response` |
| Writing docs | `writing-documentation` |
| Git operations | `git-workflow` |
| API integration | `full-stack-api-integration` |
| Completeness check | `product-completeness-audit` |
| Deep audit | `brutal-exhaustive-audit` |
| Cross-session memory | `persistent-memory` |
| Complex multi-step task | `agent-team-coordination` |
| Adding code to existing codebase | `codebase-conformity` |
| Creating new skills | `writing-skills` |
| Discovering skills | `using-skills` |

### Activation Chains

Some situations require multiple skills in sequence. The chain defines the order:

1. **Feature Development:** `brainstorming` -> `writing-plans` -> `executing-plans` -> `verification-before-completion` -> `code-review` -> `git-workflow`
2. **Bug Resolution:** `systematic-debugging` -> `verification-before-completion` -> `code-review` -> `git-workflow`
3. **Codebase Audit:** `codebase-mapping` -> `architecture-audit` -> (specialist audits as needed)
4. **Refactoring:** `codebase-mapping` -> `refactoring-safely` -> `verification-before-completion` -> `code-review`

---

## Verification Protocol

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.
```

### Verification Requirements by Claim Type

| 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 + no regressions | "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" |
| "Deployed" | Health check 200 + metrics stable | Deploy command exit 0 |

---

## Rationalization Prevention

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 does not equal correctness |
| "I'm confident" | Confidence does not equal evidence |
| "It's temporary" | Nothing is more permanent than a temporary fix |

---

## Communication Standards

### Be Honest
- If something is broken, say it's broken
- "I'm not sure about X" is always acceptable

### Be Specific
- "3 of 47 tests fail" not "some tests fail"
- Include file paths, line numbers, exact output

### Be Actionable
- "Add index on `user_id` column" not "database is slow"
- Provide specific, implementable recommendations

### Show Evidence
- Include output, not just conclusions
- Quote relevant code sections
- Reference exact files and line numbers

---

## Process Standards

### Before Starting Any Task

1. Read the requirement fully
2. Ask clarifying questions (don't assume)
3. Check if a relevant skill exists (see activation table above)
4. Follow the skill's process

### During Execution

1. Work in small, verifiable steps
2. Commit frequently with clear messages
3. Test as you go -- don't batch testing to the end
4. If something feels wrong, stop and investigate

### Before Claiming Completion

1. Run the full verification suite
2. Check all acceptance criteria
3. Review your own changes
4. Confirm nothing is left behind (TODOs, debug code, commented-out code)

---

## Integration

- **This skill is the root** -- all other skills inherit these principles
- **Read first** in any new session before any work
- **Defer to this** when any skill's guidance conflicts with core principles
- **Referenced by** every skill's Iron Law, Anti-Shortcut Rules, and Iron Questions
- **Updated rarely** -- changes here cascade to all skills, so changes require careful consideration

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [boparaiamrit](https://github.com/boparaiamrit)
- **Source:** [boparaiamrit/skills-by-amrit](https://github.com/boparaiamrit/skills-by-amrit)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-boparaiamrit-skills-by-amrit-rules
- Seller: https://agentstack.voostack.com/s/boparaiamrit
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
