콘텐츠로 이동

Cursor Rules Newsfork Overview

Newsfork는 CONTRACT-FIRST 아키텍처를 따른다.

  • JSON + Zod는 유일한 진실의 근원(Single Source of Truth)이다.
  • GitHub는 정책과 범위의 이력을 보존하는 SSOT이다.
  • Runtime(Hono + Cloudflare Workers) 는 계약을 _실행_할 뿐, 해석하거나 보완하지 않는다.

런타임 로직이 복잡해진다면, 그것은 코드 문제가 아니라 계약(Contract) 설계 오류다.

  • Seed는 데이터가 아니다. 계약(Contract) 이다.
  • JSON은 의도(Intent) 를 정의하고, 코드는 이를 실행한다.
  • Git history는 곧 정책·범위 변경 이력이다.
  • Deterministic > Clever
  • Explicit > Implicit

⚠️ 모호함이 발생하면, 코드를 생성하지 말고 질문하라.

  • Cloudflare Workers, D1, R2, KV, Queues, Logpush
  • Wrangler (Local & Deploy)
  • TypeScript (ES2022+), Hono, Zod, Drizzle ORM
  • GitHub (SSOT), GitHub Actions (CI/CD)
  • Express / Fastify / Nest
  • Drizzle 외 ORM
  • Zod 없는 검증
  • Stateful 서버
  • Cloudflare 외 인프라 프리미티브
영역핵심 규칙
Contract & Schema모든 외부 입력 Zod 검증, Schema = 법, Breaking Change 시 Major Version
JSON런타임 상태/타임스탬프 금지, 배열 기반·평탄한 구조
RuntimeStateless, Idempotent, Deterministic
DatabaseD1 = 실행 상태만, 미검증 JSON 저장 금지
Error HandlingFail Fast, Fail Loud, Fail With Context
Code GenerationBoring, Explicit, Testable, Type-safe
Performance선형 알고리즘, Append-only 상태

Contracts should be boring. Runtimes should be thin. Boring systems survive. Clever systems break.

  • Cursor Rules Standard — 규칙 업그레이드 가이드
  • .cursor/rules/ — 실제 규칙 파일 (프로젝트 루트)