docs(workflow): context-load discipline + model-delegation into WORKFLOW.md#15
Merged
Merged
Conversation
Moves the "plan in Opus, execute in Sonnet" delegation contract and the tutorial-prose model split out of the always-loaded PyAutoLabs root CLAUDE.md and into the on-demand shared workflow reference, as part of the context-load token-reduction pass (root CLAUDE.md slimmed to an @AGENTS.md stub; routing policy + repo map added to the canonical root AGENTS.md). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Adds on-demand workflow documentation to skills/WORKFLOW.md describing the project’s model-delegation approach (“plan in Opus, execute in Sonnet”), including a subagent prompt contract and guidance on when tutorial prose should stay in the stronger model. This supports the broader token/context reduction effort by moving previously always-loaded guidance into a shared, referenced workflow doc.
Changes:
- Add a new “Model delegation (Opus plans, Sonnet executes)” section describing which workflow phases are delegated vs. kept in the main session.
- Document a delegated-subagent prompt contract (inputs, execution constraints, and expected outputs).
- Add a “Tutorial-prose split” heuristic (narrative/science teaching vs. code-heavy scripts).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| The workflow skills follow a **"plan in Opus, execute in Sonnet"** split: the main | ||
| session stays on Opus for planning, judgment and orchestration; mechanical | ||
| shell/git phases are delegated to Sonnet subagents (`Agent` tool, | ||
| `model: "sonnet"`). This keeps judgement in the stronger model while moving bulk |
| - **Inputs Opus passes:** worktree path / `$WT_ROOT`, repo list, pre-drafted | ||
| commit message, pre-drafted PR body (paste verbatim via HEREDOC — never | ||
| rewrite), relevant URLs (library PR, issue), target branch, labels. | ||
| - **Subagent's job:** run the named shell steps exactly. `source activate.sh` |
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.
Part of a context-window / token-reduction pass on the PyAutoLabs root instructions.
What changed here (PyAutoBrain)
skills/WORKFLOW.md: new Model delegation (Opus plans, Sonnet executes) section — the "plan in Opus, execute in Sonnet" split, the subagent prompt contract, and the tutorial-prose model split. Previously inlined in the always-loaded rootCLAUDE.md; now an on-demand shared reference.Companion changes (PyAutoLabs root — untracked local files, not in any repo)
CLAUDE.mdslimmed 12.8 KB → 0.9 KB: now an@AGENTS.mdstub + a small Claude-only addendum, matching every sub-repo.AGENTS.mdis now the single canonical router and gained a Context load discipline policy (generic prompts → PyAutoMind + PyAutoBrain only; other repos opened only when named / pointed to by a Mind task or issue / routed by PyAutoBrain) plus a repo-map table.Net always-loaded context for Claude drops ~36% (12.8 KB → 8.2 KB); for Codex/others it drops further (one 7.2 KB canonical file instead of AGENTS.md → CLAUDE.md indirection). Cross-agent by construction: the canonical content lives in
AGENTS.md, which Claude reads via import.🤖 Generated with Claude Code