@plainconceptsplatform/agent-harness 2.3.0 → 2.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.
Files changed (155) hide show
  1. package/README.md +23 -12
  2. package/{src → cli}/commands/join.js +3 -4
  3. package/{src → cli}/commands/migrate.js +1 -1
  4. package/{src → cli}/commands/wizard.js +1 -1
  5. package/{src → cli}/index.js +1 -1
  6. package/{src → cli}/presets/agents-content.json +4 -4
  7. package/cli/presets/browser.json +10 -0
  8. package/{src → cli}/presets/clean.json +21 -21
  9. package/{src → cli}/presets/optimization.json +37 -37
  10. package/{src → cli}/presets/platforms.json +76 -76
  11. package/{src → cli}/presets/quota.json +16 -16
  12. package/{src → cli}/presets/source.json +23 -23
  13. package/cli/steps/browser/index.js +48 -0
  14. package/{src → cli}/steps/clean/index.js +120 -120
  15. package/{src → cli}/steps/copy/agents.js +119 -119
  16. package/{src → cli}/steps/copy/commands.js +95 -95
  17. package/{src → cli}/steps/copy/fullstack-engineer.js +89 -88
  18. package/{src → cli}/steps/copy/index.js +1 -1
  19. package/{src → cli}/steps/copy/opencode-json.js +196 -161
  20. package/{src → cli}/steps/copy/skills.js +2 -2
  21. package/{src → cli}/steps/models/format.js +88 -88
  22. package/{src → cli}/steps/models/index.js +64 -64
  23. package/{src → cli}/steps/openspec/index.js +136 -136
  24. package/{src → cli}/steps/optimization/codegraph.js +127 -127
  25. package/{src → cli}/steps/optimization/detect.js +66 -66
  26. package/{src → cli}/steps/optimization/humanizer.js +17 -17
  27. package/{src → cli}/steps/optimization/index.js +163 -163
  28. package/{src → cli}/steps/optimization/memory.js +88 -88
  29. package/{src → cli}/steps/optimization/patch-guardrails.js +109 -109
  30. package/{src → cli}/steps/optimization/quota.js +119 -119
  31. package/{src → cli}/steps/optimization/simple-english.js +17 -17
  32. package/{src → cli}/steps/optimization/skills-lock.js +30 -30
  33. package/{src → cli}/steps/platform/index.js +109 -109
  34. package/{src → cli}/steps/source/index.js +123 -123
  35. package/{src → cli}/utils/agent-color.js +111 -83
  36. package/{src → cli}/utils/exec-spinner.js +47 -47
  37. package/{src → cli}/utils/exec.js +134 -134
  38. package/{src → cli}/utils/models-pricing.js +42 -42
  39. package/{src → cli}/utils/paths.js +1 -1
  40. package/{src → cli}/utils/process.js +3 -3
  41. package/{src → cli}/utils/terminal.js +6 -6
  42. package/harness/.agents/skills/browser-automation/SKILL.md +72 -0
  43. package/{src/content → harness}/.agents/skills/pc-make-engineer/SKILL.md +219 -219
  44. package/{src/content → harness}/.agents/skills/pc-make-engineer/template.md +80 -80
  45. package/{src/content → harness}/.agents/skills/pc-plan-apply/simple-mode.md +1 -1
  46. package/{src/content → harness}/.agents/skills/pc-plan-archive/SKILL.md +3 -0
  47. package/{src/content → harness}/.agents/skills/pc-plan-explore/SKILL.md +3 -0
  48. package/{src/content → harness}/.agents/skills/pc-plan-goal/SKILL.md +11 -20
  49. package/{src/content → harness}/.agents/skills/pc-plan-goal/branching.md +1 -1
  50. package/{src/content → harness}/.agents/skills/pc-plan-goal/output.md +5 -8
  51. package/{src/content → harness}/.agents/skills/pc-plan-story/SKILL.md +3 -0
  52. package/{src/content → harness}/.agents/skills/pc-userstory-browser/SKILL.md +136 -132
  53. package/{src/content → harness}/.opencode/package.json +9 -10
  54. package/{src/content → harness}/.opencode/plugins/pc-subagent-tiers.js +368 -337
  55. package/{src/content → harness}/ARCHITECTURE.md +16 -16
  56. package/{src/content → harness}/DESIGN.md +16 -16
  57. package/{src/content → harness}/opencode.jsonc +47 -41
  58. package/{src/content → harness}/openspec/config.yaml +20 -20
  59. package/{src/content → harness}/skills-lock.json +17 -17
  60. package/package.json +7 -7
  61. package/src/content/.agents/skills/browser-automation/SKILL.md +0 -66
  62. package/src/presets/browser.json +0 -22
  63. package/src/steps/browser/index.js +0 -91
  64. /package/{src → cli}/commands/shared.js +0 -0
  65. /package/{src → cli}/commands/single.js +0 -0
  66. /package/{src → cli}/commands/update.js +0 -0
  67. /package/{src → cli}/fragments/archive/az.md +0 -0
  68. /package/{src → cli}/fragments/archive/gh.md +0 -0
  69. /package/{src → cli}/fragments/archive/gl.md +0 -0
  70. /package/{src → cli}/fragments/archive/none.md +0 -0
  71. /package/{src → cli}/fragments/guardrails/codegraph.md +0 -0
  72. /package/{src → cli}/fragments/guardrails/humanizer.md +0 -0
  73. /package/{src → cli}/fragments/guardrails/memory.md +0 -0
  74. /package/{src → cli}/fragments/guardrails/rtk.md +0 -0
  75. /package/{src → cli}/fragments/guardrails/simple-english.md +0 -0
  76. /package/{src → cli}/fragments/ops-backlog/az.md +0 -0
  77. /package/{src → cli}/fragments/ops-backlog/gh.md +0 -0
  78. /package/{src → cli}/fragments/ops-backlog/jira.md +0 -0
  79. /package/{src → cli}/fragments/ops-evidence/az.md +0 -0
  80. /package/{src → cli}/fragments/ops-evidence/gh.md +0 -0
  81. /package/{src → cli}/fragments/ops-evidence/jira.md +0 -0
  82. /package/{src → cli}/fragments/ops-review/az.md +0 -0
  83. /package/{src → cli}/fragments/ops-review/gh.md +0 -0
  84. /package/{src → cli}/fragments/ops-review/gl.md +0 -0
  85. /package/{src → cli}/fragments/ops-ship/az.md +0 -0
  86. /package/{src → cli}/fragments/ops-ship/gh.md +0 -0
  87. /package/{src → cli}/fragments/ops-ship/gl.md +0 -0
  88. /package/{src → cli}/presets/models.json +0 -0
  89. /package/{src → cli}/presets/openspec.json +0 -0
  90. /package/{src → cli}/steps/metadata/index.js +0 -0
  91. /package/{src → cli}/steps/models/write.js +0 -0
  92. /package/{src → cli}/utils/copy.js +0 -0
  93. /package/{src → cli}/utils/legacy-check.js +0 -0
  94. /package/{src → cli}/utils/models-cache.js +0 -0
  95. /package/{src → cli}/utils/update-manifest.js +0 -0
  96. /package/{src/content → harness}/.agents/skills/pc-guardrails-generic/SKILL.md +0 -0
  97. /package/{src/content → harness}/.agents/skills/pc-guardrails-project/SKILL.md +0 -0
  98. /package/{src/content → harness}/.agents/skills/pc-make-architecture/SKILL.md +0 -0
  99. /package/{src/content → harness}/.agents/skills/pc-make-architecture/structure-template.md +0 -0
  100. /package/{src/content → harness}/.agents/skills/pc-make-design/SKILL.md +0 -0
  101. /package/{src/content → harness}/.agents/skills/pc-make-engineer/signal-mapping.md +0 -0
  102. /package/{src/content → harness}/.agents/skills/pc-make-evidence-scaffold/SKILL.md +0 -0
  103. /package/{src/content → harness}/.agents/skills/pc-make-evidence-scaffold/evidence-contract.md +0 -0
  104. /package/{src/content → harness}/.agents/skills/pc-make-guardrails/SKILL.md +0 -0
  105. /package/{src/content → harness}/.agents/skills/pc-make-guardrails/category-reference.md +0 -0
  106. /package/{src/content → harness}/.agents/skills/pc-make-merge-risk-assess/SKILL.md +0 -0
  107. /package/{src/content → harness}/.agents/skills/pc-make-merge-risk-assess/category-reference.md +0 -0
  108. /package/{src/content → harness}/.agents/skills/pc-make-user-model/SKILL.md +0 -0
  109. /package/{src/content → harness}/.agents/skills/pc-ops-evidence/SKILL.md +0 -0
  110. /package/{src/content → harness}/.agents/skills/pc-ops-ship/SKILL.md +0 -0
  111. /package/{src/content → harness}/.agents/skills/pc-plan-apply/SKILL.md +0 -0
  112. /package/{src/content → harness}/.agents/skills/pc-plan-goal/failure-policy.md +0 -0
  113. /package/{src/content → harness}/.agents/skills/pc-plan-goal/output-mode.md +0 -0
  114. /package/{src/content → harness}/.agents/skills/pc-plan-propose/SKILL.md +0 -0
  115. /package/{src/content → harness}/.agents/skills/pc-plan-propose/task-annotation.md +0 -0
  116. /package/{src/content → harness}/.agents/skills/pc-plan-quick/SKILL.md +0 -0
  117. /package/{src/content → harness}/.agents/skills/pc-repo-audit/SKILL.md +0 -0
  118. /package/{src/content → harness}/.agents/skills/pc-repo-help/SKILL.md +0 -0
  119. /package/{src/content → harness}/.agents/skills/pc-repo-initialize/SKILL.md +0 -0
  120. /package/{src/content → harness}/.agents/skills/pc-repo-onboard/SKILL.md +0 -0
  121. /package/{src/content → harness}/.agents/skills/pc-repo-verify/SKILL.md +0 -0
  122. /package/{src/content → harness}/.agents/skills/pc-userstory-az/SKILL.md +0 -0
  123. /package/{src/content → harness}/.agents/skills/pc-userstory-gh/SKILL.md +0 -0
  124. /package/{src/content → harness}/.agents/skills/pc-userstory-jira/SKILL.md +0 -0
  125. /package/{src/content → harness}/.opencode/_gitignore +0 -0
  126. /package/{src/content → harness}/.opencode/commands/init.md +0 -0
  127. /package/{src/content → harness}/.opencode/commands/make-architecture.md +0 -0
  128. /package/{src/content → harness}/.opencode/commands/make-design.md +0 -0
  129. /package/{src/content → harness}/.opencode/commands/make-engineer.md +0 -0
  130. /package/{src/content → harness}/.opencode/commands/make-evidence-scaffold.md +0 -0
  131. /package/{src/content → harness}/.opencode/commands/make-guardrails.md +0 -0
  132. /package/{src/content → harness}/.opencode/commands/make-user-model.md +0 -0
  133. /package/{src/content → harness}/.opencode/commands/ops-backlog.md +0 -0
  134. /package/{src/content → harness}/.opencode/commands/ops-evidence.md +0 -0
  135. /package/{src/content → harness}/.opencode/commands/ops-review.md +0 -0
  136. /package/{src/content → harness}/.opencode/commands/ops-ship.md +0 -0
  137. /package/{src/content → harness}/.opencode/commands/plan-apply.md +0 -0
  138. /package/{src/content → harness}/.opencode/commands/plan-archive.md +0 -0
  139. /package/{src/content → harness}/.opencode/commands/plan-explore.md +0 -0
  140. /package/{src/content → harness}/.opencode/commands/plan-goal.md +0 -0
  141. /package/{src/content → harness}/.opencode/commands/plan-propose.md +0 -0
  142. /package/{src/content → harness}/.opencode/commands/plan-quick.md +0 -0
  143. /package/{src/content → harness}/.opencode/commands/plan-story.md +0 -0
  144. /package/{src/content → harness}/.opencode/commands/repo-audit.md +0 -0
  145. /package/{src/content → harness}/.opencode/commands/repo-help.md +0 -0
  146. /package/{src/content → harness}/.opencode/commands/repo-initialize.md +0 -0
  147. /package/{src/content → harness}/.opencode/commands/repo-onboard.md +0 -0
  148. /package/{src/content → harness}/.opencode/commands/repo-verify.md +0 -0
  149. /package/{src/content → harness}/.opencode/plugins/pc-subagent-monitor.js +0 -0
  150. /package/{src/content → harness}/.opencode/plugins/pc-system-reminders.js +0 -0
  151. /package/{src/content → harness}/.opencode/tui/pc-subagents.tsx +0 -0
  152. /package/{src/content → harness}/.opencode/tui.json +0 -0
  153. /package/{src/content → harness}/AGENTS.md +0 -0
  154. /package/{src/content → harness}/openspec/changes/archive/.gitkeep +0 -0
  155. /package/{src/content → harness}/openspec/specs/.gitkeep +0 -0
@@ -1,80 +1,80 @@
1
- # Agent file template
2
-
3
- The agent file is exactly this structure: frontmatter plus one identity paragraph plus the `## Abilities` section. No other sections. No other content.
4
-
5
- ```markdown
6
- ---
7
- description: <one sentence naming the persona + top 3-5 detected technologies>
8
- mode: subagent
9
- permission:
10
- edit: allow
11
- bash: allow
12
- read: allow
13
- glob: allow
14
- grep: allow
15
- ---
16
-
17
- <One paragraph: "You are a {persona} engineer specializing in {top technologies}. You own all work in {scope/files}." Keep it to 2-3 sentences max.>
18
-
19
- ## Abilities
20
- - Guardrails: @pc-guardrails-generic, @pc-guardrails-project
21
- - Development: <@installed-skill-1>, <@installed-skill-2>, ...
22
- - Testing: <@installed-skill-for-testing>, ...
23
- - Infrastructure: <@installed-skill-for-devops>, ...
24
- ```
25
-
26
- That is the entire file: frontmatter, one identity paragraph, and the `## Abilities` section. The always-installed `pc-system-reminders` plugin loads the listed skills for every session. Replace every `<...>` placeholder with real values from your research. Remove any ability category line that has no skills assigned (besides Guardrails which is always present).
27
-
28
- ## Description quality bar
29
-
30
- The `description:` field is the matching key for `/plan-apply`. The lead compares task domain text against agent descriptions to pick the right specialist. A weak description means the wrong engineer gets spawned.
31
-
32
- Bad: `"A frontend engineer for React"`
33
- Good: `"Frontend engineer for Ink 7 + React 19 TUI, FSD architecture, Inversify DI, design tokens, and i18n"`
34
-
35
- Rules:
36
- - Name the persona explicitly
37
- - List the top 3-5 detected technologies from Step 2
38
- - One sentence, no padding
39
-
40
- ## Identity paragraph
41
-
42
- The identity paragraph sits between frontmatter and `## Abilities`. It tells the engineer who it is and what it owns in 2-3 sentences max. Not a spec, not a knowledge dump, a quick scoping statement.
43
-
44
- Bad: 5 paragraphs of architecture details, FSD rules, design tokens, file maps, testing patterns.
45
- Good: `"You are a frontend engineer specializing in terminal UI development with Ink 7 + React 19. You own all work in the FSD layers: src/app/, src/widgets/, src/features/, src/entities/, and src/shared/."`
46
-
47
- Rules:
48
- - State the persona and specialization in one sentence
49
- - State what files or layers the engineer owns in one sentence
50
- - Never exceed 3 sentences
51
-
52
- ## Category rules
53
-
54
- - Development = language/framework/UI/DI skills. Testing = test/lint/typecheck skills. Infrastructure = DevOps/CI/CD/cloud skills.
55
- - Only include ability categories that have at least one real skill (besides Guardrails which is always present).
56
- - Name follows `{persona}-engineer` pattern (e.g. `frontend-engineer`, `backend-engineer`).
57
- - Read existing agents' `color:` frontmatter first: pick a color not already used.
58
- - `warning` is reserved for the lead (fullstack) engineer, the planning agent. Never assign it to a spawned specialist.
59
-
60
- ## Structural validation checklist
61
-
62
- After writing the agent file, verify:
63
-
64
- 1. Frontmatter exists: starts with `---`, has `description`, `mode: subagent`, `permission` block. No `color`: the `pc-subagent-tiers` plugin derives one from the agent name at startup.
65
- 2. No `model:` field in the frontmatter. The `pc-subagent-tiers` plugin injects it.
66
- 3. `## Abilities` is the only `##` heading. No other `##` sections exist in the file.
67
- 4. One identity paragraph before `## Abilities`: 2-3 sentences max, not multiple paragraphs.
68
- 5. Abilities are categorized: each line starts with `- Guardrails:`, `- Development:`, `- Testing:`, or `- Infrastructure:`. No bare `@skill-name` lines.
69
- 6. One file only: no `.build.md`, `.fast.md`, or `.plan.md` variant was created.
70
-
71
- If any check fails, rewrite the file to match the template exactly.
72
-
73
- ## Skill reference validation
74
-
75
- 1. Parse every `@skill-name` from the `## Abilities` section (excluding `@pc-guardrails-generic` and `@pc-guardrails-project` which are installed at init).
76
- 2. For each: check `.agents/skills/<skill-name>/SKILL.md` exists.
77
- 3. For each: check `skills-lock.json` contains the skill.
78
- 4. If `.agents/skills/<skill-name>/SKILL.md` exists but `skills-lock.json` is missing the entry: manually patch `skills-lock.json` using the Edit tool (same procedure as in the signal mapping reference). Re-read `skills-lock.json` to confirm it is valid JSON.
79
- 5. If `.agents/skills/<skill-name>/SKILL.md` is missing: try to install it: `npx skills add -y <owner/repo@skill-name>` (search `skills-lock.json` or `npx skills find` for the owner/repo). If install fails or the skill can't be found on skills.sh, remove the reference from the file, warn the user, and note it in the summary.
80
- 6. Re-read the file to confirm all remaining `@skill-name` references are valid.
1
+ # Agent file template
2
+
3
+ The agent file is exactly this structure: frontmatter plus one identity paragraph plus the `## Abilities` section. No other sections. No other content.
4
+
5
+ ```markdown
6
+ ---
7
+ description: <one sentence naming the persona + top 3-5 detected technologies>
8
+ mode: subagent
9
+ permission:
10
+ edit: allow
11
+ bash: allow
12
+ read: allow
13
+ glob: allow
14
+ grep: allow
15
+ ---
16
+
17
+ <One paragraph: "You are a {persona} engineer specializing in {top technologies}. You own all work in {scope/files}." Keep it to 2-3 sentences max.>
18
+
19
+ ## Abilities
20
+ - Guardrails: @pc-guardrails-generic, @pc-guardrails-project
21
+ - Development: <@installed-skill-1>, <@installed-skill-2>, ...
22
+ - Testing: <@installed-skill-for-testing>, ...
23
+ - Infrastructure: <@installed-skill-for-devops>, ...
24
+ ```
25
+
26
+ That is the entire file: frontmatter, one identity paragraph, and the `## Abilities` section. The always-installed `pc-system-reminders` plugin loads the listed skills for every session. Replace every `<...>` placeholder with real values from your research. Remove any ability category line that has no skills assigned (besides Guardrails which is always present).
27
+
28
+ ## Description quality bar
29
+
30
+ The `description:` field is the matching key for `/plan-apply`. The lead compares task domain text against agent descriptions to pick the right specialist. A weak description means the wrong engineer gets spawned.
31
+
32
+ Bad: `"A frontend engineer for React"`
33
+ Good: `"Frontend engineer for Ink 7 + React 19 TUI, FSD architecture, Inversify DI, design tokens, and i18n"`
34
+
35
+ Rules:
36
+ - Name the persona explicitly
37
+ - List the top 3-5 detected technologies from Step 2
38
+ - One sentence, no padding
39
+
40
+ ## Identity paragraph
41
+
42
+ The identity paragraph sits between frontmatter and `## Abilities`. It tells the engineer who it is and what it owns in 2-3 sentences max. Not a spec, not a knowledge dump, a quick scoping statement.
43
+
44
+ Bad: 5 paragraphs of architecture details, FSD rules, design tokens, file maps, testing patterns.
45
+ Good: `"You are a frontend engineer specializing in terminal UI development with Ink 7 + React 19. You own all work in the FSD layers: src/app/, src/widgets/, src/features/, src/entities/, and src/shared/."`
46
+
47
+ Rules:
48
+ - State the persona and specialization in one sentence
49
+ - State what files or layers the engineer owns in one sentence
50
+ - Never exceed 3 sentences
51
+
52
+ ## Category rules
53
+
54
+ - Development = language/framework/UI/DI skills. Testing = test/lint/typecheck skills. Infrastructure = DevOps/CI/CD/cloud skills.
55
+ - Only include ability categories that have at least one real skill (besides Guardrails which is always present).
56
+ - Name follows `{persona}-engineer` pattern (e.g. `frontend-engineer`, `backend-engineer`).
57
+ - Read existing agents' `color:` frontmatter first: pick a color not already used.
58
+ - `warning` is reserved for the lead (fullstack) engineer, the planning agent. Never assign it to a spawned specialist.
59
+
60
+ ## Structural validation checklist
61
+
62
+ After writing the agent file, verify:
63
+
64
+ 1. Frontmatter exists: starts with `---`, has `description`, `mode: subagent`, `permission` block. No `color`: the `pc-subagent-tiers` plugin derives one from the agent name at startup.
65
+ 2. No `model:` field in the frontmatter. The `pc-subagent-tiers` plugin injects it.
66
+ 3. `## Abilities` is the only `##` heading. No other `##` sections exist in the file.
67
+ 4. One identity paragraph before `## Abilities`: 2-3 sentences max, not multiple paragraphs.
68
+ 5. Abilities are categorized: each line starts with `- Guardrails:`, `- Development:`, `- Testing:`, or `- Infrastructure:`. No bare `@skill-name` lines.
69
+ 6. One file only: no `.build.md`, `.fast.md`, or `.plan.md` variant was created.
70
+
71
+ If any check fails, rewrite the file to match the template exactly.
72
+
73
+ ## Skill reference validation
74
+
75
+ 1. Parse every `@skill-name` from the `## Abilities` section (excluding `@pc-guardrails-generic` and `@pc-guardrails-project` which are installed at init).
76
+ 2. For each: check `.agents/skills/<skill-name>/SKILL.md` exists.
77
+ 3. For each: check `skills-lock.json` contains the skill.
78
+ 4. If `.agents/skills/<skill-name>/SKILL.md` exists but `skills-lock.json` is missing the entry: manually patch `skills-lock.json` using the Edit tool (same procedure as in the signal mapping reference). Re-read `skills-lock.json` to confirm it is valid JSON.
79
+ 5. If `.agents/skills/<skill-name>/SKILL.md` is missing: try to install it: `npx skills add -y <owner/repo@skill-name>` (search `skills-lock.json` or `npx skills find` for the owner/repo). If install fails or the skill can't be found on skills.sh, remove the reference from the file, warn the user, and note it in the summary.
80
+ 6. Re-read the file to confirm all remaining `@skill-name` references are valid.
@@ -9,7 +9,7 @@ When the plan lives in the Todo pane (from `/plan-quick`) and no OpenSpec change
9
9
  - Mark it `in_progress` via `todowrite`.
10
10
  - Implement it (edit files, run commands as needed).
11
11
  - Mark it `completed` via `todowrite`.
12
- - Commit the change: `git add -A && git commit -m "task {id}: {summary}"`.
12
+ - Commit the change: `git add <the paths this task wrote> && git commit -m "task {id}: {summary}"`. Never `-A` or `.`: a working tree is shared, and staging all of it commits somebody else's edits, possibly half-finished, under your message.
13
13
  4. After all tasks are done, run the project's typecheck/build check if one exists. Fix any errors.
14
14
  5. Report: tasks N/N completed, commits made, branch name.
15
15
 
@@ -6,6 +6,9 @@ license: MIT
6
6
 
7
7
  # Plan Archive
8
8
 
9
+ <!-- PC-OPTIMIZATION-MEMORY-START -->
10
+ <!-- PC-OPTIMIZATION-MEMORY-END -->
11
+
9
12
  ## Input
10
13
 
11
14
  The caller provides (all optional):
@@ -7,3 +7,6 @@ license: MIT
7
7
  **READ-ONLY MODE.** From the moment this skill is loaded until the user explicitly invokes a different command (e.g. `/plan-apply`) or explicitly requests implementation, you MUST NOT write, edit, or create any file, including OpenSpec artifacts. You may only read, search, and discuss. If the conversation drifts toward implementation, remind the user that explore mode is active and suggest `/plan-apply` to start implementing. This overrides any permissive stance in `@openspec-explore` about creating OpenSpec artifacts being "fine."
