feat: inject Karpathy coding principles into agent prompts - #34
Merged
Conversation
- Add principles/karpathy.md with all 4 principles + 3 role variants - Add principles/karpathy-primary.md for primary agent (via config.instructions) - Parse and inject role-tailored principles via config.agent.prompt for subagents: - implementer/general: full 4 principles - reviewer: Think Before Judging + Simplicity + Goal-Driven - argus: Think Before Analyzing + Simplicity + Goal-Driven - explore: skipped - Primary agent gets full 4 principles via config.instructions Closes #33
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
将 Andrej Karpathy 四条编码原则内建到 toolbox 插件中,CLAUDE.md 已剥离,原则随插件自动注入。
How it works
两层注入
config.instructionsprinciples/karpathy-primary.mdconfig.agent.*.promptprependprinciples/karpathy.md(解析)Agent 裁剪映射
验证结果
文件变更
principles/karpathy.md— 四原则全文 + 三变体principles/karpathy-primary.md— 四原则(仅 primary)src/index.ts— 解析 + 注入逻辑src/index.test.ts— 5 个 agent × 6 项测试package.json— files 数组补充Closes #33