fitness-function-design
Design executable architectural fitness functions per quality attribute.
Skill by SwapnilPopat
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/swapnilpopat-fitness-function-design
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: design
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/fitness-function-design
What's inside
- Skill name
fitness-function-design- Description
- Design executable architectural fitness functions per quality attribute. Use when codifying non-functional requirements as automated tests, policies, or budgets that fail the build.
- License
- MIT
- Instructions
- 98 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# Fitness Function Design
Fitness functions are objective, automated checks that protect architectural characteristics (security, performance, modularity, cost) the same way unit tests protect behavior. They convert prose NFRs into executable guardrails so evolutionary architecture remains safe.
## Stack Baseline (2026)
| Concern | Recommended |
| --- | --- |
| Structural (JVM/.NET) | ArchUnit 1.3, NetArchTest, Modulith |
| Structural (poly) | dependency-cruiser, Steampipe, Konveyor Tackle |
| Policy-as-code | Open Policy Agent (Rego), Conftest, Kyverno, Gatekeeper |
| Performance budgets | k6 thresholds, Lighthouse CI, Sitespeed.io |
| Security | OWASP ZAP, Semgrep, OpenSSF Scorecard, Trivy |
| Chaos / resilience | Chaos Mesh, AWS FIS, Litmus |
| Reference | Ford/Parsons/Kua, *Building Evolutionary Architectures* 2e |
## When to Use
- Defining or revising NFRs / quality attribute scenarios (ATAM/SAAM).
- Onboarding a service to a paved road or platform.
- Detected drift: production characteristic regressed silently.
- Migrations (modular monolith to services, cloud, runtime upgrade).
## Prerequisites
- Quality attribute scenarios with measurable thresholds.
- CI pipeline able to fail builds on policy violation.
- Owner per characteristic (security, SRE, platform, domain).
## Instructions
```mermaid
flowchart TD
QA[Quality attribute] --> S[Scenario w/ measurable response]
S --> T{Trigger}
T -->|Atomic / per-commit| A[Static or unit-style]
T -->|Holistic / nightly| H[Integration, perf, chaos]
A --> P[Pipeline gate]
H --> P
P --> R[Radar + dashboard]
```
1. **Map** each characteristic to one or more scenarios with stimulus, environment, and measurable response.
2. **Classify** each function on the Ford matrix: atomic vs holistic, triggered vs continuous, static vs dynamic, mandatory vs informational.
3. **Implement** the cheapest viable check first (static > unit > integration > chaos). Promote to mandatory only when stable.
4. **Wire** into CI/CD or admission control. Mandatory functions must block merge or deploy.
5. **Publish** results to a fitness dashboard (Backstage TechInsights, Grafana). Review quarterly; retire obsolete functions.
```java
// ArchUnit: enforce hex architecture in payments
@AnalyzeClasses(packages = "com.acme.payments")
class PaymentsArchitectureTest {
@ArchTest
static final ArchRule domain_has_no_framework_deps =
noClasses().that().resideInAPackage("..domain..")
.should().dependOnClassesThat().resideInAnyPackage("org.springframework..", "jakarta..");
}
```
```rego
# OPA: every workload must declare a cost-center label
package kubernetes.admission
deny[msg] {
input.request.kind.kind == "Deployment"
not input.request.object.metadata.labels["cost-center"]
msg := "cost-center label required (FinOps fitness function)"
}
```
```js
// k6 performance budget
export const options = {
thresholds: {
http_req_duration: ['p(95)<300'],
http_req_failed: ['rate<0.001']
}
};
```
## Common Pitfalls
| Pitfall | Mitigation |
| --- | --- |
| Vague NFR ("must be fast") | Require scenario with numeric threshold |
| Functions only run nightly | Promote critical ones to per-commit |
| Flaky checks ignored | Quarantine, fix or retire within one sprint |
| Policy sprawl | Keep a registry; one owner per function |
| No business linkage | Tag each function to a quality attribute and stakeholder |
## Output Format
- `fitness-functions/` directory in repo: ArchUnit tests, Rego policies, k6 scripts, Lighthouse budgets.
- Registry (`fitness-functions.yaml`) listing id, characteristic, type, owner, severity.
- Dashboard tile per characteristic with pass/fail trend.
## Authoritative References
- Ford, Parsons, Kua, *Building Evolutionary Architectures*, 2e, O'Reilly, 2023.
- ArchUnit 1.3 user guide; NetArchTest docs.
- Open Policy Agent + Conftest documentation, 2026.
- ISO/IEC 25010:2023 product quality model.
- ThoughtWorks Tech Radar Vol. 31 (Fitness Functions = Adopt).From SwapnilPopat/ai-assistant-skills, MIT.
More from SwapnilPopat/ai-assistant-skills
- 0.497score
dependency-governance
SwapnilPopat
Govern third-party and OSS dependencies via SBOM, SLSA, OpenSSF Scorecard, and license policy.
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
cloudflare-deploy
SwapnilPopat
Deploy Cloudflare Workers, Pages, and Workers-with-static-assets safely using Wrangler 4.x with versioned uploads, gradual deployments, preview/production…
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
netlify-deploy
SwapnilPopat
Deploy static sites, framework apps (Next.js, Astro, Remix, SvelteKit, Nuxt), Edge Functions, and serverless Functions to Netlify with deploy previews, branch…
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
openai-transcribe
SwapnilPopat
Transcribe audio with OpenAI speech-to-text models (gpt-4o-transcribe, gpt-4o-mini-transcribe, whisper-1) using prompt-guided terminology, segment-level…
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
render-deploy
SwapnilPopat
Deploy Web Services, Private Services, Background Workers, Cron Jobs, Static Sites, PostgreSQL, and Key-Value (Redis-compatible) on Render via Blueprints…
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
sentry-observability
SwapnilPopat
Operate Sentry end-to-end — error monitoring, performance tracing, session replay, profiling, release health, source-map upload, ownership routing, alert…
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
architect-review
SwapnilPopat
Conduct a rigorous architecture review covering scope, drivers, quality attributes, risks, decisions, and action items.
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
architecture-anti-patterns
SwapnilPopat
Detect and remediate architecture anti-patterns - Big Ball of Mud, Distributed Monolith, Golden Hammer, Vendor Lock-in, Premature Microservices, Lava Flow…
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
compliance-framework
SwapnilPopat
Map technical controls to ISO 27001:2022, SOC 2, GDPR, HIPAA, and EU AI Act, then automate verification with OPA / Conftest.
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
anthropic-claude
SwapnilPopat
Build production integrations with Anthropic Claude (Claude 4.5 Sonnet, Claude Opus 4, Claude Haiku 4) via the Messages API — system prompts, multi-turn…
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
architecture-patterns-catalog
SwapnilPopat
Select the right macro-architecture pattern by mapping drivers (scale, change rate, team topology, NFRs) to a curated 2026 catalog covering layered…
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
architecture-review-facilitation
SwapnilPopat
Facilitate effective architecture reviews using ATAM-lite, structured agendas, decision logs, and clear action items.
SkillCFreshness: C★ 1Claude Code +9
Signals
- Stars
- 1
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- May 1, 2026 (6 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from SwapnilPopat
- 0.497score
cloudflare-deploy
SwapnilPopat
Deploy Cloudflare Workers, Pages, and Workers-with-static-assets safely using Wrangler 4.x with versioned uploads, gradual deployments, preview/production…
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
netlify-deploy
SwapnilPopat
Deploy static sites, framework apps (Next.js, Astro, Remix, SvelteKit, Nuxt), Edge Functions, and serverless Functions to Netlify with deploy previews, branch…
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
openai-transcribe
SwapnilPopat
Transcribe audio with OpenAI speech-to-text models (gpt-4o-transcribe, gpt-4o-mini-transcribe, whisper-1) using prompt-guided terminology, segment-level…
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
render-deploy
SwapnilPopat
Deploy Web Services, Private Services, Background Workers, Cron Jobs, Static Sites, PostgreSQL, and Key-Value (Redis-compatible) on Render via Blueprints…
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
sentry-observability
SwapnilPopat
Operate Sentry end-to-end — error monitoring, performance tracing, session replay, profiling, release health, source-map upload, ownership routing, alert…
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
anthropic-claude
SwapnilPopat
Build production integrations with Anthropic Claude (Claude 4.5 Sonnet, Claude Opus 4, Claude Haiku 4) via the Messages API — system prompts, multi-turn…
SkillCFreshness: C★ 1Claude Code +9
Cite this page
fitness-function-design skill. Agent Mart. https://agentmart.dev/skills/swapnilpopat-fitness-function-design (last updated 2026-10-24)