This document defines the markdown linting standards for the vs-code-agents repository.
Consistent markdown formatting ensures:
- Proper syntax highlighting in code examples
- Clean rendering across GitHub, IDEs, and documentation tools
- Reduced commit failures from linting errors
- Professional documentation quality
The repository uses markdownlint-cli2 with configuration in .markdownlint-cli2.yaml.
# Check all markdown files
npx markdownlint-cli2 "**/*.md"
# Fix auto-fixable issues
npx markdownlint-cli2 --fix "**/*.md"Every fenced code block must include a language identifier.
<!-- Wrong -->
` ` `
public void Example() { }
` ` `
<!-- Correct -->
` ` `csharp
public void Example() { }
` ` `Fenced code blocks must be surrounded by blank lines.
<!-- Wrong -->
Some text
` ` `csharp
code
` ` `
More text
<!-- Correct -->
Some text
` ` `csharp
code
` ` `
More textLists must be surrounded by blank lines.
<!-- Wrong -->
Introduction text
- Item 1
- Item 2
Conclusion text
<!-- Correct -->
Introduction text
- Item 1
- Item 2
Conclusion textHeadings must be surrounded by blank lines.
<!-- Wrong -->
Some text
## Heading
More text
<!-- Correct -->
Some text
## Heading
More textInline HTML is restricted. Generic types must be wrapped in backticks to avoid being interpreted as HTML tags.
<!-- Wrong - triggers MD033 -->
Use ArrayPool<T> for buffer pooling.
<!-- Correct -->
Use `ArrayPool<T>` for buffer pooling.Disabled because agent templates contain long tool lists and descriptions that are more readable on single lines.
Disabled because tables render correctly regardless of spacing style.
Use the appropriate language identifier for syntax highlighting:
| Content Type | Language Identifier |
|---|---|
| C# code | csharp |
| PowerShell scripts | powershell |
| Bash/Shell commands | bash |
| JSON data | json |
| YAML configuration | yaml |
| Markdown examples | markdown |
| Plain text/pseudo-code | text |
| SQL queries | sql |
| XML/HTML | xml or html |
| JavaScript | javascript |
| TypeScript | typescript |
| Python | python |
` ` `text
mcp__cloudmcp-manager__memory-search_nodes with query="[topic]"
mcp__cloudmcp-manager__memory-open_nodes for specific entities
` ` `` ` `text
analyst -> architect -> milestone-planner -> critic -> implementer -> qa
` ` `` ` `markdown
- [ ] Task 1
- [ ] Task 2
- [x] Completed task
` ` `` ` `text
<type>(<scope>): <description>
<optional body>
` ` `When documenting .NET generic types, always wrap them in backticks:
| Raw Text | Formatted |
|---|---|
ArrayPool<T> |
Buffer pooling |
Span<T> |
Memory spans |
IEnumerable<T> |
Collections |
Dictionary<TKey, TValue> |
Key-value storage |
Task<T> |
Async results |
Func<T, TResult> |
Function delegates |
This repository includes an automated pre-commit hook that runs markdown linting with auto-fix on every commit.
- Automatic fixing: Runs
markdownlint-cli2 --fixon staged markdown files - Re-staging: Automatically re-stages corrected files
- Fail-safe: Blocks commit only if unfixable violations remain
- Check-only option: Disable fixes with
SKIP_AUTOFIX=1
Install the Lefthook shims:
uv run --frozen lefthook install --reset-hooks-path
uv run --frozen lefthook check-installLefthook filters staged Markdown files and runs the named pre-commit validators
declared in lefthook.yml.
- Detects staged markdown files (
*.md) - Runs
markdownlint-cli2 --fixto auto-correct issues - Re-stages any files that were modified
- Verifies remaining files pass linting
- Blocks commit if unfixable violations exist
SKIP_AUTOFIX=1 git commit -m "message"This runs validation without modifying or re-staging files.
The following directories are excluded from linting:
node_modules/- Third-party dependencies.agents/- Generated agent artifacts (ADRs, plans, etc.)
Add a language identifier after the opening fence:
` ` `text
Your content here
` ` `Wrap the generic type in backticks:
Use `List<T>` instead of arrays.Add a blank line before and after the list.