Search a bug.
Keep the fix.
Check one complete learning cycle, then connect your coding agent to the same workflow.
Verify one learning cycle.
Local HydraDBStart with the verification guide. You need the recovered Django runtime, its dataset, a cached MiniLM model, and a restored local HydraDB instance. Download the matching data with python3 scripts/download_runtime.py; then follow the guide to restore the database.
.venv/bin/python scripts/preflight.py --database && .venv/bin/python -m scripts.verify_real_feedback --ticket 37442 --fetch-diff --output work/feedback-receipt.json
Fetches the original Django fix from GitHub. Refuses remote databases; no retraining.
- Search before learning. Rank the functions for Django issue #37442.
- Record the confirmed fix. Verify the upstream diff, then write one event into an isolated HydraDB namespace.
- Search again after restart. Start a fresh Python process and check that it reconstructs the same result. Remove the temporary namespace and verify the base runtime is unchanged.
The command saves its full receipt to work/feedback-receipt.json. This checks persistence for one known fix; it does not measure accuracy on unseen reports.
Connect your agent.
Local stdioOpen the MCP configuration
{
"mcpServers": {
"repocortex": {
"command": "/absolute/path/to/RepoCortex/.venv/bin/python",
"args": [
"/absolute/path/to/RepoCortex/scripts/mcp_server.py"
],
"env": {
"REPOCORTEX_FEEDBACK_NAMESPACE": "my-team-django"
}
}
}
}Replace the absolute path before use. This example has not been connection-tested.
- Set up the backend checkout, Python environment and HydraDB using the README instructions.
- Replace both paths and choose a separate feedback namespace in the configuration above.
- Add this configuration to your MCP client, restart it, then call
graph_statusto check the connection.
Local stdio feedback requires REPOCORTEX_FEEDBACK_NAMESPACE. Without it, feedback is rejected. The public website accepts no feedback writes.
Teach it a confirmed fix.
After setupUse the original bug report and a reviewed unified diff from the indexed Django snapshot. Search first, record the fix, then compare the next search.
Open the confirmed-fix workflow
Use RepoCortex for this confirmed Django fix. Report: [paste the original bug report] Unified diff: [paste the reviewed fix diff] 1. Call graph_status. Stop unless mode is live and connected is true. 2. Call locate_bug with the original report and k=10. Keep the ranks and scores. 3. Call learn_from_fix with that same report and the exact confirmed diff. Check that learned is nonempty and persistence is "hydradb feedback journal". If it returns an error or skipped, report it without claiming a new update. 4. Call locate_bug again with the identical report. Show the before/after ranks and scores, including any unchanged results. 5. Stop here. After I restart the local MCP server with the same namespace and base files, run the same search again and compare its results with step 4. Only learn the reviewed fix I supply. A gain on this same report demonstrates feedback behavior, not held-out accuracy.
Replace the two bracketed placeholders before sending this to your agent.
Use the terminal workflow
Save your original report as report.txt and the reviewed diff as fix.diff. Preview the exact functions before applying; the returned review token ties the update to those inputs.
.venv/bin/python -m scripts.feedback_cli search --namespace my-team-django --report report.txt .venv/bin/python -m scripts.feedback_cli preview --namespace my-team-django --report report.txt --diff fix.diff # Review the mapped functions, then replace REVIEW_TOKEN with the preview token. .venv/bin/python -m scripts.feedback_cli apply --namespace my-team-django --report report.txt --diff fix.diff --review-token REVIEW_TOKEN # A new process reloads the durable feedback: .venv/bin/python -m scripts.feedback_cli search --namespace my-team-django --report report.txt
Replace REVIEW_TOKEN with the token returned by preview. Use one writer per namespace.
If feedback does not apply
- No matching functions: check that the diff paths and changed lines belong to the indexed snapshot. An unrelated repository needs its own index.
- Already learned: the same report and diff are skipped; they do not create a second update.
- Namespace or connection error: check the MCP environment and HydraDB connection, then restart the local server. Use one writer per namespace.