implementlisted
Install: claude install-skill peteski22/agent-pragma
# Implement with Validation
Implement the requested feature/fix, then validate before completing.
**Phase 0 is mandatory and must complete successfully before any other phase.**
## Task
$ARGUMENTS
## Phase 0: Inject Applicable Rules
Before starting work, collect and read all applicable project rules.
### Step 1: Identify target directories
Based on the task, identify which directories will contain files to be created or modified.
If uncertain, err on the side of including more directories rather than fewer. Extra rules being applied is safe; missing rules is not.
### Step 2: Collect project rules
Collect project rules from the project's rule directory. Rule file locations vary by agent platform:
- Claude Code: `.claude/rules/*.md`
- OpenCode: `AGENTS.md` (auto-loaded natively)
- Other agents: check agent documentation for project rule conventions
For Claude Code, use the Glob tool to discover `.claude/rules/*.md` files, then the Read tool to load them. OpenCode auto-loads rules from `AGENTS.md` at the platform level. Collect those that exist and are readable. A file is considered "found" only if it exists and can be successfully read.
**Note:** Path-scoped rules (those with `paths:` frontmatter) may be auto-loaded by the agent platform only for matching files. When collecting rules manually, read the frontmatter and apply path-scoped rules only to the target directories they match.
### Step 2a: Check for local supplements
Check for a local supplements file (e.g