fallow 3.1.0 → 3.2.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.
- package/capabilities.json +1 -1
- package/package.json +9 -9
- package/schema.json +17 -0
- package/skills/fallow/SKILL.md +1 -1
- package/skills/fallow/references/cli-reference.md +10 -10
- package/types/output-contract.d.ts +15 -0
package/capabilities.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fallow",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.2.0",
|
|
4
4
|
"manifest_version": "1",
|
|
5
5
|
"description": "Codebase analyzer for TypeScript/JavaScript: unused code, circular dependencies, code duplication, complexity hotspots, and architecture boundary violations",
|
|
6
6
|
"global_flags": [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fallow",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.2.0",
|
|
4
4
|
"description": "Codebase intelligence for TypeScript and JavaScript. Free static analysis of code and styles, optional paid runtime intelligence (Fallow Runtime). Quality, risk, architecture, dependencies, duplication, and design-system drift for humans, CI, and the agents writing your code. Zero-config framework support.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -87,13 +87,13 @@
|
|
|
87
87
|
"@tanstack/intent": "0.3.2"
|
|
88
88
|
},
|
|
89
89
|
"optionalDependencies": {
|
|
90
|
-
"@fallow-cli/darwin-arm64": "3.
|
|
91
|
-
"@fallow-cli/darwin-x64": "3.
|
|
92
|
-
"@fallow-cli/linux-x64-gnu": "3.
|
|
93
|
-
"@fallow-cli/linux-arm64-gnu": "3.
|
|
94
|
-
"@fallow-cli/linux-x64-musl": "3.
|
|
95
|
-
"@fallow-cli/linux-arm64-musl": "3.
|
|
96
|
-
"@fallow-cli/win32-arm64-msvc": "3.
|
|
97
|
-
"@fallow-cli/win32-x64-msvc": "3.
|
|
90
|
+
"@fallow-cli/darwin-arm64": "3.2.0",
|
|
91
|
+
"@fallow-cli/darwin-x64": "3.2.0",
|
|
92
|
+
"@fallow-cli/linux-x64-gnu": "3.2.0",
|
|
93
|
+
"@fallow-cli/linux-arm64-gnu": "3.2.0",
|
|
94
|
+
"@fallow-cli/linux-x64-musl": "3.2.0",
|
|
95
|
+
"@fallow-cli/linux-arm64-musl": "3.2.0",
|
|
96
|
+
"@fallow-cli/win32-arm64-msvc": "3.2.0",
|
|
97
|
+
"@fallow-cli/win32-x64-msvc": "3.2.0"
|
|
98
98
|
}
|
|
99
99
|
}
|
package/schema.json
CHANGED
|
@@ -125,6 +125,7 @@
|
|
|
125
125
|
"maxCognitive": 15,
|
|
126
126
|
"maxCrap": 30.0,
|
|
127
127
|
"crapRefactorBand": 5,
|
|
128
|
+
"maxUnitSize": 60,
|
|
128
129
|
"coverage": null,
|
|
129
130
|
"coverageRoot": null,
|
|
130
131
|
"ignore": [],
|
|
@@ -836,6 +837,13 @@
|
|
|
836
837
|
"maximum": 65535,
|
|
837
838
|
"default": 5
|
|
838
839
|
},
|
|
840
|
+
"maxUnitSize": {
|
|
841
|
+
"description": "Maximum function length in lines of code before it is reported as an\noversized \"large function\" (default: 60). Raise it globally, or per file\nvia `thresholdOverrides[].maxUnitSize`, to relax the bar for generated or\ntest files (where a `describe()` block spans hundreds of lines) without\ndisabling complexity checks on those files. This filters the reported\nlarge-functions list only; the descriptive unit-size profile and the\nhealth score still reflect raw sizes (use `health.ignore` to remove a\nfile from the score entirely).",
|
|
842
|
+
"type": "integer",
|
|
843
|
+
"format": "uint32",
|
|
844
|
+
"minimum": 0,
|
|
845
|
+
"default": 60
|
|
846
|
+
},
|
|
839
847
|
"coverage": {
|
|
840
848
|
"description": "Path to Istanbul-format coverage data for accurate per-function CRAP\nscores. Relative paths resolve against the project root. The CLI\n`--coverage` flag and `FALLOW_COVERAGE` environment variable override\nthis value.",
|
|
841
849
|
"type": [
|
|
@@ -936,6 +944,15 @@
|
|
|
936
944
|
],
|
|
937
945
|
"format": "double"
|
|
938
946
|
},
|
|
947
|
+
"maxUnitSize": {
|
|
948
|
+
"description": "Local unit-size ceiling: maximum function length in lines of code before\nit is reported as an oversized \"large function\". Leave `functions` empty\nto relax the bar for every function in the matching files (which covers\nboth the `describe()` wrapper and the individual `it()` blocks in a test\nsuite).",
|
|
949
|
+
"type": [
|
|
950
|
+
"integer",
|
|
951
|
+
"null"
|
|
952
|
+
],
|
|
953
|
+
"format": "uint32",
|
|
954
|
+
"minimum": 0
|
|
955
|
+
},
|
|
939
956
|
"reason": {
|
|
940
957
|
"description": "Human-readable rationale for the exception.",
|
|
941
958
|
"type": [
|
package/skills/fallow/SKILL.md
CHANGED
|
@@ -243,7 +243,7 @@ Most tools accept `root`, `config`, `no_cache`, and `threads` params. Exceptions
|
|
|
243
243
|
|
|
244
244
|
All JSON responses include structured `actions` arrays on every finding (dead code, health, duplication), enabling programmatic fix application or suppression.
|
|
245
245
|
|
|
246
|
-
`health.thresholdOverrides[]` lets projects keep known legacy functions visible as configured local ceilings instead of hiding them with suppressions. Each entry has `files` globs, optional exact `functions`, one or more of `maxCyclomatic`, `maxCognitive`, or `
|
|
246
|
+
`health.thresholdOverrides[]` lets projects keep known legacy functions visible as configured local ceilings instead of hiding them with suppressions. Each entry has `files` globs, optional exact `functions`, one or more of `maxCyclomatic`, `maxCognitive`, `maxCrap`, or `maxUnitSize`, and optional `reason`. Health JSON may include top-level `threshold_overrides[]` entries with `active`, `stale`, or `no_match` status, and complexity findings that use an override carry `effective_thresholds` plus `threshold_source: "override"`.
|
|
247
247
|
|
|
248
248
|
`dead-code`, `health`, `dupes`, bare `fallow`, and `audit` JSON output also carry a top-level `next_steps` array of read-only follow-up commands computed from the run's findings: each entry is `{ id, command, reason }`. The `command` is runnable as-is (never a placeholder, never `fix` or any other mutating command); the stable kebab-case `id` (`setup`, `impact-report`, `trace-unused-export`, `trace-clone`, `complexity-breakdown`, `scope-workspaces`, `audit-changed`) maps to a verification step you should run BEFORE acting, for example tracing an export before deleting it. A leading `setup` step (command: `fallow schema`) appears only on unconfigured, non-CI projects with findings and doubles as the onboarding trigger below; it disappears after setup or `fallow init --decline`. An at-most-weekly `impact-report` step (command: `fallow impact`) carries the local value digest when impact tracking has non-zero results; it may ride a clean run. When running via MCP, dispatch on the `id` to the matching tool / `code_execute` host call (`trace_export`, `trace_clone`, `check_health` with `complexity_breakdown: true`, `audit`) rather than shelling out the CLI string. The array is deduplicated, capped at three, and omitted when empty; set `FALLOW_SUGGESTIONS=off` to suppress it.
|
|
249
249
|
|
|
@@ -508,7 +508,7 @@ fallow health --format json --quiet --trend
|
|
|
508
508
|
{
|
|
509
509
|
"kind": "health",
|
|
510
510
|
"schema_version": 7,
|
|
511
|
-
"version": "3.
|
|
511
|
+
"version": "3.2.0",
|
|
512
512
|
"elapsed_ms": 32,
|
|
513
513
|
"summary": {
|
|
514
514
|
"files_analyzed": 482,
|
|
@@ -532,7 +532,7 @@ fallow health --format json --quiet --trend
|
|
|
532
532
|
}
|
|
533
533
|
```
|
|
534
534
|
|
|
535
|
-
`health.thresholdOverrides[]` config entries can raise local cyclomatic, cognitive, or
|
|
535
|
+
`health.thresholdOverrides[]` config entries can raise local cyclomatic, cognitive, CRAP, or unit-size (large-function line-count) ceilings for matching files and optional exact function names. When an override affects output, health JSON includes top-level `threshold_overrides[]` state entries (`active`, `stale`, or `no_match`). Complexity findings evaluated with local ceilings include `effective_thresholds` and `threshold_source: "override"` so agents can see which thresholds drove the finding and avoid treating configured exceptions as hidden suppressions.
|
|
536
536
|
|
|
537
537
|
When the unit size very-high-risk percentage is >= 3%, the JSON output includes a `large_functions` array listing functions exceeding 60 lines of code:
|
|
538
538
|
|
|
@@ -906,7 +906,7 @@ fallow audit \
|
|
|
906
906
|
{
|
|
907
907
|
"kind": "audit",
|
|
908
908
|
"schema_version": 7,
|
|
909
|
-
"version": "3.
|
|
909
|
+
"version": "3.2.0",
|
|
910
910
|
"command": "audit",
|
|
911
911
|
"verdict": "fail",
|
|
912
912
|
"changed_files_count": 12,
|
|
@@ -981,7 +981,7 @@ fallow flags --format json --quiet --workspace my-package
|
|
|
981
981
|
```json
|
|
982
982
|
{
|
|
983
983
|
"schema_version": 7,
|
|
984
|
-
"version": "3.
|
|
984
|
+
"version": "3.2.0",
|
|
985
985
|
"elapsed_ms": 116,
|
|
986
986
|
"feature_flags": [],
|
|
987
987
|
"total_flags": 0
|
|
@@ -1082,7 +1082,7 @@ fallow security --gate newly-reachable --changed-since origin/main
|
|
|
1082
1082
|
{
|
|
1083
1083
|
"kind": "security",
|
|
1084
1084
|
"schema_version": "4",
|
|
1085
|
-
"version": "3.
|
|
1085
|
+
"version": "3.2.0",
|
|
1086
1086
|
"elapsed_ms": 42,
|
|
1087
1087
|
"config": {
|
|
1088
1088
|
"rules": {
|
|
@@ -1111,7 +1111,7 @@ fallow security --gate newly-reachable --changed-since origin/main
|
|
|
1111
1111
|
{
|
|
1112
1112
|
"kind": "security",
|
|
1113
1113
|
"schema_version": "4",
|
|
1114
|
-
"version": "3.
|
|
1114
|
+
"version": "3.2.0",
|
|
1115
1115
|
"elapsed_ms": 42,
|
|
1116
1116
|
"config": {
|
|
1117
1117
|
"rules": {
|
|
@@ -1820,7 +1820,7 @@ The HTTP layer mirrors the bash `gh_api_retry` / `curl_retry` helpers: `FALLOW_A
|
|
|
1820
1820
|
{
|
|
1821
1821
|
"kind": "dead-code",
|
|
1822
1822
|
"schema_version": 7,
|
|
1823
|
-
"version": "3.
|
|
1823
|
+
"version": "3.2.0",
|
|
1824
1824
|
"elapsed_ms": 45,
|
|
1825
1825
|
"total_issues": 12,
|
|
1826
1826
|
"entry_points": {
|
|
@@ -1980,7 +1980,7 @@ When `--baseline` is used in combined output, the JSON includes a `baseline_delt
|
|
|
1980
1980
|
{
|
|
1981
1981
|
"kind": "dupes",
|
|
1982
1982
|
"schema_version": 7,
|
|
1983
|
-
"version": "3.
|
|
1983
|
+
"version": "3.2.0",
|
|
1984
1984
|
"elapsed_ms": 82,
|
|
1985
1985
|
"total_clones": 15,
|
|
1986
1986
|
"total_lines_duplicated": 230,
|
|
@@ -2024,11 +2024,11 @@ When running `fallow` with no subcommand (all analyses), the JSON output combine
|
|
|
2024
2024
|
{
|
|
2025
2025
|
"kind": "combined",
|
|
2026
2026
|
"schema_version": 7,
|
|
2027
|
-
"version": "3.
|
|
2027
|
+
"version": "3.2.0",
|
|
2028
2028
|
"elapsed_ms": 159,
|
|
2029
2029
|
"check": {
|
|
2030
2030
|
"schema_version": 7,
|
|
2031
|
-
"version": "3.
|
|
2031
|
+
"version": "3.2.0",
|
|
2032
2032
|
"elapsed_ms": 45,
|
|
2033
2033
|
"total_issues": 12,
|
|
2034
2034
|
"unused_files": [],
|
|
@@ -4267,6 +4267,12 @@ export interface HealthEffectiveThresholds {
|
|
|
4267
4267
|
max_cyclomatic: number
|
|
4268
4268
|
max_cognitive: number
|
|
4269
4269
|
max_crap: number
|
|
4270
|
+
/**
|
|
4271
|
+
* Effective unit-size ceiling (maximum function length in lines) for the
|
|
4272
|
+
* matched file, after applying any `thresholdOverrides` on top of the
|
|
4273
|
+
* global `health.maxUnitSize` default.
|
|
4274
|
+
*/
|
|
4275
|
+
max_unit_size: number
|
|
4270
4276
|
}
|
|
4271
4277
|
/**
|
|
4272
4278
|
* Suggested action attached to a [`ComplexityViolation`].
|
|
@@ -4340,6 +4346,14 @@ functions_above_threshold: number
|
|
|
4340
4346
|
max_cyclomatic_threshold: number
|
|
4341
4347
|
max_cognitive_threshold: number
|
|
4342
4348
|
max_crap_threshold: number
|
|
4349
|
+
/**
|
|
4350
|
+
* Effective global unit-size ceiling (`health.maxUnitSize`, maximum
|
|
4351
|
+
* function length in lines) for this run. Sits alongside the other three
|
|
4352
|
+
* `max_*_threshold` siblings so a consumer reading the summary sees every
|
|
4353
|
+
* configured threshold. Per-file `thresholdOverrides` are not reflected
|
|
4354
|
+
* here; this is the global default.
|
|
4355
|
+
*/
|
|
4356
|
+
max_unit_size_threshold: number
|
|
4343
4357
|
files_scored?: (number | null)
|
|
4344
4358
|
average_maintainability?: (number | null)
|
|
4345
4359
|
coverage_model?: (CoverageModel | null)
|
|
@@ -4371,6 +4385,7 @@ export interface HealthConfiguredThresholds {
|
|
|
4371
4385
|
max_cyclomatic?: (number | null)
|
|
4372
4386
|
max_cognitive?: (number | null)
|
|
4373
4387
|
max_crap?: (number | null)
|
|
4388
|
+
max_unit_size?: (number | null)
|
|
4374
4389
|
}
|
|
4375
4390
|
/**
|
|
4376
4391
|
* Current complexity metrics for a matched threshold override entry.
|