feat: adds docs skill - #55
Conversation
WilliamBergamin
left a comment
There was a problem hiding this comment.
Awesome work 💯 this project is starting to take shape 🏗️
It keeps surprising me how much overlap the skills have! The eval test seems to be catching a lot of those potential overlap issues. Figuring out the scope of each skill is starting to become the trickiest part of this project
Left a few comments, I think we are going in the right direction, the main blocker is around the description, when running the evals locally I found this description was conflicting with other skills 😅
| --- | ||
|
|
||
| ## Step 2: Read the Page (fetch markdown) | ||
|
|
There was a problem hiding this comment.
🤔 slack-cli vs slack-docs overlap
Needs a boundary decision (the skill-slack-cli-socket-mode failure). We previously expected slack-cli for "Search the Slack developer documentation...", but slack-docs is arguably the better pick
slack-cli's own description still claims "searching the Slack developer documentation for any topic (socket mode, the Events API, OAuth, …)", which is now redundant with this skill.
Maybe we should move general doc-search to slack-docs and narrow the slack-cli's description to "search docs from the terminal via slack docs search". Then update the skill-slack-cli-socket-mode scenario's expected_tool to slack-docs.
There was a problem hiding this comment.
Narrowed it and updated scenario!
| The response is JSON: | ||
|
|
||
| ```json | ||
| { |
There was a problem hiding this comment.
💡 (Lower priority)
Verified live: a socket mode search actually returns SDK pages (/tools/java-slack-sdk/…, /tools/node-slack-sdk/…) above the events-api guide shown here. 🤔
Claude claims "The example oversells the ranking.", we might need to improve the search endpoint 😅
There was a problem hiding this comment.
maybe quick fix is to have it filter to guides - there is a filter param in endpoint
There was a problem hiding this comment.
jk i made a filter on site but not on endpoint hmmmm
There was a problem hiding this comment.
no longer jk, aded filter to endpoint and then told it to filter to guides
|
|
||
| --- | ||
|
|
||
| ## Fast Path (the developer already has a URL) |
There was a problem hiding this comment.
💡 (Lower priority) The "drop #anchor, append .md, WebFetch" logic is duplicated here and in Step 2. Consider making Step 2 the single home for path→.md→fetch and having the Fast Path just hand off to it
Goal is to have less to maintain
There was a problem hiding this comment.
brilliant. made it so!
| PROMPT = "How does Socket Mode work in Slack? Point me to the docs." | ||
|
|
||
|
|
||
| class TestSlackDocs: |
|
|
||
| # Skill inventory (single source of truth) | ||
| EXPECTED_SKILLS = ("create-slack-app", "block-kit", "slack-api", "slack-cli") | ||
| EXPECTED_SKILLS = ("create-slack-app", "block-kit", "slack-api", "slack-cli", "slack-docs") |
Co-authored-by: William Bergamin <william.bergamin.coen@gmail.com>
The docs search endpoint now supports a `category` param. Lead with it in Step 1 rather than treating it as optional: an uncategorized search skews heavily toward SDK reference pages (queries like "socket mode" or "oauth" can return a top 10 that is entirely Bolt/Node pages), burying the conceptual and reference content most questions are about. - Step 1 (discovery): make `category` the default path, with guidance on picking the starting category (guides for conceptual, reference for a named method/event/scope, a tool category once the SDK is known) and how to widen the search when a categorized query misses. - Step 3 (tool/SDK scoping): map each tool to its matching `category` so the agent can scope discovery to a language family. Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Make Step 2 the single home for the page-reference → .md → fetch → cite routine, accepting both a site-relative path from search and a full URL the developer pasted. The Fast Path now hands off to Step 2 instead of duplicating the append-.md/WebFetch logic. Less to maintain, and Step 2 now covers the anchor-stripping case that only the Fast Path mentioned before. Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
WilliamBergamin
left a comment
There was a problem hiding this comment.
We don't need the TestSlackDocs anymore 🙏
| PROMPT = "How does Socket Mode work in Slack? Point me to the docs." | ||
|
|
||
|
|
||
| class TestSlackDocs: |
There was a problem hiding this comment.
We don't need this test anymore 🙏
🦋 Changeset detectedLatest commit: bdb3a84 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Route general documentation questions to the slack-docs skill and scope slack-cli's docs search to terminal-based lookups, removing the overlap between the two skill descriptions. Update the tool-selection eval to match the redrawn boundary: the doc-search scenario now expects slack-docs, plus new scenarios for a conceptual docs question, a docs.slack.dev URL fetch, and a slack-cli local-run to guard slack-cli routing. Also remove the orphaned tests/eval/skills/test_slack_docs.py (referenced a nonexistent Ollama harness and never imported) and add the missing code-fence language that was failing rumdl lint. Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
| { | ||
| "id": "skill-slack-cli-run-local", | ||
| "prompt": "Run my Slack app locally for development from the terminal", |
There was a problem hiding this comment.
Added a cli eval since i changed the only one that had it
|
@WilliamBergamin Addressed your comments/suggestions! |
WilliamBergamin
left a comment
There was a problem hiding this comment.
Looking good 🙏 left a few more comments
| ## Step 3: Searching Documentation (`slack docs search`) | ||
|
|
||
| Search Slack's developer documentation directly from the terminal. | ||
| Search Slack's developer documentation directly from the terminal. This is the CLI-based path to the same docs; for general documentation questions ("how does X work in Slack?", looking up a guide or reference page) prefer the `slack:slack-docs` skill, which searches and reads `docs.slack.dev` without needing the CLI installed. Reach for `slack docs search` when the developer is already working in the terminal and specifically wants a CLI lookup. |
There was a problem hiding this comment.
I don't think we need this change 🤔 the description of the docs skill should be sufficient
|
|
||
| > **Critical rules:** | ||
| > | ||
| > - The docs are the **source of truth**. Do not answer a factual question about the Slack platform from memory; discover the page, fetch it, then answer from what it says. |
|
|
||
| Scan `results` for the best `title`/`url` match, then read it in **Step 2**. A query is **required**; calling the endpoint with no `query` returns a `400` with an `error` field. | ||
|
|
||
| Full set of categories: |
There was a problem hiding this comment.
Is there an endpoint or markdown page that lists these categories rather then hard coding them here?
There was a problem hiding this comment.
oh hmmmm there isn't. i can work on adding one but for now i think this is okay because they won't really be changing
Co-authored-by: William Bergamin <william.bergamin.coen@gmail.com>
This PR adds a docs skill. It answers Slack platform questions from the live docs at docs.slack.dev rather than from memory.
The process
If the developer pastes a docs.slack.dev link, it skips discovery and fetches directly (Fast Path). Testing so far feels snappy; the search-first-then-sitemap approach is open to reassessment.
Skill boundaries
This skill overlapped with two existing ones, so this PR draws clear lines:
Verified via the tool-selection eval: a method question correctly routes to slack-api, not slack-docs.