microsoft / microsoft/copilot-brag-sheet

Session-state importer ΓÇö backfill from Copilot CLI session history

Open
#3 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
JavaScript
Stars
10
Forks
3
PR merge metrics
No merged PRs in 30d

Description

Summary

Build a session-state scanner that reads ~/.copilot/session-state/ to backfill brag entries from past Copilot CLI sessions.

What to build

lib/session-state.mjs ΓÇö session-state importer

Scan ~/.copilot/session-state/{id}/ directories and extract:

  • workspace.yaml ΓåÆ summary, CWD, git root, repo, branch, created_at
  • events.jsonl ΓåÆ lifecycle timestamps (session.start, session.resume, session.shutdown), model, token usage, duration

Create session records from discovered data with deduplication.

New tool: backfill_copilot_sessions
Scan my copilot session history and create brag entries for the significant ones.
Enhanced orphan recovery
  • Use events.jsonl timestamps to identify crashed/orphaned sessions
  • Salvage useful metadata into brag entries
  • Generate summaries from session context

Key data sources

Source Path Fields
workspace.yaml ~/.copilot/session-state/{id}/ cwd, summary, git_root, repository, branch, created_at
events.jsonl ~/.copilot/session-state/{id}/ session.start, session.resume, session.shutdown, data.currentModel, data.totalPremiumRequests

Files to create/modify

  • New: lib/session-state.mjs, test/session-state.test.mjs
  • Modify: extension.mjs (new tool), docs/backfill-guide.md

Estimated effort

  • MVP scanner + tool: 2ΓÇô3 days
  • Tests + docs: 1 day

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the existing tool registration in extension.mjs and inspect the documented session-state paths and fields in the issue. Implement and test lib/session-state.mjs against workspace.yaml and events.jsonl, including deduplication and orphan recovery, then run test/session-state.test.mjs. Done means the new backfill_copilot_sessions tool creates useful session records and docs/backfill-guide.md explains the workflow.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
cli, developer-experience, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.