Skip to content

feat: add Codex Kanban worker lane#19924

Closed
steezkelly wants to merge 9 commits into
NousResearch:mainfrom
steezkelly:feat/codex-kanban-worker
Closed

feat: add Codex Kanban worker lane#19924
steezkelly wants to merge 9 commits into
NousResearch:mainfrom
steezkelly:feat/codex-kanban-worker

Conversation

@steezkelly

Copy link
Copy Markdown
Contributor

Summary

  • route Kanban assignees codex, codex-cli, codex-worker, and openai-codex to a Hermes-owned Codex CLI worker
  • add hermes_cli.codex_worker to invoke Codex in workspace-write sandbox mode and return tasks to blocked/review-required instead of auto-completing
  • add regression tests and update Codex skill/docs for auth separation, safe flags, and review lifecycle

Test Plan

  • /home/steve/.hermes/hermes-agent/venv/bin/python -m pytest tests/hermes_cli/test_kanban_codex_worker.py tests/cron/test_codex_execution_paths.py tests/hermes_cli/test_codex_cli_model_picker.py -q — 12 passed
  • /home/steve/.hermes/hermes-agent/venv/bin/python -m pytest tests/hermes_cli/test_kanban_codex_worker.py tests/hermes_cli/test_kanban_db.py tests/hermes_cli/test_kanban_boards.py tests/hermes_cli/test_kanban_cli.py tests/hermes_cli/test_kanban_core_functionality.py -q — 249 passed
  • real standalone Codex CLI smoke in scratch git repo — returned CODEX_SMOKE_OK with no git changes
  • isolated live Kanban dispatch smoke with temporary HERMES_HOME — task assigned to codex-worker spawned Codex, created expected workspace-local file, and ended blocked with Codex completed; Hermes review required

Notes

  • Keeps Hermes Kanban as the single source of truth for task state, logs, workspace, and review gates.
  • Successful Codex exit intentionally blocks for review so dependent tasks do not auto-promote.
  • Does not use dangerous bypass flags in the worker path.

@alt-glitch alt-glitch added type/feature New feature or request P3 Low — cosmetic, nice to have comp/cli CLI entry point, hermes_cli/, setup wizard labels May 4, 2026
@steezkelly

Copy link
Copy Markdown
Contributor Author

Local verification update:\n\n- Codex worker targeted/unit coverage: 57 passed\n - Command: uv run python -m pytest tests/hermes_cli/test_kanban_codex_worker.py tests/hermes_cli/test_kanban_db.py -q --tb=short\n- Prior isolated live smoke passed: real Kanban dispatch to codex-worker created the expected workspace file and transitioned the task to blocked/review-required, not done.\n- GitHub Actions are currently blocked with conclusion action_required on the fork PR workflows (Tests, Nix, Docs Site Checks, Supply Chain Audit, Contributor Attribution Check). No CI logs are available yet because the workflows have not been approved/run.\n\nOnce workflows are approved, I can chase any CI failures.

@steezkelly

Copy link
Copy Markdown
Contributor Author

Pushed the approved environment-hardening follow-up in commit d54393cca55399939bdd6e7b8c487a494aeadffe.

What changed:

  • Codex worker launcher now strips secret-looking parent env vars before spawning python -m hermes_cli.codex_worker.
  • The Codex subprocess invocation now receives a sanitized env instead of os.environ.copy().
  • Normal Kanban routing pins are preserved: task id, workspace, DB path, workspaces root, board, profile.
  • Non-Codex Hermes workers keep the existing shared worker env behavior so provider-token-dependent profiles are not regressed.

TDD / verification:

  • RED verified first: new secret-stripping tests failed against the previous behavior because OPENAI_API_KEY, ANTHROPIC_API_KEY, GITHUB_TOKEN, and HERMES_API_KEY leaked into the worker env.
  • GREEN after patch: uv run python -m pytest tests/hermes_cli/test_kanban_codex_worker.py::test_codex_worker_spawn_env_strips_parent_secrets tests/hermes_cli/test_kanban_codex_worker.py::test_codex_subprocess_env_strips_parent_secrets -q => 2 passed.
  • Targeted Codex worker file: uv run python -m pytest tests/hermes_cli/test_kanban_codex_worker.py -q => 9 passed.
  • Kanban regression set: uv run python -m pytest tests/hermes_cli/test_kanban_codex_worker.py tests/hermes_cli/test_kanban_core_functionality.py tests/hermes_cli/test_kanban_db.py tests/hermes_cli/test_kanban_boards.py tests/hermes_cli/test_kanban_cli.py -q => 251 passed.
  • Lint: uv run ruff check hermes_cli/codex_worker.py hermes_cli/kanban_db.py tests/hermes_cli/test_kanban_codex_worker.py => All checks passed.

GitHub Actions for the new commit are now visible/queued or in progress on the fork PR branch, so this is ready for maintainer CI to finish.

@steezkelly

Copy link
Copy Markdown
Contributor Author

CI follow-up after d54393cca:

I investigated the two failing checks and compared them against current main.

Findings:

  • test is not failing on this PR's Codex/Kanban changes. The PR run failed 36 tests; the most recent failed main run failed 33 of the same tests, and another nearby main run failed 35 of the same tests. The only deltas are unrelated/flaky gateway topic/cache tests; none touch hermes_cli/codex_worker.py, hermes_cli/kanban_db.py, or tests/hermes_cli/test_kanban_codex_worker.py.
  • docs-site-checks is failing in the global docs diagram linter on pre-existing docs paths (website/docs/user-guide/features/skills.md and website/docs/guides/_category_.json), not on the Codex skill docs generated by this PR. Recent main Docs Site Checks runs are also failing.

Local verification re-run on the actual changed/test-adjacent surface:

  • uv run python -m pytest tests/hermes_cli/test_kanban_codex_worker.py tests/website/test_generate_skill_docs.py -q
  • Result: 15 passed in 1.46s

So my conclusion is: the PR-specific env-hardening patch is locally green; the remaining red CI is baseline/upstream drift, not caused by the d54393cca hardening commit.

@steezkelly steezkelly force-pushed the feat/codex-kanban-worker branch from d54393c to 0f2734d Compare May 5, 2026 19:41
@steezkelly steezkelly force-pushed the feat/codex-kanban-worker branch from 06b037a to 46930b2 Compare May 5, 2026 19:55
Resolve Codex skill documentation conflicts after upstream provider and docs updates.
@steezkelly

Copy link
Copy Markdown
Contributor Author

Upstream sync update:

GitHub reported this PR as conflicting after origin/main advanced to 50ab0a85a, so I merged current main into the branch and resolved the two documentation conflicts.

Resolution details:

  • Conflicts were limited to Codex skill prerequisite wording in:
    • skills/autonomous-ai-agents/codex/SKILL.md
    • website/docs/user-guide/skills/bundled/autonomous-ai-agents/autonomous-ai-agents-codex.md
  • Kept the more precise standalone Codex CLI auth guidance while preserving upstream wording about CLI OAuth/API-key auth.
  • New branch head: 3601c39ed25057250f729544b0eb5bbdecbd995d
  • GitHub now reports mergeable: MERGEABLE.

Targeted local verification after the merge:

uv run --extra dev python -m pytest tests/hermes_cli/test_kanban_codex_worker.py tests/hermes_cli/test_kanban_diagnostics.py tests/website/test_generate_skill_docs.py -q

Result: 37 passed

CI has restarted on the new head and is currently queued/in progress.

Resolve kanban_db conflict by combining upstream run-id claim guards with the shared worker-spawn env helper.
@steezkelly

Copy link
Copy Markdown
Contributor Author

Another upstream sync update after origin/main advanced again:

  • New branch head: 3f91fae065ebf2a35846e3c5e51076f77ec54893
  • GitHub now reports mergeable: MERGEABLE.
  • Conflict was limited to hermes_cli/kanban_db.py.
  • Resolution combined upstream's run-id / claim-lock guarded worker state with this PR's shared _worker_spawn_env(...) helper and Codex secret-stripping path.

