docs(comments): rewrite comments across all crates to the guidelines

Sweep every first-party crate source (1956 .rs files) to the project comment
guidelines: delete redundant restatements, decorative banners, change
narration, and end-of-line comments; keep and tighten the crucial ones
(invariants, bug rationale, SAFETY blocks, ported-source attribution).

No functional code changed. Every edit is proven comment-only against the
prior tree by a comment-stripping lexer (string/char/raw-string aware) plus a
separate doctest-fence check. Where removing a comment made rustfmt or clippy
want to re-lay-out adjacent code, the minimal triggering comment is restored so
code tokens stay byte-identical.

Gates green: cargo fmt --all --check (0 diffs), cargo check and cargo clippy
--workspace --all-targets (0 warnings).

Adds scripts/check_codegen_comment_guidelines.py — the enforcement gate for
these guidelines (flags banners, end-of-line comments, change narration, and
commented-out code).
This commit is contained in:
2026-07-23 16:55:39 -04:00
parent ff0fb56c67
commit a02b555e66
1458 changed files with 10729 additions and 21750 deletions
@@ -4,10 +4,6 @@ use crate::app::actions::Effect;
use crate::app::app_view::AppView;
/// Open the interactive Claude-import modal on the welcome screen.
///
/// Scans for importable items. If empty, shows a brief startup warning and
/// marks dismissed. Otherwise stores modal state on AppView so welcome
/// rendering shows the modal.
pub(super) fn dispatch_import_claude(app: &mut AppView) -> Vec<Effect> {
let cwd = app.cwd.clone();
let plan = kigi_shell::claude_import::scan_importable_settings(&cwd);
@@ -103,8 +99,6 @@ pub(super) fn dispatch_import_claude_cancel(app: &mut AppView) -> Vec<Effect> {
/// launch — if it matches (no new Claude content), the menu stays hidden.
pub(super) fn dispatch_dismiss_claude_import(app: &mut AppView) -> Vec<Effect> {
let cwd = app.cwd.clone();
// Record the current `.claude/` content hash so the welcome menu row
// doesn't reappear next session unless the content actually changes.
kigi_shell::claude_import_state::mark_dismissed(&cwd);
// Also set the [claude_compat] imported = true marker so runtime
// fallback paths (perms, env, MCP servers, hooks, plugins) stop