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,154 @@
1
+ ---
2
+ description: Query the reviews database for analytics and insights
3
+ argument-hint: "<query>"
4
+ ---
5
+
6
+ ## Raw Arguments
7
+
8
+ ```text
9
+ $ARGUMENTS
10
+ ```
11
+
12
+ # Review Database Query Command
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
+ Query the reviews database for analytics and insights about PR review history.
21
+
22
+ ## Prerequisites Check (MANDATORY)
23
+
24
+ ### Step 0: Check uv
25
+
26
+ ```bash
27
+ uv --version
28
+ ```
29
+
30
+ If not found, install from <https://docs.astral.sh/uv/getting-started/installation/>
31
+
32
+ ### Step 1: Check myk-pi-tools
33
+
34
+ ```bash
35
+ myk-pi-tools --version
36
+ ```
37
+
38
+ If not found, prompt to install: `uv tool install myk-pi-tools`
39
+
40
+ ## Usage
41
+
42
+ ```bash
43
+ /query-db stats --by-source # Stats by source
44
+ /query-db stats --by-reviewer # Stats by reviewer
45
+ /query-db patterns --min 2 # Find duplicate patterns
46
+ /query-db dismissed --owner X --repo Y
47
+ /query-db query "SELECT * FROM comments WHERE status='skipped' LIMIT 10"
48
+ /query-db find-similar < comments.json # Find similar dismissed comments
49
+ ```
50
+
51
+ ## Available Queries
52
+
53
+ ### Stats by Source
54
+
55
+ Show addressed rate by source (human vs AI reviewers):
56
+
57
+ ```bash
58
+ myk-pi-tools db stats --by-source
59
+ ```
60
+
61
+ ### Stats by Reviewer
62
+
63
+ Show statistics by individual reviewer:
64
+
65
+ ```bash
66
+ myk-pi-tools db stats --by-reviewer
67
+ ```
68
+
69
+ ### Duplicate Patterns
70
+
71
+ Find recurring dismissed suggestions:
72
+
73
+ ```bash
74
+ myk-pi-tools db patterns --min 2
75
+ ```
76
+
77
+ ### Dismissed Comments
78
+
79
+ Get all dismissed comments for a specific repo:
80
+
81
+ ```bash
82
+ myk-pi-tools db dismissed --owner <owner> --repo <repo>
83
+ ```
84
+
85
+ ### Custom Query
86
+
87
+ Run a custom SELECT query:
88
+
89
+ ```bash
90
+ myk-pi-tools db query "SELECT * FROM comments WHERE status = 'skipped' ORDER BY id DESC LIMIT 10"
91
+ ```
92
+
93
+ ### Find Similar Comments
94
+
95
+ Find comments similar to previously dismissed ones. Accepts JSON input via stdin:
96
+
97
+ ```bash
98
+ echo '[{"body": "Consider adding error handling", "path": "src/main.py"}]' | myk-pi-tools db find-similar
99
+ ```
100
+
101
+ Input format: JSON array of objects with `body` (required) and optionally `path` fields.
102
+
103
+ Returns matches with similarity scores to help identify recurring patterns that were previously dismissed.
104
+
105
+ ## Database Schema
106
+
107
+ **reviews table:**
108
+
109
+ | Column | Type |
110
+ |--------|------|
111
+ | id | INTEGER PRIMARY KEY |
112
+ | pr_number | INTEGER |
113
+ | owner | TEXT |
114
+ | repo | TEXT |
115
+ | commit_sha | TEXT |
116
+ | created_at | TEXT (ISO 8601) |
117
+
118
+ **comments table:**
119
+
120
+ | Column | Type |
121
+ |--------|------|
122
+ | id | INTEGER PRIMARY KEY |
123
+ | review_id | INTEGER (FK -> reviews.id) |
124
+ | source | TEXT (human/qodo/coderabbit) |
125
+ | thread_id | TEXT |
126
+ | node_id | TEXT |
127
+ | comment_id | INTEGER |
128
+ | author | TEXT |
129
+ | path | TEXT |
130
+ | line | INTEGER |
131
+ | body | TEXT |
132
+ | priority | TEXT (HIGH/MEDIUM/LOW) |
133
+ | status | TEXT (pending/addressed/skipped/not_addressed) |
134
+ | reply | TEXT |
135
+ | skip_reason | TEXT |
136
+ | posted_at | TEXT (ISO 8601) |
137
+ | resolved_at | TEXT (ISO 8601) |
138
+
139
+ ## Database Location and Constraints
140
+
141
+ The reviews database is located at `<project-root>/.claude/data/reviews.db`.
142
+
143
+ **Query Constraints:**
144
+
145
+ - Only SELECT statements and CTEs (Common Table Expressions) are allowed
146
+ - INSERT, UPDATE, DELETE, DROP, and other modifying statements are blocked
147
+ - This ensures the database remains read-only for analytics queries
148
+
149
+ ## Workflow
150
+
151
+ 1. Parse the raw arguments above to determine which query to run
152
+ 2. Execute the appropriate myk-pi-tools db command
153
+ 3. Present results in a clear, formatted way
154
+ 4. For natural language questions, compose the appropriate query
@@ -0,0 +1,208 @@
1
+ ---
2
+ description: Refine pending PR review comments with AI before submitting
3
+ argument-hint: "[instructions]"
4
+ ---
5
+
6
+ ## Raw Arguments
7
+
8
+ ```text
9
+ $ARGUMENTS
10
+ ```
11
+
12
+ # Refine Pending Review Command
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
+ Refines the user's pending GitHub PR review comments using AI before submitting. The user starts a review on GitHub, adds comments, then calls this command to polish and submit.
21
+
22
+ ## Prerequisites Check (MANDATORY)
23
+
24
+ ### Step 0: Check uv
25
+
26
+ ```bash
27
+ uv --version
28
+ ```
29
+
30
+ If not found, install from <https://docs.astral.sh/uv/getting-started/installation/>
31
+
32
+ ### Step 1: Check myk-pi-tools
33
+
34
+ ```bash
35
+ myk-pi-tools --version
36
+ ```
37
+
38
+ If not found, prompt user: "myk-pi-tools is required. Install with: `uv tool install myk-pi-tools`. Install now?"
39
+
40
+ ## Usage
41
+
42
+ - `/refine-review https://github.com/owner/repo/pull/123`
43
+
44
+ ## Workflow
45
+
46
+ **`PROJECT_TMP_DIR`** is the project-scoped temp directory from `getProjectTmpDir(cwd)` — all temp files go here.
47
+
48
+ ### Phase 1: Fetch Pending Review
49
+
50
+ Parse the raw arguments above as the PR URL. If empty, abort with: "PR URL required. Usage: `/refine-review https://github.com/owner/repo/pull/123`"
51
+
52
+ ```bash
53
+ myk-pi-tools reviews pending-fetch --output-dir ${PROJECT_TMP_DIR} "<PR_URL>"
54
+ ```
55
+
56
+ The command saves the review data to a JSON file and outputs the file path to stdout.
57
+
58
+ The JSON file contains:
59
+
60
+ - `metadata`: owner, repo, pr_number, review_id, username, author, json_path
61
+ - `comments`: array of pending review comments with id, path, line, body, diff_hunk
62
+ - `diff`: PR diff text for context
63
+
64
+ If the command fails (exit code 1), display the error and abort.
65
+
66
+ Capture the output (json_path) for later phases.
67
+
68
+ ### Phase 2: Refine Comments
69
+
70
+ For each comment in the JSON, use the PR diff context, file path, line number, and diff hunk to generate a refined version.
71
+
72
+ **Refinement goals:**
73
+
74
+ - Improve clarity and conciseness
75
+ - Make comments more actionable (suggest specific fixes when possible)
76
+ - Fix grammar and formatting
77
+ - Add code suggestions in Markdown code blocks where appropriate
78
+ - Preserve the original intent and technical accuracy
79
+ - Keep the tone professional and constructive
80
+
81
+ ### Phase 3: Present Side-by-Side
82
+
83
+ Display each comment with its refinement, numbered for reference. If a comment has no line number (file-level comment), show only the path:
84
+
85
+ ```text
86
+ Comment #1 (path/to/file.py:42):
87
+ Original: <user's original comment>
88
+ Refined: <AI-refined version>
89
+
90
+ Comment #2 (src/main.py):
91
+ Original: <file-level comment>
92
+ Refined: <AI-refined version>
93
+ ```
94
+
95
+ ### Phase 4: User Approval
96
+
97
+ Ask the user which refinements to accept using AskUserQuestion:
98
+
99
+ Options:
100
+
101
+ - **Accept all** - Use all refined versions
102
+ - **Pick specific** - Enter comment numbers to accept (e.g., "1,3,5")
103
+ - **Keep originals** - Skip refinement, go straight to submit step
104
+ - **Cancel** - Abort without making any changes
105
+ - **Custom text** - Type a custom replacement for specific comments (e.g., "2: my custom comment text")
106
+
107
+ If "Pick specific": ask user to enter comma-separated numbers. Validate that numbers are within range (1 to N). Ignore duplicates. Re-prompt on invalid input.
108
+
109
+ If "Custom text": user provides comment number followed by their custom text. The custom text replaces the refined version for that comment.
110
+
111
+ After applying custom text, re-display the affected comment(s) showing the custom text for user confirmation before proceeding to Phase 5.
112
+
113
+ ### Phase 5: Update JSON
114
+
115
+ Update the JSON file at `json_path`:
116
+
117
+ - For each accepted refinement: set `refined_body` to the refined text and `status` to `"accepted"`
118
+ - For comments kept as original: leave `refined_body` as null and `status` as `"pending"`
119
+
120
+ **Important:** Only modify `refined_body` and `status` fields on each comment. Do NOT modify the `diff`, `metadata`, or other fields — metadata is updated separately in Phase 6.
121
+
122
+ ### Phase 6: Submit Decision
123
+
124
+ Ask the user using AskUserQuestion:
125
+
126
+ > Submit the review with **Request Changes**? (yes/no)
127
+
128
+ Options:
129
+
130
+ - **Yes** - Submit with Request Changes
131
+ - **No** - Keep the review pending (comments are already updated)
132
+
133
+ If user chooses "Yes", ask a follow-up: "Add a review summary? (leave empty to skip)"
134
+
135
+ Update the JSON metadata:
136
+
137
+ - If submitting: set `submit_action` to `REQUEST_CHANGES` and `submit_summary` to the summary text (or empty string)
138
+ - If keeping pending: do not set `submit_action`
139
+
140
+ ### Phase 7: Execute Updates
141
+
142
+ If user chose to submit (Phase 6), run with `--submit` flag:
143
+
144
+ ```bash
145
+ myk-pi-tools reviews pending-update "<json_path>" --submit
146
+ ```
147
+
148
+ If user chose "No", run without `--submit`:
149
+
150
+ ```bash
151
+ myk-pi-tools reviews pending-update "<json_path>"
152
+ ```
153
+
154
+ This updates accepted comment bodies on GitHub and submits the review when `--submit` is provided.
155
+
156
+ If the command fails, display the error. If it reports a 404, inform the user their pending review may have been submitted or deleted externally.
157
+
158
+ ### Phase 7b: Store Posted Comments (MANDATORY)
159
+
160
+ After submitting the review (Phase 7), store the comments in the PR review database
161
+ for future `/pr-review` cycle tracking:
162
+
163
+ 1. Write a JSON file with the submitted comments:
164
+
165
+ ```bash
166
+ cat > ${PROJECT_TMP_DIR}/pr-review-store.json << 'EOF'
167
+ {
168
+ "metadata": {"owner": "{owner}", "repo": "{repo}", "pr_number": {pr_number}, "head_sha": "{head_sha}", "author": "{author}"},
169
+ "comments": [
170
+ {
171
+ "thread_id": null,
172
+ "comment_id": null,
173
+ "path": "file.py",
174
+ "line": 42,
175
+ "body": "Comment body as posted (refined or original)",
176
+ "severity": null,
177
+ "posted_at": "<ISO timestamp>"
178
+ }
179
+ ]
180
+ }
181
+ EOF
182
+ ```
183
+
184
+ 1. Store to database:
185
+
186
+ ```bash
187
+ myk-pi-tools pr store-pr-review ${PROJECT_TMP_DIR}/pr-review-store.json
188
+ ```
189
+
190
+ **This step is MANDATORY — never skip it.** Only store if the review was actually
191
+ submitted (user chose "Yes" in Phase 6). Skip if review was kept pending.
192
+
193
+ ### Phase 8: Summary
194
+
195
+ Display:
196
+
197
+ - Number of comments refined vs kept as original
198
+ - Review action taken (submitted as Request Changes, or kept pending)
199
+ - PR URL for reference
200
+
201
+ ---
202
+
203
+ **CRITICAL RULES:**
204
+
205
+ - NEVER update comments or submit the review without explicit user confirmation
206
+ - Always show what will change before changing it
207
+ - The user controls which refinements are accepted
208
+ - If an API call fails with 404/422, the pending review may have been externally submitted or deleted - inform the user
@@ -0,0 +1,235 @@
1
+ ---
2
+ description: Create a GitHub release with automatic changelog generation
3
+ argument-hint: "[version]"
4
+ ---
5
+
6
+ ## Raw Arguments
7
+
8
+ ```text
9
+ $ARGUMENTS
10
+ ```
11
+
12
+ # GitHub Release Command
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
+ Creates a GitHub release with automatic changelog generation based on conventional commits.
21
+ Optionally detects and updates version files before creating the release.
22
+
23
+ ## Prerequisites Check (MANDATORY)
24
+
25
+ ### Step 1: Check myk-pi-tools
26
+
27
+ ```bash
28
+ myk-pi-tools --version
29
+ ```
30
+
31
+ If not found, prompt to install: `uv tool install myk-pi-tools`
32
+
33
+ ## Usage
34
+
35
+ - `/release` - Normal release (auto-detect version bump)
36
+ - `/release 1.17.1` - Release with explicit version (skip approval)
37
+ - `/release --dry-run` - Preview without creating
38
+ - `/release --prerelease` - Create prerelease
39
+ - `/release --draft` - Create draft release
40
+
41
+ ## Workflow
42
+
43
+ **`PROJECT_TMP_DIR`** is the project-scoped temp directory from `getProjectTmpDir(cwd)` — all temp files go here.
44
+
45
+ ### Phase 1: Validation
46
+
47
+ If `--target <branch>` was passed to the release command:
48
+
49
+ ```bash
50
+ myk-pi-tools release info --target <branch>
51
+ ```
52
+
53
+ If `--tag-match <pattern>` was also passed:
54
+
55
+ ```bash
56
+ myk-pi-tools release info --target <branch> --tag-match <pattern>
57
+ ```
58
+
59
+ Otherwise (auto-detect from current branch):
60
+
61
+ ```bash
62
+ myk-pi-tools release info
63
+ ```
64
+
65
+ Note: If on a version branch (e.g., `v2.10`), the command auto-detects the target
66
+ and filters tags to that version range. No `--target` flag needed.
67
+
68
+ Check validations:
69
+
70
+ - Must be on default branch (or target branch if `--target` specified, or auto-detected version branch like `v2.10`)
71
+ - Working tree must be clean
72
+ - Must be synced with remote
73
+
74
+ ### Phase 2: Version Detection
75
+
76
+ ```bash
77
+ myk-pi-tools release detect-versions
78
+ ```
79
+
80
+ Parse the JSON output. If version files are found, store them for Phase 4.
81
+ If no version files are detected, skip version bumping phases and continue normally.
82
+
83
+ Store the detect-versions JSON output for use in Phase 4. The key fields are:
84
+
85
+ - `version_files[].path` -- file path relative to repo root
86
+ - `version_files[].current_version` -- current version string
87
+ - `count` -- number of detected files (0 means skip version bumping)
88
+
89
+ ### Phase 3: Changelog Analysis & Version
90
+
91
+ **Group commits by PR number first, then categorize.**
92
+
93
+ 1. Extract the PR number from each commit — check ALL of these locations:
94
+ - Subject suffix: `(#NNN)`
95
+ - Merge commit subject: `Merge pull request #NNN`
96
+ - Commit body: `(#NNN)` pattern (parenthesized only — bare `#NNN` may be an issue reference, not a PR)
97
+ 2. Group all commits that share the same PR number
98
+ 3. For each PR group, create ONE changelog entry — use the commit with the
99
+ highest-priority type (`feat:` > `fix:` > `refactor:` > `docs:` > `chore:`)
100
+ as the changelog entry. If multiple commits share the same type, use the one
101
+ with the most descriptive subject. Do NOT use fix-up commits as the entry.
102
+ 4. Internal fix-up commits within the same PR (e.g., `fix: address review findings (#472)`,
103
+ `fix: review cycle 2 (#472)`) are NOT separate entries — they are implementation
104
+ iterations within the parent PR
105
+ 5. Only commits WITHOUT a PR reference anywhere (subject or body) get their own entries
106
+
107
+ Categorize each PR entry by the highest-priority commit type in its group:
108
+
109
+ - Breaking Changes → MAJOR
110
+ - Features (`feat:`) → MINOR
111
+ - Bug Fixes (`fix:`), Docs (`docs:`), Maintenance (`chore:`, `refactor:`, `test:`, `ci:`) → PATCH
112
+
113
+ If a PR group contains both `feat:` and `fix:` commits, categorize as `feat:` (highest priority wins).
114
+
115
+ **Changelog formatting rules (MANDATORY):**
116
+
117
+ 1. **Use standardized emoji section headers:**
118
+ - `### ⚠️ Breaking Changes`
119
+ - `### ✨ Features`
120
+ - `### 🐛 Bug Fixes`
121
+ - `### 🏗️ Architecture`
122
+ - `### 📚 Documentation`
123
+ - `### 🔧 Maintenance`
124
+
125
+ 2. **Always use PR/issue references, never commit hashes:**
126
+ - ✅ `- **Feature name** — description (#42)`
127
+ - ❌ `- Feature name (c958777)`
128
+ - Extract PR number from merge commit messages or commit body
129
+ - Only fall back to commit hash if absolutely no PR/issue reference exists
130
+
131
+ 3. **Each entry needs a bold title + description:**
132
+ - ✅ `- **Date range filter** — Filter dashboard by date range with URL persistence (#141)`
133
+ - ❌ `- add date range filter to dashboard (#141)`
134
+
135
+ 4. **Semver enforcement:** If ANY `feat:` commit is present, version bump MUST be MINOR minimum, never PATCH.
136
+
137
+ 5. **Always append a compare link at the bottom:**
138
+
139
+ ```text
140
+ **Full Changelog**: https://github.com/{owner}/{repo}/compare/{last_tag}...{new_tag}
141
+ ```
142
+
143
+ Generate changelog from the categorized commits following these rules.
144
+
145
+ **Version determination:**
146
+
147
+ 1. If the raw arguments contain an explicit version (e.g., `1.17.1`, `2.0.0`), use it directly.
148
+ Skip Phase 4 (User Approval) entirely — the user already told you the version.
149
+ 2. Otherwise, determine the version bump type from the commit categories and propose a version.
150
+
151
+ ### Phase 4: User Approval
152
+
153
+ **Skip this phase entirely if an explicit version was provided in the raw arguments.**
154
+
155
+ Display the proposed release information. If version files were detected in Phase 2,
156
+ include them in the approval prompt.
157
+
158
+ **With version files:**
159
+
160
+ 1. **Display the changelog as regular text first** (NOT inside ask_user):
161
+ - Proposed version and bump type
162
+ - Version files to update (numbered list with current → new version)
163
+ - Full changelog preview
164
+
165
+ 2. **Then call ask_user with a SHORT question only:**
166
+ - Question: `Release vX.Y.Z?` (one line — no changelog, no file list)
167
+ - Options: `yes`, `major`, `minor`, `patch`, `exclude 1`, `exclude 2`, ..., `no`
168
+
169
+ **IMPORTANT:** The ask_user question MUST be short (one line). All detailed
170
+ information (changelog, file list) goes in the text BEFORE the ask_user call.
171
+ The user reads the details in the chat, then sees a clean prompt to confirm.
172
+
173
+ To exclude files, remove them from the list. Pass remaining file paths as
174
+ `--files <path>` arguments to `bump-version` in Phase 5.
175
+
176
+ **Without version files:**
177
+
178
+ Same pattern -- display changelog as text, then short ask_user question.
179
+
180
+ ### Phase 5: Bump Version (if version files detected)
181
+
182
+ Skip this phase if no version files were detected in Phase 2.
183
+
184
+ Run the bump command with the confirmed version and files:
185
+
186
+ ```bash
187
+ myk-pi-tools release bump-version <VERSION> --files <file1> --files <file2>
188
+ ```
189
+
190
+ Where `<VERSION>` is the version number without `v` prefix (e.g., `1.2.0`, not `v1.2.0`).
191
+
192
+ Parse the JSON output from bump-version. Only stage the files listed in the
193
+ `updated[]` array. If `skipped[]` is non-empty, inform the user which files were
194
+ skipped and why before proceeding.
195
+
196
+ **Delegate git and GitHub operations to specialist agents:**
197
+
198
+ 1. **Delegate to `git-expert`:** Create branch, stage files, sync lockfile, commit, push:
199
+ - Create branch: `chore/bump-version-<VERSION>-$(date +%s)` from current HEAD
200
+ - Stage the updated version files
201
+ - If `uv.lock` exists: run `uv lock` then stage `uv.lock`
202
+ - Commit with message: `chore: bump version to <VERSION>`
203
+ - Push the branch
204
+ - **Important:** The branch creation and commit MUST be in separate bash calls
205
+ (enforcement checks branch before execution)
206
+
207
+ 2. **Delegate to `github-expert`:** Create PR and merge:
208
+ - Create PR: title `chore: bump version to <VERSION>`, base `<target_branch>`
209
+ - Merge with `--merge --admin --delete-branch`
210
+ - If admin merge fails (permission denied): ask user to merge manually,
211
+ wait for confirmation, verify PR state is MERGED
212
+ - If other errors: abort the release
213
+
214
+ 3. **Delegate to `git-expert`:** Sync local target branch:
215
+ - Checkout `<target_branch>` and pull from origin
216
+
217
+ ### Phase 6: Create Release
218
+
219
+ Create a temp file with cleanup, write changelog to it, and create release:
220
+
221
+ ```bash
222
+ CHANGELOG_FILE=$(mktemp ${PROJECT_TMP_DIR}/release-XXXXXX.md)
223
+ trap "rm -f $CHANGELOG_FILE" EXIT
224
+
225
+ cat > "$CHANGELOG_FILE" << 'EOF'
226
+ <changelog content from Phase 3>
227
+ EOF
228
+
229
+ myk-pi-tools release create {owner}/{repo} {tag} "$CHANGELOG_FILE" [--prerelease] [--draft] [--target {target_branch}]
230
+ ```
231
+
232
+ ### Phase 7: Summary
233
+
234
+ Display release URL and summary.
235
+ If version files were bumped, include the list of updated files in the summary.
@@ -0,0 +1,33 @@
1
+ ---
2
+ description: "Save a memory for future sessions — /remember <what to remember>"
3
+ argument-hint: "<what to remember>"
4
+ ---
5
+
6
+ > **Bug Reporting Policy:** If you encounter ANY error, unexpected behavior,
7
+ > or reproducible bug while executing this command — DO NOT work around it
8
+ > silently. Ask the user: "Should I create a GitHub issue for this?"
9
+ > Route to `myk-org/pi-config` for prompt/extension issues,
10
+ > or to the relevant tool's repository for CLI issues.
11
+
12
+ ## What to remember
13
+
14
+ ```text
15
+ $ARGUMENTS
16
+ ```
17
+
18
+ Save this as a **Pinned** project memory. Determine the best category:
19
+
20
+ - `lesson` — something learned (how things work, gotchas, tips)
21
+ - `decision` — an architectural or design choice made
22
+ - `mistake` — something that went wrong and should be avoided
23
+ - `pattern` — a recurring approach or convention
24
+ - `done` — a completed task or milestone
25
+ - `preference` — user preference for how things should be done
26
+
27
+ Run:
28
+
29
+ ```bash
30
+ uv run myk-pi-tools memory add -c <category> -s "<concise one-line summary>" --pinned
31
+ ```
32
+
33
+ After saving, confirm what was stored.
@@ -0,0 +1,27 @@
1
+ ---
2
+ description: "Show live status of running review-handler agents — /review-handler-status"
3
+ ---
4
+
5
+ ## Raw Arguments
6
+
7
+ $ARGUMENTS
8
+
9
+ ## Review Handler Status
10
+
11
+ > **Bug Reporting Policy:** If you encounter ANY error, unexpected behavior, or reproducible bug
12
+ > while executing this command — DO NOT work around it silently. Ask the user:
13
+ > "Should I create a GitHub issue for this?" Route to `myk-org/pi-config` for prompt/extension issues,
14
+ > or to the relevant tool's repository for CLI issues.
15
+
16
+ Show the live state of running autoqodo/autorabbit review-handler agents.
17
+
18
+ ### Steps
19
+
20
+ 1. Run `/async-status`. Look for agents whose task contains `reviews poll`.
21
+ If none found → "No review handler agents running — nothing to show."
22
+
23
+ 2. For each running review agent, extract the PR number from the agent's task or worktree cwd.
24
+ Run `myk-pi-tools reviews status --output-dir ${PROJECT_TMP_DIR} --pr <number>` to generate the HTML report.
25
+ Extract the path from `HTML report saved: <path>` in the output.
26
+ - **Container** (`/.dockerenv` or `/run/.containerenv` exists): serve via file preview rule (`rules/45-file-preview.md`)
27
+ - **Native**: show `file://<path>`