-
Notifications
You must be signed in to change notification settings - Fork 5
feat: add README create/update workflow and /readme command #129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,120 @@ | ||
| --- | ||
| description: Create or update README.md for the current project | ||
| agent: Build+ | ||
| mode: subagent | ||
| --- | ||
|
|
||
| Create or update a comprehensive README.md file for the current project. | ||
|
|
||
| **Arguments**: Optional flags like `--sections "installation,usage"` for partial updates. Without arguments, generates/updates the full README. | ||
|
|
||
| ## Workflow | ||
|
|
||
| ### Step 1: Parse Arguments | ||
|
|
||
| Check for `--sections` flag: | ||
|
|
||
| ```bash | ||
| # Full README (default) | ||
| /readme | ||
|
|
||
| # Partial update | ||
| /readme --sections "installation,usage" | ||
| /readme --sections "troubleshooting" | ||
| ``` | ||
|
|
||
| **When to use `--sections`**: | ||
| - After adding a feature → `--sections "usage"` | ||
| - After changing install process → `--sections "installation"` | ||
| - After discovering common issue → `--sections "troubleshooting"` | ||
| - When full regeneration would lose custom content | ||
|
|
||
| **When to use full `/readme`**: | ||
| - New project without README | ||
| - README is significantly outdated | ||
| - Major restructuring needed | ||
| - User explicitly requests full regeneration | ||
|
|
||
| ### Step 2: Load Workflow | ||
|
|
||
| Read the full workflow guidance: | ||
|
|
||
| ```text | ||
| Read: workflows/readme-create-update.md | ||
| ``` | ||
|
|
||
| ### Step 3: Explore Codebase | ||
|
|
||
| Before writing anything: | ||
|
|
||
| 1. **Detect project type** (package.json, Cargo.toml, go.mod, etc.) | ||
| 2. **Detect deployment platform** (Dockerfile, fly.toml, vercel.json, etc.) | ||
| 3. **Read existing README** (if updating) | ||
| 4. **Gather key info** (scripts, entry points, config files) | ||
|
|
||
| ### Step 4: Generate/Update README | ||
|
|
||
| **For new README**: Follow recommended section order from workflow. | ||
|
|
||
| **For updates with `--sections`**: | ||
| 1. Read entire existing README | ||
| 2. Preserve structure and custom content | ||
| 3. Update only specified sections | ||
| 4. Maintain consistent style | ||
|
|
||
| ### Step 5: Confirm | ||
|
|
||
| Present the changes and ask for confirmation before writing: | ||
|
|
||
| ```text | ||
| README changes: | ||
| - [Section]: [Brief description of change] | ||
| - [Section]: [Brief description of change] | ||
|
|
||
| 1. Apply changes | ||
| 2. Show full diff first | ||
| 3. Modify before applying | ||
| ``` | ||
|
|
||
| ## Section Mapping | ||
|
|
||
| | Argument | Sections Updated | | ||
| |----------|------------------| | ||
| | `installation` | Installation, Prerequisites, Quick Start | | ||
| | `usage` | Usage, Commands, Examples, API | | ||
| | `config` | Configuration, Environment Variables | | ||
| | `architecture` | Architecture, Project Structure | | ||
| | `troubleshooting` | Troubleshooting | | ||
| | `deployment` | Deployment, Production Setup | | ||
| | `badges` | Badge section only | | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The Other Locations
🤖 Was this useful? React with 👍 or 👎 |
||
| | `all` | Full regeneration (same as no flag) | | ||
|
|
||
| Multiple sections: `--sections "installation,usage,config"` | ||
|
|
||
| ## Examples | ||
|
|
||
| ```bash | ||
| # New project - create full README | ||
| /readme | ||
|
|
||
| # Added new CLI commands | ||
| /readme --sections "usage" | ||
|
|
||
| # Changed environment variables | ||
| /readme --sections "config" | ||
|
|
||
| # Added Docker support | ||
| /readme --sections "installation,deployment" | ||
|
|
||
| # Fixed common user issue | ||
| /readme --sections "troubleshooting" | ||
|
|
||
| # Major update needed | ||
| /readme --sections "all" | ||
| ``` | ||
|
|
||
| ## Related | ||
|
|
||
| - `workflows/readme-create-update.md` - Full workflow guidance | ||
| - `workflows/changelog.md` - Changelog updates | ||
| - `workflows/wiki-update.md` - Wiki documentation | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Align workflow path with actual location.
To avoid operator/agent confusion, reference the concrete path shown in this PR.
🔧 Proposed tweak
🤖 Prompt for AI Agents