pi-orchestrator-config 4.1.5

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 (175) hide show
  1. package/README.md +808 -0
  2. package/agents/api-documenter.md +32 -0
  3. package/agents/bash-expert.md +53 -0
  4. package/agents/code-reviewer-docs.md +145 -0
  5. package/agents/code-reviewer-guidelines.md +97 -0
  6. package/agents/code-reviewer-quality.md +142 -0
  7. package/agents/code-reviewer-security.md +107 -0
  8. package/agents/code-reviewer-spec.md +164 -0
  9. package/agents/debugger.md +63 -0
  10. package/agents/docker-expert.md +40 -0
  11. package/agents/docs-fetcher.md +48 -0
  12. package/agents/git-expert.md +63 -0
  13. package/agents/github-expert.md +83 -0
  14. package/agents/go-expert.md +62 -0
  15. package/agents/issue-reviewer-feasibility.md +60 -0
  16. package/agents/issue-reviewer-scope.md +63 -0
  17. package/agents/issue-reviewer-spec.md +77 -0
  18. package/agents/java-expert.md +31 -0
  19. package/agents/jenkins-expert.md +38 -0
  20. package/agents/kubernetes-expert.md +40 -0
  21. package/agents/planner.md +42 -0
  22. package/agents/python-expert.md +61 -0
  23. package/agents/reviewer.md +26 -0
  24. package/agents/scout.md +40 -0
  25. package/agents/security-auditor.md +254 -0
  26. package/agents/technical-documentation-writer.md +37 -0
  27. package/agents/test-automator.md +55 -0
  28. package/agents/test-runner.md +47 -0
  29. package/agents/ts-expert.md +23 -0
  30. package/agents/worker.md +30 -0
  31. package/extensions/acpx-provider/index.ts +104 -0
  32. package/extensions/acpx-provider/load-runtime.ts +99 -0
  33. package/extensions/acpx-provider/runtime-models.ts +40 -0
  34. package/extensions/cli-provider/agents/claude.ts +128 -0
  35. package/extensions/cli-provider/agents/cursor.ts +84 -0
  36. package/extensions/cli-provider/agents/gemini.ts +100 -0
  37. package/extensions/cli-provider/discover.ts +77 -0
  38. package/extensions/cli-provider/index.ts +57 -0
  39. package/extensions/cli-provider/parsers.ts +304 -0
  40. package/extensions/cli-provider/providers.ts +58 -0
  41. package/extensions/cli-provider/runner.ts +225 -0
  42. package/extensions/cli-provider/runtime-models.ts +32 -0
  43. package/extensions/cli-provider/session-reaper.ts +122 -0
  44. package/extensions/cli-provider/sessions.ts +533 -0
  45. package/extensions/cli-provider/shared/discover-cache.ts +235 -0
  46. package/extensions/cli-provider/types.ts +48 -0
  47. package/extensions/coms/coms-net-server.ts +1642 -0
  48. package/extensions/coms/coms-net-wrapper.ts +521 -0
  49. package/extensions/coms/coms-net.ts +1589 -0
  50. package/extensions/coms/coms-p2p.ts +1879 -0
  51. package/extensions/coms/coms-shared.ts +510 -0
  52. package/extensions/coms/coms-wrapper.ts +138 -0
  53. package/extensions/coms/index.ts +20 -0
  54. package/extensions/coms/themeMap.ts +147 -0
  55. package/extensions/image-gen/image-gen.ts +332 -0
  56. package/extensions/image-gen/index.ts +14 -0
  57. package/extensions/orchestrator/agents.ts +134 -0
  58. package/extensions/orchestrator/ask-user.ts +293 -0
  59. package/extensions/orchestrator/async-agents.ts +1037 -0
  60. package/extensions/orchestrator/async-capability.ts +129 -0
  61. package/extensions/orchestrator/async-runner.ts +324 -0
  62. package/extensions/orchestrator/async-status-parse.ts +31 -0
  63. package/extensions/orchestrator/async-status-ui.ts +201 -0
  64. package/extensions/orchestrator/async-wait.ts +36 -0
  65. package/extensions/orchestrator/btw.ts +210 -0
  66. package/extensions/orchestrator/cron-status-format.ts +126 -0
  67. package/extensions/orchestrator/cron-status-ui.ts +132 -0
  68. package/extensions/orchestrator/cron.ts +730 -0
  69. package/extensions/orchestrator/dreaming.ts +355 -0
  70. package/extensions/orchestrator/enforcement-helpers.ts +530 -0
  71. package/extensions/orchestrator/enforcement-rules.ts +329 -0
  72. package/extensions/orchestrator/enforcement.ts +828 -0
  73. package/extensions/orchestrator/extended-autocomplete.ts +593 -0
  74. package/extensions/orchestrator/git-helpers.ts +420 -0
  75. package/extensions/orchestrator/github-autocomplete.ts +250 -0
  76. package/extensions/orchestrator/icons.ts +17 -0
  77. package/extensions/orchestrator/index.ts +100 -0
  78. package/extensions/orchestrator/memory-embeddings.ts +281 -0
  79. package/extensions/orchestrator/memory-promotion.ts +449 -0
  80. package/extensions/orchestrator/memory-provenance.ts +80 -0
  81. package/extensions/orchestrator/memory-query-class.ts +90 -0
  82. package/extensions/orchestrator/memory-scoring.ts +434 -0
  83. package/extensions/orchestrator/memory-tools.ts +883 -0
  84. package/extensions/orchestrator/memory-tree.ts +212 -0
  85. package/extensions/orchestrator/nvim.ts +169 -0
  86. package/extensions/orchestrator/overlay-dashboard-utils.ts +25 -0
  87. package/extensions/orchestrator/overlay-dashboard.ts +512 -0
  88. package/extensions/orchestrator/pi-config-review-state.ts +303 -0
  89. package/extensions/orchestrator/preference-extractor.ts +106 -0
  90. package/extensions/orchestrator/project-settings.ts +468 -0
  91. package/extensions/orchestrator/promotion-queue.ts +311 -0
  92. package/extensions/orchestrator/resolve-agent-model.ts +32 -0
  93. package/extensions/orchestrator/review-ui.ts +204 -0
  94. package/extensions/orchestrator/rule-placeholders.ts +12 -0
  95. package/extensions/orchestrator/rules.ts +481 -0
  96. package/extensions/orchestrator/session-search.ts +243 -0
  97. package/extensions/orchestrator/session-validation.ts +374 -0
  98. package/extensions/orchestrator/situation-report.ts +370 -0
  99. package/extensions/orchestrator/status-bar.ts +31 -0
  100. package/extensions/orchestrator/status-line.ts +192 -0
  101. package/extensions/orchestrator/status.ts +110 -0
  102. package/extensions/orchestrator/subagent-tool.ts +1748 -0
  103. package/extensions/orchestrator/task-lifecycle.ts +88 -0
  104. package/extensions/orchestrator/utils.ts +227 -0
  105. package/extensions/pidash/index.ts +15 -0
  106. package/extensions/pidash/pidash.ts +941 -0
  107. package/extensions/pidiff/index.ts +13 -0
  108. package/extensions/pidiff/pidiff.ts +369 -0
  109. package/extensions/providers/acpx-driver.ts +479 -0
  110. package/extensions/providers/built-in-drivers.ts +52 -0
  111. package/extensions/providers/claude-driver.ts +319 -0
  112. package/extensions/providers/cursor-acpx-driver.ts +398 -0
  113. package/extensions/providers/cursor-cli-driver.ts +484 -0
  114. package/extensions/providers/gemini-driver.ts +302 -0
  115. package/extensions/providers/index.ts +513 -0
  116. package/extensions/shared/build-system-prompt.ts +57 -0
  117. package/extensions/shared/create-runtime-provider.ts +190 -0
  118. package/extensions/shared/daemon-manager.ts +248 -0
  119. package/extensions/shared/file-logger.ts +115 -0
  120. package/extensions/shared/managed-refresh.ts +211 -0
  121. package/extensions/shared/provider-driver.ts +295 -0
  122. package/extensions/shared/provider-errors.ts +305 -0
  123. package/extensions/shared/provider-registry.ts +388 -0
  124. package/extensions/shared/stream-builder.ts +275 -0
  125. package/extensions/shared/types.ts +20 -0
  126. package/extensions/shared/ui/README.md +10 -0
  127. package/extensions/shared/ui/badge.tsx +52 -0
  128. package/extensions/shared/ui/button.tsx +58 -0
  129. package/extensions/shared/ui/collapsible.tsx +21 -0
  130. package/extensions/shared/ui/dropdown-menu.tsx +266 -0
  131. package/extensions/shared/ui/input.tsx +20 -0
  132. package/extensions/shared/ui/popover.tsx +114 -0
  133. package/extensions/shared/ui/resizable.tsx +48 -0
  134. package/extensions/shared/ui/scroll-area.tsx +53 -0
  135. package/extensions/shared/ui/select.tsx +201 -0
  136. package/extensions/shared/ui/separator.tsx +25 -0
  137. package/extensions/shared/ui/tooltip.tsx +64 -0
  138. package/extensions/shared/ws-client.ts +74 -0
  139. package/package.json +59 -0
  140. package/prompts/coderabbit-rate-limit.md +95 -0
  141. package/prompts/create-coms-feature-manager.md +186 -0
  142. package/prompts/create-skill.md +128 -0
  143. package/prompts/domain-model.md +109 -0
  144. package/prompts/external-ai.md +665 -0
  145. package/prompts/implement-and-review.md +25 -0
  146. package/prompts/implement.md +26 -0
  147. package/prompts/issue-review.md +256 -0
  148. package/prompts/pr-review.md +753 -0
  149. package/prompts/query-db.md +154 -0
  150. package/prompts/refine-review.md +208 -0
  151. package/prompts/release.md +235 -0
  152. package/prompts/remember.md +33 -0
  153. package/prompts/review-handler-status.md +27 -0
  154. package/prompts/review-handler.md +677 -0
  155. package/prompts/review-local.md +159 -0
  156. package/prompts/scout-and-plan.md +21 -0
  157. package/rules/00-orchestrator-core.md +42 -0
  158. package/rules/05-issue-first-workflow.md +119 -0
  159. package/rules/10-agent-routing.md +58 -0
  160. package/rules/15-mcp-launchpad.md +46 -0
  161. package/rules/20-code-review-loop.md +234 -0
  162. package/rules/25-documentation-updates.md +15 -0
  163. package/rules/30-prompt-templates.md +19 -0
  164. package/rules/35-memory.md +240 -0
  165. package/rules/40-critical-rules.md +124 -0
  166. package/rules/45-file-preview.md +29 -0
  167. package/rules/50-agent-bug-reporting.md +90 -0
  168. package/rules/55-coms-protocol.md +63 -0
  169. package/rules/60-task-tracking.md +66 -0
  170. package/skills/conflict-resolver/SKILL.md +213 -0
  171. package/skills/skill-creator/SKILL.md +85 -0
  172. package/skills/systematic-debugging/SKILL.md +353 -0
  173. package/skills/test-driven-development/SKILL.md +335 -0
  174. package/skills/update-agents-md/SKILL.md +282 -0
  175. package/templates/coms-feature-manager-prompt.md +313 -0
