feat: add github-native coordination (epic-* commands + scripts + tests)

Adds a GitHub-native coordination layer on top of ECC:

Commands (7 new slash commands):
- epic-claim, epic-sync, epic-validate, epic-publish
- epic-review, epic-unblock, epic-decompose

Scripts:
- scripts/github-coordination.js  — CLI entry point
- scripts/lib/github-coordination.js  — core library (state machine, gh API wrappers)
- scripts/status.js  — coordination status reporter

Config:
- config/github-native-coordination.json  — labels, review policy, validation gates

Tests:
- tests/lib/github-coordination.test.js  — 15 unit tests for pure functions
- tests/scripts/github-coordination.test.js  — integration/CLI test suite

Registry:
- docs/COMMAND-REGISTRY.json  — adds 7 epic-* entries, totalCommands 84 → 91

No encoding changes, no prp-* modifications, no Windows shims.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Victor Casado 2026-06-11 12:58:11 -04:00
parent fec84fcf19
commit 64470f4307
14 changed files with 2175 additions and 1 deletions

26
commands/epic-claim.md Normal file
View file

@ -0,0 +1,26 @@
---
description: Claim an epic issue, stamp coordination state, and sync local ownership.
---
# /epic-claim
Claim one epic issue as the source of truth for a unit of work.
Use the coordination script:
```bash
node scripts/github-coordination.js claim <issue-number> --repo <owner/repo> --actor <login>
```
What this does:
1. Loads the issue body and coordination block.
2. Marks the epic as claimed in GitHub issue state.
3. Updates labels and the local SQLite cache.
4. Appends an audit comment for the claim.
Compatibility aliases:
- `/orch-add-feature`
- `/orch-change-feature`
- `/prp-implement`

View file

@ -0,0 +1,23 @@
---
description: Break an epic into task children without creating task branches.
---
# /epic-decompose
Reconcile the task breakdown for one epic issue.
```bash
node scripts/github-coordination.js decompose <issue-number> --repo <owner/repo>
```
What this does:
1. Reads the epic issue body for task checklists and dependency references.
2. Stores the decomposition in the coordination block.
3. Leaves task branches out of the workflow.
4. Appends a concise audit comment.
Compatibility aliases:
- `/plan`
- `/prp-plan`

23
commands/epic-publish.md Normal file
View file

@ -0,0 +1,23 @@
---
description: Publish a validated epic update back to the issue and local cache.
---
# /epic-publish
Publish a validated coordination update to GitHub.
```bash
node scripts/github-coordination.js publish <issue-number> --repo <owner/repo>
```
What this does:
1. Re-validates the epic before publishing.
2. Updates the coordination block in the issue body.
3. Appends a concise publish comment.
4. Records the final local snapshot.
Compatibility aliases:
- `/pr`
- `/prp-pr`

23
commands/epic-review.md Normal file
View file

@ -0,0 +1,23 @@
---
description: Mark epic review requested, approved, or changes requested.
---
# /epic-review
Coordinate review state for an epic issue.
```bash
node scripts/github-coordination.js review <issue-number> --repo <owner/repo> --review approved
```
What this does:
1. Updates the review state in the coordination block.
2. Syncs review labels to GitHub.
3. Records the review outcome in an audit comment.
4. Keeps the local cache aligned with the issue body.
Compatibility aliases:
- `/review-pr`
- `/code-review`

23
commands/epic-sync.md Normal file
View file

@ -0,0 +1,23 @@
---
description: Sync epic issue bodies, labels, and local coordination snapshots from GitHub.
---
# /epic-sync
Run a deterministic sync for epic issues.
```bash
node scripts/github-coordination.js sync --repo <owner/repo>
```
What this does:
1. Reads issue bodies as the canonical epic state.
2. Reconciles the coordination block with labels.
3. Writes a fresh local snapshot for each epic issue.
4. Keeps the SQLite cache aligned with GitHub.
Compatibility aliases:
- `/projects`
- `/work-items sync-github`

22
commands/epic-unblock.md Normal file
View file

@ -0,0 +1,22 @@
---
description: Sweep blocked epic issues and reopen anything whose dependencies are closed.
---
# /epic-unblock
Sweep blocked epics whose declared dependencies are complete.
```bash
node scripts/github-coordination.js unblock --repo <owner/repo>
```
What this does:
1. Scans epic issues in the repository.
2. Checks each blocked epic's dependency list.
3. Moves fully unblocked epics to ready.
4. Updates labels, comments, and local snapshots.
Compatibility aliases:
- `/loop-status`

22
commands/epic-validate.md Normal file
View file

@ -0,0 +1,22 @@
---
description: Validate epic readiness, dependencies, and coordination policy.
---
# /epic-validate
Validate a single epic issue before publishing or review handoff.
```bash
node scripts/github-coordination.js validate <issue-number> --repo <owner/repo>
```
What this checks:
1. Coordination state exists and is parseable.
2. Validation state is satisfied by policy.
3. Declared dependencies are closed.
4. The epic is ready for the next workflow stage.
Compatibility aliases:
- `/quality-gate`