Skill 44 · AWS Well Architected Review
Subchapter 44.4
references/phase-live-inventory.mdMarkdown8 KBView on GitHub
Build a complete, validated inventory of every live Well-Architected
question and best practice before any assessment begins. ASSESS MUST NOT
start until the corpus validator passes.
Prefer the AWS MCP server’s documentation reader — aws___read_documentation
(call shape: {"requests":[{"url": "...", "max_length": 100000}]}) — when it is
available. When the AWS MCP server is unavailable, fetch the same
docs.aws.amazon.com URLs over HTTPS with the environment’s web-fetch tool (the
TOC index below is plain JSON that any HTTPS fetch returns intact). If no
documentation access exists at all, enumerate from internal knowledge and disclose
that the inventory could not be verified live. Do not depend on any
non-public/internal MCP, and do not use semantic search to enumerate.
Two facts that determine the method (both verified live):
Read the framework table of contents:
https://docs.aws.amazon.com/wellarchitected/latest/framework/toc-contents.jsonIt returns a JSON tree of the whole framework:
{ "contents": [
{ "title": "Operational excellence", "href": "operational-excellence.html", "contents": [
{ "title": "OPS 1. How do you determine what your priorities are?", "href": "ops-01.html", "contents": [
{ "title": "OPS01-BP01 Evaluate external customer needs", "href": "ops_priorities_ext_cust_needs.html" },
{ "title": "OPS01-BP02 Evaluate internal customer needs", "href": "ops_priorities_int_cust_needs.html" }
] }
] }
] }Walk the tree recursively. Classify each node by its title / href using
general patterns — do NOT hardcode the pillar prefixes, so any pillar AWS adds or
renames is picked up automatically:
title matches ^[A-Z]{2,5}\d{2}-BP\d{2}\b.
Record: bp_id (the matched ID), bp_title (the remainder of the title),
bp_url (base + href), question_id (the PILLAR## prefix of the matched ID),
pillar_id/pillar_name (derived from the prefix and the enclosing pillar node’s
title).href matches ^[a-z]{2,5}-\d{2}\.html$ (the lowercased
pillar stem plus question number). Record its title and href to enrich the
question’s question_title and question_url.Base for relative hrefs: https://docs.aws.amazon.com/wellarchitected/latest/framework/.
Notes:
SEC02-BP0x implies
question SEC02); enrich each with the title/URL from its question node when
present. This is robust to the index listing best practices under both the pillar
and appendix branches — dedupe best practices by bp_id.Parse the index into records in one pass and MUST NOT re-quote the raw index afterward. Persist records as you go; do not narrate the tree.
Write one record per best practice to corpus/best-practices.jsonl and one per
question to corpus/questions.jsonl, in the run-local working directory you create at
the start of this stage (the corpus/ folder — scratch state only, never part of the
delivered report). If that working directory is backed by persistent storage, ensure
encryption at rest is enabled (see security considerations).
Best-practice record (wa-review.corpus.v1):
{
"schema_version": "wa-review.corpus.v1",
"pillar_id": "operational-excellence",
"pillar_name": "Operational Excellence",
"question_id": "OPS01",
"question_title": "OPS 1. How do you determine what your priorities are?",
"question_url": "https://docs.aws.amazon.com/wellarchitected/latest/framework/ops-01.html",
"bp_id": "OPS01-BP01",
"bp_title": "Evaluate external customer needs",
"bp_url": "https://docs.aws.amazon.com/wellarchitected/latest/framework/ops_priorities_ext_cust_needs.html",
"retrieved_at": "2026-09-08T12:00:00Z"
}Write corpus/manifest.json with counts, per-pillar question counts, provenance
(index URL + UTC retrieval time), and a validation verdict. The validator MUST
confirm:
PILLAR##-BP##; BP IDs are unique after dedupe.A parse that yields zero BP IDs, or fewer than a sanity floor, is an acquisition failure — go to Recovery. Never invent a BP ID to fill a gap. As a post-hoc sanity check recorded in the manifest, confirm each discovered pillar carries a non-trivial number of best practices (> 0, with a plausible spread across pillars rather than one pillar holding almost all of them) — do not pin the check to specific question or BP totals. The parsed live index is the sole source of truth for the inventory.
If toc-contents.json is unavailable (HTTP/parse error) or yields no best practices:
Retry the index read once.
If still failing, fall back to construct-and-iterate over question pages, which
the reader supports even though it strips links. First discover the current set of
pillar stems dynamically: read the framework appendix page (or the framework landing
page) and take the lowercased stem of each pillar it lists — do not start from a
hardcoded stem list, so a newly added pillar is still covered. Then, for each
discovered stem, read <base><stem>-01, -02, … (i.e. <stem>-NN), incrementing
until the page is missing — that missing page is the clean pillar boundary, wherever
it falls, so do not assume a fixed per-pillar question count. Each question page lists
its PILLAR##-BP## IDs as text; derive question_id from the BP prefix (not the
heading, which varies: SEC 2. vs SUS 6).
The page suffix and the missing-page signal depend on the retrieval tool. The
canonical pages are served as .html (e.g. operational-excellence.html, ops-01.html):
aws___read_documentation: request the markdown-suffixed form the reader accepts
(verified live) — <base>appendix.md, then <base><stem>-NN.md — and stop when a read
returns the reader’s sentinel string "Documentation page not found."..html form —
<base>appendix.html, then <base><stem>-NN.html (a plain HTTPS fetch of a .md
suffix 404s because the site serves .html) — and stop on an HTTP 404.To relocate a specific moved page, use aws___search_documentation when the AWS MCP server is
available; otherwise use the environment’s web-search tool scoped to docs.aws.amazon.com over
HTTPS; if neither is available, skip the relocated page and note the gap in the coverage audit.
Use this ONLY to relocate a moved page — never to supply BP IDs.
Read the index live for every review. Do not reuse a prior run’s manifest as current content unless the user explicitly authorizes a cache whose freshness policy is disclosed in the coverage audit.
ACQUIRE_CORPUS -> ASSESS only when corpus/manifest.json reports valid: true. The
frozen manifest is the sole authority for the expected question and BP sets used by
per-question validation, derivation, and the final report validator.