c24165b8bc
에이전트 8종(대화형/프로그래머 C·S/디자이너/설계자/기획자/QA/PD/PM)에게 [공통 기본 능력 + 롤별 Specialty] 2층으로 지식을 주입하기 위한 재분류. 문서 내용·포맷은 무수정, 폴더 이동만 (6,372개 문서 수 보존 확인). - Topic_Programming → Domain_Programming (내부 구조 보존) - Topic_Graphic → Domain_Design - Topic_Business → Domain_Product - Topic_General → Domain_General - _Common 신설: Math(구 Topic_Math_Specialty), Reasoning(구 General/From_Thinking & Reasoning), Reasoning_Creativity(구 General/From_창의성), Communication(Poetic_Blog_Writing + From_writing) - 타 도메인의 From_* 폴더는 유지 (출처 표기일 뿐, 이미 도메인에 맞게 분류된 문서) - 빈 폴더 정리 (memory/procedures) - 에이전트→폴더 매핑은 workspace의 .astra/agent-knowledge-map.json (9개 에이전트) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
4.1 KiB
4.1 KiB
id, title, category, status, canonical_id, aliases, duplicate_of, source_trust_level, confidence_score, verification_status, tags, raw_sources, last_reinforced, github_commit, tech_stack
| id | title | category | status | canonical_id | aliases | duplicate_of | source_trust_level | confidence_score | verification_status | tags | raw_sources | last_reinforced | github_commit | tech_stack | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| wiki-2026-0508-prettier | Prettier | 10_Wiki/Topics | verified | self |
|
none | A | 0.9 | applied |
|
2026-05-10 | pending |
|
Prettier
매 한 줄
"매 opinionated formatter — 매 bikeshed 종결자". Prettier 매 AST re-print 방식 사용 — 매 source 의 whitespace 무시 의 deterministic output 생성. 2026 매 v3.x 의 ESM-first + plugin ecosystem 안정화.
매 핵심
매 Re-print 방식
- 매 parser 의 source → AST 변환.
- 매 printer 의 AST → IR (Doc) 생성.
- 매 IR 의 line-width constraint 기반 layout 결정.
- 매 original whitespace 의 X 보존.
매 ESLint 와의 분리
- ESLint: 매 code quality (logic, anti-patterns).
- Prettier: 매 formatting (whitespace, quote, line-break).
- 매
eslint-config-prettier의 conflict rule disable.
매 응용
- 매 monorepo 의 unified formatting.
- CI 의
--checkmode — 매 format violation 의 fail. - Pre-commit hook (
lint-staged+husky) 의 auto-format.
💻 패턴
Config 의 minimal .prettierrc
{
"semi": true,
"singleQuote": true,
"trailingComma": "all",
"printWidth": 100,
"tabWidth": 2,
"arrowParens": "always",
"endOfLine": "lf"
}
CLI 의 batch format
# Format in place
npx prettier --write "src/**/*.{ts,tsx,js,jsx,json,md}"
# CI check
npx prettier --check "src/**/*.{ts,tsx}"
lint-staged 의 staged-only format
// package.json
{
"lint-staged": {
"*.{ts,tsx,js,jsx}": [
"prettier --write",
"eslint --fix"
]
}
}
Plugin 의 ordering — prettier-plugin-tailwindcss
{
"plugins": ["prettier-plugin-tailwindcss"]
}
// Tailwind class 의 자동 ordering — flex p-4 m-2 → m-2 p-4 flex
Programmatic API (v3 ESM)
import prettier from "prettier";
const formatted = await prettier.format(sourceCode, {
parser: "typescript",
semi: false,
singleQuote: true,
});
Editor integration — VSCode
// .vscode/settings.json
{
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"[typescript]": { "editor.defaultFormatter": "esbenp.prettier-vscode" }
}
Override 의 file-type 별 config
{
"semi": true,
"overrides": [
{ "files": "*.md", "options": { "proseWrap": "always", "printWidth": 80 } },
{ "files": "*.yml", "options": { "tabWidth": 2 } }
]
}
매 결정 기준
| 상황 | Approach |
|---|---|
| Solo project | Prettier defaults — 매 zero config. |
| Team — strict | .prettierrc commit + CI check. |
| Tailwind 사용 | prettier-plugin-tailwindcss 필수. |
| Legacy codebase | 매 한 번 --write + 매 .git-blame-ignore-revs 추가. |
| Monorepo | Root .prettierrc + workspace override. |
기본값: singleQuote: true, trailingComma: "all", printWidth: 100, format-on-save + pre-commit hook.
🔗 Graph
- 부모: Code Formatting
- 변형: ESLint · Biome
- 응용: 153_pre-commit과_품질_게이트 · lint-staged
- Adjacent: AST · TypeScript
🤖 LLM 활용
언제: JS/TS/JSON/MD/YAML/CSS — 매 multi-language project 의 unified formatting. 언제 X: 매 Rust/Go (rustfmt/gofmt 의 사용), 매 single-language Rust-only 의 Biome 고려.
❌ 안티패턴
- ESLint 의 stylistic rules + Prettier 동시 사용: 매 conflict 발생 →
eslint-config-prettier적용. .prettierrc의 commit X: 매 team 의 inconsistent format.- Format-on-save 의 X + manual format: 매 review noise 증가.
- 매 large initial format 의 main branch 직접 commit: blame 의 손상 — 매
.git-blame-ignore-revs사용.
🧪 검증 / 중복
- Verified (Prettier docs v3.x).
- 신뢰도 A.
🕓 Changelog
| 날짜 | 변경 |
|---|---|
| 2026-05-08 | Phase 1 |
| 2026-05-10 | Manual cleanup — Prettier 매 re-print formatter + config patterns 정리 |