Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add rules/gaebalai/cursor-def-a-rule/defa_development_framework_compactgit clone --depth 1 https://github.com/gaebalai/Cursor-DEF-A-RuleWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.03203 | $0.03203 |
| Opus 5 | $0.01602 | $0.01602 |
| Sonnet 5 | $0.00641 | $0.00641 |
| Haiku 4.5 | $0.00320 | $0.00320 |
Grade A, and why
defa_development_framework_compact scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 292 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Copyright (c) 2025 Jaewoo Kim
MIT License - https://opensource.org/licenses/MIT
[CORE] 즉시 실행 규칙 (항상 적용)
- 코드 품질: 가독성 > 기교, 명확한 변수명, 적절한 주석 작성
- 프론트엔드: 모바일 퍼스트 반응형 설계, 접근성 기준 준수, Core Web Vitals 인식
- 백엔드: API 설계 및 데이터베이스 최적화, 서버 성능 개선, 확장성 고려
- 보안: 입력값 검증, XSS 대응, SQL 인젝션 방지, 인증·인가 처리, 에러 핸들링
- 테스트 주도: 상황에 맞는 TDD/BDD 적용 판단
[TECH] 기술 스택 (우선순위 기준)
프론트엔드
- JavaScript/TypeScript - 타입 안정성 중시
- Nuxt.js/Next.js - JAMstack 아키텍처
- CSS - PostCSS、CSS Grid/Flexbox
백엔드
- Node.js/TypeScript - 서버 사이드 개발
- Python/FastAPI - API 개발 및 데이터 처리
- 데이터베이스 - PostgreSQL、Redis、MongoDB
- 인프라 - Docker、Kubernetes、AWS/GCP
구현 방침
- 프론트엔드: ES6+ 문법 사용, async/await 활용, 컴포넌트 재사용성 극대화, 번들 크기 최적화
- 백엔드: RESTful API 설계, 데이터베이스 성능 튜닝, 보안 강화, 확장성 고려
[TDD/BDD] 테스트 주도 개발 & 행동 주도 개발
TDD (Test-Driven Development) – Kent Beck 철학
핵심 개념: Red-Green-Refactor 사이클, 단순한 설계, 동작하는 깔끔한 코드로 자신감 확보
Red-Green-Refactor 사이클
- Red: 실패하는 테스트 작성 (기대 동작 명확화)
- Green: 최소한의 코드로 테스트 통과
- Refactor: 코드 정리 및 유지보수성 향상
TDD 적용 규칙
[TDD 적용] Red-Green-Refactor 사이클을 준수하여 테스트 우선 개발을 진행합니다.
- 테스트 우선: 구현 전 테스트 작성
- 최소 구현: 테스트 통과에 필요한 최소 코드 작성
- 지속적 리팩터링: 동작하는 코드를 깔끔하게 정리
BDD (Behavior-Driven Development) – Dan North 철학
핵심 개념: 개발자와 비개발자 간의 원활한 소통, 비즈니스 가치 중심 개발
Given-When-Then형식
Given [전제 조건]
When [행동]
Then [기대 결과]
적용 규칙
[BDD 적용] Given-When-Then 형식을 활용해 비즈니스 가치를 명확히 하고, 공통 언어로 개발을 진행합니다.
- 비즈니스 가치: 기능이 주는 가치를 최우선
- 공통 언어: 개발자·비개발자 간 이해 증진
- 기대 동작 정의: 예상 동작을 명확히 기술
TDD/BDD 적용 판단 프레임워크
상황별 대응
TDD 적용 권장 사례:
- ✅ 복잡한 비즈니스 로직을 구현할 때
- ✅ 기존 기능을 수정하거나 확장할 때
- ✅ 팀 개발에서 품질 보증이 중요한 경우
- ✅ 장기적인 유지보수가 중요한 핵심 기능
- ✅ 기술적 부채를 줄여야 하는 상황
BDD 적용 권장 사례:
- ✅ 신규 기능 개발 시 비즈니스 요구사항이 복잡한 경우
- ✅ 이해관계자와 요구사항 확인이 필요한 경우
- ✅ 여러 팀 간 협업이 필요한 경우
- ✅ 비즈니스 가치의 명확화가 중요한 경우
- ✅ 사용자 수용 테스트(인수 테스트) 자동화가 필요한 경우
적용 판단 로그 (예시 포맷)
[TDD/BDD 적용 판단]
- 개발 상황: [신규 기능 / 기존 기능 수정 / 프로토타입 / 긴급 대응]
- 복잡성: [높음 / 중간 / 낮음]
- 팀 규모: [개인 / 소규모 / 대규모]
- 시간적 제약: [긴급 / 일반 / 여유]
- 품질 요구 수준: [높음 / 중간 / 낮음]
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 3d ago First seen · 292 lines · 3,203 tokens per session scan A 329649a1abad
defa_development_framework_compact is a cursor rule published in the GitHub repository gaebalai/Cursor-DEF-A-Rule (12 stars, last pushed 1y ago), licensed MIT. It adds 3,203 tokens to every session, about $0.0160 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other cursor rules, from other repositories
unit-tests-tdd
TDD required for behavior changes; ≥80% package coverage on touched packages; unit-test conventions.
elite-developer
Principal Full-Stack Engineer for surgical implementation, strict TDD, complex debugging, and UI construction. Enforces the Agentic Company pipeline and high-rigor engineering standards. This agent contains the full knowledge of TDD, Systematic Debugging, Build Error Resolution, and Refactoring.
mcpnuke-tests
Test conventions for mcpnuke — enforces TDD workflow.
test_first_workflow
Enforce test-first or test-alongside development. Load when implementing new features, APIs, or UI components.
android_unit_testing_bdd
Unit testing best practices with BDD style.
03-testing
Testing requirements — test-before-commit policy, coverage expectations, and test quality standards.