| name | titan-workflow-architecture |
| description | Choose the correct Titan architecture for new workflow code. Use when deciding between command steps, project steps, operations, clients, services, plugin registration, or project versus plugin layout, or when the user asks how much architecture is justified. |
| disable-model-invocation | false |
| user-invocable | false |
Titan Workflow Architecture
Decide the smallest correct architecture for workflow-related code.
Goal
Prevent both under-design and over-design.
Target Types
Decide which target you are designing for first:
project
Workflow and supporting code under .titan/.
plugin
Workflow and supporting code inside a plugin package.
Decision Rules
1. Prefer orchestration first
Use:
- workflow extension
- nested workflow
- command step
before adding Python.
2. Add a project step when orchestration is not enough
Create a project step when the workflow needs:
- branching logic
- prompts or
ctx.textual
- metadata flow
- Python-only integration code
3. Extract operations when logic becomes reusable
Create an operation when you see:
- parsing
- filtering
- ranking
- validation
- domain orchestration
that would clutter the step.
4. Create clients only for real reusable integrations
Use references/when-to-create-client.md.
Do not create a client unless there is a stable domain or integration worth reusing.
5. Use plugin-like project layout when the domain deserves it
For reusable domains, prefer a project layout that resembles a plugin while staying compatible with Titan project-step discovery.
See references/plugin-like-project-architecture.md.
6. Distinguish project discovery from plugin registration
For projects:
- runtime entrypoints for project steps stay under
.titan/steps/**
For plugins:
- steps are exposed through plugin registration
- workflow files live under the plugin package
- registration structure is part of the architecture, not an implementation detail
References
references/when-to-use-command-vs-step.md
references/when-to-create-operation.md
references/when-to-create-client.md
references/plugin-like-project-architecture.md
references/layer-boundaries.md
references/project-vs-plugin-architecture.md
Assets
assets/project-step-template.py
assets/operation-template.py
assets/client-template.py