Skip to content

feat: move CLAUDE.md into .claude/ (#34)#35

Merged
kevinkod merged 1 commit intomainfrom
feat/move-claude-md-into-claude-dir
May 2, 2026
Merged

feat: move CLAUDE.md into .claude/ (#34)#35
kevinkod merged 1 commit intomainfrom
feat/move-claude-md-into-claude-dir

Conversation

@kevinkod
Copy link
Copy Markdown
Contributor

@kevinkod kevinkod commented May 2, 2026

Summary

  • The Claude harness used to write CLAUDE.md at the project root and .claude/{commands,agents,skills} next to it, which left two top-level files (AGENTS.md + CLAUDE.md) where the second one is essentially a 7-line redirect.
  • Claude Code natively auto-discovers .claude/CLAUDE.md, so we move the redirect under .claude/. The root keeps only AGENTS.md — the cross-harness "constitution" file.
  • One-line manifest change + bundle regeneration. No application code touched.

Migration

Handled implicitly by the existing upgrade-plan logic in src/domain/upgrade_plan.ts:

  • Old root CLAUDE.md becomes an orphan lock entry → auto-removed if untouched, preserved if user-customized (standard managed-files contract).
  • New .claude/CLAUDE.md is added as add-new.

Refs

Project-level: CLAUDE.md or .claude/CLAUDE.md in your working directory
https://code.claude.com/docs/en/agent-sdk/modifying-system-prompts

Test plan

  • Unit + integration tests updated and green (deno task test — 333 passed).
  • E2E sandbox: bootstrap Vite project + specflow init --here --ai claude from working tree → .claude/CLAUDE.md present, root CLAUDE.md absent, AGENTS.md intact, content unchanged.
  • CI green on macOS / Ubuntu / Windows cross-smoke.

Closes #34

🤖 Generated with Claude Code

Claude Code natively auto-discovers .claude/CLAUDE.md, so we drop the
root-level pointer file and ship it under .claude/CLAUDE.md instead.
The harness Claude template now writes a single root-level file,
AGENTS.md (the cross-harness "constitution"), and keeps every other
Claude-specific asset under .claude/. The .claude/CLAUDE.md content is
unchanged — it still redirects readers to AGENTS.md.

Migration is handled implicitly by the existing upgrade plan logic: the
new bundle's destination is .claude/CLAUDE.md, so the old root CLAUDE.md
becomes an orphan lock entry — auto-removed on upgrade if untouched,
preserved if user-customized (the standard contract for managed files).

Implementation is a single line change in templates/manifest.json plus a
bundle regeneration; no application code changed.

Refs: https://code.claude.com/docs/en/agent-sdk/modifying-system-prompts
> Project-level: CLAUDE.md or .claude/CLAUDE.md in your working directory

Closes #34

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@kevinkod kevinkod merged commit 85088f1 into main May 2, 2026
4 checks passed
@kevinkod kevinkod deleted the feat/move-claude-md-into-claude-dir branch May 2, 2026 01:08
kevinkod added a commit that referenced this pull request May 2, 2026
Aligns the Specflow repo with the convention #34 / PR #35 just shipped
to the Claude harness templates: the project pointer/working-contract
file lives under .claude/ instead of at the project root, where Claude
Code natively auto-discovers it.

Pure rename — content is unchanged. Working contract directives are
unaffected.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.

Move CLAUDE.md from project root to .claude/CLAUDE.md in Claude harness

1 participant