Project Documentation
End-to-end documentation lifecycle for PHP/Laravel and Node/TypeScript/React projects. Contains 25 rules across 6 categories covering folder structure, naming conventions, essential files, content quality (including AI-slop detection), cleanup of accumulated junk, and lifecycle. Supports bootstrap mode (set up docs in a new project), audit mode (find what's missing, stale, bloated, or junk), and reference mode (conventions lookup).
Metadata
- Version: 1.0.0
- Scope: PHP / Laravel + Node / TypeScript / React projects
- Rule Count: 25 rules across 6 categories
- License: MIT
How to Use This Skill — Three Modes
Mode 1: Bootstrap (new project / missing docs)
When the user asks "set up docs", "what docs does this project need", or starts a new project — walk through the bootstrap steps:
- Detect project type (Laravel? React? Both?) —
composer.json, package.json, artisan binary
- Inventory existing docs — list every
.md file with its location and last-modified date
- Identify gaps — compare against the Essential Files checklist; report what's missing
- Propose folder structure —
docs/ with sub-folders (architecture/, adr/, guides/, runbooks/, archive/) based on project size
- Offer to scaffold templates — README, CHANGELOG, LICENSE, CONTRIBUTING, SECURITY, ADR-0001 — generate with user approval, do not auto-create
- Suggest CI gates — markdown-lint, broken-link checker (lychee), CHANGELOG-on-PR enforcement
Mode 2: Audit (existing project cleanup)
When the user asks "audit docs", "clean up markdown", or "what should I delete" — produce a classified ledger.
For each .md file in the repo:
- KEEP — file is essential and current
- UPDATE — file is essential but stale (e.g., README contradicts current setup)
- ARCHIVE — superseded but historically useful — move to
docs/archive/<year>/
- DELETE — AI-generated plan files, empty stubs, duplicates, orphaned drafts
- MOVE — wrong location or wrong name (e.g.,
MyArchitectureNotes.md at root → docs/architecture/overview.md)
Output format:
## Documentation Audit Ledger
| File | Last modified | Verdict | Reason | Action |
|------|---------------|---------|--------|--------|
| PLAN.md | 2026-02-14 | DELETE | AI-generated plan, no longer referenced | rm PLAN.md |
| README.md | 2024-08-01 | UPDATE | Setup steps reference removed Vite v3 | Update install section |
| docs/old-architecture.md | 2024-11 | ARCHIVE | Superseded by docs/architecture/overview.md | mv to docs/archive/2024/ |
| MyNotes.md | 2025-09 | DELETE | Personal notes; not project docs | rm MyNotes.md |
## Summary
- KEEP: X files
- UPDATE: Y files (top priority: ...)
- ARCHIVE: Z files
- DELETE: N files
- MOVE: M files
Never auto-delete. Always surface for user approval first.
Mode 3: Reference (conventions lookup)
When the user asks "how should I name this", "where should this go", or references the skill in a code-review context — look up the relevant rule(s) in rules/.
When to Apply
Reference this skill when:
- Starting a new Laravel or Node/React project and need a docs baseline
- Onboarding a project with messy or AI-cluttered markdown files
- Setting up
docs/ folder structure
- Naming a new doc file
- Deciding whether to delete a
PLAN.md / TODO.md / IMPLEMENTATION-SUMMARY.md
- Adding CI checks for markdown quality
- Reviewing a PR that adds or modifies documentation
- Quarterly "docs hygiene" sweep
Step 1: Detect Project Type
Always check the project stack before recommending specifics. Bootstrap and naming guidance differ slightly per stack.
| Signal |
Project Type |
Notes |
composer.json + artisan |
Laravel (PHP) |
README should cover composer install, php artisan migrate, .env.example |
package.json (only) |
Node / TypeScript / React |
README should cover npm install, .nvmrc, build scripts |
| Both present |
Laravel + Inertia + React |
README covers both PHP and Node setup paths |
The rules themselves are mostly stack-agnostic — README format, ADR structure, naming conventions apply to any project.
Rule Categories by Priority
| Priority |
Category |
Impact |
Prefix |
| 1 |
Structure |
CRITICAL |
structure- |
| 2 |
Naming |
CRITICAL |
naming- |
| 3 |
Essential Files |
HIGH |
essential- |
| 4 |
Quality |
HIGH |
quality- |
| 5 |
Cleanup |
HIGH |
cleanup- |
| 6 |
Lifecycle |
MEDIUM |
lifecycle- |
Quick Reference
1. Structure (CRITICAL)
structure-root-files — Which files belong at the repo root (README, CHANGELOG, LICENSE, etc.)
structure-docs-folder — docs/ as the home for everything beyond root files
structure-subfolders — Recommended docs/ layout: architecture/, adr/, guides/, runbooks/, archive/
2. Naming (CRITICAL)
naming-root-files — UPPERCASE.md for conventional root files
naming-docs-files — kebab-case.md for files under docs/
naming-adr-files — Numbered prefix: 0001-record-architecture-decisions.md
naming-anti-patterns — No dates, no MyNotes.md, no tmp/draft/final markers
3. Essential Files (HIGH)
essential-readme — Every project needs a README with purpose, install, usage, license
essential-changelog — Keep-a-Changelog format; one entry per release
essential-license — LICENSE file (or LICENSE.md) at repo root
essential-contributing — CONTRIBUTING.md when accepting external contributors
essential-security — SECURITY.md with vulnerability reporting policy
4. Quality (HIGH)
quality-conciseness — Cut bloat; length is a cost, not a virtue
quality-ai-slop — Detect AI-generated content patterns (filler, sign-offs, generic praise)
quality-headings — One H1, no skipped levels, descriptive heading text
quality-code-blocks — Language tags, copy-pasteable commands, no untagged blocks
quality-links — Descriptive link text (not "click here"), relative paths, no broken links
5. Cleanup (HIGH)
cleanup-ai-junk — Detect and remove AI-generated plan/summary files
cleanup-duplicates — Same content in multiple files; consolidate or delete copies
cleanup-orphans — .md files not linked from anywhere; archive or delete
cleanup-empty-stubs — Files with TBD / TODO / placeholder content only
6. Lifecycle (MEDIUM)
lifecycle-freshness — "Last verified" dates on architecture docs
lifecycle-archive — Superseded docs go to docs/archive/<year>/
lifecycle-adr-process — ADR creation triggers and lifecycle (proposed → accepted → superseded)
lifecycle-changelog-discipline — Add a CHANGELOG entry in the same PR as the change
Essential Patterns
Standard folder layout
.
├── README.md # required
├── CHANGELOG.md # required from first release
├── LICENSE # required
├── CONTRIBUTING.md # if external contributors
├── SECURITY.md # if internet-facing
├── CODE_OF_CONDUCT.md # if open source community
├── .github/
│ └── CODEOWNERS # team ownership
└── docs/
├── architecture/
│ ├── overview.md
│ └── data-model.md
├── adr/
│ ├── 0001-record-architecture-decisions.md
│ ├── 0002-choose-mysql-over-postgres.md
│ └── 0003-adopt-inertia-for-spa.md
├── guides/
│ ├── getting-started.md
│ ├── deployment.md
│ └── local-development.md
├── runbooks/
│ ├── deploy-production.md
│ └── incident-response.md
└── archive/
└── 2024/
└── old-architecture-notes.md
File naming at a glance
✓ README.md, CHANGELOG.md, LICENSE, CONTRIBUTING.md, SECURITY.md
✓ docs/architecture/overview.md
✓ docs/adr/0007-cache-strategy.md
✓ docs/guides/deployment.md
✓ docs/archive/2024/q3-launch-plan.md
✗ Readme.md, Changelog.md (use UPPERCASE for conventional root files)
✗ docs/Architecture/Overview.md (use kebab-case in docs/)
✗ docs/Notes-2025-09-14.md (no dates in filenames)
✗ MyArchitectureThoughts.md (no first-person, no PascalCase)
✗ PLAN.md, TODO.md, TEMP.md (use issue tracker for transient state)
✗ FINAL-deployment-guide-v2.md (no draft/final/v2 markers)
CI: keep markdown honest
# .github/workflows/docs.yml
- name: Lint markdown
uses: DavidAnson/markdownlint-cli2-action@v23
- name: Check links
uses: lycheeverse/lychee-action@v2
with:
args: --no-progress --exclude-mail './**/*.md'
How to Use
Read individual rule files for detailed conventions and examples:
rules/structure-root-files.md
rules/naming-adr-files.md
rules/essential-readme.md
rules/cleanup-ai-junk.md
rules/lifecycle-archive.md
Each rule file contains:
- YAML frontmatter with metadata (title, impact, tags)
- Brief explanation of why it matters
- Incorrect example (anti-pattern)
- Correct example (the convention)
- Detection / enforcement guidance where applicable
References
Full Compiled Document
For the complete guide with all rules expanded: AGENTS.md
1---2name: project-docs3description: Project documentation lifecycle for PHP/Laravel and Node/TypeScript/React projects — bootstrapping essential docs, naming and folder conventions, freshness, and cleanup of AI-generated junk and stale files. Use when starting a new project, setting up docs/ structure, auditing markdown files, cleaning up the docs folder, or deciding which docs to keep, archive, or delete. Triggers on "set up docs", "audit docs", "clean up markdown", "what docs does this project need", "organize docs folder", "find stale docs".4license: MIT5---67# Project Documentation89End-to-end documentation lifecycle for PHP/Laravel and Node/TypeScript/React projects. Contains 25 rules across 6 categories covering folder structure, naming conventions, essential files, content quality (including AI-slop detection), cleanup of accumulated junk, and lifecycle. Supports **bootstrap mode** (set up docs in a new project), **audit mode** (find what's missing, stale, bloated, or junk), and **reference mode** (conventions lookup).1011## Metadata1213- **Version:** 1.0.014- **Scope:** PHP / Laravel + Node / TypeScript / React projects15- **Rule Count:** 25 rules across 6 categories16- **License:** MIT1718## How to Use This Skill — Three Modes1920### Mode 1: Bootstrap (new project / missing docs)2122When the user asks "set up docs", "what docs does this project need", or starts a new project — walk through the bootstrap steps:23241. **Detect project type** (Laravel? React? Both?) — `composer.json`, `package.json`, `artisan` binary252. **Inventory existing docs** — list every `.md` file with its location and last-modified date263. **Identify gaps** — compare against the Essential Files checklist; report what's missing274. **Propose folder structure** — `docs/` with sub-folders (`architecture/`, `adr/`, `guides/`, `runbooks/`, `archive/`) based on project size285. **Offer to scaffold templates** — README, CHANGELOG, LICENSE, CONTRIBUTING, SECURITY, ADR-0001 — generate with user approval, do not auto-create296. **Suggest CI gates** — markdown-lint, broken-link checker (lychee), CHANGELOG-on-PR enforcement3031### Mode 2: Audit (existing project cleanup)3233When the user asks "audit docs", "clean up markdown", or "what should I delete" — produce a classified ledger.3435For each `.md` file in the repo:36- **KEEP** — file is essential and current37- **UPDATE** — file is essential but stale (e.g., README contradicts current setup)38- **ARCHIVE** — superseded but historically useful — move to `docs/archive/<year>/`39- **DELETE** — AI-generated plan files, empty stubs, duplicates, orphaned drafts40- **MOVE** — wrong location or wrong name (e.g., `MyArchitectureNotes.md` at root → `docs/architecture/overview.md`)4142Output format:43```44## Documentation Audit Ledger4546| File | Last modified | Verdict | Reason | Action |47|------|---------------|---------|--------|--------|48| PLAN.md | 2026-02-14 | DELETE | AI-generated plan, no longer referenced | rm PLAN.md |49| README.md | 2024-08-01 | UPDATE | Setup steps reference removed Vite v3 | Update install section |50| docs/old-architecture.md | 2024-11 | ARCHIVE | Superseded by docs/architecture/overview.md | mv to docs/archive/2024/ |51| MyNotes.md | 2025-09 | DELETE | Personal notes; not project docs | rm MyNotes.md |5253## Summary54- KEEP: X files55- UPDATE: Y files (top priority: ...)56- ARCHIVE: Z files57- DELETE: N files58- MOVE: M files59```6061**Never auto-delete.** Always surface for user approval first.6263### Mode 3: Reference (conventions lookup)6465When the user asks "how should I name this", "where should this go", or references the skill in a code-review context — look up the relevant rule(s) in `rules/`.6667## When to Apply6869Reference this skill when:70- Starting a new Laravel or Node/React project and need a docs baseline71- Onboarding a project with messy or AI-cluttered markdown files72- Setting up `docs/` folder structure73- Naming a new doc file74- Deciding whether to delete a `PLAN.md` / `TODO.md` / `IMPLEMENTATION-SUMMARY.md`75- Adding CI checks for markdown quality76- Reviewing a PR that adds or modifies documentation77- Quarterly "docs hygiene" sweep7879## Step 1: Detect Project Type8081**Always check the project stack before recommending specifics.** Bootstrap and naming guidance differ slightly per stack.8283| Signal | Project Type | Notes |84|--------|--------------|-------|85| `composer.json` + `artisan` | Laravel (PHP) | README should cover `composer install`, `php artisan migrate`, `.env.example` |86| `package.json` (only) | Node / TypeScript / React | README should cover `npm install`, `.nvmrc`, build scripts |87| Both present | Laravel + Inertia + React | README covers both PHP and Node setup paths |8889The rules themselves are mostly stack-agnostic — README format, ADR structure, naming conventions apply to any project.9091## Rule Categories by Priority9293| Priority | Category | Impact | Prefix |94|----------|----------|--------|--------|95| 1 | Structure | CRITICAL | `structure-` |96| 2 | Naming | CRITICAL | `naming-` |97| 3 | Essential Files | HIGH | `essential-` |98| 4 | Quality | HIGH | `quality-` |99| 5 | Cleanup | HIGH | `cleanup-` |100| 6 | Lifecycle | MEDIUM | `lifecycle-` |101102## Quick Reference103104### 1. Structure (CRITICAL)105106- `structure-root-files` — Which files belong at the repo root (README, CHANGELOG, LICENSE, etc.)107- `structure-docs-folder` — `docs/` as the home for everything beyond root files108- `structure-subfolders` — Recommended `docs/` layout: architecture/, adr/, guides/, runbooks/, archive/109110### 2. Naming (CRITICAL)111112- `naming-root-files` — `UPPERCASE.md` for conventional root files113- `naming-docs-files` — `kebab-case.md` for files under `docs/`114- `naming-adr-files` — Numbered prefix: `0001-record-architecture-decisions.md`115- `naming-anti-patterns` — No dates, no `MyNotes.md`, no `tmp/draft/final` markers116117### 3. Essential Files (HIGH)118119- `essential-readme` — Every project needs a README with purpose, install, usage, license120- `essential-changelog` — Keep-a-Changelog format; one entry per release121- `essential-license` — `LICENSE` file (or `LICENSE.md`) at repo root122- `essential-contributing` — `CONTRIBUTING.md` when accepting external contributors123- `essential-security` — `SECURITY.md` with vulnerability reporting policy124125### 4. Quality (HIGH)126127- `quality-conciseness` — Cut bloat; length is a cost, not a virtue128- `quality-ai-slop` — Detect AI-generated content patterns (filler, sign-offs, generic praise)129- `quality-headings` — One H1, no skipped levels, descriptive heading text130- `quality-code-blocks` — Language tags, copy-pasteable commands, no untagged blocks131- `quality-links` — Descriptive link text (not "click here"), relative paths, no broken links132133### 5. Cleanup (HIGH)134135- `cleanup-ai-junk` — Detect and remove AI-generated plan/summary files136- `cleanup-duplicates` — Same content in multiple files; consolidate or delete copies137- `cleanup-orphans` — `.md` files not linked from anywhere; archive or delete138- `cleanup-empty-stubs` — Files with TBD / TODO / placeholder content only139140### 6. Lifecycle (MEDIUM)141142- `lifecycle-freshness` — "Last verified" dates on architecture docs143- `lifecycle-archive` — Superseded docs go to `docs/archive/<year>/`144- `lifecycle-adr-process` — ADR creation triggers and lifecycle (proposed → accepted → superseded)145- `lifecycle-changelog-discipline` — Add a CHANGELOG entry in the same PR as the change146147## Essential Patterns148149### Standard folder layout150151```152.153├── README.md # required154├── CHANGELOG.md # required from first release155├── LICENSE # required156├── CONTRIBUTING.md # if external contributors157├── SECURITY.md # if internet-facing158├── CODE_OF_CONDUCT.md # if open source community159├── .github/160│ └── CODEOWNERS # team ownership161└── docs/162 ├── architecture/163 │ ├── overview.md164 │ └── data-model.md165 ├── adr/166 │ ├── 0001-record-architecture-decisions.md167 │ ├── 0002-choose-mysql-over-postgres.md168 │ └── 0003-adopt-inertia-for-spa.md169 ├── guides/170 │ ├── getting-started.md171 │ ├── deployment.md172 │ └── local-development.md173 ├── runbooks/174 │ ├── deploy-production.md175 │ └── incident-response.md176 └── archive/177 └── 2024/178 └── old-architecture-notes.md179```180181### File naming at a glance182183```184✓ README.md, CHANGELOG.md, LICENSE, CONTRIBUTING.md, SECURITY.md185✓ docs/architecture/overview.md186✓ docs/adr/0007-cache-strategy.md187✓ docs/guides/deployment.md188✓ docs/archive/2024/q3-launch-plan.md189190✗ Readme.md, Changelog.md (use UPPERCASE for conventional root files)191✗ docs/Architecture/Overview.md (use kebab-case in docs/)192✗ docs/Notes-2025-09-14.md (no dates in filenames)193✗ MyArchitectureThoughts.md (no first-person, no PascalCase)194✗ PLAN.md, TODO.md, TEMP.md (use issue tracker for transient state)195✗ FINAL-deployment-guide-v2.md (no draft/final/v2 markers)196```197198### CI: keep markdown honest199200```yaml201# .github/workflows/docs.yml202- name: Lint markdown203 uses: DavidAnson/markdownlint-cli2-action@v23204205- name: Check links206 uses: lycheeverse/lychee-action@v2207 with:208 args: --no-progress --exclude-mail './**/*.md'209```210211## How to Use212213Read individual rule files for detailed conventions and examples:214215```216rules/structure-root-files.md217rules/naming-adr-files.md218rules/essential-readme.md219rules/cleanup-ai-junk.md220rules/lifecycle-archive.md221```222223Each rule file contains:224- YAML frontmatter with metadata (title, impact, tags)225- Brief explanation of why it matters226- Incorrect example (anti-pattern)227- Correct example (the convention)228- Detection / enforcement guidance where applicable229230## References231232- [Keep a Changelog](https://keepachangelog.com/)233- [Semantic Versioning](https://semver.org/)234- [Architecture Decision Records (ADR)](https://adr.github.io/)235- [Diátaxis — documentation framework](https://diataxis.fr/)236- [Choose a License](https://choosealicense.com/)237- [Markdownlint](https://github.com/DavidAnson/markdownlint)238- [Lychee — link checker](https://github.com/lycheeverse/lychee)239240## Full Compiled Document241242For the complete guide with all rules expanded: `AGENTS.md`