aidd-lint hard-wrap cop joins code lines inside a nested fence #563

Open
opened 2026-09-12 21:55:13 +00:00 by jared · 0 comments
Owner

Context

The os-aidd-lint hard-wrap cop does not track fence depth. It should skip lines inside code fences of any depth, but currently treats code inside nested fences as prose.

Observed

plugins/os-aidd-lint/bin/aidd-lint --fix plugins/os-sdlc/agents/responsibility-auditor.md joined three code lines into one line, breaking the Ruby sketch inside a nested fence.
After manual restoration, the plain check still reports: plugins/os-sdlc/agents/responsibility-auditor.md:78: hard-wrap: paragraph (lines 78-80) is hard-wrapped.

Reproduce

plugins/os-aidd-lint/bin/aidd-lint plugins/os-sdlc/agents/responsibility-auditor.md

Expected

The cop should track fence depth. Lines inside an inner fence (of any backtick count) must be skipped by both check and autofix.

Illustration

# current bug: treats nested fence as prose
````markdown
  ```ruby
  class Project::Layout
    # nest under the concept it refines
  end

# expected: skip lines inside the inner ``` fence
```

## Origin
- Trigger: Running the fix skill on the responsibility-audit flow
- Improvised this session: Manual restoration of the three joined lines
- Chain: hard-wrap cop lacks fence-depth tracking ← design gap
- Root candidate: none (this is the root)
- Where: plugins/os-aidd-lint/lib (hard-wrap cop class)
- Session: 6d38ceb5-9d7a-4917-ba3c-1b3ceabd5c4b
- Transcript: /home/jared/.claude/projects/-home-jared-dev-cc-os/6d38ceb5-9d7a-4917-ba3c-1b3ceabd5c4b.jsonl

VERDICT: CREATE — Reproducible bug in aidd-lint hard-wrap cop (data-loss risk: autofix corrupts code), root-cause identified, complete Origin chain with no upstream root; data-corruption issues clear the hard floor regardless.
## Context The os-aidd-lint hard-wrap cop does not track fence depth. It should skip lines inside code fences of any depth, but currently treats code inside nested fences as prose. ## Observed `plugins/os-aidd-lint/bin/aidd-lint --fix plugins/os-sdlc/agents/responsibility-auditor.md` joined three code lines into one line, breaking the Ruby sketch inside a nested fence. After manual restoration, the plain check still reports: `plugins/os-sdlc/agents/responsibility-auditor.md:78: hard-wrap: paragraph (lines 78-80) is hard-wrapped.` ## Reproduce ``` plugins/os-aidd-lint/bin/aidd-lint plugins/os-sdlc/agents/responsibility-auditor.md ``` ## Expected The cop should track fence depth. Lines inside an inner fence (of any backtick count) must be skipped by both check and autofix. ## Illustration ```ruby # current bug: treats nested fence as prose ````markdown ```ruby class Project::Layout # nest under the concept it refines end ``` ```` # expected: skip lines inside the inner ``` fence ``` ## Origin - Trigger: Running the fix skill on the responsibility-audit flow - Improvised this session: Manual restoration of the three joined lines - Chain: hard-wrap cop lacks fence-depth tracking ← design gap - Root candidate: none (this is the root) - Where: plugins/os-aidd-lint/lib (hard-wrap cop class) - Session: 6d38ceb5-9d7a-4917-ba3c-1b3ceabd5c4b - Transcript: /home/jared/.claude/projects/-home-jared-dev-cc-os/6d38ceb5-9d7a-4917-ba3c-1b3ceabd5c4b.jsonl VERDICT: CREATE — Reproducible bug in aidd-lint hard-wrap cop (data-loss risk: autofix corrupts code), root-cause identified, complete Origin chain with no upstream root; data-corruption issues clear the hard floor regardless.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
jared/cc-os#563
No description provided.