tercel/code-forge/plan
Claude Code and agent skill by tercel/code-forge
- community
Checking that the SKILL.md file is still in the repository.
Analyze documentation (or a prompt) and generate an implementation plan with task breakdown, TDD steps, and progress tracking. Use when breaking down a feature, creating tasks from docs or requirements, planning implementation work, or turning a spec into actionable steps.
Install
npx vskill@latest install tercel/code-forge/planSKILL.md
Code Forge — Plan
⚡ Execution Entry Point
@../shared/execution-entrypoint.md
For this skill: start at Step 0 (Configuration), then Step 0.5 (Project Analysis), then Step 1. If you catch yourself about to say "falling back to manual planning", STOP and go to the indicated step.
Generate an implementation plan from a feature document or a requirement prompt.
Iron Law
ALL OUTPUT GOES INTO `{output_dir}/{feature-name}/` AS SEPARATE FILES — `overview.md`, `plan.md`, `tasks/*.md`, `state.json`.
Anti-Rationalization Table
| Thought | Reality | |
|---|---|---|
| "I'll put everything in one plan.md for simplicity" | Multi-file structure is how impl/status/review find individual tasks. One file breaks all downstream skills. | |
| "docs/plan is close enough" | Output dir is {output_dir} (default: planning/). docs/plan, docs/plans are ALL wrong. | |
| "I'll create the tasks inline in plan.md" | Tasks go in tasks/{name}.md as separate files. Step 8 sub-agent creates them. | |
| "Numeric prefixes help with ordering" | Execution order is in overview.md and state.json. Files are setup.md, not 01-setup.md. | |
| "I can skip state.json" | state.json drives impl, status, fix. Without it, no downstream skill works. | |
| "The overview files are optional" | Both project-level and feature-level overview.md are mandatory outputs. | |
| "The input looks like a path but has no @, I'll treat it as a prompt" | Run the Step 2.0 path-like input guard. Paths without @ are almost always user mistakes — ask before proceeding. | |
| "I'll add FE-01- prefixes to feature directories for clarity" | Feature directory names must match the source filename exactly in kebab-case. core-dispatcher, not FE-01-core-dispatcher. | |
| "I'll generate all features as flat files in one directory" | Each feature gets its own subdirectory with the full multi-file structure. Flat files break all downstream skills. | |
| "Step 4.5 reuse discovery is optional, the user just wants the plan" | Step 4.5 is mandatory. Skipping it is the #1 cause of bloat across spec-forge / code-forge / apcore-skills workflows — the planner ends up generating tasks that recreate utilities, helpers, and entire subsystems that already exist. | |
| "I'll just trust the LLM to know what already exists" | The LLM does not know. It must Grep and Read the actual project. Step 4.5 forces this empirically. |
When to Use
- Have a feature document that needs to be broken into development tasks
- Have a requirement idea (text prompt) that needs planning
- Need a structured plan with TDD task breakdown
- Use
--tmpto avoid adding plan files to the project (writes to.code-forge/tmp/, auto-gitignored)
Workflow
Context Management
Steps 4, 4.5, 7, and 8 are offloaded to sub-agents via the Agent tool to prevent context window exhaustion on large projects. The main context retains only concise summaries returned by each sub-agent, while full document analysis, reuse discovery, file generation, and code implementation happen in isolated sub-agent contexts that are discarded after completion.
Actual execution order: Steps 0 through 13, in sequential order.
Step 9 (overview.md) executes after Steps 7 and 8 because it references task files generated by those steps.
Detailed Steps
@../shared/configuration.md
Step 0.5: Project Analysis
Before planning, understand the project's architecture and tech stack. Read and execute:
@../shared/project-analysis.md
Execute PA.1 (Project Profile), PA.2 (Architecture Analysis), and PA.5 (Existing Test Assessment). This ensures:
- Tasks are structured around the ACTUAL architecture (not assumed layers)
- TDD steps reference the ACTUAL test framework
- Task dependencies reflect REAL module relationships
- Language-specific patterns are accounted for (e.g., Rust trait bounds, Go interfaces)
The Project Context Summary (PA.7) is passed to the sub-agent in Step 4 as part of the context.
Plan-specific additions to Step 0:
- 0.2 additional defaults:
reference_docs.sources=[],reference_docs.exclude=[] - 0.3 additional validation:
reference_docs.sourcesmust be an array of strings (fall back to[]on error)reference_docs.sourcesentries must NOT contain..(security risk)reference_docs.sourcesentries must NOT point to system directories (node_modules/,.git/,build/)reference_docs.excludemust be an array of strings (fall back to[]on error)- 0.4 additional display: Resolved file creation path:
{output_dir}/{feature_name}/ - 0.4 error handling:
- Config file not found → note "using defaults" and continue
- Config file parse error → show error, fall back to defaults, continue
- Invalid config values → show warnings, fall back to defaults for invalid fields, continue
- 0.6 path resolution notes:
base_dirempty string means project root;input_dirdefault:docs/features/;output_dirdefault:planning/
Step 1: Resolve and Summarize Reference Docs
This step only runs when `reference_docs.sources` is non-empty in the merged configuration.
If reference_docs.sources is empty or not configured, skip directly to Step 2.
1.1 Resolve Glob Patterns
- Resolve each pattern in
config.reference_docs.sourcesagainstproject_root - Apply
config.reference_docs.excludepatterns to filter results - Auto-exclude
{output_dir}/**to prevent circular references - Deduplicate results (same file matched by multiple patterns)
- If 0 files matched → display:
Reference docs: 0 files matched for configured patterns. Continuing without reference context.→ skip to Step 2 - If > 30 files matched → display file list, use
AskUserQuestion: "Found {N} reference docs. This will spawn {N} parallel sub-agents."
- "Proceed with all {N} files"
- "Let me refine the patterns" → show current
sources/excludeconfig, stop and let user update.code-forge.json
1.2 Display Matched Files
Display the matched file list:
Proceed directly — no confirmation needed (unless > 30 files triggered 1.1 step 6).
1.3 Parallel Sub-agent Summarization
Spawn N parallel sub-agents via Agent tool, one per matched file:
subagent_type:"general-purpose"description:"Summarize reference doc: {filename}"
Each sub-agent prompt:
- The file path (sub-agent reads it from disk)
- Instruction to return ONLY a structured summary in this exact format:
Target summary size: ~300-500 bytes per doc.
Error handling: If a sub-agent fails to summarize a file, log a warning and skip that file:
1.4 Store Reference Summaries
Collect all successful sub-agent results into a reference_summaries list (ordered by file path). Store in memory for use by Steps 4, 7, and 8.
1.5 Deduplicate Against Input Doc
After the input document path is known (after Step 3), remove it from reference_summaries if present — the feature doc is already read directly by Steps 4 and 7. This deduplication happens lazily: the summaries are stored now, deduplication is applied when injecting into sub-agent prompts.
Step 2: Prompt Mode — Delegate to spec-forge
This step only runs when the input is NOT a file path (does NOT start with `@`).
If the input starts with @, skip directly to Step 3.
2.0 Path-Like Input Guard
Before treating input as a prompt, check if it looks like a file/directory path. If the input matches ANY of these patterns, it is almost certainly a path the user forgot to prefix with @:
- Contains
/(e.g.,../apcore-cli,docs/features/auth.md) - Starts with
.(e.g.,./src,../other-project) - Ends with
.md(e.g.,user-auth.md) - Matches an existing file or directory on disk
Action: Do NOT silently proceed as prompt mode. Instead, use AskUserQuestion:
- Options:
- "Yes, use as file path" → prepend
@and skip to Step 3 - "No, treat as text prompt" → continue with Step 2.1
This guard prevents the common mistake of forgetting @, which causes the entire workflow to bypass Directory/File Mode and produce incorrect output.
When a user provides a text prompt instead of a file path, code-forge:plan delegates spec creation to spec-forge. This maintains the separation of concerns: spec-forge owns specification, code-forge owns implementation planning.
A raw prompt carries no requirements behind it. Planning straight from a sentence means implementing behavior nobody has specified — field rules, error handling, and permissions all get invented during implementation, and afterwards there is no document to settle whether the result is correct. The delegation below exists to produce that document first.
2.1 Generate Slug
Convert the prompt text to a kebab-case slug for the feature name:
- ASCII text: lowercase, replace spaces/special chars with hyphens (e.g., "User Login Feature" →
user-login-feature) - Non-ASCII text (Chinese, Japanese, etc.): use
AskUserQuestionto let user confirm or provide a custom slug. Suggest a reasonable English slug based on the prompt meaning.
2.2 Check for Existing Feature Spec
Check if {input_dir}/{slug}.md already exists:
- Exists → use it directly, skip to 2.4
- Does not exist → continue to 2.3
2.3 Auto-Delegate to spec-forge
docs/features/*.md is produced by `spec-forge:tech-design` (its Step 7 emits one feature spec per component in §8.1, plus overview.md with the dependency graph and execution order). There is no standalone spec-forge:feature skill — it was folded into tech-design.
Use AskUserQuestion to pick the delegation depth:
- Full chain — `/spec-forge {slug}` (recommended when the work is more than a small, well-understood change): runs
[idea] → [decompose] → [prd] → srs → tech-design → review, producingdocs/{slug}/srs.mdas the requirements contract before any design exists. Plans generated afterwards are traceable toFR-*/NFR-*IDs, andcode-forge:tddderives tests from the SRS acceptance criteria. - Design only — `spec-forge:tech-design` (faster, for a small change whose requirements are genuinely obvious): skips the requirements contract. The design's §3.5–§3.7 come from answers to clarifying questions rather than a specified requirement set, so nothing downstream can be traced to a requirement ID.
For the design-only path, launch Agent(subagent_type="general-purpose"):
- Sub-agent prompt: "Invoke the spec-forge:tech-design skill for '{slug}'. The user's requirement is: '{original prompt text}'. Standalone mode — no upstream SRS or PRD exists. Ask only the clarification questions whose answers materially change the design, and record every inference as an explicit stated assumption the user can correct. IMPORTANT: run Step 7 so feature specs are generated in docs/features/ along with overview.md."
- Wait for completion → verify
docs/{slug}/tech-design.mdexists and thatdocs/features/gained specs with a matchingoverview.md
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/plan/SKILL.md
Popularity
- Repository stars
- 2
- 7-day trend score
- 5
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 17 Mar 2026, 7 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/tercel/code-forge/plan)