@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,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
  ---
@@ -1,57 +1,57 @@
1
- **ALL GitLab data MUST come from `glab` CLI. NEVER use webfetch, HTTP requests, or browser MCP tools for GitLab operations, even if glab CLI fails. If `glab` 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 MR URL or number
7
-
8
- - `https://gitlab.com/{owner}/{repo}/-/merge_requests/123` → MR !123, repo: `{owner}/{repo}`
9
- - `https://gitlab.com/{owner}/{repo}/-/merge_requests/123#note_456` → MR !123, note: 456
10
- - `!123` → MR !123
11
-
12
- ### Step 2: Fetch MR details and comments
13
-
14
- ```bash
15
- glab mr view {number} --repo {owner}/{repo}
16
- glab mr note list {number} --repo {owner}/{repo}
17
- ```
18
-
19
- Also fetch MR threads (inline code comments):
20
-
21
- ```bash
22
- glab api "projects/:id/merge_requests/{number}/discussions"
23
- ```
24
-
25
- ### Step 3: Classify comments
26
-
27
- Categorize each comment as:
28
- - **BLOCKER**: must fix before merge (test failures, security issues, broken logic)
29
- - **IMPORTANT**: should fix (missing edge case, code quality, performance)
30
- - **SUGGESTION**: nice to have (style, refactor, docs)
31
- - **QUESTION**: needs clarification (respond or discuss)
32
- - **RESOLVED**: already addressed or invalid
33
-
34
- ### Step 4: Report
35
-
36
- Display a structured summary:
37
-
38
- ```text
39
- MR Feedback Summary: !{number}
40
-
41
- Blockers: {count}
42
- [B1] {comment-author}: {comment-summary}
43
- Important: {count}
44
- [I1] {comment-author}: {comment-summary}
45
- Suggestions: {count}
46
- [S1] {comment-author}: {comment-summary}
47
- Questions: {count}
48
- [Q1] {comment-author}: {comment-summary}
49
-
50
- Next: Run /plan-apply to fix blockers and important items.
51
- ```
52
-
53
- ### Step 5: Do NOT implement fixes
54
-
55
- This mode only triages. Fixing is done via `/plan-apply`. Tell the user what needs fixing, then stop.
56
-
1
+ **ALL GitLab data MUST come from `glab` CLI. NEVER use webfetch, HTTP requests, or browser MCP tools for GitLab operations, even if glab CLI fails. If `glab` 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 MR URL or number
7
+
8
+ - `https://gitlab.com/{owner}/{repo}/-/merge_requests/123` → MR !123, repo: `{owner}/{repo}`
9
+ - `https://gitlab.com/{owner}/{repo}/-/merge_requests/123#note_456` → MR !123, note: 456
10
+ - `!123` → MR !123
11
+
12
+ ### Step 2: Fetch MR details and comments
13
+
14
+ ```bash
15
+ glab mr view {number} --repo {owner}/{repo}
16
+ glab mr note list {number} --repo {owner}/{repo}
17
+ ```
18
+
19
+ Also fetch MR threads (inline code comments):
20
+
21
+ ```bash
22
+ glab api "projects/:id/merge_requests/{number}/discussions"
23
+ ```
24
+
25
+ ### Step 3: Classify comments
26
+
27
+ Categorize each comment as:
28
+ - **BLOCKER**: must fix before merge (test failures, security issues, broken logic)
29
+ - **IMPORTANT**: should fix (missing edge case, code quality, performance)
30
+ - **SUGGESTION**: nice to have (style, refactor, docs)
31
+ - **QUESTION**: needs clarification (respond or discuss)
32
+ - **RESOLVED**: already addressed or invalid
33
+
34
+ ### Step 4: Report
35
+
36
+ Display a structured summary:
37
+
38
+ ```text
39
+ MR Feedback Summary: !{number}
40
+
41
+ Blockers: {count}
42
+ [B1] {comment-author}: {comment-summary}
43
+ Important: {count}
44
+ [I1] {comment-author}: {comment-summary}
45
+ Suggestions: {count}
46
+ [S1] {comment-author}: {comment-summary}
47
+ Questions: {count}
48
+ [Q1] {comment-author}: {comment-summary}
49
+
50
+ Next: Run /plan-apply to fix blockers and important items.
51
+ ```
52
+
53
+ ### Step 5: Do NOT implement fixes
54
+
55
+ This mode only triages. Fixing is done via `/plan-apply`. Tell the user what needs fixing, then stop.
56
+
57
57
  ---
