Skip to content

[Feature]: Allow code mode to skip managing root AGENTS.md and CLAUDE.md files #556

Description

@upu

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions