@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,53 @@
1
+ {
2
+ "platform": {
3
+ "none": {
4
+ "devopsSkills": "- Selected platform: `none` (from onboarding platform step).\n- Do NOT load `pc-userstory` or `pc-ops-ship`.\n- Work only from direct user instructions in the main conversation or from local OpenSpec artifacts.\n- Ignore GitHub/Azure DevOps URL inference unless the user explicitly reconfigures onboarding later.",
5
+ "devopsMode": "This project does not use GitHub or Azure DevOps integration. Do not read work items, create PRs, or process PR feedback. Operate only from direct user instructions and local repository context.",
6
+ "workflow": "When the user gives a task directly in the conversation, **I own the full lifecycle**. I work from the user request and local repository context. I may use OpenSpec when structured planning helps, but I do not depend on issue links or PR workflows.\n\nTrigger patterns, I recognize ALL of these, exact wording does not matter:\n- User describes a feature, bug, or refactor directly → clarify if needed → optionally load the `pc-plan-propose` skill → implement in the main session or `pc-plan-apply` as appropriate\n- `implement the plan` / `implement` / `start` / `go` → load the `pc-plan-apply` skill against the current OpenSpec change when one exists\n- `just do it` / `quick fix` / `raw conversation` → work directly in the main session without PR or work-item automation\n\n**GitHub Issue URLs, Azure DevOps work item URLs, and PR URLs are NOT automatic triggers in this mode.** Only use platform-specific flows if onboarding is later reconfigured for GitHub or Azure DevOps.",
7
+ "pipeline": "```\nlead (main session)\n → pc-plan-propose (propose + enrich tasks)\n ↓\n [confirm when scope needs it]\n ↓\n*-engineer specialists (parallel via pc-plan-apply)\n → implement assigned tasks (parallel waves)\n ↓\nlead verifies and reports to user\n```\n\n### Phase 1, Clarify & Plan\n\n```\n1. Understand the task from the conversation and local repo context.\n2. If the work benefits from explicit specs/tasks, load the pc-plan-propose skill.\n Enrich tasks.md: assign each task its best matching engineer (the engineer's tier sets the model) plus depends_on and touches.\n3. Show the plan or intended scope when non-trivial.\n4. If the request is small, implement directly in the main session.\n```\n\n### Phase 2, Implement\n\n```\n0. Run /quota before spawning, when available.\n1. If using OpenSpec tasks, load the pc-plan-apply skill.\n - Classify cost tier, confirm if ≥4 tasks.\n - Lead discovers engineers, builds dependency- and file-disjoint waves, and spawns each wave as parallel subagents.\n - Each subagent implements its assigned tasks and returns; the lead commits each group and marks tasks done.\n2. If task is small, implement directly in the main session.\n3. Verify with tests/build/lint.\n```\n\nThere is no PR shipping phase in `none` mode. Report completion directly to the user.",
8
+ "skillsGuide": "No platform skills installed (platform: none). Work from direct user instructions and local OpenSpec artifacts only."
9
+ },
10
+ "azure": {
11
+ "devopsSkills": "- Selected platform: `azure` (from onboarding platform step).\n- Load Azure DevOps skills: `pc-userstory`, `pc-ops-ship`.\n- Use URL-based platform inference only if onboarding metadata is missing or ambiguous.",
12
+ "devopsMode": "This project uses platform-integrated workflow modes described below.",
13
+ "workflow": "When the user provides a work item URL or says \"implement the plan\" or \"I've added comments to the PR\", **I own the full lifecycle**. I load the appropriate userstory skill and coordinate implementation as native subagent waves via the `pc-plan-apply` skill.\n\nTrigger patterns, I recognize ALL of these, exact wording does not matter:\n- User pastes or mentions an Azure DevOps URL → load `pc-userstory` skill → parse work item → load the `pc-plan-propose` skill → confirm with user → load the `pc-plan-apply` skill → ship\n- `implement the plan` / `implement` / `start` / `go` → load the `pc-plan-apply` skill → ship\n- `I've added comments to the PR` → read PR comments → fix → update PR\n- Any Azure DevOps PR URL in a feedback/fix request (e.g. \"check comments\", \"fix PR feedback\") → run PR Feedback Loop\n\n**An Azure DevOps URL in the user's message is a strong trigger: follow the pipeline unless the user explicitly asks for analysis or context only.**",
14
+ "pipeline": "```\nlead (main session)\n → pc-plan-propose (parse work item + propose + enrich tasks)\n ↓\n [confirm with user]\n ↓\n*-engineer specialists (parallel via pc-plan-apply)\n → implement assigned tasks (parallel waves)\n ↓\nlead loads the pc-ops-ship skill → commit + push + create PR\n```\n\n### Phase 1, Parse & Propose\n\n```\n1. If a work item URL is provided, load @pc-userstory skill.\n2. Load the pc-plan-propose skill → fetches work item, generates proposal.md, specs/, tasks.md, enriches tasks with agent + dependencies.\n3. Show the plan: change name, total tasks, task list with agent assignments.\n4. STOP. Ask user: \"Ready to implement? (yes/no)\", DO NOT proceed until confirmed.\n```\n\n### Phase 2, Implement\n\n```\n0. Run /quota to check remaining budget before spawning.\n1. Load the pc-plan-apply skill.\n - Classify cost tier, announce scope, ask user to confirm if ≥4 tasks.\n - Lead discovers available engineers from .opencode/agents/*.md, prefers matching custom engineers.\n - Lead builds dependency- and file-disjoint waves, then spawns each wave as parallel subagents (by agent name; each engineer carries its own model).\n - Each subagent implements its assigned tasks and returns; the lead commits each group and marks tasks done in tasks.md.\n2. Verify with tests/build/lint according to task scope.\n3. Run /quota after all waves complete.\n```\n\n### Phase 3, Ship\n\n```\n1. Load the pc-ops-ship skill to create the PR.\n2. Done: report PR URL to user.\n```\n\n### Handling PR Feedback\n\n```\nWhen user says \"I've added comments to the PR\" or shares a PR URL:\n1. Triage feedback: read and classify the PR comments via the repo platform CLI (the /ops-review flow).\n2. Fix items by loading the pc-plan-apply skill for the required tasks.\n3. Load the pc-ops-ship skill again to push updates and reply to PR threads.\n```",
15
+ "skillsGuide": "Platform skills (Azure DevOps):\n- `@pc-userstory`: load when an Azure DevOps work item URL is detected. Fetches the work item via `az` CLI and creates an OpenSpec change. NEVER use browser tools for Azure DevOps operations.\n- `pc-ops-ship`: load in ship mode to create a PR and link the work item, or in feedback mode to read and classify PR review comments."
16
+ },
17
+ "github": {
18
+ "devopsSkills": "- Selected platform: `github` (from onboarding platform step).\n- Load GitHub skills: `pc-userstory`, `pc-ops-ship`.\n- Use URL-based platform inference only if onboarding metadata is missing or ambiguous.",
19
+ "devopsMode": "This project uses platform-integrated workflow modes described below.",
20
+ "workflow": "When the user provides a work item URL or says \"implement the plan\" or \"I've added comments to the PR\", **I own the full lifecycle**. I load the appropriate userstory skill and coordinate implementation as native subagent waves via the `pc-plan-apply` skill.\n\nTrigger patterns, I recognize ALL of these, exact wording does not matter:\n- User pastes or mentions a GitHub Issue URL → load `pc-userstory` skill → parse issue → load the `pc-plan-propose` skill → confirm with user → load the `pc-plan-apply` skill → ship\n- `implement the plan` / `implement` / `start` / `go` → load the `pc-plan-apply` skill → ship\n- `I've added comments to the PR` → read PR comments → fix → update PR\n- Any GitHub PR URL in a feedback/fix request (e.g. \"check comments\", \"fix PR feedback\") → run PR Feedback Loop\n\n**A GitHub URL in the user's message is a strong trigger: follow the pipeline unless the user explicitly asks for analysis or context only.**",
21
+ "pipeline": "```\nlead (main session)\n → pc-plan-propose (parse work item + propose + enrich tasks)\n ↓\n [confirm with user]\n ↓\n*-engineer specialists (parallel via pc-plan-apply)\n → implement assigned tasks (parallel waves)\n ↓\nlead loads the pc-ops-ship skill → commit + push + create PR\n```\n\n### Phase 1, Parse & Propose\n\n```\n1. If a work item URL is provided, load @pc-userstory skill.\n2. Load the pc-plan-propose skill → fetches work item, generates proposal.md, specs/, tasks.md, enriches tasks with agent + dependencies.\n3. Show the plan: change name, total tasks, task list with agent assignments.\n4. STOP. Ask user: \"Ready to implement? (yes/no)\", DO NOT proceed until confirmed.\n```\n\n### Phase 2, Implement\n\n```\n0. Run /quota to check remaining budget before spawning.\n1. Load the pc-plan-apply skill.\n - Classify cost tier, announce scope, ask user to confirm if ≥4 tasks.\n - Lead discovers available engineers from .opencode/agents/*.md, prefers matching custom engineers.\n - Lead builds dependency- and file-disjoint waves, then spawns each wave as parallel subagents (by agent name; each engineer carries its own model).\n - Each subagent implements its assigned tasks and returns; the lead commits each group and marks tasks done in tasks.md.\n2. Verify with tests/build/lint according to task scope.\n3. Run /quota after all waves complete.\n```\n\n### Phase 3, Ship\n\n```\n1. Load the pc-ops-ship skill to create the PR.\n2. Done: report PR URL to user.\n```\n\n### Handling PR Feedback\n\n```\nWhen user says \"I've added comments to the PR\" or shares a PR URL:\n1. Triage feedback: read and classify the PR comments via the repo platform CLI (the /ops-review flow).\n2. Fix items by loading the pc-plan-apply skill for the required tasks.\n3. Load the pc-ops-ship skill again to push updates and reply to PR threads.\n```",
22
+ "skillsGuide": "Platform skills (GitHub):\n- `@pc-userstory`: load when a GitHub Issue URL is detected. Fetches the issue via `gh` CLI and creates an OpenSpec change. NEVER use webfetch to access GitHub URLs.\n- `pc-ops-ship`: load in ship mode to create a PR with screenshots, or in feedback mode to read and classify PR review comments."
23
+ },
24
+ "mixed": {
25
+ "default": {
26
+ "workflow": "This project uses a mixed-platform setup: the backlog (work items) and the repo (PRs) live on different platforms. Check `.opencode/harness.json` → `platform.backlog` and `platform.repo`.\n\nWhen the user provides a work item URL or says \"implement the plan\" or \"I've added comments to the PR\", **I own the full lifecycle**: parse the work item with `@pc-userstory` (backlog platform CLI), plan via the `pc-plan-propose` skill, confirm with the user, implement via the `pc-plan-apply` skill, ship via the `pc-ops-ship` skill (repo platform CLI).\n\nTrigger patterns, I recognize ALL of these, exact wording does not matter:\n- A backlog work-item URL or issue key → load `pc-userstory` → parse → load the `pc-plan-propose` skill → confirm with user → load the `pc-plan-apply` skill → ship\n- `implement the plan` / `implement` / `start` / `go` → load the `pc-plan-apply` skill → ship\n- A PR/MR URL or \"I've added comments to the PR\" → read the PR comments via the repo platform CLI → run the PR Feedback Loop\n\nNever mix the CLIs: work items always go through the backlog platform CLI, PRs/MRs always through the repo platform CLI.",
27
+ "pipeline": "{repo}",
28
+ "skillsGuide": "Mixed platform setup: the two platform skills target different hosts:\n- `@pc-userstory` → fetches work items from the backlog platform. Load when a work-item URL or issue key is provided.\n- `pc-ops-ship` → creates PRs/MRs and triages review feedback on the repo platform. Load in ship mode or PR-feedback mode."
29
+ }
30
+ },
31
+ "jira": {
32
+ "devopsSkills": "- Selected backlog platform: `jira` (from onboarding platform step).\n- Jira is a BACKLOG-ONLY platform. Work items are fetched via `acli jira` CLI.\n- PRs and code review use the repo platform (GitHub or Azure DevOps) configured separately.\n- Load `pc-userstory` skill when a Jira URL is provided.\n- Load `pc-ops-ship` skill from the repo platform for PR operations.",
33
+ "devopsMode": "This project uses Jira for backlog/work items and a separate repo platform (GitHub or Azure DevOps) for code. Fetch work items via `acli jira` CLI. Create PRs via the repo platform CLI. Do NOT use browser tools for Jira operations.",
34
+ "workflow": "When the user provides a Jira URL or mentions a Jira issue key, **I own the full lifecycle**. I load `pc-userstory` skill to parse the Jira issue via `acli jira workitem view`, then load the `pc-plan-propose` skill to create the plan.\n\nTrigger patterns, I recognize ALL of these, exact wording does not matter:\n- User pastes or mentions a Jira URL (atlassian.net/browse/PROJ-123) -> load `pc-userstory` skill -> fetch via `acli jira` -> load the `pc-plan-propose` skill -> confirm -> load the `pc-plan-apply` skill -> ship\n- User mentions a Jira issue key (e.g. \"PROJ-123\") -> same flow\n- `implement the plan` / `implement` / `start` / `go` -> load the `pc-plan-apply` skill -> ship\n- PR feedback -> use the repo platform CLI (gh or az) for PR operations\n\n**A Jira URL or issue key in the user's message is a strong trigger: follow the pipeline unless the user explicitly asks for analysis or context only.**\n\nFor PR creation and code review, use the repo platform (configured as `platform.repo`). Jira has no PR capability.",
35
+ "pipeline": "```\nlead (main session)\n -> fetch Jira work item (acli jira workitem view)\n -> pc-plan-propose (propose + enrich tasks)\n |\n [confirm when scope needs it]\n |\n*-engineer specialists (parallel via pc-plan-apply)\n -> implement assigned tasks (parallel waves)\n |\nlead verifies, creates PR via repo platform (gh or az)\n -> transition Jira work item to Done (acli jira workitem transition)\n```\n\n### Phase 1, Fetch & Plan\n\n```\n1. Fetch the Jira work item via acli jira workitem view --key KEY.\n2. Load the pc-plan-propose skill to create the OpenSpec change from the work item.\n3. Confirm with the user.\n```\n\n### Phase 2, Implement & Ship\n\n```\n1. Load the pc-plan-apply skill to implement via parallel subagent waves.\n2. Create PR via repo platform CLI (gh pr create or az repos pr create).\n3. Transition Jira work item: acli jira workitem transition --key KEY --status \"Done\"\n```",
36
+ "skillsGuide": "### Backlog Platform: Jira\n- `pc-userstory` -> fetches Jira work items via `acli jira` CLI. Load when a Jira URL or issue key is provided.\n\n### Repo Platform\n- PR skills are loaded based on `platform.repo` (GitHub or Azure DevOps)."
37
+ },
38
+ "gitlab": {
39
+ "devopsSkills": "- Selected repo platform: `gitlab` (from onboarding platform step).\n- GitLab is a REPO-ONLY platform. MRs and code review via `glab` CLI.\n- Backlog/work items use the backlog platform (GitHub / Azure / Jira) configured separately.\n- Load `pc-ops-ship` skill for GitLab MR operations.",
40
+ "devopsMode": "This project uses GitLab for code repository and merge requests, with a separate backlog platform for work items. Create MRs via `glab mr create` CLI. Fetch work items via the backlog platform CLI. Do NOT use browser tools for GitLab operations.",
41
+ "workflow": "When the user provides a GitLab MR URL or says \"implement the plan\", **I own the full lifecycle**. I load the appropriate userstory skill (from backlog platform) and `pc-ops-ship` skill (for GitLab MRs).\n\nTrigger patterns, I recognize ALL of these, exact wording does not matter:\n- User pastes or mentions a backlog work item URL -> load `pc-userstory` skill -> fetch via backlog CLI -> load the `pc-plan-propose` skill -> confirm -> load the `pc-plan-apply` skill -> ship\n- `implement the plan` / `implement` / `start` / `go` -> load the `pc-plan-apply` skill -> ship\n- User says \"I've added comments to the MR\" -> read MR comments via `glab mr note list` -> triage feedback\n- Any GitLab MR URL in a feedback/fix request -> run MR Feedback Loop via `glab` CLI\n\n**A GitLab MR URL in the user's message is a strong trigger: follow the pipeline unless the user explicitly asks for analysis or context only.**\n\nFor work item fetching, use the backlog platform (configured as `platform.backlog`). GitLab has no backlog integration.",
42
+ "pipeline": "```\nlead (main session)\n -> fetch work item (backlog platform CLI: gh / az / acli)\n -> pc-plan-propose (propose + enrich tasks)\n |\n [confirm when scope needs it]\n |\n*-engineer specialists (parallel via pc-plan-apply)\n -> implement assigned tasks (parallel waves)\n |\nlead verifies, creates MR via GitLab (glab mr create)\n```\n\n### Phase 1, Fetch & Plan\n\n```\n1. Fetch the work item via backlog platform CLI.\n2. Load the pc-plan-propose skill to create the OpenSpec change.\n3. Confirm with the user.\n```\n\n### Phase 2, Implement & Ship\n\n```\n1. Load the pc-plan-apply skill to implement via parallel subagent waves.\n2. Create MR via glab mr create.\n3. Archive change after MR is merged.\n```",
43
+ "skillsGuide": "### Repo Platform: GitLab\n- `pc-ops-ship` -> creates GitLab merge requests via `glab` CLI. Load when shipping a branch or processing MR feedback.\n\n### Backlog Platform\n- Work item skills are loaded based on `platform.backlog` (GitHub / Azure / Jira)."
44
+ },
45
+ "browser": {
46
+ "devopsSkills": "- Selected backlog platform: `browser` (from onboarding platform step).\n- No CLI integration for the backlog system. Work items are fetched via opencode-browser plugin.\n- The `pc-userstory` skill navigates to work item URLs the user provides and reads page content.\n- PRs and code review use the repo platform (GitHub / Azure DevOps / GitLab) configured separately.",
47
+ "devopsMode": "This project uses browser automation for backlog/work items (no CLI) and a separate repo platform for code. Work items are read from web pages using the opencode-browser plugin. Create PRs via the repo platform CLI. The browser navigation exception ONLY applies to work item URLs the user explicitly provides.",
48
+ "workflow": "When the user provides a work item URL from any backlog tool (Azure DevOps, Linear, Trello, etc.), **I own the full lifecycle**. I load `pc-userstory` skill to navigate to the URL via browser and read the page content.\n\nTrigger patterns, I recognize ALL of these, exact wording does not matter:\n- User pastes any URL to a work item/ticket/issue -> load `pc-userstory` skill -> navigate via browser -> read page text + snapshot -> parse work item -> load the `pc-plan-propose` skill -> confirm -> load the `pc-plan-apply` skill -> ship\n- `implement the plan` / `implement` / `start` / `go` -> load the `pc-plan-apply` skill -> ship\n- PR feedback -> use the repo platform CLI (gh, az, or glab) for PR operations\n\n**Any work item URL in the user's message is a trigger, regardless of the backlog tool it points to.**\n\nFor PR creation and code review, use the repo platform (configured as `platform.repo`). Browser is backlog-only: it has no PR capability.",
49
+ "pipeline": "```\nlead (main session)\n -> open work item URL in browser (browser_open_tab)\n -> read page content (browser_query mode=page_text + browser_snapshot)\n -> parse work item fields from page text\n -> pc-plan-propose (propose + enrich tasks)\n |\n [confirm when scope needs it]\n |\n*-engineer specialists (parallel via pc-plan-apply)\n -> implement assigned tasks (parallel waves)\n |\nlead verifies, creates PR via repo platform (gh / az / glab)\n```\n\n### Phase 1, Fetch & Plan\n\n```\n1. User provides a work item URL.\n2. Navigate to the URL via browser_open_tab.\n3. Read page text via browser_query mode=page_text.\n4. Take accessibility snapshot via browser_snapshot.\n5. Parse title, description, acceptance criteria from the page.\n6. Load the pc-plan-propose skill to create the OpenSpec change.\n7. Confirm with the user.\n```\n\n### Phase 2, Implement & Ship\n\n```\n1. Load the pc-plan-apply skill to implement via parallel subagent waves.\n2. Create PR via repo platform CLI (gh pr create, az repos pr create, or glab mr create).\n3. Archive change after PR is merged.\n```",
50
+ "skillsGuide": "### Backlog Platform: Others (Browser)\n- `pc-userstory` -> navigates to work item URLs via browser plugin, reads page content, creates OpenSpec changes. Load when a URL the user provides does not match GitHub/Azure/Jira CLI platforms.\n\n### Repo Platform\n- PR skills are loaded based on `platform.repo` (GitHub / Azure DevOps / GitLab)."
51
+ }
52
+ }
53
+ }
@@ -0,0 +1,22 @@
1
+ {
2
+ "installer": {
3
+ "command": "npx",
4
+ "args": ["@different-ai/opencode-browser@4.6.1", "install"]
5
+ },
6
+ "output": {
7
+ "showAfter": "To load the extension",
8
+ "hideAfter": "Press Enter when"
9
+ },
10
+ "locationChoices": {
11
+ "local": "2",
12
+ "global": "1"
13
+ },
14
+ "autoAnswers": [
15
+ { "trigger": "Press Enter when", "response": "" },
16
+ { "trigger": "Choose config location", "response": "__LOCATION__" },
17
+ { "trigger": "Add plugin automatically?", "response": "y" },
18
+ { "trigger": "Create one?", "response": "y" },
19
+ { "trigger": "Add browser-automation skill", "response": "n" },
20
+ { "trigger": "Check broker", "response": "n" }
21
+ ]
22
+ }
@@ -0,0 +1,21 @@
1
+ {
2
+ "preserve": ["DESIGN.md", "ARCHITECTURE.md", "openspec"],
3
+ "detectFiles": [
4
+ "AGENTS.md",
5
+ "CLAUDE.md",
6
+ "ARCHITECTURE.md",
7
+ "DESIGN.md",
8
+ ".cursorrules",
9
+ ".clinerules",
10
+ ".windsurfrules",
11
+ ".github/copilot-instructions.md",
12
+ "copilot-instructions.md",
13
+ ".aider.conf.yml",
14
+ ".aider",
15
+ ".opencode",
16
+ ".agents"
17
+ ],
18
+ "directoryTargets": [".opencode", ".agents"],
19
+ "preserveSubfolders": ["skills"],
20
+ "selectionMessage": "Select AI config files to remove:"
21
+ }
@@ -0,0 +1,68 @@
1
+ {
2
+ "costTiers": [
3
+ { "max": 1, "label": "[$]" },
4
+ { "max": 10, "label": "[$$]" },
5
+ { "label": "[$$$]" }
6
+ ],
7
+ "providers": [
8
+ { "value": "opencode", "name": "OpenCode Zen" },
9
+ { "value": "opencode-go", "name": "OpenCode Go" },
10
+ { "value": "github-copilot", "name": "GitHub Copilot" },
11
+ { "value": "anthropic", "name": "Anthropic" },
12
+ { "value": "google", "name": "Google" },
13
+ { "value": "openai", "name": "OpenAI" },
14
+ { "value": "deepseek", "name": "DeepSeek" },
15
+ { "value": "", "name": "Other (show all)" }
16
+ ],
17
+ "roles": {
18
+ "plan": {
19
+ "prompt": "Plan model:",
20
+ "info": [
21
+ "PLAN: main session: reads issues, writes proposals, coordinates the agent team.",
22
+ "Needs to be strong. A weak model here will silently skip steps and break the workflow."
23
+ ],
24
+ "suggestions": {
25
+ "opencode": "opencode/claude-sonnet-4",
26
+ "opencode-go": null,
27
+ "github-copilot": "github-copilot/claude-sonnet-4.5",
28
+ "anthropic": "anthropic/claude-sonnet-4-5",
29
+ "google": "google/gemini-2.5-pro",
30
+ "openai": "openai/o3",
31
+ "deepseek": null
32
+ }
33
+ },
34
+ "build": {
35
+ "prompt": "Build model:",
36
+ "info": [
37
+ "BUILD: engineers: implements code, runs tests, commits.",
38
+ "Code quality matters here. DeepSeek V4 is outstanding value. Claude Sonnet is the gold standard."
39
+ ],
40
+ "suggestions": {
41
+ "opencode": "opencode/deepseek-v4-flash",
42
+ "opencode-go": "opencode-go/deepseek-v4-pro",
43
+ "github-copilot": "github-copilot/claude-sonnet-4.5",
44
+ "anthropic": "anthropic/claude-sonnet-4-5",
45
+ "google": "google/gemini-2.5-flash",
46
+ "openai": "openai/gpt-4.1",
47
+ "deepseek": "deepseek/deepseek-v4-pro"
48
+ },
49
+ "agents": ["fullstack-engineer"]
50
+ },
51
+ "fast": {
52
+ "prompt": "Fast model:",
53
+ "info": [
54
+ "FAST: light commands: /pc-pullrequest, /pc-explore, /pc-archive, status checks.",
55
+ "No heavy reasoning needed. Cheap and fast is the right call here."
56
+ ],
57
+ "suggestions": {
58
+ "opencode": "opencode/glm-4.7",
59
+ "opencode-go": "opencode-go/qwen3.6-plus",
60
+ "github-copilot": "github-copilot/gpt-5.4-nano",
61
+ "anthropic": "anthropic/claude-haiku-4-5",
62
+ "google": "google/gemini-2.0-flash",
63
+ "openai": "openai/gpt-4o-mini",
64
+ "deepseek": null
65
+ }
66
+ }
67
+ }
68
+ }
@@ -0,0 +1 @@
1
+ {}
@@ -0,0 +1,37 @@
1
+ {
2
+ "message": "Enable tools:",
3
+ "info": "Choose which optimization tools to enable (recommended: all).",
4
+ "timeoutMs": 30000,
5
+ "choices": [
6
+ {
7
+ "name": "RTK check (recommended)",
8
+ "value": "rtk",
9
+ "checked": true
10
+ },
11
+ {
12
+ "name": "opencode-quota plugin (recommended)",
13
+ "value": "quota",
14
+ "checked": true
15
+ },
16
+ {
17
+ "name": "Simple English concise mode (recommended)",
18
+ "value": "simpleEnglish",
19
+ "checked": true
20
+ },
21
+ {
22
+ "name": "codegraph semantic index (recommended)",
23
+ "value": "codegraph",
24
+ "checked": true
25
+ },
26
+ {
27
+ "name": "agentmemory local memory server",
28
+ "value": "memory",
29
+ "checked": true
30
+ },
31
+ {
32
+ "name": "humanizer skill (removes AI writing patterns)",
33
+ "value": "humanizer",
34
+ "checked": true
35
+ }
36
+ ]
37
+ }
@@ -0,0 +1,76 @@
1
+ [
2
+ {
3
+ "value": "github",
4
+ "name": "GitHub",
5
+ "cli": {
6
+ "command": "gh",
7
+ "displayName": "GitHub CLI (gh)",
8
+ "installUrl": "https://cli.github.com",
9
+ "authCheck": {
10
+ "args": ["auth", "status"],
11
+ "notAuthenticatedMessage": "GitHub CLI not authenticated. Run:",
12
+ "commands": ["gh auth login"]
13
+ }
14
+ }
15
+ },
16
+ {
17
+ "value": "azure",
18
+ "name": "Azure DevOps",
19
+ "cli": {
20
+ "command": "az",
21
+ "displayName": "Azure CLI (az)",
22
+ "installUrl": "https://learn.microsoft.com/en-us/cli/azure/install-azure-cli",
23
+ "extensionCheck": {
24
+ "args": ["extension", "list", "--query", "[?name=='azure-devops']", "-o", "tsv"],
25
+ "expectedOutput": "azure-devops",
26
+ "missingMessage": "azure-devops extension not found. Run:",
27
+ "errorMessage": "Could not check azure-devops extension. Run:",
28
+ "commands": [
29
+ "az extension add --name azure-devops",
30
+ "az config set extension.dynamic_install_allow_preview=true",
31
+ "az login",
32
+ "az devops login --organization https://dev.azure.com/<your-org>"
33
+ ]
34
+ }
35
+ }
36
+ },
37
+ {
38
+ "value": "jira",
39
+ "name": "Jira (Atlassian)",
40
+ "backlogOnly": true,
41
+ "cli": {
42
+ "command": "acli",
43
+ "displayName": "Atlassian CLI (acli)",
44
+ "installUrl": "https://developer.atlassian.com/cloud/acli/guides/install-acli/",
45
+ "authCheck": {
46
+ "args": ["jira", "auth", "status"],
47
+ "notAuthenticatedMessage": "Atlassian CLI not authenticated. Run:",
48
+ "commands": ["acli jira auth login --site <yoursite>.atlassian.net --email <email> --token"]
49
+ }
50
+ }
51
+ },
52
+ {
53
+ "value": "gitlab",
54
+ "name": "GitLab",
55
+ "repoOnly": true,
56
+ "cli": {
57
+ "command": "glab",
58
+ "displayName": "GitLab CLI (glab)",
59
+ "installUrl": "https://gitlab.com/gitlab-org/cli/#installation",
60
+ "authCheck": {
61
+ "args": ["auth", "status"],
62
+ "notAuthenticatedMessage": "GitLab CLI not authenticated. Run:",
63
+ "commands": ["glab auth login"]
64
+ }
65
+ }
66
+ },
67
+ {
68
+ "value": "browser",
69
+ "name": "Others (Browser)",
70
+ "backlogOnly": true
71
+ },
72
+ {
73
+ "value": "none",
74
+ "name": "None"
75
+ }
76
+ ]
@@ -0,0 +1,16 @@
1
+ {
2
+ "plugin": "@slkiser/opencode-quota@4.2.0",
3
+ "prompt": {
4
+ "message": "Install opencode-quota with recommended defaults?",
5
+ "default": true,
6
+ "timeoutMs": 20000
7
+ },
8
+ "defaults": {
9
+ "enabledProviders": "auto",
10
+ "formatStyle": "singleWindow",
11
+ "percentDisplayMode": "used",
12
+ "showSessionTokens": true,
13
+ "enableToast": false,
14
+ "tuiCommandDisplay": "inline"
15
+ }
16
+ }
@@ -0,0 +1,23 @@
1
+ {
2
+ "message": "Source code location:",
3
+ "default": "current",
4
+ "choices": [
5
+ {
6
+ "name": "Current folder (default)",
7
+ "value": "current",
8
+ "description": "Use this repository only"
9
+ },
10
+ {
11
+ "name": "Select folders in parent (../)",
12
+ "value": "parent",
13
+ "description": "Use when this repo only contains agent config"
14
+ },
15
+ {
16
+ "name": "Select child folders (./*/)",
17
+ "value": "children",
18
+ "description": "Use when source code lives in subdirectories of this repo"
19
+ }
20
+ ],
21
+ "parentSelectionMessage": "Select source folders from parent directory:",
22
+ "childrenSelectionMessage": "Select child folders to include as source:"
23
+ }
@@ -0,0 +1,91 @@
1
+ import { execa } from 'execa'
2
+ import fse from 'fs-extra'
3
+ import { code, header, info, success, warn, error } from '../../utils/exec.js'
4
+ import os from 'os'
5
+ import path from 'path'
6
+ import { fileURLToPath } from 'url'
7
+
8
+ const __dirname = path.dirname(fileURLToPath(import.meta.url))
9
+ const BROWSER_PRESET_PATH = path.resolve(__dirname, '../../presets/browser.json')
10
+ const browserPreset = await fse.readJson(BROWSER_PRESET_PATH)
11
+
12
+ export async function installBrowser(ctx = {}) {
13
+ header('Step 9, Installing opencode-browser')
14
+
15
+ const installScope = ctx.installScope || 'local'
16
+ const locationAnswer = browserPreset.locationChoices?.[installScope] ?? browserPreset.locationChoices?.local ?? '2'
17
+
18
+ const pendingTriggers = browserPreset.autoAnswers.map(a => ({
19
+ ...a,
20
+ response: a.response === '__LOCATION__' ? locationAnswer : a.response,
21
+ }))
22
+
23
+ let extensionPathShown = false
24
+
25
+ try {
26
+ const child = execa(browserPreset.installer.command, browserPreset.installer.args, {
27
+ cwd: os.homedir(),
28
+ stdio: ['pipe', 'pipe', 'pipe'],
29
+ reject: false,
30
+ })
31
+
32
+ let show = false
33
+ const triggers = [...pendingTriggers]
34
+
35
+ child.stdout.on('data', (chunk) => {
36
+ const text = chunk.toString()
37
+
38
+ if (text.includes(browserPreset.output.showAfter)) show = true
39
+ if (text.includes(browserPreset.output.hideAfter)) show = false
40
+
41
+ if (show) process.stdout.write(chunk)
42
+
43
+ // Detect the extension path from the installer output to show it clearly
44
+ if (!extensionPathShown) {
45
+ const pathMatch = text.match(/(C:\\[^\s]+(?:extension|opencode-browser[^\s]*))/i) ||
46
+ text.match(/((?:\/|~)[^\s]*(?:extension|opencode-browser[^\s]*))/i)
47
+ if (pathMatch) {
48
+ extensionPathShown = true
49
+ }
50
+ }
51
+
52
+ for (let i = 0; i < triggers.length; i++) {
53
+ if (text.includes(triggers[i].trigger)) {
54
+ // When the installer asks to press Enter after loading the extension,
55
+ // show the manual steps clearly before auto-answering
56
+ if (triggers[i].trigger === browserPreset.output.hideAfter) {
57
+ info('')
58
+ warn('Manual step required: load the browser extension before pressing Enter')
59
+ code([
60
+ '1. Open chrome://extensions',
61
+ '2. Enable Developer mode (top-right toggle)',
62
+ '3. Click "Load unpacked"',
63
+ '4. Select the extension folder shown above',
64
+ '5. Pin the extension: open the Extensions menu (puzzle icon) and click the pin',
65
+ ])
66
+ info('Auto-confirming in 5 seconds...')
67
+ }
68
+
69
+ child.stdin.write(`${triggers[i].response}\n`)
70
+ triggers.splice(i, 1)
71
+ break
72
+ }
73
+ }
74
+ })
75
+
76
+ child.stderr.on('data', (chunk) => process.stderr.write(chunk))
77
+
78
+ const result = await child
79
+
80
+ if (result.exitCode === 0) {
81
+ success('opencode-browser installed')
82
+ if (extensionPathShown) {
83
+ info('If you skipped loading the extension, run: npx @different-ai/opencode-browser@4.6.1 install')
84
+ }
85
+ } else {
86
+ warn('opencode-browser install exited with non-zero code')
87
+ }
88
+ } catch (err) {
89
+ error(`Failed to install opencode-browser: ${err.message}`)
90
+ }
91
+ }
@@ -0,0 +1,120 @@
1
+ import { checkbox } from '@inquirer/prompts'
2
+ import fse from 'fs-extra'
3
+ import path from 'path'
4
+ import { fileURLToPath } from 'url'
5
+ import { findAiFiles } from '../../utils/copy.js'
6
+ import { header, info, success, warn } from '../../utils/exec.js'
7
+ import { MARKERS } from '../../utils/terminal.js'
8
+
9
+ const __dirname = path.dirname(fileURLToPath(import.meta.url))
10
+ const CLEAN_PRESET_PATH = path.resolve(__dirname, '../../presets/clean.json')
11
+ const cleanPreset = await fse.readJson(CLEAN_PRESET_PATH)
12
+
13
+ async function childrenExcludingPreserved(dir) {
14
+ const results = []
15
+ if (!await fse.pathExists(dir)) return results
16
+ const entries = await fse.readdir(dir)
17
+ for (const entry of entries) {
18
+ if (cleanPreset.preserveSubfolders.includes(entry)) continue
19
+ results.push(path.join(dir, entry))
20
+ }
21
+ return results
22
+ }
23
+
24
+ async function isPopulated(filePath) {
25
+ if (!await fse.pathExists(filePath)) return false
26
+ const content = await fse.readFile(filePath, 'utf-8')
27
+ const trimmed = content.trim()
28
+ if (!trimmed) return false
29
+ if (trimmed.startsWith('<!-- onboard-prompt')) return false
30
+ return true
31
+ }
32
+
33
+ async function hasOpenspecHistory(cwd) {
34
+ const changesDir = path.join(cwd, 'openspec', 'changes')
35
+ const archiveDir = path.join(cwd, 'openspec', 'archive')
36
+ if (await fse.pathExists(changesDir)) {
37
+ const entries = await fse.readdir(changesDir)
38
+ if (entries.length > 0) return true
39
+ }
40
+ if (await fse.pathExists(archiveDir)) {
41
+ const entries = await fse.readdir(archiveDir)
42
+ if (entries.length > 0) return true
43
+ }
44
+ return false
45
+ }
46
+
47
+ export async function cleanAiFiles({ removeLegacyConfig = false } = {}) {
48
+ header('Step 2, Existing AI config files')
49
+
50
+ const cwd = process.cwd()
51
+ const ctx = {
52
+ hasDesign: await isPopulated(path.join(cwd, 'DESIGN.md')),
53
+ hasArchitecture: await isPopulated(path.join(cwd, 'ARCHITECTURE.md')),
54
+ hasOpenspec: await hasOpenspecHistory(cwd),
55
+ }
56
+
57
+ if (ctx.hasDesign) info('DESIGN.md exists and is populated, keeping it')
58
+ if (ctx.hasArchitecture) info('ARCHITECTURE.md exists and is populated, keeping it')
59
+ if (ctx.hasOpenspec) info('openspec/ history exists, keeping it')
60
+
61
+ const legacyConfig = path.join(cwd, '.opencode', 'opencode.json')
62
+ if (removeLegacyConfig && await fse.pathExists(legacyConfig)) {
63
+ await fse.remove(legacyConfig)
64
+ info('Removed legacy .opencode/opencode.json')
65
+ }
66
+
67
+ const flatFiles = await findAiFiles(cwd, cleanPreset.detectFiles)
68
+ const dirTargets = cleanPreset.directoryTargets
69
+ const dirEntries = []
70
+ for (const dirName of dirTargets) {
71
+ const dirPath = path.join(cwd, dirName)
72
+ const children = await childrenExcludingPreserved(dirPath)
73
+ if (children.length > 0) {
74
+ dirEntries.push(...children)
75
+ } else if (await fse.pathExists(dirPath)) {
76
+ // Directory exists but all children are preserved (e.g. only skills/):
77
+ // still offer the directory itself as a removable option.
78
+ dirEntries.push(dirPath)
79
+ }
80
+ }
81
+
82
+ const filteredFlat = flatFiles.filter(f => {
83
+ const rel = path.relative(cwd, f)
84
+ if (dirTargets.includes(rel)) return false
85
+ if (cleanPreset.preserve.some(p => rel === p || rel.startsWith(p + path.sep))) return false
86
+ return true
87
+ })
88
+
89
+ const allToRemove = [...filteredFlat, ...dirEntries]
90
+
91
+ if (allToRemove.length === 0) {
92
+ success('No existing AI config files to remove')
93
+ return ctx
94
+ }
95
+
96
+ const choices = allToRemove.map(f => ({
97
+ name: path.relative(cwd, f).replace(/\\/g, '/'),
98
+ value: f,
99
+ checked: true,
100
+ }))
101
+
102
+ const selected = await checkbox({
103
+ message: cleanPreset.selectionMessage,
104
+ choices,
105
+ })
106
+
107
+ if (!selected || selected.length === 0) {
108
+ success('No AI config files selected for removal')
109
+ return ctx
110
+ }
111
+
112
+ warn('Removing selected AI config files:')
113
+ for (const f of selected) {
114
+ info(`${MARKERS.EMPTY}${f.replace(cwd + path.sep, '')}`)
115
+ await fse.remove(f)
116
+ }
117
+ success('Removed existing AI config files')
118
+
119
+ return ctx
120
+ }