Menu

#189 docs: document the shared shape of Doberman's host adapters

closed
nobody
2026-08-11
2026-07-30
Anonymous
No

Originally created by: fu351

What

Doberman has two host integrations today — src/doberman/hosthooks/claude_code.py (Claude Code's PreToolUse/PostToolUse hooks) and adapters/openclaw/ (a JS-based OpenClaw plugin) — with no page distilling the pattern they share. Add docs/ADAPTER_GUIDE.md covering: the hook lifecycle (pre-call vs post-call), how a host tool-call is normalized into a SecurityObject, and where the verdict is enforced (allow / prompt / deny back to the host) — so a third adapter author doesn't have to reverse-engineer both existing integrations from scratch.

Difficulty: level-3

Reading two existing integrations (one Python, one JS) plus src/doberman/models.py's SecurityObject, and writing one focused guide. No code change.

Starting files

  • src/doberman/hosthooks/claude_code.py — the Python-side hook (doberman hook pre / doberman hook post, wired via doberman install-hooks).
  • adapters/openclaw/index.js, adapters/openclaw/openclaw.plugin.json, adapters/openclaw/README.md — the JS-side adapter.
  • src/doberman/models.pySecurityObject (the normalized shape both adapters produce).
  • New file: docs/ADAPTER_GUIDE.md.

Acceptance criteria

  • [ ] Guide covers: hook lifecycle, tool-call → SecurityObject normalization, and where/how the verdict is enforced.
  • [ ] Cites concrete functions/files in both existing adapters (not generic prose).
  • [ ] Existing behaviour unchanged (no test weakened, no output format broken)
  • [ ] ruff check . && ruff format --check . and lint-imports pass
  • [ ] pytest passes

How to validate

# Read-only issue: confirm the guide accurately describes both existing adapters
# by cross-checking each claim against claude_code.py and adapters/openclaw/index.js.

Out of scope

  • Do not modify either existing adapter.
  • Do not build a third adapter in this issue.

Notes for contributors

New here? Start with CONTRIBUTING.md. Issues are labelled level-1 (docs only) through level-10 (new subsystem) — pick one at your level and climb. Comment to claim an issue before starting.

Related

Tickets: #183
Tickets: #202
Tickets: #316

Discussion

  • Anonymous

    Anonymous - 2026-08-09

    Originally posted by: jasperdingg

    I'd love to take this issue, will open PR shortly.

     
  • Anonymous

    Anonymous - 2026-08-11

    Ticket changed by: fu351

    • status: open --> closed
     

Log in to post a comment.