@plainconceptsplatform/agent-harness 3.3.1 → 3.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -21
- package/README.md +454 -454
- package/cli/commands/join.js +259 -259
- package/cli/commands/migrate.js +310 -310
- package/cli/commands/shared.js +27 -27
- package/cli/commands/single.js +79 -79
- package/cli/commands/wizard.js +134 -134
- package/cli/fragments/ops-backlog/az.md +28 -28
- package/cli/fragments/ops-backlog/gh.md +28 -28
- package/cli/fragments/ops-backlog/jira.md +28 -28
- package/cli/fragments/ops-review/az.md +62 -62
- package/cli/fragments/ops-review/gh.md +51 -51
- package/cli/fragments/ops-review/gl.md +55 -55
- package/cli/fragments/ops-ship/gh.md +67 -67
- package/cli/fragments/ops-ship/gl.md +84 -84
- package/cli/index.js +116 -116
- package/cli/presets/clean.json +21 -21
- package/cli/presets/models.json +68 -68
- package/cli/presets/optimization.json +32 -32
- package/cli/presets/platforms.json +76 -76
- package/cli/presets/source.json +23 -23
- package/cli/steps/clean/index.js +120 -120
- package/cli/steps/copy/agents.js +120 -120
- package/cli/steps/copy/fullstack-engineer.js +89 -89
- package/cli/steps/copy/opencode-json.js +324 -324
- package/cli/steps/copy/skills.js +316 -316
- package/cli/steps/models/format.js +88 -88
- package/cli/steps/models/index.js +64 -64
- package/cli/steps/openspec/index.js +136 -136
- package/cli/steps/optimization/codegraph.js +141 -141
- package/cli/steps/optimization/detect.js +66 -66
- package/cli/steps/optimization/humanizer.js +17 -17
- package/cli/steps/optimization/index.js +158 -158
- package/cli/steps/optimization/memory.js +91 -91
- package/cli/steps/optimization/patch-guardrails.js +111 -111
- package/cli/steps/optimization/simple-english.js +17 -17
- package/cli/steps/optimization/skills-lock.js +30 -30
- package/cli/steps/platform/index.js +109 -109
- package/cli/steps/source/index.js +123 -123
- package/cli/utils/agent-color.js +111 -111
- package/cli/utils/copy.js +134 -134
- package/cli/utils/exec-spinner.js +47 -47
- package/cli/utils/exec.js +134 -134
- package/cli/utils/legacy-check.js +30 -30
- package/cli/utils/models-cache.js +58 -58
- package/cli/utils/models-pricing.js +42 -42
- package/cli/utils/paths.js +81 -80
- package/cli/utils/process.js +3 -3
- package/cli/utils/terminal.js +6 -6
- package/cli/utils/update-manifest.js +75 -75
- package/harness/.opencode/_gitignore +10 -9
- package/harness/.opencode/commands/ops-backlog.md +10 -10
- package/harness/.opencode/commands/ops-review.md +10 -8
- package/harness/.opencode/commands/ops-ship.md +9 -9
- package/harness/.opencode/commands/plan-archive.md +7 -5
- package/harness/.opencode/commands/plan-explore.md +11 -9
- package/harness/.opencode/commands/plan-propose.md +11 -9
- package/harness/.opencode/commands/plan-quick.md +7 -5
- package/harness/.opencode/commands/plan-story.md +11 -9
- package/harness/.opencode/commands/repo-audit.md +7 -5
- package/harness/.opencode/commands/repo-help.md +5 -5
- package/harness/.opencode/package.json +5 -5
- package/harness/.opencode/plugins/pc-subagent-monitor.js +184 -184
- package/harness/.opencode/plugins/pc-subagent-tiers.js +367 -354
- package/harness/.opencode/plugins/pc-system-reminders.js +386 -386
- package/harness/.opencode/scripts/check-diff.mjs +244 -244
- package/harness/.opencode/scripts/code-rules.mjs +288 -288
- package/harness/ARCHITECTURE.md +13 -13
- package/harness/DESIGN.md +13 -13
- package/harness/opencode.jsonc +36 -36
- package/harness/openspec/config.yaml +20 -20
- package/harness/skills-lock.json +17 -17
- package/package.json +12 -14
- package/skills/agent-harness-cli/SKILL.md +86 -86
- package/skills/pc-guardrails-generic/SKILL.md +53 -53
- package/skills/pc-guardrails-project/SKILL.md +8 -8
- package/skills/pc-make-architecture/structure-template.md +64 -64
- package/skills/pc-make-engineer/SKILL.md +59 -59
- package/skills/pc-make-engineer/template.md +36 -36
- package/skills/pc-make-guardrails/category-reference.md +112 -112
- package/skills/pc-make-merge-risk-assess/SKILL.md +70 -70
- package/skills/pc-make-merge-risk-assess/category-reference.md +114 -114
- package/skills/pc-ops-ship/SKILL.md +22 -22
- package/skills/pc-plan-apply/SKILL.md +86 -86
- package/skills/pc-plan-apply/simple-mode.md +21 -21
- package/skills/pc-plan-explore/SKILL.md +21 -21
- package/skills/pc-plan-goal/SKILL.md +91 -91
- package/skills/pc-plan-goal/failure-policy.md +30 -30
- package/skills/pc-plan-goal/output-mode.md +10 -10
- package/skills/pc-plan-propose/SKILL.md +125 -125
- package/skills/pc-plan-propose/task-annotation.md +39 -39
- package/skills/pc-plan-quick/SKILL.md +46 -46
- package/skills/pc-repo-audit/SKILL.md +44 -44
- package/skills/pc-repo-help/SKILL.md +87 -87
- package/skills/pc-repo-verify/SKILL.md +150 -150
|
@@ -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,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'
|
|
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'
|
|
66
|
+
```
|
|
67
|
+
|
|
68
68
|
---
|
|
@@ -1,85 +1,85 @@
|
|
|
1
|
-
GitLab data comes from the `glab` CLI; a page fetch of gitlab.com is denied (pc-system-reminders). If `glab` is unavailable, report it as a blocker. Always pass `--repo {owner}/{repo}` explicitly, never rely on git context to resolve the repo.
|
|
2
|
-
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
### Step 1: Verify feature branch
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
BRANCH="$(git branch --show-current)"
|
|
9
|
-
DEFAULT_BRANCH="$(git symbolic-ref --short refs/remotes/origin/HEAD 2>/dev/null | sed 's|^origin/||')"
|
|
10
|
-
[ -z "$DEFAULT_BRANCH" ] && DEFAULT_BRANCH="main"
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
`$BRANCH` must be a work branch (`feature/*` or `bugfix/*`: the `pc-plan-apply` skill creates `feature/{change-slug}`). Never push the default branch.
|
|
14
|
-
|
|
15
|
-
### Step 2: Capture screenshots (if UI changes exist)
|
|
16
|
-
|
|
17
|
-
```bash
|
|
18
|
-
browser_navigate url="http://localhost:{port}/{route}"
|
|
19
|
-
browser_wait ms=2000
|
|
20
|
-
browser_screenshot
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
Save to: `openspec/changes/{change-name}/images/{feature}.png`
|
|
24
|
-
|
|
25
|
-
### Step 3: Commit and push
|
|
26
|
-
|
|
27
|
-
The `pc-plan-apply` skill already committed each task group: usually only screenshots or small residuals remain. Stage the paths you actually changed; unscoped staging is denied (`pc-system-reminders`):
|
|
28
|
-
|
|
29
|
-
```bash
|
|
30
|
-
git add openspec/changes/{change-name}/images/ # plus any other paths you actually changed
|
|
31
|
-
git commit -m "{change}: {summary}" # only if there is something to commit
|
|
32
|
-
git push -u origin "$BRANCH"
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
### Step 4: Upload screenshots (if any)
|
|
36
|
-
|
|
37
|
-
If screenshots exist, upload them so they can be referenced in the MR description:
|
|
38
|
-
|
|
39
|
-
```bash
|
|
40
|
-
glab api --method POST "projects/:id/uploads" -f "file=@openspec/changes/{change-name}/images/{feature}.png"
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
(`:id` is glab's placeholder for the current project: this is the one sanctioned use of git context in this skill.)
|
|
44
|
-
|
|
45
|
-
Parse the returned `markdown` field: use it to embed the image in the MR description. If the upload fails (the endpoint needs multipart form data and `-f` support varies by glab version), fall back to referencing the image committed on the branch instead.
|
|
46
|
-
|
|
47
|
-
If no UI changes, skip this step.
|
|
48
|
-
|
|
49
|
-
### Step 5: Create Merge Request
|
|
50
|
-
|
|
51
|
-
```bash
|
|
52
|
-
glab mr create \
|
|
53
|
-
--source-branch "$BRANCH" \
|
|
54
|
-
--target-branch "$DEFAULT_BRANCH" \
|
|
55
|
-
--title "{title}" \
|
|
56
|
-
--description "Closes {issue-link}
|
|
57
|
-
|
|
58
|
-
## Summary
|
|
59
|
-
{summary from proposal.md}
|
|
60
|
-
|
|
61
|
-
## Changes
|
|
62
|
-
{key changes from tasks.md}
|
|
63
|
-
|
|
64
|
-
## Test plan
|
|
65
|
-
- [ ] {checklist of manual verification steps}
|
|
66
|
-
{screenshots if available}" \
|
|
67
|
-
--remove-source-branch \
|
|
68
|
-
--squash-before-merge
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
Do NOT use `--yes` unless running in autopilot/non-interactive mode.
|
|
72
|
-
|
|
73
|
-
### Step 6: Report
|
|
74
|
-
|
|
75
|
-
Display:
|
|
76
|
-
|
|
77
|
-
```text
|
|
78
|
-
Merge Request created
|
|
79
|
-
MR: {mr-url}
|
|
80
|
-
Title: {title}
|
|
81
|
-
Source: {branch}
|
|
82
|
-
Target: {default-branch}
|
|
83
|
-
```
|
|
84
|
-
|
|
1
|
+
GitLab data comes from the `glab` CLI; a page fetch of gitlab.com is denied (pc-system-reminders). If `glab` is unavailable, report it as a blocker. Always pass `--repo {owner}/{repo}` explicitly, never rely on git context to resolve the repo.
|
|
2
|
+
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
### Step 1: Verify feature branch
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
BRANCH="$(git branch --show-current)"
|
|
9
|
+
DEFAULT_BRANCH="$(git symbolic-ref --short refs/remotes/origin/HEAD 2>/dev/null | sed 's|^origin/||')"
|
|
10
|
+
[ -z "$DEFAULT_BRANCH" ] && DEFAULT_BRANCH="main"
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
`$BRANCH` must be a work branch (`feature/*` or `bugfix/*`: the `pc-plan-apply` skill creates `feature/{change-slug}`). Never push the default branch.
|
|
14
|
+
|
|
15
|
+
### Step 2: Capture screenshots (if UI changes exist)
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
browser_navigate url="http://localhost:{port}/{route}"
|
|
19
|
+
browser_wait ms=2000
|
|
20
|
+
browser_screenshot
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Save to: `openspec/changes/{change-name}/images/{feature}.png`
|
|
24
|
+
|
|
25
|
+
### Step 3: Commit and push
|
|
26
|
+
|
|
27
|
+
The `pc-plan-apply` skill already committed each task group: usually only screenshots or small residuals remain. Stage the paths you actually changed; unscoped staging is denied (`pc-system-reminders`):
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
git add openspec/changes/{change-name}/images/ # plus any other paths you actually changed
|
|
31
|
+
git commit -m "{change}: {summary}" # only if there is something to commit
|
|
32
|
+
git push -u origin "$BRANCH"
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### Step 4: Upload screenshots (if any)
|
|
36
|
+
|
|
37
|
+
If screenshots exist, upload them so they can be referenced in the MR description:
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
glab api --method POST "projects/:id/uploads" -f "file=@openspec/changes/{change-name}/images/{feature}.png"
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
(`:id` is glab's placeholder for the current project: this is the one sanctioned use of git context in this skill.)
|
|
44
|
+
|
|
45
|
+
Parse the returned `markdown` field: use it to embed the image in the MR description. If the upload fails (the endpoint needs multipart form data and `-f` support varies by glab version), fall back to referencing the image committed on the branch instead.
|
|
46
|
+
|
|
47
|
+
If no UI changes, skip this step.
|
|
48
|
+
|
|
49
|
+
### Step 5: Create Merge Request
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
glab mr create \
|
|
53
|
+
--source-branch "$BRANCH" \
|
|
54
|
+
--target-branch "$DEFAULT_BRANCH" \
|
|
55
|
+
--title "{title}" \
|
|
56
|
+
--description "Closes {issue-link}
|
|
57
|
+
|
|
58
|
+
## Summary
|
|
59
|
+
{summary from proposal.md}
|
|
60
|
+
|
|
61
|
+
## Changes
|
|
62
|
+
{key changes from tasks.md}
|
|
63
|
+
|
|
64
|
+
## Test plan
|
|
65
|
+
- [ ] {checklist of manual verification steps}
|
|
66
|
+
{screenshots if available}" \
|
|
67
|
+
--remove-source-branch \
|
|
68
|
+
--squash-before-merge
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Do NOT use `--yes` unless running in autopilot/non-interactive mode.
|
|
72
|
+
|
|
73
|
+
### Step 6: Report
|
|
74
|
+
|
|
75
|
+
Display:
|
|
76
|
+
|
|
77
|
+
```text
|
|
78
|
+
Merge Request created
|
|
79
|
+
MR: {mr-url}
|
|
80
|
+
Title: {title}
|
|
81
|
+
Source: {branch}
|
|
82
|
+
Target: {default-branch}
|
|
83
|
+
```
|
|
84
|
+
|
|
85
85
|
---
|