-
Notifications
You must be signed in to change notification settings - Fork 1
ADR 002
Christian Prior-Mamulyan edited this page Jul 6, 2025
·
1 revision
Proposed
The MaestroTaskProcess template receives its input through a structured JSON argument (Request) with a flexible schema:
{
"version": "v1",
"request": {
"payload": { ... }
}
}While the outer structure is well-defined by schema, the inner payload is use-case-specific and varies between projects.
The template will not deserialize the request.payload internally. Instead:
- A placeholder file
RequestDeserializer.cswill be included. - Developers are expected to implement their own logic to extract and validate payload data from the raw JSON/dictionary.
This avoids hardcoding assumptions into the template and ensures that business logic remains decoupled from generic orchestration.
| Reason | Explanation |
|---|---|
| 🔄 Payload is project-specific | No single deserialization logic fits all use cases |
| 🧩 Separation of concerns | Template handles orchestration and status; developer handles business data |
| 🚀 Supports versioning | Developers can define their own adapters per version |
| 🧼 Avoids false abstraction | Pretending to handle payload generically would lead to brittle logic or over-engineering |
- Deserializing via JObject internally: Rejected due to complexity and low benefit.
- Schema-based validation in template: Not feasible since schema is unknown at template time.
- Template remains schema-compliant but payload-agnostic.
- Developer onboarding must clearly explain this responsibility.
- Input schema (
request-schema.v1.json) remains accurate and versionable.
- See ADR-001 (Amended): “Typed Internal Models with Custom (De)Serializers”
Christian Prior-Mamulyan cprior@gmail.com
Note
Help to improve this documentation. Submit feedback.
Copyright © 2025 Christian Prior-Mamulyan · License CC BY-SA 4.0