Initial commit

This commit is contained in:
Zhongwei Li
2025-11-29 18:00:55 +08:00
commit 560be056f2
7 changed files with 377 additions and 0 deletions

48
commands/edit-module.md Normal file
View File

@@ -0,0 +1,48 @@
# Edit Existing Module
You will edit an existing module following Module Driven Development (MDD) principles.
## Task
Use the `module-developer` agent to edit the module: **$ARGUMENTS**
The agent will:
1. Read the existing module's README.md to understand its current functionality
2. Read the implementation and interface code
3. Understand what needs to be changed
4. Update the module while maintaining backward compatibility (or document breaking changes)
5. Update tests to reflect changes
6. Update README.md documentation
## Module Discovery
First, locate the module in the codebase:
- Search for directories or files matching the module name
- Look for README.md files that describe the module
- If the module cannot be found, ask the user for the module location
## Expected Changes
Ask the user what changes are needed:
- What functionality should be added/removed/modified?
- Are breaking changes acceptable?
- Are there specific interface changes required?
## Backward Compatibility
When editing modules, prioritize backward compatibility:
- Maintain existing function signatures when possible
- Add new optional parameters instead of changing required ones
- Deprecate old APIs rather than removing them immediately
- Clearly document any breaking changes in README.md
## Expected Deliverables
The agent should update:
- Implementation code
- Interface/exports
- Unit tests (update existing, add new)
- README.md documentation to reflect all changes
Ensure the edited module maintains consistency with the project's conventions and
continues to integrate well with other modules.

35
commands/new-module.md Normal file
View File

@@ -0,0 +1,35 @@
# Create New Module
You will create a new module following Module Driven Development (MDD) principles.
## Task
Use the `module-developer` agent to create a new module named: **$ARGUMENTS**
The agent will:
1. Analyze the module requirements based on the name and any additional context
2. Design a clean interface for the module
3. Implement the module functionality
4. Create comprehensive documentation in README.md
5. Write tests for the module
## Module Requirements
If the module name alone doesn't provide enough context, ask the user:
- What should this module do?
- What is the expected input/output?
- Are there any specific requirements or constraints?
- Where should the module be located in the project?
## Expected Deliverables
The agent should create:
- Implementation code with a clean, exported interface
- Unit tests
- README.md with:
- Overview section
- Getting Started section with examples
- API Reference section
Ensure the module follows the project's existing conventions and integrates well
with other modules in the codebase.

54
commands/read-module.md Normal file
View File

@@ -0,0 +1,54 @@
# Read Module Into Context
You will read an existing module into the AI context to understand its functionality and API.
## Task
Read and analyze the module: **$ARGUMENTS**
## Module Discovery
First, locate the module in the codebase:
- Search for directories or files matching the module name
- Look for README.md files that describe the module
- Check common module locations (e.g., /lib, /modules, /src/modules, /packages)
- If multiple matches are found, ask the user to clarify which module to read
- If the module cannot be found, ask the user for the module location
## What to Read
For the module, read in this order:
1. **README.md** - Start here to understand:
- Module purpose and overview
- API surface and key functions
- Usage examples
- Configuration options
2. **Interface/Export files** - Read the public API:
- Main index file or entry point
- Type definitions
- Exported functions, classes, and constants
3. **Implementation files** - Read key implementation details:
- Core functionality
- Important algorithms or business logic
- Dependencies on other modules
4. **Tests** - Review tests to understand:
- Expected behavior
- Edge cases
- Usage patterns
## Summary
After reading the module, notify the user and wait for further instructions.
## Usage in Conversation
Once the module is read into context, you can:
- Answer questions about how the module works
- Suggest how to use the module for specific tasks
- Identify if this module can solve a problem the user is working on
- Help integrate this module with other code
- Edit the module