agentleFS
samsam007bsamsam007b/claude-code-standards-kit/templates/CLAUDE.md

claude-code-standards-kit / templates

CLAUDE.md2 starsChanged 8 months agoMITView on GitHub

Universal template — Claude Code Standards Kit by SQWR Studio. Instructions: replace all [TO FILL IN] placeholders and remove irrelevant sections. Plugin mode: If using the SQWR plugin (.claude/hooks.json or via .claude-plugin/), hooks and slash commands are auto-discovered. Slash commands available: /new-feature, /pre-deployment, /monthly-review, /full-audit, /verify-project. [YOUR NAME] — [your role, e.g.: founder / developer / student] This project belongs to: [Your studio / your company / personal] Full context: - Identity: [KIT_PATH]/IDENTITY-TEMPLATE.md (fill in with your information) Name: [TO…

The file

Files
CLAUDE.md

[PROJECT NAME] — AI Contract

Universal template — Claude Code Standards Kit by SQWR Studio. Instructions: replace all [TO FILL IN] placeholders and remove irrelevant sections.

Plugin mode: If using the SQWR plugin (.claude/hooks.json or via .claude-plugin/), hooks and slash commands are auto-discovered. Slash commands available: /new-feature, /pre-deployment, /monthly-review, /full-audit, /verify-project.


Who you are

[YOUR NAME] — [your role, e.g.: founder / developer / student]

ContactValue
Email[your@email.com]
Work email[pro@yourstudio.com]

This project belongs to: [Your studio / your company / personal]

Full context:

  • Identity: [KIT_PATH]/IDENTITY-TEMPLATE.md (fill in with your information)

This project

Name: [TO FILL IN] Description: [TO FILL IN — 1-2 sentences max] Production URL: [TO FILL IN or N/A] Status: [In development / In production / Archived]

Stack:

  • [TO FILL IN — e.g.: Next.js 16 + TypeScript + Tailwind CSS + Supabase]

Deployment:

  • [TO FILL IN — e.g.: Vercel (auto from main)]

Architecture

[TO FILL IN — key folder structure]
src/
├── app/          → Next.js App Router routes
├── components/   → Reusable components
├── lib/          → Utilities, config, helpers
└── types/        → Shared TypeScript types

Critical files:

FileRole
[TO FILL IN][role]
[TO FILL IN][role]

Active contracts

Include the contracts relevant to this project. Source files: docs/contracts/ Check [x] the ones active for this project. Read each checked contract before working on the relevant domain.

Core (check all that apply to your stack)

  • CONTRACT-TYPESCRIPT.md — Strict typing, no any, SOLID
  • CONTRACT-SECURITY.md — OWASP Top 10, NIST, secrets management
  • CONTRACT-TESTING.md — Test pyramid, TDD, coverage ≥80%
  • CONTRACT-CICD.md — GitHub Actions, DORA metrics, Conventional Commits

Web stack

  • CONTRACT-NEXTJS.md — App Router, SSR, Server Components, CWV
  • CONTRACT-SUPABASE.md — RLS, auth, migrations, NIST SP 800-63B
  • CONTRACT-VERCEL.md — Deployment, env vars, rollback
  • CONTRACT-PERFORMANCE.md — LCP ≤2.5s, INP ≤200ms, CLS ≤0.1
  • CONTRACT-ACCESSIBILITY.md — WCAG 2.1 AA, EAA (EU law since June 2025)
  • CONTRACT-SEO.md — SSR, metadata, JSON-LD, Core Web Vitals
  • CONTRACT-DESIGN.md — Gestalt, typography, colour tokens, Tailwind
  • CONTRACT-OBSERVABILITY.md — Structured logging, Sentry, RUM
  • CONTRACT-RESILIENCE.md — Circuit breaker, retry, graceful degradation

AI features

  • CONTRACT-AI-PROMPTING.md — System prompts, few-shot, model selection
  • CONTRACT-ANTI-HALLUCINATION.md — Real data only, RAG, context poisoning

Mobile

  • CONTRACT-IOS.md — SwiftUI, HIG, Dark Mode, touch targets ≥44pt
  • CONTRACT-ANDROID.md — Jetpack Compose, Material 3, TalkBack

Specialized

  • CONTRACT-EMAIL.md — SPF/DKIM/DMARC, React Email, deliverability
  • CONTRACT-PDF-GENERATION.md — Puppeteer, react-pdf, CSS Paged Media
  • CONTRACT-I18N.md — next-intl, ICU, hreflang, RTL, Intl API
  • CONTRACT-ANALYTICS.md — HEART framework, AARRR, GA4, PostHog
  • CONTRACT-PRICING.md — Van Westendorp, EVC, SaaS metrics, tiers
  • CONTRACT-GREEN-SOFTWARE.md — Carbon efficiency, SCI (ISO/IEC 21031:2024)
  • CONTRACT-MOTION-DESIGN.md — UI animation, easing, prefers-reduced-motion
  • CONTRACT-VIDEO-PRODUCTION.md — Video pipeline, platform export specs
  • CONTRACT-PYTHON.md — PEP 8, mypy strict, FastAPI patterns

Read each checked contract directly OR ask Claude: "Read docs/contracts/CONTRACT-X.md before working on [domain]."


Absolute rules

What the AI must NEVER do on this project, specific to this context.

Never do

  • [TO FILL IN — e.g.: Modify the Supabase schema without checking RLS]
  • [TO FILL IN — e.g.: Switch a page to 'use client' without justification]
  • [TO FILL IN]

Always do

  • [TO FILL IN — e.g.: Run npm run build before any commit]
  • [TO FILL IN — e.g.: Check SSR rendering on SEO-critical pages]
  • [TO FILL IN]

Error history

Track detected errors here to prevent recurrence. Format: date | error | status

DateErrorStatus
[DD/MM/YYYY][description]Fixed / To fix

Active ADRs

Architecture Decision Records — the key technical decisions structuring this project. Full template: [KIT_PATH]/frameworks/ADR-TEMPLATE.md ADR files: ./docs/adr/

ADRDecisionStatus
ADR-001[TO FILL IN — e.g.: Supabase choice]Accepted
ADR-002[TO FILL IN — e.g.: Vercel vs Railway choice]Accepted

Create an ADR in ./docs/adr/ for every significant new architectural decision.


SLO (Service Level Objectives)

Target reliability definition. Template: [KIT_PATH]/frameworks/SLO-TEMPLATE.md

SLITarget SLOCurrentTool
Uptime[TO FILL IN — e.g.: 99.5%][current]UptimeRobot
LCP p75≤2.5s[current]Vercel Speed Insights
Error rate≤0.5%[current]Sentry

Error budget: [% SLO] × 30d = [X]h of allowed downtime per month


Tech Debt Tracker

Known technical debt, to be addressed by priority.

DebtImpactPriorityDate detected
[TO FILL IN][e.g.: Performance]P1/P2/P3[DD/MM]

Active hooks

Configured in .claude/settings.json. Review and uncomment to activate.

HookContractTriggerAction
hook-no-secrets.shCONTRACT-SECURITY §2 (OWASP A02)Pre-commitBLOCK secrets in staged files
hook-build-before-commit.shAUDIT-DEPLOYMENTPre-commitBLOCK if build/lint fails
hook-no-dangerous-html.shCONTRACT-SECURITY (XSS)Write *.tsxWARN on unsafe HTML
hook-contract-compliance.shAll active contractsPost-writeWARN on violations
hook-audit-before-push.shAUDIT-INDEXPre-pushREMIND to run audit

Escape hatch for build hook: SQWR_SKIP_BUILD_CHECK=1 git commit -m "..."


Audit schedule

Run the relevant audit agents before key milestones.

TriggerAgents to runBlocking threshold
Before any deploymentAGENT-SECURITY-AUDIT + AGENT-DEPLOYMENT-GATESecurity <70 = BLOCK
Before merging a featureAGENT-CODE-QUALITY-AUDIT + AGENT-SECURITY-AUDITCode-Quality <75
Before EU client delivery+ AGENT-ACCESSIBILITY-AUDITAccessibility <80 = legal
Design / visual changeAGENT-DESIGN-AUDIT + AGENT-PERFORMANCE-AUDITDesign <70
Adding AI featuresAGENT-AI-GOVERNANCE-AUDITAI-Gov <80
Production incidentAGENT-OBSERVABILITY-AUDITObservability <60
Weekly / end of sprintAGENT-FULL-AUDIT (all 8 domains)Global <85

Run: ask Claude "Run .claude/agents/AGENT-FULL-AUDIT.md" or use a specific agent. Mark audit complete: touch .sqwr-last-audit (tracked by hook-audit-before-push)


Quality gates

Workflow for any new feature. Full details: docs/workflows/WORKFLOW-NEW-FEATURE.md

GatePurposeObservable truth
0 — ScopeShape Up PitchScoping doc with Problem + Appetite + No-Gos
1 — ResearchIdentify applicable contractsCLAUDE.md "Active contracts" updated
2 — ImplementCode with active hooksnpm run build && npm test exits 0
3 — VerifyRun audit agentsAll scores above thresholds
4 — ShipCHANGELOG + PRPR with audit scores, CI passes

Context notes

[TO FILL IN — important project information that the AI should always keep in mind]

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.