Unified planning and execution pipeline - from idea to working code
Executes complete development cycle from idea to validated code with planning and testing.
/plugin marketplace add ariaxhan/kernel-plugin/plugin install kernel@kernel-marketplaceUnified pipeline: Idea → Plan → Implement → Validate → Done
Use this for any project idea, prompt, or existing plan. Handles the full cycle.
Analyze what user provided:
A) Raw idea/prompt → Go to Phase 1 (Planning) B) Existing plan file → Go to Phase 2 (Execution) C) Partial implementation → Assess state, resume from appropriate phase
If .claude/plans/ contains relevant plan:
→ Ask: "Found existing plan. Resume execution or start fresh?"
If kernel/state.md mentions in-progress work:
→ Ask: "Found in-progress work. Continue or start new?"
Parse the input to extract:
GOAL: [What are we building?]
CONSTRAINTS: [Limitations, requirements, must-haves]
INPUTS: [What do we have to work with?]
OUTPUTS: [What should exist when done?]
DONE-WHEN: [How do we know it's complete?]
List ALL assumptions across:
STOP and confirm assumptions with user before proceeding.
Before designing:
1. Search for existing patterns: Glob + Grep for similar implementations
2. Read relevant files: Understand current architecture
3. Check dependencies: What's available? What needs installing?
4. Find working examples: Copy patterns, don't invent
Define contracts BEFORE implementation:
- Function signatures (inputs, outputs, errors)
- Data structures (types, schemas)
- API contracts (endpoints, payloads)
- File structure (what goes where)
Walk through the implementation mentally:
1. Trace happy path end-to-end
2. Identify edge cases
3. Spot potential failures
4. Verify integration points connect
Write plan to .claude/plans/{feature-name}.md:
# Plan: {Feature Name}
## Goal
{goal statement}
## Done-When
- [ ] {criterion 1}
- [ ] {criterion 2}
## Assumptions (Confirmed)
{list confirmed assumptions}
## Implementation Steps
1. [ ] {step 1 - specific, actionable}
2. [ ] {step 2}
3. [ ] {step 3}
...
## Validation Steps
1. [ ] {test/check 1}
2. [ ] {test/check 2}
## Rollback Plan
{how to undo if things go wrong}
---
Created: {timestamp}
Status: READY FOR EXECUTION
Ask user: "Plan ready. Proceed with execution?"
1. Create/switch to feature branch (if not on one)
2. Load plan into TodoWrite for tracking
3. Read kernel/state.md for context
4. Verify prerequisites (dependencies, tools)
For each step in the plan:
BEFORE:
- Mark step as in_progress in todo
- State what you're about to do
- Identify files to modify/create
DURING:
- Make minimal, focused changes
- One logical unit per commit
- Follow existing patterns exactly
AFTER:
- Verify change works (run relevant test/check)
- Mark step as completed
- Commit with conventional message
- Update plan file with progress
After every 2-3 steps:
- Run test suite (if exists)
- Check for type errors (if typed language)
- Verify no regressions
- Confirm integration points still work
Run all applicable:
# Detect and run project's test suite
[ -f package.json ] && npm test
[ -f pyproject.toml ] && pytest
[ -f Cargo.toml ] && cargo test
[ -f go.mod ] && go test ./...
# Detect and run linters
[ -f .eslintrc* ] && npm run lint
[ -f pyproject.toml ] && ruff check . || flake8
[ -f rustfmt.toml ] && cargo fmt --check
# Detect and run type checks
[ -f tsconfig.json ] && npx tsc --noEmit
[ -f pyproject.toml ] && mypy . || true
Walk through done-when criteria:
For each criterion in plan:
- Verify it's actually met
- Document how it was verified
- If not met, add remediation step
Test at least 3 edge cases:
1. Empty/null input
2. Boundary conditions
3. Error/failure path
Update kernel/state.md:
- What was built
- Key decisions made
- Any technical debt introduced
- Follow-up items (if any)
Mark plan as complete:
---
Status: COMPLETED
Completed: {timestamp}
---
Output summary:
BUILD COMPLETE
Feature: {name}
Branch: {branch-name}
Commits: {count}
Files Changed:
- {file1}: {what changed}
- {file2}: {what changed}
Validation:
- Tests: {pass/fail/skip}
- Lint: {pass/fail/skip}
- Types: {pass/fail/skip}
- Done-when: {all criteria met}
Next Steps:
- [ ] Review changes: git diff main
- [ ] Create PR: /ship
- [ ] {any follow-up items}
1. STOP immediately
2. Document what failed and why
3. Rollback to last known good state
4. Update plan with findings
5. Ask user: "Continue with modified approach or pause?"
1. Identify failing test
2. Diagnose: is it the code or the test?
3. Fix the root cause (not symptoms)
4. Re-run full validation
1. Document the blocker
2. List what's needed to unblock
3. Ask user for input
4. Do NOT guess or work around silently
# From raw idea
/build "Add user authentication with JWT"
# From existing plan
/build .claude/plans/auth-feature.md
# Resume interrupted work
/build --resume
# Quick mode (skip confirmations)
/build --quick "Add a logout button"