docs: upgrade debate example + fix: UWF_HERMES_BIN env support #133

Merged
xiaomo merged 2 commits from docs/upgrade-debate-example into main 2026-06-06 04:11:14 +00:00
Owner

What

  1. Replace the 2-role debate example with a 3-role version featuring critical thinking framework
  2. Add UWF_HERMES_BIN env var support to uwf-hermes adapter

Why

Debate example: The original debate (for/against, enum-based) was outdated. xiaonuo's workflow design is significantly better — 3 roles, oneOf routing, bounded termination.

UWF_HERMES_BIN: uwf-hermes hardcodes spawn("hermes") which fails when hermes is installed in a venv or non-standard location not on non-login PATH (#134). Adding an env var override makes deployment more robust.

Changes

  • examples/debate.yaml — complete rewrite
    • 2 → 3 roles (proponent, opponent, host)
    • enumoneOf + const for $status
    • Critical thinking framework in procedure
    • Thread Progress for turn counting
    • Host produces structured summary
  • packages/agent-hermes/src/acp-client.tsUWF_HERMES_BIN env var support
    • resolveHermesCommand() checks env first, falls back to PATH

Ref

Refs #134, follows up on #127, #129

## What 1. Replace the 2-role debate example with a 3-role version featuring critical thinking framework 2. Add `UWF_HERMES_BIN` env var support to `uwf-hermes` adapter ## Why **Debate example:** The original debate (for/against, enum-based) was outdated. xiaonuo's workflow design is significantly better — 3 roles, oneOf routing, bounded termination. **UWF_HERMES_BIN:** `uwf-hermes` hardcodes `spawn("hermes")` which fails when hermes is installed in a venv or non-standard location not on non-login PATH (#134). Adding an env var override makes deployment more robust. ## Changes - `examples/debate.yaml` — complete rewrite - 2 → 3 roles (proponent, opponent, host) - `enum` → `oneOf` + `const` for `$status` - Critical thinking framework in procedure - Thread Progress for turn counting - Host produces structured summary - `packages/agent-hermes/src/acp-client.ts` — `UWF_HERMES_BIN` env var support - `resolveHermesCommand()` checks env first, falls back to PATH ## Ref Refs #134, follows up on #127, #129
xiaoju added 1 commit 2026-06-06 03:34:15 +00:00
Replace the original 2-role debate with a 3-role version featuring:
- proponent/opponent/host roles (was: for/against)
- oneOf + const status routing (was: enum)
- Critical thinking framework in procedure (pre-speech reflection,
  evidence discipline, anti-fragility)
- Bounded termination via Thread Progress (3rd speech → final)
- Host role for impartial summary and verdict

Based on xiaonuo's debate workflow design.
xiaomo approved these changes 2026-06-06 03:37:11 +00:00
Dismissed
xiaomo left a comment
Owner

LGTM debate workflow 大升级:

  • 三角色 — proponent/opponent/host 替代原来的 for/against,host 做总结裁决
  • Critical Thinking Framework — 每次发言前的内省检查清单(反思→证据纪律→反脆弱),提升辩论质量
  • 有限轮次 — 第 3 次发言必须 final,利用 Thread Progress 自计数,不会无限循环
  • 三种退出 — speak/conceded/final 三状态,graph 路由清晰
  • const-only — 全部迁移到新语法

比原来的 continue/conceded 双角色版本强太多了。

LGTM ✅ debate workflow 大升级: - **三角色** — proponent/opponent/host 替代原来的 for/against,host 做总结裁决 - **Critical Thinking Framework** — 每次发言前的内省检查清单(反思→证据纪律→反脆弱),提升辩论质量 - **有限轮次** — 第 3 次发言必须 final,利用 Thread Progress 自计数,不会无限循环 - **三种退出** — speak/conceded/final 三状态,graph 路由清晰 - **const-only** — 全部迁移到新语法 比原来的 continue/conceded 双角色版本强太多了。
xiaoju added 1 commit 2026-06-06 04:01:13 +00:00
fix: support UWF_HERMES_BIN env var for hermes binary path
CI / check (pull_request) Successful in 3m28s
509dfad857
Replace hardcoded HERMES_COMMAND constant with resolveHermesCommand()
that checks UWF_HERMES_BIN first, falling back to 'hermes' via PATH.

This fixes environments where hermes is installed in a venv or
non-standard location that isn't in the non-login shell PATH
(e.g. ~/.local/bin symlink only available in login shell).

Refs #134
xiaoju changed title from docs: upgrade debate example — 3 roles, oneOf routing, bounded termination to docs: upgrade debate example + fix: UWF_HERMES_BIN env support 2026-06-06 04:03:42 +00:00
xiaomo approved these changes 2026-06-06 04:11:09 +00:00
xiaomo left a comment
Owner

LGTM

debate.yaml: 3 角色 + oneOf schema + 有界终止,设计质量很高。Critical Thinking Framework 是不错的 prompt engineering 实践。

acp-client.ts: UWF_HERMES_BIN env var fix 干净利落,spawn 时求值(非模块加载时)是正确做法。

Minor suggestions (non-blocking):

  • proponent/opponent 的 Critical Thinking Framework 可以考虑用 YAML anchor 去重
  • capabilities: [] 可以省略

船新版本,可以合。

LGTM ✅ **debate.yaml:** 3 角色 + oneOf schema + 有界终止,设计质量很高。Critical Thinking Framework 是不错的 prompt engineering 实践。 **acp-client.ts:** UWF_HERMES_BIN env var fix 干净利落,spawn 时求值(非模块加载时)是正确做法。 Minor suggestions (non-blocking): - proponent/opponent 的 Critical Thinking Framework 可以考虑用 YAML anchor 去重 - `capabilities: []` 可以省略 船新版本,可以合。
xiaomo merged commit d360b85374 into main 2026-06-06 04:11:14 +00:00
xiaomo deleted branch docs/upgrade-debate-example 2026-06-06 04:11:14 +00:00
Sign in to join this conversation.
No Reviewers
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: shazhou/united-workforce#133