PlanExe / worker_plan
AGENTS.md402 starsChanged 3 months agoMITView on GitHub
Scope: FastAPI worker service and shared workerplaninternal/workerplanapi packages used by frontends and database workers. Keep interfaces stable across consumers. - For tasks with multiple LLM calls, use the message parameter to distinguish them: LLMChatError(cause=e, message="LLM chat interaction 2 failed"). - Error classification: classifyerror() in usagemetrics.py maps raw exception strings to short categories (invalidjson, timeout, ratelimit, etc.) stored in usagemetrics.jsonl. Unknown errors preserve a truncated errordetail field. Each Luigi pipeline task lives in its own file under stages/. This enables: -…
- Reads credentials
We split this AGENTS.md into the rules it gives an agent
12 rules. About 0 are common, 2 are distinctive, and 10 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
10
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 9
Keep request/response shapes and endpoint paths backward compatible.
- Very specific: line 10
Avoid renaming response fields like run_id, run_dir, display_run_dir.
- Very specific: line 15
When changing pipeline behavior, keep the subprocess invocation in start_pipeline_subprocess consistent with worker_plan_internal.
- Very specific: line 17
Keep PlanExeDotEnv.load().update_os_environ() early so .env overrides work.
- Very specific: line 21
Keep planning logic in worker_plan_internal (pipeline stages: prompt parsing -> LLM planning -> file/report output).
- Very specific: line 25
If new environment variables or endpoints are added, update worker_plan/README.md and any Railway docs.
- Very specific: line 29
When an LLM call fails inside a pipeline task, raise LLMChatError (from worker_plan_internal.llm_util.llm_errors), not a bare ValueError.
- Very specific: line 62
Create stages/<stage_name>.py with one task class
- Very specific: line 63
Import PlanTask from worker_plan_internal.plan.run_plan_pipeline
- Distinctive: line 64
Import upstream task dependencies from sibling stage files
- Very specific: line 66
Add the new task to stages/full_plan_pipeline.py's requires() dict
- Very specific: line 77
Prefer unit tests over manual server checks.
≈ “Common” is an estimate: at least 1 in 5 of the 36,368 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
worker_plan agent instructions
Scope: FastAPI worker service and shared worker_plan_internal/worker_plan_api
packages used by frontends and database workers. Keep interfaces stable across
consumers.
Guidelines
- Preserve the public API contract in
worker_plan/app.py:- Keep request/response shapes and endpoint paths backward compatible.
- Avoid renaming response fields like
run_id,run_dir,display_run_dir.
- Artifact contract:
/runs/{run_id}/zipmust not includetrack_activity.jsonlin downloadable zips. - Maintain the run directory conventions (
PlanExe_...); run outputs go under{PLANEXE_CONFIG_PATH}/run/. - When changing pipeline behavior, keep the subprocess invocation in
start_pipeline_subprocessconsistent withworker_plan_internal. - Keep
PlanExeDotEnv.load().update_os_environ()early so.envoverrides work. - CRITICAL:
worker_plan_apimust stay lightweight. Allowed imports are stdlib,typing,dataclasses,enum, andpydantic. Do not importllama_index,fastapi,httpx,numpy,pandas, ortorchthere. - Keep planning logic in
worker_plan_internal(pipeline stages: prompt parsing -> LLM planning -> file/report output). - Other services may import
worker_plan_apifor types/helpers; they must not importworker_plan_internal. - If new environment variables or endpoints are added, update
worker_plan/README.mdand any Railway docs.
LLM Error Handling
- When an LLM call fails inside a pipeline task, raise
LLMChatError(fromworker_plan_internal.llm_util.llm_errors), not a bareValueError.LLMChatErrorpreserves the root cause and generates anerror_idUUID for cross-referencing logs withusage_metrics.jsonlrows. - Standard pattern (30+ call sites):
from worker_plan_internal.llm_util.llm_errors import LLMChatError try: result = llm_executor.run(execute_function) except PipelineStopRequested: raise except Exception as e: llm_error = LLMChatError(cause=e) logger.debug(f"LLM chat interaction failed [{llm_error.error_id}]: {e}") logger.error(f"LLM chat interaction failed [{llm_error.error_id}]", exc_info=True) raise llm_error from e - For tasks with multiple LLM calls, use the
messageparameter to distinguish them:LLMChatError(cause=e, message="LLM chat interaction 2 failed"). - Error classification:
classify_error()inusage_metrics.pymaps raw exception strings to short categories (invalid_json,timeout,rate_limit, etc.) stored inusage_metrics.jsonl. Unknown errors preserve a truncatederror_detailfield.
Pipeline Stages (worker_plan_internal/plan/nodes/)
Each Luigi pipeline task lives in its own file under stages/. This enables:
- Multiple agents working on different stages without merge conflicts
self_improve/targeting individual step files- Easy DAG insertion (create new file, update downstream
requires())
Convention for new stages
- Create
stages/<stage_name>.pywith one task class - Import
PlanTaskfromworker_plan_internal.plan.run_plan_pipeline - Import upstream task dependencies from sibling stage files
- Declare dependencies via
requires()returning upstream task(s) - Add the new task to
stages/full_plan_pipeline.py'srequires()dict
Framework location
run_plan_pipeline.py contains only shared framework:
PlanTask(base class for all stages)ExecutePipeline,HandleTaskCompletionParameters,PipelineProgress_task_class_to_step_label,configure_logging__main__entry point
Testing
- Prefer unit tests over manual server checks. Run
python test.pyfrom repo root; worker tests live underworker_plan/worker_plan_internal/**/testsandworker_plan/worker_plan_api/tests. - Error handling tests:
worker_plan/tests/test_llm_errors.pyandworker_plan/tests/test_usage_metrics.py.
Other versions1 project uses a version of this.
Word for word · 1
- PlanExeOrg/PlanExe★ 402100% same
Edited · 0
None found.
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 28,693 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository12 other files it gives its agents.
- AGENTS.mdAGENTS.md
- database_api/AGENTS.mdAGENTS.md
- docs/AGENTS.mdAGENTS.md
- frontend_multi_user/AGENTS.mdAGENTS.md
- llm_config/AGENTS.mdAGENTS.md
- mcp_cloud/AGENTS.mdAGENTS.md
- public/AGENTS.mdAGENTS.md
- self_improve/AGENTS.mdAGENTS.md
- tools/AGENTS.mdAGENTS.md
- worker_plan_database/AGENTS.mdAGENTS.md
- public/llms.txtllms.txt
- planexe-mcpSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

