refactor(topics): 멀티 에이전트용 지식 재편 — _Common(공통 기본기) + Domain_* 구조
에이전트 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>
This commit is contained in:
@@ -0,0 +1,160 @@
|
||||
---
|
||||
id: wiki-2026-0508-google-lighthouse
|
||||
title: Google Lighthouse
|
||||
category: 10_Wiki/Topics
|
||||
status: verified
|
||||
canonical_id: self
|
||||
aliases: [Lighthouse, Web Vitals Audit]
|
||||
duplicate_of: none
|
||||
source_trust_level: A
|
||||
confidence_score: 0.9
|
||||
verification_status: applied
|
||||
tags: [performance, web-vitals, audit, ci]
|
||||
raw_sources: []
|
||||
last_reinforced: 2026-05-10
|
||||
github_commit: pending
|
||||
tech_stack:
|
||||
language: JavaScript
|
||||
framework: Lighthouse 12+ / lighthouse-ci
|
||||
---
|
||||
|
||||
# Google Lighthouse
|
||||
|
||||
## 매 한 줄
|
||||
> **"매 web page 의 performance, accessibility, best-practices, SEO, PWA 를 자동 audit"**. Chrome DevTools 내장, CLI, Node API, lighthouse-ci 의 form. 2026 현재 v12+ 가 INP (Interaction to Next Paint) 의 primary metric, LCP/CLS/INP 의 Core Web Vitals 와 align. 매 PR 마다 budget 검증 의 standard practice.
|
||||
|
||||
## 매 핵심
|
||||
|
||||
### 매 5 categories
|
||||
- **Performance**: LCP, INP, CLS, TBT, FCP, Speed Index → 0-100 score.
|
||||
- **Accessibility**: axe-core 기반 a11y 검사.
|
||||
- **Best Practices**: HTTPS, secure headers, deprecated API.
|
||||
- **SEO**: meta tags, mobile viewport, structured data.
|
||||
- **PWA** (deprecated 2024 후 separate plugin).
|
||||
|
||||
### 매 Performance 의 weight (v12)
|
||||
- LCP 25%, TBT 30%, CLS 25%, FCP 10%, SI 10%.
|
||||
- INP 의 field metric 만 — lab 에서 measure X (Total Blocking Time 으로 proxy).
|
||||
|
||||
### 매 응용
|
||||
1. Local audit (DevTools).
|
||||
2. CI gate (lighthouse-ci, budgets.json).
|
||||
3. Field monitoring 보조 (CrUX + RUM 와 결합).
|
||||
4. PageSpeed Insights backend.
|
||||
|
||||
## 💻 패턴
|
||||
|
||||
### CLI run
|
||||
```bash
|
||||
npm i -g lighthouse
|
||||
lighthouse https://example.com --output=html --output=json \
|
||||
--output-path=./report --chrome-flags="--headless"
|
||||
```
|
||||
|
||||
### Node programmatic
|
||||
```javascript
|
||||
import lighthouse from 'lighthouse'
|
||||
import * as chromeLauncher from 'chrome-launcher'
|
||||
|
||||
const chrome = await chromeLauncher.launch({ chromeFlags: ['--headless'] })
|
||||
const result = await lighthouse('https://example.com', {
|
||||
port: chrome.port,
|
||||
output: 'json',
|
||||
onlyCategories: ['performance'],
|
||||
})
|
||||
console.log(result.lhr.categories.performance.score)
|
||||
await chrome.kill()
|
||||
```
|
||||
|
||||
### Lighthouse CI in GitHub Actions
|
||||
```yaml
|
||||
# .github/workflows/lhci.yml
|
||||
name: lhci
|
||||
on: [pull_request]
|
||||
jobs:
|
||||
lhci:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with: { node-version: 20 }
|
||||
- run: npm ci && npm run build
|
||||
- run: npm i -g @lhci/cli@0.14.x
|
||||
- run: lhci autorun
|
||||
env:
|
||||
LHCI_GITHUB_APP_TOKEN: ${{ secrets.LHCI_GITHUB_APP_TOKEN }}
|
||||
```
|
||||
|
||||
### lighthouserc.js with budgets
|
||||
```javascript
|
||||
module.exports = {
|
||||
ci: {
|
||||
collect: {
|
||||
url: ['http://localhost:3000/', 'http://localhost:3000/about'],
|
||||
numberOfRuns: 3,
|
||||
startServerCommand: 'npm start',
|
||||
},
|
||||
assert: {
|
||||
assertions: {
|
||||
'categories:performance': ['error', { minScore: 0.9 }],
|
||||
'largest-contentful-paint': ['error', { maxNumericValue: 2500 }],
|
||||
'cumulative-layout-shift': ['error', { maxNumericValue: 0.1 }],
|
||||
'total-blocking-time': ['warn', { maxNumericValue: 200 }],
|
||||
},
|
||||
},
|
||||
upload: { target: 'temporary-public-storage' },
|
||||
},
|
||||
}
|
||||
```
|
||||
|
||||
### User flow (multi-step)
|
||||
```javascript
|
||||
import { startFlow } from 'lighthouse'
|
||||
import puppeteer from 'puppeteer'
|
||||
|
||||
const browser = await puppeteer.launch()
|
||||
const page = await browser.newPage()
|
||||
const flow = await startFlow(page, { name: 'Checkout flow' })
|
||||
await flow.navigate('https://shop.example.com')
|
||||
await flow.startTimespan({ name: 'Add to cart' })
|
||||
await page.click('#add')
|
||||
await flow.endTimespan()
|
||||
await flow.snapshot({ name: 'Cart loaded' })
|
||||
const report = await flow.generateReport()
|
||||
```
|
||||
|
||||
## 매 결정 기준
|
||||
| 상황 | Approach |
|
||||
|---|---|
|
||||
| Local optimization | DevTools Lighthouse panel |
|
||||
| PR budget gate | lighthouse-ci + assertions |
|
||||
| Multi-page audit | lhci with multiple URLs |
|
||||
| SPA route transitions | User flows API |
|
||||
| Real-user metrics | CrUX / web-vitals JS (Lighthouse 의 X) |
|
||||
|
||||
**기본값**: 매 lhci + budgets.json + GitHub Action + 3 runs median.
|
||||
|
||||
## 🔗 Graph
|
||||
- 부모: [[Performance_Profiling_and_Memory|Performance Profiling]]
|
||||
- 응용: [[CI_CD_Pipeline|CI_CD Pipeline]] · [[Continuous Integration (CI)]]
|
||||
- Adjacent: [[Core Web Vitals Optimization (INP, LCP, CLS)|Cumulative Layout Shift (CLS)]] · [[SPA 라우트 전환 성능 최적화]]
|
||||
|
||||
## 🤖 LLM 활용
|
||||
**언제**: pre-deploy quality gate, regression catch, web vitals tracking.
|
||||
**언제 X**: 매 real-user perf 측정 (lab condition 일 뿐 — RUM 사용). Native app, server-only API.
|
||||
|
||||
## ❌ 안티패턴
|
||||
- **단일 run score 의 의존**: variance 가 큼 — 매 median of 3-5 runs.
|
||||
- **Lab score = field score 의 가정**: throttling profile 이 user 와 다름. 매 CrUX 와 cross-check.
|
||||
- **High score 만 의 chase**: 100 score ≠ good UX. 매 INP/LCP 의 actual budget 의 focus.
|
||||
- **CI 에 emulated mobile 만 의 test**: desktop user 도 audit.
|
||||
|
||||
## 🧪 검증 / 중복
|
||||
- Verified (web.dev/lighthouse, lighthouse-ci docs, Lighthouse 12 release notes 2025).
|
||||
- 신뢰도 A.
|
||||
|
||||
## 🕓 Changelog
|
||||
| 날짜 | 변경 |
|
||||
|---|---|
|
||||
| 2026-05-08 | Phase 1 |
|
||||
| 2026-05-10 | Manual cleanup — Lighthouse 12 + CI integration patterns |
|
||||
Reference in New Issue
Block a user