skills/dev-loop/skills/research/SKILL.md
Pluggable research agent for dev-loop. Spawn with model: sonnet. Scans code health (CLI, tests, skills, specs) and optional vault health (coverage, links, quality). Outputs prioritized work items. Pass `high` for aggressive mode.
npx skillsauth add karlorz/agent-skills researchInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Pluggable research cycle for dev-loop. Scans configurable health tracks, cross-references findings with retros, outputs prioritized work-item recommendations.
This agent is spawned by dev-loop with model: "sonnet". Code health scanning (coverage gaps, skills drift, spec drift, unpushed commits) and vault health scanning (raw coverage, cross-links, page quality, type coverage) are mechanical analysis tasks — searching, counting, pattern matching. Sonnet handles these at ~5x lower cost than Opus with no quality loss for this work.
When invoked standalone (not via dev-loop), default to the calling session's model.
┌─────────────────────────────────────────┐
│ 0. RESOLVE CAPABILITIES │
│ Detect: cli_backend, vault_backend │
├─────────────────────┬─────────────────┤
│ TRACK A (optional) │ TRACK B (opt) │
│ Code Health │ Vault Health │
│ - Coverage gaps │ - Raw coverage │
│ - Skills drift │ - Cross-links │
│ - Spec drift │ - Page quality │
│ - Unpushed commits │ - Type coverage │
├─────────────────────┴─────────────────┤
│ 1. RETROS (if vault_backend) │
│ 2. SYNTHESIZE → P0-P3 (P4+ in high) │
│ 3. OUTPUT (vault log + memory) │
└─────────────────────────────────────────┘
At REFRESH, re-derive BACKEND_CAPS using the same logic as the parent dev-loop skill. Do NOT assume inherited state — explicitly resolve from config:
knowledge_layer from project config (default: skillwiki if vault exists, none otherwise).BACKEND_CAPS from knowledge_layer — same registry/defaults as parent skill REFRESH step.BACKEND_CAPS membership:| Capability | Detection | Track |
|------------|-----------|-------|
| cli_backend | cli_src field exists | A |
| vault_backend | query_vault in BACKEND_CAPS | B |
Skip tracks when backends unavailable. Run with available tracks only.
Critical: BACKEND_CAPS controls work-item creation paths in the Output step. If create_work_item is in BACKEND_CAPS, use proj-work for vault-native paths. Only fall back to git-local (.claude/dev-loop-work/) when create_work_item is absent.
Parse args for high (case-insensitive). Default: normal.
| Mode | Output | Recurring | Thresholds | |------|--------|-----------|------------| | normal | top-3 | Suppress unchanged | P1: uncited>50%, thin<40L, links<2 | | high | top-5 | Never suppress | P1: uncited>20%, thin<60L, links<3, P4+ enabled |
Skip if cli_backend unavailable.
If CRITICAL_PATHS session variable is non-empty, apply ranking bias:
CRITICAL_PATHS.*.code globs are
promoted one priority tier above their calculated score (e.g., P2 → P1).{cli_src}/ without matching {cli_test}/ tests--human, exit codes)TODO|FIXME|HACK|XXXgit log origin/${release_branch:-main}..HEAD --oneline 2>/dev/null | wc -l
Skip if vault_backend unavailable.
orphans if available)overlap if available)confidence: high but TL;DR section contains only placeholder strings (Pending summary., TBD, TODO, single-bullet stub). Flag as info severity — high-confidence hub pages should not ship with placeholder summaries. Surface alongside thin-page findings.If vault_backend:
{vault}/log.md for Improve: actions{vault}/projects/{slug}/compound/ for pending workWhen this research agent returns no P2+ findings (truly idle), the
parent dev-loop may invoke /deep-research per the idle_deep_research
config section (see IDLE DISCOVERY step 3.5 in SKILL.md).
This agent's role in the handoff:
idle_deep_research.enabled, cooldown, and daily cap.If the research agent returns P2+ findings, deep-research is skipped — there's claimable work to pick up.
Score: impact × effort
| P | Impact | Examples | |---|--------|----------| | P0 | Spec violation | Regression, broken contract | | P1 | High gap | Untested cmd, uncited raw>50%, isolated pages | | P2 | Medium | Thin pages, skill drift, single-source | | P3 | Low polish | Quality, cross-links, sections | | P4+ | Speculative | Proactive improvements, experiments |
Output format:
### #[N]: [title] (Px)
**Source**: [track.source]
**What**: One-paragraph spec.
**Acceptance**: Verifiable outcomes.
Pre-idle gate: Check metrics before declaring idle.
| State | Condition | Exit | |-------|-----------|------| | Truly idle | Zero findings + healthy metrics | "Research idle" | | Steady backlog | No new, gaps persist | "Research steady — [N] recurring" | | High mode | Always | Never idle, proactive suggestions |
Healthy thresholds:
Never report idle with actionable gaps.
When synthesizing recommendations that need work items, check create_work_item in BACKEND_CAPS:
create_work_item in BACKEND_CAPS: Use proj-work to create work items under {vault}/projects/{slug}/work/. This ensures wiki indexing, knowledge.md references, and wiki-lint visibility.create_work_item not in BACKEND_CAPS: Fall back to .claude/dev-loop-work/YYYY-MM-DD-{slug}/ (git-local path). Ensure .claude/dev-loop-work/ is in .gitignore.Never silently default to git-local when the vault backend is configured — this bypasses the vault and breaks provenance.
If vault_backend:
{vault}/log.mdAlways: one-line exit summary.
The agent delegates to configured backends. Expected interface:
interface ResearchBackend {
// Detection
isAvailable(): boolean;
// Track A
listSourceFiles(): string[];
listTestFiles(): string[];
listSkillFiles(): string[];
// Track B
countRawFiles(): number;
countCitedRaw(): number;
countIsolatedPages(): number;
countThinPages(threshold: number): number;
listOrphanPages(): string[];
// Output
appendLog(entry: string): void;
// Work-item creation (requires create_work_item in BACKEND_CAPS)
createWorkItem(slug: string, kind: string): { specPath: string; planPath: string };
}
Default implementations provided for:
cli_backend: filesystem + gitvault_backend: skillwiki CLI (if available), else fs-onlydevelopment
Review and simplify recently changed code for reuse, clarity, and efficiency while preserving behavior. Use when the user asks to simplify, refine, polish, clean up, or make code clearer, or after finishing a logical chunk of implementation that should be tightened before commit.
tools
Use this skill when the user asks to open a browser, browse a website, scrape a page, automate Chrome, take a screenshot, fill out a form, click a button, or otherwise interact with a website. Includes a browser-worker agent (model: sonnet) for mechanical Chrome lifecycle and interaction tasks.
development
Host-level backup and restore with profile system (presets + custom YAML profiles), model-aware agents (sonnet worker for mechanical tasks), post-discovery research, and skillwiki infrastructure capture. Uses rsync with partial-dir for resumable WAN transfers. Use when backing up or restoring Caddy reverse-proxy domains, databases (postgres, mysql, redis, mongodb, sqlite), systemd services, full SSH identity/config, Tailscale state/config, and Hermes agent state on remote Linux hosts.
tools
Hermes Agent CLI commands reference. Use when the user asks about hermes-agent CLI usage, commands, flags, or subcommands. Covers the full hermes terminal command surface.