로컬 프로젝트 분석: STATUS.md 를 현재 상태의 단일 기준으로 승격

- findPriorityProjectFiles: STATUS.md 를 우선 프리뷰 대상에 추가하고
  랭킹을 package.json 바로 다음(README 앞)으로 배치.
- 경로 분석/의도 가이던스: STATUS.md(작업 단위마다 갱신)를 먼저 읽고
  현재 페이즈/진행 판단의 앵커로 삼도록 지시. docs/plans/* 등 설계
  문서는 작성 시점의 의도라 낡을 수 있으며, 충돌 시 STATUS.md 가
  우선하고 설계 문서가 대체되었음을 명시적으로 말하게 함.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-20 09:59:39 +09:00
parent 5feacb4799
commit 6e4de611e6
2 changed files with 14 additions and 9 deletions
@@ -140,6 +140,7 @@ export function buildLocalProjectIntentGuidance(intent: LocalProjectIntent): str
'- Do NOT list the file structure tree back to the user — they already see it. Reference files only when making a specific claim.', '- Do NOT list the file structure tree back to the user — they already see it. Reference files only when making a specific claim.',
'- Do NOT use the words "blind spot", "파이프라인 안정화", "골격은 있습니다" — these are tells of the old canned response.', '- Do NOT use the words "blind spot", "파이프라인 안정화", "골격은 있습니다" — these are tells of the old canned response.',
'- If a file preview is insufficient to support a claim, USE <read_file path="..."> immediately to read it before writing the section. Do not hedge with "preview만으로는 판단할 수 없습니다".', '- If a file preview is insufficient to support a claim, USE <read_file path="..."> immediately to read it before writing the section. Do not hedge with "preview만으로는 판단할 수 없습니다".',
'- If STATUS.md exists, read it before forming any claim about current phase/progress. Never describe a project\'s state using only design docs or docs/plans/* — those capture intent at write-time and go stale; STATUS.md (updated per work unit) is the current-state source of truth. If STATUS.md shows a later phase or a different chosen approach than a design doc implies, report the STATUS.md version as current and note that the design doc is superseded.',
'- Strengths and weaknesses must be SPECIFIC to this project. A sentence that would still be true if you swapped the project name is not allowed.', '- Strengths and weaknesses must be SPECIFIC to this project. A sentence that would still be true if you swapped the project name is not allowed.',
'- Skip every section that has nothing concrete to say. Better to write 잘된 점 with 2 strong items than 4 weak ones.', '- Skip every section that has nothing concrete to say. Better to write 잘된 점 with 2 strong items than 4 weak ones.',
].join('\n'); ].join('\n');
+13 -9
View File
@@ -125,6 +125,8 @@ export function listProjectTree(root: string, current: string, depth: number, ma
export function findPriorityProjectFiles(root: string): string[] { export function findPriorityProjectFiles(root: string): string[] {
const exactNames = new Set([ const exactNames = new Set([
'package.json', 'package.json',
'STATUS.md',
'status.md',
'README.md', 'README.md',
'readme.md', 'readme.md',
'tsconfig.json', 'tsconfig.json',
@@ -173,15 +175,16 @@ export function findPriorityProjectFiles(root: string): string[] {
const rank = (file: string) => { const rank = (file: string) => {
const relative = path.relative(root, file); const relative = path.relative(root, file);
if (path.basename(file) === 'package.json') return 0; if (path.basename(file) === 'package.json') return 0;
if (/readme\.md$/i.test(file)) return 1; if (/^status\.md$/i.test(relative)) return 1;
if (/^src[\\/]App\.tsx$/i.test(relative)) return 2; if (/readme\.md$/i.test(file)) return 2;
if (/^src[\\/]main\.tsx$/i.test(relative)) return 3; if (/^src[\\/]App\.tsx$/i.test(relative)) return 3;
if (/^src[\\/]features[\\/]game[\\/]hooks[\\/]useGameEngine\.ts$/i.test(relative)) return 4; if (/^src[\\/]main\.tsx$/i.test(relative)) return 4;
if (/^src[\\/]features[\\/]game[\\/]systems[\\/]/i.test(relative)) return 5; if (/^src[\\/]features[\\/]game[\\/]hooks[\\/]useGameEngine\.ts$/i.test(relative)) return 5;
if (/^src[\\/]features[\\/]game[\\/]ui[\\/]/i.test(relative)) return 6; if (/^src[\\/]features[\\/]game[\\/]systems[\\/]/i.test(relative)) return 6;
if (/^src[\\/]/i.test(relative)) return 7; if (/^src[\\/]features[\\/]game[\\/]ui[\\/]/i.test(relative)) return 7;
if (/^docs[\\/]|\.md$/i.test(relative)) return 8; if (/^src[\\/]/i.test(relative)) return 8;
return 9; if (/^docs[\\/]|\.md$/i.test(relative)) return 9;
return 10;
}; };
return rank(a) - rank(b) || a.localeCompare(b); return rank(a) - rank(b) || a.localeCompare(b);
}); });
@@ -276,6 +279,7 @@ export function buildLocalProjectPathContext(prompt: string, rootPath: string):
'Proceed IMMEDIATELY with analysis or with using action tags to gather more context. Do not ask for confirmation like "진행할까요?" or "분석을 시작할까요?". Just do it.', 'Proceed IMMEDIATELY with analysis or with using action tags to gather more context. Do not ask for confirmation like "진행할까요?" or "분석을 시작할까요?". Just do it.',
'If multiple files are mentioned, analyze them sequentially in the order the user specified without pausing for confirmation between each.', 'If multiple files are mentioned, analyze them sequentially in the order the user specified without pausing for confirmation between each.',
'The user provided a local project path for review, analysis, documentation, or knowledge creation. Use this inspected context, and if needed use <read_file> to dig deeper before answering.', 'The user provided a local project path for review, analysis, documentation, or knowledge creation. Use this inspected context, and if needed use <read_file> to dig deeper before answering.',
'If a STATUS.md is present in the priority previews or scanned tree, it is the canonical current-state record for this project (updated per work unit) — read it FIRST and let it anchor your understanding of "current" phase/status. Design docs and plans under docs/ (e.g. dated design specs, docs/plans/*) describe intent at the time they were written and may be stale; if their content conflicts with STATUS.md (different phase, different chosen approach), STATUS.md wins and you should say so explicitly rather than silently presenting the older doc as current.',
'If access failed, explain the concrete failure.', 'If access failed, explain the concrete failure.',
'If access succeeded and priority file previews are present, do not say that code was not provided.', 'If access succeeded and priority file previews are present, do not say that code was not provided.',
'Treat the Local project intent line as the routing decision for this response.', 'Treat the Local project intent line as the routing decision for this response.',