Investigate historical context of existing code, patterns, or constraints before proposing changes. Automates git archaeology, PR/ADR search, and dependency analysis to prevent removing structures without understanding their purpose.
Investigates the historical context and original purpose of existing code before proposing changes or deletions.
/plugin marketplace add rjmurillo/ai-agents/plugin install project-toolkit@ai-agentsThis skill inherits all available tools. When active, it can use any tool Claude has access to.
Enforce epistemic humility before changing existing systems. Requires understanding original purpose before proposing changes.
| Phrase | Context |
|---|---|
why does this exist | Investigating existing code or patterns |
chestertons fence | Explicit investigation request |
before removing | Planning deletion or replacement |
historical context | Researching original rationale |
prior art investigation | ADR-required investigation |
| Input | Output | Destination |
|---|---|---|
| File path or ADR number | Investigation report | .agents/analysis/NNN-chestertons-fence-TOPIC.md |
| Component description | Historical context summary | stdout (JSON) |
Use this skill BEFORE proposing changes to existing:
1. Identify Structure What exists? Where?
|
v
2. Git Archaeology git log/blame to find origin
|
v
3. PR/ADR Search Find original rationale
|
v
4. Dependency Analysis What references this?
|
v
5. Generate Report Fill investigation template
|
v
6. Decision REMOVE / MODIFY / PRESERVE / REPLACE
# Investigate a file or pattern
python3 scripts/investigate.py --target path/to/file.py --change "remove unused validation"
# Investigate an ADR
python3 scripts/investigate.py --target .agents/architecture/ADR-005.md --change "allow bash scripts"
# Output as JSON (for automation)
python3 scripts/investigate.py --target path/to/file.py --change "description" --format json
When investigating changes to existing systems, run this skill first. The investigation report becomes a prerequisite for any change proposal.
ADRs that deprecate or replace existing patterns MUST include a "Prior Art Investigation" section. Use this skill to generate it.
Before implementing deletions or major refactoring, verify that an investigation report exists. If missing, route to analyst.
When validating plans that remove or replace existing systems, check for investigation evidence. Auto-reject proposals without historical context.
Investigation reports use the template at .agents/templates/chestertons-fence-investigation.md.
Activates when the user asks about AI prompts, needs prompt templates, wants to search for prompts, or mentions prompts.chat. Use for discovering, retrieving, and improving prompts.
Search, retrieve, and install Agent Skills from the prompts.chat registry using MCP tools. Use when the user asks to find skills, browse skill catalogs, install a skill for Claude, or extend Claude's capabilities with reusable AI agent components.
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems. Create original algorithmic art rather than copying existing artists' work to avoid copyright violations.