@plainconceptsplatform/agent-harness 2.0.0 → 2.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.
Files changed (117) hide show
  1. package/README.md +426 -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 +9 -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 +281 -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/content/opencode.jsonc +39 -31
  79. package/src/fragments/archive/az.md +95 -95
  80. package/src/fragments/archive/gh.md +94 -94
  81. package/src/fragments/archive/gl.md +94 -94
  82. package/src/fragments/archive/none.md +73 -73
  83. package/src/fragments/guardrails/codegraph.md +7 -7
  84. package/src/fragments/guardrails/humanizer.md +4 -4
  85. package/src/fragments/guardrails/memory.md +4 -4
  86. package/src/fragments/guardrails/rtk.md +3 -3
  87. package/src/fragments/guardrails/simple-english.md +4 -4
  88. package/src/fragments/ops-backlog/az.md +28 -28
  89. package/src/fragments/ops-backlog/gh.md +29 -29
  90. package/src/fragments/ops-backlog/jira.md +28 -28
  91. package/src/fragments/ops-evidence/az.md +41 -41
  92. package/src/fragments/ops-evidence/gh.md +53 -53
  93. package/src/fragments/ops-evidence/jira.md +38 -38
  94. package/src/fragments/ops-review/az.md +62 -62
  95. package/src/fragments/ops-review/gh.md +52 -52
  96. package/src/fragments/ops-review/gl.md +56 -56
  97. package/src/fragments/ops-ship/az.md +80 -80
  98. package/src/fragments/ops-ship/gh.md +68 -68
  99. package/src/fragments/ops-ship/gl.md +85 -85
  100. package/src/index.js +107 -107
  101. package/src/presets/agents-content.json +53 -53
  102. package/src/presets/models.json +68 -68
  103. package/src/steps/copy/agents.js +118 -118
  104. package/src/steps/copy/commands.js +91 -91
  105. package/src/steps/copy/fullstack-engineer.js +85 -83
  106. package/src/steps/copy/index.js +88 -88
  107. package/src/steps/copy/opencode-json.js +147 -129
  108. package/src/steps/copy/skills.js +196 -196
  109. package/src/steps/metadata/index.js +108 -108
  110. package/src/steps/models/write.js +34 -34
  111. package/src/steps/optimization/patch-guardrails.js +108 -108
  112. package/src/utils/copy.js +108 -108
  113. package/src/utils/legacy-check.js +30 -30
  114. package/src/utils/models-cache.js +58 -58
  115. package/src/utils/paths.js +67 -64
  116. package/src/utils/update-manifest.js +49 -49
  117. package/src/content/.opencode/plugins/pc-system-reminders.test.js +0 -35
