diff --git a/src/lib/contextBuilders/localProjectIntent.ts b/src/lib/contextBuilders/localProjectIntent.ts index 531cadd..d04c4b0 100644 --- a/src/lib/contextBuilders/localProjectIntent.ts +++ b/src/lib/contextBuilders/localProjectIntent.ts @@ -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 use the words "blind spot", "파이프라인 안정화", "골격은 있습니다" — these are tells of the old canned response.', '- If a file preview is insufficient to support a claim, USE 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.', '- Skip every section that has nothing concrete to say. Better to write 잘된 점 with 2 strong items than 4 weak ones.', ].join('\n'); diff --git a/src/lib/contextBuilders/localProjectPath.ts b/src/lib/contextBuilders/localProjectPath.ts index 4595640..86f866e 100644 --- a/src/lib/contextBuilders/localProjectPath.ts +++ b/src/lib/contextBuilders/localProjectPath.ts @@ -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 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.',