skills/architecture-explorer-headers/SKILL.md
Backfill `<!-- EXPLORER_HEADER ... -->` blocks into existing `docs/NN-*.md` and `docs/components/**/*.md` files that predate v3.14.0. The header (5–10 lines after the H1) surfaces key concepts, technologies, components, scope, and related ADRs in the first 60 lines so the architecture-explorer agent classifies the file accurately. Invoke when a doc was created before v3.14.0, when bulk-backfilling a legacy project, or whenever the explorer is misclassifying files.
npx skillsauth add shadowx4fox/solutions-architect-skills architecture-explorer-headersInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Manually activated when users want to add or refresh <!-- EXPLORER_HEADER --> blocks across architecture docs. This is a maintenance workflow, not part of the normal authoring loop. Use it:
architecture-explorer agent is routing files to irrelevant_files[] despite the file being clearly relevant — usually a missing or stale header.NOT activated for:
architecture-docs).architecture-component-guardian is the first-class writer of EXPLORER_HEADER blocks for docs/components/**/*.md (L1 descriptors and L2 containers) at create/update/migrate time. This backfill skill must NOT be used to fill gaps left by the guardian; reach for it only on legacy docs/NN-*.md files or to repair drift caused by external edits.architecture-definition-record).ARCHITECTURE.md at the project root is never touched by this skill — it is a navigation index and the explorer reads it in full.
/skill architecture-explorer-headers — interactive: scan, present plan, ask before writing./regenerate-explorer-headers — slash-command alias./regenerate-explorer-headers --force — overwrite existing headers (default behaviour skips files that already have one)./regenerate-explorer-headers --dry-run — list what would change, write nothing./regenerate-explorer-headers <path-glob> — restrict to a subset (e.g. docs/components/payment-service/**).plugin_dir: Glob for **/skills/architecture-explorer-headers/SKILL.md and strip the suffix; or read .claude/settings.json for extraKnownMarketplaces. Same approach as architecture-compliance.project_root: the current working directory. Verify ARCHITECTURE.md exists at the root — if not, abort with ARCHITECTURE.md not found at project root. This skill operates on architecture documentation.bun [plugin_dir]/skills/architecture-explorer-headers/utils/header-cli.ts list <project_root>
The CLI emits a JSON array, one entry per candidate file:
[
{ "path": "docs/01-system-overview.md", "has_header": false, "h1": "System Overview", "byte_size": 14820 },
{ "path": "docs/08-scalability-and-performance.md", "has_header": true, "h1": "Scalability & Performance", "byte_size": 18234 },
{ "path": "docs/components/payment-service.md", "has_header": false, "h1": "Payment Service", "byte_size": 9120 }
]
Parse it. Bucket files into:
has_header === false and the path is in scope (matches the <path-glob> argument if provided).has_header === true. With --force, treat these as needs_header too. Without --force, skip.ARCHITECTURE.md (excluded by the CLI).If the inventory is empty, report No docs need explorer headers. and exit.
Show the user a one-screen plan:
Architecture Explorer Headers — Backfill Plan
Project: <project_root>
Scope: <path-glob or "all docs">
Mode: <add-missing | --force | --dry-run>
Files to update (N):
- docs/01-system-overview.md (no header)
- docs/03-architecture-layers.md (no header)
- docs/components/payment-service.md (no header)
...
Files skipped (M):
- docs/08-scalability-and-performance.md (already has header — pass --force to overwrite)
- ARCHITECTURE.md (project root index — exempt by design)
Proceed? (yes / no / edit-scope)
Wait for confirmation. On --dry-run skip the prompt and end after this report.
For each file in needs_header:
Step 3.1 — Read the full file. You need the body to extract accurate metadata; do NOT cap reads here. (This skill is the inverse of the explorer — you are creating the metadata the explorer will later sample.)
Step 3.2 — Extract metadata. Build the EXPLORER_HEADER content from the file's actual content:
key_concepts — 5–15 domain terms that recur in the doc. Pull from H2/H3 headings, bold terms, table headers, and frequently-occurring capitalized phrases. Avoid generic words ("system", "approach", "data"); favor specific ones ("SLO", "MTTR", "idempotency", "circuit breaker"). Downstream skills (compliance, analysis, dev-handoff) filter the explorer's manifest by these terms when deciding which files to read — concrete, domain-specific vocabulary surfaces relevant docs; generic vocabulary surfaces nothing.technologies — concrete tools/products named in the doc (Prometheus, AWS, PostgreSQL 16, Spring Boot 3.3, etc.). Skip generic terms ("database", "API"). Preserve version numbers.components — kebab-case component names referenced in the doc. Match docs/components/<NN>-<slug>.md filenames. For component files themselves, use component_self: <slug> instead.scope — one short sentence (≤120 chars) describing what the doc covers and what it does NOT. Read the doc's intro paragraph to source this.related_adrs — ADR identifiers (ADR-NNN) referenced in the doc body or footer.component_self (component files only) — the component's kebab-case slug, derived from filename.component_type (component files only) — extract from **Type:** field in the file. If absent, omit the field.Step 3.3 — Compose the 30-second summary blockquote. One paragraph (≤300 chars) that complements the machine-readable header. Read for a reader who has 30 seconds to decide whether to read the full doc.
Step 3.4 — Insert via Edit.
Find the H1 line (^# ) in the file. The insertion goes immediately after the H1 and the blank line that should follow it.
# <existing H1>
<!-- EXPLORER_HEADER
key_concepts: <comma-separated>
technologies: <comma-separated>
components: <comma-separated> # OR `component_self:` + `component_type:` for component files
scope: <one sentence>
related_adrs: <ADR-NNN, ADR-NNN>
-->
> <30-second summary paragraph>
<existing body>
Use the Edit tool (not Write) so you preserve the rest of the file byte-for-byte.
Step 3.5 — Validate.
bun [plugin_dir]/skills/architecture-explorer-headers/utils/header-cli.ts validate <abs_path>
Exit code 0 = header parses cleanly and includes all required fields. Exit code 1 = malformed; revert the Edit, log the error, continue with the next file.
Print a summary table:
Architecture Explorer Headers — Backfill Complete
Updated: N files
Skipped: M files (already had headers; pass --force to overwrite)
Failed: K files (malformed header — Edit reverted)
Updated files:
✅ docs/01-system-overview.md
✅ docs/03-architecture-layers.md
✅ docs/components/payment-service.md
...
Failed files:
❌ docs/components/legacy-thing.md — header validation: missing 'scope' field
Suggest a follow-up: Want me to /schedule an agent to re-run this monthly? Stale headers degrade explorer accuracy over time.
ARCHITECTURE.md. It's a navigation index, exempt by design. The CLI's list subcommand excludes it.--force on a freshly-tuned project. Operators may have hand-curated headers; --force wipes that work. Default mode (skip-existing) is safe.header-cli.ts validate and revert on failure.docs/ and docs/components/. Headers are not for ADRs (ADRs have their own structure that the explorer reads natively) or for archive/v*/ snapshots (those are immutable).This skill needs the same Read, Edit, and Bash([plugin_dir]/skills/architecture-explorer-headers/utils/header-cli.ts list/validate) permissions as architecture-docs. The pre-configured .claude/settings.json.example already covers them.
Skill Version: 1.2.0 (v3.19.1 — drops --session mode + session editlog integration; the underlying PostToolUse hook had been silently broken since v3.14.1)
Specialization: Backfill EXPLORER_HEADER blocks into legacy architecture docs
development
Run risk and design-characteristics analyses over ARCHITECTURE.md documentation. Produces date-stamped reports in analysis/ covering ten lenses across two groups: HIGH-priority runtime/security — SPOF (single points of failure), Blast Radius (downstream cascade impact), Bottleneck (throughput chokepoints), Cost Hotspots (Pareto cost concentration), STRIDE (per-trust-boundary security threats); Strategic/sustainability — Vendor Lock-in (portability risk and exit cost), Latency Budget (per-hop SLO decomposition), Tech Debt/EOL (currency and deprecated tech), Coupling (fan-in/fan-out and cycles), Data Sensitivity (PII flow and encryption gaps). Each analysis can be requested individually, as a group, or all ten run in parallel. A consolidated Security Posture option (analysis 12) merges the STRIDE and Data Sensitivity reports into a single reviewer-fillable validation checklist of every security control to validate (markdown-only; exportable to a Word worksheet via architecture-docs-export). Output: analysis/<TYPE>-<YYYY-MM-DD>.md (default) OR analysis/<TYPE>-<YYYY-MM-DD>.html (interactive d3.js report; format is selected at runtime — Step 2.4). Requires ARCHITECTURE.md to exist (created by architecture-docs skill). Do NOT invoke for compliance contracts (use architecture-compliance), peer quality review (use architecture-peer-review), or ADR management (use architecture-definition-record).
development
On-demand export of architecture documents to professional Word (.docx) files. Exports are never automatic — invoke explicitly when ready to produce deliverables. Solution Architecture mode synthesizes an Executive Summary from docs/01-system-overview.md, the component index, and the compliance manifest (if present), then exports individual ADR docs. Handoff mode exports selected component development handoffs from handoffs/. Compliance mode exports selected compliance contracts from compliance-docs/. Security Posture mode exports the consolidated security validation checklist (analysis/SECURITY-POSTURE-<date>.md, from architecture-analysis) as a reviewer-fillable worksheet. IMPORTANT — this skill ONLY produces Word .docx files. It does NOT handle releasing, publishing, tagging, freezing, bumping, or finalizing an architecture version. For the Draft → Released lifecycle (git tag architecture-v{version}, archive snapshot, semver bump), use the `architecture-docs` skill (Workflow 10) instead. Do NOT invoke this skill when the user says "release my architecture", "release architecture", "publish architecture", "ship architecture", "tag architecture version", "freeze architecture", "bump architecture version", or "finalize architecture" — those route to `architecture-docs`.
testing
Generate Compliance Contracts (Contratos de Adherencia) from ARCHITECTURE.md files
testing
Use this skill whenever the user mentions deferred work, known compromises, shortcuts taken, "we'll fix this later," temporary workarounds, missing controls, or any architectural trade-off that should be made visible and tracked. Also trigger when arc42 Section 11 (Risks and Technical Debt) is being authored or updated, when a TDR / Technical Debt Record is requested by name, or when an ADR documents a decision that intentionally accepts debt. Do NOT use for general bug reports, feature requests, or backlog items — TDRs are for architectural or systemic compromises, not ordinary defects.