Skip to content

Improve agent docs generation and packaged refs#2

Merged
KayleeWilliams merged 9 commits into
mainfrom
KayleeWilliams/review-md-agent-docs
Apr 20, 2026
Merged

Improve agent docs generation and packaged refs#2
KayleeWilliams merged 9 commits into
mainfrom
KayleeWilliams/review-md-agent-docs

Conversation

@KayleeWilliams
Copy link
Copy Markdown
Collaborator

@KayleeWilliams KayleeWilliams commented Apr 19, 2026

This PR improves the MDX to markdown pipeline with better component flattening, docs-context placeholder resolution, and stricter docs link linting while ignoring shared fragments by default. It adds nested topic support to the llms-full generator, expands tests around remark, lint, and LLM outputs, and adds smoke scripts for converting and generating against real docs fixtures. It also adds source and generated @inth/docs agent reference docs, publishes them with the package, updates the package and repo READMEs, and introduces a local inth-docs skill that routes agents to the packaged references. Validation in this workspace included packages/docs build, packages/docs check-types, package tests, and npm pack dry-run.

A single monolithic llms-full.txt doesn't scale for SDKs whose docs
fan out by surface (c15t: React vs Next vs JS vs self-host vs
integrations) — agents end up downloading mostly-irrelevant context.

FullTopic now accepts either `includePrefixes` (leaf) or `topics`
(parent). Parents emit a router .txt linking to their children;
leaves keep their existing content-bundle shape. File paths follow
the topic tree: /docs/llms-full/frameworks/react.txt, etc.

Flat-topic configs keep working — the change is additive.

Also adds apps/docs-smoke scripts (convert-real.ts,
llm-generate-real.ts) demonstrating the tree carve-up against real
c15t content, plus 4 new tests covering nested output, backwards
compat, and config validation.
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 19, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Adds packaged agent-facing docs and tooling for @inth/docs: MDX sources, MDX→markdown conversion with placeholder resolution, expanded remark plugins, route-aware linting, nested LLM topic generation, agent-doc generation scripts integrated into package build, and accompanying tests.

Changes

Cohort / File(s) Summary
Skill & Top-level Docs
\.agents/skills/inth-docs/SKILL.md, README.md, packages/docs/README.md
New repo skill file and expanded READMEs documenting package surfaces, install/usage, agent-doc routing, and generation workflow.
Agent MDX Sources
packages/docs/agent-docs-src/docs/*.mdx
Added MDX source pages (index, components, convert, remark, llm, lint) used to produce packaged agent-facing docs.
Generated Agent Docs
packages/docs/agent-docs/docs/*, packages/docs/agent-docs/docs/llms*, packages/docs/agent-docs/docs/llms-full/**
Added generated markdown/plaintext LLM summaries and nested full-context topic files.
Doc Context & Placeholder Resolution
packages/docs/src/internal/docs-context.ts, packages/docs/src/convert/convert.ts, packages/docs/src/remark/plugins/doc-placeholders.remark.ts
New DocContext utilities; derive framework/routes from paths; resolve placeholders in frontmatter and URL-like fields during conversion and remark traversal.
Remark Pipeline & Content Processing
packages/docs/src/remark/index.ts, packages/docs/src/remark/libs/content-processor.ts, packages/docs/src/remark/plugins/cards.remark.ts
Exported and inserted remarkResolveDocPlaceholders into defaultRemarkPlugins; treat list nodes as preserved content; removed Card variant filtering.
LLM Generation & Packaging
packages/docs/src/llm/llm.ts, packages/docs/scripts/generate-agent-docs.ts, packages/docs/package.json
Nested topic support (topics + includePrefixes), deterministic title/description heuristics, rm -rf regeneration of docs/llms-full, and build step to pre-generate agent docs requiring INTH_DOCS_AGENT_BASE_URL.
Linting / Link Validation
packages/docs/src/lint/runner.ts, packages/docs/src/lint/cli.ts, packages/docs/src/lint/lint.test.ts
Added rules invalid-link, unresolved-placeholder, cross-framework-link; content-scoped violations; route indexing and URL extraction from frontmatter/content; updated CLI help text and tests.
Conversion Enhancements
packages/docs/src/convert/convert.ts
Title derivation treats home/index/readme as generic (use parent dir); resolves frontmatter placeholders before final output.
Smoke & Generation Scripts
apps/docs-smoke/scripts/convert-real.ts, apps/docs-smoke/scripts/llm-generate-real.ts, apps/docs-smoke/.gitignore
Added Bun scripts to convert fixtures and generate LLM outputs into public-real2/ (now ignored).
Tests & Test Suites
packages/docs/src/llm/llm.test.ts, packages/docs/src/remark/remark-output.test.ts, packages/docs/src/internal/docs-context.test.ts, packages/docs/src/lint/lint.test.ts
New Vitest suites for LLM summary/full generation, remark output and placeholder resolution, docs-context utilities, and lint link behaviors.
Packaging & Scripts
packages/docs/package.json, packages/docs/scripts/generate-agent-docs.ts
Include agent-docs and README.md in published files; build runs docs:agent before bundling; docs:agent enforces INTH_DOCS_AGENT_BASE_URL.

Sequence Diagram(s)

sequenceDiagram
    participant Dev as Developer / CI
    participant Convert as convertAllMdx
    participant Remark as Remark Pipeline
    participant DocsCtx as docs-context
    participant Lint as Lint Runner
    participant LLM as LLM Generator
    participant FS as Filesystem

    Dev->>Convert: run convertAllMdx(srcDir, outDir)
    Convert->>Remark: apply defaultRemarkPlugins
    Remark->>DocsCtx: deriveDocContext(file.path)
    Remark->>Remark: remarkRemoveImports
    Remark->>Remark: remarkResolveDocPlaceholders
    Remark->>Convert: return rendered markdown + frontmatter
    Convert->>DocsCtx: resolveFrontmatterPlaceholders(frontmatter, sourcePath)
    Convert->>FS: write converted markdown files

    Dev->>Lint: run lintDocs(srcDir)
    Lint->>FS: glob docs -> build routeSet
    Lint->>Convert: render MDX for content URL extraction
    Lint->>Lint: extract /docs/ URLs and placeholders
    Lint->>Lint: validate routes, detect unresolved/cross-framework links
    Lint->>Dev: report violations

    Dev->>LLM: run generateLLMSummaries / generateLLMFullFiles(outDir, topics)
    LLM->>FS: rm -rf old /docs/llms-full
    LLM->>DocsCtx: use route metadata + includePrefixes
    LLM->>FS: write /llms.txt and nested /docs/llms-full/... files
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~50 minutes

Possibly related PRs

  • feat: scaffold @inth/docs package with convert, llm, lint, components #1: Directly overlaps @inth/docs surfaces and agent-doc generation scripts (convert, remark, llm, lint).
  • inthhq/monorepo#413: Overlaps LLM generation and agent-doc generation logic (generateLLMSummaries / generateLLMFullFiles).
  • inthhq/monorepo#417: Related changes to MDX→markdown conversion and LLM artifact generation across monorepo packages.

Poem

🐰 I hop through docs and chase each {key},

Paths get fixed and placeholders flee,
Topics nest tidy, summaries take flight,
Links get checked till they read just right,
Hooray — agent bundles snug tonight. 📚✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 7.55% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The PR title clearly describes the main objective: improving agent docs generation and packaged references, which aligns with the primary changes of adding agent documentation, improving the MDX pipeline, and publishing docs with the package.
Description check ✅ Passed The PR description provides a comprehensive overview of the changes, including pipeline improvements, new nested topic support, expanded tests, new smoke scripts, and documentation additions—all of which are substantiated by the detailed file summaries.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a30c96857c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +101 to +105
const entries = Object.entries(value).map(([key, entryValue]) => [
key,
resolvePlaceholderStrings(entryValue, context),
]);
return Object.fromEntries(entries) as T;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Preserve non-plain objects during placeholder recursion

resolvePlaceholderStrings treats every non-null object as a plain record and rebuilds it via Object.entries/Object.fromEntries, which strips object instances like Date into {}. In this commit, frontmatter now flows through this function (convert.ts), so unquoted YAML timestamps (parsed as Date) are silently corrupted when converting docs, producing invalid metadata and breaking downstream consumers that rely on date fields.

Useful? React with 👍 / 👎.

for (const pattern of FRAMEWORK_PATH_PATTERNS) {
const match = normalizedPath.match(pattern);
const framework = match?.[1] ?? null;
if (framework && KNOWN_FRAMEWORKS.has(framework)) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Derive framework from path without a fixed allowlist

Framework detection now hard-gates on KNOWN_FRAMEWORKS, so docs under valid framework paths like /docs/frameworks/vue/... resolve to framework: null. That leaves {framework} placeholders unresolved and causes link linting/conversion behavior to fail for any framework not explicitly listed, which is a regression for a package intended to work across arbitrary docs structures.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 14

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@packages/docs/agent-docs-src/docs/components.mdx`:
- Line 50: Replace the phrase "package-manager specific" with the hyphenated
form "package-manager-specific" in the docs content (the sentence "Use for
package-manager specific install or run commands.") to hyphenate the compound
adjective for readability.

In `@packages/docs/agent-docs/docs/components.md`:
- Line 49: Update the phrase "Use for package-manager specific install or run
commands." to hyphenate the compound modifier so it reads "Use for
package-manager-specific install or run commands." to correct the compound
adjective usage in the docs (look for the sentence containing "package-manager
specific" in components.md).
- Around line 51-56: The docs example and text incorrectly mention a
non-existent mode prop; update the docs to remove any reference to "mode" and
the example that passes mode. Specifically, edit the PackageCommandTabs example
and the following sentence so they only reference the supported props on
PackageCommandTabs (as defined by PackageCommandTabsProps: command, commands,
defaultManager, children) — remove the second example using mode and change the
description to say only that command accepts a package or CLI string (and
optionally mention commands/defaultManager/children if needed).

In `@packages/docs/agent-docs/docs/convert.md`:
- Around line 26-29: The example call to convertMdxFile uses the wrong argument
shape — convertMdxFile(sourcePath, remarkPlugins, enrichFromGitFlag) expects a
PluggableList as the second arg, not an options object; update the example to
pass defaultRemarkPlugins (the PluggableList) as the second parameter and an
explicit boolean for enrichFromGitFlag as the third parameter (remove the srcDir
property), referencing the convertMdxFile call site and the defaultRemarkPlugins
symbol when making the change.

In `@packages/docs/agent-docs/docs/llms.txt`:
- Line 26: Update the user-facing copy in the "Convert" entry so the term
"markdown" uses the proper noun capitalization "Markdown"; specifically edit the
line containing the link text "[Convert]" and the description "How to convert
MDX docs into markdown with `@inth/docs/convert`." to read "How to convert MDX
docs into Markdown with `@inth/docs/convert`."

In `@packages/docs/agent-docs/llms.txt`:
- Line 14: Update the user-facing copy on the Convert doc line by capitalizing
“Markdown” instead of “markdown” in the string
"[Convert](https://example.invalid/@inth/docs/docs/convert): How to convert MDX
docs into markdown with `@inth/docs/convert`." so the line reads "... How to
convert MDX docs into Markdown with `@inth/docs/convert`." to maintain terminology
consistency.

In `@packages/docs/package.json`:
- Around line 44-47: The package.json scripts currently call the generator
directly ("build" and "docs:agent"), which lets the generator fall back to the
placeholder INTH_DOCS_AGENT_BASE_URL and ship broken links; update the scripts
so the docs generator only runs when INTH_DOCS_AGENT_BASE_URL is set (e.g.,
create a guarded script and use it in "build" and "docs:agent"), and ensure the
script used by the publish step that produces "agent-docs" also uses this
guarded variant so placeholder URLs are never published by default.

In `@packages/docs/scripts/generate-agent-docs.ts`:
- Around line 11-12: The script currently falls back to DEFAULT_BASE_URL
("https://example.invalid/...") which causes generateLLMSummaries() and
generateLLMFullFiles() to emit packaged refs pointing at example.invalid; change
the startup logic around baseUrl/DEFAULT_BASE_URL so the script fails fast when
INTH_DOCS_AGENT_BASE_URL is not provided—i.e., detect when
process.env.INTH_DOCS_AGENT_BASE_URL is undefined (or when baseUrl equals
DEFAULT_BASE_URL) and throw an error or exit with a non‑zero status and a clear
message rather than continuing to run; update any code paths that read baseUrl
to assume a valid URL after this validation (references: DEFAULT_BASE_URL,
baseUrl, generateLLMSummaries, generateLLMFullFiles).

In `@packages/docs/src/internal/docs-context.ts`:
- Around line 93-105: resolvePlaceholderStrings currently recurses into every
non-null object and will corrupt non-plain objects (e.g., Date) by using
Object.entries/Object.fromEntries; change the recursion so it only descends into
plain objects (e.g., check Object.getPrototypeOf(value) === Object.prototype or
similar) and otherwise return the value unchanged; keep handling for strings
(resolveDocPlaceholders) and arrays as-is, and apply the plain-object guard
inside resolvePlaceholderStrings to protect values like Date, RegExp, class
instances, etc.

In `@packages/docs/src/lint/cli.ts`:
- Line 25: The CLI help text for the --ignore option is out of sync with the
actual DEFAULT_IGNORE_GLOBS constant; update the help string in cli.ts to
exactly match DEFAULT_IGNORE_GLOBS (including the leading **/ wildcard and the
**/node_modules/** entry) so that the documented default globs and the runner
behavior are identical; locate the help/template text that shows "--ignore
<glob>          Glob to skip (repeatable). Default: ..." and replace the
displayed list with the exact contents of DEFAULT_IGNORE_GLOBS.

In `@packages/docs/src/lint/runner.ts`:
- Around line 314-321: The routeSet is built from routeFiles which currently
calls glob(srcDir, ["**/*.mdx","**/*.md"], ROUTE_INDEX_IGNORE_GLOBS) and
therefore ignores only ROUTE_INDEX_IGNORE_GLOBS; this allows files excluded by
the lint scan (e.g., shared/** or options.ignore) to be included. Update the
glob call that produces routeFiles to use the same ignore rules as the lint scan
(combine ROUTE_INDEX_IGNORE_GLOBS with the caller-provided ignore globs such as
options.ignore or the shared/** default) so that routeFiles and the resulting
routeSet (created via routeFromFilePath) reflect the exact ignore list used by
the linter.

In `@packages/docs/src/llm/llm.ts`:
- Around line 138-147: titleFromRelativePath currently uses
path.basename(path.dirname(relativePath)) for generic filenames which yields "."
for root files like "index.mdx" or "README.md"; update titleFromRelativePath to
detect when path.dirname(relativePath) === "." (or when the computed segment ===
".") and replace that with a sensible fallback such as "Documentation" before
passing to titleize. Modify the logic in the titleFromRelativePath function
(which references GENERIC_DOC_TITLES and calls titleize) so root-level
README/index files produce "Documentation" instead of ".".
- Around line 690-707: The llms-full output directory (llmsFullDir) is only
created but not cleared, leaving stale .txt files when topics are
renamed/removed; before calling writeTopicTree(...) remove or empty the existing
llmsFullDir contents (delete all files and subdirs) and then recreate it (or use
recursive rm followed by mkdir) so the directory is clean before writing the new
topic tree; update the block that constructs llmsFullDir and calls
writeTopicTree to perform this cleanup step.

In `@packages/docs/src/remark/plugins/doc-placeholders.remark.ts`:
- Around line 12-15: deriveDocContext(sourcePath) is being called per URL inside
resolveUrlValue causing repeated work; compute a DocContext once in the plugin
body (call deriveDocContext(sourcePath) once when the file is opened), import
the DocContext type from ../../internal/docs-context, then change
resolveUrlValue to accept the precomputed DocContext (or add a sibling helper
resolveUrlValueWithContext) and use resolveDocPlaceholders(value, context).value
so the per-file context is reused instead of recomputed for each URL.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: adf8aa75-375a-4bb1-b838-bc9f43ace78b

📥 Commits

Reviewing files that changed from the base of the PR and between b2a778d and a30c968.

📒 Files selected for processing (44)
  • .agents/skills/inth-docs/SKILL.md
  • README.md
  • apps/docs-smoke/.gitignore
  • apps/docs-smoke/scripts/convert-real.ts
  • apps/docs-smoke/scripts/llm-generate-real.ts
  • packages/docs/README.md
  • packages/docs/agent-docs-src/docs/components.mdx
  • packages/docs/agent-docs-src/docs/convert.mdx
  • packages/docs/agent-docs-src/docs/index.mdx
  • packages/docs/agent-docs-src/docs/lint.mdx
  • packages/docs/agent-docs-src/docs/llm.mdx
  • packages/docs/agent-docs-src/docs/remark.mdx
  • packages/docs/agent-docs/docs/components.md
  • packages/docs/agent-docs/docs/convert.md
  • packages/docs/agent-docs/docs/index.md
  • packages/docs/agent-docs/docs/lint.md
  • packages/docs/agent-docs/docs/llm.md
  • packages/docs/agent-docs/docs/llms-full.txt
  • packages/docs/agent-docs/docs/llms-full/authoring.txt
  • packages/docs/agent-docs/docs/llms-full/authoring/components.txt
  • packages/docs/agent-docs/docs/llms-full/authoring/remark.txt
  • packages/docs/agent-docs/docs/llms-full/generation.txt
  • packages/docs/agent-docs/docs/llms-full/generation/convert.txt
  • packages/docs/agent-docs/docs/llms-full/generation/llm.txt
  • packages/docs/agent-docs/docs/llms-full/overview.txt
  • packages/docs/agent-docs/docs/llms-full/validation.txt
  • packages/docs/agent-docs/docs/llms.txt
  • packages/docs/agent-docs/docs/remark.md
  • packages/docs/agent-docs/llms-full.txt
  • packages/docs/agent-docs/llms.txt
  • packages/docs/package.json
  • packages/docs/scripts/generate-agent-docs.ts
  • packages/docs/src/convert/convert.ts
  • packages/docs/src/internal/docs-context.ts
  • packages/docs/src/lint/cli.ts
  • packages/docs/src/lint/lint.test.ts
  • packages/docs/src/lint/runner.ts
  • packages/docs/src/llm/llm.test.ts
  • packages/docs/src/llm/llm.ts
  • packages/docs/src/remark/index.ts
  • packages/docs/src/remark/libs/content-processor.ts
  • packages/docs/src/remark/plugins/cards.remark.ts
  • packages/docs/src/remark/plugins/doc-placeholders.remark.ts
  • packages/docs/src/remark/remark-output.test.ts
📜 Review details
🧰 Additional context used
📓 Path-based instructions (4)
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{ts,tsx}: Use explicit types for function parameters and return values when they enhance clarity
Prefer unknown over any when the type is genuinely unknown
Use const assertions (as const) for immutable values and literal types
Leverage TypeScript's type narrowing instead of type assertions

Files:

  • packages/docs/src/lint/cli.ts
  • packages/docs/src/remark/plugins/cards.remark.ts
  • apps/docs-smoke/scripts/convert-real.ts
  • packages/docs/src/remark/index.ts
  • packages/docs/src/remark/libs/content-processor.ts
  • packages/docs/src/remark/plugins/doc-placeholders.remark.ts
  • packages/docs/src/remark/remark-output.test.ts
  • apps/docs-smoke/scripts/llm-generate-real.ts
  • packages/docs/src/convert/convert.ts
  • packages/docs/src/lint/lint.test.ts
  • packages/docs/scripts/generate-agent-docs.ts
  • packages/docs/src/llm/llm.ts
  • packages/docs/src/internal/docs-context.ts
  • packages/docs/src/llm/llm.test.ts
  • packages/docs/src/lint/runner.ts
**/*.{js,ts,jsx,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{js,ts,jsx,tsx}: Use meaningful variable names instead of magic numbers - extract constants with descriptive names
Use arrow functions for callbacks and short functions
Prefer for...of loops over .forEach() and indexed for loops
Use optional chaining (?.) and nullish coalescing (??) for safer property access
Prefer template literals over string concatenation
Use destructuring for object and array assignments
Use const by default, let only when reassignment is needed, never var
Always await promises in async functions - don't forget to use the return value
Use async/await syntax instead of promise chains for better readability
Handle errors appropriately in async code with try-catch blocks
Don't use async functions as Promise executors
Remove console.log, debugger, and alert statements from production code
Throw Error objects with descriptive messages, not strings or other values
Use try-catch blocks meaningfully - don't catch errors just to rethrow them
Prefer early returns over nested conditionals for error cases
Extract complex conditions into well-named boolean variables
Use early returns to reduce nesting
Prefer simple conditionals over nested ternary operators
Don't use eval() or assign directly to document.cookie
Avoid spread syntax in accumulators within loops
Use top-level regex literals instead of creating them in loops
Prefer specific imports over namespace imports
Use descriptive names for functions, variables, and types for meaningful naming
Add comments for complex logic, but prefer self-documenting code

Files:

  • packages/docs/src/lint/cli.ts
  • packages/docs/src/remark/plugins/cards.remark.ts
  • apps/docs-smoke/scripts/convert-real.ts
  • packages/docs/src/remark/index.ts
  • packages/docs/src/remark/libs/content-processor.ts
  • packages/docs/src/remark/plugins/doc-placeholders.remark.ts
  • packages/docs/src/remark/remark-output.test.ts
  • apps/docs-smoke/scripts/llm-generate-real.ts
  • packages/docs/src/convert/convert.ts
  • packages/docs/src/lint/lint.test.ts
  • packages/docs/scripts/generate-agent-docs.ts
  • packages/docs/src/llm/llm.ts
  • packages/docs/src/internal/docs-context.ts
  • packages/docs/src/llm/llm.test.ts
  • packages/docs/src/lint/runner.ts
**/index.{js,ts,jsx,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Avoid barrel files (index files that re-export everything)

Files:

  • packages/docs/src/remark/index.ts
**/*.{test,spec}.{js,ts,jsx,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{test,spec}.{js,ts,jsx,tsx}: Write assertions inside it() or test() blocks
Avoid done callbacks in async tests - use async/await instead
Don't use .only or .skip in committed code
Keep test suites reasonably flat - avoid excessive describe nesting

Files:

  • packages/docs/src/remark/remark-output.test.ts
  • packages/docs/src/lint/lint.test.ts
  • packages/docs/src/llm/llm.test.ts
🧠 Learnings (68)
📓 Common learnings
Learnt from: CR
Repo: consentdotio/GDPRish PR: 0
File: .cursor/rules/docs-rules.mdc:0-0
Timestamp: 2026-03-19T22:57:19.913Z
Learning: Applies to apps/docs/**/*.mdx : Use MDX for documentation pages
Learnt from: CR
Repo: consentdotio/GDPRish PR: 0
File: .cursor/rules/docs-rules.mdc:0-0
Timestamp: 2026-03-19T22:57:19.913Z
Learning: Applies to apps/docs/**/*.mdx : Keep documentation organized by categories
Learnt from: CR
Repo: consentdotio/monorepo PR: 0
File: .cursor/rules/docs-rules.mdc:0-0
Timestamp: 2026-01-31T11:24:55.220Z
Learning: Applies to apps/docs/**/*.mdx : Include code examples where appropriate in MDX documentation pages of the docs app
Learnt from: CR
Repo: consentdotio/monorepo PR: 0
File: .cursor/rules/docs-rules.mdc:0-0
Timestamp: 2026-01-31T11:24:55.220Z
Learning: Applies to apps/docs/**/*.mdx : Use MDX for documentation pages in the docs app
Learnt from: CR
Repo: consentdotio/GDPRish PR: 0
File: .cursor/rules/docs-rules.mdc:0-0
Timestamp: 2026-03-19T22:57:19.913Z
Learning: Applies to apps/docs/**/*.mdx : Include code examples where appropriate in documentation
📚 Learning: 2025-12-17T14:48:41.563Z
Learnt from: CR
Repo: consentdotio/c15t-docs PR: 0
File: .cursor/rules/ultracite.mdc:0-0
Timestamp: 2025-12-17T14:48:41.563Z
Learning: Applies to **/*.{ts,tsx,js,jsx} : Don't use the TypeScript directive ts-ignore

Applied to files:

  • packages/docs/src/lint/cli.ts
📚 Learning: 2026-02-19T01:12:44.177Z
Learnt from: CR
Repo: consentdotio/agent-skills PR: 0
File: tsdoc-jsdoc-authoring/AGENTS.md:0-0
Timestamp: 2026-02-19T01:12:44.177Z
Learning: Applies to tsdoc-jsdoc-authoring/**/*.{js,jsx} : Use optional and default parameter strings correctly in JSDoc comments

Applied to files:

  • packages/docs/src/lint/cli.ts
📚 Learning: 2026-02-19T01:12:44.177Z
Learnt from: CR
Repo: consentdotio/agent-skills PR: 0
File: tsdoc-jsdoc-authoring/AGENTS.md:0-0
Timestamp: 2026-02-19T01:12:44.177Z
Learning: Applies to tsdoc-jsdoc-authoring/**/*.{ts,tsx,js,jsx} : Use `remarks` for long-form context in TSDoc and JSDoc comments

Applied to files:

  • packages/docs/agent-docs/docs/llms-full/authoring.txt
  • packages/docs/agent-docs/docs/remark.md
  • packages/docs/agent-docs-src/docs/remark.mdx
  • packages/docs/src/remark/index.ts
  • packages/docs/agent-docs/docs/llms-full/authoring/remark.txt
  • packages/docs/src/remark/remark-output.test.ts
  • packages/docs/src/convert/convert.ts
  • packages/docs/src/lint/runner.ts
📚 Learning: 2026-02-19T01:12:44.177Z
Learnt from: CR
Repo: consentdotio/agent-skills PR: 0
File: tsdoc-jsdoc-authoring/AGENTS.md:0-0
Timestamp: 2026-02-19T01:12:44.177Z
Learning: Applies to tsdoc-jsdoc-authoring/**/*.{js,jsx} : Write JSDoc summaries with intent in JavaScript files

Applied to files:

  • packages/docs/agent-docs/docs/llms-full/authoring.txt
  • packages/docs/agent-docs/docs/llms.txt
  • packages/docs/agent-docs/docs/llms-full/overview.txt
  • packages/docs/README.md
  • packages/docs/agent-docs-src/docs/llm.mdx
  • .agents/skills/inth-docs/SKILL.md
  • packages/docs/scripts/generate-agent-docs.ts
  • packages/docs/agent-docs/docs/llms-full/generation/llm.txt
  • packages/docs/agent-docs/docs/llm.md
  • packages/docs/src/llm/llm.ts
  • packages/docs/src/internal/docs-context.ts
  • README.md
📚 Learning: 2026-02-19T01:12:44.177Z
Learnt from: CR
Repo: consentdotio/agent-skills PR: 0
File: tsdoc-jsdoc-authoring/AGENTS.md:0-0
Timestamp: 2026-02-19T01:12:44.177Z
Learning: Applies to tsdoc-jsdoc-authoring/**/*.{ts,tsx,js,jsx} : Write clear summary sentences in TSDoc and JSDoc comments

Applied to files:

  • packages/docs/agent-docs/docs/llms-full/authoring.txt
  • packages/docs/agent-docs/docs/llms-full/authoring/remark.txt
  • packages/docs/agent-docs/docs/llms.txt
  • packages/docs/agent-docs/docs/llms-full/overview.txt
  • packages/docs/README.md
  • packages/docs/agent-docs-src/docs/llm.mdx
  • packages/docs/scripts/generate-agent-docs.ts
  • packages/docs/agent-docs/docs/llms-full/generation/llm.txt
  • packages/docs/agent-docs/docs/llm.md
  • README.md
📚 Learning: 2026-02-19T01:12:44.177Z
Learnt from: CR
Repo: consentdotio/agent-skills PR: 0
File: tsdoc-jsdoc-authoring/AGENTS.md:0-0
Timestamp: 2026-02-19T01:12:44.177Z
Learning: Applies to tsdoc-jsdoc-authoring/**/index.{ts,tsx} : Use `packageDocumentation` for entrypoint docs in TSDoc comments

Applied to files:

  • packages/docs/agent-docs/docs/llms-full/authoring.txt
  • packages/docs/agent-docs-src/docs/remark.mdx
  • packages/docs/agent-docs/docs/index.md
  • packages/docs/agent-docs-src/docs/index.mdx
  • packages/docs/agent-docs-src/docs/convert.mdx
  • packages/docs/agent-docs/docs/llms-full/overview.txt
  • packages/docs/README.md
  • packages/docs/agent-docs/docs/convert.md
  • packages/docs/scripts/generate-agent-docs.ts
  • packages/docs/src/internal/docs-context.ts
📚 Learning: 2026-01-31T11:24:55.220Z
Learnt from: CR
Repo: consentdotio/monorepo PR: 0
File: .cursor/rules/docs-rules.mdc:0-0
Timestamp: 2026-01-31T11:24:55.220Z
Learning: Applies to apps/docs/**/*.mdx : Include code examples where appropriate in MDX documentation pages of the docs app

Applied to files:

  • packages/docs/agent-docs/docs/llms-full/authoring.txt
  • packages/docs/agent-docs/docs/remark.md
  • packages/docs/agent-docs-src/docs/remark.mdx
  • packages/docs/agent-docs/docs/index.md
  • packages/docs/agent-docs/docs/llms-full/authoring/remark.txt
  • packages/docs/agent-docs/docs/components.md
  • packages/docs/agent-docs/docs/llms.txt
  • packages/docs/agent-docs-src/docs/index.mdx
  • packages/docs/agent-docs/docs/llms-full/generation/convert.txt
  • packages/docs/agent-docs-src/docs/convert.mdx
  • packages/docs/agent-docs/docs/llms-full/overview.txt
  • packages/docs/README.md
  • packages/docs/agent-docs-src/docs/llm.mdx
  • packages/docs/agent-docs/docs/llms-full/authoring/components.txt
  • .agents/skills/inth-docs/SKILL.md
  • packages/docs/agent-docs-src/docs/components.mdx
  • packages/docs/agent-docs/docs/convert.md
  • packages/docs/src/remark/remark-output.test.ts
  • packages/docs/src/convert/convert.ts
  • packages/docs/agent-docs/llms.txt
  • README.md
📚 Learning: 2026-03-19T22:57:19.913Z
Learnt from: CR
Repo: consentdotio/GDPRish PR: 0
File: .cursor/rules/docs-rules.mdc:0-0
Timestamp: 2026-03-19T22:57:19.913Z
Learning: Applies to apps/docs/**/*.mdx : Use MDX for documentation pages

Applied to files:

  • packages/docs/agent-docs/docs/llms-full/authoring.txt
  • packages/docs/agent-docs/docs/remark.md
  • packages/docs/agent-docs-src/docs/remark.mdx
  • packages/docs/agent-docs/docs/index.md
  • packages/docs/agent-docs/docs/llms-full/authoring/remark.txt
  • packages/docs/agent-docs/docs/components.md
  • packages/docs/agent-docs/docs/llms.txt
  • packages/docs/agent-docs-src/docs/index.mdx
  • packages/docs/agent-docs/docs/llms-full/generation/convert.txt
  • packages/docs/agent-docs-src/docs/convert.mdx
  • packages/docs/agent-docs/docs/llms-full/overview.txt
  • packages/docs/README.md
  • packages/docs/agent-docs-src/docs/llm.mdx
  • packages/docs/agent-docs/docs/llms-full/authoring/components.txt
  • .agents/skills/inth-docs/SKILL.md
  • packages/docs/agent-docs-src/docs/components.mdx
  • packages/docs/agent-docs/docs/convert.md
  • packages/docs/src/convert/convert.ts
  • packages/docs/agent-docs/llms.txt
  • packages/docs/src/llm/llm.ts
  • README.md
📚 Learning: 2025-07-23T12:51:43.299Z
Learnt from: CR
Repo: consentdotio/monorepo PR: 0
File: .cursor/rules/global-rules.mdc:0-0
Timestamp: 2025-07-23T12:51:43.299Z
Learning: Applies to **/*.{tsx,jsx} : For each component, documentation should include: purpose and use case, required and optional props, context requirements, example usage, and common pitfalls

Applied to files:

  • packages/docs/agent-docs/docs/llms-full/authoring.txt
  • packages/docs/agent-docs/docs/index.md
  • packages/docs/agent-docs/docs/components.md
  • packages/docs/agent-docs/docs/llms.txt
  • packages/docs/agent-docs-src/docs/index.mdx
  • packages/docs/agent-docs/docs/llms-full/authoring/components.txt
  • packages/docs/agent-docs-src/docs/components.mdx
📚 Learning: 2026-03-19T22:57:45.114Z
Learnt from: CR
Repo: consentdotio/GDPRish PR: 0
File: .cursor/rules/global-rules.mdc:0-0
Timestamp: 2026-03-19T22:57:45.114Z
Learning: Applies to **/*.{ts,tsx,js,jsx} : Document components with purpose and use case, required and optional props, context requirements, example usage, and common pitfalls

Applied to files:

  • packages/docs/agent-docs/docs/llms-full/authoring.txt
  • packages/docs/agent-docs/docs/llms-full.txt
  • packages/docs/agent-docs/docs/index.md
  • packages/docs/agent-docs/docs/llms-full/authoring/remark.txt
  • packages/docs/agent-docs/docs/components.md
  • packages/docs/agent-docs/docs/llms.txt
  • packages/docs/agent-docs-src/docs/index.mdx
  • packages/docs/agent-docs/docs/llms-full/authoring/components.txt
  • packages/docs/agent-docs-src/docs/components.mdx
  • packages/docs/src/llm/llm.ts
  • packages/docs/src/internal/docs-context.ts
📚 Learning: 2026-01-31T11:24:55.220Z
Learnt from: CR
Repo: consentdotio/monorepo PR: 0
File: .cursor/rules/docs-rules.mdc:0-0
Timestamp: 2026-01-31T11:24:55.220Z
Learning: Applies to apps/docs/**/*.mdx : Use MDX for documentation pages in the docs app

Applied to files:

  • packages/docs/agent-docs/docs/llms-full/authoring.txt
  • packages/docs/agent-docs/docs/remark.md
  • packages/docs/agent-docs-src/docs/remark.mdx
  • packages/docs/agent-docs/docs/index.md
  • packages/docs/agent-docs/docs/llms-full/authoring/remark.txt
  • packages/docs/agent-docs/docs/components.md
  • packages/docs/agent-docs/docs/llms.txt
  • packages/docs/agent-docs-src/docs/index.mdx
  • packages/docs/agent-docs/docs/llms-full/generation/convert.txt
  • packages/docs/agent-docs-src/docs/convert.mdx
  • packages/docs/agent-docs/docs/llms-full/overview.txt
  • packages/docs/README.md
  • packages/docs/agent-docs-src/docs/llm.mdx
  • packages/docs/agent-docs/docs/llms-full/authoring/components.txt
  • .agents/skills/inth-docs/SKILL.md
  • packages/docs/agent-docs-src/docs/components.mdx
  • packages/docs/agent-docs/docs/convert.md
  • packages/docs/src/convert/convert.ts
  • packages/docs/agent-docs/llms.txt
  • packages/docs/src/llm/llm.ts
  • README.md
📚 Learning: 2026-03-19T22:57:19.913Z
Learnt from: CR
Repo: consentdotio/GDPRish PR: 0
File: .cursor/rules/docs-rules.mdc:0-0
Timestamp: 2026-03-19T22:57:19.913Z
Learning: Applies to apps/docs/**/*.mdx : Include code examples where appropriate in documentation

Applied to files:

  • packages/docs/agent-docs/docs/llms-full/authoring.txt
  • packages/docs/agent-docs-src/docs/remark.mdx
  • packages/docs/agent-docs/docs/llms-full/authoring/remark.txt
  • packages/docs/agent-docs/docs/components.md
  • packages/docs/agent-docs-src/docs/index.mdx
  • packages/docs/agent-docs/docs/llms-full/generation/convert.txt
  • packages/docs/agent-docs-src/docs/convert.mdx
  • packages/docs/agent-docs/docs/llms-full/authoring/components.txt
  • packages/docs/agent-docs-src/docs/components.mdx
  • packages/docs/agent-docs/docs/convert.md
  • packages/docs/src/remark/remark-output.test.ts
  • README.md
📚 Learning: 2026-03-19T22:57:19.913Z
Learnt from: CR
Repo: consentdotio/GDPRish PR: 0
File: .cursor/rules/docs-rules.mdc:0-0
Timestamp: 2026-03-19T22:57:19.913Z
Learning: Applies to apps/docs/**/*.mdx : Keep documentation organized by categories

Applied to files:

  • packages/docs/agent-docs/docs/llms-full/authoring.txt
  • packages/docs/agent-docs-src/docs/remark.mdx
  • packages/docs/agent-docs/docs/index.md
  • packages/docs/agent-docs/docs/components.md
  • packages/docs/agent-docs/docs/llms.txt
  • packages/docs/agent-docs-src/docs/index.mdx
  • packages/docs/agent-docs/docs/llms-full/generation/convert.txt
  • packages/docs/agent-docs-src/docs/convert.mdx
  • packages/docs/agent-docs/docs/llms-full/overview.txt
  • packages/docs/README.md
  • packages/docs/agent-docs-src/docs/llm.mdx
  • packages/docs/agent-docs/docs/llms-full/authoring/components.txt
  • .agents/skills/inth-docs/SKILL.md
  • packages/docs/agent-docs-src/docs/components.mdx
  • packages/docs/agent-docs/docs/convert.md
  • packages/docs/scripts/generate-agent-docs.ts
  • packages/docs/agent-docs/llms.txt
  • packages/docs/src/llm/llm.ts
  • README.md
  • packages/docs/src/lint/runner.ts
📚 Learning: 2026-02-19T01:12:44.177Z
Learnt from: CR
Repo: consentdotio/agent-skills PR: 0
File: tsdoc-jsdoc-authoring/AGENTS.md:0-0
Timestamp: 2026-02-19T01:12:44.177Z
Learning: Applies to tsdoc-jsdoc-authoring/**/*.{ts,tsx,js,jsx} : Use `privateRemarks` for maintainer-only notes in TSDoc and JSDoc comments

Applied to files:

  • packages/docs/agent-docs/docs/remark.md
  • packages/docs/agent-docs-src/docs/remark.mdx
  • packages/docs/src/remark/index.ts
  • packages/docs/agent-docs/docs/llms-full/authoring/remark.txt
  • packages/docs/src/convert/convert.ts
📚 Learning: 2025-07-23T12:51:43.299Z
Learnt from: CR
Repo: consentdotio/monorepo PR: 0
File: .cursor/rules/global-rules.mdc:0-0
Timestamp: 2025-07-23T12:51:43.299Z
Learning: Applies to **/*.{test,spec}.{ts,tsx,js,jsx} : Include unit tests for components

Applied to files:

  • packages/docs/package.json
📚 Learning: 2026-03-19T22:57:45.114Z
Learnt from: CR
Repo: consentdotio/GDPRish PR: 0
File: .cursor/rules/global-rules.mdc:0-0
Timestamp: 2026-03-19T22:57:45.114Z
Learning: Applies to **/*.{test,spec}.{ts,tsx,js,jsx} : Include unit tests for components, integration tests for component combinations, accessibility tests, and error boundary tests

Applied to files:

  • packages/docs/package.json
  • packages/docs/src/remark/remark-output.test.ts
  • packages/docs/src/lint/lint.test.ts
  • packages/docs/src/llm/llm.test.ts
📚 Learning: 2026-02-19T01:12:44.177Z
Learnt from: CR
Repo: consentdotio/agent-skills PR: 0
File: tsdoc-jsdoc-authoring/AGENTS.md:0-0
Timestamp: 2026-02-19T01:12:44.177Z
Learning: Applies to tsdoc-jsdoc-authoring/**/*.{js,jsx} : Document generator output with `yields` in JSDoc comments

Applied to files:

  • apps/docs-smoke/scripts/convert-real.ts
  • packages/docs/src/remark/remark-output.test.ts
  • packages/docs/scripts/generate-agent-docs.ts
  • packages/docs/src/llm/llm.test.ts
📚 Learning: 2026-03-19T22:57:33.411Z
Learnt from: CR
Repo: consentdotio/GDPRish PR: 0
File: .cursor/rules/elements-rules.mdc:0-0
Timestamp: 2026-03-19T22:57:33.411Z
Learning: Applies to packages/elements/**/*.{ts,tsx} : Document props and usage examples in Elements package components

Applied to files:

  • packages/docs/agent-docs/docs/index.md
  • packages/docs/agent-docs/docs/components.md
  • packages/docs/agent-docs-src/docs/index.mdx
  • packages/docs/agent-docs/docs/llms-full/overview.txt
  • packages/docs/agent-docs/docs/llms-full/authoring/components.txt
  • packages/docs/agent-docs-src/docs/components.mdx
📚 Learning: 2025-07-23T12:51:10.961Z
Learnt from: CR
Repo: consentdotio/monorepo PR: 0
File: .cursor/rules/elements-rules.mdc:0-0
Timestamp: 2025-07-23T12:51:10.961Z
Learning: Applies to packages/elements/**/*.{ts,tsx} : Document props and usage examples

Applied to files:

  • packages/docs/agent-docs/docs/index.md
  • packages/docs/agent-docs/docs/components.md
  • packages/docs/agent-docs/docs/llms-full/overview.txt
  • packages/docs/agent-docs/docs/llms-full/authoring/components.txt
  • packages/docs/agent-docs-src/docs/components.mdx
📚 Learning: 2025-07-23T12:51:43.299Z
Learnt from: CR
Repo: consentdotio/monorepo PR: 0
File: .cursor/rules/global-rules.mdc:0-0
Timestamp: 2025-07-23T12:51:43.299Z
Learning: Applies to **/*.{ts,tsx} : Export type definitions for public API in TypeScript libraries

Applied to files:

  • packages/docs/src/remark/index.ts
📚 Learning: 2026-03-19T22:57:33.411Z
Learnt from: CR
Repo: consentdotio/GDPRish PR: 0
File: .cursor/rules/elements-rules.mdc:0-0
Timestamp: 2026-03-19T22:57:33.411Z
Learning: Applies to packages/elements/**/*.{ts,tsx} : Document all props and types in Elements package TypeScript code

Applied to files:

  • packages/docs/agent-docs/docs/components.md
  • packages/docs/src/internal/docs-context.ts
📚 Learning: 2025-07-23T12:51:10.961Z
Learnt from: CR
Repo: consentdotio/monorepo PR: 0
File: .cursor/rules/elements-rules.mdc:0-0
Timestamp: 2025-07-23T12:51:10.961Z
Learning: Applies to packages/elements/**/*.{tsx,jsx} : Use compound components pattern (e.g., `Component.Root`, `Component.Child`)

Applied to files:

  • packages/docs/agent-docs/docs/components.md
  • packages/docs/agent-docs-src/docs/components.mdx
📚 Learning: 2026-01-31T11:24:55.220Z
Learnt from: CR
Repo: consentdotio/monorepo PR: 0
File: .cursor/rules/docs-rules.mdc:0-0
Timestamp: 2026-01-31T11:24:55.220Z
Learning: Applies to apps/docs/src/components/**/*.tsx : Place reusable components in `src/components` within the docs app

Applied to files:

  • packages/docs/agent-docs/docs/components.md
  • packages/docs/agent-docs/docs/llms-full/authoring/components.txt
  • packages/docs/agent-docs-src/docs/components.mdx
  • README.md
📚 Learning: 2026-01-31T11:24:55.220Z
Learnt from: CR
Repo: consentdotio/monorepo PR: 0
File: .cursor/rules/docs-rules.mdc:0-0
Timestamp: 2026-01-31T11:24:55.220Z
Learning: Applies to apps/docs/app/**/page.tsx : Place page components in appropriate route segments within the docs app

Applied to files:

  • packages/docs/agent-docs/docs/llms-full/overview.txt
  • packages/docs/src/llm/llm.ts
  • packages/docs/src/internal/docs-context.ts
📚 Learning: 2026-01-31T11:24:55.220Z
Learnt from: CR
Repo: consentdotio/monorepo PR: 0
File: .cursor/rules/docs-rules.mdc:0-0
Timestamp: 2026-01-31T11:24:55.220Z
Learning: Applies to apps/docs/app/**/*.{ts,tsx} : Use Next.js App Router conventions in the docs app

Applied to files:

  • packages/docs/agent-docs/docs/llms-full/overview.txt
  • packages/docs/agent-docs/llms-full.txt
  • packages/docs/src/internal/docs-context.ts
📚 Learning: 2026-03-19T22:57:45.114Z
Learnt from: CR
Repo: consentdotio/GDPRish PR: 0
File: .cursor/rules/global-rules.mdc:0-0
Timestamp: 2026-03-19T22:57:45.114Z
Learning: Applies to **/*.{ts,tsx,js,jsx} : Implement compound components pattern with components namespaced under a single parent (e.g., FormWizard.Root, FormWizard.Step), using React Context for state management

Applied to files:

  • packages/docs/agent-docs/docs/llms-full/authoring/components.txt
  • packages/docs/agent-docs-src/docs/components.mdx
📚 Learning: 2025-07-23T12:51:43.299Z
Learnt from: CR
Repo: consentdotio/monorepo PR: 0
File: .cursor/rules/global-rules.mdc:0-0
Timestamp: 2025-07-23T12:51:43.299Z
Learning: Applies to **/*.{tsx,jsx} : Use React Context for global state management in components

Applied to files:

  • packages/docs/agent-docs/docs/llms-full/authoring/components.txt
📚 Learning: 2026-03-19T16:08:15.951Z
Learnt from: CR
Repo: consentdotio/c-ray PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-03-19T16:08:15.951Z
Learning: When adding new routes and pages, load the router-core skill file from node_modules/tanstack/router-core/skills/router-core/SKILL.md

Applied to files:

  • .agents/skills/inth-docs/SKILL.md
  • packages/docs/src/lint/runner.ts
📚 Learning: 2026-03-19T16:08:15.951Z
Learnt from: CR
Repo: consentdotio/c-ray PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-03-19T16:08:15.951Z
Learning: When setting up navigation and links between pages, load the router-core navigation skill file from node_modules/tanstack/router-core/skills/router-core/navigation/SKILL.md

Applied to files:

  • .agents/skills/inth-docs/SKILL.md
  • packages/docs/agent-docs/llms-full.txt
📚 Learning: 2026-03-19T22:57:33.411Z
Learnt from: CR
Repo: consentdotio/GDPRish PR: 0
File: .cursor/rules/elements-rules.mdc:0-0
Timestamp: 2026-03-19T22:57:33.411Z
Learning: Applies to packages/elements/**/*.{test,spec}.{ts,tsx} : Write unit tests for components in Elements package using Vitest

Applied to files:

  • packages/docs/src/remark/remark-output.test.ts
  • packages/docs/src/lint/lint.test.ts
  • packages/docs/src/llm/llm.test.ts
📚 Learning: 2025-07-23T12:51:10.961Z
Learnt from: CR
Repo: consentdotio/monorepo PR: 0
File: .cursor/rules/elements-rules.mdc:0-0
Timestamp: 2025-07-23T12:51:10.961Z
Learning: Applies to packages/elements/**/*.test.{ts,tsx} : Use Vitest for testing framework

Applied to files:

  • packages/docs/src/remark/remark-output.test.ts
  • packages/docs/src/lint/lint.test.ts
  • packages/docs/src/llm/llm.test.ts
📚 Learning: 2026-03-19T22:57:33.411Z
Learnt from: CR
Repo: consentdotio/GDPRish PR: 0
File: .cursor/rules/elements-rules.mdc:0-0
Timestamp: 2026-03-19T22:57:33.411Z
Learning: Applies to packages/elements/**/*.{test,spec}.{ts,tsx} : Use Vitest as the testing framework for Elements package

Applied to files:

  • packages/docs/src/remark/remark-output.test.ts
  • packages/docs/src/lint/lint.test.ts
  • packages/docs/src/llm/llm.test.ts
📚 Learning: 2026-03-19T22:57:33.411Z
Learnt from: CR
Repo: consentdotio/GDPRish PR: 0
File: .cursor/rules/elements-rules.mdc:0-0
Timestamp: 2026-03-19T22:57:33.411Z
Learning: Applies to packages/elements/**/*.{test,spec}.{ts,tsx} : Test accessibility features in Elements package component tests

Applied to files:

  • packages/docs/src/remark/remark-output.test.ts
  • packages/docs/src/lint/lint.test.ts
📚 Learning: 2025-07-23T12:51:10.961Z
Learnt from: CR
Repo: consentdotio/monorepo PR: 0
File: .cursor/rules/elements-rules.mdc:0-0
Timestamp: 2025-07-23T12:51:10.961Z
Learning: Applies to packages/elements/**/*.test.{ts,tsx} : Test accessibility features

Applied to files:

  • packages/docs/src/remark/remark-output.test.ts
  • packages/docs/src/lint/lint.test.ts
📚 Learning: 2025-07-23T12:51:10.961Z
Learnt from: CR
Repo: consentdotio/monorepo PR: 0
File: .cursor/rules/elements-rules.mdc:0-0
Timestamp: 2025-07-23T12:51:10.961Z
Learning: Applies to packages/elements/**/*.test.{ts,tsx} : Write unit tests for components

Applied to files:

  • packages/docs/src/remark/remark-output.test.ts
  • packages/docs/src/lint/lint.test.ts
  • packages/docs/src/llm/llm.test.ts
📚 Learning: 2026-03-19T22:57:33.411Z
Learnt from: CR
Repo: consentdotio/GDPRish PR: 0
File: .cursor/rules/elements-rules.mdc:0-0
Timestamp: 2026-03-19T22:57:33.411Z
Learning: Applies to packages/elements/**/*.{test,spec}.{ts,tsx} : Include integration tests for Elements package components

Applied to files:

  • packages/docs/src/remark/remark-output.test.ts
  • packages/docs/src/lint/lint.test.ts
📚 Learning: 2026-02-20T14:21:40.180Z
Learnt from: CR
Repo: consentdotio/dsar PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-02-20T14:21:40.180Z
Learning: Applies to **/*.test.{ts,tsx,js,jsx} : Keep test suites reasonably flat - avoid excessive `describe` nesting

Applied to files:

  • packages/docs/src/remark/remark-output.test.ts
  • packages/docs/src/lint/lint.test.ts
  • packages/docs/src/llm/llm.test.ts
📚 Learning: 2026-03-19T22:58:00.031Z
Learnt from: CR
Repo: consentdotio/GDPRish PR: 0
File: .cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc:0-0
Timestamp: 2026-03-19T22:58:00.031Z
Learning: Applies to **/*.test.{ts,tsx,js,jsx} : Write comprehensive unit tests with clear test case names describing what is being tested

Applied to files:

  • packages/docs/src/remark/remark-output.test.ts
  • packages/docs/src/llm/llm.test.ts
📚 Learning: 2026-02-20T14:21:19.208Z
Learnt from: CR
Repo: consentdotio/dsar PR: 0
File: .cursor/rules/ultracite.mdc:0-0
Timestamp: 2026-02-20T14:21:19.208Z
Learning: Applies to **/*.{test,spec}.{ts,tsx,js,jsx} : Write assertions inside `it()` or `test()` blocks

Applied to files:

  • packages/docs/src/remark/remark-output.test.ts
  • packages/docs/src/lint/lint.test.ts
📚 Learning: 2026-04-16T03:27:04.353Z
Learnt from: CR
Repo: inthhq/dsar PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-16T03:27:04.353Z
Learning: Applies to **/*.{test,spec}.{js,jsx,ts,tsx} : Write assertions inside `it()` or `test()` blocks

Applied to files:

  • packages/docs/src/remark/remark-output.test.ts
  • packages/docs/src/lint/lint.test.ts
📚 Learning: 2026-04-18T15:01:52.690Z
Learnt from: CR
Repo: inthhq/docs PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-18T15:01:52.690Z
Learning: Applies to **/*.{test,spec}.{js,ts,jsx,tsx} : Write assertions inside `it()` or `test()` blocks

Applied to files:

  • packages/docs/src/remark/remark-output.test.ts
  • packages/docs/src/lint/lint.test.ts
📚 Learning: 2026-02-20T14:21:40.180Z
Learnt from: CR
Repo: consentdotio/dsar PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-02-20T14:21:40.180Z
Learning: Applies to **/*.test.{ts,tsx,js,jsx} : Write assertions inside `it()` or `test()` blocks

Applied to files:

  • packages/docs/src/remark/remark-output.test.ts
  • packages/docs/src/lint/lint.test.ts
📚 Learning: 2026-02-19T01:12:44.177Z
Learnt from: CR
Repo: consentdotio/agent-skills PR: 0
File: tsdoc-jsdoc-authoring/AGENTS.md:0-0
Timestamp: 2026-02-19T01:12:44.177Z
Learning: Applies to tsdoc-jsdoc-authoring/**/*.{js,jsx} : Add practical `example` snippets in JSDoc comments

Applied to files:

  • packages/docs/src/remark/remark-output.test.ts
📚 Learning: 2025-12-17T14:48:41.563Z
Learnt from: CR
Repo: consentdotio/c15t-docs PR: 0
File: .cursor/rules/ultracite.mdc:0-0
Timestamp: 2025-12-17T14:48:41.563Z
Learning: Applies to **/*.{ts,tsx,js,jsx} : Make sure the assertion function, like expect, is placed inside an it() function call

Applied to files:

  • packages/docs/src/remark/remark-output.test.ts
  • packages/docs/src/lint/lint.test.ts
📚 Learning: 2025-12-17T14:48:41.563Z
Learnt from: CR
Repo: consentdotio/c15t-docs PR: 0
File: .cursor/rules/ultracite.mdc:0-0
Timestamp: 2025-12-17T14:48:41.563Z
Learning: Applies to **/*.{ts,tsx,js,jsx} : Declare regex literals at the top level

Applied to files:

  • packages/docs/src/convert/convert.ts
  • packages/docs/src/llm/llm.ts
📚 Learning: 2026-04-18T15:01:52.690Z
Learnt from: CR
Repo: inthhq/docs PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-18T15:01:52.690Z
Learning: Applies to **/*.{js,ts,jsx,tsx} : Use meaningful variable names instead of magic numbers - extract constants with descriptive names

Applied to files:

  • packages/docs/src/convert/convert.ts
📚 Learning: 2026-02-20T14:21:40.180Z
Learnt from: CR
Repo: consentdotio/dsar PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-02-20T14:21:40.180Z
Learning: Applies to **/*.{ts,tsx,js,jsx} : Use top-level regex literals instead of creating them in loops

Applied to files:

  • packages/docs/src/convert/convert.ts
📚 Learning: 2026-04-18T15:01:52.690Z
Learnt from: CR
Repo: inthhq/docs PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-18T15:01:52.690Z
Learning: Applies to **/*.{js,ts,jsx,tsx} : Use top-level regex literals instead of creating them in loops

Applied to files:

  • packages/docs/src/convert/convert.ts
📚 Learning: 2026-04-16T03:27:04.353Z
Learnt from: CR
Repo: inthhq/dsar PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-16T03:27:04.353Z
Learning: Applies to **/*.{js,jsx,ts,tsx} : Use meaningful variable names instead of magic numbers - extract constants with descriptive names

Applied to files:

  • packages/docs/src/convert/convert.ts
📚 Learning: 2026-02-20T14:21:40.180Z
Learnt from: CR
Repo: consentdotio/dsar PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-02-20T14:21:40.180Z
Learning: Applies to **/*.{ts,tsx,js,jsx} : Use meaningful variable names instead of magic numbers - extract constants with descriptive names

Applied to files:

  • packages/docs/src/convert/convert.ts
📚 Learning: 2025-07-23T12:51:43.299Z
Learnt from: CR
Repo: consentdotio/monorepo PR: 0
File: .cursor/rules/global-rules.mdc:0-0
Timestamp: 2025-07-23T12:51:43.299Z
Learning: Applies to **/*.{test,spec}.{ts,tsx,js,jsx} : Include accessibility tests for components

Applied to files:

  • packages/docs/src/lint/lint.test.ts
📚 Learning: 2025-07-23T12:51:10.961Z
Learnt from: CR
Repo: consentdotio/monorepo PR: 0
File: .cursor/rules/elements-rules.mdc:0-0
Timestamp: 2025-07-23T12:51:10.961Z
Learning: Applies to packages/elements/**/*.test.{ts,tsx} : Include integration tests

Applied to files:

  • packages/docs/src/lint/lint.test.ts
📚 Learning: 2026-02-20T14:21:19.208Z
Learnt from: CR
Repo: consentdotio/dsar PR: 0
File: .cursor/rules/ultracite.mdc:0-0
Timestamp: 2026-02-20T14:21:19.208Z
Learning: Applies to **/*.{test,spec}.{ts,tsx,js,jsx} : Keep test suites reasonably flat - avoid excessive `describe` nesting

Applied to files:

  • packages/docs/src/lint/lint.test.ts
  • packages/docs/src/llm/llm.test.ts
📚 Learning: 2026-03-19T22:57:19.913Z
Learnt from: CR
Repo: consentdotio/GDPRish PR: 0
File: .cursor/rules/docs-rules.mdc:0-0
Timestamp: 2026-03-19T22:57:19.913Z
Learning: Applies to apps/docs/app/**/* : Use Next.js App Router conventions

Applied to files:

  • packages/docs/agent-docs/llms-full.txt
📚 Learning: 2025-07-23T12:51:10.961Z
Learnt from: CR
Repo: consentdotio/monorepo PR: 0
File: .cursor/rules/elements-rules.mdc:0-0
Timestamp: 2025-07-23T12:51:10.961Z
Learning: Applies to packages/elements/**/*.{ts,tsx} : Implement full TypeScript support

Applied to files:

  • packages/docs/src/llm/llm.ts
📚 Learning: 2025-12-17T14:48:41.563Z
Learnt from: CR
Repo: consentdotio/c15t-docs PR: 0
File: .cursor/rules/ultracite.mdc:0-0
Timestamp: 2025-12-17T14:48:41.563Z
Learning: Applies to **/*.{ts,tsx,js,jsx} : Make sure JSDoc comment lines start with a single asterisk, except for the first one

Applied to files:

  • packages/docs/src/llm/llm.ts
📚 Learning: 2026-01-31T11:24:55.220Z
Learnt from: CR
Repo: consentdotio/monorepo PR: 0
File: .cursor/rules/docs-rules.mdc:0-0
Timestamp: 2026-01-31T11:24:55.220Z
Learning: Applies to apps/docs/app/**/{layout,page}.tsx : Keep layouts and pages separate in the docs app directory

Applied to files:

  • packages/docs/src/llm/llm.ts
  • packages/docs/src/internal/docs-context.ts
📚 Learning: 2026-02-19T01:12:44.177Z
Learnt from: CR
Repo: consentdotio/agent-skills PR: 0
File: tsdoc-jsdoc-authoring/AGENTS.md:0-0
Timestamp: 2026-02-19T01:12:44.177Z
Learning: Applies to tsdoc-jsdoc-authoring/**/*.{js,jsx} : Use `module` for module-level docs in JSDoc comments

Applied to files:

  • packages/docs/src/internal/docs-context.ts
📚 Learning: 2026-03-19T22:57:33.411Z
Learnt from: CR
Repo: consentdotio/GDPRish PR: 0
File: .cursor/rules/elements-rules.mdc:0-0
Timestamp: 2026-03-19T22:57:33.411Z
Learning: Applies to packages/elements/**/*.{ts,tsx,md} : Include TypeScript examples in Elements package documentation

Applied to files:

  • packages/docs/src/internal/docs-context.ts
📚 Learning: 2026-02-19T01:12:44.177Z
Learnt from: CR
Repo: consentdotio/agent-skills PR: 0
File: tsdoc-jsdoc-authoring/AGENTS.md:0-0
Timestamp: 2026-02-19T01:12:44.177Z
Learning: Applies to tsdoc-jsdoc-authoring/**/*.{js,jsx} : Use nested property namepaths for object inputs in JSDoc comments

Applied to files:

  • packages/docs/src/internal/docs-context.ts
📚 Learning: 2026-03-19T22:57:19.913Z
Learnt from: CR
Repo: consentdotio/GDPRish PR: 0
File: .cursor/rules/docs-rules.mdc:0-0
Timestamp: 2026-03-19T22:57:19.913Z
Learning: Applies to apps/docs/app/**/page.tsx : Place page components in appropriate route segments

Applied to files:

  • packages/docs/src/internal/docs-context.ts
📚 Learning: 2026-04-18T15:01:52.690Z
Learnt from: CR
Repo: inthhq/docs PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-18T15:01:52.690Z
Learning: Applies to **/*.{test,spec}.{js,ts,jsx,tsx} : Keep test suites reasonably flat - avoid excessive `describe` nesting

Applied to files:

  • packages/docs/src/llm/llm.test.ts
📚 Learning: 2026-04-16T03:27:04.353Z
Learnt from: CR
Repo: inthhq/dsar PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-16T03:27:04.353Z
Learning: Applies to **/*.{test,spec}.{js,jsx,ts,tsx} : Keep test suites reasonably flat - avoid excessive `describe` nesting

Applied to files:

  • packages/docs/src/llm/llm.test.ts
📚 Learning: 2025-12-17T14:48:41.563Z
Learnt from: CR
Repo: consentdotio/c15t-docs PR: 0
File: .cursor/rules/ultracite.mdc:0-0
Timestamp: 2025-12-17T14:48:41.563Z
Learning: Applies to **/*.{ts,tsx,js,jsx} : Make sure all anchors are valid and navigable

Applied to files:

  • packages/docs/src/lint/runner.ts
📚 Learning: 2026-03-19T16:08:15.951Z
Learnt from: CR
Repo: consentdotio/c-ray PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-03-19T16:08:15.951Z
Learning: When fetching data in route loaders, load the router-core data-loading skill file from node_modules/tanstack/router-core/skills/router-core/data-loading/SKILL.md

Applied to files:

  • packages/docs/src/lint/runner.ts
📚 Learning: 2025-12-01T15:20:25.102Z
Learnt from: CR
Repo: consentdotio/c15t-docs PR: 0
File: .cursor/rules/open-graph.mdc:0-0
Timestamp: 2025-12-01T15:20:25.102Z
Learning: Applies to src/**/route.{ts,tsx} : Cache fonts and assets to avoid fetching on every request; prefer inline or base64 image sources when data is already in memory

Applied to files:

  • packages/docs/src/lint/runner.ts
📚 Learning: 2025-12-01T15:20:25.102Z
Learnt from: CR
Repo: consentdotio/c15t-docs PR: 0
File: .cursor/rules/open-graph.mdc:0-0
Timestamp: 2025-12-01T15:20:25.102Z
Learning: Applies to src/**/route.{ts,tsx} : Avoid fetching arbitrary external images or fonts at render time unless they are proxied and cached to prevent latency and failures

Applied to files:

  • packages/docs/src/lint/runner.ts
🪛 LanguageTool
packages/docs/agent-docs/docs/index.md

[style] ~30-~30: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...der or component flattening behavior. * Read LLM when generating `llms....

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~31-~31: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...or topic-scoped full-context bundles. * Read Lint when validating fron...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)

packages/docs/agent-docs/docs/components.md

[grammar] ~49-~49: Use a hyphen to join words.
Context: ...ageCommandTabs` Use for package-manager specific install or run commands. ```ts...

(QB_NEW_EN_HYPHEN)

packages/docs/agent-docs/docs/llms.txt

[uncategorized] ~26-~26: Did you mean the formatting language “Markdown” (= proper noun)?
Context: .../convert): How to convert MDX docs into markdown with @inth/docs/convert. - [LLM](https:...

(MARKDOWN_NNP)

packages/docs/agent-docs-src/docs/index.mdx

[style] ~29-~29: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...der or component flattening behavior. - Read LLM when generating `llms....

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~30-~30: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...or topic-scoped full-context bundles. - Read Lint when validating fron...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)

packages/docs/agent-docs/docs/llms-full/generation/convert.txt

[uncategorized] ~7-~7: Did you mean the formatting language “Markdown” (= proper noun)?
Context: .../convert): How to convert MDX docs into markdown with @inth/docs/convert. ## Content #...

