@plainconceptsplatform/agent-harness 2.0.0 → 2.0.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.
Files changed (116) hide show
  1. package/README.md +423 -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 +7 -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 +179 -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/fragments/archive/az.md +95 -95
  79. package/src/fragments/archive/gh.md +94 -94
  80. package/src/fragments/archive/gl.md +94 -94
  81. package/src/fragments/archive/none.md +73 -73
  82. package/src/fragments/guardrails/codegraph.md +7 -7
  83. package/src/fragments/guardrails/humanizer.md +4 -4
  84. package/src/fragments/guardrails/memory.md +4 -4
  85. package/src/fragments/guardrails/rtk.md +3 -3
  86. package/src/fragments/guardrails/simple-english.md +4 -4
  87. package/src/fragments/ops-backlog/az.md +28 -28
  88. package/src/fragments/ops-backlog/gh.md +29 -29
  89. package/src/fragments/ops-backlog/jira.md +28 -28
  90. package/src/fragments/ops-evidence/az.md +41 -41
  91. package/src/fragments/ops-evidence/gh.md +53 -53
  92. package/src/fragments/ops-evidence/jira.md +38 -38
  93. package/src/fragments/ops-review/az.md +62 -62
  94. package/src/fragments/ops-review/gh.md +52 -52
  95. package/src/fragments/ops-review/gl.md +56 -56
  96. package/src/fragments/ops-ship/az.md +80 -80
  97. package/src/fragments/ops-ship/gh.md +68 -68
  98. package/src/fragments/ops-ship/gl.md +85 -85
  99. package/src/index.js +107 -107
  100. package/src/presets/agents-content.json +53 -53
  101. package/src/presets/models.json +68 -68
  102. package/src/steps/copy/agents.js +118 -118
  103. package/src/steps/copy/commands.js +91 -91
  104. package/src/steps/copy/fullstack-engineer.js +83 -83
  105. package/src/steps/copy/index.js +88 -88
  106. package/src/steps/copy/opencode-json.js +129 -129
  107. package/src/steps/copy/skills.js +196 -196
  108. package/src/steps/metadata/index.js +108 -108
  109. package/src/steps/models/write.js +34 -34
  110. package/src/steps/optimization/patch-guardrails.js +108 -108
  111. package/src/utils/copy.js +108 -108
  112. package/src/utils/legacy-check.js +30 -30
  113. package/src/utils/models-cache.js +58 -58
  114. package/src/utils/paths.js +64 -64
  115. package/src/utils/update-manifest.js +49 -49
  116. package/src/content/.opencode/plugins/pc-system-reminders.test.js +0 -35
