Skip to content

feat: add official_doc_urls and hints to browsable markdown (#155)#167

Merged
kiyotis merged 4 commits intomainfrom
155-browsable-markdown-urls-hints
Mar 10, 2026
Merged

feat: add official_doc_urls and hints to browsable markdown (#155)#167
kiyotis merged 4 commits intomainfrom
155-browsable-markdown-urls-hints

Conversation

@kiyotis
Copy link
Copy Markdown
Contributor

@kiyotis kiyotis commented Mar 10, 2026

Closes #155

Approach

Added official_doc_urls and per-section hints fields to the browsable markdown output generated by phase_f_finalize.py. Previously, these fields existed only in the JSON knowledge files and required developers to open JSON directly to review URLs and keyword quality.

The approach:

  • Official doc URLs are rendered at the top of each markdown file as **公式ドキュメント**: [title](url) (single URL) or numbered links [1](url1) [2](url2) (multiple URLs)
  • Section hints are rendered at the bottom of each section as <small>キーワード: ...</small>
  • Guard conditions (if urls:, if hints:) handle empty lists cleanly
  • All 289 nabledge-6 browsable markdown files were regenerated with the new format

This approach was chosen because the formatting is minimal and non-disruptive, fits cleanly within the existing _generate_docs loop, and makes keyword and URL correctness visible directly in PR diffs.

Tasks

  • Update _generate_docs in phase_f_finalize.py to emit **公式ドキュメント** block at file top
  • Update _generate_docs to emit <small>キーワード: ...</small> block after each section
  • Add assertion for official URL and hints in test_merge_then_resolve_then_docs
  • Add test_docs_multiple_official_urls for numbered-link rendering
  • Add test_docs_empty_official_urls_and_hints for empty field edge cases
  • Regenerate all nabledge-6 browsable markdown files

Expert Review

AI-driven expert reviews conducted before PR creation (see .claude/rules/expert-review.md):

Success Criteria Check

Criterion Status Evidence
Browsable markdown includes official_doc_urls at the top of the file as a link ✅ Met phase_f_finalize.py emits **公式ドキュメント**: [title](url) block; verified in test_merge_then_resolve_then_docs and test_docs_multiple_official_urls
Browsable markdown includes keywords (hints) at the end of each section in <small> tags ✅ Met phase_f_finalize.py emits <small>キーワード: ...</small> after each section; verified in test_merge_then_resolve_then_docs and test_docs_multiple_official_urls
Markdown generation script/tool is updated to produce the new format ✅ Met phase_f_finalize.py updated and all 289 docs regenerated

🤖 Generated with Claude Code

Add official documentation URLs and keyword hints to browsable markdown
output in phase_f_finalize.py. Regenerate all nabledge-6 knowledge docs
with the new format. Add unit tests for multiple-URL rendering and empty
field edge cases.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Comment thread .claude/skills/nabledge-6/docs/about/about-nablarch/about-nablarch-01.md Outdated
Comment thread tools/knowledge-creator/tests/ut/test_phase_m.py
Comment thread tools/knowledge-creator/scripts/phase_f_finalize.py
Comment thread tools/knowledge-creator/.cache/v6/catalog.json Outdated
kiyotis and others added 3 commits March 10, 2026 20:09
Replace keyword hints format from <small>キーワード: ...</small> to
*キーワード: ...* since <small> HTML tags do not render as smaller
text in GitHub Markdown. Also revert unintended catalog.json timestamp
change and add CHANGELOG entry for official doc URL feature.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Regenerate all 290 nabledge-6 browsable markdown docs using Phase M
(delete-insert pattern) to apply the details tag format for keywords
consistently across all files.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@kiyotis kiyotis merged commit c9eda00 into main Mar 10, 2026
@kiyotis kiyotis deleted the 155-browsable-markdown-urls-hints branch March 10, 2026 12:09
@kiyotis kiyotis added the enhancement New feature or request label Mar 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

As a developer, I want browsable markdown to include official URLs and hints from JSON so that I can review knowledge file contents more effectively

1 participant