Skip to content

Comments

Add Claude Code memory files for AI-assisted development#14078

Open
cderv wants to merge 17 commits intomainfrom
claude-memory-files
Open

Add Claude Code memory files for AI-assisted development#14078
cderv wants to merge 17 commits intomainfrom
claude-memory-files

Conversation

@cderv
Copy link
Collaborator

@cderv cderv commented Feb 20, 2026

Summary

  • Add .claude/ directory with path-scoped rule files providing context-aware guidance for Claude Code across the codebase (filters, formats, testing, TypeScript/Deno conventions, rendering, schemas, changelog)
  • Add llm-docs/ with detailed reference documentation for callout styling and testing patterns
  • Add dev-docs/claude-code-setup.md setup guide and dev-docs/debugging-flaky-tests.md methodology
  • Add AI-Assisted Development section to CONTRIBUTING.md

Details

These files help Claude Code (and other AI coding assistants) work effectively with the quarto-cli codebase by providing structured context about conventions, patterns, and architecture. The .claude/rules/ files use paths: frontmatter so they're only loaded when working on matching files, keeping context usage efficient.

Key areas covered:

  • Lua filter development patterns and the filter pipeline
  • Format handler conventions and registration
  • Test infrastructure (smoke tests, Playwright, TypeScript unit tests)
  • Deno/TypeScript conventions and the resource abstraction layer
  • Render pipeline architecture
  • Changelog entry formatting
  • Zod schema usage patterns

The llm-docs/ directory contains deeper reference material that rule files point to when more detail is needed.

Test plan

  • Verify .claude/ files don't affect any build or test processes
  • Review rule files for accuracy against current codebase conventions

🤖 Generated with Claude Code

cderv and others added 17 commits January 16, 2026 19:21
Organize Claude Code memory files to enable team-wide AI assistance:

- Move CLAUDE.md to .claude/CLAUDE.md (follows convention)
- Add path-conditional rules for TypeScript, rendering, and formats
- Add folder-specific CLAUDE.md for filters and tests directories
- Update .gitignore to exclude personal Claude files

Structure:
- .claude/CLAUDE.md - Main project instructions (shared)
- .claude/rules/ - Conditional rules by file pattern (shared)
- .claude/commands/, .claude/docs/ - Personal (gitignored)
- CLAUDE.local.md - Personal project prefs (gitignored)

Rules added:
- typescript/deno-conventions.md - Deno/TS patterns for src/**/*.ts
- rendering/render-pipeline.md - Render system for src/command/render/**
- formats/format-handlers.md - Format system for src/format/**

Folder CLAUDE.md added:
- src/resources/filters/CLAUDE.md - Lua filter system navigation
- tests/CLAUDE.md - Test infrastructure quick reference

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add Lua development conventions (.claude/rules/filters/lua-development.md)
- Add testing rules for all test types:
  - Unit tests (.claude/rules/testing/unit-tests.md)
  - Smoke tests (.claude/rules/testing/smoke-tests.md)
  - Smoke-all tests (.claude/rules/testing/smoke-all-tests.md)
  - Playwright tests (.claude/rules/testing/playwright-tests.md)
- Refactor tests/CLAUDE.md to lean overview with pointers to rule files
- Add "Maintaining Memory Files" section to main CLAUDE.md

These rule files load automatically based on paths: frontmatter
when Claude Code reads files matching those patterns.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Slim down src/resources/filters/CLAUDE.md to unique content only

- Remove coding patterns now covered by rules file

- Add API Reference section to rules file pointing to lua-types/

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Document the common mistake of over-escaping regex patterns in YAML
single-quoted strings (e.g., '\(' vs '\(') which causes test failures.

- Add escaping cheat sheet to smoke-all-tests.md rule file
- Add paths to trigger rule when reading verify.ts or smoke-all.test.ts
- Bring testing-patterns.md from main and add smoke-all section

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add files that were added to main after this branch was created:
- llm-docs/CLAUDE.md - guidance for working with llm-docs
- llm-docs/callout-styling-html.md - callout styling documentation

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Split, merge, and trim rule files to reduce context tokens while
maintaining coverage. Key changes:

Split deno-conventions.md (212 lines) into targeted files:
- deno-essentials.md (82 lines) for src/**/*.ts
- cliffy-commands.md (48 lines) for src/command/**/*.ts
- deno-ral.md (58 lines) for src/deno_ral/**/*.ts

Merge smoke-tests.md + unit-tests.md (197 lines) into:
- typescript-tests.md (94 lines) covering both

Remove duplications:
- YAML regex escaping: keep in llm-docs, add pointer in smoke-all-tests.md
- --output-dir detail: already in render-pipeline.md

Trim verbose sections:
- format-handlers.md: remove Common Patterns (covered in Adding a New Format)

Results:
- Any .ts file: 212 → 82 lines loaded
- src/command/: 212 → 130 lines loaded
- Net reduction: ~210 lines across all rules

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Create .claude/rules/changelog.md with comprehensive guidance for
news/ files including section hierarchy, entry format, backports,
and regression fix handling. Update CLAUDE.md to point to the new
rules file while keeping essential context.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Migrate content from personal gist into project documentation.
Methodology covers 6 phases (reproduce, binary search, narrow down,
state change, root cause, verify) with the #13647 TinyTeX/elsarticle
case study as a concrete worked example.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Move three folder-specific CLAUDE.md files into centralized
path-scoped rule files:
- tests/CLAUDE.md -> .claude/rules/testing/overview.md
- src/resources/filters/CLAUDE.md -> .claude/rules/filters/overview.md
- llm-docs/CLAUDE.md -> .claude/rules/llm-docs-maintenance.md

Each gets paths: frontmatter for conditional loading.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Replace personal gist URL with dev-docs/debugging-flaky-tests.md ref
- Deduplicate test running commands (brief summary + pointer to
  .claude/rules/testing/overview.md)
- Update memory file types table (remove folder CLAUDE.md row,
  add llm-docs row)
- Add pointer to dev-docs/claude-code-setup.md

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove duplicated module list, add pointer to deno-ral.md for
the full module reference and safe file operations.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Create dev-docs/claude-code-setup.md explaining .claude/ files,
path-scoped rules, CLAUDE.local.md overrides, and how to add or
update rules. Add AI-Assisted Development section to CONTRIBUTING.md.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Fix relative link for tinytex-pattern-maintenance.md in
.claude/CLAUDE.md (missing ../ prefix). Add note about not
committing secrets to dev-docs/claude-code-setup.md.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@posit-snyk-bot
Copy link
Collaborator

posit-snyk-bot commented Feb 20, 2026

Snyk checks have passed. No issues have been found so far.

Status Scanner Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

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.

2 participants