feat(supporters): 승인 UI·입력 반영·워커 — §7-5 ClinicInputsPanel + supporter_builds/inputs 마이그레이션 + apply_inputs, §12-2 상단 고지·개설자 승인·색인 빌드 필터, §7-6 워커 E2E(뷰성형외과 URL → 5편 → 게이트 0오류)
- 게이트: DISCLOSURE_TOP_MISSING, APPROVED_*, UNAPPROVED_IN_INDEXABLE_BUILD, PRESS_VOICE 규칙화, 픽스처 추가 (16/16) - 생성기: --site 옵션, 병원 확인 답변(clinicAnswers) 근거 [A] - default_briefs.mjs 첫 배치 자동 기획, workers/supporters-build/run.mjs - 랜딩: SAMPLE REPORT 라벨 "실제 사례"로 (haewon 지시) - v2 §11-6·§11-7 기록, E2E 리포트 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
1 parent
64a3bce9a3
commit
7e515b70ae
56 files changed
+2530
-41
No files matched your search
@@ -56,7 +56,7 @@ const SOURCE_TYPE_LABEL = { clinic: '병원 제공', doctor: '원장 설명', pr
|
||||
* brief 하나에 대한 컨텍스트 문자열과 sources 배열을 만든다.
|
||||
* brief.evidence = { pages: [url], shorts: [videoId], transcripts: [{id,title,speaker,text}], news: [url], regulation: [{label,url,note}], platform: bool }
|
||||
*/
|
||||
export function buildContext(brief, { ev, fact, authors, videos, news, today }) {
|
||||
export function buildContext(brief, { ev, fact, authors, videos, news, answers, today }) {
|
||||
const parts = [];
|
||||
const missing = [];
|
||||
const sources = [];
|
||||
@@ -111,6 +111,13 @@ export function buildContext(brief, { ev, fact, authors, videos, news, today })
|
||||
});
|
||||
parts.push(`## 4. 규제·연구 원문\n\n${rparts.length ? rparts.join('\n\n') : '(규제·연구 근거 없음. FDA·ISO·승인·연구를 언급하지 않는다)'}`);
|
||||
|
||||
// 4b. 병원이 서면으로 확인해 준 답변 (apply_inputs → clinicAnswers.json). §6 4~7항. 병원 제공 근거로 친다.
|
||||
const aparts = (answers?.items ?? []).map((a, i) => `### [A${i + 1}] ${a.question ?? a.key} (병원 확인 ${a.at}${a.by ? `, ${a.by}` : ''})\n${a.answer}`);
|
||||
if (aparts.length) {
|
||||
parts.push(`## 4b. 병원 확인 답변 (병원이 서면으로 확인한 값. "병원 확인 기준"으로 인용한다)\n\n${aparts.join('\n\n')}`);
|
||||
pushSource({ label: `${clinicName} 서면 확인 답변 (${(answers.items.at(-1)?.at) ?? today})`, url: fact?.url ?? '', accessed: today, type: 'clinic' });
|
||||
}
|
||||
|
||||
// 5. 팩트 시트 (플랫폼 집계 포함)
|
||||
if (fact) {
|
||||
const slim = { ...fact };
|
||||
|
||||
@@ -8,9 +8,6 @@ export function toMarkdown(data, body) {
|
||||
return `---\n${fm}---\n${String(body).trim()}\n`;
|
||||
}
|
||||
|
||||
/** 기자·전문가 화법 (v2 §12-2 (3), 의료법 56조 2항 10호 대응). 경고 수준. */
|
||||
export const PRESS_VOICE = /본지|기자(?!회견)|전문가에 따르면|업계에서는|업계 관계자/;
|
||||
|
||||
/**
|
||||
* 글 한 편의 소스 수준 게이트. dist 없이 frontmatter·본문만 본다.
|
||||
* 반환 { errors, warns, stats }. errors 가 있으면 발행 불가.
|
||||
@@ -43,8 +40,6 @@ export function gatePost(md, { physicians = {}, supporters = {}, homeText = '' }
|
||||
const tableCount = (body.match(/^\|\s*:?-+/gm) ?? []).length;
|
||||
if (!tableCount) findings.push({ level: R.W, code: 'NO_TABLE', msg: '본문에 표가 없음 (1개 이상 권장)' });
|
||||
if (!/\?\s*$/.test(String(data.title ?? '')) && !/(표|목록|체크리스트|기록)\s*$/.test(String(data.title ?? ''))) findings.push({ level: R.W, code: 'TITLE_NOT_QUESTION', msg: `제목이 질문형이 아님: "${data.title}"` });
|
||||
const press = fullText.match(PRESS_VOICE);
|
||||
if (press) findings.push({ level: R.W, code: 'PRESS_VOICE', msg: `기자·전문가 화법: "${press[0]}"` });
|
||||
const desc = String(data.description ?? '');
|
||||
if (desc.length < 60 || desc.length > 200) findings.push({ level: R.W, code: 'DESCRIPTION_LENGTH', msg: `description ${desc.length}자 (90~160자 권장)` });
|
||||
|
||||
|
||||
Reference in new issue
Block a user