@plainconceptsplatform/agent-harness 3.8.2 → 3.9.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 (148) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +551 -549
  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 +176 -160
  38. package/cli/steps/copy/commands.js +79 -79
  39. package/cli/steps/copy/fullstack-engineer.js +81 -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 +82 -82
  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 +12 -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 +2 -1
  92. package/harness/.opencode/plugins/pc-commit-coauthor.js +41 -41
  93. package/harness/.opencode/plugins/pc-subagent-monitor.js +184 -184
  94. package/harness/.opencode/plugins/pc-subagent-tiers-core.js +337 -0
  95. package/harness/.opencode/plugins/pc-subagent-tiers.js +34 -345
  96. package/harness/.opencode/plugins/pc-system-reminders.js +424 -424
  97. package/harness/.opencode/scripts/check-diff.mjs +305 -305
  98. package/harness/.opencode/scripts/code-rules.mjs +288 -288
  99. package/harness/.opencode/scripts/harness-doctor.mjs +52 -0
  100. package/harness/.opencode/scripts/harness-doctor.test.mjs +58 -0
  101. package/harness/.opencode/scripts/platform-contract.mjs +366 -366
  102. package/harness/.opencode/scripts/sync-agents.mjs +29 -0
  103. package/harness/AGENTS.md +55 -49
  104. package/harness/ARCHITECTURE.md +13 -13
  105. package/harness/DESIGN.md +13 -13
  106. package/harness/opencode.jsonc +36 -36
  107. package/harness/openspec/config.yaml +20 -20
  108. package/harness/skills-lock.json +17 -17
  109. package/package.json +12 -14
  110. package/skills/README.md +18 -18
  111. package/skills/agent-harness-cli/SKILL.md +86 -86
  112. package/skills/browser-automation/SKILL.md +72 -72
  113. package/skills/pc-guardrails-generic/SKILL.md +53 -53
  114. package/skills/pc-guardrails-project/SKILL.md +8 -8
  115. package/skills/pc-make-architecture/SKILL.md +33 -33
  116. package/skills/pc-make-architecture/structure-template.md +64 -64
  117. package/skills/pc-make-design/SKILL.md +45 -45
  118. package/skills/pc-make-engineer/SKILL.md +59 -59
  119. package/skills/pc-make-engineer/signal-mapping.md +53 -53
  120. package/skills/pc-make-engineer/template.md +36 -36
  121. package/skills/pc-make-guardrails/SKILL.md +44 -44
  122. package/skills/pc-make-guardrails/category-reference.md +112 -112
  123. package/skills/pc-make-merge-risk-assess/SKILL.md +70 -70
  124. package/skills/pc-make-merge-risk-assess/category-reference.md +114 -114
  125. package/skills/pc-make-user-model/SKILL.md +56 -56
  126. package/skills/pc-ops-ship/SKILL.md +22 -22
  127. package/skills/pc-plan-apply/SKILL.md +90 -90
  128. package/skills/pc-plan-apply/simple-mode.md +21 -21
  129. package/skills/pc-plan-archive/SKILL.md +66 -66
  130. package/skills/pc-plan-explore/SKILL.md +21 -21
  131. package/skills/pc-plan-goal/SKILL.md +91 -91
  132. package/skills/pc-plan-goal/branching.md +39 -39
  133. package/skills/pc-plan-goal/failure-policy.md +30 -30
  134. package/skills/pc-plan-goal/output-mode.md +10 -10
  135. package/skills/pc-plan-goal/output.md +71 -71
  136. package/skills/pc-plan-propose/SKILL.md +127 -127
  137. package/skills/pc-plan-propose/task-annotation.md +39 -39
  138. package/skills/pc-plan-quick/SKILL.md +46 -46
  139. package/skills/pc-plan-story/SKILL.md +93 -93
  140. package/skills/pc-repo-audit/SKILL.md +44 -44
  141. package/skills/pc-repo-help/SKILL.md +87 -87
  142. package/skills/pc-repo-initialize/SKILL.md +119 -119
  143. package/skills/pc-repo-onboard/SKILL.md +32 -32
  144. package/skills/pc-repo-verify/SKILL.md +150 -150
  145. package/skills/pc-userstory-az/SKILL.md +71 -71
  146. package/skills/pc-userstory-browser/SKILL.md +64 -64
  147. package/skills/pc-userstory-gh/SKILL.md +63 -63
  148. package/skills/pc-userstory-jira/SKILL.md +74 -74
