Audit a project portfolio
Evaluate the portfolio as a system of systems. A locally reasonable design may still create global duplication, coupling, ownership ambiguity, or operational cost.
Load the contract
Read these files completely:
../../resources/references/review-contract.md
../../resources/references/knowledge-contract.md
../../resources/references/portfolio-rules.md
../../resources/rules/portfolio-core.yaml
../../resources/knowledge/manifest.yaml
Load .architecture-portfolio/portfolio.yaml, shared-capabilities.yaml, technology-catalog.yaml, and dependency-map.yaml. The registry defines scope. Do not silently discover unrelated repositories. If the registry is missing, stop and ask the user to initialize or identify the intended projects.
Initialize a portfolio
When the user requests setup, run:
python3 ../../resources/scripts/architecture_tool.py init-portfolio \
--root <portfolio-root> \
--name "<portfolio name>" \
--owner "<owner>"
Populate the explicit project registry and catalogs, then run validate-portfolio. Initialization creates an empty registry; never add repositories that the user did not place in scope.
Workflow
- Resolve every registered repository, profile, commit, owner, lifecycle state, and declared dependency. Record inaccessible projects.
- For each accessible registered repository, run
inspect-repository and
select-knowledge --skill portfolio-architecture-audit against that
repository's Profile with a compact --context-output. Persist facts,
selection locks, and context indexes inside the registered project only when
the user authorized project writes; otherwise use a temporary directory and
record hashes in the portfolio evidence. Do not derive one project's stack
from another project's files.
- Run
validate-knowledge-context for each context index with its exact
--selection, --facts, and --profile paths. Read each compact context
index only after validation succeeds and read its selected Markdown entries, union
them by canonical ID, and retain every per-project inclusion reason. Keep
exclusions in the machine lock rather than model context. Do not load the
whole knowledge tree.
- Normalize a portfolio inventory:
- business and platform capabilities;
- identity, permissions, notifications, scheduling, AI gateways, MCP/Skill/Agent runtimes, design systems, configuration, telemetry, and deployment;
- databases, caches, queues, object stores, external providers, domains, and environments;
- APIs, events, shared schemas, data owners, and cross-project flows.
- Produce a technology matrix and dependency/data-flow maps.
- Compare implementations by semantics, lifecycle, reliability, privacy, and ownership—not name or technology alone.
- Identify:
- repeated capability with a credible consolidation case;
- intentional duplication that preserves autonomy;
- shared infrastructure with unclear ownership or blast radius;
- stack diversity without a justified quality requirement;
- a project that is becoming a module of another;
- changes in one project that can silently break another.
- Require candidate evidence from every affected project. One repository's assumption is not evidence about another.
- Classify recommendations only as questions or governance opportunities in the audit; use the remediation planner for actual consolidation plans.
For a large portfolio, use up to four read-only specialists when available, partitioned by capabilities, data/integration, runtime/infrastructure, and governance. Keep synthesis and verification in the main agent.
Output
Write under .architecture-portfolio/reviews/:
<timestamp>-portfolio-candidates.yaml;
Start machine-readable output from ../../resources/templates/portfolio-review.yaml; replace every example value.
The verification handoff must include:
- portfolio architecture diagram;
- project and technology matrix;
- shared-capability and duplication inventory;
- infrastructure dependency and cross-project data-flow maps;
- candidate coupling and ownership risks;
- boundaries that should remain independent;
- open governance questions and a horizon-based roadmap outline.
Keep the roadmap descriptive; do not turn unverified consolidation ideas into committed plans.
Leave every finding at verification.status: candidate, validate YAML with
architecture_tool.py validate-review, and use
$architecture-finding-verifier for confirmed conclusions and the final
report. Do not modify project repositories.
Portfolio Review 1.1 remains the compatibility contract for the aggregate
artifact; each registered repository's facts and knowledge selections are
individually hash-bound as evidence. Never claim the aggregate artifact has
Review 1.2 project-profile bindings.
1---2name: portfolio-architecture-audit3description: System-of-systems architecture setup and audit across multiple projects. Use when initializing `.architecture-portfolio` or reviewing duplicated capabilities, project boundary conflicts, technology-stack sprawl, shared infrastructure, cross-project data flows, hidden coupling, deployment and domain complexity, reusable components, or a one-year technical governance roadmap. Requires an explicit portfolio registry and does not replace per-project audits.4---56# Audit a project portfolio78Evaluate the portfolio as a system of systems. A locally reasonable design may still create global duplication, coupling, ownership ambiguity, or operational cost.910## Load the contract1112Read these files completely:1314- `../../resources/references/review-contract.md`15- `../../resources/references/knowledge-contract.md`16- `../../resources/references/portfolio-rules.md`17- `../../resources/rules/portfolio-core.yaml`18- `../../resources/knowledge/manifest.yaml`1920Load `.architecture-portfolio/portfolio.yaml`, `shared-capabilities.yaml`, `technology-catalog.yaml`, and `dependency-map.yaml`. The registry defines scope. Do not silently discover unrelated repositories. If the registry is missing, stop and ask the user to initialize or identify the intended projects.2122## Initialize a portfolio2324When the user requests setup, run:2526```bash27python3 ../../resources/scripts/architecture_tool.py init-portfolio \28 --root <portfolio-root> \29 --name "<portfolio name>" \30 --owner "<owner>"31```3233Populate the explicit project registry and catalogs, then run `validate-portfolio`. Initialization creates an empty registry; never add repositories that the user did not place in scope.3435## Workflow36371. Resolve every registered repository, profile, commit, owner, lifecycle state, and declared dependency. Record inaccessible projects.382. For each accessible registered repository, run `inspect-repository` and39 `select-knowledge --skill portfolio-architecture-audit` against that40 repository's Profile with a compact `--context-output`. Persist facts,41 selection locks, and context indexes inside the registered project only when42 the user authorized project writes; otherwise use a temporary directory and43 record hashes in the portfolio evidence. Do not derive one project's stack44 from another project's files.453. Run `validate-knowledge-context` for each context index with its exact46 `--selection`, `--facts`, and `--profile` paths. Read each compact context47 index only after validation succeeds and read its selected Markdown entries, union48 them by canonical ID, and retain every per-project inclusion reason. Keep49 exclusions in the machine lock rather than model context. Do not load the50 whole knowledge tree.514. Normalize a portfolio inventory:52 - business and platform capabilities;53 - identity, permissions, notifications, scheduling, AI gateways, MCP/Skill/Agent runtimes, design systems, configuration, telemetry, and deployment;54 - databases, caches, queues, object stores, external providers, domains, and environments;55 - APIs, events, shared schemas, data owners, and cross-project flows.565. Produce a technology matrix and dependency/data-flow maps.576. Compare implementations by semantics, lifecycle, reliability, privacy, and ownership—not name or technology alone.587. Identify:59 - repeated capability with a credible consolidation case;60 - intentional duplication that preserves autonomy;61 - shared infrastructure with unclear ownership or blast radius;62 - stack diversity without a justified quality requirement;63 - a project that is becoming a module of another;64 - changes in one project that can silently break another.658. Require candidate evidence from every affected project. One repository's assumption is not evidence about another.669. Classify recommendations only as questions or governance opportunities in the audit; use the remediation planner for actual consolidation plans.6768For a large portfolio, use up to four read-only specialists when available, partitioned by capabilities, data/integration, runtime/infrastructure, and governance. Keep synthesis and verification in the main agent.6970## Output7172Write under `.architecture-portfolio/reviews/`:7374- `<timestamp>-portfolio-candidates.yaml`;7576Start machine-readable output from `../../resources/templates/portfolio-review.yaml`; replace every example value.7778The verification handoff must include:7980- portfolio architecture diagram;81- project and technology matrix;82- shared-capability and duplication inventory;83- infrastructure dependency and cross-project data-flow maps;84- candidate coupling and ownership risks;85- boundaries that should remain independent;86- open governance questions and a horizon-based roadmap outline.8788Keep the roadmap descriptive; do not turn unverified consolidation ideas into committed plans.8990Leave every finding at `verification.status: candidate`, validate YAML with91`architecture_tool.py validate-review`, and use92`$architecture-finding-verifier` for confirmed conclusions and the final93report. Do not modify project repositories.9495Portfolio Review 1.1 remains the compatibility contract for the aggregate96artifact; each registered repository's facts and knowledge selections are97individually hash-bound as evidence. Never claim the aggregate artifact has98Review 1.2 project-profile bindings.