chore(release): 0.6.3#7
Conversation
Finalized the GitHub Copilot CLI adapter against a real probe run (CLI 1.0.63); the profile that landed in 0.6.2 was wrong in ways no doc would reveal: - Turn-end is `agentStop`, not PascalCase `Stop` (which never fires) — so every session read as a timeout. Remapped events to agentStop/sessionStart/sessionEnd and dropped the non-existent PreCompact. - Payload keys are camelCase (sessionId/transcriptPath) regardless of event-name casing, so the shared hook relay now reads both camelCase and snake_case. - Probe mode sends its prompt verbatim (not via render_prompt): a content-free turn has no skill name, so a skill-templating prompt_template rendered a missing .../skills//SKILL.md path the agent hunted for until the probe timed out. Also adds the `copilot-events` usage_parser (reads ~/.copilot/session-state/*/events.jsonl, data.modelMetrics.<model>.usage.*, cumulative-per-model) and wires the copilot profile to it (was "none"). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The version bump stamps the canonical bmad-auto-setup/assets/module.yaml, which immediately drifts the gitignored dev-workspace skill forks (.claude/skills, .agents/skills) and fails tests/test_module_skills_sync.py locally until they are re-copied by hand. Add scripts/seed_skills.py (reseed, with --check) and call it from `release.py prepare` right after stamping so the forks track the bump automatically. The forks are gitignored, so nothing here is staged or committed, and an absent tree (CI) is skipped. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
WalkthroughThis PR releases version 0.6.3 with two functional changes: (1) corrects the Copilot adapter by fixing hook event name casing ( ChangesCopilot Adapter Fixes and Token Accounting
Skill Fork Sync Script and Release Integration
0.6.3 Version Bump and Docs
Sequence Diagram(s)sequenceDiagram
rect rgba(173, 216, 230, 0.5)
Note over copilot_CLI,bmad_auto_hook.py: Hook relay (camelCase normalization)
end
copilot_CLI->>bmad_auto_hook.py: stdin payload {sessionId, transcriptPath}
bmad_auto_hook.py->>bmad_auto_hook.py: extract session_id from sessionId fallback chain
bmad_auto_hook.py->>bmad_auto_hook.py: extract transcript_path from transcriptPath fallback chain
bmad_auto_hook.py->>events_json_file: write normalized {session_id, transcript_path}
rect rgba(144, 238, 144, 0.5)
Note over read_usage,events.jsonl: Token accounting (copilot-events)
end
read_usage->>tally_copilot_events: parser == "copilot-events", transcript_path
tally_copilot_events->>events.jsonl: iterate JSONL lines
events.jsonl-->>tally_copilot_events: last data.modelMetrics per model
tally_copilot_events-->>read_usage: TokenUsage (reasoningTokens folded into output_tokens)
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🤖 Augment PR SummarySummary: Prepares the Changes:
Technical Notes: The Copilot usage parser assumes 🤖 Was this summary useful? React with 👍 or 👎 |
| if not fork.exists(): | ||
| return [f"fork missing: {fork.relative_to(ROOT)}"] | ||
| problems: list[str] = [] | ||
| stack = [filecmp.dircmp(canonical, fork)] |
There was a problem hiding this comment.
scripts/seed_skills.py:52 — filecmp.dircmp(canonical, fork) will raise if fork exists but isn’t a directory (e.g., a stray file at that path), which prevents the reseed path from recovering. Consider explicitly treating non-directory forks as drift (and ensuring reseed() can remove them safely) so release.py prepare doesn’t crash on that edge case.
Severity: low
🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@tests/test_seed_skills.py`:
- Line 64: The variable `canonical` in the tuple unpacking from the
`_build_workspace` call at line 64 is unused and triggers the Ruff RUF059 lint
rule. Rename the unused `canonical` variable to `_canonical` (or simply `_`) to
explicitly indicate that the value is intentionally unused and suppress the lint
warning.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 46e419a8-55a2-4e72-89f6-049db5ce3f7b
⛔ Files ignored due to path filters (1)
uv.lockis excluded by!**/*.lock
📒 Files selected for processing (19)
.claude-plugin/marketplace.jsonCHANGELOG.mddocs/adapter-authoring-guide.mdmodule.yamlpyproject.tomlscripts/release.pyscripts/seed_skills.pysrc/automator/__init__.pysrc/automator/adapters/profile.pysrc/automator/data/bmad_auto_hook.pysrc/automator/data/profiles/copilot.tomlsrc/automator/data/skills/bmad-auto-setup/assets/module.yamlsrc/automator/probe.pysrc/automator/tokens.pytests/test_hook_script.pytests/test_install.pytests/test_profile.pytests/test_seed_skills.pytests/test_tokens.py
|
|
||
|
|
||
| def test_reseed_prunes_extra_fork_files(monkeypatch, tmp_path): | ||
| canonical, forks = _build_workspace(monkeypatch, tmp_path, (".claude/skills",)) |
There was a problem hiding this comment.
Fix unused tuple binding flagged by Ruff.
canonical is unused at Line 64, which triggers RUF059. Rename it to _canonical (or _) to make intent explicit and keep lint clean.
Suggested patch
- canonical, forks = _build_workspace(monkeypatch, tmp_path, (".claude/skills",))
+ _canonical, forks = _build_workspace(monkeypatch, tmp_path, (".claude/skills",))📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| canonical, forks = _build_workspace(monkeypatch, tmp_path, (".claude/skills",)) | |
| _canonical, forks = _build_workspace(monkeypatch, tmp_path, (".claude/skills",)) |
🧰 Tools
🪛 Ruff (0.15.17)
[warning] 64-64: Unpacked variable canonical is never used
Prefix it with an underscore or any other dummy variable pattern
(RUF059)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@tests/test_seed_skills.py` at line 64, The variable `canonical` in the tuple
unpacking from the `_build_workspace` call at line 64 is unused and triggers the
Ruff RUF059 lint rule. Rename the unused `canonical` variable to `_canonical`
(or simply `_`) to explicitly indicate that the value is intentionally unused
and suppress the lint warning.
Source: Linters/SAST tools
Release prep for 0.6.3. Auto-publish creates the
v0.6.3tag + GitHub release on merge.Included
agentStop(PascalCaseStopnever fires, so every session read as a timeout), payload keys are camelCase (sessionId/transcriptPath) so the shared relay now reads both casings, and probe mode sends its prompt verbatim so a skill-templatingprompt_templateno longer stalls the turn. Adds thecopilot-eventsusage_parserand wires thecopilotprofile to it.scripts/seed_skills.py(+release.py preparehook) re-copies the gitignored.claude/skills/.agents/skillsforks from canonical after a version bump, sotest_module_skills_sync.pystays green without a manual reseed. Dev-only; not in the CHANGELOG.CHANGELOG (0.6.3)
Fixed
agentStop, not PascalCaseStop; remapped events, dropped the non-existentPreCompact, relay reads camelCase keys, probe sends its prompt verbatim.Added
copilot-eventsusage_parserreads~/.copilot/session-state/*/events.jsonl; thecopilotprofile is wired to it.🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
copilot-eventsparser.Bug Fixes
Documentation
Tests
Chores