@plainconceptsplatform/agent-harness 3.5.0 → 3.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.
Files changed (144) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +471 -454
  3. package/cli/commands/join.js +259 -259
  4. package/cli/commands/migrate.js +310 -310
  5. package/cli/commands/shared.js +27 -27
  6. package/cli/commands/single.js +79 -79
  7. package/cli/commands/update.js +121 -121
  8. package/cli/commands/wizard.js +134 -134
  9. package/cli/fragments/archive/az.md +97 -97
  10. package/cli/fragments/archive/gh.md +96 -96
  11. package/cli/fragments/archive/gl.md +96 -96
  12. package/cli/fragments/archive/none.md +75 -75
  13. package/cli/fragments/guardrails/codegraph.md +5 -5
  14. package/cli/fragments/guardrails/humanizer.md +4 -4
  15. package/cli/fragments/guardrails/memory.md +4 -4
  16. package/cli/fragments/guardrails/rtk.md +3 -3
  17. package/cli/fragments/guardrails/simple-english.md +4 -4
  18. package/cli/fragments/ops-backlog/az.md +28 -28
  19. package/cli/fragments/ops-backlog/gh.md +28 -28
  20. package/cli/fragments/ops-backlog/jira.md +28 -28
  21. package/cli/fragments/ops-review/az.md +62 -62
  22. package/cli/fragments/ops-review/gh.md +51 -51
  23. package/cli/fragments/ops-review/gl.md +55 -55
  24. package/cli/fragments/ops-ship/az.md +81 -81
  25. package/cli/fragments/ops-ship/gh.md +67 -67
  26. package/cli/fragments/ops-ship/gl.md +84 -84
  27. package/cli/index.js +116 -116
  28. package/cli/presets/agents-content.json +34 -34
  29. package/cli/presets/browser.json +10 -10
  30. package/cli/presets/clean.json +21 -21
  31. package/cli/presets/models.json +68 -68
  32. package/cli/presets/optimization.json +32 -32
  33. package/cli/presets/platforms.json +76 -76
  34. package/cli/presets/source.json +23 -23
  35. package/cli/steps/browser/index.js +48 -48
  36. package/cli/steps/clean/index.js +120 -120
  37. package/cli/steps/copy/agents.js +120 -120
  38. package/cli/steps/copy/commands.js +79 -79
  39. package/cli/steps/copy/fullstack-engineer.js +89 -89
  40. package/cli/steps/copy/index.js +88 -88
  41. package/cli/steps/copy/opencode-json.js +324 -324
  42. package/cli/steps/copy/skills.js +316 -316
  43. package/cli/steps/metadata/index.js +115 -115
  44. package/cli/steps/models/format.js +88 -88
  45. package/cli/steps/models/index.js +64 -64
  46. package/cli/steps/models/write.js +38 -38
  47. package/cli/steps/openspec/index.js +136 -136
  48. package/cli/steps/optimization/codegraph.js +141 -141
  49. package/cli/steps/optimization/detect.js +66 -66
  50. package/cli/steps/optimization/humanizer.js +17 -17
  51. package/cli/steps/optimization/index.js +158 -158
  52. package/cli/steps/optimization/memory.js +91 -91
  53. package/cli/steps/optimization/patch-guardrails.js +111 -111
  54. package/cli/steps/optimization/simple-english.js +17 -17
  55. package/cli/steps/optimization/skills-lock.js +30 -30
  56. package/cli/steps/platform/index.js +109 -109
  57. package/cli/steps/source/index.js +123 -123
  58. package/cli/utils/agent-color.js +111 -111
  59. package/cli/utils/copy.js +134 -134
  60. package/cli/utils/exec-spinner.js +47 -47
  61. package/cli/utils/exec.js +134 -134
  62. package/cli/utils/legacy-check.js +30 -30
  63. package/cli/utils/models-cache.js +58 -58
  64. package/cli/utils/models-pricing.js +42 -42
  65. package/cli/utils/paths.js +81 -81
  66. package/cli/utils/process.js +3 -3
  67. package/cli/utils/terminal.js +6 -6
  68. package/cli/utils/update-manifest.js +75 -75
  69. package/harness/.opencode/_gitignore +10 -10
  70. package/harness/.opencode/commands/init.md +5 -5
  71. package/harness/.opencode/commands/make-architecture.md +5 -5
  72. package/harness/.opencode/commands/make-design.md +5 -5
  73. package/harness/.opencode/commands/make-engineer.md +5 -5
  74. package/harness/.opencode/commands/make-guardrails.md +5 -5
  75. package/harness/.opencode/commands/make-user-model.md +5 -5
  76. package/harness/.opencode/commands/ops-backlog.md +10 -10
  77. package/harness/.opencode/commands/ops-review.md +10 -10
  78. package/harness/.opencode/commands/ops-ship.md +9 -9
  79. package/harness/.opencode/commands/plan-apply.md +9 -9
  80. package/harness/.opencode/commands/plan-archive.md +7 -7
  81. package/harness/.opencode/commands/plan-explore.md +11 -11
  82. package/harness/.opencode/commands/plan-goal.md +5 -5
  83. package/harness/.opencode/commands/plan-propose.md +11 -11
  84. package/harness/.opencode/commands/plan-quick.md +7 -7
  85. package/harness/.opencode/commands/plan-story.md +11 -11
  86. package/harness/.opencode/commands/repo-audit.md +7 -7
  87. package/harness/.opencode/commands/repo-help.md +5 -5
  88. package/harness/.opencode/commands/repo-initialize.md +5 -5
  89. package/harness/.opencode/commands/repo-onboard.md +5 -5
  90. package/harness/.opencode/commands/repo-verify.md +5 -5
  91. package/harness/.opencode/package.json +5 -5
  92. package/harness/.opencode/plugins/pc-commit-coauthor.js +41 -0
  93. package/harness/.opencode/plugins/pc-subagent-monitor.js +184 -184
  94. package/harness/.opencode/plugins/pc-subagent-tiers.js +367 -367
  95. package/harness/.opencode/plugins/pc-system-reminders.js +404 -386
  96. package/harness/.opencode/scripts/check-diff.mjs +279 -252
  97. package/harness/.opencode/scripts/code-rules.mjs +288 -288
  98. package/harness/.opencode/scripts/platform-manifest.mjs +112 -0
  99. package/harness/AGENTS.md +49 -49
  100. package/harness/ARCHITECTURE.md +13 -13
  101. package/harness/DESIGN.md +13 -13
  102. package/harness/opencode.jsonc +36 -36
  103. package/harness/openspec/config.yaml +20 -20
  104. package/harness/skills-lock.json +17 -17
  105. package/package.json +14 -12
  106. package/skills/README.md +18 -18
  107. package/skills/agent-harness-cli/SKILL.md +86 -86
  108. package/skills/browser-automation/SKILL.md +72 -72
  109. package/skills/pc-guardrails-generic/SKILL.md +53 -53
  110. package/skills/pc-guardrails-project/SKILL.md +8 -8
  111. package/skills/pc-make-architecture/SKILL.md +33 -32
  112. package/skills/pc-make-architecture/structure-template.md +64 -64
  113. package/skills/pc-make-design/SKILL.md +45 -45
  114. package/skills/pc-make-engineer/SKILL.md +59 -59
  115. package/skills/pc-make-engineer/signal-mapping.md +53 -53
  116. package/skills/pc-make-engineer/template.md +36 -36
  117. package/skills/pc-make-guardrails/SKILL.md +44 -44
  118. package/skills/pc-make-guardrails/category-reference.md +112 -112
  119. package/skills/pc-make-merge-risk-assess/SKILL.md +70 -70
  120. package/skills/pc-make-merge-risk-assess/category-reference.md +114 -114
  121. package/skills/pc-make-user-model/SKILL.md +56 -56
  122. package/skills/pc-ops-ship/SKILL.md +22 -22
  123. package/skills/pc-plan-apply/SKILL.md +88 -88
  124. package/skills/pc-plan-apply/simple-mode.md +21 -21
  125. package/skills/pc-plan-archive/SKILL.md +66 -66
  126. package/skills/pc-plan-explore/SKILL.md +21 -21
  127. package/skills/pc-plan-goal/SKILL.md +91 -91
  128. package/skills/pc-plan-goal/branching.md +39 -39
  129. package/skills/pc-plan-goal/failure-policy.md +30 -30
  130. package/skills/pc-plan-goal/output-mode.md +10 -10
  131. package/skills/pc-plan-goal/output.md +71 -71
  132. package/skills/pc-plan-propose/SKILL.md +125 -125
  133. package/skills/pc-plan-propose/task-annotation.md +39 -39
  134. package/skills/pc-plan-quick/SKILL.md +46 -46
  135. package/skills/pc-plan-story/SKILL.md +93 -93
  136. package/skills/pc-repo-audit/SKILL.md +44 -44
  137. package/skills/pc-repo-help/SKILL.md +87 -87
  138. package/skills/pc-repo-initialize/SKILL.md +119 -119
  139. package/skills/pc-repo-onboard/SKILL.md +32 -32
  140. package/skills/pc-repo-verify/SKILL.md +150 -150
  141. package/skills/pc-userstory-az/SKILL.md +71 -71
  142. package/skills/pc-userstory-browser/SKILL.md +64 -64
  143. package/skills/pc-userstory-gh/SKILL.md +63 -63
  144. package/skills/pc-userstory-jira/SKILL.md +74 -74
