Skip to content

Add CLAUDE.md as minimal pointer to AGENTS.md#98

Merged
dgenio merged 4 commits intomainfrom
copilot/add-claude-md-pointer
Mar 19, 2026
Merged

Add CLAUDE.md as minimal pointer to AGENTS.md#98
dgenio merged 4 commits intomainfrom
copilot/add-claude-md-pointer

Conversation

Copy link
Contributor

Copilot AI commented Mar 19, 2026

Claude Code reads CLAUDE.md at the repo root as its primary project context file. Without one, Claude-based agents get no project-specific guidance. Duplicating AGENTS.md content would create drift risk.

Changes

  • CLAUDE.md (new, repo root, 14 lines): minimal entry point that redirects to AGENTS.md and lists 5 quick invariants as a curated subset of the 12 in AGENTS.md § Core invariants

Corrections from proposed content

  • Section reference fixed: § Top invariants§ Core invariants (matches actual heading in AGENTS.md)
  • Added mypy to the validation command list — AGENTS.md § 7 specifies 4 commands (ruff check, ruff format --check, mypy, pytest); the proposed content omitted it
Original prompt

This section details on the original issue you should resolve

<issue_title>Add CLAUDE.md as minimal pointer to AGENTS.md</issue_title>
<issue_description>## Why

Claude Code reads CLAUDE.md at the repo root as its primary project context file. Without one, Claude-based agents receive no project-specific guidance. However, we already have a comprehensive AGENTS.md (see #51) that covers everything — duplicating that content in CLAUDE.md would create drift risk.

Best practice: CLAUDE.md should be a minimal pointer to AGENTS.md, not a copy.

Scope / Proposed changes

Create a single file:

  • CLAUDE.md (repository root, ≤15 lines)

Proposed contents

# CLAUDE.md — ChainWeaver

This file is the entry point for Claude Code. All project context, architecture details, 
coding conventions, and guardrails are maintained in a single canonical source:

→ **Read [AGENTS.md](AGENTS.md) before making any changes.**

## Quick invariants (also in AGENTS.md § Top invariants)

1. No LLM calls in `executor.py` — deterministic by design.
2. All exceptions inherit from `ChainWeaverError`.
3. All public symbols exported in `__init__.py` `__all__`.
4. `from __future__ import annotations` at the top of every module.
5. All code must pass: `pytest`, `ruff check`, `ruff format --check`.

The quick invariants are the only content allowed to be duplicated from AGENTS.md. They are intentionally kept to ≤5 items (a curated subset of the full ≤10 in AGENTS.md) for fast context loading.

Labels to apply

  • documentation
  • priority:P2
  • ai-friendly
  • milestone:v0.1.0

Depends on

Acceptance criteria

  • CLAUDE.md exists at repository root
  • File is ≤15 lines
  • File contains a link to AGENTS.md
  • Invariants listed are a subset of those in AGENTS.md (no unique content)
  • No architecture map, decision context, or procedures duplicated from AGENTS.md

Avoid drift/duplication notes

  • CLAUDE.md is read-only in spirit — its content derives entirely from AGENTS.md.
  • When AGENTS.md invariants change, the subset in CLAUDE.md must be updated in the same PR.
  • If CLAUDE.md grows beyond 15 lines, it's a smell — context belongs in AGENTS.md.

References

Comments on the Issue (you are @copilot in this section)


🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

Co-authored-by: dgenio <12731907+dgenio@users.noreply.github.com>
Copilot AI changed the title [WIP] Add CLAUDE.md as minimal pointer to AGENTS.md Add CLAUDE.md as minimal pointer to AGENTS.md Mar 19, 2026
Copilot AI requested a review from dgenio March 19, 2026 06:15
@dgenio dgenio requested a review from Copilot March 19, 2026 06:33
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a minimal CLAUDE.md entrypoint so Claude Code picks up repository-specific guidance while keeping AGENTS.md as the canonical source of truth and avoiding duplicated documentation.

Changes:

  • Adds root CLAUDE.md that links to AGENTS.md as the primary project context.
  • Includes a short “Quick invariants” list intended to be a curated subset of AGENTS.md § Core invariants.

You can also share your feedback on Copilot code review. Take the survey.

@dgenio dgenio marked this pull request as ready for review March 19, 2026 14:46
@dgenio dgenio merged commit c604ce5 into main Mar 19, 2026
4 checks passed
@dgenio dgenio deleted the copilot/add-claude-md-pointer branch March 19, 2026 14:47
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.

Add CLAUDE.md as minimal pointer to AGENTS.md

3 participants