(MARKDOWN_NNP)


[uncategorized] ~13-~13: Did you mean the formatting language “Markdown” (= proper noun)?
Context: ...cs/convert How to convert MDX docs into markdown with @inth/docs/convert. # Convert Th...

(MARKDOWN_NNP)

packages/docs/agent-docs/docs/llms-full/overview.txt

[style] ~38-~38: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...der or component flattening behavior. * Read LLM when generating `llms....

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~39-~39: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...or topic-scoped full-context bundles. * Read Lint when validating fron...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)

packages/docs/agent-docs/docs/llms-full/authoring/components.txt

[grammar] ~59-~59: Use a hyphen to join words.
Context: ...ageCommandTabs` Use for package-manager specific install or run commands. ```ts...

(QB_NEW_EN_HYPHEN)

.agents/skills/inth-docs/SKILL.md

[style] ~27-~27: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...le, and convertAllMdx. - remark.mdfordefaultRemarkPlugins, remarkInclude`...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~28-~28: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...clude, and plugin ordering. - llm.mdforgenerateLLMSummaries, generateLLMFul...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~29-~29: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...llFiles, and topic design. - lint.mdforlintDocs, schema overrides, and inth...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)

packages/docs/agent-docs-src/docs/components.mdx

[grammar] ~50-~50: Use a hyphen to join words.
Context: ...ageCommandTabs` Use for package-manager specific install or run commands. ```ts...

(QB_NEW_EN_HYPHEN)

packages/docs/agent-docs/llms.txt

