Community코딩 & 개발github.com

문서화 및 ADR 기록

아키텍처 결정(ADR)이나 설계 선택의 근거를 문서화합니다. 공개 API 변경, 기능 출시, 또는 향후 엔지니어와 에이전트가 코드베이스를 이해하는 데 필요한 맥락을 기록할 때 사용하세요.

문서화 및 ADR 기록란 무엇인가요?

이 스킬은 개발자와 AI 에이전트가 코드와 함께 '왜' 그렇게 결정했는지 문서화하도록 돕습니다. 코드는 '무엇'을 보여주지만, 문서는 결정의 맥락, 제약 조건, 트레이드오프를 설명합니다. 이 스킬은 아키텍처 결정 기록(ADR), 인라인 주석, API 문서, README 구조, 체인지로그 유지 관리, 그리고 AI 에이전트를 위한 특별 지침(예: CLAUDE.md)을 포함한 광범위한 문서 유형을 다룹니다. 또한, 불필요한 문서화(자명한 코드나 임시 프로토타입 등)를 피해야 하는 경우도 명확히 제시합니다. 이 스킬은 Claude Code와 같은 AI 코딩 도구와 함께 사용하여 일관되고 가치 있는 문서를 생성하고, 시간이 지나면서 팀의 의사결정과 아키텍처 진화에 대한 단일 정보 소스를 유지하는 데 도움을 줍니다.

지원 대상✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/alfathafp/portofolio-web-design/tree/HEAD/.agents/skills/documentation-and-adrs

Installed? Explore more 코딩 & 개발 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

즐겨 사용하는 AI에게 물어보기

이 에이전트 스킬이 미리 로드된 새 채팅을 엽니다.

문서

문서화 및 ADR

개요

코드뿐만 아니라 결정을 문서화하십시오. 가장 가치 있는 문서는 '왜'—결정에 이르게 된 맥락, 제약 조건, 트레이드오프—를 포착합니다. 코드는 '무엇'을 만들었는지 보여줍니다; 문서는 '왜 이렇게 만들었는지'와 '어떤 대안이 고려되었는지'를 설명합니다. 이러한 맥락은 코드베이스에서 작업하는 미래의 인간과 에이전트에게 필수적입니다.

사용 시기

  • 중요한 아키텍처 결정을 내릴 때
  • 경쟁하는 접근 방식 사이에서 선택할 때
  • 공개 API를 추가하거나 변경할 때
  • 사용자 대면 동작을 변경하는 기능을 출시할 때
  • 새 팀원(또는 에이전트)을 프로젝트에 온보딩할 때
  • 같은 설명을 반복해서 해야 할 때

사용하지 말아야 할 때: 자명한 코드는 문서화하지 마십시오. 코드가 이미 말하는 것을 다시 설명하는 주석을 추가하지 마십시오. 임시 프로토타입용 문서는 작성하지 마십시오.

아키텍처 결정 기록(ADR)

ADR은 중요한 기술적 결정 뒤에 있는 근거를 포착합니다. 이는 작성할 수 있는 가장 가치 있는 문서입니다.

ADR 작성 시기

  • 프레임워크, 라이브러리 또는 주요 종속성 선택
  • 데이터 모델 또는 데이터베이스 스키마 설계
  • 인증 전략 선택
  • API 아키텍처 결정(REST vs GraphQL vs tRPC)
  • 빌드 도구, 호스팅 플랫폼 또는 인프라 간 선택
  • 되돌리기 어려운 모든 결정

기존 규칙을 먼저 따르십시오

ADR을 만들기 전에, 사용 가능한 저장소 컨텍스트에서 확립된 규칙(기존 ADR, 프로젝트 지침, .adr-dir 파일과 같은 ADR 관련 구성 또는 도구)을 검사하십시오. 확립된 규칙은 아래 기본값보다 우선합니다. 일치시켜야 할 사항:

  • 위치 및 형식 — 예: docs/adr/*.md, Documentation/Decisions/*.rst, MADR 레이아웃, 또는 adr-tools 설정. 기존 디렉토리, 파일 확장자 및 마크업(Markdown vs reStructuredText)을 일치시키십시오.
  • 번호 매기기 및 이름 지정 — 기존 시퀀스와 파일 이름 패턴(ADR-004-Title.rst, 0004-title.md, …)을 계속 따르십시오. 001에서 다시 시작하거나 두 번째 체계를 도입하지 마십시오.
  • 섹션 제목 — 이 템플릿의 제목 집합을 강요하지 말고 프로젝트의 제목 집합을 재사용하십시오.

사용 가능한 증거가 충돌하는 경우, 조용히 다른 체계를 도입하지 말고 충돌을 표면화하십시오. 규칙을 설정할 수 없을 때만 아래 기본값을 적용하십시오.

ADR 템플릿

ADR을 docs/decisions/에 순차 번호로 저장하십시오(프로젝트가 이미 다른 위치를 사용하지 않는 한 — 위 참조):

# ADR-001: Use PostgreSQL for primary database

## 상태
제안됨 | 수락됨 | ADR-XXX로 대체됨 | 사용 중단됨

## 날짜
2025-01-15

## 컨텍스트
작업 관리 애플리케이션을 위한 기본 데이터베이스가 필요합니다. 주요 요구 사항:
- 관계형 데이터 모델(사용자, 작업, 팀 간 관계)
- 작업 상태 변경을 위한 ACID 트랜잭션
- 작업 내용에 대한 전문 검색 지원
- 관리형 호스팅 가능(소규모 팀, 제한된 운영 역량)

## 결정
Prisma ORM과 함께 PostgreSQL을 사용합니다.

## 고려된 대안

### MongoDB
- 장점: 유연한 스키마, 시작하기 쉬움
- 단점: 데이터가 본질적으로 관계형임; 관계를 수동으로 관리해야 함
- 기각: 문서 저장소의 관계형 데이터는 복잡한 조인 또는 데이터 중복으로 이어짐

### SQLite
- 장점: 구성 불필요, 내장형, 읽기에 빠름
- 단점: 동시 쓰기 지원 제한, 프로덕션용 관리형 호스팅 없음
- 기각: 프로덕션의 다중 사용자 웹 애플리케이션에 적합하지 않음

### MySQL
- 장점: 성숙함, 널리 지원됨
- 단점: PostgreSQL이 JSON 지원, 전문 검색 및 에코시스템 도구에서 더 뛰어남
- 기각: 기능 요구 사항에 PostgreSQL이 더 적합함

## 결과
- Prisma는 타입 안전한 데이터베이스 접근 및 마이그레이션 관리를 제공합니다.
- Elasticsearch를 추가하지 않고 PostgreSQL의 전문 검색을 사용할 수 있습니다.
- 팀은 PostgreSQL 지식이 필요합니다(표준 기술, 낮은 위험).
- 관리형 서비스(Supabase, Neon 또는 RDS)에서 호스팅합니다.

ADR 수명 주기

제안됨 → 수락됨 → (대체됨 또는 사용 중단됨)
  • 오래된 ADR을 삭제하지 마십시오. 역사적 맥락을 포착합니다.
  • 결정이 변경되면 이전 ADR을 참조하고 대체하는 새 ADR을 작성하십시오.

인라인 문서화

주석을 달아야 할 때

'무엇'이 아니라 '왜'에 주석을 다십시오:

// 나쁨: 코드를 다시 설명함
// 카운터를 1 증가
counter += 1;

// 좋음: 명백하지 않은 의도를 설명함
// 속도 제한은 슬라이딩 윈도우를 사용합니다 — 고정 일정이 아닌 윈도우 경계에서
// 카운터를 재설정하여 윈도우 가장자리에서의 버스트 공격을 방지합니다.
if (now - windowStart > WINDOW_SIZE_MS) {
  counter = 0;
  windowStart = now;
}

주석을 달지 말아야 할 때

// 자명한 코드에는 주석을 달지 마십시오
function calculateTotal(items: CartItem[]): number {
  return items.reduce((sum, item) => sum + item.price * item.quantity, 0);
}

// 지금 당장 해야 할 일에 TODO 주석을 남기지 마십시오
// TODO: 오류 처리 추가  ← 그냥 추가하십시오

// 주석 처리된 코드를 남기지 마십시오
// const oldImplementation = () => { ... }  ← 삭제하십시오. git에 기록이 있습니다

알려진 함정 문서화

/**
 * 중요: 이 함수는 첫 번째 렌더링 전에 호출되어야 합니다.
 * 하이드레이션 후에 호출하면 SSR 중에 테마 컨텍스트를 사용할 수 없기 때문에
 * 스타일이 지정되지 않은 콘텐츠가 깜빡입니다.
 *
 * 전체 설계 근거는 ADR-003을 참조하십시오.
 */
