بنقرة واحدة
add-feature
// Guide for adding a new feature to OhMyCode. Use when user wants to add functionality that goes beyond existing extension points (tools/providers). Always start by reading docs/DEVELOPMENT_GUIDE.md.
// Guide for adding a new feature to OhMyCode. Use when user wants to add functionality that goes beyond existing extension points (tools/providers). Always start by reading docs/DEVELOPMENT_GUIDE.md.
Run OhMyCode benchmarks — score any provider/model with token tracking. Use when user wants to benchmark, evaluate, test performance, or compare models.
Generate high-quality tests for OhMyCode modules. Use when user wants to create, add, or generate tests for a module or file.
Run tests and analyze results for OhMyCode. Use when user wants to run, check, or verify tests — or after any code change.
Guide for debugging OhMyCode issues. Use when user reports errors, unexpected behavior, or connection problems.
Guide for adding a new LLM provider to OhMyCode. Use when user wants to connect a new AI model backend.
Guide for adding a new tool to OhMyCode. Use when user wants to create a custom tool.
| name | add-feature |
| description | Guide for adding a new feature to OhMyCode. Use when user wants to add functionality that goes beyond existing extension points (tools/providers). Always start by reading docs/DEVELOPMENT_GUIDE.md. |
Add a major new capability that isn't covered by existing extension points (add-tool, add-provider).
Examples: hook system, MCP support, multi-session management, plugin architecture, new CLI commands, new compression strategy.
Before doing anything, read docs/DEVELOPMENT_GUIDE.md — it contains:
Ask the user:
Based on docs/DEVELOPMENT_GUIDE.md, determine:
Where does the code go?
ohmycode/? (e.g., ohmycode/hooks/)ohmycode/core/)What interfaces does it expose?
What existing code needs to change?
Propose the design to the user before writing code.
For each component:
tests/<module>/test_<component>.pypython3 -m pytest tests/ -vIf the feature requires changes to existing modules:
Update docs/DEVELOPMENT_GUIDE.md if the feature:
python3 -m pytest tests/ -v # All tests pass
ohmycode -p "Test the new feature" --mode auto # End-to-end works
From docs/DEVELOPMENT_GUIDE.md:
async/await for I/O operationsconfig.json for user-facing settings, not hardcoded valuescli.py → core/loop.py → providers/base.py
→ tools/base.py
→ core/context.py
→ core/system_prompt.py
New modules should fit into this hierarchy. Leaf modules (no dependencies on other ohmycode modules) are safest. Modules that need to touch core/loop.py require extra care.
core/loop.py without understanding the async generator patternpermissions.py from tools/base.py (circular dependency)DEVELOPMENT_GUIDE.md after adding a new module