@@ -1,73 +1,73 @@
1
- 2. **Find the oldest unarchived change**
2
-
3
- List unarchived changes (top-level only, excludes `archive/`):
4
-
5
- ```bash
6
- find "$REPO_ROOT/openspec/changes" -mindepth 1 -maxdepth 1 -type d -not -name 'archive' | sort
7
- ```
8
-
9
- If empty, report a blocker and stop. Otherwise select the **oldest** change (by directory creation/sort order) as the candidate.
10
-
11
- This mode has no platform PR integration, so completion is judged from local state only. Do not look up remote PRs or work items.
12
-
13
- 3. **Confirm the candidate**
14
-
15
- Show the candidate (ID, title) and any other unarchived changes, then ask:
16
-
17
- ```text
18
- Oldest unarchived change found:
19
- ID: {change-id}
20
- Title: {title from proposal.md}
21
-
22
- Proceed with archiving? [yes/no]
23
- ```
24
-
25
- Stop if the user does not confirm.
26
-
27
- 4. **Archive the change**
28
-
29
- ```bash
30
- git checkout -b archive/{change-id}
31
- ```
32
-
33
- Load `@openspec-archive-change` skill and follow it to archive the change.
34
-
35
- 5. **Update docs**
36
-
37
- Compare the archived change's specs against `ARCHITECTURE.md` and `DESIGN.md`. If updates are needed, show them and get user approval before applying.
38
-
39
- 6. **Commit the archive**
40
-
41
- ```bash
42
- git add -A
43
- git commit -m "archive: {title} ({change-id})"
44
- ```
45
-
46
- No PR is created in this mode. Leave the `archive/{change-id}` branch for the user to merge or push manually if they choose.
47
-
48
- If work was stashed in step 1, restore it after the commit unless the user opts out.
49
-
50
- 7. **Report**
51
-
52
- Display:
53
-
54
- ```text
55
- Archive complete
56
-
57
- Change ID: {change-id}
58
- Title: {title}
59
- Archive branch: archive/{change-id}
60
-
61
- Documentation updates:
62
- - ARCHITECTURE.md: {count} changes applied
63
- - DESIGN.md: {count} changes applied
64
- ```
65
-
66
- ## Rules
67
-
68
- - All OpenSpec paths resolve from `git rev-parse --show-toplevel`. Never use `/openspec/...`.
69
- - Only process top-level directories in `$REPO_ROOT/openspec/changes/`; exclude `archive/`.
70
- - Use change ID and slug only as search hints; do not assume the source branch name.
71
- - The oldest unarchived change is the only candidate: never ask the user which change to archive.
72
- - This mode has no GitHub or Azure DevOps integration. Never call `gh` or `az`, and never use browser tools or direct web requests for PR/work-item lookups.
73
- - Never invent or guess PR, branch, or merge metadata.
1
+ 2. **Find the oldest unarchived change**
2
+
3
+ List unarchived changes (top-level only, excludes `archive/`):
4
+
5
+ ```bash
6
+ find "$REPO_ROOT/openspec/changes" -mindepth 1 -maxdepth 1 -type d -not -name 'archive' | sort
7
+ ```
8
+
9
+ If empty, report a blocker and stop. Otherwise select the **oldest** change (by directory creation/sort order) as the candidate.
10
+
11
+ This mode has no platform PR integration, so completion is judged from local state only. Do not look up remote PRs or work items.
12
+
13
+ 3. **Confirm the candidate**
14
+
15
+ Show the candidate (ID, title) and any other unarchived changes, then ask:
16
+
17
+ ```text
18
+ Oldest unarchived change found:
19
+ ID: {change-id}
20
+ Title: {title from proposal.md}
21
+
22
+ Proceed with archiving? [yes/no]
23
+ ```
24
+
25
+ Stop if the user does not confirm.
26
+
27
+ 4. **Archive the change**
28
+
29
+ ```bash
30
+ git checkout -b archive/{change-id}
31
+ ```
32
+
33
+ Load `@openspec-archive-change` skill and follow it to archive the change.
34
+
35
+ 5. **Update docs**
36
+
37
+ Compare the archived change's specs against `ARCHITECTURE.md` and `DESIGN.md`. If updates are needed, show them and get user approval before applying.
38
+
39
+ 6. **Commit the archive**
40
+
41
+ ```bash
42
+ git add -A
43
+ git commit -m "archive: {title} ({change-id})"
44
+ ```
45
+
46
+ No PR is created in this mode. Leave the `archive/{change-id}` branch for the user to merge or push manually if they choose.
47
+
48
+ If work was stashed in step 1, restore it after the commit unless the user opts out.
49
+
50
+ 7. **Report**
51
+
52
+ Display:
53
+
54
+ ```text
55
+ Archive complete
56
+
57
+ Change ID: {change-id}
58
+ Title: {title}
59
+ Archive branch: archive/{change-id}
60
+
61
+ Documentation updates:
62
+ - ARCHITECTURE.md: {count} changes applied
63
+ - DESIGN.md: {count} changes applied
64
+ ```
65
+
66
+ ## Rules
67
+
68
+ - All OpenSpec paths resolve from `git rev-parse --show-toplevel`. Never use `/openspec/...`.
69
+ - Only process top-level directories in `$REPO_ROOT/openspec/changes/`; exclude `archive/`.
70
+ - Use change ID and slug only as search hints; do not assume the source branch name.
71
+ - The oldest unarchived change is the only candidate: never ask the user which change to archive.
72
+ - This mode has no GitHub or Azure DevOps integration. Never call `gh` or `az`, and never use browser tools or direct web requests for PR/work-item lookups.
73
+ - Never invent or guess PR, branch, or merge metadata.
@@ -1,7 +1,7 @@
1
- ## CodeGraph
2
-
3
- - **Use `codegraph_explore` INSTEAD OF grep, glob, or read.** It is always available. Do not assume it might be missing.
4
- - One call returns the relevant symbols' verbatim, line-numbered source plus the call paths between them, use it as a full replacement for Read, Grep, and file-reading sub-tasks when working with indexed code.
5
- - If you instinctively reach for grep or read to find or understand code, STOP: call `codegraph_explore` instead with the symbol name, file path, or a natural-language question. It covers the same ground in one call instead of a dozen.
6
- - **Fall back to grep/glob/read ONLY when `codegraph_explore` returns no results** or the query is for something codegraph does not index (config files, plain-text docs, `.env` patterns, raw string searches). When you do fall back, you MUST state that codegraph returned nothing.
7
- - Do NOT run `codegraph` in bash: it is an MCP server, not a CLI tool.
1
+ ## CodeGraph
2
+
3
+ - **Use `codegraph_explore` INSTEAD OF grep, glob, or read.** It is always available. Do not assume it might be missing.
4
+ - One call returns the relevant symbols' verbatim, line-numbered source plus the call paths between them, use it as a full replacement for Read, Grep, and file-reading sub-tasks when working with indexed code.
5
+ - If you instinctively reach for grep or read to find or understand code, STOP: call `codegraph_explore` instead with the symbol name, file path, or a natural-language question. It covers the same ground in one call instead of a dozen.
6
+ - **Fall back to grep/glob/read ONLY when `codegraph_explore` returns no results** or the query is for something codegraph does not index (config files, plain-text docs, `.env` patterns, raw string searches). When you do fall back, you MUST state that codegraph returned nothing.
7
+ - Do NOT run `codegraph` in bash: it is an MCP server, not a CLI tool.
@@ -1,4 +1,4 @@
1
- ## Humanizer (optimization skill — MANDATORY LOAD)
2
-
3
- - **You MUST call `skill("humanizer")` via the skill tool before writing any prose** (commit messages, PR descriptions, docs, proposals) to remove AI writing patterns and sound more natural.
4
- - Do NOT apply humanizer to code, config files, or terminal output: only to prose.
1
+ ## Humanizer (optimization skill — MANDATORY LOAD)
2
+
3
+ - **You MUST call `skill("humanizer")` via the skill tool before writing any prose** (commit messages, PR descriptions, docs, proposals) to remove AI writing patterns and sound more natural.
4
+ - Do NOT apply humanizer to code, config files, or terminal output: only to prose.
@@ -1,4 +1,4 @@
1
- ## Agentmemory
2
-
3
- - Use agentmemory MCP tools (`memory_smart_search`, `memory_save`, `memory_sessions`, `memory_governance_delete`) for cross-session context: `memory_smart_search` for prior decisions before implementing unfamiliar areas, `memory_save` for architecture decisions and cross-agent context.
4
- - Do NOT run `agentmemory` in bash: it is an MCP server. Start the server with `agentmemory` in a separate terminal, then use MCP tools.
1
+ ## Agentmemory
2
+
3
+ - Use agentmemory MCP tools (`memory_smart_search`, `memory_save`, `memory_sessions`, `memory_governance_delete`) for cross-session context: `memory_smart_search` for prior decisions before implementing unfamiliar areas, `memory_save` for architecture decisions and cross-agent context.
4
+ - Do NOT run `agentmemory` in bash: it is an MCP server. Start the server with `agentmemory` in a separate terminal, then use MCP tools.
@@ -1,3 +1,3 @@
1
- ## RTK
2
-
3
- - Prefix ALL CLI commands with `rtk` (e.g. `rtk git diff`, `rtk pnpm test`). Read-only commands like `cat`, `ls`, `Get-Content` are exempt.
1
+ ## RTK
2
+
3
+ - Prefix ALL CLI commands with `rtk` (e.g. `rtk git diff`, `rtk pnpm test`). Read-only commands like `cat`, `ls`, `Get-Content` are exempt.
@@ -1,4 +1,4 @@
1
- ## Simple English (optimization skill - MANDATORY LOAD)
2
-
3
- - **You MUST call `skill("simple-english")` via the skill tool before responding.** This is not optional. Apply Simplified Technical English to all prose responses.
4
- - Keep code blocks, identifiers, CLI commands, file paths, quoted errors, and product names exact.
1
+ ## Simple English (optimization skill - MANDATORY LOAD)
2
+
3
+ - **You MUST call `skill("simple-english")` via the skill tool before responding.** This is not optional. Apply Simplified Technical English to all prose responses.
4
+ - Keep code blocks, identifiers, CLI commands, file paths, quoted errors, and product names exact.
@@ -1,29 +1,29 @@
1
- **Browser MCP tools are FORBIDDEN for all Azure DevOps operations.**
2
-
3
- ---
4
-
5
- ### Step 1: Parse input
6
-
7
- `$ARGUMENTS` is the work item 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 work item
10
-
11
- ```bash
12
- az boards work-item create \
13
- --title "{title}" \
14
- --description "{body}" \
15
- --type "User Story"
16
- ```
17
-
18
- ### Step 3: Report
19
-
20
- ```text
21
- Work item created
22
- ID: {id}
23
- Title: {title}
24
- URL: {work-item-url}
25
- ```
26
-
27
- Tell the user: "Use `/plan-propose {work-item-url}` to turn this into a plan."
28
-
1
+ **Browser MCP tools are FORBIDDEN for all Azure DevOps operations.**
2
+
3
+ ---
4
+
5
+ ### Step 1: Parse input
6
+
7
+ `$ARGUMENTS` is the work item 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 work item
10
+
11
+ ```bash
12
+ az boards work-item create \
13
+ --title "{title}" \
14
+ --description "{body}" \
15
+ --type "User Story"
16
+ ```
17
+
18
+ ### Step 3: Report
19
+
20
+ ```text
21
+ Work item created
22
+ ID: {id}
23
+ Title: {title}
24
+ URL: {work-item-url}
25
+ ```
26
+
27
+ Tell the user: "Use `/plan-propose {work-item-url}` to turn this into a plan."
28
+
29
29
  ---
@@ -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.