fix(template): markdownlint — exclude artifact dirs + MD024 siblings_only#84
Merged
Merged
Conversation
The generated lint:markdown task globbed '**/*.md' excluding only .claude/node_modules/dist/.worktrees, so a rendered iac repo's gitignored provider caches (terraform/**/.terraform/, full of markdown CHANGELOGs) and the uv-managed .venv/ flooded `task verify` with markdownlint errors — none of it tracked. markdownlint-cli2 does not read .gitignore, so it must be told explicitly. Add '#**/.terraform/**', '#**/.venv/**', and '#**/.task/**' to the default glob, matching the existing '#'-exclusion style. The CLI_ARGS (lefthook staged-files) path is unaffected — gitignored files are never staged. Verified by rendering the iac profile, planting violating markdown under .terraform/ and .venv/, and confirming the rendered `task lint:markdown` reports 0 errors. Surfaced applying the template to an existing Terraform repo (sommerlawn-infra), which needed the same ignores added by hand. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Default MD024 (no-duplicate-heading) flags any repeated heading text in a file, which trips legitimate doc patterns — e.g. a per-host/per-service "Purpose"/"Access" subsection (one per ### host) in an inventory or runbook doc. Set siblings_only so duplicates are flagged only when they share a parent heading; real same-level anchor collisions (two ## Setup) still error. Verified: a rendered repo passes on cross-parent repeats and still errors on genuine sibling duplicates; task test:template:all passes. Surfaced applying the template to sommerlawn-infra (docs/architecture/hosts.md). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two markdownlint config fixes for generated repos, both surfaced while applying
the template to an existing Terraform repo (
sommerlawn/sommerlawn-infra).1. Exclude gitignored artifact/cache dirs from
lint:markdownThe
lint:markdowntask globbed'**/*.md'excluding only.claude/node_modules/dist/.worktrees. markdownlint-cli2 does not read.gitignore, so a rendered iac repo's gitignored provider caches(
terraform/**/.terraform/, full of markdown CHANGELOGs) and the uv-managed.venv/floodedtask verifywith errors — none of it tracked.Chosen over
.markdownlint-cli2.jsoncignores because that file only ships whenuse_release_please— the task glob covers every answer profile. TheCLI_ARGS(lefthook staged-files) path is unaffected; gitignored files are never staged.
2.
MD024: { siblings_only: true }in.markdownlint.jsonDefault MD024 (no-duplicate-heading) flags any repeated heading text in a file,
tripping legitimate doc patterns like a per-host
#### Purpose/#### Accesssubsection in an inventory/runbook doc.
siblings_onlyflags duplicates only whenthey share a parent heading — genuine same-level anchor collisions (two
## Setup)still error.
Test plan
task test:template:allpasses (all 5 profiles) after both changes. ✅iacprofile, planted markdownlint-violatingfiles under
terraform/**/.terraform/and.venv/, ran the rendered repo'stask lint:markdown→ 38 files, 0 errors. ✅### Purpose/### Accessunderdifferent
##parents → 0 errors; two## Setupsiblings → still 1 MD024 error. ✅Context
Companion to evanharmon1/harmon-devkit#22, which fixes the same
.gitignore-blindfalse-positive in the standardize-repo skill's
verify-applied.sh.🤖 Generated with Claude Code