Skip to content

chore: add shared karpathy cursor rules - #2

Merged
dizhaky merged 1 commit into
mainfrom
chore/cursor-rules-20260528
May 28, 2026
Merged

chore: add shared karpathy cursor rules#2
dizhaky merged 1 commit into
mainfrom
chore/cursor-rules-20260528

Conversation

@dizhaky

@dizhaky dizhaky commented May 28, 2026

Copy link
Copy Markdown
Owner

Sync local .cursor/rules from dotfiles maintenance.

Made with Cursor

Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions

Copy link
Copy Markdown

🔎 Lint report: chore/cursor-rules-20260528 vs origin/main

ruff

Total: 0 on HEAD, 0 on base (➖ 0)

🆕 New issues: none

✅ Fixed issues: none

Unchanged: 0 pre-existing issues carried over.

ty (type checker)

Total: 9057 on HEAD, 9057 on base (➖ 0)

🆕 New issues: none

✅ Fixed issues: none

Unchanged: 4817 pre-existing issues carried over.

Diagnostics are surfaced as warnings — this check never fails the build.

@dizhaky
dizhaky merged commit d76d730 into main May 28, 2026
13 checks passed
@dizhaky
dizhaky deleted the chore/cursor-rules-20260528 branch May 28, 2026 17:25
dizhaky pushed a commit that referenced this pull request Jun 30, 2026
…_id signature churn

Two independent bugs evicted the cached gateway AIAgent on every turn,
preventing the prompt cache from ever warming:

1. Model normalization mismatch: the post-run fallback-eviction check
   compared _agent.model (stripped in AIAgent.__init__) against the raw
   _resolve_gateway_model() config string. For vendor-prefixed config on
   native providers (e.g. 'deepseek/deepseek-v4-pro' vs 'deepseek-v4-pro')
   this was always unequal, so the agent was evicted after every
   successful run. Normalize _cfg_model the same way (skip aggregators).

2. Discord triggering message_id leaked into the cached system prompt via
   build_session_context_prompt()'s Discord IDs block. message_id changes
   every turn, so the agent-cache signature (computed from the ephemeral
   prompt) changed every Discord turn -> rebuild every message. The id is
   now injected per-turn into the user message (where per-turn content
   belongs and does not touch the cache signature); the cached IDs block
   carries a static pointer to it, preserving reply/react/pin via the
   discord tools.

Adapted from NousResearch#28846. Bug #1 fix is the contributor's; bug #2 reworked to
be non-destructive (keeps the triggering-id capability instead of deleting
it). Redundant auto-reset eviction (already on main via NousResearch#9893/NousResearch#48031) and
the wrong-premise reset_context_note plumbing from the original PR were
dropped.

Co-authored-by: Hermes Agent <hermes@nousresearch.com>
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