feat(ce-work): reduce token usage by extracting late-sequence references#540
Merged
feat(ce-work): reduce token usage by extracting late-sequence references#540
Conversation
Extract Phase 3-4 shipping content (quality check, code review, PR creation, quality checklist, code review tiers) from ce:work and ce:work-beta SKILL.md into on-demand references/shipping-workflow.md files. This content rode in context for the entire Phase 2 execution loop without being used until the very end. Both skills get identical reference files. Contract tests updated with dual-read pattern: positive assertions read from reference files, negative assertions stay on SKILL.md to confirm extraction completeness. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Move "Update Plan Status" (active -> completed) before "Commit and Create Pull Request" so the status change is included in the commit rather than leaving a dirty working tree after the PR is created. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Merged
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
Extract Phase 3-4 shipping content from ce:work and ce:work-beta SKILL.md files into on-demand
references/shipping-workflow.mdfiles. This late-sequence content (quality check, code review, PR creation, quality checklist, code review tiers) rode in context for the entire Phase 2 execution loop — 20-60+ tool calls — without being used until the very end. Follows the same extraction pattern established by ce:plan (PR #489) and ce:brainstorm.Token savings
Per-session savings: ~2,200 tokens x ~32 messages before shipping content is needed = ~70,400 context tokens per session for each skill.
What changed
plugins/compound-engineering/skills/ce-work/references/shipping-workflow.mdand the identical file underce-work-beta/references/. Each contains Phase 3 (quality check, code review, final validation, operational validation plan), Phase 4 (screenshots, commit/PR, plan status, notify), Quality Checklist, and Code Review Tiers.shipping-workflow.mdand don't contain extracted content.Key decisions
codex-delegation-workflow.md.Test plan
bun test— 636 pass, 0 failshipping-workflow.mdloads at Phase 3 transition (not prematurely during Phase 2)Post-Deploy Monitoring & Validation
No additional operational monitoring required — this is a content restructuring within plugin skill files with no runtime or infrastructure impact.