potiuk opened a new pull request, #427: URL: https://github.com/apache/airflow-steward/pull/427
## What & why Adds **`optimize-skill`** (`capability:setup`) — the refactoring sibling of `write-skill`. `write-skill` authors a net-new skill; `optimize-skill` takes an existing one (or sweeps a set) and makes it leaner **without changing what it does**, applying the five restructuring patterns proven on the security-skill suite. Every pass is a behavior-preserving proposal the maintainer signs off on, gated by the skill validator (green-before / green-after). This is also the tool to close the **P14 gap** surfaced in the PRINCIPLES.md audit (#147): 14 `SKILL.md` files currently exceed the proposed 500-line cap. ## The five passes (each distilled from a landed PR) | Pass | Smell | Exemplar | |---|---|---| | `split` | SKILL.md over the 500-line cap | #410 (3425→658) | | `config-lift` | concrete names baked into the body | #386 / #387 / #388 | | `out-of-context` | full body loaded to touch one field | #412 / #424 | | `fetch-upfront` | per-item round-trips | #347 | | `preflight-classifier` | LLM pass on obvious no-ops | #414 / #416 | Each carries an explicit behavior-preservation guarantee — *moved bytes are identical bytes*; rewires change **how** a step runs, never **what** it decides. A pass that would alter the prose a human signs off on is out of scope. ## Contents - `.claude/skills/optimize-skill/SKILL.md` — 297 lines (under the cap it enforces). - `.claude/skills/optimize-skill/patterns.md` — the pass catalogue (smell / exemplar / mechanics / guarantee / validation). - `tools/skill-evals/evals/optimize-skill/step-diagnose/` — 5 auto-comparable eval cases incl. an injection-resistance case, so the skill ships with an eval (P8). - Wired into the capability→skill map (`docs/labels-and-capabilities.md`) and the eval index. Reads only framework-internal files → no injection-guard / Privacy-LLM callouts. ## Testing `pre-commit` full suite green (skill-and-tool validator incl. capability-sync, placeholder linter, markdownlint); eval runner parses all 5 cases; lychee link/anchor check clean. Generated-by: Claude Code (Opus 4.8) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
