@mrciphersmith/keryx 0.2.72 → 0.2.73

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 (126) hide show
  1. package/dist/cli.js +352 -22
  2. package/package.json +2 -2
  3. package/src/gdskills/bundled/rules/core/gproject-contracts.mdc +1 -1
  4. package/src/gdskills/bundled/rules/core/jobs-documentation.mdc +1 -1
  5. package/src/gdskills/bundled/rules/core/subagent-context-construction.md +1 -1
  6. package/src/gdskills/bundled/skills/orchestration/code-verifier/SKILL.codex.md +326 -20
  7. package/src/gdskills/bundled/skills/orchestration/code-verifier/SKILL.cursor.md +320 -22
  8. package/src/gdskills/bundled/skills/orchestration/code-verifier/SKILL.opencode.md +326 -12
  9. package/src/gdskills/bundled/skills/orchestration/code-verifier/SKILL.zed.md +333 -9
  10. package/src/gdskills/bundled/skills/orchestration/context-collector/SKILL.codex.md +92 -4
  11. package/src/gdskills/bundled/skills/orchestration/context-collector/SKILL.cursor.md +92 -4
  12. package/src/gdskills/bundled/skills/orchestration/context-collector/SKILL.opencode.md +92 -4
  13. package/src/gdskills/bundled/skills/orchestration/context-collector/SKILL.zed.md +92 -4
  14. package/src/gdskills/bundled/skills/orchestration/context-collector/orchestrator-prompt.md +1 -1
  15. package/src/gdskills/bundled/skills/orchestration/feature-analyzer/SKILL.codex.md +154 -1098
  16. package/src/gdskills/bundled/skills/orchestration/feature-analyzer/SKILL.cursor.md +154 -1098
  17. package/src/gdskills/bundled/skills/orchestration/feature-analyzer/SKILL.opencode.md +154 -1098
  18. package/src/gdskills/bundled/skills/orchestration/feature-analyzer/SKILL.zed.md +154 -1098
  19. package/src/gdskills/bundled/skills/orchestration/feature-analyzer/orchestrator-prompt.md +1 -1
  20. package/src/gdskills/bundled/skills/orchestration/feature-dev/SKILL.codex.md +101 -41
  21. package/src/gdskills/bundled/skills/orchestration/feature-dev/SKILL.cursor.md +101 -41
  22. package/src/gdskills/bundled/skills/orchestration/issue-analyzer/SKILL.codex.md +115 -49
  23. package/src/gdskills/bundled/skills/orchestration/issue-analyzer/SKILL.cursor.md +115 -49
  24. package/src/gdskills/bundled/skills/orchestration/issue-analyzer/SKILL.opencode.md +115 -49
  25. package/src/gdskills/bundled/skills/orchestration/issue-analyzer/SKILL.zed.md +115 -49
  26. package/src/gdskills/bundled/skills/orchestration/issue-analyzer/orchestrator-prompt.md +1 -1
  27. package/src/gdskills/bundled/skills/orchestration/job-documenter/SKILL.codex.md +15 -6
  28. package/src/gdskills/bundled/skills/orchestration/job-documenter/SKILL.cursor.md +15 -6
  29. package/src/gdskills/bundled/skills/orchestration/job-documenter/SKILL.opencode.md +15 -6
  30. package/src/gdskills/bundled/skills/orchestration/job-documenter/SKILL.zed.md +15 -6
  31. package/src/gdskills/bundled/skills/orchestration/job-orchestrator/SKILL.codex.md +1 -1
  32. package/src/gdskills/bundled/skills/orchestration/job-orchestrator/SKILL.cursor.md +1 -1
  33. package/src/gdskills/bundled/skills/orchestration/job-orchestrator/SKILL.md +1 -1
  34. package/src/gdskills/bundled/skills/orchestration/job-orchestrator/SKILL.opencode.md +1 -1
  35. package/src/gdskills/bundled/skills/orchestration/job-orchestrator/SKILL.zed.md +1 -1
  36. package/src/gdskills/bundled/skills/orchestration/task-implementer/SKILL.codex.md +300 -55
  37. package/src/gdskills/bundled/skills/orchestration/task-implementer/SKILL.cursor.md +300 -55
  38. package/src/gdskills/bundled/skills/orchestration/task-implementer/SKILL.md +120 -37
  39. package/src/gdskills/bundled/skills/orchestration/task-implementer/SKILL.opencode.md +300 -55
  40. package/src/gdskills/bundled/skills/orchestration/task-implementer/SKILL.zed.md +300 -55
  41. package/src/gdskills/bundled/skills/orchestration/task-implementer/input-contract.schema.json +56 -14
  42. package/src/gdskills/bundled/skills/orchestration/task-implementer/orchestrator-prompt.md +50 -23
  43. package/src/gdskills/bundled/skills/orchestration/task-implementer/output-contract.schema.json +6 -2
  44. package/src/gdskills/bundled/skills/orchestration/task-implementer/task-request.template.md +18 -12
  45. package/src/gdskills/bundled/skills/planning/brainstorm/SKILL.codex.md +1 -1
  46. package/src/gdskills/bundled/skills/planning/brainstorm/SKILL.cursor.md +1 -1
  47. package/src/gdskills/bundled/skills/planning/consistency-checker/SKILL.codex.md +168 -9
  48. package/src/gdskills/bundled/skills/planning/consistency-checker/SKILL.cursor.md +168 -9
  49. package/src/gdskills/bundled/skills/planning/interview/SKILL.codex.md +7 -1
  50. package/src/gdskills/bundled/skills/planning/interview/SKILL.cursor.md +7 -1
  51. package/src/gdskills/bundled/skills/planning/interviewer/SKILL.codex.md +7 -1
  52. package/src/gdskills/bundled/skills/planning/interviewer/SKILL.cursor.md +7 -1
  53. package/src/gdskills/bundled/skills/planning/patterns-researcher/SKILL.codex.md +215 -9
  54. package/src/gdskills/bundled/skills/planning/patterns-researcher/SKILL.cursor.md +215 -9
  55. package/src/gdskills/bundled/skills/planning/planner/SKILL.codex.md +168 -9
  56. package/src/gdskills/bundled/skills/planning/planner/SKILL.cursor.md +168 -9
  57. package/src/gdskills/bundled/skills/planning/prd-creator/SKILL.codex.md +2 -2
  58. package/src/gdskills/bundled/skills/planning/prd-creator/SKILL.cursor.md +2 -2
  59. package/src/gdskills/bundled/skills/planning/prd-creator/SKILL.opencode.md +2 -2
  60. package/src/gdskills/bundled/skills/planning/prd-creator/SKILL.zed.md +2 -2
  61. package/src/gdskills/bundled/skills/planning/problem-definer/SKILL.codex.md +133 -9
  62. package/src/gdskills/bundled/skills/planning/problem-definer/SKILL.cursor.md +133 -9
  63. package/src/gdskills/bundled/skills/planning/project-discovery/SKILL.codex.md +145 -9
  64. package/src/gdskills/bundled/skills/planning/project-discovery/SKILL.cursor.md +145 -9
  65. package/src/gdskills/bundled/skills/planning/spec-writer/SKILL.codex.md +210 -9
  66. package/src/gdskills/bundled/skills/planning/spec-writer/SKILL.cursor.md +210 -9
  67. package/src/gdskills/bundled/skills/planning/stack-advisor/SKILL.codex.md +161 -9
  68. package/src/gdskills/bundled/skills/planning/stack-advisor/SKILL.cursor.md +161 -9
  69. package/src/gdskills/bundled/skills/platform/claude-md-management/SKILL.codex.md +1 -1
  70. package/src/gdskills/bundled/skills/platform/claude-md-management/SKILL.cursor.md +1 -1
  71. package/src/gdskills/bundled/skills/platform/hookify/SKILL.codex.md +1 -1
  72. package/src/gdskills/bundled/skills/platform/hookify/SKILL.cursor.md +1 -1
  73. package/src/gdskills/bundled/skills/quality/changelog/SKILL.codex.md +1 -1
  74. package/src/gdskills/bundled/skills/quality/changelog/SKILL.cursor.md +1 -1
  75. package/src/gdskills/bundled/skills/quality/commit/SKILL.codex.md +1 -1
  76. package/src/gdskills/bundled/skills/quality/commit/SKILL.cursor.md +1 -1
  77. package/src/gdskills/bundled/skills/quality/db-migrate/SKILL.codex.md +1 -1
  78. package/src/gdskills/bundled/skills/quality/db-migrate/SKILL.cursor.md +1 -1
  79. package/src/gdskills/bundled/skills/quality/dependency-update/SKILL.codex.md +1 -1
  80. package/src/gdskills/bundled/skills/quality/dependency-update/SKILL.cursor.md +1 -1
  81. package/src/gdskills/bundled/skills/quality/deploy/SKILL.codex.md +1 -1
  82. package/src/gdskills/bundled/skills/quality/deploy/SKILL.cursor.md +1 -1
  83. package/src/gdskills/bundled/skills/quality/perf-check/SKILL.codex.md +1 -1
  84. package/src/gdskills/bundled/skills/quality/perf-check/SKILL.cursor.md +1 -1
  85. package/src/gdskills/bundled/skills/quality/pr/SKILL.codex.md +1 -1
  86. package/src/gdskills/bundled/skills/quality/pr/SKILL.cursor.md +1 -1
  87. package/src/gdskills/bundled/skills/quality/pr-issue-documenter/SKILL.codex.md +15 -1
  88. package/src/gdskills/bundled/skills/quality/pr-issue-documenter/SKILL.cursor.md +248 -165
  89. package/src/gdskills/bundled/skills/quality/pr-issue-documenter/SKILL.opencode.md +15 -1
  90. package/src/gdskills/bundled/skills/quality/pr-issue-documenter/SKILL.zed.md +359 -19
  91. package/src/gdskills/bundled/skills/quality/push/SKILL.codex.md +1 -1
  92. package/src/gdskills/bundled/skills/quality/push/SKILL.cursor.md +1 -1
  93. package/src/gdskills/bundled/skills/quality/security-audit/SKILL.codex.md +1 -1
  94. package/src/gdskills/bundled/skills/quality/security-audit/SKILL.cursor.md +1 -1
  95. package/src/gdskills/bundled/skills/quality/test-gen/SKILL.codex.md +1 -1
  96. package/src/gdskills/bundled/skills/quality/test-gen/SKILL.cursor.md +1 -1
  97. package/src/gdskills/bundled/skills/quality/tests-creator/SKILL.codex.md +299 -24
  98. package/src/gdskills/bundled/skills/quality/tests-creator/SKILL.cursor.md +296 -31
  99. package/src/gdskills/bundled/skills/quality/tests-creator/SKILL.opencode.md +309 -18
  100. package/src/gdskills/bundled/skills/quality/tests-creator/SKILL.zed.md +312 -17
  101. package/src/gdskills/bundled/skills/review/code-ai-review/SKILL.codex.md +29 -30
  102. package/src/gdskills/bundled/skills/review/code-ai-review/SKILL.cursor.md +29 -30
  103. package/src/gdskills/bundled/skills/review/code-ai-review/SKILL.opencode.md +29 -30
  104. package/src/gdskills/bundled/skills/review/code-ai-review/SKILL.zed.md +29 -30
  105. package/src/gdskills/bundled/skills/review/code-learned-review/SKILL.codex.md +21 -30
  106. package/src/gdskills/bundled/skills/review/code-learned-review/SKILL.cursor.md +21 -30
  107. package/src/gdskills/bundled/skills/review/code-learned-review/SKILL.opencode.md +21 -30
  108. package/src/gdskills/bundled/skills/review/code-learned-review/SKILL.zed.md +21 -30
  109. package/src/gdskills/bundled/skills/review/code-mobx-store-review/SKILL.codex.md +19 -23
  110. package/src/gdskills/bundled/skills/review/code-mobx-store-review/SKILL.cursor.md +19 -23
  111. package/src/gdskills/bundled/skills/review/code-mobx-store-review/SKILL.opencode.md +19 -23
  112. package/src/gdskills/bundled/skills/review/code-mobx-store-review/SKILL.zed.md +19 -23
  113. package/src/gdskills/bundled/skills/review/code-style-review/SKILL.codex.md +17 -24
  114. package/src/gdskills/bundled/skills/review/code-style-review/SKILL.cursor.md +17 -24
  115. package/src/gdskills/bundled/skills/review/code-style-review/SKILL.opencode.md +17 -24
  116. package/src/gdskills/bundled/skills/review/code-style-review/SKILL.zed.md +17 -24
  117. package/src/gdskills/bundled/skills/review/review-orchestrator/SKILL.md +16 -3
  118. package/src/gdskills/bundled/skills/planning/brainstorm/SKILL.claude.md +0 -46
  119. package/src/gdskills/bundled/skills/planning/interviewer/SKILL.claude.md +0 -94
  120. package/src/gdskills/bundled/skills/quality/changelog/SKILL.claude.md +0 -45
  121. package/src/gdskills/bundled/skills/quality/db-migrate/SKILL.claude.md +0 -40
  122. package/src/gdskills/bundled/skills/quality/dependency-update/SKILL.claude.md +0 -45
  123. package/src/gdskills/bundled/skills/quality/deploy/SKILL.claude.md +0 -42
  124. package/src/gdskills/bundled/skills/quality/perf-check/SKILL.claude.md +0 -48
  125. package/src/gdskills/bundled/skills/quality/security-audit/SKILL.claude.md +0 -40
  126. package/src/gdskills/bundled/skills/quality/test-gen/SKILL.claude.md +0 -30
@@ -1,14 +1,14 @@
1
1
  ---
2
2
  name: pr-issue-documenter
3
- description: "Анализирует коммиты/diff PR и генерирует структурированные описания для PR и связанных GitHub issues. Создаёт sub-issues, проверяет противоречия с существующими описаниями, обновляет parent issues."
3
+ description: "Use when documenting PR changes, adding a PR description, creating a linked issue for a PR, or updating an existing issue body."
4
4
  triggers:
5
- - "Добавь описание к PR"
6
- - "Задокументируй PR"
7
- - "Опиши что сделано в PR"
8
- - "Создай тикет для PR"
9
- - "Обнови PR и тикет"
10
5
  - "Add PR description"
11
6
  - "Document PR changes"
7
+ - "Describe what was done in PR"
8
+ - "Create issue for PR"
9
+ - "Update PR and issue"
10
+ - "Add description to PR"
11
+ - "Write PR summary"
12
12
  metadata:
13
13
  author: "MrCipherSmith"
14
14
  version: "1.0.0"
@@ -19,219 +19,258 @@ license: "MIT"
19
19
 
20
20
  # PR & Issue Documenter
21
21
 
22
- ## Назначение
22
+ ## Purpose
23
23
 
24
- Анализирует коммиты и diff PR для генерации структурированных, точных описаний GitHub PR и связанных issues. Полный цикл: описание PR, создание sub-issues, обновление parent issues, проверка противоречий с существующими описаниями.
24
+ Analyzes PR commits and diffs to generate structured, accurate descriptions for GitHub PRs and linked issues. Handles the full lifecycle: PR description, sub-issue creation, parent issue updates, and contradiction detection with existing descriptions.
25
25
 
26
- **Вход**: URL PR, URL issue, и/или SHA коммитов
27
- **Выход**: Обновлённое тело PR, созданный/обновлённый issue, ссылка в parent issue
26
+ **Input**: PR URL, issue URL, and/or commit SHAs
27
+ **Output**: Updated PR body, created/updated issue body, parent issue link
28
28
 
29
- ## Когда использовать
29
+ ## When to Use
30
30
 
31
- - Пользователь даёт ссылку на PR и просит описание
32
- - Пользователь хочет задокументировать изменения в PR
33
- - Пользователь хочет создать issue для PR
34
- - Пользователь хочет обновить существующий issue данными PR
35
- - Пользователь даёт SHA коммитов и хочет документацию
31
+ - User provides PR link and asks for a description
32
+ - User asks to document changes in a PR
33
+ - User wants to create an issue for a PR
34
+ - User wants to update an existing issue with PR changes
35
+ - User provides commit SHAs and wants documentation
36
+
37
+ ## Architecture
38
+
39
+ ```
40
+ Step 1: Parse Input
41
+ |
42
+ Step 2: Collect Context (commits, diff, existing descriptions)
43
+ |
44
+ Step 3: Analyze Changes (categorize, group, identify patterns)
45
+ |
46
+ Step 4: Generate PR Description
47
+ |
48
+ Step 5: Handle Issue (create / update / skip)
49
+ |
50
+ Step 6: Apply Changes (gh pr edit, gh issue edit/create)
51
+ |
52
+ Step 7: Verify & Report
53
+ ```
36
54
 
