# Agent Output Directory

This directory contains all non-Bicep artifacts generated by the 7-step Agentic Workflow.
Each project gets its own subfolder with step-prefixed files for easy navigation.

## Directory Structure

```text
agent-output/
├── {project-name}/                      # One folder per project
│   ├── README.md                        # Auto-generated project index
│   ├── 01-requirements.md               # Step 1: Requirements from @plan
│   ├── 02-architecture-assessment.md    # Step 2: WAF assessment
│   ├── 03-des-diagram.py                # Step 3: Design diagram source
│   ├── 03-des-diagram.png               # Step 3: Design diagram image
│   ├── 03-des-cost-estimate.md          # Step 3: Design cost estimate
│   ├── 03-des-adr-001-{title}.md        # Step 3: Design ADR(s)
│   ├── 04-implementation-plan.md        # Step 4: Infrastructure plan
│   ├── 04-governance-constraints.md     # Step 4: Azure Policy constraints
│   ├── 05-implementation-reference.md   # Step 5: Link to Bicep code
│   ├── 06-deployment-summary.md         # Step 6: Deployment summary
│   ├── 07-ab-diagram.py                 # Step 7: As-built diagram source
│   ├── 07-ab-diagram.png                # Step 7: As-built diagram image
│   ├── 07-ab-adr-001-{title}.md         # Step 7: As-built ADR(s)
│   ├── 07-documentation-index.md        # Step 7: Documentation master index
│   ├── 07-design-document.md            # Step 7: Comprehensive design document
│   ├── 07-operations-runbook.md         # Step 7: Operational procedures
│   ├── 07-resource-inventory.md         # Step 7: Resource inventory from IaC
│   ├── 07-compliance-matrix.md          # Step 7: Security controls mapping
│   └── 07-backup-dr-plan.md             # Step 7: Backup and DR procedures
└── README.md                            # This file
```

## Naming Conventions

| Step | Prefix | Artifact Types                                                                          |
| ---- | ------ | --------------------------------------------------------------------------------------- |
| 1    | `01-`  | `requirements.md` (saved by azure-principal-architect from @plan context)               |
| 2    | `02-`  | `architecture-assessment.md` (WAF assessment only)                                      |
| 3    | `03-`  | `des-diagram.*`, `des-cost-estimate.md`, `des-adr-NNN-{title}.md` (design artifacts)    |
| 4    | `04-`  | `implementation-plan.md`, `governance-constraints.md`                                   |
| 5    | `05-`  | `implementation-reference.md` (links to `infra/bicep/{project}/`)                       |
| 6    | `06-`  | `deployment-summary.md`                                                                 |
| 7    | `07-`  | `ab-diagram.*`, `ab-adr-NNN-*.md`, `documentation-index.md`, `design-document.md`, etc. |

> **Note**: Step 1 requirements are captured by `@plan` and saved by `azure-principal-architect`.
> Step 5 Bicep code lives in `infra/bicep/{project}/`. Step 6 is deployment.
> Step 7 combines as-built diagrams, ADRs, and workload documentation.

## Project Name

When starting a new workflow with `@plan`, you'll be prompted for a project name.
This name is used to create the project folder and is inherited by all subsequent agents.

If an `agent-output/{project}/` folder already exists, agents will suggest reusing it
to continue work on an existing project.

## Auto-Generated Project README

Each project folder contains a `README.md` that serves as an index of all generated artifacts.
This file is automatically updated by agents as they create new outputs.

### Template

```markdown
# {Project Name} - Agent Outputs

**Created**: {date}
**Last Updated**: {date}

## Workflow Progress

- [ ] Step 1: Requirements (@plan)
- [ ] Step 2: Architecture (azure-principal-architect)
- [ ] Step 3: Design Artifacts (diagram-generator, adr-generator)
- [ ] Step 4: Planning (bicep-plan)
- [ ] Step 5: Implementation (bicep-implement)
- [ ] Step 6: Deploy
- [ ] Step 7: As-Built Artifacts (diagrams, ADRs, workload docs)

## Generated Artifacts

| File                                                             | Description    | Created |
| ---------------------------------------------------------------- | -------------- | ------- |
| [01-requirements.md](./01-requirements.md)                       | Requirements   | {date}  |
| [02-architecture-assessment.md](./02-architecture-assessment.md) | WAF assessment | {date}  |
| ...                                                              | ...            | ...     |

## Related Resources

- **Bicep Code**: [`infra/bicep/{project}/`](../../infra/bicep/{project}/)
- **Scenarios**: [`scenarios/`](../../scenarios/)
```

## Existing Demo Outputs

Legacy demo outputs in the following locations are preserved for demonstration purposes:

- `docs/adr/` - Global Architecture Decision Records
- `docs/diagrams/` - Workflow and architecture diagrams

New projects should use this `agent-output/` structure exclusively.
