Problem
When a domain fails during doc init, retrying with --mode chunked --domains "failed-domain" currently re-runs the full discovery (2 parallel Claude agents, ~2 min) even though we already have the results from the first run.
Solution
Cache discovery findings to .claude/skills/.discovery-cache.json after the first successful discovery run. Structure:
{
"timestamp": "2026-03-23T...",
"domains": [...],
"findings": "...",
"repoHash": "abc123"
}
When --domains is used with --mode chunked:
- Check if cache exists and is recent (< 1 hour or same repo hash)
- If yes, load cached domains + findings, skip discovery
- If no, run discovery as normal
This makes domain retries instant — scan only, no LLM calls until actual generation.
Current workaround
The --domains flag now skips discovery (merged in latest), but it also loses the discovery findings context that helps Claude write better skills.
Problem
When a domain fails during
doc init, retrying with--mode chunked --domains "failed-domain"currently re-runs the full discovery (2 parallel Claude agents, ~2 min) even though we already have the results from the first run.Solution
Cache discovery findings to
.claude/skills/.discovery-cache.jsonafter the first successful discovery run. Structure:{ "timestamp": "2026-03-23T...", "domains": [...], "findings": "...", "repoHash": "abc123" }When
--domainsis used with--mode chunked:This makes domain retries instant — scan only, no LLM calls until actual generation.
Current workaround
The
--domainsflag now skips discovery (merged in latest), but it also loses the discovery findings context that helps Claude write better skills.