37
55
  ## Workflow
38
56
 
39
- Скопируй чеклист и отслеживай прогресс:
57
+ Copy this checklist and track progress:
40
58
 
41
59
  ```
42
- Прогресс:
43
- - [ ] Шаг 1: Разобрать входные данные — PR URL, issue URL, SHA коммитов
44
- - [ ] Шаг 2: Собрать контекст — коммиты, diff, существующие описания
45
- - [ ] Шаг 3: Анализ изменений — категоризация, группировка, таблица файлов
46
- - [ ] Шаг 4: Генерация описания PR
47
- - [ ] Шаг 5: Обработка issue — создать, обновить, или пропустить
48
- - [ ] Шаг 6: Применить изменения через gh CLI
49
- - [ ] Шаг 7: Верификация и отчёт
60
+ Task Progress:
61
+ - [ ] Step 1: Parse input — extract PR URL, issue URL, commit SHAs
62
+ - [ ] Step 2: Collect context — fetch commits, diff, existing descriptions
63
+ - [ ] Step 3: Analyze changes — categorize, group, build key files table
64
+ - [ ] Step 4: Generate PR description
65
+ - [ ] Step 5: Handle issue — create, update, or skip
66
+ - [ ] Step 6: Apply changes via gh CLI
67
+ - [ ] Step 7: Verify and report results to user
50
68
  ```
51
69
 
52
- ### Шаг 1: Разбор входных данных
70
+ ### Step 1: Parse Input
53
71
 
54
- Извлечь из сообщения пользователя:
55
- - **PR URL**: `https://github.com/owner/repo/pull/123` или `#123`
56
- - **Issue URL**: `https://github.com/owner/repo/issues/456` или `#456`
57
- - **Commit SHA**: полные или короткие хэши
72
+ Extract from user message:
73
+ - **PR URL**: `https://github.com/owner/repo/pull/123` or `#123`
74
+ - **Issue URL**: `https://github.com/owner/repo/issues/456` or `#456`
75
+ - **Commit SHAs**: full or short SHA hashes
58
76
 
59
- **Дерево решений:**
77
+ **Decision tree:**
60
78
 
