### Example Summary of Contextlint Setup Source: https://github.com/nozomi-koborinai/contextlint/blob/main/skills/contextlint-init/SKILL.md An example summary template to provide to the user after completing the Contextlint setup. It lists the actions taken and any initial findings. ```text Done: ✓ Installed @contextlint/cli (bun) ✓ Wrote contextlint.config.json (4 rules, 2 include paths) ✓ Added GitHub Actions workflow Initial lint found 3 violations. You can fix them with the `contextlint-fix` skill. ``` -------------------------------- ### Manual Setup for Contextlint Source: https://github.com/nozomi-koborinai/contextlint/blob/main/README.md Installs Contextlint CLI locally and initializes the configuration. Run 'npx contextlint' to perform linting. ```bash npm install -D @contextlint/cli npx contextlint init npx contextlint ``` -------------------------------- ### Install @contextlint/core Source: https://github.com/nozomi-koborinai/contextlint/blob/main/packages/core/README.md Install the core package using npm. Note that most users should install the CLI package instead for general usage. ```bash npm install @contextlint/core ``` -------------------------------- ### Install @contextlint/lsp-server Source: https://github.com/nozomi-koborinai/contextlint/blob/main/packages/lsp-server/README.md Install the LSP server as a development dependency for your project. ```bash npm install -D @contextlint/lsp-server ``` -------------------------------- ### Contextlint Skill Installation Syntax Source: https://github.com/nozomi-koborinai/contextlint/blob/main/packages/site/src/content/docs/docs/integrations/ai-agents/skills.md Demonstrates the general syntax for installing skills, including optional versioning and agent/scope targeting. ```bash gh skill install OWNER/REPO SKILL gh skill install OWNER/REPO SKILL@VERSION gh skill install OWNER/REPO SKILL --agent claude-code --scope user ``` -------------------------------- ### Install Contextlint Skill Source: https://github.com/nozomi-koborinai/contextlint/blob/main/packages/site/src/content/docs/docs/get-started/installation.md Use this command to install the contextlint skill if your AI host supports agentskills.io. This is the recommended and fastest installation path for supported environments. ```bash gh skill install nozomi-koborinai/contextlint contextlint-init ``` -------------------------------- ### Install Contextlint Skills Source: https://github.com/nozomi-koborinai/contextlint/blob/main/packages/site/src/content/docs/docs/integrations/ai-agents/skills.md Installs the `contextlint-init`, `contextlint-fix`, and `contextlint-impact` skills for Contextlint using the GitHub CLI. ```bash gh skill install nozomi-koborinai/contextlint contextlint-init gh skill install nozomi-koborinai/contextlint contextlint-fix gh skill install nozomi-koborinai/contextlint contextlint-impact ``` -------------------------------- ### Generate contextlint Configuration Source: https://github.com/nozomi-koborinai/contextlint/blob/main/packages/site/src/content/docs/docs/get-started/quick-start-manual.md Run the interactive setup command to generate a contextlint.config.json file tailored to your project. This command initiates an interactive prompt to guide the configuration process. ```bash npx contextlint init ``` -------------------------------- ### Install Contextlint LSP Server Source: https://github.com/nozomi-koborinai/contextlint/blob/main/packages/site/src/content/docs/docs/integrations/editors/index.md Install the Contextlint LSP server as a development dependency using bun or npm. ```bash # bun bun add -D @contextlint/lsp-server # npm npm install -D @contextlint/lsp-server ``` -------------------------------- ### Install @contextlint/cli Source: https://github.com/nozomi-koborinai/contextlint/blob/main/packages/cli/README.md Install the CLI tool as a development dependency. ```bash npm install -D @contextlint/cli ``` -------------------------------- ### Verify Contextlint Installation Source: https://github.com/nozomi-koborinai/contextlint/blob/main/packages/site/src/content/docs/docs/get-started/installation.md Run this command to verify that contextlint has been installed correctly. A successful installation will print the version number. ```bash npx contextlint --version ``` -------------------------------- ### Install @contextlint/mcp-server Source: https://github.com/nozomi-koborinai/contextlint/blob/main/packages/mcp-server/README.md Install the mcp-server package as a development dependency using npm. ```bash npm install -D @contextlint/mcp-server ``` -------------------------------- ### Topological Sort Example Source: https://github.com/nozomi-koborinai/contextlint/blob/main/packages/site/src/content/docs/docs/graph-api/topological-sort.md Demonstrates how to build a document graph and then perform a topological sort to get an ordered list of files. Includes a check for cycles in the graph. ```typescript import { buildContextGraph, topologicalSort, loadDocuments } from "@contextlint/core"; const documents = loadDocuments(["docs/**/*.md"]); const graph = buildContextGraph(documents); const ordered = topologicalSort(graph); if (ordered.length < graph.nodes.length) { const missing = graph.nodes.length - ordered.length; console.warn(`${missing} nodes are part of a cycle`); } for (const file of ordered) { console.log(file); } ``` -------------------------------- ### Install Contextlint CLI Source: https://github.com/nozomi-koborinai/contextlint/blob/main/skills/contextlint-init/SKILL.md Installs the Contextlint CLI as a development dependency using bun. This is a prerequisite for running Contextlint. ```bash bun add -D @contextlint/cli ``` -------------------------------- ### Install VS Code Extension Source: https://github.com/nozomi-koborinai/contextlint/blob/main/packages/site/src/content/docs/docs/integrations/editors/index.md Install the Contextlint VS Code extension by downloading the VSIX file from a GitHub Release and using the `code --install-extension` command. ```bash code --install-extension contextlint-vscode-VERSION.vsix ``` -------------------------------- ### Get Impact Set Example Source: https://github.com/nozomi-koborinai/contextlint/blob/main/packages/site/src/content/docs/docs/graph-api/get-impact-set.md Demonstrates how to build a context graph and use getImpactSet to find affected files. Ensure the necessary modules are imported and the file path exists in the graph. ```typescript import { buildContextGraph, getImpactSet, loadDocuments } from "@contextlint/core"; const documents = loadDocuments(["docs/**/*.md"]); const graph = buildContextGraph(documents); const affected = getImpactSet(graph, "docs/architecture.md"); if (affected.length === 0) { console.log("No files are affected"); } else { console.log(`${affected.length} files are affected:`); for (const file of affected) { console.log(` - ${file}`); } } ``` -------------------------------- ### Configuration for REF-003 Rule Source: https://github.com/nozomi-koborinai/contextlint/blob/main/packages/site/src/content/docs/docs/rules/ref-003.md Provides a JSON configuration example for the REF-003 rule, specifying the stability column, order, and globs for definition and reference files. This setup enables the rule to correctly identify stability inconsistencies. ```json { "rule": "ref003", "options": { "stabilityColumn": "Stability", "stabilityOrder": ["experimental", "review", "stable"], "definitions": "**/requirements.md", "references": ["**/design.md", "**/tests.md"], "idColumn": "ID", "idPattern": "^REQ-\\d+$" } } ``` -------------------------------- ### Run Development Server with Bun Source: https://github.com/nozomi-koborinai/contextlint/blob/main/packages/site/README.md Use this command to start the development server for the @contextlint/site package. It opens the site at http://localhost:4321/. ```sh bun --filter '@contextlint/site' dev ``` -------------------------------- ### Clone Repository and Install Dependencies Source: https://github.com/nozomi-koborinai/contextlint/blob/main/packages/site/src/content/docs/docs/contributing/development-setup.md Clone the contextlint repository and install all workspace dependencies using Bun. This command sets up all packages within the monorepo. ```bash git clone https://github.com/nozomi-koborinai/contextlint.git cd contextlint bun install ``` -------------------------------- ### Install Cursor Extension Source: https://github.com/nozomi-koborinai/contextlint/blob/main/packages/site/src/content/docs/docs/integrations/editors/index.md Install the Contextlint VS Code extension in Cursor using the `cursor --install-extension` command, similar to VS Code. ```bash cursor --install-extension contextlint-vscode-VERSION.vsix ``` -------------------------------- ### Global Install Contextlint CLI Source: https://github.com/nozomi-koborinai/contextlint/blob/main/packages/site/src/content/docs/docs/get-started/installation.md Optionally, install the @contextlint/cli package globally if you use contextlint frequently across multiple projects. A project-local install is generally safer for version pinning. ```bash # bun bun add -g @contextlint/cli # npm npm install -g @contextlint/cli ``` -------------------------------- ### GRP-002 Rule Configuration Example Source: https://github.com/nozomi-koborinai/contextlint/blob/main/packages/site/src/content/docs/docs/rules/grp-002.md A configuration example for the GRP-002 rule, specifying which files to include in the cycle detection using a glob pattern and which files to exclude. ```json { "rule": "grp002", "options": { "files": "docs/**/*.md", "exclude": ["docs/index.md", "docs/sitemap.md"] } } ``` -------------------------------- ### Configuration Example for TBL-001 Rule Source: https://github.com/nozomi-koborinai/contextlint/blob/main/packages/site/src/content/docs/docs/rules/tbl-001.md Illustrates how to configure the TBL-001 rule, specifying required columns, a section to apply it to, and target files. ```json { "rule": "tbl001", "options": { "requiredColumns": ["ID", "Status"], "section": "Requirements", "files": "specs/*.md" } } ``` -------------------------------- ### Glossary File Format Example Source: https://github.com/nozomi-koborinai/contextlint/blob/main/packages/site/src/content/docs/docs/rules/ctx-002.md An example of a glossary file structure, showing how canonical terms and their comma-separated aliases are defined. ```markdown ## Terms | Term | Aliases | | -------- | ------------- | | Database | DB, database | | API | Api, api | ``` -------------------------------- ### Install Contextlint CLI with Package Managers Source: https://github.com/nozomi-koborinai/contextlint/blob/main/packages/site/src/content/docs/docs/get-started/installation.md Install the @contextlint/cli package as a dev dependency using your preferred package manager. This method is for users who do not use an AI host or prefer manual configuration. ```bash # bun bun add -D @contextlint/cli # pnpm pnpm add -D @contextlint/cli # yarn yarn add -D @contextlint/cli # npm npm install -D @contextlint/cli ``` -------------------------------- ### Monorepo structure example Source: https://github.com/nozomi-koborinai/contextlint/blob/main/packages/site/src/content/docs/docs/configuration/auto-detection.md Illustrates the typical directory structure of a monorepo where the contextlint configuration file is placed at the root. ```text my-monorepo/ ├── contextlint.config.json ← place it here ├── packages/ │ ├── api/ │ │ └── docs/ │ │ └── README.md │ └── web/ │ └── docs/ │ └── README.md ``` -------------------------------- ### Sample Contextlint Output Source: https://github.com/nozomi-koborinai/contextlint/blob/main/README.md Example output from running Contextlint, showing detected warnings and errors with file paths and rule codes. ```text docs/requirements.md line 3 warning Empty cell in column "Status" TBL-002 docs/design.md line 12 error Link target "./api.md" does not exist REF-001 1 error, 1 warning in 2 files ``` -------------------------------- ### Example Explanation Template Source: https://github.com/nozomi-koborinai/contextlint/blob/main/skills/contextlint-init/SKILL.md A template for explaining the proposed Contextlint configuration rules to the user in their language. It provides a one-line rationale for each rule. ```text Here's the proposed config: - ref001: cross-refs are common in your repo, so detect broken links - grp002: multiple docs reference each other, so prevent circular dependencies - sec001: ADR directory shows Context/Decision/Consequences pattern, so require them - ctx001: several TODO / TBD placeholders found, so flag them Does this look right? Add or remove anything? ``` -------------------------------- ### Example Summary of Fixes and User Actions Source: https://github.com/nozomi-koborinai/contextlint/blob/main/skills/contextlint-fix/SKILL.md A template for summarizing the results of the contextlint-fix skill, differentiating between automated fixes and actions requiring user input. ```sh Done: ✓ Fixed 3 typo'd cross-refs in design.md ✓ Added missing "Consequences" section in adr/0005.md (TODO placeholder) Needs your attention: ? FR-101 referenced in design.md but not defined anywhere — delete the ref or define the requirement? ? Circular reference between architecture.md and overview.md — which side should be the source of truth? After your decisions, re-run me to clean up. ``` -------------------------------- ### ContextLint Configuration for REF-006 Source: https://github.com/nozomi-koborinai/contextlint/blob/main/packages/site/src/content/docs/docs/rules/ref-006.md Example JSON configuration for the REF-006 rule, specifying an exclusion pattern for generated PNG files. ```json { "rule": "ref006", "options": { "exclude": ["generated/**/*.png"] } } ``` -------------------------------- ### Bad Example: Placeholder and Empty Sections Source: https://github.com/nozomi-koborinai/contextlint/blob/main/packages/site/src/content/docs/docs/rules/ctx-001.md Demonstrates sections containing only placeholders ('TBD') or no content ('-'), which trigger warnings. ```markdown ## Overview This document ... ## Design approach TBD ## Impact - ``` -------------------------------- ### Fixed Example: Table with All Required Columns Source: https://github.com/nozomi-koborinai/contextlint/blob/main/packages/site/src/content/docs/docs/rules/tbl-001.md Shows the corrected table structure after adding the missing 'Status' column. ```markdown ## Requirements | ID | Description | Status | | ------ | ----------------- | ------ | | REQ-01 | User registration | stable | ``` -------------------------------- ### Good Example: Fixed Sections Source: https://github.com/nozomi-koborinai/contextlint/blob/main/packages/site/src/content/docs/docs/rules/ctx-001.md Shows the corrected sections after replacing placeholders and empty content with actual text. ```markdown ## Overview This document ... ## Design approach The new authentication flow adopts OAuth 2.0 and migrates from the existing session-based authentication in stages. ## Impact Affects every module under `packages/auth`. ``` -------------------------------- ### Configuration Example for CHK-001 Source: https://github.com/nozomi-koborinai/contextlint/blob/main/packages/site/src/content/docs/docs/rules/chk-001.md Provides a JSON configuration for the CHK-001 rule, specifying a target section and file glob pattern. ```json { "rule": "chk001", "options": { "section": "Review Checklist", "files": "**/review.md" } } ``` -------------------------------- ### Running via Package Manager (Bun Example) Source: https://github.com/nozomi-koborinai/contextlint/blob/main/packages/site/src/content/docs/docs/integrations/ci-cd/github-actions.md Integrate contextlint by running it through your package manager (e.g., `bunx`). This ensures the CI version matches developer machines by using the dependency lockfile. ```yaml - uses: oven-sh/setup-bun@v2 - run: bun install --frozen-lockfile - run: bunx contextlint ``` -------------------------------- ### Configuration Example for TBL-006 Rule Source: https://github.com/nozomi-koborinai/contextlint/blob/main/packages/site/src/content/docs/docs/rules/tbl-006.md This JSON configuration sets up the TBL-006 rule to check for unique IDs in the 'ID' column of all 'requirements.md' files, only considering IDs that start with 'REQ-'. ```json { "rule": "tbl006", "options": { "files": "**/requirements.md", "column": "ID", "idPattern": "^REQ-" } } ``` -------------------------------- ### Verify Development Setup Source: https://github.com/nozomi-koborinai/contextlint/blob/main/packages/site/src/content/docs/docs/contributing/development-setup.md Runs a series of commands to verify that the development environment is set up correctly. This includes building, testing, type-checking, and linting all packages. ```bash bun run --filter '*' build bun test bun run --filter '*' typecheck npx eslint . ``` -------------------------------- ### Build Project with Bun Source: https://github.com/nozomi-koborinai/contextlint/blob/main/packages/site/README.md Execute this command to build the @contextlint/site project. The output will be placed in the packages/site/dist/ directory. ```sh bun --filter '@contextlint/site' build ``` -------------------------------- ### Configuration Example for REF-005 Rule Source: https://github.com/nozomi-koborinai/contextlint/blob/main/packages/site/src/content/docs/docs/rules/ref-005.md Illustrates how to configure the REF-005 rule in a JSON configuration file, specifying the files to apply the rule to using a glob pattern. ```json { "rule": "ref005", "options": { "files": "docs/**/*.md" } } ``` -------------------------------- ### Example violation message Source: https://github.com/nozomi-koborinai/contextlint/blob/main/packages/site/src/content/docs/docs/rules/tbl-002.md This is an example of the warning message generated by the TBL-002 rule when an empty cell is detected in the 'Status' column. ```text docs/requirements.md line 5 warning Empty cell in column "Status" TBL-002 ``` -------------------------------- ### Configure JetBrains IDEs with LSP4IJ Source: https://github.com/nozomi-koborinai/contextlint/blob/main/packages/site/src/content/docs/docs/integrations/editors/index.md Set up the Contextlint language server in JetBrains IDEs by installing the LSP4IJ plugin and configuring the server details, including the command and file name patterns. ```text 1. Install the **LSP4IJ** plugin from the Marketplace 2. Go to **Settings → Languages & Frameworks → Language Servers → Add** and configure: - **Name**: `contextlint` - **Command**: `npx contextlint-lsp` - **Mapping → File name patterns**: `*.md` ``` -------------------------------- ### Example of STR-001 Violation Source: https://github.com/nozomi-koborinai/contextlint/blob/main/packages/site/src/content/docs/docs/rules/str-001.md This example shows the output when a required file is missing. The error message indicates which file was not found and the rule that triggered the violation. ```text project line 0 error Required file "docs/architecture.md" not found STR-001 ``` -------------------------------- ### Fixed Example: Unique IDs After Modification Source: https://github.com/nozomi-koborinai/contextlint/blob/main/packages/site/src/content/docs/docs/rules/tbl-006.md This example demonstrates the corrected state after ensuring IDs are unique by incorporating zone names, resolving the TBL-006 violation. ```text docs/auth/requirements.md: | ID | Description | | ----------- | --------------- | | REQ-AUTH-01 | User registration | docs/todo/requirements.md: | ID | Description | | ----------- | ----------------- | | REQ-TODO-01 | Create a task | ``` -------------------------------- ### Bad Example: Duplicate IDs Across Files Source: https://github.com/nozomi-koborinai/contextlint/blob/main/packages/site/src/content/docs/docs/rules/tbl-006.md This example shows two files with the same ID 'REQ-01' in their respective tables, which would trigger a TBL-006 violation. ```text docs/auth/requirements.md: | ID | Description | | ------ | --------------- | | REQ-01 | User registration | docs/todo/requirements.md: | ID | Description | | ------ | ----------------- | | REQ-01 | Create a task | ``` -------------------------------- ### Minimal contextlint.config.json Example Source: https://github.com/nozomi-koborinai/contextlint/blob/main/packages/site/src/content/docs/docs/configuration/config-file.md This is a basic configuration file for contextlint. It includes a schema reference for editor support, specifies files to include for validation using glob patterns, and defines a single rule to be applied. ```json { "$schema": "https://raw.githubusercontent.com/nozomi-koborinai/contextlint/main/schema.json", "include": ["docs/**/*.md"], "rules": [ { "rule": "ref001" } ] } ``` -------------------------------- ### Fixed Example: Aligned Stability Source: https://github.com/nozomi-koborinai/contextlint/blob/main/packages/site/src/content/docs/docs/rules/ref-003.md Illustrates the corrected state after fixing the stability inconsistency. This example shows how aligning the stability of the dependent item ('REQ-01') to 'stable' resolves the violation. ```markdown docs/requirements.md: | ID | Description | Stability | | ------ | ----------------- | --------- | | REQ-01 | User registration | stable | ``` -------------------------------- ### Configure Neovim with nvim-lspconfig Source: https://github.com/nozomi-koborinai/contextlint/blob/main/packages/site/src/content/docs/docs/integrations/editors/index.md Set up the Contextlint LSP server in Neovim using the `nvim-lspconfig` plugin. This configuration defines the command, filetypes, root directory detection, and enables single file support. ```lua local configs = require('lspconfig.configs') local util = require('lspconfig.util') if not configs.contextlint then configs.contextlint = { default_config = { cmd = { 'npx', 'contextlint-lsp' }, filetypes = { 'markdown' }, root_dir = util.root_pattern('contextlint.config.json', '.git'), single_file_support = false, }, } end require('lspconfig').contextlint.setup({}) ``` -------------------------------- ### Example Usage of buildContextGraph Source: https://github.com/nozomi-koborinai/contextlint/blob/main/packages/site/src/content/docs/docs/graph-api/build-context-graph.md Demonstrates how to load documents, build a context graph, and then log the number of files and edges, followed by details of each edge. This shows the practical application of the function. ```typescript import { loadDocuments } from "@contextlint/core"; import { buildContextGraph } from "@contextlint/core"; const documents = loadDocuments(["docs/**/*.md"]); const graph = buildContextGraph(documents); console.log(`${graph.nodes.length} files, ${graph.edges.length} edges`); for (const edge of graph.edges) { console.log(`${edge.source} → ${edge.target} (${edge.type}, line ${edge.line})`); } ``` -------------------------------- ### Watch mode terminal output example Source: https://github.com/nozomi-koborinai/contextlint/blob/main/packages/site/src/content/docs/docs/integrations/cli/watch-mode.md This is an example of the terminal output when a file change is detected in watch mode. It shows the timestamp, the changed file, and any linting errors found. ```text [14:32:15] File changed: docs/requirements.md docs/requirements.md line 12 error Required column "Status" not found in table TBL-001 1 error in 1 files ``` -------------------------------- ### Bad Example: Undisclosed Cross-Zone Dependency Source: https://github.com/nozomi-koborinai/contextlint/blob/main/packages/site/src/content/docs/docs/rules/ref-004.md This example shows a scenario where a Markdown link in `auth/login.md` references the `payment` zone, but this dependency is not declared in the `Dependencies` section of `auth/overview.md`. This configuration triggers a REF-004 violation. ```markdown docs/zones/auth/overview.md: # Auth zone ## Dependencies | ---- | docs/zones/auth/login.md: See [billing logic](../payment/charge.md) for details. ``` -------------------------------- ### Markdown for ID Definitions and References Source: https://github.com/nozomi-koborinai/contextlint/blob/main/packages/site/src/content/docs/docs/rules/ref-002.md Example markdown files showing how IDs are defined in a requirements document and referenced in a test document. This illustrates the 'bad example' scenario where an ID is referenced but not defined, and another is defined but not referenced. ```markdown docs/requirements.md: | ID | Description | | ------ | ----------------- | | REQ-01 | User registration | | REQ-02 | Password reset | docs/tests.md: - Test for REQ-01 ... - Test for REQ-99 ... ``` ```markdown docs/tests.md: - Test for REQ-01 ... - Test for REQ-02 ... ``` -------------------------------- ### Example of Vendor-Neutral Positioning in Feedback Section Source: https://github.com/nozomi-koborinai/contextlint/blob/main/docs/decisions/0002-vendor-neutral-positioning.md Illustrates how to present AI agent integration by listing concrete tools rather than the protocol name. This pattern is recommended for public-facing materials. ```text While AI writes → AI agent integration Claude Code · Cursor Agent · Cline · Windsurf ``` -------------------------------- ### STR-001 Configuration Example Source: https://github.com/nozomi-koborinai/contextlint/blob/main/packages/site/src/content/docs/docs/rules/str-001.md Configure the STR-001 rule to specify an array of file paths that must exist in the project. These paths are relative to the project root. ```json { "rule": "str001", "options": { "files": ["README.md", "docs/architecture.md", "CONTRIBUTING.md"] } } ``` -------------------------------- ### Fixed Document Example Source: https://github.com/nozomi-koborinai/contextlint/blob/main/packages/site/src/content/docs/docs/rules/ctx-002.md Demonstrates the corrected document after replacing the alias with the canonical term. ```markdown docs/design.md: # Design We use a Database for storage. ``` -------------------------------- ### Run contextlint Source: https://github.com/nozomi-koborinai/contextlint/blob/main/skills/contextlint-fix/SKILL.md Execute the contextlint command to check for documentation errors. Add `--format json` for machine-readable output. ```sh npx contextlint ``` ```sh npx contextlint --format json ``` -------------------------------- ### Fixed Example: All Checklist Items Checked Source: https://github.com/nozomi-koborinai/contextlint/blob/main/packages/site/src/content/docs/docs/rules/chk-001.md Illustrates the corrected Markdown checklist where all items are now checked. ```markdown ## Review Checklist - [x] Code review completed - [x] Security review completed - [x] Tests passing ``` -------------------------------- ### Violation Report Example Source: https://github.com/nozomi-koborinai/contextlint/blob/main/packages/site/src/content/docs/docs/rules/chk-001.md Shows the typical output when the CHK-001 rule detects an unchecked item. ```text docs/review.md line 4 warning Unchecked item "Security review completed" in section "Review Checklist" CHK-001 ``` -------------------------------- ### Run Contextlint CLI Source: https://github.com/nozomi-koborinai/contextlint/blob/main/packages/site/src/content/docs/docs/get-started/quick-start-ai.md Execute the contextlint command-line interface to perform linting after the configuration is set up. This command produces the same output as the AI-assisted linting process. ```bash npx contextlint ``` -------------------------------- ### Glossary and Document Example Source: https://github.com/nozomi-koborinai/contextlint/blob/main/packages/site/src/content/docs/docs/rules/ctx-002.md Illustrates a glossary definition with an alias and its subsequent incorrect usage in a document. ```markdown docs/glossary.md: | Term | Aliases | | -------- | ------------- | | Database | DB, database | docs/design.md: # Design We use a DB for storage. ``` -------------------------------- ### Basic CLI Usage Source: https://github.com/nozomi-koborinai/contextlint/blob/main/packages/cli/README.md Run contextlint to lint files matched by the configuration. You can also override include patterns via CLI arguments or specify a custom configuration file. ```bash npx contextlint # Lint files matched by config ``` ```bash npx contextlint "docs/**/*.md" # Override include via CLI args ``` ```bash npx contextlint --config path/to/config.json ``` ```bash npx contextlint --format json # Machine-readable output (CI / editors) ``` -------------------------------- ### Error Message for Missing Column Source: https://github.com/nozomi-koborinai/contextlint/blob/main/packages/site/src/content/docs/docs/rules/tbl-001.md Example of the error message reported when a required column is missing from a table. ```text docs/requirements.md line 3 error Missing required column "Status" in table TBL-001 ``` -------------------------------- ### Bad Example: Placeholder Section Message Source: https://github.com/nozomi-koborinai/contextlint/blob/main/packages/site/src/content/docs/docs/rules/ctx-001.md Illustrates the warning message format when a section contains only a placeholder. ```text docs/design.md line 7 warning Section "Design approach" contains only placeholder "TBD" CTX-001 line 11 warning Section "Impact" contains only placeholder "-" CTX-001 ```