Skip to content

Next phase: plugin API (loader, versioning, types entry, example) + CLI quick wins#166

Merged
ColumbusLabs merged 7 commits into
mainfrom
claude/github-issues-planning-9l56ha
Jun 10, 2026
Merged

Next phase: plugin API (loader, versioning, types entry, example) + CLI quick wins#166
ColumbusLabs merged 7 commits into
mainfrom
claude/github-issues-planning-9l56ha

Conversation

@ColumbusLabs

Copy link
Copy Markdown
Owner

Summary

Implements the next-phase plan (docs/next-phase-plan.md): the v0.4 plugin API vertical from docs/plugin-api-rfc.md plus three CLI/config quick wins, landed as five sequential commits matching the plan's PR breakdown.

Closes #68, closes #69, closes #70, closes #71, closes #72, closes #106, closes #145, closes #151.

Track B — CLI/config quick wins

Track A — Plugin API (RFC → shipped)

The plugin RFC status is updated to Shipped (v1) with follow-ons #73/#74 noted, and CHANGELOG has an Unreleased section covering all eight issues.

Test plan

  • npm test: 202/202 passing (baseline before this branch: 160).
  • npm run typecheck and npm run typecheck:tests: clean.
  • npm run build: emits dist/plugin.js / dist/plugin.d.ts; schema regenerated via npm run schema:generate (guarded by the drift test).
  • Smoke-tested debtlens scan . --cwd examples/plugin --rules no-console: reports the plugin finding at src/app.ts:2.
  • Note: 10 git-related tests fail in the development container due to forced commit signing breaking git commit in temp repos (pre-existing environment issue, verified at baseline); all suites pass with signing disabled via GIT_CONFIG_* env vars.

https://claude.ai/code/session_01GpFF5BDtey4sdyPkh7eD7v


Generated by Claude Code

claude added 7 commits June 10, 2026 10:27
Selects eight open issues for the next development phase across two
tracks: the v0.4 plugin API vertical (#68, #69, #70, #71, #72) and
small CLI/config quick wins (#106, #145, #151), with sequencing,
file-level touchpoints, PR breakdown, and validation strategy.

https://claude.ai/code/session_01GpFF5BDtey4sdyPkh7eD7v
Adds a Levenshtein-based suggestClosest helper applied to unknown rule
ids in --rules / config rules, inline suppression directives, and the
new explain command, which prints rule metadata, default thresholds,
and the matching docs/rules.md section.

Closes #145, closes #151.

https://claude.ai/code/session_01GpFF5BDtey4sdyPkh7eD7v
The config failOn field sets the CI exit-code severity policy alongside
failOnConfidence; the --fail-on CLI flag takes precedence. Schema
regenerated and covered by drift and CLI exit-code tests.

Closes #106.

https://claude.ai/code/session_01GpFF5BDtey4sdyPkh7eD7v
Adds the plugin API version constant (v1), config schema entries for
pluginApiVersion and plugins, and fail-fast validation at config load:
plugins require a pluginApiVersion, and mismatched versions throw with
an upgrade message. The rules schema now also accepts plugin rule ids
as plain strings per the plugin RFC.

Closes #69.

https://claude.ai/code/session_01GpFF5BDtey4sdyPkh7eD7v
Implements the plugin API RFC loading model: config plugins[] paths
resolve relative to the config directory (traversal outside it is
rejected), modules are imported as ESM, and exported detectors are
validated against the Detector contract with fail-fast rule id
collision errors. Plugin detectors merge into the scan registry, work
with --rules selection, did-you-mean suggestions, and inline
suppressions. DEBTLENS_DISABLE_PLUGINS=1 skips loading with a single
stderr note for untrusted CI. RFC marked shipped; SECURITY.md updated.

Closes #68, closes #71.

https://claude.ai/code/session_01GpFF5BDtey4sdyPkh7eD7v
Adds examples/plugin/ with a runnable no-console rule, sample config,
and CI integration tests, plus a published debtlens/plugin subpath
export (dist/plugin.js + dist/plugin.d.ts) exposing Detector,
DetectorContext, DebtIssue, Severity, and the plugin API version for
plugin authors. README and plugin RFC document both.

Closes #70, closes #72.

https://claude.ai/code/session_01GpFF5BDtey4sdyPkh7eD7v
@ColumbusLabs ColumbusLabs merged commit c2589cd into main Jun 10, 2026
2 checks passed
@ColumbusLabs ColumbusLabs deleted the claude/github-issues-planning-9l56ha branch June 10, 2026 18:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment