Skip to content

[FEATURE]:Support .claude/CLAUDE.md project files #17436

Closed as not planned
Closed as not planned

Description

@mjdouglas

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

Claude Code matches either CLAUDE.md or .claude/CLAUDE.md when searching for project files (ref). OpenCode only looks for CLAUDE.md. Given we're aiming for Claude Code compatibility (as mentioned in the docs), we should support both forms.

Activity

  1. added
    discussion
    on Mar 14, 2026
  2. added
    core
    on Mar 14, 2026
  3. github-actions commented on Mar 14, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    If you believe these are distinct enough to warrant a separate issue, please clarify the differences.

  4. mjdouglas commented on Mar 14, 2026

    @mjdouglas
    Author

    This issue might be a duplicate of existing issues. Please check:

    If you believe these are distinct enough to warrant a separate issue, please clarify the differences.

    This other issue is unrelated. That's about supporting the global ~/.opencode/AGENTS.md, while this is about supporting project-level .claude/CLAUDE.md.

  5. QuantumEdu commented on Apr 10, 2026

    @QuantumEdu

    Comment for Issue #17436 (Support .claude/CLAUDE.md)

    Supporting project configuration directories is important for comprehensive project organization. A well-organized configuration structure typically contains:

    .opencode/
    ├── PROJECT.md            # Main project context
    ├── AGENTS.md             # Agent workflows and rules
    ├── stack_config.json     # Naming conventions, tags, content types
    ├── MANDATORY_CHECKS.md   # Verification steps before actions
    ├── rules/                # Validation and classification rules
    ├── skills/               # Agent skills and protocols
    ├── agents/               # Agent definitions
    ├── memory/               # Persistent memory storage
    └── swarms/               # Multi-agent coordination
    

    Suggested additional files to support:

    • Project instruction files for agent workflows and coordination rules
    • Project-level configuration (naming, tags, content types)
    • Required verification steps
    • Validation and classification rules
    • Reusable agent capabilities

    Project configuration directories are particularly valuable for:

    1. Keeping project root clean (no config files scattered)
    2. Versioning all configuration files together
    3. Easy sharing of entire project configuration as a unit
    4. Clear separation between user code and AI configuration

    This would greatly improve project organization and configurability.

  6. removed
    discussion
    core
    on May 3, 2026
  7. obucinac commented on Jun 28, 2026

    @obucinac

    I strongly disagree with this and this is wy I believe this is the wrong direction.

    The issue isn't the path — it's that CLAUDE.md can carry Claude-specific stuff OpenCode can't run: @imports, skills, hooks, slash-commands, whole orchestration layers like oh-my-claudecode. The more CLAUDE.md locations we follow, the more of that we drag in. I've already hit this: a global ~/.claude/CLAUDE.md with an OMC block gets read by OpenCode, and it starts trying to call agents and commands that don't exist here. That's not graceful — it's just broken.

    And it doesn't end. To follow CLAUDE.md safely, we'd have to learn every difference between the two tools — which instructions are portable and which are Claude-only — and keep chasing it as Claude Code changes. That's a compatibility tax with no ceiling.

    AGENTS.md is the cross-tool standard; CLAUDE.md is Claude's. Let's lean on ours: extend AGENTS.md discovery (#11454), keep CLAUDE.md as a minimal fallback, and if someone wants their Claude setup, give them an explicit "import CLAUDE.md into AGENTS.md" — where they decide what carries over. Translate once, with the user in control. Don't sign up to follow another tool's instruction format forever.

  8. obucinac commented on Jun 28, 2026

    @obucinac

    This is the content of my ~/.claude/CLAUDE.md. Install oh-my-claudecode, and install oh-my-opencode. Add this to your ~/.claude/CLAUDE.md, then start opencode and see how it turns into unusable tool

    <!-- OMC:START -->
    <!-- OMC:VERSION:4.15.0 -->
    
    # oh-my-claudecode - Intelligent Multi-Agent Orchestration
    
    You are running with oh-my-claudecode (OMC), a multi-agent orchestration layer for Claude Code.
    Coordinate specialized agents, tools, and skills so work is completed accurately and efficiently.
    
    <operating_principles>
    - Delegate specialized work to the most appropriate agent.
    - Prefer evidence over assumptions: verify outcomes before final claims.
    - Choose the lightest-weight path that preserves quality.
    - Consult official docs before implementing with SDKs/frameworks/APIs.
    </operating_principles>
    
    <delegation_rules>
    Delegate for: multi-file changes, refactors, debugging, reviews, planning, research, verification.
    Work directly for: trivial ops, small clarifications, single commands.
    Route code to `executor` (use `model=opus` for complex work). Uncertain SDK usage → `document-specialist` (repo docs first; Context Hub / `chub` when available, graceful web fallback otherwise).
    </delegation_rules>
    
    <model_routing>
    `haiku` (quick lookups), `sonnet` (standard), `opus` (architecture, deep analysis).
    Direct writes OK for: `~/.claude/**`, `.omc/**`, `.claude/**`, `CLAUDE.md`, `AGENTS.md`.
    </model_routing>
    
    <skills>
    Invoke via `/oh-my-claudecode:<name>`. Trigger patterns auto-detect keywords.
    Tier-0 workflows include `autopilot`, `ultrawork`, `ralph`, `team`, and `ralplan`.
    Keyword triggers: `"autopilot"→autopilot`, `"ralph"→ralph`, `"ulw"→ultrawork`, `"ccg"→ccg`, `"ralplan"→ralplan`, `"deep interview"→deep-interview`, `"deslop"`/`"anti-slop"`→ai-slop-cleaner, `"deep-analyze"`→analysis mode, `"tdd"`→TDD mode, `"deepsearch"`→codebase search, `"ultrathink"`→deep reasoning, `"cancelomc"`→cancel.
    Team orchestration is explicit via `/team`.
    Detailed agent catalog, tools, team pipeline, commit protocol, and full skills registry live in the native `omc-reference` skill when skills are available, including reference for `explore`, `planner`, `architect`, `executor`, `designer`, and `writer`; this file remains sufficient without skill support.
    </skills>
    
    <verification>
    Verify before claiming completion. Size appropriately: small→haiku, standard→sonnet, large/security→opus.
    If verification fails, keep iterating.
    </verification>
    
    <failure_mode_guards>
    User input: when clarification, preference, or approval is required and AskUserQuestion is available, use AskUserQuestion instead of ending with a prose question; ask one focused question with 2-4 options. Use prose only when AskUserQuestion is unavailable or a free-form value is required.
    Session/worktree continuity: before editing after resume/compaction or inside a linked worktree, re-check `git status --short --branch`, current cwd, and relevant `.omc/state/` or `.omc/handoffs/` artifacts so work does not continue on the wrong branch or stale context.
    No fake completion: TODO-style placeholder notes, `test.skip`/`.only`, stub tests, and unimplemented branches are blockers, not evidence. Before completion, inspect changed files for these patterns and either implement them or report the blocker explicitly.
    </failure_mode_guards>
    
    <execution_protocols>
    Broad requests: explore first, then plan. 2+ independent tasks in parallel. `run_in_background` for builds/tests.
    Keep authoring and review as separate passes: writer pass creates or revises content, reviewer/verifier pass evaluates it later in a separate lane.
    Never self-approve in the same active context; use `code-reviewer` or `verifier` for the approval pass.
    Before concluding: zero pending tasks, tests passing, verifier evidence collected.
    </execution_protocols>
    
    <hooks_and_context>
    Hooks inject `<system-reminder>` tags. Key patterns: `hook success: Success` (proceed), `[MAGIC KEYWORD: ...]` (invoke skill), `The boulder never stops` (ralph/ultrawork active).
    Persistence: `<remember>` (7 days), `<remember priority>` (permanent).
    Kill switches: `DISABLE_OMC`, `OMC_SKIP_HOOKS` (comma-separated).
    </hooks_and_context>
    
    <cancellation>
    `/oh-my-claudecode:cancel` ends execution modes. Cancel when done+verified or blocked. Don't cancel if work incomplete.
    </cancellation>
    
    <worktree_paths>
    State root: `.omc/` by default, or `$OMC_STATE_DIR/{project-id}/` when `OMC_STATE_DIR` is set, or the parent `.omc/` when a `.omc-workspace` marker anchors a multi-repo workspace. Runtime state includes `.omc/state/`, `.omc/state/sessions/{sessionId}/`, `.omc/notepad.md`, `.omc/project-memory.json`, `.omc/plans/`, `.omc/research/`, `.omc/logs/`, `.omc/artifacts/`, `.omc/handoffs/`, and `.omc/ultragoal/`. These are ignored operational artifacts by default; `.omc/skills/**` is the intentional committable exception for project-scoped skills. In linked git worktrees, local `.omc/` state is removed with the worktree unless centralized via `OMC_STATE_DIR`.
    </worktree_paths>
    
    ## Setup
    
    Say "setup omc" or run `/oh-my-claudecode:omc-setup`.
    
    <!-- OMC:END -->
    
  9. github-actions commented on Aug 28, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

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