Import external plans. Validates context, detects conflicts, generates PLAN.md.
Imports external design documents, validates them against project context, and converts them into structured Towline plans.
npx claudepluginhub sienklogic/towlineThis skill is limited to using the following tools:
You are the orchestrator for /dev:import. This skill imports an external plan document (design doc, RFC, AI-generated plan, etc.) into the Towline planning format. It validates the imported document against project context, detects conflicts with locked decisions and existing architecture, and generates properly formatted PLAN.md files. Your job is to stay lean, do conflict detection inline, and delegate only the plan checker to a Task() subagent.
Reference: skills/shared/context-budget.md for the universal orchestrator rules.
Additionally for this skill:
.planning/config.json exists (run /dev:begin first).planning/ROADMAP.md exists with at least one phase.planning/REQUIREMENTS.md existsExecute these steps in order.
Reference: skills/shared/config-loading.md for the tooling shortcut and config field reference.
$ARGUMENTS for phase number--from <filepath> flag (path to the external document to import)--skip-checker flag (skip plan validation step).planning/phases/{NN}-{slug}/.planning/STATE.md*-PLAN.md)
Read all relevant context files. This context is used for conflict detection in Step 4.
1. ROADMAP.md — extract current phase goal, dependencies, requirements, success criteria
2. REQUIREMENTS.md — extract REQ-IDs mapped to this phase
3. CONTEXT.md (project-level, if exists) — extract locked decisions, deferred ideas, constraints
4. Phase CONTEXT.md (if exists at .planning/phases/{NN}-{slug}/CONTEXT.md) — phase-specific locked decisions from /dev:discuss
5. config.json — extract feature flags, depth, model settings
6. Prior SUMMARY.md files — use digest-select depth per `skills/shared/digest-select.md` (direct deps: full body for conflict detection, transitive: frontmatter only, 2+ back: skip)
7. Research SUMMARY.md (if exists at .planning/research/SUMMARY.md)
8. Seeds — glob .planning/seeds/*.md, check trigger field for matches:
- trigger equals the phase slug
- trigger is a substring of the phase directory name
- trigger equals the phase number as integer
- trigger equals * (always matches)
9. Pending todos — scan .planning/todos/pending/ for items related to this phase
10. NOTES.md (if exists at .planning/NOTES.md) — check for related notes
Collect all of this into a context bundle for use in Steps 4 and 5.
If --from <filepath> was provided:
If no --from flag:
Parse the document into structured sections:
Compare the imported plan against ALL loaded context from Step 2.
<format_rules> HARD REQUIREMENTS FOR THIS STEP — violations are bugs:
[BLOCKER], [WARNING], [INFO]. Never CRITICAL, HIGH, MEDIUM, LOW, or any other label.WRONG (never do this):
| Area | Import | Project | Severity |
|---|---|---|---|
| Framework | Fastify | Express | CRITICAL |
RIGHT (always do this): [BLOCKER] Framework mismatch Found: Plan uses Fastify with @fastify/view Expected: Express 5.x (locked decision in CONTEXT.md) → Replace Fastify with Express 5.x </format_rules>
Run each of these checks. If any matches, record a [BLOCKER]:
Run each of these checks. If any matches, record a [WARNING]:
.planning/todos/pending/?Run each of these checks. If any matches, record an [INFO]:
.planning/seeds/ that could enhance the plan?patterns fields) should the imported plan follow?Present ALL findings in a single report using this EXACT plain-text format. NEVER use markdown tables. NEVER change the labels. NEVER skip a section even if it has 0 findings:
## Conflict Detection Report
### BLOCKERS ({count})
[BLOCKER] {Short title}
Found: {what the imported plan says or does}
Expected: {what the project context requires}
→ {Specific action to resolve}
[BLOCKER] {Short title}
Found: ...
Expected: ...
→ ...
### WARNINGS ({count})
[WARNING] {Short title}
Found: {what was detected}
Impact: {what could go wrong if not addressed}
→ {Suggested action}
### INFO ({count})
[INFO] {Short title}
Note: {relevant information or suggestion}
IMPORTANT: Always present ALL findings (blockers + warnings + info) together in one report before taking any action.
Using the imported document (adjusted for any blocker resolutions from Step 4) and the loaded project context, generate PLAN.md content.
YAML frontmatter — ALL required fields:
---
phase: "{NN}-{slug}"
plan: "{phase}-{plan_num}"
type: "{task type: feature, refactor, config, test, docs}"
wave: {wave number — 1 for independent plans, 2+ for dependent plans}
depends_on: [{list of plan IDs this plan depends on}]
files_modified: [{list of files this plan creates or modifies}]
autonomous: {true if no checkpoints needed, false if human input required}
discovery:
approach: "{brief description of what this plan accomplishes}"
open_questions: [{any unresolved questions from the import}]
must_haves:
truths: [{core invariants this plan must satisfy}]
artifacts: [{files that must exist after execution}]
key_links: [{connections to other parts of the system}]
provides: [{what downstream plans can depend on from this plan}]
gap_closure: {false for standard plans, true if closing gaps}
---
Task XML — for each task in the plan:
<task id="{plan_id}-T{N}">
<name>{Imperative task name}</name>
<files>{comma-separated list of files this task touches}</files>
<action>
{Step-by-step implementation instructions — specific enough for an executor agent to follow mechanically.}
{Include exact file paths, function signatures, import statements.}
</action>
<verify>
{Concrete verification commands: test commands, grep checks, build commands.}
{Each verify step must be runnable from the command line.}
</verify>
<done>{One-sentence definition of done for this task.}</done>
</task>
Scope rules:
<!-- inferred from codebase: ... -->Wave assignment:
Skip this step if:
--skip-checker flag is setfeatures.plan_checking is false in configIf validation is enabled:
Display to the user: ◐ Spawning plan checker...
Spawn the plan checker Task():
Task({
subagent_type: "dev:towline-plan-checker",
prompt: <checker prompt>
})
NOTE: The dev:towline-plan-checker subagent type auto-loads the agent definition. Do NOT inline it.
Checker Prompt Template:
You are the towline-plan-checker agent.
<plans_to_check>
{For each generated PLAN.md:}
--- Plan File: {filename} ---
[Inline the FULL content of each plan file]
--- End Plan File ---
</plans_to_check>
<phase_context>
Phase goal: {goal from roadmap}
Phase requirements: {REQ-IDs}
</phase_context>
<context>
{Inline .planning/CONTEXT.md if it exists — project-level locked decisions}
{Inline .planning/phases/{NN}-{slug}/CONTEXT.md if it exists — phase-level locked decisions}
</context>
<import_note>
These plans were imported from an external document, not generated by the standard planner.
Pay extra attention to:
- Consistency with project conventions
- Completeness of verify steps
- Accuracy of files_modified lists
- Whether task actions are specific enough for mechanical execution
</import_note>
Run all verification dimensions on these plans. Return your structured report.
Do NOT write any files. Return your findings as your response text.
Process checker results — revision loop:
Reference: skills/shared/revision-loop.md for the full Check-Revise-Escalate pattern (max 3 iterations).
Follow the revision loop with:
Write each plan to .planning/phases/{NN}-{slug}/{phase}-{plan_num}-PLAN.md.
If existing plans are being replaced (user confirmed in Step 1):
*-PLAN.md files in the phase directory before writing new onesPerform all state updates in this order:
8a. Update ROADMAP.md Progress table (REQUIRED — do this BEFORE updating STATE.md):
.planning/ROADMAP.md## Progress tablePlans Complete column to 0/{N} where N = number of plan files createdStatus column to planned8b. Update STATE.md:
8c. Generate dependency fingerprints: For each dependency phase (phases that this phase depends on, per ROADMAP.md):
dependency_fingerprints field to each plan's YAML frontmatter:
dependency_fingerprints:
"01-01": "len:4856-mod:2025-02-08T09:40"
"01-02": "len:4375-mod:2025-02-08T09:43"
8d. Update CONTEXT.md (conditional):
If the import process surfaced new locked decisions (from blocker resolutions in Step 4), append them to .planning/CONTEXT.md under the Decisions section.
8e. Emit workflow event (conditional): If the event-logger script is available:
node ${CLAUDE_PLUGIN_ROOT}/scripts/towline-tools.js event workflow plan-import --phase {N} --plans {count} --source {filepath_or_user_input}
Falls back silently if the command is not available.
Reference: skills/shared/commit-planning-docs.md for the standard commit pattern.
Stage the new PLAN.md files and any updated state files:
docs({phase}): import plans for phase {N} ({count} plans, {wave_count} waves)
Present a summary of the import using the branded banner:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
TOWLINE ► IMPORT COMPLETE ✓
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
**Phase {N}: {name}** — {plan_count} plans imported
Source: {filepath or "user input"}
Conflicts resolved: {count of blockers resolved in Step 4}
Warnings acknowledged: {count}
Plans:
{phase}-01: {plan name} (Wave {W}, {task_count} tasks)
{phase}-02: {plan name} (Wave {W}, {task_count} tasks)
Wave execution order:
Wave 1: Plan 01, Plan 02 (parallel)
Wave 2: Plan 03 (depends on 01, 02)
Must-haves coverage: {count} truths across {plan_count} plans
Requirements traced: {count}/{total} REQ-IDs covered
───────────────────────────────────────────────────────────────
## ▶ Next Up
**Build Phase {N}** — execute these imported plans
`/dev:build {N}`
<sub>`/clear` first → fresh context window</sub>
───────────────────────────────────────────────────────────────
**Also available:**
- `/dev:plan {N}` — re-plan from scratch if import needs rework
- `/dev:discuss {N}` — talk through details before building
───────────────────────────────────────────────────────────────
If the specified phase does not exist in ROADMAP.md, display:
╔══════════════════════════════════════════════════════════════╗
║ ERROR ║
╚══════════════════════════════════════════════════════════════╝
Phase {N} not found.
**To fix:** Run `/dev:status` to see available phases.
If REQUIREMENTS.md or ROADMAP.md do not exist, display:
╔══════════════════════════════════════════════════════════════╗
║ ERROR ║
╚══════════════════════════════════════════════════════════════╝
Project not initialized.
**To fix:** Run `/dev:begin` first.
If --from <filepath> points to a nonexistent file, display:
╔══════════════════════════════════════════════════════════════╗
║ ERROR ║
╚══════════════════════════════════════════════════════════════╝
File not found: {filepath}
**To fix:** Check the path and try again.
If the imported document contains no actionable tasks, display:
╔══════════════════════════════════════════════════════════════╗
║ ERROR ║
╚══════════════════════════════════════════════════════════════╝
The imported document is too vague to convert into plans. No specific tasks, files, or implementation steps found.
**To fix:** Provide a more detailed document, or use `/dev:plan {N}` to generate plans from scratch.
After 3 revision iterations without passing, display:
╔══════════════════════════════════════════════════════════════╗
║ ERROR ║
╚══════════════════════════════════════════════════════════════╝
Import plan checker failed to pass after 3 revision iterations.
**To fix:** Review the remaining issues below and decide whether to proceed or revise manually.
Present remaining issues and ask user to decide: proceed or intervene.
| File | Purpose | When |
|---|---|---|
.planning/phases/{NN}-{slug}/{phase}-{NN}-PLAN.md | Imported plan files | Step 7 |
.planning/ROADMAP.md | Plans Complete + Status updated to planned | Step 8a |
.planning/STATE.md | Updated with plan status and import source | Step 8b |
.planning/CONTEXT.md | Updated if blockers surfaced new locked decisions | Step 8d |
Activates when the user asks about AI prompts, needs prompt templates, wants to search for prompts, or mentions prompts.chat. Use for discovering, retrieving, and improving prompts.
Search, retrieve, and install Agent Skills from the prompts.chat registry using MCP tools. Use when the user asks to find skills, browse skill catalogs, install a skill for Claude, or extend Claude's capabilities with reusable AI agent components.
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill content", or needs guidance on skill structure, progressive disclosure, or skill development best practices for Claude Code plugins.