@mrciphersmith/keryx 0.2.72 → 0.2.74
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.
- package/dist/cli.js +33409 -32626
- package/package.json +2 -2
- package/src/gdskills/bundled/rules/core/gproject-contracts.mdc +1 -1
- package/src/gdskills/bundled/rules/core/jobs-documentation.mdc +1 -1
- package/src/gdskills/bundled/rules/core/subagent-context-construction.md +1 -1
- package/src/gdskills/bundled/skills/core/reviewer-skill-creator/SKILL.md +214 -0
- package/src/gdskills/bundled/skills/orchestration/code-verifier/SKILL.codex.md +326 -20
- package/src/gdskills/bundled/skills/orchestration/code-verifier/SKILL.cursor.md +320 -22
- package/src/gdskills/bundled/skills/orchestration/code-verifier/SKILL.opencode.md +326 -12
- package/src/gdskills/bundled/skills/orchestration/code-verifier/SKILL.zed.md +333 -9
- package/src/gdskills/bundled/skills/orchestration/context-collector/SKILL.codex.md +92 -4
- package/src/gdskills/bundled/skills/orchestration/context-collector/SKILL.cursor.md +92 -4
- package/src/gdskills/bundled/skills/orchestration/context-collector/SKILL.opencode.md +92 -4
- package/src/gdskills/bundled/skills/orchestration/context-collector/SKILL.zed.md +92 -4
- package/src/gdskills/bundled/skills/orchestration/context-collector/orchestrator-prompt.md +1 -1
- package/src/gdskills/bundled/skills/orchestration/feature-analyzer/SKILL.codex.md +154 -1098
- package/src/gdskills/bundled/skills/orchestration/feature-analyzer/SKILL.cursor.md +154 -1098
- package/src/gdskills/bundled/skills/orchestration/feature-analyzer/SKILL.opencode.md +154 -1098
- package/src/gdskills/bundled/skills/orchestration/feature-analyzer/SKILL.zed.md +154 -1098
- package/src/gdskills/bundled/skills/orchestration/feature-analyzer/orchestrator-prompt.md +1 -1
- package/src/gdskills/bundled/skills/orchestration/feature-dev/SKILL.codex.md +101 -41
- package/src/gdskills/bundled/skills/orchestration/feature-dev/SKILL.cursor.md +101 -41
- package/src/gdskills/bundled/skills/orchestration/flow-orchestrator/SKILL.md +48 -1
- package/src/gdskills/bundled/skills/orchestration/flow-orchestrator/input-contract.schema.json +70 -4
- package/src/gdskills/bundled/skills/orchestration/issue-analyzer/SKILL.codex.md +115 -49
- package/src/gdskills/bundled/skills/orchestration/issue-analyzer/SKILL.cursor.md +115 -49
- package/src/gdskills/bundled/skills/orchestration/issue-analyzer/SKILL.opencode.md +115 -49
- package/src/gdskills/bundled/skills/orchestration/issue-analyzer/SKILL.zed.md +115 -49
- package/src/gdskills/bundled/skills/orchestration/issue-analyzer/orchestrator-prompt.md +1 -1
- package/src/gdskills/bundled/skills/orchestration/job-documenter/SKILL.codex.md +15 -6
- package/src/gdskills/bundled/skills/orchestration/job-documenter/SKILL.cursor.md +15 -6
- package/src/gdskills/bundled/skills/orchestration/job-documenter/SKILL.opencode.md +15 -6
- package/src/gdskills/bundled/skills/orchestration/job-documenter/SKILL.zed.md +15 -6
- package/src/gdskills/bundled/skills/orchestration/job-orchestrator/SKILL.codex.md +1 -1
- package/src/gdskills/bundled/skills/orchestration/job-orchestrator/SKILL.cursor.md +1 -1
- package/src/gdskills/bundled/skills/orchestration/job-orchestrator/SKILL.md +1 -1
- package/src/gdskills/bundled/skills/orchestration/job-orchestrator/SKILL.opencode.md +1 -1
- package/src/gdskills/bundled/skills/orchestration/job-orchestrator/SKILL.zed.md +1 -1
- package/src/gdskills/bundled/skills/orchestration/task-implementer/SKILL.codex.md +300 -55
- package/src/gdskills/bundled/skills/orchestration/task-implementer/SKILL.cursor.md +300 -55
- package/src/gdskills/bundled/skills/orchestration/task-implementer/SKILL.md +120 -37
- package/src/gdskills/bundled/skills/orchestration/task-implementer/SKILL.opencode.md +300 -55
- package/src/gdskills/bundled/skills/orchestration/task-implementer/SKILL.zed.md +300 -55
- package/src/gdskills/bundled/skills/orchestration/task-implementer/input-contract.schema.json +56 -14
- package/src/gdskills/bundled/skills/orchestration/task-implementer/orchestrator-prompt.md +50 -23
- package/src/gdskills/bundled/skills/orchestration/task-implementer/output-contract.schema.json +6 -2
- package/src/gdskills/bundled/skills/orchestration/task-implementer/task-request.template.md +18 -12
- package/src/gdskills/bundled/skills/planning/brainstorm/SKILL.codex.md +1 -1
- package/src/gdskills/bundled/skills/planning/brainstorm/SKILL.cursor.md +1 -1
- package/src/gdskills/bundled/skills/planning/consistency-checker/SKILL.codex.md +169 -10
- package/src/gdskills/bundled/skills/planning/consistency-checker/SKILL.cursor.md +169 -10
- package/src/gdskills/bundled/skills/planning/consistency-checker/SKILL.md +1 -1
- package/src/gdskills/bundled/skills/planning/interview/SKILL.codex.md +7 -1
- package/src/gdskills/bundled/skills/planning/interview/SKILL.cursor.md +7 -1
- package/src/gdskills/bundled/skills/planning/interviewer/SKILL.codex.md +7 -1
- package/src/gdskills/bundled/skills/planning/interviewer/SKILL.cursor.md +7 -1
- package/src/gdskills/bundled/skills/planning/patterns-researcher/SKILL.codex.md +216 -10
- package/src/gdskills/bundled/skills/planning/patterns-researcher/SKILL.cursor.md +216 -10
- package/src/gdskills/bundled/skills/planning/patterns-researcher/SKILL.md +1 -1
- package/src/gdskills/bundled/skills/planning/planner/SKILL.codex.md +169 -10
- package/src/gdskills/bundled/skills/planning/planner/SKILL.cursor.md +169 -10
- package/src/gdskills/bundled/skills/planning/planner/SKILL.md +1 -1
- package/src/gdskills/bundled/skills/planning/prd-creator/SKILL.codex.md +2 -2
- package/src/gdskills/bundled/skills/planning/prd-creator/SKILL.cursor.md +2 -2
- package/src/gdskills/bundled/skills/planning/prd-creator/SKILL.opencode.md +2 -2
- package/src/gdskills/bundled/skills/planning/prd-creator/SKILL.zed.md +2 -2
- package/src/gdskills/bundled/skills/planning/problem-definer/SKILL.codex.md +134 -10
- package/src/gdskills/bundled/skills/planning/problem-definer/SKILL.cursor.md +134 -10
- package/src/gdskills/bundled/skills/planning/problem-definer/SKILL.md +1 -1
- package/src/gdskills/bundled/skills/planning/project-discovery/SKILL.codex.md +146 -10
- package/src/gdskills/bundled/skills/planning/project-discovery/SKILL.cursor.md +146 -10
- package/src/gdskills/bundled/skills/planning/project-discovery/SKILL.md +1 -1
- package/src/gdskills/bundled/skills/planning/spec-writer/SKILL.codex.md +211 -10
- package/src/gdskills/bundled/skills/planning/spec-writer/SKILL.cursor.md +211 -10
- package/src/gdskills/bundled/skills/planning/spec-writer/SKILL.md +1 -1
- package/src/gdskills/bundled/skills/planning/stack-advisor/SKILL.codex.md +162 -10
- package/src/gdskills/bundled/skills/planning/stack-advisor/SKILL.cursor.md +162 -10
- package/src/gdskills/bundled/skills/planning/stack-advisor/SKILL.md +1 -1
- package/src/gdskills/bundled/skills/platform/claude-md-management/SKILL.codex.md +1 -1
- package/src/gdskills/bundled/skills/platform/claude-md-management/SKILL.cursor.md +1 -1
- package/src/gdskills/bundled/skills/platform/hookify/SKILL.codex.md +1 -1
- package/src/gdskills/bundled/skills/platform/hookify/SKILL.cursor.md +1 -1
- package/src/gdskills/bundled/skills/quality/changelog/SKILL.codex.md +1 -1
- package/src/gdskills/bundled/skills/quality/changelog/SKILL.cursor.md +1 -1
- package/src/gdskills/bundled/skills/quality/commit/SKILL.codex.md +1 -1
- package/src/gdskills/bundled/skills/quality/commit/SKILL.cursor.md +1 -1
- package/src/gdskills/bundled/skills/quality/db-migrate/SKILL.codex.md +1 -1
- package/src/gdskills/bundled/skills/quality/db-migrate/SKILL.cursor.md +1 -1
- package/src/gdskills/bundled/skills/quality/dependency-update/SKILL.codex.md +1 -1
- package/src/gdskills/bundled/skills/quality/dependency-update/SKILL.cursor.md +1 -1
- package/src/gdskills/bundled/skills/quality/deploy/SKILL.codex.md +1 -1
- package/src/gdskills/bundled/skills/quality/deploy/SKILL.cursor.md +1 -1
- package/src/gdskills/bundled/skills/quality/perf-check/SKILL.codex.md +1 -1
- package/src/gdskills/bundled/skills/quality/perf-check/SKILL.cursor.md +1 -1
- package/src/gdskills/bundled/skills/quality/pr/SKILL.codex.md +1 -1
- package/src/gdskills/bundled/skills/quality/pr/SKILL.cursor.md +1 -1
- package/src/gdskills/bundled/skills/quality/pr-issue-documenter/SKILL.codex.md +15 -1
- package/src/gdskills/bundled/skills/quality/pr-issue-documenter/SKILL.cursor.md +248 -165
- package/src/gdskills/bundled/skills/quality/pr-issue-documenter/SKILL.opencode.md +15 -1
- package/src/gdskills/bundled/skills/quality/pr-issue-documenter/SKILL.zed.md +359 -19
- package/src/gdskills/bundled/skills/quality/push/SKILL.codex.md +1 -1
- package/src/gdskills/bundled/skills/quality/push/SKILL.cursor.md +1 -1
- package/src/gdskills/bundled/skills/quality/security-audit/SKILL.codex.md +1 -1
- package/src/gdskills/bundled/skills/quality/security-audit/SKILL.cursor.md +1 -1
- package/src/gdskills/bundled/skills/quality/test-gen/SKILL.codex.md +1 -1
- package/src/gdskills/bundled/skills/quality/test-gen/SKILL.cursor.md +1 -1
- package/src/gdskills/bundled/skills/quality/tests-creator/SKILL.codex.md +299 -24
- package/src/gdskills/bundled/skills/quality/tests-creator/SKILL.cursor.md +296 -31
- package/src/gdskills/bundled/skills/quality/tests-creator/SKILL.opencode.md +309 -18
- package/src/gdskills/bundled/skills/quality/tests-creator/SKILL.zed.md +312 -17
- package/src/gdskills/bundled/skills/review/code-ai-review/SKILL.codex.md +29 -30
- package/src/gdskills/bundled/skills/review/code-ai-review/SKILL.cursor.md +29 -30
- package/src/gdskills/bundled/skills/review/code-ai-review/SKILL.opencode.md +29 -30
- package/src/gdskills/bundled/skills/review/code-ai-review/SKILL.zed.md +29 -30
- package/src/gdskills/bundled/skills/review/code-learned-review/SKILL.codex.md +21 -30
- package/src/gdskills/bundled/skills/review/code-learned-review/SKILL.cursor.md +21 -30
- package/src/gdskills/bundled/skills/review/code-learned-review/SKILL.opencode.md +21 -30
- package/src/gdskills/bundled/skills/review/code-learned-review/SKILL.zed.md +21 -30
- package/src/gdskills/bundled/skills/review/code-mobx-store-review/SKILL.codex.md +19 -23
- package/src/gdskills/bundled/skills/review/code-mobx-store-review/SKILL.cursor.md +19 -23
- package/src/gdskills/bundled/skills/review/code-mobx-store-review/SKILL.opencode.md +19 -23
- package/src/gdskills/bundled/skills/review/code-mobx-store-review/SKILL.zed.md +19 -23
- package/src/gdskills/bundled/skills/review/code-style-review/SKILL.codex.md +17 -24
- package/src/gdskills/bundled/skills/review/code-style-review/SKILL.cursor.md +17 -24
- package/src/gdskills/bundled/skills/review/code-style-review/SKILL.opencode.md +17 -24
- package/src/gdskills/bundled/skills/review/code-style-review/SKILL.zed.md +17 -24
- package/src/gdskills/bundled/skills/review/review-clean-code/SKILL.md +33 -1
- package/src/gdskills/bundled/skills/review/review-layout/SKILL.md +217 -0
- package/src/gdskills/bundled/skills/review/review-logic/SKILL.md +26 -0
- package/src/gdskills/bundled/skills/review/review-orchestrator/SKILL.md +320 -5
- package/src/gdskills/bundled/skills/review/review-pr-feedback/SKILL.md +644 -113
- package/src/gdskills/bundled/skills/review/review-pr-feedback/input-contract.schema.json +79 -0
- package/src/gdskills/bundled/skills/review/review-pr-feedback/output-contract.schema.json +375 -0
- package/src/gdskills/bundled/skills/review/review-testing-practices/SKILL.md +111 -1
- package/src/gdskills/bundled/skills/review/review-verifier/SKILL.md +25 -1
- package/src/gdskills/bundled/skills/planning/brainstorm/SKILL.claude.md +0 -46
- package/src/gdskills/bundled/skills/planning/interviewer/SKILL.claude.md +0 -94
- package/src/gdskills/bundled/skills/quality/changelog/SKILL.claude.md +0 -45
- package/src/gdskills/bundled/skills/quality/db-migrate/SKILL.claude.md +0 -40
- package/src/gdskills/bundled/skills/quality/dependency-update/SKILL.claude.md +0 -45
- package/src/gdskills/bundled/skills/quality/deploy/SKILL.claude.md +0 -42
- package/src/gdskills/bundled/skills/quality/perf-check/SKILL.claude.md +0 -48
- package/src/gdskills/bundled/skills/quality/security-audit/SKILL.claude.md +0 -40
- 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: "
|
|
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
|
-
|
|
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
|
-
|
|
27
|
-
|
|
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
|
-
-
|
|
32
|
-
-
|
|
33
|
-
-
|
|
34
|
-
-
|
|
35
|
-
-
|
|
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
|
-
- [ ]
|
|
44
|
-
- [ ]
|
|
45
|
-
- [ ]
|
|
46
|
-
- [ ]
|
|
47
|
-
- [ ]
|
|
48
|
-
- [ ]
|
|
49
|
-
- [ ]
|
|
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
|
-
###
|
|
70
|
+
### Step 1: Parse Input
|
|
53
71
|
|
|
54
|
-
|
|
55
|
-
- **PR URL**: `https://github.com/owner/repo/pull/123`
|
|
56
|
-
- **Issue URL**: `https://github.com/owner/repo/issues/456`
|
|
57
|
-
- **Commit
|
|
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
|
-
|
|
63
|
-
→
|
|
80
|
+
IF PR URL provided:
|
|
81
|
+
→ Continue to Step 2
|
|
64
82
|
|
|
65
|
-
|
|
66
|
-
→
|
|
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
|
-
|
|
69
|
-
→
|
|
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
|
-
→
|
|
91
|
+
IF nothing provided:
|
|
92
|
+
→ ASK user: "Please provide a PR URL, issue URL, or commit SHAs"
|
|
73
93
|
```
|
|
74
94
|
|
|
75
|
-
###
|
|
95
|
+
### Step 2: Collect Context
|
|
76
96
|
|
|
77
|
-
|
|
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
|
-
|
|
112
|
+
**For existing issue (if provided):**
|
|
91
113
|
```bash
|
|
92
114
|
gh issue view {number} --json title,body,state
|
|
93
115
|
```
|
|
94
116
|
|
|
95
|
-
|
|
96
|
-
-
|
|
97
|
-
-
|
|
98
|
-
-
|
|
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
|
-
|
|
127
|
+
Systematically analyze the collected diffs:
|
|
101
128
|
|
|
102
|
-
**3.1.
|
|
103
|
-
- `refactor` —
|
|
104
|
-
- `feature` —
|
|
105
|
-
- `bugfix` —
|
|
106
|
-
- `cleanup` —
|
|
107
|
-
- `i18n` —
|
|
108
|
-
- `test` —
|
|
109
|
-
- `
|
|
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
|
-
-
|
|
118
|
-
-
|
|
119
|
-
-
|
|
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
|
-
###
|
|
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
|
-
### [
|
|
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
|
-
### [
|
|
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:
|
|
157
|
-
- Changes:
|
|
158
|
-
-
|
|
159
|
-
- **Deleted**
|
|
160
|
-
- `Closes #N`
|
|
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
|
-
###
|
|
197
|
+
### Step 5: Handle Issue
|
|
164
198
|
|
|
165
|
-
**5.1.
|
|
199
|
+
**5.1. If issue URL was provided by user:**
|
|
166
200
|
|
|
167
|
-
|
|
201
|
+
Fetch existing issue body and compare with PR changes:
|
|
168
202
|
|
|
169
203
|
```
|
|
170
|
-
|
|
171
|
-
→
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
→
|
|
175
|
-
-
|
|
176
|
-
-
|
|
177
|
-
-
|
|
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.
|
|
226
|
+
**5.2. If no issue URL provided but PR is linked to a parent issue:**
|
|
190
227
|
|
|
191
228
|
```
|
|
192
|
-
|
|
193
|
-
1.
|
|
194
|
-
2.
|
|
195
|
-
3.
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
→
|
|
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
|
-
→
|
|
201
|
-
→
|
|
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.
|
|
242
|
+
**5.3. If no issue URL and no parent issue detected:**
|
|
205
243
|
|
|
206
244
|
```
|
|
207
|
-
|
|
208
|
-
1.
|
|
209
|
-
2.
|
|
210
|
-
3.
|
|
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
|
-
|
|
251
|
+
**Issue body format** (more detailed than PR):
|
|
214
252
|
|
|
215
253
|
```markdown
|
|
216
254
|
## Summary
|
|
217
255
|
|
|
218
|
-
[
|
|
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
|
-
###
|
|
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
|
-
|
|
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
|
-
|
|
368
|
+
If called within an orchestrator job context, check for job context before starting:
|
|
257
369
|
|
|
258
370
|
```
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
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: "
|
|
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`
|