en un clic
implement-op
// Modify op code to match the manifest-declared interface, making spec tests pass.
// Modify op code to match the manifest-declared interface, making spec tests pass.
| name | implement-op |
| description | Modify op code to match the manifest-declared interface, making spec tests pass. |
op_name, manifest_signature, source_op, source_test — passed by align-family orchestrator.
op_name, manifest_signature, source_op, source_testobservations list (returned to orchestrator)python scripts/validate_manifest.py --check-op <name> all levels pass + new tests pass.blocked with reason.tileops/manifest/. Must NOT modify tests written by test-op in this align-op run (spec contract). MAY update pre-existing tests in <source_test> whose call-sites use the legacy API. The parent orchestrator (align-op) handles the manifest flip at FLIP_STATUS, bound by the Status flip carve-out. If your implementation needs a contractual-field change to make tests pass, return BLOCKED — do not edit the manifest yourself.__init__(M, N)) is NOT preserved — the manifest defines the target interface.stateDiagram-v2
[*] --> ANALYZE
ANALYZE --> DIAGNOSE: semantic knowledge extracted
DIAGNOSE --> VALIDATE: gap already resolved (base class fixed by previous op)
DIAGNOSE --> IMPLEMENT: gap exists
IMPLEMENT --> VALIDATE: sub-step completed
VALIDATE --> IMPLEMENT: sub-step failed
VALIDATE --> MARK_DONE: all pass
VALIDATE --> BLOCKED: fix exceeds Op layer scope
MARK_DONE --> COMMIT
COMMIT --> [*]
BLOCKED --> [*]: return blocked to orchestrator
Before refactoring a base class, count its subclasses:
grep -rlE "class\s+[A-Z][A-Za-z0-9]*\s*\(\s*<BaseName>\s*\)" tileops/ops/
__init__ path alongside the new one so unmigrated siblings still pass. Cleanup gate removes the legacy path after all siblings migrate.Do NOT preemptively migrate siblings to avoid dual-path — that violates per-op scope.
Read existing code (source_op) to extract semantic knowledge:
dim=-1, reshape(-1, N))Manifest = WHAT (target interface). Existing code = HOW (computation logic). The delta is the work.
This analysis is internal — not persisted.
Check if the gap still exists. A previous op's migration may have fixed the shared base class.
Decompose into independently verifiable sub-steps. Each sub-step either succeeds or fails with precise location (→ BLOCKED). No retry loops — if a sub-step fails with the same error twice, the task is beyond current scope.
Agent determines sub-steps based on the specific gap. Do not follow a fixed recipe.
Run all checks:
python scripts/validate_manifest.py --check-op <op_name>
python -m pytest <source_test> -v
All must pass. If not, return to IMPLEMENT.
Record observations — design knowledge discovered during migration:
Do NOT modify manifest or design docs. Observations are returned to orchestrator and surfaced in PR for human review.
Commit code changes only. Do not commit manifest changes.
Single-shot review of a tile-ai/TileOPs PR as a separate GitHub identity from the PR author. Manual / interactive — for autonomous multi-round review until APPROVE, run `bash .claude/skills/review-tileops/loop.sh <PR>` instead.
Per-round driver of stateful agent-driven review-resolution on a tile-ai/TileOPs PR (developer side). Designed for /loop dynamic mode — re-fires until a terminal action. Outer caller must run preflight.sh once before starting the loop. State persists in `.foundry/runs/{issue-<N> | pr-<PR>}/resolve/`.
Drive the full migration for an op family — audit, delegate per-op alignment to align-op, run cross-op cleanup. Two terminal outcomes: SUCCESS opens a PR; CLEANUP_REGRESSION exits blocked without a PR when post-cleanup tests fail.
Per-op orchestrator that brings a single op into alignment with its manifest entry. Classifies the op into one of three cases (green field / interface redesign / minor delta), dispatches to the right path (scaffold-op for new, archive+rescaffold+port for redesign, implement-op for minor), then runs the shared downstream (test → bench → validate → flip status → report). Complements the family-scoped `align-family`; per-op entry when you know the op you want to touch.
Generate or re-align one `tileops/manifest/` entry from a reference-API docs URL. Caller provides the manifest key (`op_name`); skill writes that one entry. Idempotent.
Patch one missing structural field (kernel_map, static_dims) on an existing tileops/manifest/ entry. Auto-detects the field via the validator or takes `--field=<name>`. Reference-derivable fields (signature.*, shape_rules, dtype_combos, roofline) belong to add-manifest, not here.