@@ -0,0 +1,26 @@
1
+ ---
2
+ description: "Scout → plan → implement a task — /implement <task>"
3
+ argument-hint: "<task>"
4
+ ---
5
+
6
+ ## Raw Arguments
7
+
8
+ ```text
9
+ $ARGUMENTS
10
+ ```
11
+
12
+ Use the subagent tool with a chain of 3 agents:
13
+
14
+ 1. **scout** — Explore the codebase to find all relevant code for the task described in the raw arguments above.
15
+ Return a compressed summary of file locations, key functions, and dependencies.
16
+
17
+ 2. **planner** — Based on {previous}, create a detailed implementation plan:
18
+ - Files to modify/create
19
+ - Step-by-step changes
20
+ - Edge cases to handle
21
+ - Testing approach
22
+
23
+ 3. **worker** — Based on {previous}, implement the plan:
24
+ - Make all code changes
25
+ - Follow project conventions
26
+ - Handle edge cases identified in the plan
@@ -0,0 +1,256 @@
1
+ ---
2
+ description: "Review a GitHub issue spec and fix it — /issue-review [issue number or URL]"
3
+ argument-hint: "[issue number or URL]"
4
+ ---
5
+
6
+ # GitHub Issue Review Command
7
+
8
+ ## Raw Arguments
9
+
10
+ ```text
11
+ $ARGUMENTS
12
+ ```
13
+
14
+ > **Bug Reporting Policy:** If you encounter ANY error, unexpected behavior, or reproducible bug
15
+ > while executing this command — DO NOT work around it silently. Ask the user:
16
+ > "Should I create a GitHub issue for this?" Route to:
17
+ > `myk-org/pi-config` for plugin/command spec or `myk-pi-tools` CLI issues.
18
+ > Do not silently skip steps or apply manual fixes that hide the root cause.
19
+
20
+ Reviews a GitHub issue for spec quality, feasibility, and scope — then edits the issue body to fix problems.
21
+
22
+ ## Usage
23
+
24
+ - `/issue-review` — review issue linked to current branch (auto-detect)
25
+ - `/issue-review 42` — review issue #42
26
+ - `/issue-review https://github.com/owner/repo/issues/42` — review from URL
27
+
28
+ ## Task Plan
29
+
30
+ Before starting any work, create ALL tasks upfront using `TaskCreate`, then set dependencies.
31
+
32
+ ### Task List
33
+
34
+ | Task | Title | blockedBy |
35
+ |------|-------|-----------|
36
+ | 1 | Issue detection | — |
37
+ | 2 | Context gathering | 1 |
38
+ | 3 | Duplicate scan | 1 |
39
+ | 4 | Review — Spec | 2 |
40
+ | 5 | Review — Feasibility | 2 |
41
+ | 6 | Review — Scope | 2, 3 |
42
+ | 7 | Merge findings | 4, 5, 6 |
43
+ | 8 | User selection | 7 |
44
+ | 9 | Apply fixes to issue body | 8 |
45
+ | 10 | Summary | 9 |
46
+
47
+ Create all 10 tasks, then set dependencies via `TaskUpdate` with `addBlockedBy`.
48
+
49
+ ## Workflow
50
+
51
+ **PROJECT_TMP_DIR** is the project-scoped temp directory from `getProjectTmpDir(cwd)`.
52
+
53
+ ### Phase 0: Issue Detection — Task 1
54
+
55
+ If the raw arguments are empty:
56
+
57
+ 1. Detect issue from current branch name (extract issue number from branch like `feat/issue-42-...`
58
+ or `fix/issue-42-...`).
59
+ 2. If no issue number in branch, try: `gh issue list --assignee @me --state open --limit 1 --json number --jq '.[0].number'`
60
+ 3. If still nothing, ask the user for an issue number.
61
+
62
+ If the raw arguments contain an issue number or URL:
63
+
64
+ 1. Parse the number (e.g., `42`) or extract from URL (e.g., `https://github.com/owner/repo/issues/42`). For URLs, also extract `OWNER_REPO` as `owner/repo`.
65
+
66
+ Resolve `OWNER_REPO`:
67
+
68
+ - URL argument → extract from the URL (`owner/repo`)
69
+ - Auto-detected / bare number → `gh repo view --json owner,name --jq '.owner.login + "/" + .name'`
70
+
71
+ Fetch issue metadata:
72
+
73
+ ```bash
74
+ gh issue view <ISSUE_NUMBER> --repo <OWNER_REPO> --json number,title,body,labels,assignees,state,comments,milestone,author --jq '.'
75
+ ```
76
+
77
+ Where `<OWNER_REPO>` is from `gh repo view --json owner,name` for auto-detected issues,
78
+ or extracted from the URL for URL-based arguments.
79
+
80
+ Store:
81
+
82
+ - `ISSUE_NUMBER` — the issue number
83
+ - `ISSUE_TITLE` — the issue title
84
+ - `ISSUE_BODY` — the full issue body (markdown)
85
+ - `ISSUE_LABELS` — labels array
86
+ - `ISSUE_ASSIGNEES` — assignees array
87
+ - `ISSUE_COMMENTS` — comments array
88
+ - `ISSUE_AUTHOR` — issue author login
89
+ - `OWNER_REPO` — `owner/repo` for all subsequent `gh issue` commands
90
+
91
+ ### Phase 1: Context Gathering — Task 2
92
+
93
+ Extract all file/function/class references from the issue body and comments:
94
+
95
+ 1. Scan the issue body for patterns like:
96
+ - File paths: `src/foo.ts`, `extensions/bar/baz.py`, backtick-wrapped paths
97
+ - Function/method references: `functionName()`, `Class.method()`
98
+ - Code blocks referencing specific files
99
+
100
+ 2. For each reference, verify it exists in the codebase:
101
+
102
+ ```bash
103
+ test -f <path> && echo "EXISTS" || echo "MISSING"
104
+ ```
105
+
106
+ For function references:
107
+
108
+ ```bash
109
+ rg "function <name>|def <name>|<name>\s*=" <likely_files> --count
110
+ ```
111
+
112
+ 3. Store results as `CODEBASE_REFS` — a list of `{ref, exists, location}` objects.
113
+
114
+ Write the issue body to a temp file for reviewer access using the `write` tool:
115
+
116
+ ```text
117
+ Use the write tool to create ${PROJECT_TMP_DIR}/issue-body.md with the ISSUE_BODY content
118
+ ```
119
+
120
+ ### Phase 2: Duplicate Scan — Task 3
121
+
122
+ Task 3 can run in parallel with Task 2.
123
+
124
+ Search for potential duplicate or overlapping issues:
125
+
126
+ ```bash
127
+ gh issue list --repo <OWNER_REPO> --state open --limit 50 --json number,title,body,labels
128
+ ```
129
+
130
+ Compare the current issue against all open issues:
131
+
132
+ - Title keyword similarity
133
+ - Body content overlap
134
+ - Same labels + similar description
135
+
136
+ Store results as `DUPLICATES` — a list of `{number, title, similarity_reason}`.
137
+ Only include issues with meaningful overlap, not just shared labels.
138
+
139
+ ### Phase 3: Review — Tasks 4, 5, 6
140
+
141
+ Spawn ALL 3 review agents as async subagents. Each reviewer gets the issue body
142
+ and relevant context.
143
+
144
+ **Important:** Pass `cwd` as the current project directory so reviewers can access the codebase.
145
+
146
+ ```text
147
+ subagent(tasks=[
148
+ {agent: "issue-reviewer-spec", task: "Review this GitHub issue for spec completeness.\n\nIssue #<ISSUE_NUMBER>: <ISSUE_TITLE>\n\n<issue-body>\n<ISSUE_BODY>\n</issue-body>\n\nLabels: <ISSUE_LABELS>\nAssignees: <ISSUE_ASSIGNEES>\n\nReturn findings as JSON.", cwd: "<project_dir>", name: "Issue Spec", taskId: "<task 4 ID>"},
149
+ {agent: "issue-reviewer-feasibility", task: "Review this GitHub issue for codebase feasibility.\n\nIssue #<ISSUE_NUMBER>: <ISSUE_TITLE>\n\n<issue-body>\n<ISSUE_BODY>\n</issue-body>\n\n<codebase-refs>\n<CODEBASE_REFS>\n</codebase-refs>\n\nVerify all file/function references and assess approach viability. Return findings as JSON.", cwd: "<project_dir>", name: "Issue Feasibility", taskId: "<task 5 ID>"},
150
+ {agent: "issue-reviewer-scope", task: "Review this GitHub issue for scope hygiene.\n\nIssue #<ISSUE_NUMBER>: <ISSUE_TITLE>\n\n<issue-body>\n<ISSUE_BODY>\n</issue-body>\n\n<duplicate-candidates>\n<DUPLICATES>\n</duplicate-candidates>\n\nCheck for single concern, scope creep, and duplicates. Return findings as JSON.", cwd: "<project_dir>", name: "Issue Scope", taskId: "<task 6 ID>"},
151
+ ])
152
+ ```
153
+
154
+ After spawning, end your turn. Results arrive automatically.
155
+
156
+ ### Phase 4: Merge Findings — Task 7
157
+
158
+ Merge and deduplicate findings from all 3 reviewers:
159
+
160
+ 1. Parse JSON findings from each reviewer
161
+ 2. Remove duplicates (same description targeting same issue section)
162
+ 3. Sort by severity: CRITICAL → WARNING → SUGGESTION
163
+ 4. For each finding, determine the fix action:
164
+ - **Add section** — missing `## Done`, missing reproduction steps, etc.
165
+ - **Rewrite section** — vague problem statement, unclear deliverables
166
+ - **Add metadata** — missing labels, assignee
167
+ - **Flag only** — scope concerns, duplicates (can't be auto-fixed in body)
168
+
169
+ ### Phase 5: User Selection — Task 8
170
+
171
+ Present ALL findings to the user in a table:
172
+
173
+ ```text
174
+ ## Issue Review Findings
175
+
176
+ | # | Severity | Category | Finding | Fix |
177
+ |---|----------|----------|---------|-----|
178
+ | 1 | CRITICAL | spec | Missing ## Done checklist | Add section |
179
+ | 2 | WARNING | feasibility | references src/auth.py which doesn't exist | Correct reference |
180
+ | 3 | WARNING | scope | Overlaps with #38 (similar auth refactor) | Flag only |
181
+ | 4 | SUGGESTION | spec | Bug report missing environment info | Add section |
182
+ ```
183
+
184
+ For each finding that has a fix (not "flag only"), show the proposed change
185
+ (what will be added/modified in the issue body).
186
+
187
+ Then ask the user:
188
+
189
+ ```text
190
+ Which fixes to apply? (e.g., 'all', 'none', '1,2,4', or specific numbers)
191
+ ```
192
+
193
+ Use `ask_user` for the selection.
194
+
195
+ ### Phase 6: Apply Fixes — Task 9
196
+
197
+ For each approved fix:
198
+
199
+ 1. Build the updated issue body by applying all selected changes to `ISSUE_BODY`
200
+ 2. Show the user the diff (original vs updated body) as a preview
201
+ 3. Ask for confirmation: "Apply these changes to issue #N?"
202
+ 4. If confirmed, update the issue:
203
+
204
+ ```bash
205
+ gh issue edit <ISSUE_NUMBER> --repo <OWNER_REPO> --body-file <temp_file_with_new_body>
206
+ ```
207
+
208
+ Write the new body to a temp file first to handle special characters:
209
+
210
+ ```text
211
+ Use the write tool to create ${PROJECT_TMP_DIR}/updated-issue-body.md with the new body content
212
+ ```
213
+
214
+ Then apply the update:
215
+
216
+ ```bash
217
+ gh issue edit <ISSUE_NUMBER> --repo <OWNER_REPO> --body-file ${PROJECT_TMP_DIR}/updated-issue-body.md
218
+ ```
219
+
220
+ If the user also approved label/assignee changes, construct the `gh issue edit` command
221
+ dynamically from the approved selections:
222
+
223
+ ```bash
224
+ gh issue edit <ISSUE_NUMBER> --repo <OWNER_REPO> [--add-label "<label>" ...] [--add-assignee "<user>" ...]
225
+ ```
226
+
227
+ Build the flags from the user's approved findings — only add labels/assignees that were
228
+ explicitly selected. Do not hardcode any specific labels or assignees.
229
+
230
+ ### Phase 7: Summary — Task 10
231
+
232
+ Display:
233
+
234
+ ```text
235
+ ## Issue Review Complete
236
+
237
+ Issue: #<NUMBER> — <TITLE>
238
+ URL: https://github.com/<OWNER_REPO>/issues/<NUMBER>
239
+
240
+ Applied: <N> fixes
241
+ Skipped: <N> findings
242
+ Flagged: <N> (manual action needed)
243
+
244
+ Changes:
245
+ - ✅ Added ## Done checklist (4 items)
246
+ - ✅ Corrected file reference (src/auth.py → src/auth/validate.ts)
247
+ - ⚠️ Flagged: overlaps with #38 — consider linking
248
+ ```
249
+
250
+ ### Cleanup
251
+
252
+ Delete all tasks created in this workflow:
253
+
254
+ ```text
255
+ For each task ID created in Phase 0, call TaskUpdate(taskId="<ID>", status="deleted").
256
+ ```