Skip to content

refactor: extract shared pre-flight skill for CI detection and local … - #290

Merged
jflowers merged 1 commit into
unbound-force:mainfrom
yvonnedevlinrh:opsx/pre-flight-skill
Jun 24, 2026
Merged

jflowers merged 1 commit into
unbound-force:mainfrom
yvonnedevlinrh:opsx/pre-flight-skill

Conversation

@yvonnedevlinrh

Copy link
Copy Markdown
Contributor

Summary

Extract duplicated CI detection and local tool execution logic from three commands (/review-council, /review-pr, /unleash) into a shared OpenCode skill at .opencode/skills/pre-flight/SKILL.md.

Fixes #175

What Changed

New

  • .opencode/skills/pre-flight/SKILL.md — shared skill providing:
    • CI workflow parsing (discover commands from .github/workflows/*.yml)
    • Local tool detection (config file checks + binary availability)
    • CI coverage matrix generation
    • Two execution policies: hard-gate (stop on failure) and ci-aware (skip CI-verified tools)
    • Standardized result format

Modified

  • /review-council — Phase 1a replaced with skill reference in hard-gate mode
  • /review-pr — Step 4 replaced with skill reference in ci-aware mode
  • /unleash — Step 5 + phase checkpoint replaced with skill reference in hard-gate mode
  • Scaffold copies synced for all modified commands and the new skill
  • scaffold_test.go — added pre-flight/SKILL.md to expectedAssetPaths

OpenSpec Artifacts

  • openspec/changes/pre-flight-skill/ — proposal, design, specs (11 FRs with Given/When/Then), tasks

Spec Review

5 Divisor agents reviewed the spec artifacts. Key findings addressed:

  • Scaffold sync for skill file (added D7 decision, task 3.4)
  • Behavioral expansion acknowledgment (unified detection may discover additional tools — documented as intentional improvement)
  • Workflow extraction boundaries (D8 — only run: steps, skip CI expressions)
  • Missing tool binary handling (skip with warning)

Verification

  • go build ./... — PASS
  • go vet ./... — PASS
  • golangci-lint run — 0 issues
  • TestEmbeddedAssets_MatchSource — PASS
  • TestAssetPaths_MatchExpected — PASS
  • TestCanonicalSources_AreEmbedded — PASS

Follow-up

/agent-brief (L61-70) reads .github/workflows/ for discovery (not execution). A detect-only mode could serve this use case but is tracked separately per issue #175.

…tool execution

Extract duplicated CI detection and local tool execution logic
from /review-council (Phase 1a), /review-pr (Step 4), and
/unleash (Step 5 + phase checkpoint) into a shared skill at
.opencode/skills/pre-flight/SKILL.md.

The skill provides unified CI workflow parsing, local tool
detection with binary availability checks, CI coverage matrix
generation, and two execution policies: hard-gate (stop on
failure) and ci-aware (skip CI-verified tools).

- Create .opencode/skills/pre-flight/SKILL.md
- Update /review-council to reference skill in hard-gate mode
- Update /review-pr to reference skill in ci-aware mode
- Update /unleash to reference skill in hard-gate mode
- Sync all changes to scaffold assets
- Add skill to expectedAssetPaths in scaffold_test.go
- Update TestRunInit_FreshDir expected file count (39 -> 40)

Fixes: unbound-force#175

Assisted-by: OpenCode (claude-opus-4-6)
Signed-off-by: Yvonne Devlin <[email protected]>

@jflowers jflowers left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Review Summary

Clean, well-documented refactoring that extracts duplicated CI detection and local tool execution logic from /review-council, /review-pr, and /unleash into a shared pre-flight skill.

What went well

  • Thorough spec artifacts: 11 FRs with Given/When/Then scenarios, 8 design decisions, 4 risk analyses
  • All scaffold copies verified in sync (drift detection tests pass)
  • Both execution policies (hard-gate, ci-aware) are well-defined with clear consumer mapping
  • Behavioral expansion (unified detection discovering additional tools) is explicitly documented as intentional improvement (D2, R2), not glossed over
  • All 7 acceptance criteria from #175 addressed

Findings

  • [LOW] Behavioral parity for agent instruction changes is inherently unverifiable through code review — depends on author's reported behavioral verification (task 4.3). This is a limitation of instruction-only changes, not a gap in the PR.

Forward-looking note

I commented on #177 noting that Phase 2 (CI causality analysis for /review-council) will need to extend the pre-flight skill with a third execution policy or modify hard-gate to support causality classification. The current skill is correctly scoped to #175 — this is additive work for #177.

This review was generated by /review-pr (AI-assisted).

@yvonnedevlinrh yvonnedevlinrh self-assigned this Jun 23, 2026
@jflowers jflowers moved this to In Review 👀 in Unbound Force Planning Jun 23, 2026

@em-redhat em-redhat left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Clean refactoring extracting duplicated CI detection and local tool execution logic from /review-council, /review-pr, and /unleash into a shared pre-flight skill. All 7 acceptance criteria from #175 addressed. Scaffold copies verified in sync. No security, alignment, or constitution concerns.

This review was generated by /review-pr (AI-assisted).

@jflowers
jflowers merged commit 266c881 into unbound-force:main Jun 24, 2026
13 checks passed
@yvonnedevlinrh
yvonnedevlinrh deleted the opsx/pre-flight-skill branch June 25, 2026 09:43
@yvonnedevlinrh
yvonnedevlinrh restored the opsx/pre-flight-skill branch June 25, 2026 09:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done ✔️

Development

Successfully merging this pull request may close these issues.

Extract shared pre-flight skill for CI detection and local tool execution

3 participants