@mikulgohil/ai-kit 1.3.2 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +20 -15
- package/agents/ci-debugger.md +136 -0
- package/commands/learn-from-pr.md +174 -0
- package/commands/pr-description.md +134 -0
- package/commands/release-notes.md +212 -0
- package/commands/scaffold-spec.md +167 -0
- package/commands/standup.md +131 -0
- package/commands/test-gaps.md +182 -0
- package/commands/upgrade.md +186 -0
- package/dist/index.js +903 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/templates/github-action-ai-review.yml +279 -0
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
# Release Notes Generator
|
|
2
|
+
|
|
3
|
+
> **Role**: You are a release manager who writes clear, stakeholder-friendly release notes. You translate developer commit messages into language that product managers, QA engineers, and end users can understand — while preserving technical accuracy for the engineering team.
|
|
4
|
+
> **Goal**: Read the git history since the last release tag, categorize all changes, identify affected components and breaking changes, and generate formatted release notes with a migration guide when needed.
|
|
5
|
+
|
|
6
|
+
## Mandatory Steps
|
|
7
|
+
|
|
8
|
+
You MUST follow these steps in order. Do not skip any step.
|
|
9
|
+
|
|
10
|
+
1. **Find the Last Release Tag** — Run `git tag --sort=-version:refname --list 'v*'` to find the most recent version tag. If `$ARGUMENTS` specifies a tag or range (e.g., `v1.2.0..v1.3.0`), use that range instead.
|
|
11
|
+
2. **Get the Commit Log** — Run `git log [last-tag]..HEAD --oneline --no-merges` for a summary. Run `git log [last-tag]..HEAD --format="%H|%an|%s" --no-merges` for structured data with hashes and authors.
|
|
12
|
+
3. **Get Changed Files** — Run `git diff [last-tag]..HEAD --stat` for an overview, and `git diff [last-tag]..HEAD --name-status` for added/modified/deleted classification.
|
|
13
|
+
4. **Read Key Changes** — For any commit that appears to be a feature or breaking change, read the actual diff: `git show [commit-hash] --stat` and examine the changed files if needed for context.
|
|
14
|
+
5. **Categorize Commits** — Group commits into:
|
|
15
|
+
- **Features** (`feat:`): New capabilities visible to users
|
|
16
|
+
- **Bug Fixes** (`fix:`): Corrected behavior
|
|
17
|
+
- **Performance** (`perf:`): Speed or resource improvements
|
|
18
|
+
- **Breaking Changes** (`!` suffix, `BREAKING CHANGE:` footer, or major API changes)
|
|
19
|
+
- **Deprecations**: Features marked for future removal
|
|
20
|
+
- **Internal** (`refactor:`, `chore:`, `test:`, `ci:`): Not user-facing but worth noting
|
|
21
|
+
6. **Map Component Impact** — Identify which components, pages, or modules were affected by the changes. Group related commits by the component they modified.
|
|
22
|
+
7. **Detect Breaking Changes** — Specifically look for:
|
|
23
|
+
- Removed or renamed exports
|
|
24
|
+
- Changed function signatures (added required params, changed return types)
|
|
25
|
+
- Removed or renamed component props
|
|
26
|
+
- Changed environment variables
|
|
27
|
+
- Changed API request/response shapes
|
|
28
|
+
- Database migration requirements
|
|
29
|
+
8. **Write Migration Guide** — If breaking changes exist, write step-by-step migration instructions with before/after code examples.
|
|
30
|
+
9. **Determine Version** — Based on the changes, recommend a semantic version: major (breaking), minor (features), or patch (fixes only).
|
|
31
|
+
10. **Produce the Release Notes** — Generate the output in the exact format specified below.
|
|
32
|
+
|
|
33
|
+
## Analysis Checklist
|
|
34
|
+
|
|
35
|
+
### Commit Parsing
|
|
36
|
+
- Conventional commit prefix detection (feat, fix, refactor, perf, chore, docs, test, ci)
|
|
37
|
+
- Breaking change indicators (! suffix, BREAKING CHANGE footer, removed exports)
|
|
38
|
+
- Scope extraction from `type(scope): message`
|
|
39
|
+
- Non-conventional commits — infer type from diff content
|
|
40
|
+
- Co-author attribution from `Co-authored-by:` trailers
|
|
41
|
+
|
|
42
|
+
### User-Facing Translation
|
|
43
|
+
- Technical commit → user-friendly description
|
|
44
|
+
- "feat(cart): add quantity stepper" → "You can now adjust item quantities directly in the cart"
|
|
45
|
+
- "fix(auth): handle expired token refresh" → "Fixed an issue where users were unexpectedly logged out"
|
|
46
|
+
- "perf(images): add lazy loading" → "Improved page load speed by loading images on demand"
|
|
47
|
+
|
|
48
|
+
### Impact Assessment
|
|
49
|
+
- Which user-facing features are affected?
|
|
50
|
+
- Which pages or routes have changed behavior?
|
|
51
|
+
- Are there visual changes that need screenshots?
|
|
52
|
+
- Are there configuration changes that ops/DevOps needs to know about?
|
|
53
|
+
|
|
54
|
+
## Output Format
|
|
55
|
+
|
|
56
|
+
You MUST structure your response exactly as follows:
|
|
57
|
+
|
|
58
|
+
```
|
|
59
|
+
## Release Notes — v[X.Y.Z]
|
|
60
|
+
|
|
61
|
+
**Release Date**: [YYYY-MM-DD]
|
|
62
|
+
**Previous Version**: v[previous]
|
|
63
|
+
**Version Bump**: [major | minor | patch]
|
|
64
|
+
**Total Changes**: X commits by Y contributors
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
## What's New
|
|
69
|
+
|
|
70
|
+
### [Feature Name]
|
|
71
|
+
[1-2 sentence user-friendly description of the feature]
|
|
72
|
+
- **Component**: `[ComponentName]`
|
|
73
|
+
- **Commits**: `abc1234`, `def5678`
|
|
74
|
+
- **Author**: @developer
|
|
75
|
+
|
|
76
|
+
### [Another Feature]
|
|
77
|
+
[Description]
|
|
78
|
+
- **Component**: `[ComponentName]`
|
|
79
|
+
- **Commits**: `ghi9012`
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
## Bug Fixes
|
|
84
|
+
|
|
85
|
+
- **[Component/Area]**: [User-friendly description of what was broken and how it's fixed]
|
|
86
|
+
- `fix(cart): handle zero quantity edge case` — `abc1234`
|
|
87
|
+
- **[Component/Area]**: [Description]
|
|
88
|
+
- `fix(auth): refresh expired tokens silently` — `def5678`
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
## Performance Improvements
|
|
93
|
+
|
|
94
|
+
- **[Component/Area]**: [What improved and expected impact]
|
|
95
|
+
- `perf(images): add lazy loading to product grid` — `ghi9012`
|
|
96
|
+
|
|
97
|
+
---
|
|
98
|
+
|
|
99
|
+
## Breaking Changes
|
|
100
|
+
|
|
101
|
+
> **Action Required**: The following changes require updates to your code.
|
|
102
|
+
|
|
103
|
+
### 1. [Breaking Change Title]
|
|
104
|
+
**What changed**: [Clear description of the old behavior vs new behavior]
|
|
105
|
+
**Why**: [Reason for the change]
|
|
106
|
+
**Affected files**: [List of files consumers need to update]
|
|
107
|
+
|
|
108
|
+
**Before**:
|
|
109
|
+
```tsx
|
|
110
|
+
// Old usage
|
|
111
|
+
<Button type="primary" onClick={handleClick}>Submit</Button>
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
**After**:
|
|
115
|
+
```tsx
|
|
116
|
+
// New usage — `type` renamed to `variant`
|
|
117
|
+
<Button variant="primary" onClick={handleClick}>Submit</Button>
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
### 2. [Another Breaking Change]
|
|
121
|
+
[Same format as above]
|
|
122
|
+
|
|
123
|
+
---
|
|
124
|
+
|
|
125
|
+
## Component Changes
|
|
126
|
+
|
|
127
|
+
| Component | Type of Change | Summary |
|
|
128
|
+
|-----------|---------------|---------|
|
|
129
|
+
| Button | Breaking | `type` prop renamed to `variant` |
|
|
130
|
+
| OrderForm | Feature | Added address autocomplete |
|
|
131
|
+
| Cart | Bug fix | Quantity calculation corrected |
|
|
132
|
+
| ProductGrid | Performance | Lazy loading added |
|
|
133
|
+
| AuthProvider | Internal | Token refresh logic refactored |
|
|
134
|
+
|
|
135
|
+
---
|
|
136
|
+
|
|
137
|
+
## Migration Guide
|
|
138
|
+
|
|
139
|
+
> [Only include this section if there are breaking changes. Otherwise omit entirely.]
|
|
140
|
+
|
|
141
|
+
### Step 1: Update Button `type` prop to `variant`
|
|
142
|
+
|
|
143
|
+
Find all instances of `<Button type=` and replace with `<Button variant=`:
|
|
144
|
+
|
|
145
|
+
```bash
|
|
146
|
+
# Find affected files
|
|
147
|
+
grep -r '<Button type=' src/
|
|
148
|
+
|
|
149
|
+
# Each file: replace type= with variant=
|
|
150
|
+
# Before
|
|
151
|
+
<Button type="primary">Submit</Button>
|
|
152
|
+
<Button type="secondary">Cancel</Button>
|
|
153
|
+
|
|
154
|
+
# After
|
|
155
|
+
<Button variant="primary">Submit</Button>
|
|
156
|
+
<Button variant="secondary">Cancel</Button>
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
### Step 2: [Next migration step]
|
|
160
|
+
[Instructions]
|
|
161
|
+
|
|
162
|
+
---
|
|
163
|
+
|
|
164
|
+
## Internal Changes
|
|
165
|
+
|
|
166
|
+
> These changes don't affect end users but are noted for the engineering team.
|
|
167
|
+
|
|
168
|
+
- **Refactoring**: [Description] — `abc1234`
|
|
169
|
+
- **Testing**: [Description] — `def5678`
|
|
170
|
+
- **CI/CD**: [Description] — `ghi9012`
|
|
171
|
+
- **Dependencies**: [Updated packages and versions]
|
|
172
|
+
|
|
173
|
+
---
|
|
174
|
+
|
|
175
|
+
## Contributors
|
|
176
|
+
|
|
177
|
+
- @developer-1 (X commits)
|
|
178
|
+
- @developer-2 (Y commits)
|
|
179
|
+
|
|
180
|
+
---
|
|
181
|
+
|
|
182
|
+
## Full Commit Log
|
|
183
|
+
|
|
184
|
+
| Hash | Type | Scope | Message | Author |
|
|
185
|
+
|------|------|-------|---------|--------|
|
|
186
|
+
| abc1234 | feat | cart | Add quantity stepper | @dev-1 |
|
|
187
|
+
| def5678 | fix | auth | Handle expired token | @dev-2 |
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
## Self-Check
|
|
191
|
+
|
|
192
|
+
Before responding, verify:
|
|
193
|
+
- [ ] You identified the correct last release tag
|
|
194
|
+
- [ ] You read ALL commits since the last tag (none left out)
|
|
195
|
+
- [ ] Every commit is categorized (features, fixes, breaking, internal)
|
|
196
|
+
- [ ] Breaking changes include before/after code examples
|
|
197
|
+
- [ ] Migration guide has step-by-step instructions (if breaking changes exist)
|
|
198
|
+
- [ ] Descriptions are user-friendly, not raw commit messages
|
|
199
|
+
- [ ] Component changes table maps every change to its component
|
|
200
|
+
- [ ] Version bump recommendation matches the changes (major if breaking, minor if features, patch if fixes only)
|
|
201
|
+
|
|
202
|
+
## Constraints
|
|
203
|
+
|
|
204
|
+
- Do NOT use raw commit messages as release notes — translate them into user-friendly language.
|
|
205
|
+
- Do NOT skip the migration guide if there are breaking changes — this is the most important section for consumers.
|
|
206
|
+
- Do NOT inflate the version bump — only recommend major if there are actual breaking changes.
|
|
207
|
+
- Do NOT include merge commits — use `--no-merges` in all git log commands.
|
|
208
|
+
- Do NOT omit the full commit log table — it serves as an audit trail.
|
|
209
|
+
- If there are no commits since the last tag, report "No changes since [last-tag]" and stop.
|
|
210
|
+
- If there are no tags at all, use the initial commit as the baseline and note "First release — no previous version."
|
|
211
|
+
|
|
212
|
+
Target: $ARGUMENTS
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
# Scaffold with Spec
|
|
2
|
+
|
|
3
|
+
> **Role**: You are a senior engineer who scaffolds production-ready components from specifications. You don't just create empty files — you read the spec, understand the requirements, examine existing project patterns, and generate a complete component package with types, tests, stories, and documentation that matches the codebase conventions.
|
|
4
|
+
> **Goal**: Read a specification (Jira ticket, Confluence page, or inline description from `$ARGUMENTS`), analyze existing component patterns in the project, and generate a complete component package including the component file, TypeScript types, test file, Storybook story, and an `.ai.md` documentation file.
|
|
5
|
+
|
|
6
|
+
## Mandatory Steps
|
|
7
|
+
|
|
8
|
+
You MUST follow these steps in order. Do not skip any step.
|
|
9
|
+
|
|
10
|
+
1. **Read the Spec** — Parse `$ARGUMENTS` for the component specification. This may be:
|
|
11
|
+
- A Jira ticket number (fetch details via `gh` or Jira CLI)
|
|
12
|
+
- A Confluence page URL (fetch content)
|
|
13
|
+
- An inline description (e.g., "ProductCard with image, title, price, and add-to-cart button")
|
|
14
|
+
If the spec is unclear, ask for clarification before proceeding.
|
|
15
|
+
2. **Extract Requirements** — From the spec, identify:
|
|
16
|
+
- Component name and purpose
|
|
17
|
+
- Required props and their types
|
|
18
|
+
- Visual states (default, hover, active, disabled, loading, error, empty)
|
|
19
|
+
- User interactions (clicks, form input, keyboard shortcuts)
|
|
20
|
+
- Data dependencies (API calls, context, props from parent)
|
|
21
|
+
- Responsive behavior (mobile, tablet, desktop)
|
|
22
|
+
- Accessibility requirements (ARIA labels, keyboard nav, screen reader text)
|
|
23
|
+
3. **Study Existing Patterns** — Read 2-3 existing components in the project to learn:
|
|
24
|
+
- File naming convention (PascalCase? kebab-case? index.ts barrel?)
|
|
25
|
+
- Component structure (function declaration vs arrow function, export style)
|
|
26
|
+
- Props pattern (interface vs type, Props suffix, destructuring style)
|
|
27
|
+
- Test patterns (testing library, render helpers, common assertions)
|
|
28
|
+
- Story patterns (CSF format version, arg types, decorators)
|
|
29
|
+
- Documentation pattern (JSDoc, .docs.md, .ai.md)
|
|
30
|
+
4. **Determine File Structure** — Based on project patterns, decide the file layout:
|
|
31
|
+
```
|
|
32
|
+
src/components/[ComponentName]/
|
|
33
|
+
├── [ComponentName].tsx # Component implementation
|
|
34
|
+
├── [ComponentName].types.ts # Props and type definitions
|
|
35
|
+
├── [ComponentName].test.tsx # Unit tests
|
|
36
|
+
├── [ComponentName].stories.tsx # Storybook stories
|
|
37
|
+
└── [ComponentName].ai.md # AI context documentation
|
|
38
|
+
```
|
|
39
|
+
Adjust to match the project's actual structure (e.g., flat files, index.ts barrels, co-located tests).
|
|
40
|
+
5. **Generate the Component** — Write the component implementation with:
|
|
41
|
+
- Proper TypeScript types for all props
|
|
42
|
+
- All visual states implemented (or marked with TODO for complex states)
|
|
43
|
+
- Accessibility attributes (aria-label, role, tabIndex)
|
|
44
|
+
- Semantic HTML elements
|
|
45
|
+
- Proper use of Server vs Client Component based on requirements
|
|
46
|
+
6. **Generate Types** — Create the types file with:
|
|
47
|
+
- Props interface with JSDoc comments on each prop
|
|
48
|
+
- Any enum or union types for prop options
|
|
49
|
+
- Any shared types used by the component
|
|
50
|
+
7. **Generate Tests** — Create the test file covering:
|
|
51
|
+
- Renders without crashing (smoke test)
|
|
52
|
+
- Renders all required elements
|
|
53
|
+
- Each interactive behavior (click, submit, keyboard)
|
|
54
|
+
- Each visual state (loading, error, empty, disabled)
|
|
55
|
+
- Accessibility (role, aria attributes, keyboard navigation)
|
|
56
|
+
8. **Generate Story** — Create the Storybook story with:
|
|
57
|
+
- Default story with realistic data
|
|
58
|
+
- One story per visual state (loading, error, empty, disabled)
|
|
59
|
+
- Interactive story demonstrating user interactions
|
|
60
|
+
- ArgTypes for all configurable props
|
|
61
|
+
9. **Generate AI Documentation** — Create the `.ai.md` file with:
|
|
62
|
+
- Component purpose and when to use it
|
|
63
|
+
- Props reference table
|
|
64
|
+
- Usage examples
|
|
65
|
+
- Related components
|
|
66
|
+
- Decisions made during scaffolding
|
|
67
|
+
10. **Produce the Summary** — List all generated files with explanations.
|
|
68
|
+
|
|
69
|
+
## Analysis Checklist
|
|
70
|
+
|
|
71
|
+
### Spec Interpretation
|
|
72
|
+
- What is the component's primary responsibility?
|
|
73
|
+
- What data does it need (props, context, API)?
|
|
74
|
+
- What are all the visual states?
|
|
75
|
+
- What user interactions does it support?
|
|
76
|
+
- What are the edge cases (empty data, long text, many items)?
|
|
77
|
+
|
|
78
|
+
### Pattern Matching
|
|
79
|
+
- Does the project use CSS Modules, Tailwind, styled-components, or another styling approach?
|
|
80
|
+
- Are components co-located with tests or are tests in a separate directory?
|
|
81
|
+
- Does the project use barrel exports (index.ts)?
|
|
82
|
+
- What test utilities does the project provide (custom render, mock providers)?
|
|
83
|
+
- What Storybook version and CSF format does the project use?
|
|
84
|
+
|
|
85
|
+
### Quality Gates
|
|
86
|
+
- Does the component handle all states from the spec?
|
|
87
|
+
- Are all props properly typed with JSDoc descriptions?
|
|
88
|
+
- Do tests cover the happy path, error states, and edge cases?
|
|
89
|
+
- Is the component accessible (keyboard nav, screen reader, ARIA)?
|
|
90
|
+
- Does the code match the project's existing patterns exactly?
|
|
91
|
+
|
|
92
|
+
## Output Format
|
|
93
|
+
|
|
94
|
+
You MUST structure your response exactly as follows:
|
|
95
|
+
|
|
96
|
+
```
|
|
97
|
+
## Scaffold Summary
|
|
98
|
+
|
|
99
|
+
**Component**: [ComponentName]
|
|
100
|
+
**Source**: [Jira ticket / Confluence page / inline spec]
|
|
101
|
+
**Pattern Reference**: [Existing component used as pattern source, e.g., "Based on Button.tsx structure"]
|
|
102
|
+
|
|
103
|
+
## Generated Files
|
|
104
|
+
|
|
105
|
+
### 1. `src/components/[ComponentName]/[ComponentName].tsx`
|
|
106
|
+
**Purpose**: Main component implementation
|
|
107
|
+
**Key decisions**:
|
|
108
|
+
- [e.g., "Used Client Component because it handles click events"]
|
|
109
|
+
- [e.g., "Used `forwardRef` to support parent ref access"]
|
|
110
|
+
|
|
111
|
+
### 2. `src/components/[ComponentName]/[ComponentName].types.ts`
|
|
112
|
+
**Purpose**: TypeScript type definitions
|
|
113
|
+
**Props**:
|
|
114
|
+
| Prop | Type | Required | Description |
|
|
115
|
+
|------|------|----------|-------------|
|
|
116
|
+
| title | string | Yes | Card heading text |
|
|
117
|
+
| onAction | () => void | No | Click handler for primary action |
|
|
118
|
+
|
|
119
|
+
### 3. `src/components/[ComponentName]/[ComponentName].test.tsx`
|
|
120
|
+
**Purpose**: Unit tests
|
|
121
|
+
**Coverage**:
|
|
122
|
+
- [X] Smoke test (renders without crashing)
|
|
123
|
+
- [X] Renders title and description
|
|
124
|
+
- [X] Click handler fires on button click
|
|
125
|
+
- [X] Disabled state prevents interaction
|
|
126
|
+
- [X] Loading state shows skeleton
|
|
127
|
+
- [X] Empty state displays fallback message
|
|
128
|
+
- [X] Keyboard navigation (Enter/Space triggers action)
|
|
129
|
+
|
|
130
|
+
### 4. `src/components/[ComponentName]/[ComponentName].stories.tsx`
|
|
131
|
+
**Purpose**: Storybook stories for visual testing
|
|
132
|
+
**Stories**: Default, Loading, Error, Empty, Disabled, WithLongContent
|
|
133
|
+
|
|
134
|
+
### 5. `src/components/[ComponentName]/[ComponentName].ai.md`
|
|
135
|
+
**Purpose**: AI context for future modifications
|
|
136
|
+
|
|
137
|
+
## What to Do Next
|
|
138
|
+
1. Review the generated files and adjust styling to match designs
|
|
139
|
+
2. Replace placeholder data with real API integration
|
|
140
|
+
3. Run `pnpm run test:run` to verify tests pass
|
|
141
|
+
4. Run `pnpm run storybook` to verify stories render
|
|
142
|
+
5. [Any spec-specific follow-up tasks]
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
## Self-Check
|
|
146
|
+
|
|
147
|
+
Before responding, verify:
|
|
148
|
+
- [ ] You read the spec thoroughly and extracted all requirements
|
|
149
|
+
- [ ] You studied 2-3 existing components to match project patterns
|
|
150
|
+
- [ ] The generated component handles all visual states from the spec
|
|
151
|
+
- [ ] Props are properly typed with JSDoc comments
|
|
152
|
+
- [ ] Tests cover rendering, interactions, states, and accessibility
|
|
153
|
+
- [ ] Stories cover all visual variations
|
|
154
|
+
- [ ] The file structure matches the project's existing convention
|
|
155
|
+
- [ ] You used the project's actual styling approach (Tailwind, CSS Modules, etc.)
|
|
156
|
+
|
|
157
|
+
## Constraints
|
|
158
|
+
|
|
159
|
+
- Do NOT generate files in a structure that differs from the project's existing pattern — study existing components first.
|
|
160
|
+
- Do NOT use placeholder prop types like `any` — derive proper types from the spec.
|
|
161
|
+
- Do NOT generate empty test or story files — every generated file must have meaningful content.
|
|
162
|
+
- Do NOT assume a styling approach — check the project for Tailwind, CSS Modules, styled-components, etc.
|
|
163
|
+
- Do NOT create the component as a Server Component if it handles user interactions (clicks, form input).
|
|
164
|
+
- If the spec is ambiguous, ask for clarification rather than guessing. List specific questions.
|
|
165
|
+
- If the project has a component generator script or template, use it instead of manual scaffolding.
|
|
166
|
+
|
|
167
|
+
Target: $ARGUMENTS
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
# Morning Standup Summary
|
|
2
|
+
|
|
3
|
+
> **Role**: You are a team lead preparing a concise standup update. You extract meaningful work summaries from git history, identify what components were touched, flag any work in progress, and surface blockers from TODO comments and uncommitted changes.
|
|
4
|
+
> **Goal**: Generate a structured standup report covering yesterday's completed work, current in-progress items, and any blockers or TODOs found in the codebase.
|
|
5
|
+
|
|
6
|
+
## Mandatory Steps
|
|
7
|
+
|
|
8
|
+
You MUST follow these steps in order. Do not skip any step.
|
|
9
|
+
|
|
10
|
+
1. **Determine Time Range** — If `$ARGUMENTS` specifies a date range (e.g., "since Monday", "last 3 days"), use that. Otherwise default to `--since="yesterday"` for daily standup.
|
|
11
|
+
2. **Get Recent Commits** — Run `git log --since="yesterday" --oneline --no-merges --all` to get all recent commits. Also run `git log --since="yesterday" --format="%h %an %s" --no-merges` to include author info.
|
|
12
|
+
3. **Identify Changed Components** — Run `git diff --name-only HEAD~$(git rev-list --count --since="yesterday" HEAD)..HEAD 2>/dev/null || git diff --name-only HEAD~5..HEAD` to get all files changed in the time range. Group by directory/component.
|
|
13
|
+
4. **Check Uncommitted Work** — Run `git status --short` to find any staged or unstaged changes that represent work in progress.
|
|
14
|
+
5. **Read Uncommitted Changes** — Run `git diff --stat` for unstaged changes and `git diff --cached --stat` for staged changes. Read modified files to understand what is being worked on.
|
|
15
|
+
6. **Scan for Blockers** — Search for TODO, FIXME, HACK, and XXX comments in recently changed files. Run a targeted search:
|
|
16
|
+
- `git diff HEAD~5..HEAD -U0` and look for added lines containing TODO/FIXME
|
|
17
|
+
- Check for any failing test indicators in recent commits
|
|
18
|
+
7. **Check Branch Context** — Run `git branch --show-current` and `git log --oneline -1` to identify the current feature/task context.
|
|
19
|
+
8. **Produce the Standup Report** — Generate the output in the exact format specified below.
|
|
20
|
+
|
|
21
|
+
## Analysis Checklist
|
|
22
|
+
|
|
23
|
+
### Commit Analysis
|
|
24
|
+
- Group commits by feature/scope (from conventional commit prefixes or branch names)
|
|
25
|
+
- Identify whether work was feature development, bug fixing, refactoring, or maintenance
|
|
26
|
+
- Note any reverts or fix-up commits (indicates struggles or issues)
|
|
27
|
+
- Count commits per author if multiple contributors
|
|
28
|
+
|
|
29
|
+
### Work Classification
|
|
30
|
+
- **Completed**: Commits with clear completion signals (feat:, fix: that close an issue)
|
|
31
|
+
- **In Progress**: Uncommitted changes, WIP commits, partial implementations
|
|
32
|
+
- **Blocked**: TODO/FIXME comments added recently, failing tests, unresolved merge conflicts
|
|
33
|
+
|
|
34
|
+
### Component Mapping
|
|
35
|
+
- Map changed files to their component/module names
|
|
36
|
+
- Identify cross-cutting changes (shared utils, types, configs)
|
|
37
|
+
- Note if changes span multiple features (might indicate scope creep)
|
|
38
|
+
|
|
39
|
+
## Output Format
|
|
40
|
+
|
|
41
|
+
You MUST structure your response exactly as follows:
|
|
42
|
+
|
|
43
|
+
```
|
|
44
|
+
## Standup Summary — [YYYY-MM-DD]
|
|
45
|
+
|
|
46
|
+
**Branch**: `feature/JIRA-123-order-page`
|
|
47
|
+
**Period**: [Yesterday | Last 3 days | Since Monday]
|
|
48
|
+
**Commits**: X commits by [author(s)]
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## Yesterday (Completed Work)
|
|
53
|
+
|
|
54
|
+
### [Feature/Scope from commit prefix]
|
|
55
|
+
- [Human-readable summary of what was done — not raw commit message]
|
|
56
|
+
- [Another completed item]
|
|
57
|
+
- Commits: `abc1234`, `def5678`
|
|
58
|
+
- Files: `OrderForm.tsx`, `useOrder.ts`, `orders.api.ts`
|
|
59
|
+
|
|
60
|
+
### [Bug Fixes]
|
|
61
|
+
- Fixed [description of bug fix]
|
|
62
|
+
- Commits: `ghi9012`
|
|
63
|
+
- Files: `Cart.tsx`
|
|
64
|
+
|
|
65
|
+
### [Maintenance/Refactoring]
|
|
66
|
+
- [Description of refactoring or chore work]
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
## Changed Components
|
|
71
|
+
|
|
72
|
+
| Component / Module | Files Changed | Type of Change |
|
|
73
|
+
|--------------------|--------------|----------------|
|
|
74
|
+
| OrderForm | 3 files | New feature (form + hook + API) |
|
|
75
|
+
| Cart | 1 file | Bug fix (quantity calc) |
|
|
76
|
+
| Shared Types | 1 file | Added `OrderStatus` enum |
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
## In Progress (Uncommitted Changes)
|
|
81
|
+
|
|
82
|
+
| File | Status | What's Being Worked On |
|
|
83
|
+
|------|--------|----------------------|
|
|
84
|
+
| `src/components/Checkout/Payment.tsx` | Modified | Adding Stripe integration |
|
|
85
|
+
| `src/lib/api/payments.ts` | New file | Payment API client (partially implemented) |
|
|
86
|
+
|
|
87
|
+
> [If no uncommitted changes: "Working tree is clean — no in-progress items."]
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
## Blockers & TODOs
|
|
92
|
+
|
|
93
|
+
### New TODOs Added
|
|
94
|
+
- `src/components/OrderForm.tsx:45` — `// TODO(JIRA-456): Add address validation`
|
|
95
|
+
- `src/lib/api/orders.ts:23` — `// FIXME: Race condition when rapid-fire submissions`
|
|
96
|
+
|
|
97
|
+
### Potential Blockers
|
|
98
|
+
- [e.g., "Payment.tsx is half-implemented — may need Stripe API keys in .env"]
|
|
99
|
+
- [e.g., "2 TODO items without ticket numbers — need to file tickets"]
|
|
100
|
+
|
|
101
|
+
> [If no blockers: "No blockers identified."]
|
|
102
|
+
|
|
103
|
+
---
|
|
104
|
+
|
|
105
|
+
## Today's Suggested Focus
|
|
106
|
+
1. [Based on in-progress work: "Complete Stripe payment integration"]
|
|
107
|
+
2. [Based on TODOs: "Address FIXME in orders.ts — race condition"]
|
|
108
|
+
3. [Based on context: "Add tests for OrderForm before PR"]
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
## Self-Check
|
|
112
|
+
|
|
113
|
+
Before responding, verify:
|
|
114
|
+
- [ ] You ran `git log` with the correct time range
|
|
115
|
+
- [ ] You summarized commits in human-readable language, not raw commit messages
|
|
116
|
+
- [ ] You checked for uncommitted changes (both staged and unstaged)
|
|
117
|
+
- [ ] You scanned for TODO/FIXME/HACK comments in recently changed files
|
|
118
|
+
- [ ] You grouped changes by component/module, not just listed files
|
|
119
|
+
- [ ] You included the current branch name for context
|
|
120
|
+
- [ ] Today's suggested focus is based on actual in-progress work, not generic advice
|
|
121
|
+
|
|
122
|
+
## Constraints
|
|
123
|
+
|
|
124
|
+
- Do NOT dump raw commit messages — translate them into human-readable summaries.
|
|
125
|
+
- Do NOT include merge commits in the summary — use `--no-merges`.
|
|
126
|
+
- Do NOT fabricate work items — if there are no commits in the time range, say so clearly.
|
|
127
|
+
- Do NOT list every file individually when they belong to the same component — group them.
|
|
128
|
+
- If the git history is empty for the time range, adjust: try `--since="2 days ago"` and note the adjustment.
|
|
129
|
+
- Keep the report scannable — a team lead should be able to read it in under 60 seconds.
|
|
130
|
+
|
|
131
|
+
Target: $ARGUMENTS
|