Fix root skill loading and Codex setup layout#253
Closed
bitfoundry-ai wants to merge 1 commit intogarrytan:mainfrom
Closed
Fix root skill loading and Codex setup layout#253bitfoundry-ai wants to merge 1 commit intogarrytan:mainfrom
bitfoundry-ai wants to merge 1 commit intogarrytan:mainfrom
Conversation
Author
|
Closing this PR — both fixes are already covered by earlier submissions:
Thanks to @cweill, @amit221, and @shichangs for getting there first. 🤝 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR fixes two related Codex install/load regressions in
gstack:gstackskill can be skipped by Codex-compatible loaders because its front-matterdescriptionexceeds the 1024-character limit enforced by those loaders../setup --host codexcan overwrite~/.codex/skills/gstackwith the generated wrapper skill directory from.agents/skills/gstack, which breaks access to repo-backed runtime assets such asbin/andbrowse/dist/.Issue 1: root
SKILL.mddescription is too longWhat happens
Codex-compatible loaders may reject the root
gstackskill with an error like:invalid description: exceeds maximum length of 1024 charactersThat means the umbrella skill is skipped entirely even though the actual skill body is valid.
Why it happens
The root
SKILL.md.tmplfront matter embeds a long multi-paragraph description intended to explain routing behavior, proactive suggestions, and opt-out behavior. After generation, the description is about 1972 characters, which exceeds the loader limit.Repro
bun run gen:skill-docs.gstackskill in a Codex-compatible loader.SKILL.mdhas an invalid description because it exceeds 1024 characters.Issue 2: Codex setup can replace the repo-backed
gstackinstall with the generated wrapperWhat happens
./setup --host codexcurrently installs generated Codex skills from.agents/skills/gstack*into~/.codex/skills/. That set includes.agents/skills/gstack, so~/.codex/skills/gstackcan end up pointing at the generated wrapper directory instead of the full repo.When that happens, paths like these stop being valid:
~/.codex/skills/gstack/bin/gstack-config~/.codex/skills/gstack/browse/dist/browseWhy it happens
The helper that links generated Codex skills iterates over
gstack*, which includes the umbrellagstackwrapper. That collides with the reserved~/.codex/skills/gstacklocation that must point at the full repo for runtime assets.Repro
./setup --host codex.readlink ~/.codex/skills/gstack..agents/skills/gstack, runtime assets are no longer available from the expected repo-backed path.ls ~/.codex/skills/gstack/bin/gstack-configmay fail even though setup reported success.Fix
Description-limit mitigation
gstackfront-matter description to a concise loader-safe summary.Codex setup mitigation
gstackwrapper insidelink_codex_skill_dirs()so it never claims~/.codex/skills/gstack.~/.codex/skills/gstackto the full repo after generated skill links are installed.Why this does not reduce effectiveness
description, which acts as loader metadata./qa,/review,/investigate,/office-hours, and/shipretain their detailed trigger descriptions.Validation
bun run scripts/gen-skill-docs.ts --dry-runbun run scripts/gen-skill-docs.ts --host codex --dry-runbun test test/gen-skill-docs.test.tsbun run skill:checkImplementation prompt