Improve feature

From TentacleOpera/switchboard · View interactive version

Improve feature is an AI agent skill from the GitHub repository TentacleOpera/switchboard. Use this workflow when the target is a Switchboard **feature** (a container of subtask plans), not a single plan. Its job is to make the subtask **set** coherent: improve every subtask, detect inconsi

How to use this skill

Skill file

Improve Feature

Use this workflow when the target is a Switchboard feature (a container of subtask plans), not a single plan. Its job is to make the subtask set coherent: improve every subtask, detect inconsistencies between them, and then restructure — merge overlapping plans, delete superseded ones, rewrite contradictory ones, split oversized ones.

Detect a feature when the target file is under .switchboard/features/, or contains an auto-generated <!-- BEGIN SUBTASKS ... --> / <!-- END SUBTASKS --> block. If the target is a single plan, use improve-plan instead.

Why this is a separate skill

improve-plan is deliberately non-destructive ("never delete content; only update the plan document") because for a single plan that is correct. For a feature it is the opposite of the job — the highest-value action is exactly the thing improve-plan forbids: recognising that two plans are one, that a plan is obsolete, or that a contradiction means one plan gets rewritten. This skill is authorised to cut. Invoking it is the sign-off to restructure the subtask set; there is no per-run confirmation gate.

Guardrails (different from improve-plan, not fewer)

Restructuring is expected — but bounded:

In-place rewrites keep their existing column.

Steps

  1. Expand the feature into its subtasks. Read the feature and collect every linked subtask plan (and the code they touch). If a link is broken, say so.
  1. Improve every subtask (run improve-plan on each). For each subtask plan file, execute the improve-plan workflow's per-plan Steps in full (Load → all Required Sections → adversarial critique → write back → complexity-based recommendation). Improve each in place, with sibling context in hand. This is the same behaviour as dispatching improve-plan across a feature's subtasks locally. Report a per-subtask summary (complexity, routing, key changes). When a subtask's goal is a removal or relocation, ensure it carries ### Goal Invariants under its Verification Plan — the recommended section from improve-plan — with paired negative/positive assertions, so the cross-subtask reconciliation in Step 3 can detect when one subtask's destination change inverts another's goal.

### Project Pinning

When updating subtask plans, ensure each has **Project:** <name> in Metadata if a project is active; if none is active, omit the line — never ask the user. The workspace/repo name is NOT a project — never pin it (the importer silently drops workspace-name pins to unassigned). See AGENTS.md "Plan Project Pinning" for the full protocol.

  1. Cross-subtask reconciliation audit — the real value. For every file/symbol touched by more than one subtask, classify each finding:

Produce a shared-surface map and, for each contended symbol, the single reconciled end-state.

  1. Restructure the set (act — do not just recommend). Based on the audit, do whatever makes the set coherent:

Apply session-scope directives here (e.g. "unreleased → clean break, no migration shims"; "single-repo") — apply them, never transcribe them. A directive binds this run, not the reader. Written into a subtask file it inverts: the coder who picks that file up reads a constraint on you as an instruction to itself, and follows the document over the live dispatch that contradicts it.

After restructuring, you MUST move each newly created plan file (merges, splits) to PLAN REVIEWED using the session-appropriate mechanism (e.g., kanban_operations skill / move-card.js locally, Notion/Linear provider/MCP remotely). In-place rewrites keep their existing columns. Do not move deleted plans.

  1. Backfill the feature file's own description. Ensure the feature has ## Goal, ## How the Subtasks Achieve This, and ## Dependencies & sequencing (backfill from the subtasks if missing; don't overwrite existing content; never touch the auto-block). Optionally record the reconciled merge map / end-state here so a coder implements to one design.
  1. Report. No commit, no push. Report the before/after subtask set and the reconciliation outcome, listing the files you created, rewrote, and deleted so the diff is legible.

High/Low mode (complexity-tier consolidation)

When the user asks to tier the feature by complexity — "high/low split", "split by complexity", "consolidate into tiers", or /improve-feature --high-low — run this variant of Step 4 instead of a free-form restructure. It is the remote, file-based equivalent of the local high-low feature worktree mode:

  1. Run Steps 1–3 as normal (improve every subtask; reconcile).
  2. Consolidate the subtasks into exactly two new plan files, carrying all their intent forward (preservation guardrail):
  1. Give each new file a **Complexity:** for its tier and a **Consolidated From:** <source plan filenames> metadata line for traceability (reference the merged files by name — never by plan ID, which you cannot know). Do NOT embed a **Plan ID:** — it is never read; the importer assigns the ID and keys by file path.
  2. git rm the original subtask files (their intent now lives in the two tier files) and add a **Feature:** <feature-plan-id> line to each new tier plan file's frontmatter (the feature's Plan ID). Locally this is assign-to-feature.js. After writing the files, you MUST move both new tier cards to PLAN REVIEWED using the session-appropriate mechanism (e.g., kanban_operations skill / move-card.js locally, Notion/Linear provider/MCP remotely).
  3. Report the two tier files, what merged into each, and the reconciled subtask list.

Use this when the intent is parallel execution by complexity tier; use the default free-form Step 4 when the intent is just "make the set coherent".

Recommendation

End with a per-subtask complexity routing (Intern 1-3 / Coder 4-6 / Lead Coder 7-10) and, for the feature, whether it is ready to execute or still has open decisions for the user.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.