[uncategorized] ~14-~14: Did you mean the formatting language “Markdown” (= proper noun)?
Context: .../convert): How to convert MDX docs into markdown with @inth/docs/convert. - [LLM](https:...

(MARKDOWN_NNP)

🔍 Remote MCP

Now let me search for more specific information about MDX and markdown transformation patterns.Based on my research, I can now provide you with focused context relevant to reviewing this PR. The PR implements MDX-to-markdown conversion with remark plugins—a well-established pattern in the ecosystem.

Summary of Additional Context Found

Remark Plugin Architecture & MDX Transformation

The remark plugin system enables parsing and serializing MDX extensions (JSX, export/import, and expressions). MDX transpilation has two intermediate steps—Markdown AST (MDAST) and Hypertext AST (HAST)—with remark plugins processing the Markdown AST and rehype plugins processing the Hypertext AST.

Key Technical Pattern for PR Changes

A remark/rehype plugin is a function that receives options and returns a transformer operating on the AST, with a second parameter (vfile) that provides access to the current markdown file's path. This pattern is directly relevant to the PR's changes:

  1. doc-placeholders.remark.ts uses this architecture—the plugin receives a file path and derives document context to resolve placeholders in URL-like fields
  2. remarkResolveDocPlaceholders insertion into the plugin pipeline (after remarkRemoveImports) aligns with standard remark composition patterns

Nested Topic Generation Pattern

When parsing markdown files with remark, content is transformed into an abstract syntax tree (AST) that can be manipulated using plugins. The PR's nested topic support for generateLLMFullFiles follows this AST traversal pattern to build hierarchical router files—a common extension pattern.

Placeholder & Link Resolution Context

The PR's new link validation rules (invalid-link, unresolved-placeholder, cross-framework-link) and placeholder resolution in frontmatter align with established MDX customization patterns where frontmatter properties can be modified or computed using remark/rehype plugins by updating the file's frontmatter property.

Dependency & Configuration Notes

  • The PR adds remarkInclude alongside defaultRemarkPlugins for partial expansion, which is a standard composition pattern in remark-based pipelines
  • The enrichFrontmatterFromGit option in convertAllMdx follows the vfile-based metadata enrichment approach

Comment thread packages/docs/agent-docs-src/docs/components.mdx Outdated
Comment thread packages/docs/agent-docs/docs/components.md Outdated
Comment thread packages/docs/agent-docs/docs/components.md Outdated
Comment thread packages/docs/agent-docs/docs/convert.md Outdated
Comment thread packages/docs/agent-docs/docs/llms.txt Outdated
Comment thread packages/docs/src/lint/cli.ts Outdated
Comment thread packages/docs/src/lint/runner.ts Outdated
Comment thread packages/docs/src/llm/llm.ts
Comment thread packages/docs/src/llm/llm.ts
Comment thread packages/docs/src/remark/plugins/doc-placeholders.remark.ts Outdated
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
packages/docs/src/llm/llm.ts (1)

563-597: ⚠️ Potential issue | 🟠 Major

Fail fast when a leaf topic matches no docs.

renderTopicDocument() currently emits a topic file with empty “Included Pages” and “Content” sections when includePrefixes matches nothing. A typo in topic config will ship a hollow router target instead of surfacing the bad prefix during generation.

Proposed fix
 function renderTopicDocument(
   product: Pick<ProductInfo, "name">,
   topic: ResolvedLeafTopic,
   docs: MarkdownDoc[]
 ): string {
   const topicDocs = docs.filter((doc) =>
     isIncluded(doc.relativePath, topic.includePrefixes)
   );
+  if (topicDocs.length === 0) {
+    throw new Error(
+      `Topic "${topic.segmentPath.join("/")}" matched no generated docs. Check includePrefixes: ${topic.includePrefixes.join(", ")}`
+    );
+  }
+
   const links = topicDocs.map((doc) => ({
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/docs/src/llm/llm.ts` around lines 563 - 597, renderTopicDocument
currently produces an empty topic file when no docs match topic.includePrefixes;
detect when topicDocs (the filtered array in renderTopicDocument) is empty and
fail fast by throwing a clear error (or calling a generator-level failure) that
includes the topic.title and topic.includePrefixes so the misconfigured leaf
topic is surfaced during build rather than emitting a hollow "Included
Pages"/"Content" section. Ensure the check happens before creating
links/contentBlocks and use the same function name (renderTopicDocument) and
variables (topic, topic.includePrefixes, topicDocs) to locate where to insert
the guard.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@packages/docs/src/internal/docs-context.test.ts`:
- Around line 5-21: Add explicit Windows-style path test cases to the
deriveDocContext tests to ensure backslash normalization works: in
packages/docs/src/internal/docs-context.test.ts add tests that call
deriveDocContext with Windows paths like
"\\tmp\\docs\\frameworks\\vue\\quickstart.mdx" and
"\\tmp\\docs\\shared\\concepts\\common.mdx" (or similar) and assert the same
expected objects (framework: "vue", frameworkDocsBase: "/docs/frameworks/vue"
and framework: null, frameworkDocsBase: null). This verifies
normalizePath-driven behavior in deriveDocContext and prevents regressions.

In `@packages/docs/src/lint/runner.ts`:
- Around line 216-227: collectMarkdownUrls currently only visits "link" nodes so
reference-style links are ignored; update it to also handle "definition" and
"linkReference" nodes from the remark AST: visit "definition" nodes and push
their url (if it matches /docs/ or hasDocPlaceholder), and visit "linkReference"
nodes and resolve them to the corresponding "definition" by identifier/reference
in the parsed tree and push that definition's url when it matches the same
checks; keep the existing hasDocPlaceholder and /docs/ checks and use the same
UrlCandidate shape so validateDocUrls() will see reference-style links.
- Around line 192-214: collectFrontmatterUrls is currently treating any string
containing a placeholder as a URL candidate, causing non-URL fields
(title/description) to be validated; fix by only treating placeholder-only
strings as URL candidates when the frontmatter key is URL-like. Update
collectFrontmatterUrls to: keep the existing short-circuit for values that
startWith("/docs/"), but when hasDocPlaceholder(value) is true, only return a
UrlCandidate if the field name (the last segment of the path, e.g., derived from
path like "sidebar.link[0].url") is in an allowlist such as
['url','href','to','permalink','path','link']; implement the key-extraction
logic from the path and use that allowlist, and apply the same change to the
other similar collector block later in the file that currently mirrors this
behavior.

In `@packages/docs/src/llm/llm.ts`:
- Around line 432-476: In resolveTopics, sibling topics with the same slug
silently collide; before returning the mapped ResolvedTopic[] detect duplicate
slugs among topics for the same parentPath and throw an Error identifying the
parent segmentPath and the duplicate slug(s). Locate the resolveTopics function
and, just after computing each topic's slug/segmentPath (or before mapping
returns), build a set/map of slugs for the incoming topics array (same
parentPath) to find duplicates and throw a descriptive Error (include
segmentPath.join("/") and the duplicate slug) so duplicates are rejected; apply
the same duplicate-check logic to the analogous code block around the other
resolve/resolve-like function referenced at lines 608-612.

---

Outside diff comments:
In `@packages/docs/src/llm/llm.ts`:
- Around line 563-597: renderTopicDocument currently produces an empty topic
file when no docs match topic.includePrefixes; detect when topicDocs (the
filtered array in renderTopicDocument) is empty and fail fast by throwing a
clear error (or calling a generator-level failure) that includes the topic.title
and topic.includePrefixes so the misconfigured leaf topic is surfaced during
build rather than emitting a hollow "Included Pages"/"Content" section. Ensure
the check happens before creating links/contentBlocks and use the same function
name (renderTopicDocument) and variables (topic, topic.includePrefixes,
topicDocs) to locate where to insert the guard.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: f3d57780-79b3-4876-92ec-9bae6999287c

📥 Commits

Reviewing files that changed from the base of the PR and between a30c968 and 6147678.

📒 Files selected for processing (21)
  • README.md
  • packages/docs/README.md
  • packages/docs/agent-docs-src/docs/components.mdx
  • packages/docs/agent-docs-src/docs/convert.mdx
  • packages/docs/agent-docs/docs/components.md
  • packages/docs/agent-docs/docs/convert.md
  • packages/docs/agent-docs/docs/llms-full/authoring/components.txt
  • packages/docs/agent-docs/docs/llms-full/generation/convert.txt
  • packages/docs/agent-docs/docs/llms.txt
  • packages/docs/agent-docs/llms.txt
  • packages/docs/package.json
  • packages/docs/scripts/generate-agent-docs.ts
  • packages/docs/src/internal/docs-context.test.ts
  • packages/docs/src/internal/docs-context.ts
  • packages/docs/src/lint/cli.ts
  • packages/docs/src/lint/lint.test.ts
  • packages/docs/src/lint/runner.ts
  • packages/docs/src/llm/llm.test.ts
  • packages/docs/src/llm/llm.ts
  • packages/docs/src/remark/plugins/doc-placeholders.remark.ts
  • packages/docs/src/remark/remark-output.test.ts
📜 Review details
🧰 Additional context used
📓 Path-based instructions (3)
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{ts,tsx}: Use explicit types for function parameters and return values when they enhance clarity
Prefer unknown over any when the type is genuinely unknown
Use const assertions (as const) for immutable values and literal types
Leverage TypeScript's type narrowing instead of type assertions

Files:

  • packages/docs/src/internal/docs-context.test.ts
  • packages/docs/src/lint/cli.ts
  • packages/docs/src/lint/lint.test.ts
  • packages/docs/scripts/generate-agent-docs.ts
  • packages/docs/src/llm/llm.ts
  • packages/docs/src/llm/llm.test.ts
  • packages/docs/src/remark/plugins/doc-placeholders.remark.ts
  • packages/docs/src/internal/docs-context.ts
  • packages/docs/src/remark/remark-output.test.ts
  • packages/docs/src/lint/runner.ts
**/*.{js,ts,jsx,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{js,ts,jsx,tsx}: Use meaningful variable names instead of magic numbers - extract constants with descriptive names
Use arrow functions for callbacks and short functions
Prefer for...of loops over .forEach() and indexed for loops
Use optional chaining (?.) and nullish coalescing (??) for safer property access
Prefer template literals over string concatenation
Use destructuring for object and array assignments
Use const by default, let only when reassignment is needed, never var
Always await promises in async functions - don't forget to use the return value
Use async/await syntax instead of promise chains for better readability
Handle errors appropriately in async code with try-catch blocks
Don't use async functions as Promise executors
Remove console.log, debugger, and alert statements from production code
Throw Error objects with descriptive messages, not strings or other values
Use try-catch blocks meaningfully - don't catch errors just to rethrow them
Prefer early returns over nested conditionals for error cases
Extract complex conditions into well-named boolean variables
Use early returns to reduce nesting
Prefer simple conditionals over nested ternary operators
Don't use eval() or assign directly to document.cookie
Avoid spread syntax in accumulators within loops
Use top-level regex literals instead of creating them in loops
Prefer specific imports over namespace imports
Use descriptive names for functions, variables, and types for meaningful naming
Add comments for complex logic, but prefer self-documenting code

Files:

  • packages/docs/src/internal/docs-context.test.ts
  • packages/docs/src/lint/cli.ts
  • packages/docs/src/lint/lint.test.ts
  • packages/docs/scripts/generate-agent-docs.ts
  • packages/docs/src/llm/llm.ts
  • packages/docs/src/llm/llm.test.ts
  • packages/docs/src/remark/plugins/doc-placeholders.remark.ts
  • packages/docs/src/internal/docs-context.ts
  • packages/docs/src/remark/remark-output.test.ts
  • packages/docs/src/lint/runner.ts
**/*.{test,spec}.{js,ts,jsx,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{test,spec}.{js,ts,jsx,tsx}: Write assertions inside it() or test() blocks
Avoid done callbacks in async tests - use async/await instead
Don't use .only or .skip in committed code
Keep test suites reasonably flat - avoid excessive describe nesting

Files:

  • packages/docs/src/internal/docs-context.test.ts
  • packages/docs/src/lint/lint.test.ts
  • packages/docs/src/llm/llm.test.ts
  • packages/docs/src/remark/remark-output.test.ts
🧠 Learnings (65)
📓 Common learnings
Learnt from: CR
Repo: consentdotio/GDPRish PR: 0
File: .cursor/rules/docs-rules.mdc:0-0
Timestamp: 2026-03-19T22:57:19.913Z
Learning: Applies to apps/docs/**/*.mdx : Use MDX for documentation pages
Learnt from: CR
Repo: consentdotio/monorepo PR: 0
File: .cursor/rules/docs-rules.mdc:0-0
Timestamp: 2026-01-31T11:24:55.220Z
Learning: Applies to apps/docs/**/*.mdx : Use MDX for documentation pages in the docs app
Learnt from: CR
Repo: consentdotio/monorepo PR: 0
File: .cursor/rules/docs-rules.mdc:0-0
Timestamp: 2026-01-31T11:24:55.220Z
Learning: Applies to apps/docs/**/*.mdx : Include code examples where appropriate in MDX documentation pages of the docs app
Learnt from: CR
Repo: consentdotio/GDPRish PR: 0
File: .cursor/rules/docs-rules.mdc:0-0
Timestamp: 2026-03-19T22:57:19.913Z
Learning: Applies to apps/docs/**/*.mdx : Keep documentation organized by categories
Learnt from: CR
Repo: consentdotio/GDPRish PR: 0
File: .cursor/rules/docs-rules.mdc:0-0
Timestamp: 2026-03-19T22:57:19.913Z
Learning: Applies to apps/docs/**/*.mdx : Include code examples where appropriate in documentation
Learnt from: CR
Repo: consentdotio/agent-skills PR: 0
File: tsdoc-jsdoc-authoring/AGENTS.md:0-0
Timestamp: 2026-02-19T01:12:44.177Z
Learning: Applies to tsdoc-jsdoc-authoring/**/*.{js,jsx} : Document generator output with `yields` in JSDoc comments
Learnt from: CR
Repo: consentdotio/agent-skills PR: 0
File: tsdoc-jsdoc-authoring/AGENTS.md:0-0
Timestamp: 2026-02-19T01:12:44.177Z
Learning: Applies to tsdoc-jsdoc-authoring/**/*.{js,jsx} : Write JSDoc summaries with intent in JavaScript files
Learnt from: CR
Repo: consentdotio/GDPRish PR: 0
File: .cursor/rules/elements-rules.mdc:0-0
Timestamp: 2026-03-19T22:57:33.411Z
Learning: Applies to packages/elements/**/*.{ts,tsx,md} : Include TypeScript examples in Elements package documentation
Learnt from: CR
Repo: consentdotio/agent-skills PR: 0
File: tsdoc-jsdoc-authoring/AGENTS.md:0-0
Timestamp: 2026-02-19T01:12:44.177Z
Learning: Applies to tsdoc-jsdoc-authoring/**/*.{ts,tsx,js,jsx} : Use `remarks` for long-form context in TSDoc and JSDoc comments
Learnt from: CR
Repo: consentdotio/agent-skills PR: 0
File: tsdoc-jsdoc-authoring/AGENTS.md:0-0
Timestamp: 2026-02-19T01:12:44.177Z
Learning: Applies to tsdoc-jsdoc-authoring/**/index.{ts,tsx} : Use `packageDocumentation` for entrypoint docs in TSDoc comments
📚 Learning: 2026-01-31T11:24:55.220Z
Learnt from: CR
Repo: consentdotio/monorepo PR: 0
File: .cursor/rules/docs-rules.mdc:0-0
Timestamp: 2026-01-31T11:24:55.220Z
Learning: Applies to apps/docs/**/*.mdx : Include code examples where appropriate in MDX documentation pages of the docs app

Applied to files:

  • packages/docs/agent-docs/docs/llms.txt
  • packages/docs/agent-docs/llms.txt
  • README.md
  • packages/docs/README.md
  • packages/docs/agent-docs/docs/llms-full/generation/convert.txt
  • packages/docs/agent-docs-src/docs/components.mdx
  • packages/docs/agent-docs/docs/llms-full/authoring/components.txt
  • packages/docs/agent-docs/docs/convert.md
  • packages/docs/agent-docs/docs/components.md
  • packages/docs/agent-docs-src/docs/convert.mdx
  • packages/docs/src/remark/remark-output.test.ts
📚 Learning: 2026-03-19T22:57:19.913Z
Learnt from: CR
Repo: consentdotio/GDPRish PR: 0
File: .cursor/rules/docs-rules.mdc:0-0
Timestamp: 2026-03-19T22:57:19.913Z
Learning: Applies to apps/docs/**/*.mdx : Include code examples where appropriate in documentation

Applied to files:

  • packages/docs/agent-docs/docs/llms.txt
  • packages/docs/agent-docs/llms.txt
  • README.md
  • packages/docs/agent-docs/docs/llms-full/generation/convert.txt
  • packages/docs/agent-docs-src/docs/components.mdx
  • packages/docs/agent-docs/docs/llms-full/authoring/components.txt
  • packages/docs/agent-docs/docs/convert.md
  • packages/docs/agent-docs/docs/components.md
  • packages/docs/agent-docs-src/docs/convert.mdx
  • packages/docs/src/remark/remark-output.test.ts
📚 Learning: 2026-03-19T22:57:19.913Z
Learnt from: CR
Repo: consentdotio/GDPRish PR: 0
File: .cursor/rules/docs-rules.mdc:0-0
Timestamp: 2026-03-19T22:57:19.913Z
Learning: Applies to apps/docs/**/*.mdx : Use MDX for documentation pages

Applied to files:

  • packages/docs/agent-docs/docs/llms.txt
  • packages/docs/agent-docs/llms.txt
  • README.md
  • packages/docs/README.md
  • packages/docs/agent-docs/docs/llms-full/generation/convert.txt
  • packages/docs/agent-docs-src/docs/components.mdx
  • packages/docs/agent-docs/docs/llms-full/authoring/components.txt
  • packages/docs/agent-docs/docs/convert.md
  • packages/docs/agent-docs/docs/components.md
  • packages/docs/src/llm/llm.ts
  • packages/docs/agent-docs-src/docs/convert.mdx
📚 Learning: 2026-01-31T11:24:55.220Z
Learnt from: CR
Repo: consentdotio/monorepo PR: 0
File: .cursor/rules/docs-rules.mdc:0-0
Timestamp: 2026-01-31T11:24:55.220Z
Learning: Applies to apps/docs/**/*.mdx : Use MDX for documentation pages in the docs app

Applied to files:

  • packages/docs/agent-docs/docs/llms.txt
  • packages/docs/agent-docs/llms.txt
  • README.md
  • packages/docs/README.md
  • packages/docs/agent-docs/docs/llms-full/generation/convert.txt
  • packages/docs/agent-docs-src/docs/components.mdx
  • packages/docs/agent-docs/docs/llms-full/authoring/components.txt
  • packages/docs/agent-docs/docs/convert.md
  • packages/docs/agent-docs/docs/components.md
  • packages/docs/src/llm/llm.ts
  • packages/docs/agent-docs-src/docs/convert.mdx
📚 Learning: 2026-03-19T22:57:19.913Z
Learnt from: CR
Repo: consentdotio/GDPRish PR: 0
File: .cursor/rules/docs-rules.mdc:0-0
Timestamp: 2026-03-19T22:57:19.913Z
Learning: Applies to apps/docs/**/*.mdx : Keep documentation organized by categories

Applied to files:

  • packages/docs/agent-docs/docs/llms.txt
  • packages/docs/agent-docs/llms.txt
  • README.md
  • packages/docs/README.md
  • packages/docs/agent-docs/docs/llms-full/generation/convert.txt
  • packages/docs/agent-docs-src/docs/components.mdx
  • packages/docs/agent-docs/docs/llms-full/authoring/components.txt
  • packages/docs/agent-docs/docs/convert.md
  • packages/docs/agent-docs/docs/components.md
  • packages/docs/src/llm/llm.ts
  • packages/docs/agent-docs-src/docs/convert.mdx
  • packages/docs/src/lint/runner.ts
📚 Learning: 2026-03-19T22:57:45.114Z
Learnt from: CR
Repo: consentdotio/GDPRish PR: 0
File: .cursor/rules/global-rules.mdc:0-0
Timestamp: 2026-03-19T22:57:45.114Z
Learning: Applies to **/*.{ts,tsx,js,jsx} : Document components with purpose and use case, required and optional props, context requirements, example usage, and common pitfalls

Applied to files:

  • packages/docs/agent-docs/docs/llms.txt
  • packages/docs/agent-docs-src/docs/components.mdx
  • packages/docs/agent-docs/docs/llms-full/authoring/components.txt
  • packages/docs/agent-docs/docs/components.md
  • packages/docs/src/llm/llm.ts
  • packages/docs/src/internal/docs-context.ts
📚 Learning: 2025-07-23T12:51:43.299Z
Learnt from: CR
Repo: consentdotio/monorepo PR: 0
File: .cursor/rules/global-rules.mdc:0-0
Timestamp: 2025-07-23T12:51:43.299Z
Learning: Applies to **/*.{tsx,jsx} : For each component, documentation should include: purpose and use case, required and optional props, context requirements, example usage, and common pitfalls

Applied to files:

  • packages/docs/agent-docs/docs/llms.txt
  • packages/docs/agent-docs-src/docs/components.mdx
  • packages/docs/agent-docs/docs/llms-full/authoring/components.txt
  • packages/docs/agent-docs/docs/components.md
📚 Learning: 2026-02-19T01:12:44.177Z
Learnt from: CR
Repo: consentdotio/agent-skills PR: 0
File: tsdoc-jsdoc-authoring/AGENTS.md:0-0
Timestamp: 2026-02-19T01:12:44.177Z
Learning: Applies to tsdoc-jsdoc-authoring/**/*.{js,jsx} : Write JSDoc summaries with intent in JavaScript files

Applied to files:

  • packages/docs/agent-docs/docs/llms.txt
  • README.md
  • packages/docs/README.md
  • packages/docs/scripts/generate-agent-docs.ts
  • packages/docs/src/llm/llm.ts
  • packages/docs/src/internal/docs-context.ts
📚 Learning: 2026-02-19T01:12:44.177Z
Learnt from: CR
Repo: consentdotio/agent-skills PR: 0
File: tsdoc-jsdoc-authoring/AGENTS.md:0-0
Timestamp: 2026-02-19T01:12:44.177Z
Learning: Applies to tsdoc-jsdoc-authoring/**/*.{ts,tsx,js,jsx} : Write clear summary sentences in TSDoc and JSDoc comments

Applied to files:

  • packages/docs/agent-docs/docs/llms.txt
  • README.md
  • packages/docs/README.md
  • packages/docs/scripts/generate-agent-docs.ts
  • packages/docs/src/llm/llm.ts
  • packages/docs/src/internal/docs-context.ts
📚 Learning: 2025-07-23T12:51:10.961Z
Learnt from: CR
Repo: consentdotio/monorepo PR: 0
File: .cursor/rules/elements-rules.mdc:0-0
Timestamp: 2025-07-23T12:51:10.961Z
Learning: Applies to packages/elements/**/*.test.{ts,tsx} : Use Vitest for testing framework

Applied to files:

  • packages/docs/src/internal/docs-context.test.ts
  • packages/docs/src/lint/lint.test.ts
  • packages/docs/src/llm/llm.test.ts
  • packages/docs/src/remark/remark-output.test.ts
📚 Learning: 2026-03-19T22:57:33.411Z
Learnt from: CR
Repo: consentdotio/GDPRish PR: 0
File: .cursor/rules/elements-rules.mdc:0-0
Timestamp: 2026-03-19T22:57:33.411Z
Learning: Applies to packages/elements/**/*.{test,spec}.{ts,tsx} : Write unit tests for components in Elements package using Vitest

Applied to files:

  • packages/docs/src/internal/docs-context.test.ts
  • packages/docs/src/lint/lint.test.ts
  • packages/docs/src/llm/llm.test.ts
  • packages/docs/src/remark/remark-output.test.ts
📚 Learning: 2026-02-20T14:21:40.180Z
Learnt from: CR
Repo: consentdotio/dsar PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-02-20T14:21:40.180Z
Learning: Applies to **/*.test.{ts,tsx,js,jsx} : Keep test suites reasonably flat - avoid excessive `describe` nesting

Applied to files:

  • packages/docs/src/internal/docs-context.test.ts
  • packages/docs/src/lint/lint.test.ts
  • packages/docs/src/llm/llm.test.ts
📚 Learning: 2026-02-20T14:21:19.208Z
Learnt from: CR
Repo: consentdotio/dsar PR: 0
File: .cursor/rules/ultracite.mdc:0-0
Timestamp: 2026-02-20T14:21:19.208Z
Learning: Applies to **/*.{test,spec}.{ts,tsx,js,jsx} : Keep test suites reasonably flat - avoid excessive `describe` nesting

Applied to files:

  • packages/docs/src/internal/docs-context.test.ts
  • packages/docs/src/lint/lint.test.ts
  • packages/docs/src/llm/llm.test.ts
📚 Learning: 2026-03-19T22:58:00.031Z
Learnt from: CR
Repo: consentdotio/GDPRish PR: 0
File: .cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc:0-0
Timestamp: 2026-03-19T22:58:00.031Z
Learning: Applies to **/*.test.{ts,tsx,js,jsx} : Write comprehensive unit tests with clear test case names describing what is being tested

Applied to files:

  • packages/docs/src/internal/docs-context.test.ts
  • packages/docs/src/lint/lint.test.ts
  • packages/docs/src/llm/llm.test.ts
📚 Learning: 2026-03-19T22:57:33.411Z
Learnt from: CR
Repo: consentdotio/GDPRish PR: 0
File: .cursor/rules/elements-rules.mdc:0-0
Timestamp: 2026-03-19T22:57:33.411Z
Learning: Applies to packages/elements/**/*.{test,spec}.{ts,tsx} : Test accessibility features in Elements package component tests

Applied to files:

  • packages/docs/src/internal/docs-context.test.ts
  • packages/docs/src/lint/lint.test.ts
  • packages/docs/src/llm/llm.test.ts
  • packages/docs/src/remark/remark-output.test.ts
📚 Learning: 2026-03-19T22:57:33.411Z
Learnt from: CR
Repo: consentdotio/GDPRish PR: 0
File: .cursor/rules/elements-rules.mdc:0-0
Timestamp: 2026-03-19T22:57:33.411Z
Learning: Applies to packages/elements/**/*.{test,spec}.{ts,tsx} : Use Vitest as the testing framework for Elements package

Applied to files:

  • packages/docs/src/internal/docs-context.test.ts
  • packages/docs/src/lint/lint.test.ts
  • packages/docs/src/remark/remark-output.test.ts
📚 Learning: 2026-02-19T01:12:44.177Z
Learnt from: CR
Repo: consentdotio/agent-skills PR: 0
File: tsdoc-jsdoc-authoring/AGENTS.md:0-0
Timestamp: 2026-02-19T01:12:44.177Z
Learning: Applies to tsdoc-jsdoc-authoring/**/*.{js,jsx} : Add practical `example` snippets in JSDoc comments

Applied to files:

  • packages/docs/src/internal/docs-context.test.ts
  • packages/docs/agent-docs/docs/convert.md
  • packages/docs/src/remark/remark-output.test.ts
📚 Learning: 2026-04-18T15:01:52.690Z
Learnt from: CR
Repo: inthhq/docs PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-18T15:01:52.690Z
Learning: Applies to **/*.{test,spec}.{js,ts,jsx,tsx} : Keep test suites reasonably flat - avoid excessive `describe` nesting

Applied to files:

  • packages/docs/src/internal/docs-context.test.ts
  • packages/docs/src/llm/llm.test.ts
📚 Learning: 2026-02-19T01:12:44.177Z
Learnt from: CR
Repo: consentdotio/agent-skills PR: 0
File: tsdoc-jsdoc-authoring/AGENTS.md:0-0
Timestamp: 2026-02-19T01:12:44.177Z
Learning: Applies to tsdoc-jsdoc-authoring/**/*.{ts,tsx,js,jsx} : Use `remarks` for long-form context in TSDoc and JSDoc comments

Applied to files:

  • packages/docs/src/internal/docs-context.test.ts
  • packages/docs/agent-docs/docs/convert.md
  • packages/docs/src/remark/plugins/doc-placeholders.remark.ts
  • packages/docs/src/internal/docs-context.ts
  • packages/docs/src/remark/remark-output.test.ts
  • packages/docs/src/lint/runner.ts
📚 Learning: 2026-04-18T15:01:52.690Z
Learnt from: CR
Repo: inthhq/docs PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-18T15:01:52.690Z
Learning: Applies to **/*.{test,spec}.{js,ts,jsx,tsx} : Write assertions inside `it()` or `test()` blocks

Applied to files:

  • packages/docs/src/internal/docs-context.test.ts
  • packages/docs/src/lint/lint.test.ts
  • packages/docs/src/remark/remark-output.test.ts
📚 Learning: 2026-04-16T03:27:04.353Z
Learnt from: CR
Repo: inthhq/dsar PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-16T03:27:04.353Z
Learning: Applies to **/*.{test,spec}.{js,jsx,ts,tsx} : Write assertions inside `it()` or `test()` blocks

Applied to files:

  • packages/docs/src/internal/docs-context.test.ts
  • packages/docs/src/lint/lint.test.ts
  • packages/docs/src/remark/remark-output.test.ts
📚 Learning: 2026-02-20T14:21:19.208Z
Learnt from: CR
Repo: consentdotio/dsar PR: 0
File: .cursor/rules/ultracite.mdc:0-0
Timestamp: 2026-02-20T14:21:19.208Z
Learning: Applies to **/*.{test,spec}.{ts,tsx,js,jsx} : Write assertions inside `it()` or `test()` blocks

Applied to files:

  • packages/docs/src/internal/docs-context.test.ts
  • packages/docs/src/lint/lint.test.ts
  • packages/docs/src/remark/remark-output.test.ts
📚 Learning: 2026-01-31T11:24:55.220Z
Learnt from: CR
Repo: consentdotio/monorepo PR: 0
File: .cursor/rules/docs-rules.mdc:0-0
Timestamp: 2026-01-31T11:24:55.220Z
Learning: Applies to apps/docs/src/components/**/*.tsx : Place reusable components in `src/components` within the docs app

Applied to files:

  • README.md
  • packages/docs/agent-docs-src/docs/components.mdx
  • packages/docs/agent-docs/docs/llms-full/authoring/components.txt
  • packages/docs/agent-docs/docs/components.md
📚 Learning: 2026-02-19T01:12:44.177Z
Learnt from: CR
Repo: consentdotio/agent-skills PR: 0
File: tsdoc-jsdoc-authoring/AGENTS.md:0-0
Timestamp: 2026-02-19T01:12:44.177Z
Learning: Applies to tsdoc-jsdoc-authoring/**/index.{ts,tsx} : Use `packageDocumentation` for entrypoint docs in TSDoc comments

Applied to files:

  • packages/docs/README.md
  • packages/docs/scripts/generate-agent-docs.ts
  • packages/docs/src/internal/docs-context.ts
  • packages/docs/agent-docs-src/docs/convert.mdx
📚 Learning: 2026-02-19T01:12:44.177Z
Learnt from: CR
Repo: consentdotio/agent-skills PR: 0
File: tsdoc-jsdoc-authoring/AGENTS.md:0-0
Timestamp: 2026-02-19T01:12:44.177Z
Learning: Applies to tsdoc-jsdoc-authoring/**/*.{js,jsx} : Use optional and default parameter strings correctly in JSDoc comments

Applied to files:

  • packages/docs/src/lint/cli.ts
  • packages/docs/agent-docs/docs/convert.md
  • packages/docs/agent-docs/docs/components.md
  • packages/docs/package.json
📚 Learning: 2025-12-17T14:48:41.563Z
Learnt from: CR
Repo: consentdotio/c15t-docs PR: 0
File: .cursor/rules/ultracite.mdc:0-0
Timestamp: 2025-12-17T14:48:41.563Z
Learning: Applies to **/*.{ts,tsx,js,jsx} : Don't use the TypeScript directive ts-ignore

Applied to files:

  • packages/docs/src/lint/cli.ts
  • packages/docs/src/lint/runner.ts
📚 Learning: 2025-12-17T14:48:41.563Z
Learnt from: CR
Repo: consentdotio/c15t-docs PR: 0
File: .cursor/rules/ultracite.mdc:0-0
Timestamp: 2025-12-17T14:48:41.563Z
Learning: Applies to **/*.{ts,tsx,js,jsx} : Make sure JSDoc comment lines start with a single asterisk, except for the first one

Applied to files:

  • packages/docs/src/lint/cli.ts
  • packages/docs/src/llm/llm.ts
📚 Learning: 2026-03-19T22:57:45.114Z
Learnt from: CR
Repo: consentdotio/GDPRish PR: 0
File: .cursor/rules/global-rules.mdc:0-0
Timestamp: 2026-03-19T22:57:45.114Z
Learning: Applies to **/*.{test,spec}.{ts,tsx,js,jsx} : Include unit tests for components, integration tests for component combinations, accessibility tests, and error boundary tests

Applied to files:

  • packages/docs/src/lint/lint.test.ts
  • packages/docs/src/llm/llm.test.ts
  • packages/docs/src/remark/remark-output.test.ts
  • packages/docs/package.json
📚 Learning: 2025-07-23T12:51:10.961Z
Learnt from: CR
Repo: consentdotio/monorepo PR: 0
File: .cursor/rules/elements-rules.mdc:0-0
Timestamp: 2025-07-23T12:51:10.961Z
Learning: Applies to packages/elements/**/*.test.{ts,tsx} : Test accessibility features

Applied to files:

  • packages/docs/src/lint/lint.test.ts
  • packages/docs/src/remark/remark-output.test.ts
📚 Learning: 2026-03-19T22:57:33.411Z
Learnt from: CR
Repo: consentdotio/GDPRish PR: 0
File: .cursor/rules/elements-rules.mdc:0-0
Timestamp: 2026-03-19T22:57:33.411Z
Learning: Applies to packages/elements/**/*.{test,spec}.{ts,tsx} : Include integration tests for Elements package components

Applied to files:

  • packages/docs/src/lint/lint.test.ts
  • packages/docs/src/remark/remark-output.test.ts
📚 Learning: 2025-07-23T12:51:43.299Z
Learnt from: CR
Repo: consentdotio/monorepo PR: 0
File: .cursor/rules/global-rules.mdc:0-0
Timestamp: 2025-07-23T12:51:43.299Z
Learning: Applies to **/*.{test,spec}.{ts,tsx,js,jsx} : Include accessibility tests for components

Applied to files:

  • packages/docs/src/lint/lint.test.ts
📚 Learning: 2025-12-17T14:48:41.563Z
Learnt from: CR
Repo: consentdotio/c15t-docs PR: 0
File: .cursor/rules/ultracite.mdc:0-0
Timestamp: 2025-12-17T14:48:41.563Z
Learning: Applies to **/*.{ts,tsx,js,jsx} : Make sure all anchors are valid and navigable

Applied to files:

  • packages/docs/src/lint/lint.test.ts
📚 Learning: 2026-02-20T14:21:40.180Z
Learnt from: CR
Repo: consentdotio/dsar PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-02-20T14:21:40.180Z
Learning: Applies to **/*.test.{ts,tsx,js,jsx} : Write assertions inside `it()` or `test()` blocks

Applied to files:

  • packages/docs/src/lint/lint.test.ts
  • packages/docs/src/remark/remark-output.test.ts
📚 Learning: 2025-12-17T14:48:41.563Z
Learnt from: CR
Repo: consentdotio/c15t-docs PR: 0
File: .cursor/rules/ultracite.mdc:0-0
Timestamp: 2025-12-17T14:48:41.563Z
Learning: Applies to **/*.{ts,tsx,js,jsx} : Make sure the assertion function, like expect, is placed inside an it() function call

Applied to files:

  • packages/docs/src/lint/lint.test.ts
  • packages/docs/src/remark/remark-output.test.ts
📚 Learning: 2026-03-19T22:57:33.411Z
Learnt from: CR
Repo: consentdotio/GDPRish PR: 0
File: .cursor/rules/elements-rules.mdc:0-0
Timestamp: 2026-03-19T22:57:33.411Z
Learning: Applies to packages/elements/**/*.{ts,tsx} : Document props and usage examples in Elements package components

Applied to files:

  • packages/docs/agent-docs-src/docs/components.mdx
  • packages/docs/agent-docs/docs/llms-full/authoring/components.txt
  • packages/docs/agent-docs/docs/components.md
📚 Learning: 2025-07-23T12:51:10.961Z
Learnt from: CR
Repo: consentdotio/monorepo PR: 0
File: .cursor/rules/elements-rules.mdc:0-0
Timestamp: 2025-07-23T12:51:10.961Z
Learning: Applies to packages/elements/**/*.{ts,tsx} : Document props and usage examples

Applied to files:

  • packages/docs/agent-docs-src/docs/components.mdx
  • packages/docs/agent-docs/docs/llms-full/authoring/components.txt
  • packages/docs/agent-docs/docs/components.md
📚 Learning: 2025-07-23T12:51:10.961Z
Learnt from: CR
Repo: consentdotio/monorepo PR: 0
File: .cursor/rules/elements-rules.mdc:0-0
Timestamp: 2025-07-23T12:51:10.961Z
Learning: Applies to packages/elements/**/*.{tsx,jsx} : Use compound components pattern (e.g., `Component.Root`, `Component.Child`)

Applied to files:

  • packages/docs/agent-docs-src/docs/components.mdx
  • packages/docs/agent-docs/docs/components.md
📚 Learning: 2026-03-19T22:57:45.114Z
Learnt from: CR
Repo: consentdotio/GDPRish PR: 0
File: .cursor/rules/global-rules.mdc:0-0
Timestamp: 2026-03-19T22:57:45.114Z
Learning: Applies to **/*.{ts,tsx,js,jsx} : Implement compound components pattern with components namespaced under a single parent (e.g., FormWizard.Root, FormWizard.Step), using React Context for state management

Applied to files:

  • packages/docs/agent-docs-src/docs/components.mdx
  • packages/docs/agent-docs/docs/llms-full/authoring/components.txt
📚 Learning: 2026-02-19T01:12:44.177Z
Learnt from: CR
Repo: consentdotio/agent-skills PR: 0
File: tsdoc-jsdoc-authoring/AGENTS.md:0-0
Timestamp: 2026-02-19T01:12:44.177Z
Learning: Applies to tsdoc-jsdoc-authoring/**/*.{js,jsx} : Document generator output with `yields` in JSDoc comments

Applied to files:

  • packages/docs/scripts/generate-agent-docs.ts
  • packages/docs/src/llm/llm.test.ts
  • packages/docs/src/remark/remark-output.test.ts
📚 Learning: 2026-03-19T22:57:33.411Z
Learnt from: CR
Repo: consentdotio/GDPRish PR: 0
File: .cursor/rules/elements-rules.mdc:0-0
Timestamp: 2026-03-19T22:57:33.411Z
Learning: Applies to packages/elements/**/*.{ts,tsx} : Document all props and types in Elements package TypeScript code

Applied to files:

  • packages/docs/agent-docs/docs/llms-full/authoring/components.txt
  • packages/docs/agent-docs/docs/components.md
📚 Learning: 2025-07-23T12:51:43.299Z
Learnt from: CR
Repo: consentdotio/monorepo PR: 0
File: .cursor/rules/global-rules.mdc:0-0
Timestamp: 2025-07-23T12:51:43.299Z
Learning: Applies to **/*.{tsx,jsx} : Use React Context for global state management in components

Applied to files:

  • packages/docs/agent-docs/docs/llms-full/authoring/components.txt
📚 Learning: 2026-02-19T01:12:44.177Z
Learnt from: CR
Repo: consentdotio/agent-skills PR: 0
File: tsdoc-jsdoc-authoring/AGENTS.md:0-0
Timestamp: 2026-02-19T01:12:44.177Z
Learning: Applies to tsdoc-jsdoc-authoring/**/*.{ts,tsx,js,jsx} : Use `example` for non-obvious usage in TSDoc and JSDoc comments

Applied to files:

  • packages/docs/agent-docs/docs/convert.md
📚 Learning: 2026-02-19T01:12:44.177Z
Learnt from: CR
Repo: consentdotio/agent-skills PR: 0
File: tsdoc-jsdoc-authoring/AGENTS.md:0-0
Timestamp: 2026-02-19T01:12:44.177Z
Learning: Applies to tsdoc-jsdoc-authoring/**/*.{js,jsx} : Document error contracts with `throws` in JSDoc comments

Applied to files:

  • packages/docs/agent-docs/docs/convert.md
📚 Learning: 2026-03-19T22:57:33.411Z
Learnt from: CR
Repo: consentdotio/GDPRish PR: 0
File: .cursor/rules/elements-rules.mdc:0-0
Timestamp: 2026-03-19T22:57:33.411Z
Learning: Applies to packages/elements/**/*.{ts,tsx} : Include TSDoc comments for components in Elements package

Applied to files:

  • packages/docs/agent-docs/docs/components.md
📚 Learning: 2025-07-23T12:51:10.961Z
Learnt from: CR
Repo: consentdotio/monorepo PR: 0
File: .cursor/rules/elements-rules.mdc:0-0
Timestamp: 2025-07-23T12:51:10.961Z
Learning: Applies to packages/elements/**/*.{ts,tsx} : Document all props and types

Applied to files:

  • packages/docs/agent-docs/docs/components.md
📚 Learning: 2025-12-17T14:48:41.563Z
Learnt from: CR
Repo: consentdotio/c15t-docs PR: 0
File: .cursor/rules/ultracite.mdc:0-0
Timestamp: 2025-12-17T14:48:41.563Z
Learning: Applies to **/*.{ts,tsx,js,jsx} : Declare regex literals at the top level

Applied to files:

  • packages/docs/src/llm/llm.ts
📚 Learning: 2026-01-31T11:24:55.220Z
Learnt from: CR
Repo: consentdotio/monorepo PR: 0
File: .cursor/rules/docs-rules.mdc:0-0
Timestamp: 2026-01-31T11:24:55.220Z
Learning: Applies to apps/docs/app/**/{layout,page}.tsx : Keep layouts and pages separate in the docs app directory

Applied to files:

  • packages/docs/src/llm/llm.ts
📚 Learning: 2026-01-31T11:24:55.220Z
Learnt from: CR
Repo: consentdotio/monorepo PR: 0
File: .cursor/rules/docs-rules.mdc:0-0
Timestamp: 2026-01-31T11:24:55.220Z
Learning: Applies to apps/docs/app/**/page.tsx : Place page components in appropriate route segments within the docs app

Applied to files:

  • packages/docs/src/llm/llm.ts
  • packages/docs/src/internal/docs-context.ts
📚 Learning: 2025-07-23T12:51:10.961Z
Learnt from: CR
Repo: consentdotio/monorepo PR: 0
File: .cursor/rules/elements-rules.mdc:0-0
Timestamp: 2025-07-23T12:51:10.961Z
Learning: Applies to packages/elements/**/*.test.{ts,tsx} : Write unit tests for components

Applied to files:

  • packages/docs/src/llm/llm.test.ts
  • packages/docs/src/remark/remark-output.test.ts
📚 Learning: 2026-04-16T03:27:04.353Z
Learnt from: CR
Repo: inthhq/dsar PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-16T03:27:04.353Z
Learning: Applies to **/*.{test,spec}.{js,jsx,ts,tsx} : Keep test suites reasonably flat - avoid excessive `describe` nesting

Applied to files:

  • packages/docs/src/llm/llm.test.ts
📚 Learning: 2026-02-19T01:12:44.177Z
Learnt from: CR
Repo: consentdotio/agent-skills PR: 0
File: tsdoc-jsdoc-authoring/AGENTS.md:0-0
Timestamp: 2026-02-19T01:12:44.177Z
Learning: Applies to tsdoc-jsdoc-authoring/**/*.{ts,tsx,js,jsx} : Prefer `{link ...}` for symbol references in TSDoc and JSDoc comments

Applied to files:

  • packages/docs/src/remark/plugins/doc-placeholders.remark.ts
📚 Learning: 2026-02-19T01:12:44.177Z
Learnt from: CR
Repo: consentdotio/agent-skills PR: 0
File: tsdoc-jsdoc-authoring/AGENTS.md:0-0
Timestamp: 2026-02-19T01:12:44.177Z
Learning: Applies to tsdoc-jsdoc-authoring/**/*.{js,jsx} : Use `module` for module-level docs in JSDoc comments

Applied to files:

  • packages/docs/src/internal/docs-context.ts
📚 Learning: 2026-01-31T11:24:55.220Z
Learnt from: CR
Repo: consentdotio/monorepo PR: 0
File: .cursor/rules/docs-rules.mdc:0-0
Timestamp: 2026-01-31T11:24:55.220Z
Learning: Applies to apps/docs/app/**/*.{ts,tsx} : Use Next.js App Router conventions in the docs app

Applied to files:

  • packages/docs/src/internal/docs-context.ts
📚 Learning: 2026-02-19T01:12:44.177Z
Learnt from: CR
Repo: consentdotio/agent-skills PR: 0
File: tsdoc-jsdoc-authoring/AGENTS.md:0-0
Timestamp: 2026-02-19T01:12:44.177Z
Learning: Applies to tsdoc-jsdoc-authoring/**/*.{js,jsx} : Use nested property namepaths for object inputs in JSDoc comments

Applied to files:

  • packages/docs/src/internal/docs-context.ts
📚 Learning: 2025-12-17T14:48:41.563Z
Learnt from: CR
Repo: consentdotio/c15t-docs PR: 0
File: .cursor/rules/ultracite.mdc:0-0
Timestamp: 2025-12-17T14:48:41.563Z
Learning: Applies to **/*.{ts,tsx,js,jsx} : Don't use template literal placeholder syntax in regular strings

Applied to files:

  • packages/docs/src/internal/docs-context.ts
📚 Learning: 2025-12-17T14:48:41.563Z
Learnt from: CR
Repo: consentdotio/c15t-docs PR: 0
File: .cursor/rules/ultracite.mdc:0-0
Timestamp: 2025-12-17T14:48:41.563Z
Learning: Applies to **/*.{ts,tsx,js,jsx} : Don't use Object.prototype builtins directly

Applied to files:

  • packages/docs/src/internal/docs-context.ts
📚 Learning: 2025-12-17T14:48:41.563Z
Learnt from: CR
Repo: consentdotio/c15t-docs PR: 0
File: .cursor/rules/ultracite.mdc:0-0
Timestamp: 2025-12-17T14:48:41.563Z
Learning: Applies to **/*.{ts,tsx,js,jsx} : Don't use String.raw in template literals when there are no escape sequences

Applied to files:

  • packages/docs/src/internal/docs-context.ts
📚 Learning: 2026-03-19T22:57:19.913Z
Learnt from: CR
Repo: consentdotio/GDPRish PR: 0
File: .cursor/rules/docs-rules.mdc:0-0
Timestamp: 2026-03-19T22:57:19.913Z
Learning: Applies to apps/docs/app/**/page.tsx : Place page components in appropriate route segments

Applied to files:

  • packages/docs/src/internal/docs-context.ts
📚 Learning: 2026-03-19T22:57:33.411Z
Learnt from: CR
Repo: consentdotio/GDPRish PR: 0
File: .cursor/rules/elements-rules.mdc:0-0
Timestamp: 2026-03-19T22:57:33.411Z
Learning: Applies to packages/elements/**/*.{ts,tsx,md} : Include TypeScript examples in Elements package documentation

Applied to files:

  • packages/docs/src/remark/remark-output.test.ts
📚 Learning: 2025-07-23T12:51:43.299Z
Learnt from: CR
Repo: consentdotio/monorepo PR: 0
File: .cursor/rules/global-rules.mdc:0-0
Timestamp: 2025-07-23T12:51:43.299Z
Learning: Applies to **/*.{test,spec}.{ts,tsx,js,jsx} : Include unit tests for components

Applied to files:

  • packages/docs/src/remark/remark-output.test.ts
  • packages/docs/package.json
📚 Learning: 2025-12-17T14:48:41.563Z
Learnt from: CR
Repo: consentdotio/c15t-docs PR: 0
File: .cursor/rules/ultracite.mdc:0-0
Timestamp: 2025-12-17T14:48:41.563Z
Learning: Applies to **/*.{ts,tsx,js,jsx} : Don't hardcode sensitive data like API keys and tokens

Applied to files:

  • packages/docs/package.json
📚 Learning: 2025-12-01T15:20:25.102Z
Learnt from: CR
Repo: consentdotio/c15t-docs PR: 0
File: .cursor/rules/open-graph.mdc:0-0
Timestamp: 2025-12-01T15:20:25.102Z
Learning: Applies to src/**/route.{ts,tsx} : Avoid fetching arbitrary external images or fonts at render time unless they are proxied and cached to prevent latency and failures

Applied to files:

  • packages/docs/src/lint/runner.ts
📚 Learning: 2026-03-19T16:08:15.951Z
Learnt from: CR
Repo: consentdotio/c-ray PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-03-19T16:08:15.951Z
Learning: When fetching data in route loaders, load the router-core data-loading skill file from node_modules/tanstack/router-core/skills/router-core/data-loading/SKILL.md

Applied to files:

  • packages/docs/src/lint/runner.ts
📚 Learning: 2025-12-01T15:20:25.102Z
Learnt from: CR
Repo: consentdotio/c15t-docs PR: 0
File: .cursor/rules/open-graph.mdc:0-0
Timestamp: 2025-12-01T15:20:25.102Z
Learning: Applies to src/**/route.{ts,tsx} : Cache fonts and assets to avoid fetching on every request; prefer inline or base64 image sources when data is already in memory

Applied to files:

  • packages/docs/src/lint/runner.ts
🔍 Remote MCP Context7

Summary of additional context useful for reviewing this PR

  • Remark plugin shape and usage
    • A remark plugin is a function (optionally accepting options) that returns a transformer function which receives (tree, file) and may mutate the mdast tree in-place. The transformer can access the current file via the vfile argument (file.path) to derive per-file context.
  • AST traversal and node edits
    • Common pattern is to use unist-util-visit inside the transformer to locate node types (link, definition, image, mdxJsxFlowElement, mdxJsxTextElement, etc.) and mutate URL-like fields directly. This matches the PR’s approach of visiting and rewriting url/href/to attributes.
  • Plugin ordering matters
    • Plugins operate on the mdast pipeline; inserting a placeholder-resolution plugin immediately after import-stripping (remarkRemoveImports) is conventional when placeholders need to be resolved before downstream transforms (callout/card flattening, mermaid, etc.). Review should verify the chosen insertion point preserves expected downstream assumptions.
  • Naming / packaging guidance
    • Remark recommends naming conventions (e.g., prefix remark- for plugins) and using mdast/util or unist/util for non-plugin utilities. This is relevant if the new plugin is intended for reuse or publication.

Sources used

  • Context7 resolve (library selection): /remarkjs/remark
  • Context7 docs (remark plugin authoring, transformer signature, examples, plugin ordering): remark readme and plugins docs
🔇 Additional comments (21)
packages/docs/agent-docs-src/docs/components.mdx (5)

1-4: Frontmatter is clear and well-scoped.

Title/description accurately frame this page’s intent for @inth/docs component adapters.


16-44: Default adapter map section is accurate and practical.

The documented mdxComponents usage and override pattern are clear and match expected consumer integration.


48-64: PackageCommandTabs guidance is concise and implementation-aligned.

Props coverage (command, commands, defaultManager) and examples are strong for quick adoption.


65-74: Excellent callout on AutoTypeTable path sensitivity and markdown flattening behavior.

This sets the right expectations for docs pipeline configuration and agent-readable output.


75-79: Guidance section closes the page well.

The recommendations are actionable and direct readers to the right place for remark-specific behavior.

packages/docs/agent-docs/docs/llms-full/generation/convert.txt (1)

1-88: Well-structured conversion reference doc.

Clear API breakdown, practical examples, and behavior notes are consistent with the generator/lint pipeline changes in this PR.

packages/docs/agent-docs/docs/llms-full/authoring/components.txt (1)

1-88: Good component adapter guidance and examples.

The default-map usage, targeted overrides, and flattening guidance are concise and actionable.

packages/docs/src/llm/llm.test.ts (1)

24-362: Strong coverage for new LLM routing behavior.

This suite validates nested/flat topic outputs, stale-file cleanup, and invalid topic-shape guards with clear assertions.

packages/docs/src/lint/cli.ts (1)

6-27: Nice fix: usage text now tracks runtime defaults.

Deriving the default ignore-glob string from DEFAULT_IGNORE_GLOBS prevents future documentation drift.

packages/docs/package.json (1)

44-49: Good hardening of packaged docs generation.

The explicit env guard before generation is a solid safety check for publishable agent-doc artifacts.

packages/docs/agent-docs/docs/llms.txt (1)

1-33: Clear and useful top-level routing map.

Sectioning and link granularity make this a strong entrypoint for both developers and agents.

packages/docs/src/internal/docs-context.test.ts (1)

24-40: Good recursion-preservation test for placeholder resolution.

This validates both placeholder replacement in nested plain objects and reference preservation for non-plain objects.

packages/docs/agent-docs/llms.txt (1)

1-19: Solid agent-facing package entrypoint.

The summary and starting-point links are scoped well for fast routing into deeper topic files.

README.md (1)

1-73: LGTM!

The README provides a clear and comprehensive overview of the package surfaces, installation, and usage patterns. The code examples align with the implementation details shown in the relevant code snippets.

packages/docs/src/remark/plugins/doc-placeholders.remark.ts (1)

1-61: LGTM!

The plugin correctly:

  • Derives DocContext once per file (addressing the earlier optimization feedback)
  • Follows the standard remark plugin pattern with proper type annotations
  • Uses for...of loops as per coding guidelines
  • Handles multiple node types (link, definition, image, JSX elements) consistently

The plugin placement after remarkRemoveImports in the default plugin chain is correct, as placeholders need resolution before downstream flattening transforms.

packages/docs/README.md (1)

1-55: LGTM!

The package README provides concise, accurate documentation of the package surfaces. The code examples correctly demonstrate the convertAllMdx API usage and the agent-doc generation workflow.

packages/docs/src/lint/lint.test.ts (1)

1-229: LGTM!

The test suite is well-structured with:

  • Clean isolation using temporary directories
  • Proper async/await usage throughout
  • Assertions inside it() blocks as required
  • Comprehensive coverage of link validation scenarios (cross-framework, placeholders, missing routes, ignored files)
  • Cleanup in afterEach with force: true for robustness
packages/docs/agent-docs-src/docs/convert.mdx (1)

1-79: LGTM!

The documentation accurately reflects the API signatures:

  • convertMdxFile(sourcePath, remarkPlugins, enrichFromGitFlag) matches the implementation
  • convertAllMdx config options (srcDir, outDir, remarkPlugins, enrichFrontmatterFromGit) align with MdxToMarkdownConfig
  • Recommended plugin pairing pattern is consistent with the remark plugin ordering guidance
packages/docs/scripts/generate-agent-docs.ts (1)

1-129: LGTM!

The script correctly:

  • Validates INTH_DOCS_AGENT_BASE_URL is set before proceeding (addressing the earlier review feedback about fail-fast)
  • Uses a clean workflow: validate → clean output → convert MDX → generate summaries → generate full files
  • Follows coding guidelines (const usage, Error with descriptive message, top-level await)
  • Uses process.stdout.write instead of console.log for the completion message
packages/docs/agent-docs/docs/convert.md (1)

1-78: LGTM!

The generated documentation correctly shows the convertMdxFile API with the proper three-argument signature (sourcePath, remarkPlugins, enrichFromGitFlag), addressing the earlier review feedback. The content accurately reflects the source MDX and the actual API implementation.

packages/docs/agent-docs/docs/components.md (1)

1-78: LGTM!

The generated documentation correctly:

  • Uses "package-manager-specific" with proper hyphenation (addressing earlier feedback)
  • Documents only the actual PackageCommandTabs props (command, commands, defaultManager) without the non-existent mode prop (addressing earlier feedback)
  • Provides clear guidance on component usage, overriding, and the relationship to the remark flattening pipeline

Comment thread packages/docs/src/internal/docs-context.test.ts
Comment thread packages/docs/src/lint/runner.ts
Comment thread packages/docs/src/llm/llm.ts
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
packages/docs/src/llm/llm.ts (1)

579-607: ⚠️ Potential issue | 🟠 Major

Fail fast when a leaf topic matches no generated docs.

If includePrefixes is mistyped or a doc moves, this still emits a .txt with empty “Included Pages” and “Content” sections. That silently ships hollow agent refs instead of surfacing the broken topic configuration.

Suggested fix
 function renderTopicDocument(
   product: Pick<ProductInfo, "name">,
   topic: ResolvedLeafTopic,
   docs: MarkdownDoc[]
 ): string {
   const topicDocs = docs.filter((doc) =>
     isIncluded(doc.relativePath, topic.includePrefixes)
   );
+  if (topicDocs.length === 0) {
+    throw new Error(
+      `Topic "${topic.segmentPath.join("/")}" matched no generated docs. Check includePrefixes: ${topic.includePrefixes.join(", ")}`
+    );
+  }
   const links = topicDocs.map((doc) => ({
     title: doc.title,
     absoluteUrl: doc.absoluteUrl,
     description:
       doc.description || `Entry point for ${doc.title} documentation.`,
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/docs/src/llm/llm.ts` around lines 579 - 607, The code builds
links/content from topicDocs but silently proceeds when topicDocs is empty; add
a fail-fast check after computing topicDocs (where topicDocs is defined from
docs.filter(...) using topic.includePrefixes) that throws a descriptive Error
(including topic.title and topic.includePrefixes) or calls the existing logger
and throws so the build fails immediately when a leaf topic matches no docs;
this should be placed before building links, contentBlocks, and the return array
so broken topic configuration is surfaced instead of emitting empty “Included
Pages”/“Content” sections.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@packages/docs/src/lint/runner.ts`:
- Around line 187-220: The URL-field allowlist is missing canonicalUrl so
placeholder-bearing canonicalUrl values slip past validateDocUrls; update the
URL_LIKE_FIELD_NAMES set to include "canonicalUrl" (affecting
looksLikeDocsUrlCandidate which relies on that set) so hasDocPlaceholder values
for canonicalUrl are treated as docs URL candidates and validated by
validateDocUrls.
- Around line 251-284: collectMarkdownUrls currently pushes the same
reference-style target twice (once in the "definition" visitor and again in the
"linkReference" visitor), causing duplicate LintViolation entries; fix this by
tracking which reference identifiers or URLs have already been recorded (e.g.,
maintain a Set of seen identifiers or seen URLs) and skip pushing duplicates in
the "linkReference" visitor (use the existing definitions Map and check the
identifier or resolved URL against the seen set before calling urls.push).
Ensure the logic touches collectMarkdownUrls and its "definition" /
"linkReference" visitors so each target is added only once.

In `@packages/docs/src/llm/llm.ts`:
- Around line 439-447: The check for duplicate sibling slugs is case-sensitive,
causing collisions on case-insensitive filesystems; update the logic in the
block that calls assertValidTopicSlug(topic.slug) to normalize topic.slug when
checking/recording duplicates (e.g., use const slug =
assertValidTopicSlug(topic.slug); const key = slug.toLowerCase(); then use
seenSlugs.has(key) / seenSlugs.add(key) and include the normalized key in the
error message), or alternatively reject non-lowercase inputs by validating
topic.slug !== topic.slug.toLowerCase() and throwing a clear error before
touching seenSlugs; refer to assertValidTopicSlug, seenSlugs, topic.slug and
parentPath to locate where to apply this change.

---

Outside diff comments:
In `@packages/docs/src/llm/llm.ts`:
- Around line 579-607: The code builds links/content from topicDocs but silently
proceeds when topicDocs is empty; add a fail-fast check after computing
topicDocs (where topicDocs is defined from docs.filter(...) using
topic.includePrefixes) that throws a descriptive Error (including topic.title
and topic.includePrefixes) or calls the existing logger and throws so the build
fails immediately when a leaf topic matches no docs; this should be placed
before building links, contentBlocks, and the return array so broken topic
configuration is surfaced instead of emitting empty “Included Pages”/“Content”
sections.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 8624627d-e42b-406e-b9ba-e24d7f6b8465

📥 Commits

Reviewing files that changed from the base of the PR and between 6147678 and 568f604.

📒 Files selected for processing (5)
  • packages/docs/src/internal/docs-context.test.ts
  • packages/docs/src/lint/lint.test.ts
  • packages/docs/src/lint/runner.ts
  • packages/docs/src/llm/llm.test.ts
  • packages/docs/src/llm/llm.ts
📜 Review details
🧰 Additional context used
📓 Path-based instructions (3)
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{ts,tsx}: Use explicit types for function parameters and return values when they enhance clarity
Prefer unknown over any when the type is genuinely unknown
Use const assertions (as const) for immutable values and literal types
Leverage TypeScript's type narrowing instead of type assertions

Files:

  • packages/docs/src/lint/lint.test.ts
  • packages/docs/src/llm/llm.ts
  • packages/docs/src/llm/llm.test.ts
  • packages/docs/src/lint/runner.ts
  • packages/docs/src/internal/docs-context.test.ts
**/*.{js,ts,jsx,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{js,ts,jsx,tsx}: Use meaningful variable names instead of magic numbers - extract constants with descriptive names
Use arrow functions for callbacks and short functions
Prefer for...of loops over .forEach() and indexed for loops
Use optional chaining (?.) and nullish coalescing (??) for safer property access
Prefer template literals over string concatenation
Use destructuring for object and array assignments
Use const by default, let only when reassignment is needed, never var
Always await promises in async functions - don't forget to use the return value
Use async/await syntax instead of promise chains for better readability
Handle errors appropriately in async code with try-catch blocks
Don't use async functions as Promise executors
Remove console.log, debugger, and alert statements from production code
Throw Error objects with descriptive messages, not strings or other values
Use try-catch blocks meaningfully - don't catch errors just to rethrow them
Prefer early returns over nested conditionals for error cases
Extract complex conditions into well-named boolean variables
Use early returns to reduce nesting
Prefer simple conditionals over nested ternary operators
Don't use eval() or assign directly to document.cookie
Avoid spread syntax in accumulators within loops
Use top-level regex literals instead of creating them in loops
Prefer specific imports over namespace imports
Use descriptive names for functions, variables, and types for meaningful naming
Add comments for complex logic, but prefer self-documenting code

Files:

  • packages/docs/src/lint/lint.test.ts
  • packages/docs/src/llm/llm.ts
  • packages/docs/src/llm/llm.test.ts
  • packages/docs/src/lint/runner.ts
  • packages/docs/src/internal/docs-context.test.ts
**/*.{test,spec}.{js,ts,jsx,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{test,spec}.{js,ts,jsx,tsx}: Write assertions inside it() or test() blocks
Avoid done callbacks in async tests - use async/await instead
Don't use .only or .skip in committed code
Keep test suites reasonably flat - avoid excessive describe nesting

Files:

  • packages/docs/src/lint/lint.test.ts
  • packages/docs/src/llm/llm.test.ts
  • packages/docs/src/internal/docs-context.test.ts
🧠 Learnings (39)
📓 Common learnings
Learnt from: CR
Repo: consentdotio/GDPRish PR: 0
File: .cursor/rules/docs-rules.mdc:0-0
Timestamp: 2026-03-19T22:57:19.913Z
Learning: Applies to apps/docs/**/*.mdx : Use MDX for documentation pages
Learnt from: CR
Repo: consentdotio/monorepo PR: 0
File: .cursor/rules/docs-rules.mdc:0-0
Timestamp: 2026-01-31T11:24:55.220Z
Learning: Applies to apps/docs/**/*.mdx : Use MDX for documentation pages in the docs app
Learnt from: CR
Repo: consentdotio/monorepo PR: 0
File: .cursor/rules/docs-rules.mdc:0-0
Timestamp: 2026-01-31T11:24:55.220Z
Learning: Applies to apps/docs/**/*.mdx : Include code examples where appropriate in MDX documentation pages of the docs app
Learnt from: CR
Repo: consentdotio/GDPRish PR: 0
File: .cursor/rules/docs-rules.mdc:0-0
Timestamp: 2026-03-19T22:57:19.913Z
Learning: Applies to apps/docs/**/*.mdx : Keep documentation organized by categories
Learnt from: CR
Repo: consentdotio/GDPRish PR: 0
File: .cursor/rules/docs-rules.mdc:0-0
Timestamp: 2026-03-19T22:57:19.913Z
Learning: Applies to apps/docs/**/*.mdx : Include code examples where appropriate in documentation
Learnt from: CR
Repo: consentdotio/agent-skills PR: 0
File: tsdoc-jsdoc-authoring/AGENTS.md:0-0
Timestamp: 2026-02-19T01:12:44.177Z
Learning: Applies to tsdoc-jsdoc-authoring/**/*.{js,jsx} : Document generator output with `yields` in JSDoc comments
📚 Learning: 2025-07-23T12:51:10.961Z
Learnt from: CR
Repo: consentdotio/monorepo PR: 0
File: .cursor/rules/elements-rules.mdc:0-0
Timestamp: 2025-07-23T12:51:10.961Z
Learning: Applies to packages/elements/**/*.test.{ts,tsx} : Use Vitest for testing framework

Applied to files:

  • packages/docs/src/lint/lint.test.ts
  • packages/docs/src/llm/llm.test.ts
  • packages/docs/src/internal/docs-context.test.ts
📚 Learning: 2026-03-19T22:57:33.411Z
Learnt from: CR
Repo: consentdotio/GDPRish PR: 0
File: .cursor/rules/elements-rules.mdc:0-0
Timestamp: 2026-03-19T22:57:33.411Z
Learning: Applies to packages/elements/**/*.{test,spec}.{ts,tsx} : Write unit tests for components in Elements package using Vitest

Applied to files:

  • packages/docs/src/lint/lint.test.ts
  • packages/docs/src/llm/llm.test.ts
  • packages/docs/src/internal/docs-context.test.ts
📚 Learning: 2026-03-19T22:57:33.411Z
Learnt from: CR
Repo: consentdotio/GDPRish PR: 0
File: .cursor/rules/elements-rules.mdc:0-0
Timestamp: 2026-03-19T22:57:33.411Z
Learning: Applies to packages/elements/**/*.{test,spec}.{ts,tsx} : Use Vitest as the testing framework for Elements package

Applied to files:

  • packages/docs/src/lint/lint.test.ts
  • packages/docs/src/llm/llm.test.ts
  • packages/docs/src/internal/docs-context.test.ts
📚 Learning: 2026-03-19T22:57:33.411Z
Learnt from: CR
Repo: consentdotio/GDPRish PR: 0
File: .cursor/rules/elements-rules.mdc:0-0
Timestamp: 2026-03-19T22:57:33.411Z
Learning: Applies to packages/elements/**/*.{test,spec}.{ts,tsx} : Include integration tests for Elements package components

Applied to files:

  • packages/docs/src/lint/lint.test.ts
📚 Learning: 2026-03-19T22:57:33.411Z
Learnt from: CR
Repo: consentdotio/GDPRish PR: 0
File: .cursor/rules/elements-rules.mdc:0-0
Timestamp: 2026-03-19T22:57:33.411Z
Learning: Applies to packages/elements/**/*.{test,spec}.{ts,tsx} : Test accessibility features in Elements package component tests

Applied to files:

  • packages/docs/src/lint/lint.test.ts
  • packages/docs/src/llm/llm.test.ts
  • packages/docs/src/internal/docs-context.test.ts
📚 Learning: 2026-03-19T22:57:45.114Z
Learnt from: CR
Repo: consentdotio/GDPRish PR: 0
File: .cursor/rules/global-rules.mdc:0-0
Timestamp: 2026-03-19T22:57:45.114Z
Learning: Applies to **/*.{test,spec}.{ts,tsx,js,jsx} : Include unit tests for components, integration tests for component combinations, accessibility tests, and error boundary tests

Applied to files:

  • packages/docs/src/lint/lint.test.ts
  • packages/docs/src/llm/llm.test.ts
  • packages/docs/src/internal/docs-context.test.ts
📚 Learning: 2025-07-23T12:51:10.961Z
Learnt from: CR
Repo: consentdotio/monorepo PR: 0
File: .cursor/rules/elements-rules.mdc:0-0
Timestamp: 2025-07-23T12:51:10.961Z
Learning: Applies to packages/elements/**/*.test.{ts,tsx} : Include integration tests

Applied to files:

  • packages/docs/src/lint/lint.test.ts
📚 Learning: 2025-07-23T12:51:10.961Z
Learnt from: CR
Repo: consentdotio/monorepo PR: 0
File: .cursor/rules/elements-rules.mdc:0-0
Timestamp: 2025-07-23T12:51:10.961Z
Learning: Applies to packages/elements/**/*.test.{ts,tsx} : Write unit tests for components

Applied to files:

  • packages/docs/src/lint/lint.test.ts
  • packages/docs/src/llm/llm.test.ts
📚 Learning: 2025-07-23T12:51:10.961Z
Learnt from: CR
Repo: consentdotio/monorepo PR: 0
File: .cursor/rules/elements-rules.mdc:0-0
Timestamp: 2025-07-23T12:51:10.961Z
Learning: Applies to packages/elements/**/*.test.{ts,tsx} : Test accessibility features

Applied to files:

  • packages/docs/src/lint/lint.test.ts
📚 Learning: 2026-03-19T22:58:00.031Z
Learnt from: CR
Repo: consentdotio/GDPRish PR: 0
File: .cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc:0-0
Timestamp: 2026-03-19T22:58:00.031Z
Learning: Applies to **/*.test.{ts,tsx,js,jsx} : Write comprehensive unit tests with clear test case names describing what is being tested

Applied to files:

  • packages/docs/src/lint/lint.test.ts
  • packages/docs/src/llm/llm.test.ts
  • packages/docs/src/internal/docs-context.test.ts
📚 Learning: 2026-02-20T14:21:19.208Z
Learnt from: CR
Repo: consentdotio/dsar PR: 0
File: .cursor/rules/ultracite.mdc:0-0
Timestamp: 2026-02-20T14:21:19.208Z
Learning: Applies to **/*.{test,spec}.{ts,tsx,js,jsx} : Write assertions inside `it()` or `test()` blocks

Applied to files:

  • packages/docs/src/lint/lint.test.ts
📚 Learning: 2026-04-18T15:01:52.690Z
Learnt from: CR
Repo: inthhq/docs PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-18T15:01:52.690Z
Learning: Applies to **/*.{test,spec}.{js,ts,jsx,tsx} : Write assertions inside `it()` or `test()` blocks

Applied to files:

  • packages/docs/src/lint/lint.test.ts
📚 Learning: 2026-04-16T03:27:04.353Z
Learnt from: CR
Repo: inthhq/dsar PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-16T03:27:04.353Z
Learning: Applies to **/*.{test,spec}.{js,jsx,ts,tsx} : Write assertions inside `it()` or `test()` blocks

Applied to files:

  • packages/docs/src/lint/lint.test.ts
📚 Learning: 2026-02-20T14:21:40.180Z
Learnt from: CR
Repo: consentdotio/dsar PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-02-20T14:21:40.180Z
Learning: Applies to **/*.test.{ts,tsx,js,jsx} : Write assertions inside `it()` or `test()` blocks

Applied to files:

  • packages/docs/src/lint/lint.test.ts
📚 Learning: 2025-12-17T14:48:41.563Z
Learnt from: CR
Repo: consentdotio/c15t-docs PR: 0
File: .cursor/rules/ultracite.mdc:0-0
Timestamp: 2025-12-17T14:48:41.563Z
Learning: Applies to **/*.{ts,tsx,js,jsx} : Make sure the assertion function, like expect, is placed inside an it() function call

Applied to files:

  • packages/docs/src/lint/lint.test.ts
📚 Learning: 2025-12-17T14:48:41.563Z
Learnt from: CR
Repo: consentdotio/c15t-docs PR: 0
File: .cursor/rules/ultracite.mdc:0-0
Timestamp: 2025-12-17T14:48:41.563Z
Learning: Applies to **/*.{ts,tsx,js,jsx} : Make sure all anchors are valid and navigable

Applied to files:

  • packages/docs/src/lint/lint.test.ts
  • packages/docs/src/lint/runner.ts
  • packages/docs/src/internal/docs-context.test.ts
📚 Learning: 2026-02-19T01:12:44.177Z
Learnt from: CR
Repo: consentdotio/agent-skills PR: 0
File: tsdoc-jsdoc-authoring/AGENTS.md:0-0
Timestamp: 2026-02-19T01:12:44.177Z
Learning: Applies to tsdoc-jsdoc-authoring/**/*.{ts,tsx,js,jsx} : Write clear summary sentences in TSDoc and JSDoc comments

Applied to files:

  • packages/docs/src/llm/llm.ts
📚 Learning: 2026-03-19T22:57:19.913Z
Learnt from: CR
Repo: consentdotio/GDPRish PR: 0
File: .cursor/rules/docs-rules.mdc:0-0
Timestamp: 2026-03-19T22:57:19.913Z
Learning: Applies to apps/docs/**/*.mdx : Keep documentation organized by categories

Applied to files:

  • packages/docs/src/llm/llm.ts
  • packages/docs/src/lint/runner.ts
📚 Learning: 2026-03-19T22:57:19.913Z
Learnt from: CR
Repo: consentdotio/GDPRish PR: 0
File: .cursor/rules/docs-rules.mdc:0-0
Timestamp: 2026-03-19T22:57:19.913Z
Learning: Applies to apps/docs/**/*.mdx : Use MDX for documentation pages

Applied to files:

  • packages/docs/src/llm/llm.ts
📚 Learning: 2026-01-31T11:24:55.220Z
Learnt from: CR
Repo: consentdotio/monorepo PR: 0
File: .cursor/rules/docs-rules.mdc:0-0
Timestamp: 2026-01-31T11:24:55.220Z
Learning: Applies to apps/docs/**/*.mdx : Use MDX for documentation pages in the docs app

Applied to files:

  • packages/docs/src/llm/llm.ts
📚 Learning: 2025-12-17T14:48:41.563Z
Learnt from: CR
Repo: consentdotio/c15t-docs PR: 0
File: .cursor/rules/ultracite.mdc:0-0
Timestamp: 2025-12-17T14:48:41.563Z
Learning: Applies to **/*.{ts,tsx,js,jsx} : Declare regex literals at the top level

Applied to files:

  • packages/docs/src/llm/llm.ts
📚 Learning: 2025-12-17T14:48:41.563Z
Learnt from: CR
Repo: consentdotio/c15t-docs PR: 0
File: .cursor/rules/ultracite.mdc:0-0
Timestamp: 2025-12-17T14:48:41.563Z
Learning: Applies to **/*.{ts,tsx,js,jsx} : Make sure JSDoc comment lines start with a single asterisk, except for the first one

Applied to files:

  • packages/docs/src/llm/llm.ts
📚 Learning: 2026-02-19T01:12:44.177Z
Learnt from: CR
Repo: consentdotio/agent-skills PR: 0
File: tsdoc-jsdoc-authoring/AGENTS.md:0-0
Timestamp: 2026-02-19T01:12:44.177Z
Learning: Applies to tsdoc-jsdoc-authoring/**/*.{js,jsx} : Write JSDoc summaries with intent in JavaScript files

Applied to files:

  • packages/docs/src/llm/llm.ts
📚 Learning: 2026-01-31T11:24:55.220Z
Learnt from: CR
Repo: consentdotio/monorepo PR: 0
File: .cursor/rules/docs-rules.mdc:0-0
Timestamp: 2026-01-31T11:24:55.220Z
Learning: Applies to apps/docs/app/**/{layout,page}.tsx : Keep layouts and pages separate in the docs app directory

Applied to files:

  • packages/docs/src/llm/llm.ts
📚 Learning: 2026-03-19T22:57:45.114Z
Learnt from: CR
Repo: consentdotio/GDPRish PR: 0
File: .cursor/rules/global-rules.mdc:0-0
Timestamp: 2026-03-19T22:57:45.114Z
Learning: Applies to **/*.{ts,tsx,js,jsx} : Document components with purpose and use case, required and optional props, context requirements, example usage, and common pitfalls

Applied to files:

  • packages/docs/src/llm/llm.ts
📚 Learning: 2026-01-31T11:24:55.220Z
Learnt from: CR
Repo: consentdotio/monorepo PR: 0
File: .cursor/rules/docs-rules.mdc:0-0
Timestamp: 2026-01-31T11:24:55.220Z
Learning: Applies to apps/docs/app/**/page.tsx : Place page components in appropriate route segments within the docs app

Applied to files:

  • packages/docs/src/llm/llm.ts
📚 Learning: 2026-02-20T14:21:40.180Z
Learnt from: CR
Repo: consentdotio/dsar PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-02-20T14:21:40.180Z
Learning: Applies to **/*.test.{ts,tsx,js,jsx} : Keep test suites reasonably flat - avoid excessive `describe` nesting

Applied to files:

  • packages/docs/src/llm/llm.test.ts
  • packages/docs/src/internal/docs-context.test.ts
📚 Learning: 2026-02-20T14:21:19.208Z
Learnt from: CR
Repo: consentdotio/dsar PR: 0
File: .cursor/rules/ultracite.mdc:0-0
Timestamp: 2026-02-20T14:21:19.208Z
Learning: Applies to **/*.{test,spec}.{ts,tsx,js,jsx} : Keep test suites reasonably flat - avoid excessive `describe` nesting

Applied to files:

  • packages/docs/src/llm/llm.test.ts
  • packages/docs/src/internal/docs-context.test.ts
📚 Learning: 2026-04-18T15:01:52.690Z
Learnt from: CR
Repo: inthhq/docs PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-18T15:01:52.690Z
Learning: Applies to **/*.{test,spec}.{js,ts,jsx,tsx} : Keep test suites reasonably flat - avoid excessive `describe` nesting

Applied to files:

  • packages/docs/src/llm/llm.test.ts
📚 Learning: 2026-04-16T03:27:04.353Z
Learnt from: CR
Repo: inthhq/dsar PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-16T03:27:04.353Z
Learning: Applies to **/*.{test,spec}.{js,jsx,ts,tsx} : Keep test suites reasonably flat - avoid excessive `describe` nesting

Applied to files:

  • packages/docs/src/llm/llm.test.ts
📚 Learning: 2026-02-19T01:12:44.177Z
Learnt from: CR
Repo: consentdotio/agent-skills PR: 0
File: tsdoc-jsdoc-authoring/AGENTS.md:0-0
Timestamp: 2026-02-19T01:12:44.177Z
Learning: Applies to tsdoc-jsdoc-authoring/**/*.{js,jsx} : Document generator output with `yields` in JSDoc comments

Applied to files:

  • packages/docs/src/llm/llm.test.ts
📚 Learning: 2025-12-01T15:20:25.102Z
Learnt from: CR
Repo: consentdotio/c15t-docs PR: 0
File: .cursor/rules/open-graph.mdc:0-0
Timestamp: 2025-12-01T15:20:25.102Z
Learning: Applies to src/**/route.{ts,tsx} : Avoid fetching arbitrary external images or fonts at render time unless they are proxied and cached to prevent latency and failures

Applied to files:

  • packages/docs/src/lint/runner.ts
📚 Learning: 2026-02-19T01:12:44.177Z
Learnt from: CR
Repo: consentdotio/agent-skills PR: 0
File: tsdoc-jsdoc-authoring/AGENTS.md:0-0
Timestamp: 2026-02-19T01:12:44.177Z
Learning: Applies to tsdoc-jsdoc-authoring/**/*.{ts,tsx,js,jsx} : Prefer `{link ...}` for symbol references in TSDoc and JSDoc comments

Applied to files:

  • packages/docs/src/lint/runner.ts
📚 Learning: 2026-02-19T01:12:44.177Z
Learnt from: CR
Repo: consentdotio/agent-skills PR: 0
File: tsdoc-jsdoc-authoring/AGENTS.md:0-0
Timestamp: 2026-02-19T01:12:44.177Z
Learning: Applies to tsdoc-jsdoc-authoring/**/*.{ts,tsx,js,jsx} : Use `remarks` for long-form context in TSDoc and JSDoc comments

Applied to files:

  • packages/docs/src/lint/runner.ts
📚 Learning: 2026-03-19T16:08:15.951Z
Learnt from: CR
Repo: consentdotio/c-ray PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-03-19T16:08:15.951Z
Learning: When fetching data in route loaders, load the router-core data-loading skill file from node_modules/tanstack/router-core/skills/router-core/data-loading/SKILL.md

Applied to files:

  • packages/docs/src/lint/runner.ts
📚 Learning: 2025-12-01T15:20:25.102Z
Learnt from: CR
Repo: consentdotio/c15t-docs PR: 0
File: .cursor/rules/open-graph.mdc:0-0
Timestamp: 2025-12-01T15:20:25.102Z
Learning: Applies to src/**/route.{ts,tsx} : Cache fonts and assets to avoid fetching on every request; prefer inline or base64 image sources when data is already in memory

Applied to files:

  • packages/docs/src/lint/runner.ts
📚 Learning: 2026-02-19T01:12:44.177Z
Learnt from: CR
Repo: consentdotio/agent-skills PR: 0
File: tsdoc-jsdoc-authoring/AGENTS.md:0-0
Timestamp: 2026-02-19T01:12:44.177Z
Learning: Applies to tsdoc-jsdoc-authoring/**/*.{js,jsx} : Use `module` for module-level docs in JSDoc comments

Applied to files:

  • packages/docs/src/internal/docs-context.test.ts
📚 Learning: 2025-07-23T12:51:43.299Z
Learnt from: CR
Repo: consentdotio/monorepo PR: 0
File: .cursor/rules/global-rules.mdc:0-0
Timestamp: 2025-07-23T12:51:43.299Z
Learning: Applies to **/*.{test,spec}.{ts,tsx,js,jsx} : Include integration tests for component combinations

Applied to files:

  • packages/docs/src/internal/docs-context.test.ts

Comment thread packages/docs/src/lint/runner.ts
Comment thread packages/docs/src/lint/runner.ts Outdated
Comment thread packages/docs/src/llm/llm.ts Outdated
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
packages/docs/src/llm/llm.ts (1)

7-7: 🧹 Nitpick | 🔵 Trivial

Consider enforcing lowercase-only slugs.

The regex TOPIC_SLUG_PATTERN allows uppercase letters via the i flag. While duplicate detection is case-insensitive (line 440), a single uppercase slug like "React" would create React.txt, which could cause confusion or issues when referenced on case-insensitive filesystems.

Optional: Enforce lowercase slugs
-const TOPIC_SLUG_PATTERN = /^[a-z0-9]+(?:-[a-z0-9]+)*$/i;
+const TOPIC_SLUG_PATTERN = /^[a-z0-9]+(?:-[a-z0-9]+)*$/;

Then update the error message in assertValidTopicSlug to clarify that slugs must be lowercase.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/docs/src/llm/llm.ts` at line 7, Change TOPIC_SLUG_PATTERN to enforce
lowercase-only slugs by removing the case-insensitive flag (make the regex match
only [a-z0-9] and hyphen groups) and update the validation message in
assertValidTopicSlug to explicitly state that slugs must be lowercase (e.g.,
"slug must contain only lowercase letters, numbers, and hyphens"). Keep the rest
of the duplicate-detection logic as-is (it already handles case-insensitivity).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@packages/docs/src/lint/runner.ts`:
- Around line 223-225: The current looksLikeMarkdownUrlCandidate treats any
value with a placeholder as a docs-link candidate; change it so
placeholder-containing links are only considered docs candidates when they also
target docs routes. Update looksLikeMarkdownUrlCandidate to return true when
value.startsWith("/docs/") OR when hasDocPlaceholder(value) AND the value
contains a docs path segment (e.g. includes "/docs/"); this ensures the
unresolved-placeholder path (the logic around
unresolved-placeholder/unresolvedPlaceholder handling) only triggers for
placeholders that actually point at internal docs routes.

---

Outside diff comments:
In `@packages/docs/src/llm/llm.ts`:
- Line 7: Change TOPIC_SLUG_PATTERN to enforce lowercase-only slugs by removing
the case-insensitive flag (make the regex match only [a-z0-9] and hyphen groups)
and update the validation message in assertValidTopicSlug to explicitly state
that slugs must be lowercase (e.g., "slug must contain only lowercase letters,
numbers, and hyphens"). Keep the rest of the duplicate-detection logic as-is (it
already handles case-insensitivity).
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 7ca0dc93-daf5-4d19-bdd5-478521b11a9e

📥 Commits

Reviewing files that changed from the base of the PR and between 568f604 and 0430fbc.

📒 Files selected for processing (4)
  • packages/docs/src/lint/lint.test.ts
  • packages/docs/src/lint/runner.ts
  • packages/docs/src/llm/llm.test.ts
  • packages/docs/src/llm/llm.ts
📜 Review details
🧰 Additional context used
📓 Path-based instructions (3)
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{ts,tsx}: Use explicit types for function parameters and return values when they enhance clarity
Prefer unknown over any when the type is genuinely unknown
Use const assertions (as const) for immutable values and literal types
Leverage TypeScript's type narrowing instead of type assertions

Files:

  • packages/docs/src/lint/lint.test.ts
  • packages/docs/src/llm/llm.ts
  • packages/docs/src/llm/llm.test.ts
  • packages/docs/src/lint/runner.ts
**/*.{js,ts,jsx,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{js,ts,jsx,tsx}: Use meaningful variable names instead of magic numbers - extract constants with descriptive names
Use arrow functions for callbacks and short functions
Prefer for...of loops over .forEach() and indexed for loops
Use optional chaining (?.) and nullish coalescing (??) for safer property access
Prefer template literals over string concatenation
Use destructuring for object and array assignments
Use const by default, let only when reassignment is needed, never var
Always await promises in async functions - don't forget to use the return value
Use async/await syntax instead of promise chains for better readability
Handle errors appropriately in async code with try-catch blocks
Don't use async functions as Promise executors
Remove console.log, debugger, and alert statements from production code
Throw Error objects with descriptive messages, not strings or other values
Use try-catch blocks meaningfully - don't catch errors just to rethrow them
Prefer early returns over nested conditionals for error cases
Extract complex conditions into well-named boolean variables
Use early returns to reduce nesting
Prefer simple conditionals over nested ternary operators
Don't use eval() or assign directly to document.cookie
Avoid spread syntax in accumulators within loops
Use top-level regex literals instead of creating them in loops
Prefer specific imports over namespace imports
Use descriptive names for functions, variables, and types for meaningful naming
Add comments for complex logic, but prefer self-documenting code

Files:

  • packages/docs/src/lint/lint.test.ts
  • packages/docs/src/llm/llm.ts
  • packages/docs/src/llm/llm.test.ts
  • packages/docs/src/lint/runner.ts
**/*.{test,spec}.{js,ts,jsx,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{test,spec}.{js,ts,jsx,tsx}: Write assertions inside it() or test() blocks
Avoid done callbacks in async tests - use async/await instead
Don't use .only or .skip in committed code
Keep test suites reasonably flat - avoid excessive describe nesting

Files:

  • packages/docs/src/lint/lint.test.ts
  • packages/docs/src/llm/llm.test.ts
🧠 Learnings (38)
📓 Common learnings
Learnt from: CR
Repo: consentdotio/monorepo PR: 0
File: .cursor/rules/docs-rules.mdc:0-0
Timestamp: 2026-01-31T11:24:55.220Z
Learning: Applies to apps/docs/**/*.mdx : Include code examples where appropriate in MDX documentation pages of the docs app
Learnt from: CR
Repo: consentdotio/GDPRish PR: 0
File: .cursor/rules/docs-rules.mdc:0-0
Timestamp: 2026-03-19T22:57:19.913Z
Learning: Applies to apps/docs/**/*.mdx : Use MDX for documentation pages
Learnt from: CR
Repo: consentdotio/monorepo PR: 0
File: .cursor/rules/docs-rules.mdc:0-0
Timestamp: 2026-01-31T11:24:55.220Z
Learning: Applies to apps/docs/**/*.mdx : Use MDX for documentation pages in the docs app
Learnt from: CR
Repo: consentdotio/GDPRish PR: 0
File: .cursor/rules/docs-rules.mdc:0-0
Timestamp: 2026-03-19T22:57:19.913Z
Learning: Applies to apps/docs/**/*.mdx : Keep documentation organized by categories
Learnt from: CR
Repo: consentdotio/GDPRish PR: 0
File: .cursor/rules/docs-rules.mdc:0-0
Timestamp: 2026-03-19T22:57:19.913Z
Learning: Applies to apps/docs/**/*.mdx : Include code examples where appropriate in documentation
Learnt from: CR
Repo: consentdotio/GDPRish PR: 0
File: .cursor/rules/elements-rules.mdc:0-0
Timestamp: 2026-03-19T22:57:33.411Z
Learning: Applies to packages/elements/**/*.{ts,tsx,md} : Include TypeScript examples in Elements package documentation
Learnt from: CR
Repo: consentdotio/agent-skills PR: 0
File: tsdoc-jsdoc-authoring/AGENTS.md:0-0
Timestamp: 2026-02-19T01:12:44.177Z
Learning: Applies to tsdoc-jsdoc-authoring/**/index.{ts,tsx} : Use `packageDocumentation` for entrypoint docs in TSDoc comments
📚 Learning: 2025-07-23T12:51:10.961Z
Learnt from: CR
Repo: consentdotio/monorepo PR: 0
File: .cursor/rules/elements-rules.mdc:0-0
Timestamp: 2025-07-23T12:51:10.961Z
Learning: Applies to packages/elements/**/*.test.{ts,tsx} : Use Vitest for testing framework

Applied to files:

  • packages/docs/src/lint/lint.test.ts
  • packages/docs/src/llm/llm.test.ts
📚 Learning: 2026-03-19T22:57:33.411Z
Learnt from: CR
Repo: consentdotio/GDPRish PR: 0
File: .cursor/rules/elements-rules.mdc:0-0
Timestamp: 2026-03-19T22:57:33.411Z
Learning: Applies to packages/elements/**/*.{test,spec}.{ts,tsx} : Write unit tests for components in Elements package using Vitest

Applied to files:

  • packages/docs/src/lint/lint.test.ts
  • packages/docs/src/llm/llm.test.ts
📚 Learning: 2026-03-19T22:57:33.411Z
Learnt from: CR
Repo: consentdotio/GDPRish PR: 0
File: .cursor/rules/elements-rules.mdc:0-0
Timestamp: 2026-03-19T22:57:33.411Z
Learning: Applies to packages/elements/**/*.{test,spec}.{ts,tsx} : Use Vitest as the testing framework for Elements package

Applied to files:

  • packages/docs/src/lint/lint.test.ts
  • packages/docs/src/llm/llm.test.ts
📚 Learning: 2026-03-19T22:57:33.411Z
Learnt from: CR
Repo: consentdotio/GDPRish PR: 0
File: .cursor/rules/elements-rules.mdc:0-0
Timestamp: 2026-03-19T22:57:33.411Z
Learning: Applies to packages/elements/**/*.{test,spec}.{ts,tsx} : Test accessibility features in Elements package component tests

Applied to files:

  • packages/docs/src/lint/lint.test.ts
  • packages/docs/src/llm/llm.test.ts
📚 Learning: 2026-03-19T22:57:45.114Z
Learnt from: CR
Repo: consentdotio/GDPRish PR: 0
File: .cursor/rules/global-rules.mdc:0-0
Timestamp: 2026-03-19T22:57:45.114Z
Learning: Applies to **/*.{test,spec}.{ts,tsx,js,jsx} : Include unit tests for components, integration tests for component combinations, accessibility tests, and error boundary tests

Applied to files:

  • packages/docs/src/lint/lint.test.ts
  • packages/docs/src/llm/llm.test.ts
📚 Learning: 2026-03-19T22:57:33.411Z
Learnt from: CR
Repo: consentdotio/GDPRish PR: 0
File: .cursor/rules/elements-rules.mdc:0-0
Timestamp: 2026-03-19T22:57:33.411Z
Learning: Applies to packages/elements/**/*.{test,spec}.{ts,tsx} : Include integration tests for Elements package components

Applied to files:

  • packages/docs/src/lint/lint.test.ts
  • packages/docs/src/llm/llm.test.ts
📚 Learning: 2025-07-23T12:51:10.961Z
Learnt from: CR
Repo: consentdotio/monorepo PR: 0
File: .cursor/rules/elements-rules.mdc:0-0
Timestamp: 2025-07-23T12:51:10.961Z
Learning: Applies to packages/elements/**/*.test.{ts,tsx} : Test accessibility features

Applied to files:

  • packages/docs/src/lint/lint.test.ts
📚 Learning: 2025-07-23T12:51:10.961Z
Learnt from: CR
Repo: consentdotio/monorepo PR: 0
File: .cursor/rules/elements-rules.mdc:0-0
Timestamp: 2025-07-23T12:51:10.961Z
Learning: Applies to packages/elements/**/*.test.{ts,tsx} : Write unit tests for components

Applied to files:

  • packages/docs/src/lint/lint.test.ts
  • packages/docs/src/llm/llm.test.ts
📚 Learning: 2026-03-19T22:58:00.031Z
Learnt from: CR
Repo: consentdotio/GDPRish PR: 0
File: .cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc:0-0
Timestamp: 2026-03-19T22:58:00.031Z
Learning: Applies to **/*.test.{ts,tsx,js,jsx} : Write comprehensive unit tests with clear test case names describing what is being tested

Applied to files:

  • packages/docs/src/lint/lint.test.ts
  • packages/docs/src/llm/llm.test.ts
📚 Learning: 2025-07-23T12:51:10.961Z
Learnt from: CR
Repo: consentdotio/monorepo PR: 0
File: .cursor/rules/elements-rules.mdc:0-0
Timestamp: 2025-07-23T12:51:10.961Z
Learning: Applies to packages/elements/**/*.test.{ts,tsx} : Include integration tests

Applied to files:

  • packages/docs/src/lint/lint.test.ts
📚 Learning: 2026-02-20T14:21:19.208Z
Learnt from: CR
Repo: consentdotio/dsar PR: 0
File: .cursor/rules/ultracite.mdc:0-0
Timestamp: 2026-02-20T14:21:19.208Z
Learning: Applies to **/*.{test,spec}.{ts,tsx,js,jsx} : Write assertions inside `it()` or `test()` blocks

Applied to files:

  • packages/docs/src/lint/lint.test.ts
📚 Learning: 2026-04-18T15:01:52.690Z
Learnt from: CR
Repo: inthhq/docs PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-18T15:01:52.690Z
Learning: Applies to **/*.{test,spec}.{js,ts,jsx,tsx} : Write assertions inside `it()` or `test()` blocks

Applied to files:

  • packages/docs/src/lint/lint.test.ts
📚 Learning: 2026-04-16T03:27:04.353Z
Learnt from: CR
Repo: inthhq/dsar PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-16T03:27:04.353Z
Learning: Applies to **/*.{test,spec}.{js,jsx,ts,tsx} : Write assertions inside `it()` or `test()` blocks

Applied to files:

  • packages/docs/src/lint/lint.test.ts
📚 Learning: 2026-02-20T14:21:40.180Z
Learnt from: CR
Repo: consentdotio/dsar PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-02-20T14:21:40.180Z
Learning: Applies to **/*.test.{ts,tsx,js,jsx} : Write assertions inside `it()` or `test()` blocks

Applied to files:

  • packages/docs/src/lint/lint.test.ts
📚 Learning: 2025-12-17T14:48:41.563Z
Learnt from: CR
Repo: consentdotio/c15t-docs PR: 0
File: .cursor/rules/ultracite.mdc:0-0
Timestamp: 2025-12-17T14:48:41.563Z
Learning: Applies to **/*.{ts,tsx,js,jsx} : Make sure the assertion function, like expect, is placed inside an it() function call

Applied to files:

  • packages/docs/src/lint/lint.test.ts
📚 Learning: 2026-02-20T14:21:19.208Z
Learnt from: CR
Repo: consentdotio/dsar PR: 0
File: .cursor/rules/ultracite.mdc:0-0
Timestamp: 2026-02-20T14:21:19.208Z
Learning: Applies to **/*.{test,spec}.{ts,tsx,js,jsx} : Keep test suites reasonably flat - avoid excessive `describe` nesting

Applied to files:

  • packages/docs/src/lint/lint.test.ts
  • packages/docs/src/llm/llm.test.ts
📚 Learning: 2026-02-20T14:21:40.180Z
Learnt from: CR
Repo: consentdotio/dsar PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-02-20T14:21:40.180Z
Learning: Applies to **/*.test.{ts,tsx,js,jsx} : Keep test suites reasonably flat - avoid excessive `describe` nesting

Applied to files:

  • packages/docs/src/lint/lint.test.ts
  • packages/docs/src/llm/llm.test.ts
📚 Learning: 2026-02-19T01:12:44.177Z
Learnt from: CR
Repo: consentdotio/agent-skills PR: 0
File: tsdoc-jsdoc-authoring/AGENTS.md:0-0
Timestamp: 2026-02-19T01:12:44.177Z
Learning: Applies to tsdoc-jsdoc-authoring/**/*.{ts,tsx,js,jsx} : Write clear summary sentences in TSDoc and JSDoc comments

Applied to files:

  • packages/docs/src/llm/llm.ts
📚 Learning: 2025-12-17T14:48:41.563Z
Learnt from: CR
Repo: consentdotio/c15t-docs PR: 0
File: .cursor/rules/ultracite.mdc:0-0
Timestamp: 2025-12-17T14:48:41.563Z
Learning: Applies to **/*.{ts,tsx,js,jsx} : Don't compare expressions that modify string case with non-compliant values

Applied to files:

  • packages/docs/src/llm/llm.ts
📚 Learning: 2025-12-17T14:48:41.563Z
Learnt from: CR
Repo: consentdotio/c15t-docs PR: 0
File: .cursor/rules/ultracite.mdc:0-0
Timestamp: 2025-12-17T14:48:41.563Z
Learning: Applies to **/*.{ts,tsx,js,jsx} : Don't use constants whose value is the upper-case version of their name

Applied to files:

  • packages/docs/src/llm/llm.ts
📚 Learning: 2025-12-17T14:48:41.563Z
Learnt from: CR
Repo: consentdotio/c15t-docs PR: 0
File: .cursor/rules/ultracite.mdc:0-0
Timestamp: 2025-12-17T14:48:41.563Z
Learning: Applies to **/*.{ts,tsx,js,jsx} : Don't use duplicate case labels

Applied to files:

  • packages/docs/src/llm/llm.ts
📚 Learning: 2026-03-19T22:57:19.913Z
Learnt from: CR
Repo: consentdotio/GDPRish PR: 0
File: .cursor/rules/docs-rules.mdc:0-0
Timestamp: 2026-03-19T22:57:19.913Z
Learning: Applies to apps/docs/**/*.mdx : Keep documentation organized by categories

Applied to files:

  • packages/docs/src/llm/llm.ts
  • packages/docs/src/lint/runner.ts
📚 Learning: 2026-03-19T22:57:19.913Z
Learnt from: CR
Repo: consentdotio/GDPRish PR: 0
File: .cursor/rules/docs-rules.mdc:0-0
Timestamp: 2026-03-19T22:57:19.913Z
Learning: Applies to apps/docs/**/*.mdx : Use MDX for documentation pages

Applied to files:

  • packages/docs/src/llm/llm.ts
📚 Learning: 2026-01-31T11:24:55.220Z
Learnt from: CR
Repo: consentdotio/monorepo PR: 0
File: .cursor/rules/docs-rules.mdc:0-0
Timestamp: 2026-01-31T11:24:55.220Z
Learning: Applies to apps/docs/**/*.mdx : Use MDX for documentation pages in the docs app

Applied to files:

  • packages/docs/src/llm/llm.ts
📚 Learning: 2025-12-17T14:48:41.563Z
Learnt from: CR
Repo: consentdotio/c15t-docs PR: 0
File: .cursor/rules/ultracite.mdc:0-0
Timestamp: 2025-12-17T14:48:41.563Z
Learning: Applies to **/*.{ts,tsx,js,jsx} : Declare regex literals at the top level

Applied to files:

  • packages/docs/src/llm/llm.ts
📚 Learning: 2025-12-17T14:48:41.563Z
Learnt from: CR
Repo: consentdotio/c15t-docs PR: 0
File: .cursor/rules/ultracite.mdc:0-0
Timestamp: 2025-12-17T14:48:41.563Z
Learning: Applies to **/*.{ts,tsx,js,jsx} : Make sure JSDoc comment lines start with a single asterisk, except for the first one

Applied to files:

  • packages/docs/src/llm/llm.ts
📚 Learning: 2026-02-19T01:12:44.177Z
Learnt from: CR
Repo: consentdotio/agent-skills PR: 0
File: tsdoc-jsdoc-authoring/AGENTS.md:0-0
Timestamp: 2026-02-19T01:12:44.177Z
Learning: Applies to tsdoc-jsdoc-authoring/**/*.{js,jsx} : Write JSDoc summaries with intent in JavaScript files

Applied to files:

  • packages/docs/src/llm/llm.ts
📚 Learning: 2026-01-31T11:24:55.220Z
Learnt from: CR
Repo: consentdotio/monorepo PR: 0
File: .cursor/rules/docs-rules.mdc:0-0
Timestamp: 2026-01-31T11:24:55.220Z
Learning: Applies to apps/docs/app/**/{layout,page}.tsx : Keep layouts and pages separate in the docs app directory

Applied to files:

  • packages/docs/src/llm/llm.ts
📚 Learning: 2026-03-19T22:57:45.114Z
Learnt from: CR
Repo: consentdotio/GDPRish PR: 0
File: .cursor/rules/global-rules.mdc:0-0
Timestamp: 2026-03-19T22:57:45.114Z
Learning: Applies to **/*.{ts,tsx,js,jsx} : Document components with purpose and use case, required and optional props, context requirements, example usage, and common pitfalls

Applied to files:

  • packages/docs/src/llm/llm.ts
📚 Learning: 2026-01-31T11:24:55.220Z
Learnt from: CR
Repo: consentdotio/monorepo PR: 0
File: .cursor/rules/docs-rules.mdc:0-0
Timestamp: 2026-01-31T11:24:55.220Z
Learning: Applies to apps/docs/app/**/page.tsx : Place page components in appropriate route segments within the docs app

Applied to files:

  • packages/docs/src/llm/llm.ts
📚 Learning: 2026-04-18T15:01:52.690Z
Learnt from: CR
Repo: inthhq/docs PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-18T15:01:52.690Z
Learning: Applies to **/*.{test,spec}.{js,ts,jsx,tsx} : Keep test suites reasonably flat - avoid excessive `describe` nesting

Applied to files:

  • packages/docs/src/llm/llm.test.ts
📚 Learning: 2026-04-16T03:27:04.353Z
Learnt from: CR
Repo: inthhq/dsar PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-16T03:27:04.353Z
Learning: Applies to **/*.{test,spec}.{js,jsx,ts,tsx} : Keep test suites reasonably flat - avoid excessive `describe` nesting

Applied to files:

  • packages/docs/src/llm/llm.test.ts
📚 Learning: 2025-12-01T15:20:25.102Z
Learnt from: CR
Repo: consentdotio/c15t-docs PR: 0
File: .cursor/rules/open-graph.mdc:0-0
Timestamp: 2025-12-01T15:20:25.102Z
Learning: Applies to src/**/route.{ts,tsx} : Avoid fetching arbitrary external images or fonts at render time unless they are proxied and cached to prevent latency and failures

Applied to files:

  • packages/docs/src/lint/runner.ts
📚 Learning: 2025-12-17T14:48:41.563Z
Learnt from: CR
Repo: consentdotio/c15t-docs PR: 0
File: .cursor/rules/ultracite.mdc:0-0
Timestamp: 2025-12-17T14:48:41.563Z
Learning: Applies to **/*.{ts,tsx,js,jsx} : Make sure all anchors are valid and navigable

Applied to files:

  • packages/docs/src/lint/runner.ts
📚 Learning: 2026-02-19T01:12:44.177Z
Learnt from: CR
Repo: consentdotio/agent-skills PR: 0
File: tsdoc-jsdoc-authoring/AGENTS.md:0-0
Timestamp: 2026-02-19T01:12:44.177Z
Learning: Applies to tsdoc-jsdoc-authoring/**/*.{ts,tsx,js,jsx} : Use `remarks` for long-form context in TSDoc and JSDoc comments

Applied to files:

  • packages/docs/src/lint/runner.ts
📚 Learning: 2026-03-19T16:08:15.951Z
Learnt from: CR
Repo: consentdotio/c-ray PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-03-19T16:08:15.951Z
Learning: When fetching data in route loaders, load the router-core data-loading skill file from node_modules/tanstack/router-core/skills/router-core/data-loading/SKILL.md

Applied to files:

  • packages/docs/src/lint/runner.ts
📚 Learning: 2025-12-01T15:20:25.102Z
Learnt from: CR
Repo: consentdotio/c15t-docs PR: 0
File: .cursor/rules/open-graph.mdc:0-0
Timestamp: 2025-12-01T15:20:25.102Z
Learning: Applies to src/**/route.{ts,tsx} : Cache fonts and assets to avoid fetching on every request; prefer inline or base64 image sources when data is already in memory

Applied to files:

  • packages/docs/src/lint/runner.ts
🔍 Remote MCP

I've encountered rate limits with the Context7 API. Let me attempt to gather information about the PR using web search to supplement the analysis with current technical details about the libraries and patterns used.Based on my research into the core libraries and frameworks used in this PR, I can now provide a comprehensive summary of relevant technical context for reviewing this pull request.

Technical Context Summary

Remark and Unified Ecosystem Architecture

Remark is an ecosystem of plugins that work with markdown as structured data, specifically ASTs (abstract syntax trees), and plugins inspect and change trees, with the ability to use many existing plugins or create custom ones. The PR leverages this architecture heavily with the new remarkResolveDocPlaceholders plugin.

Unified uses abstract syntax trees that plugins can operate on, and can process between different formats—meaning you can parse a markdown document, transform it to HTML, and then transpile back to markdown. This is directly relevant to the PR's MDX-to-Markdown conversion pipeline.

MDX Processing Pipeline

MDX processing runs content through a two-stage AST pipeline; Stage 1 (remark) parses the MDX source into a Markdown AST called mdast where remark plugins operate and can add, remove, or transform nodes before the tree is converted to HTML. The PR's plugin insertions into defaultRemarkPlugins follow this architectural pattern.

Practical Pattern for Agent-Optimized Docs

Recent docs pipelines have been rebuilt to serve both HTML for humans and fully resolved Markdown for AI agents by natively compiling MDX into clean, fully-resolved Markdown—rather than heavy HTML or unresolved source code—allowing agents and LLMs to ingest docs 7x faster and with far higher accuracy. This directly aligns with the PR's goals for generating agent-facing documentation bundles.

AST Traversal Implementation Details

Visitors in unist-util-visit are free to transform nodes and can also transform parent; replacing a node itself still causes its descendants to be walked; when adding or removing previous siblings, the visitor should return a new Index to specify the sibling to traverse after the node is traversed; adding or removing next siblings is handled as expected without needing to return a new Index. This is directly relevant to the PR's implementation of remarkResolveDocPlaceholders and the card/list node processing updates.

Plugin Structure Pattern

A plugin works by creating a JavaScript function that returns a transformer method, which will be run on each node that is found by the unist-util-visit package's visit method. The PR follows this standard pattern for all new remark plugins.


Key PR-Specific Technical Observations

MDX to Agent-Markdown Strategy: The PR implements a full pipeline from source MDX to optimized agent-readable Markdown, aligning with industry best practices of treating AI agents as a primary documentation consumer (as noted in the IMG.LY case study example).

Plugin Ordering and Composition: The new remarkResolveDocPlaceholders plugin is positioned immediately after remarkRemoveImports in defaultRemarkPlugins, which is the correct placement for resolving placeholders after imports are stripped but before component flattening logic runs.

Nested Topic Support: The LLM generation now supports hierarchical topic structures with router files and nested leaves, extending the previous flat topic model.

Linting Scope Expansion: The lint runner now includes content-level validation (markdown rendering failures, internal link checks) alongside existing frontmatter validation, with special handling for **/_shared/** patterns.

[::web_search::]

🔇 Additional comments (13)
packages/docs/src/llm/llm.test.ts (6)

1-22: Well-structured test setup with proper cleanup.

The temp directory management pattern is clean: mkdtemp creates isolated test directories, tempDirs tracks them, and afterEach performs recursive cleanup. Using splice(0) to atomically clear and iterate the array is a nice touch.


24-103: Good coverage of fallback title and description behavior.

These tests validate important edge cases: section-friendly titles for index routes and proper handling of root index files. The assertions checking for absence of placeholder text ("No description provided.", "[Index]", "[.]") help prevent regressions.


105-138: Clean fixture seeding helper.

The seedOutDir function creates a realistic directory structure with proper frontmatter. The local write helper keeps the test code DRY.


140-229: Thorough testing of nested topic emission.

This test validates the core nested topic feature: router files, leaf files at correct paths, content isolation (React leaf contains only React content, not Next.js). The assertions cover the full hierarchy from root router down to individual leaves.


262-312: Good coverage of stale file cleanup.

This test verifies that when a topic structure changes from nested to flat, orphaned files (like frameworks/react.txt) are properly removed. This prevents shipping stale agent references.


363-429: Validation tests cover important edge cases.

The duplicate slug tests (both exact match and case-insensitive) ensure robust validation. The case-insensitive check at lines 397-429 addresses potential filesystem collisions on case-insensitive systems.

packages/docs/src/llm/llm.ts (6)

51-86: Well-designed discriminated union for topic types.

The ResolvedLeafTopic and ResolvedParentTopic types with a kind discriminant enable type-safe handling of the topic hierarchy. The FullTopic input type with mutually exclusive optional fields is documented clearly.


138-152: Root index fallback is now handled correctly.

The updated titleFromRelativePath properly checks for empty/. parent segments and falls back to "documentation" for root-level generic files. This addresses the previous review comment.


432-488: Robust topic resolution with comprehensive validation.

The resolveTopics function now:

  • Validates slug format via assertValidTopicSlug
  • Detects duplicate siblings case-insensitively (addresses past review)
  • Enforces mutual exclusivity between topics and includePrefixes
  • Requires at least one to be defined
  • Provides descriptive error messages with full path context

The non-null assertions are properly justified with biome-ignore comments since the checks are performed immediately before.


494-516: Clean recursive rendering with proper indentation.

The renderTopicRouterLinks function handles nested topic hierarchies elegantly with incrementing indent levels. Using for...of loops aligns with the coding guidelines.


612-644: Recursive topic tree writing with proper directory creation.

The writeTopicTree function correctly:

  • Constructs file paths from segmentPath
  • Creates parent directories as needed
  • Distinguishes between parent (router) and leaf (content) topics
  • Uses continue for early exit after handling parent topics

707-725: Stale file cleanup before regeneration.

The rm followed by mkdir pattern ensures the llms-full directory is clean before writing new content. This addresses the previous review comment about stale .txt files persisting when topics are renamed or restructured.

packages/docs/src/lint/lint.test.ts (1)

33-325: Strong regression coverage for the new link-validation paths.

This suite exercises the risky cases here well, especially the ignored-route behavior, canonicalUrl placeholder validation, and the final assertion that keeps reference-style links from reporting the same broken target twice.

Comment thread packages/docs/src/lint/runner.ts
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@packages/docs/agent-docs/docs/llms-full.txt`:
- Around line 7-14: The README links under llms-full (the entries Overview,
Authoring, Components, Remark, Generation, Convert, LLM, Validation) currently
use https://example.invalid; update each to package-relative or canonical URLs
(e.g., replace "https://example.invalid/@inth/docs/docs/llms-full/overview.txt"
with "./llms-full/overview.txt" and similarly
"./llms-full/authoring/components.txt", "./llms-full/authoring/remark.txt",
"./llms-full/generation/convert.txt", "./llms-full/generation/llm.txt",
"./llms-full/validation.txt") so the router can resolve them.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 7f618c6b-5111-4809-b8a0-f2f8f2a0f7d6

📥 Commits

Reviewing files that changed from the base of the PR and between 0430fbc and c80a769.

📒 Files selected for processing (3)
  • packages/docs/agent-docs/docs/llms-full.txt
  • packages/docs/src/lint/lint.test.ts
  • packages/docs/src/lint/runner.ts
📜 Review details
🧰 Additional context used
📓 Path-based instructions (3)
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{ts,tsx}: Use explicit types for function parameters and return values when they enhance clarity
Prefer unknown over any when the type is genuinely unknown
Use const assertions (as const) for immutable values and literal types
Leverage TypeScript's type narrowing instead of type assertions

Files:

  • packages/docs/src/lint/lint.test.ts
  • packages/docs/src/lint/runner.ts
**/*.{js,ts,jsx,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{js,ts,jsx,tsx}: Use meaningful variable names instead of magic numbers - extract constants with descriptive names
Use arrow functions for callbacks and short functions
Prefer for...of loops over .forEach() and indexed for loops
Use optional chaining (?.) and nullish coalescing (??) for safer property access
Prefer template literals over string concatenation
Use destructuring for object and array assignments
Use const by default, let only when reassignment is needed, never var
Always await promises in async functions - don't forget to use the return value
Use async/await syntax instead of promise chains for better readability
Handle errors appropriately in async code with try-catch blocks
Don't use async functions as Promise executors
Remove console.log, debugger, and alert statements from production code
Throw Error objects with descriptive messages, not strings or other values
Use try-catch blocks meaningfully - don't catch errors just to rethrow them
Prefer early returns over nested conditionals for error cases
Extract complex conditions into well-named boolean variables
Use early returns to reduce nesting
Prefer simple conditionals over nested ternary operators
Don't use eval() or assign directly to document.cookie
Avoid spread syntax in accumulators within loops
Use top-level regex literals instead of creating them in loops
Prefer specific imports over namespace imports
Use descriptive names for functions, variables, and types for meaningful naming
Add comments for complex logic, but prefer self-documenting code

Files:

  • packages/docs/src/lint/lint.test.ts
  • packages/docs/src/lint/runner.ts
**/*.{test,spec}.{js,ts,jsx,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{test,spec}.{js,ts,jsx,tsx}: Write assertions inside it() or test() blocks
Avoid done callbacks in async tests - use async/await instead
Don't use .only or .skip in committed code
Keep test suites reasonably flat - avoid excessive describe nesting

Files:

  • packages/docs/src/lint/lint.test.ts
🧠 Learnings (29)
📓 Common learnings
Learnt from: CR
Repo: consentdotio/monorepo PR: 0
File: .cursor/rules/docs-rules.mdc:0-0
Timestamp: 2026-01-31T11:24:55.220Z
Learning: Applies to apps/docs/**/*.mdx : Include code examples where appropriate in MDX documentation pages of the docs app
Learnt from: CR
Repo: consentdotio/GDPRish PR: 0
File: .cursor/rules/docs-rules.mdc:0-0
Timestamp: 2026-03-19T22:57:19.913Z
Learning: Applies to apps/docs/**/*.mdx : Use MDX for documentation pages
Learnt from: CR
Repo: consentdotio/monorepo PR: 0
File: .cursor/rules/docs-rules.mdc:0-0
Timestamp: 2026-01-31T11:24:55.220Z
Learning: Applies to apps/docs/**/*.mdx : Use MDX for documentation pages in the docs app
Learnt from: CR
Repo: consentdotio/GDPRish PR: 0
File: .cursor/rules/docs-rules.mdc:0-0
Timestamp: 2026-03-19T22:57:19.913Z
Learning: Applies to apps/docs/**/*.mdx : Keep documentation organized by categories
Learnt from: CR
Repo: consentdotio/GDPRish PR: 0
File: .cursor/rules/docs-rules.mdc:0-0
Timestamp: 2026-03-19T22:57:19.913Z
Learning: Applies to apps/docs/**/*.mdx : Include code examples where appropriate in documentation
Learnt from: CR
Repo: consentdotio/agent-skills PR: 0
File: tsdoc-jsdoc-authoring/AGENTS.md:0-0
Timestamp: 2026-02-19T01:12:44.177Z
Learning: Applies to tsdoc-jsdoc-authoring/**/index.{ts,tsx} : Use `packageDocumentation` for entrypoint docs in TSDoc comments
Learnt from: CR
Repo: consentdotio/GDPRish PR: 0
File: .cursor/rules/elements-rules.mdc:0-0
Timestamp: 2026-03-19T22:57:33.411Z
Learning: Applies to packages/elements/**/*.{ts,tsx,md} : Include TypeScript examples in Elements package documentation
📚 Learning: 2026-02-19T01:12:44.177Z
Learnt from: CR
Repo: consentdotio/agent-skills PR: 0
File: tsdoc-jsdoc-authoring/AGENTS.md:0-0
Timestamp: 2026-02-19T01:12:44.177Z
Learning: Applies to tsdoc-jsdoc-authoring/**/index.{ts,tsx} : Use `packageDocumentation` for entrypoint docs in TSDoc comments

Applied to files:

  • packages/docs/agent-docs/docs/llms-full.txt
📚 Learning: 2026-03-19T22:57:45.114Z
Learnt from: CR
Repo: consentdotio/GDPRish PR: 0
File: .cursor/rules/global-rules.mdc:0-0
Timestamp: 2026-03-19T22:57:45.114Z
Learning: Applies to **/*.{ts,tsx,js,jsx} : Document components with purpose and use case, required and optional props, context requirements, example usage, and common pitfalls

Applied to files:

  • packages/docs/agent-docs/docs/llms-full.txt
📚 Learning: 2025-07-23T12:51:10.961Z
Learnt from: CR
Repo: consentdotio/monorepo PR: 0
File: .cursor/rules/elements-rules.mdc:0-0
Timestamp: 2025-07-23T12:51:10.961Z
Learning: Applies to packages/elements/**/*.test.{ts,tsx} : Use Vitest for testing framework

Applied to files:

  • packages/docs/src/lint/lint.test.ts
📚 Learning: 2026-03-19T22:57:33.411Z
Learnt from: CR
Repo: consentdotio/GDPRish PR: 0
File: .cursor/rules/elements-rules.mdc:0-0
Timestamp: 2026-03-19T22:57:33.411Z
Learning: Applies to packages/elements/**/*.{test,spec}.{ts,tsx} : Write unit tests for components in Elements package using Vitest

Applied to files:

  • packages/docs/src/lint/lint.test.ts
📚 Learning: 2026-03-19T22:57:33.411Z
Learnt from: CR
Repo: consentdotio/GDPRish PR: 0
File: .cursor/rules/elements-rules.mdc:0-0
Timestamp: 2026-03-19T22:57:33.411Z
Learning: Applies to packages/elements/**/*.{test,spec}.{ts,tsx} : Use Vitest as the testing framework for Elements package

Applied to files:

  • packages/docs/src/lint/lint.test.ts
📚 Learning: 2026-03-19T22:57:33.411Z
Learnt from: CR
Repo: consentdotio/GDPRish PR: 0
File: .cursor/rules/elements-rules.mdc:0-0
Timestamp: 2026-03-19T22:57:33.411Z
Learning: Applies to packages/elements/**/*.{test,spec}.{ts,tsx} : Test accessibility features in Elements package component tests

Applied to files:

  • packages/docs/src/lint/lint.test.ts
📚 Learning: 2026-03-19T22:57:33.411Z
Learnt from: CR
Repo: consentdotio/GDPRish PR: 0
File: .cursor/rules/elements-rules.mdc:0-0
Timestamp: 2026-03-19T22:57:33.411Z
Learning: Applies to packages/elements/**/*.{test,spec}.{ts,tsx} : Include integration tests for Elements package components

Applied to files:

  • packages/docs/src/lint/lint.test.ts
📚 Learning: 2026-03-19T22:57:45.114Z
Learnt from: CR
Repo: consentdotio/GDPRish PR: 0
File: .cursor/rules/global-rules.mdc:0-0
Timestamp: 2026-03-19T22:57:45.114Z
Learning: Applies to **/*.{test,spec}.{ts,tsx,js,jsx} : Include unit tests for components, integration tests for component combinations, accessibility tests, and error boundary tests

Applied to files:

  • packages/docs/src/lint/lint.test.ts
📚 Learning: 2025-07-23T12:51:10.961Z
Learnt from: CR
Repo: consentdotio/monorepo PR: 0
File: .cursor/rules/elements-rules.mdc:0-0
Timestamp: 2025-07-23T12:51:10.961Z
Learning: Applies to packages/elements/**/*.test.{ts,tsx} : Test accessibility features

Applied to files:

  • packages/docs/src/lint/lint.test.ts
📚 Learning: 2025-07-23T12:51:10.961Z
Learnt from: CR
Repo: consentdotio/monorepo PR: 0
File: .cursor/rules/elements-rules.mdc:0-0
Timestamp: 2025-07-23T12:51:10.961Z
Learning: Applies to packages/elements/**/*.test.{ts,tsx} : Include integration tests

Applied to files:

  • packages/docs/src/lint/lint.test.ts
📚 Learning: 2025-07-23T12:51:10.961Z
Learnt from: CR
Repo: consentdotio/monorepo PR: 0
File: .cursor/rules/elements-rules.mdc:0-0
Timestamp: 2025-07-23T12:51:10.961Z
Learning: Applies to packages/elements/**/*.test.{ts,tsx} : Write unit tests for components

Applied to files:

  • packages/docs/src/lint/lint.test.ts
📚 Learning: 2026-03-19T22:58:00.031Z
Learnt from: CR
Repo: consentdotio/GDPRish PR: 0
File: .cursor/rules/use-bun-instead-of-node-vite-npm-pnpm.mdc:0-0
Timestamp: 2026-03-19T22:58:00.031Z
Learning: Applies to **/*.test.{ts,tsx,js,jsx} : Write comprehensive unit tests with clear test case names describing what is being tested

Applied to files:

  • packages/docs/src/lint/lint.test.ts
📚 Learning: 2026-02-20T14:21:19.208Z
Learnt from: CR
Repo: consentdotio/dsar PR: 0
File: .cursor/rules/ultracite.mdc:0-0
Timestamp: 2026-02-20T14:21:19.208Z
Learning: Applies to **/*.{test,spec}.{ts,tsx,js,jsx} : Write assertions inside `it()` or `test()` blocks

Applied to files:

  • packages/docs/src/lint/lint.test.ts
📚 Learning: 2026-04-18T15:01:52.690Z
Learnt from: CR
Repo: inthhq/docs PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-18T15:01:52.690Z
Learning: Applies to **/*.{test,spec}.{js,ts,jsx,tsx} : Write assertions inside `it()` or `test()` blocks

Applied to files:

  • packages/docs/src/lint/lint.test.ts
📚 Learning: 2025-12-17T14:48:41.563Z
Learnt from: CR
Repo: consentdotio/c15t-docs PR: 0
File: .cursor/rules/ultracite.mdc:0-0
Timestamp: 2025-12-17T14:48:41.563Z
Learning: Applies to **/*.{ts,tsx,js,jsx} : Make sure all anchors are valid and navigable

Applied to files:

  • packages/docs/src/lint/lint.test.ts
  • packages/docs/src/lint/runner.ts
📚 Learning: 2026-04-16T03:27:04.353Z
Learnt from: CR
Repo: inthhq/dsar PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-04-16T03:27:04.353Z
Learning: Applies to **/*.{test,spec}.{js,jsx,ts,tsx} : Write assertions inside `it()` or `test()` blocks

Applied to files:

  • packages/docs/src/lint/lint.test.ts
📚 Learning: 2026-02-20T14:21:40.180Z
Learnt from: CR
Repo: consentdotio/dsar PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-02-20T14:21:40.180Z
Learning: Applies to **/*.test.{ts,tsx,js,jsx} : Write assertions inside `it()` or `test()` blocks

Applied to files:

  • packages/docs/src/lint/lint.test.ts
📚 Learning: 2025-12-17T14:48:41.563Z
Learnt from: CR
Repo: consentdotio/c15t-docs PR: 0
File: .cursor/rules/ultracite.mdc:0-0
Timestamp: 2025-12-17T14:48:41.563Z
Learning: Applies to **/*.{ts,tsx,js,jsx} : Make sure the assertion function, like expect, is placed inside an it() function call

Applied to files:

  • packages/docs/src/lint/lint.test.ts
📚 Learning: 2026-02-20T14:21:19.208Z
Learnt from: CR
Repo: consentdotio/dsar PR: 0
File: .cursor/rules/ultracite.mdc:0-0
Timestamp: 2026-02-20T14:21:19.208Z
Learning: Applies to **/*.{test,spec}.{ts,tsx,js,jsx} : Avoid done callbacks in async tests - use async/await instead

Applied to files:

  • packages/docs/src/lint/lint.test.ts
📚 Learning: 2025-12-01T15:20:25.102Z
Learnt from: CR
Repo: consentdotio/c15t-docs PR: 0
File: .cursor/rules/open-graph.mdc:0-0
Timestamp: 2025-12-01T15:20:25.102Z
Learning: Applies to src/**/route.{ts,tsx} : Avoid fetching arbitrary external images or fonts at render time unless they are proxied and cached to prevent latency and failures

Applied to files:

  • packages/docs/src/lint/runner.ts
📚 Learning: 2026-02-19T01:12:44.177Z
Learnt from: CR
Repo: consentdotio/agent-skills PR: 0
File: tsdoc-jsdoc-authoring/AGENTS.md:0-0
Timestamp: 2026-02-19T01:12:44.177Z
Learning: Applies to tsdoc-jsdoc-authoring/**/*.{ts,tsx,js,jsx} : Prefer `{link ...}` for symbol references in TSDoc and JSDoc comments

Applied to files:

  • packages/docs/src/lint/runner.ts
📚 Learning: 2026-02-19T01:12:44.177Z
Learnt from: CR
Repo: consentdotio/agent-skills PR: 0
File: tsdoc-jsdoc-authoring/AGENTS.md:0-0
Timestamp: 2026-02-19T01:12:44.177Z
Learning: Applies to tsdoc-jsdoc-authoring/**/*.{ts,tsx} : Use `{label ...}` only for structured references in TSDoc comments

Applied to files:

  • packages/docs/src/lint/runner.ts
📚 Learning: 2025-12-17T14:48:41.563Z
Learnt from: CR
Repo: consentdotio/c15t-docs PR: 0
File: .cursor/rules/ultracite.mdc:0-0
Timestamp: 2025-12-17T14:48:41.563Z
Learning: Applies to **/*.{ts,tsx,js,jsx} : Don't use template literal placeholder syntax in regular strings

Applied to files:

  • packages/docs/src/lint/runner.ts
📚 Learning: 2025-12-17T14:48:41.563Z
Learnt from: CR
Repo: consentdotio/c15t-docs PR: 0
File: .cursor/rules/ultracite.mdc:0-0
Timestamp: 2025-12-17T14:48:41.563Z
Learning: Applies to **/*.{ts,tsx,js,jsx} : Make sure anchors have content that's accessible to screen readers

Applied to files:

  • packages/docs/src/lint/runner.ts
📚 Learning: 2026-02-19T01:12:44.177Z
Learnt from: CR
Repo: consentdotio/agent-skills PR: 0
File: tsdoc-jsdoc-authoring/AGENTS.md:0-0
Timestamp: 2026-02-19T01:12:44.177Z
Learning: Applies to tsdoc-jsdoc-authoring/**/*.{ts,tsx,js,jsx} : Use `remarks` for long-form context in TSDoc and JSDoc comments

Applied to files:

  • packages/docs/src/lint/runner.ts
📚 Learning: 2026-03-19T16:08:15.951Z
Learnt from: CR
Repo: consentdotio/c-ray PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-03-19T16:08:15.951Z
Learning: When fetching data in route loaders, load the router-core data-loading skill file from node_modules/tanstack/router-core/skills/router-core/data-loading/SKILL.md

Applied to files:

  • packages/docs/src/lint/runner.ts
📚 Learning: 2025-12-01T15:20:25.102Z
Learnt from: CR
Repo: consentdotio/c15t-docs PR: 0
File: .cursor/rules/open-graph.mdc:0-0
Timestamp: 2025-12-01T15:20:25.102Z
Learning: Applies to src/**/route.{ts,tsx} : Cache fonts and assets to avoid fetching on every request; prefer inline or base64 image sources when data is already in memory

Applied to files:

  • packages/docs/src/lint/runner.ts
📚 Learning: 2026-03-19T22:57:19.913Z
Learnt from: CR
Repo: consentdotio/GDPRish PR: 0
File: .cursor/rules/docs-rules.mdc:0-0
Timestamp: 2026-03-19T22:57:19.913Z
Learning: Applies to apps/docs/**/*.mdx : Keep documentation organized by categories

Applied to files:

  • packages/docs/src/lint/runner.ts
🔇 Additional comments (17)
packages/docs/src/lint/runner.ts (7)

6-17: LGTM!

The new imports for remark-based AST parsing and internal docs-context utilities are appropriate for the link validation functionality.


27-43: LGTM!

The new lint rules and the "content" kind appropriately extend the type system to support link validation violations.


169-180: LGTM!

The separation of DEFAULT_IGNORE_GLOBS and ROUTE_INDEX_IGNORE_GLOBS allows fine-grained control. The combined ignore list on line 376 ensures routes from ignored sources aren't accepted as valid link targets.


197-229: LGTM!

The helper functions correctly implement the heuristics for identifying docs URL candidates. The looksLikeMarkdownUrlCandidate properly gates placeholder handling to actual docs routes, addressing the previous concern about external template URLs.


256-290: LGTM!

The collectMarkdownUrls function correctly uses a Set to deduplicate URLs, preventing duplicate violations for reference-style links that appear in both definitions and references.


292-350: LGTM!

The validation function correctly prioritizes placeholder detection before route validation and appropriately handles cross-framework link detection. The continue statements prevent redundant violations for the same candidate.


412-446: No action needed. The deriveDocContext(file) function correctly handles absolute paths. The pattern /\/docs\/frameworks\/([^/]+)(?:\/|$)/ searches for the substring "/docs/frameworks/" anywhere in the normalized path, so it works regardless of whether the path is absolute or relative. Framework detection will function correctly.

packages/docs/src/lint/lint.test.ts (10)

7-31: LGTM!

The test setup creates isolated temporary directories per test, and afterEach reliably cleans up all created directories. Using splice(0) to atomically clear and retrieve the array is a clean pattern.


33-84: LGTM!

This test correctly verifies cross-framework link detection when a shared import contains a link to a different framework's docs.


86-122: LGTM!

Good coverage for placeholder resolution in shared imports. The {framework:react} syntax should resolve to the importing framework's context.


124-158: LGTM!

This test effectively validates both unresolved placeholders in frontmatter and invalid links in content are flagged appropriately.


160-191: LGTM!

Verifies that _shared/** fragments are excluded from linting by default, preventing false positives on partial/include-only files.


193-228: LGTM!

Important test confirming that routes from ignored directories (like shared/) are not accepted as valid link targets.


230-257: LGTM!

Good edge case coverage ensuring non-URL frontmatter fields like title and description don't trigger unresolved placeholder errors even when they contain placeholder-like syntax.


259-287: LGTM!

Correctly tests that canonicalUrl is in the URL-like field allowlist and placeholders within it are validated.


289-325: LGTM!

This test validates reference-style markdown link handling and importantly verifies that the same broken link is reported exactly once (no duplicate violations).


327-354: LGTM!

Critical edge case ensuring external/template URLs with placeholders (like {baseUrl} or {version}) that don't target /docs/ routes are not incorrectly flagged.

Comment thread packages/docs/agent-docs/docs/llms-full.txt Outdated
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.

1 participant