Initial commit
This commit is contained in:
215
skills/git-commit-helper/SKILL.md
Normal file
215
skills/git-commit-helper/SKILL.md
Normal file
@@ -0,0 +1,215 @@
|
||||
---
|
||||
name: Git Commit Helper
|
||||
description: Generate descriptive commit messages by analyzing git diffs. Use when the user asks for help writing commit messages or reviewing staged changes.
|
||||
---
|
||||
|
||||
# Git Commit Helper
|
||||
|
||||
## Quick start
|
||||
|
||||
Analyze staged changes and generate commit message:
|
||||
|
||||
```bash
|
||||
# View staged changes
|
||||
git diff --staged
|
||||
|
||||
# Generate commit message based on changes
|
||||
# (Claude will analyze the diff and suggest a message)
|
||||
```
|
||||
|
||||
## Commit message format
|
||||
|
||||
Follow conventional commits format:
|
||||
|
||||
```
|
||||
<type>(<scope>): <description>
|
||||
|
||||
[optional body]
|
||||
|
||||
[optional footer]
|
||||
```
|
||||
|
||||
### Types
|
||||
|
||||
- **feat**: New feature
|
||||
- **fix**: Bug fix
|
||||
- **docs**: Documentation changes
|
||||
- **style**: Code style changes (formatting, missing semicolons)
|
||||
- **refactor**: Code refactoring
|
||||
- **test**: Adding or updating tests
|
||||
- **chore**: Maintenance tasks
|
||||
|
||||
### Examples
|
||||
|
||||
**Feature commit:**
|
||||
|
||||
```
|
||||
feat(auth): add JWT authentication
|
||||
|
||||
Implement JWT-based authentication system with:
|
||||
- Login endpoint with token generation
|
||||
- Token validation middleware
|
||||
- Refresh token support
|
||||
```
|
||||
|
||||
**Bug fix:**
|
||||
|
||||
```
|
||||
fix(api): handle null values in user profile
|
||||
|
||||
Prevent crashes when user profile fields are null.
|
||||
Add null checks before accessing nested properties.
|
||||
```
|
||||
|
||||
**Refactor:**
|
||||
|
||||
```
|
||||
refactor(database): simplify query builder
|
||||
|
||||
Extract common query patterns into reusable functions.
|
||||
Reduce code duplication in database layer.
|
||||
```
|
||||
|
||||
## Analyzing changes
|
||||
|
||||
Review what's being committed:
|
||||
|
||||
```bash
|
||||
# Show files changed
|
||||
git status
|
||||
|
||||
# Show detailed changes
|
||||
git diff --staged
|
||||
|
||||
# Show statistics
|
||||
git diff --staged --stat
|
||||
|
||||
# Show changes for specific file
|
||||
git diff --staged path/to/file
|
||||
```
|
||||
|
||||
## Commit message guidelines
|
||||
|
||||
**DO:**
|
||||
|
||||
- Use imperative mood ("add feature" not "added feature")
|
||||
- Keep first line under 50 characters
|
||||
- Capitalize first letter
|
||||
- No period at end of summary
|
||||
- Explain WHY not just WHAT in body
|
||||
|
||||
**DON'T:**
|
||||
|
||||
- Use vague messages like "update" or "fix stuff"
|
||||
- Include technical implementation details in summary
|
||||
- Write paragraphs in summary line
|
||||
- Use past tense
|
||||
|
||||
## Multi-file commits
|
||||
|
||||
When committing multiple related changes:
|
||||
|
||||
```
|
||||
refactor(core): restructure authentication module
|
||||
|
||||
- Move auth logic from controllers to service layer
|
||||
- Extract validation into separate validators
|
||||
- Update tests to use new structure
|
||||
- Add integration tests for auth flow
|
||||
|
||||
Breaking change: Auth service now requires config object
|
||||
```
|
||||
|
||||
## Scope examples
|
||||
|
||||
**Frontend:**
|
||||
|
||||
- `feat(ui): add loading spinner to dashboard`
|
||||
- `fix(form): validate email format`
|
||||
|
||||
**Backend:**
|
||||
|
||||
- `feat(api): add user profile endpoint`
|
||||
- `fix(db): resolve connection pool leak`
|
||||
|
||||
**Infrastructure:**
|
||||
|
||||
- `chore(ci): update Node version to 20`
|
||||
- `feat(docker): add multi-stage build`
|
||||
|
||||
## Breaking changes
|
||||
|
||||
Indicate breaking changes clearly:
|
||||
|
||||
```
|
||||
feat(api)!: restructure API response format
|
||||
|
||||
BREAKING CHANGE: All API responses now follow JSON:API spec
|
||||
|
||||
Previous format:
|
||||
{ "data": {...}, "status": "ok" }
|
||||
|
||||
New format:
|
||||
{ "data": {...}, "meta": {...} }
|
||||
|
||||
Migration guide: Update client code to handle new response structure
|
||||
```
|
||||
|
||||
## Template workflow
|
||||
|
||||
Before you start drafting, read the full text of a few recent commits
|
||||
(e.g., `git log -5`) so you can mirror the repository's tone and level of
|
||||
detail.
|
||||
|
||||
1. **Review changes**: `git diff --staged`
|
||||
2. **Identify type**: Is it feat, fix, refactor, etc.?
|
||||
3. **Determine scope**: What part of the codebase?
|
||||
4. **Write summary**: Brief, imperative description
|
||||
5. **Add body**: Explain why and what impact
|
||||
6. **Note breaking changes**: If applicable
|
||||
|
||||
## Interactive commit helper
|
||||
|
||||
Use `git add -p` for selective staging:
|
||||
|
||||
```bash
|
||||
# Stage changes interactively
|
||||
git add -p
|
||||
|
||||
# Review what's staged
|
||||
git diff --staged
|
||||
|
||||
# Commit with message
|
||||
git commit -m "type(scope): description"
|
||||
```
|
||||
|
||||
## Amending commits
|
||||
|
||||
Fix the last commit message:
|
||||
|
||||
```bash
|
||||
# Amend commit message only
|
||||
git commit --amend
|
||||
|
||||
# Amend and add more changes
|
||||
git add forgotten-file.js
|
||||
git commit --amend --no-edit
|
||||
```
|
||||
|
||||
## Best practices
|
||||
|
||||
1. **Atomic commits** - One logical change per commit
|
||||
2. **Test before commit** - Ensure code works
|
||||
3. **Reference issues** - Include issue numbers if applicable
|
||||
4. **Keep it focused** - Don't mix unrelated changes
|
||||
5. **Write for humans** - Future you will read this
|
||||
|
||||
## Commit message checklist
|
||||
|
||||
- [ ] Type is appropriate (feat/fix/docs/etc.)
|
||||
- [ ] Scope is specific and clear
|
||||
- [ ] Summary is under 50 characters
|
||||
- [ ] Summary uses imperative mood
|
||||
- [ ] Body explains WHY not just WHAT
|
||||
- [ ] Breaking changes are clearly marked
|
||||
- [ ] Related issue numbers are included
|
||||
135
skills/pr-review-helper/SKILL.md
Normal file
135
skills/pr-review-helper/SKILL.md
Normal file
@@ -0,0 +1,135 @@
|
||||
---
|
||||
name: pr-review-helper
|
||||
description: Create pull requests with an interactive review and approval step. Use this skill when the user asks to create a pull request, open a PR, or submit their changes for review. This skill ensures PR descriptions are reviewed before submission.
|
||||
---
|
||||
|
||||
# PR Review Helper
|
||||
|
||||
## Overview
|
||||
|
||||
Create pull requests with an interactive review workflow that allows users to edit the PR description before submission. This skill analyzes all commits since diverging from the base branch and generates a comprehensive PR summary for user review.
|
||||
|
||||
## Workflow
|
||||
|
||||
Follow these steps sequentially when creating a pull request:
|
||||
|
||||
### 1. Gather Git Context
|
||||
|
||||
Collect all necessary git information to understand the full scope of changes:
|
||||
|
||||
- Current git status: `git status`
|
||||
- All changes since diverging from main: `git diff main...HEAD`
|
||||
- Current branch name: `git branch --show-current`
|
||||
- All commits on this branch: `git log main..HEAD`
|
||||
- Remote tracking status: `git status -b --porcelain | head -1`
|
||||
- Check if current branch tracks a remote: `git rev-parse --abbrev-ref @{upstream} 2>/dev/null || echo "No upstream tracking"`
|
||||
|
||||
Execute these commands in parallel for efficiency.
|
||||
|
||||
### 2. Analyze Changes and Draft PR Description
|
||||
|
||||
Based on the gathered context:
|
||||
|
||||
- Analyze ALL commits that will be included in the pull request (not just the latest commit)
|
||||
- Review the full diff to understand the complete scope of changes
|
||||
- Draft a comprehensive PR summary that includes:
|
||||
- Clear, descriptive title
|
||||
- Summary section with 1-3 bullet points covering the main changes
|
||||
- Test plan section with a bulleted markdown checklist of testing TODOs
|
||||
|
||||
### 3. Write Description to File for Review
|
||||
|
||||
Use the `write_pr_description.py` script to write the PR description to a deterministic location in `docs/prs/`:
|
||||
|
||||
```bash
|
||||
python scripts/write_pr_description.py "PR Title" "## Summary
|
||||
|
||||
- Main change point 1
|
||||
- Main change point 2
|
||||
- Main change point 3
|
||||
|
||||
## Test plan
|
||||
|
||||
- [ ] Test item 1
|
||||
- [ ] Test item 2
|
||||
- [ ] Test item 3"
|
||||
```
|
||||
|
||||
The script will:
|
||||
- Create the `docs/prs/` directory if it doesn't exist
|
||||
- Write the description to a timestamped file (e.g., `docs/prs/pr_20250129_143022.md`)
|
||||
- Display the file path for the user to review
|
||||
|
||||
Inform the user where the PR description has been written and ask them to review and edit it before creating the PR.
|
||||
|
||||
### 4. Wait for User Approval
|
||||
|
||||
After writing the description file, explicitly wait for the user to indicate they have reviewed and approved the description. Do not proceed to creating the PR until the user confirms they are ready.
|
||||
|
||||
### 5. Create the Pull Request
|
||||
|
||||
Once the user approves, use the `create_pr.py` script to create the PR:
|
||||
|
||||
```bash
|
||||
# Ensure current branch is pushed to remote with upstream tracking if needed
|
||||
git push -u origin $(git branch --show-current)
|
||||
|
||||
# Create the PR from the most recent description file
|
||||
python scripts/create_pr.py
|
||||
```
|
||||
|
||||
Optionally, specify a particular PR description file or base branch:
|
||||
|
||||
```bash
|
||||
# Use a specific PR description file
|
||||
python scripts/create_pr.py docs/prs/pr_20250129_143022.md
|
||||
|
||||
# Use a different base branch
|
||||
python scripts/create_pr.py docs/prs/pr_20250129_143022.md develop
|
||||
```
|
||||
|
||||
The script will:
|
||||
- Read the PR description file (uses the most recent one if not specified)
|
||||
- Parse the title and body
|
||||
- Create the PR using `gh pr create`
|
||||
- Display the PR URL
|
||||
- Clean up by deleting the PR description file
|
||||
|
||||
Return the PR URL to the user.
|
||||
|
||||
## Important Notes
|
||||
|
||||
- Always analyze ALL commits in the branch, not just the most recent one
|
||||
- The PR description should reflect the complete scope of changes since diverging from the base branch
|
||||
- Never skip the user review step - this is a critical part of the workflow
|
||||
- If the user provides additional notes or context as arguments, incorporate them into the PR description
|
||||
- The scripts handle file I/O and git operations deterministically, reducing errors
|
||||
- PR description files are stored in `docs/prs/` with timestamps for easy tracking
|
||||
|
||||
## Scripts Reference
|
||||
|
||||
### write_pr_description.py
|
||||
|
||||
Creates a PR description file in `docs/prs/` with a timestamp.
|
||||
|
||||
**Usage:**
|
||||
```bash
|
||||
python scripts/write_pr_description.py <title> <body>
|
||||
```
|
||||
|
||||
**Arguments:**
|
||||
- `title`: The PR title (required)
|
||||
- `body`: The PR body content with summary and test plan (required)
|
||||
|
||||
### create_pr.py
|
||||
|
||||
Creates a GitHub PR from a description file in `docs/prs/` and cleans up the file after.
|
||||
|
||||
**Usage:**
|
||||
```bash
|
||||
python scripts/create_pr.py [filepath] [base-branch]
|
||||
```
|
||||
|
||||
**Arguments:**
|
||||
- `filepath`: Path to PR description file (optional, defaults to most recent)
|
||||
- `base-branch`: Base branch for the PR (optional, defaults to "main")
|
||||
114
skills/pr-review-helper/scripts/create_pr.py
Executable file
114
skills/pr-review-helper/scripts/create_pr.py
Executable file
@@ -0,0 +1,114 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
Create a GitHub pull request from a description file in docs/prs/.
|
||||
|
||||
This script reads the most recent (or specified) PR description file from docs/prs/
|
||||
and creates a pull request using the gh CLI tool.
|
||||
"""
|
||||
|
||||
import subprocess
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
def get_latest_pr_file(pr_dir: Path) -> Path:
|
||||
"""Get the most recently created PR description file."""
|
||||
pr_files = sorted(pr_dir.glob("pr_*.md"), reverse=True)
|
||||
if not pr_files:
|
||||
raise FileNotFoundError(f"No PR description files found in {pr_dir}")
|
||||
return pr_files[0]
|
||||
|
||||
|
||||
def parse_pr_description(filepath: Path) -> tuple[str, str]:
|
||||
"""
|
||||
Parse PR description file to extract title and body.
|
||||
|
||||
Args:
|
||||
filepath: Path to the PR description file
|
||||
|
||||
Returns:
|
||||
Tuple of (title, body)
|
||||
"""
|
||||
content = filepath.read_text()
|
||||
lines = content.split("\n")
|
||||
|
||||
# Extract title (first line after removing '# ' prefix)
|
||||
title = lines[0].lstrip("# ").strip() if lines else ""
|
||||
|
||||
# Extract body (everything after the title)
|
||||
body = "\n".join(lines[2:]).strip() if len(lines) > 2 else ""
|
||||
|
||||
return title, body
|
||||
|
||||
|
||||
def create_pull_request(title: str, body: str, base: str = "main") -> str:
|
||||
"""
|
||||
Create a pull request using gh CLI.
|
||||
|
||||
Args:
|
||||
title: PR title
|
||||
body: PR body content
|
||||
base: Base branch (default: main)
|
||||
|
||||
Returns:
|
||||
The PR URL
|
||||
"""
|
||||
cmd = ["gh", "pr", "create", "--title", title, "--body", body, "--base", base]
|
||||
|
||||
result = subprocess.run(cmd, capture_output=True, text=True, check=True)
|
||||
return result.stdout.strip()
|
||||
|
||||
|
||||
def main():
|
||||
pr_dir = Path("docs/prs")
|
||||
|
||||
if not pr_dir.exists():
|
||||
print(f"Error: {pr_dir} directory does not exist", file=sys.stderr)
|
||||
print(
|
||||
"Run write_pr_description.py first to create a PR description",
|
||||
file=sys.stderr,
|
||||
)
|
||||
sys.exit(1)
|
||||
|
||||
# Get PR file (either specified or latest)
|
||||
if len(sys.argv) > 1:
|
||||
pr_file = Path(sys.argv[1])
|
||||
if not pr_file.exists():
|
||||
print(f"Error: File not found: {pr_file}", file=sys.stderr)
|
||||
sys.exit(1)
|
||||
else:
|
||||
try:
|
||||
pr_file = get_latest_pr_file(pr_dir)
|
||||
print(f"Using latest PR description: {pr_file}")
|
||||
except FileNotFoundError as e:
|
||||
print(f"Error: {e}", file=sys.stderr)
|
||||
sys.exit(1)
|
||||
|
||||
# Parse the PR description
|
||||
title, body = parse_pr_description(pr_file)
|
||||
|
||||
if not title:
|
||||
print("Error: PR description file is missing a title", file=sys.stderr)
|
||||
sys.exit(1)
|
||||
|
||||
# Get base branch (default to main, but can be overridden)
|
||||
base = sys.argv[2] if len(sys.argv) > 2 else "main"
|
||||
|
||||
# Create the PR
|
||||
try:
|
||||
pr_url = create_pull_request(title, body, base)
|
||||
print("\n✅ Pull request created successfully!")
|
||||
print(f"URL: {pr_url}")
|
||||
|
||||
# Clean up the PR description file
|
||||
pr_file.unlink()
|
||||
print(f"\n🧹 Cleaned up: {pr_file}")
|
||||
|
||||
except subprocess.CalledProcessError as e:
|
||||
stderr_output = e.stderr if isinstance(e.stderr, str) else "" # pyright: ignore[reportAny]
|
||||
print(f"Error creating pull request: {stderr_output}", file=sys.stderr)
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
59
skills/pr-review-helper/scripts/write_pr_description.py
Executable file
59
skills/pr-review-helper/scripts/write_pr_description.py
Executable file
@@ -0,0 +1,59 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
Write a PR description to a deterministic location for review.
|
||||
|
||||
This script creates a PR description file in docs/prs/ with a timestamp-based
|
||||
filename for easy tracking and review before submission.
|
||||
"""
|
||||
|
||||
import sys
|
||||
from datetime import datetime
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
def write_pr_description(title: str, body: str) -> str:
|
||||
"""
|
||||
Write PR description to docs/prs/ directory.
|
||||
|
||||
Args:
|
||||
title: The PR title
|
||||
body: The PR body content
|
||||
|
||||
Returns:
|
||||
The path to the created file
|
||||
"""
|
||||
# Create docs/prs directory if it doesn't exist
|
||||
pr_dir = Path("docs/prs")
|
||||
pr_dir.mkdir(parents=True, exist_ok=True)
|
||||
|
||||
# Generate filename with timestamp
|
||||
timestamp = datetime.now().strftime("%Y%m%d_%H%M%S")
|
||||
filename = pr_dir / f"pr_{timestamp}.md"
|
||||
|
||||
# Write the PR description
|
||||
content = f"# {title}\n\n{body}"
|
||||
_ = filename.write_text(content)
|
||||
|
||||
return str(filename)
|
||||
|
||||
|
||||
def main():
|
||||
if len(sys.argv) < 3:
|
||||
print("Usage: write_pr_description.py <title> <body>", file=sys.stderr)
|
||||
print("\nExample:", file=sys.stderr)
|
||||
print(
|
||||
' write_pr_description.py "Add new feature" "## Summary\\n- Added X\\n- Fixed Y"',
|
||||
file=sys.stderr,
|
||||
)
|
||||
sys.exit(1)
|
||||
|
||||
title = sys.argv[1]
|
||||
body = sys.argv[2]
|
||||
|
||||
filepath = write_pr_description(title, body)
|
||||
print(f"PR description written to: {filepath}")
|
||||
print("\nPlease review and edit the file before creating the PR.")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
215
skills/updating-documentation-for-changes/SKILL.md
Normal file
215
skills/updating-documentation-for-changes/SKILL.md
Normal file
@@ -0,0 +1,215 @@
|
||||
---
|
||||
name: updating-documentation-for-changes
|
||||
description: Use before committing staged changes when you need to verify all related documentation is current - systematically checks README, CLAUDE.md, CHANGELOG, API docs, package metadata, and cross-references rather than spot-checking only obvious files
|
||||
---
|
||||
|
||||
# Updating Documentation for Changes
|
||||
|
||||
## Overview
|
||||
|
||||
**Before committing staged changes, systematically verify ALL documentation that might reference those changes.**
|
||||
|
||||
The problem: We naturally check the "obvious" doc (README.md) but miss CLAUDE.md, CHANGELOG, API documentation, package metadata, and cross-references in related docs.
|
||||
|
||||
## When to Use
|
||||
|
||||
Use this skill when:
|
||||
|
||||
- You have staged changes ready to commit
|
||||
- You're about to create a PR
|
||||
- You've modified functionality, added features, or changed behavior
|
||||
- Any code change that users or other agents interact with
|
||||
|
||||
**Required trigger**: Before every commit with functional changes.
|
||||
|
||||
## Core Principle
|
||||
|
||||
**This skill checks documentation consistency for STAGED changes only.**
|
||||
|
||||
Do NOT stage additional files during this process. Only verify if documentation for your staged changes is current.
|
||||
|
||||
## The Systematic Documentation Sweep
|
||||
|
||||
Follow this checklist in order. No skipping "obvious" items.
|
||||
|
||||
### 1. Identify What's Staged
|
||||
|
||||
```bash
|
||||
git diff --staged --name-only
|
||||
git diff --staged
|
||||
```
|
||||
|
||||
Note: What was added? Modified? What does it affect?
|
||||
|
||||
**If nothing is staged:** Stop. Tell user to stage their changes first, then return to this skill.
|
||||
|
||||
### 2. Core Documentation Files (Check if they exist)
|
||||
|
||||
Check EVERY one that exists in the repo (no rationalization):
|
||||
|
||||
- [ ] **README.md** (root and subdirectories)
|
||||
- [ ] **CLAUDE.md** (project conventions, architecture, patterns)
|
||||
- [ ] **DESIGN_DOC.md** or **ARCHITECTURE.md** (system design)
|
||||
- [ ] **CONTRIBUTING.md** (contribution guidelines)
|
||||
- [ ] **API.md** or **docs/api/** (API documentation)
|
||||
- [ ] **CHANGELOG.md** or **HISTORY.md** (version history)
|
||||
|
||||
**This list is not comprehensive.** If the project has other documentation, check those too. Examples: TESTING.md, DEPLOYMENT.md, SECURITY.md, project-specific guides.
|
||||
|
||||
**If a core doc doesn't exist:** Note its absence but don't create it as part of this commit.
|
||||
|
||||
**IMPORTANT: When you find a documentation file, read it in its entirety.** Do not skim or spot-check - read the complete file to understand its full context and identify all potential references to your changes.
|
||||
|
||||
### 3. Project-Specific Documentation
|
||||
|
||||
Check documentation specific to this project type:
|
||||
|
||||
**For libraries/packages:**
|
||||
|
||||
- [ ] **Package metadata** (package.json, pyproject.toml, setup.py, Cargo.toml - check if exports/APIs changed)
|
||||
- [ ] **docs/** directory (API docs, guides, examples)
|
||||
|
||||
**For web services:**
|
||||
|
||||
- [ ] **OpenAPI/Swagger specs** (if API changed)
|
||||
- [ ] **docker-compose.yaml** comments (if deployment changed)
|
||||
- [ ] **Config examples** (if config structure changed)
|
||||
|
||||
**For other projects:**
|
||||
|
||||
- Identify key documentation by searching for \*.md files
|
||||
- Check files in `docs/`, `documentation/`, or similar directories
|
||||
|
||||
**Consistency check:** If you find multiple related files (like `package.json` and `README.md` version numbers), verify they're consistent.
|
||||
|
||||
### 4. Related Documentation Search
|
||||
|
||||
Search for files that might reference your changes:
|
||||
|
||||
```bash
|
||||
# Search for direct feature name
|
||||
grep -r "exact-feature-name" --include="*.md" --include="*.json"
|
||||
|
||||
# Search for related terms (if changing auth, search: auth, login, session)
|
||||
grep -r "related-concept" --include="*.md" --include="*.json"
|
||||
|
||||
# Search for command names if you modified commands
|
||||
grep -r "command-name" --include="*.md" --include="*.json"
|
||||
```
|
||||
|
||||
Check cross-references:
|
||||
|
||||
- Do other documentation files reference this feature?
|
||||
- Does the architecture documentation describe this pattern?
|
||||
- Do examples or tutorials use this functionality?
|
||||
- Are there related features that should be updated together?
|
||||
|
||||
**Search depth limit**: Check one level of cross-references. If doc A references feature B, check doc B. Don't recursively check doc B's references.
|
||||
|
||||
### 5. Determine Update Significance
|
||||
|
||||
Update higher-level docs (README, package metadata, CHANGELOG) if your change:
|
||||
|
||||
- **Adds** new user-facing commands, flags, features, or APIs
|
||||
- **Changes** existing behavior in a way users will notice
|
||||
- **Removes** functionality mentioned in high-level descriptions
|
||||
- **Expands** core capabilities described in the summary
|
||||
- **Modifies** configuration structure or deployment steps
|
||||
|
||||
Do NOT update higher-level docs if your change:
|
||||
|
||||
- Adds implementation details or internal techniques
|
||||
- Improves existing behavior without changing interface
|
||||
- Refactors internal code without external impact
|
||||
- Adds examples or clarifications to existing docs
|
||||
- Fixes bugs without changing documented behavior
|
||||
|
||||
**When in doubt:** Check if a user relying on current high-level docs would be surprised by your change. Surprised = update needed.
|
||||
|
||||
### 6. Update What's Outdated
|
||||
|
||||
For each outdated doc:
|
||||
|
||||
1. **Read the entire file** (not just the section that mentions it)
|
||||
2. Update to match new behavior
|
||||
3. Check examples still work
|
||||
4. Verify cross-references are accurate
|
||||
|
||||
**Stage updates after sweep:** Note what needs updating during the sweep, then stage those documentation changes after you've completed the full checklist.
|
||||
|
||||
### 7. Handle Unrelated Outdated Documentation
|
||||
|
||||
If you discover unrelated outdated docs during your sweep:
|
||||
|
||||
- **Note it** for later (mention to user after sweep)
|
||||
- **Don't fix it** in this commit (keeps changes focused)
|
||||
- **Don't skip the rest of the sweep** (finding one issue doesn't mean you're done)
|
||||
|
||||
## Common Rationalizations - STOP
|
||||
|
||||
If you're thinking any of these, you're about to skip necessary docs:
|
||||
|
||||
| Rationalization | Reality |
|
||||
| ----------------------------------------------------- | ------------------------------------------------------------------------ |
|
||||
| "It's just a small change" | Small changes break outdated examples. Check anyway. |
|
||||
| "Nothing actually changed" | Even if smaller than expected, complete the sweep to verify consistency. |
|
||||
| "If related docs existed, I'd know" | You don't know until you search. Search systematically. |
|
||||
| "That file is technical config" | Plugin manifests ARE user-facing. Check them. |
|
||||
| "User is waiting" | 3 minutes now saves 30 minutes debugging confusion later. |
|
||||
| "I already checked the main README" | README ≠ all documentation. Follow the full checklist. |
|
||||
| "Other skills wouldn't reference this" | They might. Search, don't assume. |
|
||||
| "The change is in the code itself" | Code ≠ documentation. Users read docs, not your diff. |
|
||||
| "I found unrelated outdated docs, I should fix those" | Note for later. Stay focused on staged changes. |
|
||||
| "Found one issue, good enough" | One issue doesn't mean you're done. Complete the sweep. |
|
||||
| "I'll just skim the file for relevant parts" | Skimming misses context. Read the entire file to catch all references. |
|
||||
|
||||
**All of these mean: Continue with the systematic sweep.**
|
||||
|
||||
## Red Flags - You're Skipping Something
|
||||
|
||||
- Checked only README.md
|
||||
- Didn't search for cross-references
|
||||
- Skipped plugin manifest as "just config"
|
||||
- Assumed other skills are independent
|
||||
- Used time pressure to justify incomplete check
|
||||
- Thought "minor change doesn't need full sweep"
|
||||
- Started staging additional documentation before completing the sweep
|
||||
- Stopped after finding first inconsistency
|
||||
|
||||
**Any red flag = Start over with full checklist.**
|
||||
|
||||
## Real-World Impact
|
||||
|
||||
**Without systematic sweep:**
|
||||
|
||||
- Users miss new features (not in README)
|
||||
- API consumers hit undocumented breaking changes (package metadata stale)
|
||||
- Examples break (outdated patterns in docs)
|
||||
- Cross-references dangle (related docs out of sync)
|
||||
- Inconsistent information across README, CHANGELOG, and package files
|
||||
- Support burden increases (users confused by outdated docs)
|
||||
|
||||
**With systematic sweep:**
|
||||
|
||||
- All entry points updated (README, API docs, CHANGELOG)
|
||||
- Discovery works (accurate package metadata, search results)
|
||||
- Examples current and runnable
|
||||
- Cross-references intact
|
||||
- Consistent information across all documentation
|
||||
- Reduced support questions and confusion
|
||||
|
||||
## Summary Checklist
|
||||
|
||||
Before committing, have you:
|
||||
|
||||
- [ ] Identified what's staged (`git diff --staged`)
|
||||
- [ ] Checked all core documentation files that exist (README, CLAUDE.md/AGENTS.md, DESIGN_DOC, CONTRIBUTING, API docs, CHANGELOG)
|
||||
- [ ] Checked project-specific documentation (package metadata, API specs, config examples, etc.)
|
||||
- [ ] Verified consistency between related files (e.g., package.json version vs README version)
|
||||
- [ ] Searched for cross-references (grep with feature name and related terms)
|
||||
- [ ] Determined update significance (does behavior change warrant high-level doc updates?)
|
||||
- [ ] Updated outdated docs (or noted what needs updating)
|
||||
- [ ] Noted any unrelated outdated docs for later
|
||||
- [ ] Completed the full sweep without rationalizing shortcuts
|
||||
|
||||
**All checked?** You're ready to commit or stage documentation updates.
|
||||
Reference in New Issue
Block a user