fallow 3.8.1 → 3.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -25,6 +25,7 @@ Complete command and flag specifications for all fallow CLI commands.
25
25
  - [`plugin-schema`: Plugin JSON Schema](#plugin-schema-plugin-json-schema)
26
26
  - [`plugin-check`: Verify external plugins](#plugin-check-verify-external-plugins)
27
27
  - [`rule-pack-schema`: Rule Pack JSON Schema](#rule-pack-schema-rule-pack-json-schema)
28
+ - [`impact`: Local Impact History](#impact-local-impact-history)
28
29
  - [`config`: Show Resolved Config](#config-show-resolved-config)
29
30
  - [Global Flags](#global-flags)
30
31
  - [Environment Variables](#environment-variables)
@@ -49,6 +50,7 @@ Analyzes the project for unused files, exports, dependencies, types, members, an
49
50
  | `--trace-file` | `string` | - | Show all edges for a file |
50
51
  | `--trace-dependency` | `string` | - | Trace where a dependency is used |
51
52
  | `--impact-closure` | `string` | - | Compute the impact closure for a file (the transitive affected-but-not-in-diff set + coordination gap). Walks reverse-deps and re-export chains; powers the `inspect_target` MCP tool |
53
+ | `--symbol-impact` | `string` | - | Compute exact-symbol consumers, affected files, and targeted tests |
52
54
  | `--top` | `string` | - | Show only the top N items per category |
53
55
  | `--file` | `string` | - | Scope output to specific files. Only issues in the specified files are reported. Project-wide dependency issues are suppressed. Warns on non-existent paths. Useful for lint-staged |
54
56
 
@@ -400,6 +402,7 @@ Angular templates contribute synthetic `<template>` complexity findings whenever
400
402
  | `--ownership` | `bool` | `false` | Attach ownership signals to hotspot entries: bus factor (Avelino truck factor), contributor count, top contributor with stale-days, recent contributors (top-3), `suggested_reviewers`, declared CODEOWNERS owner, `ownership_state`, ownership drift, unowned-hotspot detection. Human output gains a project-level summary line. JSON adds `low-bus-factor`, `unowned-hotspot`, `ownership-drift` action types. Test files get a `[test]` tag. Implies `--hotspots`. Requires git. |
401
403
  | `--ownership-emails` | `raw\|handle\|anonymized\|hash` | - | Privacy mode for author emails. `handle` shows the local-part only (default, with GitHub noreply unwrap and deterministic same-handle disambiguation). `anonymized` emits stable `xxh3:` pseudonyms; `hash` remains accepted as the legacy spelling. `raw` shows full addresses. Use `anonymized` in regulated environments. Implies `--ownership`. Configure default via `health.ownership.emailMode`. |
402
404
  | `--targets` | `bool` | `false` | Show only refactoring targets: ranked recommendations based on complexity, coupling, churn, and dead code signals. Categories: churn+complexity, circular dep, high impact, dead code, complexity, coupling. When no section flags are set, all sections are shown by default. Each target's JSON can include `direct_callers[]` (direct importers with the symbols they import) and `clone_siblings[]` (duplicate-code siblings with stable `dup:<8hex>` fingerprints for `fallow dupes --trace`); both omitted when empty. Human output adds `importers:` / `clones:` lines only when that evidence is present. |
405
+ | `--type-coupling` | `bool` | `false` | Show advisory project-local public-signature type coupling. Requires type-aware analysis and does not change the health score |
403
406
  | `--css` | `bool` | `false` | Add structural CSS analytics: specificity hotspots, !important density, over-complex selectors, deep nesting, and conservative cleanup candidates. Standard CSS is parsed structurally; preprocessor sources are scanned only where fallow can avoid expanding Sass/Less semantics. Also derives `styling_health`, a descriptive A-F grade for CSS quality scored separately from the code `health_score` (never gates); it weights design-token drift (hardcoded value sprawl) over byte-identical repetition. |
404
407
  | `--effort` | `low\|medium\|high` | - | Filter refactoring targets by effort level. Implies `--targets`. |
405
408
  | `--score` | `bool` | `false` | Show only the project health score (0-100) with letter grade (A/B/C/D/F). The score is included by default when no section flags are set. JSON includes `health_score` object with `score`, `grade`, and `penalties` breakdown. As of v2.55.0, plain `--score` skips the churn-backed hotspot penalty so it does not run a `git log` shell-out per invocation; pass `--hotspots` (or `--targets` with `--score`) to include the hotspot penalty. Snapshot (`--save-snapshot`) and trend (`--trend`) flows still trigger hotspot vital signs so saved data stays complete. |
@@ -510,7 +513,7 @@ fallow health --format json --quiet --trend
510
513
  {
511
514
  "kind": "health",
512
515
  "schema_version": 7,
513
- "version": "3.8.0",
516
+ "version": "3.9.1",
514
517
  "elapsed_ms": 32,
515
518
  "summary": {
516
519
  "files_analyzed": 482,
@@ -908,7 +911,7 @@ fallow audit \
908
911
  {
909
912
  "kind": "audit",
910
913
  "schema_version": 7,
911
- "version": "3.8.0",
914
+ "version": "3.9.1",
912
915
  "command": "audit",
913
916
  "verdict": "fail",
914
917
  "changed_files_count": 12,
@@ -985,7 +988,7 @@ fallow flags --format json --quiet --workspace my-package
985
988
  ```json
986
989
  {
987
990
  "schema_version": 7,
988
- "version": "3.8.0",
991
+ "version": "3.9.1",
989
992
  "elapsed_ms": 116,
990
993
  "feature_flags": [],
991
994
  "total_flags": 0
@@ -1086,7 +1089,7 @@ fallow security --gate newly-reachable --changed-since origin/main
1086
1089
  {
1087
1090
  "kind": "security",
1088
1091
  "schema_version": "4",
1089
- "version": "3.8.0",
1092
+ "version": "3.9.1",
1090
1093
  "elapsed_ms": 42,
1091
1094
  "config": {
1092
1095
  "rules": {
@@ -1115,7 +1118,7 @@ fallow security --gate newly-reachable --changed-since origin/main
1115
1118
  {
1116
1119
  "kind": "security",
1117
1120
  "schema_version": "4",
1118
- "version": "3.8.0",
1121
+ "version": "3.9.1",
1119
1122
  "elapsed_ms": 42,
1120
1123
  "config": {
1121
1124
  "rules": {
@@ -1321,7 +1324,7 @@ Top-level blocks:
1321
1324
  - `manifest_version`: manifest shape discriminator (currently `"1"`).
1322
1325
  - `commands` + `global_flags`: every CLI command and flag, derived live from the CLI definition.
1323
1326
  - `issue_types`: one row per reportable issue type across ALL analyses (dead-code, health, dupes, flags, security). Each row carries `id` (the bare rule id; several rows share one suppression token, e.g. all complexity rules suppress via `complexity`), `rule_id` (SARIF id), `command`, `category`, `filter_flag` (null when none), `fixable`, `suppressible`, `suppress_comment` (copy-pasteable, null when not suppressible), `note`, `license` (`free` | `freemium`), and `docs_url`. Nullable fields are always present (null, never absent).
1324
- - `mcp_tools`: all MCP server tools with `kind` grouping (analysis/trace/fix/introspection/runtime-coverage/composition), one-line description, `cli_command` nearest CLI fallback, `key_params` (curated subset; live MCP `list_tools` schemas are authoritative), `license` + `license_note` (the 5 runtime-coverage tools are `freemium`: a single local capture is free, continuous monitoring is paid), and `read_only`.
1327
+ - `mcp_tools`: all MCP server tools with `kind` grouping (analysis/trace/impact/fix/introspection/runtime-coverage/composition), one-line description, `cli_command` nearest CLI fallback, `key_params` (curated subset; live MCP `list_tools` schemas are authoritative), `license` + `license_note` (the 5 runtime-coverage tools are `freemium`: a single local capture is free, continuous monitoring is paid), and `read_only`.
1325
1328
  - `plugins`: built-in framework plugin count + names, derived live from the registry.
1326
1329
  - `environment_variables`: every user-facing `FALLOW_*` variable (internal plumbing excluded).
1327
1330
  - `output_formats`, `exit_codes`, `severity_levels`, `suppression_comments`.
@@ -1479,6 +1482,30 @@ The inspected payload prints to stderr; stdout (including `--format json`) is un
1479
1482
 
1480
1483
  ---
1481
1484
 
1485
+ ## `impact`: Local Impact History
1486
+
1487
+ Read the opt-in Impact history stored in the user's private config directory.
1488
+ These commands start no analysis and never upload data.
1489
+
1490
+ ```bash
1491
+ fallow impact
1492
+ fallow impact status
1493
+ fallow impact statusline
1494
+ fallow impact --all --sort recent
1495
+ ```
1496
+
1497
+ `fallow impact statusline` is the stable status-surface command. It always
1498
+ prints exactly one plain-text, path-free line, ignores the global output format,
1499
+ and performs no migration write. Whole-project counts come from the last full
1500
+ `fallow` scan and their trend compares only the prior full scan. Older stores
1501
+ with changed-file history label that narrower scope explicitly and omit its
1502
+ non-comparable trend.
1503
+
1504
+ The command does not enable tracking. Only the user may opt in with
1505
+ `fallow impact enable` or `fallow impact default on`.
1506
+
1507
+ ---
1508
+
1482
1509
  ## `coverage`: Production-Coverage Workflow
1483
1510
 
1484
1511
  Helper subcommand for runtime coverage setup, focused analysis, and cloud inventory upload. Three subcommands today:
@@ -1690,8 +1717,20 @@ Available on all commands:
1690
1717
  | `--coverage` | `string` | - | Path to Istanbul coverage data for exact CRAP scores in combined mode. Also settable via `FALLOW_COVERAGE` or `health.coverage` |
1691
1718
  | `--coverage-root` | `string` | - | Absolute prefix to strip from Istanbul file paths in combined mode. Also settable via `FALLOW_COVERAGE_ROOT` or `health.coverageRoot` |
1692
1719
  | `--include-entry-exports` | `bool` | `false` | Report unused exports in entry files instead of auto-marking them as used |
1720
+ | `--type-aware` | `bool` | `false` | Opt in to TypeScript semantic analysis for project-wide symbol evidence. This does not emit compiler diagnostics or typed lint findings |
1721
+ | `--type-aware-project` | `string` | - | TypeScript project config to use for type-aware analysis (repeatable) |
1722
+ | `--type-aware-require` | `best-effort\|complete` | - | Decide whether incomplete type-aware analysis is advisory or gating |
1693
1723
  <!-- generated:flags:global:end -->
1694
1724
 
1725
+ Type-aware candidate decisions are `confirmed-used`, `contract-preserved`,
1726
+ `confirmed-no-static-references`, `retained-abstained`, or
1727
+ `retained-unresolved`. The first two remove a syntactic false positive.
1728
+ Complete negative evidence keeps the finding and only makes a class member
1729
+ automatically fixable when every owning project is complete, no contract or
1730
+ dynamic gap exists, and the exact declaration hash still matches.
1731
+ `fallow fix --type-aware --dry-run --format json --quiet` previews these
1732
+ guarded edits.
1733
+
1695
1734
  ### Combined Mode Flags
1696
1735
 
1697
1736
  <!-- generated:flags:fallow-combined:start -->
@@ -1840,7 +1879,7 @@ The HTTP layer mirrors the bash `gh_api_retry` / `curl_retry` helpers: `FALLOW_A
1840
1879
  {
1841
1880
  "kind": "dead-code",
1842
1881
  "schema_version": 7,
1843
- "version": "3.8.0",
1882
+ "version": "3.9.1",
1844
1883
  "elapsed_ms": 45,
1845
1884
  "total_issues": 12,
1846
1885
  "entry_points": {
@@ -2000,7 +2039,7 @@ When `--baseline` is used in combined output, the JSON includes a `baseline_delt
2000
2039
  {
2001
2040
  "kind": "dupes",
2002
2041
  "schema_version": 7,
2003
- "version": "3.8.0",
2042
+ "version": "3.9.1",
2004
2043
  "elapsed_ms": 82,
2005
2044
  "total_clones": 15,
2006
2045
  "total_lines_duplicated": 230,
@@ -2044,11 +2083,11 @@ When running `fallow` with no subcommand (all analyses), the JSON output combine
2044
2083
  {
2045
2084
  "kind": "combined",
2046
2085
  "schema_version": 7,
2047
- "version": "3.8.0",
2086
+ "version": "3.9.1",
2048
2087
  "elapsed_ms": 159,
2049
2088
  "check": {
2050
2089
  "schema_version": 7,
2051
- "version": "3.8.0",
2090
+ "version": "3.9.1",
2052
2091
  "elapsed_ms": 45,
2053
2092
  "total_issues": 12,
2054
2093
  "unused_files": [],
@@ -38,6 +38,8 @@ When using fallow via MCP (`fallow-mcp`), the following tools are available:
38
38
  | `impact` | introspection | free | `fallow impact --format json --quiet` | `root` | Read the local, opt-in Fallow Impact value report (`fallow impact --format json`). Runs no analysis: current surfacing counts, trend since the last recorded run, pre-commit gate containment, and (on impact v1.5+) resolved/suppressed attribution. History is read from a per-project file in the user's private config dir (never inside the repo). Read-only and `root`-only; the mutating `enable` / `disable` / `default` lifecycle is not exposed. A never-enabled project returns a populated `{"enabled": false, ...}` report (never `{}`); branch on `enabled` and `enabled_source` (`project` / `user` / `default`) then `record_count`, recommending `fallow impact enable` only when `explicit_decision` is `false` (never asked) and staying silent when `true` (deliberately disabled here). Local-developer signal: fallow never records in CI, so empty there and not a CI metric |
39
39
  | `impact_all` | introspection | free | `fallow impact --all --format json --quiet` | `sort`, `limit` | Roll every tracked fallow project on this machine into one cross-repo value report (hashed keys plus basename labels, never paths; local-dev only) |
40
40
  | `trace_export` | trace | free | `fallow dead-code --trace <file:export> --format json --quiet` | `file`, `export_name` | Trace why an export is used or unused (`fallow dead-code --trace FILE:EXPORT_NAME --format json`). Required `file` and `export_name`. Returns file reachability, entry-point status, direct references, re-export chains, and a reason string. If `export_name` is a class / enum / store MEMBER, returns a member trace instead (`member_name`, `member_kind`, `owner_export`, `owner_is_used`) plus a `--unused-<kind>-members` pointer; branch on field presence. Use before deleting a supposedly-unused export or debugging an unused-class-member finding |
41
+ | `trace_symbol` | trace | free | `fallow dead-code --type-aware --trace <file:export> --format json --quiet` | `file`, `export_name`, `type_aware_projects`, `type_aware_require` | Trace an exact TypeScript symbol with checker-backed references, namespace identity, aliases, and re-export hops. Root trace fields preserve syntactic context; treat `semantic.references`, `semantic.status`, and `semantic.identity` as the authoritative exact evidence. This is project-wide evidence for Fallow decisions, not a compiler-diagnostic or lint-rule surface. |
42
+ | `symbol_impact` | impact | free | `fallow dead-code --type-aware --symbol-impact <file:export-or-class.member> --format json --quiet` | `file`, `export_name`, `class_name`, `member_name`, `type_aware_projects`, `type_aware_require` | Return exact-symbol consumers, affected files, and targeted tests for a TypeScript export or exported class method. Select either `export_name`, or both `class_name` and `member_name`. Advisory change-impact evidence, not a substitute for `tsc` or Oxlint |
41
43
  | `trace_file` | trace | free | `fallow dead-code --trace-file <file> --format json --quiet` | `file` | Trace all graph edges for a file (`fallow dead-code --trace-file PATH --format json`). Required `file`. Returns reachability, exports, imports-from, imported-by, and re-exports. Use to decide whether a file is isolated, barrel-only, or imported by live entry points |
42
44
  | `impact_closure` | trace | free | `fallow dead-code --impact-closure <path> --format json --quiet` | `path` | Trace the transitive affected-but-not-in-diff set and coordination gaps for one file. Supports `root`, `config`, `production`, `workspace`, `no_cache`, and `threads`. Use as review-planning evidence for a file contract, not proof that affected files are wrong |
43
45
  | `trace_dependency` | trace | free | `fallow dead-code --trace-dependency <package> --format json --quiet` | `package_name` | Trace where a dependency is imported (`fallow dead-code --trace-dependency PACKAGE --format json`). Required `package_name`. Returns importing files, type-only importers, total import count, `used_in_scripts` (true when invoked from package.json scripts or CI configs), and `is_used` (combined import + script signal; mirrors the unused-deps detector so build tools like `microbundle` or `vitest` are not falsely flagged as unused). Use before removing a dependency or moving between `dependencies` and `devDependencies` |
@@ -442,7 +442,10 @@ fallow migrate
442
442
 
443
443
  Creates `.fallowrc.json` with mapped settings:
444
444
  - knip `rules`/`exclude`/`include` → fallow `rules` (error/warn/off)
445
- - knip `ignore` → fallow `ignorePatterns`
445
+ - knip `ignore` → fallow `ignoreFindings` (matching dead-code findings are
446
+ hidden, but matching files remain in the module graph; leading `!` exceptions
447
+ are preserved; multi-source findings stay visible unless every source owner
448
+ matches)
446
449
  - knip `ignoreDependencies` → fallow `ignoreDependencies`
447
450
  - knip `ignoreExportsUsedInFile` → fallow `ignoreExportsUsedInFile` (boolean and `{ type, interface }` object form both supported; fallow groups type aliases and interfaces under one issue, so the two type-kind fields behave identically)
448
451
  - Unmappable fields generate warnings with suggestions