architecture-governance
Skill0 starsChanged 3 months agoMITView on GitHub
Bootstrap, document, enforce, and review a project's architecture through layer responsibilities, dependency direction, architecture manifests, legacy baselines, Change Envelopes, cross-layer approval policy, and deterministic architecture checks. Use when starting a project, auditing an existing codebase, planning cross-layer work, preventing architecture erosion, reviewing structural changes, or deciding whether implementation may expand into another layer.
- Installs packages
We split this skill into the rules it gives an agent
15 rules. 0 are common, 12 are distinctive, and 3 are very specific to this project.
0
Common
Most of the 5 edited versions we read keep these.
12
Distinctive
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Use an explicit architecture manifest as the source of truth.
- Distinctive: line 18
Read bootstrap.md when the project lacks an approved manifest.
- Distinctive: line 19
Read change-governance.md for task-level Change Envelopes and cross-layer requests.
- Distinctive: line 20
Read architecture-checks.md before defining or executing gates.
- Distinctive: line 23
Use architecture-change-request.md when implementation needs undeclared scope.
- Very specific: line 25
Before using bundled Python validators in a shell-capable host, install the hash-locked packages with python3 -m pip install …
- Distinctive: line 37
Do not mix bootstrap with a broad cleanup unless the user explicitly authorizes refactoring.
- Distinctive: line 51
Never present inferred architecture as approved.
- Very specific: line 53
Use bundled scripts/approve_architecture.py for explicit approval and scripts/validate_architecture.py before relying on the manifest.
- Distinctive: line 74
Every implementation task must have a Change Envelope identifying:
- Very specific: line 83
When implementation needs undeclared scope, stop that branch and create an Architecture Change Request.
- Distinctive: line 85
Do not ask the user for routine changes already permitted by the envelope.
- Distinctive: line 89
Run deterministic checks when possible:
- Distinctive: line 101
Use model review for semantic responsibilities that static checks cannot decide.
- Distinctive: line 125
After returning the outcome, close with a short summary in the user's language that states:
“Common” is measured: kept by at least 6 in 10 of the 5 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Govern Project Architecture
Use an explicit architecture manifest as the source of truth. Passing tests does not excuse an architectural violation.
Respond in the user's language
Detect the user's language from their messages and use it for all prose addressed to them: questions, explanations, recommendations, status, and the closing summary. Keep every machine token verbatim — code, commands, file paths, schema field names, stable IDs, and the status or verdict values this skill returns — and convey their meaning in the surrounding prose rather than translating the tokens. If the user's language is unclear, ask once, then continue in the chosen language.
Persisted artifacts are contracts, not chat. Keep their template headings, YAML keys, stable IDs, and status tokens exactly as specified so downstream skills and validators keep working. Narrative content inside an artifact may follow the user's language when the user asks for it.
Load references and templates
- Read bootstrap.md when the project lacks an approved manifest.
- Read change-governance.md for task-level Change Envelopes and cross-layer requests.
- Read architecture-checks.md before defining or executing gates.
- Copy architecture-template.yaml to
.ai/architecture.yamlwhen bootstrapping. - Copy baseline-template.yaml to
.ai/architecture-baseline.yamlfor existing projects with known violations. - Use architecture-change-request.md when implementation needs undeclared scope.
- Validate manifests with bundled
scripts/validate_architecture.pyand baselines withscripts/validate_baseline.py. - Before using bundled Python validators in a shell-capable host, install the hash-locked packages with
python3 -m pip install --require-hashes -r requirements.txt. In prompt-only hosts, disclose that schema and Git-provenance checks were not executed.
Select operating mode
Use one of:
BOOTSTRAP_GREENFIELD: propose architecture before implementation;BOOTSTRAP_EXISTING: document actual architecture and baseline existing violations without refactoring them;PLAN_CHANGE: classify a proposed task and create or validate its Change Envelope;ENFORCE_CHANGE: monitor implementation against approved boundaries;REVIEW_ARCHITECTURE: review a diff or project without changing code.
Do not mix bootstrap with a broad cleanup unless the user explicitly authorizes refactoring.
Establish evidence
Inspect repository instructions, directory structure, imports, dependency injection, runtime entry points, persistence, external clients, schemas, build and test configuration, deployment topology, and existing architecture documentation.
Label rules as:
APPROVED: explicitly established by project authority;OBSERVED: consistently reflected in code;PROVISIONAL: inferred and awaiting approval;BASELINE_EXCEPTION: existing violation allowed only at its current location;FORBIDDEN: prohibited for new changes.
Never present inferred architecture as approved.
Use bundled scripts/approve_architecture.py for explicit approval and scripts/validate_architecture.py before relying on the manifest. Any payload change invalidates the approval hash and returns the manifest to provisional review.
Define architecture boundaries
For each layer or component, define:
- paths and ownership;
- responsibilities;
- allowed dependencies;
- forbidden dependencies;
- public and internal interfaces;
- transaction or orchestration boundaries;
- required checks;
- approval policy for changes.
Model the project's actual architecture. Do not force a layered template on event-driven, hexagonal, modular monolith, microservice, frontend, data, or infrastructure projects when another vocabulary fits better.
For frontend projects, keep structural ownership here and visual/component contracts in design-system-governance. Architecture defines where shared primitives, feature UI, state, and adapters live; the design system defines tokens, component behavior, accessibility, responsive rules, and visual evidence. Require both approvals when a change affects both boundaries.
Govern task scope
Every implementation task must have a Change Envelope identifying:
- primary layer or component;
- allowed layers with reason and change depth;
- conditional layers and approval policy;
- forbidden layers;
- protected interfaces and behaviors;
- architecture acceptance criteria.
When implementation needs undeclared scope, stop that branch and create an Architecture Change Request. Apply the project's manual, bounded-auto, or full-auto policy as defined in change-governance.md.
Do not ask the user for routine changes already permitted by the envelope. Do ask when a protected decision, conditional layer, or architecture rule would change.
Enforce architecture
Run deterministic checks when possible:
- changed-path scope;
- forbidden imports or dependency edges;
- dependency cycles;
- direct persistence access outside declared adapters;
- outbound network calls outside integration adapters;
- public API/schema changes;
- new dependencies;
- migration changes;
- framework or ORM types crossing protected boundaries.
Use model review for semantic responsibilities that static checks cannot decide. Record exact evidence for every blocker.
For an existing project, block new violations while allowing recorded baseline exceptions. Do not let a baseline exception authorize new copies of the same violation.
Record each exception with stable rule ID and version, severity, normalized edge kind, source, target, precise location, first-seen revision, and deterministic fingerprint. Reject placeholder or evidence-free baseline entries.
Update governance artifacts
Change .ai/architecture.yaml only for an intentional architecture decision, not merely because a worker violated it. Require explicit approval for protected architecture changes. Record accepted deviations with rationale, owner, date, and removal or review condition.
Return a verdict
Return one of:
APPROVED: architecture or change conforms;APPROVED_WITH_RECORDED_EXCEPTION: an authorized deviation is documented;BLOCKED: concrete unapproved violation exists;NEEDS_HUMAN: protected decision requires authority;PROVISIONAL: bootstrap proposal awaits approval.
Include manifest path, affected layers, check results, baseline effects, change requests, and next action.
Summarize what you did
After returning the outcome, close with a short summary in the user's language that states:
- what you did and what it decided or produced;
- the status or verdict you returned and what it means for the user;
- where each created or updated file now lives, by exact repository path;
- the recommended next step.
Name file locations explicitly and never claim a file was written that was not. When repository writes were unavailable and the output was returned in chat only, say so and name where it should be persisted.
This skill normally writes:
.ai/architecture.yaml— the architecture manifest;.ai/architecture-baseline.yaml— recorded baseline exceptions for an existing project;- any Architecture Change Request document you created, at its repository path.
Other versions5 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 5
- zai-org/ZCode★ 7.9ksame name
- ZCodium-project/ZCodium★ 239same name
- ccbud/CCBuddy★ 8same name
- skillpie/ZCodeOnline★ 2same name
- betacatsling/Open-ZCode★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
Used alongsideProjects with it also use dep-refs, feature-boundary-planner and 5 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
betacatslingSkilldep-refs
Use when needs to inspect TypeScript export references in the z-code workspace, list exports from a file, verify whether an export is unused before deletion, investigate who imports a symbol during refactors, or combine pnpm knip unused-export results with pnpm dep:refs symbol-level reference tracing.
Also in 5 projects that use this
betacatslingSkillfeature-boundary-planner
Map a ZCode behavior change to current UI surfaces, state owners, protocol commands, persistence, and validation. Use for impact analysis, product-boundary planning, or an implementation handoff grounded in the checked-out source.
Also in 5 projects that use this
VercelSkillelectron
Automate Electron desktop apps (VS Code, Slack, Discord, Figma, Notion, Spotify, etc.) using agent-browser via Chrome DevTools Protocol. Use when the user needs to interact with an Electron app, automate a desktop app, connect to a running app, control a native app, or test an Electron application. Triggers include "automate Slack app", "control VS Code", "interact with Discord app", "test this Electron app", "connect to desktop app", or any task requiring automation of a native Electron application.
Also in 5 projects that use this
VercelSkillai-elements
Build AI chat interfaces using ai-elements components — conversations, messages, tool displays, prompt inputs, and more. Use when the user wants to build a chatbot, AI assistant UI, or any AI-powered chat interface.
Also in 5 projects that use this
VercelSkilldogfood
Systematically explore and test a web application to find bugs, UX issues, and other problems. Use when asked to "dogfood", "QA", "exploratory test", "find issues", "bug hunt", "test this app/site/platform", or review the quality of a web application. Produces a structured report with full reproduction evidence -- step-by-step screenshots, repro videos, and detailed repro steps for every issue -- so findings can be handed directly to the responsible teams.
Also in 5 projects that use this
- +2 more from vercel-labs
In this repository5 other files it gives its agents.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

