← Catalog

pi-fallow

Pi extension that brings Fallow codebase intelligence into Pi as an agent tool and slash command.

Extension

Install

Install with PiG

pig install npm:pi-fallow

Install with Pi

pi install npm:pi-fallow
Review before installing

Packages run code with your permissions and influence agent behavior. Catalog inclusion is not a security audit. Review the source before installing a third-party package.

Pi manifest JSON

The pi field of package.json.

{
  "image": "https://raw.githubusercontent.com/revazi/pi-fallow/main/pi-fallow.png",
  "extensions": [
    "./extensions/index.ts"
  ]
}

README

Written by the package's publisher, shown as published in version 0.8.0 (README.md). PiG does not review it.

Pi Fallow

npm version npm downloads CI codecov license: MIT

Pi Fallow connects Fallow to the Pi coding agent. It adds:

  • 🧰 fallow_run — a compact tool for agent workflows
  • ⌨️ /fallow — a slash command for interactive analysis
  • 🧭 a TUI navigator for reviewing, filtering, tracing, and selecting findings

Use it to verify changes, review a PR, find dead code or duplication, inspect maintainability, surface security candidates, and trace whether code is safe to remove.

Pi Fallow project analysis

Similar Code review queue

📦 Install

pi install npm:pi-fallow

Other supported sources:

pi install git:github.com/revazi/pi-fallow
pi install .       # local checkout
pi install -l .    # project-local checkout
pi -e .            # try without installing

🚀 Quick start

Run the issue-focused default:

/fallow

This combines dead-code, duplication, health, and security analysis into one actionable report. Enforced failing or warning gates and judgeable stale-baseline advisories are shown separately from findings; they do not increase issue counts. An enforced failing gate gives the aggregate a findings/gate-failure exit even when there are no findings. Passing gates are omitted. The complete aggregate is retained in a local output file, while the inline report omits raw gate and baseline details and configuration. Informational file scores, hotspots, and advisory refactoring targets remain available through explicit health commands but do not inflate the default issue count.

CommandWhat it does
/fallowIssue-focused default report
/fallow issuesSame aggregate, explicit
/fallow prAudit against the detected base, new-only gate
/fallow health --file-scores --targets --scoreMaintainability context
/fallow dead-code --changed-since mainUnused code on a branch
/fallow dupes --changed-since mainDuplication on a branch
/fallow security --changed-since main --gate newSecurity candidates on a branch
/fallow audit --base origin/main --gate new-onlyFull change audit
/fallow inspect --file extensions/fallow/cli.tsInspect one file
/fallow trace extensions/fallow/cli.ts:fallowCliTrace a symbol
/fallow architecture extensions/fallow/cli.ts extensions/fallow/registry.tsArchitecture lookup
/fallow decision-surface --changed-since mainStructural decisions in a change
/fallow historyReopen or compare session reports
/fallow compatibilityCompare installed Fallow with the certified surface
/fallow config-assistRead-only config inspection
/fallow similar-code statusLocal similar-code readiness

/fallow pr is shorthand for an audit against the detected base with a new-only gate. Its summary distinguishes Fallow's non-failing WARN verdict from PASS; an unrecognized verdict is UNKNOWN when execution otherwise succeeds. /fallow rerun repeats the last analysis. /fallow architecture <file>... maps to Fallow's read-only guard command.

Set a shell-free custom default with PI_FALLOW_DEFAULT_COMMAND:

export PI_FALLOW_DEFAULT_COMMAND='health --complexity --targets --score'

Explicit subcommands are never replaced. Recursive and extension-only commands cannot be configured as the default.

🤖 Agent tool

fallow_run accepts a command, separate CLI-token arguments, an optional root and timeout, and an output detail level:

{
  "command": "audit",
  "args": ["--base", "main", "--gate", "new-only"],
  "detail": "findings"
}
DetailWhat the model sees
summaryStatus and counts
findingsBounded normalized findings with locations and actions (default)
rawBounded raw Fallow output for diagnostics

Bounded responses link to a complete report whenever data is omitted. Before deletion, inspect or trace the target; treat incomplete type-aware evidence as advisory; and preview fixes before applying them.

🧭 Interactive navigator

The TUI keeps every actionable finding navigable while defaulting to a compact model prompt.

KeyAction
↑/↓, j/kMove
PgUp / PgDnScroll the Findings viewport without changing selection
Enter/SpaceExpand finding
/Search
f / vCycle section/severity filters
s / ASelect one/all visible findings
pOpen read-only action palette
tRun the first valid trace action
e or aLoad selected findings into the editor
yCopy selected findings
dToggle full raw detail
iToggle informational health context
q / EscClose or dismiss the current control