8
8
 
9
9
  Load `@openspec-explore` and follow every step defined in it.
10
+
11
+ <!-- PC-OPTIMIZATION-MEMORY-START -->
12
+ <!-- PC-OPTIMIZATION-MEMORY-END -->
@@ -8,14 +8,19 @@ Run the full OpenSpec lifecycle without human interaction. This skill owns phase
8
8
 
9
9
  Keep this checklist visible:
10
10
 
11
- `explore · propose · apply · verify · archive · evidence · output · report`
11
+ `explore · propose · apply · verify · archive · output · report`
12
12
 
13
13
  Move forward only when a phase returns its required result. On a hard failure, follow the [failure policy](failure-policy.md). Continue after each phase skill returns; the run ends only after every checklist item is complete.
14
14
 
15
- **Token efficiency rules:** Batch git operations within a phase (combine `git add -A && git commit` in one tool call). Do not run status checks between sequential operations in the same phase. Minimize model turns: if a phase requires 3 git commands, call them in one tool call, not 3.
15
+ **Token efficiency rules:** Batch git operations within a phase (combine `git add <paths> && git commit` in one tool call). Do not run status checks between sequential operations in the same phase. Minimize model turns: if a phase requires 3 git commands, call them in one tool call, not 3.
16
+
17
+ **Stage paths, never `git add -A` or `git add .`.** A working tree is shared: a person or another agent may have edits in it, and staging everything puts their work in your commit under your message. It is not hypothetical. A Teams tool and its tests were committed inside a commit named after a YAML input rename, and nothing in that message said so. Two things go wrong, and the second is worse: the history lies about what changed, and unreviewed or half-finished work reaches the default branch under a heading nobody would look twice at. Saving a model turn is not worth either.
16
18
 
17
19
  Input: `$ARGUMENTS`
18
20
 
21
+ <!-- PC-OPTIMIZATION-MEMORY-START -->
22
+ <!-- PC-OPTIMIZATION-MEMORY-END -->
23
+
19
24
  ## Phase 0: Resolve input
20
25
 
21
26
  Load the [output mode](output-mode.md) reference and resolve the mode from the first token of `$ARGUMENTS`. Treat the remaining text as data, not orchestration instructions.
@@ -41,14 +46,14 @@ Tick `explore` when `pc-plan-explore` returns its findings handoff.
41
46
 
42
47
  ## Phase 3: Propose
43
48
 
44
- **Skip if `{refined}` is `true`.** Instead, create a minimal OpenSpec change directly: run `openspec new change "{change-id}"`, write `tasks.md` from the issue's acceptance criteria (one task per criterion or artifact group), create `.openspec.yaml` with `skip_specs: true` (the issue already has the spec content), and commit: `git add -A && git commit -m "propose: {title} ({change-id})"`.
49
+ **Skip if `{refined}` is `true`.** Instead, create a minimal OpenSpec change directly: run `openspec new change "{change-id}"`, write `tasks.md` from the issue's acceptance criteria (one task per criterion or artifact group), create `.openspec.yaml` with `skip_specs: true` (the issue already has the spec content), and commit: `git add openspec/changes/{change-id}/ && git commit -m "propose: {title} ({change-id})"`.
45
50
 
46
51
  Load `pc-plan-propose` in autonomous mode with `{resolved_input}`, `EXPLORATION_BRIEF`, and `scope_classification`.
47
52
 
48
53
  Confirm its change directory and actionable `tasks.md` exist. Rename `$BRANCH` when the canonical change slug differs from `{slug}`, then commit the proposal:
49
54
 
50
55
  ```bash
51
- git add -A && git commit -m "propose: {title} ({change-id})"
56
+ git add openspec/changes/{change-id}/ && git commit -m "propose: {title} ({change-id})"
52
57
  ```
53
58
 
54
59
  Tick `propose` when the proposal commit exists.
@@ -66,28 +71,14 @@ Require `verify` and a clean working tree. Load `pc-plan-archive` in autonomous
66
71
  Require `ARCHIVED_OK` and the archive path, then commit:
67
72
 
68
73
  ```bash
69
- git add -A && git commit -m "archive: {title} ({change-id})"
74
+ git add openspec/changes/ && git commit -m "archive: {title} ({change-id})"
70
75
  ```
71
76
 
72
77
  Tick `archive` when the archive commit exists.
73
78
 
74
- ## Phase 5.5: Evidence
75
-
76
- Load `pc-ops-evidence` with `operation: capture` and `{change-id}`. It owns evidence decisions, capture, and the manifest. Evidence capture is non-fatal.
77
-
78
- The evidence skill uses `playwright-cli` (headless, works inside containers) and `pnpm run dev` (starts the full app stack with mock auth). Evidence capture works in CI.
79
-
80
- Commit evidence when files or a manifest were written:
81
-
82
- ```bash
83
- git add -A && git commit -m "evidence: {title} ({change-id})"
84
- ```
85
-
86
- Record the manifest result and tick `evidence` after capture was attempted.
87
-
88
79
  ## Phase 6: Output
89
80
 
90
- Follow the [output procedure](output.md) with the mode, branch values, change id, work-item reference, archive path, and evidence result. Tick `output` only when its mode-specific postcondition holds.
81
+ Follow the [output procedure](output.md) with the mode, branch values, change id, work-item reference, and archive path. Tick `output` only when its mode-specific postcondition holds.
91
82
 
92
83
  ## Phase 7: Report
93
84
 
@@ -27,4 +27,4 @@ git switch -c "feature/{slug}"
27
27
  BRANCH="$(git branch --show-current)"
28
28
  ```
29
29
 
30
- Everything through archive and evidence happens on `$BRANCH`.
30
+ Everything through archive happens on `$BRANCH`.
@@ -21,7 +21,7 @@ git merge --no-ff "$BRANCH" -m "goal: {title} ({change-id})"
21
21
  git branch -d "$BRANCH"
22
22
  ```
23
23
 
24
- If the merge conflicts, abort it and use the failure policy. Do not push the default branch. Evidence remains in the archive and publication is skipped because no commit-pinned repository URL exists.
24
+ If the merge conflicts, abort it and use the failure policy. Do not push the default branch.
25
25
 
26
26
  ## Push mode
27
27
 
@@ -31,13 +31,13 @@ Push the feature branch:
31
31
  git push -u origin "$BRANCH"
