From 472836f0f93bb4bf6a44ca00ca46940be169c549 Mon Sep 17 00:00:00 2001 From: Jayden Date: Tue, 1 Dec 2026 15:37:21 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=EC=9E=91=EC=97=85=20=EA=B8=B0=EB=A1=9D?= =?UTF-8?q?(worklog)=20=EA=B8=80=20=EC=A2=85=EB=A5=98=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 5.5 --- src/prompts/editable.test.ts | 4 ++-- src/prompts/en.ts | 2 ++ src/prompts/ko.ts | 2 ++ src/prompts/prompts.test.ts | 9 +++++++++ src/prompts/types.ts | 2 +- 5 files changed, 16 insertions(+), 3 deletions(-) diff --git a/src/prompts/editable.test.ts b/src/prompts/editable.test.ts index fabe745..e0c1997 100644 --- a/src/prompts/editable.test.ts +++ b/src/prompts/editable.test.ts @@ -15,8 +15,8 @@ const LOCALES = ['ko', 'en'] as const; describe('EDITABLE_PROMPT_KEYS', () => { it('정해진 키를 모두 가짐', () => { - assert.equal(EDITABLE_PROMPT_KEYS.length, 6 + 3 + 3 + 3 + 9); - for (const key of ['plan.system', 'fill.system', 'tone.plain', 'postType.lecture', 'length.long.target', 'requiredBlocks.h1']) { + assert.equal(EDITABLE_PROMPT_KEYS.length, 6 + 3 + 4 + 3 + 9); + for (const key of ['plan.system', 'fill.system', 'tone.plain', 'postType.lecture', 'postType.worklog', 'length.long.target', 'requiredBlocks.h1']) { assert.ok((EDITABLE_PROMPT_KEYS as readonly string[]).includes(key), key); } }); diff --git a/src/prompts/en.ts b/src/prompts/en.ts index 66771c9..66ebfc8 100644 --- a/src/prompts/en.ts +++ b/src/prompts/en.ts @@ -45,6 +45,8 @@ const postType: PromptPack['postType'] = { 'why this technique is needed → the core concept explained with this work\'s code → how to apply it, step by step → points to watch out for and wrap-up. Put the concept and method at the center, not the timeline of the work, so readers can learn by following along', experiment: 'the question you set out to check → how you tried it (method) → what came out (results; ask with a blank when there is no evidence) → what the results tell you (interpretation). Write in the order of the question and the check, not the order of the work. State the question once in the introduction, concretely saying what you set out to check, and do not bring it back in every section as "the next question was …"', + worklog: + 'what led to this piece of work → what was changed and added → close with "so in this work, I did …". Since this is a work log, keep it short and plain, and do not add a separate section title such as "Conclusion" or "Summary" just for the ending. Do not write it as a story continuing from earlier work', }; const length: PromptPack['length'] = { diff --git a/src/prompts/ko.ts b/src/prompts/ko.ts index 20d8b17..b70db1d 100644 --- a/src/prompts/ko.ts +++ b/src/prompts/ko.ts @@ -45,6 +45,8 @@ const postType: PromptPack['postType'] = { '이 기술이 왜 필요한지 → 핵심 개념을 이 작업의 코드로 설명 → 적용하는 방법을 순서대로 → 쓸 때 주의할 점과 정리. 독자가 따라 배울 수 있게 작업 경과보다 개념과 방법을 중심에 둔다', experiment: '확인하려던 질문 → 어떻게 해 봤는지(방법) → 무엇이 나왔는지(결과, 근거가 없으면 빈칸으로 묻는다) → 결과로 알게 된 것(해석). 작업 순서가 아니라 질문과 확인의 순서로 쓴다. 질문은 도입에서 한 번, 무엇을 확인하려 했는지 구체적으로 쓰고, 절마다 "~가 다음 질문이었다" 로 다시 꺼내지 않는다', + worklog: + '이번 작업을 하게 된 계기 → 무엇을 바꾸고 더했는지 → "그래서 이번 작업에서 ~를 했다" 로 마무리. 작업 기록이므로 짧고 담백하게 쓰고, 마무리를 위한 "결론"·"정리" 같은 절 제목은 따로 두지 않는다. 이전 작업과 이어지는 이야기로 쓰지 않는다', }; const length: PromptPack['length'] = { diff --git a/src/prompts/prompts.test.ts b/src/prompts/prompts.test.ts index 56ffe41..862db33 100644 --- a/src/prompts/prompts.test.ts +++ b/src/prompts/prompts.test.ts @@ -1185,6 +1185,15 @@ describe('getPromptPack', () => { assert.ok(text.includes(pack.length.medium.target)); }); + it('worklog 글 종류 문구가 옵션 표에 들어간다', () => { + for (const locale of ['ko', 'en'] as const) { + const pack = getPromptPack(locale); + assert.notEqual(pack.postType.worklog, '', locale); + const text = pack.write.user(writeInput(context({ postType: 'worklog', locale }))); + assert.ok(text.includes(pack.postType.worklog), locale); + } + }); + it('작성 입력에 사실, 코드 원문, 빈칸, 링크 제목이 번호와 함께 들어간다', () => { const text = getPromptPack('en').write.user(writeInput()); // 커밋 출처는 내부 근거로만 쓰고 작성 단계에 넘기지 않는다 diff --git a/src/prompts/types.ts b/src/prompts/types.ts index fb08e15..1cc3a68 100644 --- a/src/prompts/types.ts +++ b/src/prompts/types.ts @@ -9,7 +9,7 @@ import type { StoredAnalysis } from '../generation/stored-analysis.ts'; export const TONES = ['plain', 'friendly', 'professional'] as const; export type Tone = (typeof TONES)[number]; -export const POST_TYPES = ['experience', 'lecture', 'experiment'] as const; +export const POST_TYPES = ['experience', 'lecture', 'experiment', 'worklog'] as const; export type PostType = (typeof POST_TYPES)[number]; export const LENGTHS = ['short', 'medium', 'long'] as const;