plan-loop

Converts engineering prompts into validated, PR-sized task plans with critique-driven revision.

Updated Sep 9, 2026
One-click install
npx skills add https://github.com/xlinh2301/EditCTC --skill plan-loop-xlinh2301
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: plan-loop
Source: https://github.com/xlinh2301/EditCTC/tree/main/.agents/skills/plan-loop
Command: npx skills add https://github.com/xlinh2301/EditCTC --skill plan-loop-xlinh2301

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve? Turning a vague feature, bug, or refactor request into a plan that a junior engineer or smaller model can execute without guessing is hard; this Skill automates that planning stage by decomposing a prompt from first principles, validating the result structurally, and iterating against an independent principal-engineer critique until the plan passes. ## Core Features & Use Cases - First-principles decomposition: Breaks a prompt into objective, end state, non-goals, environment, components, and open questions grounded in the real repository. - PR-sized task graph: Produces tasks.json with files, subtasks, tests, acceptance criteria, dependencies, and a topological execution order, validated by tools/validate_plan.py against schemas/plan.schema.json. - Adversarial critique loop: A separate principal-engineer role reviews alignment, coverage, sizing, testability, and executability, returning structured JSON per schemas/critique.schema.json; the loop revises until it passes or the budget runs out. - Use Case: Given a prompt like "add retry logic to the upload pipeline" and a target repo, produce plan.md plus tasks.json that a downstream execute loop or junior developer can implement task-by-task. ## Quick Start Ask the AI to turn your engineering prompt into an executable plan grounded in the current repository, producing plan.md and tasks.json.

Frequently Asked Questions about plan-loop

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I turn a feature request into an executable task plan?▼

Provide the prompt and the target repository; the loop decomposes the work from first principles into components and PR-sized tasks, writes plan.md and tasks.json, then validates and critiques the plan until it passes. The output is designed for task-by-task execution.

How is a generated plan validated before execution?▼

A deterministic validator checks tasks.json against a JSON schema plus semantic invariants: unique ids, an acyclic dependency graph, a valid topological order, and full component coverage. A separate principal-engineer critique then judges alignment, sizing, testability, and executability.

What format does the plan output use?▼

The loop emits two artifacts: plan.md, a human-readable layout with the objective, components, and task table, and tasks.json, the machine-executable source of truth containing files, subtasks, tests, acceptance criteria, dependencies, and execution order.

Does the plan-loop write or modify code in my repository?▼

No. The target repository is read-only context used for grounding; the loop only writes plan.md, tasks.json, and a ledger inside the sandbox directory. Implementation and debugging are handled by separate downstream loops.

When should I not use a planning loop for a prompt?▼

Skip it when you want code written immediately, since this loop stops once the plan is ready to delegate. It is also not intended for research proposals or experiment plans, which need a different planning structure.

What Python version does the plan validator require?▼

The validator script is stdlib-only and requires Python 3.9 or later. It prints a single JSON object with ok, errors, warnings, and stats, exiting nonzero when any error is present.