From afdocs
AI-Friendly Programming Standard. Use when documenting coding conventions, patterns, testing strategies, dependency rules, code review processes, or AI coding guidelines.
How this skill is triggered — by the user, by Claude, or both
Slash command
/afdocs:afpsThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Use this skill to document and enforce coding conventions, patterns, and development practices — the source of truth from which linter configs and CI checks are derived.
Use this skill to document and enforce coding conventions, patterns, and development practices — the source of truth from which linter configs and CI checks are derived.
docs/
conventions.yaml ← machine-readable index (required)
conventions/
naming.md ← one file per convention type
structure.md
patterns/
error-handling.md ← one file per pattern
form-validation.md
testing.md
dependencies.md
style.md
review.md
ai-coding.md
| Type | Description |
|---|---|
naming | Naming rules for files, variables, functions, types, DB objects |
structure | Project directory layout and file organization |
pattern | Reusable code patterns for common problems |
testing | Testing strategy, coverage, test file organization |
dependency | Rules for adding, updating, and auditing dependencies |
style | Formatting, linting, syntactic preferences |
review | Code review process, approval rules, merge conventions |
ai-coding | Rules specific to AI-assisted code generation |
---
convention_id: naming-sveltekit-webapp
name: SvelteKit Web Application Naming Conventions
type: naming
component_id: webapp # AFADS component_id, or "system"
scope: [typescript, svelte] # languages/frameworks
status: active # active | draft | deprecated
owner: platform-team
last_reviewed: 2026-02-07
overrides_system: false # optional: overrides system default?
enforced_by: [eslint, biome] # optional: tooling that enforces this
related_patterns: [] # optional: related convention_ids
adr_link: docs/adrs/0003-naming.md # optional
---
## Purpose
Why this convention exists and what problem it solves.
## Rules
- MUST use camelCase for function names
- MUST use PascalCase for types and interfaces
- SHOULD use kebab-case for file names
(Use RFC 2119 language: MUST, SHOULD, MAY)
## Examples
### Good
```typescript
function getUserProfile() { ... }
function get_user_profile() { ... }
When it is acceptable to deviate from this convention.
camelcasenpm run lintInstructions for AI agents when generating or reviewing code:
## Pattern Specification (type: pattern)
Patterns have additional body sections:
```markdown
## Problem
What common problem does this pattern solve?
## Context
When should this pattern be applied?
## Solution
The recommended approach.
## Implementation
Code examples showing the pattern in use.
## Trade-offs
Pros and cons of this approach.
## Related Patterns
Links to other patterns that complement or conflict.
conventions:
- convention_id: naming-sveltekit-webapp
name: SvelteKit Naming Conventions
type: naming
component_id: webapp
path: docs/conventions/naming.md
scope: [typescript, svelte]
status: active
enforced_by: [eslint, biome]
owner: platform-team
last_reviewed: 2026-02-07
docs/conventions/defaults/overrides_system: truecomponent_id MUST match an AFADS componentconvention_idnpx claudepluginhub securitymonster/afdocs --plugin afdocsAnalyzes codebase to create or update .conventions/ directory with gold standards, anti-patterns, and checks for naming, imports, and patterns. Use for setting up coding standards or bootstrapping new projects.
Define and enforce coding standards that reduce cognitive load, prevent bugs, and make code maintainable. Use when establishing style guides or linting rules.
Defines coding conventions and standards for AI collaboration: naming rules, code style, folder structure, and environment variable conventions.