Create or update the project context document at ./{ARTIFACT_MAIN_FOLDER}/context.md.
This file is the single source of truth read by every other mini-SDD skill. It merges product vision, architecture overview, and tech stack into one concise document.
Hook execution
Check ./{ARTIFACT_MAIN_FOLDER}/mini-sdd.config.yml for hooks.context.pre and hooks.context.post entries. Run pre-hooks before the Entry point; run post-hooks after the full workflow completes. See references/hooks.md for the full execution rules.
Entry point
- Check whether
./{ARTIFACT_MAIN_FOLDER}/context.md already exists.
- If it exists → read it, show a summary to the user, and ask:
"The project context already exists. Do you want to update it or start fresh (overwrite)?"
- Update → proceed to Step 2 — Update flow
- Start fresh → proceed to Step 1 — Creation flow
- If it does not exist → proceed to Step 1 — Creation flow
Step 1 — Creation flow
1a. Codebase reconnaissance
Inspect the project to gather as much context as possible before asking questions.
Read and parse (skip missing files silently):
README.md at project root
package.json / Cargo.toml / pyproject.toml / go.mod / build manifests
AGENTS.md, CONTRIBUTING.md, docs/
- CI/CD config (
.github/workflows/, Dockerfile, docker-compose.yml)
- Source structure (
src/, app/, lib/, server/, api/)
Derive:
- Project type (web app, API, CLI, library, monorepo, etc.)
- Tech stack (languages, frameworks, databases, test runners, build tools)
- Entry points
- UI presence (yes/no, which framework)
- Test setup
Present a short summary:
📋 Reconnaissance
Project: <name>
Type: <type>
Stack: <languages>, <frameworks>, <database>
UI: <yes — framework / no>
Tests: <yes — runner / no>
Ask: "Does this look correct? Anything to add or fix?"
1b. Targeted questions
Ask the following in a single numbered message so the user can answer all at once:
- What does this project do? — One or two sentences describing the product/tool and who it's for.
- Key features — List the main capabilities or modules.
- Architecture style — Monolith, microservices, serverless, CLI, etc.
- Non-functional requirements — Performance targets, security constraints, compliance needs (if any).
- Current status — What's already built vs. what's planned?
Skip any question already answered by the reconnaissance.
1c. Generate context.md
Read the template from assets/context.template.md and fill it in using the gathered information.
- Write the file to
./{ARTIFACT_MAIN_FOLDER}/context.md
- Set
Last updated to today's date (YYYY-MM-DD)
- Confirm to the user:
"✅ Created ./{ARTIFACT_MAIN_FOLDER}/context.md. You can review and edit it manually anytime."
Step 2 — Update flow
Use this flow when the context file already exists and the user chose to update it.
- Read the current
./{ARTIFACT_MAIN_FOLDER}/context.md.
- Ask the user:
"What changed? For example: new feature completed, tech stack change, architecture update, status change."
- Based on the answer, update only the relevant sections of
context.md.
- Update the
Last updated date to today (YYYY-MM-DD).
- Show a diff summary of what changed.
- Confirm:
"✅ Updated ./{ARTIFACT_MAIN_FOLDER}/context.md."
Output rules
{SKILL_ASSETS_NOTICE}
- Keep the document concise — aim for a single page that an AI agent can quickly consume.
- Use the structure from the template; do not invent new sections.
- Write in plain English, no marketing language.
- If the user provides vague answers, ask one follow-up, then proceed with best effort and note assumptions.
Error handling
- File not writable / path missing: Create parent directories as needed before writing
context.md.
- User provides no answers: Proceed with information gathered from reconnaissance and mark unknown fields as
<!-- unknown — update manually -->.
- Codebase reconnaissance finds nothing: Skip the summary step and go directly to targeted questions.
- Conflicting information: Surface the conflict to the user and ask for clarification before writing.
1---2name: mini-sdd-context3description: Create or update the project context document that captures product vision, architecture, and tech stack in a single file. Use when bootstrapping a new project with mini-SDD, onboarding AI agents to an existing codebase, or updating project context after completing a feature. Do not use for writing feature specs or implementing code.4---56Create or update the project context document at `./{ARTIFACT_MAIN_FOLDER}/context.md`.78This file is the single source of truth read by every other mini-SDD skill. It merges product vision, architecture overview, and tech stack into one concise document.910---1112## Hook execution1314Check `./{ARTIFACT_MAIN_FOLDER}/mini-sdd.config.yml` for `hooks.context.pre` and `hooks.context.post` entries. Run pre-hooks before the Entry point; run post-hooks after the full workflow completes. See [references/hooks.md](./references/hooks.md) for the full execution rules.1516---1718## Entry point19201. Check whether `./{ARTIFACT_MAIN_FOLDER}/context.md` already exists.21 - **If it exists** → read it, show a summary to the user, and ask:22 > "The project context already exists. Do you want to **update** it or **start fresh** (overwrite)?"23 - **Update** → proceed to **Step 2 — Update flow**24 - **Start fresh** → proceed to **Step 1 — Creation flow**25 - **If it does not exist** → proceed to **Step 1 — Creation flow**2627---2829## Step 1 — Creation flow3031### 1a. Codebase reconnaissance3233Inspect the project to gather as much context as possible before asking questions.3435**Read and parse** (skip missing files silently):36- `README.md` at project root37- `package.json` / `Cargo.toml` / `pyproject.toml` / `go.mod` / build manifests38- `AGENTS.md`, `CONTRIBUTING.md`, `docs/`39- CI/CD config (`.github/workflows/`, `Dockerfile`, `docker-compose.yml`)40- Source structure (`src/`, `app/`, `lib/`, `server/`, `api/`)4142**Derive**:43- Project type (web app, API, CLI, library, monorepo, etc.)44- Tech stack (languages, frameworks, databases, test runners, build tools)45- Entry points46- UI presence (yes/no, which framework)47- Test setup4849Present a short summary:5051```52📋 Reconnaissance5354Project: <name>55Type: <type>56Stack: <languages>, <frameworks>, <database>57UI: <yes — framework / no>58Tests: <yes — runner / no>59```6061Ask: _"Does this look correct? Anything to add or fix?"_6263### 1b. Targeted questions6465Ask the following in a **single numbered message** so the user can answer all at once:66671. **What does this project do?** — One or two sentences describing the product/tool and who it's for.682. **Key features** — List the main capabilities or modules.693. **Architecture style** — Monolith, microservices, serverless, CLI, etc.704. **Non-functional requirements** — Performance targets, security constraints, compliance needs (if any).715. **Current status** — What's already built vs. what's planned?7273Skip any question already answered by the reconnaissance.7475### 1c. Generate context.md7677Read the template from `assets/context.template.md` and fill it in using the gathered information.7879- Write the file to `./{ARTIFACT_MAIN_FOLDER}/context.md`80- Set `Last updated` to today's date (`YYYY-MM-DD`)81- Confirm to the user:82 > "✅ Created `./{ARTIFACT_MAIN_FOLDER}/context.md`. You can review and edit it manually anytime."8384---8586## Step 2 — Update flow8788Use this flow when the context file already exists and the user chose to update it.89901. Read the current `./{ARTIFACT_MAIN_FOLDER}/context.md`.912. Ask the user:92 > "What changed? For example: new feature completed, tech stack change, architecture update, status change."933. Based on the answer, update only the relevant sections of `context.md`.944. Update the `Last updated` date to today (`YYYY-MM-DD`).955. Show a diff summary of what changed.966. Confirm:97 > "✅ Updated `./{ARTIFACT_MAIN_FOLDER}/context.md`."9899---100101## Output rules102103{SKILL_ASSETS_NOTICE}104- Keep the document **concise** — aim for a single page that an AI agent can quickly consume.105- Use the structure from the template; do not invent new sections.106- Write in plain English, no marketing language.107- If the user provides vague answers, ask one follow-up, then proceed with best effort and note assumptions.108109## Error handling110111- **File not writable / path missing**: Create parent directories as needed before writing `context.md`.112- **User provides no answers**: Proceed with information gathered from reconnaissance and mark unknown fields as `<!-- unknown — update manually -->`.113- **Codebase reconnaissance finds nothing**: Skip the summary step and go directly to targeted questions.114- **Conflicting information**: Surface the conflict to the user and ask for clarification before writing.