Skip to content

feat(case): improve tasks.md generation performance - #2402

Draft
charlesliu9 wants to merge 6 commits into
mainfrom
feat/case-tasks-md-perf
Draft

feat(case): improve tasks.md generation performance#2402
charlesliu9 wants to merge 6 commits into
mainfrom
feat/case-tasks-md-perf

Conversation

@charlesliu9

Copy link
Copy Markdown
Contributor

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 §

when the SDD states the rationale; rationale: prose only when the plan synthesizes one the SDD lacks. No plugin docs needed changes — none mandated copying.

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.

charlesliu9 and others added 6 commits July 30, 2026 16:53
…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>
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