defa_framework

defa_framework is a cursor rule for coding agents from gaebalai/Cursor-DEF-A-Rule. It costs 1,941 tokens per session, scanned A, original, MIT.

A set of rules for solving problems through five stages: define, explore, formulate, act, and assess. It is a general framework for analysing a problem, choosing an approach, applying it, and reviewing the result.

In plain words
What is it for?
Use it to structure system design, technical choices, implementation, bug fixes, emergency responses, and learning tasks.
Why use it?
It gives different kinds of work a consistent amount of analysis, from detailed design to urgent fixes.

Cursor rule

Install

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.

agentmods
npx agentmods add rules/gaebalai/cursor-def-a-rule/defa_framework
Clone the repo
git clone --depth 1 https://github.com/gaebalai/Cursor-DEF-A-Rule

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for defa_framework

README.md
[![agentmods](https://agentmods.dev/badge/rules/gaebalai/cursor-def-a-rule/defa_framework.svg)](https://agentmods.dev/rules/gaebalai/cursor-def-a-rule/defa_framework)
Your own site
<a href="https://agentmods.dev/rules/gaebalai/cursor-def-a-rule/defa_framework"><img src="https://agentmods.dev/badge/rules/gaebalai/cursor-def-a-rule/defa_framework.svg" alt="Measured on agentmods" height="20"></a>
Per session 1,941 This file is loaded in full into every session.
When invoked 1,941 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What 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.

ModelPer sessionOnce invoked
Fable 5 $0.01941 $0.01941
Opus 5 $0.00971 $0.00971
Sonnet 5 $0.00388 $0.00388
Haiku 4.5 $0.00194 $0.00194

Measured 4d ago against content hash 484ad3de64ae, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

defa_framework 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 4d 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.

rules/defa/defa_framework.mdc · 187 lines

How it starts

The opening of the file, as written. The whole thing — 187 lines — stays where its author put it; the contents beside it link to each section on GitHub.

MIT License - https://opensource.org/licenses/MIT

[DEF-A] 메타인지 사고 프레임워크(상세판)

DEF-A 모델 구조

🎯 [D 적용] - Define 단계 : 문제 설정 · 다차원 정의
🔍 [E 적용] - Explore 단계 : 다시점 분석 · 심층 탐구
✨ [F 적용] - Formulate 단계: 통합, 구조화, 최적화
📝 [A1 적용] - Act/Apply 단계: 실행·적용
📈 [A2 적용] - Assess/Adjust 단계: 평가·조정

DEF-A 부분 적용 전략(상세 버전)

완전 DEF-A 적용(전략적 질문)

적용 장면: 시스템 설계, 아키텍처 결정, 복잡한 기술 선택 단계: Define → Explore → Formulate → Act → Assess 인지 부하: 높음(자세한 분석 및 통합 필요)

부분 DEF-A 적용(기술 실장 질문)

적용 장면: 구체적인 구현, 코딩, 기능 추가 단계: Formulate → Act → Assess(실장 중시) 인지 부하: 중(실장·품질 중시)

최소 DEF-A 적용(긴급 대응)

적용 장면: 버그 수정, 긴급 대응, 즉각적인 해결 필요 단계: Act(긴급 대응 구현만) 인지 부하: 낮음(효율성 최우선 순위)

학습 지원 적용(교육·이해)

적용 장면: 학습, 기술 이해, 단계적 설명 단계: Explore → Act(학습·실천) 인지 부하: 중(단계적 이해 중시)

단계별 적용 가이드라인(상세판)

Define 단계(문제 설정·다차원 정의)

적용 장면: 요구 사항 이해, 문제 분석, 문맥 파악 실행 내용:

  • 문제의 다차원적 정의(기술, 비즈니스, 사용자 관점)
  • 제약 조건의 명확화
  • 성공 기준 설정
  • 관련 요소 식별

부분 적용 패턴:

  • 개인 개발: 개인의 학습 목표 및 기술 수준에 초점
  • 팀 개발: 팀 전체의 요건 및 제약을 고려
  • 긴급 대응: 최소 요구사항 정의(문제의 핵심에만 해당)
Explore 단계(다시점 분석 및 심층 탐구)

적용 장면: 솔루션 탐색, 기술 선택, 접근법 검토 실행 내용:

  • 여러 솔루션 접근법 분석
  • 기술적 및 비기술적 요인 고려
  • 리스크 트레이드 오프 평가
  • 관련 기술 및 패턴 조사

부분 적용 패턴:

  • 학습지원: 단계적 설명 및 실천예 제공
  • 기술 선택: 비교 분석 및 권장 이유의 명시
  • 긴급 대응: 신속한 솔루션 제시
Formulate 단계(통합, 구조화, 최적화)

적용 장면: 설계 통합, 구현 계획, 최적화 실행 내용:

  • 다중 접근 통합
  • 구현 가능한 형식으로 변환
  • 성능 및 유지 보수성 최적화
  • 단계적 구현 계획 수립

부분 적용 패턴:

  • 실장 중시: 구체적인 실장 방법 및 코드 예시
  • 디자인 통합: 아키텍처 패턴 통합
  • 최적화: 성능 및 품질 최적화
Act/Apply 단계(실행·적용)

적용 장면: 구현, 코딩, 통합 실행 내용:

  • 단계적 구현 수행
  • 품질 기준 적용
  • 테스트 및 검증 실시
  • 문서 작성

부분 적용 패턴:

  • 긴급 대응: 최소한의 수정 및 즉시 실행 가능
  • 실장 지원: 상세한 코드예 및 실장 가이드
  • 통합 지원: 단계적 통합 및 배포 절차
📈 Assess/Adjust 단계(평가 및 조정)

적용 장면: 품질 평가, 개선, 최적화 실행 내용:

  • 구현 결과 평가
  • 성능 및 품질 측정
  • 개선점의 특정 및 실장
  • 학습·지식 축적

부분 적용 패턴:

  • 품질 평가: 코드 품질 및 성능 평가
  • 개선 제안: 구체적인 개선책 및 최적화안
  • 학습지원: 학습 포인트 및 다음 단계 제시

Read the full file on GitHub · 187 lines

Changes

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.

  1. 4d ago First seen · 187 lines · 1,941 tokens per session scan A 484ad3de64ae

Subscribe to this mod's changes

defa_framework is a cursor rule published in the GitHub repository gaebalai/Cursor-DEF-A-Rule (12 stars, last pushed 1y ago), licensed MIT. It adds 1,941 tokens to every session, about $0.0097 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.