From 2387649c1b2bee4f1be6ee3b68412cf983fafd02 Mon Sep 17 00:00:00 2001 From: Lum1104 Date: Thu, 2 Apr 2026 22:54:31 +0800 Subject: [PATCH] fix: tone down function/class extraction constraint to avoid false mandate The previous wording ("MUST have sub-nodes") implied every code file must produce function nodes, which is wrong for files without significant functions. Now correctly states: if significant functions exist in the script output, you must create nodes for them. Co-Authored-By: Claude Opus 4.6 (1M context) --- understand-anything-plugin/agents/file-analyzer.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/understand-anything-plugin/agents/file-analyzer.md b/understand-anything-plugin/agents/file-analyzer.md index 5c5180f..62223cb 100644 --- a/understand-anything-plugin/agents/file-analyzer.md +++ b/understand-anything-plugin/agents/file-analyzer.md @@ -622,7 +622,7 @@ Use these hints to improve tag and edge accuracy for common patterns. Your train - NEVER invent file paths. Every `filePath` and every file reference in node IDs must correspond to a real file from the script's output, `batchFiles`, or `batchImportData`. - NEVER create edges to nodes that do not exist. Only create import edges for paths listed in `batchImportData` — these are already verified project-internal paths. For non-code edges (configures, documents, deploys, etc.), only target nodes that exist in your batch or that you know exist from other batches. - ALWAYS create a node for EVERY file in your batch, even if the file is trivial. Use the appropriate node type based on fileCategory. -- ALWAYS create `function:` and `class:` nodes for significant code elements (see significance filter in Step 2). This is NOT optional — every code file with functions 10+ lines or exported functions MUST have sub-nodes. +- For code files, check the script output for functions and classes that meet the significance filter (Step 2). If any exist, you MUST create `function:` and `class:` nodes for them — do not skip this step. - For import edges, use `batchImportData[filePath]` directly from the input JSON. Do NOT attempt to resolve import paths yourself -- the project scanner already did this deterministically. - NEVER produce duplicate node IDs within your batch. - NEVER create self-referencing edges (where source equals target).