Skip to content

feat(agent): label sessions with the refined list of 45 activities - #275

Merged
tob71 merged 5 commits into
mainfrom
refined-activity-list
Dec 3, 2026
Merged

tob71 merged 5 commits into
mainfrom
refined-activity-list

Conversation

@tob71

@tob71 tob71 commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor

What

The labeller now uses a refined list of 45 product-management activities instead of 27 research activities plus 6 general types.

  • List: common.json holds 45 activities in 10 groups, each with a definition and example tasks for the model. The 6 research groups keep the frequency "Once"; the 4 new groups (Product delivery, Communication and alignment, People and self, Outside PM work) are "Recurring". The page still gets only name, group and frequency.
  • General types removed: TYPES is gone. Meetings, Hiring and Development are now in the list. Planning, Documentation and Communication are no longer activities, so they read as Not classified. Uploaded chats and e-mails now have no activity and count as Not classified; transcripts stay Meetings.
  • Labelling instruction:
    • A new task starts only for a different result or object.
    • A report or deck belongs to the activity it is about.
    • Stories are Requirements writing, and a message is placed by who it is for.
    • Meetings is used only when nothing more specific fits, and work that fits nothing is Other.
    • A private, non-work session still gets no task.
  • Several tasks per activity: the one-task-per-activity filter is removed.
  • Relabel: each answer in labels.json now records the list version it was made under. A session of the last 30 days is asked again when the labeller's answer is from an earlier list, or when the setup's label has an activity the list no longer holds; the new answer replaces the old label. This is checked on every pass, so nothing is spent once, and findings.json is never edited. Older labels stay.
  • Session excerpt:
    • The text a person types after a slash command (<command-args>) is now kept as their own words; only the command's name and message are left out. Before, a session started from a skill could lose its whole request and was skipped.
    • The hint for a long session no longer asks for each task to have its own activity, and gives no task count: one task per distinct result or object, and several tasks can share an activity.
  • Instruction, task boundaries: material made for the same result stays in its task (a job ad and the interview questions for the role, an interview guide and its question list), and a passing remark about timing or priority is neither a task nor Roadmap planning.
  • Definitions of close research activities: 10 definitions now say which neighbour they are not: ROI estimation and Business case modeling, Jobs-to-be-done analysis, Pain point mapping and Customer interviews, Existing solution evaluation, Customer prioritization and Roadmap planning, Differentiation analysis and Competitive landscape review.

Tests

  • New labeller tests cover asking again for earlier answers and dead setup labels (with and without labels.json), a paused collection that asks later, an answer under this list that is kept, and several tasks of one activity; a findings test covers a label replacing only a dead setup label.
  • The eval floors are kept; their comments say they are carried over from the earlier list and not measured again.
  • The eval set covers all 45 activities (12 with two cases, Development with three), plus 5 unclear cases and 6 pairs of close activities.
  • Old activity names are replaced in the agent tests.
  • A new excerpt test covers the text after a slash command; the long-session test checks the hint no longer pairs each task with its own activity.
  • cargo test, cargo clippy --all-targets -D warnings, cargo fmt --check, tsc --noEmit, eslint and the vitest unit tests pass. The Electron specs were not run locally.

@tob71
tob71 requested a review from nikbackdev December 3, 2026 15:32
@coderabbitai

coderabbitai Bot commented Dec 3, 2026 •

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 519c71e7-972c-4d90-90f7-e6eca298e9f9
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@tob71
tob71 requested a review from IgorMGitHub December 3, 2026 15:33

@IgorMGitHub IgorMGitHub left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The list and the eval set check out exactly: 10 groups, 45 activities, all names distinct, and the set of expect values in eval/activities.json is the same set as the activities — every one covered, none expecting a name the model cannot produce. "57 cases, one for each activity" is loose wording for something better than it claims. The old names survive outside agent/ only as free text in fixtures, and both the TypeScript and the Kotlin side hold activity as a plain string, so nothing there expects the old shape.

Three findings below, and one that has no line in the diff to sit on:

PRECISION_FLOOR and RECALL_FLOOR in agent/tests/activity_eval.rs are unchanged, and their comments still say "about two labels under the lowest of three runs (0.878 to 0.917)" and "(0.935 to 0.957)". Those runs were over 27 list names plus 6 TYPES, against the old instruction. This diff replaces both with 45 much finer names — Status reporting against Delivery follow-up against Stakeholder alignment and decisions — so the comments describe measurements that no longer exist. The test is #[ignore]d, so nothing will catch the drift. Re-measure, or say in the comment that the floors are carried over and not re-measured.

