decomposer: generate deliverable files for Inspect the single_agent template and target repository conventions to identify the required project structure, configuration, interfaces, and implementation patterns for the application landing zone agent.; Define the application landing zone agent's behavior, input and output contracts, document-generation workflow, and architecture-diagram requirements using the extracted template conventions.; Validate the implemented application_landing_zone_agent by running repository tests and checking the TSD document generation, draw.io diagram generation, agent packaging, configuration, and committed implementation against the defined contracts.; Commit and push the validated application_landing_zone_agent implementation to the target repository.
This commit is contained in:
@@ -1,24 +1,23 @@
|
||||
# Application landing zone agent specification
|
||||
# Application Landing Zone Agent specification
|
||||
|
||||
**Name:** `application_landing_zone_agent`
|
||||
|
||||
**Purpose:** Transform application requirements into a reviewable Technical Solution Design and an editable draw.io architecture diagram.
|
||||
## Purpose
|
||||
Transform structured application requirements into a provider-neutral Technical Solution Design (TSD) and an editable draw.io architecture diagram. The agent is deterministic, review-first, and does not invent provider-specific resources when the input is silent.
|
||||
|
||||
## Input contract
|
||||
JSON object fields: required `application_name`, `business_context`, `environments` (non-empty array), `data_classification`, `availability_target`; optional array fields `components`, `integrations`, `constraints`.
|
||||
JSON object: `application_name` (string), `business_objective` (string), and `environments` (non-empty string array) are required. Optional arrays are `requirements`, `constraints`, and `integrations`; optional strings are `data_classification`, `availability_target`, and `region`.
|
||||
|
||||
## Output contract
|
||||
`generate()` returns `{tsd: string, drawio: string, manifest: object}`. The CLI writes `tsd.md`, `architecture.drawio`, and `manifest.json`.
|
||||
The agent writes `tsd.md`, `architecture.drawio` (native mxGraph XML), and `manifest.json` to the requested output directory. It returns their paths plus in-memory content. The manifest identifies formats and artifact paths.
|
||||
|
||||
## Workflow
|
||||
1. Parse and validate the requirements.
|
||||
2. Apply safe baseline assumptions and identify unresolved decisions.
|
||||
3. Generate TSD sections for context, scope, architecture, environments, security, resilience, operations, constraints, and acceptance criteria.
|
||||
4. Generate an XML draw.io file with users, application boundary, components, and orthogonal relationships.
|
||||
5. Validate artifact structure and return the manifest.
|
||||
## Processing workflow
|
||||
1. Parse JSON and validate required fields and array types.
|
||||
2. Normalize defaults for omitted governance fields.
|
||||
3. Render a TSD covering summary, requirements, environments, security, reliability, delivery, and decisions.
|
||||
4. Render an XML diagram with users, edge controls, application tier, data tier, and cross-cutting operations.
|
||||
5. Persist artifacts and a machine-readable manifest.
|
||||
|
||||
## Diagram requirements
|
||||
The diagram must be importable by draw.io, use an `<mxfile>` root and `<mxGraphModel>`, include vertex cells for the users, application, and components, and include relationships. It must remain editable XML rather than an image.
|
||||
## Validation and error handling
|
||||
Reject missing required fields, non-list environment values, and arrays containing non-strings with `ValueError`; CLI reports an error and exits 2. XML must parse, the diagram must contain an `mxGraphModel`, and the TSD must contain security and reliability sections. Ambiguous architecture decisions are recorded as decisions required, not silently resolved.
|
||||
|
||||
## Validation and errors
|
||||
Missing required fields, malformed types, and empty environments raise `ValueError` with actionable field names. A diagram contract failure raises `RuntimeError`. No credentials are inferred or emitted.
|
||||
## Conventions discovered
|
||||
The implementation uses a `src/` package layout, `pyproject.toml` configuration, a thin public agent class, a CLI entry point, Markdown documentation, pytest tests, and native draw.io XML. These conventions are recorded here because the source template/target URLs were not provided in the request; the repository remains self-contained and provider-neutral.
|
||||
|
||||
Reference in New Issue
Block a user