@plainconceptsplatform/agent-harness 2.5.2 → 2.6.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.
@@ -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
- Always pass `--repo {owner}/{repo}` (or `repos/{owner}/{repo}` for `gh api`) explicitly.
3
-
4
- Publish one status comment for every manifest. A `blocked` or `failed` manifest must include its status and reason, never a success claim.
5
-
6
- ### Step 1 — Build commit-pinned repository links
7
-
8
- 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`:
9
-
10
- ```bash
11
- SHA="$(git log -n 1 --format=%H -- '{asset-path}')" # the commit that added this asset
12
- [ -z "$SHA" ] && echo "asset not committed: {asset-path}" && exit-skip
13
- gh api "repos/{owner}/{repo}/contents/{asset-path}?ref=$SHA" --silent # 404 → not pushed yet → skip embedding
14
- ```
15
-
16
- 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.
17
-
18
- ### Step 2 — Build the comment body with a stable marker (idempotent)
19
-
20
- Prefix the body with a hidden marker so re-runs update the same comment instead of piling on:
21
-
22
- ```
23
- <!-- pc-visual-evidence:{change-id} -->
24
- <!-- pc-visual-evidence-status:{status} -->
25
-
26
- Status: `{status}`
27
-
28
- {reason?}
29
-
30
- Manifest: {commit-pinned evidence.json link}
31
-
32
- Assets: {commit-pinned asset links}
33
-
34
- {prMarkdown}
35
- ```
36
-
37
- ### Step 3 — Upsert the comment on BOTH the issue and the PR
38
-
39
- 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:
40
-
41
- ```bash
42
- # find existing
43
- ID="$(gh api "repos/{owner}/{repo}/issues/{number}/comments" --paginate --jq \
44
- '.[] | select(.body | contains("<!-- pc-visual-evidence:{change-id} -->")) | .id' | head -1)"
45
-
46
- if [ -n "$ID" ]; then
47
- gh api --method PATCH "repos/{owner}/{repo}/issues/comments/$ID" -f body="$BODY" --silent
48
- else
49
- gh api --method POST "repos/{owner}/{repo}/issues/{number}/comments" -f body="$BODY" --silent
50
- fi
51
- ```
52
-
53
- - Text-only (no verified image, or `default` mode / nothing pushed): drop the image lines, keep the summary (tasks N/N, verification result, commits).
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
- Always pass `--repo {owner}/{repo}` explicitly, never rely on git context to resolve the repo.
3
-
4
- ---
5
-
6
- ### Step 1: Verify feature branch
7
-
8
- ```bash
9
- BRANCH="$(git branch --show-current)"
10
- DEFAULT_BRANCH="$(git symbolic-ref --short refs/remotes/origin/HEAD 2>/dev/null | sed 's|^origin/||')"
11
- [ -z "$DEFAULT_BRANCH" ] && DEFAULT_BRANCH="main"
12
- ```
13
-
14
- `$BRANCH` must be a work branch (`feature/*` or `bugfix/*`: the `pc-plan-apply` skill creates `feature/{change-slug}`). Never push the default branch.
15
-
16
- ### Step 2: Capture screenshots (if UI changes exist)
17
-
18
- ```bash
19
- browser_navigate url="http://localhost:{port}/{route}"
20
- browser_wait ms=2000
21
- browser_screenshot
22
- ```
23
-
24
- Save to: `openspec/changes/{change-name}/images/{feature}.png`
25
-
26
- ### Step 3: Commit and push
27
-
28
- 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`):
29
-
30
- ```bash
31
- git add openspec/changes/{change-name}/images/ # plus any other paths you actually changed
32
- git commit -m "feat({scope}): {description} (#{id})" # only if there is something to commit
33
- git push -u origin "$BRANCH"
34
- ```
35
-
36
- ### Step 4: Create PR
37
-
38
- ```bash
39
- gh pr create \
40
- --repo {owner}/{repo} \
41
- --base "$DEFAULT_BRANCH" \
42
- --head "$BRANCH" \
43
- --title "feat({scope}): {title} (#{id})" \
44
- --body "{description}"
45
- ```
46
-
47
- ### Step 5: Post screenshot comment
48
-
49
- Resolve commit SHA (the commit that includes screenshots):
50
-
51
- ```bash
52
- git rev-parse HEAD
53
- ```
54
-
55
- Build blob URL for each image with `?raw=true` (a plain blob URL renders the GitHub HTML page, not the image, inside `![...]()`):
56
-
57
- ```
58
- https://github.com/{owner}/{repo}/blob/{sha}/openspec/changes/{change}/images/{file}.png?raw=true
59
- ```
60
-
61
- Note: on private repos the embedded image is only visible to users with repo access.
62
-
63
- Post comment:
64
-
65
- ```bash
66
- gh pr comment {pr-number} --repo {owner}/{repo} --body $'## Screenshots\n\n![{feature}]({blob-url})'
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![{feature}]({blob-url})'
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
- Always pass `--repo {owner}/{repo}` explicitly, never rely on git context to resolve the repo.
3
-
4
- ---
5
-
6
- ### Step 1: Verify feature branch
7
-
8
- ```bash
9
- BRANCH="$(git branch --show-current)"
10
- DEFAULT_BRANCH="$(git symbolic-ref --short refs/remotes/origin/HEAD 2>/dev/null | sed 's|^origin/||')"
11
- [ -z "$DEFAULT_BRANCH" ] && DEFAULT_BRANCH="main"
12
- ```
13
-
14
- `$BRANCH` must be a work branch (`feature/*` or `bugfix/*`: the `pc-plan-apply` skill creates `feature/{change-slug}`). Never push the default branch.
15
-
16
- ### Step 2: Capture screenshots (if UI changes exist)
17
-
18
- ```bash
19
- browser_navigate url="http://localhost:{port}/{route}"
20
- browser_wait ms=2000
21
- browser_screenshot
22
- ```
23
-
24
- Save to: `openspec/changes/{change-name}/images/{feature}.png`
25
-
26
- ### Step 3: Commit and push
27
-
28
- 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`):
29
-
30
- ```bash
31
- git add openspec/changes/{change-name}/images/ # plus any other paths you actually changed
32
- git commit -m "{change}: {summary}" # only if there is something to commit
33
- git push -u origin "$BRANCH"
34
- ```
35
-
36
- ### Step 4: Upload screenshots (if any)
37
-
38
- If screenshots exist, upload them so they can be referenced in the MR description:
39
-
40
- ```bash
41
- glab api --method POST "projects/:id/uploads" -f "file=@openspec/changes/{change-name}/images/{feature}.png"
42
- ```
43
-
44
- (`:id` is glab's placeholder for the current project: this is the one sanctioned use of git context in this skill.)
45
-
46
- 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.
47
-
48
- If no UI changes, skip this step.
49
-
50
- ### Step 5: Create Merge Request
51
-
52
- ```bash
53
- glab mr create \
54
- --source-branch "$BRANCH" \
55
- --target-branch "$DEFAULT_BRANCH" \
56
- --title "{title}" \
57
- --description "Closes {issue-link}
58
-
59
- ## Summary
60
- {summary from proposal.md}
61
-
62
- ## Changes
63
- {key changes from tasks.md}
64
-
65
- ## Test plan
66
- - [ ] {checklist of manual verification steps}
67
- {screenshots if available}" \
68
- --remove-source-branch \
69
- --squash-before-merge
70
- ```
71
-
72
- Do NOT use `--yes` unless running in autopilot/non-interactive mode.
73
-
74
- ### Step 6: Report
75
-
76
- Display:
77
-
78
- ```text
79
- Merge Request created
80
- MR: {mr-url}
81
- Title: {title}
82
- Source: {branch}
83
- Target: {default-branch}
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