[Updated by: codex | Time: 2026-05-25 09:13:45 +0700]
ContextForge is a blank, reusable starter template for building a project knowledge gateway:
- Canonical Report: the source of truth for architecture, decisions, issues, and handoffs.
- LLM Wiki: read-only linked context and concept navigation.
- Docker Gateway: optional local dashboard, REST API, and MCP server in one container.
- Agent Gates: required-source validation before agents plan or write.
- Mindmaps and Issues: structured artifacts written back into the canonical report.
The goal is to make agents faster while reducing context drift, forgotten documents, and duplicated architecture logic.
ContextForge/
README.md
docs/
01-concept-th.md
02-architecture.md
03-operating-model.md
04-github-setup.md
05-agent-rules-template.md
gateway/
package.json
tsconfig.json
src/
public/
templates/
AGENTS.md
context-rules.json
wiki-index.md
workspace/
report/
wiki/
Dockerfile
docker-compose.yml
This folder is intentionally not running anything. It is a portable scaffold for GitHub or another machine.
Generated runtime folders are not committed:
gateway/node_modules/
gateway/dist/
git clone <your-repo-url> ContextForge
cd ContextForgeCustomize these first:
workspace/report/README.md
workspace/report/registry/context-rules.json
workspace/wiki/index.md
templates/AGENTS.md
docker-compose.yml
Run only when you want the gateway active:
docker compose up --buildDashboard:
http://127.0.0.1:8797/dashboard
Build the local source index after the first run:
curl -X POST http://127.0.0.1:8797/api/index/refreshStop and remove the container:
docker compose downcd gateway
npm install
npm run build
REPORT_ROOT=/path/to/report \
WIKI_ROOT=/path/to/wiki \
node dist/mcp-server.jsThen call the MCP tool refresh_index once before asking agents for context_bundle.
Canonical Report owns truth.
Wiki owns navigation.
Gateway owns access speed.
MCP owns agent interface.
Dashboard owns human visibility.
- Copy this folder into a new GitHub repository.
- Replace
workspace/report/README.mdwith your project source-of-truth. - Replace
workspace/wiki/index.mdwith your concept map. - Edit
workspace/report/registry/context-rules.json. - Copy
templates/AGENTS.mdinto the project root and adjust paths/tool names. - Build the gateway only when needed, then register the MCP command from
gateway/dist/mcp-server.js. - Tell agents to call
context_bundleandvalidate_contextbefore planning or writing.