The action palette supports safe inspection, explanation, tracing, symbol impact, and architecture lookup. Fixes are limited to explicit project-wide dry-run previews; the navigator never applies them. Project-issues gate and baseline notes are distinct from findings; when present, the Findings header shows their count, and PgDn scrolls to their full text below the finding rows.

🧩 Similar Code

Similar Code is explicit, local-model, and advisory. It never runs as part of the default report, audits, security analysis, or automatic fixes.

Open the persistent overlay with 2 or o. From its Similar Code view:

  • r refreshes readiness
  • s, t, and l edit scope, threshold, and result limit
  • c opts into reuse of project-local embeddings (off by default)
  • v validates without running
  • Enter validates and requests a run when not editing
  • uppercase S opens the setup preview, and only y confirms installation

Setup and analysis stay in the overlay, support cancellation, retain their latest result, and never run automatically. Cold inference may require the download size reported by similar-code status and can take minutes. Complete reports remain separate files for reproducible inspect/review steps.

Open Runtime Coverage with 3. Its only runnable mode is one explicit local coverage analyze --runtime-coverage <path> request against the local V8/Istanbul file or directory you select and preview. Run remains disabled until readiness is verified and that explicit artifact preview is valid; execution then freshly rechecks the mode, project, artifact identity/metadata, arguments, and signed sidecar binding. Directory contents are not crawled to guess capture cardinality.

Continuous monitoring, cloud analysis/upload, and multi-capture analysis are shown as distinct licensed workflows that are unavailable in this overlay. They have no selectable request variant, flags, upload path, or capture initiation. The available local run disables analysis caching, removes cloud credential/source variables from the child, and does not claim production coverage. Setup and analysis remain explicit TUI-only actions; RPC, print, JSON, and fallow_run cannot install the sidecar or initiate capture.

🕘 History

Pi Fallow keeps up to 20 completed slash-command reports in branch-aware, project-isolated session metadata:

/fallow history
/fallow history open r1
/fallow history compare r1 r2
/fallow history clear

Reports must still exist and match their recorded digest. Comparisons require compatible, complete scopes and never guess when identity evidence is missing. History is session-local and Pi Fallow never deletes saved reports automatically.

⚙️ Configuration and compatibility

/fallow config-assist performs a bounded read-only inspection of the discovered Fallow configuration. It can preview one schema-recognized rule severity without exposing resolved values or secrets.

Applying a preview is TUI-only. Apply requires a direct confirmation; repeated discovery, schema, and content checks ensure concurrent drift or cancellation refuses the write. Existing files receive byte-exact backups and atomic replacements; inherited or external configuration remains read-only.

/fallow compatibility compares the installed Fallow capability schema with the certified surface. It reports additive and incompatible capabilities, never installs software or runs during startup, and never gates ordinary execution.

🛡️ Run modes and safety

  • TUI mode uses loaders and the interactive navigator.
  • RPC, print, and JSON modes execute directly and retain complete transcript output without terminal UI.
  • Arguments are passed as arrays without a shell.
  • Cancellation terminates process trees and escalates when necessary.
  • Large model-facing results are bounded and preserve complete-output references.
  • Pi host packages remain external and are never bundled.
  • Optional model setup requires an explicit TUI preview and confirmation.

✅ Tested compatibility

Pi coding agentMatching Pi AI/TUI packagesTypeBoxNode.jsFallow
1.5.21.5.21.4.722.19 and 24.123.43.1

Certification means this exact matrix passed frozen and live repository checks. Compatibility means the installed Fallow still advertises the capabilities Pi Fallow models. Installation constraints are only the requirements below. This is tested compatibility; it is not an installation constraint, and other versions may work.

Pi libraries and TypeBox are host-provided wildcard peer dependencies, following Pi package guidance; the tested matrix does not narrow those peer ranges. The TypeBox version shown is the root development pin. Pi 1.5.2 also supplies its own TypeBox 1.3.27 to loaded extensions and validates tool arguments as JSON Schema with pi-schema. Tests exercise the root-built tool schema, including Pi's argument coercion, with the locked host validator as well as packaged extension loading.

📋 Requirements

  • Node.js 22.19+
  • Pi coding agent
  • Fallow available through FALLOW_BIN, PATH, a package-local installation, or the npx -y fallow fallback

Fallow 3.43.1 is the current core certification target. Fallow 3.43 separates type-aware and Similar Code companions from the core package; those features require matching-version companions installed alongside Fallow. The repository pins both as development-only certification tools, not package dependencies. Successful optional coverage evidence remains historical 3.42.0, and model-backed Similar Code evidence remains historical 3.36.0; neither was recertified for 3.43.1. Runner discovery is cached per project/session and refreshed when relevant environment values change.