61
79
  ```
62
- ЕСЛИ PR URL указан:
63
- → Продолжить к Шагу 2
80
+ IF PR URL provided:
81
+ → Continue to Step 2
64
82
 
65
- ЕСЛИ только SHA коммитов (без PR):
66
- → СПРОСИТЬ: "Нужно ли также создать/обновить issue, или только проанализировать коммиты?"
83
+ IF only commit SHAs provided (no PR):
84
+ → ASK user: "Should I also create/update an issue, or just analyze the commits?"
85
+ → If user provides issue link → continue with both
86
+ → If user says skip → analyze commits only and present summary
67
87
 
68
- ЕСЛИ только issue URL (без PR):
69
- → СПРОСИТЬ: "Укажите URL PR или SHA коммитов для анализа изменений"
88
+ IF only issue URL provided (no PR):
89
+ → ASK user: "Please provide a PR URL or commit SHAs to analyze changes"
70
90
 
71
- ЕСЛИ ничего не указано:
72
- → СПРОСИТЬ: "Укажите URL PR, URL issue, или SHA коммитов"
91
+ IF nothing provided:
92
+ → ASK user: "Please provide a PR URL, issue URL, or commit SHAs"
73
93
  ```
74
94
 
75
- ### Шаг 2: Сбор контекста
95
+ ### Step 2: Collect Context
76
96
 
77
- **Для PR:**
97
+ Gather all necessary data:
98
+
99
+ **For PR:**
78
100
  ```bash
79
101
  gh pr view {number} --json title,body,state,baseRefName,headRefName,commits
80
102
  gh pr diff {number}
81
103
  ```
82
104
 
83
- **Для конкретных коммитов:**
105
+ **For specific commits:**
84
106
  ```bash
85
- git show {sha} --stat
86
- git show {sha} --format=""
87
- git log {sha} -1 --format="%H %s%n%b"
107
+ git show {sha} --stat # files changed
108
+ git show {sha} --format="" # full diff
109
+ git log {sha} -1 --format="%H %s%n%b" # commit message
88
110
  ```
89
111
 
90
- **Для существующего issue:**
112
+ **For existing issue (if provided):**
91
113
  ```bash
92
114
  gh issue view {number} --json title,body,state
93
115
  ```
94
116
 
95
- **Поиск parent issue:**
96
- - Проверить тело PR на `Closes #N`, `Fixes #N`, `Parent issue: #N`
97
- - Проверить тело issue на `Parent issue: #N`
98
- - Если найден parent → загрузить его тело тоже
117
+ **For parent issue detection:**
118
+ - Check PR body for `Closes #N`, `Fixes #N`, `Parent issue: #N`
119
+ - Check issue body for `Parent issue: #N`
120
+ - If parent issue found, fetch its body too:
121
+ ```bash
122
+ gh issue view {parent_number} --json title,body
123
+ ```
124
+
125
+ ### Step 3: Analyze Changes
99
126
 
100
- ### Шаг 3: Анализ изменений
127
+ Systematically analyze the collected diffs:
101
128
 
102
- **3.1. Категоризация:**
103
- - `refactor` — реструктуризация без изменения поведения
104
- - `feature` — новая функциональность
105
- - `bugfix` — исправление бага
106
- - `cleanup` — удаление мёртвого кода, неиспользуемых импортов
107
- - `i18n` — переводы, локализация
108
- - `test` — тесты
109
- - `style` — форматирование, именование, порядок импортов
129
+ **3.1. Categorize each change:**
130
+ - `refactor` — restructuring without behavior change
131
+ - `feature` — new functionality
132
+ - `bugfix` — fixing broken behavior
133
+ - `cleanup` — removing dead code, unused imports
134
+ - `i18n` — translations, localization
135
+ - `test` — test additions/modifications
136
+ - `docs` — documentation changes
137
+ - `style` — formatting, naming, import ordering
110
138
 
111
- **3.2. Группировка по логическим областям:**
112
- - Объединить связанные изменения из разных файлов
113
- - Каждая секция должна иметь ясную цель
139
+ **3.2. Group by logical area:**
140
+ - Identify related changes across files
141
+ - Group into named sections (e.g., "StepStore — Input/Output Consolidation")
142
+ - Each section should have a clear purpose statement
114
143
 
115
- **3.3. Ключевые паттерны:**
116
- - Удалённые файлы (выделить жирным)
117
- - Переименованные поля/методы (before → after)
118
- - Новые API/интерфейсы
119
- - Временные/захардкоженные значения (отметить для follow-up)
144
+ **3.3. Identify key patterns:**
145
+ - Deleted files (important to highlight)
146
+ - Renamed fields/methods (before → after)
147
+ - New APIs/interfaces
148
+ - Breaking changes
149
+ - Temporary/hardcoded values (mark for follow-up)
120
150
 
121
- **3.4. Таблица ключевых файлов:**
151
+ **3.4. Build Key Files table:**
122
152
 
123
153
  | File | Change |
124
154
  |------|--------|
125
- | `path/to/file.ts` | Краткое описание |
155
+ | `path/to/file.ts` | Brief description |
126
156
  | `path/to/deleted.ts` | **Deleted** |
127
157
 
128
- ### Шаг 4: Генерация описания PR
158
+ ### Step 4: Generate PR Description
129
159
 
130
- Структура:
160
+ Use this structure:
131
161
 
132
162
  ```markdown
133
163
  ## Summary
134
164
 
135
- [2-3 предложения: ЧТО сделано, ЗАЧЕМ. Фокус на цели, а не на отдельных изменениях.]
165
+ [2-3 sentences: WHAT was done, WHY it was done. Focus on the purpose, not individual changes.]
136
166
 
137
167
  Closes #N
138
168
 
139
169
  ## Changes
140
170
 
141
- ### [Название секции 1]
142
- - Пункт с конкретным изменением
143
- - Используй `форматирование кода` для идентификаторов
171
+ ### [Section Name 1]
172
+ - Bullet point describing specific change
173
+ - Another bullet point
174
+ - Use `code formatting` for identifiers
144
175
 
145
- ### [Название секции 2]
176
+ ### [Section Name 2]
146
177
  ...
147
178
 
179
+ ### Other
180
+ - Minor changes that don't warrant their own section
181
+
148
182
  ## Key Files
149
183
 
150
184
  | File | Change |
151
185
  |------|--------|
152
- | `path/file.ts` | Краткое описание |
186
+ | `path/file.ts` | Brief description |
153
187
  ```
154
188
 
155
- **Правила:**
156
- - Summary: кратко, 2-3 предложения максимум
157
- - Changes: группировка по логике, не по файлам
158
- - Бэктики для кодовых идентификаторов
159
- - **Deleted** жирным для удалённых файлов
160
- - `Closes #N` если issue привязан
161
- - Описание всегда на **английском** (код-документация)
189
+ **PR description rules:**
190
+ - Summary: concise, 2-3 sentences max
191
+ - Changes: grouped by logical area, not by file
192
+ - Use backticks for code identifiers (`ClassName`, `methodName`, `fileName.ts`)
193
+ - Highlight deleted files with **Deleted** in bold
194
+ - Include `Closes #N` if issue is linked
195
+ - Key Files table: sorted by importance, not alphabetically
162
196
 
163
- ### Шаг 5: Обработка issue
197
+ ### Step 5: Handle Issue
164
198
 
165
- **5.1. Если URL issue указан пользователем:**
199
+ **5.1. If issue URL was provided by user:**
166
200
 
167
- Загрузить текущее тело и сравнить с diff:
201
+ Fetch existing issue body and compare with PR changes:
168
202
 
169
203
  ```
170
- ЕСЛИ тело пустое:
171
- → Сгенерировать полное описание
172
-
173
- ЕСЛИ тело содержит контент:
174
- → Проверить противоречия:
175
- - Описание утверждает одно, diff показывает другое?
176
- - Есть секции о несуществующих изменениях?
177
- - Есть изменения в diff, не описанные нигде?
204
+ IF existing body is empty:
205
+ → Generate full issue body and apply
206
+
207
+ IF existing body has content:
208
+ → Check for contradictions:
209
+ - Does the existing description claim something different from what the diff shows?
210
+ - Are there sections that describe changes not present in the diff?
211
+ - Are there changes in the diff not covered by existing sections?
178
212
 
179
- ЕСЛИ противоречия найдены:
180
- → Показать пользователю
181
- → СПРОСИТЬ: "Обновить противоречащие секции и добавить недостающие / Заменить целиком / Только добавить новые секции"
182
- → Применить выбор
183
-
184
- ЕСЛИ нет противоречий (только пропуски):
185
- → Добавить недостающие секции
186
- → Сообщить что добавлено
213
+ IF contradictions found:
214
+ → Present contradictions to user
215
+ → ASK: "I found contradictions in the existing issue description. Should I:
216
+ 1. Update the contradicting sections and add missing ones
217
+ 2. Replace the entire description
218
+ 3. Only append new sections"
219
+ → Apply user's choice
220
+
221
+ IF no contradictions (only missing sections):
222
+ → Add new sections to existing body
223
+ → Inform user what was added
187
224
  ```
188
225
 
189
- **5.2. Если issue не указан, но PR привязан к parent issue:**
226
+ **5.2. If no issue URL provided but PR is linked to a parent issue:**
190
227
 
191
228
  ```
192
- СПРОСИТЬ: "PR привязан к parent issue #N. Нужно ли:
193
- 1. Создать sub-issue под #N с подробным описанием
194
- 2. Привязать к существующему issue (укажите номер)
195
- 3. Пропустить документацию issue"
196
-
197
- ЕСЛИ создать sub-issue:
198
- → Сгенерировать title и body
229
+ ASK user: "PR is linked to parent issue #N. Should I:
230
+ 1. Create a sub-issue under #N with detailed description
231
+ 2. Link to an existing issue (provide number)
232
+ 3. Skip issue documentation"
233
+
234
+ IF user chooses to create sub-issue:
235
+ → Generate issue title from changes
236
+ → Generate detailed issue body (numbered sections, more detail than PR)
199
237
  → gh issue create
200
- → Обновить parent issue (добавить ссылку)
201
- → Обновить PR body (добавить Closes #NEW_ISSUE)
238
+ → Update parent issue body with new sub-issue link
239
+ → Update PR body with "Closes #NEW_ISSUE"
202
240
  ```
203
241
 
204
- **5.3. Если нет issue и нет parent:**
242
+ **5.3. If no issue URL and no parent issue detected:**
205
243
 
206
244
  ```
207
- СПРОСИТЬ: "Связанный issue не найден. Нужно ли:
208
- 1. Создать новый issue для этого PR
209
- 2. Создать sub-issue под существующим parent (укажите номер)
210
- 3. Пропустить документацию issue"
245
+ ASK user: "No linked issue found. Should I:
246
+ 1. Create a new issue for this PR
247
+ 2. Create a sub-issue under an existing parent (provide parent issue number)
248
+ 3. Skip issue documentation"
211
249
  ```
212
250
 
213
- **Формат тела issue** (подробнее чем PR):
251
+ **Issue body format** (more detailed than PR):
214
252
 
215
253
  ```markdown
216
254
  ## Summary
217
255
 
218
- [Расширенная версия PR summary с дополнительным контекстом]
256
+ [Same as PR summary but expanded with more context]
219
257
 
220
258
  **PR**: #N
221
- Parent issue: #M (если есть)
259
+ Parent issue: #M (if applicable)
222
260
 
223
261
  ---
224
262
 
225
263
  ## Changes
226
264
 
227
- ### 1. [Название секции]
265
+ ### 1. [Section Name]
228
266
 
229
- [Подробный параграф что изменено и зачем]
267
+ [Detailed paragraph explaining what was changed and why]
230
268
 
231
- - Конкретные пункты с техническими деталями
232
- - Before → after для переименований/рефакторингов
269
+ - Specific bullet points with technical details
270
+ - Before → after descriptions for renames/refactors
271
+ - Code examples if helpful
233
272
 
234
- ### 2. [Название секции]
273
+ ### 2. [Section Name]
235
274
  ...
236
275
 
237
276
  ---
@@ -240,56 +279,100 @@ Parent issue: #M (если есть)
240
279
 
241
280
  | File | Change |
242
281
  |------|--------|
243
- | `path/file.ts` | Описание |
282
+ | `path/file.ts` | Description |
244
283
  ```
245
284
 
246
- ### Шаг 6: Применение изменений
285
+ ### Step 6: Apply Changes
286
+
287
+ Execute the changes via gh CLI:
247
288
 
248
289
  ```bash
290
+ # Update PR description
249
291
  gh pr edit {number} --body "..."
292
+
293
+ # Update existing issue
250
294
  gh issue edit {number} --body "..."
295
+
296
+ # Create new issue
251
297
  gh issue create --title "..." --body "..."
298
+
299
+ # Update parent issue (append sub-issue link)
300
+ gh issue edit {parent_number} --body "..."
252
301
  ```
253
302
 
254
- Использовать heredoc (`cat <<'EOF'`) для тела. Верифицировать результат после каждой операции.
303
+ **Important:**
304
+ - Use heredoc (`cat <<'EOF'`) for body content to preserve formatting
305
+ - Always verify the result after each operation
306
+
307
+ ### Step 7: Verify & Report
308
+
309
+ After all operations, report to the user:
310
+
311
+ ```
312
+ Done. Here's what was created/updated:
313
+
314
+ - PR #N description updated: {url}
315
+ - Issue #M created/updated: {url}
316
+ - Parent issue #P updated with sub-issue link: {url}
317
+ ```
318
+
319
+ ## Contradiction Detection Rules
320
+
321
+ When comparing existing issue description with PR diff:
322
+
323
+ 1. **Scope contradiction**: Description says change affects only X types, but diff shows it affects all types
324
+ 2. **Field name contradiction**: Description uses old field name, diff shows it was renamed
325
+ 3. **Missing sections**: Diff contains changes not described in any section
326
+ 4. **Stale sections**: Description contains sections about changes not in the diff
327
+ 5. **Required/optional contradiction**: Description says field is optional, diff shows it's required
328
+
329
+ Always present contradictions to user before making changes.
330
+
331
+ ## Quality Standards
332
+
333
+ - PR description: concise, scannable, well-structured
334
+ - Issue description: detailed, comprehensive, with numbered sections
335
+ - Always use English for code documentation
336
+ - Never invent changes not present in the diff
337
+ - Always verify diff content before writing descriptions
338
+ - Group related changes logically, not by file
339
+ - Highlight breaking changes and deleted files prominently
340
+ - Mark temporary/hardcoded values for follow-up
341
+
342
+ ## Error Handling
343
+
344
+ | Error | Action |
345
+ |-------|--------|
346
+ | PR not found | Ask user to verify PR number/URL |
347
+ | Issue not found | Ask user to verify issue number/URL |
348
+ | Commit SHA not found | Ask user to verify SHA |
349
+ | `gh` CLI not authenticated | Instruct user to run `gh auth login` |
350
+ | Empty diff | Inform user that PR has no file changes |
351
+ | Permission denied | Inform user they may not have write access |
352
+
353
+ ## Rules of Engagement
354
+
355
+ 1. **DO** analyze ALL commits in the PR, not just the latest one
356
+ 2. **DO** check for contradictions before updating existing descriptions
357
+ 3. **DO** ask user before overwriting existing issue content
358
+ 4. **DO** update parent issue when creating sub-issues
359
+ 5. **DO** include `Closes #N` in PR body when issue is linked
360
+ 6. **DO NOT** invent or assume changes not visible in the diff
361
+ 7. **DO NOT** silently overwrite existing issue descriptions
362
+ 8. **DO NOT** create issues without user confirmation
363
+ 9. **DO NOT** modify PR title unless explicitly asked
364
+ 10. **DO NOT** write comments on GitHub PRs/issues (only edit body)
365
+
366
+ ## Job Context Awareness
255
367
 
