JCode is a 6-step governance workflow system for AI coding assistants, exposed via the Model Context Protocol (MCP). It brings structure, accountability, and quality control to AI-generated code.
Features โข Quick Start โข Documentation โข Installation
JCode implements a complete governance layer that ensures AI-generated code meets quality standards through a structured 6-step workflow:
โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ
โ Analyst โ โ โ Planner โ โ โ Implementer โ
โ (ๅธ้ฉฌ่ฟ) โ โ (ๅ้
) โ โ (้ฒ็ญ) โ
โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ
โ Conductor โ โ โ Tester โ โ โ Reviewer โ
โ (้ฉ้ๅญ) โ โ (ๅผ ่กก) โ โ (ๅ
ๆฏ) โ
โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ
Each step validates the previous, ensuring only high-quality code reaches production.
| Agent | Role | Output |
|---|---|---|
| @jcode-analyst | Problem analysis & risk assessment | Analysis + Verifiability |
| @jcode-planner | Task decomposition & planning | Verifiable task list |
| @jcode-implementer | Code implementation | Code changes |
| @jcode-reviewer | Code review | APPROVED / REJECTED |
| @jcode-tester | Test verification | PASSED / FAILED |
| @jcode-conductor | Final arbitration | DELIVER / ITERATE / STOP |
- Standard Protocol: Implements Model Context Protocol (JSON-RPC 2.0)
- Tool Discovery: Auto-discoverable by MCP clients
- Stateless Design: Each invocation is independent
- Multi-Client Support: Works with OpenCode, VSCode, Claude Desktop, etc.
- โ VSCode auto-start on project open
- โ System service (systemd/launchd)
- โ Docker container
- โ PM2 process management
git clone https://github.com/jabing/JCode.git
cd JCode
pip install -r requirements.txtEdit ~/.config/opencode/opencode.json:
{
"mcp": {
"jcode": {
"type": "local",
"command": ["python", "-m", "jcode_mcp.server", "--port", "8080"],
"env": {"PYTHONPATH": "/path/to/jcode"},
"enabled": true
}
}
}In your MCP client:
@jcode ๅฎ็ฐไธไธช็จๆท็ปๅฝๅ่ฝ
Or use individual agents:
@jcode-analyst ๅๆ่ฟไธช้ๆฑ็้ฃ้ฉ
@jcode-reviewer ๆฃๆฅ่ฟๆฎตไปฃ็
@jcode-tester ่ฟ่กๆต่ฏ
- ๐ Agent System Overview - Architecture & 6-agent workflow
- ๐ง Installation Guide - Detailed setup instructions
- โ๏ธ VSCode Integration - VSCode setup & configuration
- ๐ Auto-Start Guide - 5 methods to auto-start server
- ๐ ๏ธ Troubleshooting - Common issues & solutions
- ๐ Agent Constitution - Core principles & constraints
- ๐๏ธ Governance Documentation - Complete governance framework
- ๐ Output Format Guidelines
- ๐ป MCP Server API - FastAPI-based MCP server
- ๐ SKILL Registration - OpenCode SKILL format
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ MCP Client โ
โ (OpenCode / VSCode / Claude) โ
โโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ JSON-RPC 2.0
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ JCode MCP Server โ
โ โโโโโโโโโโโโฌโโโโโโโโโโโฌโโโโโโโโโโโฌโโโโโโโโโโโโโโโโ โ
โ โ /health โ /mcp โ /docs โ /openapi โ โ
โ โโโโโโโโโโโโดโโโโโโโโโโโดโโโโโโโโโโโดโโโโโโโโโโโโโโโโ โ
โ โ
โ โโโโโโโโโโโโ โโโโโโโโโโโโ โโโโโโโโโโโโ โโโโโโโโโโ โ
โ โ analyze โ โ plan โ โ implementโ โ review โ โ
โ โโโโโโโโโโโโ โโโโโโโโโโโโ โโโโโโโโโโโโ โโโโโโโโโโ โ
โ โโโโโโโโโโโโ โโโโโโโโโโโโ โ
โ โ test โ โ conductorโ โ
โ โโโโโโโโโโโโ โโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Core Agents โ
โ Analyst / Planner / Implementer / Reviewer / โ
โ Tester / Conductor โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Each JCode agent has a historical Chinese personality anchor that constrains its behavior:
| Agent | Personality | Constraint |
|---|---|---|
| Analyst | ๅธ้ฉฌ่ฟ (Sima Qian) | Records facts only, no judgment |
| Planner | ๅ้ (Shang Yang) | Creates laws, doesn't execute |
| Implementer | ้ฒ็ญ (Lu Ban) | Follows blueprint exactly |
| Reviewer | ๅ ๆฏ (Bao Zheng) | Binary verdict only, no suggestions |
| Tester | ๅผ ่กก (Zhang Heng) | Provides evidence, no speculation |
| Conductor | ้ฉ้ๅญ (Han Feizi) | Final arbiter, no analysis |
# Run all tests
pytest tests/ -v
# Run integration tests
pytest tests/integration/test_mcp_server.py -v
# Run with coverage
pytest tests/ --cov=jcode_mcp --cov-report=htmljcode/
โโโ jcode_mcp/ # MCP Server implementation
โ โโโ server.py # FastAPI + JSON-RPC 2.0
โ โโโ jcode_server.py # Tool definitions
โ โโโ __init__.py
โโโ core/agents/ # 6 Agent implementations
โ โโโ analyst.py
โ โโโ planner.py
โ โโโ implementer.py
โ โโโ reviewer.py
โ โโโ tester.py
โ โโโ conductor.py
โโโ config/agents/ # OpenCode Agent configs
โ โโโ jcode.md # Primary orchestrator
โ โโโ jcode-analyst.md
โ โโโ jcode-planner.md
โ โโโ jcode-implementer.md
โ โโโ jcode-reviewer.md
โ โโโ jcode-tester.md
โ โโโ jcode-conductor.md
โโโ skills/jcode-mcp/ # OpenCode SKILL registration
โ โโโ SKILL.md
โโโ docs/ # Documentation
โ โโโ AUTO_START_GUIDE.md
โ โโโ VSCODE_INTEGRATION.md
โ โโโ TROUBLESHOOTING.md
โโโ governance/ # Governance framework
โ โโโ AGENT_CONSTITUTION.md
โ โโโ ...
โโโ tests/ # Test suite
โโโ integration/
- MCP Server implementation
- 6 Agent tools exposed via MCP
- VSCode integration
- Auto-start configuration
- Web dashboard for workflow monitoring
- Multi-project support
- Custom agent plugins
- Enterprise SSO integration
Contributions are welcome! Please read our Contributing Guide for details.
# Install dev dependencies
pip install -r requirements.txt
# Install pre-commit hooks
pre-commit install
# Run linting
ruff check .
black --check .
# Run tests
pytestMIT License - see LICENSE file for details.
- Model Context Protocol - For the standardized tool protocol
- OpenCode - For the AI coding assistant framework
- FastAPI - For the high-performance web framework
- ๐ Documentation
- ๐ Issues
- ๐ฌ Discussions
JCode: Governance as a Tool
่ฎฉAIไธๅชๆฏๅไปฃ็ ๏ผ่ๆฏๅๅฅฝไปฃ็