@@ -1,71 +1,71 @@
1
- ---
2
- name: pc-userstory
3
- description: Parse Azure DevOps user story URL and create OpenSpec change. Use when user provides an Azure DevOps URL.
4
- license: MIT
5
- compatibility: Requires openspec CLI and Azure CLI.
6
- metadata:
7
- author: copilots
8
- version: "3.1"
9
- ---
10
-
11
- Turn an Azure DevOps work item URL into an OpenSpec change, then hand the change to `pc-plan-propose`.
12
-
13
- ## Rules
14
-
15
- - Work item data comes from `az`, never from a page fetch or a browser (denied by `pc-system-reminders`). An `az` that cannot reach the org is a blocker to report.
16
- - Never load `pc-plan-apply` until the user has said yes.
17
-
18
- ## Contracts
19
-
20
- The ID is in the URL: `?workitem=193208` or `/workitems/edit/193208` both give `193208`.
21
-
22
- ```bash
23
- az boards work-item show --id 193208
24
- ```
25
-
26
- That relies on the configured defaults, which is the one piece of setup this skill needs:
27
-
28
- ```bash
29
- az devops configure --defaults organization=https://dev.azure.com/{org} project={project}
30
- ```
31
-
32
- Without them every command needs `--organization`. A PAT with Work Items (Read and Write) and Code (Read and Write) comes from `https://dev.azure.com/{org}/_usersSettings/tokens`.
33
-
34
- From the JSON take `fields.System.Title`, `fields.System.Description` (often HTML, strip the tags), `fields.System.WorkItemType`, `fields.System.IterationPath`, `fields.System.State` and `fields.System.AcceptanceCriteria` when it is there.
35
-
36
- ```bash
37
- openspec new change "us-{id}-{slug}"
38
- ```
39
-
40
- Screenshots live in the change folder, `openspec/changes/{change-name}/images/{name}.png`. Embedding one uses the `_apis/git/repositories` URL, since `_git/` returns HTML: `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`
41
-
42
- Report:
43
-
44
- ```
45
- ## User Story Parsed
46
-
47
- Work Item: #{id}
48
- Title: {title}
49
- Type: User Story
50
- Iteration: {sprint}
51
- State: {state}
52
-
53
- Change Created: us-{id}-{slug}
54
- ```
55
-
56
- Then load `pc-plan-propose` (interactive) and, once it returns, ask:
57
-
58
- ```json
59
- {
60
- "questions": [
61
- {
62
- "header": "Ready to implement",
63
- "question": "Ready to implement?",
64
- "options": [
65
- { "label": "yes", "description": "Load the pc-plan-apply skill to start implementation." },
66
- { "label": "no", "description": "Stop here. You can run /plan-apply later." }
67
- ]
68
- }
69
- ]
70
- }
71
- ```
1
+ ---
2
+ name: pc-userstory
3
+ description: Parse Azure DevOps user story URL and create OpenSpec change. Use when user provides an Azure DevOps URL.
4
+ license: MIT
5
+ compatibility: Requires openspec CLI and Azure CLI.
6
+ metadata:
7
+ author: copilots
8
+ version: "3.1"
9
+ ---
10
+
11
+ Turn an Azure DevOps work item URL into an OpenSpec change, then hand the change to `pc-plan-propose`.
12
+
13
+ ## Rules
14
+
15
+ - Work item data comes from `az`, never from a page fetch or a browser (denied by `pc-system-reminders`). An `az` that cannot reach the org is a blocker to report.
16
+ - Never load `pc-plan-apply` until the user has said yes.
17
+
18
+ ## Contracts
19
+
20
+ The ID is in the URL: `?workitem=193208` or `/workitems/edit/193208` both give `193208`.
21
+
22
+ ```bash
23
+ az boards work-item show --id 193208
24
+ ```
25
+
26
+ That relies on the configured defaults, which is the one piece of setup this skill needs:
27
+
28
+ ```bash
29
+ az devops configure --defaults organization=https://dev.azure.com/{org} project={project}
30
+ ```
31
+
32
+ Without them every command needs `--organization`. A PAT with Work Items (Read and Write) and Code (Read and Write) comes from `https://dev.azure.com/{org}/_usersSettings/tokens`.
33
+
34
+ From the JSON take `fields.System.Title`, `fields.System.Description` (often HTML, strip the tags), `fields.System.WorkItemType`, `fields.System.IterationPath`, `fields.System.State` and `fields.System.AcceptanceCriteria` when it is there.
35
+
36
+ ```bash
37
+ openspec new change "us-{id}-{slug}"
38
+ ```
39
+
40
+ Screenshots live in the change folder, `openspec/changes/{change-name}/images/{name}.png`. Embedding one uses the `_apis/git/repositories` URL, since `_git/` returns HTML: `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`
41
+
42
+ Report:
43
+
44
+ ```
45
+ ## User Story Parsed
46
+
47
+ Work Item: #{id}
48
+ Title: {title}
49
+ Type: User Story
50
+ Iteration: {sprint}
51
+ State: {state}
52
+
53
+ Change Created: us-{id}-{slug}
54
+ ```
55
+
56
+ Then load `pc-plan-propose` (interactive) and, once it returns, ask:
57
+
58
+ ```json
59
+ {
60
+ "questions": [
61
+ {
62
+ "header": "Ready to implement",
63
+ "question": "Ready to implement?",
64
+ "options": [
65
+ { "label": "yes", "description": "Load the pc-plan-apply skill to start implementation." },
66
+ { "label": "no", "description": "Stop here. You can run /plan-apply later." }
67
+ ]
68
+ }
69
+ ]
70
+ }
71
+ ```
@@ -1,64 +1,64 @@
1
- ---
2
- name: pc-userstory
3
- description: Parse work item from any URL using browser automation. Use when user provides a URL that doesn't match GitHub/Azure/Jira CLI platforms, or when backlog platform is 'browser'.
4
- license: MIT
5
- compatibility: Requires agent-browser CLI installed and openspec CLI.
6
- metadata:
7
- author: copilots
8
- version: "2.0"
9
- ---
10
-
11
- Read a work item off its own web page, for a backlog with no CLI, then hand the change to `pc-plan-propose`. This is the fallback: a GitHub, Azure DevOps or Jira URL belongs to the CLI skill for that platform, which is faster and cannot misread a page.
12
-
13
- Browser is a backlog-only platform. Shipping runs on whichever repo platform the project configured.
14
-
15
- ## Rules
16
-
17
- - Navigate only to a URL the user gave you. This skill is the one exception to `browser-automation`'s ban on leaving localhost, and it is that narrow on purpose: a work-item page is behind the user's own login, and anything else reachable from it is too.
18
- - Read only. No clicking, no status changes, nothing written back to the tracker.
19
- - Always reuse the `backlog` session so the login survives; a login page instead of the work item means the session is not authenticated, and the user has to log in manually in the opened window before a retry.
20
-
21
- ## Contracts
22
-
23
- `agent-browser` runs its own Chrome, not the user's daily browser, and keeps state per session:
24
-
25
- ```bash
26
- agent-browser --session backlog --restore open "https://the-url-the-user-provided"
27
- agent-browser wait --load networkidle
28
- agent-browser snapshot
29
- ```
30
-
31
- `agent-browser doctor` verifies the install. The accessibility tree from `snapshot` locates fields more reliably than page text; `agent-browser read` and `agent-browser get text "h1"` fill the gaps, and `agent-browser get url` confirms the page did not navigate away. A single-page app that renders after idle needs a second wait (`--text "<known heading>"` when a stable string exists) and a fresh snapshot, not a sleep.
32
-
33
- Take the title, description with its acceptance criteria or definition of done, the ID from the URL or the page, and status, assignee, priority and labels when they are visible. Where to look, by tool:
34
-
35
- | Tool | Work item URL | Title | Description |
36
- |---|---|---|---|
37
- | Azure DevOps | `/_workitems/edit/{id}` | header | "Description" and "Acceptance Criteria" sections |
38
- | Linear | `/{team}/issue/{key}` | issue title | issue body |
39
- | Jira | `/browse/{key}` | summary | description field |
40
- | Trello | `/c/{short-id}` | card title | card description |
41
- | Anything else | as given | `<h1>` or page title | main content area |
42
-
43
- Then create the change, whose `proposal.md` names the source URL and the work item ID:
44
-
45
- ```bash
46
- openspec new change "{slug-from-title}"
47
- ```
48
-
49
- Load `pc-plan-propose` (interactive) and, once it returns, ask:
50
-
51
- ```json
52
- {
53
- "questions": [
54
- {
55
- "header": "Ready to implement",
56
- "question": "Ready to implement?",
57
- "options": [
58
- { "label": "yes", "description": "Load the pc-plan-apply skill to start implementation." },
59
- { "label": "no", "description": "Stop here. You can run /plan-apply later." }
60
- ]
61
- }
62
- ]
63
- }
64
- ```
1
+ ---
2
+ name: pc-userstory
3
+ description: Parse work item from any URL using browser automation. Use when user provides a URL that doesn't match GitHub/Azure/Jira CLI platforms, or when backlog platform is 'browser'.
4
+ license: MIT
5
+ compatibility: Requires agent-browser CLI installed and openspec CLI.
6
+ metadata:
7
+ author: copilots
8
+ version: "2.0"
9
+ ---
10
+
11
+ Read a work item off its own web page, for a backlog with no CLI, then hand the change to `pc-plan-propose`. This is the fallback: a GitHub, Azure DevOps or Jira URL belongs to the CLI skill for that platform, which is faster and cannot misread a page.
12
+
13
+ Browser is a backlog-only platform. Shipping runs on whichever repo platform the project configured.
14
+
15
+ ## Rules
16
+
17
+ - Navigate only to a URL the user gave you. This skill is the one exception to `browser-automation`'s ban on leaving localhost, and it is that narrow on purpose: a work-item page is behind the user's own login, and anything else reachable from it is too.
18
+ - Read only. No clicking, no status changes, nothing written back to the tracker.
19
+ - Always reuse the `backlog` session so the login survives; a login page instead of the work item means the session is not authenticated, and the user has to log in manually in the opened window before a retry.
20
+
21
+ ## Contracts
22
+
23
+ `agent-browser` runs its own Chrome, not the user's daily browser, and keeps state per session:
24
+
25
+ ```bash
26
+ agent-browser --session backlog --restore open "https://the-url-the-user-provided"
27
+ agent-browser wait --load networkidle
28
+ agent-browser snapshot
29
+ ```
30
+
31
+ `agent-browser doctor` verifies the install. The accessibility tree from `snapshot` locates fields more reliably than page text; `agent-browser read` and `agent-browser get text "h1"` fill the gaps, and `agent-browser get url` confirms the page did not navigate away. A single-page app that renders after idle needs a second wait (`--text "<known heading>"` when a stable string exists) and a fresh snapshot, not a sleep.
32
+
33
+ Take the title, description with its acceptance criteria or definition of done, the ID from the URL or the page, and status, assignee, priority and labels when they are visible. Where to look, by tool:
34
+
35
+ | Tool | Work item URL | Title | Description |
36
+ |---|---|---|---|
37
+ | Azure DevOps | `/_workitems/edit/{id}` | header | "Description" and "Acceptance Criteria" sections |
38
+ | Linear | `/{team}/issue/{key}` | issue title | issue body |
39
+ | Jira | `/browse/{key}` | summary | description field |
40
+ | Trello | `/c/{short-id}` | card title | card description |
41
+ | Anything else | as given | `<h1>` or page title | main content area |
42
+
43
+ Then create the change, whose `proposal.md` names the source URL and the work item ID:
44
+
45
+ ```bash
46
+ openspec new change "{slug-from-title}"
47
+ ```
48
+
49
+ Load `pc-plan-propose` (interactive) and, once it returns, ask:
50
+
51
+ ```json
52
+ {
53
+ "questions": [
54
+ {
55
+ "header": "Ready to implement",
56
+ "question": "Ready to implement?",
57
+ "options": [
58
+ { "label": "yes", "description": "Load the pc-plan-apply skill to start implementation." },
59
+ { "label": "no", "description": "Stop here. You can run /plan-apply later." }
60
+ ]
61
+ }
62
+ ]
63
+ }
64
+ ```
@@ -1,63 +1,63 @@
1
- ---
2
- name: pc-userstory
3
- description: Parse GitHub Issue URL and create OpenSpec change. Use when user provides a GitHub Issue URL.
4
- license: MIT
5
- compatibility: Requires openspec CLI and gh CLI.
6
- metadata:
7
- author: copilots
8
- version: "1.1"
9
- ---
10
-
11
- Turn a GitHub Issue URL into an OpenSpec change, then hand the change to `pc-plan-propose`.
12
-
13
- ## Rules
14
-
15
- - Issue data comes from `gh`, never from a page fetch (denied by `pc-system-reminders`). An unavailable or unauthenticated `gh` is a blocker to report: `gh auth status` says which.
16
- - Always pass `--repo {owner}/{repo}`. Git context resolves to the wrong repository in a fork or a worktree, and the failure looks like a missing issue.
17
- - Never load `pc-plan-apply` until the user has said yes.
18
-
19
- ## Contracts
20
-
21
- `https://github.com/{owner}/{repo}/issues/42` gives owner, repo and number `42`.
22
-
23
- ```bash
24
- gh issue view 42 --repo {owner}/{repo} --json number,title,body,labels,milestone,state
25
- ```
26
-
27
- An auth error or a 404 here is the blocker; do not work around it. From the JSON take `number`, `title`, `body` (description and acceptance criteria), `labels`, `milestone` and `state`.
28
-
29
- ```bash
30
- openspec new change "gh-{number}-{slug}"
31
- ```
32
-
33
- Screenshots live in the change folder, `openspec/changes/{change-name}/images/{name}.png`, and embed as a blob URL pinned to a commit SHA with `?raw=true`: `https://github.com/{owner}/{repo}/blob/{sha}/openspec/changes/{change}/images/{file}.png?raw=true`.
34
-
35
- Report:
36
-
37
- ```
38
- ## Issue Parsed
39
-
40
- Issue: #{number}
41
- Title: {title}
42
- State: {state}
43
- Milestone: {milestone}
44
-
45
- Change Created: gh-{number}-{slug}
46
- ```
47
-
48
- Then load `pc-plan-propose` (interactive) and, once it returns, ask:
49
-
50
- ```json
51
- {
52
- "questions": [
53
- {
54
- "header": "Ready to implement",
55
- "question": "Ready to implement?",
56
- "options": [
57
- { "label": "yes", "description": "Load the pc-plan-apply skill to start implementation." },
58
- { "label": "no", "description": "Stop here. You can run /plan-apply later." }
59
- ]
60
- }
61
- ]
62
- }
63
- ```
1
+ ---
2
+ name: pc-userstory
3
+ description: Parse GitHub Issue URL and create OpenSpec change. Use when user provides a GitHub Issue URL.
4
+ license: MIT
5
+ compatibility: Requires openspec CLI and gh CLI.
6
+ metadata:
7
+ author: copilots
8
+ version: "1.1"
9
+ ---
10
+
11
+ Turn a GitHub Issue URL into an OpenSpec change, then hand the change to `pc-plan-propose`.
12
+
13
+ ## Rules
14
+
15
+ - Issue data comes from `gh`, never from a page fetch (denied by `pc-system-reminders`). An unavailable or unauthenticated `gh` is a blocker to report: `gh auth status` says which.
16
+ - Always pass `--repo {owner}/{repo}`. Git context resolves to the wrong repository in a fork or a worktree, and the failure looks like a missing issue.
17
+ - Never load `pc-plan-apply` until the user has said yes.
18
+
19
+ ## Contracts
20
+
21
+ `https://github.com/{owner}/{repo}/issues/42` gives owner, repo and number `42`.
22
+
23
+ ```bash
24
+ gh issue view 42 --repo {owner}/{repo} --json number,title,body,labels,milestone,state
25
+ ```
26
+
27
+ An auth error or a 404 here is the blocker; do not work around it. From the JSON take `number`, `title`, `body` (description and acceptance criteria), `labels`, `milestone` and `state`.
28
+
29
+ ```bash
30
+ openspec new change "gh-{number}-{slug}"
31
+ ```
32
+
33
+ Screenshots live in the change folder, `openspec/changes/{change-name}/images/{name}.png`, and embed as a blob URL pinned to a commit SHA with `?raw=true`: `https://github.com/{owner}/{repo}/blob/{sha}/openspec/changes/{change}/images/{file}.png?raw=true`.
34
+
35
+ Report:
36
+
37
+ ```
38
+ ## Issue Parsed
39
+
40
+ Issue: #{number}
41
+ Title: {title}
42
+ State: {state}
43
+ Milestone: {milestone}
44
+
45
+ Change Created: gh-{number}-{slug}
46
+ ```
47
+
48
+ Then load `pc-plan-propose` (interactive) and, once it returns, ask:
49
+
50
+ ```json
51
+ {
52
+ "questions": [
53
+ {
54
+ "header": "Ready to implement",
55
+ "question": "Ready to implement?",
56
+ "options": [
57
+ { "label": "yes", "description": "Load the pc-plan-apply skill to start implementation." },
58
+ { "label": "no", "description": "Stop here. You can run /plan-apply later." }
59
+ ]
60
+ }
61
+ ]
62
+ }
63
+ ```
@@ -1,74 +1,74 @@
1
- ---
2
- name: pc-userstory
3
- description: Parse a Jira work item and create an OpenSpec change. Use when the user provides a Jira URL or a bare issue key (e.g. PROJ-123).
4
- license: MIT
5
- compatibility: Requires openspec CLI and Atlassian CLI (acli).
6
- metadata:
7
- author: copilots
8
- version: "1.0"
9
- ---
10
-
11
- Turn a Jira issue into an OpenSpec change, then hand the change to `pc-plan-propose`. Jira is backlog-only: it has no repositories and no pull requests, so shipping runs on whichever repo platform the project configured.
12
-
13
- ## Rules
14
-
15
- - Issue data comes from `acli`, never from a page fetch or a browser (denied by `pc-system-reminders`). An `acli` that cannot authenticate is a blocker to report; install and login are documented at https://developer.atlassian.com/cloud/acli/guides/install-acli/.
16
- - Never transition the work item without asking, and never transition one that is not in `To Do` or `Backlog`. Moving somebody's ticket is visible to their whole team.
17
- - In an unattended run, skip the question and the transition rather than resolving it yes.
18
- - Never load `pc-plan-apply` until the user has said yes.
19
-
20
- ## Contracts
21
-
22
- The key is `PROJ-123`, taken from `/browse/PROJ-123`, `/jira/core/projects/PROJ/issues/PROJ-123`, `?selectedIssue=PROJ-123`, or given bare.
23
-
24
- ```bash
25
- acli jira workitem view --key "PROJ-123"
26
- ```
27
-
28
- From the output take the summary (title), the description (context), acceptance criteria wherever they live (spec requirements), labels, status, assignee and priority.
29
-
30
- ```bash
31
- acli jira workitem transition --key "PROJ-123" --status "In Progress"
32
- ```
33
-
34
- Ask before that one:
35
-
36
- ```json
37
- {
38
- "questions": [
39
- {
40
- "header": "Transition work item",
41
- "question": "Move {KEY} to In Progress?",
42
- "options": [
43
- { "label": "yes", "description": "Transition the work item to In Progress." },
44
- { "label": "no", "description": "Skip the transition." }
45
- ]
46
- }
47
- ]
48
- }
49
- ```
50
-
51
- Then create the change, whose `proposal.md` names the Jira key and links back to it:
52
-
53
- ```bash
54
- openspec new change "{slug-from-summary}"
55
- ```
56
-
57
- Load `pc-plan-propose` (interactive) and, once it returns, ask:
58
-
59
- ```json
60
- {
61
- "questions": [
62
- {
63
- "header": "Ready to implement",
64
- "question": "Ready to implement?",
65
- "options": [
66
- { "label": "yes", "description": "Load the pc-plan-apply skill to start implementation." },
67
- { "label": "no", "description": "Stop here. You can run /plan-apply later." }
68
- ]
69
- }
70
- ]
71
- }
72
- ```
73
-
74
- Also available: `acli jira workitem search --jql "..."` and `acli jira workitem comment create --key "PROJ-123" --body "..."`.
1
+ ---
2
+ name: pc-userstory
3
+ description: Parse a Jira work item and create an OpenSpec change. Use when the user provides a Jira URL or a bare issue key (e.g. PROJ-123).
4
+ license: MIT
5
+ compatibility: Requires openspec CLI and Atlassian CLI (acli).
6
+ metadata:
7
+ author: copilots
8
+ version: "1.0"
9
+ ---
10
+
11
+ Turn a Jira issue into an OpenSpec change, then hand the change to `pc-plan-propose`. Jira is backlog-only: it has no repositories and no pull requests, so shipping runs on whichever repo platform the project configured.
12
+
13
+ ## Rules
14
+
15
+ - Issue data comes from `acli`, never from a page fetch or a browser (denied by `pc-system-reminders`). An `acli` that cannot authenticate is a blocker to report; install and login are documented at https://developer.atlassian.com/cloud/acli/guides/install-acli/.
16
+ - Never transition the work item without asking, and never transition one that is not in `To Do` or `Backlog`. Moving somebody's ticket is visible to their whole team.
17
+ - In an unattended run, skip the question and the transition rather than resolving it yes.
18
+ - Never load `pc-plan-apply` until the user has said yes.
19
+
20
+ ## Contracts
21
+
22
+ The key is `PROJ-123`, taken from `/browse/PROJ-123`, `/jira/core/projects/PROJ/issues/PROJ-123`, `?selectedIssue=PROJ-123`, or given bare.
23
+
24
+ ```bash
25
+ acli jira workitem view --key "PROJ-123"
26
+ ```
27
+
28
+ From the output take the summary (title), the description (context), acceptance criteria wherever they live (spec requirements), labels, status, assignee and priority.
29
+
30
+ ```bash
31
+ acli jira workitem transition --key "PROJ-123" --status "In Progress"
32
+ ```
33
+
34
+ Ask before that one:
35
+
36
+ ```json
37
+ {
38
+ "questions": [
39
+ {
40
+ "header": "Transition work item",
41
+ "question": "Move {KEY} to In Progress?",
42
+ "options": [
43
+ { "label": "yes", "description": "Transition the work item to In Progress." },
44
+ { "label": "no", "description": "Skip the transition." }
45
+ ]
46
+ }
47
+ ]
48
+ }
49
+ ```
50
+
51
+ Then create the change, whose `proposal.md` names the Jira key and links back to it:
52
+
53
+ ```bash
54
+ openspec new change "{slug-from-summary}"
55
+ ```
56
+
57
+ Load `pc-plan-propose` (interactive) and, once it returns, ask:
58
+
59
+ ```json
60
+ {
61
+ "questions": [
62
+ {
63
+ "header": "Ready to implement",
64
+ "question": "Ready to implement?",
65
+ "options": [
66
+ { "label": "yes", "description": "Load the pc-plan-apply skill to start implementation." },
67
+ { "label": "no", "description": "Stop here. You can run /plan-apply later." }
68
+ ]
69
+ }
70
+ ]
71
+ }
72
+ ```
73
+
74
+ Also available: `acli jira workitem search --jql "..."` and `acli jira workitem comment create --key "PROJ-123" --body "..."`.