From 3fb12033d65ec4ce2aed3c5d9594ad9f9b7f48ae Mon Sep 17 00:00:00 2001 From: Lum1104 Date: Sat, 28 Mar 2026 11:11:49 +0800 Subject: [PATCH] =?UTF-8?q?fix(understand):=20address=20review=20findings?= =?UTF-8?q?=20=E2=80=94=20importCount=20metric=20source=20and=20plan=20typ?= =?UTF-8?q?o?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Update importCount metric description to reference batchImportData[file.path].length instead of "number of import statements" (contradicted "do NOT extract imports" rule) - Fix duplicate /index.js → /index.jsx in impl plan Task 5 extension variants Co-Authored-By: Claude Opus 4.6 --- docs/plans/2026-03-27-token-reduction-impl.md | 2 +- .../skills/understand/file-analyzer-prompt.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/plans/2026-03-27-token-reduction-impl.md b/docs/plans/2026-03-27-token-reduction-impl.md index 45c04eb..848276b 100644 --- a/docs/plans/2026-03-27-token-reduction-impl.md +++ b/docs/plans/2026-03-27-token-reduction-impl.md @@ -440,7 +440,7 @@ For each file, read its content and extract import paths using language-appropri For each extracted import path: 1. Compute the resolved file path relative to project root: - For relative imports (`./x`, `../x`): resolve from the importing file's directory - - Try these extension variants in order if the import has no extension: `.ts`, `.tsx`, `.js`, `.jsx`, `/index.ts`, `/index.js`, `/index.tsx`, `/index.js`, `.py`, `.go`, `.rs`, `.rb` + - Try these extension variants in order if the import has no extension: `.ts`, `.tsx`, `.js`, `.jsx`, `/index.ts`, `/index.js`, `/index.tsx`, `/index.jsx`, `.py`, `.go`, `.rs`, `.rb` 2. Check if the resolved path exists in the discovered file list 3. If yes: add to this file's resolved imports list 4. If no: skip (external, unresolvable, or dynamic import) diff --git a/understand-anything-plugin/skills/understand/file-analyzer-prompt.md b/understand-anything-plugin/skills/understand/file-analyzer-prompt.md index e7c2d2f..7873d0a 100644 --- a/understand-anything-plugin/skills/understand/file-analyzer-prompt.md +++ b/understand-anything-plugin/skills/understand/file-analyzer-prompt.md @@ -59,7 +59,7 @@ For each file in `batchFiles`, read the file content and extract: **Basic Metrics:** - Total line count - Non-empty line count (lines that are not blank or comment-only) -- Import count (number of import statements) +- Import count — use `batchImportData[file.path].length` from the input JSON (do not count from source) - Export count (number of export statements) - Function count, class count