Skip to content

feat: markdown section addressing#2

Merged
jahala merged 1 commit into
mainfrom
jahala/markdown-sections
Feb 12, 2026
Merged

feat: markdown section addressing#2
jahala merged 1 commit into
mainfrom
jahala/markdown-sections

Conversation

@jahala

@jahala jahala commented Feb 12, 2026

Copy link
Copy Markdown
Owner

Summary

  • Markdown outlines show heading ranges ([23-88] ## Architecture) instead of single line numbers, matching the format code outlines already use
  • Section parameter accepts heading addresses (e.g. section: "## Architecture") that resolve to the correct line range — stable across edits unlike line numbers
  • MCP tool description and server instructions updated

Inspired by HN feedback on heading-based addressing being stable across versions.

Test plan

  • tilth_read on large markdown → outline shows [start-end] Heading ranges
  • tilth_read with section: "## Heading" → returns correct section content
  • Heading inside code block → skipped
  • Heading not found → clear error message
  • Edit mode: heading section → hashlined content → tilth_edit works
  • Existing line range sections still work

🤖 Generated with Claude Code

- Markdown outline shows heading ranges [start-end] with # prefix
- Section param accepts heading names (e.g. "## Architecture")
- Headings inside code blocks are skipped
- resolve_heading aligns total_lines with outline count
- 13 unit tests for outline and heading resolution
- Updated README, AGENTS.md, CLI help, MCP instructions

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@jahala jahala force-pushed the jahala/markdown-sections branch from 7674b52 to df1db55 Compare February 12, 2026 18:59
@jahala jahala merged commit 41b88e0 into main Feb 12, 2026
1 check passed
@jahala jahala deleted the jahala/markdown-sections branch February 12, 2026 20:13
sting8k added a commit to sting8k/tilth that referenced this pull request Mar 31, 2026
- jahala#1: --expand uses require_equals to avoid greedy query consumption
- jahala#2: multi-word concepts route through search_content_expanded when --expand
- jahala#3: --map declares conflicts_with_all (callers, deps, expand, section, full)
- jahala#4: related file hints only on outline mode (!full), not full reads
- jahala#5: Session/SymbolIndex/Bloom skipped for FilePath/Glob query types
paulnsorensen referenced this pull request in paulnsorensen/tilth Apr 18, 2026
- tilth_read `paths` JSON schema now declares minItems:1/maxItems:20 to
  match runtime enforcement (inline threads #1 and #2 from Copilot review)
- Replace hardcoded /tmp/ paths in batch tests with std::env::temp_dir()
  for Windows portability

Co-Authored-By: WOZCODE <contact@withwoz.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant