Research Gate
What it enforces
Before ANY .py file can be written or edited:
- A
research.mdfile must exist at the target project root - It must be fresh (modified within the configured window)
- It must contain URLs from domains listed in
config/approved_sources.jsonfor the active project - URLs must actually resolve (not just domain-match — the link must be real)
- Citations are logged to
.claude/research_citations.log(append-only TSV)
Approved sources
Sources are defined per-project in config/approved_sources.json. The agent NEVER modifies this file. Only Sage adds entries via /sagex:approve-source or /sagex:edit-mode.
Default approved domains: arxiv.org, github.com
Project-specific domains inherit from global + project-level entries.
What happens on failure
- No research.md: BLOCK. Agent must research first.
- Stale research.md: BLOCK. Agent must refresh research.
- No approved URLs: BLOCK. Agent must find approved sources.
- URLs from unapproved domains: BLOCK. Denial message lists approved domains.
- URL doesn't resolve: BLOCK. Agent must verify the link works.
Integration
This skill describes the behavior. The mechanical enforcement is in hooks/validate_research.py which fires as a PreToolUse hook on Write/Edit events. The skill exists so agents understand WHY they're being blocked and what to do about it.