fallow 3.17.0 → 3.19.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/README.md +2 -2
- package/capabilities.json +166 -17
- package/issue-registry.json +2 -2
- package/package.json +11 -10
- package/schema.json +43 -4
- package/scripts/lazy-verify.js +20 -6
- package/scripts/lazy-verify.test.js +86 -103
- package/scripts/sentinel-path.test.js +9 -2
- package/scripts/verify-binary.js +10 -9
- package/scripts/verify-binary.test.js +56 -10
- package/skills/fallow/SKILL.md +21 -21
- package/skills/fallow/references/cli-reference.md +74 -6
- package/skills/fallow/references/gotchas.md +2 -2
- package/skills/fallow/references/mcp.md +47 -5
- package/skills/fallow/references/node-bindings.md +3 -2
- package/skills/fallow/references/patterns.md +2 -2
- package/skills/fallow/references/similar-code.md +47 -0
- package/types/output-contract.d.ts +786 -76
package/README.md
CHANGED
|
@@ -28,7 +28,7 @@ npx fallow fix --dry-run # Preview automatic cleanup
|
|
|
28
28
|
|
|
29
29
|
## Output and exit codes
|
|
30
30
|
|
|
31
|
-
Add `--format json --quiet` to any command for one typed JSON document on stdout. Exit code 1 means findings, not failure; 0 is clean (or an audit pass or warn verdict); 2 is a validation or runtime error, reported as a JSON error envelope rather than a stack trace.
|
|
31
|
+
Add `--format json --quiet` to any command for one typed JSON document on stdout. Exit code 1 means findings, not failure; 0 is clean (or an audit pass or warn verdict); 2 is a validation or runtime error, reported as a JSON error envelope rather than a stack trace. License, coverage setup, network, and security-gate workflows use additional documented codes; read `fallow schema.exit_codes` instead of suppressing the process status.
|
|
32
32
|
|
|
33
33
|
Parsing the output in TypeScript? Import the typed shapes, version-pinned to the CLI you install:
|
|
34
34
|
|
|
@@ -89,7 +89,7 @@ The bundled `fallow-mcp` server lives in `node_modules/.bin/` when installed as
|
|
|
89
89
|
}
|
|
90
90
|
```
|
|
91
91
|
|
|
92
|
-
Swap `npx` for `pnpm exec` or `yarn` to match your package manager; a globally installed `fallow-mcp` works as `"command": "fallow-mcp"` directly. See the [MCP integration guide](https://docs.fallow.tools/integrations/mcp).
|
|
92
|
+
Swap `npx` for `pnpm exec` or `yarn` to match your package manager; a globally installed `fallow-mcp` works as `"command": "fallow-mcp"` directly. See the [MCP integration guide](https://docs.fallow.tools/integrations/mcp). `npx fallow agent install` writes this registration for you, together with the skill, an `AGENTS.md` task map, and the commit/push gate, for every harness it detects (Claude Code, Codex, Cursor); `--dry-run` shows the plan first.
|
|
93
93
|
|
|
94
94
|
The package also ships a version-matched agent skill under `skills/fallow`, and `fallow/capabilities.json` mirrors `fallow schema` for tools that need CLI and issue-surface metadata without spawning the binary. TanStack Intent discovers both from `node_modules`:
|
|
95
95
|
|
package/capabilities.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fallow",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.19.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": [
|
|
@@ -815,7 +815,7 @@
|
|
|
815
815
|
"name": "--unused-dependency-overrides",
|
|
816
816
|
"type": "bool",
|
|
817
817
|
"required": false,
|
|
818
|
-
"description": "Only report unused
|
|
818
|
+
"description": "Only report unused package-manager dependency overrides",
|
|
819
819
|
"possible_values": [
|
|
820
820
|
"true",
|
|
821
821
|
"false"
|
|
@@ -825,7 +825,7 @@
|
|
|
825
825
|
"name": "--misconfigured-dependency-overrides",
|
|
826
826
|
"type": "bool",
|
|
827
827
|
"required": false,
|
|
828
|
-
"description": "Only report misconfigured
|
|
828
|
+
"description": "Only report misconfigured package-manager dependency overrides",
|
|
829
829
|
"possible_values": [
|
|
830
830
|
"true",
|
|
831
831
|
"false"
|
|
@@ -906,6 +906,36 @@
|
|
|
906
906
|
"description": "Inspect the optional TypeScript semantic companion",
|
|
907
907
|
"flags": []
|
|
908
908
|
},
|
|
909
|
+
{
|
|
910
|
+
"name": "similar-code",
|
|
911
|
+
"description": "Find semantically similar functions with a pinned local model (opt-in)",
|
|
912
|
+
"flags": [
|
|
913
|
+
{
|
|
914
|
+
"name": "--threshold",
|
|
915
|
+
"type": "string",
|
|
916
|
+
"required": false,
|
|
917
|
+
"description": "Minimum cosine similarity retained as an unverified candidate"
|
|
918
|
+
},
|
|
919
|
+
{
|
|
920
|
+
"name": "--min-lines",
|
|
921
|
+
"type": "string",
|
|
922
|
+
"required": false,
|
|
923
|
+
"description": "Minimum source lines per extracted function"
|
|
924
|
+
},
|
|
925
|
+
{
|
|
926
|
+
"name": "--top",
|
|
927
|
+
"type": "string",
|
|
928
|
+
"required": false,
|
|
929
|
+
"description": "Cap displayed candidates after bounded full-corpus comparison"
|
|
930
|
+
},
|
|
931
|
+
{
|
|
932
|
+
"name": "--file",
|
|
933
|
+
"type": "string",
|
|
934
|
+
"required": false,
|
|
935
|
+
"description": "Report pairs touching one of these project-relative files"
|
|
936
|
+
}
|
|
937
|
+
]
|
|
938
|
+
},
|
|
909
939
|
{
|
|
910
940
|
"name": "inspect",
|
|
911
941
|
"description": "Inspect one file or exported symbol as a bundled evidence query",
|
|
@@ -1075,6 +1105,11 @@
|
|
|
1075
1105
|
"description": "Install or remove fallow-managed Git and agent hooks",
|
|
1076
1106
|
"flags": []
|
|
1077
1107
|
},
|
|
1108
|
+
{
|
|
1109
|
+
"name": "agent",
|
|
1110
|
+
"description": "Wire fallow into the coding-agent harnesses used by this project in one pass (AGENTS.md task map, skill, MCP server, commit/push gate), or show and remove what was installed. `fallow init --agents` and `fallow hooks install --target agent` remain the single-piece commands underneath",
|
|
1111
|
+
"flags": []
|
|
1112
|
+
},
|
|
1078
1113
|
{
|
|
1079
1114
|
"name": "ci",
|
|
1080
1115
|
"description": "CI helpers for PR/MR feedback envelopes",
|
|
@@ -1659,13 +1694,13 @@
|
|
|
1659
1694
|
"name": "--coverage",
|
|
1660
1695
|
"type": "string",
|
|
1661
1696
|
"required": false,
|
|
1662
|
-
"description": "Path to Istanbul-format coverage data (coverage-final.json) for accurate per-function CRAP scores in the health sub-analysis. Also configurable via FALLOW_COVERAGE"
|
|
1697
|
+
"description": "Path to Istanbul-format coverage data (coverage-final.json) for accurate per-function CRAP scores in the health sub-analysis. Also configurable via FALLOW_COVERAGE or health.coverage"
|
|
1663
1698
|
},
|
|
1664
1699
|
{
|
|
1665
1700
|
"name": "--coverage-root",
|
|
1666
1701
|
"type": "string",
|
|
1667
1702
|
"required": false,
|
|
1668
|
-
"description": "Absolute prefix to strip from coverage data paths before CRAP matching. Use when coverage was generated under a different checkout root in CI or Docker"
|
|
1703
|
+
"description": "Absolute prefix to strip from coverage data paths before CRAP matching. Use when coverage was generated under a different checkout root in CI or Docker. Also configurable via FALLOW_COVERAGE_ROOT or health.coverageRoot"
|
|
1669
1704
|
},
|
|
1670
1705
|
{
|
|
1671
1706
|
"name": "--no-css",
|
|
@@ -3094,7 +3129,7 @@
|
|
|
3094
3129
|
"rule_id": "fallow/unused-dependency-override",
|
|
3095
3130
|
"command": "dead-code",
|
|
3096
3131
|
"category": "Dependencies",
|
|
3097
|
-
"description": "
|
|
3132
|
+
"description": "Package-manager override target is not declared or resolved",
|
|
3098
3133
|
"label": "Unused Dependency Overrides",
|
|
3099
3134
|
"config_key": "unused-dependency-overrides",
|
|
3100
3135
|
"registry_index": 42,
|
|
@@ -3135,7 +3170,7 @@
|
|
|
3135
3170
|
"rule_id": "fallow/misconfigured-dependency-override",
|
|
3136
3171
|
"command": "dead-code",
|
|
3137
3172
|
"category": "Dependencies",
|
|
3138
|
-
"description": "
|
|
3173
|
+
"description": "Package-manager override has an unparsable key or value",
|
|
3139
3174
|
"label": "Misconfigured Dependency Overrides",
|
|
3140
3175
|
"config_key": "misconfigured-dependency-overrides",
|
|
3141
3176
|
"registry_index": 43,
|
|
@@ -5923,18 +5958,32 @@
|
|
|
5923
5958
|
"sarif",
|
|
5924
5959
|
"compact",
|
|
5925
5960
|
"markdown",
|
|
5961
|
+
"md",
|
|
5926
5962
|
"codeclimate",
|
|
5927
5963
|
"gitlab-codequality",
|
|
5964
|
+
"gitlab-code-quality",
|
|
5928
5965
|
"pr-comment-github",
|
|
5929
5966
|
"pr-comment-gitlab",
|
|
5930
5967
|
"review-github",
|
|
5931
5968
|
"review-gitlab",
|
|
5932
|
-
"badge"
|
|
5969
|
+
"badge",
|
|
5970
|
+
"github-annotations",
|
|
5971
|
+
"github-summary"
|
|
5933
5972
|
],
|
|
5934
5973
|
"exit_codes": {
|
|
5935
5974
|
"0": "Success (no error-severity issues found)",
|
|
5936
|
-
"1": "Error-severity issues found (per rules config, or --fail-on-issues promotes warn
|
|
5937
|
-
"2": "Error (invalid config, invalid input, etc.). When --format json is active, errors are emitted as structured JSON on stdout: {\"error\": true, \"message\": \"...\", \"exit_code\": 2}"
|
|
5975
|
+
"1": "Error-severity issues found (per rules config, or --fail-on-issues promotes warn to error)",
|
|
5976
|
+
"2": "Error (invalid config, invalid input, etc.). When --format json is active, errors are emitted as structured JSON on stdout: {\"error\": true, \"message\": \"...\", \"exit_code\": 2}",
|
|
5977
|
+
"3": "Requested resource unavailable: config --path found no config, or a license is missing, invalid, or beyond its offline hard-fail window",
|
|
5978
|
+
"4": "Runtime coverage sidecar is unavailable, unverifiable, protocol-incompatible, or terminated unexpectedly",
|
|
5979
|
+
"5": "Runtime coverage input could not be prepared or parsed",
|
|
5980
|
+
"6": "Runtime coverage sidecar reported an internal error",
|
|
5981
|
+
"7": "Network or cloud request failed during a license, coverage, or CI operation",
|
|
5982
|
+
"8": "Security gate matched a candidate selected by --gate",
|
|
5983
|
+
"10": "Coverage inventory or static-findings upload input or project validation failed",
|
|
5984
|
+
"11": "Coverage inventory or static-findings upload exceeded the server payload limit",
|
|
5985
|
+
"12": "Coverage inventory or static-findings upload authentication or authorization was rejected",
|
|
5986
|
+
"13": "Coverage inventory or static-findings upload failed after retries or returned another server error"
|
|
5938
5987
|
},
|
|
5939
5988
|
"environment_variables": {
|
|
5940
5989
|
"FALLOW_FORMAT": "Default output format (json/human/sarif/compact/markdown/codeclimate/gitlab-codequality/pr-comment-github/pr-comment-gitlab/review-github/review-gitlab/badge/github-annotations/github-summary). CLI --format flag overrides this.",
|
|
@@ -5949,14 +5998,14 @@
|
|
|
5949
5998
|
"FALLOW_PR_COMMENT_LAYOUT": "Sticky PR comment layout: default, compact, gate-only, or details.",
|
|
5950
5999
|
"FALLOW_CONSOLIDATED_STATUS": "When split PR gate check runs are enabled, truthy values add one aggregate Fallow check alongside the per-gate checks.",
|
|
5951
6000
|
"FALLOW_DIFF_CONTEXT": "Line radius around changed diff lines when scoping findings to a diff in the review/PR-comment formats (default 3).",
|
|
5952
|
-
"FALLOW_BOT_LOGIN": "
|
|
6001
|
+
"FALLOW_BOT_LOGIN": "Allowlisted posting username used to recognize fallow-owned finding roots and resolution replies. When set, it narrows ownership to that exact username (an empty value matches nobody); when unset, provider-native bot metadata is trusted. This is an authorship control, not a lifecycle or deduplication token.",
|
|
5953
6002
|
"FALLOW_API_RETRIES": "Maximum HTTP attempts for review-comment reconciliation API calls (default 3).",
|
|
5954
6003
|
"FALLOW_API_RETRY_DELAY": "Floor delay in seconds between HTTP retry attempts (default 2); a server-supplied Retry-After overrides it on 429 responses.",
|
|
5955
6004
|
"FALLOW_CACHE_DIR": "Directory for fallow's persistent analysis cache. Relative paths resolve from the project root and override cache.dir.",
|
|
5956
6005
|
"FALLOW_CACHE_MAX_SIZE": "Extraction cache size cap in megabytes (default 256). Wins over the cache.maxSizeMb config field.",
|
|
5957
6006
|
"FALLOW_EXTENDS_TIMEOUT_SECS": "Timeout in seconds for fetching https:// configs referenced via the extends field (default 5).",
|
|
5958
|
-
"FALLOW_COVERAGE": "Path to Istanbul coverage data (coverage-final.json) for accurate per-function CRAP scores. CLI --coverage flag overrides this.",
|
|
5959
|
-
"FALLOW_COVERAGE_ROOT": "Absolute coverage-data path prefix for rebasing Istanbul paths in CI or containers. CLI --coverage-root flag overrides this.",
|
|
6007
|
+
"FALLOW_COVERAGE": "Path to Istanbul coverage data (coverage-final.json) for accurate per-function CRAP scores. CLI --coverage flag overrides this; it wins over the health.coverage config field. Honored by the health, bare fallow, and audit CLI commands and by the MCP audit and check_health tools on both their typed route and their CLI fallback, where the explicit coverage parameter overrides it.",
|
|
6008
|
+
"FALLOW_COVERAGE_ROOT": "Absolute coverage-data path prefix for rebasing Istanbul paths in CI or containers. CLI --coverage-root flag overrides this; it wins over the health.coverageRoot config field. Honored by the health, bare fallow, and audit CLI commands and by the MCP audit and check_health tools on both their typed route and their CLI fallback, where the explicit coverage_root parameter overrides it.",
|
|
5960
6009
|
"FALLOW_MAX_FILE_SIZE": "Per-file size ceiling in megabytes for source discovery (default 5; 0 = no limit). CLI --max-file-size flag overrides this.",
|
|
5961
6010
|
"FALLOW_TYPE_AWARE": "Enable or disable TypeScript semantic (type-aware) analysis for the run (true/false/1/0/yes/no/on/off). Precedence: --type-aware/--no-type-aware CLI flags, then FALLOW_TYPE_AWARE, then the audit.typeAware config field, then typeAware.enabled.",
|
|
5962
6011
|
"FALLOW_TYPE_AWARE_BIN": "Trusted executable override for the TypeScript semantic refinement sidecar used by dead-code --type-aware. Relative paths resolve from the caller's working directory before --root is applied; project node_modules and PATH are intentionally not searched. Default: sibling of the active Fallow executable.",
|
|
@@ -6461,7 +6510,7 @@
|
|
|
6461
6510
|
},
|
|
6462
6511
|
"mcp_tools": {
|
|
6463
6512
|
"server": "fallow-mcp",
|
|
6464
|
-
"note": "key_params is a curated subset; the live MCP input schemas (
|
|
6513
|
+
"note": "key_params is a curated subset; the live MCP input schemas (tools/list) are authoritative for the full parameter list. cli_command is the nearest CLI fallback, not a full MCP input-schema projection",
|
|
6465
6514
|
"tools": [
|
|
6466
6515
|
{
|
|
6467
6516
|
"name": "code_execute",
|
|
@@ -6523,6 +6572,35 @@
|
|
|
6523
6572
|
"license_note": null,
|
|
6524
6573
|
"read_only": true
|
|
6525
6574
|
},
|
|
6575
|
+
{
|
|
6576
|
+
"name": "find_similar_code",
|
|
6577
|
+
"kind": "analysis",
|
|
6578
|
+
"description": "Find unverified semantically similar function candidates with the exact pinned local model",
|
|
6579
|
+
"cli_command": "fallow similar-code --format json --quiet",
|
|
6580
|
+
"key_params": [
|
|
6581
|
+
"threshold",
|
|
6582
|
+
"min_lines",
|
|
6583
|
+
"top",
|
|
6584
|
+
"changed_since",
|
|
6585
|
+
"paths"
|
|
6586
|
+
],
|
|
6587
|
+
"license": "free",
|
|
6588
|
+
"license_note": null,
|
|
6589
|
+
"read_only": true
|
|
6590
|
+
},
|
|
6591
|
+
{
|
|
6592
|
+
"name": "inspect_similar_code",
|
|
6593
|
+
"kind": "trace",
|
|
6594
|
+
"description": "Inspect one exact candidate snapshot without rerunning retrieval or global ranking",
|
|
6595
|
+
"cli_command": "fallow similar-code inspect <candidate-id> --candidates <report.json> --format json --quiet",
|
|
6596
|
+
"key_params": [
|
|
6597
|
+
"candidate_id",
|
|
6598
|
+
"snapshot"
|
|
6599
|
+
],
|
|
6600
|
+
"license": "free",
|
|
6601
|
+
"license_note": null,
|
|
6602
|
+
"read_only": true
|
|
6603
|
+
},
|
|
6526
6604
|
{
|
|
6527
6605
|
"name": "inspect_target",
|
|
6528
6606
|
"kind": "analysis",
|
|
@@ -6658,7 +6736,7 @@
|
|
|
6658
6736
|
{
|
|
6659
6737
|
"name": "get_token_blast_radius",
|
|
6660
6738
|
"kind": "analysis",
|
|
6661
|
-
"description": "Design-token blast radius for Tailwind v4 @theme tokens AND CSS-in-JS defineVars/createTheme-family token definitions: per token, a consumer_count (static lower bound) and a capped located consumers[] sample tagged theme-var/css-var/utility/apply (Tailwind)
|
|
6739
|
+
"description": "Design-token blast radius for Tailwind v4 @theme tokens AND CSS-in-JS defineVars/createTheme-family token definitions: per token, a consumer_count (static lower bound) and a capped located consumers[] sample tagged theme-var/css-var/utility/apply (Tailwind), js-member (CSS-in-JS member access), or js-call (StyleX theme-group and Panda token calls); descriptive context for sizing a token change, never a deletion gate",
|
|
6662
6740
|
"cli_command": "fallow health --css --format json --quiet",
|
|
6663
6741
|
"key_params": [],
|
|
6664
6742
|
"license": "free",
|
|
@@ -6837,7 +6915,7 @@
|
|
|
6837
6915
|
{
|
|
6838
6916
|
"name": "trace_symbol",
|
|
6839
6917
|
"kind": "trace",
|
|
6840
|
-
"description": "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.",
|
|
6918
|
+
"description": "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. The proof covers only the lane named by semantic.target.namespace, so a root trace that lists a reference the proof does not is wider evidence rather than stale. This is project-wide evidence for Fallow decisions, not a compiler-diagnostic or lint-rule surface.",
|
|
6841
6919
|
"cli_command": "fallow dead-code --type-aware --trace <file:export> --format json --quiet",
|
|
6842
6920
|
"key_params": [
|
|
6843
6921
|
"file",
|
|
@@ -6920,8 +6998,78 @@
|
|
|
6920
6998
|
}
|
|
6921
6999
|
]
|
|
6922
7000
|
},
|
|
7001
|
+
"mcp_resources": {
|
|
7002
|
+
"server": "fallow-mcp",
|
|
7003
|
+
"note": "Read-only reference material served in-process by fallow-mcp; every JSON payload carries fallow_version. Rows with template: true are RFC 6570 URI templates listed under resources/templates/list; the catalogue is static, so the server declares neither subscribe nor listChanged",
|
|
7004
|
+
"resources": [
|
|
7005
|
+
{
|
|
7006
|
+
"uri": "fallow://tools",
|
|
7007
|
+
"name": "tools",
|
|
7008
|
+
"title": "Tool manifest",
|
|
7009
|
+
"description": "MCP tool manifest: name, kind, one-line description, nearest CLI fallback, key params, license, and read-only flag for every tool",
|
|
7010
|
+
"mime_type": "application/json",
|
|
7011
|
+
"template": false
|
|
7012
|
+
},
|
|
7013
|
+
{
|
|
7014
|
+
"uri": "fallow://issue-types",
|
|
7015
|
+
"name": "issue-types",
|
|
7016
|
+
"title": "Issue type registry",
|
|
7017
|
+
"description": "Every issue type with its command, category, config key, zero-config default severity, opt-in flag, fixable flag, docs URL, and explain resource URI",
|
|
7018
|
+
"mime_type": "application/json",
|
|
7019
|
+
"template": false
|
|
7020
|
+
},
|
|
7021
|
+
{
|
|
7022
|
+
"uri": "fallow://explain",
|
|
7023
|
+
"name": "explain",
|
|
7024
|
+
"title": "Explain index",
|
|
7025
|
+
"description": "Index of every explainable issue type with its one-line summary and the fallow://explain/{issue_type} URI to read",
|
|
7026
|
+
"mime_type": "application/json",
|
|
7027
|
+
"template": false
|
|
7028
|
+
},
|
|
7029
|
+
{
|
|
7030
|
+
"uri": "fallow://task-matrix",
|
|
7031
|
+
"name": "task-matrix",
|
|
7032
|
+
"title": "Agent task matrix",
|
|
7033
|
+
"description": "Agent task-to-command matrix: which read-only fallow command to run before deleting, refactoring, committing, or scoping work",
|
|
7034
|
+
"mime_type": "application/json",
|
|
7035
|
+
"template": false
|
|
7036
|
+
},
|
|
7037
|
+
{
|
|
7038
|
+
"uri": "fallow://schema/config",
|
|
7039
|
+
"name": "schema-config",
|
|
7040
|
+
"title": "Config JSON Schema",
|
|
7041
|
+
"description": "JSON Schema of the fallow config file (same document as fallow config-schema)",
|
|
7042
|
+
"mime_type": "application/json",
|
|
7043
|
+
"template": false
|
|
7044
|
+
},
|
|
7045
|
+
{
|
|
7046
|
+
"uri": "fallow://schema/plugin",
|
|
7047
|
+
"name": "schema-plugin",
|
|
7048
|
+
"title": "Plugin JSON Schema",
|
|
7049
|
+
"description": "JSON Schema of a user-authored external plugin (same document as fallow plugin-schema)",
|
|
7050
|
+
"mime_type": "application/json",
|
|
7051
|
+
"template": false
|
|
7052
|
+
},
|
|
7053
|
+
{
|
|
7054
|
+
"uri": "fallow://schema/rule-pack",
|
|
7055
|
+
"name": "schema-rule-pack",
|
|
7056
|
+
"title": "Rule pack JSON Schema",
|
|
7057
|
+
"description": "JSON Schema of a declarative rule pack (same document as fallow rule-pack-schema)",
|
|
7058
|
+
"mime_type": "application/json",
|
|
7059
|
+
"template": false
|
|
7060
|
+
},
|
|
7061
|
+
{
|
|
7062
|
+
"uri": "fallow://explain/{issue_type}",
|
|
7063
|
+
"name": "explain-issue-type",
|
|
7064
|
+
"title": "Explain one issue type",
|
|
7065
|
+
"description": "Explain document for one issue type (same payload as fallow explain <issue-type> --format json): name, summary, rationale, example, fix guidance, docs URL. issue_type accepts the bare id (unused-export), the namespaced id (fallow/unused-export), or the CLI filter spelling; see fallow://explain for the index",
|
|
7066
|
+
"mime_type": "application/json",
|
|
7067
|
+
"template": true
|
|
7068
|
+
}
|
|
7069
|
+
]
|
|
7070
|
+
},
|
|
6923
7071
|
"plugins": {
|
|
6924
|
-
"count":
|
|
7072
|
+
"count": 124,
|
|
6925
7073
|
"note": "Built-in framework plugins, auto-activated when their enabler dependency is present; run fallow list --plugins for the set active in a specific project",
|
|
6926
7074
|
"names": [
|
|
6927
7075
|
"nextjs",
|
|
@@ -7029,6 +7177,7 @@
|
|
|
7029
7177
|
"lint-staged",
|
|
7030
7178
|
"lefthook",
|
|
7031
7179
|
"simple-git-hooks",
|
|
7180
|
+
"size-limit",
|
|
7032
7181
|
"svgo",
|
|
7033
7182
|
"svgr",
|
|
7034
7183
|
"graphql-codegen",
|
package/issue-registry.json
CHANGED
|
@@ -1558,7 +1558,7 @@
|
|
|
1558
1558
|
"rule_id": "fallow/unused-dependency-override",
|
|
1559
1559
|
"command": "dead-code",
|
|
1560
1560
|
"category": "Dependencies",
|
|
1561
|
-
"description": "
|
|
1561
|
+
"description": "Package-manager override target is not declared or resolved",
|
|
1562
1562
|
"label": "Unused Dependency Overrides",
|
|
1563
1563
|
"config_key": "unused-dependency-overrides",
|
|
1564
1564
|
"registry_index": 42,
|
|
@@ -1599,7 +1599,7 @@
|
|
|
1599
1599
|
"rule_id": "fallow/misconfigured-dependency-override",
|
|
1600
1600
|
"command": "dead-code",
|
|
1601
1601
|
"category": "Dependencies",
|
|
1602
|
-
"description": "
|
|
1602
|
+
"description": "Package-manager override has an unparsable key or value",
|
|
1603
1603
|
"label": "Misconfigured Dependency Overrides",
|
|
1604
1604
|
"config_key": "misconfigured-dependency-overrides",
|
|
1605
1605
|
"registry_index": 43,
|
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fallow",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.19.0",
|
|
4
|
+
"mcpName": "io.github.fallow-rs/fallow",
|
|
4
5
|
"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
6
|
"license": "MIT",
|
|
6
7
|
"repository": {
|
|
@@ -87,14 +88,14 @@
|
|
|
87
88
|
"@tanstack/intent": "0.3.6"
|
|
88
89
|
},
|
|
89
90
|
"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.
|
|
98
|
-
"fallow-type-aware": "3.
|
|
91
|
+
"@fallow-cli/darwin-arm64": "3.19.0",
|
|
92
|
+
"@fallow-cli/darwin-x64": "3.19.0",
|
|
93
|
+
"@fallow-cli/linux-x64-gnu": "3.19.0",
|
|
94
|
+
"@fallow-cli/linux-arm64-gnu": "3.19.0",
|
|
95
|
+
"@fallow-cli/linux-x64-musl": "3.19.0",
|
|
96
|
+
"@fallow-cli/linux-arm64-musl": "3.19.0",
|
|
97
|
+
"@fallow-cli/win32-arm64-msvc": "3.19.0",
|
|
98
|
+
"@fallow-cli/win32-x64-msvc": "3.19.0",
|
|
99
|
+
"fallow-type-aware": "3.19.0"
|
|
99
100
|
}
|
|
100
101
|
}
|
package/schema.json
CHANGED
|
@@ -143,6 +143,15 @@
|
|
|
143
143
|
"minCorpusSizeForTokenCache": 5000
|
|
144
144
|
}
|
|
145
145
|
},
|
|
146
|
+
"similarCode": {
|
|
147
|
+
"description": "Configures the explicit local `similar-code` candidate workflow:\n`threshold` (0.80, model-specific cosine floor), `minLines` (3), and\nadditional `ignore` globs. Provider identity, setup, executables,\nendpoints, credentials, and consent cannot be set by project config.",
|
|
148
|
+
"$ref": "#/$defs/SimilarCodeConfig",
|
|
149
|
+
"default": {
|
|
150
|
+
"threshold": 0.8,
|
|
151
|
+
"minLines": 3,
|
|
152
|
+
"ignore": []
|
|
153
|
+
}
|
|
154
|
+
},
|
|
146
155
|
"health": {
|
|
147
156
|
"description": "Sets complexity and health thresholds for `fallow health` (also applied in combined `fallow` and `fallow audit`): `maxCyclomatic` (20), `maxCognitive` (15), `maxCrap` (30.0, findings at or above this are reported), `crapRefactorBand` (5, cyclomatic band below `maxCyclomatic` where a secondary refactor action is added), `maxUnitSize` (max function lines before a large-function finding, 60), `coverage`/`coverageRoot` (Istanbul coverage path and path-prefix strip for accurate CRAP), `ignore` globs (remove files from findings AND the health score), `thresholdOverrides` (per-file/per-function ceilings via `files`/`functions`/`maxCyclomatic`/`maxCognitive`/`maxCrap`/`maxUnitSize`/`reason`), `ownership` (`botPatterns` and `emailMode` for `--ownership`), and `suggestInlineSuppression` (true, emit `suppress-line` action hints in JSON). Raise thresholds to relax which functions are flagged, wire `coverage` for real CRAP scores, or exempt generated/test files via `ignore` (drops them from the score too) or `thresholdOverrides` (keeps them visible under a higher ceiling). The four `max*` thresholds govern findings only and never move `health_score`: its penalties use fixed calibration so grades stay comparable across projects, and `ignore` is the lever that removes files from the score.",
|
|
148
157
|
"$ref": "#/$defs/HealthConfig",
|
|
@@ -986,6 +995,36 @@
|
|
|
986
995
|
}
|
|
987
996
|
}
|
|
988
997
|
},
|
|
998
|
+
"SimilarCodeConfig": {
|
|
999
|
+
"description": "Project-owned tuning for the explicit `fallow similar-code` workflow.\n\nProvider identity, executable discovery, model setup, credentials, and\nconsent are intentionally absent. Project configuration cannot select code\ndestinations or authorize model downloads.",
|
|
1000
|
+
"type": "object",
|
|
1001
|
+
"properties": {
|
|
1002
|
+
"threshold": {
|
|
1003
|
+
"description": "Minimum model-specific cosine similarity retained as an unverified\ncandidate. It is not a probability or refactor-safety verdict.",
|
|
1004
|
+
"type": "number",
|
|
1005
|
+
"format": "double",
|
|
1006
|
+
"minimum": 0.0,
|
|
1007
|
+
"maximum": 1.0,
|
|
1008
|
+
"default": 0.8
|
|
1009
|
+
},
|
|
1010
|
+
"minLines": {
|
|
1011
|
+
"description": "Minimum source line count for a function to enter model inference.",
|
|
1012
|
+
"type": "integer",
|
|
1013
|
+
"format": "uint",
|
|
1014
|
+
"minimum": 1,
|
|
1015
|
+
"default": 3
|
|
1016
|
+
},
|
|
1017
|
+
"ignore": {
|
|
1018
|
+
"description": "Additional project-root-relative globs excluded only from similar-code\nextraction. Global `ignorePatterns` remain authoritative first.",
|
|
1019
|
+
"type": "array",
|
|
1020
|
+
"items": {
|
|
1021
|
+
"type": "string"
|
|
1022
|
+
},
|
|
1023
|
+
"default": []
|
|
1024
|
+
}
|
|
1025
|
+
},
|
|
1026
|
+
"additionalProperties": false
|
|
1027
|
+
},
|
|
989
1028
|
"HealthConfig": {
|
|
990
1029
|
"description": "Configuration for complexity health metrics (`fallow health`).",
|
|
991
1030
|
"type": "object",
|
|
@@ -1028,7 +1067,7 @@
|
|
|
1028
1067
|
"default": 60
|
|
1029
1068
|
},
|
|
1030
1069
|
"coverage": {
|
|
1031
|
-
"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.",
|
|
1070
|
+
"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. Consulted by `fallow health`, bare `fallow`, `fallow audit`,\nand the MCP `audit` / `check_health` tools.",
|
|
1032
1071
|
"type": [
|
|
1033
1072
|
"string",
|
|
1034
1073
|
"null"
|
|
@@ -1036,7 +1075,7 @@
|
|
|
1036
1075
|
"default": null
|
|
1037
1076
|
},
|
|
1038
1077
|
"coverageRoot": {
|
|
1039
|
-
"description": "Absolute prefix to strip from Istanbul file paths before CRAP matching.\nUse when coverage was generated under a different checkout root in CI\nor Docker. The CLI `--coverage-root` flag and `FALLOW_COVERAGE_ROOT`\nenvironment variable override this value.",
|
|
1078
|
+
"description": "Absolute prefix to strip from Istanbul file paths before CRAP matching.\nUse when coverage was generated under a different checkout root in CI\nor Docker. The CLI `--coverage-root` flag and `FALLOW_COVERAGE_ROOT`\nenvironment variable override this value. Consulted by `fallow health`,\nbare `fallow`, `fallow audit`, and the MCP `audit` / `check_health`\ntools.",
|
|
1040
1079
|
"type": [
|
|
1041
1080
|
"string",
|
|
1042
1081
|
"null"
|
|
@@ -1458,12 +1497,12 @@
|
|
|
1458
1497
|
"default": "error"
|
|
1459
1498
|
},
|
|
1460
1499
|
"unused-dependency-overrides": {
|
|
1461
|
-
"description": "A pnpm
|
|
1500
|
+
"description": "A pnpm, npm, or Bun override entry whose target package no workspace\n`package.json` declares and the active readable lockfile does not\nresolve. Defaults to `warn`.",
|
|
1462
1501
|
"$ref": "#/$defs/Severity",
|
|
1463
1502
|
"default": "warn"
|
|
1464
1503
|
},
|
|
1465
1504
|
"misconfigured-dependency-overrides": {
|
|
1466
|
-
"description": "A pnpm
|
|
1505
|
+
"description": "A pnpm, npm, or Bun override or Bun `resolutions` entry whose key or\nvalue cannot be parsed in its declaration source's grammar. Defaults to\n`error`.",
|
|
1467
1506
|
"$ref": "#/$defs/Severity",
|
|
1468
1507
|
"default": "error"
|
|
1469
1508
|
},
|
package/scripts/lazy-verify.js
CHANGED
|
@@ -29,7 +29,7 @@ const { verifyInstalledSync, SKIP_ENV } = require("./verify-binary");
|
|
|
29
29
|
// Bumped to 2 when SHA-256 + platformPkgDir binding landed (closes the
|
|
30
30
|
// cross-install reuse gap in the shared $XDG fallback cache). v1 sentinels
|
|
31
31
|
// without these fields are invalidated automatically.
|
|
32
|
-
const SENTINEL_SCHEMA_VERSION =
|
|
32
|
+
const SENTINEL_SCHEMA_VERSION = 3;
|
|
33
33
|
const VERIFY_LOG_ENV = "FALLOW_VERIFY_LOG";
|
|
34
34
|
|
|
35
35
|
// One-shot warning state: each warning class fires once per process,
|
|
@@ -66,11 +66,10 @@ function emitVerifyLog(env, payload) {
|
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
function binaryTargetsForPlatform(platform) {
|
|
69
|
-
//
|
|
70
|
-
//
|
|
71
|
-
// is only one binary to sentinel-track and verify.
|
|
69
|
+
// Track every executable the multicall CLI may launch without another
|
|
70
|
+
// wrapper verification boundary.
|
|
72
71
|
const ext = platform === "win32" ? ".exe" : "";
|
|
73
|
-
return [`fallow${ext}`];
|
|
72
|
+
return [`fallow${ext}`, `fallow-similar-code${ext}`];
|
|
74
73
|
}
|
|
75
74
|
|
|
76
75
|
function statMtimeMs(absPath) {
|
|
@@ -235,6 +234,9 @@ function isSkipRequested(env) {
|
|
|
235
234
|
// production install path always has fallowDigests)
|
|
236
235
|
// env - process.env (defaults to process.env)
|
|
237
236
|
// platform - process.platform (defaults to process.platform)
|
|
237
|
+
// homedir - os.homedir() override (tests only)
|
|
238
|
+
// isWritable - sentinel directory probe override (tests only)
|
|
239
|
+
// ensureDir - sentinel directory creation override (tests only)
|
|
238
240
|
// logger - function (line: string) -> void (defaults to stderr)
|
|
239
241
|
//
|
|
240
242
|
// Returns one of:
|
|
@@ -253,6 +255,16 @@ function buildVerifyOptions(input, manifest) {
|
|
|
253
255
|
return opts;
|
|
254
256
|
}
|
|
255
257
|
|
|
258
|
+
function buildSentinelOptions(input, platformPkgDir, packageName, env, platform) {
|
|
259
|
+
const opts = { platformPkgDir, packageName, env, platform };
|
|
260
|
+
for (const key of ["homedir", "isWritable", "ensureDir"]) {
|
|
261
|
+
if (Object.prototype.hasOwnProperty.call(input, key)) {
|
|
262
|
+
opts[key] = input[key];
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
return opts;
|
|
266
|
+
}
|
|
267
|
+
|
|
256
268
|
// Persist the sentinel on a successful verify. Logs (warn-once) when the
|
|
257
269
|
// resolved cache location is read-only or every cascade step failed.
|
|
258
270
|
function persistSentinel(sentinel, platformPkgDir, manifest, platform) {
|
|
@@ -315,7 +327,9 @@ function ensureVerified(input) {
|
|
|
315
327
|
};
|
|
316
328
|
}
|
|
317
329
|
|
|
318
|
-
const sentinel = resolveSentinelPath(
|
|
330
|
+
const sentinel = resolveSentinelPath(
|
|
331
|
+
buildSentinelOptions(input || {}, platformPkgDir, packageName, env, platform),
|
|
332
|
+
);
|
|
319
333
|
|
|
320
334
|
// Cache hit: sentinel exists, schema matches, mtimes match, version matches.
|
|
321
335
|
if (sentinel.path && isSentinelValid(sentinel.path, platformPkgDir, manifest, platform)) {
|