Summary
Add an opt-out for code mode's automatic creation and modification of the repository-root AGENTS.md and CLAUDE.md files.
Motivation
openwiki code currently manages both root agent-instruction files on every init, update, and chat run. This is useful as a default, but some repositories already have an intentional instruction layout and only want OpenWiki to maintain openwiki/**.
For example, one repository uses:
/AGENTS.md # shared source of truth for coding-agent guidance
/.claude/CLAUDE.md # contains only: @../AGENTS.md
There is intentionally no /CLAUDE.md. Running openwiki code --update creates that unwanted root file and also appends or refreshes a managed block in the existing /AGENTS.md.
This is distinct from opting out of workflow scaffolding. A repository may want to update its OpenWiki manually or through its own CI while preserving its existing agent-instruction files byte-for-byte.
Proposed Solution
Provide a persistent code-mode setting, with an optional per-run CLI override, that disables root agent-file management. For example:
codeMode:
manageAgentFiles: false
and/or:
openwiki code --update --no-agent-files
When disabled:
/AGENTS.md and /CLAUDE.md are not created.
- Existing
/AGENTS.md and /CLAUDE.md files are not modified.
- Generation and updates under
openwiki/** continue normally.
- Workflow scaffolding remains an independent setting.
- The current behavior remains the default for backward compatibility.
The persistent setting is important because cleanup after every scheduled or agent-driven update is fragile.
Alternatives Considered
- Run OpenWiki in a temporary worktree and copy only
openwiki/** back. This works, but adds unnecessary orchestration to every update.
- Restore or delete the generated root files after each run. This creates noisy intermediate changes and is easy to forget.
- Use
openwiki/INSTRUCTIONS.md or .openwikiignore. These control documentation guidance or indexed inputs, not the deterministic code-mode repository setup.
Additional Context
Summary
Add an opt-out for code mode's automatic creation and modification of the repository-root
AGENTS.mdandCLAUDE.mdfiles.Motivation
openwiki codecurrently manages both root agent-instruction files on every init, update, and chat run. This is useful as a default, but some repositories already have an intentional instruction layout and only want OpenWiki to maintainopenwiki/**.For example, one repository uses:
There is intentionally no
/CLAUDE.md. Runningopenwiki code --updatecreates that unwanted root file and also appends or refreshes a managed block in the existing/AGENTS.md.This is distinct from opting out of workflow scaffolding. A repository may want to update its OpenWiki manually or through its own CI while preserving its existing agent-instruction files byte-for-byte.
Proposed Solution
Provide a persistent code-mode setting, with an optional per-run CLI override, that disables root agent-file management. For example:
and/or:
When disabled:
/AGENTS.mdand/CLAUDE.mdare not created./AGENTS.mdand/CLAUDE.mdfiles are not modified.openwiki/**continue normally.The persistent setting is important because cleanup after every scheduled or agent-driven update is fragile.
Alternatives Considered
openwiki/**back. This works, but adds unnecessary orchestration to every update.openwiki/INSTRUCTIONS.mdor.openwikiignore. These control documentation guidance or indexed inputs, not the deterministic code-mode repository setup.Additional Context
## OpenWikisections when an unmarked legacy or hand-written section already exists. An opt-out also avoids this conflict for repositories that manage their own root instructions.CODE_MODE_AGENT_FILESis currently fixed toAGENTS.mdandCLAUDE.md, andwriteCodeModeAgentSnippets()runs regardless of thecreateWorkflowoption.