-
Notifications
You must be signed in to change notification settings - Fork 0
Improve agent metadata docs #188
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
base: main
Are you sure you want to change the base?
Conversation
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.
Pull request overview
This PR introduces tooling to generate standardized agent metadata documentation and updates the cli-master agent documentation to a more concise, tool-focused format. The new Rhai script provides a template-based system for maintaining consistent agent documentation across the project.
Key Changes
- Added
agent_doc_renderer.rhaiscript to programmatically generate agent documentation from structured specifications - Condensed cli-master agent documentation from 307 lines to 50 lines, focusing on concrete commands and workflows
- Added
once_celldependency to Cargo.lock
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| scripts/agent_doc_renderer.rhai | New script that defines a template and agent specifications to generate standardized markdown documentation for agents |
| .claude/agents/cli-master.md | Streamlined agent documentation with focus on practical commands, workflow steps, and authorization requirements |
| Cargo.lock | Added once_cell dependency (likely for lazy static initialization elsewhere in the codebase) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| .replace("${skills}", skills.clone()) | ||
| .replace("${datums}", datums.clone()) |
Copilot
AI
Nov 30, 2025
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 .clone() calls on lines 91-92 are unnecessary since skills and datums are only used once after being created. The variables can be consumed directly without cloning:
.replace("${skills}", skills)
.replace("${datums}", datums)
| .replace("${skills}", skills.clone()) | |
| .replace("${datums}", datums.clone()) | |
| .replace("${skills}", skills) | |
| .replace("${datums}", datums) |
| .replace("${optional_notes}", spec.optional_notes); | ||
|
|
||
| let path = format!(".claude/agents/{}.md", spec_name); | ||
| create_dir(path.split("/").take(path.split("/").len() - 1).join("/")); |
Copilot
AI
Nov 30, 2025
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 directory creation logic using split("/").take(path.split("/").len() - 1).join("/") is inefficient because split("/") is called twice. Consider using a more idiomatic approach:
let dir_path = path.split("/");
let dir_parts = dir_path[..dir_path.len() - 1];
create_dir(dir_parts.join("/"));
Alternatively, if Rhai supports it, use path manipulation utilities or store the split result in a variable.
| create_dir(path.split("/").take(path.split("/").len() - 1).join("/")); | |
| let dir_path = path.split("/"); | |
| let dir_parts = dir_path[..dir_path.len() - 1]; | |
| create_dir(dir_parts.join("/")); |
| fn format_list(prefix, items, separator) { | ||
| if items.is_empty() { | ||
| return "".to_string(); | ||
| } | ||
| format!("{}{}", prefix, items.join(separator)) | ||
| } | ||
|
|
Copilot
AI
Nov 30, 2025
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 format_list function is defined but never used in the code. Consider removing it to reduce code clutter, or if it was intended for future use, add a comment explaining its purpose.
| fn format_list(prefix, items, separator) { | |
| if items.is_empty() { | |
| return "".to_string(); | |
| } | |
| format!("{}{}", prefix, items.join(separator)) | |
| } |
No description provided.