fix: Codex sidecar paths + setup installs generated skills

Two bugs found by Codex adversarial review:

1. Sidecar path mismatch: generated Codex skills referenced
   .agents/skills/gstack-review/checklist.md but setup creates
   sidecars at .agents/skills/gstack/review/. Fixed path rewriter
   to emit .agents/skills/gstack/review/ (matching setup layout).

2. Setup installed Claude-format source dirs for Codex global
   install instead of the generated Codex-format skills. Split
   link_skill_dirs into link_claude_skill_dirs (source dirs for
   Claude) and link_codex_skill_dirs (generated .agents/skills/
   gstack-* dirs for Codex).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Garry Tan
2026-03-19 08:04:33 -07:00
parent a1c8ed9b3a
commit 77f06c98c0
6 changed files with 46 additions and 15 deletions
@@ -711,7 +711,7 @@ Complete table of every method that can fail, every exception class, rescued sta
Any row with RESCUED=N, TEST=N, USER SEES=Silent → **CRITICAL GAP**.
### TODOS.md updates
Present each potential TODO as its own individual AskUserQuestion. Never batch TODOs — one per question. Never silently skip this step. Follow the format in `.agents/skills/gstack-review/TODOS-format.md`.
Present each potential TODO as its own individual AskUserQuestion. Never batch TODOs — one per question. Never silently skip this step. Follow the format in `.agents/skills/gstack/review/TODOS-format.md`.
For each TODO, describe:
* **What:** One-line description of the work.
@@ -333,7 +333,7 @@ Every plan review MUST produce a "NOT in scope" section listing work that was co
List existing code/flows that already partially solve sub-problems in this plan, and whether the plan reuses them or unnecessarily rebuilds them.
### TODOS.md updates
After all review sections are complete, present each potential TODO as its own individual AskUserQuestion. Never batch TODOs — one per question. Never silently skip this step. Follow the format in `.agents/skills/gstack-review/TODOS-format.md`.
After all review sections are complete, present each potential TODO as its own individual AskUserQuestion. Never batch TODOs — one per question. Never silently skip this step. Follow the format in `.agents/skills/gstack/review/TODOS-format.md`.
For each TODO, describe:
* **What:** One-line description of the work.
+3 -3
View File
@@ -214,7 +214,7 @@ Before reviewing code quality, check: **did they build what was requested — no
## Step 2: Read the checklist
Read `.agents/skills/gstack-review/checklist.md`.
Read `.agents/skills/gstack/review/checklist.md`.
**If the file cannot be read, STOP and report the error.** Do not proceed without the checklist.
@@ -222,7 +222,7 @@ Read `.agents/skills/gstack-review/checklist.md`.
## Step 2.5: Check for Greptile review comments
Read `.agents/skills/gstack-review/greptile-triage.md` and follow the fetch, filter, classify, and **escalation detection** steps.
Read `.agents/skills/gstack/review/greptile-triage.md` and follow the fetch, filter, classify, and **escalation detection** steps.
**If no PR exists, `gh` fails, API returns an error, or there are zero Greptile comments:** Skip this step silently. Greptile integration is additive — the review works without it.
@@ -271,7 +271,7 @@ eval $(~/.codex/skills/gstack/bin/gstack-diff-scope <base> 2>/dev/null)
1. **Check for DESIGN.md.** If `DESIGN.md` or `design-system.md` exists in the repo root, read it. All design findings are calibrated against it — patterns blessed in DESIGN.md are not flagged. If not found, use universal design principles.
2. **Read `.agents/skills/gstack-review/design-checklist.md`.** If the file cannot be read, skip design review with a note: "Design checklist not found — skipping design review."
2. **Read `.agents/skills/gstack/review/design-checklist.md`.** If the file cannot be read, skip design review with a note: "Design checklist not found — skipping design review."
3. **Read each changed frontend file** (full file, not just diff hunks). Frontend files are identified by the patterns listed in the checklist.
+4 -4
View File
@@ -660,7 +660,7 @@ Coverage line: `Test Coverage Audit: N new code paths. M covered (X%). K tests g
Review the diff for structural issues that tests don't catch.
1. Read `.agents/skills/gstack-review/checklist.md`. If the file cannot be read, **STOP** and report the error.
1. Read `.agents/skills/gstack/review/checklist.md`. If the file cannot be read, **STOP** and report the error.
2. Run `git diff origin/<base>` to get the full diff (scoped to feature changes against the freshly-fetched base branch).
@@ -682,7 +682,7 @@ eval $(~/.codex/skills/gstack/bin/gstack-diff-scope <base> 2>/dev/null)
1. **Check for DESIGN.md.** If `DESIGN.md` or `design-system.md` exists in the repo root, read it. All design findings are calibrated against it — patterns blessed in DESIGN.md are not flagged. If not found, use universal design principles.
2. **Read `.agents/skills/gstack-review/design-checklist.md`.** If the file cannot be read, skip design review with a note: "Design checklist not found — skipping design review."
2. **Read `.agents/skills/gstack/review/design-checklist.md`.** If the file cannot be read, skip design review with a note: "Design checklist not found — skipping design review."
3. **Read each changed frontend file** (full file, not just diff hunks). Frontend files are identified by the patterns listed in the checklist.
@@ -731,7 +731,7 @@ Save the review output — it goes into the PR body in Step 8.
## Step 3.75: Address Greptile review comments (if PR exists)
Read `.agents/skills/gstack-review/greptile-triage.md` and follow the fetch, filter, classify, and **escalation detection** steps.
Read `.agents/skills/gstack/review/greptile-triage.md` and follow the fetch, filter, classify, and **escalation detection** steps.
**If no PR exists, `gh` fails, API returns an error, or there are zero Greptile comments:** Skip this step silently. Continue to Step 4.
@@ -854,7 +854,7 @@ If Codex is not available, skip silently. Continue to Step 4.
Cross-reference the project's TODOS.md against the changes being shipped. Mark completed items automatically; prompt only if the file is missing or disorganized.
Read `.agents/skills/gstack-review/TODOS-format.md` for the canonical format reference.
Read `.agents/skills/gstack/review/TODOS-format.md` for the canonical format reference.
**1. Check if TODOS.md exists** in the repository root.