Comment thread agent/src/activity/label.rs Outdated
state.tasks.retain(|key, _| !recent.contains(key));
state.answered.retain(|key, _| !recent.contains(key));
self.answered.retain(|key| !recent.contains(key));
state.list = LIST_VERSION;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This runs on every path that reaches it, including when recent is empty, and pass then never relabels again. Five reachable ways to spend the one shot and drop nothing:

  • :423 skips a source where collects is false, and collects requires collection_on() — answered && collection.enabled. So while collection is paused, or the first-start question is unanswered, every source is skipped. run calls pass every 5 minutes with no collection guard, the first at once, so the first tick after the update spends it.
  • :426 a transient list_sessions error skips that source and the flag is still set — unlike a write failure at :436/:446, which correctly returns None and retries.
  • read_state answers list: LIST_VERSION for any read error, so a workspace with v1 setup labels in findings.json and no labels.json yet skips the migration. Its doc comment says "nothing is made under an earlier list then", which is false whenever findings.json exists.
  • a clock ahead of real time puts cutoff in the future and empties recent.
  • dashboard_setup::Before::restore writes findings.json back verbatim at agent start, "whatever the state says". A setup run interrupted before the relabel leaves that snapshot behind; after the relabel the next start restores the v1 tasks while labels.json already says list=2, and the two files disagree for ever. restore_run has the "only if the file is still as the run left it" guard; restore does not.

What survives is not inert: Planning, Documentation and Communication no longer resolve through activity_of, so those sessions read as Not classified for ever.

A flag in one file is the wrong mechanism for a migration that spans two files with two owners. Either stamp both files and bump only when every collected source was listed, or drop the one-shot for the stale-name half — the labeller can already tell a dead label from the data it holds, an activity that activity_of no longer resolves, and re-ask on any pass.

Two smaller things in the same place. When relabel answers None the pass aborts with no log line, unlike record's eprintln!, so a workspace that cannot write findings.json leaves the labeller silently idle. And both new tests run with collection fully on and a non-empty recent, so deleting the collects guard leaves the suite green.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in bc81cc4. The one-time switch is gone, and so is the editing of findings.json. Each answer in labels.json now records the LIST_VERSION it was made under, and on every pass a session of the last 30 days is asked again when the labeller's answer is from an earlier list, or when the setup's label holds an activity activity_of no longer resolves (tasks::is_stale). Findings::with_labels lets the labeller's answer replace only such a dead setup label. Nothing is spent once, so paused collection, a failed list_sessions, a missing labels.json, the clock and Before::restore can no longer cost the migration. An answer under the current list that still has no activity of the list is not asked again, so there is no loop. New tests: earlier answers and dead setup labels asked again (with and without labels.json), collection paused then on again, and an answer under this list kept; a findings test covers the merge.

Comment thread agent/src/activity/common.json Outdated
},
{
"name": "Meetings",
"definition": "A meeting with no more specific activity above. For example: attend or run a meeting; write meeting notes; follow up on actions."

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"A meeting with no more specific activity above." Meetings is in group 8 of 10, so Team management, Hiring, Learning and development, Development and Workflow automation all sit below it, and by this wording a 1:1 or an interview is Meetings. chat/setup.rs says the opposite: "Meetings only when no more specific activity fits the meeting." The eval case team-management ("Prepared the 1:1 with a junior PM") sits exactly on the collision.

Say "in the list", not "above" — a positional word does not survive a data file the model is told to read whole. (Other's "above" is harmless only because it is last.)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in bc81cc4: "in the list" instead of "above", for Meetings and for Other too.

Comment thread agent/src/activity/upload.rs Outdated
Self::Transcript => "Meetings",
Self::Chat | Self::Email => "Communication",
Self::Transcript => super::tasks::MEETINGS,
Self::Chat | Self::Email => super::tasks::NO_ACTIVITY,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NO_ACTIVITY is "Not classified", documented as what a report calls the time of a session with no activity given, and activity_key() already produces it when the field is empty. Storing it as the activity makes Forgotten::can_forget refuse the entry — it rejects exactly this name — so a person who uploaded an e-mail can no longer forget that time, where Communication could be forgotten before.

Leave the field empty and let activity_key() word it, or pick a real name: the new list has Customer and partner communication and Other.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in bc81cc4: a chat or an e-mail upload now has an empty activity, and activity_key() words it as Not classified; the upload message says "Not classified" when the activity is empty.

@tob71

tob71 commented Dec 3, 2026

Copy link
Copy Markdown
Contributor Author

On the eval floors: kept as they are. The comments on PRECISION_FLOOR, RECALL_FLOOR and UNCLEAR_FLOOR and the module doc now say they are carried over from the list of 27 activities and 6 types and not measured again for the list of 45 (bc81cc4).

@tob71
tob71 requested a review from IgorMGitHub December 3, 2026 17:50
Tobias added 5 commits December 3, 2026 19:25
Signed-off-by: Tobias <tobias.mayer@constructor.tech>
…ks share an activity, and keep side material in its task

Signed-off-by: Tobias <tobias.mayer@constructor.tech>
Signed-off-by: Tobias <tobias.mayer@constructor.tech>
…leave an upload's activity empty

Signed-off-by: Tobias <tobias.mayer@constructor.tech>
…the Time tracker

Signed-off-by: Tobias <tobias.mayer@constructor.tech>
@tob71
tob71 force-pushed the refined-activity-list branch from bc81cc4 to 3b63444 Compare December 3, 2026 18:32
@tob71
tob71 merged commit e3cc92e into main Dec 3, 2026
10 checks passed
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.

2 participants