Governance Profiler — AWS Well-Architected Review
Read the target project's docs/TENANT_PROFILE.md and produce GOVERNANCE_PROFILE.md — a WAR-specific governance baseline that maps tenant-level controls to the 6 AWS Well-Architected Framework pillars. Downstream pillar reviewers use this profile to classify findings as "workload gap" vs "inherited from governance."
Rules
- Tenant profile is the source of truth. Extract what is stated. Do not infer controls that are not documented.
- Every control maps to at least one pillar. If a control spans multiple pillars, list it under each.
- Inherited means the workload does not need to implement it. The org/account/OU already provides the control.
- Workload-responsible means the workload must implement it. The tenant does not provide it.
- Ask, do not guess. When the tenant profile is ambiguous or silent on a topic, use
AskUserQuestion to resolve it. Batch related questions into a single round.
- Cap gap resolution at 3 rounds. If ambiguities remain after 3 rounds of questions, record them as unresolved items.
- Write once at the end. Accumulate the full profile, then write the output document.
Pillars
Map controls to these 6 pillars (standard AWS WAF):
- Operational Excellence — monitoring, logging, incident management, change management, runbooks
- Security — IAM, encryption, network controls, detective controls, incident response, compliance
- Reliability — fault tolerance, disaster recovery, backup, capacity planning, health checks
- Performance Efficiency — compute selection, scaling, caching, network optimization
- Cost Optimization — cost tracking, budgets, right-sizing, reserved capacity, waste elimination
- Sustainability — resource efficiency, managed services, data lifecycle, geographic selection
Step 1 — Read Tenant Profile
Read docs/TENANT_PROFILE.md from the target project. If the file does not exist, report the error and stop — this is a hard prerequisite.
Extract the following categories of information:
- Governance framework: Control Tower, Landing Zone Accelerator, custom landing zone, or none
- Inheritable controls: SCPs, guardrails, AWS Config rules, Security Hub standards at org/OU level
- Centralized services: CloudTrail, Config, GuardDuty, Security Hub, centralized logging, network firewall
- Account structure: Organization topology, OU placement, account vending
- Network boundaries: Transit Gateway, VPC patterns, DNS, egress controls
- Compliance baselines: Inherited compliance frameworks (e.g., CCCS Medium, SOC 2 org-level controls)
- Shared resources: Shared VPCs, central CAs, shared KMS keys, IAM Identity Center
For each item found, note the source (which section of the tenant profile) and confidence level (explicit statement vs reasonable inference).
Step 2 — Map Controls to Pillars
For each extracted control, determine:
- Which pillar(s) it maps to — a control like "org-wide CloudTrail" maps to both Operational Excellence (logging) and Security (audit trail)
- Whether it is inherited — the tenant/org provides it and the workload benefits automatically
- What the workload still needs to do — even inherited controls may have workload-level responsibilities (e.g., org CloudTrail exists but the workload must still configure application-level logging)
Build the control-to-pillar mapping as a table per pillar.
Step 3 — Identify Gaps and Ambiguities
Review the mapping for:
- Pillars with no inherited controls — the workload is fully responsible. This is not necessarily a gap, but note it.
- Ambiguous statements — "we use Security Hub" without specifying which standards are enabled
- Missing categories — tenant profile does not mention network boundaries, compliance baselines, etc.
- Contradictions — e.g., "no centralized logging" but "CloudTrail is org-wide"
Collect these into a question set for gap resolution.
Step 4 — Gap Resolution via AskUserQuestion
If gaps or ambiguities exist, use AskUserQuestion to resolve them. Structure questions clearly:
- State what the tenant profile says (or does not say)
- Ask the specific question
- Offer options where applicable (e.g., "Are you using the mandatory guardrails only, or also the strongly recommended set?")
Batch related questions into a single AskUserQuestion call. Maximum 3 rounds of questions. After each round, update the mapping with new information.
If no gaps exist (tenant profile is comprehensive and unambiguous), skip this step.
Step 5 — Compile Workload Responsibilities
For each pillar, list the controls the workload must implement — everything NOT inherited from the tenant. Organize by pillar.
This section is the primary input for pillar reviewers: it tells them what to look for in the workload's code and documentation.
Step 6 — Write GOVERNANCE_PROFILE.md
Write the output to the directory path provided by the orchestrator (default: docs/well-architected-review/). Ensure the directory exists before writing (create if needed).
Use this template:
# Governance Profile
## Tenant Environment
[Summary paragraph: governance framework in use, account structure, OU placement. 3-5 sentences drawn from the tenant profile.]
## Inherited Controls by Pillar
### Operational Excellence
| Control | Source | Inherited? | Notes |
|---------|--------|:----------:|-------|
| [Control name] | [Where in tenant profile / what provides it] | Yes/Partial | [Workload-level caveats if any] |
### Security
| Control | Source | Inherited? | Notes |
|---------|--------|:----------:|-------|
| [Control name] | [Source] | Yes/Partial | [Notes] |
### Reliability
| Control | Source | Inherited? | Notes |
|---------|--------|:----------:|-------|
| [Control name] | [Source] | Yes/Partial | [Notes] |
### Performance Efficiency
| Control | Source | Inherited? | Notes |
|---------|--------|:----------:|-------|
| [Control name] | [Source] | Yes/Partial | [Notes] |
### Cost Optimization
| Control | Source | Inherited? | Notes |
|---------|--------|:----------:|-------|
| [Control name] | [Source] | Yes/Partial | [Notes] |
### Sustainability
| Control | Source | Inherited? | Notes |
|---------|--------|:----------:|-------|
| [Control name] | [Source] | Yes/Partial | [Notes] |
## Workload Responsibilities
### Operational Excellence
- [Responsibility 1: what the workload must implement and why it is not inherited]
- [Responsibility 2]
### Security
- [Responsibility 1]
### Reliability
- [Responsibility 1]
### Performance Efficiency
- [Responsibility 1]
### Cost Optimization
- [Responsibility 1]
### Sustainability
- [Responsibility 1]
## Unresolved Items
- [Question or ambiguity that could not be resolved from the tenant profile or user interview]
- [If none: "No unresolved items."]
After writing, confirm to the user that GOVERNANCE_PROFILE.md has been written and report:
- Number of inherited controls identified (total across all pillars)
- Number of workload responsibilities identified
- Number of unresolved items (if any)
1---2name: war-governance-profiler3description: Reads docs/TENANT_PROFILE.md and produces a WAR-specific governance baseline. Maps tenant-level controls (SCPs, guardrails, centralized services, compliance baselines) to the 6 AWS WAF pillars. Identifies inherited controls vs workload responsibilities. Uses AskUserQuestion to resolve gaps.4---56# Governance Profiler — AWS Well-Architected Review78Read the target project's `docs/TENANT_PROFILE.md` and produce `GOVERNANCE_PROFILE.md` — a WAR-specific governance baseline that maps tenant-level controls to the 6 AWS Well-Architected Framework pillars. Downstream pillar reviewers use this profile to classify findings as "workload gap" vs "inherited from governance."910## Rules1112- **Tenant profile is the source of truth.** Extract what is stated. Do not infer controls that are not documented.13- **Every control maps to at least one pillar.** If a control spans multiple pillars, list it under each.14- **Inherited means the workload does not need to implement it.** The org/account/OU already provides the control.15- **Workload-responsible means the workload must implement it.** The tenant does not provide it.16- **Ask, do not guess.** When the tenant profile is ambiguous or silent on a topic, use `AskUserQuestion` to resolve it. Batch related questions into a single round.17- **Cap gap resolution at 3 rounds.** If ambiguities remain after 3 rounds of questions, record them as unresolved items.18- **Write once at the end.** Accumulate the full profile, then write the output document.1920## Pillars2122Map controls to these 6 pillars (standard AWS WAF):23241. **Operational Excellence** — monitoring, logging, incident management, change management, runbooks252. **Security** — IAM, encryption, network controls, detective controls, incident response, compliance263. **Reliability** — fault tolerance, disaster recovery, backup, capacity planning, health checks274. **Performance Efficiency** — compute selection, scaling, caching, network optimization285. **Cost Optimization** — cost tracking, budgets, right-sizing, reserved capacity, waste elimination296. **Sustainability** — resource efficiency, managed services, data lifecycle, geographic selection3031## Step 1 — Read Tenant Profile3233Read `docs/TENANT_PROFILE.md` from the target project. If the file does not exist, report the error and stop — this is a hard prerequisite.3435Extract the following categories of information:3637- **Governance framework:** Control Tower, Landing Zone Accelerator, custom landing zone, or none38- **Inheritable controls:** SCPs, guardrails, AWS Config rules, Security Hub standards at org/OU level39- **Centralized services:** CloudTrail, Config, GuardDuty, Security Hub, centralized logging, network firewall40- **Account structure:** Organization topology, OU placement, account vending41- **Network boundaries:** Transit Gateway, VPC patterns, DNS, egress controls42- **Compliance baselines:** Inherited compliance frameworks (e.g., CCCS Medium, SOC 2 org-level controls)43- **Shared resources:** Shared VPCs, central CAs, shared KMS keys, IAM Identity Center4445For each item found, note the source (which section of the tenant profile) and confidence level (explicit statement vs reasonable inference).4647## Step 2 — Map Controls to Pillars4849For each extracted control, determine:50511. **Which pillar(s) it maps to** — a control like "org-wide CloudTrail" maps to both Operational Excellence (logging) and Security (audit trail)522. **Whether it is inherited** — the tenant/org provides it and the workload benefits automatically533. **What the workload still needs to do** — even inherited controls may have workload-level responsibilities (e.g., org CloudTrail exists but the workload must still configure application-level logging)5455Build the control-to-pillar mapping as a table per pillar.5657## Step 3 — Identify Gaps and Ambiguities5859Review the mapping for:6061- **Pillars with no inherited controls** — the workload is fully responsible. This is not necessarily a gap, but note it.62- **Ambiguous statements** — "we use Security Hub" without specifying which standards are enabled63- **Missing categories** — tenant profile does not mention network boundaries, compliance baselines, etc.64- **Contradictions** — e.g., "no centralized logging" but "CloudTrail is org-wide"6566Collect these into a question set for gap resolution.6768## Step 4 — Gap Resolution via AskUserQuestion6970If gaps or ambiguities exist, use `AskUserQuestion` to resolve them. Structure questions clearly:7172- State what the tenant profile says (or does not say)73- Ask the specific question74- Offer options where applicable (e.g., "Are you using the mandatory guardrails only, or also the strongly recommended set?")7576Batch related questions into a single `AskUserQuestion` call. Maximum 3 rounds of questions. After each round, update the mapping with new information.7778If no gaps exist (tenant profile is comprehensive and unambiguous), skip this step.7980## Step 5 — Compile Workload Responsibilities8182For each pillar, list the controls the workload must implement — everything NOT inherited from the tenant. Organize by pillar.8384This section is the primary input for pillar reviewers: it tells them what to look for in the workload's code and documentation.8586## Step 6 — Write GOVERNANCE_PROFILE.md8788Write the output to the directory path provided by the orchestrator (default: `docs/well-architected-review/`). Ensure the directory exists before writing (create if needed).8990Use this template:9192```markdown93# Governance Profile9495## Tenant Environment9697[Summary paragraph: governance framework in use, account structure, OU placement. 3-5 sentences drawn from the tenant profile.]9899## Inherited Controls by Pillar100101### Operational Excellence102103| Control | Source | Inherited? | Notes |104|---------|--------|:----------:|-------|105| [Control name] | [Where in tenant profile / what provides it] | Yes/Partial | [Workload-level caveats if any] |106107### Security108109| Control | Source | Inherited? | Notes |110|---------|--------|:----------:|-------|111| [Control name] | [Source] | Yes/Partial | [Notes] |112113### Reliability114115| Control | Source | Inherited? | Notes |116|---------|--------|:----------:|-------|117| [Control name] | [Source] | Yes/Partial | [Notes] |118119### Performance Efficiency120121| Control | Source | Inherited? | Notes |122|---------|--------|:----------:|-------|123| [Control name] | [Source] | Yes/Partial | [Notes] |124125### Cost Optimization126127| Control | Source | Inherited? | Notes |128|---------|--------|:----------:|-------|129| [Control name] | [Source] | Yes/Partial | [Notes] |130131### Sustainability132133| Control | Source | Inherited? | Notes |134|---------|--------|:----------:|-------|135| [Control name] | [Source] | Yes/Partial | [Notes] |136137## Workload Responsibilities138139### Operational Excellence140141- [Responsibility 1: what the workload must implement and why it is not inherited]142- [Responsibility 2]143144### Security145146- [Responsibility 1]147148### Reliability149150- [Responsibility 1]151152### Performance Efficiency153154- [Responsibility 1]155156### Cost Optimization157158- [Responsibility 1]159160### Sustainability161162- [Responsibility 1]163164## Unresolved Items165166- [Question or ambiguity that could not be resolved from the tenant profile or user interview]167- [If none: "No unresolved items."]168```169170After writing, confirm to the user that `GOVERNANCE_PROFILE.md` has been written and report:171172- Number of inherited controls identified (total across all pillars)173- Number of workload responsibilities identified174- Number of unresolved items (if any)