📊 Benchmarks

Pi Fallow is measured in three places: model-visible tokens, interactive latency, and /fallow issues on pinned popular JS/TS packages. These are host-specific snapshots, not provider billing or a quality ranking of the analyzed projects.

🧠 Model-visible tokens

Bounded fallow_run output keeps complete findings on disk and sends the model a compact, actionable slice.

Surface (o200k_base)Before output-detailCurrent
Active fallow_run contract2,237421
All tool results45,1047,590 (83.17% smaller)

Slash-command transcripts are unchanged by detail. Omitted inline findings are counted, and bounded results keep a complete-output reference. These are deterministic corpus measurements; see benchmarks/README.md.

⚡ Interactive analysis

/fallow issues runs combined code-quality and security analyses concurrently, capped at two child processes.

Generated projectSequentialConcurrentFasterPeak descendant RSS
10 files287.65 ms183.94 ms36.05%115.78 → 215.47 MB
500 files333.84 ms238.24 ms28.64%123.55 → 212.97 MB

Navigator preparation stays below 0.2 ms. Direct Fallow invocation is much cheaper than npx fallback on the same machine. Methodology and the Apple M1 Pro baseline live in benchmarks/PERFORMANCE.md.

The table below is /fallow issues on shallow clones of widely used JS/TS projects, using default Fallow discovery and Pi Fallow's production aggregator.

Health is Fallow's overall project score (0–100 and letter grade). MI is average maintainability. Default discovery includes tests, examples, docs, and generated fixtures, so unused-file and duplication penalties can pull the composite score down even when maintainability stays high. This is a snapshot, not a ranking of these projects.

Measured on Apple M1 Pro, Node.js 24.12.0, Fallow 3.24.1:

HTTP frameworks
PackagePinFilesHealthMITimeFindings
expressv5.2.1154B 72.990.20.35s358
fastifyv5.9.0296F 16.674.70.36s514
koav3.2.182C 65.774.80.26s112
honov4.13.8391C 68.190.60.53s218
UI frameworks
PackagePinFilesHealthMITimeFindings
preact10.29.8255D 51.389.90.47s126
vuev3.5.43565D 48.489.80.62s569
sveltesvelte@5.57.08,493C 65.686.81.66s5,961

Svelte is measured as the published monorepo tag, not a single package path.

Libraries
PackagePinFilesHealthMITimeFindings
axiosv1.20.0252B 7289.60.41s176
zodv4.6.5549D 45.286.90.63s863
commanderv15.0.0171B 71.874.40.31s208
zustandv5.0.1556C 59.892.00.57s21
reduxv5.0.1225D 52.690.70.45s118
date-fnsv4.4.01,632B 70.391.91.38s909
debug4.4.37C 6594.10.25s14
chalkv6.0.020C 6488.90.70s9
lodash4.18.159D 5183.10.51s767

Reproduce or refresh the snapshot:

npm run bench:packages -- \
  --label candidate \
  --output /tmp/pi-fallow-popular-packages.json

Pinned refs live in benchmarks/popular-packages.json. The checked-in result is benchmarks/baselines/popular-packages-v0.6.2.json. Wall times are one-shot and machine-sensitive; file counts and finding totals are from the pinned checkouts.

🧩 More Pi packages by Revaz

PackagePurpose
pi-jscpdQuiet, read-only duplication guardrail for Pi
pi-readsSource capture, cited reading, Obsidian, EPUB, PDF, and Kindle workflows
pi-careerDeterministic resume and career workflows
pi-tmux-orchestratorMulti-agent coordination in tmux
@tasklight/pi-tasklightTasklight notifications for Pi

🛠️ Development

npm test
npm run coverage
npm run check:bundle
npm run health
npm run dupes
npm run dead-code
npm run audit:all
npm run package:smoke
npm run bench:tokens -- --label candidate --output /tmp/pi-fallow-tokens.json
npm run bench:performance -- --label candidate --output /tmp/pi-fallow-performance.json
npm run bench:issues -- --label candidate --output /tmp/pi-fallow-project-issues.json
npm run bench:packages -- --label candidate --output /tmp/pi-fallow-popular-packages.json

See CONTRIBUTING.md, ROADMAP.md, benchmark documentation, and performance methodology.

The package manifest exposes ./extensions/index.ts. Pi libraries and TypeBox are external wildcard peers, not bundled dependencies.

📄 License

MIT © Revaz Zakalashvili