Targeted local verification after the merge:

uv run --extra dev python -m pytest tests/hermes_cli/test_kanban_codex_worker.py tests/hermes_cli/test_kanban_diagnostics.py tests/hermes_cli/test_kanban_core_functionality.py -q

Result: 169 passed

CI restarted on the refreshed head.

@steezkelly

Copy link
Copy Markdown
Contributor Author

Closing this broad/stale PR to reduce maintainer review and CI noise. It is now conflicting with main (, 36 changed files) and mixes the Codex Kanban worker lane with unrelated baseline-stabilization/test churn.\n\nThe right follow-up is a narrow reconstructed Codex-worker PR from current main that changes only the Codex worker, Kanban dispatch glue, focused tests, and Codex skill docs. I have local evidence for that narrower shape; this old broad PR should not remain open as the review target.

@steezkelly steezkelly closed this May 9, 2026
teknium1 added a commit that referenced this pull request May 11, 2026
Closes the architectural-pin part of #19931. Most of what that issue
asked for is already implemented (logs under kanban root, env-pinned
workspace, dispatcher routing of unknown assignees, lifecycle
ownership, structured handoff conventions). What was missing:

1. A written contract integrators can point at when adding a new
   worker lane shape, and
2. The "code-changing workers should not auto-promote success to
   done" convention.

This commit ships both as docs+convention layered on existing primitives.
No kernel changes — the kanban_complete / kanban_block / kanban_comment
surfaces already support the review-required pattern; we just hadn't
written it down or made it visible to workers.

Changes:

- `agent/prompt_builder.py::KANBAN_GUIDANCE`: append the review-required
  exception to step 5 of the lifecycle. Workers get the cue
  auto-injected into their system prompt — drop structured metadata
  into a kanban_comment first, then end with
  kanban_block(reason="review-required: <summary>") instead of
  kanban_complete when the work needs review. Total prompt size went
  from ~3000 to ~3275 chars; well under the 4096 budget enforced by
  test_kanban_guidance_size.

- `skills/devops/kanban-worker/SKILL.md`: add a worked example to the
  existing "Good summary + metadata shapes" section between the
  Coding-task and Research-task examples. Same shape as the others
  (kanban_comment with structured handoff JSON, then kanban_block with
  the human-readable reason). Plus a one-line guide on when to use
  kanban_complete vs the review-required pattern.

- `website/docs/user-guide/features/kanban-worker-lanes.md` (new): the
  integrator-facing contract. Covers the hierarchy, the three things
  every lane must provide (assignee, spawn mechanism, lifecycle
  terminator), the env vars the dispatcher injects, the
  review-required convention, the failure modes the kernel handles
  for free, and an explicit "external CLI worker lane" deferred-
  pending-concrete-asker section that links to #19931 and #19924.

- `website/sidebars.ts`: link the new page under user-guide/features.

The "specialist worker lanes for external CLI tools (Codex / Claude
Code / OpenCode)" runner is NOT shipped here. The dispatcher's
spawn_fn parameter already supports plugin-shaped extension; the
per-CLI integration work (auth, sandbox policy, exit-code mapping)
needs a concrete asker. The new docs page tells would-be integrators
the contract any such lane must satisfy.

Refs #19931
JZKK720 pushed a commit to JZKK720/hermes-agent that referenced this pull request May 11, 2026
Closes the architectural-pin part of NousResearch#19931. Most of what that issue
asked for is already implemented (logs under kanban root, env-pinned
workspace, dispatcher routing of unknown assignees, lifecycle
ownership, structured handoff conventions). What was missing:

1. A written contract integrators can point at when adding a new
   worker lane shape, and
2. The "code-changing workers should not auto-promote success to
   done" convention.

This commit ships both as docs+convention layered on existing primitives.
No kernel changes — the kanban_complete / kanban_block / kanban_comment
surfaces already support the review-required pattern; we just hadn't
written it down or made it visible to workers.

Changes:

- `agent/prompt_builder.py::KANBAN_GUIDANCE`: append the review-required
  exception to step 5 of the lifecycle. Workers get the cue
  auto-injected into their system prompt — drop structured metadata
  into a kanban_comment first, then end with
  kanban_block(reason="review-required: <summary>") instead of
  kanban_complete when the work needs review. Total prompt size went
  from ~3000 to ~3275 chars; well under the 4096 budget enforced by
  test_kanban_guidance_size.

- `skills/devops/kanban-worker/SKILL.md`: add a worked example to the
  existing "Good summary + metadata shapes" section between the
  Coding-task and Research-task examples. Same shape as the others
  (kanban_comment with structured handoff JSON, then kanban_block with
  the human-readable reason). Plus a one-line guide on when to use
  kanban_complete vs the review-required pattern.

- `website/docs/user-guide/features/kanban-worker-lanes.md` (new): the
  integrator-facing contract. Covers the hierarchy, the three things
  every lane must provide (assignee, spawn mechanism, lifecycle
  terminator), the env vars the dispatcher injects, the
  review-required convention, the failure modes the kernel handles
  for free, and an explicit "external CLI worker lane" deferred-
  pending-concrete-asker section that links to NousResearch#19931 and NousResearch#19924.

- `website/sidebars.ts`: link the new page under user-guide/features.

The "specialist worker lanes for external CLI tools (Codex / Claude
Code / OpenCode)" runner is NOT shipped here. The dispatcher's
spawn_fn parameter already supports plugin-shaped extension; the
per-CLI integration work (auth, sandbox policy, exit-code mapping)
needs a concrete asker. The new docs page tells would-be integrators
the contract any such lane must satisfy.

Refs NousResearch#19931
rmulligan pushed a commit to rmulligan/hermes-agent that referenced this pull request May 11, 2026
Closes the architectural-pin part of NousResearch#19931. Most of what that issue
asked for is already implemented (logs under kanban root, env-pinned
workspace, dispatcher routing of unknown assignees, lifecycle
ownership, structured handoff conventions). What was missing:

1. A written contract integrators can point at when adding a new
   worker lane shape, and
2. The "code-changing workers should not auto-promote success to
   done" convention.

This commit ships both as docs+convention layered on existing primitives.
No kernel changes — the kanban_complete / kanban_block / kanban_comment
surfaces already support the review-required pattern; we just hadn't
written it down or made it visible to workers.

Changes:

- `agent/prompt_builder.py::KANBAN_GUIDANCE`: append the review-required
  exception to step 5 of the lifecycle. Workers get the cue
  auto-injected into their system prompt — drop structured metadata
  into a kanban_comment first, then end with
  kanban_block(reason="review-required: <summary>") instead of
  kanban_complete when the work needs review. Total prompt size went
  from ~3000 to ~3275 chars; well under the 4096 budget enforced by
  test_kanban_guidance_size.

- `skills/devops/kanban-worker/SKILL.md`: add a worked example to the
  existing "Good summary + metadata shapes" section between the
  Coding-task and Research-task examples. Same shape as the others
  (kanban_comment with structured handoff JSON, then kanban_block with
  the human-readable reason). Plus a one-line guide on when to use
  kanban_complete vs the review-required pattern.

- `website/docs/user-guide/features/kanban-worker-lanes.md` (new): the
  integrator-facing contract. Covers the hierarchy, the three things
  every lane must provide (assignee, spawn mechanism, lifecycle
  terminator), the env vars the dispatcher injects, the
  review-required convention, the failure modes the kernel handles
  for free, and an explicit "external CLI worker lane" deferred-
  pending-concrete-asker section that links to NousResearch#19931 and NousResearch#19924.

- `website/sidebars.ts`: link the new page under user-guide/features.

The "specialist worker lanes for external CLI tools (Codex / Claude
Code / OpenCode)" runner is NOT shipped here. The dispatcher's
spawn_fn parameter already supports plugin-shaped extension; the
per-CLI integration work (auth, sandbox policy, exit-code mapping)
needs a concrete asker. The new docs page tells would-be integrators
the contract any such lane must satisfy.

Refs NousResearch#19931
JinyuID pushed a commit to JinyuID/hermes-agent that referenced this pull request May 11, 2026
Closes the architectural-pin part of NousResearch#19931. Most of what that issue
asked for is already implemented (logs under kanban root, env-pinned
workspace, dispatcher routing of unknown assignees, lifecycle
ownership, structured handoff conventions). What was missing:

1. A written contract integrators can point at when adding a new
   worker lane shape, and
2. The "code-changing workers should not auto-promote success to
   done" convention.

This commit ships both as docs+convention layered on existing primitives.
No kernel changes — the kanban_complete / kanban_block / kanban_comment
surfaces already support the review-required pattern; we just hadn't
written it down or made it visible to workers.

Changes:

- `agent/prompt_builder.py::KANBAN_GUIDANCE`: append the review-required
  exception to step 5 of the lifecycle. Workers get the cue
  auto-injected into their system prompt — drop structured metadata
  into a kanban_comment first, then end with
  kanban_block(reason="review-required: <summary>") instead of
  kanban_complete when the work needs review. Total prompt size went
  from ~3000 to ~3275 chars; well under the 4096 budget enforced by
  test_kanban_guidance_size.

- `skills/devops/kanban-worker/SKILL.md`: add a worked example to the
  existing "Good summary + metadata shapes" section between the
  Coding-task and Research-task examples. Same shape as the others
  (kanban_comment with structured handoff JSON, then kanban_block with
  the human-readable reason). Plus a one-line guide on when to use
  kanban_complete vs the review-required pattern.

- `website/docs/user-guide/features/kanban-worker-lanes.md` (new): the
  integrator-facing contract. Covers the hierarchy, the three things
  every lane must provide (assignee, spawn mechanism, lifecycle
  terminator), the env vars the dispatcher injects, the
  review-required convention, the failure modes the kernel handles
  for free, and an explicit "external CLI worker lane" deferred-
  pending-concrete-asker section that links to NousResearch#19931 and NousResearch#19924.

- `website/sidebars.ts`: link the new page under user-guide/features.

The "specialist worker lanes for external CLI tools (Codex / Claude
Code / OpenCode)" runner is NOT shipped here. The dispatcher's
spawn_fn parameter already supports plugin-shaped extension; the
per-CLI integration work (auth, sandbox policy, exit-code mapping)
needs a concrete asker. The new docs page tells would-be integrators
the contract any such lane must satisfy.

Refs NousResearch#19931
02356abc pushed a commit to 02356abc/hermes-agent that referenced this pull request May 14, 2026
Closes the architectural-pin part of NousResearch#19931. Most of what that issue
asked for is already implemented (logs under kanban root, env-pinned
workspace, dispatcher routing of unknown assignees, lifecycle
ownership, structured handoff conventions). What was missing:

1. A written contract integrators can point at when adding a new
   worker lane shape, and
2. The "code-changing workers should not auto-promote success to
   done" convention.

This commit ships both as docs+convention layered on existing primitives.
No kernel changes — the kanban_complete / kanban_block / kanban_comment
surfaces already support the review-required pattern; we just hadn't
written it down or made it visible to workers.

Changes:

- `agent/prompt_builder.py::KANBAN_GUIDANCE`: append the review-required
  exception to step 5 of the lifecycle. Workers get the cue
  auto-injected into their system prompt — drop structured metadata
  into a kanban_comment first, then end with
  kanban_block(reason="review-required: <summary>") instead of
  kanban_complete when the work needs review. Total prompt size went
  from ~3000 to ~3275 chars; well under the 4096 budget enforced by
  test_kanban_guidance_size.

- `skills/devops/kanban-worker/SKILL.md`: add a worked example to the
  existing "Good summary + metadata shapes" section between the
  Coding-task and Research-task examples. Same shape as the others
  (kanban_comment with structured handoff JSON, then kanban_block with
  the human-readable reason). Plus a one-line guide on when to use
  kanban_complete vs the review-required pattern.

- `website/docs/user-guide/features/kanban-worker-lanes.md` (new): the
  integrator-facing contract. Covers the hierarchy, the three things
  every lane must provide (assignee, spawn mechanism, lifecycle
  terminator), the env vars the dispatcher injects, the
  review-required convention, the failure modes the kernel handles
  for free, and an explicit "external CLI worker lane" deferred-
  pending-concrete-asker section that links to NousResearch#19931 and NousResearch#19924.

- `website/sidebars.ts`: link the new page under user-guide/features.

The "specialist worker lanes for external CLI tools (Codex / Claude
Code / OpenCode)" runner is NOT shipped here. The dispatcher's
spawn_fn parameter already supports plugin-shaped extension; the
per-CLI integration work (auth, sandbox policy, exit-code mapping)
needs a concrete asker. The new docs page tells would-be integrators
the contract any such lane must satisfy.

Refs NousResearch#19931
jsboige pushed a commit to jsboige/hermes-agent that referenced this pull request May 14, 2026
Closes the architectural-pin part of NousResearch#19931. Most of what that issue
asked for is already implemented (logs under kanban root, env-pinned
workspace, dispatcher routing of unknown assignees, lifecycle
ownership, structured handoff conventions). What was missing:

1. A written contract integrators can point at when adding a new
   worker lane shape, and
2. The "code-changing workers should not auto-promote success to
   done" convention.

This commit ships both as docs+convention layered on existing primitives.
No kernel changes — the kanban_complete / kanban_block / kanban_comment
surfaces already support the review-required pattern; we just hadn't
written it down or made it visible to workers.

Changes:

- `agent/prompt_builder.py::KANBAN_GUIDANCE`: append the review-required
  exception to step 5 of the lifecycle. Workers get the cue
  auto-injected into their system prompt — drop structured metadata
  into a kanban_comment first, then end with
  kanban_block(reason="review-required: <summary>") instead of
  kanban_complete when the work needs review. Total prompt size went
  from ~3000 to ~3275 chars; well under the 4096 budget enforced by
  test_kanban_guidance_size.

- `skills/devops/kanban-worker/SKILL.md`: add a worked example to the
  existing "Good summary + metadata shapes" section between the
  Coding-task and Research-task examples. Same shape as the others
  (kanban_comment with structured handoff JSON, then kanban_block with
  the human-readable reason). Plus a one-line guide on when to use
  kanban_complete vs the review-required pattern.

- `website/docs/user-guide/features/kanban-worker-lanes.md` (new): the
  integrator-facing contract. Covers the hierarchy, the three things
  every lane must provide (assignee, spawn mechanism, lifecycle
  terminator), the env vars the dispatcher injects, the
  review-required convention, the failure modes the kernel handles
  for free, and an explicit "external CLI worker lane" deferred-
  pending-concrete-asker section that links to NousResearch#19931 and NousResearch#19924.

- `website/sidebars.ts`: link the new page under user-guide/features.

The "specialist worker lanes for external CLI tools (Codex / Claude
Code / OpenCode)" runner is NOT shipped here. The dispatcher's
spawn_fn parameter already supports plugin-shaped extension; the
per-CLI integration work (auth, sandbox policy, exit-code mapping)
needs a concrete asker. The new docs page tells would-be integrators
the contract any such lane must satisfy.

Refs NousResearch#19931
AlexFoxD pushed a commit to AlexFoxD/hermes-agent that referenced this pull request May 21, 2026
Closes the architectural-pin part of NousResearch#19931. Most of what that issue
asked for is already implemented (logs under kanban root, env-pinned
workspace, dispatcher routing of unknown assignees, lifecycle
ownership, structured handoff conventions). What was missing:

1. A written contract integrators can point at when adding a new
   worker lane shape, and
2. The "code-changing workers should not auto-promote success to
   done" convention.

This commit ships both as docs+convention layered on existing primitives.
No kernel changes — the kanban_complete / kanban_block / kanban_comment
surfaces already support the review-required pattern; we just hadn't
written it down or made it visible to workers.

Changes:

- `agent/prompt_builder.py::KANBAN_GUIDANCE`: append the review-required
  exception to step 5 of the lifecycle. Workers get the cue
  auto-injected into their system prompt — drop structured metadata
  into a kanban_comment first, then end with
  kanban_block(reason="review-required: <summary>") instead of
  kanban_complete when the work needs review. Total prompt size went
  from ~3000 to ~3275 chars; well under the 4096 budget enforced by
  test_kanban_guidance_size.

- `skills/devops/kanban-worker/SKILL.md`: add a worked example to the
  existing "Good summary + metadata shapes" section between the
  Coding-task and Research-task examples. Same shape as the others
  (kanban_comment with structured handoff JSON, then kanban_block with
  the human-readable reason). Plus a one-line guide on when to use
  kanban_complete vs the review-required pattern.

- `website/docs/user-guide/features/kanban-worker-lanes.md` (new): the
  integrator-facing contract. Covers the hierarchy, the three things
  every lane must provide (assignee, spawn mechanism, lifecycle
  terminator), the env vars the dispatcher injects, the
  review-required convention, the failure modes the kernel handles
  for free, and an explicit "external CLI worker lane" deferred-
  pending-concrete-asker section that links to NousResearch#19931 and NousResearch#19924.

- `website/sidebars.ts`: link the new page under user-guide/features.

The "specialist worker lanes for external CLI tools (Codex / Claude
Code / OpenCode)" runner is NOT shipped here. The dispatcher's
spawn_fn parameter already supports plugin-shaped extension; the
per-CLI integration work (auth, sandbox policy, exit-code mapping)
needs a concrete asker. The new docs page tells would-be integrators
the contract any such lane must satisfy.

Refs NousResearch#19931
gweeteve pushed a commit to gweeteve/hermes-agent that referenced this pull request Jun 2, 2026
Closes the architectural-pin part of NousResearch#19931. Most of what that issue
asked for is already implemented (logs under kanban root, env-pinned
workspace, dispatcher routing of unknown assignees, lifecycle
ownership, structured handoff conventions). What was missing:

1. A written contract integrators can point at when adding a new
   worker lane shape, and
2. The "code-changing workers should not auto-promote success to
   done" convention.

This commit ships both as docs+convention layered on existing primitives.
No kernel changes — the kanban_complete / kanban_block / kanban_comment
surfaces already support the review-required pattern; we just hadn't
written it down or made it visible to workers.

Changes:

- `agent/prompt_builder.py::KANBAN_GUIDANCE`: append the review-required
  exception to step 5 of the lifecycle. Workers get the cue
  auto-injected into their system prompt — drop structured metadata
  into a kanban_comment first, then end with
  kanban_block(reason="review-required: <summary>") instead of
  kanban_complete when the work needs review. Total prompt size went
  from ~3000 to ~3275 chars; well under the 4096 budget enforced by
  test_kanban_guidance_size.

- `skills/devops/kanban-worker/SKILL.md`: add a worked example to the
  existing "Good summary + metadata shapes" section between the
  Coding-task and Research-task examples. Same shape as the others
  (kanban_comment with structured handoff JSON, then kanban_block with
  the human-readable reason). Plus a one-line guide on when to use
  kanban_complete vs the review-required pattern.

- `website/docs/user-guide/features/kanban-worker-lanes.md` (new): the
  integrator-facing contract. Covers the hierarchy, the three things
  every lane must provide (assignee, spawn mechanism, lifecycle
  terminator), the env vars the dispatcher injects, the
  review-required convention, the failure modes the kernel handles
  for free, and an explicit "external CLI worker lane" deferred-
  pending-concrete-asker section that links to NousResearch#19931 and NousResearch#19924.

- `website/sidebars.ts`: link the new page under user-guide/features.

The "specialist worker lanes for external CLI tools (Codex / Claude
Code / OpenCode)" runner is NOT shipped here. The dispatcher's
spawn_fn parameter already supports plugin-shaped extension; the
per-CLI integration work (auth, sandbox policy, exit-code mapping)
needs a concrete asker. The new docs page tells would-be integrators
the contract any such lane must satisfy.

Refs NousResearch#19931
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/cli CLI entry point, hermes_cli/, setup wizard P3 Low — cosmetic, nice to have type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants