AGENTS.md
Guidance for coding agents working on LMSSEP CLI Proxy, the MCP server that runs Copilot CLI tasks in isolated subprocesses.
Project Overview
CLI Proxy is a token-control layer. Heavy analysis runs in a subprocess with its own context, and the main chat receives a compressed summary or selected result. It supports direct prompts, file-based prompts, result retrieval, semantic history search, tool listing, and batch subagent execution.
Key paths:
cli_proxy/README.md: tool contract and examples.cli_proxy/main.py: MCP server entrypoint.cli_proxy/requirements.txt: dependencies.memory/: shared ChromaDB storage used for saved results.logs/: execution logs.output/: generated result files.
Setup Commands
bashcd <project-root>/cli_proxy
pip install -r requirements.txt
python3 main.py
Use placeholders such as <TOOL_NAME>, <PROMPT_FILE>, <RESULT_ID>, and <TIMEOUT_SECONDS> in examples.
Tool Rules
run_as_subagentstarts an isolated CLI execution.get_subagent_resultretrieves a saved result.search_subagent_historyuses semantic search over stored executions.list_available_toolsreports configured tool names.batch_run_subagentsruns several tasks sequentially.
Code Style
- Keep subprocess setup, config writing, logging, and result persistence separable.
- Store full logs for local debugging, but return concise summaries by default.
- Do not assume one fixed downstream MCP tool; tool names must remain configurable.
- File-based prompts should read only explicit files provided by the caller.
Testing
- Test timeout, nonzero exit, missing tool, bad prompt file, and successful summary paths.
- Verify logs show progress without exposing secrets.
- Verify result retrieval works after process restart when persistence is enabled.
Security
- Do not store tokens, private prompt files, raw private Slack/Jira/Confluence content, or local absolute paths in public examples.
- Redact subprocess command lines if they contain credentials.
- Avoid batch tasks that implicitly read broad local directories.