Skip to content

Cleanup pass for dead code and docs#25

Merged
jssblck merged 4 commits into
mainfrom
jssblck/remove-claude-run
May 29, 2026
Merged

Cleanup pass for dead code and docs#25
jssblck merged 4 commits into
mainfrom
jssblck/remove-claude-run

Conversation

@jssblck
Copy link
Copy Markdown
Contributor

@jssblck jssblck commented May 29, 2026

Why this change

  • Nudge had accumulated exploratory surfaces that were no longer part of the supported product path: the benchmark package, the nudge claude run command, and the old nudge::claude agent-runner module. Keeping them made the workspace, docs, tests, and dependency graph harder to understand.
  • This PR intentionally deletes those dead surfaces instead of preserving compatibility. Users or local scripts that still call nudge claude run, import nudge::claude, or depend on packages/benchmark will need to stop using those deleted paths.
  • With the dead code gone, the remaining Nudge package is focused on hook adapters, rule loading/evaluation, setup, validation, and nudge check.
  • The branch also cleans up the code that remains: rule schema matching is split into focused modules, the check command is decomposed into smaller scan and issue-building steps, and Claude/Codex setup now shares JSON hook merging logic.
  • Documentation and integration tests were updated to match the leaner structure and the current Claude/Codex hook behavior.

Testing steps performed

$ cargo fmt --all
Warning: can't set `wrap_comments = true`, unstable features are only available in nightly channel.
Warning: can't set `wrap_comments = true`, unstable features are only available in nightly channel.
Warning: can't set `wrap_comments = true`, unstable features are only available in nightly channel.
Warning: can't set `wrap_comments = true`, unstable features are only available in nightly channel.
$ cargo test -p nudge
test result: ok. 59 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.02s
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
test result: ok. 70 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.76s
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
$ cargo clippy -p nudge --all-targets --all-features -- -D warnings
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.63s

Surprising changes / Notes

  • This PR removes APIs and commands rather than leaving compatibility shims. That is deliberate cleanup, not an accidental omission.
  • No runtime configuration changes are required for supported Nudge hook usage after merge.

jssblck added 4 commits May 28, 2026 16:46
Delete the experimental Claude runner frontend so the Claude integration only exposes Nudge's primary hook, setup, and docs surfaces.

Remove the command wiring and the supporting process, stream, and terminal UI modules. This is intentionally breaking for anyone invoking nudge claude run; they should run Claude Code directly with Nudge installed as hooks instead.

Verification: cargo fmt --all; cargo test -p nudge -- --test-threads=1; cargo run --quiet -p nudge -- claude --help.
Stop invoking cargo build and cargo run from inside parallel integration tests. Cargo already builds package binaries for integration tests and exposes the executable path through CARGO_BIN_EXE_nudge, so the tests can launch that binary directly.

This removes contention on cargo package-cache and artifact-directory locks, avoids recursive cargo process fan-out, and keeps the default parallel test runner supported.

Verification: cargo fmt --all; cargo test -p nudge; five repeated default-parallel cargo test -p nudge runs all passed.
Delete the stale claude-run plan, the deprecated Claude-specific hook model, and the deprioritized synthetic benchmark package so the repo stays focused on Nudge's hook/setup/rule workflow.

Move the small Claude hook setup JSON structs into the claude setup command before deleting the old nudge::claude module. Narrow the workspace to packages/nudge and prune benchmark-only lockfile entries.

Verification: cargo fmt --all; cargo test -p nudge; cargo test --workspace.
Split the large rules schema implementation into focused matcher modules for content, syntax, paths, project state, and URLs while keeping the public schema facade intact.

Extract the check command into smaller scan and issue-building steps so the command entrypoint reads as the workflow instead of carrying all rule traversal logic inline.

Share JSON hook merging between Claude and Codex setup to remove duplicated object/array handling, and update local architecture docs for the new schema layout.

Verification: cargo fmt --all; cargo test -p nudge; cargo clippy -p nudge --all-targets --all-features -- -D warnings
@jssblck jssblck merged commit a50abed into main May 29, 2026
4 checks passed
@jssblck jssblck deleted the jssblck/remove-claude-run branch May 29, 2026 00:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant