Repository navigation
refactor(skills): fable 5 revamp of all 17 skills + v4 trash cleaning - #2518
Conversation
…HIP) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014SwFHxrsQVdwG32ChnsKku
…sh skills-fable5-revamp G1) 803->48 and 627->47 lines; optimizer prompt extracted verbatim to prompts/optimizer.md (runtime-read at dispatch); hack catalog moved to references/ with all 8 hacks preserved and re-grounded in the live v5 CLI; skills-lint:ignore marker removed, lint green. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014SwFHxrsQVdwG32ChnsKku
Wish skills-fable5-revamp. 396->108, 196->103, 259->107, 282->101; daemon-era team/agent/events flows rewritten to native-team dispatch (Agent tool + SendMessage) and the task DB; grounded-progress clauses added to pm/dream/report; mode contracts extracted to references/; 5 lint markers removed, lint green. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014SwFHxrsQVdwG32ChnsKku
Wish skills-fable5-revamp. brainstorm 230->125, wish 105->71, work 181->103, review 171->114, fix 112->75, trace 109->54; all 8 frozen handoff contracts preserved verbatim (template cp rule, wishes:lint gate, task linkage, verdict vocabulary, artifact paths, reviewer!=engineer, session-close outcome words, native-team dispatch); 2 lint markers removed and refs fixed at the root; lint green. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014SwFHxrsQVdwG32ChnsKku
Wish skills-fable5-revamp. genie 186->94 (25 intents -> 27 routes, zero dropped), wizard 161->57, learn 108->61, docs 83->43, omni 164->74; lifecycle.md re-grounded to v5 zero-daemon; genie-omni wiring rebuilt from source (omni-config.ts routes contract, ed25519 handshake); two baseline factual errors fixed (orchestration-guard nudges not blocks, genie task status exists); 5 lint markers removed, lint green. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014SwFHxrsQVdwG32ChnsKku
Wish skills-fable5-revamp. New legacy-v4 module: shared path manifest, detectV4Install(), exported cleanupV4() — content-marker gated rules-file removal (backup-first to ~/.genie/state-backups/v4-cleanup-<ts>/, logged, idempotent), orphaned automagik/genie/4.* cache cleanup (.orphaned_at gated, manifest backup). Wired into a recreated thin 'genie install' finisher (bootstrap handoff restored, non-exec, --skip-v4-cleanup) and guarded post-delivery in 'genie update' so upgraded machines clean too. uninstall.ts consumes the shared manifest. 16 pgserve-free tests incl. backup-before-delete and degradation locks; wish doc re-grounded to dev reality; v4-footprint inventory in reports/. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014SwFHxrsQVdwG32ChnsKku
All 10 Success Criteria PASS with pasted evidence: combined surface 5514 -> 2016 lines (-63.4%), skills:lint 118 dead refs -> 0 with zero ignore markers, budgets held, frozen contracts quoted, zero D/R in either repo diff, G8 gates green. Conventions live-CLI list gains 'install' (recreated by G8). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014SwFHxrsQVdwG32ChnsKku
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Code Review
This pull request implements a comprehensive Fable 5 revamp of all Genie and Omni skills, reducing always-loaded prompt lines by over 60% and eliminating 118 dead daemon-era CLI references. It also introduces a robust v4 legacy cleanup mechanism to remove stale global rules and orphaned plugin caches with backup and logging, wired into both the installation and update flows. Feedback on the changes highlights a potential crash in the v4 detection logic if the plugin cache directory is unreadable or is not a directory, which should be wrapped in a try-catch block to ensure graceful degradation.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| if (existsSync(cacheRoot)) { | ||
| for (const entry of readdirSync(cacheRoot, { withFileTypes: true })) { | ||
| // isDirectory() is false for symlinks: never follow a link out of the cache. | ||
| if (!entry.isDirectory()) continue; | ||
| if (!entry.name.startsWith(V4_LEGACY_MANIFEST.v4CacheVersionPrefix)) continue; | ||
| const dirPath = join(cacheRoot, entry.name); | ||
| cacheDirs.push({ | ||
| path: dirPath, | ||
| version: entry.name, | ||
| orphaned: existsSync(join(dirPath, V4_LEGACY_MANIFEST.orphanMarkerFile)), | ||
| }); | ||
| } | ||
| } |
There was a problem hiding this comment.
If cacheRoot exists but is not a directory (e.g., it is a file) or is not readable due to permission restrictions, readdirSync will throw an error (such as ENOTDIR or EACCES). Since detectV4Install is called during the installation finisher without a surrounding try-catch block, this can crash the entire installation process. Wrapping the directory reading in a try-catch block ensures the installer degrades gracefully in restricted environments.
if (existsSync(cacheRoot)) {
try {
for (const entry of readdirSync(cacheRoot, { withFileTypes: true })) {
// isDirectory() is false for symlinks: never follow a link out of the cache.
if (!entry.isDirectory()) continue;
if (!entry.name.startsWith(V4_LEGACY_MANIFEST.v4CacheVersionPrefix)) continue;
const dirPath = join(cacheRoot, entry.name);
cacheDirs.push({
path: dirPath,
version: entry.name,
orphaned: existsSync(join(dirPath, V4_LEGACY_MANIFEST.orphanMarkerFile)),
});
}
} catch {
// Gracefully ignore reading errors (e.g., permission denied or ENOTDIR)
}
}There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: af81783b49
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| process.exit(1); | ||
| } | ||
|
|
||
| runV4CleanupSafe(); |
There was a problem hiding this comment.
Run cleanup from the swapped-in binary
When a host upgrades to this release from any version before this patch, the running genie update process is still the old binary, so this newly added in-process call is not present and cannot execute; the only fresh-binary exec later in the flow is the --version probe in runVerifyProbe. That means the v4 rules/cache relics remain on the primary upgrade path until a later update or manual genie install, so invoke the freshly swapped binary's finisher (or add a startup cleanup path) instead of relying only on code in the updater process.
Useful? React with 👍 / 👎.
| if (existsSync(cacheRoot)) { | ||
| for (const entry of readdirSync(cacheRoot, { withFileTypes: true })) { |
There was a problem hiding this comment.
Guard cache-root reads before cleanup
If ~/.claude/plugins/cache/automagik/genie exists but is a regular file or an unreadable directory, readdirSync throws here before cleanupV4 reaches its per-relic try/catch handling. In that home-directory state, a direct genie install exits with an error and the installer handoff reports the finisher failed instead of still cleaning the rules file or degrading gracefully, so check that the cache root is a readable directory (or catch this read) before iterating it.
Useful? React with 👍 / 👎.
CI runners don't ship the omni binary; the hard exit(2) in getOmniCommands() was masked pre-revamp because every omni-referencing skill hid behind a skills-lint:ignore marker. Default now warns and skips ONLY omni validation (genie checks stay strict) with an honest 'omni checks skipped' suffix; SKILLS_LINT_REQUIRE_OMNI=1 restores the strict behavior. Wish skills-fable5-revamp (adjudicated PR-gate fix). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014SwFHxrsQVdwG32ChnsKku
…ng INDEX entries Full wish inventory (2026-07-26) found the INDEX.md ledger current but six WISH.md Status headers stale, two wishes entirely absent from INDEX, and one INDEX line (stable-release-security-gate) behind its own WISH header. Headers reconciled (each keeps its history, gains a dated note): - plugin-resource-shipping DRAFT -> EXECUTED (PR automagik-si#2540 merged 07-10) - codex-plugin-update-handoff EXECUTED/'merge gate OPEN' -> SHIPPED (PR automagik-si#2617 merged 07-22) - genie-ui IN_PROGRESS -> SUPERSEDED (direction moved to genie-ui-dash 07-21) - agent-sync-hardening BLOCKED -> SUPERSEDED (gates closed with pr-2545 07-24, F02 excepted) - agent-sync EXECUTED -> DONE (merged automagik-si#2541, superseded by current safety contract) - skills-fable5-revamp EXECUTED -> DONE (merged automagik-si#2518, 3 LOW remain) INDEX additions: v4-home-residue-doctor (DRAFT, now the natural vehicle for issue automagik-si#2450 v4-residue findings) and codex-plugin-dogfood-remediation (IN_PROGRESS 21/24 — the most active wish had no INDEX entry, invisible to the jar<->INDEX drift lint). INDEX line for stable-release-security-gate updated APPROVED -> IN_PROGRESS 4/6 to match its WISH header.
Wish: skills-fable5-revamp
Revamps all 17 genie skills to the Fable 5 standard and adds v4 legacy trash-cleaning to the installer/updater.
What changed
skills/*/SKILL.mdrewritten: lean always-loaded bodies (genie surface 4,185 → 1,385 lines), trigger-focused descriptions, bulk extracted to on-demand sibling files (refine/prompts/optimizer.md,genie-hacks/references/,pm/references/,report/references/).skills-lint:ignoremarkers removed —bun run skills:lintnow scans everything and passes on merit.feat(cli)): newlegacy-v4.tsshared manifest +detectV4Install()/cleanupV4()— content-marker-gated removal of the stale~/.claude/rules/genie-orchestration.md(backup-first, logged, idempotent),.orphaned_at-gatedautomagik/genie/4.*cache cleanup; wired into a recreated thingenie installfinisher (bootstrap handoff restored,--skip-v4-cleanup) and guarded post-delivery ingenie update;uninstall.tsconsumes the same manifest. 16 new pgserve-free tests.Evidence
.genie/wishes/skills-fable5-revamp/verification.md.tsc --noEmit,biome check .(111 files), knip,skills:lint(28 files),wishes:lint,bun test src/genie-commands/144 pass/0 fail,bash -n install.sh.🤖 Generated with Claude Code
https://claude.ai/code/session_014SwFHxrsQVdwG32ChnsKku