@nomad-e/bluma-cli 0.1.18 → 0.1.19
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/config/skills/git-commit/LICENSE.txt +18 -0
- package/dist/config/skills/git-commit/SKILL.md +258 -0
- package/dist/config/skills/git-commit/references/REFERENCE.md +249 -0
- package/dist/config/skills/git-commit/scripts/validate_commit_msg.py +163 -0
- package/dist/config/skills/git-pr/LICENSE.txt +18 -0
- package/dist/config/skills/git-pr/SKILL.md +293 -0
- package/dist/config/skills/git-pr/references/REFERENCE.md +256 -0
- package/dist/config/skills/git-pr/scripts/validate_commits.py +112 -0
- package/dist/config/skills/pdf/LICENSE.txt +26 -0
- package/dist/config/skills/pdf/SKILL.md +327 -0
- package/dist/config/skills/pdf/references/FORMS.md +69 -0
- package/dist/config/skills/pdf/references/REFERENCE.md +52 -0
- package/dist/config/skills/pdf/scripts/create_report.py +59 -0
- package/dist/config/skills/pdf/scripts/merge_pdfs.py +39 -0
- package/dist/config/skills/skill-creator/LICENSE.txt +26 -0
- package/dist/config/skills/skill-creator/SKILL.md +229 -0
- package/dist/config/skills/xlsx/LICENSE.txt +18 -0
- package/dist/config/skills/xlsx/SKILL.md +298 -0
- package/dist/config/skills/xlsx/references/REFERENCE.md +337 -0
- package/dist/config/skills/xlsx/scripts/office/__init__.py +2 -0
- package/dist/config/skills/xlsx/scripts/office/__pycache__/__init__.cpython-312.pyc +0 -0
- package/dist/config/skills/xlsx/scripts/office/__pycache__/pack.cpython-312.pyc +0 -0
- package/dist/config/skills/xlsx/scripts/office/__pycache__/soffice.cpython-312.pyc +0 -0
- package/dist/config/skills/xlsx/scripts/office/__pycache__/unpack.cpython-312.pyc +0 -0
- package/dist/config/skills/xlsx/scripts/office/__pycache__/validate.cpython-312.pyc +0 -0
- package/dist/config/skills/xlsx/scripts/office/pack.py +58 -0
- package/dist/config/skills/xlsx/scripts/office/soffice.py +180 -0
- package/dist/config/skills/xlsx/scripts/office/unpack.py +63 -0
- package/dist/config/skills/xlsx/scripts/office/validate.py +122 -0
- package/dist/config/skills/xlsx/scripts/recalc.py +143 -0
- package/dist/main.js +187 -46
- package/package.json +1 -1
- package/dist/config/example.bluma-mcp.json.txt +0 -14
- package/dist/config/models_config.json +0 -78
- package/dist/skills/git-conventional/LICENSE.txt +0 -3
- package/dist/skills/git-conventional/SKILL.md +0 -83
- package/dist/skills/skill-creator/SKILL.md +0 -495
- package/dist/skills/testing/LICENSE.txt +0 -3
- package/dist/skills/testing/SKILL.md +0 -114
|
@@ -0,0 +1,293 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: git-pr
|
|
3
|
+
description: >
|
|
4
|
+
Use this skill for any task involving Git commits, pull requests, or code
|
|
5
|
+
review preparation. Triggers include: "commit", "create a PR", "pull request",
|
|
6
|
+
"open a PR", "prepare a merge request", "push changes", "commit my work",
|
|
7
|
+
"stage and commit", "git push", "submit for review", "create MR", or any
|
|
8
|
+
request to finalize, package, or submit code changes for review. Also use
|
|
9
|
+
when asked to write commit messages or PR descriptions.
|
|
10
|
+
license: Proprietary. LICENSE.txt has complete terms
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# Git PR & Commit — Professional Workflow
|
|
14
|
+
|
|
15
|
+
## Overview
|
|
16
|
+
|
|
17
|
+
This skill produces **production-grade** commits and pull requests with
|
|
18
|
+
consistent structure, meaningful descriptions, and full traceability.
|
|
19
|
+
Every commit and PR carries a BluMa watermark for auditability.
|
|
20
|
+
|
|
21
|
+
For advanced patterns (monorepo PRs, release PRs, hotfix workflows),
|
|
22
|
+
see references/REFERENCE.md.
|
|
23
|
+
|
|
24
|
+
## Commit Workflow
|
|
25
|
+
|
|
26
|
+
### Step 1: Inspect Changes
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
git status --short
|
|
30
|
+
git diff --staged --stat
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
If nothing is staged, stage the relevant files first:
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
git add <files>
|
|
37
|
+
# or
|
|
38
|
+
git add -A
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Review what will be committed:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
git diff --staged
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### Step 2: Determine Commit Type
|
|
48
|
+
|
|
49
|
+
| Prefix | When to use |
|
|
50
|
+
|--------|-------------|
|
|
51
|
+
| `feat` | New feature or capability |
|
|
52
|
+
| `fix` | Bug fix |
|
|
53
|
+
| `refactor` | Code restructuring without behavior change |
|
|
54
|
+
| `docs` | Documentation only |
|
|
55
|
+
| `test` | Adding or updating tests |
|
|
56
|
+
| `perf` | Performance improvement |
|
|
57
|
+
| `style` | Formatting, whitespace, linting (no logic change) |
|
|
58
|
+
| `chore` | Build, CI, dependencies, tooling |
|
|
59
|
+
| `security` | Security fix or hardening |
|
|
60
|
+
| `revert` | Reverting a previous commit |
|
|
61
|
+
|
|
62
|
+
### Step 3: Write the Commit Message
|
|
63
|
+
|
|
64
|
+
Format:
|
|
65
|
+
|
|
66
|
+
```
|
|
67
|
+
<type>(<scope>): <subject>
|
|
68
|
+
|
|
69
|
+
<body>
|
|
70
|
+
|
|
71
|
+
<footer>
|
|
72
|
+
|
|
73
|
+
Generated-by: BluMa — Base Language Unit · Model Agent
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Rules:
|
|
77
|
+
- **Subject line**: imperative mood, lowercase, no period, max 72 chars.
|
|
78
|
+
- Good: `feat(auth): add JWT refresh token rotation`
|
|
79
|
+
- Bad: `Added JWT refresh token rotation.`
|
|
80
|
+
- **Scope**: the module, component, or area affected (optional but preferred).
|
|
81
|
+
- **Body**: explain WHY the change was made, not WHAT (the diff shows what).
|
|
82
|
+
Wrap at 72 chars. Leave a blank line after subject.
|
|
83
|
+
- **Footer**: reference issues (`Closes #123`, `Refs #456`), note breaking
|
|
84
|
+
changes (`BREAKING CHANGE: ...`).
|
|
85
|
+
- **Watermark**: always include the `Generated-by` trailer as the last line.
|
|
86
|
+
|
|
87
|
+
### Step 4: Execute the Commit
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
git commit -m "<type>(<scope>): <subject>
|
|
91
|
+
|
|
92
|
+
<body>
|
|
93
|
+
|
|
94
|
+
Closes #<issue>
|
|
95
|
+
|
|
96
|
+
Generated-by: BluMa — Base Language Unit · Model Agent"
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
For multi-line messages, prefer heredoc:
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
git commit -m "$(cat <<'EOF'
|
|
103
|
+
feat(pdf): add CSV-to-PDF report generation
|
|
104
|
+
|
|
105
|
+
Implement create_report.py script that reads CSV data and produces
|
|
106
|
+
a formatted PDF report using reportlab. Supports custom titles and
|
|
107
|
+
outputs to the artifacts directory.
|
|
108
|
+
|
|
109
|
+
- Added scripts/create_report.py with argparse CLI
|
|
110
|
+
- Table styling with header highlighting and grid borders
|
|
111
|
+
- Automatic page sizing based on data volume
|
|
112
|
+
|
|
113
|
+
Closes #42
|
|
114
|
+
|
|
115
|
+
Generated-by: BluMa — Base Language Unit · Model Agent
|
|
116
|
+
EOF
|
|
117
|
+
)"
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
## Pull Request Workflow
|
|
121
|
+
|
|
122
|
+
### Step 1: Ensure Clean Branch State
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
git log --oneline main..HEAD
|
|
126
|
+
git diff main..HEAD --stat
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
Verify:
|
|
130
|
+
- All commits follow Conventional Commits (see above).
|
|
131
|
+
- No untracked or unstaged changes remain.
|
|
132
|
+
- Branch is up to date with the target branch.
|
|
133
|
+
|
|
134
|
+
### Step 2: Push the Branch
|
|
135
|
+
|
|
136
|
+
```bash
|
|
137
|
+
git push -u origin HEAD
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
### Step 3: Analyze All Changes for the PR
|
|
141
|
+
|
|
142
|
+
Read every commit since divergence from the target branch:
|
|
143
|
+
|
|
144
|
+
```bash
|
|
145
|
+
git log main..HEAD --format="%h %s"
|
|
146
|
+
git diff main..HEAD
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
Understand the full scope of changes — not just the last commit, but ALL
|
|
150
|
+
commits that will be included. This is critical for writing an accurate
|
|
151
|
+
PR description.
|
|
152
|
+
|
|
153
|
+
### Step 4: Generate the PR Description
|
|
154
|
+
|
|
155
|
+
Use this template exactly. Fill every section. Do not skip sections — mark
|
|
156
|
+
them as "N/A" if they do not apply.
|
|
157
|
+
|
|
158
|
+
```markdown
|
|
159
|
+
## Description
|
|
160
|
+
<!-- 2-5 sentences explaining WHAT changed and WHY -->
|
|
161
|
+
|
|
162
|
+
{Concise but complete description of the changes. Focus on the problem
|
|
163
|
+
being solved and the approach taken. Mention any design decisions or
|
|
164
|
+
trade-offs made.}
|
|
165
|
+
|
|
166
|
+
## Related Issue
|
|
167
|
+
|
|
168
|
+
Closes #{issue_number}
|
|
169
|
+
|
|
170
|
+
## Type of Change
|
|
171
|
+
|
|
172
|
+
- [ ] Bug fix (non-breaking change which fixes an issue)
|
|
173
|
+
- [ ] New feature (non-breaking change which adds functionality)
|
|
174
|
+
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
|
|
175
|
+
- [ ] Documentation update
|
|
176
|
+
- [ ] Refactoring (no functional changes)
|
|
177
|
+
- [ ] Performance improvement
|
|
178
|
+
- [ ] Code cleanup
|
|
179
|
+
- [ ] Security fix
|
|
180
|
+
|
|
181
|
+
## Changes Made
|
|
182
|
+
|
|
183
|
+
{Bullet list of specific changes, organized by file or module:}
|
|
184
|
+
|
|
185
|
+
- **module/file.ts**: Description of change
|
|
186
|
+
- **module/other.ts**: Description of change
|
|
187
|
+
|
|
188
|
+
## Testing
|
|
189
|
+
|
|
190
|
+
- [ ] Manual testing completed
|
|
191
|
+
- [ ] Functionality verified in development environment
|
|
192
|
+
- [ ] No breaking changes introduced
|
|
193
|
+
- [ ] Edge cases considered and tested
|
|
194
|
+
- [ ] Tested with different scenarios (if applicable)
|
|
195
|
+
|
|
196
|
+
{Describe specific test scenarios and results:}
|
|
197
|
+
|
|
198
|
+
1. **Scenario**: {what was tested}
|
|
199
|
+
**Result**: {what happened}
|
|
200
|
+
|
|
201
|
+
## Breaking Changes
|
|
202
|
+
|
|
203
|
+
{If any, describe what breaks and how to migrate. If none, write "None."}
|
|
204
|
+
|
|
205
|
+
## Screenshots (if applicable)
|
|
206
|
+
|
|
207
|
+
{Add screenshots for UI changes. If none, write "N/A."}
|
|
208
|
+
|
|
209
|
+
## Checklist
|
|
210
|
+
|
|
211
|
+
- [ ] Code follows the project's style guidelines
|
|
212
|
+
- [ ] Self-review of code completed
|
|
213
|
+
- [ ] Hard-to-understand areas are commented
|
|
214
|
+
- [ ] Documentation updated (if applicable)
|
|
215
|
+
- [ ] No new warnings generated
|
|
216
|
+
- [ ] Changes tested thoroughly
|
|
217
|
+
- [ ] Dependent changes merged and published
|
|
218
|
+
|
|
219
|
+
## Additional Notes
|
|
220
|
+
|
|
221
|
+
{Any context, concerns, follow-up tasks, or questions for reviewers.}
|
|
222
|
+
|
|
223
|
+
---
|
|
224
|
+
|
|
225
|
+
> *Generated by [BluMa — Base Language Unit · Model Agent](https://github.com/Nomad-e/bluma-cli)*
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
### Step 5: Create the PR
|
|
229
|
+
|
|
230
|
+
```bash
|
|
231
|
+
gh pr create \
|
|
232
|
+
--title "<type>(<scope>): <subject>" \
|
|
233
|
+
--body "$(cat <<'EOF'
|
|
234
|
+
<full PR body from Step 4>
|
|
235
|
+
EOF
|
|
236
|
+
)"
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
The PR title MUST follow the same Conventional Commits format as commit
|
|
240
|
+
subjects. If the PR contains multiple commits of different types, use the
|
|
241
|
+
most significant type (feat > fix > refactor > chore).
|
|
242
|
+
|
|
243
|
+
### Step 6: Verify
|
|
244
|
+
|
|
245
|
+
```bash
|
|
246
|
+
gh pr view --web
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
Confirm the PR looks correct in the browser.
|
|
250
|
+
|
|
251
|
+
## Quality Standards
|
|
252
|
+
|
|
253
|
+
Every PR generated by BluMa must:
|
|
254
|
+
|
|
255
|
+
1. Have a title in Conventional Commits format.
|
|
256
|
+
2. Include a complete description with all template sections filled.
|
|
257
|
+
3. Reference the related issue (if one exists).
|
|
258
|
+
4. Mark the correct "Type of Change" checkboxes.
|
|
259
|
+
5. List specific changes made, organized by file/module.
|
|
260
|
+
6. Describe testing scenarios and results.
|
|
261
|
+
7. Document breaking changes (or explicitly state "None").
|
|
262
|
+
8. Include the BluMa watermark at the bottom.
|
|
263
|
+
9. Have all checklist items reviewed (checked or unchecked with justification).
|
|
264
|
+
|
|
265
|
+
## Watermarks
|
|
266
|
+
|
|
267
|
+
**Commit trailer** (last line of every commit message):
|
|
268
|
+
```
|
|
269
|
+
Generated-by: BluMa — Base Language Unit · Model Agent
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
**PR footer** (last line of every PR body):
|
|
273
|
+
```markdown
|
|
274
|
+
---
|
|
275
|
+
|
|
276
|
+
> *Generated by [BluMa — Base Language Unit · Model Agent](https://github.com/Nomad-e/bluma-cli)*
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
These watermarks provide auditability and attribution. They MUST be present
|
|
280
|
+
in every commit and PR generated by BluMa, with no exceptions.
|
|
281
|
+
|
|
282
|
+
## Available References
|
|
283
|
+
|
|
284
|
+
- REFERENCE.md: Advanced patterns (monorepo PRs, release PRs, hotfix workflows, PR labels, reviewer assignment)
|
|
285
|
+
|
|
286
|
+
## Available Scripts
|
|
287
|
+
|
|
288
|
+
- validate_commits.py: Validates that all commits in a range follow Conventional Commits format
|
|
289
|
+
|
|
290
|
+
## Next Steps
|
|
291
|
+
|
|
292
|
+
- For advanced PR workflows, see references/REFERENCE.md
|
|
293
|
+
- To validate commits before creating a PR, run scripts/validate_commits.py
|
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
# Git PR — Advanced Patterns Reference
|
|
2
|
+
|
|
3
|
+
## Monorepo Pull Requests
|
|
4
|
+
|
|
5
|
+
When working in a monorepo, PRs should be scoped to a single package or
|
|
6
|
+
service when possible.
|
|
7
|
+
|
|
8
|
+
### Title Convention
|
|
9
|
+
|
|
10
|
+
```
|
|
11
|
+
feat(packages/auth): add PKCE support for OAuth2 flow
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
### Description Structure
|
|
15
|
+
|
|
16
|
+
Add a **Scope** section after Description:
|
|
17
|
+
|
|
18
|
+
```markdown
|
|
19
|
+
## Scope
|
|
20
|
+
|
|
21
|
+
This PR affects only the `packages/auth` module. No changes to other
|
|
22
|
+
packages.
|
|
23
|
+
|
|
24
|
+
### Packages Modified
|
|
25
|
+
- `packages/auth` — Core changes
|
|
26
|
+
- `packages/shared-types` — Updated `AuthConfig` interface
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
### Cross-Package Dependencies
|
|
30
|
+
|
|
31
|
+
If the PR touches multiple packages, list the dependency graph:
|
|
32
|
+
|
|
33
|
+
```markdown
|
|
34
|
+
## Cross-Package Impact
|
|
35
|
+
|
|
36
|
+
```
|
|
37
|
+
packages/auth (changed)
|
|
38
|
+
└── packages/shared-types (interface update)
|
|
39
|
+
└── packages/api (consumer — no code changes, recompile needed)
|
|
40
|
+
```
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Release Pull Requests
|
|
44
|
+
|
|
45
|
+
Release PRs aggregate multiple feature/fix PRs into a versioned release.
|
|
46
|
+
|
|
47
|
+
### Title Format
|
|
48
|
+
|
|
49
|
+
```
|
|
50
|
+
chore(release): v2.4.0
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### Body Template Addition
|
|
54
|
+
|
|
55
|
+
Add a **Changelog** section:
|
|
56
|
+
|
|
57
|
+
```markdown
|
|
58
|
+
## Changelog
|
|
59
|
+
|
|
60
|
+
### Features
|
|
61
|
+
- feat(auth): add JWT refresh token rotation (#123)
|
|
62
|
+
- feat(pdf): add CSV-to-PDF report generation (#125)
|
|
63
|
+
|
|
64
|
+
### Bug Fixes
|
|
65
|
+
- fix(agent): handle empty tool responses gracefully (#124)
|
|
66
|
+
|
|
67
|
+
### Breaking Changes
|
|
68
|
+
- BREAKING: `AuthConfig.tokenExpiry` renamed to `AuthConfig.accessTokenTTL` (#123)
|
|
69
|
+
|
|
70
|
+
### Migration Guide
|
|
71
|
+
1. Update all references to `tokenExpiry` → `accessTokenTTL`
|
|
72
|
+
2. Set `refreshTokenTTL` (new required field, default: 7d)
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## Hotfix Pull Requests
|
|
76
|
+
|
|
77
|
+
Hotfixes bypass the normal development flow and go directly to production.
|
|
78
|
+
|
|
79
|
+
### Branch Naming
|
|
80
|
+
|
|
81
|
+
```
|
|
82
|
+
hotfix/<issue-id>-<short-description>
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
Example: `hotfix/456-fix-auth-crash`
|
|
86
|
+
|
|
87
|
+
### Title Format
|
|
88
|
+
|
|
89
|
+
```
|
|
90
|
+
fix(auth): prevent null pointer on expired session [HOTFIX]
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
### Additional Body Sections
|
|
94
|
+
|
|
95
|
+
```markdown
|
|
96
|
+
## Hotfix Justification
|
|
97
|
+
|
|
98
|
+
**Severity**: Critical / High / Medium
|
|
99
|
+
**Impact**: {describe user impact}
|
|
100
|
+
**Root Cause**: {brief root cause analysis}
|
|
101
|
+
**Temporary or Permanent**: {is this a permanent fix or a stopgap?}
|
|
102
|
+
|
|
103
|
+
## Rollback Plan
|
|
104
|
+
|
|
105
|
+
1. Revert commit {hash}
|
|
106
|
+
2. Redeploy previous version {tag}
|
|
107
|
+
3. Verify via {health check endpoint}
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
## PR Labels
|
|
111
|
+
|
|
112
|
+
Suggest appropriate labels based on the change type:
|
|
113
|
+
|
|
114
|
+
| Change Type | Suggested Labels |
|
|
115
|
+
|-------------|-----------------|
|
|
116
|
+
| Bug fix | `bug`, `priority:high` (if critical) |
|
|
117
|
+
| New feature | `enhancement`, `feature` |
|
|
118
|
+
| Breaking change | `breaking-change`, `major` |
|
|
119
|
+
| Documentation | `documentation` |
|
|
120
|
+
| Refactoring | `refactoring`, `tech-debt` |
|
|
121
|
+
| Performance | `performance`, `optimization` |
|
|
122
|
+
| Security | `security`, `priority:critical` |
|
|
123
|
+
| Dependencies | `dependencies`, `chore` |
|
|
124
|
+
|
|
125
|
+
When using `gh pr create`, add labels:
|
|
126
|
+
|
|
127
|
+
```bash
|
|
128
|
+
gh pr create \
|
|
129
|
+
--title "feat(auth): add MFA support" \
|
|
130
|
+
--label "enhancement" \
|
|
131
|
+
--label "feature" \
|
|
132
|
+
--body "..."
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
## Reviewer Assignment
|
|
136
|
+
|
|
137
|
+
Suggest reviewers based on files changed:
|
|
138
|
+
|
|
139
|
+
```bash
|
|
140
|
+
# Find who has most commits in the changed files
|
|
141
|
+
git log --format='%an' -- <changed-files> | sort | uniq -c | sort -rn | head -5
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
Add reviewers when creating the PR:
|
|
145
|
+
|
|
146
|
+
```bash
|
|
147
|
+
gh pr create \
|
|
148
|
+
--title "..." \
|
|
149
|
+
--reviewer "username1,username2" \
|
|
150
|
+
--body "..."
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
## Draft Pull Requests
|
|
154
|
+
|
|
155
|
+
For work-in-progress changes, create draft PRs:
|
|
156
|
+
|
|
157
|
+
```bash
|
|
158
|
+
gh pr create \
|
|
159
|
+
--title "feat(agent): implement streaming responses" \
|
|
160
|
+
--draft \
|
|
161
|
+
--body "..."
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
Add a **Status** section to draft PR bodies:
|
|
165
|
+
|
|
166
|
+
```markdown
|
|
167
|
+
## Status
|
|
168
|
+
|
|
169
|
+
🚧 **Work in Progress** — Do not merge
|
|
170
|
+
|
|
171
|
+
### Completed
|
|
172
|
+
- [x] Core streaming implementation
|
|
173
|
+
- [x] Token-by-token output
|
|
174
|
+
|
|
175
|
+
### Remaining
|
|
176
|
+
- [ ] Error handling for stream interruption
|
|
177
|
+
- [ ] Unit tests
|
|
178
|
+
- [ ] Documentation update
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
## Stacked Pull Requests
|
|
182
|
+
|
|
183
|
+
For large features, break into smaller, reviewable PRs:
|
|
184
|
+
|
|
185
|
+
### Naming Convention
|
|
186
|
+
|
|
187
|
+
```
|
|
188
|
+
feat(auth)/1-data-models
|
|
189
|
+
feat(auth)/2-api-endpoints
|
|
190
|
+
feat(auth)/3-frontend-ui
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
### Body Addition
|
|
194
|
+
|
|
195
|
+
```markdown
|
|
196
|
+
## PR Stack
|
|
197
|
+
|
|
198
|
+
This is PR **2 of 3** in the auth feature stack.
|
|
199
|
+
|
|
200
|
+
| # | PR | Status |
|
|
201
|
+
|---|---|--------|
|
|
202
|
+
| 1 | #100 — Data models | ✅ Merged |
|
|
203
|
+
| 2 | #101 — API endpoints (this PR) | 🔄 In Review |
|
|
204
|
+
| 3 | #102 — Frontend UI | ⏳ Blocked on #101 |
|
|
205
|
+
|
|
206
|
+
**Base branch**: `feat/auth-1-data-models` (not `main`)
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
## Commit Squashing Strategy
|
|
210
|
+
|
|
211
|
+
Before creating a PR, consider squashing noisy commits:
|
|
212
|
+
|
|
213
|
+
### When to Squash
|
|
214
|
+
- Multiple "fix typo" or "WIP" commits
|
|
215
|
+
- Commits that only fix linting or formatting
|
|
216
|
+
- Commits that undo then redo changes
|
|
217
|
+
|
|
218
|
+
### When NOT to Squash
|
|
219
|
+
- Each commit represents a logical, reviewable unit
|
|
220
|
+
- Commit history tells a useful story of the implementation
|
|
221
|
+
- Different commits affect different modules
|
|
222
|
+
|
|
223
|
+
### Interactive Rebase (manual, not for BluMa to run automatically)
|
|
224
|
+
|
|
225
|
+
```bash
|
|
226
|
+
git rebase -i main
|
|
227
|
+
# Mark commits as 'squash' or 'fixup'
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
Note: BluMa should NOT automatically rebase or squash. Instead, suggest
|
|
231
|
+
it to the user when appropriate.
|
|
232
|
+
|
|
233
|
+
## Multi-Issue PRs
|
|
234
|
+
|
|
235
|
+
When a PR addresses multiple issues:
|
|
236
|
+
|
|
237
|
+
```markdown
|
|
238
|
+
## Related Issues
|
|
239
|
+
|
|
240
|
+
Closes #123
|
|
241
|
+
Closes #125
|
|
242
|
+
Refs #130 (partial — remaining work tracked separately)
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
## PR Size Guidelines
|
|
246
|
+
|
|
247
|
+
| Size | Files Changed | Lines Changed | Review Time |
|
|
248
|
+
|------|--------------|---------------|-------------|
|
|
249
|
+
| XS | 1-2 | < 50 | 10 min |
|
|
250
|
+
| S | 3-5 | 50-200 | 30 min |
|
|
251
|
+
| M | 6-10 | 200-500 | 1 hour |
|
|
252
|
+
| L | 11-20 | 500-1000 | 2+ hours |
|
|
253
|
+
| XL | 20+ | 1000+ | Split recommended |
|
|
254
|
+
|
|
255
|
+
If a PR exceeds **L** size, BluMa should suggest splitting it into
|
|
256
|
+
stacked PRs (see above).
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""
|
|
3
|
+
Validate that commits in a given range follow Conventional Commits format
|
|
4
|
+
and include the BluMa watermark trailer.
|
|
5
|
+
|
|
6
|
+
Usage:
|
|
7
|
+
python validate_commits.py [base_branch]
|
|
8
|
+
|
|
9
|
+
Arguments:
|
|
10
|
+
base_branch Target branch to compare against (default: main)
|
|
11
|
+
|
|
12
|
+
Exit codes:
|
|
13
|
+
0 All commits are valid
|
|
14
|
+
1 One or more commits have issues
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
import subprocess
|
|
18
|
+
import sys
|
|
19
|
+
import re
|
|
20
|
+
|
|
21
|
+
CONVENTIONAL_PATTERN = re.compile(
|
|
22
|
+
r'^(feat|fix|refactor|docs|test|perf|style|chore|security|revert)'
|
|
23
|
+
r'(\([a-zA-Z0-9_/.-]+\))?'
|
|
24
|
+
r'!?:\s.{1,72}$'
|
|
25
|
+
)
|
|
26
|
+
|
|
27
|
+
WATERMARK = "Generated-by: BluMa"
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
def get_commits(base: str) -> list[dict]:
|
|
31
|
+
result = subprocess.run(
|
|
32
|
+
["git", "log", f"{base}..HEAD", "--format=%H|||%s|||%b%n---END---"],
|
|
33
|
+
capture_output=True, text=True
|
|
34
|
+
)
|
|
35
|
+
if result.returncode != 0:
|
|
36
|
+
print(f"Error running git log: {result.stderr.strip()}")
|
|
37
|
+
sys.exit(1)
|
|
38
|
+
|
|
39
|
+
raw = result.stdout.strip()
|
|
40
|
+
if not raw:
|
|
41
|
+
return []
|
|
42
|
+
|
|
43
|
+
commits = []
|
|
44
|
+
for block in raw.split("---END---"):
|
|
45
|
+
block = block.strip()
|
|
46
|
+
if not block:
|
|
47
|
+
continue
|
|
48
|
+
parts = block.split("|||", 2)
|
|
49
|
+
if len(parts) >= 2:
|
|
50
|
+
commits.append({
|
|
51
|
+
"hash": parts[0].strip()[:8],
|
|
52
|
+
"subject": parts[1].strip(),
|
|
53
|
+
"body": parts[2].strip() if len(parts) > 2 else ""
|
|
54
|
+
})
|
|
55
|
+
return commits
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
def validate(commits: list[dict]) -> list[str]:
|
|
59
|
+
issues = []
|
|
60
|
+
|
|
61
|
+
for c in commits:
|
|
62
|
+
h = c["hash"]
|
|
63
|
+
subj = c["subject"]
|
|
64
|
+
|
|
65
|
+
if not CONVENTIONAL_PATTERN.match(subj):
|
|
66
|
+
issues.append(
|
|
67
|
+
f" [{h}] Subject does not follow Conventional Commits: \"{subj}\""
|
|
68
|
+
)
|
|
69
|
+
|
|
70
|
+
if len(subj) > 72:
|
|
71
|
+
issues.append(
|
|
72
|
+
f" [{h}] Subject exceeds 72 chars ({len(subj)}): \"{subj}\""
|
|
73
|
+
)
|
|
74
|
+
|
|
75
|
+
if WATERMARK not in c["body"] and WATERMARK not in subj:
|
|
76
|
+
issues.append(
|
|
77
|
+
f" [{h}] Missing BluMa watermark trailer"
|
|
78
|
+
)
|
|
79
|
+
|
|
80
|
+
return issues
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
def main():
|
|
84
|
+
base = sys.argv[1] if len(sys.argv) > 1 else "main"
|
|
85
|
+
|
|
86
|
+
commits = get_commits(base)
|
|
87
|
+
if not commits:
|
|
88
|
+
print(f"No commits found between {base} and HEAD.")
|
|
89
|
+
sys.exit(0)
|
|
90
|
+
|
|
91
|
+
print(f"Validating {len(commits)} commit(s) against {base}...\n")
|
|
92
|
+
|
|
93
|
+
for c in commits:
|
|
94
|
+
status = "OK" if CONVENTIONAL_PATTERN.match(c["subject"]) else "WARN"
|
|
95
|
+
print(f" [{c['hash']}] {status}: {c['subject']}")
|
|
96
|
+
|
|
97
|
+
issues = validate(commits)
|
|
98
|
+
|
|
99
|
+
print()
|
|
100
|
+
if issues:
|
|
101
|
+
print(f"Found {len(issues)} issue(s):\n")
|
|
102
|
+
for issue in issues:
|
|
103
|
+
print(issue)
|
|
104
|
+
print("\nPlease fix the above before creating a PR.")
|
|
105
|
+
sys.exit(1)
|
|
106
|
+
else:
|
|
107
|
+
print("All commits are valid. Ready for PR.")
|
|
108
|
+
sys.exit(0)
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
if __name__ == "__main__":
|
|
112
|
+
main()
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
© 2026 NomadEngenuity LDA. All rights reserved.
|
|
2
|
+
|
|
3
|
+
LICENSE: Use of these materials (including all code, prompts, assets, files,
|
|
4
|
+
and other components of this Skill) is governed by your agreement with
|
|
5
|
+
NomadEngenuity LDA regarding use of NomadEngenuity LDA's services. If no
|
|
6
|
+
separate agreement exists, use is governed by NomadEngenuity LDA's applicable
|
|
7
|
+
Terms of Service.
|
|
8
|
+
|
|
9
|
+
ADDITIONAL RESTRICTIONS: Notwithstanding anything in the Agreement to the
|
|
10
|
+
contrary, users may not:
|
|
11
|
+
|
|
12
|
+
- Extract these materials from the Services or retain copies of these
|
|
13
|
+
materials outside the Services
|
|
14
|
+
- Reproduce or copy these materials, except for temporary copies created
|
|
15
|
+
automatically during authorized use of the Services
|
|
16
|
+
- Create derivative works based on these materials
|
|
17
|
+
- Distribute, sublicense, or transfer these materials to any third party
|
|
18
|
+
- Make, offer to sell, sell, or import any inventions embodied in these
|
|
19
|
+
materials
|
|
20
|
+
- Reverse engineer, decompile, or disassemble these materials
|
|
21
|
+
|
|
22
|
+
The receipt, viewing, or possession of these materials does not convey or
|
|
23
|
+
imply any license or right beyond those expressly granted above.
|
|
24
|
+
|
|
25
|
+
NomadEngenuity LDA retains all right, title, and interest in these materials,
|
|
26
|
+
including all copyrights, patents, and other intellectual property rights.
|