Agent skill
file-first
File-first architecture principle for understanding codebases. Agents should read source files directly instead of relying on summaries, RAG, or pre-loaded context. Use Glob/Grep/Read tools.
Install this agent skill to your Project
npx add-skill https://github.com/resolve-io/.prism/tree/main/plugins/prism-devtools/skills/file-first
SKILL.md
File-First Architecture
Core Principle: Read source files directly. No RAG, no vector databases, no pre-loaded summaries.
When Agents Should Apply This
- Entering an unfamiliar codebase
- Need to understand project structure before implementation
- Looking for specific code patterns or implementations
- User asks "analyze this codebase" or "what files should I read"
The Pattern (For Agents)
1. DETECT → Run analyzer to identify project type
2. LOCATE → Use Glob/Grep to find relevant files
3. READ → Read actual source files (not summaries)
4. CITE → Always reference file:line when quoting
5. ITERATE → Search again if needed
Quick Project Detection
python "${CLAUDE_PLUGIN_ROOT}/skills/file-first/scripts/analyze_codebase.py" "$(pwd)"
Returns: project type, key files, suggested read order.
Reference Documentation
Load these only when needed (progressive disclosure):
- Philosophy - Why file-first > RAG
- Target Repo Patterns - Project type detection
- Context Loading Strategy - Efficient loading
- Troubleshooting - Common issues
Scripts
| Script | Purpose |
|---|---|
scripts/analyze_codebase.py |
Detect project type, suggest key files |
scripts/validate_file_first.py |
Check if agents follow principles |
Integration
This principle is referenced by:
- Agent personas (dev, qa, architect) when entering new codebases
shared/reference/file-first.mdfor quick lookup- Context loader hook for "analyze codebase" triggers
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
review-story
Use to perform comprehensive test architecture review with quality gate decision. Creates both story updates and detailed gate files.
create-dev-task
Use to generate development task documents for the Dev agent. Creates specifications describing WHAT needs fixing based on validated issues and investigations.
test-design
Use to design test strategies and create test specifications. Documents testing approaches for stories.
sdlc-handoff
Use for SDLC phase transitions. Ensures proper handoff between development phases with documentation.
qa-gate
Use to create or update quality gate decision files for stories. Provides clear pass/fail decisions with actionable feedback.
document-project
Use to analyze and document any project codebase. Creates comprehensive reference documentation for AI-assisted development including architecture and patterns.
Didn't find tool you were looking for?