# Prompt: Update README for Code Changes

Use this prompt when you need to update README.md after making code changes.

---

## Prompt Template

```
I need to update the README.md file to document the following changes:

**Code Changes Made:**
[Describe what code changes you made]

**User-Facing Impact:**
[Describe how users will interact with these changes]

**Current README State:**
[Paste relevant section of current README, or state "No existing documentation for this feature"]

**Requirements:**
- Add a new section OR update existing section in README.md
- Include installation instructions if new dependencies added
- Provide a quick start example showing basic usage
- Include configuration options if applicable
- Add troubleshooting section if there are common issues
- Use clear, user-friendly language (not developer jargon)
- Include code examples that actually work

**Target Audience:** [End users / Developers / Both]

Please generate the README content that should be added or updated.
```

---

## Example Usage

**Example 1: New Feature**

```
I need to update the README.md file to document the following changes:

**Code Changes Made:**
Added JWT authentication system with login and token refresh endpoints.
Implemented JWTAuth class with configurable token expiry.

**User-Facing Impact:**
Users now need to authenticate to access protected API endpoints.
They'll get access tokens that expire after 1 hour.
Refresh tokens allow getting new access tokens without re-entering credentials.

**Current README State:**
No existing authentication documentation. Currently README has sections for:
- Installation
- Quick Start
- API Overview
- Configuration

**Requirements:**
- Add new "Authentication" section after "Installation"
- Include setup instructions for configuring auth
- Provide login example
- Show how to use tokens in API requests
- Explain token refresh flow
- Add troubleshooting for common auth errors

**Target Audience:** Developers integrating with the API

Please generate the README content that should be added or updated.
```

**Example 2: Bug Fix with User-Visible Impact**

```
I need to update the README.md file to document the following changes:

**Code Changes Made:**
Fixed memory leak in DataProcessor that caused crashes with large datasets.
Added explicit cleanup in __del__ method and fixed circular references.

**User-Facing Impact:**
Users can now process datasets >1GB without crashes.
Memory usage is more stable during long-running processes.

**Current README State:**
Current README mentions "supports datasets of any size" but doesn't
mention memory management or limitations.

**Requirements:**
- Update "Performance" section to note memory improvements
- Add note about memory management in "Troubleshooting" section
- No need for code changes (bug fix is transparent to users)

**Target Audience:** End users processing large datasets

Please generate the README content that should be updated.
```

---

## Tips for Using This Prompt

### Be Specific About Changes
- Don't just say "added feature X"
- Explain how users will interact with it
- Mention any new dependencies or requirements

### Provide Current State
- Paste relevant README sections
- Note what's missing
- Identify where new content should go

### Define Target Audience
- End users need simpler language
- Developers need more technical details
- Both need working examples

### Request Specific Sections
- Installation instructions
- Quick start examples
- Configuration options
- Troubleshooting
- Migration guides (for breaking changes)

---

## What to Expect

The AI should generate:
- ✅ Clear, concise documentation
- ✅ Working code examples
- ✅ Proper formatting (markdown)
- ✅ Appropriate level of detail for audience
- ✅ Troubleshooting for common issues

Review and edit the generated content:
- Verify examples actually work
- Ensure tone matches your project
- Add any missing project-specific details

---

## Related Prompts

- [Update API Documentation](update-api-docs.md)
- [Add Docstrings](add-docstrings.md)
- [Write PR Description](write-pr-description.md)

---

**Status**: Prompt template for README updates. Updated: 2026-01-07