32
32
  ```
33
33
 
34
- When a work item exists, load `pc-ops-evidence` with `operation: publish`, `{change-id}`, the work-item reference, and `mode: push`. Publication is non-fatal. Restore the stash and leave the branch available.
34
+ Restore the stash and leave the branch available.
35
35
 
36
36
  ## PR mode
37
37
 
38
- Push the feature branch, then load `pc-ops-ship` to create a PR into `$DEFAULT_BRANCH`. Supply title, change id, functional summary, delivered acceptance criteria, task count, verification result, archive path, evidence result, and commits. Do not merge the PR.
38
+ Push the feature branch, then load `pc-ops-ship` to create a PR into `$DEFAULT_BRANCH`. Supply title, change id, functional summary, delivered acceptance criteria, task count, verification result, archive path, and commits. Do not merge the PR.
39
39
 
40
- When a work item exists, load `pc-ops-evidence` with `operation: publish`, `{change-id}`, the work-item reference, PR number, and `mode: pr`. Publication is non-fatal. Restore the stash.
40
+ Restore the stash.
41
41
 
42
42
  ## Final report
43
43
 
@@ -51,13 +51,10 @@ Functional outcome: {one-sentence result}
51
51
  Branch: {branch}
52
52
  Tasks: {completed}/{total}
53
53
  Acceptance criteria: {passed}/{total}
54
- Commits: {proposal, apply, archive, evidence when present}
54
+ Commits: {proposal, apply, archive}
55
55
  Verification: passed | failed
56
56
  Archived: yes | no
57
57
  Archive path: {path or none}
58
- Evidence: passed | skipped | failed | blocked
59
- Evidence assets: {paths or none}
60
- Evidence publication: {published | skipped | failed}
61
58
  Output mode: default | push | pr
62
59
  Final state: merged locally | pushed branch | PR URL | branch preserved after failure
63
60
  Stash restoration: not needed | restored | preserved after conflict
@@ -21,6 +21,9 @@ Load the `@user-story` skill now. Follow its format, anti-patterns, and quality
21
21
 
22
22
  ## Step 2: Analyze the codebase
23
23
 
24
+ <!-- PC-OPTIMIZATION-MEMORY-START -->
25
+ <!-- PC-OPTIMIZATION-MEMORY-END -->
26
+
24
27
  Use `glob` and `grep` to locate the relevant files, components, types, and patterns that the feature touches. Read the key files to understand:
25
28
 
26
29
  - **Who** the users are (check auth, roles, user models, route guards)
@@ -1,132 +1,136 @@
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 agent-browser CLI installed and openspec CLI.
6
+ metadata:
7
+ author: copilots
8
+ version: "2.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 agent-browser.
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
+ - agent-browser installed (installed during onboarding) — verify with `agent-browser doctor`
18
+ - An authenticated session for the backlog system:
19
+ - agent-browser runs its own Chrome, not the user's daily browser. Login state persists per session via `--session <slug> --restore`: log in once, and later runs restore cookies automatically.
20
+ - On first use, the user logs in manually in the opened window; state is saved on close and auto-restored afterwards.
21
+
22
+ ## Steps
23
+
24
+ 1. **Extract the URL** from the user's message
25
+ - The user provides a direct URL to a work item, issue, ticket, or PBI
26
+ - 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`
27
+
28
+ 2. **Open the URL in a persistent session**
29
+ ```bash
30
+ agent-browser --session backlog --restore open "https://the-url-the-user-provided"
31
+ ```
32
+
33
+ 3. **Wait for the page to load**
34
+ ```bash
35
+ agent-browser wait --load networkidle
36
+ ```
37
+ Prefer load-state waits over fixed sleeps; for SPAs that render after idle, add `agent-browser wait --text "<known heading>"` when a stable string is known.
38
+
39
+ 4. **Read the work item content**
40
+ ```bash
41
+ agent-browser snapshot
42
+ ```
43
+ The accessibility tree with `@ref` handles usually reveals the work item title, description, and fields more precisely than raw page text. Also useful:
44
+ ```bash
45
+ agent-browser read # agent-readable text of the active tab
46
+ agent-browser get text "h1" # the heading, when present
47
+ ```
48
+
49
+ 5. **Parse work item fields**
50
+
51
+ From the snapshot and/or text, extract:
52
+ - Title/Summary: usually the main heading or the `<h1>` / page title
53
+ - Description: the body text, acceptance criteria, or "Definition of Done" section
54
+ - ID/Key: the work item ID from the URL or page (e.g. `123`, `ENG-123`)
55
+ - Status: if visible (e.g. "To Do", "In Progress", "Active")
56
+ - Assignee: if visible
57
+ - Priority: if visible
58
+ - Labels/Tags: if visible
59
+
60
+ If the page is a SPA that loads content dynamically:
61
+ - Wait for load state again (`agent-browser wait --load networkidle`)
62
+ - Take a fresh `snapshot` after the wait
63
+ - `agent-browser get url` confirms you are still on the work item
64
+
65
+ If a login page appears instead, the session is not authenticated: tell the user to log in manually in the opened browser window, then retry from step 2 with the same `--session backlog --restore` (the login is saved for future runs).
66
+
67
+ 6. **Create OpenSpec Change**
68
+ ```bash
69
+ openspec new change "{slug-from-title}"
70
+ ```
71
+
72
+ Write `proposal.md` with:
73
+ - Title: the work item title from the page
74
+ - Context: mention the source URL and the work item ID
75
+ - Requirements: extracted from description and acceptance criteria
76
+ - Scope: what's in/out based on the ticket
77
+
78
+ 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:
79
+
80
+ ```json
81
+ {
82
+ "questions": [
83
+ {
84
+ "header": "Ready to implement",
85
+ "question": "Ready to implement?",
86
+ "options": [
87
+ { "label": "yes", "description": "Load the pc-plan-apply skill to start implementation." },
88
+ { "label": "no", "description": "Stop here. You can run /plan-apply later." }
89
+ ]
90
+ }
91
+ ]
92
+ }
93
+ ```
94
+
95
+ Wait for confirmation before loading `pc-plan-apply`.
96
+
97
+ ## Working with common backlog tools
98
+
99
+ ### Azure DevOps (browser fallback)
100
+ - URL: `https://dev.azure.com/{org}/{project}/_workitems/edit/{id}`
101
+ - Title: visible in the work item header
102
+ - Description: "Description" field section
103
+ - Acceptance Criteria: "Acceptance Criteria" field section
104
+ - State: visible in the top-right area
105
+
106
+ ### Linear
107
+ - URL: `https://linear.app/{team}/issue/{key}`
108
+ - Title: the issue title
109
+ - Description: the issue body
110
+ - Status: visible as a dropdown
111
+
112
+ ### Jira (browser fallback)
113
+ - URL: `https://yoursite.atlassian.net/browse/{key}`
114
+ - Title: the issue summary
115
+ - Description: the description field
116
+ - Status: visible in the status badge
117
+
118
+ ### Trello
119
+ - URL: `https://trello.com/c/{short-id}`
120
+ - Title: the card title
121
+ - Description: the card description
122
+ - Labels: visible as colored badges
123
+
124
+ ### Other tools (generic)
125
+ - Look for `<h1>` or page title for the work item title
126
+ - Look for the main content area for description
127
+ - Use `agent-browser snapshot` to get structured accessibility tree data
128
+
129
+ ## Rules
130
+
131
+ - Navigate only to URLs the user explicitly provide. Never guess or browse randomly.
132
+ - Reuse the `backlog` session (`--session backlog --restore`) so login state persists across runs.
133
+ - If the page requires login and the session is not authenticated, tell them to log in via the opened browser window and retry.
134
+ - 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).
135
+ - This skill is read-only: no clicking buttons, no changing status.
136
+ - Browser is a backlog-only platform: it has no PR or repo integration. PR creation uses the repo platform configured separately.
@@ -1,10 +1,9 @@
1
- {
2
- "dependencies": {
3
- "@opencode-ai/plugin": "1.18.19",
4
- "@different-ai/opencode-browser": "4.6.1",
5
- "@mohak34/opencode-notifier": "0.2.8",
6
- "@opentui/core": "0.5.6",
7
- "@opentui/solid": "0.5.6",
8
- "solid-js": "1.9.12"
9
- }
10
- }
1
+ {
2
+ "dependencies": {
3
+ "@opencode-ai/plugin": "1.18.19",
4
+ "@mohak34/opencode-notifier": "0.2.8",
5
+ "@opentui/core": "0.5.6",
6
+ "@opentui/solid": "0.5.6",
7
+ "solid-js": "1.9.12"
8
+ }
9
+ }