~/.codex/AGENTS.md にそのまま入れて使えます。
自分の環境に合わせて必要な部分だけ調整してください。
※これはCodexの行動を省燃費化するためのルールです。Luna→Solを自動切り替えする設定ではありません。
【ここから下をコピペ】
# Codex Fuel-Saving Rules
Optimize for correctness while minimizing unnecessary:
- context
- reasoning
- tool calls
- agent delegation
- verification
Do not do extra work unless it is necessary to complete the request correctly.
## 1. Start small
For simple, local, deterministic tasks:
- work directly
- do not call Jev
- inspect only the relevant files
- make the smallest necessary change
- verify only what is relevant
Examples:
- typo / text changes
- CSS adjustments
- simple config edits
- obvious lint/type fixes
- localized one-function changes
## 2. Inspect narrowly
Start with the smallest useful scope:
1. user-specified files
2. git status / git diff
3. relevant symbols or targeted search
4. direct dependencies
5. nearby tests
Do not scan or read the whole repository by default.
Prefer targeted search and specific file ranges.
Expand the scope only when current evidence is insufficient.
Stop exploring once there is enough information to implement safely.
## 3. Use Jev only for real decisions
Use Jev only when meaningful uncertainty remains, such as:
- unclear task complexity
- multiple plausible implementation approaches
- repeated failed attempts
- architectural uncertainty
- conflicting evidence
- deciding whether escalation is justified
Do not use Jev:
- for obvious small tasks
- after every tool call
- for routine implementation
- when tests, compiler, lint, types, build, or diff can answer the question
Prefer zero Jev calls for simple tasks.
For normal tasks, avoid calling Jev unless a real decision boundary exists.
## 4. Implement minimally
- make the smallest change that satisfies the request
- avoid unrelated cleanup
- avoid speculative refactors
- preserve existing patterns when practical
- avoid new dependencies unless necessary
- do not modify unrelated files
Do not perform "while I'm here" improvements unless they are required for correctness.
## 5. Use tools efficiently
Every tool call should answer a concrete question.
Before calling a tool, consider:
"Will this result change my next action?"
- batch compatible inspections when possible
- do not reread unchanged files
- do not repeat the same failed command without changing something
- stop investigating once sufficient evidence exists
## 6. Verify proportionally
Prefer deterministic verification over AI judgment.
LOW RISK:
- inspect diff
- run one relevant check if useful
MEDIUM RISK:
- inspect diff
- targeted tests
- relevant type/lint/build checks
HIGH RISK:
- inspect diff
- targeted and broader relevant verification
- stronger review when appropriate
Do not run the full test suite by default when a targeted check is sufficient.
Never claim a check was performed unless it was actually performed.
## 7. Retry before escalating
Do not escalate after one ordinary failure.
After a failure:
1. inspect the concrete error
2. identify the likely cause
3. make a relevant change
4. retry with the current model
Consider stronger-model escalation only when:
- failures repeat
- root cause remains unclear
- architectural uncertainty remains
- risk is higher than expected
- the current model is clearly insufficient
If a stronger Sol agent/model is configured, use it only when justified.
Otherwise, recommend stronger-model escalation instead of pretending it happened.
Do not escalate merely because a stronger model exists.
## 8. High-risk changes
Use stronger verification for:
- authentication / authorization
- security
- payments
- migrations
- destructive database operations
- data deletion
- secrets
- cryptography
- concurrency
- production infrastructure
- major architecture changes
## 9. Stop when done
Complete the task when:
- requested behavior is implemented
- relevant verification passes when applicable
- the diff matches the requested scope
- no known blocking issue remains
Do not continue polishing, refactoring, or improving code after the requested task is complete.
Keep the final response concise:
- what changed
- what was verified
- any remaining limitation