Skip to content

refactor(bugfix): remove manual skill-loading boilerplate#107

Open
jwm4 wants to merge 1 commit intoambient-code:mainfrom
jwm4:refactor/bugfix-skill-invocation-cleanup
Open

refactor(bugfix): remove manual skill-loading boilerplate#107
jwm4 wants to merge 1 commit intoambient-code:mainfrom
jwm4:refactor/bugfix-skill-invocation-cleanup

Conversation

@jwm4
Copy link
Copy Markdown
Contributor

@jwm4 jwm4 commented Apr 14, 2026

Summary

  • Remove manual skill-loading boilerplate from all 13 bugfix workflow files
  • Replace file paths (.claude/skills/*/SKILL.md) with skill names (the assess skill) so the agent uses the platform's native skill invocation instead of the Read tool
  • Remove dispatch blocks from phase skills and return-and-re-read instructions that were workarounds for a now-fixed platform bug

Context

The bugfix workflow was engineered around a platform bug where the skill tool wasn't working. Skills were loaded via the Read tool with explicit file paths, and every phase skill had dispatch/return blocks telling the agent which file to re-read after completion. Now that the skill tool works, this scaffolding is unnecessary — it encourages the agent to bypass native skill invocation and makes the workflow non-portable across different runners.

ADR: docs/adr/2026-04-14-skill-invocation-cleanup.md

What changed

File(s) Change
ambient.json "read .claude/skills/controller/SKILL.md" → "run the controller skill"
CLAUDE.md File paths → skill names
controller/SKILL.md Skill names in phase list; removed Read tool instructions; removed "Always read skill files" rule
speedrun/SKILL.md Skill names in phase table; simplified execute/loop instructions
7 phase skills Removed dispatch blocks; removed return-and-re-read from completion
pr/SKILL.md Removed "return to coordinating skill and re-read"
summary/SKILL.md Simplified dispatch section; removed conditional return-and-re-read

What did NOT change

  • Phase logic (how to diagnose, test, review, etc.)
  • Gating rules (AskUserQuestion between phases)
  • Artifact paths
  • Recommendation logic
  • Escalation rules

Test plan

  • Validate JSON: ambient.json parses correctly
  • Skill resolution: agent can find and invoke each skill by name in ACP
  • Full controller flow: run assess → fix → test → review → PR with phase transitions
  • Speedrun flow: run full speedrun confirming progression through all phases
  • Direct skill invocation: invoke a phase skill directly (e.g., /diagnose)

Custom Workflow fields for testing

Field Value
URL https://github.com/jwm4/workflows.git
Branch refactor/bugfix-skill-invocation-cleanup
Path workflows/bugfix

Made with Cursor

The bugfix workflow was engineered around a platform bug where the
skill tool wasn't working. Skills were loaded via the Read tool with
explicit file paths, and every phase skill had dispatch/return blocks
telling the agent which file to re-read after completion. Now that
the skill tool works, this scaffolding is unnecessary and actively
harmful — it encourages the agent to bypass the platform's native
skill invocation.

Changes across 13 files in workflows/bugfix/:
- Replace file paths with skill names in controller and speedrun
- Remove "How to Execute" Read tool instructions from orchestrators
- Remove dispatch blocks from all 7 phase skills
- Remove return-and-re-read instructions from all phase skills
- Remove "Always read skill files" rule from controller
- Update ambient.json systemPrompt and CLAUDE.md to use skill names

The actual phase logic, gating rules, artifact paths, and
recommendation logic are all unchanged.

ADR: docs/adr/2026-04-14-skill-invocation-cleanup.md
Made-with: Cursor
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 14, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 3cf3f49d-0f29-4d69-a9db-daf72512ebf1

📥 Commits

Reviewing files that changed from the base of the PR and between d2ab1c9 and 2e962af.

📒 Files selected for processing (14)
  • docs/adr/2026-04-14-skill-invocation-cleanup.md
  • workflows/bugfix/.ambient/ambient.json
  • workflows/bugfix/.claude/skills/assess/SKILL.md
  • workflows/bugfix/.claude/skills/controller/SKILL.md
  • workflows/bugfix/.claude/skills/diagnose/SKILL.md
  • workflows/bugfix/.claude/skills/document/SKILL.md
  • workflows/bugfix/.claude/skills/fix/SKILL.md
  • workflows/bugfix/.claude/skills/pr/SKILL.md
  • workflows/bugfix/.claude/skills/reproduce/SKILL.md
  • workflows/bugfix/.claude/skills/review/SKILL.md
  • workflows/bugfix/.claude/skills/speedrun/SKILL.md
  • workflows/bugfix/.claude/skills/summary/SKILL.md
  • workflows/bugfix/.claude/skills/test/SKILL.md
  • workflows/bugfix/CLAUDE.md
💤 Files with no reviewable changes (8)
  • workflows/bugfix/.claude/skills/pr/SKILL.md
  • workflows/bugfix/.claude/skills/fix/SKILL.md
  • workflows/bugfix/.claude/skills/test/SKILL.md
  • workflows/bugfix/.claude/skills/diagnose/SKILL.md
  • workflows/bugfix/.claude/skills/assess/SKILL.md
  • workflows/bugfix/.claude/skills/document/SKILL.md
  • workflows/bugfix/.claude/skills/review/SKILL.md
  • workflows/bugfix/.claude/skills/reproduce/SKILL.md

Walkthrough

The pull request implements an ADR to simplify the bugfix workflow by removing manual skill-invocation boilerplate. Phase skills no longer include dispatch blocks or re-read instructions. The controller and speedrun skills are updated to reference phases by skill name instead of hardcoded file paths. System prompt and documentation are adjusted accordingly.

Changes

Cohort / File(s) Summary
ADR Documentation
docs/adr/2026-04-14-skill-invocation-cleanup.md
New ADR document specifying the proposal to remove skill-loading boilerplate, including rationale, specific file changes, and testing plan (294 lines added).
System Configuration
workflows/bugfix/.ambient/ambient.json
Updated systemPrompt to instruct using the controller skill directly instead of reading .claude/skills/controller/SKILL.md.
Phase Skills Dispatch Cleanup
workflows/bugfix/.claude/skills/assess/SKILL.md, diagnose/SKILL.md, document/SKILL.md, fix/SKILL.md, reproduce/SKILL.md, review/SKILL.md, test/SKILL.md
Removed "Dispatch" sections checking for controller/speedrun invocation and re-read instructions; preserved core phase logic and reporting requirements.
Orchestration Skills
workflows/bugfix/.claude/skills/controller/SKILL.md, speedrun/SKILL.md
Updated phase listings to reference skill names (e.g., assess, fix) instead of hardcoded .claude/skills/{name}/SKILL.md paths; simplified execution flow to eliminate explicit Read-tool calls and file re-reads.
Phase Skill Minor Cleanup
workflows/bugfix/.claude/skills/summary/SKILL.md, pr/SKILL.md
Removed dispatch sections and re-read instructions; maintained core summarization and PR creation logic.
Workflow Documentation
workflows/bugfix/CLAUDE.md
Removed specific file path references (.claude/skills/{name}/SKILL.md) while retaining skill-based architecture description and artifact paths.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: removing manual skill-loading boilerplate from the bugfix workflow by replacing file paths with skill names.
Description check ✅ Passed The description is directly related to the changeset, providing clear context about removing boilerplate, replacing file paths with skill names, and detailed test plans.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

Review ran into problems

🔥 Problems

Timed out fetching pipeline failures after 30000ms


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 and usage tips.

@jwm4 jwm4 marked this pull request as ready for review April 14, 2026 15:45
@jwm4
Copy link
Copy Markdown
Contributor Author

jwm4 commented Apr 15, 2026

@coderabbitai

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 15, 2026

@jwm4 Sure! I'll review the changes in this PR now.

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

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