Converted skill
Applied rewrites:
name: python-change-budget-router
description: Budget-first routing and batch-scope contract for Python work. Estimate production-file scope, choose small vs large path, enforce the 3 production + 3 test per-batch cap, and halt the agent for scope expansion approval when the estimate exceeds the budget.
Python Change Budget Router
Canonical guidance for deciding whether Python work stays on the small path (python-typed-engineer direct mode) or escalates to the full orchestration workflow, and for enforcing per-batch change budgets during execution.
When to Use This Skill
Use this skill when:
- Intake starts from a natural-language Python request.
- An agent must decide the execution path before planning or implementation.
- A direct-mode route must reject over-budget requests and switch to orchestrated flow.
- An executor must confirm a batch fits within the 3 production + 3 test file cap before editing.
Canonical Routing Rules
- Estimate rough change budget first based on likely production Python files touched.
- Route:
1-3 production files (plus corresponding tests) → small path (python-typed-engineer direct mode).
>3 production files → large path (orchestration workflow with promotion, research, spec, planning, execution, and review).
Per-Batch Change Budget (Hard Gate)
During Phase C execution:
- A single batch may change at most 3 production files and 3 test files.
- The default cap applies unless the user supplies an override of the form
budget: prod=<N>, test=<M> in the initiating prompt.
- A user override may be honored only if it complies with repo policy and approved scope. If the requested scope exceeds 3 production files overall, stop before execution and seek explicit approval.
- If an override is requested, confirm compliance with repo policy before entering Phase C.
Scope Expansion Protocol
When in-scope work is required beyond 3 production files, stop and return:
- a one-paragraph justification for the additional files,
- the exact additional file paths,
- the smallest alternative that avoids expanding scope,
and wait for explicit user approval before proceeding.
Allowed minimal-seam exceptions (still within the 3-file cap) are:
- introducing a minimal seam for testability (I/O boundary isolation, dependency injection),
- typing changes required for Pyright cleanliness in the slice,
- updating the smallest set of call sites needed to preserve a stable public API.
Direct-Mode Rejection Rule
If python-typed-engineer is invoked directly and estimated scope is >3 production files:
- Stop before implementation.
- Return an explicit routing instruction to invoke the orchestrated workflow.
Orchestrated Small-Path Requirements
When routed through the orchestrator, the small path still requires lifecycle scaffolding before implementation:
- invoke promotion and folder lifecycle steps through
vscode/runCommand and extension access per feature-promotion-lifecycle when available. Use script or CLI fallback only when direct extension command execution is unavailable.
- promote the potential item to a GitHub issue with
--work-mode minor-audit,
- create the active feature folder with
--work-mode minor-audit,
- delegate minimal-audit plan creation to
atomic_planner with DIRECTIVE: MINIMAL-AUDIT PLAN REQUIRED,
- require
atomic_executor preflight until PREFLIGHT: ALL CLEAR,
- execute Phase 0 only via
atomic_executor before branching,
- run the reduced small-audit after implementation and QC.
Direct invocation of python-typed-engineer remains implementation-focused and does not replace orchestrator lifecycle steps.
Documentation Expectations
Record in the agent response or logs:
- estimated production file count,
- chosen path (
small or large),
- rationale summary (1-3 bullets),
- any requested budget override and its approval state.
1---2name: python-change-budget-router-53description: Converted skill4---5# Converted skill67Applied rewrites:8- None910---11name: python-change-budget-router12description: Budget-first routing and batch-scope contract for Python work. Estimate production-file scope, choose small vs large path, enforce the 3 production + 3 test per-batch cap, and halt the agent for scope expansion approval when the estimate exceeds the budget.13---1415# Python Change Budget Router1617Canonical guidance for deciding whether Python work stays on the small path (`python-typed-engineer` direct mode) or escalates to the full orchestration workflow, and for enforcing per-batch change budgets during execution.1819## When to Use This Skill2021Use this skill when:2223- Intake starts from a natural-language Python request.24- An agent must decide the execution path before planning or implementation.25- A direct-mode route must reject over-budget requests and switch to orchestrated flow.26- An executor must confirm a batch fits within the 3 production + 3 test file cap before editing.2728## Canonical Routing Rules29301. Estimate rough change budget first based on likely **production Python files** touched.312. Route:32 - `1-3` production files (plus corresponding tests) → **small path** (`python-typed-engineer` direct mode).33 - `>3` production files → **large path** (orchestration workflow with promotion, research, spec, planning, execution, and review).3435## Per-Batch Change Budget (Hard Gate)3637During Phase C execution:3839- A single batch may change at most **3 production files** and **3 test files**.40- The default cap applies unless the user supplies an override of the form `budget: prod=<N>, test=<M>` in the initiating prompt.41- A user override may be honored only if it complies with repo policy and approved scope. If the requested scope exceeds 3 production files overall, stop before execution and seek explicit approval.42- If an override is requested, confirm compliance with repo policy before entering Phase C.4344## Scope Expansion Protocol4546When in-scope work is required beyond 3 production files, stop and return:4748- a one-paragraph justification for the additional files,49- the exact additional file paths,50- the smallest alternative that avoids expanding scope,5152and wait for explicit user approval before proceeding.5354Allowed minimal-seam exceptions (still within the 3-file cap) are:5556- introducing a minimal seam for testability (I/O boundary isolation, dependency injection),57- typing changes required for Pyright cleanliness in the slice,58- updating the smallest set of call sites needed to preserve a stable public API.5960## Direct-Mode Rejection Rule6162If `python-typed-engineer` is invoked directly and estimated scope is `>3` production files:6364- Stop before implementation.65- Return an explicit routing instruction to invoke the orchestrated workflow.6667## Orchestrated Small-Path Requirements6869When routed through the orchestrator, the small path still requires lifecycle scaffolding before implementation:7071- invoke promotion and folder lifecycle steps through `vscode/runCommand` and extension access per `feature-promotion-lifecycle` when available. Use script or CLI fallback only when direct extension command execution is unavailable.72- promote the potential item to a GitHub issue with `--work-mode minor-audit`,73- create the active feature folder with `--work-mode minor-audit`,74- delegate minimal-audit plan creation to `atomic_planner` with `DIRECTIVE: MINIMAL-AUDIT PLAN REQUIRED`,75- require `atomic_executor` preflight until `PREFLIGHT: ALL CLEAR`,76- execute Phase 0 only via `atomic_executor` before branching,77- run the reduced small-audit after implementation and QC.7879Direct invocation of `python-typed-engineer` remains implementation-focused and does not replace orchestrator lifecycle steps.8081## Documentation Expectations8283Record in the agent response or logs:8485- estimated production file count,86- chosen path (`small` or `large`),87- rationale summary (1-3 bullets),88- any requested budget override and its approval state.