export function initializeTheme(theme: Theme): void {
  // ...
}

API 문서

공개 API(REST, GraphQL, 라이브러리 인터페이스)의 경우:

타입과 함께 인라인(TypeScript 선호)

/**
 * 새 작업을 생성합니다.
 *
 * @param input - 작업 생성 데이터(제목 필수, 설명 선택 사항)
 * @returns 서버에서 생성된 ID와 타임스탬프가 있는 생성된 작업
 * @throws {ValidationError} 제목이 비어 있거나 200자를 초과하는 경우
 * @throws {AuthenticationError} 사용자가 인증되지 않은 경우
 *
 * @example
 * const task = await createTask({ title: 'Buy groceries' });
 * console.log(task.id); // "task_abc123"
 */
export async function createTask(input: CreateTaskInput): Promise<Task> {
  // ...
}

REST API용 OpenAPI / Swagger

paths:
  /api/tasks:
    post:
      summary: 작업 생성
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateTaskInput'
      responses:
        '201':
          description: 작업 생성됨
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Task'
        '422':
          description: 유효성 검사 오류

README 구조

모든 프로젝트는 다음을 포함하는 README가 있어야 합니다:

# 프로젝트 이름

이 프로젝트가 무엇을 하는지 한 문단 설명.

## 빠른 시작
1. 저장소 클론
2. 종속성 설치: `npm install`
3. 환경 설정: `cp .env.example .env`
4. 개발 서버 실행: `npm run dev`

## 명령어
| 명령어 | 설명 |
|---------|-------------|
| `npm run dev` | 개발 서버 시작 |
| `npm test` | 테스트 실행 |
| `npm run build` | 프로덕션 빌드 |
| `npm run lint` | 린터 실행 |

## 아키텍처
프로젝트 구조 및 주요 설계 결정에 대한 간략한 개요.
자세한 내용은 ADR 링크.

## 기여
기여 방법, 코딩 표준, PR 프로세스.

체인지로그 유지 관리

출시된 기능의 경우:

# 체인지로그

