Skip to content

Commit 28abcaa

Browse files
committed
Regenerate stale catalogs, revert mdsmith CI debug
The mdsmith check failed in CI because the PR's merge ref included main's stale `nature:directive` catalog body in internal/rules/index.md plus the post-rebase blank-line drift in the two markdown-audit SKILL.md files. Run `mdsmith fix .` on the rebased tree to regenerate every catalog so the merged content stays in sync. Also reverts the temporary mdsmith CI debug instrumentation added in 685b228 / 121e7e0 (the PR-comment fix-diff capture that flagged the stale catalogs). The Copilot review on PR #288 correctly noted the wider permissions and the mutate-and- post pattern were unrelated to plan 156, so back to the original `./mdsmith check .` invocation.
1 parent ae4d7b4 commit 28abcaa

5 files changed

Lines changed: 8 additions & 93 deletions

File tree

.claude/skills/markdown-audit/SKILL.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,12 +129,10 @@ where: 'nature: "directive"'
129129
sort: id
130130
row: "- `internal/rules/{id}-{name}/pattern/` ({name})"
131131
?>
132-
133132
- `internal/rules/MDS019-catalog/pattern/` (catalog)
134133
- `internal/rules/MDS021-include/pattern/` (include)
135134
- `internal/rules/MDS038-toc/pattern/` (toc)
136135
- `internal/rules/MDS039-build/pattern/` (build)
137-
138136
<?/catalog?>
139137

140138
Do not paraphrase directive syntax from memory.

.github/workflows/ci.yml

Lines changed: 1 addition & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -165,9 +165,6 @@ jobs:
165165
166166
mdsmith:
167167
runs-on: ubuntu-latest
168-
permissions:
169-
contents: read
170-
pull-requests: write
171168
steps:
172169
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
173170
with:
@@ -176,35 +173,7 @@ jobs:
176173
with:
177174
go-version-file: go.mod
178175
- run: go build -o mdsmith ./cmd/mdsmith
179-
- name: Run mdsmith check
180-
env:
181-
GH_TOKEN: ${{ github.token }}
182-
PR_NUMBER: ${{ github.event.pull_request.number }}
183-
run: |
184-
set +e
185-
./mdsmith check . 2>&1 | tee /tmp/mdsmith-check.log
186-
status=${PIPESTATUS[0]}
187-
if [ "$status" -ne 0 ]; then
188-
./mdsmith fix . > /dev/null 2>&1 || true
189-
git --no-pager diff --no-color > /tmp/mdsmith-fix.diff
190-
cat /tmp/mdsmith-fix.diff
191-
if [ -n "${PR_NUMBER:-}" ] && [ -n "${GH_TOKEN:-}" ]; then
192-
{
193-
printf '### CI debug: mdsmith fix diff on this commit\n\n'
194-
printf '```diff\n'
195-
head -c 32000 /tmp/mdsmith-fix.diff
196-
printf '\n```\n'
197-
} > /tmp/mdsmith-comment.md
198-
gh pr comment "$PR_NUMBER" \
199-
--repo "${GITHUB_REPOSITORY}" \
200-
--body-file /tmp/mdsmith-comment.md || true
201-
fi
202-
while IFS= read -r line; do
203-
[ -z "$line" ] && continue
204-
echo "::error::${line}"
205-
done < /tmp/mdsmith-check.log
206-
fi
207-
exit "$status"
176+
- run: ./mdsmith check .
208177

209178
demo:
210179
uses: ./.github/workflows/record-demo.yml

PLAN.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,6 @@ footer: |
8585
| 154 || sonnet | [arch-fix: extract cross-rule helpers](plan/154_arch-fix-rule-helper-extraction.md) |
8686
| 155 || sonnet | [arch-fix: relocate convention types out of markdownflavor](plan/155_arch-fix-convention-config-ownership.md) |
8787
| 156 || opus | [Composable required-structure schemas across multiple kinds](plan/156_kind-schema-composition.md) |
88-
| 157 | 🔳 | sonnet | [Catalog filter by front matter property](plan/157_catalog-where-filter.md) |
8988
| 156 | 🔲 | opus | [Section schema — unify entry shape under `heading:` discriminator](plan/156_schema-entry-unification.md) |
89+
| 157 | 🔳 | sonnet | [Catalog filter by front matter property](plan/157_catalog-where-filter.md) |
9090
<?/catalog?>

editors/claude-code-audit/skills/markdown-audit/SKILL.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,12 +134,10 @@ where: 'nature: "directive"'
134134
sort: id
135135
row: "- `internal/rules/{id}-{name}/pattern/` ({name})"
136136
?>
137-
138137
- `internal/rules/MDS019-catalog/pattern/` (catalog)
139138
- `internal/rules/MDS021-include/pattern/` (include)
140139
- `internal/rules/MDS038-toc/pattern/` (toc)
141140
- `internal/rules/MDS039-build/pattern/` (build)
142-
143141
<?/catalog?>
144142

