Skip to content

Commit 5ea57d1

Browse files
cdervclaude
andcommitted
Add Claude Code setup guide for contributors
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>
1 parent f77b91c commit 5ea57d1

File tree

2 files changed

+91
-0
lines changed

2 files changed

+91
-0
lines changed

CONTRIBUTING.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,7 @@ Pull requests are very welcome! Here's how to contribute via PR:
3131
3. Submit the [pull request](https://help.github.com/articles/using-pull-requests). It is ok to submit as draft if your are still working on it but would like some feedback from us. It is always good to share in the open that you are working on it.
3232

3333
We'll try to be as responsive as possible in reviewing and accepting pull requests.
34+
35+
## AI-Assisted Development
36+
37+
This repository includes shared [Claude Code](https://docs.anthropic.com/en/docs/claude-code) memory files in `.claude/` that help AI assistants understand the Quarto codebase. See [dev-docs/claude-code-setup.md](dev-docs/claude-code-setup.md) for details on how these work and how to contribute to them.

dev-docs/claude-code-setup.md

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
# Claude Code Setup for Quarto Contributors
2+
3+
This project includes shared [Claude Code](https://docs.anthropic.com/en/docs/claude-code) memory files that help AI assistants understand the Quarto codebase. These files are committed to the repository so all contributors benefit from consistent AI-assisted development.
4+
5+
## What's Included
6+
7+
### `.claude/CLAUDE.md`
8+
9+
Always loaded by Claude Code. Contains the project overview: architecture, setup, build commands, conventions, and key file paths.
10+
11+
### `.claude/rules/`
12+
13+
Path-scoped rule files that load conditionally based on what files you're working with. For example, when editing Lua filters, Claude Code automatically loads filter-specific conventions.
14+
15+
Current rule areas:
16+
- `changelog.md` — Changelog entry format
17+
- `filters/` — Lua filter coding conventions and system overview
18+
- `formats/` — Format handler patterns
19+
- `rendering/` — Render pipeline architecture
20+
- `schemas/` — Zod schema patterns
21+
- `testing/` — Test infrastructure, smoke-all format, Playwright, anti-patterns
22+
- `typescript/` — Deno essentials, RAL, Cliffy commands
23+
- `dev-tools/` — Development commands reference
24+
- `llm-docs-maintenance.md` — LLM documentation staleness checking
25+
26+
Each rule file has a `paths:` frontmatter that controls when it loads:
27+
28+
```yaml
29+
---
30+
paths:
31+
- "src/resources/filters/**"
32+
---
33+
```
34+
35+
This means the file only loads when Claude Code is working with files matching those paths.
36+
37+
### `llm-docs/`
38+
39+
Architectural deep-dive documentation for AI assistants. These are NOT auto-loaded — they're read on demand when Claude Code needs detailed understanding of a subsystem. Topics include template systems, error messages, testing patterns, and Lua API reference.
40+
41+
Each llm-doc has staleness metadata in its frontmatter so Claude Code can check if the documented code has changed since the analysis was done.
42+
43+
## Personal Overrides
44+
45+
Create `CLAUDE.local.md` at the repository root for personal overrides. This file is gitignored and won't be committed. Use it for:
46+
47+
- Preferred shell syntax or platform-specific notes
48+
- Personal workflow customizations
49+
- References to personal tools or configurations
50+
51+
Claude Code loads `CLAUDE.local.md` alongside the project `CLAUDE.md`.
52+
53+
## Adding or Updating Rules
54+
55+
### New rule file
56+
57+
1. Create `.claude/rules/<area>/rule-name.md`
58+
2. Add `paths:` frontmatter listing glob patterns relative to the repo root (e.g., `"src/resources/filters/**"`)
59+
3. Keep rules focused and concise (50-250 lines is typical)
60+
61+
### Update existing rule
62+
63+
Edit the relevant file in `.claude/rules/`. The path scoping ensures changes only affect sessions working with matching files.
64+
65+
### New llm-doc
66+
67+
1. Create `llm-docs/topic-name.md`
68+
2. Add staleness frontmatter (`main_commit`, `analyzed_date`, `key_files`)
69+
3. Reference from relevant rule files if helpful
70+
71+
## What's NOT Committed
72+
73+
The `.gitignore` excludes personal Claude Code files:
74+
75+
```
76+
CLAUDE.local.md # Personal overrides
77+
.claude/commands/ # Personal slash commands
78+
.claude/docs/ # Personal documentation
79+
.claude/settings.local.json # Local settings
80+
```
81+
82+
These stay personal to each developer.
83+
84+
## Further Reading
85+
86+
- [Claude Code documentation](https://docs.anthropic.com/en/docs/claude-code)
87+
- [Memory files reference](https://docs.anthropic.com/en/docs/claude-code/memory)

0 commit comments

Comments
 (0)