Skip to content

feat(plugin): molecule-hitl — opt-in HITL gates (#257) - #262

Merged
HongmingWang-Rabbit merged 1 commit into
mainfrom
feat/plugin-molecule-hitl
Apr 15, 2026
Merged

feat(plugin): molecule-hitl — opt-in HITL gates (#257)#262
HongmingWang-Rabbit merged 1 commit into
mainfrom
feat/plugin-molecule-hitl

Conversation

@HongmingWang-Rabbit

Copy link
Copy Markdown
Contributor

Closes #257.

Summary

Thin plugin that activates `builtin_tools/hitl.py` primitives as an opt-in per-workspace policy layer. The Python implementation (`@requires_approval` decorator, `pause_task` / `resume_task` tools, multi-channel notification, RBAC bypass) is already in every runtime image — this plugin is the when to use them layer.

Files

  • `plugins/molecule-hitl/plugin.yaml` — manifest. Runtimes: langgraph, claude_code, deepagents. Skills: hitl-gates.
  • `plugins/molecule-hitl/skills/hitl-gates/SKILL.md` — documents:
    • The 5 classes of action that need a gate (deployment / irreversible FS / public message / production mutation / cross-workspace destructive)
    • Decorator pattern + explicit pause/resume pattern
    • Config shape for `hitl:` block in config.yaml (channels, timeout, bypass_roles)
    • 4 anti-patterns (read-only wrap, cron-fired, double-wrap with careful-bash, sub-60s timeout)
    • 5-step test plan

No Python code

All runtime primitives already exist. This PR is pure manifest + documentation — the policy of WHEN to gate, not the mechanics of HOW.

Test plan

  • Plugin YAML structure matches existing molecule-* plugins
  • Skill frontmatter name matches directory
  • Install on a test workspace via `POST /workspaces/:id/plugins {"source":"builtin://molecule-hitl"}`
  • Configure `hitl.channels` in that workspace's config.yaml
  • Trigger a gated action → approval appears in `GET /approvals/pending`
  • Approve via canvas → agent resumes

Unblocks

🤖 Generated with Claude Code

Closes #257. Thin manifest + skill doc that activates the existing
builtin_tools/hitl.py primitives as a per-workspace opt-in plugin.

The Python implementation (@requires_approval decorator, pause_task /
resume_task tools, multi-channel notification, RBAC bypass roles) is
already in every runtime image — this plugin is the policy layer that
tells agents *when* to call them.

- plugins/molecule-hitl/plugin.yaml — runtimes: langgraph, claude_code,
  deepagents; skills: hitl-gates
- plugins/molecule-hitl/skills/hitl-gates/SKILL.md — documents the 5
  classes of action that need a gate (deployment / irreversible FS /
  public message / production mutation / cross-workspace destructive),
  decorator pattern, pause/resume pattern, config shape, 4 anti-patterns,
  5-step test plan

No Python code — all implementation already exists. Install per
workspace via POST /workspaces/:id/plugins.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@HongmingWang-Rabbit
HongmingWang-Rabbit merged commit efc3dce into main Apr 15, 2026
5 of 6 checks passed
@HongmingWang-Rabbit
HongmingWang-Rabbit deleted the feat/plugin-molecule-hitl branch April 15, 2026 21:03
HongmingWang-Rabbit pushed a commit that referenced this pull request Apr 15, 2026
Tick 32 (manual) merged a large batch of PRs — the test counts in
CLAUDE.md were drifting behind reality by enough to matter:

- platform: 816 → 818 (YAML injection fix + sanitizeRuntime allowlist)
- canvas: 453 → 482 (12 CookieConsent + 17 PricingTable/billing)
- workspace-template: 1180 → 1179 (Hermes Phase 2a/2b dispatch tests
  landed but the test_hermes_providers env-var-leak fix removed a
  fragile flake-path count; net -1)

This is measured not guessed: running the full suites on fresh main.

Not in this sync but worth mentioning for the next retrospective:
- controlplane repo received the full GDPR/admin/usage/consent/email
  stack (#29-#34) — that work sits in molecule-controlplane, not
  monorepo CLAUDE.md
- monorepo picked up /pricing route, cookie consent banner, molecule-
  hitl plugin (#262), Hermes Phase 2a native Anthropic + 2b Gemini

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
molecule-ai Bot pushed a commit that referenced this pull request Apr 21, 2026
feat(plugin): molecule-hitl — opt-in HITL gates (#257)
molecule-ai Bot pushed a commit that referenced this pull request Apr 21, 2026
Tick 32 (manual) merged a large batch of PRs — the test counts in
CLAUDE.md were drifting behind reality by enough to matter:

- platform: 816 → 818 (YAML injection fix + sanitizeRuntime allowlist)
- canvas: 453 → 482 (12 CookieConsent + 17 PricingTable/billing)
- workspace-template: 1180 → 1179 (Hermes Phase 2a/2b dispatch tests
  landed but the test_hermes_providers env-var-leak fix removed a
  fragile flake-path count; net -1)

This is measured not guessed: running the full suites on fresh main.

Not in this sync but worth mentioning for the next retrospective:
- controlplane repo received the full GDPR/admin/usage/consent/email
  stack (#29-#34) — that work sits in molecule-controlplane, not
  monorepo CLAUDE.md
- monorepo picked up /pricing route, cookie consent banner, molecule-
  hitl plugin (#262), Hermes Phase 2a native Anthropic + 2b Gemini

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.

Plugin proposal: molecule-hitl — wraps hitl.py + approval.py for human-in-the-loop gates on any workspace

1 participant