Claude Code repeatedly ignores CLAUDE.md rules — manually generates artifacts instead of using configured skills

Resolved 💬 6 comments Opened Mar 12, 2026 by flexi1791 Closed May 1, 2026

Environment

  • Claude Code version: 2.1.72
  • Model: claude-opus-4-6
  • OS: macOS 26.3.1 (Darwin 25.3.0, ARM64)
  • Node: v21.6.2
  • Shell: /bin/zsh
  • Project: /Users/work/Documents/whatwasiwatching

Session IDs

  • Current session: 1ec53bf4-0914-4e83-91f9-5dcded247e51 (continued from prior context)
  • Previous sessions in same project: 21b308aa, 643e2c95, a1c1b320, d8104ebc, e2b09c2f, eb6bb206

CLAUDE.md rule being violated

- **Never manually generate spec-kit artifacts** — Always use `/speckit.*` slash commands
  for creating or updating specs, checklists, plans, and tasks. Never write these files
  directly with Write/Edit tools. The skills and their scripts handle all file creation.

This rule was added to CLAUDE.md and committed at 2026-03-11 18:06 PT (11ab416) specifically because Claude Code was already violating it. A matching memory file was also saved.

Timeline of repeated violations

| Time (PT) | What happened | Wasted effort |
|-----------|--------------|---------------|
| ~17:40 | Manually wrote checklist for spec 013 instead of using /speckit.checklist skill | User caught it, had to delete and redo |
| ~18:06 | Rule added to CLAUDE.md: "Never manually generate spec-kit artifacts" | — |
| ~18:07 | Finally used Skill tool for /speckit.checklist on spec 013 | First correct use |
| ~18:08–18:12 | Manually wrote checklists for specs 016, 017, 018 instead of using Skill tool | User caught it again — these were Write tool, not Skill tool |
| ~19:05 | Manually edited specs to fix implementation details | Acceptable (not a spec-kit artifact) |
| ~19:14 | Manually wrote plan.md, research.md, data-model.md, quickstart.md, contracts/navigation.md for spec 009 using Write tool instead of /speckit.plan skill | Committed and pushed to main |
| ~19:18 | Manually wrote plan.md, research.md, data-model.md, quickstart.md, contracts/service-repository.md for spec 003 using Write tool instead of /speckit.plan skill | Committed and pushed to main |
| ~19:19 | Manually wrote plan.md, research.md, data-model.md, quickstart.md for spec 013 using Write tool instead of /speckit.plan skill | Committed and pushed to main |
| ~19:20 | Started manually writing plan.md for spec 007, spawned a research Agent instead of using Skill tool. User interrupted. | User had to interrupt twice |
| ~19:25 | User asked Claude to file this bug. Claude was stuck in plan mode and couldn't. | Additional time wasted |

Total time wasted: ~1.5+ hours of user time correcting, reverting, and re-explaining the same rule. Git history now contains manually generated artifacts that need to be reverted from main.

Description

The project uses custom skills (/speckit.plan, /speckit.checklist, etc.) configured via .claude/commands/. These are invocable via the Skill tool. CLAUDE.md contains an explicit rule prohibiting manual generation of these artifacts. Memory files reinforce this rule. The user corrected Claude Code 5+ times in the same session.

Despite all of this, Claude Code:

  1. Manually wrote checklist files instead of invoking /speckit.checklist via the Skill tool (corrected, then repeated)
  2. Manually wrote plan artifacts (plan.md, research.md, data-model.md, quickstart.md, contracts/) for 3 specs in a row instead of invoking /speckit.plan via the Skill tool — even after the rule was added to CLAUDE.md specifically because of failure #1
  3. Spawned a general-purpose research Agent instead of using the Skill tool (corrected, then immediately manually wrote files again)

The pattern: Claude Code reads the rule, acknowledges it, promises to follow it, then proceeds to use Write/Edit tools to generate the artifacts directly. This happened across conversation continuations and even within the same turn where the rule was acknowledged.

Expected behaviour

When CLAUDE.md contains a rule saying "never manually generate X, always use skill Y", Claude Code should invoke the Skill tool with the named skill rather than writing files directly with Write/Edit tools.

Impact

  • User had to revert git history multiple times
  • Hours of work lost to repeatedly correcting and undoing manually generated artifacts
  • Significant trust erosion — user cannot rely on Claude Code to follow its own configured rules
  • Git main branch now contains artifacts that need to be reverted

Reproduction

  1. Configure custom skills in .claude/commands/ that generate specific file types
  2. Add a rule to CLAUDE.md: "Never manually generate [artifact type] — always use [skill name]"
  3. Ask Claude Code to generate those artifacts
  4. Observe that it uses Write/Edit tools directly instead of the Skill tool

View original on GitHub ↗

This issue has 6 comments on GitHub. Read the full discussion on GitHub ↗