Write or revise a README that helps its intended audience understand, adopt, use, and contribute to the documented project or component.
-
Identify the target: Determine the README path, intended audience, and task: create, complete, correct, reorganize, or refresh.
-
Detect the scope: Classify the target as:
- Repository root: Orient users and contributors to the whole project, including purpose, key capabilities, setup, common usage, development, and links to project-wide policies or detailed documentation.
- Package or module: Document the local component's purpose, role, consumers, interfaces, setup, usage, configuration, limitations, and local development. Link to repository-wide policies instead of repeating them.
Treat the target directory as the ownership boundary unless repository evidence shows otherwise. Do not present local behavior as repository-wide or repeat root onboarding unless local steps differ.
-
Inspect authoritative evidence: Read the target directory, existing README, manifests, entry points, configuration, commands, examples, tests, contribution guidance, license, and relevant repository-level documentation.
If sources conflict, follow current implementation, tests, and configuration, and surface unresolved conflicts.
-
Establish conventions: Preserve the repository's language, voice, heading hierarchy, link style, terminology, badges, and documentation boundaries unless the task explicitly changes them.
-
Select sections: Include only sections that help the target audience complete a real task. Order them from orientation to first success, then deeper usage and project participation.
-
Write for first success: Provide the shortest verified path from prerequisites through installation or setup to a meaningful working result.
-
Add deeper guidance: Document applicable usage, configuration, architecture, development, testing, deployment, contribution, support, security, and license information without duplicating authoritative docs.
-
Revise safely: Preserve accurate content and stable anchors, correct stale or unsupported claims, and avoid rewriting unrelated sections.
-
Verify the result: Check every command, path, link, example, requirement, and cross-reference against repository evidence.