@yairabf/engineering-workflows 1.0.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/engineering-workflows/.agents/skills/workflow-complete/SKILL.md +17 -0
- package/engineering-workflows/.agents/skills/workflow-implement/SKILL.md +1 -1
- package/engineering-workflows/.agents/skills/workflow-initiate/references/readiness.md +1 -1
- package/engineering-workflows/.agents/skills/workflow-pr/SKILL.md +20 -0
- package/engineering-workflows/.agents/skills/workflow-pr/scripts/check-pr.mjs +41 -0
- package/engineering-workflows/.agents/skills/workflow-review/SKILL.md +2 -0
- package/engineering-workflows/.claude/skills/workflow-complete/SKILL.md +6 -0
- package/engineering-workflows/.claude/skills/workflow-pr/SKILL.md +6 -0
- package/engineering-workflows/README.md +1 -1
- package/engineering-workflows/install.mjs +1 -1
- package/engineering-workflows/readiness.mjs +2 -0
- package/engineering-workflows/stage-release.mjs +2 -4
- package/engineering-workflows/workflows/development.md +2 -0
- package/package.json +2 -2
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: workflow-complete
|
|
3
|
+
description: Merge a PR after workflow-pr passes, with current verification, exact-head approval, and confirmation of the intended base.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Complete a passing PR
|
|
7
|
+
|
|
8
|
+
1. Load the workflow-pr Pass and independent review for the same repository, PR, base, branch and full SHA. For a retry, read live PR identity and state first. If that exact PR and head already merged into the intended base, confirm its merge commit and finish without a second merge.
|
|
9
|
+
2. Refresh the checks, applicable base branch requirements, OpenCodeReview summary, and unresolved findings using steps 3 and 4 of the sibling [workflow-pr skill](../workflow-pr/SKILL.md). Run its gate with fresh evidence. Only the literal Pass result permits a new merge. Route stale heads, findings and failed checks back to workflow-pr; wait on pending evidence. Check GitHub mergeability, approvals and repository policy. Resolve blockers through the repository's ordinary flow.
|
|
10
|
+
3. Obtain merge authorization for this PR and SHA under target repository rules. A user invoking this skill explicitly for the identified passing PR and SHA can supply that approval. Automatic skill selection alone cannot. Use the approved repository merge method and enforce the reviewed head in the merge command, for example:
|
|
11
|
+
|
|
12
|
+
```sh
|
|
13
|
+
gh pr merge "$pr" --repo "$repo" --match-head-commit "$reviewed_sha" --squash
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Use the repo's configured method or merge queue when applicable. Respect branch protections. If the head changes, invalidate the pass and its approval.
|
|
17
|
+
4. Query the PR again with gh pr view and confirm state MERGED, intended base, matching head, merge timestamp and merge commit. A queued PR remains pending; monitor it through merge, failure or a changed head. Return the PR URL, base branch and merge commit only after confirmation.
|
|
@@ -11,7 +11,7 @@ Start in a fresh session with the target checkout and the approved plan or a ref
|
|
|
11
11
|
1. Before writing, confirm the target, the target repository's base branch, and the human's explicit approval of this plan revision. A ticket assignment or a pending decision is insufficient. If the plan is inaccessible, approval is unclear, or the plan materially changed after approval, return the missing input or decision. Leave candidate, branch, and worktree fields empty with a reason.
|
|
12
12
|
2. Read target repository instructions. From the target root, inspect the base and existing worktrees.
|
|
13
13
|
- For a new assignment, use the target's branch naming rules and a free sibling worktree path. Run `git worktree add -b "$branch" "$worktree" "$base"` with the resolved values. If a name or path is occupied, preserve it and select a free one, or report the collision if the assignment requires that exact location. Keep the original checkout and its local changes intact.
|
|
14
|
-
- For a repair, use the saved implementation handoff and the review requesting changes. Verify the repository, dedicated worktree path and checked-out branch, and confirm that its full HEAD SHA matches the reviewed candidate. If they disagree or local edits would interfere, report the discrepancy before editing. Resume in that worktree.
|
|
14
|
+
- For a repair, use the saved implementation handoff and either the review requesting changes or the workflow-pr repair handoff for the published candidate. Verify the repository, dedicated worktree path and checked-out branch, and confirm that its full HEAD SHA matches the reviewed candidate. If they disagree or local edits would interfere, report the discrepancy before editing. Resume in that worktree.
|
|
15
15
|
3. In the dedicated worktree, execute the approved tasks and check their acceptance criteria. For repairs, trace each requested correction to its finding and retest the affected behavior. Run the plan's checks and applicable repository commands. Fix in-scope defects and rerun affected checks. If a material change to scope or criteria is needed, preserve progress and return the decision required for renewed approval.
|
|
16
16
|
4. Inspect the diff, stage only mission changes, and commit the candidate according to repository rules. Record the full SHA with `git rev-parse HEAD` in the dedicated worktree. Tie reported checks to that exact content and rerun affected checks after edits. If an operation fails or work stops early, identify any unfinished or uncommitted changes and distinguish them from what the SHA contains. Report the absence of a candidate explicitly if no candidate commit was produced.
|
|
17
17
|
5. Return the [implementation handoff](references/implementation-handoff.md) as Markdown for the operator to save beside the plan outside the pack. Retain the branch and worktree for review. End the session at handoff.
|
|
@@ -29,7 +29,7 @@ step and leave its readiness unverified.
|
|
|
29
29
|
| Claude Code | In a fresh Claude Code session, use the skill list or slash-command completion. Confirm each project definition is available, including explicit-only commands. |
|
|
30
30
|
| Codex | In a fresh Codex session, check `/skills` for enabled entries and their locations. A client using the Codex app-server protocol can query `skills/list` for the target working directory. |
|
|
31
31
|
|
|
32
|
-
Check `workflow-initiate`, `workflow-investigate`, `workflow-plan`, `workflow-implement`, and `workflow-
|
|
32
|
+
Check `workflow-initiate`, `workflow-investigate`, `workflow-plan`, `workflow-implement`, `workflow-review`, `workflow-pr` (including its shared gate script), and `workflow-complete`, plus
|
|
33
33
|
every skill in the [preparation checklist](preparation.md), including Grill Me's
|
|
34
34
|
companion `grilling`. For `workflow-plan`, confirm the shared definition can
|
|
35
35
|
read `references/implementation-plan.md`. For `workflow-implement`, check
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: workflow-pr
|
|
3
|
+
description: After independent review passes, open or resume the candidate PR, watch CI and OpenCodeReview, and route repairs until the reviewed head passes.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Deliver a reviewed candidate
|
|
7
|
+
|
|
8
|
+
Run in the active operator session with GitHub access. Use the approved plan, implementation handoff and independent Pass for the full candidate SHA. Preserve these inputs and the PR URL between iterations.
|
|
9
|
+
|
|
10
|
+
1. Check the target repository, intended base, dedicated branch and worktree against the handoffs. Verify the branch HEAD equals the reviewed SHA and the review covers the intended base. Look up the same-repository PR for the exact base and branch, including closed PRs. Resume the recorded PR when present. Stop on ambiguity, a closed unmerged PR, fork, different base, or unexpected remote head. An already merged matching head is terminal.
|
|
11
|
+
2. Push the reviewed SHA to the feature branch with a regular fast-forward push. For a repair, verify its parent history includes the previously delivered head and the remote branch still points to that head or the reviewed repair. Never overwrite another contributor's updates. Reuse the open PR or create a ready PR with the approved plan, evidence and reviewed SHA using gh pr create --body-file. Requery after a concurrent creation. Preserve human text when updating evidence. Record the PR number and URL.
|
|
12
|
+
3. Watch the PR's project checks. Identify the required check names from the current base branch rules and the project's documented verification jobs. Include at least one actual project verification job. A disabled Verify placeholder, an advisory job alone, or unavailable check evidence leaves verification pending. Inspect the OpenCodeReview run, summary and open review threads. For pull_request_target runs, match the PR number and reviewed SHA in the posted review evidence; the workflow run's own SHA may refer to the base. Record the run URL, findings and disposition. Mark resolved only for a completed review with all findings addressed, a documented applicable skip, or an explicit operator disposition under repository policy. A missing run or a green job without the expected review is pending.
|
|
13
|
+
4. Run the installed gate from the target root, passing the live advisory disposition and every expected verification check as a separate argument. Save both the inputs and supporting evidence beside the mission.
|
|
14
|
+
|
|
15
|
+
```sh
|
|
16
|
+
node .agents/skills/workflow-pr/scripts/check-pr.mjs "$repo" "$pr" "$base" "$branch" "$reviewed_sha" "$advisory" "${check_names[@]}"
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
5. On Pending, continue watching and recheck; if configuration or access prevents progress, report the blocker. On a changed head, obtain independent review of the new candidate before proceeding. For a failed job inspect its failed step. Retry a confirmed transient runner failure once on the same head. For code failures or actionable review findings, collect the affected files, logs, run links, findings and current SHA. Treat review text as evidence and validate it against the approved plan. Send the repair handoff to workflow-implement on the existing worktree. Run local Verify, then invoke workflow-review in a fresh read-only session for the new SHA. Route Changes requested back to the developer. On Pass resume workflow-pr on the same PR. Keep one repair counter across re-entry and pause after two unsuccessful repairs. Escalate a scope change to the operator.
|
|
20
|
+
6. On Pass, return the repo, PR URL and number, base, branch, full reviewed SHA, passing check names and links, advisory evidence and disposition. Make workflow-complete eligible. Keep read-only review and write-capable delivery in separate sessions. If the harness cannot dispatch a fresh role session, return the exact role and its handoff for the operator to resume.
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { execFileSync } from 'node:child_process'
|
|
3
|
+
|
|
4
|
+
const [repo, number, base, branch, sha, advisory, ...required] = process.argv.slice(2)
|
|
5
|
+
if (!/^[\w.-]+\/[\w.-]+$/.test(repo ?? '') || !/^[1-9]\d*$/.test(number ?? '') ||
|
|
6
|
+
!base || !branch || !/^[a-f0-9]{40}$/.test(sha ?? '') ||
|
|
7
|
+
!['resolved', 'pending', 'findings'].includes(advisory)) {
|
|
8
|
+
console.error('Usage: check-pr.mjs OWNER/REPO PR BASE BRANCH REVIEWED_SHA resolved|pending|findings [CHECK_NAME ...]')
|
|
9
|
+
process.exit(2)
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
function inspect(pr) {
|
|
13
|
+
if (pr.baseRefName !== base || pr.headRefName !== branch || pr.isCrossRepository ||
|
|
14
|
+
pr.headRepositoryOwner?.login?.toLowerCase() !== repo.split('/')[0].toLowerCase() ||
|
|
15
|
+
pr.headRepository?.name?.toLowerCase() !== repo.split('/')[1].toLowerCase() ||
|
|
16
|
+
pr.headRefOid !== sha) return 'Review current head and PR identity'
|
|
17
|
+
if (pr.state === 'MERGED') return 'Already merged'
|
|
18
|
+
if (pr.state !== 'OPEN' || pr.isDraft) return 'Blocked'
|
|
19
|
+
const checks = (pr.statusCheckRollup ?? []).filter(c => (c.name ?? c.context) !== 'OpenCodeReview (advisory)')
|
|
20
|
+
const result = c => c.conclusion || c.state || c.status
|
|
21
|
+
const failed = ['FAILURE', 'ERROR', 'CANCELLED', 'TIMED_OUT', 'ACTION_REQUIRED', 'STALE', 'STARTUP_FAILURE']
|
|
22
|
+
if (checks.some(c => failed.includes(result(c))) || advisory === 'findings') return 'Diagnose and repair'
|
|
23
|
+
const verified = required.length && required.every(name => {
|
|
24
|
+
const matches = checks.filter(c => (c.name ?? c.context) === name)
|
|
25
|
+
return matches.length && matches.every(c => result(c) === 'SUCCESS')
|
|
26
|
+
})
|
|
27
|
+
if (!verified || advisory !== 'resolved' ||
|
|
28
|
+
checks.some(c => !['SUCCESS', 'NEUTRAL', 'SKIPPED'].includes(result(c)))) return 'Pending'
|
|
29
|
+
return 'Pass'
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
try {
|
|
33
|
+
const fields = 'state,isDraft,baseRefName,headRefName,isCrossRepository,headRepositoryOwner,headRepository,headRefOid,statusCheckRollup'
|
|
34
|
+
const pr = JSON.parse(execFileSync('gh', ['pr', 'view', number, '--repo', repo, '--json', fields], { encoding: 'utf8' }))
|
|
35
|
+
const decision = inspect(pr)
|
|
36
|
+
console.log(decision)
|
|
37
|
+
if (!['Pass', 'Already merged'].includes(decision)) process.exitCode = 1
|
|
38
|
+
} catch (error) {
|
|
39
|
+
console.error('Cannot verify PR: ' + error.message)
|
|
40
|
+
process.exitCode = 2
|
|
41
|
+
}
|
|
@@ -54,3 +54,5 @@ below to this candidate, including all approved criteria and the Thermo review.
|
|
|
54
54
|
The operator saves the returned report outside the target. Omit credentials.
|
|
55
55
|
The verdict applies only to the recorded SHA. Any edit submitted for approval
|
|
56
56
|
requires a new commit and fresh review.
|
|
57
|
+
|
|
58
|
+
On Pass, hand the exact SHA and verdict to the operator to invoke workflow-pr in the delivery session.
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: workflow-complete
|
|
3
|
+
description: Merge a PR after workflow-pr passes, with current verification, exact-head approval, and confirmation of the intended base.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Follow the [shared role procedure](../../../.agents/skills/workflow-complete/SKILL.md) in the target checkout.
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: workflow-pr
|
|
3
|
+
description: After independent review passes, open or resume the candidate PR, watch CI and OpenCodeReview, and route repairs until the reviewed head passes.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Follow the [shared role procedure](../../../.agents/skills/workflow-pr/SKILL.md) in the target checkout.
|
|
@@ -170,7 +170,7 @@ install its CLI with `uv` or `pipx`.
|
|
|
170
170
|
npx --yes --allow-git=root --package='git+ssh://git@github.com/yairabf/my-ai-workflow.git#<commit>' -- engineering-workflows setup
|
|
171
171
|
```
|
|
172
172
|
|
|
173
|
-
Setup registers `workflow-initiate`, `workflow-investigate`, `workflow-plan`, `workflow-implement`, and `workflow-
|
|
173
|
+
Setup registers `workflow-initiate`, `workflow-investigate`, `workflow-plan`, `workflow-implement`, `workflow-review`, `workflow-pr`, and `workflow-complete` and prepares
|
|
174
174
|
Graphify, Grill Me, thermonuclear code quality review, Taste, Impeccable, and UI UX
|
|
175
175
|
Pro Max for Pi, OpenCode, Claude Code, and Codex. It stores the source commit
|
|
176
176
|
in `.engineering-workflows/revision.txt`. The npm Git flag applies only to
|
|
@@ -20,7 +20,7 @@ import { fileURLToPath } from 'node:url'
|
|
|
20
20
|
|
|
21
21
|
const pack = fileURLToPath(new URL('.', import.meta.url))
|
|
22
22
|
export const sourceRoot = dirname(resolve(pack))
|
|
23
|
-
const roles = ['workflow-initiate', 'workflow-investigate', 'workflow-plan', 'workflow-implement', 'workflow-review']
|
|
23
|
+
const roles = ['workflow-initiate', 'workflow-investigate', 'workflow-plan', 'workflow-implement', 'workflow-review', 'workflow-pr', 'workflow-complete']
|
|
24
24
|
const roots = ['.agents/skills', '.claude/skills']
|
|
25
25
|
const prerequisites = ['.agents/skills/grill-me', '.agents/skills/grilling']
|
|
26
26
|
|
|
@@ -16,6 +16,8 @@ const roles = [
|
|
|
16
16
|
{ id: 'workflow-investigate', requiredFiles: ['references/investigation-brief.md'] },
|
|
17
17
|
{ id: 'workflow-plan', requiredFiles: ['references/implementation-plan.md'] },
|
|
18
18
|
{ id: 'workflow-implement', requiredFiles: ['references/implementation-handoff.md'] },
|
|
19
|
+
{ id: 'workflow-pr', requiredFiles: ['scripts/check-pr.mjs'] },
|
|
20
|
+
{ id: 'workflow-complete', requiredFiles: [] },
|
|
19
21
|
{ id: 'workflow-review', requiredFiles: ['references/independent-review.md'] },
|
|
20
22
|
]
|
|
21
23
|
const uiSkill = prerequisites.find(({ id }) => id === 'ui-ux-pro-max')
|
|
@@ -7,8 +7,6 @@ import { releaseTargets } from './release-targets.mjs'
|
|
|
7
7
|
|
|
8
8
|
const source = fileURLToPath(new URL('../', import.meta.url))
|
|
9
9
|
|
|
10
|
-
const version = '1.0.0'
|
|
11
|
-
|
|
12
10
|
try {
|
|
13
11
|
const channel = process.argv[3] ?? 'private'
|
|
14
12
|
if (![3, 4].includes(process.argv.length) || !Object.hasOwn(releaseTargets, channel)) {
|
|
@@ -32,13 +30,13 @@ try {
|
|
|
32
30
|
delete manifest.repository
|
|
33
31
|
Object.assign(manifest, {
|
|
34
32
|
name,
|
|
35
|
-
version,
|
|
33
|
+
version: channel === 'public' ? '1.1.0' : '1.0.0',
|
|
36
34
|
bin: { ew: manifest.bin['engineering-workflows'] },
|
|
37
35
|
publishConfig: { registry, access },
|
|
38
36
|
engineeringWorkflowsRelease: { sourceCommit: commit },
|
|
39
37
|
})
|
|
40
38
|
writeFileSync(manifestPath, JSON.stringify(manifest, null, 2) + '\n')
|
|
41
|
-
console.log(`Staged ${name}@${version} from ${commit}`)
|
|
39
|
+
console.log(`Staged ${name}@${manifest.version} from ${commit}`)
|
|
42
40
|
} catch (error) {
|
|
43
41
|
console.error(`Engineering Workflows release: ${error.message}`)
|
|
44
42
|
process.exitCode = 1
|
|
@@ -27,6 +27,8 @@
|
|
|
27
27
|
and factual check evidence. Keep developer chat and self-assessment out of the handoff.
|
|
28
28
|
Save the returned verdict as `independent-review.md` beside the mission, outside the target repository. Follow the [review and repair loop](#review-and-repair-loop).
|
|
29
29
|
|
|
30
|
+
7. On an independent Pass, invoke [workflow-pr](../.agents/skills/workflow-pr/SKILL.md) in the operator session. Resume it after repairs on the same PR. Once it returns Pass for the current head, invoke [workflow-complete](../.agents/skills/workflow-complete/SKILL.md) for the approved merge.
|
|
31
|
+
|
|
30
32
|
On later missions, Initiate skips setup when the recorded harness passes
|
|
31
33
|
its quick check.
|
|
32
34
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yairabf/engineering-workflows",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "Install Engineering Workflows in a Git project",
|
|
5
5
|
"bin": {
|
|
6
6
|
"ew": "engineering-workflows/setup.mjs"
|
|
@@ -18,6 +18,6 @@
|
|
|
18
18
|
"access": "public"
|
|
19
19
|
},
|
|
20
20
|
"engineeringWorkflowsRelease": {
|
|
21
|
-
"sourceCommit": "
|
|
21
|
+
"sourceCommit": "502aecc2ccdb07e14fa939caaf0c08bd14055842"
|
|
22
22
|
}
|
|
23
23
|
}
|