로컬 프로젝트 분석: 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
+13 -9
View File
@@ -125,6 +125,8 @@ export function listProjectTree(root: string, current: string, depth: number, ma
export function findPriorityProjectFiles(root: string): string[] {
const exactNames = new Set([
'package.json',
'STATUS.md',
'status.md',
'README.md',
'readme.md',
'tsconfig.json',
@@ -173,15 +175,16 @@ export function findPriorityProjectFiles(root: string): string[] {
const rank = (file: string) => {
const relative = path.relative(root, file);
if (path.basename(file) === 'package.json') return 0;
if (/readme\.md$/i.test(file)) return 1;
if (/^src[\\/]App\.tsx$/i.test(relative)) return 2;
if (/^src[\\/]main\.tsx$/i.test(relative)) return 3;
if (/^src[\\/]features[\\/]game[\\/]hooks[\\/]useGameEngine\.ts$/i.test(relative)) return 4;
if (/^src[\\/]features[\\/]game[\\/]systems[\\/]/i.test(relative)) return 5;
if (/^src[\\/]features[\\/]game[\\/]ui[\\/]/i.test(relative)) return 6;
if (/^src[\\/]/i.test(relative)) return 7;
if (/^docs[\\/]|\.md$/i.test(relative)) return 8;
return 9;
if (/^status\.md$/i.test(relative)) return 1;
if (/readme\.md$/i.test(file)) return 2;
if (/^src[\\/]App\.tsx$/i.test(relative)) return 3;
if (/^src[\\/]main\.tsx$/i.test(relative)) return 4;
if (/^src[\\/]features[\\/]game[\\/]hooks[\\/]useGameEngine\.ts$/i.test(relative)) return 5;
if (/^src[\\/]features[\\/]game[\\/]systems[\\/]/i.test(relative)) return 6;
if (/^src[\\/]features[\\/]game[\\/]ui[\\/]/i.test(relative)) return 7;
if (/^src[\\/]/i.test(relative)) return 8;
if (/^docs[\\/]|\.md$/i.test(relative)) return 9;
return 10;
};
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.',
'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.',
'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 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.',