Repository navigation
chore: share strict agent output rules - #34
Merged
Merged
Conversation
Keep Claude's Strict style in one reusable template so other agents can consume the same rules without duplicating them.
Load the shared style as global OpenCode guidance and reinforce its response contract before every agent model request.
Load the shared style in Codex and merge a per-prompt reminder hook without replacing unrelated user hook configuration.
Inject the existing commit and push consent reminder into OpenCode and Codex while preserving unrelated Codex hook configuration.
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
Agent runtimes need consistent response formatting and repeated reminders for rules that can lose attention during long sessions.
This change centralizes the Strict output style and loads it into Claude, OpenCode, and Codex.
Per-turn hooks reinforce both the response format and Git commit and push consent rules.
Codex hook registration preserves unrelated user configuration.
Key Decisions
🧩 Shared Output Style
Moved the Strict response rules into one chezmoi template. Claude keeps its output-style wrapper, while OpenCode and Codex include the same body in their global instructions.
🔁 Per-Turn Reinforcement
Added native runtime hooks for OpenCode and Codex so the Strict format and Git consent rules are reintroduced on each user turn, matching the existing Claude behavior.
🛡️ Non-Destructive Codex Registration
Codex owns and updates its hooks file, so a
run_afterscript merges only the managed command hooks. The merge is atomic and idempotent, preserves unrelated configuration, and rejects unsupported structures instead of overwriting them.🔄 Before & After