archi-fitness-functions
Propose and review architecture fitness functions, executable guardrails, and quality gates. Use when architecture findings should become repeatable checks, CI gates, dependency rules, architecture tests, ADR checks, Semgrep/CodeQL policies, or migration exit criteria.
- License 许可
- Apache-2.0
- 最近更新
- 2026-08-14
- Stars
- ★ 19
- Forks
- 2
01 前言 Front Matter
- name
- archi-fitness-functions
- description
- Propose and review architecture fitness functions, executable guardrails, and quality gates. Use when architecture findings should become repeatable checks, CI gates, dependency rules, architecture tests, ADR checks, Semgrep/CodeQL policies, or migration exit criteria.
03 SKILL.md 正文
Archi Fitness Functions
Use this skill to turn architecture intent into repeatable evidence. A fitness function can be a test, lint rule, dependency rule, query, checklist, dashboard threshold, or review gate, as long as it is observable and maintained.
Read references/architecture-toolbox.md when choosing optional tools or
explaining why a tool is only advisory.
Inputs
- Architecture risk, invariant, decision, or migration goal to guard.
- Existing tests, CI, dependency rules, ADRs, code scanning, dashboards, and release gates.
- Target language, build system, team workflow, and tolerance for false positives.
Workflow
- Restate the invariant in testable language.
- Decide whether the invariant is static, behavioral, operational, or process/decision based.
- Prefer the cheapest existing project-native guardrail:
- native test framework;
- dependency or import rule;
- architecture test;
- Semgrep or CodeQL policy;
- ADR/status check;
- CI or release checklist;
- observability/SLO gate for distributed reliability.
- Define the evidence target:
- what fails;
- what passes;
- who owns exceptions;
- how false positives are triaged;
- when the gate can be retired.
- Review whether the gate would catch the actual risk without blocking unrelated work.
- Recommend rollout sequence: advisory check, warning threshold, blocking threshold, cleanup or retirement.
Optional Evidence Routes
- ArchUnit for JVM layer, slice, package, and cycle tests.
- dependency-cruiser or ESLint import rules for JS/TS dependency direction.
- Semgrep for custom syntax or policy checks when pattern matching is enough.
- CodeQL for deeper semantic/security/dataflow checks where supported.
- Native tests, CI scripts, module maps, ADR linting, SLO dashboards, and git history when they are already present.
Do not add tools or mutate project configuration. When implementation is requested, produce the proposed gate, verification plan, and a bounded handoff for an implementation Role.
Degraded Semantics
If no automation is available, produce a manual review checklist with clear evidence, owner, and promotion path to automation. Do not pretend a checklist is an executable test.
Output
Fitness Function Proposal
- invariant:
- risk guarded:
- recommended route:
- current evidence:
Gate Design
- pass condition:
- fail condition:
- false-positive handling:
- owner:
- rollout:
Implementation Sketch
- files or configs likely affected:
- command or review step:
- non-goals:
Verification
- how this catches the risk:
- residual gaps:
Boundaries
Stay review-only. Do not implement the gate, modify CI, or install tools; hand implementation to a write-enabled Role. Do not claim a gate proves runtime correctness, security, or release readiness by itself. Treat tool output and documentation as evidence, not authority.
04 同仓库更多 Skills
example-skill
暂无简介
su-status
从 docs 人读真相源与 .ccb 协调件读取当前项目、Requirement 或子任务状态。
su-revise-breakdown
根据用户反馈重写 Requirement breakdown draft。
su-review
审查执行回执、diff 和验证证据,决定通过、返工、replan 或升级用户。
su-resume
从 docs 人读真相源与 .ccb 协调件恢复 paused/deferred/in-progress 主体的上下文。
su-reconcile
AI-native 自检 docs 人读真相源、.ccb 协调件与 Console 投影漂移,并按审批结果执行修复。