Skip to content

feat: link docs search results to markdown pages for coding agents - #755

Merged
mwbrooks merged 4 commits into
mainfrom
mwbrooks-docs-search-md-links
Nov 6, 2026
Merged

mwbrooks merged 4 commits into
mainfrom
mwbrooks-docs-search-md-links

Conversation

@mwbrooks

@mwbrooks mwbrooks commented Nov 5, 2026

Copy link
Copy Markdown
Member

Changelog

When a coding agent runs slack docs search, text results now link to the markdown version of each page, so the agent can read it without parsing HTML.

Summary

This pull request links slack docs search results to each page's markdown version when a coding agent runs the command, so the agent can read the result straight away instead of fetching the HTML page.

$ slack docs search "socket mode" --limit=1
...
Socket Mode
   https://docs.slack.dev/tools/java-slack-sdk/guides/socket-mode.md
  • Every docs.slack.dev page is served as markdown at its path plus .md. Agents are detected with the same useragent check the CLI already uses for its user agent.
  • People running the command get the usual page links, unchanged.
  • Generated SDK reference pages ending in .html have no markdown version, so they keep their original link.

Testing

  • From a coding agent, or with CLAUDECODE=1, run slack docs search "socket mode" --limit=3 and confirm each link ends in .md and opens as markdown.
  • Without an agent (env -u CLAUDECODE -u AGENT slack docs search "socket mode" --limit=3), confirm the links are the usual page URLs.

Notes

Requirements

@mwbrooks mwbrooks added this to the Next Release milestone Nov 5, 2026
@mwbrooks mwbrooks added enhancement M-T: A feature request for new functionality changelog Use on updates to be included in the release notes semver:minor Use on pull requests to describe the release version increment labels Nov 5, 2026
@mwbrooks mwbrooks self-assigned this Nov 5, 2026
@codecov

codecov Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.46%. Comparing base (19c588c) to head (12448e8).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #755      +/-   ##
==========================================
+ Coverage   78.41%   78.46%   +0.05%     
==========================================
  Files         240      240              
  Lines       18179    18193      +14     
==========================================
+ Hits        14255    14276      +21     
+ Misses       3924     3917       -7     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@mwbrooks
mwbrooks marked this pull request as ready for review November 6, 2026 05:35
@mwbrooks
mwbrooks requested review from a team as code owners November 6, 2026 05:35
@mwbrooks
mwbrooks requested review from WilliamBergamin, lukegalbraithrussell and zimeg and removed request for a team November 6, 2026 05:35

@zimeg zimeg left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📚 @mwbrooks LGTM! Linking agents straight to the markdown pages is a great nudge, and keeping the .html reference pages and JSON output as they are makes sense to me.

Comment thread cmd/docs/search_test.go Outdated
}
}

func Test_Docs_makeMarkdownURL(t *testing.T) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 quibble: I think our test ordering keeps the command test first, so perhaps this can move below Test_Docs_SearchCommand?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Applied in 12448e8, thanks! 🙇

@mwbrooks

mwbrooks commented Nov 6, 2026

Copy link
Copy Markdown
Member Author

Thanks @zimeg for the quick review! 🙇

@mwbrooks
mwbrooks merged commit 4d8f832 into main Nov 6, 2026
14 checks passed
@mwbrooks
mwbrooks deleted the mwbrooks-docs-search-md-links branch November 6, 2026 16:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog Use on updates to be included in the release notes enhancement M-T: A feature request for new functionality semver:minor Use on pull requests to describe the release version increment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants