@plainconceptsplatform/agent-harness 2.5.2 → 2.7.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/README.md +432 -435
- package/cli/fragments/ops-backlog/gh.md +1 -2
- package/cli/fragments/ops-evidence/gh.md +53 -54
- package/cli/fragments/ops-review/gh.md +1 -2
- package/cli/fragments/ops-review/gl.md +1 -2
- package/cli/fragments/ops-ship/gh.md +67 -68
- package/cli/fragments/ops-ship/gl.md +84 -85
- package/harness/.agents/skills/pc-make-merge-risk-assess/category-reference.md +1 -4
- package/harness/.agents/skills/pc-ops-evidence/SKILL.md +131 -133
- package/harness/.agents/skills/pc-plan-apply/SKILL.md +3 -9
- package/harness/.agents/skills/pc-plan-explore/SKILL.md +4 -12
- package/harness/.agents/skills/pc-plan-goal/SKILL.md +1 -1
- package/harness/.agents/skills/pc-plan-propose/SKILL.md +2 -2
- package/harness/.agents/skills/pc-plan-story/SKILL.md +52 -7
- package/harness/.agents/skills/pc-repo-help/SKILL.md +89 -89
- package/harness/.agents/skills/pc-repo-onboard/SKILL.md +32 -32
- package/harness/.agents/skills/pc-repo-verify/SKILL.md +104 -17
- package/harness/ARCHITECTURE.md +2 -5
- package/harness/DESIGN.md +2 -5
- package/package.json +4 -1
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
GitHub data comes from the `gh` CLI; a page fetch of github.com is denied (pc-system-reminders). If `gh` is unavailable, report it as a blocker.
|
|
2
|
-
Always pass `--repo {owner}/{repo}` explicitly, never rely on git context to resolve the repo.
|
|
1
|
+
GitHub data comes from the `gh` CLI; a page fetch of github.com is denied (pc-system-reminders). If `gh` is unavailable, report it as a blocker. Always pass `--repo {owner}/{repo}` explicitly, never rely on git context to resolve the repo.
|
|
3
2
|
|
|
4
3
|
---
|
|
5
4
|
|
|
@@ -1,54 +1,53 @@
|
|
|
1
|
-
GitHub data comes from the `gh` CLI; a page fetch of github.com is denied (pc-system-reminders). If `gh` is unavailable, skip publishing and report it; do not fail the pipeline unless the caller declared publishing a ship gate.
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
SHA
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
<!-- pc-visual-evidence:{
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
-
|
|
54
|
-
- If a comment call fails: report it. Fail the run ONLY when the caller declared publishing a ship gate; otherwise continue.
|
|
1
|
+
GitHub data comes from the `gh` CLI; a page fetch of github.com is denied (pc-system-reminders). If `gh` is unavailable, skip publishing and report it; do not fail the pipeline unless the caller declared publishing a ship gate. Always pass `--repo {owner}/{repo}` (or `repos/{owner}/{repo}` for `gh api`) explicitly.
|
|
2
|
+
|
|
3
|
+
Publish one status comment for every manifest. A `blocked` or `failed` manifest must include its status and reason, never a success claim.
|
|
4
|
+
|
|
5
|
+
### Step 1 — Build commit-pinned repository links
|
|
6
|
+
|
|
7
|
+
An embedded image must be a raw URL pinned to the commit that actually contains it, and that commit must be pushed. For each asset in `evidence.json`:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
SHA="$(git log -n 1 --format=%H -- '{asset-path}')" # the commit that added this asset
|
|
11
|
+
[ -z "$SHA" ] && echo "asset not committed: {asset-path}" && exit-skip
|
|
12
|
+
gh api "repos/{owner}/{repo}/contents/{asset-path}?ref=$SHA" --silent # 404 → not pushed yet → skip embedding
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Build a blob link for every committed manifest and asset: `https://github.com/{owner}/{repo}/blob/{SHA}/{asset-path}`. Use the raw URL only for a verified embeddable image: `https://raw.githubusercontent.com/{owner}/{repo}/{SHA}/{asset-path}`. If verification fails, include the asset path and SHA as text; never post a dead link.
|
|
16
|
+
|
|
17
|
+
### Step 2 — Build the comment body with a stable marker (idempotent)
|
|
18
|
+
|
|
19
|
+
Prefix the body with a hidden marker so re-runs update the same comment instead of piling on:
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
<!-- pc-visual-evidence:{change-id} -->
|
|
23
|
+
<!-- pc-visual-evidence-status:{status} -->
|
|
24
|
+
|
|
25
|
+
Status: `{status}`
|
|
26
|
+
|
|
27
|
+
{reason?}
|
|
28
|
+
|
|
29
|
+
Manifest: {commit-pinned evidence.json link}
|
|
30
|
+
|
|
31
|
+
Assets: {commit-pinned asset links}
|
|
32
|
+
|
|
33
|
+
{prMarkdown}
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### Step 3 — Upsert the comment on BOTH the issue and the PR
|
|
37
|
+
|
|
38
|
+
For each target number (the originating issue, and the PR number when provided), find an existing marked comment and PATCH it, else POST a new one:
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
# find existing
|
|
42
|
+
ID="$(gh api "repos/{owner}/{repo}/issues/{number}/comments" --paginate --jq \
|
|
43
|
+
'.[] | select(.body | contains("<!-- pc-visual-evidence:{change-id} -->")) | .id' | head -1)"
|
|
44
|
+
|
|
45
|
+
if [ -n "$ID" ]; then
|
|
46
|
+
gh api --method PATCH "repos/{owner}/{repo}/issues/comments/$ID" -f body="$BODY" --silent
|
|
47
|
+
else
|
|
48
|
+
gh api --method POST "repos/{owner}/{repo}/issues/{number}/comments" -f body="$BODY" --silent
|
|
49
|
+
fi
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
- Text-only (no verified image, or `default` mode / nothing pushed): drop the image lines, keep the summary (tasks N/N, verification result, commits).
|
|
53
|
+
- If a comment call fails: report it. Fail the run ONLY when the caller declared publishing a ship gate; otherwise continue.
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
GitHub data comes from the `gh` CLI; a page fetch of github.com is denied (pc-system-reminders). If `gh` is unavailable, report it as a blocker.
|
|
2
|
-
Always pass `--repo {owner}/{repo}` explicitly, never rely on git context to resolve the repo.
|
|
1
|
+
GitHub data comes from the `gh` CLI; a page fetch of github.com is denied (pc-system-reminders). If `gh` is unavailable, report it as a blocker. Always pass `--repo {owner}/{repo}` explicitly, never rely on git context to resolve the repo.
|
|
3
2
|
|
|
4
3
|
---
|
|
5
4
|
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
GitLab data comes from the `glab` CLI; a page fetch of gitlab.com is denied (pc-system-reminders). If `glab` is unavailable, report it as a blocker.
|
|
2
|
-
Always pass `--repo {owner}/{repo}` explicitly, never rely on git context to resolve the repo.
|
|
1
|
+
GitLab data comes from the `glab` CLI; a page fetch of gitlab.com is denied (pc-system-reminders). If `glab` is unavailable, report it as a blocker. Always pass `--repo {owner}/{repo}` explicitly, never rely on git context to resolve the repo.
|
|
3
2
|
|
|
4
3
|
---
|
|
5
4
|
|
|
@@ -1,69 +1,68 @@
|
|
|
1
|
-
GitHub data comes from the `gh` CLI; a page fetch of github.com is denied (pc-system-reminders). If `gh` is unavailable, report it as a blocker.
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
git
|
|
32
|
-
git
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
--
|
|
41
|
-
--
|
|
42
|
-
--
|
|
43
|
-
--
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
1
|
+
GitHub data comes from the `gh` CLI; a page fetch of github.com is denied (pc-system-reminders). If `gh` is unavailable, report it as a blocker. Always pass `--repo {owner}/{repo}` explicitly, never rely on git context to resolve the repo.
|
|
2
|
+
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
### Step 1: Verify feature branch
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
BRANCH="$(git branch --show-current)"
|
|
9
|
+
DEFAULT_BRANCH="$(git symbolic-ref --short refs/remotes/origin/HEAD 2>/dev/null | sed 's|^origin/||')"
|
|
10
|
+
[ -z "$DEFAULT_BRANCH" ] && DEFAULT_BRANCH="main"
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
`$BRANCH` must be a work branch (`feature/*` or `bugfix/*`: the `pc-plan-apply` skill creates `feature/{change-slug}`). Never push the default branch.
|
|
14
|
+
|
|
15
|
+
### Step 2: Capture screenshots (if UI changes exist)
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
browser_navigate url="http://localhost:{port}/{route}"
|
|
19
|
+
browser_wait ms=2000
|
|
20
|
+
browser_screenshot
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Save to: `openspec/changes/{change-name}/images/{feature}.png`
|
|
24
|
+
|
|
25
|
+
### Step 3: Commit and push
|
|
26
|
+
|
|
27
|
+
The `pc-plan-apply` skill already committed each task group: usually only screenshots or small residuals remain. Stage the paths you actually changed; unscoped staging is denied (`pc-system-reminders`):
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
git add openspec/changes/{change-name}/images/ # plus any other paths you actually changed
|
|
31
|
+
git commit -m "feat({scope}): {description} (#{id})" # only if there is something to commit
|
|
32
|
+
git push -u origin "$BRANCH"
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### Step 4: Create PR
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
gh pr create \
|
|
39
|
+
--repo {owner}/{repo} \
|
|
40
|
+
--base "$DEFAULT_BRANCH" \
|
|
41
|
+
--head "$BRANCH" \
|
|
42
|
+
--title "feat({scope}): {title} (#{id})" \
|
|
43
|
+
--body "{description}"
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### Step 5: Post screenshot comment
|
|
47
|
+
|
|
48
|
+
Resolve commit SHA (the commit that includes screenshots):
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
git rev-parse HEAD
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Build blob URL for each image with `?raw=true` (a plain blob URL renders the GitHub HTML page, not the image, inside `![...]()`):
|
|
55
|
+
|
|
56
|
+
```
|
|
57
|
+
https://github.com/{owner}/{repo}/blob/{sha}/openspec/changes/{change}/images/{file}.png?raw=true
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Note: on private repos the embedded image is only visible to users with repo access.
|
|
61
|
+
|
|
62
|
+
Post comment:
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
gh pr comment {pr-number} --repo {owner}/{repo} --body $'## Screenshots\n\n'
|
|
66
|
+
```
|
|
67
|
+
|
|
69
68
|
---
|
|
@@ -1,86 +1,85 @@
|
|
|
1
|
-
GitLab data comes from the `glab` CLI; a page fetch of gitlab.com is denied (pc-system-reminders). If `glab` is unavailable, report it as a blocker.
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
git
|
|
32
|
-
git
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
--
|
|
55
|
-
--
|
|
56
|
-
--
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
--
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
1
|
+
GitLab data comes from the `glab` CLI; a page fetch of gitlab.com is denied (pc-system-reminders). If `glab` is unavailable, report it as a blocker. Always pass `--repo {owner}/{repo}` explicitly, never rely on git context to resolve the repo.
|
|
2
|
+
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
### Step 1: Verify feature branch
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
BRANCH="$(git branch --show-current)"
|
|
9
|
+
DEFAULT_BRANCH="$(git symbolic-ref --short refs/remotes/origin/HEAD 2>/dev/null | sed 's|^origin/||')"
|
|
10
|
+
[ -z "$DEFAULT_BRANCH" ] && DEFAULT_BRANCH="main"
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
`$BRANCH` must be a work branch (`feature/*` or `bugfix/*`: the `pc-plan-apply` skill creates `feature/{change-slug}`). Never push the default branch.
|
|
14
|
+
|
|
15
|
+
### Step 2: Capture screenshots (if UI changes exist)
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
browser_navigate url="http://localhost:{port}/{route}"
|
|
19
|
+
browser_wait ms=2000
|
|
20
|
+
browser_screenshot
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Save to: `openspec/changes/{change-name}/images/{feature}.png`
|
|
24
|
+
|
|
25
|
+
### Step 3: Commit and push
|
|
26
|
+
|
|
27
|
+
The `pc-plan-apply` skill already committed each task group: usually only screenshots or small residuals remain. Stage the paths you actually changed; unscoped staging is denied (`pc-system-reminders`):
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
git add openspec/changes/{change-name}/images/ # plus any other paths you actually changed
|
|
31
|
+
git commit -m "{change}: {summary}" # only if there is something to commit
|
|
32
|
+
git push -u origin "$BRANCH"
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### Step 4: Upload screenshots (if any)
|
|
36
|
+
|
|
37
|
+
If screenshots exist, upload them so they can be referenced in the MR description:
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
glab api --method POST "projects/:id/uploads" -f "file=@openspec/changes/{change-name}/images/{feature}.png"
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
(`:id` is glab's placeholder for the current project: this is the one sanctioned use of git context in this skill.)
|
|
44
|
+
|
|
45
|
+
Parse the returned `markdown` field: use it to embed the image in the MR description. If the upload fails (the endpoint needs multipart form data and `-f` support varies by glab version), fall back to referencing the image committed on the branch instead.
|
|
46
|
+
|
|
47
|
+
If no UI changes, skip this step.
|
|
48
|
+
|
|
49
|
+
### Step 5: Create Merge Request
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
glab mr create \
|
|
53
|
+
--source-branch "$BRANCH" \
|
|
54
|
+
--target-branch "$DEFAULT_BRANCH" \
|
|
55
|
+
--title "{title}" \
|
|
56
|
+
--description "Closes {issue-link}
|
|
57
|
+
|
|
58
|
+
## Summary
|
|
59
|
+
{summary from proposal.md}
|
|
60
|
+
|
|
61
|
+
## Changes
|
|
62
|
+
{key changes from tasks.md}
|
|
63
|
+
|
|
64
|
+
## Test plan
|
|
65
|
+
- [ ] {checklist of manual verification steps}
|
|
66
|
+
{screenshots if available}" \
|
|
67
|
+
--remove-source-branch \
|
|
68
|
+
--squash-before-merge
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Do NOT use `--yes` unless running in autopilot/non-interactive mode.
|
|
72
|
+
|
|
73
|
+
### Step 6: Report
|
|
74
|
+
|
|
75
|
+
Display:
|
|
76
|
+
|
|
77
|
+
```text
|
|
78
|
+
Merge Request created
|
|
79
|
+
MR: {mr-url}
|
|
80
|
+
Title: {title}
|
|
81
|
+
Source: {branch}
|
|
82
|
+
Target: {default-branch}
|
|
83
|
+
```
|
|
84
|
+
|
|
86
85
|
---
|
|
@@ -25,10 +25,7 @@ Each indicator must be:
|
|
|
25
25
|
|
|
26
26
|
## Worked example
|
|
27
27
|
|
|
28
|
-
One project's calculation-integrity indicator, for shape only. Replace it with
|
|
29
|
-
this repository's own: edits between the `PC-PROJECT-EXAMPLE` markers are
|
|
30
|
-
carried over when the harness updates, and anything outside them is replaced by
|
|
31
|
-
the shipped version.
|
|
28
|
+
One project's calculation-integrity indicator, for shape only. Replace it with this repository's own: edits between the `PC-PROJECT-EXAMPLE` markers are carried over when the harness updates, and anything outside them is replaced by the shipped version.
|
|
32
29
|
|
|
33
30
|
<!-- PC-PROJECT-EXAMPLE-START -->
|
|
34
31
|
```markdown
|