feat(client): add plan sync and remote execution #336

Closed
opened 2026-02-22 23:41:23 +00:00 by freemo · 7 comments
Owner

Metadata

  • Commit Message: feat(client): add plan sync and remote execution
  • Branch: feature/m7-post-server

Background

Plan sync supports actions, skills, tools, and project sync with the server. Remote plan execution, apply, and status requests are implemented. Conflict resolution (local wins vs server wins) is configurable with explicit CLI errors on ambiguity.

Acceptance Criteria

  • Sync actions, request remote plan execution/apply/status, and reconcile remote plan IDs.
  • Add conflict resolution policy (local wins vs server wins) with explicit CLI errors on ambiguity.
  • Add plan sync scope flags (--actions/--skills/--tools/--projects) and default to minimal sync.
  • Persist server-side IDs in local metadata for later reconciliation.
  • Add sync summary output (items created/updated/skipped) for CLI display.

Definition of Done

This issue is complete when:

  • All subtasks below are completed and checked off.
  • A Git commit is created where the first line of the commit message matches
    the Commit Message in Metadata exactly, followed by a blank line, then
    additional lines providing relevant details about the implementation. The
    commit body should be appropriate in size for a commit message and relatively
    complete in describing what was done.
  • The commit is pushed to the remote on the branch matching the Branch in
    Metadata exactly.
  • The commit is submitted as a pull request to master, reviewed, and
    merged before this issue is marked done.

Subtasks

  • Sync actions, request remote plan execution/apply/status, and reconcile remote plan IDs.
  • Add conflict resolution policy (local wins vs server wins) with explicit CLI errors on ambiguity.
  • Add plan sync scope flags (--actions/--skills/--tools/--projects) and default to minimal sync.
  • Persist server-side IDs in local metadata for later reconciliation.
  • Add sync summary output (items created/updated/skipped) for CLI display.
  • Add dry-run mode to show what would sync without executing changes.
  • Document sync semantics and conflict handling in docs/reference/server_sync.md.
  • Add examples for agents sync --dry-run outputs.
  • Tests (Behave): Add scenarios for sync conflicts and retry behavior.
  • Tests (Robot): Add mock-server sync tests.
  • Tests (ASV): Add benchmarks/server_sync_bench.py for sync throughput baseline.
  • Verify coverage >=97% via nox -s coverage_report. If coverage is <97% then review the current unit test coverage report at build/coverage.xml and use it to write new Behave based unit tests to improve code coverage. Specifically, write Behave style unit tests that are descriptively named and specifically improves coverage on whichever file has the most uncovered lines by writing tests that will target the uncovered lines in the report. Once that is done rerun nox -s coverage_report to verify all tests pass and coverage is above >=97%. Only mark this as complete once coverage is >=97%, if not repeat this task as many times as is needed until coverage reaches >=97%.
  • Run nox (all default sessions, including benchmark), fix any errors if needed ensuring nox passes across entire code base, do not ignore any failure even if it seems unrelated to this commit, fix it.

Section: ### Section 18: Deferred Work
Status: Open

## Metadata - **Commit Message**: `feat(client): add plan sync and remote execution` - **Branch**: `feature/m7-post-server` ## Background Plan sync supports actions, skills, tools, and project sync with the server. Remote plan execution, apply, and status requests are implemented. Conflict resolution (local wins vs server wins) is configurable with explicit CLI errors on ambiguity. ## Acceptance Criteria - [ ] Sync actions, request remote plan execution/apply/status, and reconcile remote plan IDs. - [ ] Add conflict resolution policy (local wins vs server wins) with explicit CLI errors on ambiguity. - [ ] Add plan sync scope flags (`--actions/--skills/--tools/--projects`) and default to minimal sync. - [ ] Persist server-side IDs in local metadata for later reconciliation. - [ ] Add sync summary output (items created/updated/skipped) for CLI display. ## Definition of Done This issue is complete when: - All subtasks below are completed and checked off. - A Git commit is created where the **first line** of the commit message matches the Commit Message in Metadata exactly, followed by a blank line, then additional lines providing relevant details about the implementation. The commit body should be appropriate in size for a commit message and relatively complete in describing what was done. - The commit is pushed to the remote on the branch matching the **Branch** in Metadata exactly. - The commit is submitted as a **pull request** to `master`, reviewed, and **merged** before this issue is marked done. ## Subtasks - [ ] Sync actions, request remote plan execution/apply/status, and reconcile remote plan IDs. - [ ] Add conflict resolution policy (local wins vs server wins) with explicit CLI errors on ambiguity. - [ ] Add plan sync scope flags (`--actions/--skills/--tools/--projects`) and default to minimal sync. - [ ] Persist server-side IDs in local metadata for later reconciliation. - [ ] Add sync summary output (items created/updated/skipped) for CLI display. - [ ] Add dry-run mode to show what would sync without executing changes. - [ ] Document sync semantics and conflict handling in `docs/reference/server_sync.md`. - [ ] Add examples for `agents sync --dry-run` outputs. - [ ] Tests (Behave): Add scenarios for sync conflicts and retry behavior. - [ ] Tests (Robot): Add mock-server sync tests. - [ ] Tests (ASV): Add `benchmarks/server_sync_bench.py` for sync throughput baseline. - [ ] Verify coverage >=97% via `nox -s coverage_report`. If coverage is <97% then review the current unit test coverage report at `build/coverage.xml` and use it to write new Behave based unit tests to improve code coverage. Specifically, write Behave style unit tests that are descriptively named and specifically improves coverage on whichever file has the most uncovered lines by writing tests that will target the uncovered lines in the report. Once that is done rerun `nox -s coverage_report` to verify all tests pass and coverage is above >=97%. Only mark this as complete once coverage is >=97%, if not repeat this task as many times as is needed until coverage reaches >=97%. - [ ] Run `nox` (all default sessions, including benchmark), fix any errors if needed ensuring nox passes across **entire** code base, do not ignore any failure even if it seems unrelated to this commit, fix it. **Section**: ### Section 18: Deferred Work **Status**: Open
freemo added this to the (deleted) milestone 2026-02-22 23:41:23 +00:00
freemo modified the milestone from (deleted) to v3.6.0 2026-02-23 00:07:05 +00:00
Author
Owner

