Senior Architect Agent: AI architecture skill for existing system mapping, software architecture documentation, Mermaid diagrams, and AI agent handoff.
SaferSkills independently audited senior-architect-agent (Agent Skill) and scored it 83/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 4 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 4 flagged
The text {match} tells the agent to skip the normal "ask the user first" gate. Used adversarially it removes the human-in-the-loop check before destructive or sensitive actions, turning a normally-gated agent into a fire-and-forget executor.
The text {match} tells the agent to skip the normal "ask the user first" gate. Used adversarially it removes the human-in-the-loop check before destructive or sensitive actions, turning a normally-gated agent into a fire-and-forget executor.
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Use this skill to make the agent understand before it acts.
This skill is not a diagram generator. It is a discipline layer for architecture work.
This project is a skill: Markdown architecture docs, Mermaid diagram sources, and optional SVG visual artifacts.
Expanded direction:
This skill helps AI agents unfold existing systems and raw ideas into architecture maps that humans and future AI agents can understand, review, and continue from.
Require inspection, classification, questioning, mapping, documentation, validation, and reporting before architecture recommendations or code edits.
This skill supports both existing systems and raw ideas. In both cases, the agent must separate what is known from what is inferred, proposed, unknown, or awaiting approval.
Sibling skill routing:
If the request is a pure raw idea and $idea-to-architecture-agent is available, prefer that dedicated sibling skill. Continue with this skill when the idea is tied to existing system evidence, requires broader architecture mapping, needs boundary/risk/handoff work, or the dedicated skill is unavailable. Do not make this skill depend on the sibling skill.
Core flow for both modes:
Intake
-> Select Mode
-> Inspect or Extract Idea
-> Classify
-> Question
-> Map
-> Document
-> Validate
-> Reportdecisions.
intent unless redesign is explicitly approved.
complexity.
implementation.
scope, evidence, risk, or handoff needs require it.
architectural judgment.
all-in-one diagram.
explicit limitations are present.
Use these gates to keep the flow enforceable:
recorded, or an early exit is declared when no architecture pass is needed.
limitations when something cannot be verified.
identified` is written.
assumptions, or proposed status.
reporting.
Choose the mode before producing architecture output.
Use this mode when codebase files, project structure, existing documentation, configs, tests, or deployment files are available.
Goal:
Discipline:
decisions.
external service.
Primary outputs:
Use this mode when the user provides a raw idea, product concept, feature request, business goal, or system goal without an existing implementation.
Goal:
Discipline:
proposed until approved.
already exist.
Primary outputs:
Read the user's request and identify available inputs:
Do not start with architecture conclusions.
Prefer module-level mapping when the user asks about one module or workflow. Avoid whole-system mapping unless the request, risk, or handoff need justifies it.
Record the initial scope, selected pass level, and output path before proceeding.
Early Exit Rule:
If the task is a small implementation fix with no architecture impact, do not run an architecture pass or create architecture documentation. Report:
No architecture pass requiredIf architecture impact is unclear, use Scan Mode rather than exiting.
Right-Sized Pass Control:
Before producing architecture documentation, select the smallest safe pass.
compact architecture note.
that touches a clear boundary. Output only the maps or notes needed for that scope.
ownership, 3+ interacting modules, persistence, integrations, payment, authentication, security, deployment, or major workflow changes.
Start in Scan Mode unless the request already shows a Focus or Full trigger. Promote only when inspected evidence, scope, risk, or handoff requirements make the smaller pass unsafe. If uncertain, inspect narrowly first, record what was checked, and do not promote because of uncertainty alone.
Promotion gate:
Choose one operating mode:
If $idea-to-architecture-agent is available and the request is only a raw idea with no implementation context, prefer that sibling skill for the focused proposal work.
If both exist, map the existing system first and mark new ideas as proposed changes.
Use this skill for mixed existing-system and proposal work, broader architecture mapping, boundary analysis, risk review, or future-agent handoff.
Inspect available evidence.
For Existing System Mapping Mode, inspect project files, folders, docs, configs, tests, package manifests, build scripts, deployment files, naming patterns, and architecture signals.
Reuse existing architecture context before re-mapping. Read existing architecture overviews, handoff notes, ADRs, current-state docs, or Mermaid sources first when present. Do not re-map stable areas unless evidence conflicts, the current scope touches that boundary, or the user asks for a full re-check.
For Idea-to-Architecture Mode, inspect the user's stated idea, goals, constraints, user types, domain terms, requested features, and implied boundaries. Do not treat the idea as an existing implementation.
Minimum inspection targets when available:
Inspection budget for large repositories:
Use available inspection tools such as file search, file tree inspection, git history, validators, and Mermaid checks when they help. Treat tool output as evidence to interpret, not as architecture by itself.
Record only what is visible from files, explicitly provided by the user, or clearly labeled as assumption.
If evidence or user intent is missing for an important area, record the inspection limitation instead of filling the gap with a guess.
Classify the system or proposed system into applicable areas:
In Existing System Mapping Mode, mark missing categories as not observed.
In Idea-to-Architecture Mode, mark categories as proposed, assumed, unknown, or not in scope. Do not present proposed architecture as confirmed fact.
Do not map before classification is complete.
Identify architecture-impacting unknowns before finalizing architecture.
Ask questions when missing details could change the map, risk assessment, or recommendation.
Ask only important questions. Do not block on minor details that can be marked as assumptions.
Separate:
If no architecture-impacting questions are found, write None identified so the absence is explicit.
Loopback rule:
If mapping, documentation, or validation exposes an architecture-changing unknown, return to Step 5 before final conclusions. Either ask the question or mark the output as incomplete and proceed only with a clearly labeled assumption.
Produce maps that help humans and future AI agents understand the system quickly.
Use the output path selected during intake.
For Scan Mode, keep the output to a compact architecture note while still inspecting, classifying, questioning, mapping, validating, and reporting in compact form.
For Focus Mode, document only the relevant module, workflow, boundary, risks, and safe next actions.
For existing systems, use the smallest useful set:
For raw ideas, use the smallest useful proposal set:
Use Mermaid for diagrams only when requested, required for handoff, or needed to clarify cross-module relationships.
Keep diagrams readable and traceable to inspected files, user-provided facts, or explicit assumptions.
For large systems, split diagrams by architecture question:
Treat SVG as an optional visual artifact for presentation or review. Generate it from Mermaid when it helps, and do not use SVG as the architecture source of truth.
Do not include untraceable components in maps or diagrams. Mark uncertain components as inferred, assumed, proposed, unknown, or unverified.
Use templates from templates/ when creating architecture outputs:
architecture-overview.mdsystem-boundary.mdmodule-map.mddata-flow.mdworkflow-map.mdfile-responsibility-map.mdopen-questions.mdrisk-register.mdai-agent-notes.mddecision-record.mdidea-brief.mdarchitecture-proposal.mdmodule-proposal.mdworkflow-proposal.mddata-model-draft.mddecision-options.mdDo not create every template by default.
Choose based on actual complexity and user need.
Artifact budget:
If output exceeds the budget, state why before creating extra artifacts.
agents/openai.yaml, when present, is interface metadata only. The core skill must remain usable from SKILL.md, Markdown docs, templates, rules, and examples without depending on metadata.
Before reporting, answer these three validation questions:
Does every important claim have a source? If not, mark it as Unverified, Assumed, or remove it before passing.
Does the final scope match the intake scope? If it expanded, state what was added, why, and whether it is approved.
Does the handoff include unknowns and safe next actions? If none are found, write None identified instead of leaving the section blank.
Use evidence strength for important claims:
Direct: supported directly by files or user-provided facts.Inferred: derived from evidence but not directly confirmed.Assumed: explicit working premise.Unverified: no source yet; verify, mark, or remove before final decisions.Use Verify first: Yes for claims that humans or future agents should check before relying on them.
Also confirm that proposed elements are labeled as proposed until approved, diagrams match the written map, SVG artifacts match their Mermaid source, and documentation is lean enough to maintain.
Also confirm:
or are clearly labeled as assumptions.
Report with this structure when appropriate:
Load these files when deeper guidance is needed:
rules/inspection-rules.mdrules/question-rules.mdrules/documentation-rules.mdrules/diagram-rules.mdrules/anti-overengineering-rules.mdrules/agent-handoff-rules.mddocs/anti-patterns.mdKeep operational work concise.
Read docs/philosophy.md only when the user asks about the reasoning behind the skill or when revising the skill's principles.
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.