Skip to content

Project Command Center — Layer 1 (registry + CLI leader) — v1.9.0-rc.1 - #78

Merged
Ryfter merged 8 commits into
masterfrom
feature/project-command-center
Jul 5, 2026
Merged

Project Command Center — Layer 1 (registry + CLI leader) — v1.9.0-rc.1#78
Ryfter merged 8 commits into
masterfrom
feature/project-command-center

Conversation

@Ryfter

@Ryfter Ryfter commented Jul 5, 2026

Copy link
Copy Markdown
Owner

Baton Project Command Center — Layer 1 (v1.9.0-rc.1)

Makes Baton the single front door for every project under a D:\dev home base. Launch Baton in D:\dev, then /baton:go --whimsicalcarving <goal> resolves the name → that project's folder and runs the existing Conductor there; /baton:project list shows a live Active / Inactive / Archived roster; sessions capture a per-project resume pointer automatically.

Spec: docs/superpowers/specs/2026-07-04-baton-project-command-center-design.md (d076). Plan: docs/superpowers/plans/2026-07-04-baton-project-command-center.md.

What's in it

  • Neutral session-marker contract (session-markers-lib.ps1) — active-project detection via $BATON_HOME/sessions/*.json ({agent,session_id,cwd,started_at}), TTL age-out, fully fail-open.
  • Scan-seeded registry (registry-lib.ps1) — scans D:\dev (project = has .git or CHARTER.md), folds the scan over start-lib's existing project.json records (no duplicate store), and resolves a project name → folder. Registry owns blurbs / archived / hidden; scan owns discovery.
  • Lifecycle — active (live session in folder) / inactive (registered, no session; may be [resumable]) / archived (manual).
  • Resume — SessionEnd captures an agent-tagged resume pointer ({agent,last_session_id,last_ended_at}); the CLI surfaces claude --resume <id>, resolved per-agent.
  • Claude adapter hooksbaton-session-start.ps1 (stamp marker) + baton-session-stop.ps1 (clear + capture resume); both always exit 0, registered in hooks.json (SessionStart + new SessionEnd).
  • fleet-go.ps1 retargeting--project/--slug resolves + Push-Location; no---project path byte-for-byte unchanged.
  • /baton:project — registry admin (list [--json] | archive | unarchive | hide | set-blurb).
  • Model-agnostic — neutral core (libs + file contracts) with thin per-harness adapters; Claude adapter ships, Codex contract is defined (AGENTS.md) as a documented follow-on. Layer 2 (dashboard render + Go-via-broker) is a separate future spec.

Quality

  • Suites all green: session-markers 9/9, registry 21/21, hooks 8/8, fleet-go-retarget 3/3 + conductor 88/88 (no-regression on the no---project path), fleet-project 7/7, bootstrap 58/58 (+3 deploy asserts, the v1.8.0 coach-lib omission lesson).
  • Built subagent-driven, streamlined ceremony: haiku transcription tier (T1–4, 6, 7), sonnet for the fleet-go integration (T5), opus whole-branch review.
  • Opus review: READY TO MERGE, 0 Critical. One Important (slug/id match namespace could silently target the wrong folder on a repo-name/folder-name collision) and one Minor (phantom record for non-project cwds) fixed pre-PR (2b0ff31, two-pass slug-then-id + non-project guard, both with covering tests).

Tracked follow-ups (non-blocking, from the review)

  • Admin ops (unarchive/set-blurb) can't resolve a project whose folder was deleted/moved (record still exists).
  • 24h marker TTL with no heartbeat → a genuinely-open session >24h reads Inactive.
  • Codex lifecycle adapter implementation (contract defined here).

Commits: base b1c7b032b0ff31. Please do not auto-merge — awaiting Kevin's word.

Copilot AI review requested due to automatic review settings July 5, 2026 04:43

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Introduces “Project Command Center — Layer 1” to make Baton a single entry point for working across multiple projects under a D:\dev home base, including a neutral session-marker contract, a scan-seeded registry, and CLIs to list/manage projects and retarget /baton:go to a selected project.

Changes:

  • Added session marker + registry libraries to detect active projects, build an Active/Inactive/Archived roster, and resolve a project slug → folder.
  • Added harness adapter hooks (SessionStart/SessionEnd) and wired them into hooks.json to stamp/clear markers and capture resume pointers.
  • Added /baton:project CLI plus /baton:go --project retargeting, and expanded PowerShell test coverage + bootstrap deployment list.

Reviewed changes

Copilot reviewed 19 out of 19 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
scripts/test-session-markers-lib.ps1 New tests for session marker write/read, TTL age-out, and fail-open behavior.
scripts/test-session-hooks.ps1 New integration tests for SessionStart/SessionEnd hooks and resume pointer capture.
scripts/test-registry-lib.ps1 New tests for scan discovery, blurbs, roster grouping, resolution precedence, and slug/id collisions.
scripts/test-fleet-project.ps1 New tests for /baton:project JSON output and registry mutations (archive/unarchive/set-blurb).
scripts/test-fleet-go-retarget.ps1 New tests for fleet-go.ps1 -Project resolution and unknown-project error handling.
scripts/test-bootstrap.ps1 Adds deployment assertions for new registry/marker libs and fleet-project.
scripts/session-markers-lib.ps1 Adds neutral session marker contract: write/clear markers, enumerate active sessions, and folder-active predicate.
scripts/registry-lib.ps1 Adds scan-seeded project registry (discovery, blurbs, roster lifecycle, slug/id resolution, resume commands).
scripts/hooks/baton-session-stop.ps1 Adds SessionEnd adapter to clear marker and write per-project resume pointers.
scripts/hooks/baton-session-start.ps1 Adds SessionStart adapter to stamp session markers on startup.
scripts/fleet-project.ps1 Adds /baton:project CLI for listing and editing registry fields (archive/unarchive/hide/set-blurb).
scripts/fleet-go.ps1 Adds -Project support to resolve a project and run Conductor from that project’s folder.
scripts/bootstrap.ps1 Ensures new scripts are deployed to $BATON_HOME/scripts during bootstrap.
hooks/hooks.json Wires SessionStart and new SessionEnd hook into the Claude plugin hook configuration.
commands/start.md Documents picking a project from the D:\dev home base and resumable sessions.
commands/project.md Adds documentation for /baton:project usage and registry behavior.
commands/go.md Documents running /baton:go from home base via project slug (--project).
AGENTS.md Documents harness-neutral invocation for roster and starting by slug.
.claude-plugin/plugin.json Bumps plugin version to 1.9.0-rc.1.

Comment on lines +73 to +74
if ($out.Count -eq 0) { return @() }
return ,([object[]]$out.ToArray())
Comment on lines +30 to +34
# Guard: only write resume pointer for actual project folders
if (-not (Test-IsProjectFolder -Folder $cwd)) { exit 0 }

$cleared = Clear-SessionMarker -SessionId $sid
$agent = if ($cleared -and $cleared.agent) { [string]$cleared.agent } else { 'claude' }
@Ryfter
Ryfter merged commit a201668 into master Jul 5, 2026
1 check passed
@Ryfter
Ryfter deleted the feature/project-command-center branch July 5, 2026 04:46
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