## [1.2.0] - 2025-01-20
### 추가됨
- 작업 공유: 사용자가 팀원과 작업을 공유할 수 있음 (#123)
- 작업 할당에 대한 이메일 알림 (#124)

### 수정됨
- 만들기 버튼을 빠르게 클릭할 때 중복 작업이 나타나는 문제 (#125)

### 변경됨
- UX 개선을 위해 작업 목록이 이제 페이지당 50개 항목을 로드함(이전 20개) (#126)

에이전트를 위한 문서화

AI 에이전트 컨텍스트에 대한 특별 고려 사항:

  • CLAUDE.md / 규칙 파일 — 에이전트가 따를 프로젝트 규칙을 문서화합니다.
  • 사양 파일 — 에이전트가 올바른 것을 빌드할 수 있도록 사양을 최신 상태로 유지합니다.
  • ADR — 에이전트가 과거 결정이 내려진 이유를 이해하도록 돕습니다(재결정 방지).
  • 인라인 함정 — 에이전트가 알려진 함정에 빠지지 않도록 방지합니다.

산문 검토

기술적 내용을 확인한 후, 이를 사용할 사람들을 위해 산문을 검토하십시오. 더 명확한 표현이 결정이나 그 한계를 변경해서는 안 됩니다.

  1. 편집에서 살아남아야 할 세부 사항을 표시하십시오: 이름, 숫자 및 단위, 명령어, 경로, 링크, 조건, 트레이드오프 및 불확실성. 사용 가능한 코드 및 결정 컨텍스트와 대조하여 확인하십시오; 입증할 수 없는 것은 표시하십시오.
  2. 독자가 필요로 하는 구체적인 정보로 진부한 소개, 홍보용 형용사 및 반복 요약을 대체하십시오. 지원되지 않는 주장을 발명된 예시나 더 강력한 보증으로 대체하지 마십시오. 필요한 기술적 반복 및 프로젝트의 확립된 용어를 유지하십시오.
  3. 편집된 문서를 원본 및 해당 출처와 비교하십시오. 손실된 한정자나 주의 사항을 복원하고, 명령어 및 코드 예제가 여전히 문서화된 대로 작동하는지 확인하며, 해결되지 않은 사실적 질문을 다듬어 없애지 말고 설명하십시오.

일반적인 합리화

합리화현실
"코드가 스스로 문서화됩니다"코드는 '무엇'을 보여줍니다. '왜', 어떤 대안이 기각되었는지, 어떤 제약 조건이 적용되는지 보여주지 않습니다.
"API가 안정화되면 문서를 작성하겠습니다"문서를 작성하면 API가 더 빨리 안정화됩니다. 문서는 설계의 첫 번째 테스트입니다.
"아무도 문서를 읽지 않습니다"에이전트가 읽습니다. 미래의 엔지니어가 읽습니다. 3개월 후의 당신 자신이 읽습니다.
"ADR은 오버헤드입니다"10분짜리 ADR이 6개월 후 같은 결정에 대한 2시간짜리 논쟁을 방지합니다.
"주석은 구식이 됩니다"'왜'에 대한 주석은 안정적입니다. '무엇'에 대한 주석은 구식이 됩니다 — 그래서 전자만 작성하는 것입니다.

위험 신호

  • 서면 근거가 없는 아키텍처 결정
  • 문서나 타입이 없는 공개 API
  • 프로젝트 실행 방법을 설명하지 않는 README
  • 삭제 대신 주석 처리된 코드
  • 몇 주 동안 있었던 TODO 주석
  • 중요한 아키텍처 선택이 있는 프로젝트에 ADR 부재
  • 의도를 설명하는 대신 코드를 다시 설명하는 문서

확인

문서화 후:

  • 모든 중요한 아키텍처 결정에 대한 ADR이 존재합니다.
  • README가 빠른 시작, 명령어 및 아키텍처 개요를 다룹니다.
  • API 함수에 매개변수 및 반환 타입 문서가 있습니다.
  • 알려진 함정이 중요한 위치에 인라인으로 문서화되어 있습니다.
  • 주석 처리된 코드가 남아 있지 않습니다.
  • 규칙 파일(CLAUDE.md 등)이 최신이고 정확합니다.
  • 산문 편집이 출처 세부 사항, 결정 트레이드오프 및 한정자를 보존하며 지원되지 않는 보증을 추가하지 않습니다.

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

alfathafp/portofolio-web-design

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).

alfathafp/portofolio-web-design

Tests in real browsers via Chrome DevTools MCP. Use when building or debugging anything that runs in a browser. Use when you need to inspect the DOM, capture console errors, analyze network requests, profile performance, or verify visual output with real runtime data. Requires the chrome-devtools MCP server to be configured.

alfathafp/portofolio-web-design

Automates CI/CD pipeline setup. Use when setting up or modifying build and deployment pipelines. Use when you need to automate quality gates, configure test runners in CI, or establish deployment strategies.

alfathafp/portofolio-web-design

Conducts multi-axis code review. Use before merging any change. Use when reviewing code written by yourself, another agent, or a human. Use when you need to assess code quality across multiple dimensions before it enters the main branch. Use when asked to review a diff or a pull request, even when the diff is pasted inline.

alfathafp/portofolio-web-design

Simplifies code for clarity. Use when refactoring code for clarity without changing behavior. Use when code works but is harder to read, maintain, or extend than it should be. Use when reviewing code that has accumulated unnecessary complexity.

alfathafp/portofolio-web-design

Establishes a project's quality bar as a written contract and stops agents quietly lowering it. Interviews the user on which dimensions matter, supplies sane default thresholds when they have no number in mind, records everything in CONSTRAINTS.md, and watches the diff for a weakened bar — new @ts-ignore or eslint-disable suppressions, skipped or deleted tests, assertions stripped out, unimplemented stubs, thresholds edited down. Use when no quality bar is written down, when the user says "set up constraints" or "define our standards", when the user wants dimensions they care about — accessibility, web performance, coverage — set up as enforced constraints, when an agent keeps silencing checks or skipping tests to get to green, when you need a coverage or performance threshold and don't know what number to pick, or when an agent writes more code than anyone will read.

alfathafp/portofolio-web-design

Optimizes agent context setup. Use when starting a new session, when agent output quality degrades, when switching between tasks, or when you need to configure rules files and context for a project.

alfathafp/portofolio-web-design

Guides systematic root-cause debugging. Use when tests fail, builds break, something that worked yesterday broke, behavior doesn't match expectations, or you encounter any unexpected error. Use when you need to figure out what broke and why — a systematic approach to finding and fixing the root cause rather than guessing.

alfathafp/portofolio-web-design

Deploy applications and websites to Vercel. Use when the user requests deployment actions like "deploy my app", "deploy and give me the link", "push this live", or "create a preview deployment".

alfathafp/portofolio-web-design

Manages deprecation and migration. Use when removing old systems, APIs, or features. Use when migrating users from one implementation to another. Use when migrating a database schema in production, such as renaming or dropping a column without downtime (expand/contract). Use when deciding whether to maintain or sunset existing code.

alfathafp/portofolio-web-design

Use when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.

alfathafp/portofolio-web-design

Use when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies

alfathafp/portofolio-web-design

Subjects every non-trivial decision to a fresh-context adversarial review before it stands. Use when you want every assumption cross-examined before proceeding, when stress-testing a plan for hidden failure modes, when correctness matters more than speed, when working in unfamiliar code, when stakes are high (production auth, security-sensitive logic, a high-stakes migration, irreversible operations), or any time a confident output would be cheaper to verify now than to debug later.

alfathafp/portofolio-web-design

Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available

alfathafp/portofolio-web-design

Use when implementation is complete, all tests pass, and you need to decide how to integrate the work

alfathafp/portofolio-web-design

Builds production-quality, accessible, responsive user-facing UIs. Use when building or modifying interfaces and pages, creating components, implementing layouts, meeting WCAG accessibility requirements, managing state, or when the output needs to look and feel production-quality rather than AI-generated.

alfathafp/portofolio-web-design

Structures git workflow practices. Use when making any code change. Use when committing, branching, resolving conflicts, splitting uncommitted work in a messy working tree into clean atomic commits, opening or reviewing a pull request (PR), pushing to a remote, or when you need to organize work across multiple parallel streams. Use when cutting a release, choosing a semantic version bump, tagging, or writing a changelog.

alfathafp/portofolio-web-design

Refines raw ideas into sharp, actionable concepts through structured divergent and convergent thinking. Use when an idea is still vague, when you need to stress-test assumptions before committing to a plan, or when you want to expand options before converging on one. Triggers on "ideate", "refine this idea", or "stress-test my plan".

alfathafp/portofolio-web-design

Delivers changes incrementally in thin, verifiable slices. Use when implementing any feature or change that touches more than one file, or when picking up the next task from a plan. Use when rolling a change out behind a feature flag, when you're about to write a large amount of code at once, or when a task feels too big to land in one step.

alfathafp/portofolio-web-design

Guides stable API and interface design. Use when designing APIs, module boundaries, or any public interface. Use when creating REST or GraphQL endpoints, defining type contracts between modules, or establishing boundaries between frontend and backend.

관련 스킬