verify-architecture
Skill4 starsChanged 4 months agoApache-2.0View on GitHub
Enforce Polaris's mechanically observable architecture invariants by running the complete architecture guard suite, repairing violations when current authority determines the correct state, and failing closed when durable architecture is unresolved.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- honorstudio/claude-villetheir own version, first seen Mar 18, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- honorstudio/claude-ville★ 18same 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.
In this repository51 other files it gives its agents.
- AGENTS.mdAGENTS.md
- architecture-remediationSkill
- attentionSkill
- classify-docSkill
- codebase-designSkill
- codebase-memory-mcpSkill
- codegraphSkill
- coding-standardsSkill
- contract-ledgerSkill
- conventional-commitsSkill
- database-migrationsSkill
- deduplicate-codeSkill
- diagnosing-bugsSkill
- domain-modelingSkill
- format-codeSkill
- github-issue-dependenciesSkill
- graphifySkill
- grillingSkill
- grill-meSkill
- grill-with-docsSkill
- handoffSkill
- implement-ticketSkill
- improve-codebase-architectureSkill
- project-delivery-managementSkill
- project-trackingSkill
- prototypeSkill
- repowiseSkill
- researchSkill
- resolving-merge-conflictsSkill
- review-architectureSkill
- review-specSkill
- setup-matt-pocock-skillsSkill
- spec-contractSkill
- spec-merge-cleanupSkill
- tddSkill
- teachSkill
- to-adr-docSkill
- to-docSkill
- to-specsSkill
- to-ticketsSkill
- triageSkill
- verify-codeSkill
- verify-spec-closureSkill
- verify-specSkill
- verify-ticket-closureSkill
- verify-ticket-decompositionSkill
- wayfinderSkill
- wiki-lintSkill
- wiki-syncSkill
- wiki-synthesizeSkill
- writing-great-skillsSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
20 rules. About 0 are common, 13 are distinctive, and 7 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈13
Distinctive · estimate
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 11
Keep accepted Polaris architecture continuously executable and regression-protected.
- Distinctive: line 29
Do not invoke it merely because unrelated documentation, tracker state, Project projection, or other non-architecture administrative state …
- Distinctive: line 42
Do not turn style preferences, speculative future architecture, subjective design taste, or ordinary code-quality concerns into …
- Distinctive: line 44
Do not make a new architecture rule merely because a verifier would prefer one.
- Distinctive: line 56
Before every pytest invocation, perform the mandatory test-service preflight from AGENTS.md.
- Distinctive: line 62
Run the complete suite with the locked environment:
- Very specific: line 74
Do not delete, ignore, regenerate, or modify uv.lock merely to make verification proceed.
- Distinctive: line 76
When a parent caller has a stricter repository-state rule, preserve that stricter caller rule.
- Distinctive: line 83
Do not replace the complete suite with only the live-repository assertion.
- Distinctive: line 119
Update the checker and its independent acceptance/falsifier coverage together.
- Very specific: line 127
Do not repair toward whichever state makes pytest pass.
- Distinctive: line 137
When delegated by another workflow, this skill owns only the repository mutations required to restore already-determined mechanically …
- Very specific: line 147
Do not recursively invoke $verify-code when $verify-code is the caller.
- Distinctive: line 151
Do not make the architecture gate green by:
- Distinctive: line 161
If a mechanically enforced rule has become wrong, first establish the authoritative architecture change through the owning architecture …
- Very specific: line 167
When applicable, $verify-code invokes this gate in addition to its targeted Ruff, Mypy, and behavioral-test verification.
- Very specific: line 169
If this skill repairs executable source/tests, return the changed paths so $verify-code expands/re-runs its affected target verification …
- Very specific: line 173
When current migration Python changes, $database-migrations invokes this gate because current migrations are part of the architecture …
- Distinctive: line 199
When unresolved architecture remains, return:
- Distinctive: line 210
Do not report PASS with a non-zero suite failure count, a non-zero live repository violation count, incomplete suite execution, unresolved …
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Architecture Invariant Verification
Objective
Keep accepted Polaris architecture continuously executable and regression-protected.
This skill owns one repository invariant gate:
The complete architecture suite passes with zero failures, and the live greenfield repository has zero mechanically detectable architecture violations.
The architecture guard and its tests are executable representations of accepted architecture. They are not architecture authority themselves. Resolve architectural meaning from the current non-legacy authority ordering in AGENTS.md.
Applicability
Invoke this skill when the candidate can affect a mechanically enforced architecture invariant, including when it changes:
- current Python source under
src/polaris/; - current tests under
tests/; - current Python migrations scanned by
tests/architecture_guard.py; tests/architecture_guard.pyor any architecture-guard test;- accepted architecture authority whose mechanically enforceable rule is represented by the architecture guard.
Do not invoke it merely because unrelated documentation, tracker state, Project projection, or other non-architecture administrative state changed.
Applicability controls whether the gate runs. Once applicable, verification scope is the complete architecture suite; do not narrow it to changed files, one ticket, one Spec obligation, or one rule.
Architecture Rule Admission Invariant
A rule belongs in the architecture guard only when all of the following are true:
- current accepted authority establishes a durable architectural invariant;
- the invariant is mechanically observable from the repository surface the guard can inspect;
- detection can be implemented with sufficiently low false-positive risk;
- the checker and independent falsifier tests can express both prohibited and adjacent-valid states where material.
Do not turn style preferences, speculative future architecture, subjective design taste, or ordinary code-quality concerns into architecture rules.
Do not make a new architecture rule merely because a verifier would prefer one. If current authority does not establish the durable semantic, the result is unresolved architecture.
Complete Architecture Suite
The current suite is:
tests/test_architecture_guard.py
tests/test_architecture_guard_identity_aliases.py
tests/test_architecture_guard_legacy_loaders.pyBefore every pytest invocation, perform the mandatory test-service preflight from AGENTS.md. Re-derive prerequisites from the current complete suite rather than assuming they remain service-free forever. Do not use pytest startup, timeout, skip, or connection failure as the preflight.
Locked Verification Environment
Architecture verification uses the committed Polaris development environment. uv.lock is expected tracked project state, and pytest is a canonical project development dependency.
Run the complete suite with the locked environment:
POLARIS_BROAD_VERIFY_AUTHORIZED=verify-architecture \
uv run --locked pytest -q \
tests/test_architecture_guard.py \
tests/test_architecture_guard_identity_aliases.py \
tests/test_architecture_guard_legacy_loaders.pyuv may synchronize .venv and build/install Polaris as normal generated local environment state. Those actions are not repository mutation. The --locked gate must, however, refuse to rewrite dependency state: if uv.lock is missing or stale relative to pyproject.toml, classify the result environment-or-tooling-blocker and repair dependency state through intentional dependency management before retrying verification.
Do not delete, ignore, regenerate, or modify uv.lock merely to make verification proceed. Any intentional dependency change must update and commit the project dependency declaration and lockfile through the normal dependency-management workflow.
When a parent caller has a stricter repository-state rule, preserve that stricter caller rule.
The suite is intentionally complete because it proves two distinct things together:
- the guard still detects the prohibited architecture states it claims to detect while permitting adjacent-valid states; and
- the current greenfield repository satisfies those mechanically enforced rules.
Do not replace the complete suite with only the live-repository assertion.
Failure Classification and Repair Loop
A non-zero architecture-suite failure count is non-terminal.
For every failure, inspect current authority and classify it as exactly one of:
repository-violation
guard-defect
authority-realization
unresolved-architecture
environment-or-tooling-blockerrepository-violation
Current accepted authority already determines the correct architecture and current repository code violates it.
Repair the narrowest authoritative implementation point, then rerun the complete architecture suite.
Examples include an inward layer importing an outward layer, current code depending on legacy/, or a vendor-native representation crossing a boundary that accepted architecture already forbids.
guard-defect
Current accepted authority is clear, but the checker or its falsifier tests encode it incorrectly or incompletely.
Repair the checker/test representation from current authority. Keep independent expectation matrices independent of checker implementation constants; do not make tests self-confirming merely to restore green.
Then rerun the complete architecture suite.
authority-realization
Accepted architecture intentionally changed and current checker/tests have not yet been updated to represent that already-authorized rule.
Update the checker and its independent acceptance/falsifier coverage together. Do not treat stale executable architecture as higher authority than the accepted decision.
Then rerun the complete architecture suite.
unresolved-architecture
Proceeding would require inventing, changing, or choosing a durable architectural owner, boundary, dependency direction, identity/key semantic, lifecycle rule, failure semantic, or other architectural invariant not determined by current authority.
Do not repair toward whichever state makes pytest pass. Return the complete blocker set to the owning lifecycle so it can route through $architecture-remediation.
environment-or-tooling-blocker
The complete suite cannot be executed or interpreted reliably because a required tool/environment prerequisite is unavailable or broken.
Report the exact blocker. Do not claim PASS from partial execution.
Repair Authority
When delegated by another workflow, this skill owns only the repository mutations required to restore already-determined mechanically enforced architecture:
- fixing a repository architecture violation;
- fixing the guard/tests to match current accepted authority;
- realizing an already-accepted architecture change in the guard/tests.
This is explicit repository-wide architecture-gate repair authority. It does not authorize unrelated cleanup or new architectural decisions.
Return every changed path and failure disposition to the caller. The caller remains responsible for rerunning any non-architecture verification invalidated by those repairs, such as Ruff, Mypy, targeted behavioral tests, migration lifecycle proof, exact-HEAD certification, or candidate-state checks.
Do not recursively invoke $verify-code when $verify-code is the caller.
Forbidden Pass-Only Repairs
Do not make the architecture gate green by:
- deleting or weakening a valid architecture rule without current authority;
- changing an independent expected matrix to derive from the checker implementation it is supposed to challenge;
- adding
skip,xfail, marker filtering, test deselection, or path exclusions merely to hide a failing invariant; - treating tests as a fifth product layer or inventing another scope category unless current authority establishes it;
- excluding a current source/test/migration path because it now violates the guard;
- preserving a forbidden dependency behind a wrapper, alias, loader indirection, compatibility shim, or other concealment;
- changing architecture authority inside this verification skill merely to fit implementation reality.
If a mechanically enforced rule has become wrong, first establish the authoritative architecture change through the owning architecture lifecycle. Then update its executable representation.
Parent Workflow Composition
$verify-code
When applicable, $verify-code invokes this gate in addition to its targeted Ruff, Mypy, and behavioral-test verification. Architecture remains whole-suite even though those other checks stay targeted.
If this skill repairs executable source/tests, return the changed paths so $verify-code expands/re-runs its affected target verification before reporting success.
$database-migrations
When current migration Python changes, $database-migrations invokes this gate because current migrations are part of the architecture guard's scan universe. If this skill repairs a migration, the migration owner reruns every invalidated migration lifecycle proof.
$verify-spec
When the integrated Spec contains architecture-capable changes, $verify-spec invokes this gate as an explicit repository-wide delegated invariant. Architecture repairs are authorized by this child gate even when the repaired surface is outside the ordinary Spec semantic repair scope; that exception applies only to mechanically enforced architecture repair under this skill.
Any repair changes the candidate and invalidates prior exact-HEAD semantic certification normally.
Terminal Result
Report PASS only after the complete suite actually passes and the live-repository assertion establishes zero violations:
ARCHITECTURE INVARIANT: PASS
Architecture suite: <passed>/<collected>
Architecture suite failures: 0
Live repository architecture violations: 0
Unresolved architecture questions: 0
Environment/tooling blockers: 0
Repairs:
- Repository violations repaired: <n>
- Guard defects repaired: <n>
- Accepted-authority realizations repaired: <n>When unresolved architecture remains, return:
ARCHITECTURE INVARIANT: UNRESOLVED
Architecture suite failures: <n>
Unresolved architecture questions: <n>
Blockers:
- <question/conflict + current authority evidence + material consequence>Do not report PASS with a non-zero suite failure count, a non-zero live repository violation count, incomplete suite execution, unresolved architectural semantics, or verification-environment mutation.
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.

