bootstrap-project-documentation
Original:🇺🇸 English
Translated
Bootstrap or adapt project docs using project-documentation-template. Core goal - produce structured lifecycle documentation aligned with enterprise template. Initialize (empty) or Adjust (non-empty); repeatable; strict kebab-case naming.
2installs
Sourcenesnilnehc/ai-cortex
Added on
NPX Install
npx skill4agent add nesnilnehc/ai-cortex bootstrap-project-documentationTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →Skill: Bootstrap Project Documentation
Purpose
Bootstrap or adapt project documentation using the project-documentation-template structure. Two modes: Initialize (empty project—copy templates and fill placeholders) and Adjust (non-empty—use template as target, propose renames/moves/merges, apply in-place after confirmation). Supports repeatable runs; avoids empty dirs and template files unless requested; enforces strict kebab-case naming. Both modes follow conventions from the template's and .
llms.txtAGENTS.mdCore Objective
Primary Goal: Produce structured lifecycle documentation aligned with the enterprise template through mode-appropriate bootstrapping or adaptation.
Success Criteria (ALL must be met):
- ✅ Mode selected correctly: Initialize for empty projects, Adjust for non-empty projects (or user override applied)
- ✅ Template structure applied: Documentation follows project-documentation-template conventions for selected scale
- ✅ Placeholders filled: All placeholders replaced with project-specific content (or explicitly marked for later)
[...] - ✅ Naming conventions enforced: All paths use strict kebab-case; ADR files follow format
YYYYMMDD-slug-title.md - ✅ User confirmation obtained: In Adjust mode, changes applied only after user approval of recommendation list
Acceptance Test: Can a developer navigate the documentation structure and find lifecycle documents without consulting the template repository?
Scope Boundaries
This skill handles:
- Documentation structure bootstrapping (Initialize mode)
- Documentation structure adaptation (Adjust mode)
- Placeholder filling and validation
- Path naming standardization (kebab-case)
- ADR generation and indexing
This skill does NOT handle:
- README generation (use )
generate-standard-readme - AGENTS.md entry creation (use )
write-agents-entry - Skill-specific documentation (use )
refine-skill-design - Content writing beyond template placeholders (user provides domain content)
Handoff point: When documentation structure is established and placeholders filled, hand off to content authoring or project-specific documentation workflows.
Use Cases
- Empty project: Initialize a full docs skeleton by copying template subsets and filling placeholders for small/medium/large projects.
- Non-empty project: Use the template as target reference; analyze existing docs, propose renames/moves/merges to align structure and naming; apply in-place changes after user confirmation. Do not create empty dirs or template files unless requested. Can be run repeatedly.
- Shared workflows: Generate Architecture Decision Records (ADR), update version information across docs, validate placeholders and links.
- Iterative runs: Run the skill repeatedly to progressively organize and refine docs; each run builds on the current state without requiring a full reinit.
When to use: When a project needs structured lifecycle documentation aligned with the enterprise template, or when existing docs should be aligned with that structure.
Behavior
Mode Selection
First determine the execution mode. User override takes precedence; otherwise:
| Mode | Trigger | Behavior |
|---|---|---|
| Initialize | No | Copy subset, fill placeholders, create |
| Adjust | | Scan, compare, output recommendation list; apply after user confirmation |
Detection rules:
- No or
docs/is empty → Initializedocs/ - exists and has ≥1 valid
docs/file → Adjust.md - User explicitly specifies or
--mode=initialize→ use that mode--mode=adjust
Initialize Mode Steps
- Determine project scale: small, medium, or large (from user or context).
- Select the document subset from the template by scale:
- Small: Project Overview, Development Guide, User Guide
- Medium: + Architecture, Design, Requirements & Planning
- Large: + Process Management, Operations Guide, Compliance, Community & Contributing
- Fetch templates from (see Appendix) or use a local clone.
TEMPLATE_BASE_URL - Copy only selected docs to the project . Do not create empty directories or placeholder files unless the user explicitly requests them.
docs/ - Fill placeholders with project metadata (name, dates, tech stack) and prompt for missing critical data.
- Create a file (e.g.
VERSION) unless the user explicitly requests no new files.1.0.0 - Validate: no unreplaced placeholders, links valid, tables aligned.
Adjust Mode Steps
- Use project-documentation-template as the target reference for structure, conventions, and file/directory names.
- Scan existing docs under (structure, placeholders, links, versions).
docs/ - Compare to the template and identify gaps:
- Structure and path mismatches (nonstandard dir/file names)
- Documents alignable to template (rename, move, or merge)
- Unfilled placeholders, broken links, version inconsistencies
- Produce a recommendation list and present it to the user; ask for confirmation before applying.
- After confirmation, apply changes in-place to existing files. Do not create empty directories or add template files unless the user explicitly requests them.
- The skill is idempotent: it can be run repeatedly to iteratively organize and refine docs.
Conventions (from llms.txt)
- Placeholders: ,
[description],[option1/option2],YYYY-MM-DD[number] - Tables: Preserve column alignment; marks required fields
* - Version: Use SemVer; update version history at document bottom on changes
- References: Internal ; external
[Name](relative/path)number - Dates:
YYYY-MM-DD
File and directory naming (strict)
- Directories: only (e.g.
kebab-case,project-overview,development-guide)process-management - Files: with
kebab-caseextension (e.g..md,goals-and-vision.md)versioning-standards.md - ADR files: (e.g.
YYYYMMDD-slug-title.md)20250225-process-management-strategy.md - No spaces, underscores, or PascalCase; lowercase letters, digits, hyphens only.
Input & Output
Input
- Project metadata: Name, description, tech stack
- Scale: small | medium | large (optional; infer from context if absent)
- Mode override (optional): |
initializeadjust
Output
- Initialize: Filled docs under ,
docs/, and a short summary of created filesVERSION - Adjust: A recommendation list (markdown or structured), then—after confirmation—the applied changes and summary
Restrictions
Hard Boundaries
- Replace all placeholders before finalizing documents; do not leave etc. in final output unless explicitly deferred.
[description] - Do not add or keep broken internal links; verify relative paths.
- Use consistent dates () and SemVer for versions.
YYYY-MM-DD - In Adjust mode, do not apply changes without user confirmation.
- Do not remove structural elements (sections, tables) from templates without user approval.
- Do not create empty directories or add template files unless the user explicitly requests them.
- Use strict file and directory naming (kebab-case, ADR format ) when creating or renaming paths.
YYYYMMDD-title.md
Skill Boundaries (Avoid Overlap)
Do NOT do these (other skills handle them):
- README generation: Creating or updating README.md files → Use
generate-standard-readme - AGENTS.md entry creation: Writing or updating AGENTS.md files → Use
write-agents-entry - Skill documentation: Creating or refining SKILL.md files → Use
refine-skill-design - Content authoring: Writing domain-specific content beyond template placeholders → User provides content
When to stop and hand off:
- User says "structure is ready" or "placeholders filled" → Documentation structure complete, hand off to content authoring
- User asks "how do I write the content?" → Structure complete, hand off to domain experts or content workflows
- User asks "can you generate the README?" → Hand off to
generate-standard-readme - User asks "can you create AGENTS.md?" → Hand off to
write-agents-entry
Self-Check
Core Success Criteria (ALL must be met)
- Mode selected correctly: Initialize for empty projects, Adjust for non-empty projects (or user override applied)
- Template structure applied: Documentation follows project-documentation-template conventions for selected scale
- Placeholders filled: All placeholders replaced with project-specific content (or explicitly marked for later)
[...] - Naming conventions enforced: All paths use strict kebab-case; ADR files follow format
YYYYMMDD-slug-title.md - User confirmation obtained: In Adjust mode, changes applied only after user approval of recommendation list
Process Quality Checks
- Links validated: Do internal links resolve and do external links point to valid resources?
- Version consistency: Is the version consistent across and affected documents?
VERSION - Tables aligned: Is Markdown table alignment preserved?
- No extra dirs/files: Were empty dirs and template files avoided unless user requested them?
Acceptance Test
Can a developer navigate the documentation structure and find lifecycle documents without consulting the template repository?
If NO: Documentation structure is incomplete or unclear. Return to mode-specific steps.
If YES: Documentation structure is complete. Proceed to handoff.
Examples
Example 1: Initialize (Empty Project, Small Scale)
Context: New repo , no directory.
my-servicedocs/Steps: Agent selects Initialize; scale = small. Copies Project Overview, Development Guide, User Guide from template. Fills project name, dates, placeholder descriptions. Creates as . Outputs a summary of created files.
VERSION1.0.0Output snippet: , , , . All placeholders filled with project-specific content.
docs/project-overview/goals-and-vision.mddocs/development-guide/...docs/user-guide/...VERSIONExample 2: Adjust (Non-Empty Project)
Context: Repo has with (nonstandard paths). Some placeholders unfilled.
docs/project_overview/goals.mdSteps: Agent selects Adjust. Uses project-documentation-template as target. Produces recommendation list:
- Rename →
project_overview/,project-overview/→goals.md(kebab-case, match template)goals-and-vision.md - Unfilled placeholders in :
goals-and-vision.md,[project description][target date] - Broken link: (path does not exist)
../architecture/tech-stack.md
Agent presents the list and asks: "Apply these changes? (Y/n)". User confirms. Agent renames dirs/files, fixes placeholders and links in-place. No new empty dirs or template files created.
Example 3: Common Workflow—Generate ADR
Context: Any project; user needs an Architecture Decision Record.
Steps: Agent fetches from template. Determines next ADR number (e.g. ADR-001). Fills context, options, rationale, consequences with user input. Saves as (kebab-case slug) and updates the decision index if present.
docs/process-management/decisions/ADR-TEMPLATE.mddocs/process-management/decisions/YYYYMMDD-decision-title.mdAppendix: Output Contract
Initialize Mode
| Deliverable | Required |
|---|---|
| Yes |
| Yes (unless user explicitly requests no new files) |
| All placeholders replaced (or marked for later) | Yes |
| Version history table at document bottom | Per template |
Adjust Mode Recommendation List Format
| Section | Content |
|---|---|
| Target reference | project-documentation-template |
| Path/naming issues | Current path → recommended path (kebab-case, template alignment) |
| Alignable documents | Existing docs that can be renamed/moved/merged to match template |
| Unfilled placeholders | File path + placeholder text |
| Broken/outdated links | File path + link |
| Version issues | Conflicts or missing version refs |
Template Source
- TEMPLATE_BASE_URL (canonical):
https://raw.githubusercontent.com/nesnilnehc/project-documentation-template/main/ - Key files: ,
llms.txt,AGENTS.md,README.mddocs/ - If fetch fails (network unavailable): prompt the user to provide a local clone path or retry later; do not proceed with stale or missing templates.