Skip to content

Commit 57fa9c3

Browse files
committed
plan 69: mark include enhancements complete
All acceptance criteria were already satisfied by shipped work (adjustLinks in internal/rules/include/links.go, adjustHeadings in headings.go, heading-level param and findParentHeadingLevel in rule.go, plus README sections and unit tests). Update plan status to complete and tick each task/criterion. Regenerate PLAN.md catalog. https://claude.ai/code/session_019xnJewCGaymUXXuZnx9gL9
1 parent 3291efc commit 57fa9c3

2 files changed

Lines changed: 23 additions & 23 deletions

File tree

PLAN.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ footer: |
2929
| 65 | 🔲 | [Spike WASM-Embedded Weasel Inference](plan/65_spike-wasm-embedded-inference.md) |
3030
| 66 || [Unified Conciseness Score](plan/66_unified-conciseness-score.md) |
3131
| 68 || [Reorganize Documentation](plan/68_reorganize-docs.md) |
32-
| 69 | 🔲 | [Include enhancements: link adjustment and heading-level](plan/69_include-enhancements.md) |
32+
| 69 | | [Include enhancements: link adjustment and heading-level](plan/69_include-enhancements.md) |
3333
| 73 || [Unify template and processing directives](plan/73_unify-template-directives.md) |
3434
| 74 || [Directive guide](plan/74_directive-guide.md) |
3535
| 75 || [Single-brace placeholders everywhere](plan/75_single-brace-placeholders.md) |

plan/69_include-enhancements.md

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
id: 69
33
title: 'Include enhancements: link adjustment and heading-level'
4-
status: "🔲"
4+
status: ""
55
---
66
# Include enhancements
77

@@ -77,53 +77,53 @@ has `## Build` (level 2) and `### Sub` (level 3).
7777

7878
## Tasks
7979

80-
1. Add a helper `adjustLinks(content,
80+
1. [x] Add a helper `adjustLinks(content,
8181
includedFilePath, includingFilePath)` in
8282
[`internal/rules/include/`](../internal/rules/include/)
8383
that rewrites relative link/image targets
84-
2. Write unit tests for `adjustLinks`: same directory
84+
2. [x] Write unit tests for `adjustLinks`: same directory
8585
(no-op), different directories, anchors and
8686
absolute URLs left untouched, query strings
8787
preserved
88-
3. Call `adjustLinks` in `generateIncludeContent`
88+
3. [x] Call `adjustLinks` in `generateIncludeContent`
8989
after frontmatter stripping, before wrap
90-
4. Add a helper `adjustHeadings(content, parentLevel)`
90+
4. [x] Add a helper `adjustHeadings(content, parentLevel)`
9191
that shifts ATX and setext heading levels
92-
5. Write unit tests for `adjustHeadings`: shift up,
92+
5. [x] Write unit tests for `adjustHeadings`: shift up,
9393
shift down, cap at 6, no headings (no-op)
94-
6. Extend `validateIncludeDirective` to accept and
94+
6. [x] Extend `validateIncludeDirective` to accept and
9595
validate the `heading-level` parameter (only
9696
`"absolute"` is valid)
97-
7. In `generateIncludeContent`, detect the parent
97+
7. [x] In `generateIncludeContent`, detect the parent
9898
heading level from the marker position and call
9999
`adjustHeadings` when `heading-level: "absolute"`
100-
8. Add test for parent-level detection (marker under
100+
8. [x] Add test for parent-level detection (marker under
101101
h2, under h3, at document root)
102-
9. Update the rule README at
102+
9. [x] Update the rule README at
103103
[`MDS021-include/README.md`](../internal/rules/MDS021-include/README.md)
104104
to document both features
105-
10. Update existing fixtures and tests if link
105+
10. [x] Update existing fixtures and tests if link
106106
adjustment changes their expected output
107-
11. Run `go test ./...`, `go tool golangci-lint run`,
107+
11. [x] Run `go test ./...`, `go tool golangci-lint run`,
108108
and `mdsmith check .`
109109

110110
## Acceptance Criteria
111111

112-
- [ ] Relative links in included content are rewritten
112+
- [x] Relative links in included content are rewritten
113113
so they resolve from the including file's
114114
directory, not the source file's directory
115-
- [ ] Absolute URLs, anchor-only links (`#foo`), and
115+
- [x] Absolute URLs, anchor-only links (`#foo`), and
116116
protocol links (`http://`, `https://`) are not
117117
modified
118-
- [ ] `heading-level: "absolute"` shifts headings so
118+
- [x] `heading-level: "absolute"` shifts headings so
119119
the included top-level headings appear one level
120120
below the enclosing section
121-
- [ ] When `heading-level` is omitted, heading levels
121+
- [x] When `heading-level` is omitted, heading levels
122122
stay unchanged
123-
- [ ] Heading level never exceeds 6
124-
- [ ] Invalid `heading-level` values produce a diagnostic
125-
- [ ] Link adjustment is always applied (no parameter
123+
- [x] Heading level never exceeds 6
124+
- [x] Invalid `heading-level` values produce a diagnostic
125+
- [x] Link adjustment is always applied (no parameter
126126
needed)
127-
- [ ] All tests pass: `go test ./...`
128-
- [ ] `golangci-lint run` reports no issues
129-
- [ ] `mdsmith check .` reports zero diagnostics
127+
- [x] All tests pass: `go test ./...`
128+
- [x] `golangci-lint run` reports no issues
129+
- [x] `mdsmith check .` reports zero diagnostics

0 commit comments

Comments
 (0)