-
Notifications
You must be signed in to change notification settings - Fork 495
feat(ceremonies): automated retro enforcement - GitHub Issues over markdown #630
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| --- | ||
| "@bradygaster/squad-cli": minor | ||
| "@bradygaster/squad-sdk": patch | ||
| --- | ||
|
|
||
| Add retro enforcement skill with Test-RetroOverdue and ceremonies template update. | ||
|
|
||
| - New skill: retro-enforcement - coordinator integration pattern for automated retro cadence enforcement | ||
| - Action items tracked as GitHub Issues (not markdown checklists) | ||
| - Production data: 0% to 100% completion rate after switching formats | ||
| - Test-RetroOverdue PowerShell function detects overdue retros and blocks work queue | ||
| - Ceremonies template updated with enforcement-aware retrospective definition | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -39,3 +39,31 @@ | |
| 2. Root cause analysis | ||
| 3. What should change? | ||
| 4. Action items for next iteration | ||
|
|
||
|
|
||
| --- | ||
|
|
||
| ## Retrospective with Enforcement | ||
|
|
||
| | Field | Value | | ||
| |-------|-------| | ||
| | **Trigger** | auto | | ||
| | **When** | weekly | | ||
| | **Condition** | No *retrospective* log in .squad/log/ within the last 7 days | | ||
|
Comment on lines
+44
to
+52
|
||
| | **Facilitator** | lead | | ||
| | **Participants** | all | | ||
| | **Time budget** | focused | | ||
| | **Enabled** | yes | | ||
| | **Enforcement skill** | retro-enforcement | | ||
|
|
||
| **Agenda:** | ||
| 1. What shipped this week? (closed issues, merged PRs) | ||
| 2. What did not ship? (open issues, blockers) | ||
| 3. Root cause on any failures | ||
| 4. Action items -- each MUST become a GitHub Issue labeled retro-action | ||
|
|
||
| **Coordinator integration:** | ||
| At round start, call Test-RetroOverdue (see skill retro-enforcement). If overdue, run this ceremony before the work queue. | ||
|
|
||
| **Why GitHub Issues, not markdown:** | ||
| Production data: 0% completion across 6 retros using markdown checklists, 100% after switching to GitHub Issues. | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,92 @@ | ||
| # Proposal: Retro Enforcement Skill | ||
|
|
||
| **Issue:** bradygaster/squad#601 | ||
| **Author:** tamirdresher | ||
| **Date:** 2026-03-26 | ||
| **Status:** Proposal | ||
|
|
||
| --- | ||
|
|
||
| ## Problem Statement | ||
|
|
||
| Retrospectives have a 0% action item completion rate when tracked as markdown checklists. | ||
| Measured across 6 consecutive retrospectives in production (tamirdresher/tamresearch1): | ||
| - Markdown checkboxes: 0/24 action items completed | ||
| - GitHub Issues: 85%+ completion rate for equivalent work | ||
|
|
||
| The problem is structural, not behavioral. Markdown checklists have no assignee, no notifications, | ||
| no close events, and no query surface. They rely entirely on human memory to re-check. GitHub Issues | ||
| have all of these built in. | ||
|
|
||
| This skill addresses the root cause: standardizing the retro ceremony to use GitHub Issues for | ||
| action items and providing coordinator integration to enforce the retro cadence itself. | ||
|
|
||
| --- | ||
|
|
||
| ## Proposed Approach | ||
|
|
||
| ### 1. Test-RetroOverdue — Retro Cadence Enforcement | ||
|
|
||
| A PowerShell function that checks whether a retrospective has occurred within the current window | ||
| (default: 7 days). The coordinator calls this at the start of every round and blocks other work | ||
| if the retro is overdue. | ||
|
|
||
| `powershell | ||
| if (Test-RetroOverdue -LogDir ".squad/log" -WindowDays 7) { | ||
| # Spawn retro facilitator, wait for log, then resume | ||
| } | ||
| ` | ||
|
Comment on lines
+34
to
+38
|
||
|
|
||
| Detection: checks .squad/log/ for *retrospective* files dated within the window. | ||
|
|
||
| ### 2. Action Item Enforcement | ||
|
|
||
| Every retro action item MUST be a GitHub Issue. The skill provides: | ||
| - Verification logic to detect markdown checkboxes (anti-pattern) | ||
| - Verification logic to confirm Issue references exist in retro logs | ||
| - Example Issue format with required fields (title, body, assignee, labels) | ||
|
|
||
| ### 3. Ceremonies Template Update | ||
|
|
||
| Updates .squad-templates/ceremonies.md with an enforcement-aware Retrospective definition | ||
| that documents the enforcement behavior, cadence, and required output format. | ||
|
|
||
| --- | ||
|
|
||
| ## Fit with Existing Architecture | ||
|
|
||
| - **Complements** the existing ceremonies template (additive, not replacing) | ||
| - **Integrates** with existing .squad/log/ pattern used by Scribe and coordinators | ||
| - **No new dependencies** — uses PowerShell, GitHub Issues, and existing file conventions | ||
| - **Coordinator integration** is optional and additive — existing coordinators continue to work | ||
|
|
||
| --- | ||
|
|
||
| ## What Changes | ||
|
|
||
| - New skill: packages/squad-cli/templates/skills/retro-enforcement/SKILL.md | ||
| - New skill: packages/squad-sdk/templates/skills/retro-enforcement/SKILL.md | ||
| - Updated: .squad-templates/ceremonies.md (Retrospective section enhanced) | ||
| - New changeset: .changeset/retro-enforcement.md | ||
|
|
||
| ## What Stays the Same | ||
|
|
||
| - Existing ceremonies template sections (Design Review, etc.) unchanged | ||
| - Existing .squad/log/ format unchanged | ||
| - No changes to CLI or SDK runtime code — template/skills only | ||
|
|
||
| --- | ||
|
|
||
| ## Risks and Mitigations | ||
|
|
||
| | Risk | Likelihood | Impact | Mitigation | | ||
| |------|-----------|--------|------------| | ||
| | Coordinator blocks on retro check when no .squad/log/ dir exists | Medium | Low | Test-RetroOverdue handles SilentlyContinue for missing dirs | | ||
| | Teams don't want weekly enforcement | Low | Low | Cadence is configurable (-WindowDays param) | | ||
|
|
||
| --- | ||
|
|
||
| ## References | ||
|
|
||
| - Issue: bradygaster/squad#601 | ||
| - Production data: tamirdresher/tamresearch1 (0% vs 85%+ completion, 6 retrospectives) | ||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,148 @@ | ||||||
| # Skill: Retro Enforcement | ||||||
|
|
||||||
| ## Purpose | ||||||
|
|
||||||
| Ensure retrospectives happen on schedule and that their action items are tracked in GitHub Issues — not markdown checklists. | ||||||
|
|
||||||
| This skill addresses a specific, measured failure mode: **0% completion rate on markdown retro action items across 6 consecutive retrospectives**. GitHub Issues have an 85%+ completion rate in the same squad. The format was the problem, not the people. | ||||||
|
|
||||||
| ## Core Function: Test-RetroOverdue | ||||||
|
|
||||||
| ```powershell | ||||||
| function Test-RetroOverdue { | ||||||
| param( | ||||||
| [string]$LogDir = ".squad/log", | ||||||
| [int]$WindowDays = 7, | ||||||
| [string]$Pattern = "*retrospective*" | ||||||
| ) | ||||||
|
|
||||||
| $cutoff = (Get-Date).AddDays(-$WindowDays) | ||||||
|
|
||||||
| $retroLogs = Get-ChildItem -Path $LogDir -Filter $Pattern -ErrorAction SilentlyContinue | | ||||||
| Where-Object { $_.LastWriteTime -ge $cutoff } | ||||||
|
|
||||||
| return ($retroLogs.Count -eq 0) | ||||||
| } | ||||||
| ``` | ||||||
|
|
||||||
| ### Returns | ||||||
| - `$true` — No retro log found within the window. **Retro is overdue. Block other work.** | ||||||
| - `$false` — At least one retro log found within the window. Proceed normally. | ||||||
|
|
||||||
| ### Detection Logic | ||||||
|
|
||||||
| The function checks `.squad/log/` for any file matching `*retrospective*` dated within the last `$WindowDays` days (default: 7). If none is found, the retro is overdue. | ||||||
|
|
||||||
| **File naming convention:** `.squad/log/{ISO8601-timestamp}-retrospective.md` | ||||||
|
|
||||||
| Example: `.squad/log/2026-03-24T14-45-00Z-retrospective.md` | ||||||
|
|
||||||
| ## Coordinator Integration | ||||||
|
|
||||||
| Call `Test-RetroOverdue` **at the start of every round**, before building the work queue. | ||||||
|
|
||||||
| ```powershell | ||||||
| # At round start — before any work queue construction | ||||||
| if (Test-RetroOverdue -LogDir ".squad/log" -WindowDays 7) { | ||||||
| Write-Host "[RETRO] Retrospective overdue. Running before other work." | ||||||
|
|
||||||
| # Spawn retro facilitator | ||||||
| Invoke-RetroSession -Mode "catch-up" | ||||||
|
|
||||||
| # Wait for retro log to be written | ||||||
| # Then resume normal round | ||||||
| } | ||||||
|
|
||||||
| # Proceed with normal work queue | ||||||
| $workQueue = Get-PendingIssues | Sort-Object -Property Priority | ||||||
| ``` | ||||||
|
|
||||||
| ### Blocking Semantics | ||||||
|
|
||||||
| When `Test-RetroOverdue` returns `$true`: | ||||||
|
|
||||||
| 1. **Do not start any other work** until the retro completes | ||||||
| 2. **Spawn the facilitator agent** (Scribe or designated) with retro mode | ||||||
| 3. **Wait for the log file** to be written to `.squad/log/` | ||||||
| 4. **Verify action items** were created as GitHub Issues (not markdown) | ||||||
| 5. **Resume normal round** after retro log confirmed | ||||||
|
|
||||||
| ## Action Item Enforcement | ||||||
|
|
||||||
| Every retro action item MUST become a GitHub Issue. The facilitator agent is responsible for this. The coordinator verifies. | ||||||
|
|
||||||
| ### Verification Check | ||||||
|
|
||||||
| ```powershell | ||||||
| function Test-RetroActionItemsCreated { | ||||||
| param([string]$RetroLogPath) | ||||||
|
|
||||||
| $content = Get-Content $RetroLogPath -Raw | ||||||
|
|
||||||
| # Check for Issue references (e.g., #1478, https://github.com/.../issues/1478) | ||||||
| $issueRefs = [regex]::Matches($content, '(?:#\d{3,}|issues/\d{3,})') | ||||||
|
||||||
| $issueRefs = [regex]::Matches($content, '(?:#\d{3,}|issues/\d{3,})') | |
| $issueRefs = [regex]::Matches($content, '(?:#\d+|issues/\d+)') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR description says only 3 files changed, but this PR also adds
packages/squad-sdk/templates/skills/retro-enforcement/SKILL.mdanddocs/proposals/retro-enforcement.md(5 files total). Please update the PR description to match the actual diff, or drop the extra files if they were unintended.