AGENTS.md
Guidance for coding agents working on LMSSEP Recursive Thinking MCP Server. This server supports iterative answer improvement through explicit latent-state updates.
Project overview
Recursive Thinking provides a reasoning loop with problem decomposition, current-answer analysis, alternative perspectives, improvement synthesis, and a verification pass before final answer retrieval.
Setup commands
bashcd <project-root>/genesis/LMSSEP/recursive_thinking
pip install -r requirements.txt
python main.py
Configure server name, version, transport, and log level through environment variables. Keep transport endpoints and local ports out of public docs.
Tool workflow
Use recursive_thinking_initialize to create a session. Then use recursive_thinking_update_latent to record deeper analysis, recursive_thinking_update_answer to refine the visible answer, recursive_thinking_get_result to retrieve the final verified answer and history, and recursive_thinking_reset to clear a session.
Code map
main.pystarts the MCP server.configs/config.pycontrols server metadata and runtime configuration.src/contains tool and utility modules for session validation, logging, and persistence.
Testing and verification
Verify initialization, at least two latent updates, an answer update, result retrieval, and reset. Include a negative test for unknown session id and one test that confirms history order is preserved.
Safety and output hygiene
Latent-state notes can contain raw uncertainty, private context, or false starts. Do not publish reasoning traces without redaction. Treat the final answer as an output that still needs ordinary factual or code verification.
Commit and PR rules
Changes to session ids, latent update shape, answer update shape, or reset behavior need focused tests. Keep the lifecycle simple and predictable for MCP clients.