Project Bootstrap
Performs initial project analysis when the AI coding protocols are first vendored into a project. Scans the codebase to detect the technology stack, architectural patterns, and key conventions, then generates an initial project-overview skill and an adapted blueprint.
When to Activate
- Right after
make ai installation into a new project
- When the agent first encounters an
.ai/ directory without project-specific skills
- When explicitly asked to bootstrap or initialize AI protocols for the project
Core Concepts
- Idempotent — checks for existing project skills before generating; never overwrites previous work
- Detection over assumption — scans actual project files rather than guessing based on directory names
- Minimal initial output — generates one project-overview skill and one blueprint; the
skill-generator skill handles ongoing growth
- Blueprint-aware — generates tool-specific configuration (CLAUDE.md or
.cursor/rules/) referencing relevant skills
Detailed Guidance
Guard Clause
Before running any analysis, check:
- Does
.ai/skills/project/ exist and contain at least one SKILL.md file?
- If yes → skip bootstrap. Inform the user that project-specific skills already exist and suggest using
skill-generator for new additions.
- If no → proceed with bootstrap.
Phase 1: Project Scan
Scan these files and directories to build a project profile:
| Source |
What to detect |
package.json |
Node.js/JS/TS project, framework (Next.js, Nuxt, Express, etc.), test runner (Jest, Vitest, Playwright), linter/formatter |
composer.json |
PHP project, framework (Laravel, Symfony), testing (PHPUnit, Pest), coding standards (PHP-CS-Fixer, PHPStan) |
pyproject.toml / requirements.txt |
Python project, framework (Django, FastAPI, Flask), testing (pytest), tools (ruff, mypy) |
go.mod |
Go project, major dependencies |
Cargo.toml |
Rust project, major crates |
Gemfile |
Ruby project, framework (Rails, Sinatra) |
| Top-level directories |
src/, app/, lib/, tests/, spec/, docs/, infra/, packages/ — architectural signals |
| Config files |
.eslintrc, tsconfig.json, phpstan.neon, .prettierrc, docker-compose.yml, Makefile, turbo.json — tooling signals |
| Monorepo indicators |
turbo.json, pnpm-workspace.yaml, lerna.json, packages/ — monorepo detection |
Phase 2: Pattern Detection
From the scan results, classify:
- Language(s): Primary and secondary
- Framework: Web framework, CLI framework, library, etc.
- Architecture: Monorepo, MVC, hexagonal/ports-and-adapters, serverless, microservices
- Testing setup: Runner, assertion style, coverage tool
- Code quality: Linter, formatter, static analysis
- Key directories: Where source, tests, config, and infrastructure live
Phase 3: Generate Project Overview Skill
Create .ai/skills/project/project-overview/SKILL.md with:
---
name: project-overview
version: 1.0.0
description: Project stack, conventions, and key file paths for {project-name}.
triggers: [project, overview, stack, conventions]
---
# Project Overview: {project-name}
## Stack
- **Language:** {detected}
- **Framework:** {detected}
- **Testing:** {detected}
- **Linting/Formatting:** {detected}
- **Architecture:** {detected}
## Key Directories
- `src/` — {purpose}
- `tests/` — {purpose}
- ...
## Conventions
- {detected conventions from config files and code patterns}
## Relevant Skills
- {list of generic skills from .ai/skills/ that match this stack}
Phase 4: Generate Blueprint
Generate a tool-specific blueprint based on the detected stack:
For Claude Code — suggest content for CLAUDE.md in the project root:
Follow the engineering standards vendored in ./.ai/skills/.
See ./.ai/blueprints/claude-cli.md for the operational protocol.
Project-specific conventions are in ./.ai/skills/project/.
For Cursor — generate rules in .cursor/rules/ (NOT .cursorrules, which is deprecated):
- Create
.cursor/rules/ai-protocols.mdc referencing vendored skills
- Include project-specific stack info from the generated overview
What NOT to Do
- Don't generate skills for standard language features — that's what the generic skills cover
- Don't guess at conventions that aren't evidenced by config files or code
- Don't generate multiple project skills — start with one overview, let
skill-generator handle the rest
- Don't modify any existing files outside
.ai/skills/project/ without user confirmation
Examples
Scenario: Bootstrap on a Next.js project with TypeScript, Vitest, and ESLint.
Detected profile:
- Language: TypeScript
- Framework: Next.js 14 (App Router)
- Testing: Vitest + Testing Library
- Linting: ESLint + Prettier
- Architecture: App Router with
src/app/, src/components/, src/lib/
Generated .ai/skills/project/project-overview/SKILL.md:
---
name: project-overview
version: 1.0.0
description: Next.js 14 App Router project with TypeScript, Vitest, and ESLint.
triggers: [project, overview, stack, conventions]
---
# Project Overview: my-nextjs-app
## Stack
- **Language:** TypeScript 5.x (strict mode)
- **Framework:** Next.js 14 (App Router)
- **Testing:** Vitest + @testing-library/react
- **Linting/Formatting:** ESLint (next/core-web-vitals) + Prettier
- **Architecture:** App Router — src/app/ for routes, src/components/ for UI, src/lib/ for utilities
## Key Directories
- `src/app/` — Next.js App Router pages and layouts
- `src/components/` — Reusable React components
- `src/lib/` — Shared utilities and helpers
- `tests/` — Vitest test files
## Relevant Skills
- `typescript-standard` — TypeScript conventions and TDD patterns
- `recursive-exploration` — Codebase navigation
- `code-review` — Review protocol
Guidelines
- Always check for existing project skills before generating — never overwrite
- Base all detections on actual files, not assumptions
- Generate exactly one project-overview skill and one blueprint suggestion
- Reference only generic skills that match the detected stack
- Place all generated skills in
.ai/skills/project/
- For Cursor, use
.cursor/rules/ (not .cursorrules)
- Don't modify files outside
.ai/skills/project/ without user confirmation
Integration
- Related:
skill-generator (handles ongoing skill creation after bootstrap)
- Related:
recursive-exploration (used during the scanning phase)
- Outputs: project-overview skill, blueprint suggestions
Skill Metadata
- Created: 2025-07-01
- Last Updated: 2025-07-01
- Author: didacrios
- Version: 1.0.0
1---2name: project-bootstrap-23description: Initial project analysis after vendoring — detects stack, conventions, and generates a project-overview skill.4---5
6# Project Bootstrap
7
8Performs initial project analysis when the AI coding protocols are first vendored into a project. Scans the codebase to detect the technology stack, architectural patterns, and key conventions, then generates an initial project-overview skill and an adapted blueprint.
9
10## When to Activate
11- Right after `make ai` installation into a new project
12- When the agent first encounters an `.ai/` directory without project-specific skills
13- When explicitly asked to bootstrap or initialize AI protocols for the project
14
15## Core Concepts
16- **Idempotent** — checks for existing project skills before generating; never overwrites previous work
17- **Detection over assumption** — scans actual project files rather than guessing based on directory names
18- **Minimal initial output** — generates one project-overview skill and one blueprint; the `skill-generator` skill handles ongoing growth
19- **Blueprint-aware** — generates tool-specific configuration (CLAUDE.md or `.cursor/rules/`) referencing relevant skills
20
21## Detailed Guidance
22
23### Guard Clause
24
25Before running any analysis, check:
26
271. Does `.ai/skills/project/` exist and contain at least one SKILL.md file?
282. If yes → **skip bootstrap**. Inform the user that project-specific skills already exist and suggest using `skill-generator` for new additions.
293. If no → proceed with bootstrap.
30
31### Phase 1: Project Scan
32
33Scan these files and directories to build a project profile:
34
35| Source | What to detect |
36|--------|---------------|
37| `package.json` | Node.js/JS/TS project, framework (Next.js, Nuxt, Express, etc.), test runner (Jest, Vitest, Playwright), linter/formatter |
38| `composer.json` | PHP project, framework (Laravel, Symfony), testing (PHPUnit, Pest), coding standards (PHP-CS-Fixer, PHPStan) |
39| `pyproject.toml` / `requirements.txt` | Python project, framework (Django, FastAPI, Flask), testing (pytest), tools (ruff, mypy) |
40| `go.mod` | Go project, major dependencies |
41| `Cargo.toml` | Rust project, major crates |
42| `Gemfile` | Ruby project, framework (Rails, Sinatra) |
43| Top-level directories | `src/`, `app/`, `lib/`, `tests/`, `spec/`, `docs/`, `infra/`, `packages/` — architectural signals |
44| Config files | `.eslintrc`, `tsconfig.json`, `phpstan.neon`, `.prettierrc`, `docker-compose.yml`, `Makefile`, `turbo.json` — tooling signals |
45| Monorepo indicators | `turbo.json`, `pnpm-workspace.yaml`, `lerna.json`, `packages/` — monorepo detection |
46
47### Phase 2: Pattern Detection
48
49From the scan results, classify:
50
51- **Language(s):** Primary and secondary
52- **Framework:** Web framework, CLI framework, library, etc.
53- **Architecture:** Monorepo, MVC, hexagonal/ports-and-adapters, serverless, microservices
54- **Testing setup:** Runner, assertion style, coverage tool
55- **Code quality:** Linter, formatter, static analysis
56- **Key directories:** Where source, tests, config, and infrastructure live
57
58### Phase 3: Generate Project Overview Skill
59
60Create `.ai/skills/project/project-overview/SKILL.md` with:
61
62```markdown
63---
64name: project-overview
65version: 1.0.0
66description: Project stack, conventions, and key file paths for {project-name}.
67triggers: [project, overview, stack, conventions]
68---
69
70# Project Overview: {project-name}
71
72## Stack
73- **Language:** {detected}
74- **Framework:** {detected}
75- **Testing:** {detected}
76- **Linting/Formatting:** {detected}
77- **Architecture:** {detected}
78
79## Key Directories
80- `src/` — {purpose}
81- `tests/` — {purpose}
82- ...
83
84## Conventions
85- {detected conventions from config files and code patterns}
86
87## Relevant Skills
88- {list of generic skills from .ai/skills/ that match this stack}
89```
90
91### Phase 4: Generate Blueprint
92
93Generate a tool-specific blueprint based on the detected stack:
94
95**For Claude Code** — suggest content for `CLAUDE.md` in the project root:
96
97```markdown
98Follow the engineering standards vendored in ./.ai/skills/.
99See ./.ai/blueprints/claude-cli.md for the operational protocol.
100
101Project-specific conventions are in ./.ai/skills/project/.
102```
103
104**For Cursor** — generate rules in `.cursor/rules/` (NOT `.cursorrules`, which is deprecated):
105
106- Create `.cursor/rules/ai-protocols.mdc` referencing vendored skills
107- Include project-specific stack info from the generated overview
108
109### What NOT to Do
110
111- Don't generate skills for standard language features — that's what the generic skills cover
112- Don't guess at conventions that aren't evidenced by config files or code
113- Don't generate multiple project skills — start with one overview, let `skill-generator` handle the rest
114- Don't modify any existing files outside `.ai/skills/project/` without user confirmation
115
116## Examples
117
118**Scenario:** Bootstrap on a Next.js project with TypeScript, Vitest, and ESLint.
119
120**Detected profile:**
121- Language: TypeScript
122- Framework: Next.js 14 (App Router)
123- Testing: Vitest + Testing Library
124- Linting: ESLint + Prettier
125- Architecture: App Router with `src/app/`, `src/components/`, `src/lib/`
126
127**Generated `.ai/skills/project/project-overview/SKILL.md`:**
128```markdown
129---
130name: project-overview
131version: 1.0.0
132description: Next.js 14 App Router project with TypeScript, Vitest, and ESLint.
133triggers: [project, overview, stack, conventions]
134---
135
136# Project Overview: my-nextjs-app
137
138## Stack
139- **Language:** TypeScript 5.x (strict mode)
140- **Framework:** Next.js 14 (App Router)
141- **Testing:** Vitest + @testing-library/react
142- **Linting/Formatting:** ESLint (next/core-web-vitals) + Prettier
143- **Architecture:** App Router — src/app/ for routes, src/components/ for UI, src/lib/ for utilities
144
145## Key Directories
146- `src/app/` — Next.js App Router pages and layouts
147- `src/components/` — Reusable React components
148- `src/lib/` — Shared utilities and helpers
149- `tests/` — Vitest test files
150
151## Relevant Skills
152- `typescript-standard` — TypeScript conventions and TDD patterns
153- `recursive-exploration` — Codebase navigation
154- `code-review` — Review protocol
155```
156
157## Guidelines
1581. Always check for existing project skills before generating — never overwrite
1592. Base all detections on actual files, not assumptions
1603. Generate exactly one project-overview skill and one blueprint suggestion
1614. Reference only generic skills that match the detected stack
1625. Place all generated skills in `.ai/skills/project/`
1636. For Cursor, use `.cursor/rules/` (not `.cursorrules`)
1647. Don't modify files outside `.ai/skills/project/` without user confirmation
165
166## Integration
167- Related: `skill-generator` (handles ongoing skill creation after bootstrap)
168- Related: `recursive-exploration` (used during the scanning phase)
169- Outputs: project-overview skill, blueprint suggestions
170
171## Skill Metadata
172- Created: 2025-07-01
173- Last Updated: 2025-07-01
174- Author: didacrios
175- Version: 1.0.0