Skip to content

Commit e3af9d0

Browse files
committed
feat(skills): add model support contribution workflow
1 parent 2ff6922 commit e3af9d0

45 files changed

Lines changed: 12834 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
---
2+
name: adding-model-support
3+
description: >
4+
Use this skill whenever contributing model support to the `winml` CLI: an unsupported
5+
Hugging Face model or architecture, an existing family that fails in one or more commands,
6+
a missing recipe, exporter, resolver, task, dataset adapter, evaluator, or promotion handoff.
7+
It diagnoses the gap, implements the narrowest reusable fix, validates the result, opens a
8+
draft model-support PR, and captures reusable findings. Trigger even when the user asks to
9+
repair support rather than explicitly saying "add model support". Do not use it merely to
10+
run or tune an already-supported model, optimize an existing recipe, or add a new execution
11+
provider backend.
12+
compatibility: Requires a microsoft/winml-cli checkout, Python 3.11 with uv, GitHub CLI with push access, and an agent runtime that can delegate fresh subagents.
13+
---
14+
15+
# Adding model support
16+
17+
Use this skill to take one unsupported or partially supported model from current-main diagnosis through a validated draft contribution. Diagnose first, freeze the Effort/Goal/Outcome target from evidence, implement the narrowest reusable fix, validate independently, and capture durable knowledge.
18+
19+
This is a dispatcher, not the complete procedure. Load the owning role contract under [agents/](./agents/) at every transition. Do not substitute this overview for those instructions.
20+
21+
## Repository scope
22+
23+
This skill lives in `skills/adding-model-support/` in [`microsoft/winml-cli`](https://github.com/microsoft/winml-cli). Resolve `src/...`, `tests/...`, and `examples/...` from the repository root. Keep methodology changes under `skills/adding-model-support/**` in a separate skill-only branch and PR; never mix them into a model-support PR.
24+
25+
## Prerequisites and optional integrations
26+
27+
- Run from a `microsoft/winml-cli` checkout with Python 3.11, `uv`, authenticated `gh`, and push access. The orchestrator verifies these before implementation.
28+
- The agent runtime must support fresh subagent delegation. Each role loads its file under `agents/`; if delegation is unavailable, stop as BLOCKED rather than collapsing producer, tester, and reviewer into one agent.
29+
- `model-breakdown` is optional. When discoverable as an installed skill, require schema `1.2+`; otherwise the planner builds the same profile from pinned source, config, and model-card evidence.
30+
- `auto-optimize` is optional and needed only for `--promotion-handoff`. Discover its `scripts/promotion.py` through the installed skill location. If it is absent or incompatible, promotion mode stops as BLOCKED while normal model-support work remains available. Follow the [orchestrator promotion handoff entry](./agents/orchestrator.md#promotion-handoff-entry).
31+
32+
## Pipeline
33+
34+
Run one model at a time. The orchestrator delegates every role to a fresh agent and drives all loop-backs to `APPROVE`, `REJECT`, or `BLOCKED`; `REQUEST_CHANGES` is not terminal.
35+
36+
| Role | Owns | Contract |
37+
|---|---|---|
38+
| Orchestrator | preflight, delegation, loop continuation, isolation, cleanup | [orchestrator.md](./agents/orchestrator.md) |
39+
| Planner | current-main diagnosis, model profile, baseline, Effort/Goal/Outcome charter | [planner.md](./agents/planner.md) |
40+
| Producer | minimal code and exact-evidence recipe candidates | [producer.md](./agents/producer.md) |
41+
| Tester | repair loop and Goal-ladder verdicts | [tester.md](./agents/tester.md) |
42+
| Learner | model knowledge, methodology findings, blocker diligence | [learner.md](./agents/learner.md) |
43+
| Explainer | existing/new draft PR, body, label, replies, shipment | [explainer.md](./agents/explainer.md) |
44+
| Reviewer | independent final-head verification and one opinion comment | [reviewer.md](./agents/reviewer.md) |
45+
46+
```text
47+
planner -> producer -> tester -> learner -> explainer -> reviewer
48+
^ ^ |
49+
| +---- artifact REQUEST_CHANGES --------+
50+
+---------------- scope/tier contradiction --------+
51+
```
52+
53+
## Non-negotiable boundaries
54+
55+
- Planner freezes the target only after current-main baseline evidence. If reality contradicts it, return to planner.
56+
- Producer, tester, explainer, and reviewer remain separate agents. The reviewer starts from a fresh context after the draft PR exists.
57+
- Every model-support PR targets `main`, remains draft, and carries `model-scale-by-skill`. Dependency ancestry never changes the live PR base.
58+
- The reviewer writes only one normal PR comment containing `APPROVE`, `REQUEST_CHANGES`, or `REJECT`; these are not GitHub Review states.
59+
- Every required `(EP, device, precision)` tuple retains exact PASS, blocked, or exhausted-failure evidence. Never infer one tuple from another.
60+
- Run one bounded final-SHA FP32 CPU functional smoke Eval; do not present it as representative accuracy. Keep per-tuple performance and both component-level and op-level Analyze evidence.
61+
- Treat a recipe as authoritative during recipe validation. Semantic CLI overrides are diagnostic evidence, not proof that the recipe works.
62+
- Prefer narrow metadata/config/architecture-derived shared fixes. Preserve existing public defaults, signatures, recipe semantics, and sibling-model behavior with regression tests.
63+
- Never edit `examples/recipes/README.md` for recipes produced by this workflow.
64+
- Cleanup is orchestrator-owned, manifest-driven, dry-run-first, and limited to marked run-owned regenerable state via [cleanup-run-cache.ps1](./scripts/cleanup-run-cache.ps1).
65+
66+
## Knowledge and evaluation resources
67+
68+
- Read [model knowledge](./model_knowledge/) before planning and update it only with scoped evidence after testing.
69+
- Record reusable workflow lessons in [skill methodology findings](./skill_meta/); preserve historical provenance.
70+
- Use [response and trigger evals](./evals/) when changing this skill's behavior or description.
71+
72+
Begin execution by loading the [orchestrator contract](./agents/orchestrator.md).

0 commit comments

Comments
 (0)