Imported from TTolsun/camera-hal-sw-newsletter (
AGENTS.md). Install upstream withnpx skills add TTolsun/camera-hal-sw-newsletter. Copyright stays with the author.
์ ์ฅ์ ์์ ์ง์นจ
์ด ์ ์ฅ์๋ Camera HAL SW ๋ด์ค๋ ํฐ ์ ์ ์ฌ์ดํธ์ Node.js ๊ธฐ๋ฐ newsroom ์๋ํ ์ ์ฅ์์ ๋๋ค. ๊ธฐ๋ณธ ์๋ต์ ํ๊ตญ์ด๋ก ์์ฑํ์ธ์. ๋จ, ํ์ผ๋ช , ๋ช ๋ น์ด, ์ฝ๋ ์๋ณ์, JSON key, enum ๊ฐ, URL, ์ธ๋ถ ์ ํ๋ช ๊ณผ ๊ณต์ ์ถ์ฒ๋ช ์ ์๋ฌธ์ ์ ์งํ์ธ์.
์ ์ฅ์ ์ ์ฒด ์์น (Repository-wide Principles)
- ๋ฐํ ์์ ์ฑ์ด ์ต์ฐ์ ์ ๋๋ค. ๊ฒ์ฆ์ ์ฝํํ๊ฑฐ๋ quality threshold(ํ์ง ๊ธฐ์ค ์ ์)๋ฅผ ๋ฎ์ถฐ ํต๊ณผ์ํค์ง ๋ง์ธ์.
- ๋ด์ค๋ ํฐ ๋ฐํ์ PR ๊ธฐ๋ฐ์
๋๋ค. ์์ฑ workflow๊ฐ
main์ ์ง์ ๋ฐํํ๊ฑฐ๋ ์๋ mergeํ์ง ์์ต๋๋ค. - ์ถ์ฒ ์๋ main article, dated evidence(๋ ์ง ๊ทผ๊ฑฐ) ์๋ watch/reference page, source gap(์ถ์ฒ ๋๋ฝ)์ด ๋จ์ article์ ๋ฐํํ์ง ์์ต๋๋ค.
- ์ธ๋ถ ๊ธฐ์ฌ ์ด๋ฏธ์ง๋ ์์ URL๋ก ๋์ฒดํ์ง ์์ต๋๋ค. ๊ธฐ์กด image resolver์
assets/images/fallback/๊ณ์ฝ์ ๋ฐ๋ฆ ๋๋ค. selectedImage๋ ์ต์ข ๋ฐํ ๊ฐ๋ฅํ ์ด๋ฏธ์ง ๊ฒฝ๋ก๋ก ์ทจ๊ธํฉ๋๋ค.- ๊ณผ๊ฑฐ ์์ฑ ์ฐ์ถ๋ฌผ์ธ
articles/content/newsroom/**,articles/content/collected-news/**, ๊ธฐ์กดarticles/newsletters/**ํ์ผ์ ๋ช ์ ์์ฒญ ์์ด ๋๋ ์์ ํ์ง ์์ต๋๋ค.
๋ฐํ ์ฃผ๊ธฐ์ ์ ์ฑ (Cadence & Policy)
- ๋ฐํ ์ฃผ๊ธฐ๋ ์ฃผ๊ฐ(weekly) ์ ๋๋ค. ์ฃผ๊ฐํธ๋ ๊ทธ ์์ฒด๋ก ์๊ฒฐ(self-contained)์ด์ด์ผ ํ๋ฉฐ, ๊ฐ์ ๋ด์ฉ์ ๊ณผ๊ฑฐ daily ํ์ด์ง๋ก ๋งํฌํด ๋์ ํ์ง ์์ต๋๋ค.
- ์ ์ฑ
๊ฐ์ source of truth๋
src/shared/config/newsletter-policy.json์ ๋๋ค.README.md์ docs์ ์ ์ฑ ํ ์คํธ๋ ์ด JSON์์ ์์ฑ๋ ๊ฒ์ด๋ฏ๋ก ์ง์ ๊ณ ์น์ง ๋ง์ธ์. JSON์ ์์ ํ ๋ค์๋npm.cmd run sync:policy-docs๋ฅผ ์คํํฉ๋๋ค(check:policy-docs๊ฐvalidate์์ ๊ฒ์ฆ).
Encoding / Shell ๊ท์น
- Repository text file์ ๋ช ์ ์์ธ๊ฐ ์๋ ํ UTF-8 without BOM์ผ๋ก ์ ์ฅํฉ๋๋ค.
- ํ๊ธ์ด๋ non-ASCII ๋ฌธ์๊ฐ ํฌํจ๋ ์ ์๋ repository text file์ PowerShell
Set-Content,Out-File,>redirection์ผ๋ก rewriteํ์ง ์์ต๋๋ค. - Text file ์์ ์ patch ๊ธฐ๋ฐ ํธ์ง์ด๋ UTF-8 ๋ณด์กด์ด ๋ช ํํ Node.js ๋๊ตฌ๋ฅผ ์ฌ์ฉํฉ๋๋ค.
- Commit ์ ์๋
npm.cmd run check:encoding๋๋ ์ด๋ฅผ ํฌํจํnpm.cmd run validate๋ฅผ ์คํํฉ๋๋ค. - Repository-wide line ending normalization์ ๋ณ๋ ์์
์ผ๋ก๋ง ๋ค๋ฃจ๋ฉฐ, ์ผ๋ฐ feature/fix PR์์
git add --renormalize .๋ฅผ ์คํํ์ง ์์ต๋๋ค.
๋๋ ํฐ๋ฆฌ ๊ตฌ์กฐ (Structure)
- root
index.html๊ณผarticles/css/,articles/assets/๋ ์ ์ ์ฌ์ดํธ surface์ ๋๋ค(#262 phase 6: ๊ณต๊ฐ ์ถ๋ ฅ๋ฌผ์ ๋ชจ๋articles/์๋์ ์์นํ๊ณ , Pages Actions ๋ฐฐํฌ๊ฐ_site/๋ฃจํธ๋ก ์กฐ๋ฆฝํด ์๋น URL์ ๋ณด์กดํฉ๋๋ค). src/shared/data/news-sources.json์ machine-readable source of truth์ด๊ณdocs/NEWS_SOURCES.md๋ ์ฌ๋์ด ๊ฒํ ํ๋ editorial view์ ๋๋ค.articles/content/collected-news/YYYY-MM-DD/๋ raw candidate output์ ๋๋ค.articles/content/newsroom/YYYY-MM-DD/๋ reporter, editor, fact-check, quality, retry, QA review artifact์ ๋๋ค.articles/newsletters/๋ public issue output์ธnewsletter.md์index.html์ ๋๋ค. ์ฃผ๊ฐ ์ ํ ํ ๊ณต๊ฐ ์ด์๋YYYY-Wnn/์ ์ฐ๊ณ , ์ ํ ์ด์ daily ์ด์๋YYYY-MM-DD/ํํ๋ก ๋จ์ ์์ต๋๋ค. ์ค๊ฐ ์ฐ์ถ๋ฌผ(์ ๋ ์ค)์ ๊ณ์YYYY-MM-DD/์ ๋๋ค.- ์ค์ ๊ตฌํ๊ณผ tooling์ ๋ชจ๋
src/์ ์์ต๋๋ค.src/shared/**(๊ณตํต ๋ฐํ์ยท๋๋ฉ์ธยทtoolingยท๋ฐํ์ config/data),src/collector/**,src/discovery/**,src/generator/**(select/reporter/editor/quality/repair/diagnostics/render/validate/publish)๋ก ๋๋ฉ๋๋ค. #262 ์ฌ๊ตฌ์ฑ์ผ๋ก rootscripts/*.jswrapper์scripts/lib/๋ ์ ๊ฑฐ๋์๊ณscripts/์๋ ๋ ์ด์ ์คํ ์ฝ๋๊ฐ ์์ต๋๋ค. .github/workflows/๋ newsroom PR workflow์ validation workflow์ ๋๋ค.
Scoped AGENTS ์ ์ฑ (Scoped AGENTS Policy)
Root AGENTS.md๋ ์ ์ฅ์ ์ ์ฒด์ ์ ์ฉ๋ฉ๋๋ค. ํด๋๋ณ scoped AGENTS.md๋ ๊ทธ ํด๋๊ฐ ์ ์ฅ์ ๊ธฐ๋ณธ๊ฐ๊ณผ ๋ค๋ฅธ safety-critical ๊ท์น์ด๋ ๊ณ์ฝ์ ๊ฐ์ง ๋๋ง ์ถ๊ฐํฉ๋๋ค.
scoped AGENTS.md๋ ์ด root ์ง์นจ์ ์์ํฉ๋๋ค. ์ฆ ํด๋๋ณ ์ ์ฝ์ ๋ํ ๋ฟ, ์ ์ฅ์ ์ ์ฒด ๊ท์น์ ๋์ฒดํ์ง ์์ต๋๋ค. ์ด root ํ์ผ๊ณผ ์ถฉ๋ํ๋ scoped ์ง์นจ์ ๋ง๋ค์ง ๋ง์ธ์.
| Path | scoped ์ง์นจ์ด ์กด์ฌํ๋ ์ด์ |
|---|---|
src/AGENTS.md |
์ค์ ๊ตฌํ, layer/์์กด ๋ฐฉํฅ, deterministic selection, source binding, quality gate, renderer ๊ณ์ฝ๊ณผ testยทfixture ์ ๋ขฐ ์ ์ฑ ์ ๋ณดํธํฉ๋๋ค. |
state/AGENTS.md |
ํ์ดํ๋ผ์ธ ์ด์ state(source-monitor-registry, source-snapshots, article-exposure-history) ๊ณ์ฝ์ ๋ณดํธํฉ๋๋ค. |
.github/workflows/AGENTS.md |
workflow gate, secret handling, PR-based publishing ์ ์ฑ ์ ๋ณดํธํฉ๋๋ค. |
docs/AGENTS.md |
๋ฌธ์ ํ๊ธํ, ํ์ฌ ์ด์ ๋ฌธ์ ๊ธฐ์ค, ๋งํฌ ์ ์ง ๊ท์น์ ๋ณดํธํฉ๋๋ค. |
articles/content/AGENTS.md |
generated/review artifact ๋ณด์กด ๊ธฐ์ค๊ณผ cleanup ๊ธ์ง์ ์ ๋ณดํธํฉ๋๋ค. |
๋ณด๊ธฐ ์ข์ ๋์นญ์ ๋ง์ถ๋ ค๋ ๋ชฉ์ ๋ง์ผ๋ก scoped AGENTS.md๋ฅผ ์ถ๊ฐํ์ง ๋ง์ธ์. ๊ทธ ํด๋์ ์ํ์ด๋ ๋ชจํธํจ์ ์ค์ง์ ์ผ๋ก ์ค์ด๋ ๊ท์น์ด ์์ ๋๋ง ์ถ๊ฐํฉ๋๋ค.
์ ์ฅ์ ํ์ ์ llm-wiki๋ถํฐ
์ ์ฅ์ ๊ตฌ์กฐ, ์ ์ฑ
๊ฐ, ๋ชจ๋ ์์น๊ฐ ๊ถ๊ธํ๋ฉด ์ฝ๋ grep ์ ์ llm-wiki/index.md(๋ก์ปฌ ์ ์ฉ, gitignored โ ์๋ ํ๊ฒฝ์์๋ ๊ฑด๋๋๋๋ค)๋ฅผ ๋จผ์ ํ์ธํ์ธ์. ์ฝ๋์์ ํ์๋ ๋ฌธ์์ด๋ฏ๋ก ์ ํํ ์์น์ ๊ฒฝ๋ก๋ ์ฝ๋๋ก ์ฌํ์ธํฉ๋๋ค. ์คํค๋ง์ ์ด์ ๊ท์น์ llm-wiki/AGENTS.md ์ฐธ๊ณ .
๋ช ๋ น์ด (Commands)
Windows PowerShell์์๋ npm๋ณด๋ค npm.cmd๋ฅผ ์ฌ์ฉํ์ธ์.
npm.cmd run test # test:unit (run-node-tests.js over src) + test:script
npm.cmd run validate # full safety gate (encoding, hygiene, fixtures, policy, config, site, quality, localization, ...)
npm.cmd run ci # test + validate
npm.cmd run collect # collect candidates from src/shared/data/news-sources.json -> articles/content/collected-news/
npm.cmd run generate # run the LLM newsroom pipeline (needs GEMINI_API_KEY for default provider)
validate๋ ์ฌ๋ฌ validate:*์ check:* ํ์ ์คํฌ๋ฆฝํธ๋ฅผ ๊ธธ๊ฒ ์ด์ด ๋ถ์ธ ์ฒด์ธ์
๋๋ค(package.json ์ฐธ๊ณ ). ๋ณ๊ฒฝ ๋ฒ์๊ฐ ์ข์ผ๋ฉด ํด๋น ๋ถ๋ถ๋ง ๊ณจ๋ผ ์คํํ์ธ์.
๋จ์ผ ํ ์คํธ ํ์ผ์ ์ง์ ์คํ:
node src/shared/tooling/cli/run-node-tests.js src # all unit tests (the runner)
node --test src/generator/test/contract/fixture-policy.test.js # one file via Node's built-in runner
๊ตฌํ ์ปจ๋ฒค์ (Conventions)
- CommonJS
require, 2์นธ ๋ค์ฌ์ฐ๊ธฐ, ์ธ๋ฏธ์ฝ๋ก , Node 20 compatibility.
๊ฒ์ฆ (Validation)
์ฝ๋๋ ์ฐ์ถ๋ฌผ์ ์์ ํ ๋ค์๋ ๊ธฐ๋ณธ์ ์ผ๋ก ์๋ ๋ช ๋ น์ ์คํํ์ธ์.
npm.cmd run test
npm.cmd run validate
๋ณ๊ฒฝ ๋ฒ์๊ฐ ์ข๋๋ผ๋ ๊ด๋ จ ์ธ๋ถ ๊ฒ์ฆ์ด ์์ผ๋ฉด ํจ๊ป ์คํํฉ๋๋ค. ์๋ฅผ ๋ค์ด source registry ๋ณ๊ฒฝ์ npm.cmd run validate:config, ๋ฌธ์/ํ์๊ฐ ๋ณ๊ฒฝ์ npm.cmd run validate:localization์ ํฌํจํฉ๋๋ค.
๋ก์ปฌ validate:quality๊ฐ ์คํจํ๋ฉด ์ฝ๋ ๋ฒ๊ทธ๋ก ๋จ์ ํ๊ธฐ ์ ์ ๋ฏธ์ปค๋ฐ articles/content/newsroom/**/editor-draft.json์ด ๋จ์ ์๋์ง ๋จผ์ ํ์ธํ์ธ์. ์ด์ generate run์ด ๋จ๊ธด ์์ฌ๋ฅผ ์ฌ์ฑ์ ํด ์๊ธฐ๋ ๊ฑฐ์ง ์์ฑ์ด๋ฉฐ(clean clone๊ณผ CI์๋ ์ฌํ๋์ง ์์), ํด๋น ํ์ผ์ ์น์ฐ๊ณ ๋ค์ ์คํํ๋ฉด ํด์๋ฉ๋๋ค. quality-report๋ฅผ ๋ฎ์ด์จ์ ๋ง์ถ๋ ๋ฐฉ์ด ํจ์น๋ ๊ธ์ง์
๋๋ค. ์์ธํ ์ด์ ๋ articles/content/AGENTS.md ์ฐธ๊ณ .
Local Agent Scratch (์์ ์ฉ ์์ ํ์ผ)
- Repository root
PLAN.md์PLAN.local.md๋ repository artifact๊ฐ ์๋๋ผ local-only scratch๋ก ์ทจ๊ธํฉ๋๋ค. - ์์
๊ณํ์ด ํ์ํ๋ฉด
.tmp/codex/<task>.md๋๋.codex/PLAN.local.md์ฒ๋ผ.gitignore๋ก ๋ณดํธ๋๋ local-only ๊ฒฝ๋ก๋ฅผ ์ฌ์ฉํฉ๋๋ค. - PR์๋ product code, tests, official docs๋ง ํฌํจํ๊ณ Codex scratch, worklog, temp plan ๋ฌธ์๋ commitํ์ง ์์ต๋๋ค.
- memory/notes/checkpoint ์ฑ๊ฒฉ์ Markdown, ์์ ๋ฉ๋ชจ, TODO ์ ๋ฆฌ, ์์ ๋ณด๊ณ ์๋ repository ๋ฌธ์๋ก ๋จ๊ธฐ์ง ์์ต๋๋ค.
- ์ผ์์ ์ผ๋ก ๋ง๋ ์คํ์ฉ ์ฝ๋, ๋๋ฒ๊น ์ฉ one-off script, ์ฌํ/๋ถ์์ฉ helper๋ repository์ ์ ์ฅํ์ง ์์ต๋๋ค. ํ์ํ๋ฉด ์ ์ฅ์ ๋ฐ์ด๋ OS ์์ ๋๋ ํฐ๋ฆฌ์์ ์ฌ์ฉํ๊ณ ์์ ์๋ฃ ์ ์ ์ญ์ ํฉ๋๋ค.
- ๊ณผ๊ฑฐ issue ํด๊ฒฐ, ๋ฆฌํฉํฐ๋ง ๊ณํ, ๋๋ฒ๊ทธ baseline ๊ฐ์ ์์ ์ค๊ฐ ์ฐ์ถ๋ฌผ์ repository ๋ฌธ์๋ก ๋จ๊ธฐ์ง ์์ต๋๋ค. ๋ณด์กดํด์ผ ํ ์ ์ฑ ์ด๋ ๊ณ์ฝ์ ํ์ฌ ์ฝ๋์ ๋ง๋ canonical docs์ ์ง์ ํตํฉํฉ๋๋ค.
Fixture Trust Policy (fixture ์ ๋ขฐ ์ ์ฑ )
- generated artifact๋ฅผ good/golden fixture๋ก ์๋ ์ ๋ขฐํ์ง ์์ต๋๋ค.
src/shared/test/fixtures/**/good์๋ ์ฌ๋์ด ๊ฒ์ํ curated non-generated PASS sample๋ง ๋๊ณ , generated artifact์์ ํ๊ท ๊ฐ์น๊ฐ ์๋ ๊ฒฝ์ฐ ์ต์ ์ ๋ ฅ๋งbad/regression fixture๋ก ๋ณด์กดํฉ๋๋ค. - ์์ธ fixture ์ ๋ขฐ ๊ณ์ฝ(ledger schema, provenance enum, seed-evidence ๊ฒฝ๊ณ, layout ๊ณ์ฝ, ์ ์ฒด exclusion ๋ชฉ๋ก)์ ์ ๋ณธ์ src/AGENTS.md์ ๋๋ค.
PR Scope (PR ๋ฒ์)
๋ณ๊ฒฝ์ ์ข๊ฒ ์ ์งํ๊ณ ๊ด๋ จ ํ์ผ๋ง stageํ์ธ์. commit ๋ฉ์์ง๋ ๊ฐ๊ฒฐํ ๋ช ๋ นํ ์์ด ์ ๋ชฉ์ ์ฌ์ฉํฉ๋๋ค. unrelated cleanup, large directory reorg, workflow behavior ๋ณ๊ฒฝ์ ์ฌ์ฉ์ ์์ฒญ ์์ด ๋ฌถ์ง ์์ต๋๋ค.