You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The agent-facing skill files (skills/start.md, skills/submit-for-review.md, skills/deploy.md, and related files) embed multi-step git and gh plumbing inline — dirty-tree guards, fetch + hard-reset sequences, --body-file plumbing, label/milestone resolution tiers, follow-up-issue creation loops.
Asking the agent to execute each mechanical step in turn costs tokens, increases the surface area for mistakes (skipped guards, misquoted flags, forgotten temp files before gh ... --body-file), and forces every adapter (Claude/Cursor/Codex/Gemini) to re-derive the same shell sequence at runtime.
Why it Matters
Tokens: each invocation re-loads the full skill markdown and re-narrates each step. A scripted equivalent is one tool call.
Reliability: deterministic shell logic in a script behaves identically every time; agent-executed sequences can drift.
Adapter parity: a script is invoked identically across adapters and removes runtime re-derivation.
General Approach (tracer bullet)
This ticket is intentionally scoped to a single tracer-bullet extraction — the dirty-tree guard + git fetch + git reset --hard origin/<base> sequence currently inlined in /start (Case A Step 4 and Case B Step 4) and /deploy Step 1.
Concrete changes:
Move skills/* to skills/cc/* so per-skill-group scripts/ directories have a natural home.
Add skills/cc/scripts/sync-base-branch.py implementing the dirty-tree-guard + fetch + hard-reset sequence. Python over bash for arg handling, structured errors, and clear exit codes.
Wire the script into the three existing call-sites in skills/cc/start.md and skills/cc/deploy.md, replacing the inlined shell with a single invocation.
Everything else — extracting --body-file plumbing, follow-up-issue loops, label/milestone resolution, sync.py awareness of the new layout, broader skill-group support — is out of scope and tracked under #157.
This ticket is blocked on #157 (skill groupings). The skills/cc/ move requires sync.py to know where to find skills, which is #157's responsibility. Landing this PR before #157 would leave the project in a broken state. Resume work here once #157 has merged.
Complexity
Verification / QA effort: moderate
The change touches three skill call-sites across all four adapters and must be re-validated end-to-end (start → submit → deploy). Gate on ./sync.py --validate + a manual workflow run after #157's layout is in place.
skills/cc/scripts/sync-base-branch.py exists and implements the dirty-tree guard + git fetch + git reset --hard origin/<base> sequence with clear exit codes.
/start (both Case A Step 4 and Case B Step 4) and /deploy Step 1 invoke the script as a single command instead of enumerating the individual shell steps.
Behavior is identical end-to-end: dirty-tree guards still abort, hard-reset still runs against origin/<base>.
./sync.py --validate passes and all four adapter outputs continue to render correctly.
Problem to Fix
The agent-facing skill files (
skills/start.md,skills/submit-for-review.md,skills/deploy.md, and related files) embed multi-step git andghplumbing inline — dirty-tree guards, fetch + hard-reset sequences,--body-fileplumbing, label/milestone resolution tiers, follow-up-issue creation loops.Asking the agent to execute each mechanical step in turn costs tokens, increases the surface area for mistakes (skipped guards, misquoted flags, forgotten temp files before
gh ... --body-file), and forces every adapter (Claude/Cursor/Codex/Gemini) to re-derive the same shell sequence at runtime.Why it Matters
General Approach (tracer bullet)
This ticket is intentionally scoped to a single tracer-bullet extraction — the dirty-tree guard +
git fetch+git reset --hard origin/<base>sequence currently inlined in/start(Case A Step 4 and Case B Step 4) and/deployStep 1.Concrete changes:
skills/*toskills/cc/*so per-skill-groupscripts/directories have a natural home.skills/cc/scripts/sync-base-branch.pyimplementing the dirty-tree-guard + fetch + hard-reset sequence. Python over bash for arg handling, structured errors, and clear exit codes.skills/cc/start.mdandskills/cc/deploy.md, replacing the inlined shell with a single invocation.Everything else — extracting
--body-fileplumbing, follow-up-issue loops, label/milestone resolution,sync.pyawareness of the new layout, broader skill-group support — is out of scope and tracked under #157.Blocked on #157
This ticket is blocked on #157 (skill groupings). The
skills/cc/move requiressync.pyto know where to find skills, which is #157's responsibility. Landing this PR before #157 would leave the project in a broken state. Resume work here once #157 has merged.Complexity
Verification / QA effort: moderate
The change touches three skill call-sites across all four adapters and must be re-validated end-to-end (start → submit → deploy). Gate on
./sync.py --validate+ a manual workflow run after #157's layout is in place.Acceptance Criteria
skills/contents relocated underskills/cc/(consistent with the layout Organize skills into opt-in groups so projects can curate which skill sets are active #157 establishes).skills/cc/scripts/sync-base-branch.pyexists and implements the dirty-tree guard +git fetch+git reset --hard origin/<base>sequence with clear exit codes./start(both Case A Step 4 and Case B Step 4) and/deployStep 1 invoke the script as a single command instead of enumerating the individual shell steps.origin/<base>../sync.py --validatepasses and all four adapter outputs continue to render correctly.