@@ -1,81 +1,81 @@
1
- **Browser MCP tools are FORBIDDEN for all Azure DevOps operations.**
2
- Browser tools are ONLY permitted for screenshots of the LOCAL running app on `localhost` URLs.
3
-
4
- ---
5
-
6
- ### Step 1: Verify feature branch
7
-
8
- ```bash
9
- git branch --show-current
10
- ```
11
-
12
- Branch must be `feature/{id}-{slug}`. NEVER push to `main`.
13
-
14
- ### Step 2: Capture screenshots (if UI changes exist)
15
-
16
- ```bash
17
- browser_navigate url="http://localhost:{port}/{route}"
18
- browser_wait ms=2000
19
- browser_screenshot
20
- ```
21
-
22
- Save to: `openspec/changes/{change-name}/images/{feature}.png`
23
-
24
- ### Step 3: Commit and push
25
-
26
- ```bash
27
- git add .
28
- git commit -m "feat({scope}): {description} (#{id})"
29
- git push origin feature/{id}-{slug}
30
- ```
31
-
32
- ### Step 4: Create PR
33
-
34
- ```bash
35
- az repos pr create \
36
- --repository {repo} \
37
- --source-branch feature/{id}-{slug} \
38
- --target-branch main \
39
- --title "feat({scope}): {title} (#{id})" \
40
- --description "{description}"
41
- ```
42
-
43
- ### Step 5: Link work item (MANDATORY, run sequentially, not in parallel)
44
-
45
- ```bash
46
- az repos pr work-item add --id {pr-id} --work-items {workitem-id}
47
- ```
48
-
49
- ### Step 6: Post screenshot comment
50
-
51
- Build raw URL for each image:
52
-
53
- ```
54
- 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
55
- ```
56
-
57
- Post via:
58
-
59
- ```bash
60
- az devops invoke \
61
- --area git --resource pullRequestThreads \
62
- --route-parameters project={project} repositoryId={repo} pullRequestId={pr-id} \
63
- --http-method POST --api-version 7.1 --in-file body.json
64
- ```
65
-
66
- `body.json`:
67
-
68
- ```json
69
- {
70
- "comments": [
71
- {
72
- "parentCommentId": 0,
73
- "content": "## Screenshots\n\n![{feature}]({raw-url})",
74
- "commentType": 1
75
- }
76
- ],
77
- "status": "active"
78
- }
79
- ```
80
-
1
+ **Browser MCP tools are FORBIDDEN for all Azure DevOps operations.**
2
+ Browser tools are ONLY permitted for screenshots of the LOCAL running app on `localhost` URLs.
3
+
4
+ ---
5
+
6
+ ### Step 1: Verify feature branch
7
+
8
+ ```bash
9
+ git branch --show-current
10
+ ```
11
+
12
+ Branch must be `feature/{id}-{slug}`. NEVER push to `main`.
13
+
14
+ ### Step 2: Capture screenshots (if UI changes exist)
15
+
16
+ ```bash
17
+ browser_navigate url="http://localhost:{port}/{route}"
18
+ browser_wait ms=2000
19
+ browser_screenshot
20
+ ```
21
+
22
+ Save to: `openspec/changes/{change-name}/images/{feature}.png`
23
+
24
+ ### Step 3: Commit and push
25
+
26
+ ```bash
27
+ git add .
28
+ git commit -m "feat({scope}): {description} (#{id})"
29
+ git push origin feature/{id}-{slug}
30
+ ```
31
+
32
+ ### Step 4: Create PR
33
+
34
+ ```bash
35
+ az repos pr create \
36
+ --repository {repo} \
37
+ --source-branch feature/{id}-{slug} \
38
+ --target-branch main \
39
+ --title "feat({scope}): {title} (#{id})" \
40
+ --description "{description}"
41
+ ```
42
+
43
+ ### Step 5: Link work item (MANDATORY, run sequentially, not in parallel)
44
+
45
+ ```bash
46
+ az repos pr work-item add --id {pr-id} --work-items {workitem-id}
47
+ ```
48
+
49
+ ### Step 6: Post screenshot comment
50
+
51
+ Build raw URL for each image:
52
+
53
+ ```
54
+ 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
55
+ ```
56
+
57
+ Post via:
58
+
59
+ ```bash
60
+ az devops invoke \
61
+ --area git --resource pullRequestThreads \
62
+ --route-parameters project={project} repositoryId={repo} pullRequestId={pr-id} \
63
+ --http-method POST --api-version 7.1 --in-file body.json
64
+ ```
65
+
66
+ `body.json`:
67
+
68
+ ```json
69
+ {
70
+ "comments": [
71
+ {
72
+ "parentCommentId": 0,
73
+ "content": "## Screenshots\n\n![{feature}]({raw-url})",
74
+ "commentType": 1
75
+ }
76
+ ],
77
+ "status": "active"
78
+ }
79
+ ```
80
+
81
81
  ---
@@ -1,69 +1,69 @@
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: Verify feature branch
7
-
8
- ```bash
9
- BRANCH="$(git branch --show-current)"
10
- DEFAULT_BRANCH="$(git symbolic-ref --short refs/remotes/origin/HEAD 2>/dev/null | sed 's|^origin/||')"
11
- [ -z "$DEFAULT_BRANCH" ] && DEFAULT_BRANCH="main"
12
- ```
13
-
14
- `$BRANCH` must be a work branch (`feature/*` or `bugfix/*`: the `pc-plan-apply` skill creates `feature/{change-slug}`). NEVER push the default branch.
15
-
16
- ### Step 2: Capture screenshots (if UI changes exist)
17
-
18
- ```bash
19
- browser_navigate url="http://localhost:{port}/{route}"
20
- browser_wait ms=2000
21
- browser_screenshot
22
- ```
23
-
24
- Save to: `openspec/changes/{change-name}/images/{feature}.png`
25
-
26
- ### Step 3: Commit and push
27
-
28
- The `pc-plan-apply` skill already committed each task group: usually only screenshots or small residuals remain. Stage **specific paths only** (never `git add .`, it sweeps unrelated files into the ship commit):
29
-
30
- ```bash
31
- git add openspec/changes/{change-name}/images/ # plus any other paths you actually changed
32
- git commit -m "feat({scope}): {description} (#{id})" # only if there is something to commit
33
- git push -u origin "$BRANCH"
34
- ```
35
-
36
- ### Step 4: Create PR
37
-
38
- ```bash
39
- gh pr create \
40
- --repo {owner}/{repo} \
41
- --base "$DEFAULT_BRANCH" \
42
- --head "$BRANCH" \
43
- --title "feat({scope}): {title} (#{id})" \
44
- --body "{description}"
45
- ```
46
-
47
- ### Step 5: Post screenshot comment
48
-
49
- Resolve commit SHA (the commit that includes screenshots):
50
-
51
- ```bash
52
- git rev-parse HEAD
53
- ```
54
-
55
- Build blob URL for each image with `?raw=true` (a plain blob URL renders the GitHub HTML page, not the image, inside `![...]()`):
56
-
57
- ```
58
- https://github.com/{owner}/{repo}/blob/{sha}/openspec/changes/{change}/images/{file}.png?raw=true
59
- ```
60
-
61
- Note: on private repos the embedded image is only visible to users with repo access.
62
-
63
- Post comment:
64
-
65
- ```bash
66
- gh pr comment {pr-number} --repo {owner}/{repo} --body $'## Screenshots\n\n![{feature}]({blob-url})'
67
- ```
68
-
1
+ **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: Verify feature branch
7
+
8
+ ```bash
9
+ BRANCH="$(git branch --show-current)"
10
+ DEFAULT_BRANCH="$(git symbolic-ref --short refs/remotes/origin/HEAD 2>/dev/null | sed 's|^origin/||')"
11
+ [ -z "$DEFAULT_BRANCH" ] && DEFAULT_BRANCH="main"
12
+ ```
13
+
14
+ `$BRANCH` must be a work branch (`feature/*` or `bugfix/*`: the `pc-plan-apply` skill creates `feature/{change-slug}`). NEVER push the default branch.
15
+
16
+ ### Step 2: Capture screenshots (if UI changes exist)
17
+
18
+ ```bash
19
+ browser_navigate url="http://localhost:{port}/{route}"
20
+ browser_wait ms=2000
21
+ browser_screenshot
22
+ ```
23
+
24
+ Save to: `openspec/changes/{change-name}/images/{feature}.png`
25
+
26
+ ### Step 3: Commit and push
27
+
28
+ The `pc-plan-apply` skill already committed each task group: usually only screenshots or small residuals remain. Stage **specific paths only** (never `git add .`, it sweeps unrelated files into the ship commit):
29
+
30
+ ```bash
31
+ git add openspec/changes/{change-name}/images/ # plus any other paths you actually changed
32
+ git commit -m "feat({scope}): {description} (#{id})" # only if there is something to commit
33
+ git push -u origin "$BRANCH"
34
+ ```
35
+
36
+ ### Step 4: Create PR
37
+
38
+ ```bash
39
+ gh pr create \
40
+ --repo {owner}/{repo} \
41
+ --base "$DEFAULT_BRANCH" \
42
+ --head "$BRANCH" \
43
+ --title "feat({scope}): {title} (#{id})" \
44
+ --body "{description}"
45
+ ```
46
+
47
+ ### Step 5: Post screenshot comment
48
+
49
+ Resolve commit SHA (the commit that includes screenshots):
50
+
51
+ ```bash
52
+ git rev-parse HEAD
53
+ ```
54
+
55
+ Build blob URL for each image with `?raw=true` (a plain blob URL renders the GitHub HTML page, not the image, inside `![...]()`):
56
+
57
+ ```
58
+ https://github.com/{owner}/{repo}/blob/{sha}/openspec/changes/{change}/images/{file}.png?raw=true
59
+ ```
60
+
61
+ Note: on private repos the embedded image is only visible to users with repo access.
62
+
63
+ Post comment:
64
+
65
+ ```bash
66
+ gh pr comment {pr-number} --repo {owner}/{repo} --body $'## Screenshots\n\n![{feature}]({blob-url})'
67
+ ```
68
+
69
69
  ---