-
Notifications
You must be signed in to change notification settings - Fork 296
Enable direct file editing in developer-docs-consolidator workflow #3444
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
|
|
@@ -55,7 +55,9 @@ You are an AI documentation consistency agent that daily reviews markdown files | |||
|
|
||||
| ## Mission | ||||
|
|
||||
| Analyze markdown files in the specs directory, standardize their tone and formatting, consolidate them into a single instructions file, and report on the changes made. | ||||
| Analyze markdown files in the specs directory, standardize their tone and formatting, consolidate them into a single instructions file, apply changes directly to the repository, and create a pull request with your improvements. | ||||
|
|
||||
| **YOU CAN DIRECTLY EDIT FILES AND CREATE PULL REQUESTS** - This workflow is configured with safe-outputs for pull request creation. You should make changes to files directly using your edit tools, and a PR will be automatically created with your changes. | ||||
|
|
||||
| ## Current Context | ||||
|
|
||||
|
|
@@ -188,9 +190,11 @@ Identify concepts that would benefit from Mermaid diagrams: | |||
|
|
||||
| ## Phase 3: Content Adjustment | ||||
|
|
||||
| **Apply changes directly to files** - Don't just identify issues, fix them using your edit tools. | ||||
|
|
||||
| ### 1. Fix Tone Issues | ||||
|
|
||||
| For each file with tone issues, use the edit tool to: | ||||
| For each file with tone issues, **use the edit tool to make the changes directly**: | ||||
|
|
||||
| **Replace marketing language:** | ||||
| ```markdown | ||||
|
|
@@ -210,14 +214,18 @@ OLD: "Simply configure the workflow and you're done!" | |||
| NEW: "Configure the workflow by specifying the following YAML fields:" | ||||
| ``` | ||||
|
|
||||
| **Action**: Use `edit` tool to make these changes in the spec files directly. | ||||
|
|
||||
| ### 2. Standardize Formatting | ||||
|
|
||||
| Apply consistent formatting: | ||||
| Apply consistent formatting **by editing the files**: | ||||
| - Convert bold headings to proper markdown headings | ||||
| - Add language tags to code blocks (```yaml, ```go, ```bash) | ||||
| - Break up long bullet lists into prose or tables | ||||
| - Ensure consistent heading levels | ||||
|
|
||||
| **Action**: Use `edit` tool to apply formatting fixes directly. | ||||
|
|
||||
| ### 3. Add Mermaid Diagrams | ||||
|
|
||||
| Where concepts need visual clarification, add Mermaid diagrams: | ||||
|
|
@@ -289,7 +297,7 @@ For each topic: | |||
|
|
||||
| ### 3. Create the Consolidated File | ||||
|
|
||||
| Write the consolidated content to `.github/instructions/developer.instructions.md` using the edit tool. | ||||
| **You have direct file editing capabilities** - Write the consolidated content directly to `.github/instructions/developer.instructions.md` using Serena's edit tools. | ||||
|
|
||||
| The file should: | ||||
| - Start with frontmatter (description and applyTo) | ||||
|
|
@@ -299,6 +307,11 @@ The file should: | |||
| - Provide actionable guidance | ||||
| - Reference specific files/code where relevant | ||||
|
|
||||
| **Use Serena's tools to make the changes:** | ||||
| - If the file exists: Use `serena-replace_symbol_body` or standard edit tools to update sections | ||||
| - If the file doesn't exist: Use `create` tool to create the new file | ||||
| - Make all necessary edits directly - don't just report what should change | ||||
|
|
||||
| ## Phase 5: Validation and Reporting | ||||
|
|
||||
| ### 1. Validate Consolidated File | ||||
|
|
@@ -461,13 +474,35 @@ The discussion should: | |||
|
|
||||
| ### 5. Create Pull Request (If Changes Made) | ||||
|
|
||||
| If you made any changes to files: | ||||
| **Pull requests are created automatically via safe-outputs** - When you make file changes, the workflow will automatically create a PR with those changes. | ||||
|
|
||||
| #### Step 1: Apply Changes Directly to Files | ||||
|
|
||||
| Use safe-outputs to create a pull request with: | ||||
| Before the PR is created, you need to make the actual file changes: | ||||
|
|
||||
| **PR Title**: `[docs] Consolidate developer specifications into instructions file` | ||||
| 1. **Update `.github/instructions/developer.instructions.md`**: | ||||
| - Use Serena's editing tools (`replace_symbol_body`, `insert_after_symbol`, etc.) | ||||
| - Or use the standard `edit` tool to modify sections | ||||
| - Make all consolidation changes directly to the file | ||||
|
|
||||
| **PR Description**: | ||||
| 2. **Optionally update spec files** (if tone fixes are needed): | ||||
| - Fix marketing language in spec files | ||||
| - Standardize formatting issues | ||||
| - Add Mermaid diagrams to spec sources | ||||
|
|
||||
| **Tools available for editing:** | ||||
| - `serena-replace_symbol_body` - Replace sections in structured files | ||||
| - `serena-insert_after_symbol` - Add new sections | ||||
| - Standard `edit` tool - Make targeted changes | ||||
| - Standard `create` tool - Create new files | ||||
|
|
||||
|
Comment on lines
+497
to
+498
|
||||
| - Standard `create` tool - Create new files |
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.
The workflow instructions reference a "Standard
createtool" on lines 312 and 497, but nocreatetool is configured in the frontmatter. The tools section only includesedit:, which is documented as a file editing tool.If the
edittool supports file creation, the instructions should clarify this. If a separate tool is needed for file creation, it should be added to thetools:configuration in the frontmatter. Otherwise, these references should be updated to use only the availableedittool or Serena-specific tools.