skills/golem-powers/research-lifecycle/SKILL.md
Manage research context freshness — add sprint results, condense stale files, refresh descriptions, archive implemented findings. Prevents next research round from starting with wrong assumptions. Triggers on: stale context, research prep, R-number, refresh context, before research.
npx skillsauth add etanhey/golems research-lifecycleInstall 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.
Anti-pattern: R75 says "FTS5 is 96.9% desynced" — but it's been fixed for days. Without lifecycle management, R76 starts from wrong assumptions.
Research context files live at docs.local/claude-web/projects/<project>/. After a sprint implements research findings, these files go STALE. This skill manages the lifecycle so the next research round starts from truth, not assumptions.
Every research dispatch — fleet-fired OR Etan-fired in his own Gemini/NotebookLM UI (standing fire=Etan rule) — MUST carry these fields at dispatch time:
| Field | Required content |
|-------|------------------|
| harvest_owner | Named agent/LEAD who owns pulling results back into the fleet |
| harvest_trigger | What event starts harvest (report complete, Drive export lands, cron poll, Etan says "it's done", etc.) |
| export_route | Where results land for the fleet: Drive path, docs.local/research/, collab ack, brain_store digest — adapters must name this explicitly |
Research without all three = PARKED. Do not mark done, do not brain_store conclusions, do not close the collab row until harvest completes or Etan explicitly parks it.
Applies to /gemini-research, /claude-desktop-research, and orc W5 research dispatches. The E07 integrity gate catches bad claims; this gate catches throughput — results sitting unharvested since morning.
SPRINT COMPLETES (findings implemented)
│
├─ 1. NEWEST: Add sprint results as new context file
│ (what changed, benchmark numbers, PRs merged)
│
├─ 2. CONDENSED: Compress older context files
│ (files 01-50 → one condensed file)
│
├─ 3. UPDATED: Refresh description.md with current state
│ (facts first, narrative second)
│
├─ 4. ARCHIVED: Move implemented research results
│ (R-numbers whose findings are now in code)
│
└─ 5. MIRRORED: Update NotebookLM sources
(swap stale for updated files)
After a sprint that implements research findings, create a new context file:
# File: research-context/NN-sprint-results-{date}.md
## Sprint: {description}
- Date: {date}
- PRs merged: #{N}, #{N}, #{N}
## What Changed
- {specific change 1}: {before state} → {after state}
- {specific change 2}: {before} → {after}
## Benchmark Numbers
- {metric}: {old value} → {new value}
- {metric}: {old} → {new}
## What's Still Open
- {remaining issue 1}
- {remaining issue 2}
Key: Include BEFORE and AFTER states. The researcher needs to know what was the problem AND what's the current state.
Naming: Use sequential numbers (91-, 92-, 93-...) to preserve ordering. Prefix with the topic.
When context files accumulate (>10 files or >50KB total), condense older ones:
BEFORE:
91-swift-python-root-cause.md (from 2 weeks ago, findings implemented)
92-brainbar-ux-current-state.md (from 1 week ago, partially stale)
93-inspiration-references.md (timeless, keep as-is)
94-search-improvement-collab.md (from yesterday, still current)
AFTER:
condensed-pre-R75.md (91 + 92 merged, updated to current state)
93-inspiration-references.md (unchanged — timeless content)
94-search-improvement-collab.md (unchanged — still current)
95-R75-sprint-results.md (NEW — what the sprint changed)
Condensation rules:
The project description file tells the researcher what the project IS. It must reflect current state.
Location: docs.local/claude-web/projects/<project>/description.md
Refresh checklist:
Format: Facts first, narrative second. Lead with numbers, follow with explanation.
## Current State (as of {date})
- Chunks: 299,972 (FTS5: 100% synced ← was 3.1% before R75 sprint)
- Entities: 166 (0.055% coverage ← needs improvement)
- Tests: 675 passing
- MCP: BrainBar (Swift daemon), 5 working tools + 3 stubs
## Architecture
{current architecture, verified against code}
Research results (R-number files) whose findings are fully implemented should move to archived:
# Move completed research
mv docs.local/claude-web/projects/brainlayer/R38-knowledge-graph.md \
docs.local/claude-web/projects/archived/brainlayer/
Archive criteria:
DON'T archive:
If the project has a NotebookLM notebook (see /gemini-research):
Delete stale sources from the notebook:
source_delete(source_id=stale_source, confirm=True)
Add updated files:
source_add(notebook_id, source_type="file", file_path="updated-context.md", wait=True)
Update notebook instructions:
chat_configure(notebook_id, goal="custom",
custom_prompt="Context files have been updated as of {date}. Previous findings about {X} are now implemented.")
Remember NP3: .py/.json/.swift/.yaml files must be renamed to .txt for NotebookLM upload.
| Trigger | Action | |---------|--------| | Sprint merged PRs that address research findings | Run full lifecycle (Steps 1-5) | | Before writing a new R-number research prompt | Run Steps 2-4 (condense, update, archive) | | Nightly/project maintenance runs | Check if context files are stale (Step 3 at minimum) | | Context file count > 10 | Run Step 2 (condense) | | NotebookLM notebook exists | Run Step 5 (mirror) |
A context file is STALE when:
gh pr viewQuick staleness check:
# Find context files older than 7 days with no updates
find docs.local/claude-web/projects/PROJECT/research-context/ -name "*.md" -mtime +7
| Skill | How Research Lifecycle Uses It |
|-------|------------------------------|
| Claude/Gemini research runs | Create research results → lifecycle manages them afterward |
| /gemini-research | NotebookLM file type restrictions apply to mirroring (Step 5) |
| Nightly/project maintenance | Should check research context staleness during sweeps |
| /never-fabricate | Verify claims in description.md against actual code before updating |
| /orc W5 | Claude Web research prompts consume these context files |
R75 sprint fixed FTS5 sync, implemented detect_entities_in_prompt, improved search.
95-R75-sprint-results.md with: FTS5 3.1%→100%, entity detection implemented, search hybrid mode live91-swift-python-root-cause.md + 92-brainbar-ux-current-state.md → condensed-pre-R75.md (update "FTS5 broken" → "FTS5 fixed in PR #198")description.md — chunk count, entity count, test count, remove "FTS5 broken" from known issuesR38-knowledge-graph.md (fully implemented) to archived/brainlayer/tools
The human-eval UX contract for Phoenix views: turn-by-turn scrollable replay (not a scorecard), hide-but-copyable IDs, collapsed thinking, identity chips, tool filters, tiny frozen starter datasets, mark-wrong-in-thread, mobile-first. Use when: building or reviewing ANY Phoenix/eval view, annotation UI, session replay, or human-grading surface. Triggers: phoenix view, eval UI, annotation view, session replay, human eval UX, grading interface. NOT for: Phoenix data pipelines/ingest (capture scripts have their own specs).
tools
macOS systems specialist — AppKit NSPanel architecture, launchd services, socket activation, MCP bridge resilience, syspolicyd, and high-frequency SwiftUI dashboards. Use when building menu-bar apps, LaunchAgents, debugging syspolicyd/Gatekeeper/TCC, resilient UDS/MCP bridges, or SwiftUI dashboards at 10Hz+.
development
Bulk LLM-judging protocol for fleet-dispatched verdict runs (KG cluster, eval harness). Use when: dispatching or running judge workers (J1/J2/RT), planning bulk-apply from verdict JSONL, or triaging evidence_degraded outputs. Triggers: judge fleet, bulk judge, R3 verdicts, kg-judge, RT gate, evidence_degraded. NOT for: single-item code review, Phoenix view UX (use phoenix-human-view), or non-judge eval pipelines.
development
Quiet-down protocol for sprint close: when the fleet wraps, delete ALL polling crons and monitors, send ONE final dashboard + ONE message, then go SILENT. Use when: fleet wraps, all workers done, overnight queue exhausted, sprint close, Etan asleep/away with nothing approved left. Triggers: fleet wrap, wrap the fleet, stand down, going quiet, sprint close. NOT for: mid-sprint monitoring (keep your loops), spawning a successor (use /session-handoff first).