@plainconceptsplatform/agent-harness 2.0.0 → 2.0.1

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.
Files changed (116) hide show
  1. package/README.md +423 -419
  2. package/package.json +3 -3
  3. package/src/commands/join.js +244 -244
  4. package/src/commands/shared.js +27 -27
  5. package/src/commands/single.js +79 -79
  6. package/src/commands/update.js +109 -109
  7. package/src/commands/wizard.js +134 -134
  8. package/src/content/.agents/skills/browser-automation/SKILL.md +66 -66
  9. package/src/content/.agents/skills/pc-guardrails-generic/SKILL.md +68 -68
  10. package/src/content/.agents/skills/pc-guardrails-project/SKILL.md +8 -8
  11. package/src/content/.agents/skills/pc-make-architecture/SKILL.md +51 -51
  12. package/src/content/.agents/skills/pc-make-architecture/structure-template.md +38 -38
  13. package/src/content/.agents/skills/pc-make-design/SKILL.md +68 -68
  14. package/src/content/.agents/skills/pc-make-engineer/SKILL.md +219 -219
  15. package/src/content/.agents/skills/pc-make-engineer/signal-mapping.md +68 -68
  16. package/src/content/.agents/skills/pc-make-engineer/template.md +81 -81
  17. package/src/content/.agents/skills/pc-make-evidence-scaffold/SKILL.md +18 -18
  18. package/src/content/.agents/skills/pc-make-evidence-scaffold/evidence-contract.md +29 -29
  19. package/src/content/.agents/skills/pc-make-guardrails/SKILL.md +74 -74
  20. package/src/content/.agents/skills/pc-make-guardrails/category-reference.md +68 -68
  21. package/src/content/.agents/skills/pc-make-merge-risk-assess/SKILL.md +70 -70
  22. package/src/content/.agents/skills/pc-make-merge-risk-assess/category-reference.md +98 -98
  23. package/src/content/.agents/skills/pc-make-user-model/SKILL.md +66 -66
  24. package/src/content/.agents/skills/pc-ops-evidence/SKILL.md +127 -127
  25. package/src/content/.agents/skills/pc-ops-ship/SKILL.md +18 -18
  26. package/src/content/.agents/skills/pc-plan-apply/SKILL.md +83 -83
  27. package/src/content/.agents/skills/pc-plan-apply/simple-mode.md +21 -21
  28. package/src/content/.agents/skills/pc-plan-archive/SKILL.md +63 -63
  29. package/src/content/.agents/skills/pc-plan-explore/SKILL.md +9 -9
  30. package/src/content/.agents/skills/pc-plan-goal/SKILL.md +94 -94
  31. package/src/content/.agents/skills/pc-plan-goal/branching.md +30 -30
  32. package/src/content/.agents/skills/pc-plan-goal/failure-policy.md +30 -30
  33. package/src/content/.agents/skills/pc-plan-goal/output-mode.md +9 -9
  34. package/src/content/.agents/skills/pc-plan-goal/output.md +68 -68
  35. package/src/content/.agents/skills/pc-plan-propose/SKILL.md +125 -125
  36. package/src/content/.agents/skills/pc-plan-propose/task-annotation.md +39 -39
  37. package/src/content/.agents/skills/pc-plan-quick/SKILL.md +62 -62
  38. package/src/content/.agents/skills/pc-plan-story/SKILL.md +146 -146
  39. package/src/content/.agents/skills/pc-repo-audit/SKILL.md +44 -44
  40. package/src/content/.agents/skills/pc-repo-help/SKILL.md +91 -91
  41. package/src/content/.agents/skills/pc-repo-initialize/SKILL.md +130 -130
  42. package/src/content/.agents/skills/pc-repo-onboard/SKILL.md +87 -87
  43. package/src/content/.agents/skills/pc-repo-verify/SKILL.md +34 -34
  44. package/src/content/.agents/skills/pc-userstory-az/SKILL.md +157 -157
  45. package/src/content/.agents/skills/pc-userstory-browser/SKILL.md +132 -132
  46. package/src/content/.agents/skills/pc-userstory-gh/SKILL.md +120 -120
  47. package/src/content/.agents/skills/pc-userstory-jira/SKILL.md +131 -131
  48. package/src/content/.opencode/_gitignore +7 -7
  49. package/src/content/.opencode/commands/init.md +5 -5
  50. package/src/content/.opencode/commands/make-architecture.md +5 -5
  51. package/src/content/.opencode/commands/make-design.md +5 -5
  52. package/src/content/.opencode/commands/make-engineer.md +5 -5
  53. package/src/content/.opencode/commands/make-evidence-scaffold.md +5 -5
  54. package/src/content/.opencode/commands/make-guardrails.md +5 -5
  55. package/src/content/.opencode/commands/make-user-model.md +5 -5
  56. package/src/content/.opencode/commands/ops-backlog.md +10 -10
  57. package/src/content/.opencode/commands/ops-evidence.md +9 -9
  58. package/src/content/.opencode/commands/ops-review.md +8 -8
  59. package/src/content/.opencode/commands/ops-ship.md +9 -9
  60. package/src/content/.opencode/commands/plan-apply.md +9 -9
  61. package/src/content/.opencode/commands/plan-archive.md +5 -5
  62. package/src/content/.opencode/commands/plan-explore.md +9 -9
  63. package/src/content/.opencode/commands/plan-goal.md +5 -5
  64. package/src/content/.opencode/commands/plan-propose.md +9 -9
  65. package/src/content/.opencode/commands/plan-quick.md +5 -5
  66. package/src/content/.opencode/commands/plan-story.md +9 -9
  67. package/src/content/.opencode/commands/repo-audit.md +5 -5
  68. package/src/content/.opencode/commands/repo-help.md +5 -5
  69. package/src/content/.opencode/commands/repo-initialize.md +5 -5
  70. package/src/content/.opencode/commands/repo-onboard.md +5 -5
  71. package/src/content/.opencode/commands/repo-verify.md +5 -5
  72. package/src/content/.opencode/plugins/pc-subagent-monitor.js +139 -139
  73. package/src/content/.opencode/plugins/pc-subagent-tiers.js +179 -179
  74. package/src/content/.opencode/plugins/pc-system-reminders.js +96 -96
  75. package/src/content/.opencode/tui/pc-subagents.tsx +98 -98
  76. package/src/content/.opencode/tui.json +6 -6
  77. package/src/content/AGENTS.md +71 -71
  78. package/src/fragments/archive/az.md +95 -95
  79. package/src/fragments/archive/gh.md +94 -94
  80. package/src/fragments/archive/gl.md +94 -94
  81. package/src/fragments/archive/none.md +73 -73
  82. package/src/fragments/guardrails/codegraph.md +7 -7
  83. package/src/fragments/guardrails/humanizer.md +4 -4
  84. package/src/fragments/guardrails/memory.md +4 -4
  85. package/src/fragments/guardrails/rtk.md +3 -3
  86. package/src/fragments/guardrails/simple-english.md +4 -4
  87. package/src/fragments/ops-backlog/az.md +28 -28
  88. package/src/fragments/ops-backlog/gh.md +29 -29
  89. package/src/fragments/ops-backlog/jira.md +28 -28
  90. package/src/fragments/ops-evidence/az.md +41 -41
  91. package/src/fragments/ops-evidence/gh.md +53 -53
  92. package/src/fragments/ops-evidence/jira.md +38 -38
  93. package/src/fragments/ops-review/az.md +62 -62
  94. package/src/fragments/ops-review/gh.md +52 -52
  95. package/src/fragments/ops-review/gl.md +56 -56
  96. package/src/fragments/ops-ship/az.md +80 -80
  97. package/src/fragments/ops-ship/gh.md +68 -68
  98. package/src/fragments/ops-ship/gl.md +85 -85
  99. package/src/index.js +107 -107
  100. package/src/presets/agents-content.json +53 -53
  101. package/src/presets/models.json +68 -68
  102. package/src/steps/copy/agents.js +118 -118
  103. package/src/steps/copy/commands.js +91 -91
  104. package/src/steps/copy/fullstack-engineer.js +83 -83
  105. package/src/steps/copy/index.js +88 -88
  106. package/src/steps/copy/opencode-json.js +129 -129
  107. package/src/steps/copy/skills.js +196 -196
  108. package/src/steps/metadata/index.js +108 -108
  109. package/src/steps/models/write.js +34 -34
  110. package/src/steps/optimization/patch-guardrails.js +108 -108
  111. package/src/utils/copy.js +108 -108
  112. package/src/utils/legacy-check.js +30 -30
  113. package/src/utils/models-cache.js +58 -58
  114. package/src/utils/paths.js +64 -64
  115. package/src/utils/update-manifest.js +49 -49
  116. package/src/content/.opencode/plugins/pc-system-reminders.test.js +0 -35
@@ -1,30 +1,30 @@
1
- **ALL GitHub data MUST come from `gh` CLI. NEVER use webfetch, HTTP requests, or browser MCP tools for GitHub operations, even if gh CLI fails. If `gh` is unavailable, report 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: Parse input
7
-
8
- `$ARGUMENTS` is the issue title/description. If it contains a title and body separated by a newline or `---`, split them. Otherwise use the full text as the title with an empty body.
9
-
10
- ### Step 2: Create issue
11
-
12
- ```bash
13
- gh issue create \
14
- --repo {owner}/{repo} \
15
- --title "{title}" \
16
- --body "{body}"
17
- ```
18
-
19
- ### Step 3: Report
20
-
21
- ```text
22
- Issue created
23
- URL: {issue-url}
24
- Number: #{number}
25
- Title: {title}
26
- ```
27
-
28
- Tell the user: "Use `/plan-propose {issue-url}` to turn this into a plan."
29
-
1
+ **ALL GitHub data MUST come from `gh` CLI. NEVER use webfetch, HTTP requests, or browser MCP tools for GitHub operations, even if gh CLI fails. If `gh` is unavailable, report 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: Parse input
7
+
8
+ `$ARGUMENTS` is the issue title/description. If it contains a title and body separated by a newline or `---`, split them. Otherwise use the full text as the title with an empty body.
9
+
10
+ ### Step 2: Create issue
11
+
12
+ ```bash
13
+ gh issue create \
14
+ --repo {owner}/{repo} \
15
+ --title "{title}" \
16
+ --body "{body}"
17
+ ```
18
+
19
+ ### Step 3: Report
20
+
21
+ ```text
22
+ Issue created
23
+ URL: {issue-url}
24
+ Number: #{number}
25
+ Title: {title}
26
+ ```
27
+
28
+ Tell the user: "Use `/plan-propose {issue-url}` to turn this into a plan."
29
+
30
30
  ---
@@ -1,29 +1,29 @@
1
- **NEVER use browser tools to navigate to atlassian.net: use `acli` CLI only.**
2
-
3
- ---
4
-
5
- ### Step 1: Parse input
6
-
7
- `$ARGUMENTS` is the issue title/description. If it contains a title and body separated by a newline or `---`, split them. Otherwise use the full text as the title with an empty body.
8
-
9
- ### Step 2: Create issue
10
-
11
- ```bash
12
- acli jira issue create \
13
- --summary "{title}" \
14
- --description "{body}" \
15
- --type "Story"
16
- ```
17
-
18
- ### Step 3: Report
19
-
20
- ```text
21
- Issue created
22
- Key: {key}
23
- Title: {title}
24
- URL: {issue-url}
25
- ```
26
-
27
- Tell the user: "Use `/plan-propose {issue-url}` to turn this into a plan."
28
-
1
+ **NEVER use browser tools to navigate to atlassian.net: use `acli` CLI only.**
2
+
3
+ ---
4
+
5
+ ### Step 1: Parse input
6
+
7
+ `$ARGUMENTS` is the issue title/description. If it contains a title and body separated by a newline or `---`, split them. Otherwise use the full text as the title with an empty body.
8
+
9
+ ### Step 2: Create issue
10
+
11
+ ```bash
12
+ acli jira issue create \
13
+ --summary "{title}" \
14
+ --description "{body}" \
15
+ --type "Story"
16
+ ```
17
+
18
+ ### Step 3: Report
19
+
20
+ ```text
21
+ Issue created
22
+ Key: {key}
23
+ Title: {title}
24
+ URL: {issue-url}
25
+ ```
26
+
27
+ Tell the user: "Use `/plan-propose {issue-url}` to turn this into a plan."
28
+
29
29
  ---
