Conversation
potiuk
left a comment
There was a problem hiding this comment.
Thanks for this, and for filling the eval gap for extract-code and rewrite. Two rules were lost in the condensing, one new fixture is ambiguous, and the branch needs a rebase before CI can run. Details below and inline.
Rebase needed — conflicts are in generated files only
The branch is 6 commits behind main and conflicts in docs/mode-economics.md and tools/skill-evals/README.md. Both are generated counts that moved on main (#1372, #1373). Please rebase, then regenerate them rather than hand-merging:
uv run --project tools/skill-token-count skill-token-count --write
python3 tools/dev/check-doc-sync.py --fixCI has not run on this PR yet because of the conflict.
Two rules were lost in the condensing
A wording pass must keep what the skill decides. The umbrella asks for exactly that ("headings, golden-rule headlines, code blocks and the pre-flight block kept byte-identical"), and this skill's own Hard rules say "Structure changes, behaviour does not". Two sentences carried rules and did not survive:
- Step 4: "the budgets from What counts as small enough must have moved the right way" became "measure both budgets again". Measuring is no longer tied to an outcome, so a pass that grows the skill is no longer caught.
- Hard rules: "A pass that needs it relaxed is not an optimization" is gone. "Require a green validator" can be satisfied by loosening the validator, which is exactly what the old sentence forbade.
Suggested wording is inline. The rest of the condensing keeps the rules. It mostly drops the why sentences, which is a fair trade for this pass.
Evals: run them, and note what they cannot see
The test plan says the seven cases were loaded and reviewed, not run. #1350 step 4 and AGENTS.md both ask for the suite to run before and after:
tools/skill-evals/magpie-run-evals.sh tools/skill-evals/evals/optimize-skillPlease include the before/after result in the description. Note also that the suite only extracts ## Step 1 — Diagnose, which this PR leaves unchanged. So a green run proves the new fixtures, but says nothing about the rewritten Steps 2–5 and Hard rules. Those rest on review, which is why the two lost rules above matter.
Smaller observations
case-7-verbose-prose/report.md: the fixture says the largest section is "substantially longer than the other orchestration sections". Smell 1 in Step 1 triggers split on "one section dominating", so a model can reasonably return["split", "rewrite"], and the case becomes flaky. Case 2 says "within range, no dominating section". Use the same wording here.- Scope: #1350 asks for the utilities family, starting with the three skills over the always-on budget (
report-framework-issue,skill-reconciler,list-skills).optimize-skillwas already within both budgets. Please changeCloses #1350toPart of #1350so the issue stays open for the rest.
This review was drafted by an AI-assisted tool and
confirmed by an Apache Magpie maintainer. After you've
addressed the points above and pushed an update, an Apache Magpie
maintainer — a real person — will take the next look
at the PR. The findings cite the project's review criteria;
if you think one of them is mis-applied, please reply on the
PR and a maintainer will weigh in.More on how Apache Magpie handles maintainer review:
CONTRIBUTING.md.
|
|
||
| The validator must return the same green it returned at Step 0, and the | ||
| budgets from *What counts as small enough* must have moved the right way. | ||
| Require the Step 0 validator result and measure both budgets again. |
There was a problem hiding this comment.
This dropped the outcome: on main Step 4 says the budgets "must have moved the right way". As written, a pass that grows the skill still passes Step 4.
| Require the Step 0 validator result and measure both budgets again. | |
| Require the Step 0 validator result, and both budgets must have moved the right way. |
| - Move identical bytes except for a necessary heading-level change, and | ||
| update every heading reference. | ||
| - Propose before applying; never batch passes. | ||
| - Require a green validator and measure both budgets and evals before |
There was a problem hiding this comment.
The old rule also said "A pass that needs it relaxed is not an optimization." Without it, "require a green validator" can be met by loosening the validator. Please keep that clause.
| - Require a green validator and measure both budgets and evals before | |
| - Require a green validator, never a relaxed one, and measure both budgets and evals before |
|
|
||
| wc -l SKILL.md: 420 | ||
| Largest section: "## Step 3 — Apply one pass at a time" (120 lines) — | ||
| within the structural limit and still substantially longer than the |
There was a problem hiding this comment.
"Substantially longer than the other orchestration sections" reads as smell 1's "one section dominating", which triggers split, so ["split", "rewrite"] is a defensible answer and the case will be flaky. Case 2 phrases it as "within range, no dominating section"; the same here would leave rewrite as the only answer.
Add diagnosis fixtures for embedded deterministic code and verbose prose so the evaluation contract covers extract-code and rewrite. Generated-by: Codex (GPT-5)
Rewrite duplicated guidance without changing pass behavior or safety gates. Reduce the full skill from 3,995 to 3,050 tokens and its always-on metadata from 160 to 107 tokens. Generated-by: Codex (GPT-5)
Keep the structural surface hash stable, shorten the always-on description, and regenerate the token manifest at 3,024 tokens. Generated-by: Codex (GPT-5)
8fbbb44 to
fbcf31f
Compare
|
Hey @potiuk , I made some changes as you said, is the PR now ready to be merged? |
Kaap10
left a comment
There was a problem hiding this comment.
Thanks @anbv29. The text fixes in SKILL.md (Step 4 budget direction, Hard rules validator clause) and case-7-verbose-prose/report.md address the wording findings.
However, the PR is not ready to merge yet due to the following blocking items:
-
Git history / rebase (PR diff is bloated to 66 files):
- The branch has pulled in 6 unrelated commits from
main(#1382–#1387) into its own commit history rather than rebasing cleanly. As a result, the PR diff currently touches 66 files across the repo instead of being scoped tooptimize-skill. - Please rebase cleanly onto latest
upstream/main(git rebase upstream/main) so the diff contains only your changes, then regenerate the sync files if needed:uv run --project tools/skill-token-count skill-token-count --write python3 tools/dev/check-doc-sync.py --fix
- The branch has pulled in 6 unrelated commits from
-
PR Description updates:
- Change
Closes #1350toPart of #1350in the PR body (#1350 covers the full utilities family:report-framework-issue,skill-reconciler,list-skills). - Run the eval suite and paste the before/after results in the Test plan:
tools/skill-evals/magpie-run-evals.sh tools/skill-evals/evals/optimize-skill
- Change
Once the rebase is clean and the description is updated, maintainers can trigger the CI suite.
Summary
optimize-skillcontext cost while preserving its seven optimization passes and safety gates.extract-codeandrewritepasses.Type of change
Test plan
optimize-skilleval casesprek run --all-files— local Windows execution was blocked while compiling thelycheeRust dependency; GitHub CI will run the complete Linux suiteRFC-AI-0004 compliance
Linked issues
Closes #1350
Notes for reviewers
The rewrite preserves the existing workflow, approval boundaries, validator gates, and seven-pass diagnosis contract. The main change is reduced recurring context cost plus complete eval coverage.