Expected completion updated (Day 15 rebaseline): Day 49 / 2026-03-29 (previously Day 44 / 2026-03-24)

**Expected completion updated (Day 15 rebaseline):** Day 49 / 2026-03-29 (previously Day 44 / 2026-03-24)
freemo added the due date 2026-03-16 2026-02-23 18:42:00 +00:00
freemo self-assigned this 2026-02-24 21:53:10 +00:00
Author
Owner

Starting implementation of plan sync and remote execution client.

Plan:

  • Create src/cleveragents/client/sync_client.py with PlanSyncClient
  • Implement sync for actions, skills, tools, projects with conflict resolution
  • Remote plan execution/apply/status requests
  • Sync scope flags, dry-run mode, sync summary output
  • Server-side ID persistence in local metadata
  • Add behave, robot, and benchmark tests
Starting implementation of plan sync and remote execution client. Plan: - Create `src/cleveragents/client/sync_client.py` with PlanSyncClient - Implement sync for actions, skills, tools, projects with conflict resolution - Remote plan execution/apply/status requests - Sync scope flags, dry-run mode, sync summary output - Server-side ID persistence in local metadata - Add behave, robot, and benchmark tests
Author
Owner

PM Acknowledgment (Day 31):

Thank you @freemo. PR submitted and tracked.

Status: All server/UI PRs have merge conflicts against current develop (17 PRs merged Days 30-31). Please rebase when ready for review.

Priority: M6 work — continue at current pace. Your velocity is strong (5 merges Day 30).

**PM Acknowledgment (Day 31)**: Thank you @freemo. PR submitted and tracked. **Status**: All server/UI PRs have merge conflicts against current develop (17 PRs merged Days 30-31). Please rebase when ready for review. **Priority**: M6 work — continue at current pace. Your velocity is strong (5 merges Day 30).
Author
Owner

Implementation complete in commit 293678bbef on branch feature/m7-post-server. PR #1111 submitted for review.

All subtasks addressed:

  • Sync actions, skills, tools, projects with configurable scope
  • Conflict resolution (local_wins / server_wins)
  • Remote plan execution, apply, status
  • Server-side ID persistence
  • Sync summary output
  • Dry-run mode
  • Reference documentation
  • Behave scenarios (18 scenarios)
  • Robot Framework smoke tests
  • ASV benchmark
Implementation complete in commit 293678bbeff629caafc6e27c5601845ce35a6be0 on branch `feature/m7-post-server`. PR #1111 submitted for review. All subtasks addressed: - [x] Sync actions, skills, tools, projects with configurable scope - [x] Conflict resolution (local_wins / server_wins) - [x] Remote plan execution, apply, status - [x] Server-side ID persistence - [x] Sync summary output - [x] Dry-run mode - [x] Reference documentation - [x] Behave scenarios (18 scenarios) - [x] Robot Framework smoke tests - [x] ASV benchmark
freemo added reference feature/m7-post-server 2026-03-23 00:21:00 +00:00
Author
Owner

PR #1111 reviewed — changes requested. Three blocking issues remain: (1) merge conflicts with master, (2) two files exceed the 500-line limit, and (3) unclean commit history. See PR #1111 review comment for full details.


Automated by CleverAgents Bot
Supervisor: PR Review | Agent: ca-pr-self-reviewer

PR #1111 reviewed — **changes requested**. Three blocking issues remain: (1) merge conflicts with master, (2) two files exceed the 500-line limit, and (3) unclean commit history. See [PR #1111 review comment](https://git.cleverthis.com/cleveragents/cleveragents-core/pulls/1111#issuecomment-81158) for full details. --- **Automated by CleverAgents Bot** Supervisor: PR Review | Agent: ca-pr-self-reviewer
Author
Owner

PR #1111 has been merged successfully. Issue should now be resolved.


Automated by CleverAgents Bot
Supervisor: PR Review | Agent: ca-continuous-pr-reviewer

PR #1111 has been merged successfully. Issue should now be resolved. --- **Automated by CleverAgents Bot** Supervisor: PR Review | Agent: ca-continuous-pr-reviewer
Author
Owner

PR #1111 has been reviewed and changes requested. Three blocking issues remain (merge conflicts, 2 files over 500-line limit, unclean commit history). The code quality is excellent — once process issues are resolved, the PR is ready to merge.

See PR #1111 comment for full review.


Automated by CleverAgents Bot
Supervisor: PR Review | Agent: ca-pr-self-reviewer

PR #1111 has been reviewed and **changes requested**. Three blocking issues remain (merge conflicts, 2 files over 500-line limit, unclean commit history). The code quality is excellent — once process issues are resolved, the PR is ready to merge. See [PR #1111 comment](https://git.cleverthis.com/cleveragents/cleveragents-core/pulls/1111#issuecomment-109084) for full review. --- **Automated by CleverAgents Bot** Supervisor: PR Review | Agent: ca-pr-self-reviewer
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

2026-03-16

Blocks
#399 Epic: Post-MVP Server & Clients
cleveragents/cleveragents-core
Reference
cleveragents/cleveragents-core#336
No description provided.