feat: PR lifecycle skill + readiness check expansion (9 → 11 checks)#870
feat: PR lifecycle skill + readiness check expansion (9 → 11 checks)#870
Conversation
🟡 Impact Analysis — PR #870Risk tier: 🟡 MEDIUM 📊 Summary
🎯 Risk Factors
📦 Modules Affectedcopilot-config (1 file)
scripts (2 files)
squad-state (2 files)
tests (1 file)
This report is generated automatically for every PR. See #733 for details. |
🛫 PR Readiness Check
PR Scope: 🔧 Infrastructure
|
| Status | Check | Details |
|---|---|---|
| ✅ | Single commit | 1 commit — clean history |
| ✅ | Not in draft | Ready for review |
| ✅ | Branch up to date | Up to date with dev |
| ❌ | Copilot review | No Copilot review yet — it may still be processing |
| ✅ | Changeset present | No source files changed — changeset not required |
| ✅ | Scope clean | |
| ✅ | No merge conflicts | No merge conflicts |
| ❌ | Copilot threads resolved | 1 unresolved Copilot thread(s) — fix and resolve before merging |
| ❌ | CI passing | 16 check(s) still running |
Files Changed (6 files, +756 −5)
| File | +/− |
|---|---|
.copilot/skills/pr-lifecycle/SKILL.md |
+537 −0 |
.squad/agents/procedures/history.md |
+14 −0 |
.squad/decisions/inbox/procedures-pr-lifecycle-skill.md |
+37 −0 |
scripts/pr-readiness.mjs |
+57 −0 |
scripts/security-review.mjs |
+2 −0 |
test/pr-readiness.test.ts |
+109 −5 |
Total: +756 −5
This check runs automatically on every push. Fix any ❌ items and push again.
See CONTRIBUTING.md and PR Requirements for details.
|
There was a problem hiding this comment.
Pull request overview
Adds a new Copilot skill documenting the end-to-end PR lifecycle and extends the PR readiness orchestrator from 9 → 11 checks by introducing issue-linkage enforcement and a protected-bootstrap-files warning.
Changes:
- Added
checkIssueLinkage()(hard gate) andcheckProtectedFiles()(informational) toscripts/pr-readiness.mjs, plus exportedPROTECTED_FILES. - Updated
run()orchestration and unit tests to expect and validate 11 readiness checks. - Introduced a new
.copilot/skills/pr-lifecycle/SKILL.mdskill and recorded the decision/history entries for the change.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
scripts/pr-readiness.mjs |
Adds 2 new check functions and wires them into the readiness run (11 total checks). |
test/pr-readiness.test.ts |
Adds/updates tests for the 2 new checks and updates run expectations from 9 → 11. |
.copilot/skills/pr-lifecycle/SKILL.md |
New “PR lifecycle” skill/runbook intended to be canonical for agents. |
.squad/decisions/inbox/procedures-pr-lifecycle-skill.md |
New decision record capturing the skill + readiness expansion. |
.squad/agents/procedures/history.md |
Adds an agent history entry describing the work and rationale. |
| ### Phase 4 — PR Readiness | ||
|
|
||
| An automated readiness check runs on every push and posts a checklist comment on the PR. All 9 checks must pass before review. | ||
|
|
||
| #### Check 1: Single Commit |
There was a problem hiding this comment.
Phase 4 still says “All 9 checks must pass” and the checklist only documents checks 1–9. Since pr-readiness.mjs now emits 11 checks, add documentation for the new checks (Issue linked + Protected files) and update the wording/count throughout this section.
There was a problem hiding this comment.
@copilot apply changes based on this feedback
There was a problem hiding this comment.
This was already addressed in commit de965d0. Phase 4 now says "All 11 checks must pass before review" and includes full documentation tables for Check 10 (Issue Linked) and Check 11 (Protected Files informational).
4682699 to
de965d0
Compare
…s expansion, spam protection (PRD #872) Implements PRD #872 — CI/GitHub Actions Performance Optimization. Phase 0+1: Consolidation - Repo Health: 5 jobs → 1 job with sequential steps + GITHUB_STEP_SUMMARY - Policy Gates: 4 jobs → 1 consolidated job (publish-policy kept separate) - PR Readiness: Remove synchronize/reopened from pull_request_target (fix double-trigger) - Concurrency groups added to 10 workflows (true for validation, false for publish) Phase 2: Path Filters - Added code path filter with fail-open semantics to squad-ci.yml - Docs-only PRs skip test, policy-gates, exports-map, samples-build, export-smoke Phase 4: Publish Pipeline - Removed redundant build job from insider-publish (test already builds) PR Readiness Expansion (from #870): - Added checkIssueLinkage() and checkProtectedFiles() checks (9 → 11) - Added PR lifecycle skill (.copilot/skills/pr-lifecycle/SKILL.md) - 13 new tests for readiness checks Comment Spam Protection (from #800): - Added scripts/lock-stale.mjs and scripts/moderate-spam.mjs - Added squad-comment-moderation.yml workflow - Added lock-stale and moderate-spam test suites All safety gates preserved. No product template files modified. Target: ~19 runners per PR push → ~11. Closes #872 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
… 0-2, 4-5) Phase 0+1: Consolidation - Repo Health: 5 jobs to 1 job with sequential steps + GITHUB_STEP_SUMMARY - Policy Gates: 4 jobs to 1 consolidated job (publish-policy kept separate) - PR Readiness: Remove synchronize/reopened from pull_request_target (fix double-trigger) - Concurrency groups added to 10 workflows (true for validation, false for publish) Phase 2: Path Filters - Added code path filter with fail-open semantics to squad-ci.yml - Docs-only PRs skip test, policy-gates, exports-map, samples-build, export-smoke Phase 4: Publish Pipeline - Removed redundant build job from insider-publish (test already builds) PR Readiness Expansion (from #870): - Added checkIssueLinkage() and checkProtectedFiles() checks (9 to 11) - Added PR lifecycle skill (.copilot/skills/pr-lifecycle/SKILL.md) - 13 new tests for readiness checks Security fixes: - Fix script injection in repo-health comment steps (env: block instead of inline interpolation) - Gate policy-gates job to pull_request events only (prevents undefined PR context on push) All safety gates preserved. No product template files modified. Closes #872 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Create comprehensive .copilot/skills/pr-lifecycle/SKILL.md covering the full issue-to-merge lifecycle with all readiness checks documented. Add two new checks to scripts/pr-readiness.mjs: - checkIssueLinkage(): hard gate requiring issue reference in PR body/commits - checkProtectedFiles(): informational warning for zero-dependency bootstrap files Tests updated: 90 passing. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
4d30cd3 to
3eddbbe
Compare
Summary
Adds a comprehensive PR lifecycle skill and expands the readiness check system from 9 to 11 checks.
New skill: .copilot/skills/pr-lifecycle/SKILL.md
Canonical Copilot-agent lifecycle covering 6 phases:
Includes gap analysis with 3 recommendations (2 implemented, 1 deferred).
New readiness checks in \scripts/pr-readiness.mjs\
Both use data already fetched by the orchestrator — zero new API calls.
Tests
90 tests passing (up from 88 before adjusting for new checks). New test coverage:
Deferred
\checkRequiredChecksPresent()\ — would verify expected CI check names ran. Needs team agreement on required check list. Documented in skill's gap analysis section.
Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com