plan-controller

plan-controller is a cursor rule for Cursor from kubev2v/forklift-console-plugin. It costs 13 tokens per session (4,738 once invoked), scanned A, original, Apache-2.0.

The controller that manages a migration plan from validation through execution and completion. A migration plan describes how related providers, networks, storage, hosts, hooks, and migrations work together.

In plain words
What is it for?
Use it to validate plans, coordinate migration resources, update plan conditions, and manage success, failure, cancellation, and archiving.
Why use it?
It keeps the migration lifecycle and its status in one place, while waiting for required resources and handling completed or archived plans.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Good fit Use it to validate plans, coordinate migration resources, update plan conditions, and manage success, failure, cancellation, and archiving.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/kubev2v/forklift-console-plugin/plan-controller
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/kubev2v/forklift-console-plugin

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for plan-controller

README.md
[![agentmods](https://agentmods.dev/badge/rules/kubev2v/forklift-console-plugin/plan-controller/github.svg)](https://agentmods.dev/rules/kubev2v/forklift-console-plugin/plan-controller)
Your own site
<a href="https://agentmods.dev/rules/kubev2v/forklift-console-plugin/plan-controller"><img src="https://agentmods.dev/badge/rules/kubev2v/forklift-console-plugin/plan-controller/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for plan-controller

Your own site · 80×15
<a href="https://agentmods.dev/rules/kubev2v/forklift-console-plugin/plan-controller"><img src="https://agentmods.dev/badge/rules/kubev2v/forklift-console-plugin/plan-controller.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 13 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 4,738 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00013 $0.04738
Opus 5.5 $0.00005 $0.01895
Sonnet 5.5 $0.00003 $0.00948
Haiku 4.5 $0.00001 $0.00474

Measured 29d ago against content hash ac9d2ec54d36, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

plan-controller scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 29d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.cursor/rules/backend/plans/plan-controller.mdc · 392 lines

How it starts

The opening of the file, as written. The whole thing — 392 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Plan Controller

Analyzed from commit: baf9c7bcc on 2026-09-17 Source paths: pkg/controller/plan/controller.go, pkg/controller/plan/validation.go, pkg/controller/plan/context/, pkg/controller/plan/ensurer/, pkg/controller/migration/

Package Purpose

The Plan controller (pkg/controller/plan/controller.go) is the central reconciler for migration plans. It watches Plan CRs plus related resources (Provider, NetworkMap, StorageMap, Hook, Migration) and drives the full lifecycle from validation through execution. validation.go sets plan-level conditions by validating providers, maps, VMs, hooks, VDDK, and destination constraints. context/ aggregates referenced CRs and inventory clients for execution. ensurer/ idempotently creates destination-cluster resources during migration.

The Migration controller (pkg/controller/migration/controller.go) is intentionally thin — it sets owner references, validates the plan reference and Cancel[] VM refs, and reflects plan snapshot status back onto the Migration CR.


Key Types and Structs

plan.Reconciler

type Reconciler struct {
    base.Reconciler
    APIReader client.Reader  // uncached reads for Plan fetch
}

plancontext.Context

type Context struct {
    k8sclient.Client
    Plan      *api.Plan
    Map       struct { Network *api.NetworkMap; Storage *api.StorageMap }
    Migration *api.Migration
    Source    Source      // Provider, Secret, Inventory web.Client
    Destination Destination // remote OCP client, Provider, Inventory
    Hooks     []*api.Hook
    Log       logging.LevelLogger
    Labeler   Labeler
}

Helper methods: SetMigration(), IsResumeConversion(), FindHook(), NestedVirtualizationSetting(), SelinuxRelabelAtBoot(), SelinuxRelabelExclude().

plancontext.Labeler

Generates consistent labels: plan=<planUID>, migration=<migrationUID>, vmID=<vmRefID>.

ensurer.Ensurer

Wraps *plancontext.Context; ensures destination resources exist (create-if-missing).

Read the full file on GitHub · 392 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 29d ago Changed · +108 lines ac9d2ec54d36
  2. 1mo ago First seen · 284 lines · 13 tokens per session scan A 10cfcd3f208d

Subscribe to this mod's changes

plan-controller is a cursor rule published in the GitHub repository kubev2v/forklift-console-plugin (11 stars, last pushed today), licensed Apache-2.0. It adds 13 tokens to every session and 4,738 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.