Skip to content

refactor(skills): fable 5 revamp of all 17 skills + v4 trash cleaning - #2518

Merged
namastex888 merged 8 commits into
devfrom
wish/skills-fable5-revamp
Jul 4, 2026
Merged

namastex888 merged 8 commits into
devfrom
wish/skills-fable5-revamp

Conversation

@namastex888

Copy link
Copy Markdown
Contributor

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

  • All 17 skills/*/SKILL.md rewritten: 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/).
  • Re-grounded in the live v5 zero-daemon CLI: 118 dead-command references across 13 files fixed at the root; all 13 skills-lint:ignore markers removed — bun run skills:lint now scans everything and passes on merit.
  • Frozen contracts preserved verbatim (template cp rule, wishes:lint gate, task linkage, SHIP/FIX-FIRST/BLOCKED vocabulary, reviewer≠engineer, session-close outcome words) — independently audited.
  • G8 (feat(cli)): new legacy-v4.ts shared manifest + detectV4Install()/cleanupV4() — content-marker-gated removal of the stale ~/.claude/rules/genie-orchestration.md (backup-first, logged, idempotent), .orphaned_at-gated automagik/genie/4.* cache cleanup; wired into a recreated thin genie install finisher (bootstrap handoff restored, --skip-v4-cleanup) and guarded post-delivery in genie update; uninstall.ts consumes the same manifest. 16 new pgserve-free tests.

Evidence

  • 7 execution groups, each independently reviewed; G7 system verification: all 10 success criteria PASS — see .genie/wishes/skills-fable5-revamp/verification.md.
  • Combined genie+omni surface: 5,514 → 2,016 lines (−63.4%).
  • Gates on this branch (also enforced by pre-push): 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.
  • Zero file renames/deletions; companion omni PR carries the plugin surfaces.

🤖 Generated with Claude Code

https://claude.ai/code/session_014SwFHxrsQVdwG32ChnsKku

namastex888 and others added 7 commits July 4, 2026 18:50
…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
@coderabbitai

coderabbitai Bot commented Jul 4, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: b71af9ac-7b4e-4e3c-9437-02680bf1eb50

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch wish/skills-fable5-revamp

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +127 to +139
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)),
});
}
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

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)
    }
  }

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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();

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

Comment on lines +127 to +128
if (existsSync(cacheRoot)) {
for (const entry of readdirSync(cacheRoot, { withFileTypes: true })) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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
@namastex888
namastex888 merged commit 1308e4c into dev Jul 4, 2026
11 checks passed
lirazsiri pushed a commit to lirazsiri/genie that referenced this pull request Jul 28, 2026
…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.
@automagik-genie
automagik-genie deleted the wish/skills-fable5-revamp branch September 25, 2026 04:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant