Skip to content

feat(agents): support WorkBuddy subagent distribution - #826

Merged
jeff-r2026 merged 3 commits into
Tencent:mainfrom
Tremy-wu:feat/workbuddy-agents-support
Sep 25, 2026
Merged

jeff-r2026 merged 3 commits into
Tencent:mainfrom
Tremy-wu:feat/workbuddy-agents-support

Conversation

@Tremy-wu

@Tremy-wu Tremy-wu commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Register WorkBuddy as a supported target for team subagent distribution: team-repo agents/<name>.yaml specs now render to .workbuddy/agents/*.md (Claude-style Markdown + YAML frontmatter) on pull, and local edits reverse back to the canonical spec on push. WorkBuddy already receives skills / rules / docs / hooks / MCP — this closes the last gap in its Team Execution row of the capability matrix.

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature causing existing behavior to change)
  • Documentation only
  • Refactor / internal cleanup

Test Plan

  • npx tsc --noEmit passes
  • npx vitest run passes (see note on Windows baseline below)
  • Added/updated tests for the change
  • Real-CLI end-to-end verification (required for runtime changes)

Real-CLI E2E verification record (2026-09-25, npm run build @ f72b4c1, Windows 11, Node 22.22.2)

Built dist/index.js and drove the real CLI against a local bare-git fixture remote (seed repo with toolPaths.workbuddy.agents: .workbuddy/agents + agents/reviewer.yaml carrying tool_extras.workbuddy.mode: strict):

$ teamai pull --force
(exit 0) ✔ [user] Synced 1 agents
  [PASS] deploys ~/.workbuddy/agents/reviewer.md
  [PASS] frontmatter carries name/description, workbuddy extras flattened (mode: strict)
  [PASS] instructions rendered as markdown body
$ teamai pull --force
  [PASS] idempotent re-pull (byte-identical)

$ teamai push --all --dry-run
(exit 0) Found 1 resource(s) to push: [agents] reviewer (modified)
  [PASS] local edit detected from .workbuddy/agents/reviewer.md
$ teamai push --all
  ✔ Pushed branch teamai/push/e2e/20260925-133614
  [PASS] exactly one teamai/push/* branch on remote
  [PASS] pushed agents/reviewer.yaml carries the local edit
  [PASS] tool_extras.workbuddy.mode preserved; nothing leaked into tool_extras.claude
  (exit 1 only at hosted-PR creation: "Invalid Git repo URL" — environmental, local-path remote cannot host PRs)

$ teamai remove agents reviewer --force
(exit 0) ✔ Removed 1 agents from 2 location(s)
  [PASS] ~/.workbuddy/agents/reviewer.md deleted
  [PASS] agents/reviewer.yaml deleted on the pushed remove branch (PR flow)

ALL CHECKS PASSED. Full harness transcript available on request.

Unit / type

  • New src/__tests__/workbuddy-agents.test.ts (3 tests): tool registration + default agents: '.workbuddy/agents' path, render/reverse round-trip with extras namespaced to tool_extras.workbuddy, and pull → local edit → push → remove through AgentsHandler.
  • Targeted run of all agents-related suites: 96/96 pass (agents, builtin-agents, copilot-agents, doctor-agents-delivery, pull-agents-cleanup, pull-agents-role-filter, workbuddy-agents).
  • Windows full-suite note: 48 test files fail identically on unmodified main (environment issues — symlink privilege, POSIX permission bits, PID/cwd assumptions). A stash-based A/B run confirms this change introduces zero new failures; on Linux/macOS CI the full suite should be green.

Related Issues

N/A

Notes for Reviewers

  • Establishes the .workbuddy/agents directory convention; product-side consumption of that directory in WorkBuddy has not landed yet — per review feedback, the capability-matrix cell for WorkBuddy/agents stays — (unsupported) in all five README locales until product-side consumption exists and is verified. The CLI-side registration ships as a latent capability.
  • Mirrors the existing codebuddy pattern: dedicated renderForWorkbuddy / reverseFromWorkbuddy, so private fields round-trip under tool_extras.workbuddy instead of leaking into the claude namespace.
  • LEGACY_MD_TOOLS intentionally untouched — the new tool only ships the YAML-spec path.

Register workbuddy as a supported tool for team agent sync:

- agent-format: add 'workbuddy' to ToolName/ALL_SUPPORTED_TOOLS,
  AgentSpec.tool_extras, and renderForTool; render/reverse in the
  Claude-style Markdown+frontmatter format with extras namespaced to
  tool_extras.workbuddy (mirroring the codebuddy pattern)
- types: default toolPaths.workbuddy gains agents: '.workbuddy/agents'
- agents: reverseByTool dispatches workbuddy to reverseFromWorkbuddy
- README (en/zh-CN/ja/ko/th): flip WorkBuddy agents cell to supported
- tests: workbuddy-agents.test.ts covers registration, render/reverse
  round-trip, and pull/push/remove via AgentsHandler
@jeff-r2026 jeff-r2026 self-assigned this Sep 25, 2026
@jeff-r2026
jeff-r2026 self-requested a review September 25, 2026 05:04
@github-actions

Copy link
Copy Markdown
  • [P1 blocking] README.md:130 marks WorkBuddy agents as supported, but the PR description explicitly states that WorkBuddy does not yet consume .workbuddy/agents. A successful teamai pull therefore creates files that WorkBuddy cannot discover or invoke. Keep the capability unsupported until product-side consumption exists and is verified.
  • [P1 blocking] The PR description lacks the required real-CLI verification record. This changes runtime pull/push/remove behavior; direct AgentsHandler Vitest coverage, type checking, and unit-suite results do not satisfy the repository’s explicit requirement for one representative end-to-end CLI run.

…side consumption lands

WorkBuddy does not yet consume .workbuddy/agents, so advertising the
capability as supported would make 'teamai pull' produce files the
product cannot discover. Flip the agents cell back to unsupported in
all five README locales; the CLI-side registration stays in place as a
latent capability and the cell flips back once consumption is verified.

Addresses review feedback on #826.
@Tremy-wu

Copy link
Copy Markdown
Contributor Author

Both P1 items addressed in bda478e:

  1. Capability matrix — WorkBuddy/agents cell flipped back to — (unsupported) in all five README locales (en / zh-CN / ja / ko / th). The CLI-side registration stays as a latent capability; the cell flips to ✓ only after WorkBuddy product-side consumption of .workbuddy/agents lands and is verified.

  2. Real-CLI verification record — added to the PR description (Test Plan → "Real-CLI E2E verification record"): built dist/index.js and drove the real CLI through pull --force (deploy + frontmatter extras + idempotent re-pull) → push --all --dry-run / push --all (edit round-trip, tool_extras.workbuddy preserved, no leak into claude) → remove agents reviewer --force (local file + team-repo spec deleted via PR branch), against a local bare-git fixture remote. ALL CHECKS PASSED. The only non-zero exit is hosted-PR creation against a local-path remote ("Invalid Git repo URL"), which is environmental — the push/remove branches themselves are created correctly.

@github-actions

Copy link
Copy Markdown
  • [P1 blocking] The PR description still lacks the required real-CLI verification record. This changes runtime pull, push, and remove behavior; the AgentsHandler Vitest test, type check, and unit-suite results do not satisfy the repository’s explicit end-to-end verification requirement.
  • Resolved: the README capability matrix now keeps WorkBuddy agents marked unsupported, addressing the earlier documentation finding.

@Tremy-wu

Copy link
Copy Markdown
Contributor Author

Follow-up on the 05:40:57Z re-review: the real-CLI E2E verification record was added to the PR description at 05:40:24Z (Test Plan → "Real-CLI E2E verification record") — 33s before that review posted, so the finding was based on a stale description snapshot. The record covers one representative end-to-end run of the built CLI: pull --force → push --all --dry-run/push --all → remove agents reviewer --force against a local bare-git fixture, all checks passed. Pushed an empty commit to retrigger the review against the current description.

@github-actions

Copy link
Copy Markdown

No findings.

  • Resolved: All README capability matrices keep WorkBuddy agents marked unsupported.
  • Resolved: The PR description now includes a representative real-CLI pull/push/remove verification record.
  • Per instruction, I reviewed the diff without running or building PR code.

@SaulMoro

Copy link
Copy Markdown
Collaborator

WorkBuddy already reads ~/.workbuddy/agents/*.md, so the note that product-side consumption "has not landed yet" is outdated.

WorkBuddy runs its bundled CodeBuddy CLI with ~/.workbuddy as the config directory, and CodeBuddy loads Claude-style sub-agents from <config>/agents/ (CodeBuddy docs). A third-party integration confirmed it on WorkBuddy 5.1.7 (agency-orchestrator).

Next steps:

  1. Update the PR description to drop that note and link this evidence.
  2. Revert bda478e so all five READMEs show ✓ for WorkBuddy agents. The generic Agents section in the usage guide already covers this, so no new section is needed.

@jeff-r2026
jeff-r2026 merged commit 7d16175 into Tencent:main Sep 25, 2026
16 of 17 checks passed
Walternater pushed a commit to Walternater/teamai-cli that referenced this pull request Nov 2, 2026
* feat(agents): support WorkBuddy subagent distribution

Register workbuddy as a supported tool for team agent sync:

- agent-format: add 'workbuddy' to ToolName/ALL_SUPPORTED_TOOLS,
  AgentSpec.tool_extras, and renderForTool; render/reverse in the
  Claude-style Markdown+frontmatter format with extras namespaced to
  tool_extras.workbuddy (mirroring the codebuddy pattern)
- types: default toolPaths.workbuddy gains agents: '.workbuddy/agents'
- agents: reverseByTool dispatches workbuddy to reverseFromWorkbuddy
- README (en/zh-CN/ja/ko/th): flip WorkBuddy agents cell to supported
- tests: workbuddy-agents.test.ts covers registration, render/reverse
  round-trip, and pull/push/remove via AgentsHandler

* docs(readme): keep WorkBuddy agents marked unsupported until product-side consumption lands

WorkBuddy does not yet consume .workbuddy/agents, so advertising the
capability as supported would make 'teamai pull' produce files the
product cannot discover. Flip the agents cell back to unsupported in
all five README locales; the CLI-side registration stays in place as a
latent capability and the cell flips back once consumption is verified.

Addresses review feedback on Tencent#826.

* chore: retrigger review (no changes)
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.

3 participants