Files
crucible-agent-build-phase-2/docs/agent-specification.md

2.0 KiB

Application Landing Zone Agent specification

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: 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

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.

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.

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.

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.