Skip to content

refactor(core): Compact Director and Character comments - #807

Merged
omesser merged 1 commit into
mainfrom
cursor/compact-core-director-character-7444
Sep 17, 2026
Merged

omesser merged 1 commit into
mainfrom
cursor/compact-core-director-character-7444

Conversation

@omesser

@omesser omesser commented Sep 17, 2026

Copy link
Copy Markdown
Owner

Why

Slice 2 of #747 (part 3 of #744). director.rs and character.rs still carried restatement, issue-history narration, and blocks over the 3-line ceiling. A later reader should get the why without the audit log.

#745 lands last because it quotes this source. This PR compacts to the bar in #744.

What changed

Comment-only. Two files. Public one-line summaries stay. Restatement and history go. Issue numbers drop where the fact stands without them.

File Code Comments before after >3ln before after Ratio before after
director.rs 1788 418 270 36 1 23.4% 15.1%
character.rs 1014 413 310 33 2 40.7% 30.6%
Total 2802 831 580 69 3 29.7% 20.7%

Three blocks stay over the ceiling, each a named #744 exception.

  • director.rs module doc (16 lines). //! orientation. Untouched.
  • character.rs module doc (64 lines). //! orientation, including the ```text TOML exemplar and its tag. Untouched.
  • character.rs Trigger (12 lines). The ponytail: marker (no time-of-day condition) left whole.

Out of scope.

docs/agents/comments.md still quotes the old five-line PERSONALITY_LIMIT block. That requote is #745.

How to verify

No code line changes. Over git diff -U0 origin/main -- crates/core/src/director.rs crates/core/src/character.rs, every added or removed line is a comment or blank. Local count of non-comment changed lines was 0.

Tests, same names.

  • cargo test -p ai-buddy-core. 510 passed (487 lib + 23 character_packages). Pass list sorted against the pre-edit list. Identical.
  • node --test tests/chat-composer-limit.test.js tests/comment-census.test.js. 10 passed. CHAT_LIMIT first-match is still the real const.
  • python3 scripts/make-character-gallery.py --self-check. 9 Required Animations, defaults fps=8 scale=4 weight=10.
  • cargo clippy --workspace --all-targets -- -D warnings. Green.
  • pre-commit run --files crates/core/src/director.rs crates/core/src/character.rs. Green, including the new-block ceiling hook.

Notes

Please add the windows label so the Windows job runs tests, not lint-only.

Part of #747. Does not close it. Slice 1 (engine.rs) and the #689 follow-up remain.

— Cursor agent (Coder), on @omesser's behalf.

Open in Web Open in Cursor 

Part of #747 slice 2. Comment-only.

Co-authored-by: Oded Messer <odedmesser@gmail.com>
@omesser omesser added the windows Run the Windows compile job on this pull request label Sep 17, 2026 — with Cursor
@cursor

cursor Bot commented Sep 17, 2026

Copy link
Copy Markdown

Ready for @omesser.

CI is green (ubuntu, macos, windows). GitHub reports MERGEABLE / CLEAN, the branch contains main, and there are no review threads. Not merging.

— Cursor agent (Coder), on @omesser's behalf.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

windows Run the Windows compile job on this pull request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants