Planning
qp includes planning commands that turn file paths or diffs into task/scope-aware change intent.
Core commands:
qp planqp diff-planqp agent-brief
qp plan: File-Driven Plan
Generate a plan from explicit file paths:
qp plan --file cmd/qp/main.go --file internal/runner/runner.go
qp plan --json --file cmd/qp/main.goYou can also pass files positionally:
qp plan cmd/qp/main.go internal/config/config.goTypical output includes matched tasks, scopes, and suggested workflow framing.
qp diff-plan: Git-Diff Plan
Generate plan context directly from current git diff:
qp diff-plan
qp diff-plan --jsonThis is ideal before opening a PR or requesting agent assistance.
qp agent-brief: Handoff Briefing
agent-brief creates a compact handoff for coding agents.
qp agent-brief --task check
qp agent-brief --diff
qp agent-brief --file internal/runner/runner.go
qp agent-brief --json --diffKey options:
--task <name>: task-scoped brief--diff: diff-driven brief--file/--files: explicit file-driven brief--max-tokens: rough size cap
Compatibility rules:
--taskcannot be combined with--diffor explicit files--diffcannot be combined with explicit files
Suggested Workflow
- Change files.
- Run
qp diff-planto validate impact area. - Run
qp agent-brief --diff --max-tokens 2500for handoff. - Ask agent to execute/repair with relevant
qptasks.
Worked Example: Targeted Refactor
qp plan --file internal/config/config.go --file internal/config/suggest.go
qp agent-brief --file internal/config/config.go --file internal/config/suggest.go --max-tokens 2200This keeps handoff bounded to the impacted architecture slice.
Planning Quality Boosters
Planning output gets stronger when:
- Tasks have meaningful
scope: - Scopes have
descintent - Codemap package descriptions are maintained
- Guard coverage reflects critical workflows
Next Step
For turning failed guard output into structured remediation guidance, continue to Repair.