Skip to content

Votes stay with the scope they were cast in #787

Description

@SaulMoro

Parent

#752 (item 6)

What to build

Votes stay with the scope they were cast in. Today every scope records into one machine-level votes file per member, and whichever scope syncs next pushes the pending deltas to its own team. It is the same leak usage.jsonl had before #758:

 votes recorded in a session
-  → ~/.teamai/votes/<user>.yaml            (every scope)
-  → pushed by whichever scope syncs next
+  → project: <dataHome>/votes/<user>.yaml
+  → user:    ~/.teamai/user-votes/<user>.yaml
+  → pushed only by that scope

The user scope gets a new directory rather than keeping ~/.teamai/votes/, for the reason user-usage.jsonl exists: what the shared directory holds names no project, and an earlier release writes there again after a rollback. Pending votes left there are not pushed. If the votes format keeps a "reported" baseline, a scope may seed from the shared file with every count marked as reported, so the local vote view keeps its history. Otherwise the shared directory is simply not read.

Local readers follow the same rule: the vote visualisation and recall feedback use the votes of the scope of their cwd.

Acceptance criteria

  • Votes cast in project A never reach the user-scope team, and the other way round.
  • Votes pending in the shared directory before the upgrade are not pushed by any scope.
  • The vote view and recall feedback read and write the current scope's votes.
  • Rolling back to an earlier release and re-upgrading does not push what that release wrote.
  • Verified with the real CLI (Claude; git, gitlab, github providers); data-directory design, usage guide (both languages, if they name the path) and CHANGELOG updated.

Blocked by

None (can start immediately).

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions