@plainconceptsplatform/agent-harness 2.0.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 (151) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +419 -0
  3. package/package.json +68 -0
  4. package/src/commands/join.js +244 -0
  5. package/src/commands/shared.js +27 -0
  6. package/src/commands/single.js +79 -0
  7. package/src/commands/update.js +109 -0
  8. package/src/commands/wizard.js +134 -0
  9. package/src/content/.agents/skills/browser-automation/SKILL.md +66 -0
  10. package/src/content/.agents/skills/pc-guardrails-generic/SKILL.md +68 -0
  11. package/src/content/.agents/skills/pc-guardrails-project/SKILL.md +8 -0
  12. package/src/content/.agents/skills/pc-make-architecture/SKILL.md +51 -0
  13. package/src/content/.agents/skills/pc-make-architecture/structure-template.md +38 -0
  14. package/src/content/.agents/skills/pc-make-design/SKILL.md +68 -0
  15. package/src/content/.agents/skills/pc-make-engineer/SKILL.md +219 -0
  16. package/src/content/.agents/skills/pc-make-engineer/signal-mapping.md +68 -0
  17. package/src/content/.agents/skills/pc-make-engineer/template.md +81 -0
  18. package/src/content/.agents/skills/pc-make-evidence-scaffold/SKILL.md +18 -0
  19. package/src/content/.agents/skills/pc-make-evidence-scaffold/evidence-contract.md +29 -0
  20. package/src/content/.agents/skills/pc-make-guardrails/SKILL.md +74 -0
  21. package/src/content/.agents/skills/pc-make-guardrails/category-reference.md +68 -0
  22. package/src/content/.agents/skills/pc-make-merge-risk-assess/SKILL.md +70 -0
  23. package/src/content/.agents/skills/pc-make-merge-risk-assess/category-reference.md +98 -0
  24. package/src/content/.agents/skills/pc-make-user-model/SKILL.md +66 -0
  25. package/src/content/.agents/skills/pc-ops-evidence/SKILL.md +127 -0
  26. package/src/content/.agents/skills/pc-ops-ship/SKILL.md +18 -0
  27. package/src/content/.agents/skills/pc-plan-apply/SKILL.md +83 -0
  28. package/src/content/.agents/skills/pc-plan-apply/simple-mode.md +21 -0
  29. package/src/content/.agents/skills/pc-plan-archive/SKILL.md +63 -0
  30. package/src/content/.agents/skills/pc-plan-explore/SKILL.md +9 -0
  31. package/src/content/.agents/skills/pc-plan-goal/SKILL.md +94 -0
  32. package/src/content/.agents/skills/pc-plan-goal/branching.md +30 -0
  33. package/src/content/.agents/skills/pc-plan-goal/failure-policy.md +30 -0
  34. package/src/content/.agents/skills/pc-plan-goal/output-mode.md +9 -0
  35. package/src/content/.agents/skills/pc-plan-goal/output.md +68 -0
  36. package/src/content/.agents/skills/pc-plan-propose/SKILL.md +125 -0
  37. package/src/content/.agents/skills/pc-plan-propose/task-annotation.md +39 -0
  38. package/src/content/.agents/skills/pc-plan-quick/SKILL.md +62 -0
  39. package/src/content/.agents/skills/pc-plan-story/SKILL.md +146 -0
  40. package/src/content/.agents/skills/pc-repo-audit/SKILL.md +44 -0
  41. package/src/content/.agents/skills/pc-repo-help/SKILL.md +91 -0
  42. package/src/content/.agents/skills/pc-repo-initialize/SKILL.md +130 -0
  43. package/src/content/.agents/skills/pc-repo-onboard/SKILL.md +87 -0
  44. package/src/content/.agents/skills/pc-repo-verify/SKILL.md +34 -0
  45. package/src/content/.agents/skills/pc-userstory-az/SKILL.md +157 -0
  46. package/src/content/.agents/skills/pc-userstory-browser/SKILL.md +132 -0
  47. package/src/content/.agents/skills/pc-userstory-gh/SKILL.md +120 -0
  48. package/src/content/.agents/skills/pc-userstory-jira/SKILL.md +131 -0
  49. package/src/content/.opencode/_gitignore +7 -0
  50. package/src/content/.opencode/commands/init.md +5 -0
  51. package/src/content/.opencode/commands/make-architecture.md +5 -0
  52. package/src/content/.opencode/commands/make-design.md +5 -0
  53. package/src/content/.opencode/commands/make-engineer.md +5 -0
  54. package/src/content/.opencode/commands/make-evidence-scaffold.md +5 -0
  55. package/src/content/.opencode/commands/make-guardrails.md +5 -0
  56. package/src/content/.opencode/commands/make-user-model.md +5 -0
  57. package/src/content/.opencode/commands/ops-backlog.md +10 -0
  58. package/src/content/.opencode/commands/ops-evidence.md +9 -0
  59. package/src/content/.opencode/commands/ops-review.md +8 -0
  60. package/src/content/.opencode/commands/ops-ship.md +9 -0
  61. package/src/content/.opencode/commands/plan-apply.md +9 -0
  62. package/src/content/.opencode/commands/plan-archive.md +5 -0
  63. package/src/content/.opencode/commands/plan-explore.md +9 -0
  64. package/src/content/.opencode/commands/plan-goal.md +5 -0
  65. package/src/content/.opencode/commands/plan-propose.md +9 -0
  66. package/src/content/.opencode/commands/plan-quick.md +5 -0
  67. package/src/content/.opencode/commands/plan-story.md +9 -0
  68. package/src/content/.opencode/commands/repo-audit.md +5 -0
  69. package/src/content/.opencode/commands/repo-help.md +5 -0
  70. package/src/content/.opencode/commands/repo-initialize.md +5 -0
  71. package/src/content/.opencode/commands/repo-onboard.md +5 -0
  72. package/src/content/.opencode/commands/repo-verify.md +5 -0
  73. package/src/content/.opencode/package.json +10 -0
  74. package/src/content/.opencode/plugins/pc-subagent-monitor.js +139 -0
  75. package/src/content/.opencode/plugins/pc-subagent-tiers.js +179 -0
  76. package/src/content/.opencode/plugins/pc-system-reminders.js +96 -0
  77. package/src/content/.opencode/plugins/pc-system-reminders.test.js +35 -0
  78. package/src/content/.opencode/tui/pc-subagents.tsx +98 -0
  79. package/src/content/.opencode/tui.json +6 -0
  80. package/src/content/AGENTS.md +71 -0
  81. package/src/content/ARCHITECTURE.md +16 -0
  82. package/src/content/DESIGN.md +16 -0
  83. package/src/content/opencode.jsonc +31 -0
  84. package/src/content/openspec/changes/archive/.gitkeep +0 -0
  85. package/src/content/openspec/config.yaml +20 -0
  86. package/src/content/openspec/specs/.gitkeep +0 -0
  87. package/src/content/skills-lock.json +17 -0
  88. package/src/fragments/archive/az.md +95 -0
  89. package/src/fragments/archive/gh.md +94 -0
  90. package/src/fragments/archive/gl.md +94 -0
  91. package/src/fragments/archive/none.md +73 -0
  92. package/src/fragments/guardrails/codegraph.md +7 -0
  93. package/src/fragments/guardrails/humanizer.md +4 -0
  94. package/src/fragments/guardrails/memory.md +4 -0
  95. package/src/fragments/guardrails/rtk.md +3 -0
  96. package/src/fragments/guardrails/simple-english.md +4 -0
  97. package/src/fragments/ops-backlog/az.md +29 -0
  98. package/src/fragments/ops-backlog/gh.md +30 -0
  99. package/src/fragments/ops-backlog/jira.md +29 -0
  100. package/src/fragments/ops-evidence/az.md +41 -0
  101. package/src/fragments/ops-evidence/gh.md +53 -0
  102. package/src/fragments/ops-evidence/jira.md +38 -0
  103. package/src/fragments/ops-review/az.md +63 -0
  104. package/src/fragments/ops-review/gh.md +53 -0
  105. package/src/fragments/ops-review/gl.md +57 -0
  106. package/src/fragments/ops-ship/az.md +81 -0
  107. package/src/fragments/ops-ship/gh.md +69 -0
  108. package/src/fragments/ops-ship/gl.md +86 -0
  109. package/src/index.js +107 -0
  110. package/src/presets/agents-content.json +53 -0
  111. package/src/presets/browser.json +22 -0
  112. package/src/presets/clean.json +21 -0
  113. package/src/presets/models.json +68 -0
  114. package/src/presets/openspec.json +1 -0
  115. package/src/presets/optimization.json +37 -0
  116. package/src/presets/platforms.json +76 -0
  117. package/src/presets/quota.json +16 -0
  118. package/src/presets/source.json +23 -0
  119. package/src/steps/browser/index.js +91 -0
  120. package/src/steps/clean/index.js +120 -0
  121. package/src/steps/copy/agents.js +118 -0
  122. package/src/steps/copy/commands.js +91 -0
  123. package/src/steps/copy/fullstack-engineer.js +83 -0
  124. package/src/steps/copy/index.js +88 -0
  125. package/src/steps/copy/opencode-json.js +129 -0
  126. package/src/steps/copy/skills.js +196 -0
  127. package/src/steps/metadata/index.js +108 -0
  128. package/src/steps/models/format.js +88 -0
  129. package/src/steps/models/index.js +64 -0
  130. package/src/steps/models/write.js +34 -0
  131. package/src/steps/openspec/index.js +136 -0
  132. package/src/steps/optimization/codegraph.js +127 -0
  133. package/src/steps/optimization/humanizer.js +17 -0
  134. package/src/steps/optimization/index.js +163 -0
  135. package/src/steps/optimization/memory.js +88 -0
  136. package/src/steps/optimization/patch-guardrails.js +108 -0
  137. package/src/steps/optimization/quota.js +119 -0
  138. package/src/steps/optimization/simple-english.js +17 -0
  139. package/src/steps/optimization/skills-lock.js +30 -0
  140. package/src/steps/platform/index.js +109 -0
  141. package/src/steps/source/index.js +123 -0
  142. package/src/utils/copy.js +108 -0
  143. package/src/utils/exec-spinner.js +47 -0
  144. package/src/utils/exec.js +134 -0
  145. package/src/utils/legacy-check.js +30 -0
  146. package/src/utils/models-cache.js +58 -0
  147. package/src/utils/models-pricing.js +42 -0
  148. package/src/utils/paths.js +64 -0
  149. package/src/utils/process.js +3 -0
  150. package/src/utils/terminal.js +6 -0
  151. package/src/utils/update-manifest.js +49 -0