256
- ### Шаг 7: Верификация и отчёт
368
+ If called within an orchestrator job context, check for job context before starting:
257
369
 
258
370
  ```
259
- Готово:
260
- - PR #N описание обновлено: {url}
261
- - Issue #M создан/обновлён: {url}
262
- - Parent issue #P обновлён: {url}
371
+ IF JOB_NAME is provided AND .metaproject/jobs/<JOB_NAME>/ai/context.md exists:
372
+ Read context.md — use it to understand the codebase, affected areas, and conventions
373
+ This enriches PR description generation with project-specific knowledge
374
+ ELSE:
375
+ Proceed with standard workflow (analyze PR/commits directly)
263
376
  ```
264
377
 
265
- ## Проверка противоречий
266
-
267
- 1. **Scope**: описание говорит "только X типы", а diff показывает все типы
268
- 2. **Названия полей**: описание использует старое имя, diff показывает переименование
269
- 3. **Пропущенные секции**: изменения в diff не описаны нигде
270
- 4. **Устаревшие секции**: описание содержит секции о несуществующих изменениях
271
- 5. **Required/optional**: описание говорит optional, diff показывает required
272
-
273
- Всегда показывать противоречия пользователю перед внесением изменений.
274
-
275
- ## Стандарты качества
276
-
277
- - PR описание: краткое, сканируемое, хорошо структурированное
278
- - Issue описание: подробное, исчерпывающее, с нумерованными секциями
279
- - Язык описаний: **всегда английский** (код-документация)
280
- - Никогда не придумывать изменения, которых нет в diff
281
- - Группировать по логике, не по файлам
282
- - Выделять breaking changes и удалённые файлы
283
-
284
- ## Правила
285
-
286
- 1. **Анализировать ВСЕ коммиты** PR, не только последний
287
- 2. **Проверять противоречия** перед обновлением существующих описаний
288
- 3. **Спрашивать** перед перезаписью содержимого issue
289
- 4. **Обновлять parent issue** при создании sub-issues
290
- 5. **Включать `Closes #N`** в тело PR
291
- 6. **НЕ придумывать** изменения, которых нет в diff
292
- 7. **НЕ перезаписывать** молча существующие описания
293
- 8. **НЕ создавать** issues без подтверждения пользователя
294
- 9. **НЕ менять** title PR если не просили явно
295
- 10. **НЕ писать** комментарии в GitHub PR/issues (только edit body)
378
+ The job context path is: `<JOBS_ROOT>/<JOB_NAME>/ai/context.md`
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: pr-issue-documenter
3
- description: "Analyzes PR commits/diff and generates structured descriptions for PRs and linked GitHub issues. Creates sub-issues, checks for contradictions with existing descriptions, updates parent issues. Use when: documenting PR changes, adding PR description, creating issue for PR, updating issue body."
3
+ description: "Use when documenting PR changes, adding a PR description, creating a linked issue for a PR, or updating an existing issue body."
4
4
  triggers:
5
5
  - "Add PR description"
6
6
  - "Document PR changes"
@@ -362,3 +362,17 @@ Always present contradictions to user before making changes.
362
362
  8. **DO NOT** create issues without user confirmation
363
363
  9. **DO NOT** modify PR title unless explicitly asked
364
364
  10. **DO NOT** write comments on GitHub PRs/issues (only edit body)
365
+
366
+ ## Job Context Awareness
367
+
368
+ If called within an orchestrator job context, check for job context before starting:
369
+
370
+ ```
371
+ IF JOB_NAME is provided AND .metaproject/jobs/<JOB_NAME>/ai/context.md exists:
372
+ Read context.md — use it to understand the codebase, affected areas, and conventions
373
+ This enriches PR description generation with project-specific knowledge
374
+ ELSE:
375
+ Proceed with standard workflow (analyze PR/commits directly)
376
+ ```
377
+
378
+ The job context path is: `<JOBS_ROOT>/<JOB_NAME>/ai/context.md`