{"slug": "perch-semantic-code-linting-with-jev", "title": "Perch: Semantic Code Linting with Jev", "summary": "TypeSafe has released Perch, a semantic code linting CLI installed via `npm install -g @lakeday/perch`, which scans source files and reports defects such as wrong_order, inverted_condition, off_by_one and unhandled_null with per-finding confidence scores and severity weights. The tool requires a PERCH_API_KEY from console.typesafe.ai, ranks findings worst-first through `perch issues`, re-checks fixes with `perch check`, and supports custom rules in perch.yaml plus assistant integrations for Claude Code, Codex, Pi and Cursor. A sample scan reported 20 problems across 5 files, all failing.", "body_md": "Semantic code linting with Jev.\n\nCreate an API key at [console.typesafe.ai](https://console.typesafe.ai) and set\nit as `PERCH_API_KEY`.\n\n```\nnpm install -g @lakeday/perch\nexport PERCH_API_KEY=<your TypeSafe API key>\nbash\n$ perch scan\ncheckout.py\n  ID        Line  Severity  Type    Confidence  Problem                     Method\n  bdc67421    14  P1 (0.8)  defect         81%  wrong_order                 place_order\n  ddc5c917    24  P1 (0.8)  defect         92%  inverted_condition          can_fulfil\n\ncart.py\n  ID        Line  Severity  Type    Confidence  Problem             Method\n  287bfb9d     9  P1 (1.0)  defect         90%  off_by_one          subtotal\n  80d6ebbb    29  P1 (1.4)  defect         89%  unhandled_null      cheapest\n\n✖ 20 problems in 5 files, all failing\n```\n\n`perch issues` lists them worst first. `perch issues <id>` opens one up. `perch check <id>` asks again after a fix, and records what it finds nowhere.\n\n```\nperch setup claude-code   # .claude/skills/perch/SKILL.md\nperch setup codex         # .codex/skills/perch/SKILL.md\nperch setup pi            # .pi/skills/perch/SKILL.md\nperch setup cursor        # .cursor/rules/perch.mdc\n```\n\nExtend perch with custom rules, in `perch.yaml`:\n\n```\n- name: env-read-once\n  where: \"src/**/*.js\"\n  each: method\n  min: 70\n  ensure: >\n    This method takes its configuration as arguments. Reading process.env is the\n    command line's job.\n```\n\n| [Getting started](https://docs.perchscan.com/install/) | Install, the key, the first scan. | \n| [Reading issues](https://docs.perchscan.com/issues/) | The list, the filters, closing what does not matter. | \n| [Semantic linting](https://docs.perchscan.com/rules/) | `where` ,`each` ,`sees` ,`min` ,`gate` , and the longhand grammar. | \n| [Checking a change](https://docs.perchscan.com/check/) | `perch check` on work in progress. | \n| [perch in CI](https://docs.perchscan.com/ci/) | What a build can gate on, and what it cannot. | \n| [Command reference](https://docs.perchscan.com/cli/) | Every command, its flags, and what each exit code means. | \n| [Inside a scan](https://docs.perchscan.com/scan/) | The graph walk, the questions, and how probabilities turn into a ranking. | \n\n| Location | Contents | \n|---|---|\n| `.perch/` | Generated scan results and cache files, alongside the committed files below. Use `--out <directory>` to choose another results location. | \n| `.perch/rules/` | Custom rules split across `.yaml` and`.yml` files. Commit these files. | \n| `.perch/closed.jsonl` | Dismissed findings and their reasons. Commit this file. | \n| `perch.yaml` | Custom rules. Updated by `perch rules add` ,`edit` , and`remove` . | \n| `.claude/` ,`.codex/` ,`.pi/` ,`.cursor/` | Instructions installed for the selected assistant by `perch setup <assistant>` . | \n\n```\nnpm run check     # lint, typecheck, test\nnpm run build     # bundle src/cli.js into dist/cli.mjs\n```\n\nFrom a checkout: `npm install && npm run build && npm link` puts `perch` on the\npath.", "url": "https://wpnews.pro/news/perch-semantic-code-linting-with-jev", "canonical_source": "https://github.com/lakeday-org/perch", "published_at": "2026-09-25 04:29:44+00:00", "updated_at": "2026-09-25 05:00:04.965375+00:00", "lang": "en", "topics": ["developer-tools", "ai-tools", "ai-agents"], "entities": ["TypeSafe", "Perch", "Jev", "Claude Code", "Codex", "Cursor", "Pi", "@lakeday/perch"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/perch-semantic-code-linting-with-jev", "markdown": "https://wpnews.pro/news/perch-semantic-code-linting-with-jev.md", "text": "https://wpnews.pro/news/perch-semantic-code-linting-with-jev.txt", "jsonld": "https://wpnews.pro/news/perch-semantic-code-linting-with-jev.jsonld"}}