Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
283 changes: 43 additions & 240 deletions .claude/CLAUDE.md

Large diffs are not rendered by default.

14 changes: 1 addition & 13 deletions .claude/rules/filters/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,19 +68,7 @@ Reach for it when a Pandoc *parsing* behavior must change before any filter can

## Debugging

**Filter tracing (recommended):**
```bash
# Linux/macOS
package/dist/bin/quarto dev-call show-ast-trace document.qmd

# Windows
package/dist/bin/quarto.cmd dev-call show-ast-trace document.qmd
```

**AST diagram:**
```bash
quarto dev-call make-ast-diagram document.qmd
```
Visualize filter transformations with the `dev-call` tools `show-ast-trace` (interactive trace viewer) and `make-ast-diagram` (static AST diagram) — see `.claude/rules/dev-tools/dev-call-commands.md` for both.

## Related Documentation

Expand Down
12 changes: 12 additions & 0 deletions .claude/rules/formats/axe-accessibility.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
paths:
- "src/format/html/format-html-axe*"
- "src/resources/**/*axe*"
- "tests/integration/playwright/tests/*axe*"
---

# Axe Accessibility Checks

For the axe-core integration architecture across build-time TypeScript, compile-time SCSS, and runtime JS layers, see `llm-docs/axe-accessibility-architecture.md`.

For the axe accessibility testing workflow (scan config, runtime DOM markers, output-mode patching), see `llm-docs/axe-accessibility-testing.md`.
11 changes: 11 additions & 0 deletions .claude/rules/formats/callout-styling.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
paths:
- "src/resources/formats/**/*callout*"
- "src/resources/filters/**/callout*"
---

# Callout Styling

For the three-tier callout CSS architecture (Bootstrap, RevealJS, standalone HTML), see `llm-docs/callout-styling-html.md`.

The shared SCSS where callout CSS lives (`_bootstrap-rules.scss`, `revealjs/quarto.scss`) is covered by the `sass-theming` rule, which also points to this doc.
12 changes: 12 additions & 0 deletions .claude/rules/formats/pandoc-templates.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
paths:
- "src/resources/formats/pdf/pandoc/**"
- "src/resources/formats/typst/pandoc/**"
- "package/src/common/update-pandoc.ts"
---

# Pandoc Templates (LaTeX & Typst)

For how Pandoc's LaTeX templates are copied into Quarto and restructured into a modular form (`latex.template`, `latex.common`, …), see `llm-docs/pandoc-quarto-latex-templates.md`.

For the equivalent Typst template integration (`typst.template`, `template.typst`), see `llm-docs/pandoc-quarto-typst-templates.md`.
9 changes: 9 additions & 0 deletions .claude/rules/formats/revealjs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
paths:
- "src/format/reveal/**"
- "src/resources/formats/revealjs/**"
---

# RevealJS Format

For reveal.js format internals — metadata normalization, the two template files (`revealjs.template` vs `template.html`), and the TypeScript/Pandoc division of responsibility — see `llm-docs/revealjs-format-architecture.md`.
2 changes: 2 additions & 0 deletions .claude/rules/formats/sass-theming.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,5 @@ background-color: var(--r-background-color, $body-bg);
```

Read `llm-docs/sass-theming-architecture.md` for full compilation pipeline details.

For the three-tier callout CSS architecture (Bootstrap, RevealJS, standalone HTML), see `llm-docs/callout-styling-html.md`.
8 changes: 8 additions & 0 deletions .claude/rules/llm-docs-maintenance.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,11 @@ They are NOT:
- User documentation (that's at quarto.org)
- Code comments (those live in source files)
- Issue-specific notes (those go in PR descriptions)

## Discovery Pointers

So a relevant deep-dive actually gets read when a matching task comes up, each `llm-docs/*.md` should be reachable from a **discovery pointer** — a one-line "see `llm-docs/<file>.md`" reference — placed inside a path-scoped rule under `.claude/rules/` whose `paths:` frontmatter matches the doc's own source files. This reuses the existing lazy-load gate at zero baseline context cost.

Granularity rule: the pointer inherits its host rule's `paths:`, so it must live in a rule scoped **no broader than the doc's topic** — otherwise it loads on unrelated work (a reveal.js pointer does not belong in a rule scoped to all of `src/format/**`). If the best existing rule is too generic, create a small dedicated rule scoped to that doc's source instead.

**When adding a new `llm-docs/*.md`:** add its discovery pointer to a matching path-scoped rule, or create a narrowly-scoped rule for it.
14 changes: 14 additions & 0 deletions .claude/rules/packaging/code-signing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
paths:
- "package/src/macos/installer.ts"
- "package/src/windows/installer.ts"
- "package/scripts/macos/entitlements.plist"
- "package/scripts/macos/distribution.xml"
- ".github/workflows/create-release.yml"
- ".github/workflows/actions/keychain/action.yml"
- ".github/workflows/actions/sign-files/action.yml"
---

# Code Signing for Installers

For how release installers get signed and notarized on macOS and Windows (Gatekeeper, SmartScreen, and the keychain/signing actions in `create-release.yml`), see `llm-docs/code-signing-installers.md`.
10 changes: 10 additions & 0 deletions .claude/rules/preview/overview.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
paths:
- "src/command/preview/**"
- "src/project/serve/**"
- "src/preview/**"
---

# Preview System

For how `quarto preview` works end-to-end — CLI entry, the branching logic in `cmd.ts`, single-file vs project preview lifecycle, and file watching — see `llm-docs/preview-architecture.md`.
9 changes: 9 additions & 0 deletions .claude/rules/publishing/overview.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
paths:
- "src/publish/**"
- "src/command/publish/cmd.ts"
---

# Publishing System

For how `quarto publish` works internally — the `PublishProvider` interface, account management, and the end-to-end publish flow — see `llm-docs/publishing-architecture.md`.
9 changes: 9 additions & 0 deletions .claude/rules/rendering/localization.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
paths:
- "src/core/language.ts"
- "src/resources/language/**"
---

# Localization

For how localized strings flow from `_language.yml` through metadata merging into Pandoc templates and the crossref/authors/callouts Lua filters, see `llm-docs/localization-architecture.md`.
2 changes: 2 additions & 0 deletions .claude/rules/rendering/render-pipeline.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ if (context?.config && isProjectInputFile(path, context)) {
}
```

For the full synthetic project mechanism (`projectContextForDirectory()`) and why two single-file code paths exist, see `llm-docs/synthetic-project-context.md`.

## Format Resolution

Metadata merges in this order (later overrides earlier):
Expand Down
7 changes: 1 addition & 6 deletions .claude/rules/schemas/zod-usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,4 @@ YAML schema validation happens at config load time, so downstream code doesn't n

## Regenerating Schemas

After modifying YAML schema definitions:

```bash
package/dist/bin/quarto dev-call build-artifacts # Linux/macOS
package/dist/bin/quarto.cmd dev-call build-artifacts # Windows
```
After modifying YAML schema definitions, run `dev-call build-artifacts` — see `.claude/rules/dev-tools/dev-call-commands.md` § build-artifacts.
2 changes: 2 additions & 0 deletions .claude/rules/testing/smoke-all-tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ _quarto:
- ['\\begin\{figure\}']
```

**Details:** `llm-docs/ensure-pdf-text-positions.md` — the `ensurePdfTextPositions` verification function for asserting spatial text-position relationships in tagged PDFs (Typst only; LaTeX not yet supported).

### Regex Match Array Format

`ensureFileRegexMatches` (and variants like `ensureTypstFileRegexMatches`, `ensureLatexFileRegexMatches`) takes two arrays:
Expand Down
6 changes: 1 addition & 5 deletions .claude/rules/testing/typescript-tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,7 @@ TypeScript-based tests using Deno. Smoke tests render documents; unit tests veri

## Core Infrastructure

| File | Purpose |
|------|---------|
| `tests/test.ts` | `testQuartoCmd()`, `testRender()`, `unitTest()` |
| `tests/verify.ts` | Verification functions (`noErrors`, `fileExists`, etc.) |
| `tests/utils.ts` | `docs()`, `outputForInput()`, path utilities |
Core test files (`test.ts`, `verify.ts`, `utils.ts`) are described in `.claude/rules/testing/overview.md` § Core Files.

### Search for an existing verifier before writing one

Expand Down
2 changes: 2 additions & 0 deletions .claude/rules/typescript/deno-essentials.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,3 +92,5 @@ Common directives (use sparingly):
3. **Import from deno_ral** - Not directly from std library
4. **Use Deno APIs** - No Node.js equivalents
5. **Prefer sync APIs** - Simpler code flow for CLI

For the `error()` / `warning()` / `info()` one-line message-formatting convention, see `llm-docs/error-messages.md`.
9 changes: 9 additions & 0 deletions .claude/rules/typescript/quarto-api.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
paths:
- "src/core/api/**"
- "packages/quarto-types/**"
---

# Quarto API

For adding or modifying methods in the Quarto API (`src/core/api/`, `packages/quarto-types/`) consumed by external execution engines, see `llm-docs/quarto-api.md`.
Loading