Feature Placement¶
Purpose¶
This is the shortest possible answer to “where should this feature go?”.
Read architecture.md first if the
boundary between agent/* and the legacy runtime is unclear.
Use this file for fast triage before reading the longer
algorithm-integration-guide.md. After choosing the matching row
below, read only the guide sections relevant to that change type for interface, schema, test,
example, and benchmark expectations.
Maintenance rule:
If a change adds a new workflow, capability family, persisted artifact type, or changes the recommended ownership for a feature, update this table in the same change.
Decision Table¶
You are adding |
Primary files/packages |
Notes |
|---|---|---|
A new MCP tool that exposes an existing workflow |
|
Keep business logic out of |
A new package CLI command that exposes an existing user workflow |
|
Keep |
A new user-mode training capability or model family choice |
|
Add stable keys, summaries, dataset compatibility, allowed overrides, CV support metadata, translation guidance, constraint notes, and examples |
A new user-mode request field or override validation rule |
|
Compiler owns validation and normalization of user input, including |
A new analysis workflow |
|
Registry declares the workflow, compiler validates inputs, executor runs it |
A new persisted request/artifact handle |
|
Add both record persistence and typed facade accessors |
A new execution workflow that stitches existing pieces together |
|
Executor owns orchestration and workflow results; durable subprocess entrypoints such as async training workers belong in focused modules under |
A new model family or variant implementation |
|
Implementation first, registry exposure second |
A new training phase kind |
|
Runtime phase semantics do not belong in MCP adapters |
A new checkpoint compatibility behavior |
|
Keep the public |
A new low-level runtime, transform, or batching behavior |
|
Do not route this through |
A new numerical primitive or solver |
|
Keep numerics isolated from agent/MCP concerns |
A new spectral runtime or adapter behavior |
|
Library behavior first, user-facing exposure second |
Follow-Up Guide Sections¶
After the decision table identifies the likely owner, use this map to read the focused parts of algorithm-integration-guide.md:
Triage result |
Read these guide sections |
|---|---|
MCP tool, user-facing capability, request validation, execution workflow, or persisted handle |
|
Model family or variant |
|
Training phase or optimizer behavior |
|
Analysis workflow or spectral adapter |
|
Core runtime, transform, batching, or data structure |
|
Numerical primitive or solver |
|
Runnable example or benchmark |
|
Rules of Thumb¶
If the change introduces a new stable user-facing key, start in
agent/registry/*.If the change turns file paths or CLI config into a workflow request, put the path/config adaptation in
agent/app/*, then call the same compiler/executor path as MCP user mode.If the change teaches clients how to translate natural language into a user-mode request, put that guidance in
agent/registry/*, not in MCP adapters or runtime code.If the change validates or normalizes user input, start in
agent/compiler/*.If the change coordinates multiple steps, start in
agent/exec/*.If the change stores something under a handle, start in
agent/store/*andagent/facade/*.If the change is model/math/runtime behavior, it probably does not belong in
agent/*.If you need to touch
server.py, you usually also need to touch a tool adapter first.
Common Mistakes¶
Putting workflow logic directly in
src/dymad/agent/mcp/server.pyRouting package CLI configs directly into trainers instead of through
agent/app, compiler, and executor boundariesAdding user-mode string parsing to
demo_tools.pyinstead ofcompiler/*Adding registry-style metadata ad hoc inside executor methods
Adding persistence behavior directly in executor methods instead of the store/facade layer
Treating
agent/*as the place for numerical or model implementation details
Test Pointers¶
Change type |
Start with these tests |
|---|---|
MCP mode/tool registration |
|
Package CLI commands and path-first user workflows |
|
Training capability/compiler changes |
|
Analysis workflow changes |
|
Persisted handle/store/facade changes |
|
Checkpoint boundary changes |
|
Training runtime/phase changes |
|
If Unsure¶
Start from the user-facing outcome:
Stable capability name or workflow choice:
registry/*Request validation and compile step:
compiler/*Execution path:
exec/*Durable artifact state:
facade/*andstore/*Actual model/runtime/math behavior: implementation packages