145143
Do not paraphrase directive syntax from memory.

internal/rules/index.md

Lines changed: 6 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -91,60 +91,10 @@ header: |
9191
|------|------|-------------|
9292
row: "| [{id}]({filename}) | `{name}` | {description} |"
9393
?>
94-
| Rule | Name | Description |
95-
|---------------------------------------------------------------|--------------------------------------|-------------------------------------------------------------------------------------------------------------------------------|
96-
| [MDS001](MDS001-line-length/README.md) | `line-length` | Line exceeds maximum length. |
97-
| [MDS002](MDS002-heading-style/README.md) | `heading-style` | Heading style must be consistent. |
98-
| [MDS003](MDS003-heading-increment/README.md) | `heading-increment` | Heading levels should increment by one. No jumping from `#` to `###`. |
99-
| [MDS004](MDS004-first-line-heading/README.md) | `first-line-heading` | First line of the file should be a heading. |
100-
| [MDS005](MDS005-no-duplicate-headings/README.md) | `no-duplicate-headings` | No two headings should have the same text. |
101-
| [MDS006](MDS006-no-trailing-spaces/README.md) | `no-trailing-spaces` | No trailing whitespace at the end of lines. |
102-
| [MDS007](MDS007-no-hard-tabs/README.md) | `no-hard-tabs` | No tab characters. Use spaces instead. |
103-
| [MDS008](MDS008-no-multiple-blanks/README.md) | `no-multiple-blanks` | No more than one consecutive blank line. |
104-
| [MDS009](MDS009-single-trailing-newline/README.md) | `single-trailing-newline` | File must end with exactly one newline character. |
105-
| [MDS010](MDS010-fenced-code-style/README.md) | `fenced-code-style` | Fenced code blocks must use a consistent delimiter. |
106-
| [MDS011](MDS011-fenced-code-language/README.md) | `fenced-code-language` | Fenced code blocks must specify a language. |
107-
| [MDS012](MDS012-no-bare-urls/README.md) | `no-bare-urls` | URLs must be wrapped in angle brackets or as a link, not left bare. |
108-
| [MDS013](MDS013-blank-line-around-headings/README.md) | `blank-line-around-headings` | Headings must have a blank line before and after. |
109-
| [MDS014](MDS014-blank-line-around-lists/README.md) | `blank-line-around-lists` | Lists must have a blank line before and after. |
110-
| [MDS015](MDS015-blank-line-around-fenced-code/README.md) | `blank-line-around-fenced-code` | Fenced code blocks must have a blank line before and after. |
111-
| [MDS016](MDS016-list-indent/README.md) | `list-indent` | List items must use consistent indentation. |
112-
| [MDS017](MDS017-no-trailing-punctuation-in-heading/README.md) | `no-trailing-punctuation-in-heading` | Headings should not end with punctuation. |
113-
| [MDS018](MDS018-no-emphasis-as-heading/README.md) | `no-emphasis-as-heading` | Don't use bold or emphasis on a standalone line as a heading substitute. |
114-
| [MDS019](MDS019-catalog/README.md) | `catalog` | Catalog content must reflect selected front matter fields from files matching its glob. |
115-
| [MDS020](MDS020-required-structure/README.md) | `required-structure` | Document structure and front matter must match its schema. |
116-
| [MDS021](MDS021-include/README.md) | `include` | Include section content must match the referenced file. |
117-
| [MDS022](MDS022-max-file-length/README.md) | `max-file-length` | File must not exceed maximum number of lines. |
118-
| [MDS023](MDS023-paragraph-readability/README.md) | `paragraph-readability` | Paragraph readability index must not exceed a threshold. |
119-
| [MDS024](MDS024-paragraph-structure/README.md) | `paragraph-structure` | Paragraphs must not exceed sentence and word limits. |
120-
| [MDS025](MDS025-table-format/README.md) | `table-format` | Tables must have consistent column widths and padding. |
121-
| [MDS026](MDS026-table-readability/README.md) | `table-readability` | Tables must stay within readability complexity limits. |
122-
| [MDS027](MDS027-cross-file-reference-integrity/README.md) | `cross-file-reference-integrity` | Links to local files and heading anchors must resolve. |
123-
| [MDS028](MDS028-token-budget/README.md) | `token-budget` | File must not exceed a token budget. |
124-
| [MDS029](MDS029-conciseness-scoring/README.md) | `conciseness-scoring` | Paragraph conciseness score must not fall below a threshold. |
125-
| [MDS030](MDS030-empty-section-body/README.md) | `empty-section-body` | Section headings must include meaningful body content. |
126-
| [MDS031](MDS031-unclosed-code-block/README.md) | `unclosed-code-block` | Fenced code blocks must have a closing fence delimiter. |
127-
| [MDS032](MDS032-no-empty-alt-text/README.md) | `no-empty-alt-text` | Images must have non-empty alt text for accessibility. |
128-
| [MDS033](MDS033-directory-structure/README.md) | `directory-structure` | Markdown files must exist only in explicitly allowed directories. |
129-
| [MDS034](MDS034-markdown-flavor/README.md) | `markdown-flavor` | Flags Markdown syntax that the declared target flavor does not render. |
130-
| [MDS035](MDS035-toc-directive/README.md) | `toc-directive` | Flag renderer-specific TOC directives that render as literal text on CommonMark and goldmark. |
131-
| [MDS036](MDS036-max-section-length/README.md) | `max-section-length` | Section length must not exceed per-level or per-heading limits. |
132-
| [MDS037](MDS037-duplicated-content/README.md) | `duplicated-content` | Paragraphs should not repeat verbatim across Markdown files. |
133-
| [MDS038](MDS038-toc/README.md) | `toc` | Keep toc generated heading lists in sync with document headings. |
134-
| [MDS039](MDS039-build/README.md) | `build` | Validate `<?build?>` directive parameters and keep the section body in sync with the recipe's rendered `body-template`. |
135-
| [MDS040](MDS040-recipe-safety/README.md) | `recipe-safety` | Validate each build.recipes command for shell-safety at lint time; the rule never executes any binary. |
136-
| [MDS041](MDS041-no-inline-html/README.md) | `no-inline-html` | Raw HTML tags in Markdown are not allowed; use a Markdown construct or an mdsmith directive instead. |
137-
| [MDS042](MDS042-emphasis-style/README.md) | `emphasis-style` | Enforces a single delimiter character for bold and italic emphasis, and optionally forbids cross-delimiter nesting. |
138-
| [MDS043](MDS043-no-reference-style/README.md) | `no-reference-style` | Reference-style links and footnotes require global definition resolution; flag them in favor of inline links. |
139-
| [MDS044](MDS044-horizontal-rule-style/README.md) | `horizontal-rule-style` | Thematic breaks must use a consistent delimiter style, exact length, and blank-line spacing. |
140-
| [MDS045](MDS045-list-marker-style/README.md) | `list-marker-style` | Unordered list items must use the configured bullet marker character. |
141-
| [MDS046](MDS046-ordered-list-numbering/README.md) | `ordered-list-numbering` | Ordered list items must be numbered in the configured style. |
142-
| [MDS047](MDS047-ambiguous-emphasis/README.md) | `ambiguous-emphasis` | Forbid emphasis sequences whose meaning a human cannot predict at a glance. |
143-
| [MDS048](MDS048-git-hook-sync/README.md) | `git-hook-sync` | Git artifacts must match the canonical glob-based template derived from .mdsmith.yml. |
144-
| [MDS049](MDS049-no-space-in-link-text/README.md) | `no-space-in-link-text` | Link text and image alt text must not have leading or trailing whitespace inside the brackets. |
145-
| [MDS050](MDS050-proper-names/README.md) | `proper-names` | Configured proper names (e.g. JavaScript, GitHub) must appear with their canonical casing. |
146-
| [MDS051](MDS051-single-h1/README.md) | `single-h1` | At most one H1 heading is allowed per file. |
147-
| [MDS052](MDS052-no-space-in-code-spans/README.md) | `no-space-in-code-spans` | Inline code spans with leading or trailing whitespace inside the backticks are almost always typos; flag them. |
148-
| [MDS053](MDS053-no-unused-link-definitions/README.md) | `no-unused-link-definitions` | Every `[label]: url` definition must be consumed by at least one reference-style link or image; duplicate labels are flagged. |
149-
| [MDS054](MDS054-no-undefined-reference-labels/README.md) | `no-undefined-reference-labels` | Reference-style links and images must have a matching link reference definition in the same file. |
94+
| Rule | Name | Description |
95+
|------------------------------------|-----------|-------------------------------------------------------------------------------------------------------------------------|
96+
| [MDS019](MDS019-catalog/README.md) | `catalog` | Catalog content must reflect selected front matter fields from files matching its glob. |
97+
| [MDS021](MDS021-include/README.md) | `include` | Include section content must match the referenced file. |
98+
| [MDS038](MDS038-toc/README.md) | `toc` | Keep toc generated heading lists in sync with document headings. |
99+
| [MDS039](MDS039-build/README.md) | `build` | Validate `<?build?>` directive parameters and keep the section body in sync with the recipe's rendered `body-template`. |
150100
<?/catalog?>

0 commit comments

Comments
 (0)