Context Commands
Context commands build and maintain PP Core's understanding of your codebase and ideas: mapping the source tree, constructing a knowledge graph, keeping documentation honest, harvesting learnings, and exploring concepts before they harden into plans.
/pp-map-codebase
Runs parallel mapper agents over the source tree to generate structured reference documents and a queryable intelligence index.
/pp-map-codebase
/pp-map-codebase --fast --focus arch
/pp-map-codebase --query "authentication"
/pp-map-codebase --query diff
| Flag | Argument | Behavior |
|---|---|---|
--fast | — | Lightweight single-agent scan instead of the full four-agent pass. |
--focus | tech, arch, quality, concerns, tech+arch | Restricts mapping to a particular area. |
--query | [term] | Searches the live intelligence index for a term. |
--query | status | Reports index freshness and statistics. |
--query | diff | Lists what changed since the last mapping run. |
--query | refresh | Rebuilds the index. |
/pp-graphify
Builds, queries, and inspects the project knowledge graph stored in .planning/graphs/.
/pp-graphify build
/pp-graphify query "authentication"
/pp-graphify status
/pp-graphify diff
| Subcommand | Behavior |
|---|---|
build | Builds or rebuilds the graph from the current project state. |
query [term] | Searches the graph for a term and returns related nodes and edges. |
status | Shows graph freshness, last build time, and node/edge counts. |
diff | Reports node and edge changes since the previous build. |
/pp-extract-learnings
Distills reusable decisions, patterns, and lessons out of completed phase artifacts.
/pp-extract-learnings 5
/pp-extract-learnings --all
| Flag / Argument | Behavior |
|---|---|
N | Phase number to extract learnings from. |
--all | Extracts learnings from every completed phase in the current milestone. |
/pp-ingest-docs
Bootstraps a .planning/ setup from existing ADRs, PRDs, SPECs, and other documentation already in the repository.
/pp-ingest-docs
/pp-ingest-docs docs/adr/ --mode new
/pp-ingest-docs --mode merge --manifest docs/ingest.yaml
| Flag / Argument | Behavior |
|---|---|
[directory] | Optional path to a specific documentation directory. |
--mode [type] | Ingestion strategy: new or merge (defaults based on whether a setup already exists). |
--manifest [path] | Points to a YAML file listing documents with custom precedence. |
/pp-docs-update
Generates or refreshes project documentation, verifying every claim against the actual codebase.
/pp-docs-update
/pp-docs-update --force
/pp-docs-update --verify-only
| Flag | Behavior |
|---|---|
--force | Regenerates all docs, overwriting both hand-written and PP Core-managed content. |
--verify-only | Checks existing docs for accuracy without writing any files. |
/pp-explore
Opens a Socratic ideation session to think through an idea before it becomes a plan.
/pp-explore
/pp-explore "authentication strategy"
/pp-explore "should we use GraphQL or REST?"
| Argument | Behavior |
|---|---|
[topic] | Optional topic to explore; the session stays open-ended if omitted. |
/pp-spike
Runs a handful of focused feasibility experiments (typically two to five) to turn an uncertain idea into verified knowledge.
/pp-spike "WebSocket real-time sync"
/pp-spike "Stripe subscription billing" --quick
/pp-spike frontier
/pp-spike --wrap-up
| Flag / Argument | Behavior |
|---|---|
[idea] | The concept to spike; passing frontier analyzes the existing spike landscape and proposes what to try next. |
--quick | Skips decomposition and goes straight to building experiments. |
--text | Uses plain-text lists instead of interactive menus. |
--wrap-up | Packages the findings into a persistent project skill. |
/pp-sketch
Generates throwaway HTML mockups to explore UI directions before committing to implementation.
/pp-sketch "dashboard layout"
/pp-sketch "onboarding flow" --quick
/pp-sketch frontier
/pp-sketch --wrap-up
| Flag / Argument | Behavior |
|---|---|
[idea] | The design direction to explore; passing frontier proposes consistency fixes across prior sketches. |
--quick | Skips the mood-intake step and jumps to decomposition. |
--text | Uses plain-text lists instead of interactive menus. |
--wrap-up | Packages the design findings into a persistent project skill. |