@@ -0,0 +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
+ ```
@@ -0,0 +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.
@@ -0,0 +1,120 @@
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
+ Use `gh` CLI for all GitHub operations. If `gh` is unavailable, report it as a blocker.
12
+
13
+ ## GitHub CLI Setup (One-Time)
14
+
15
+ ```bash
16
+ gh auth login
17
+ # Follow prompts, authenticate via browser or token
18
+ ```
19
+
20
+ Verify:
21
+ ```bash
22
+ gh auth status
23
+ ```
24
+
25
+ ## Steps
26
+
27
+ 1. **Extract owner, repo, and issue number** from URL
28
+ - `https://github.com/{owner}/{repo}/issues/42` -> owner: `{owner}`, repo: `{repo}`, number: `42`
29
+
30
+ 2. **Fetch Issue**, always pass `--repo` explicitly:
31
+ ```bash
32
+ gh issue view 42 --repo {owner}/{repo} --json number,title,body,labels,milestone,state
33
+ ```
34
+ If this returns an auth error or 404, report as a blocker.
35
+
36
+ 3. **Extract Key Fields** from JSON response:
37
+ - `number` -> Issue number
38
+ - `title` -> Title
39
+ - `body` -> Description / acceptance criteria
40
+ - `labels` -> Labels
41
+ - `milestone` -> Milestone / sprint equivalent
42
+ - `state` -> State (open/closed)
43
+
44
+ 4. **Create OpenSpec Change**
45
+ ```bash
46
+ openspec new change "gh-{number}-{slug}"
47
+ ```
48
+
49
+ 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:
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
+ ```
65
+
66
+ Wait for confirmation before loading `pc-plan-apply`.
67
+
68
+ ## Full GitHub CLI Reference
69
+
70
+ Always pass `--repo {owner}/{repo}`, relying on git context is unreliable.
71
+
72
+ ### Issues
73
+ ```bash
74
+ # Read issue
75
+ gh issue view <number> --repo {owner}/{repo}
76
+
77
+ # List open issues
78
+ gh issue list --repo {owner}/{repo} --state open --limit 10
79
+
80
+ # Update issue
81
+ gh issue edit <number> --repo {owner}/{repo} --add-label "in-progress"
82
+ ```
83
+
84
+ ## Screenshot / Image Strategy
85
+
86
+ Save to openspec change folder and reference via GitHub blob URL pinned to commit SHA. Keep `?raw=true` when embedding in markdown:
87
+
88
+ ```
89
+ openspec/changes/{change-name}/images/{screenshot}.png
90
+ ```
91
+
92
+ ```
93
+ https://github.com/{owner}/{repo}/blob/{sha}/openspec/changes/{change}/images/{file}.png?raw=true
94
+ ```
95
+
96
+ ## URL Formats Reference
97
+
98
+ ```
99
+ # Issue
100
+ https://github.com/{owner}/{repo}/issues/{number}
101
+
102
+ # PR
103
+ https://github.com/{owner}/{repo}/pull/{number}
104
+
105
+ # Blob file
106
+ https://github.com/{owner}/{repo}/blob/{sha}/{path}
107
+ ```
108
+
109
+ ## Output Format
110
+
111
+ ```
112
+ ## Issue Parsed
113
+
114
+ Issue: #{number}
115
+ Title: {title}
116
+ State: {state}
117
+ Milestone: {milestone}
118
+
119
+ Change Created: gh-{number}-{slug}
120
+ ```
@@ -0,0 +1,131 @@
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
+ Use `acli` CLI for all Jira operations.
12
+
13
+ ## Atlassian CLI Setup (One-Time)
14
+
15
+ Install from: https://developer.atlassian.com/cloud/acli/guides/install-acli/
16
+
17
+ Authenticate:
18
+ ```bash
19
+ # Option 1: API token (recommended for CI)
20
+ echo <token> | acli jira auth login --site "<yoursite>.atlassian.net" --email "<email>" --token
21
+
22
+ # Option 2: OAuth (interactive)
23
+ acli jira auth login --web
24
+ ```
25
+
26
+ Generate API token at: https://id.atlassian.com/manage-profile/security/api-tokens
27
+
28
+ ## Steps
29
+
30
+ 1. **Extract Issue Key** from URL
31
+ - `https://yoursite.atlassian.net/browse/PROJ-123` -> Key: PROJ-123
32
+ - `https://yoursite.atlassian.net/jira/core/projects/PROJ/issues/PROJ-123` -> Key: PROJ-123
33
+ - `https://yoursite.atlassian.net/browse/PROJ-123?filter=123` -> Key: PROJ-123
34
+ - If the user provides just `PROJ-123` without a URL, use it directly as the key.
35
+
36
+ 2. **Fetch Work Item**
37
+ ```bash
38
+ acli jira workitem view --key "PROJ-123"
39
+ ```
40
+
41
+ Parse the output for:
42
+ - Summary -> title
43
+ - Description -> proposal context
44
+ - Acceptance Criteria (if present in description or custom fields) -> spec requirements
45
+ - Labels -> tags for the OpenSpec change
46
+ - Status -> current state (e.g. To Do, In Progress, Done)
47
+ - Assignee -> who requested it
48
+ - Priority -> complexity hint
49
+
50
+ 3. **Offer to transition the Work Item to In Progress**
51
+
52
+ This writes to Jira, so ask first using the `question` tool:
53
+
54
+ ```json
55
+ {
56
+ "questions": [
57
+ {
58
+ "header": "Transition work item",
59
+ "question": "Move {KEY} to In Progress?",
60
+ "options": [
61
+ { "label": "yes", "description": "Transition the work item to In Progress." },
62
+ { "label": "no", "description": "Skip the transition." }
63
+ ]
64
+ }
65
+ ]
66
+ }
67
+ ```
68
+
69
+ Only if the user answers `yes` AND the status is currently "To Do" or "Backlog":
70
+ ```bash
71
+ acli jira workitem transition --key "PROJ-123" --status "In Progress"
72
+ ```
73
+ In unattended runs (`/plan-goal`), skip the question and the transition entirely.
74
+
75
+ 4. **Create OpenSpec Change**
76
+ ```bash
77
+ openspec new change "{slug-from-summary}"
78
+ ```
79
+
80
+ Write `proposal.md` with:
81
+ - Title: the Jira issue summary
82
+ - Context: mention this is Jira issue `{KEY}`, link back to the URL
83
+ - Requirements: extracted from description and acceptance criteria
84
+ - Scope: what's in/out based on the issue
85
+
86
+ 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:
87
+
88
+ ```json
89
+ {
90
+ "questions": [
91
+ {
92
+ "header": "Ready to implement",
93
+ "question": "Ready to implement?",
94
+ "options": [
95
+ { "label": "yes", "description": "Load the pc-plan-apply skill to start implementation." },
96
+ { "label": "no", "description": "Stop here. You can run /plan-apply later." }
97
+ ]
98
+ }
99
+ ]
100
+ }
101
+ ```
102
+
103
+ Wait for confirmation before loading `pc-plan-apply`.
104
+
105
+ ## Jira URL Patterns
106
+
107
+ | URL format | Example |
108
+ |------------|---------|
109
+ | Browse URL | `https://yoursite.atlassian.net/browse/PROJ-123` |
110
+ | Issue URL | `https://yoursite.atlassian.net/jira/core/projects/PROJ/issues/PROJ-123` |
111
+ | Board URL | `https://yoursite.atlassian.net/jira/software/c/projects/PROJ/boards/1?selectedIssue=PROJ-123` |
112
+ | Direct key | `PROJ-123` |
113
+
114
+ ## Useful Commands
115
+
116
+ ```bash
117
+ # View work item
118
+ acli jira workitem view --key "PROJ-123"
119
+
120
+ # Transition work item
121
+ acli jira workitem transition --key "PROJ-123" --status "In Progress"
122
+ acli jira workitem transition --key "PROJ-123" --status "Done"
123
+
124
+ # Search with JQL
125
+ acli jira workitem search --jql "project = PROJ AND status = 'To Do' ORDER BY priority DESC"
126
+
127
+ # Add a comment
128
+ acli jira workitem comment create --key "PROJ-123" --body "Implementation started"
129
+ ```
130
+
131
+ Jira is a backlog-only platform: it has no code repos or PRs. PR creation and code review use the repo platform (GitHub or Azure DevOps) configured separately.
@@ -0,0 +1,7 @@
1
+ node_modules
2
+ harness-run.json
3
+ harness.user.json
4
+ harness-managed.json
5
+ source-roots.json
6
+ tmp/
7
+ *-engineer.*.md
@@ -0,0 +1,5 @@
1
+ ---
2
+ description: Initialize the project. Presents a single form with all setup questions, then executes selected steps.
3
+ ---
4
+
5
+ Load the `pc-repo-initialize` skill and follow every step defined in it.
@@ -0,0 +1,5 @@
1
+ ---
2
+ description: Generate or update ARCHITECTURE.md by analyzing the codebase structure. Safe to run at any time.
3
+ ---
4
+
5
+ Load the `pc-make-architecture` skill and follow every step defined in it.
@@ -0,0 +1,5 @@
1
+ ---
2
+ description: Generate or update DESIGN.md by analyzing the codebase design system. Safe to run at any time.
3
+ ---
4
+
5
+ Load the `pc-make-design` skill and follow every step defined in it.
@@ -0,0 +1,5 @@
1
+ ---
2
+ description: Create a custom engineer agent via persona-driven interactive design
3
+ ---
4
+
5
+ Load the `pc-make-engineer` skill and follow every step defined in it.
@@ -0,0 +1,5 @@
1
+ ---
2
+ description: One-time scaffold of a project-specific visual-evidence harness (deterministic capture + assertions + manifest + publisher) that /ops-evidence and /plan-goal delegate to.
3
+ ---
4
+
5
+ Load the `pc-make-evidence-scaffold` skill and follow every step defined in it.
@@ -0,0 +1,5 @@
1
+ ---
2
+ description: Generate or update a pc-guardrails-project skill from ARCHITECTURE.md and relevant project files.
3
+ ---
4
+
5
+ Load the `pc-make-guardrails` skill and follow every step defined in it.
@@ -0,0 +1,5 @@
1
+ ---
2
+ description: Set the model for a tier (plan, build, or fast). Team-wide or user-local override.
3
+ ---
4
+
5
+ Load the `pc-make-user-model` skill and follow every step defined in it.
@@ -0,0 +1,10 @@
1
+ ---
2
+ description: Create an issue in the backlog platform (GitHub, Azure DevOps, Jira) from a description.
3
+ ---
4
+
5
+ Backlog platform is set in `.opencode/harness.json` → `platform.backlog`. The platform-specific content below is injected by the CLI during onboarding.
6
+
7
+ Input: `$ARGUMENTS` (the issue title/description)
8
+
9
+ <!-- PC-PLATFORM-BACKLOG-START -->
10
+ <!-- PC-PLATFORM-BACKLOG-END -->
@@ -0,0 +1,9 @@
1
+ ---
2
+ description: Capture a screenshot (or text summary) of a completed change and post it as a comment on the originating issue or work item.
3
+ ---
4
+
5
+ Load the `pc-ops-evidence` skill and execute it.
6
+
7
+ Input:
8
+
9
+ $ARGUMENTS
@@ -0,0 +1,8 @@
1
+ ---
2
+ description: Read and triage PR review feedback. Reports what needs fixing, does not implement fixes.
3
+ ---
4
+
5
+ Repo platform is set in `.opencode/harness.json` → `platform.repo`. The platform-specific content below is injected by the CLI during onboarding.
6
+
7
+ <!-- PC-PLATFORM-REVIEW-START -->
8
+ <!-- PC-PLATFORM-REVIEW-END -->
@@ -0,0 +1,9 @@
1
+ ---
2
+ description: Create a pull request for the current feature branch with screenshots if UI changed.
3
+ ---
4
+
5
+ Load the `pc-ops-ship` skill and execute it.
6
+
7
+ Input:
8
+
9
+ $ARGUMENTS
@@ -0,0 +1,9 @@
1
+ ---
2
+ description: Implement tasks from a plan: works with OpenSpec proposals and in-conversation plans.
3
+ ---
4
+
5
+ Load the `pc-plan-apply` skill and execute it in **interactive mode** with `start_from: branch` (the full protocol, including branch creation).
6
+
7
+ Input:
8
+
9
+ $ARGUMENTS
@@ -0,0 +1,5 @@
1
+ ---
2
+ description: Archive the oldest merged unarchived OpenSpec change and update documentation.
3
+ ---
4
+
5
+ Load the `pc-plan-archive` skill and execute it in **interactive mode**. No input required.
@@ -0,0 +1,9 @@
1
+ ---
2
+ description: Think through an idea, investigate a problem, or clarify requirements before creating a change.
3
+ ---
4
+
5
+ Load the `pc-plan-explore` skill and execute it in **interactive mode**.
6
+
7
+ Input:
8
+
9
+ $ARGUMENTS
@@ -0,0 +1,5 @@
1
+ ---
2
+ description: Autonomous pipeline: explore, propose, apply, archive, then merge/PR/push. For loop-engineering.
3
+ ---
4
+
5
+ Load the `pc-plan-goal` skill and follow every step defined in it.
@@ -0,0 +1,9 @@
1
+ ---
2
+ description: Parse a work item or idea and propose a change plan with enriched task assignments.
3
+ ---
4
+
5
+ Load the `pc-plan-propose` skill and execute it in **interactive mode**.
6
+
7
+ Input:
8
+
9
+ $ARGUMENTS