feat: source prompt surfaces from the Distillery at master (fail-open to in-repo copies) #485
Labels
No labels
Agent
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No assignees
1 participant
Notifications
Total time spent: 39 minutes 34 seconds
Due date
igor
39 minutes 34 seconds
No due date set.
Dependencies
No dependencies set
Reference
joshtronic/igor#485
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
SPEC REVISED by the operator (2026-08-10, supersedes the original body -- if you built against the earlier "fall back to in-repo copies" design, rework to this):
igor sources its prompt surfaces from the Distillery (joshtronic/distillery) at master, live. No pins, no submodules, and no in-repo fallbacks: the fallback is the PREVIOUSLY SOURCED copy. One initial successful pull is mandatory; after that, failures are never blockers -- the last-good cache serves.
Deliverables
lib/context-source.shimplementing last-good-cache sourcing:~/.local/state/agent/context/holding one frontmatter-stripped body per consumed skill plus aHEADstamp (the distillery commit the cache was built from).context_refresh-- called once per tick (near the self-pull): read distillery'sorigin/masterHEAD from the existing fetched clone (~/.local/state/agent/repos/distillery,git showpattern -- never the working tree). If HEAD == cache stamp, no-op. Otherwise extract every consumed skill (list below), validate each (frontmatter present, body >= 10 lines), and ONLY if ALL are valid: write to a temp dir and atomically swap into the cache, update the stamp. If ANY is invalid or the clone is unavailable: keep the existing cache, log ONE warn per offending HEAD (stamp the bad HEAD so the warn doesn't repeat every tick).context_surface <skill-name>-- echoes the cached body. Nonzero ONLY when the cache has never been seeded.context_refreshcannot seed it, prompt-consuming work is BLOCKED loudly (log + the once-daily operator alert path) -- igor does not run on missing brain.bin/doctor.shandbin/install.shgain a check: initial context pull succeeded.context_surface: worker-contract (worker system prompt), review-directive, voice, feedback-directive, site-work-directive, sports-digest-directive, now-directive.bin/test-context-source.sh): valid skill -> body cached, frontmatter stripped exactly; HEAD unchanged -> no-op (no re-extract); one malformed skill in a new HEAD -> ENTIRE swap refused, old cache intact, single warn; clone missing -> cache serves; unseeded cache + failed refresh -> surfaces refuse with the loud path; atomicity (temp-dir swap, no partial cache observable).Out of scope
AGENTS.mdprompt body,bin/lib/*.md) -- separate cleanup after burn-in; notebin/check-sync.shgreps AGENTS.md's OUTCOME sentinels, so that cleanup must retarget check-sync and is explicitly NOT this ticket.Verification
make testgreen including the new suite.---lines); simulate a bad master (fixture) and confirm the cache holds and warns once.Notes