skills/architecture/architecture-document-existing/SKILL.md
Infers and documents architecture from an existing codebase. Use when the codebase has no or minimal architecture docs; produces arc42-aligned documentation.
npx skillsauth add pkuppens/pkuppens architecture-document-existingInstall 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.
Infers and documents architecture from an existing codebase. Use when structure exists in code but docs are missing (Retrofitting mode).
99-open-issues.md rather than inventingREADME.md, /docs/* — project purpose, setuppackage.json, pyproject.toml, requirements.txt — dependenciesDockerfile, docker-compose.yml — deployment topology.github/workflows/ — CI/CD pipelinemain.py, app.py, index.ts.env.example, config/docs/architecture/ — if missing, create directory and write inferred sections99-open-issues.md for anything that can't be inferredCreate or update:
docs/architecture/00-system-architecture.md — executive overview (inferred)docs/architecture/04-solution-strategy.md — inferred from code patternsdocs/architecture/05-building-blocks.md — from package/module structuredocs/architecture/adr/ — optional inferred decisionsdocs/architecture/99-open-issues.md — unknowns and options# Building Blocks (arc42 §5) — Inferred
## Inferred structure
[From package layout, imports, entry points]
| Path | Responsibility (inferred) | Confidence |
|------|---------------------------|------------|
| `src/backend/` | [inferred from structure] | High/Medium/Low |
| `src/frontend/` | [inferred from structure] | High/Medium/Low |
Open issues format (use in 99-open-issues.md):
## [Issue Title]
**Context**: What we know
**Question**: What we need to decide
**Options**:
1. Option A (pros/cons)
2. Option B (pros/cons)
3. Option C (pros/cons)
**Recommendation**: [if any]
**Decision**: [when resolved, link to ADR]
Response structure: Return results as: (1) Inferred project purpose (Facts/Assumptions/Unknowns), (2) Component inventory with delegation list, (3) Abstraction inventory, (4) Current baseline summary, (5) Drift/risks and Open Issue links, (6) Generated/updated docs, (7) Migration programme summary if needed, (8) Open issues summary.
Initial baseline guidance: Produce a "good enough" baseline — 1–2 paragraphs per component initially. Focus on getting structure right; details can evolve. Delegate to architecture-building-blocks for component/abstraction details, architecture-runtime for flows, architecture-decisions for ADRs.
testing
Syncs remote default branch locally (checkout, fetch --prune, pull) and returns to the previous branch when it still exists. Reports stashes and worktrees not yet handled. Use when the user asks to sync main, update default branch, fetch/pull origin, or run /sync-branch.
tools
Creates, queries, updates, and links Azure Boards work items via az boards CLI. Use when filing ADO work items, running WIQL queries, or setting area path, iteration, tags, and assignee.
tools
Creates, reviews, and completes Azure Repos pull requests and branch policies via az repos CLI. Use when opening ADO PRs, setting required reviewers, or configuring build validation policies.
development
Guides Azure Pipelines YAML structure, build validation on PRs, and staged deployment with environments and approvals. Use when authoring azure-pipelines.yml or configuring CI/CD on Azure DevOps.