ln-511-code-quality-checker by levnikolaevich/claude-code-skills
npx skills add https://github.com/levnikolaevich/claude-code-skills --skill ln-511-code-quality-checkerPaths: File paths (
shared/,references/,../ln-*) are relative to skills repo root. If not found at CWD, locate this SKILL.md directory and go up one level for repo root. Ifshared/is missing, fetch files via WebFetch fromhttps://raw.githubusercontent.com/levnikolaevich/claude-code-skills/master/skills/{path}.
基于度量指标、MCP 参考验证和问题扣分,分析已完成实现任务的定量代码质量评分。
| 输入 | 必需 | 来源 | 描述 |
|---|---|---|---|
storyId |
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
| 是 |
| args, git branch, kanban, user |
| 待处理的故事 |
解析: 故事解析链。状态过滤器: In Progress, To Review
| 度量指标 | 阈值 | 扣分 |
|---|---|---|
| 圈复杂度 | ≤10 通过,11-20 警告,>20 失败 | -5 (警告), -10 (失败) 每个函数 |
| 函数大小 | ≤50 行 通过,>50 警告 | -3 每个函数 |
| 文件大小 | ≤500 行 通过,>500 警告 | -5 每个文件 |
| 嵌套深度 | ≤3 通过,>3 警告 | -3 每个实例 |
| 参数数量 | ≤4 通过,>4 警告 | -2 每个函数 |
公式:代码质量评分 = 100 - 度量指标扣分 - 问题扣分
按严重程度的问题扣分:
| 严重程度 | 扣分 | 示例 |
|---|---|---|
| 高 | -20 | 安全漏洞、O(n²)+ 算法、N+1 查询 |
| 中 | -10 | DRY 违规、次优方法、缺少配置 |
| 低 | -3 | 命名约定、轻微代码异味 |
评分解读:
| 评分 | 状态 | 判定 |
|---|---|---|
| 90-100 | 优秀 | 通过 |
| 70-89 | 可接受 | 存在顾虑 |
| <70 | 低于阈值 | 发现问题 |
| 前缀 | 类别 | 默认严重程度 | MCP 参考 |
|---|---|---|---|
| SEC- | 安全(认证、验证、密钥) | 高 | — |
| SEC-DESTR- | 破坏性操作(防护:DB, FS, MIG, ENV, FORCE) | 高/中 | — |
| PERF- | 性能(算法、配置、瓶颈) | 中/高 | ✓ 必需 |
| MNT- | 可维护性(DRY, SOLID, 复杂度、死代码) | 中 | — |
| ARCH- | 架构(层、边界、模式、契约) | 中 | — |
| BP- | 最佳实践(实现与推荐不同) | 中 | ✓ 必需 |
| OPT- | 最优性(存在更好的方法实现此目标) | 中 | ✓ 必需 |
OPT- 子类别:
| 前缀 | 类别 | 严重程度 |
|---|---|---|
| OPT-OSS- | 存在开源替代方案 | 中(如果 >200 LOC 则为高) |
ARCH- 子类别:
| 前缀 | 类别 | 严重程度 |
|---|---|---|
| ARCH-LB- | 层边界:基础设施层外的 I/O、领域层中的 HTTP | 高 |
| ARCH-TX- | 事务边界:跨 3+ 层的 commit()、混合的 UoW 所有权 | 高(如果是认证/支付则为严重) |
| ARCH-DTO- | 缺少 DTO(4+ 参数无 DTO)、实体泄漏(API 响应中出现 ORM 实体) | 中(如果是认证/支付则为高) |
| ARCH-DI- | 依赖注入:依赖项不可替换用于测试(直接实例化,无注入机制)。例外:小型脚本/CLI 中参数/闭包足够 → 跳过 | 中 |
| ARCH-CEH- | 集中式错误处理:错误被静默吞没、堆栈跟踪泄漏到生产环境、无一致的错误日志记录。例外:50 行脚本 → 降级为低 | 中(如果完全没有处理程序则为高) |
| ARCH-SES- | 会话所有权:同一模块中的 DI 会话 + 本地会话 | 中 |
| ARCH-AI-SEB | 副作用广度:一个叶子函数中有 3+ 个副作用类别。冲突解决: 编排器/协调器函数(导入 3+ 个服务并按顺序委托)预期具有多个类别 — 不要标记 SEB | 中 |
| ARCH-AI-AH | 架构诚实性:具有写副作用的读命名函数 | 中 |
| ARCH-AI-FO | 扁平编排:叶子服务导入 3+ 个其他服务。编排器导入是预期的 — 不要标记 | 中 |
| ARCH-EVENT- | 事件通道一致性:发布者/订阅者名称不匹配(不匹配)、没有对应方的孤立通道(孤立) | 高(不匹配),中(孤立) |
PERF- 子类别:
| 前缀 | 类别 | 严重程度 |
|---|---|---|
| PERF-ALG- | 算法复杂度(大 O 表示法) | 如果 O(n²)+ 则为高 |
| PERF-CFG- | 包/库配置 | 中 |
| PERF-PTN- | 架构模式性能 | 高 |
| PERF-DB- | 数据库查询、索引 | 高 |
MNT- 子类别:
| 前缀 | 类别 | 严重程度 |
|---|---|---|
| MNT-DC- | 死代码:被替换的实现、未使用的导出/再导出、向后兼容包装器、已弃用的别名 | 中(如果是公共 API 则为高) |
| MNT-DRY- | DRY 违规:跨文件的重复逻辑 | 中 |
| MNT-GOD- | 上帝类:方法数 >15 或行数 >500 的类(不仅仅是文件大小) | 中(如果 >1000 行则为高) |
| MNT-SIG- | 方法签名质量:布尔标志参数、不清晰的返回类型、不一致的命名、>5 个可选参数 | 低 |
| MNT-ERR- | 错误契约不一致:同一服务中混合抛出 + 返回 None | 中 |
必读: 加载 shared/references/input_resolution_pattern.md
解析 storyId: 根据指南运行故事解析链(状态过滤器:[In Progress, To Review])。
通过 Linear 加载故事(完整)和已完成的实现任务(完整描述);跳过带有 "tests" 标签的任务。
收集更改的文件 (changed_files[]):必读: shared/references/git_scope_detection.md
changed_files[] → 按照指南进行到 Enrich 步骤双层检测(必做): 必读: shared/references/two_layer_detection.md 所有基于阈值的发现都需要第 2 层上下文分析。没有第 2 层的第 1 层发现 = 不是有效的发现。在报告任何度量指标违规之前,询问:"此违规是故意的还是设计上合理的?" 参见下面度量指标中的 Exception 列。
计算代码度量指标:
MCP 参考验证(代码更改必做 — 如果传递了 --skip-mcp-ref 标志则跳过): 必读: 加载 shared/references/research_tool_fallback.md
快速通道模式: 当使用
--skip-mcp-ref调用时,跳过整个此步骤(不进行 OPT-、BP-、PERF- 检查)。直接进行到步骤 6(静态分析)。这将成本从约 5000 个令牌减少到约 800 个令牌,同时保留度量指标 + 静态分析覆盖范围。
第 1 层 — 最优性 (OPT-):
* 从任务中提取目标(例如,"用户认证"、"缓存"、"API 速率限制")
* 研究替代方案:`ref_search_documentation("{goal} approaches comparison {tech_stack} 2026")`
* 针对项目上下文比较所选方法与替代方案
* 将次优选择标记为 OPT- 问题
第 2 层 — 最佳实践 (BP-):
* 研究:`ref_search_documentation("{chosen_approach} best practices {tech_stack} 2026")`
* 对于库:`query-docs(library_id, "best practices implementation patterns")`
* 将与推荐模式的偏差标记为 BP- 问题
第 3 层 — 性能 (PERF-):
* **PERF-ALG:** 分析算法复杂度(检测 O(n²)+,通过 MCP Ref 研究最优方案)
* **PERF-CFG:** 通过 `query-docs` 检查库配置(连接池、批处理大小、超时)
* **PERF-PTN:** 研究模式陷阱:`ref_search_documentation("{pattern} performance bottlenecks")`
* **PERF-DB:** 通过 `query-docs(orm_library_id, "query optimization")` 检查 N+1、缺失索引
MCP 参考验证的触发条件:
* 添加了新依赖项(package.json/requirements.txt 更改)
* 使用了新模式/库
* API/数据库更改
* 关键路径中的循环/递归
* 添加了 ORM 查询
7. 分析代码以查找静态问题(分配前缀): 必读: shared/references/clean_code_checklist.md, shared/references/destructive_operation_safety.md
* SEC-: 硬编码凭据、未验证的输入、SQL 注入、竞态条件
* SEC-DESTR-: 未受保护的破坏性操作 — 使用来自 destructive_operation_safety.md(上面已加载)的代码级防护表。检查所有 5 个防护类别(DB, FS, MIG, ENV, FORCE)。
* MNT-: DRY 违规(MNT-DRY-: 重复逻辑)、死代码(MNT-DC-: 根据清单)、复杂条件、命名不佳
* **MNT-DRY- 跨故事热点扫描:** 在所有 `src/` 文件中(计数模式)Grep 查找常见模式签名(错误处理程序:`catch.*Error|handleError`,验证器:`validate|isValid`,配置访问:`getSettings|getConfig`)。如果任何模式出现在 5+ 个文件中,采样 3 个文件(每个读取 50 行)并检查结构相似性。如果 >80% 相似 → MNT-DRY-CROSS(中,-10 分):`模式 X 在 N 个文件中重复 — 提取到共享模块。`
* **MNT-DRY- 首选(hex-graph):** 如果已索引 hex-graph,使用 `find_clones(scope="src/**", type="normalized", cross_file=true, format="json")`。每个在不同文件中有 2+ 个成员的组 = MNT-DRY-CROSS。使用 `impact` 分数确定优先级。如果 hex-graph 不可用,则回退到上面的 Grep 模式扫描。
* **MNT-DC- 跨故事未使用导出扫描:** 对于故事修改的每个文件,计算 `export` 声明。然后跨所有 `src/` 进行 Grep,查找对这些导出的导入引用。导入引用为 0 的导出 → MNT-DC-CROSS(中,-10 分):`{file} 中的 {export} 已导出但从未导入 — 移除或标记为内部。`
* **OPT-OSS- 交叉引用 ln-645(静态,快速通道安全):** 如果 `docs/project/.audit/ln-640/*/645-open-source-replacer*.md` 存在(跨日期全局搜索,取最新的),检查是否有任何高置信度的替换匹配当前故事中更改的文件。如果找到匹配项 → 使用模块路径、目标、推荐包、置信度、星标、许可证(来自 ln-645 报告)创建 OPT-OSS-{N} 问题。严重程度:如果 >200 LOC 则为高,否则为中。此检查仅读取本地文件 — 无 MCP 调用 — 即使使用 `--skip-mcp-ref` 也会运行。
* ARCH-: 层违规、循环依赖、指南不合规
* ARCH-LB-: 层边界违规(基础设施层外的 HTTP/DB/FS 调用)
* ARCH-TX-: 事务边界违规(跨多个层的 commit())
* ARCH-DTO-: 缺少 DTO(4+ 重复参数)、实体泄漏(从 API 返回 ORM 实体)
* ARCH-DI-: 业务逻辑中的直接实例化(无 DI 容器或混合模式)
* ARCH-CEH-: 缺少集中式错误处理或被绕过
* ARCH-SES-: 会话所有权冲突(同一模块中的 DI + 本地会话)
* ARCH-AI-SEB: 副作用广度(一个**叶子**函数中有 3+ 个类别;编排器函数豁免 — 参见上表中的冲突解决)
* ARCH-AI-AH: 架构诚实性(具有隐藏写入的读命名函数)
* ARCH-AI-FO: 扁平编排(导入 3+ 个其他服务的**叶子**服务;编排器导入豁免)
* ARCH-EVENT-: 事件通道不匹配 — 在 changed_files[] 中 Grep 查找 `NOTIFY|pg_notify|\.publish\(|\.emit\(`(发布者)和 `LISTEN|\.subscribe\(|\.on\(`(订阅者)。交叉引用通道名称字符串。
* MNT-GOD-: 上帝类(每个类方法数 >15 或行数 >500)
* MNT-SIG-: 方法签名质量(布尔标志、不清晰的返回)
* MNT-ERR-: 错误契约不一致(同一服务中混合抛出/返回模式)
8. 计算代码质量评分:
* 从 100 开始
* 减去度量指标扣分(参见代码度量指标表)
* 减去问题扣分(参见问题扣分表)
9. 输出带有评分和结构化问题的判定。 必读: 加载 references/output_schema.md 根据模式格式化输出。添加带有发现的 Linear 评论。
references/output_schema.md 格式化shared/references/git_scope_detection.mdreferences/code_metrics.md(阈值和扣分)docs/guides/shared/templates/task_template_implementation.mdshared/references/clean_code_checklist.mdshared/references/research_tool_fallback.md版本: 5.1.0 最后更新: 2026-03-15
每周安装次数
148
仓库
GitHub 星标数
245
首次出现
2026年2月11日
安全审计
安装于
opencode138
cursor138
gemini-cli137
codex137
github-copilot137
claude-code136
Paths: File paths (
shared/,references/,../ln-*) are relative to skills repo root. If not found at CWD, locate this SKILL.md directory and go up one level for repo root. Ifshared/is missing, fetch files via WebFetch fromhttps://raw.githubusercontent.com/levnikolaevich/claude-code-skills/master/skills/{path}.
Analyzes Done implementation tasks with quantitative Code Quality Score based on metrics, MCP Ref validation, and issue penalties.
| Input | Required | Source | Description |
|---|---|---|---|
storyId | Yes | args, git branch, kanban, user | Story to process |
Resolution: Story Resolution Chain. Status filter: In Progress, To Review
| Metric | Threshold | Penalty |
|---|---|---|
| Cyclomatic Complexity | ≤10 OK, 11-20 warning, >20 fail | -5 (warning), -10 (fail) per function |
| Function size | ≤50 lines OK, >50 warning | -3 per function |
| File size | ≤500 lines OK, >500 warning | -5 per file |
| Nesting depth | ≤3 OK, >3 warning | -3 per instance |
| Parameter count | ≤4 OK, >4 warning | -2 per function |
Formula: Code Quality Score = 100 - metric_penalties - issue_penalties
Issue penalties by severity:
| Severity | Penalty | Examples |
|---|---|---|
| high | -20 | Security vulnerability, O(n²)+ algorithm, N+1 query |
| medium | -10 | DRY violation, suboptimal approach, missing config |
| low | -3 | Naming convention, minor code smell |
Score interpretation:
| Score | Status | Verdict |
|---|---|---|
| 90-100 | Excellent | PASS |
| 70-89 | Acceptable | CONCERNS |
| <70 | Below threshold | ISSUES_FOUND |
| Prefix | Category | Default Severity | MCP Ref |
|---|---|---|---|
| SEC- | Security (auth, validation, secrets) | high | — |
| SEC-DESTR- | Destructive ops (guards: DB, FS, MIG, ENV, FORCE) | high/medium | — |
| PERF- | Performance (algorithms, configs, bottlenecks) | medium/high | ✓ Required |
| MNT- | Maintainability (DRY, SOLID, complexity, dead code) | medium | — |
| ARCH- | Architecture (layers, boundaries, patterns, contracts) | medium | — |
| BP- | Best Practices (implementation differs from recommended) | medium | ✓ Required |
| OPT- | Optimality (better approach exists for this goal) |
OPT- subcategories:
| Prefix | Category | Severity |
|---|---|---|
| OPT-OSS- | Open-source replacement available | medium (high if >200 LOC) |
ARCH- subcategories:
| Prefix | Category | Severity |
|---|---|---|
| ARCH-LB- | Layer Boundary: I/O outside infra, HTTP in domain | high |
| ARCH-TX- | Transaction Boundaries: commit() in 3+ layers, mixed UoW ownership | high (CRITICAL if auth/payment) |
| ARCH-DTO- | Missing DTO (4+ params without DTO), Entity Leakage (ORM entity in API response) | medium (high if auth/payment) |
| ARCH-DI- | Dependency Injection: dependencies not replaceable for testing (direct instantiation, no injection mechanism). Exception: small scripts/CLIs where params/closures suffice → skip | medium |
| ARCH-CEH- | Centralized Error Handling: errors silently swallowed, stack traces leak to prod, no consistent error logging. Exception: 50-line scripts → downgrade to LOW | medium (high if no handler at all) |
| ARCH-SES- | Session Ownership: DI session + local session in same module | medium |
| ARCH-AI-SEB | Side-Effect Breadth: 3+ side-effect categories in one leaf function. Conflict Resolution: orchestrator/coordinator functions (imports 3+ services AND delegates sequentially) are EXPECTED to have multiple categories — do NOT flag SEB |
PERF- subcategories:
| Prefix | Category | Severity |
|---|---|---|
| PERF-ALG- | Algorithm complexity (Big O) | high if O(n²)+ |
| PERF-CFG- | Package/library configuration | medium |
| PERF-PTN- | Architectural pattern performance | high |
| PERF-DB- | Database queries, indexes | high |
MNT- subcategories:
| Prefix | Category | Severity |
|---|---|---|
| MNT-DC- | Dead code: replaced implementations, unused exports/re-exports, backward-compat wrappers, deprecated aliases | medium (high if public API) |
| MNT-DRY- | DRY violations: duplicate logic across files | medium |
| MNT-GOD- | God Classes: class with >15 methods or >500 lines (not just file size) | medium (high if >1000 lines) |
| MNT-SIG- | Method Signature Quality: boolean flag params, unclear return types, inconsistent naming, >5 optional params | low |
| MNT-ERR- | Error Contract inconsistency: mixed raise + return None in same service | medium |
MANDATORY READ: Load shared/references/input_resolution_pattern.md
Resolve storyId: Run Story Resolution Chain per guide (status filter: [In Progress, To Review]).
Load Story (full) and Done implementation tasks (full descriptions) via Linear; skip tasks with label "tests".
Collect changed files (changed_files[]): MANDATORY READ: shared/references/git_scope_detection.md
changed_files[] from coordinator context → proceed to Enrich step in guideTwo-Layer Detection (MANDATORY): MANDATORY READ: shared/references/two_layer_detection.md All threshold-based findings require Layer 2 context analysis. Layer 1 finding without Layer 2 = NOT a valid finding. Before reporting any metric violation, ask: "Is this violation intentional or justified by design?" See Exception column in metrics below.
Calculate code metrics:
Fast-track mode: When invoked with
--skip-mcp-ref, skip this entire step (no OPT-, BP-, PERF- checks). Proceed directly to step 6 (static analysis). This reduces cost from ~5000 to ~800 tokens while preserving metrics + static analysis coverage.
Level 1 — OPTIMALITY (OPT-):
* Extract goal from task (e.g., "user authentication", "caching", "API rate limiting")
* Research alternatives: `ref_search_documentation("{goal} approaches comparison {tech_stack} 2026")`
* Compare chosen approach vs alternatives for project context
* Flag suboptimal choices as OPT- issues
Level 2 — BEST PRACTICES (BP-):
* Research: `ref_search_documentation("{chosen_approach} best practices {tech_stack} 2026")`
* For libraries: `query-docs(library_id, "best practices implementation patterns")`
* Flag deviations from recommended patterns as BP- issues
Level 3 — PERFORMANCE (PERF-):
* **PERF-ALG:** Analyze algorithm complexity (detect O(n²)+, research optimal via MCP Ref)
* **PERF-CFG:** Check library configs (connection pooling, batch sizes, timeouts) via `query-docs`
* **PERF-PTN:** Research pattern pitfalls: `ref_search_documentation("{pattern} performance bottlenecks")`
* **PERF-DB:** Check for N+1, missing indexes via `query-docs(orm_library_id, "query optimization")`
Triggers for MCP Ref validation:
* New dependency added (package.json/requirements.txt changed)
* New pattern/library used
* API/database changes
* Loops/recursion in critical paths
* ORM queries added
7. Analyze code for static issues (assign prefixes): MANDATORY READ: shared/references/clean_code_checklist.md, shared/references/destructive_operation_safety.md
* SEC-: hardcoded creds, unvalidated input, SQL injection, race conditions
* SEC-DESTR-: unguarded destructive operations — use code-level guards table from destructive_operation_safety.md (loaded above). Check all 5 guard categories (DB, FS, MIG, ENV, FORCE).
* MNT-: DRY violations (MNT-DRY-: duplicate logic), dead code (MNT-DC-: per checklist), complex conditionals, poor naming
* **MNT-DRY- cross-story hotspot scan:** Grep for common pattern signatures (error handlers: `catch.*Error|handleError`, validators: `validate|isValid`, config access: `getSettings|getConfig`) across ALL `src/` files (count mode). If any pattern appears in 5+ files, sample 3 files (Read 50 lines each) and check structural similarity. If >80% similar → MNT-DRY-CROSS (medium, -10 points): `Pattern X duplicated in N files — extract to shared module.`
* **MNT-DRY- preferred (hex-graph):** If hex-graph indexed, use `find_clones(scope="src/**", type="normalized", cross_file=true, format="json")`. Each group with 2+ members in different files = MNT-DRY-CROSS. Use `impact` score for priority. Fall back to Grep pattern scan above if hex-graph unavailable.
* **MNT-DC- cross-story unused export scan:** For each file modified by Story, count `export` declarations. Then Grep across ALL `src/` for import references to those exports. Exports with 0 import references → MNT-DC-CROSS (medium, -10 points): `{export} in {file} exported but never imported — remove or mark internal.`
* **OPT-OSS- cross-reference ln-645 (static, fast-track safe):** IF `docs/project/.audit/ln-640/*/645-open-source-replacer*.md` exists (glob across dates, take latest), check if any HIGH-confidence replacement matches files changed in current Story. IF match found → create OPT-OSS-{N} issue with module path, goal, recommended package, confidence, stars, license from ln-645 report. Severity: high if >200 LOC, medium otherwise. This check reads local files only — no MCP calls — runs even with `--skip-mcp-ref`.
* ARCH-: layer violations, circular dependencies, guide non-compliance
* ARCH-LB-: layer boundary violations (HTTP/DB/FS calls outside infrastructure layer)
* ARCH-TX-: transaction boundary violations (commit() across multiple layers)
* ARCH-DTO-: missing DTOs (4+ repeated params), entity leakage (ORM entities returned from API)
* ARCH-DI-: direct instantiation in business logic (no DI container or mixed patterns)
* ARCH-CEH-: centralized error handling absent or bypassed
* ARCH-SES-: session ownership conflicts (DI + local session in same module)
* ARCH-AI-SEB: side-effect breadth (3+ categories in one **leaf** function; orchestrator functions exempt — see Conflict Resolution in table above)
* ARCH-AI-AH: architectural honesty (read-named function with hidden writes)
* ARCH-AI-FO: flat orchestration (**leaf** service importing 3+ services; orchestrator imports exempt)
* ARCH-EVENT-: event channel mismatch — Grep for `NOTIFY|pg_notify|\.publish\(|\.emit\(` (publishers) and `LISTEN|\.subscribe\(|\.on\(` (subscribers) in changed_files[]. Cross-reference channel name strings.
* MNT-GOD-: god classes (>15 methods or >500 lines per class)
* MNT-SIG-: method signature quality (boolean flags, unclear returns)
* MNT-ERR-: error contract inconsistency (mixed raise/return patterns in same service)
8. Calculate Code Quality Score:
* Start with 100
* Subtract metric penalties (see Code Metrics table)
* Subtract issue penalties (see Issue penalties table)
9. Output verdict with score and structured issues. MANDATORY READ: Load references/output_schema.md Format output per schema. Add Linear comment with findings.
references/output_schema.mdshared/references/git_scope_detection.mdreferences/code_metrics.md (thresholds and penalties)docs/guides/shared/templates/task_template_implementation.mdshared/references/clean_code_checklist.mdshared/references/research_tool_fallback.mdVersion: 5.1.0 Last Updated: 2026-03-15
Weekly Installs
148
Repository
GitHub Stars
245
First Seen
Feb 11, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykFail
Installed on
opencode138
cursor138
gemini-cli137
codex137
github-copilot137
claude-code136
Skills CLI 使用指南:AI Agent 技能包管理器安装与管理教程
36,300 周安装
| medium |
| ✓ Required |
| medium |
| ARCH-AI-AH | Architectural Honesty: read-named function with write side-effects | medium |
| ARCH-AI-FO | Flat Orchestration: leaf service imports 3+ other services. Orchestrator imports are expected — do NOT flag | medium |
| ARCH-EVENT- | Event Channel Consistency: publisher/subscriber name mismatch (MISMATCH), orphaned channel with no counterpart (ORPHAN) | high (mismatch), medium (orphan) |
MCP Ref Validation (MANDATORY for code changes — SKIP if--skip-mcp-ref flag passed): MANDATORY READ: Load shared/references/research_tool_fallback.md