@@ -1,63 +1,63 @@
1
- Azure DevOps data comes from the `az` CLI; a page fetch of dev.azure.com is denied (pc-system-reminders). If `az` is unavailable, report it as a blocker.
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
+ Azure DevOps data comes from the `az` CLI; a page fetch of dev.azure.com is denied (pc-system-reminders). If `az` is unavailable, report it as a blocker.
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,52 +1,52 @@
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: Find PRs
6
-
7
- If PR link provided, extract number from URL. Otherwise:
8
-
9
- ```bash
10
- gh pr list --repo {owner}/{repo} --state open --limit 1
11
- ```
12
-
13
- ### Step 2: Read comment threads
14
-
15
- ```bash
16
- gh pr view {pr-number} --repo {owner}/{repo} --comments
17
- # Or structured output:
18
- gh api repos/{owner}/{repo}/pulls/{pr-number}/comments
19
- gh api repos/{owner}/{repo}/pulls/{pr-number}/reviews
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/add-user-auth → change: add-user-auth
36
- ```
37
-
38
- Update: `openspec/changes/{change}/proposal.md`, `design.md`, or `tasks.md` as appropriate.
39
-
40
- ### Step 5: Reply to each comment thread
41
-
42
- ```bash
43
- # Reply to a review comment
44
- gh api repos/{owner}/{repo}/pulls/{pr-number}/comments/{comment-id}/replies \
45
- --method POST \
46
- --field body="Acknowledged, applying this change now."
47
-
48
- # Or post a general PR comment
49
- gh pr comment {pr-number} --body "Updated design.md to reflect feedback."
50
- ```
51
-
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: Find PRs
6
+
7
+ If PR link provided, extract number from URL. Otherwise:
8
+
9
+ ```bash
10
+ gh pr list --repo {owner}/{repo} --state open --limit 1
11
+ ```
12
+
13
+ ### Step 2: Read comment threads
14
+
15
+ ```bash
16
+ gh pr view {pr-number} --repo {owner}/{repo} --comments
17
+ # Or structured output:
18
+ gh api repos/{owner}/{repo}/pulls/{pr-number}/comments
19
+ gh api repos/{owner}/{repo}/pulls/{pr-number}/reviews
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/add-user-auth → change: add-user-auth
36
+ ```
37
+
38
+ Update: `openspec/changes/{change}/proposal.md`, `design.md`, or `tasks.md` as appropriate.
39
+
40
+ ### Step 5: Reply to each comment thread
41
+
42
+ ```bash
43
+ # Reply to a review comment
44
+ gh api repos/{owner}/{repo}/pulls/{pr-number}/comments/{comment-id}/replies \
45
+ --method POST \
46
+ --field body="Acknowledged, applying this change now."
47
+
48
+ # Or post a general PR comment
49
+ gh pr comment {pr-number} --body "Updated design.md to reflect feedback."
50
+ ```
51
+
52
52
  ---
