feat(case): improve tasks.md generation performance - #2402
Draft
charlesliu9 wants to merge 6 commits into
Draft
Conversation
…ble contracts SKILL.md Rule 6 still mandated copying SDD rationale prose while planning.md switched to rationale-ref anchors; the heading contract and final grep verify also contradicted the new §4.2.1 variables table. Align both and upgrade sibling-Edit turn-batching from SHOULD to MUST to match planning.md §4.0a. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
All five edits are applied and both repo validators pass (validate-skill-descriptions.sh, check-skill-status.py — 24 skills, manifest valid). Four files changed:
A — Variables become a table (global-vars/planning.md + planning.md §4.2.1). One row per T-entry with columns T# | name | category | type | sourceTriggers | sourceFields | default | producedBy — I kept the original camelCase field names since impl-json.md and the Phase 2 validation table reference them exactly. The per-row verify: boilerplate (the biggest byte sink, ~150–200B/row) is replaced by a per-category verify contract stated once after the table. Multi-trigger sourceFields collapse to T02: path; T03: path in one cell.
B — Rationale by anchor (SKILL.md Rule 6 + five planning.md spots). rationale-ref: SDD §
C — Sibling Edits share a turn (planning.md §4.0a + SKILL.md anti-pattern). Batch multiple section Edit-appends into one assistant turn while each payload stays ≤30KB.
D — planning.md dedup — this one changed shape during implementation: the compact no-build contract turned out to be already duplicated in phase-0-interview.md § Build start, so instead of moving text I made that copy canonical (adding the one trigger/condition/SLA field line it was missing) and replaced planning.md's block with a pointer. The 3-trigger worked example is deleted outright — all three trigger plugins already carry their own entry formats including the shape, and the one unique semantic ("never collapse or omit an unresolved trigger row") stays as prose. Honest caveat: planning.md only shrank ~0.8KB net (38.3KB → 37.5KB), not the ~7–8KB I originally estimated — the contract dedup removed a duplicate rather than shifting weight.
E — Full-index Read guard (SKILL.md Rule 3). Discovery must use targeted cat | python3 -c filters or bounded Reads; loading a whole -index.json into context is now explicitly forbidden, with the why (cache-replay tax on every later turn).
The real wins (A + B) land in the generated tasks.md, not the doc sizes — for the observed 150-entry case (41 variables), I'd expect the variables section to drop from ~5.8KB to ~1.5KB and rationale prose to mostly disappear. To verify, run one variables-heavy eval task (e.g. entry_points_io_multi_trigger) and compare Phase 1 wall time + tasks.md bytes against the baseline numbers from the transcript analysis.