@@ -1,41 +1,41 @@
1
- **Browser MCP tools are FORBIDDEN for all Azure DevOps operations. Use `az boards` CLI only. If `az` is unavailable, skip publishing (report it) — do not fail the pipeline unless the caller declared publishing a ship gate.**
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 — Image hosting caveat
6
-
7
- Azure DevOps discussion comments do not render an image from a repo blob URL the way GitHub does, and `az boards` cannot upload an attachment inline. Use text evidence and derive a commit-pinned repository URL from `git remote get-url origin` when possible. Otherwise include the committed asset path, branch, and SHA.
8
-
9
- ```
10
- Screenshot committed at: {asset-path} (branch {branch}, commit {sha})
11
- ```
12
-
13
- ### Step 2 — Build the comment with a stable marker (idempotent)
14
-
15
- ```
16
- <!-- pc-visual-evidence:{change-id} -->
17
-
18
- Status: `{status}`
19
-
20
- {reason?}
21
-
22
- Manifest and assets: {commit-pinned links when available, otherwise committed paths and SHA}
23
-
24
- {prMarkdown}
25
-
26
- {image-line?}
27
- ```
28
-
29
- ### Step 3 — Upsert the discussion comment on the work item (and the PR when provided)
30
-
31
- `az boards work-item update --discussion` appends a comment; to stay idempotent, first read existing discussion comments and skip if one already carries the marker for this change id, otherwise post:
32
-
33
- ```bash
34
- # best-effort existing-comment check via the work-item comments API
35
- az boards work-item show --id {work-item-id} --query 'fields."System.History"' -o tsv 2>/dev/null | grep -q "pc-visual-evidence:{change-id}" \
36
- || az boards work-item update --id {work-item-id} --discussion "$BODY"
37
- ```
38
-
39
- When a PR number is provided, also add the same body as a PR thread comment (`az repos pr` thread APIs) if available.
40
-
41
- - If a comment call fails: report it. Fail the run ONLY when publishing was declared a ship gate; otherwise continue.
1
+ **Browser MCP tools are FORBIDDEN for all Azure DevOps operations. Use `az boards` CLI only. If `az` is unavailable, skip publishing (report it) — do not fail the pipeline unless the caller declared publishing a ship gate.**
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 — Image hosting caveat
6
+
7
+ Azure DevOps discussion comments do not render an image from a repo blob URL the way GitHub does, and `az boards` cannot upload an attachment inline. Use text evidence and derive a commit-pinned repository URL from `git remote get-url origin` when possible. Otherwise include the committed asset path, branch, and SHA.
8
+
9
+ ```
10
+ Screenshot committed at: {asset-path} (branch {branch}, commit {sha})
11
+ ```
12
+
13
+ ### Step 2 — Build the comment with a stable marker (idempotent)
14
+
15
+ ```
16
+ <!-- pc-visual-evidence:{change-id} -->
17
+
18
+ Status: `{status}`
19
+
20
+ {reason?}
21
+
22
+ Manifest and assets: {commit-pinned links when available, otherwise committed paths and SHA}
23
+
24
+ {prMarkdown}
25
+
26
+ {image-line?}
27
+ ```
28
+
29
+ ### Step 3 — Upsert the discussion comment on the work item (and the PR when provided)
30
+
31
+ `az boards work-item update --discussion` appends a comment; to stay idempotent, first read existing discussion comments and skip if one already carries the marker for this change id, otherwise post:
32
+
33
+ ```bash
34
+ # best-effort existing-comment check via the work-item comments API
35
+ az boards work-item show --id {work-item-id} --query 'fields."System.History"' -o tsv 2>/dev/null | grep -q "pc-visual-evidence:{change-id}" \
36
+ || az boards work-item update --id {work-item-id} --discussion "$BODY"
37
+ ```
38
+
39
+ When a PR number is provided, also add the same body as a PR thread comment (`az repos pr` thread APIs) if available.
40
+
41
+ - If a comment call fails: report it. Fail the run ONLY when publishing was declared a ship gate; otherwise continue.
@@ -1,53 +1,53 @@
1
- **ALL GitHub data MUST come from `gh` CLI. NEVER use webfetch, HTTP requests, or browser MCP tools for GitHub. If `gh` is unavailable, skip publishing (report it) — do not fail the pipeline over it 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
-
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
+ **ALL GitHub data MUST come from `gh` CLI. NEVER use webfetch, HTTP requests, or browser MCP tools for GitHub. If `gh` is unavailable, skip publishing (report it) — do not fail the pipeline over it 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
+
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,38 +1,38 @@
1
- **NEVER use browser tools to navigate to atlassian.net: use `acli` CLI only. If `acli` is unavailable, skip publishing (report it) — do not fail the pipeline unless the caller declared publishing a ship gate.**
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 — Image hosting caveat
6
-
7
- Jira comments cannot embed an image from a repo blob URL, and `acli` does not upload attachments inline. Use text evidence and derive a commit-pinned repository URL from `git remote get-url origin` when possible. Otherwise include the committed asset path, branch, and SHA:
8
-
9
- ```
10
- Screenshot committed at: {asset-path} (branch {branch}, commit {sha})
11
- ```
12
-
13
- ### Step 2 — Build the comment with a stable marker (idempotent)
14
-
15
- ```
16
- <!-- pc-visual-evidence:{change-id} -->
17
-
18
- Status: `{status}`
19
-
20
- {reason?}
21
-
22
- Manifest and assets: {commit-pinned links when available, otherwise committed paths and SHA}
23
-
24
- {prMarkdown}
25
-
26
- {image-line?}
27
- ```
28
-
29
- ### Step 3 — Upsert the comment on the issue
30
-
31
- Keep it idempotent: list existing comments and skip if one already carries the marker for this change id, otherwise add:
32
-
33
- ```bash
34
- acli jira issue comment list --key {issue-key} 2>/dev/null | grep -q "pc-visual-evidence:{change-id}" \
35
- || acli jira issue comment --key {issue-key} --body "$BODY"
36
- ```
37
-
38
- - If the comment command fails: report it. Fail the run ONLY when publishing was declared a ship gate; otherwise continue.
1
+ **NEVER use browser tools to navigate to atlassian.net: use `acli` CLI only. If `acli` is unavailable, skip publishing (report it) — do not fail the pipeline unless the caller declared publishing a ship gate.**
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 — Image hosting caveat
6
+
7
+ Jira comments cannot embed an image from a repo blob URL, and `acli` does not upload attachments inline. Use text evidence and derive a commit-pinned repository URL from `git remote get-url origin` when possible. Otherwise include the committed asset path, branch, and SHA:
8
+
9
+ ```
10
+ Screenshot committed at: {asset-path} (branch {branch}, commit {sha})
11
+ ```
12
+
13
+ ### Step 2 — Build the comment with a stable marker (idempotent)
14
+
15
+ ```
16
+ <!-- pc-visual-evidence:{change-id} -->
17
+
18
+ Status: `{status}`
19
+
20
+ {reason?}
21
+
22
+ Manifest and assets: {commit-pinned links when available, otherwise committed paths and SHA}
23
+
24
+ {prMarkdown}
25
+
26
+ {image-line?}
27
+ ```
28
+
29
+ ### Step 3 — Upsert the comment on the issue
30
+
31
+ Keep it idempotent: list existing comments and skip if one already carries the marker for this change id, otherwise add:
32
+
33
+ ```bash
34
+ acli jira issue comment list --key {issue-key} 2>/dev/null | grep -q "pc-visual-evidence:{change-id}" \
35
+ || acli jira issue comment --key {issue-key} --body "$BODY"
36
+ ```
37
+
38
+ - If the comment command fails: report it. Fail the run ONLY when publishing was declared a ship gate; otherwise continue.
@@ -1,63 +1,63 @@
1
- **Browser MCP tools are FORBIDDEN for all Azure DevOps operations.**
2
-
3
- ---
4
-
5
- ### Step 1: Find PRs
6
-
7
- If PR link provided, extract ID from URL. Otherwise:
8
-
9
- ```bash
10
- az repos pr list --repository {repo} --status active --top 1
11
- ```
12
-
13
- ### Step 2: Read comment threads
14
-
15
- ```bash
16
- az devops invoke \
17
- --area git --resource pullRequestThreads \
18
- --route-parameters project={project} repositoryId={repo} pullRequestId={id} \
19
- --http-method GET --api-version 7.1
20
- ```
21
-
22
- ### Step 3: Categorize feedback
23
-
24
- | Category | Description | Action |
25
- | ------------- | ----------------------------------- | ----------------------------------- |
26
- | `code-change` | Reviewer requests code modification | Return to lead to spawn specialists |
27
- | `spec-update` | Affects proposal, design, or tasks | Update openspec artifacts |
28
- | `question` | Reviewer asks a question | Reply with answer |
29
- | `resolved` | Thread already resolved | Skip |
30
-
31
- ### Step 4: Update openspec (if spec-update)
32
-
33
- ```bash
34
- git branch --show-current
35
- # feature/193208-roles-crud → change: us-193208-roles-crud
36
- ```
37
-
38
- Update: `openspec/changes/{change}/proposal.md`, `design.md`, or `tasks.md` as appropriate.
39
-
40
- ### Step 5: Reply to each thread
41
-
42
- ```bash
43
- az devops invoke \
44
- --area git --resource pullRequestThreadComments \
45
- --route-parameters project={project} repositoryId={repo} pullRequestId={id} threadId={tid} \
46
- --http-method POST --api-version 7.1 --in-file reply.json
47
- ```
48
-
49
- `reply.json`:
50
-
51
- ```json
52
- {
53
- "comments": [
54
- {
55
- "parentCommentId": 1,
56
- "content": "Acknowledged, applying this change now.",
57
- "commentType": 1
58
- }
59
- ]
60
- }
61
- ```
62
-
1
+ **Browser MCP tools are FORBIDDEN for all Azure DevOps operations.**
2
+
3
+ ---
4
+
5
+ ### Step 1: Find PRs
6
+
7
+ If PR link provided, extract ID from URL. Otherwise:
8
+
9
+ ```bash
10
+ az repos pr list --repository {repo} --status active --top 1
11
+ ```
12
+
13
+ ### Step 2: Read comment threads
14
+
15
+ ```bash
16
+ az devops invoke \
17
+ --area git --resource pullRequestThreads \
18
+ --route-parameters project={project} repositoryId={repo} pullRequestId={id} \
19
+ --http-method GET --api-version 7.1
20
+ ```
21
+
22
+ ### Step 3: Categorize feedback
23
+
24
+ | Category | Description | Action |
25
+ | ------------- | ----------------------------------- | ----------------------------------- |
26
+ | `code-change` | Reviewer requests code modification | Return to lead to spawn specialists |
27
+ | `spec-update` | Affects proposal, design, or tasks | Update openspec artifacts |
28
+ | `question` | Reviewer asks a question | Reply with answer |
29
+ | `resolved` | Thread already resolved | Skip |
30
+
31
+ ### Step 4: Update openspec (if spec-update)
32
+
33
+ ```bash
34
+ git branch --show-current
35
+ # feature/193208-roles-crud → change: us-193208-roles-crud
36
+ ```
37
+
38
+ Update: `openspec/changes/{change}/proposal.md`, `design.md`, or `tasks.md` as appropriate.
39
+
40
+ ### Step 5: Reply to each thread
41
+
42
+ ```bash
43
+ az devops invoke \
44
+ --area git --resource pullRequestThreadComments \
45
+ --route-parameters project={project} repositoryId={repo} pullRequestId={id} threadId={tid} \
46
+ --http-method POST --api-version 7.1 --in-file reply.json
47
+ ```
48
+
49
+ `reply.json`:
50
+
51
+ ```json
52
+ {
53
+ "comments": [
54
+ {
55
+ "parentCommentId": 1,
56
+ "content": "Acknowledged, applying this change now.",
57
+ "commentType": 1
58
+ }
59
+ ]
60
+ }
61
+ ```
62
+
63
63
  ---
