2.6 KiB
2.6 KiB
description, argument-hint
| description | argument-hint |
|---|---|
| Updates the documentation based on recent code changes. | [Optional: specific update instructions] |
/updateDoc
This command updates the project's documentation to reflect recent code changes. If specific instructions are provided, it follows them. Otherwise, it analyzes the latest git diff to determine what needs updating.
When to use
- Use when: The user wants to update the documentation after making code changes.
- Suggest when: A feature has been implemented or a bug has been fixed, and the user indicates the task is complete.
- Example: "User: I've just pushed the changes, please update the docs."
- Example: "User: The refactor is done." -> Assistant suggests
/updateDoc.
Actions
-
Step 1: Analyze Changes
- If arguments (
$ARGUMENTS) are provided, use them as the high-level description of what changed. - If no arguments are provided, run
git diff HEADto get recent code changes.
- If arguments (
-
Step 2: Synthesize Impacted Concepts
- Perform a synthesis step: Analyze the
git diffor user's description to identify which core concepts, features, or foundational conventions have been affected. - For example, a change to
.eslintrcimpacts "Coding Conventions". A change tosrc/services/authService.jsimpacts the "Authentication System" concept. - Create a list of all impacted concepts/conventions.
- Perform a synthesis step: Analyze the
-
Step 3: Concurrent Document Updates (using
recorderincontent-onlymode)- For each impacted concept identified in Step 2, concurrently invoke a
recorderagent. - The prompt for each will be:
"Task: The
<concept_name>has been updated. 1. Analyze these changes:<relevant part of git diff or user description>. 2. Read the existingllmdocdocumentation thoroughly to understand what documents are impacted by the changes. 3. Holistically update all relevant documents to reflect the changes, ensuring they remain accurate and consistent. You may need to create, modify, or even delete documents. 4. Apply the 'Principle of Minimality': Your updates must be as concise as possible. Use the fewest words necessary to describe the change. Do not write long-winded explanations. 5. You MUST operate incontent-onlymode."
- For each impacted concept identified in Step 2, concurrently invoke a
-
Step 4: Final Indexing (using a single
recorder)- After all
recorderagents from Step 3 have completed, invoke a singlerecorderagent with the task: "The documentation has been updated. Please re-scan the/llmdocdirectory and ensure theindex.mdis fully consistent and up-to-date. Operate infullmode."
- After all