Project Context Bootstrap
Create a compact, durable working model of a repo before the agent starts inventing one from guesswork.
Goal
Turn a repo with weak or missing agent-facing context into a repo with:
- a clear stack and structure summary;
- known commands and verification paths;
- durable context files or notes with real content;
- explicit approval before reorganizing existing docs.
Workflow
- Detect
- inspect project manifests, lockfiles, workspace layout, test commands, and major directories;
- detect whether context already exists:
AGENTS.md, docs/ai/, runbooks, plans, or other agent-facing docs.
- Study existing context first
- if the repo already has useful docs, read them before proposing replacements;
- separate what looks good, stale, missing, or conflicting.
- Ask
- have a real project-discovery conversation with the user;
- cover what the product is, who uses it, main features, risky areas, workflow conventions, and external dependencies;
- follow up until the project is actually understandable.
- Summarize
- restate your understanding in concise project language;
- confirm accuracy before writing or reorganizing context.
- Propose
- suggest the smallest useful context structure:
- top-level
AGENTS.md or compact startup doc;
docs/ai/architecture.md;
docs/ai/how-to-test.md;
- task-specific notes only if needed;
- ask before reorganizing or overwriting anything durable.
- Populate
- write real content from code and user input, not placeholders;
- include concrete commands, file paths, key modules, and current conventions.
- Validate
- verify the new context is small, accurate, and actually useful for the next session.
Existing Repo Rules
- Preserve good context; do not replace it with generic scans.
- Show what you want to keep, improve, and add before changing layout.
- Never silently move or delete user-written docs.
Compression Rules
- Keep startup context compact.
- Put deeper material behind explicit paths.
- Prefer one good entrypoint per topic instead of many tiny fragmented notes.
Final Report
Include what was detected, what was confirmed by the user, what context was added or updated, and what should be read first in the next session.
1---2name: project-context-bootstrap3description: Bootstrap usable project context before deep implementation work. Use when entering a new or unfamiliar repo, installing agent workflows into an existing codebase, auditing stale docs, or preparing a project for repeatable long-running agent work. Detect the stack, ask the user about the project, summarize understanding, propose compact context artifacts, and update only with approval.4license: MIT5---67# Project Context Bootstrap89Create a compact, durable working model of a repo before the agent starts inventing one from guesswork.1011## Goal1213Turn a repo with weak or missing agent-facing context into a repo with:1415- a clear stack and structure summary;16- known commands and verification paths;17- durable context files or notes with real content;18- explicit approval before reorganizing existing docs.1920## Workflow21221. **Detect**23 - inspect project manifests, lockfiles, workspace layout, test commands, and major directories;24 - detect whether context already exists: `AGENTS.md`, `docs/ai/`, runbooks, plans, or other agent-facing docs.252. **Study existing context first**26 - if the repo already has useful docs, read them before proposing replacements;27 - separate what looks good, stale, missing, or conflicting.283. **Ask**29 - have a real project-discovery conversation with the user;30 - cover what the product is, who uses it, main features, risky areas, workflow conventions, and external dependencies;31 - follow up until the project is actually understandable.324. **Summarize**33 - restate your understanding in concise project language;34 - confirm accuracy before writing or reorganizing context.355. **Propose**36 - suggest the smallest useful context structure:37 - top-level `AGENTS.md` or compact startup doc;38 - `docs/ai/architecture.md`;39 - `docs/ai/how-to-test.md`;40 - task-specific notes only if needed;41 - ask before reorganizing or overwriting anything durable.426. **Populate**43 - write real content from code and user input, not placeholders;44 - include concrete commands, file paths, key modules, and current conventions.457. **Validate**46 - verify the new context is small, accurate, and actually useful for the next session.4748## Existing Repo Rules4950- Preserve good context; do not replace it with generic scans.51- Show what you want to keep, improve, and add before changing layout.52- Never silently move or delete user-written docs.5354## Compression Rules5556- Keep startup context compact.57- Put deeper material behind explicit paths.58- Prefer one good entrypoint per topic instead of many tiny fragmented notes.5960## Final Report6162Include what was detected, what was confirmed by the user, what context was added or updated, and what should be read first in the next session.