Skip to content

devagentic-docs: add docs SKILL.md + register it (mirror canvas)#23

Merged
PowerCreek merged 1 commit into
mainfrom
devagentic-docs-skill-md
May 22, 2026
Merged

devagentic-docs: add docs SKILL.md + register it (mirror canvas)#23
PowerCreek merged 1 commit into
mainfrom
devagentic-docs-skill-md

Conversation

@PowerCreek

Copy link
Copy Markdown

Summary

The canvas plugin ships skills/canvas/SKILL.md and registers it via ctx.register_skill() (see plugins/devagentic-canvas/__init__.py). The docs plugin had no analog. This PR adds the parallel surface so operators can pull up the slash-command reference inline via the skill system.

What's in the SKILL.md

Plugin wiring

plugins/devagentic-docs/__init__.py now registers the skill the same way canvas does — best-effort, debug-logs if the file is missing.

Test plan

Filed by hermes-maintainer (PowerCreek).

The canvas plugin ships skills/canvas/SKILL.md and registers it via
ctx.register_skill(); the docs plugin had no analog. Add the
parallel surface so operators can `/skill devagentic-docs:docs`
(or `skill_view`) for the slash-command reference inline.

Skill content covers:
- /doc and /fork command tables.
- The state-aware preamble + the 8000-char cap.
- The /graphql-over-HTTP transport caveat (#21) with the curl probe.
- Tag-schema convention (source:hermes-cli + user:<id> + kind:<>).

Plugin __init__.py picks up the SKILL.md path the same way canvas
does — best-effort register, debug-log if the file is missing.

Tests: 47 passed (45 prior + 2 new — frontmatter parse + register_skill
invocation).
@PowerCreek PowerCreek merged commit 994e963 into main May 22, 2026
@PowerCreek PowerCreek deleted the devagentic-docs-skill-md branch May 22, 2026 23:09
PowerCreek added a commit that referenced this pull request May 22, 2026
Mirrors the canvas-tools pattern (#56) for the just-shipped
devagentic-docs plugin (#12 / PRs #19+#20+#23). MCP-aware clients
(Claude Code, Cursor, Codex) can now writeDoc / searchDocs /
forkContext / decorateContext / renderContext against any
devagentic instance hermes is configured for.

New tools (7):
- doc_search(query, limit, tag)  → search_docs
- doc_write(content, tags, source) → write_doc
- doc_show(doc_id)               → get_doc
- fork_open(parent_id, goal, tags) → fork_context (auto-pins
                                     parent + threads goal)
- fork_decorate(ctx_id, key, value, weight) → decorate_context
- fork_get(ctx_id)               → get_context
- fork_render(ctx_id)            → render_context (envelope:
                                   {ctx_id, rendered})

Loader pattern: _resolve_docs_client() mirrors
_resolve_canvas_client at line 880 — file-path import of
plugins/devagentic-docs/client.py since the hyphenated dir
isn't a Python package.

Failure semantics: every tool returns {"error": "<msg>"} JSON.
The plugin's last_error_text() pattern (introduced in #15)
threads through via a _reason() helper, so federated agents
see the same actionable hints CLI users get — e.g. on the
canonical devbox deployment (where /graphql isn't exposed,
see #21), they'd see "not found at <url>/graphql ..." instead
of an opaque None.

Out of scope per #24: fork_close + fork_pin depend on the
session-local $HERMES_HOME/docs-fork-active marker, which
doesn't translate to MCP's stateless tool model. fork_open
auto-tags with source:hermes-mcp so MCP-authored forks are
distinguishable from CLI-authored ones (source:hermes-cli).

Tests: 22 new (tests/test_mcp_docs.py) covering registration,
plugin-missing fallback, arg routing, last_error surfacing for
the #21 case, and the real-import smoke. All passing alongside
canvas MCP suite (14 existing) and the broader devagentic-
adjacent test set (159 total).

Closes #24.
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