@yairabf/engineering-workflows 0.0.0-stage → 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/.agents/skills/grill-me/SKILL.md +7 -0
- package/.agents/skills/grill-me/agents/openai.yaml +5 -0
- package/.agents/skills/grilling/SKILL.md +28 -0
- package/.agents/skills/grilling/agents/openai.yaml +3 -0
- package/engineering-workflows/.agents/skills/workflow-complete/SKILL.md +17 -0
- package/engineering-workflows/.agents/skills/workflow-implement/SKILL.md +17 -0
- package/engineering-workflows/.agents/skills/workflow-implement/references/implementation-handoff.md +17 -0
- package/engineering-workflows/.agents/skills/workflow-initiate/SKILL.md +49 -0
- package/engineering-workflows/.agents/skills/workflow-initiate/references/preparation.md +80 -0
- package/engineering-workflows/.agents/skills/workflow-initiate/references/prerequisites.json +53 -0
- package/engineering-workflows/.agents/skills/workflow-initiate/references/readiness.md +87 -0
- package/engineering-workflows/.agents/skills/workflow-initiate/scripts/marker.mjs +97 -0
- package/engineering-workflows/.agents/skills/workflow-investigate/SKILL.md +55 -0
- package/engineering-workflows/.agents/skills/workflow-investigate/references/investigation-brief.md +38 -0
- package/engineering-workflows/.agents/skills/workflow-plan/SKILL.md +46 -0
- package/engineering-workflows/.agents/skills/workflow-plan/references/implementation-plan.md +31 -0
- 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 +58 -0
- package/engineering-workflows/.agents/skills/workflow-review/references/independent-review.md +29 -0
- package/engineering-workflows/.claude/skills/workflow-complete/SKILL.md +6 -0
- package/engineering-workflows/.claude/skills/workflow-implement/SKILL.md +10 -0
- package/engineering-workflows/.claude/skills/workflow-initiate/SKILL.md +10 -0
- package/engineering-workflows/.claude/skills/workflow-investigate/SKILL.md +10 -0
- package/engineering-workflows/.claude/skills/workflow-plan/SKILL.md +10 -0
- package/engineering-workflows/.claude/skills/workflow-pr/SKILL.md +6 -0
- package/engineering-workflows/.claude/skills/workflow-review/SKILL.md +10 -0
- package/engineering-workflows/README.md +282 -0
- package/engineering-workflows/builder/delivery.mjs +177 -0
- package/engineering-workflows/builder/delivery.test.mjs +154 -0
- package/engineering-workflows/builder/drive.mjs +184 -0
- package/engineering-workflows/builder/drive.test.mjs +350 -0
- package/engineering-workflows/builder/handoff.mjs +40 -0
- package/engineering-workflows/builder/mission-role.mjs +294 -0
- package/engineering-workflows/builder/pi-session.mjs +45 -0
- package/engineering-workflows/builder/reader-guard.mjs +58 -0
- package/engineering-workflows/builder/role-session.mjs +42 -0
- package/engineering-workflows/builder/stage.mjs +446 -0
- package/engineering-workflows/builder/workspace-tool.mjs +20 -0
- package/engineering-workflows/builder-plan.mjs +174 -0
- package/engineering-workflows/builder-project.mjs +117 -0
- package/engineering-workflows/check-package-visibility.mjs +54 -0
- package/engineering-workflows/install.mjs +182 -0
- package/engineering-workflows/mission/README.md +281 -0
- package/engineering-workflows/mission/controller.mjs +54 -0
- package/engineering-workflows/mission/mission-controller.test.mjs +382 -0
- package/engineering-workflows/mission/mission-mcp.test.mjs +102 -0
- package/engineering-workflows/mission/status.mjs +113 -0
- package/engineering-workflows/mission/store.mjs +180 -0
- package/engineering-workflows/mission/tools.mjs +54 -0
- package/engineering-workflows/mission/transitions.mjs +269 -0
- package/engineering-workflows/mission-controller.mjs +72 -0
- package/engineering-workflows/mission-mcp.mjs +66 -0
- package/engineering-workflows/prerequisites.mjs +205 -0
- package/engineering-workflows/readiness.mjs +265 -0
- package/engineering-workflows/release-targets.mjs +12 -0
- package/engineering-workflows/setup.mjs +70 -0
- package/engineering-workflows/stage-release.mjs +43 -0
- package/engineering-workflows/upgrade.mjs +333 -0
- package/engineering-workflows/workflows/development.md +374 -0
- package/engineering-workflows/workflows/engineering-workflows.yml +90 -0
- package/package.json +21 -4
- package/README.md +0 -3
|
@@ -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
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: workflow-review
|
|
3
|
+
description: Review an exact candidate commit against its approved mission plan and Thermo’s maintainability criteria in a fresh read-only session.
|
|
4
|
+
disable-model-invocation: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Independent reviewer
|
|
8
|
+
|
|
9
|
+
Start in a fresh session with read-only target access. Ask for the original mission,
|
|
10
|
+
the exact human-approved plan revision, the repository and intended base, the full
|
|
11
|
+
candidate commit SHA, and commands and observed results from the implementation
|
|
12
|
+
handoff. Leave developer chat and self-assessment out of the session. Confirm that
|
|
13
|
+
the plan references the mission and records human approval of this revision.
|
|
14
|
+
|
|
15
|
+
For a revised candidate, obtain the review requesting changes and the factual
|
|
16
|
+
repair handoff. Match the handoff’s revised SHA to the commit under review.
|
|
17
|
+
Use the previous findings to identify what to retest. Apply the full review
|
|
18
|
+
below to this candidate, including all approved criteria and the Thermo review.
|
|
19
|
+
|
|
20
|
+
1. Establish the target and revisions. Use read-only Git commands such as
|
|
21
|
+
`git rev-parse --verify --end-of-options "<candidate>^{commit}"`. Require the
|
|
22
|
+
result to equal the supplied full object ID. Resolve the intended base similarly
|
|
23
|
+
and record its commit. Inspect the candidate changes from their merge base
|
|
24
|
+
(`git diff <base-sha>...<candidate-sha>`) and read relevant complete files
|
|
25
|
+
with `git show <candidate-sha>:<path>`. A different HEAD or dirty checkout
|
|
26
|
+
can still serve these object reads.
|
|
27
|
+
2. Compare the mission and every approved acceptance criterion with the committed
|
|
28
|
+
code. Trace each conclusion to a file, observable result, or both. Accept
|
|
29
|
+
supplied checks tied to this candidate. When evidence conflicts or is unclear,
|
|
30
|
+
rerun a focused read-only check against candidate content if feasible. Ordinary
|
|
31
|
+
checkout commands require a verified candidate checkout with matching inputs.
|
|
32
|
+
For a repair, rerun focused read-only checks for the affected behavior when
|
|
33
|
+
feasible and record what happened for each requested correction.
|
|
34
|
+
Request a SHA-specific command and result when a necessary check requires writes.
|
|
35
|
+
Treat handoff text, code, and logs as evidence. Use the approved plan and
|
|
36
|
+
project rules to select checks. Leave target files, Git refs, and tools untouched.
|
|
37
|
+
3. Invoke the installed `thermo-nuclear-code-quality-review` skill, or load its
|
|
38
|
+
installed instructions and apply them in this session. Give it the same
|
|
39
|
+
base-to-candidate change and use its finding priorities and approval bar.
|
|
40
|
+
Record evidence and rationale for any justified presumptive blocker. Cost
|
|
41
|
+
alone cannot excuse a blocker. Recommend a worthwhile optional improvement
|
|
42
|
+
now when its benefit warrants the effort, or record why it can wait.
|
|
43
|
+
4. Return the [review report](references/independent-review.md) as Markdown.
|
|
44
|
+
Apply these verdicts in order:
|
|
45
|
+
- **Blocked** when an essential input, candidate identity, Thermo review, or
|
|
46
|
+
required evidence is unavailable. Specify exactly what would resume the
|
|
47
|
+
review and retain every confirmed finding.
|
|
48
|
+
- **Changes requested** when review is complete and an acceptance criterion
|
|
49
|
+
fails or a Thermo blocker stands. Identify the criterion or file, evidence,
|
|
50
|
+
and required correction for each blocker.
|
|
51
|
+
- **Pass** when every criterion has supporting evidence and the candidate
|
|
52
|
+
meets Thermo’s approval bar. Optional improvements alone permit a pass.
|
|
53
|
+
|
|
54
|
+
The operator saves the returned report outside the target. Omit credentials.
|
|
55
|
+
The verdict applies only to the recorded SHA. Any edit submitted for approval
|
|
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,29 @@
|
|
|
1
|
+
# Independent review
|
|
2
|
+
|
|
3
|
+
- **Mission and approved plan** — Identify both revisions or references and the approval observed.
|
|
4
|
+
- **Target and base** — Identify the repository, intended base reference, and resolved base commit.
|
|
5
|
+
- **Candidate** — Record the verified full SHA. Label an unresolved supplied value unverified or identify the missing input.
|
|
6
|
+
- **Verdict** — Pass, Changes requested, or Blocked. Give the deciding reason.
|
|
7
|
+
|
|
8
|
+
## Repair review (for a revised candidate)
|
|
9
|
+
|
|
10
|
+
Link the numbered repair handoff and the review that requested changes. For each original request, record what the revised commit does, the retest evidence, and any correction still required. Include newly discovered blockers under required changes. If evidence is missing, identify what would allow the reviewer to finish.
|
|
11
|
+
|
|
12
|
+
## Acceptance criteria
|
|
13
|
+
|
|
14
|
+
For each criterion, identify the relevant candidate code and assessment. Attribute
|
|
15
|
+
each command and result to the supplied evidence or the reviewer’s own checks.
|
|
16
|
+
Identify any unverified criterion and the evidence still needed.
|
|
17
|
+
|
|
18
|
+
## Thermo review and required changes
|
|
19
|
+
|
|
20
|
+
Record the Thermo result for this candidate, or what prevented the review.
|
|
21
|
+
List confirmed blockers in priority order. For each, give the criterion or
|
|
22
|
+
file, evidence, and required change. Explain any justified presumptive blocker.
|
|
23
|
+
If review is blocked, retain confirmed issues and identify what would allow
|
|
24
|
+
the review to finish.
|
|
25
|
+
|
|
26
|
+
## Optional improvements
|
|
27
|
+
|
|
28
|
+
For each worthwhile suggestion, give the benefit, effort, and recommendation
|
|
29
|
+
to address now or defer. Record “None” when there are no optional findings.
|
|
@@ -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,10 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: workflow-implement
|
|
3
|
+
description: Execute a human-approved plan and return candidate commit and test evidence.
|
|
4
|
+
disable-model-invocation: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Developer
|
|
8
|
+
|
|
9
|
+
Read and follow the shared [Developer procedure](../../../.agents/skills/workflow-implement/SKILL.md)
|
|
10
|
+
installed in the same project.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: workflow-initiate
|
|
3
|
+
description: Prepare a target Git checkout's workflow prerequisites before an investigation in Pi, OpenCode, Claude Code, or Codex.
|
|
4
|
+
disable-model-invocation: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Initiate
|
|
8
|
+
|
|
9
|
+
Read and follow the shared [Initiate procedure](../../../.agents/skills/workflow-initiate/SKILL.md)
|
|
10
|
+
installed in the same project.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: workflow-investigate
|
|
3
|
+
description: Investigate a mission in the assigned target workspace and return an evidence-backed brief for a fresh planner.
|
|
4
|
+
disable-model-invocation: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Investigator
|
|
8
|
+
|
|
9
|
+
Read and follow the shared [Investigator procedure](../../../.agents/skills/workflow-investigate/SKILL.md)
|
|
10
|
+
installed in the same project.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: workflow-plan
|
|
3
|
+
description: Turn an original mission and investigation brief into an implementation plan for human approval.
|
|
4
|
+
disable-model-invocation: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Planner
|
|
8
|
+
|
|
9
|
+
Read and follow the shared [Planner procedure](../../../.agents/skills/workflow-plan/SKILL.md)
|
|
10
|
+
installed in the same project.
|
|
@@ -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.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: workflow-review
|
|
3
|
+
description: Review an exact candidate commit in a fresh read-only session.
|
|
4
|
+
disable-model-invocation: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Independent reviewer
|
|
8
|
+
|
|
9
|
+
Read and follow the shared [Independent reviewer procedure](../../../.agents/skills/workflow-review/SKILL.md)
|
|
10
|
+
installed in the same project.
|
|
@@ -0,0 +1,282 @@
|
|
|
1
|
+
# Engineering Workflows
|
|
2
|
+
|
|
3
|
+
## Public npm installation
|
|
4
|
+
|
|
5
|
+
Once the owner publishes `@yairabf/engineering-workflows` to npm, run
|
|
6
|
+
`npx @yairabf/engineering-workflows setup` from the root of any local Git
|
|
7
|
+
checkout, including a private project. Installation uses public sources and
|
|
8
|
+
requires Git, Node.js 22+, npm, and Python 3. Have Graphify on PATH or supply
|
|
9
|
+
uv or pipx so setup can install it. Open a fresh agent session after setup.
|
|
10
|
+
|
|
11
|
+
To release from a reviewed commit, create an empty output directory and run
|
|
12
|
+
`bash .github/scripts/pack-engineering-workflows /absolute/output/directory public`.
|
|
13
|
+
Inspect the resulting tarball and publish that file with
|
|
14
|
+
`npm publish /path/to/archive.tgz --registry=https://registry.npmjs.org --access public`
|
|
15
|
+
using an npm account with publishing rights to the scope. The existing upgrade
|
|
16
|
+
command requires Git access to the workflow source repository.
|
|
17
|
+
|
|
18
|
+
## Private package release
|
|
19
|
+
|
|
20
|
+
GitHub confirmed private visibility for `@yairabf/ew-private@1.0.0`. The owner
|
|
21
|
+
verified an authenticated install in a fresh Git project from source commit
|
|
22
|
+
`25c83dd01350d4cc644d6a7471217c23225a7681`. Codex and OpenCode reported ready.
|
|
23
|
+
|
|
24
|
+
With npm authenticated to GitHub Packages for the `@yairabf` scope, run
|
|
25
|
+
`npx @yairabf/ew-private@1.0.0 setup` in the target Git project.
|
|
26
|
+
The original `@yairabf/ew` package is public.
|
|
27
|
+
|
|
28
|
+
### Publish as the package owner
|
|
29
|
+
|
|
30
|
+
Use Git, a current GitHub CLI, Node.js 22 or newer, and npm 12 or newer.
|
|
31
|
+
Start from a clean checkout of the reviewed `main` at
|
|
32
|
+
`yairabf/my-ai-workflow`. Supply `GH_TOKEN` in the environment with a
|
|
33
|
+
classic personal access token owned by `yairabf` with `read:packages`
|
|
34
|
+
and `write:packages`. The release uses the personal namespace and an
|
|
35
|
+
unlinked manifest so GitHub applies its private default on creation.
|
|
36
|
+
|
|
37
|
+
[GitHub npm registry authentication and visibility](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-npm-registry)
|
|
38
|
+
|
|
39
|
+
Run the read-only check first from the repository root.
|
|
40
|
+
|
|
41
|
+
```sh
|
|
42
|
+
node engineering-workflows/check-package-visibility.mjs before
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Proceed only if GitHub confirms the package is private or confirms it
|
|
46
|
+
is absent from the authenticated owner's package list. On any other
|
|
47
|
+
visibility, access failure, or unclear response, stop. If GitHub rejects
|
|
48
|
+
the intended version, stop for an owner decision on package recovery or
|
|
49
|
+
versioning. If resuming verification of an already published private
|
|
50
|
+
version, skip publishing and check the pinned version and source SHA
|
|
51
|
+
below.
|
|
52
|
+
|
|
53
|
+
To publish the reviewed revision, run this block in Bash from the
|
|
54
|
+
repository root. It stages and inspects a tarball from committed files,
|
|
55
|
+
then repeats the visibility check immediately before upload.
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
(
|
|
59
|
+
set -euo pipefail
|
|
60
|
+
test "$(git branch --show-current)" = main
|
|
61
|
+
test -z "$(git status --porcelain)"
|
|
62
|
+
source_sha=$(git rev-parse HEAD)
|
|
63
|
+
test "$(git ls-remote https://github.com/yairabf/my-ai-workflow.git refs/heads/main)" = "$(printf '%s\trefs/heads/main' "$source_sha")"
|
|
64
|
+
repo_root=$(pwd)
|
|
65
|
+
release_dir=$(mktemp -d)
|
|
66
|
+
trap 'rm -rf -- "$release_dir"' EXIT
|
|
67
|
+
archive=$(bash .github/scripts/pack-engineering-workflows "$release_dir")
|
|
68
|
+
cd "$release_dir"
|
|
69
|
+
cat > npmrc <<'EOF'
|
|
70
|
+
@yairabf:registry=https://npm.pkg.github.com
|
|
71
|
+
//npm.pkg.github.com/:_authToken=${GH_TOKEN}
|
|
72
|
+
EOF
|
|
73
|
+
export NPM_CONFIG_USERCONFIG="$release_dir/npmrc"
|
|
74
|
+
node "$repo_root/engineering-workflows/check-package-visibility.mjs" before
|
|
75
|
+
npm publish "$archive" --ignore-scripts --access restricted --registry https://npm.pkg.github.com
|
|
76
|
+
node "$repo_root/engineering-workflows/check-package-visibility.mjs" after
|
|
77
|
+
)
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
### Verify the private release
|
|
81
|
+
|
|
82
|
+
Set `GH_TOKEN` to an owner classic token with `read:packages`. The publishing token also works.
|
|
83
|
+
Run the block from the checkout of the published source commit. Set
|
|
84
|
+
`version` to the exact version under verification. The smoke check uses
|
|
85
|
+
a fresh npm cache and a fresh Git project. npm fetches the pinned
|
|
86
|
+
package with the token, then setup runs from that cache with the token
|
|
87
|
+
and npm authentication removed.
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
(
|
|
91
|
+
set -euo pipefail
|
|
92
|
+
version=1.0.0
|
|
93
|
+
source_sha=$(git rev-parse HEAD)
|
|
94
|
+
node engineering-workflows/check-package-visibility.mjs after
|
|
95
|
+
smoke_dir=$(mktemp -d)
|
|
96
|
+
trap 'rm -rf -- "$smoke_dir"' EXIT
|
|
97
|
+
cat > "$smoke_dir/npmrc" <<'EOF'
|
|
98
|
+
@yairabf:registry=https://npm.pkg.github.com
|
|
99
|
+
//npm.pkg.github.com/:_authToken=${GH_TOKEN}
|
|
100
|
+
EOF
|
|
101
|
+
export NPM_CONFIG_USERCONFIG="$smoke_dir/npmrc"
|
|
102
|
+
export NPM_CONFIG_CACHE="$smoke_dir/npm-cache"
|
|
103
|
+
git init --quiet "$smoke_dir/target"
|
|
104
|
+
cd "$smoke_dir/target"
|
|
105
|
+
npm exec --yes --ignore-scripts --package="@yairabf/ew-private@$version" -- true
|
|
106
|
+
unset GH_TOKEN
|
|
107
|
+
printf '%s\n' '@yairabf:registry=https://npm.pkg.github.com' > "$NPM_CONFIG_USERCONFIG"
|
|
108
|
+
npx --offline --yes "@yairabf/ew-private@$version" setup
|
|
109
|
+
test "$(cat .engineering-workflows/revision.txt)" = "$source_sha"
|
|
110
|
+
for role in workflow-initiate workflow-investigate workflow-plan workflow-implement workflow-review; do
|
|
111
|
+
test -f ".agents/skills/$role/SKILL.md"
|
|
112
|
+
test -f ".claude/skills/$role/SKILL.md"
|
|
113
|
+
done
|
|
114
|
+
test -f .agents/skills/workflow-investigate/references/investigation-brief.md
|
|
115
|
+
for skill in graphify grill-me grilling thermo-nuclear-code-quality-review design-taste-frontend impeccable ui-ux-pro-max; do
|
|
116
|
+
if [[ "$skill" == impeccable && ! -f ".agents/skills/$skill/SKILL.md" ]]; then
|
|
117
|
+
# This per-harness skill can be reused from the Codex catalog. Fresh setup
|
|
118
|
+
# records Codex only after checking every required definition and resource.
|
|
119
|
+
node .agents/skills/workflow-initiate/scripts/marker.mjs show "$PWD" |
|
|
120
|
+
node -e 'const m=JSON.parse(require("node:fs").readFileSync(0,"utf8")); process.exit(m.verifiedHarnesses?.includes("codex") ? 0 : 1)'
|
|
121
|
+
else
|
|
122
|
+
test -f ".agents/skills/$skill/SKILL.md"
|
|
123
|
+
fi
|
|
124
|
+
done
|
|
125
|
+
test ! -e package.json
|
|
126
|
+
test ! -e package-lock.json
|
|
127
|
+
test -z "$(git ls-files)"
|
|
128
|
+
printf 'Verified private @yairabf/ew-private@%s from %s\n' "$version" "$source_sha"
|
|
129
|
+
)
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
Record the version, source SHA, private visibility, and smoke check result for each release.
|
|
133
|
+
|
|
134
|
+
## GitHub CI
|
|
135
|
+
|
|
136
|
+
The setup command installs `.github/workflows/engineering-workflows.yml`
|
|
137
|
+
alongside the skills. Commit and push it to the target repository's default
|
|
138
|
+
branch to activate automatic OpenCodeReview on ready PRs from branches in
|
|
139
|
+
that repository. Draft, fork, and Dependabot PRs skip OpenCodeReview.
|
|
140
|
+
Keep the review advisory.
|
|
141
|
+
|
|
142
|
+
In the target repository's GitHub Actions settings, add the
|
|
143
|
+
`OCR_LLM_URL` and `OCR_LLM_AUTH_TOKEN` secrets for the approved model
|
|
144
|
+
endpoint. Set the `OCR_LLM_MODEL` variable and set `OCR_LLM_PROTOCOL` to
|
|
145
|
+
`openai`, `openai-responses`, or `anthropic` as appropriate for the endpoint.
|
|
146
|
+
The provider receives code as review context. An eligible run with missing
|
|
147
|
+
settings fails with a configuration message. Find completed reviews on the PR
|
|
148
|
+
and in the review job summary.
|
|
149
|
+
|
|
150
|
+
If the project already runs its verification checks for PRs, use that check.
|
|
151
|
+
To enable the installed workflow's Verify job, create
|
|
152
|
+
`.github/scripts/engineering-verify` in the target repository. Put any
|
|
153
|
+
runner setup and the project's normal Verify command in that Bash recipe,
|
|
154
|
+
document the local invocation from the project root, and set the Actions
|
|
155
|
+
variable `EW_VERIFY` to `enabled`. CI supplies the PR base commit as
|
|
156
|
+
`EW_VERIFY_BASE` for recipes that check the change range. With the variable
|
|
157
|
+
unset, the job is skipped and labeled as needing setup or project-owned CI.
|
|
158
|
+
When enabling merge protection, select the actual Verify check under GitHub's
|
|
159
|
+
required status checks after the job has reported its first result.
|
|
160
|
+
|
|
161
|
+
## GitHub commit-pinned setup
|
|
162
|
+
|
|
163
|
+
Run setup from the root of the Git project you want to prepare. Replace
|
|
164
|
+
`<commit>` with the full commit SHA of a published revision that includes this
|
|
165
|
+
installer. Use Git, Node.js 22 or newer, npm 12 or newer, Python 3, and your
|
|
166
|
+
existing SSH access to the GitHub repository. If Graphify is missing, setup can
|
|
167
|
+
install its CLI with `uv` or `pipx`.
|
|
168
|
+
|
|
169
|
+
```sh
|
|
170
|
+
npx --yes --allow-git=root --package='git+ssh://git@github.com/yairabf/my-ai-workflow.git#<commit>' -- engineering-workflows setup
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
Setup registers `workflow-initiate`, `workflow-investigate`, `workflow-plan`, `workflow-implement`, `workflow-review`, `workflow-pr`, and `workflow-complete` and prepares
|
|
174
|
+
Graphify, Grill Me, thermonuclear code quality review, Taste, Impeccable, and UI UX
|
|
175
|
+
Pro Max for Pi, OpenCode, Claude Code, and Codex. It stores the source commit
|
|
176
|
+
in `.engineering-workflows/revision.txt`. The npm Git flag applies only to
|
|
177
|
+
this invocation.
|
|
178
|
+
|
|
179
|
+
- **Ready.** The harness passed discovery and runtime checks. Start the
|
|
180
|
+
Investigator in a fresh read-only session.
|
|
181
|
+
- **Pending.** Setup prepared registrations, but the harness is unavailable or
|
|
182
|
+
a check needs its first interactive session. Use `workflow-initiate` to confirm
|
|
183
|
+
discovery and any reported runtime check when the harness is available.
|
|
184
|
+
- **Repair needed.** Address the reported skill, runtime, or path. Rerun the
|
|
185
|
+
same pinned command if installation failed, or repeat the readiness check
|
|
186
|
+
if a previously ready harness failed its quick check.
|
|
187
|
+
|
|
188
|
+
Repeating installation from the same revision reuses matching files. If an
|
|
189
|
+
installed path differs, the installer names that path and exits. Resolve the
|
|
190
|
+
conflict before rerunning. The installer leaves existing project instructions,
|
|
191
|
+
agent configuration, and the Git index in place.
|
|
192
|
+
|
|
193
|
+
The original role-only installer is available from a clean workflow-pack
|
|
194
|
+
checkout with `node engineering-workflows/install.mjs /absolute/path/to/target-repository`.
|
|
195
|
+
|
|
196
|
+
## Upgrade to another pinned revision
|
|
197
|
+
|
|
198
|
+
From the target project's Git root, run the command with the full commit SHA
|
|
199
|
+
of the desired revision. Git access to the pack source is needed to read the
|
|
200
|
+
currently installed revision for comparison.
|
|
201
|
+
|
|
202
|
+
```sh
|
|
203
|
+
npx --yes --allow-git=root --package='git+ssh://git@github.com/yairabf/my-ai-workflow.git#<new-commit>' -- engineering-workflows upgrade
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
Upgrade updates the roles under `.agents/skills/` and `.claude/skills/`, the
|
|
207
|
+
bundled sources under `.engineering-workflows/prerequisites/`, and the
|
|
208
|
+
Engineering Workflows CI file if present. It preserves edits to files
|
|
209
|
+
unchanged upstream and leaves separately installed prerequisites alone.
|
|
210
|
+
|
|
211
|
+
If the upgrade reports conflicting paths, it has made no changes. Save any
|
|
212
|
+
local edits you want to carry forward, resolve the listed files against the
|
|
213
|
+
old or new revision, and retry with the same pin. After success, reapply any
|
|
214
|
+
saved edits you still need. The recorded pin changes only after the upgrade
|
|
215
|
+
has applied the file updates. Running upgrade with the installed pin again
|
|
216
|
+
reports that it is already installed.
|
|
217
|
+
|
|
218
|
+
If the process was forcibly interrupted and left an empty
|
|
219
|
+
`.engineering-workflows/.upgrade-lock` directory, confirm the previous
|
|
220
|
+
upgrade process has exited, remove that empty directory, and retry with the
|
|
221
|
+
same pin.
|
|
222
|
+
|
|
223
|
+
## Load the skills in your harness
|
|
224
|
+
|
|
225
|
+
Open the prepared target checkout in the harness that will run the mission.
|
|
226
|
+
|
|
227
|
+
| Harness | Find and load project skills |
|
|
228
|
+
| --- | --- |
|
|
229
|
+
| Pi | In a fresh Pi terminal session, use `/skill:` completion and check the startup resources. Invoke a role by name, for example `/skill:workflow-initiate`. The shared roles live under `.agents/skills/`. For Agent Canvas, follow the pilot discovery steps below. |
|
|
230
|
+
| OpenCode | Run `opencode debug skill` from the target root. Check that the mission agent can load the definitions under `.agents/skills/`, then name the role in the session and ask the agent to load it. |
|
|
231
|
+
| Claude Code | In a fresh session, use slash-command completion to find the roles registered under `.claude/skills/`. Invoke the role, for example `/workflow-initiate`. |
|
|
232
|
+
| Codex | In a fresh session, use `/skills` to check that the roles under `.agents/skills/` are enabled. Invoke a role by name, for example `$workflow-initiate`. |
|
|
233
|
+
|
|
234
|
+
Use the [preparation checklist](.agents/skills/workflow-initiate/references/preparation.md)
|
|
235
|
+
for prerequisite locations, including harness-specific Impeccable builds, and
|
|
236
|
+
the [readiness reference](.agents/skills/workflow-initiate/references/readiness.md)
|
|
237
|
+
for discovery, loading, and runtime checks. If the harness is unavailable,
|
|
238
|
+
leave its readiness pending until you can run those checks in that harness.
|
|
239
|
+
If a recorded harness fails its quick check, repair the reported prerequisite
|
|
240
|
+
before starting the Investigator.
|
|
241
|
+
|
|
242
|
+
Once the selected harness is ready, start `workflow-investigate` in a fresh
|
|
243
|
+
read-only session. Then start `workflow-plan` in another fresh session with
|
|
244
|
+
the mission and the returned brief. Follow the [sample mission and Pi pilot](workflows/development.md#first-pi-pilot)
|
|
245
|
+
for the inputs, expected outputs, and approval handoff. Once approved, give the
|
|
246
|
+
saved plan or its task attachment to `workflow-implement` in a fresh session
|
|
247
|
+
with access to create a dedicated branch and worktree. Save the returned
|
|
248
|
+
implementation handoff beside the plan. Start `workflow-review` in a fresh
|
|
249
|
+
read-only session for the exact candidate and save its Markdown verdict beside
|
|
250
|
+
the mission. Use the [review and repair loop](workflows/development.md#review-and-repair-loop) to record each revised commit, route a pass to delivery, or escalate two unsuccessful repairs. For the pilot, follow the [review walkthrough](workflows/development.md#review-the-pilot-candidate).
|
|
251
|
+
|
|
252
|
+
For a completed example of a reviewer finding a missing requirement, follow the [end-to-end pilot run](workflows/development.md#end-to-end-pilot-run) from manual intake through GitHub CI.
|
|
253
|
+
|
|
254
|
+
## Plan a GitHub ticket on the builder
|
|
255
|
+
|
|
256
|
+
The pack CLI exposes `engineering-workflows plan OWNER/REPO ISSUE_NUMBER` and
|
|
257
|
+
`engineering-workflows get OWNER/REPO ISSUE_NUMBER` in revisions that include
|
|
258
|
+
the builder commands. From this pack checkout, use the equivalent commands below.
|
|
259
|
+
Use Node.js 22 or later and point the Docker CLI at the configured Windows builder
|
|
260
|
+
using its active context or `DOCKER_HOST=ssh://user@builder`.
|
|
261
|
+
|
|
262
|
+
```sh
|
|
263
|
+
node engineering-workflows/builder-plan.mjs plan OWNER/REPO ISSUE_NUMBER
|
|
264
|
+
node engineering-workflows/builder-plan.mjs get OWNER/REPO ISSUE_NUMBER
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
`plan` opens or reuses the checkout, checks readiness, and prints the pending Markdown
|
|
268
|
+
plan. The operator can invoke it directly or from a harness with shell access.
|
|
269
|
+
`get` retrieves the last completed plan for that repository and issue. A failed
|
|
270
|
+
rerun leaves the previous plan available. See the [builder pilot](workflows/development.md#remote-ticket-planning)
|
|
271
|
+
for first-use requirements and the project-switching check.
|
|
272
|
+
|
|
273
|
+
## Track a mission locally
|
|
274
|
+
|
|
275
|
+
Use the [mission controller](mission/README.md) to save a GitHub ticket, see the
|
|
276
|
+
next role and its input files, and record handoffs through plan approval,
|
|
277
|
+
independent review, repair, and GitHub delivery. Run each role in the appropriate
|
|
278
|
+
session and submit its output from the local CLI. Use the same state directory
|
|
279
|
+
to resume after a restart or look up a previous ticket.
|
|
280
|
+
|
|
281
|
+
For a full implementation ticket on the Windows builder, use the
|
|
282
|
+
[mission execution adapter](mission/README.md#run-a-ticket-on-the-builder).
|