@@ -1,157 +1,157 @@
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
- Use `az` CLI for all Azure DevOps operations. Browser MCP tools are out of scope for this skill.
12
-
13
- ## Azure CLI Setup (One-Time)
14
-
15
- ```bash
16
- az config set extension.dynamic_install_allow_preview=true
17
- az extension add --name azure-devops
18
- az login
19
- az devops login --organization https://dev.azure.com/{org}
20
- az devops configure --defaults organization=https://dev.azure.com/{org} project={project}
21
- ```
22
-
23
- The `configure --defaults` line is required: every command below relies on the default org/project instead of passing `--organization`.
24
-
25
- PAT Token: go to `https://dev.azure.com/{org}/_usersSettings/tokens`. Create with scopes: Work Items (Read and Write) and Code (Read and Write).
26
-
27
- ## Steps
28
-
29
- 1. **Extract Work Item ID** from URL
30
- - `?workitem=193208` -> ID: 193208
31
- - `/workitems/edit/193208` -> ID: 193208
32
-
33
- 2. **Fetch Work Item**
34
- ```bash
35
- az boards work-item show --id 193208
36
- ```
37
- Uses the default org, no `--organization` flag needed.
38
-
39
- 3. **Extract Key Fields** from JSON response:
40
- - `fields.System.Title` -> Title
41
- - `fields.System.Description` -> Description (may be HTML, strip tags)
42
- - `fields.System.WorkItemType` -> Type
43
- - `fields.System.IterationPath` -> Sprint
44
- - `fields.System.State` -> State
45
- - `fields.System.AcceptanceCriteria` -> AC (if present)
46
-
47
- 4. **Create OpenSpec Change**
48
- ```bash
49
- openspec new change "us-{id}-{slug}"
50
- ```
51
-
52
- 5. **Hand off to proposal.** Load the `pc-plan-propose` skill (interactive mode) to generate the proposal, specs, and tasks. After it completes, call the `question` tool:
53
-
54
- ```json
55
- {
56
- "questions": [
57
- {
58
- "header": "Ready to implement",
59
- "question": "Ready to implement?",
60
- "options": [
61
- { "label": "yes", "description": "Load the pc-plan-apply skill to start implementation." },
62
- { "label": "no", "description": "Stop here. You can run /plan-apply later." }
63
- ]
64
- }
65
- ]
66
- }
67
- ```
68
-
69
- Wait for confirmation before loading `pc-plan-apply`.
70
-
71
- ## Full Azure DevOps CLI Reference
72
-
73
- ### Work Items
74
- ```bash
75
- # Read work item
76
- az boards work-item show --id <id>
77
-
78
- # Update work item state
79
- az boards work-item update --id <id> --state "Active"
80
- ```
81
-
82
- ### PR Threads (Comments)
83
- ```bash
84
- # Read all threads
85
- az devops invoke \
86
- --area git --resource pullRequestThreads \
87
- --route-parameters project={project} repositoryId=<repo> pullRequestId=<id> \
88
- --http-method GET --api-version 7.1
89
-
90
- # Post new comment thread (requires body.json)
91
- az devops invoke \
92
- --area git --resource pullRequestThreads \
93
- --route-parameters project={project} repositoryId=<repo> pullRequestId=<id> \
94
- --http-method POST --api-version 7.1 --in-file body.json
95
-
96
- # Reply to existing thread
97
- az devops invoke \
98
- --area git --resource pullRequestThreadComments \
99
- --route-parameters project={project} repositoryId=<repo> pullRequestId=<id> threadId=<tid> \
100
- --http-method POST --api-version 7.1 --in-file reply.json
101
- ```
102
-
103
- ### Comment Body JSON format
104
- ```json
105
- {
106
- "comments": [
107
- {
108
- "parentCommentId": 0,
109
- "content": "Your markdown comment here.",
110
- "commentType": 1
111
- }
112
- ],
113
- "status": "active"
114
- }
115
- ```
116
-
117
- For replies, `parentCommentId` should be the ID of the first comment in the thread (usually 1).
118
-
119
- ## Screenshot / Image Strategy
120
-
121
- Save to openspec change folder and reference via raw URL. Use `_apis/git/repositories` URLs (not `_git/`, which return HTML):
122
-
123
- ```
124
- openspec/changes/{change-name}/images/{screenshot}.png
125
- ```
126
-
127
- Raw URL format (renders inline in PR comments):
128
- ```
129
- 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
130
- ```
131
-
132
- ## URL Formats Reference
133
-
134
- ```
135
- # Sprint board with work item
136
- https://dev.azure.com/{org}/{project}/_sprints/backlog/{team}/{project}/Sprint%20110?workitem=193208
137
-
138
- # Direct work item
139
- https://dev.azure.com/{org}/{project}/_workitems/edit/193208
140
-
141
- # PR
142
- https://dev.azure.com/{org}/{project}/_git/{repo}/pullrequest/{pr-id}
143
- ```
144
-
145
- ## Output Format
146
-
147
- ```
148
- ## User Story Parsed
149
-
150
- Work Item: #{id}
151
- Title: {title}
152
- Type: User Story
153
- Iteration: {sprint}
154
- State: {state}
155
-
156
- Change Created: us-{id}-{slug}
157
- ```
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
+ Use `az` CLI for all Azure DevOps operations. Browser MCP tools are out of scope for this skill.
12
+
13
+ ## Azure CLI Setup (One-Time)
14
+
15
+ ```bash
16
+ az config set extension.dynamic_install_allow_preview=true
17
+ az extension add --name azure-devops
18
+ az login
19
+ az devops login --organization https://dev.azure.com/{org}
20
+ az devops configure --defaults organization=https://dev.azure.com/{org} project={project}
21
+ ```
22
+
23
+ The `configure --defaults` line is required: every command below relies on the default org/project instead of passing `--organization`.
24
+
25
+ PAT Token: go to `https://dev.azure.com/{org}/_usersSettings/tokens`. Create with scopes: Work Items (Read and Write) and Code (Read and Write).
26
+
27
+ ## Steps
28
+
29
+ 1. **Extract Work Item ID** from URL
30
+ - `?workitem=193208` -> ID: 193208
31
+ - `/workitems/edit/193208` -> ID: 193208
32
+
33
+ 2. **Fetch Work Item**
34
+ ```bash
35
+ az boards work-item show --id 193208
36
+ ```
37
+ Uses the default org, no `--organization` flag needed.
38
+
39
+ 3. **Extract Key Fields** from JSON response:
40
+ - `fields.System.Title` -> Title
41
+ - `fields.System.Description` -> Description (may be HTML, strip tags)
42
+ - `fields.System.WorkItemType` -> Type
43
+ - `fields.System.IterationPath` -> Sprint
44
+ - `fields.System.State` -> State
45
+ - `fields.System.AcceptanceCriteria` -> AC (if present)
46
+
47
+ 4. **Create OpenSpec Change**
48
+ ```bash
49
+ openspec new change "us-{id}-{slug}"
50
+ ```
51
+
52
+ 5. **Hand off to proposal.** Load the `pc-plan-propose` skill (interactive mode) to generate the proposal, specs, and tasks. After it completes, call the `question` tool:
53
+
54
+ ```json
55
+ {
56
+ "questions": [
57
+ {
58
+ "header": "Ready to implement",
59
+ "question": "Ready to implement?",
60
+ "options": [
61
+ { "label": "yes", "description": "Load the pc-plan-apply skill to start implementation." },
62
+ { "label": "no", "description": "Stop here. You can run /plan-apply later." }
63
+ ]
64
+ }
65
+ ]
66
+ }
67
+ ```
68
+
69
+ Wait for confirmation before loading `pc-plan-apply`.
70
+
71
+ ## Full Azure DevOps CLI Reference
72
+
73
+ ### Work Items
74
+ ```bash
75
+ # Read work item
76
+ az boards work-item show --id <id>
77
+
78
+ # Update work item state
79
+ az boards work-item update --id <id> --state "Active"
80
+ ```
81
+
82
+ ### PR Threads (Comments)
83
+ ```bash
84
+ # Read all threads
85
+ az devops invoke \
86
+ --area git --resource pullRequestThreads \
87
+ --route-parameters project={project} repositoryId=<repo> pullRequestId=<id> \
88
+ --http-method GET --api-version 7.1
89
+
90
+ # Post new comment thread (requires body.json)
91
+ az devops invoke \
92
+ --area git --resource pullRequestThreads \
93
+ --route-parameters project={project} repositoryId=<repo> pullRequestId=<id> \
94
+ --http-method POST --api-version 7.1 --in-file body.json
95
+
96
+ # Reply to existing thread
97
+ az devops invoke \
98
+ --area git --resource pullRequestThreadComments \
99
+ --route-parameters project={project} repositoryId=<repo> pullRequestId=<id> threadId=<tid> \
100
+ --http-method POST --api-version 7.1 --in-file reply.json
101
+ ```
102
+
103
+ ### Comment Body JSON format
104
+ ```json
105
+ {
106
+ "comments": [
107
+ {
108
+ "parentCommentId": 0,
109
+ "content": "Your markdown comment here.",
110
+ "commentType": 1
111
+ }
112
+ ],
113
+ "status": "active"
114
+ }
115
+ ```
116
+
117
+ For replies, `parentCommentId` should be the ID of the first comment in the thread (usually 1).
118
+
119
+ ## Screenshot / Image Strategy
120
+
121
+ Save to openspec change folder and reference via raw URL. Use `_apis/git/repositories` URLs (not `_git/`, which return HTML):
122
+
123
+ ```
124
+ openspec/changes/{change-name}/images/{screenshot}.png
125
+ ```
126
+
127
+ Raw URL format (renders inline in PR comments):
128
+ ```
129
+ 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
130
+ ```
131
+
132
+ ## URL Formats Reference
133
+
134
+ ```
135
+ # Sprint board with work item
136
+ https://dev.azure.com/{org}/{project}/_sprints/backlog/{team}/{project}/Sprint%20110?workitem=193208
137
+
138
+ # Direct work item
139
+ https://dev.azure.com/{org}/{project}/_workitems/edit/193208
140
+
141
+ # PR
142
+ https://dev.azure.com/{org}/{project}/_git/{repo}/pullrequest/{pr-id}
143
+ ```
144
+
145
+ ## Output Format
146
+
147
+ ```
148
+ ## User Story Parsed
149
+
150
+ Work Item: #{id}
151
+ Title: {title}
152
+ Type: User Story
153
+ Iteration: {sprint}
154
+ State: {state}
155
+
156
+ Change Created: us-{id}-{slug}
157
+ ```
@@ -1,132 +1,132 @@
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 opencode-browser extension and openspec CLI.
6
- metadata:
7
- author: copilots
8
- version: "1.0"
9
- ---
10
-
11
- This skill is used when the backlog platform is set to "Others (Browser)": when there is no CLI integration for the backlog system, or the user doesn't have API tokens. Work items are read directly from the web page using the opencode-browser plugin.
12
-
13
- This skill overrides the `browser-automation` skill's external navigation restriction, but only for URLs the user explicitly provides as work items. Navigate only to URLs the user gives you.
14
-
15
- ## Prerequisites
16
-
17
- - opencode-browser extension installed and running (installed during onboarding)
18
- - The user must be authenticated to the backlog system in their browser (e.g. logged into Azure DevOps, Jira, Trello, Linear, etc.)
19
-
20
- ## Steps
21
-
22
- 1. **Extract the URL** from the user's message
23
- - The user provides a direct URL to a work item, issue, ticket, or PBI
24
- - Examples: `https://dev.azure.com/org/project/_workitems/edit/123`, `https://linear.app/team/issue/ENG-123`, `https://trello.com/c/abc123`, `https://your-tool.com/ticket/456`
25
-
26
- 2. **Navigate to the URL**
27
- ```bash
28
- browser_open_tab url="https://the-url-the-user-provided"
29
- ```
30
-
31
- 3. **Wait for the page to load**
32
- ```bash
33
- browser_wait ms=3000
34
- ```
35
-
36
- 4. **Read the work item content**
37
- ```bash
38
- browser_query mode="page_text"
39
- ```
40
-
41
- Also try to get structured content:
42
- ```bash
43
- browser_snapshot
44
- ```
45
- The accessibility snapshot often reveals the work item title, description, and fields more precisely than raw page text.
46
-
47
- 5. **Parse work item fields**
48
-
49
- From the page text and/or snapshot, extract:
50
- - Title/Summary: usually the main heading or the `<h1>` / page title
51
- - Description: the body text, acceptance criteria, or "Definition of Done" section
52
- - ID/Key: the work item ID from the URL or page (e.g. `123`, `ENG-123`)
53
- - Status: if visible (e.g. "To Do", "In Progress", "Active")
54
- - Assignee: if visible
55
- - Priority: if visible
56
- - Labels/Tags: if visible
57
-
58
- If the page is a SPA that loads content dynamically:
59
- - Wait longer (`browser_wait ms=5000`)
60
- - Use `browser_query` with `mode=page_text` after the wait
61
- - Try `browser_snapshot` which may capture more structured content
62
-
63
- 6. **Create OpenSpec Change**
64
- ```bash
65
- openspec new change "{slug-from-title}"
66
- ```
67
-
68
- Write `proposal.md` with:
69
- - Title: the work item title from the page
70
- - Context: mention the source URL and the work item ID
71
- - Requirements: extracted from description and acceptance criteria
72
- - Scope: what's in/out based on the ticket
73
-
74
- 7. **Hand off to proposal.** Load the `pc-plan-propose` skill (interactive mode) to generate the proposal, specs, and tasks. After it completes, call the `question` tool:
75
-
76
- ```json
77
- {
78
- "questions": [
79
- {
80
- "header": "Ready to implement",
81
- "question": "Ready to implement?",
82
- "options": [
83
- { "label": "yes", "description": "Load the pc-plan-apply skill to start implementation." },
84
- { "label": "no", "description": "Stop here. You can run /plan-apply later." }
85
- ]
86
- }
87
- ]
88
- }
89
- ```
90
-
91
- Wait for confirmation before loading `pc-plan-apply`.
92
-
93
- ## Working with common backlog tools
94
-
95
- ### Azure DevOps (browser fallback)
96
- - URL: `https://dev.azure.com/{org}/{project}/_workitems/edit/{id}`
97
- - Title: visible in the work item header
98
- - Description: "Description" field section
99
- - Acceptance Criteria: "Acceptance Criteria" field section
100
- - State: visible in the top-right area
101
-
102
- ### Linear
103
- - URL: `https://linear.app/{team}/issue/{key}`
104
- - Title: the issue title
105
- - Description: the issue body
106
- - Status: visible as a dropdown
107
-
108
- ### Jira (browser fallback)
109
- - URL: `https://yoursite.atlassian.net/browse/{key}`
110
- - Title: the issue summary
111
- - Description: the description field
112
- - Status: visible in the status badge
113
-
114
- ### Trello
115
- - URL: `https://trello.com/c/{short-id}`
116
- - Title: the card title
117
- - Description: the card description
118
- - Labels: visible as colored badges
119
-
120
- ### Other tools (generic)
121
- - Look for `<h1>` or page title for the work item title
122
- - Look for the main content area for description
123
- - Use `browser_snapshot` to get structured accessibility tree data
124
-
125
- ## Rules
126
-
127
- - Navigate only to URLs the user explicitly provides. Never guess or browse randomly.
128
- - The user must already be authenticated in their browser to the backlog system.
129
- - If the page requires login and the user isn't authenticated, tell them to log in via their browser and retry.
130
- - For GitHub/Azure/Jira URLs when the CLI is configured for those platforms, use the CLI-based skill instead (faster, more reliable, no browser needed).
131
- - This skill is read-only: no clicking buttons, no changing status.
132
- - Browser is a backlog-only platform: it has no PR or repo integration. PR creation uses the repo platform configured separately.
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 opencode-browser extension and openspec CLI.
6
+ metadata:
7
+ author: copilots
8
+ version: "1.0"
9
+ ---
10
+
11
+ This skill is used when the backlog platform is set to "Others (Browser)": when there is no CLI integration for the backlog system, or the user doesn't have API tokens. Work items are read directly from the web page using the opencode-browser plugin.
12
+
13
+ This skill overrides the `browser-automation` skill's external navigation restriction, but only for URLs the user explicitly provides as work items. Navigate only to URLs the user gives you.
14
+
15
+ ## Prerequisites
16
+
17
+ - opencode-browser extension installed and running (installed during onboarding)
18
+ - The user must be authenticated to the backlog system in their browser (e.g. logged into Azure DevOps, Jira, Trello, Linear, etc.)
19
+
20
+ ## Steps
21
+
22
+ 1. **Extract the URL** from the user's message
23
+ - The user provides a direct URL to a work item, issue, ticket, or PBI
24
+ - Examples: `https://dev.azure.com/org/project/_workitems/edit/123`, `https://linear.app/team/issue/ENG-123`, `https://trello.com/c/abc123`, `https://your-tool.com/ticket/456`
25
+
26
+ 2. **Navigate to the URL**
27
+ ```bash
28
+ browser_open_tab url="https://the-url-the-user-provided"
29
+ ```
30
+
31
+ 3. **Wait for the page to load**
32
+ ```bash
33
+ browser_wait ms=3000
34
+ ```
35
+
36
+ 4. **Read the work item content**
37
+ ```bash
38
+ browser_query mode="page_text"
39
+ ```
40
+
41
+ Also try to get structured content:
42
+ ```bash
43
+ browser_snapshot
44
+ ```
45
+ The accessibility snapshot often reveals the work item title, description, and fields more precisely than raw page text.
46
+
47
+ 5. **Parse work item fields**
48
+
49
+ From the page text and/or snapshot, extract:
50
+ - Title/Summary: usually the main heading or the `<h1>` / page title
51
+ - Description: the body text, acceptance criteria, or "Definition of Done" section
52
+ - ID/Key: the work item ID from the URL or page (e.g. `123`, `ENG-123`)
53
+ - Status: if visible (e.g. "To Do", "In Progress", "Active")
54
+ - Assignee: if visible
55
+ - Priority: if visible
56
+ - Labels/Tags: if visible
57
+
58
+ If the page is a SPA that loads content dynamically:
59
+ - Wait longer (`browser_wait ms=5000`)
60
+ - Use `browser_query` with `mode=page_text` after the wait
61
+ - Try `browser_snapshot` which may capture more structured content
62
+
63
+ 6. **Create OpenSpec Change**
64
+ ```bash
65
+ openspec new change "{slug-from-title}"
66
+ ```
67
+
68
+ Write `proposal.md` with:
69
+ - Title: the work item title from the page
70
+ - Context: mention the source URL and the work item ID
71
+ - Requirements: extracted from description and acceptance criteria
72
+ - Scope: what's in/out based on the ticket
73
+
74
+ 7. **Hand off to proposal.** Load the `pc-plan-propose` skill (interactive mode) to generate the proposal, specs, and tasks. After it completes, call the `question` tool:
75
+
76
+ ```json
77
+ {
78
+ "questions": [
79
+ {
80
+ "header": "Ready to implement",
81
+ "question": "Ready to implement?",
82
+ "options": [
83
+ { "label": "yes", "description": "Load the pc-plan-apply skill to start implementation." },
84
+ { "label": "no", "description": "Stop here. You can run /plan-apply later." }
85
+ ]
86
+ }
87
+ ]
88
+ }
89
+ ```
90
+
91
+ Wait for confirmation before loading `pc-plan-apply`.
92
+
93
+ ## Working with common backlog tools
94
+
95
+ ### Azure DevOps (browser fallback)
96
+ - URL: `https://dev.azure.com/{org}/{project}/_workitems/edit/{id}`
97
+ - Title: visible in the work item header
98
+ - Description: "Description" field section
99
+ - Acceptance Criteria: "Acceptance Criteria" field section
100
+ - State: visible in the top-right area
101
+
102
+ ### Linear
103
+ - URL: `https://linear.app/{team}/issue/{key}`
104
+ - Title: the issue title
105
+ - Description: the issue body
106
+ - Status: visible as a dropdown
107
+
108
+ ### Jira (browser fallback)
109
+ - URL: `https://yoursite.atlassian.net/browse/{key}`
110
+ - Title: the issue summary
111
+ - Description: the description field
112
+ - Status: visible in the status badge
113
+
114
+ ### Trello
115
+ - URL: `https://trello.com/c/{short-id}`
116
+ - Title: the card title
117
+ - Description: the card description
118
+ - Labels: visible as colored badges
119
+
120
+ ### Other tools (generic)
121
+ - Look for `<h1>` or page title for the work item title
122
+ - Look for the main content area for description
123
+ - Use `browser_snapshot` to get structured accessibility tree data
124
+
125
+ ## Rules
126
+
127
+ - Navigate only to URLs the user explicitly provides. Never guess or browse randomly.
128
+ - The user must already be authenticated in their browser to the backlog system.
129
+ - If the page requires login and the user isn't authenticated, tell them to log in via their browser and retry.
130
+ - For GitHub/Azure/Jira URLs when the CLI is configured for those platforms, use the CLI-based skill instead (faster, more reliable, no browser needed).
131
+ - This skill is read-only: no clicking buttons, no changing status.
132
+ - Browser is a backlog-only platform: it has no PR or repo integration. PR creation uses the repo platform configured separately.