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:
2026-08-31 14:42:05 +00:00
parent 14a36dc002
commit de9facf433
15 changed files with 373 additions and 2 deletions

View File

@@ -0,0 +1,38 @@
# Application landing zone agent specification
## Purpose
Transform application requirements into a reviewable Technical Solution Design and an editable draw.io architecture diagram. The agent proposes a conservative landing-zone view; it does not provision cloud resources or invent unprovided compliance claims.
## Input contract
JSON object:
- `application_name` (string, required)
- `business_context` (string, required)
- `environments` (array of strings, optional)
- `components` (array of objects with required `name`, optional `type`, `technology`, `description`)
- `integrations` (array of strings or objects, optional)
- `constraints`, `non_functional_requirements`, `assumptions` (arrays of strings, optional)
Unknown fields are preserved in the TSD assumptions section only when explicitly listed; malformed known fields fail validation.
## Output contract
`GenerationResult` has `tsd_markdown`, `drawio_xml`, and `validation` (`valid`, `errors`, `warnings`). The CLI writes the configured filenames and a `validation.json` report.
## Workflow
1. Validate and normalize requirements without making network calls.
2. Build a deterministic logical architecture model, retaining named components and integrations.
3. Render the TSD with scope, requirements, environment strategy, component inventory, integration/security considerations, operational concerns, assumptions, and decisions needed.
4. Render native draw.io XML with title, environment/container layers, components, and directional edges. IDs are stable (`component-<index>`, `integration-<index>`).
5. Validate required TSD headings and XML structure, then write output atomically through the CLI.
## Diagram requirements
The diagram must open in draw.io/diagrams.net as `mxfile`, contain an `mxGraphModel`, use `vertex` cells for components and `edge` cells for relationships, and use escaped XML labels. It must show application components and external integrations, with clear layer/container labels. It may not contain executable code or credentials.
## Validation and errors
Missing required strings, non-object components, blank component names, malformed integration objects, or empty arrays where a list is supplied produce actionable errors. The CLI prints the error and exits 2. Rendering failures exit 1. The library never silently drops a named component.

View File

@@ -0,0 +1,21 @@
# Repository convention discovery (Step 0)
No template or target URL was supplied with the request, so this repository records the conventions used as the implementation baseline rather than claiming an external inspection. The baseline follows a conventional Python agent layout: `src/` package, `tests/` unittest suite, `config/` JSON configuration, `docs/` contract material, and a CLI entry point.
## Required structure
- `src/application_landing_zone_agent/`: importable implementation and CLI.
- `tests/`: unit and contract tests runnable with `python -m unittest discover -s tests`.
- `config/default.json`: checked-in, dependency-free configuration.
- `docs/agent-specification.md`: behavior, contracts, workflow, and validation.
- `examples/`: human-reviewable input fixture.
- `pyproject.toml`: package metadata and console script.
## Conventions extracted for this build
- Public behavior is exposed through a small class (`LandingZoneAgent`) and a CLI adapter.
- Input/output boundaries are typed dataclasses and JSON/Markdown/XML files.
- Generation is deterministic: stable IDs, ordering, and formatting make output reviewable in source control.
- Validation happens before files are written and is also available as a public function.
- Diagram output is native draw.io `mxfile` XML, not an image or proprietary binary.
- Errors are actionable `ValidationError`/`GenerationError` exceptions; CLI maps them to a non-zero exit code.

11
docs/validation.md Normal file
View File

@@ -0,0 +1,11 @@
# Validation evidence (Steps 3 and 4)
The committed validation suite covers:
- input contract failures and successful normalization;
- deterministic TSD generation and required headings;
- parseable native draw.io XML with vertices and edges;
- CLI packaging behavior and the three expected output files;
- checked-in `pyproject.toml`, configuration, example, specification, and source layout.
Run `python -m unittest discover -s tests -v` from the repository root. Run the documented CLI command to perform a human review of `build/example/tsd.md` and open `build/example/architecture.drawio` in diagrams.net. Publication is represented by the commit created for this deliverable; no remote URL was supplied by the requester, so push status is limited to the scaffold commit operation.