Repository navigation
Development_Guide
Jules Martins edited this page May 10, 2026
·
1 revision
Thank you for contributing to mentask.
- Fork the repo and clone.
- Initialize and bind virtual mappings:
python -m venv venv
# On Windows: venv\Scripts\activate
source venv/bin/activate
pip install -e ".[dev]"Tests are mapped inside tests/ leveraging pytest and the Simulation Layer.
As of v0.25.0, all tests involving local models MUST use Ollama with the qwen3.5 model.
The test suite includes a session-wide fixture (tests/conftest.py) that:
- Automatically starts the Ollama server if it's not running.
- Pulls the mandated
qwen3.5model. - Shuts down the server after the tests finish.
To run tests locally:
pytest tests/-
Core Managers:
test_session_manager.py,test_context_manager.py,test_stream_processor.py. -
Security:
test_security.py(Risk analysis and pattern matching). -
Tools:
test_file_tools.py,test_system_tools.py.
Important
Because mentask is an autonomous tool interacting with hardware endpoints, any integration tools merged must handle timeout bounds or test mock restrictions explicitly to avoid rogue executions.
-
Branches:
feat/<name>,bugfix/<name>,refactor/<name>. -
Commits: Prefix formatting (e.g.
feat: add glob search tool). -
PR Rules: Ensure
pytestcompletes without assertions failing andruff checkpasses100%on changed blobs.
As of version 0.10.0, the Cognitive Layer is decentralized. When injecting new logic:
-
New Tools: Build bounded generic logic in
src/mentask/tools/and bind them toToolDispatcher. -
State Logic: Place specialized management logic inside
src/mentask/agent/core/. -
Safety Logic: Update
src/mentask/core/security.pyif adding tools that interact with sensitive OS resources.