@@ -1,53 +1,53 @@
1
- **ALL GitHub data MUST come from `gh` CLI. NEVER use webfetch, HTTP requests, or browser MCP tools for GitHub operations, even if gh CLI fails. If `gh` is unavailable, report 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: Find PRs
7
-
8
- If PR link provided, extract number from URL. Otherwise:
9
-
10
- ```bash
11
- gh pr list --repo {owner}/{repo} --state open --limit 1
12
- ```
13
-
14
- ### Step 2: Read comment threads
15
-
16
- ```bash
17
- gh pr view {pr-number} --repo {owner}/{repo} --comments
18
- # Or structured output:
19
- gh api repos/{owner}/{repo}/pulls/{pr-number}/comments
20
- gh api repos/{owner}/{repo}/pulls/{pr-number}/reviews
21
- ```
22
-
23
- ### Step 3: Categorize feedback
24
-
25
- | Category | Description | Action |
26
- | ------------- | ----------------------------------- | ----------------------------------- |
27
- | `code-change` | Reviewer requests code modification | Return to lead to spawn specialists |
28
- | `spec-update` | Affects proposal, design, or tasks | Update openspec artifacts |
29
- | `question` | Reviewer asks a question | Reply with answer |
30
- | `resolved` | Thread already resolved | Skip |
31
-
32
- ### Step 4: Update openspec (if spec-update)
33
-
34
- ```bash
35
- git branch --show-current
36
- # feature/add-user-auth → change: add-user-auth
37
- ```
38
-
39
- Update: `openspec/changes/{change}/proposal.md`, `design.md`, or `tasks.md` as appropriate.
40
-
41
- ### Step 5: Reply to each comment thread
42
-
43
- ```bash
44
- # Reply to a review comment
45
- gh api repos/{owner}/{repo}/pulls/{pr-number}/comments/{comment-id}/replies \
46
- --method POST \
47
- --field body="Acknowledged, applying this change now."
48
-
49
- # Or post a general PR comment
50
- gh pr comment {pr-number} --body "Updated design.md to reflect feedback."
51
- ```
52
-
1
+ **ALL GitHub data MUST come from `gh` CLI. NEVER use webfetch, HTTP requests, or browser MCP tools for GitHub operations, even if gh CLI fails. If `gh` is unavailable, report 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: Find PRs
7
+
8
+ If PR link provided, extract number from URL. Otherwise:
9
+
10
+ ```bash
11
+ gh pr list --repo {owner}/{repo} --state open --limit 1
12
+ ```
13
+
14
+ ### Step 2: Read comment threads
15
+
16
+ ```bash
17
+ gh pr view {pr-number} --repo {owner}/{repo} --comments
18
+ # Or structured output:
19
+ gh api repos/{owner}/{repo}/pulls/{pr-number}/comments
20
+ gh api repos/{owner}/{repo}/pulls/{pr-number}/reviews
21
+ ```
22
+
23
+ ### Step 3: Categorize feedback
24
+
25
+ | Category | Description | Action |
26
+ | ------------- | ----------------------------------- | ----------------------------------- |
27
+ | `code-change` | Reviewer requests code modification | Return to lead to spawn specialists |
28
+ | `spec-update` | Affects proposal, design, or tasks | Update openspec artifacts |
29
+ | `question` | Reviewer asks a question | Reply with answer |
30
+ | `resolved` | Thread already resolved | Skip |
31
+
32
+ ### Step 4: Update openspec (if spec-update)
33
+
34
+ ```bash
35
+ git branch --show-current
36
+ # feature/add-user-auth → change: add-user-auth
37
+ ```
38
+
39
+ Update: `openspec/changes/{change}/proposal.md`, `design.md`, or `tasks.md` as appropriate.
40
+
41
+ ### Step 5: Reply to each comment thread
42
+
43
+ ```bash
44
+ # Reply to a review comment
45
+ gh api repos/{owner}/{repo}/pulls/{pr-number}/comments/{comment-id}/replies \
46
+ --method POST \
47
+ --field body="Acknowledged, applying this change now."
48
+
49
+ # Or post a general PR comment
50
+ gh pr comment {pr-number} --body "Updated design.md to reflect feedback."
51
+ ```
52
+
53
53
  ---