@@ -1,56 +1,56 @@
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: Parse MR URL or number
6
-
7
- - `https://gitlab.com/{owner}/{repo}/-/merge_requests/123` → MR !123, repo: `{owner}/{repo}`
8
- - `https://gitlab.com/{owner}/{repo}/-/merge_requests/123#note_456` → MR !123, note: 456
9
- - `!123` → MR !123
10
-
11
- ### Step 2: Fetch MR details and comments
12
-
13
- ```bash
14
- glab mr view {number} --repo {owner}/{repo}
15
- glab mr note list {number} --repo {owner}/{repo}
16
- ```
17
-
18
- Also fetch MR threads (inline code comments):
19
-
20
- ```bash
21
- glab api "projects/:id/merge_requests/{number}/discussions"
22
- ```
23
-
24
- ### Step 3: Classify comments
25
-
26
- Categorize each comment as:
27
- - **BLOCKER**: must fix before merge (test failures, security issues, broken logic)
28
- - **IMPORTANT**: should fix (missing edge case, code quality, performance)
29
- - **SUGGESTION**: nice to have (style, refactor, docs)
30
- - **QUESTION**: needs clarification (respond or discuss)
31
- - **RESOLVED**: already addressed or invalid
32
-
33
- ### Step 4: Report
34
-
35
- Display a structured summary:
36
-
37
- ```text
38
- MR Feedback Summary: !{number}
39
-
40
- Blockers: {count}
41
- [B1] {comment-author}: {comment-summary}
42
- Important: {count}
43
- [I1] {comment-author}: {comment-summary}
44
- Suggestions: {count}
45
- [S1] {comment-author}: {comment-summary}
46
- Questions: {count}
47
- [Q1] {comment-author}: {comment-summary}
48
-
49
- Next: Run /plan-apply to fix blockers and important items.
50
- ```
51
-
52
- ### Step 5: Do NOT implement fixes
53
-
54
- This mode only triages. Fixing is done via `/plan-apply`. Tell the user what needs fixing, then stop.
55
-
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: Parse MR URL or number
6
+
7
+ - `https://gitlab.com/{owner}/{repo}/-/merge_requests/123` → MR !123, repo: `{owner}/{repo}`
8
+ - `https://gitlab.com/{owner}/{repo}/-/merge_requests/123#note_456` → MR !123, note: 456
9
+ - `!123` → MR !123
10
+
11
+ ### Step 2: Fetch MR details and comments
12
+
13
+ ```bash
14
+ glab mr view {number} --repo {owner}/{repo}
15
+ glab mr note list {number} --repo {owner}/{repo}
16
+ ```
17
+
18
+ Also fetch MR threads (inline code comments):
19
+
20
+ ```bash
21
+ glab api "projects/:id/merge_requests/{number}/discussions"
22
+ ```
23
+
24
+ ### Step 3: Classify comments
25
+
26
+ Categorize each comment as:
27
+ - **BLOCKER**: must fix before merge (test failures, security issues, broken logic)
28
+ - **IMPORTANT**: should fix (missing edge case, code quality, performance)
29
+ - **SUGGESTION**: nice to have (style, refactor, docs)
30
+ - **QUESTION**: needs clarification (respond or discuss)
31
+ - **RESOLVED**: already addressed or invalid
32
+
33
+ ### Step 4: Report
34
+
35
+ Display a structured summary:
36
+
37
+ ```text
38
+ MR Feedback Summary: !{number}
39
+
40
+ Blockers: {count}
41
+ [B1] {comment-author}: {comment-summary}
42
+ Important: {count}
43
+ [I1] {comment-author}: {comment-summary}
44
+ Suggestions: {count}
45
+ [S1] {comment-author}: {comment-summary}
46
+ Questions: {count}
47
+ [Q1] {comment-author}: {comment-summary}
48
+
49
+ Next: Run /plan-apply to fix blockers and important items.
50
+ ```
51
+
52
+ ### Step 5: Do NOT implement fixes
53
+
54
+ This mode only triages. Fixing is done via `/plan-apply`. Tell the user what needs fixing, then stop.
55
+
56
56
  ---
