Create, select, or edit a persistent project context through guided conversation. Captures dev environment, project relationships, worktree setup, architecture, and team conventions that all scenarios inherit. Use when starting planning, switching projects, or when the user says "create context", "plan-context", "setup context".
A context is a markdown file (like CLAUDE.md) that provides instructions and knowledge to the plan generation pipeline. Contexts live in [workspace-root]/plans/.contexts/ and are composed together — a plan can use multiple contexts simultaneously.
Contexts are markdown, not JSON or config. They are instructions the LLM reads and follows directly — project knowledge, generation rules, conventions, anti-patterns. No parsing, no schema. The LLM reads the .md file and adapts its behavior.
Contexts are just .md files, but they tend to fall into two categories:
| Kind | Contains | Examples |
|---|---|---|
| Project context | Project knowledge that code analysis alone can't discover — dev setup, build quirks, team conventions, known issues, architecture decisions | devxapps-project.md, metagraph-api.md |
| How plan documents should be generated — document set, content style per doc, chart types, CSS theme, nav structure, anti-patterns |
feature-planning.md, performance-audit.md, lean.md |
These are not enforced types — a single context file can contain both project knowledge and generation rules. The tags in the frontmatter help users identify what a context provides.
When a plan uses multiple contexts, they are composed in order. Later contexts can override earlier ones. This lets you separate concerns:
devxapps-project.md (project knowledge: paths, build, conventions)
+ performance-audit.md (generation rules: 4 docs, Tokyo Night, anti-patterns)
= effective context for this plan
Or combine multiple project contexts:
devxapps-project.md (frontend project knowledge)
+ metagraph-api.md (backend project knowledge)
+ feature-planning.md (generation rules: full 7-doc suite)
= effective context for this plan
Skills read all selected contexts in order and follow the combined instructions.
[workspace-root]/plans/.contexts/
├── devxapps-project.md # Project context
├── metagraph-api.md # Project context
├── feature-planning.md # Generation rules (shipped with plugin as template)
├── performance-audit.md # Generation rules (shipped with plugin as template)
├── lean.md # Generation rules (shipped with plugin as template)
├── team-alpha-conventions.md # Custom context
└── index.md # Registry listing all contexts with descriptions
Built-in templates: The plugin ships with generation rule contexts in plan-harness/contexts/. On first use or when the user runs /plan-context init, these templates are copied to [workspace-root]/plans/.contexts/ where they can be customized.
Every context is a markdown file with YAML frontmatter:
---