Skip to content

chore: share strict agent output rules - #34

Merged
MrPointer merged 4 commits into
mainfrom
chore/opencode-output-style
Oct 3, 2026
Merged

MrPointer merged 4 commits into
mainfrom
chore/opencode-output-style

Conversation

@MrPointer

Copy link
Copy Markdown
Owner

📝 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_after script 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

Area Before After
Strict style Claude-only content Shared across all three runtimes
Long-session reminders Claude only Claude, OpenCode, and Codex
Git consent reminder Claude only Claude, OpenCode, and Codex
Codex hooks No managed reminders Owned hooks merged without replacing others

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.
@MrPointer
MrPointer merged commit 366461e into main Oct 3, 2026
5 checks passed
@MrPointer
MrPointer deleted the chore/opencode-output-style branch October 3, 2026 22:50
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