@@ -1,82 +1,82 @@
1
- Azure DevOps data comes from the `az` CLI; a page fetch of dev.azure.com is denied (pc-system-reminders). If `az` is unavailable, report it as a blocker. Browser tools reach only the local app on `localhost`.
2
-
3
- ---
4
-
5
- ### Step 1: Verify feature branch
6
-
7
- ```bash
8
- git branch --show-current
9
- ```
10
-
11
- Branch must be `feature/{id}-{slug}`. NEVER push to `main`.
12
-
13
- ### Step 2: Capture screenshots (if UI changes exist)
14
-
15
- ```bash
16
- browser_navigate url="http://localhost:{port}/{route}"
17
- browser_wait ms=2000
18
- browser_screenshot
19
- ```
20
-
21
- Save to: `openspec/changes/{change-name}/images/{feature}.png`
22
-
23
- ### Step 3: Commit and push
24
-
25
- 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`):
26
-
27
- ```bash
28
- git add openspec/changes/{change-name}/images/ # plus any other paths you actually changed
29
- git commit -m "feat({scope}): {description} (#{id})"
30
- git push origin feature/{id}-{slug}
31
- ```
32
-
33
- ### Step 4: Create PR
34
-
35
- ```bash
36
- az repos pr create \
37
- --repository {repo} \
38
- --source-branch feature/{id}-{slug} \
39
- --target-branch main \
40
- --title "feat({scope}): {title} (#{id})" \
41
- --description "{description}"
42
- ```
43
-
44
- ### Step 5: Link work item (MANDATORY, run sequentially, not in parallel)
45
-
46
- ```bash
47
- az repos pr work-item add --id {pr-id} --work-items {workitem-id}
48
- ```
49
-
50
- ### Step 6: Post screenshot comment
51
-
52
- Build raw URL for each image:
53
-
54
- ```
55
- https://dev.azure.com/{org}/{project}/_apis/git/repositories/{repo}/items?path=openspec/changes/{change}/images/{file}.png&versionType=branch&version={branch}&api-version=7.1
56
- ```
57
-
58
- Post via:
59
-
60
- ```bash
61
- az devops invoke \
62
- --area git --resource pullRequestThreads \
63
- --route-parameters project={project} repositoryId={repo} pullRequestId={pr-id} \
64
- --http-method POST --api-version 7.1 --in-file body.json
65
- ```
66
-
67
- `body.json`:
68
-
69
- ```json
70
- {
71
- "comments": [
72
- {
73
- "parentCommentId": 0,
74
- "content": "## Screenshots\n\n![{feature}]({raw-url})",
75
- "commentType": 1
76
- }
77
- ],
78
- "status": "active"
79
- }
80
- ```
81
-
1
+ Azure DevOps data comes from the `az` CLI; a page fetch of dev.azure.com is denied (pc-system-reminders). If `az` is unavailable, report it as a blocker. Browser tools reach only the local app on `localhost`.
2
+
3
+ ---
4
+
5
+ ### Step 1: Verify feature branch
6
+
7
+ ```bash
8
+ git branch --show-current
9
+ ```
10
+
11
+ Branch must be `feature/{id}-{slug}`. NEVER push to `main`.
12
+
13
+ ### Step 2: Capture screenshots (if UI changes exist)
14
+
15
+ ```bash
16
+ browser_navigate url="http://localhost:{port}/{route}"
17
+ browser_wait ms=2000
18
+ browser_screenshot
19
+ ```
20
+
21
+ Save to: `openspec/changes/{change-name}/images/{feature}.png`
22
+
23
+ ### Step 3: Commit and push
24
+
25
+ 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`):
26
+
27
+ ```bash
28
+ git add openspec/changes/{change-name}/images/ # plus any other paths you actually changed
29
+ git commit -m "feat({scope}): {description} (#{id})"
30
+ git push origin feature/{id}-{slug}
31
+ ```
32
+
33
+ ### Step 4: Create PR
34
+
35
+ ```bash
36
+ az repos pr create \
37
+ --repository {repo} \
38
+ --source-branch feature/{id}-{slug} \
39
+ --target-branch main \
40
+ --title "feat({scope}): {title} (#{id})" \
41
+ --description "{description}"
42
+ ```
43
+
44
+ ### Step 5: Link work item (MANDATORY, run sequentially, not in parallel)
45
+
46
+ ```bash
47
+ az repos pr work-item add --id {pr-id} --work-items {workitem-id}
48
+ ```
49
+
50
+ ### Step 6: Post screenshot comment
51
+
52
+ Build raw URL for each image:
53
+
54
+ ```
55
+ https://dev.azure.com/{org}/{project}/_apis/git/repositories/{repo}/items?path=openspec/changes/{change}/images/{file}.png&versionType=branch&version={branch}&api-version=7.1
56
+ ```
57
+
58
+ Post via:
59
+
60
+ ```bash
61
+ az devops invoke \
62
+ --area git --resource pullRequestThreads \
63
+ --route-parameters project={project} repositoryId={repo} pullRequestId={pr-id} \
64
+ --http-method POST --api-version 7.1 --in-file body.json
65
+ ```
66
+
67
+ `body.json`:
68
+
69
+ ```json
70
+ {
71
+ "comments": [
72
+ {
73
+ "parentCommentId": 0,
74
+ "content": "## Screenshots\n\n![{feature}]({raw-url})",
75
+ "commentType": 1
76
+ }
77
+ ],
78
+ "status": "active"
79
+ }
80
+ ```
81
+
82
82
  ---
@@ -1,68 +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. 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
-
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
+
68
68
  ---