From cec38036d6b3d5a4bd009f2eef3bd88791ab5828 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Tue, 21 Jul 2026 03:13:24 +0900 Subject: feat(plugin-class-classifier): add query helper for single-class lookups Answers how a given class is treated at the plugin boundary, accepting a PHP source file, a Rust source file, or a (short or fully qualified) class name. Reads report.json and generates it first when missing. Rust paths resolve by normalized segment matching because the snake_case mapping is not reversible for acronyms (io_interface.rs -> IOInterface). Co-Authored-By: Claude Fable 5 --- docs/dev/plugin-class-classification.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'docs/dev') diff --git a/docs/dev/plugin-class-classification.md b/docs/dev/plugin-class-classification.md index db48880f..263161cb 100644 --- a/docs/dev/plugin-class-classification.md +++ b/docs/dev/plugin-class-classification.md @@ -445,6 +445,26 @@ workflow on a Composer upgrade: run the classifier before updating the diff the two files — review only the changed rows. A brand-new class lands in a category (or in the violation list) without any human re-derivation. +### Querying a single class + + scripts/plugin-class-classifier/query ... + +answers "how is this class treated?" for one or more targets, from +`report.json` (generated on the fly when missing; staleness is not +checked). A target may be a PHP source file, a Rust source file, or a class +name — fully qualified or just the short name, case-insensitive: + + query composer/src/Composer/Util/Git.php + query crates/shirabe/src/io/io_interface.rs + query Locker + +Rust paths are resolved by normalized segment matching against the report's +FQCNs rather than textual case conversion, because the snake_case mapping +is not reversible for acronyms (`io_interface.rs` → `IOInterface`). Vendor +class names resolve at package granularity. The output shows category +(including an overridden category's computed value), direction, +reachability, reasons, attributes, and the mutator methods. + ### Analysis limits All conservative: -- cgit v1.3.1