You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"description": "Auto-track AI coding sessions into a structured work impact log. Local-first, MCP-conformant. Cross-engine: Claude Code, Copilot CLI, Codex CLI, Cursor, Agency.",
|[`extension.mjs`](extension.mjs)| The only file that imports `@github/copilot-sdk/extension`. Wires hooks and tools to `lib/*`. **All Copilot-specific glue lives here and nowhere else.**|
81
+
|[`mcp-server.mjs`](mcp-server.mjs)| MCP stdio server exposing all three tools. Uses `@modelcontextprotocol/sdk` + `zod`. Works with any MCP-compatible host. |
82
+
|[`hooks/post-tool-use.mjs`](hooks/post-tool-use.mjs)| Agency PostToolUse hook. Classifies tool calls via `lib/heuristics.mjs`, returns classification to host via stdout. **Phase 1: classification only, no persistence.**|
69
83
|[`bin/install.mjs`](bin/install.mjs)|`npm i -g copilot-brag-sheet && copilot-brag-sheet` — copies package files into `~/.copilot/extensions/` and runs setup. |
@@ -347,8 +362,8 @@ Until then, the `_npmUser` is whoever holds the `NPM_TOKEN`, not
347
362
|**npm**| ✅ live (`copilot-brag-sheet`) |`npm i -g copilot-brag-sheet && copilot-brag-sheet` runs `bin/install.mjs`. |
348
363
|**`install.sh` / `install.ps1`**| ✅ live | One-line curl-pipe-bash from `raw.githubusercontent.com/...`. CI-tested on PS 5.1 + pwsh 7 + bash. |
349
364
|**awesome-copilot skill**| ✅ live |[`SKILL.md`](skills/brag-sheet/SKILL.md) is mirrored in [github/awesome-copilot](https://github.com/github/awesome-copilot) (PR #1428). The skill is the prompt; this repo is the prompt **plus** the deterministic capture. |
350
-
|**Claude Code plugin**|🟡 planned | Tracked in [`docs/cross-engine-spec.md`](docs/cross-engine-spec.md). Will reuse `lib/*` unchanged via a thin Claude adapter. |
351
-
|**MCP server**|🟡 planned|`mcp-server.mjs`will expose the same three tools to any MCP-compatible host (Cursor, VS Code, Codex, Copilot CLI). |
365
+
|**Claude Code plugin**|✅ partial (tools: v1.1; auto-tracking: Phase 2) | Tracked in [`docs/cross-engine-spec.md`](docs/cross-engine-spec.md). MCP tools work fully; auto-tracking hooks are classification-only (persistence in Phase 2). |
366
+
|**MCP server**|✅ live|`mcp-server.mjs`exposes all three tools to any MCP-compatible host (Cursor, VS Code, Codex, Copilot CLI) via `copilot-brag-sheet-mcp` bin. |
352
367
|**`copilot plugin install`**| 🚫 blocked upstream | This is a `joinSession()` extension, not an MCP plugin — needs [github/copilot-cli#3023](https://github.com/github/copilot-cli/issues/3023). Don't try to register it under `~/.copilot/plugins/`. |
353
368
354
369
Don't add new distribution channels (e.g. Homebrew, scoop, winget)
@@ -371,6 +386,11 @@ proving distribution conversion before fanning out further.
371
386
|`lib/records.mjs`| Record factories, `sanitize`, `addFileToRecord`. | Changing the record schema (and read §10 first). |
372
387
|`lib/render.mjs`| Records → Markdown. Reserved markers live here. | Changing the work-log Markdown layout. |
373
388
|`lib/git-backup.mjs`| Optional git init/commit/push of data dir. | Adding remote types, fixing git edge cases. |
389
+
|`mcp-server.mjs`| MCP stdio server (3 tools). Only file that imports `@modelcontextprotocol/sdk` + `zod`. | Adding an MCP tool or changing protocol behavior. |
390
+
|`agency.json`| Agency governance manifest (layer 4, developer-tools). **No `version` field** — `package.json` is source of truth. | Changing Agency category, engines, or governance metadata. |
391
+
|`.mcp.json`| Standalone MCP server config for Agency hosts. | Changing MCP server args or transport. |
392
+
|`hooks/hooks.json`| Agency hook declarations (PostToolUse). | Adding a hook event (e.g. SessionStart, SessionEnd for Phase 2). |
Copy file name to clipboardExpand all lines: CHANGELOG.md
+6Lines changed: 6 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/), and this
6
6
7
7
## [Unreleased]
8
8
9
+
### Added
10
+
11
+
-**Agency plugin manifests** — `agency.json` (governance manifest), `.mcp.json` (standalone MCP config), and `hooks/hooks.json` (PostToolUse hook declaration) enable installation via `agency plugin install`. The PostToolUse hook classifies tool calls using `lib/heuristics.mjs` and returns classification data to the host. **Phase 1: classification only; session persistence is deferred to Phase 2.**
12
+
-**`hooks/post-tool-use.mjs`** — Agency PostToolUse hook script. Reads JSON from stdin, classifies file edits / PR creation / git actions, writes JSON response to stdout. Stateless subprocess — each invocation is independent.
13
+
9
14
### Changed
10
15
11
16
-**Extracted `lib/heuristics.mjs`** — tool classification sets, extraction helpers (`extractPrInfo`, `detectShellGitAction`), brag keyword detection (`isBragRequest`), and composite `classifyToolUse()` are now importable from any entry point. `extension.mjs` imports from this module instead of defining them inline.
@@ -17,6 +22,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/), and this
17
22
### Fixed
18
23
19
24
-**git config fallback null guard** — `extension.mjs` now applies the same `?? { enabled: false, push: false }` guard as `mcp-server.mjs`, preventing a potential NPE when `config.git` is undefined.
25
+
-**Empty session summaries in work-log** — `formatSessionRow` now falls back to `taskDescription` (captured from the user's first prompt) when `summary` is absent. Previously sessions without a host-provided `finalMessage` rendered as blank rows in the session activity log.
|**MCP hosts** (Claude, Cursor, VS Code) | ✅ Full | ⚠️ Phase 2 | Beta |
61
+
|**Agency**| ✅ Full | ⚠️ Phase 2 | Beta |
62
+
63
+
**MCP / Agency users:** The three tools (`save_to_brag_sheet`, `review_brag_sheet`, `generate_work_log`) work fully. Automatic session tracking (files edited, PRs created, git actions) requires the Copilot CLI `joinSession()` runtime and is not yet available in other hosts. For now, say `"brag — <accomplishment>"` to capture work manually.
64
+
65
+
**Copilot CLI users:** Full automatic tracking works today — no action needed.
66
+
55
67
### When the agent will use this
56
68
57
69
The agent picks up these tools when you say (anything close to) one of:
| PostToolUse hook (persistence) | ⚠️ Phase 2 | Classification data is returned to host but not accumulated on disk |
17
+
| SessionStart / SessionEnd hooks | ⚠️ Phase 2 | Needed for file-based session record lifecycle |
18
+
19
+
## Phase 2 Design Invariants
20
+
21
+
These invariants are locked now to ensure Phase 2 is a non-breaking addition:
22
+
23
+
1.**Hooks are stateless subprocesses.** All cross-invocation state goes through `lib/storage.mjs` (atomic writes + `withFileLock`).
24
+
2.**Stdout is the hook response channel.** Same rule as `extension.mjs` §10.5. Debug → stderr, gated on `BRAG_SHEET_DEBUG=1`.
25
+
3.**Hook failures must not break the host session.** Always emit valid JSON, never throw.
26
+
4.**`classification` field is provisional** until Phase 2 stabilizes the persistence story. Consumers depend on it at their own risk.
27
+
5.**Session-key strategy is TBD.** Will be resolved when SessionStart hook is added — likely minted by SessionStart and exported via env var or sidecar file for PostToolUse to read.
28
+
6.**Phase 2 additions are non-breaking:** new hooks (`SessionStart`, `SessionEnd`) and disk I/O inside `PostToolUse`. The stdout response shape grows, never shrinks.
0 commit comments