workflow-agent-cli 1.1.2
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/chunk-VFN3BY56.js +120 -0
- package/dist/chunk-VFN3BY56.js.map +1 -0
- package/dist/chunk-X2NQJ2ZY.js +170 -0
- package/dist/chunk-X2NQJ2ZY.js.map +1 -0
- package/dist/cli/index.d.ts +1 -0
- package/dist/cli/index.js +1206 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/config/index.d.ts +8 -0
- package/dist/config/index.js +11 -0
- package/dist/config/index.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +25 -0
- package/dist/index.js.map +1 -0
- package/dist/schema-CiJ4W7in.d.ts +97 -0
- package/dist/scripts/postinstall.d.ts +1 -0
- package/dist/scripts/postinstall.js +73 -0
- package/dist/scripts/postinstall.js.map +1 -0
- package/dist/validators/index.d.ts +16 -0
- package/dist/validators/index.js +17 -0
- package/dist/validators/index.js.map +1 -0
- package/package.json +80 -0
- package/templates/AGENT_EDITING_INSTRUCTIONS.md +887 -0
- package/templates/BRANCHING_STRATEGY.md +442 -0
- package/templates/COMPONENT_LIBRARY.md +611 -0
- package/templates/CUSTOM_SCOPE_TEMPLATE.md +228 -0
- package/templates/DEPLOYMENT_STRATEGY.md +509 -0
- package/templates/Guidelines.md +62 -0
- package/templates/LIBRARY_INVENTORY.md +615 -0
- package/templates/PROJECT_TEMPLATE_README.md +347 -0
- package/templates/SCOPE_CREATION_WORKFLOW.md +286 -0
- package/templates/SELF_IMPROVEMENT_MANDATE.md +298 -0
- package/templates/SINGLE_SOURCE_OF_TRUTH.md +492 -0
- package/templates/TESTING_STRATEGY.md +801 -0
- package/templates/_TEMPLATE_EXAMPLE.md +28 -0
|
@@ -0,0 +1,442 @@
|
|
|
1
|
+
# Branching Strategy
|
|
2
|
+
|
|
3
|
+
> **Purpose**: This document defines the Git branching strategy, naming conventions, PR requirements, and merge policies. Following these guidelines ensures a clean commit history and reliable releases.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Table of Contents
|
|
8
|
+
|
|
9
|
+
1. [Branch Types](#branch-types)
|
|
10
|
+
2. [Branch Naming Conventions](#branch-naming-conventions)
|
|
11
|
+
3. [PR Title Format](#pr-title-format)
|
|
12
|
+
4. [Allowed Scopes](#allowed-scopes)
|
|
13
|
+
5. [Merge Requirements](#merge-requirements)
|
|
14
|
+
6. [Workflow](#workflow)
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## Branch Types
|
|
19
|
+
|
|
20
|
+
| Branch Type | Purpose | Base Branch | Merges To |
|
|
21
|
+
| ------------ | ------------------------------------------ | ---------------- | --------------- |
|
|
22
|
+
| `main` | Production-ready code | - | - |
|
|
23
|
+
| `release/*` | Release candidates (e.g., `release/1.2.0`) | Feature branches | `main` |
|
|
24
|
+
| `feature/*` | New features | `main` | `release/*` |
|
|
25
|
+
| `bugfix/*` | Non-urgent bug fixes | `main` | `release/*` |
|
|
26
|
+
| `hotfix/*` | Urgent production fixes | `main` | `main` (direct) |
|
|
27
|
+
| `chore/*` | Maintenance tasks (deps, config) | `main` | `release/*` |
|
|
28
|
+
| `refactor/*` | Code refactoring (no new features) | `main` | `release/*` |
|
|
29
|
+
| `docs/*` | Documentation only | `main` | `release/*` |
|
|
30
|
+
| `test/*` | Test additions/improvements | `main` | `release/*` |
|
|
31
|
+
|
|
32
|
+
> **Important**: Only `release/*` and `hotfix/*` branches can merge directly to `main`. All other branch types must go through a release branch. See [Release Workflow](#release-workflow) for details.
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
## Branch Naming Conventions
|
|
37
|
+
|
|
38
|
+
### Format
|
|
39
|
+
|
|
40
|
+
```
|
|
41
|
+
<type>/<scope>/<short-description>
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### Rules
|
|
45
|
+
|
|
46
|
+
1. **Type**: Must be one of `feature`, `bugfix`, `hotfix`, `chore`, `refactor`, `docs`, `test`
|
|
47
|
+
2. **Scope**: Must be from the [allowed scopes list](#allowed-scopes)
|
|
48
|
+
3. **Description**: Lowercase, hyphen-separated, 2-5 words
|
|
49
|
+
|
|
50
|
+
### Examples
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
# Good branch names
|
|
54
|
+
feature/tasks/add-due-date-reminder
|
|
55
|
+
bugfix/auth/fix-session-expiry
|
|
56
|
+
hotfix/notifications/missing-toast-message
|
|
57
|
+
chore/deps/upgrade-next-to-16
|
|
58
|
+
refactor/boards/simplify-column-logic
|
|
59
|
+
docs/test/update-testing-guide
|
|
60
|
+
test/comments/add-mention-tests
|
|
61
|
+
|
|
62
|
+
# Bad branch names
|
|
63
|
+
feature/add-new-feature # Missing scope
|
|
64
|
+
FEATURE/tasks/add-reminder # Uppercase type
|
|
65
|
+
feature/tasks/AddDueDateReminder # CamelCase description
|
|
66
|
+
fix/authentication-bug # Wrong type (use bugfix)
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## PR Title Format
|
|
72
|
+
|
|
73
|
+
PR titles MUST follow the [Conventional Commits](https://www.conventionalcommits.org/) format.
|
|
74
|
+
|
|
75
|
+
### Format
|
|
76
|
+
|
|
77
|
+
```
|
|
78
|
+
<type>(<scope>): <description>
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### Rules
|
|
82
|
+
|
|
83
|
+
1. **Type**: One of: `feat`, `fix`, `refactor`, `chore`, `docs`, `test`, `perf`, `style`, `build`, `ci`
|
|
84
|
+
2. **Scope**: Must be from the [allowed scopes list](#allowed-scopes)
|
|
85
|
+
3. **Description**: Lowercase, imperative mood, no period at end
|
|
86
|
+
|
|
87
|
+
### Type Mapping (Branch → PR Title)
|
|
88
|
+
|
|
89
|
+
| Branch Type | PR Title Type |
|
|
90
|
+
| ------------ | ------------- |
|
|
91
|
+
| `feature/*` | `feat` |
|
|
92
|
+
| `bugfix/*` | `fix` |
|
|
93
|
+
| `hotfix/*` | `fix` |
|
|
94
|
+
| `chore/*` | `chore` |
|
|
95
|
+
| `refactor/*` | `refactor` |
|
|
96
|
+
| `docs/*` | `docs` |
|
|
97
|
+
| `test/*` | `test` |
|
|
98
|
+
|
|
99
|
+
### Examples
|
|
100
|
+
|
|
101
|
+
```
|
|
102
|
+
# Good PR titles
|
|
103
|
+
feat(tasks): add due date reminder notifications
|
|
104
|
+
fix(auth): resolve session expiry on page refresh
|
|
105
|
+
refactor(boards): simplify column drag-drop logic
|
|
106
|
+
chore(deps): upgrade Next.js to v16.2
|
|
107
|
+
docs(test): update unit testing examples
|
|
108
|
+
test(comments): add tests for @mention functionality
|
|
109
|
+
|
|
110
|
+
# Bad PR titles
|
|
111
|
+
Added due date reminders # Missing type and scope
|
|
112
|
+
feat: add task reminders # Missing scope
|
|
113
|
+
feat(tasks): Add Due Date Reminders # Capitalized description
|
|
114
|
+
feat(tasks): add due date reminders. # Period at end
|
|
115
|
+
feature(tasks): add due date reminders # Wrong type (use feat)
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
---
|
|
119
|
+
|
|
120
|
+
## Allowed Scopes
|
|
121
|
+
|
|
122
|
+
These are the only valid scopes for branch names and PR titles:
|
|
123
|
+
|
|
124
|
+
| Scope | Description |
|
|
125
|
+
| --------------- | ----------------------------------------------------------- |
|
|
126
|
+
| `auth` | Authentication, authorization, sessions, roles, permissions |
|
|
127
|
+
| `tasks` | Task CRUD, task details, assignments, task types |
|
|
128
|
+
| `boards` | Kanban boards, columns, board views, drag-drop |
|
|
129
|
+
| `sprints` | Sprint management, sprint planning, sprint completion |
|
|
130
|
+
| `epics` | Epic management, epic hierarchy, epic linking |
|
|
131
|
+
| `comments` | Comments, @mentions, activity feed |
|
|
132
|
+
| `notifications` | Notification system, real-time updates, toasts |
|
|
133
|
+
| `settings` | User preferences, org settings, configuration |
|
|
134
|
+
| `admin` | Super admin, org admin features, user management |
|
|
135
|
+
| `ui` | General UI components, styling, themes, responsive design |
|
|
136
|
+
| `api` | Server actions, API patterns, data fetching |
|
|
137
|
+
| `db` | Database migrations, schema changes, RLS policies |
|
|
138
|
+
| `deps` | Dependency updates, package management |
|
|
139
|
+
| `docs` | Documentation changes |
|
|
140
|
+
| `test` | Test additions, test fixes, test infrastructure |
|
|
141
|
+
| `perf` | Performance improvements |
|
|
142
|
+
| `infra` | Build configuration, CI/CD, deployment config |
|
|
143
|
+
|
|
144
|
+
### Adding New Scopes
|
|
145
|
+
|
|
146
|
+
If you need a new scope:
|
|
147
|
+
|
|
148
|
+
1. Discuss with the team
|
|
149
|
+
2. Add to this document
|
|
150
|
+
3. Update any linting rules (if applicable)
|
|
151
|
+
|
|
152
|
+
---
|
|
153
|
+
|
|
154
|
+
## Merge Requirements
|
|
155
|
+
|
|
156
|
+
### Required for All PRs
|
|
157
|
+
|
|
158
|
+
- [ ] **PR title follows conventional commits format**
|
|
159
|
+
- [ ] **PR description filled out** (use Agent to auto-generate)
|
|
160
|
+
- [ ] **Unit tests pass** (`pnpm test`)
|
|
161
|
+
- [ ] **TypeScript compiles** (`pnpm typecheck`)
|
|
162
|
+
- [ ] **Linting passes** (`pnpm lint`)
|
|
163
|
+
- [ ] **No `any` types** introduced without justification
|
|
164
|
+
- [ ] **No unapproved libraries** added
|
|
165
|
+
|
|
166
|
+
### Additional Requirements by Change Type
|
|
167
|
+
|
|
168
|
+
| Change Type | Additional Requirements |
|
|
169
|
+
| ----------- | ------------------------------------------------------------ |
|
|
170
|
+
| `feat` | E2E tests for critical paths, `data-testid` attributes added |
|
|
171
|
+
| `fix` | Regression test added to prevent recurrence |
|
|
172
|
+
| `refactor` | All existing tests still pass |
|
|
173
|
+
| `db` | Migration tested locally, rollback SQL documented |
|
|
174
|
+
|
|
175
|
+
### Review Requirements
|
|
176
|
+
|
|
177
|
+
| Change Size | Review Requirement |
|
|
178
|
+
| -------------------------- | ------------------------------ |
|
|
179
|
+
| Small (1-50 lines) | Self-review + automated checks |
|
|
180
|
+
| Medium (51-200 lines) | One reviewer |
|
|
181
|
+
| Large (201+ lines) | Two reviewers |
|
|
182
|
+
| Critical (auth, db, admin) | Two reviewers + maintainer |
|
|
183
|
+
|
|
184
|
+
---
|
|
185
|
+
|
|
186
|
+
## Workflow
|
|
187
|
+
|
|
188
|
+
### Branch Protection Rules
|
|
189
|
+
|
|
190
|
+
This repository uses GitHub Repository Rulesets to enforce the following:
|
|
191
|
+
|
|
192
|
+
- ✅ Only `release/*` and `hotfix/*` branches can merge to `main`
|
|
193
|
+
- ✅ Required status checks: `Build`, `Lint`, `Prettier`, `TypeCheck`
|
|
194
|
+
- ✅ Pull request required before merging
|
|
195
|
+
- ✅ Force pushes blocked on `main`
|
|
196
|
+
|
|
197
|
+
See [RULESET_SETUP.md](../.github/RULESET_SETUP.md) for configuration instructions.
|
|
198
|
+
|
|
199
|
+
---
|
|
200
|
+
|
|
201
|
+
### Release Workflow
|
|
202
|
+
|
|
203
|
+
The standard workflow for getting changes into production:
|
|
204
|
+
|
|
205
|
+
```
|
|
206
|
+
feature/tasks/new-feature ──┐
|
|
207
|
+
feature/auth/login-update ──┼──► release/1.2.0 ──► main ──► Production
|
|
208
|
+
bugfix/ui/fix-button ───────┘
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
#### 1. Create Feature Branch
|
|
212
|
+
|
|
213
|
+
```bash
|
|
214
|
+
# Start from latest main
|
|
215
|
+
git checkout main
|
|
216
|
+
git pull origin main
|
|
217
|
+
|
|
218
|
+
# Create feature branch
|
|
219
|
+
git checkout -b feature/tasks/add-due-date-reminder
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
#### 2. Develop and Test
|
|
223
|
+
|
|
224
|
+
- Make changes following [AGENT_EDITING_INSTRUCTIONS.md](AGENT_EDITING_INSTRUCTIONS.md)
|
|
225
|
+
- Add tests for new functionality
|
|
226
|
+
- Ensure all checks pass locally: `pnpm lint && pnpm format:check && pnpm typecheck && pnpm test`
|
|
227
|
+
|
|
228
|
+
#### 3. Create Release Branch
|
|
229
|
+
|
|
230
|
+
When ready to release (can bundle multiple features):
|
|
231
|
+
|
|
232
|
+
```bash
|
|
233
|
+
# Create release branch from main
|
|
234
|
+
git checkout main
|
|
235
|
+
git pull origin main
|
|
236
|
+
git checkout -b release/1.2.0
|
|
237
|
+
|
|
238
|
+
# Merge feature branches into release
|
|
239
|
+
git merge feature/tasks/add-due-date-reminder
|
|
240
|
+
git merge feature/auth/login-update
|
|
241
|
+
# ... merge other features as needed
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
#### 4. Open PR to Main
|
|
245
|
+
|
|
246
|
+
```bash
|
|
247
|
+
git push origin release/1.2.0
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
Then create PR on GitHub:
|
|
251
|
+
|
|
252
|
+
- **From**: `release/1.2.0`
|
|
253
|
+
- **To**: `main`
|
|
254
|
+
- **Title**: `release: v1.2.0`
|
|
255
|
+
- CI will run and validate all changes
|
|
256
|
+
|
|
257
|
+
#### 5. Review and Merge
|
|
258
|
+
|
|
259
|
+
- Get required approvals
|
|
260
|
+
- Ensure all CI checks pass
|
|
261
|
+
- **Squash and merge** to `main`
|
|
262
|
+
- Deployment triggers automatically via Vercel
|
|
263
|
+
|
|
264
|
+
#### 6. Clean Up
|
|
265
|
+
|
|
266
|
+
```bash
|
|
267
|
+
git checkout main
|
|
268
|
+
git pull origin main
|
|
269
|
+
git branch -d release/1.2.0
|
|
270
|
+
git push origin --delete release/1.2.0
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
---
|
|
274
|
+
|
|
275
|
+
### Feature Branch Workflow
|
|
276
|
+
|
|
277
|
+
For individual feature development:
|
|
278
|
+
|
|
279
|
+
### 1. Create Branch
|
|
280
|
+
|
|
281
|
+
```bash
|
|
282
|
+
# Start from latest main
|
|
283
|
+
git checkout main
|
|
284
|
+
git pull origin main
|
|
285
|
+
|
|
286
|
+
# Create feature branch
|
|
287
|
+
git checkout -b feature/tasks/add-due-date-reminder
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
### 2. Make Changes
|
|
291
|
+
|
|
292
|
+
Follow the patterns in [AGENT_EDITING_INSTRUCTIONS.md](AGENT_EDITING_INSTRUCTIONS.md):
|
|
293
|
+
|
|
294
|
+
- Touch all required files for your change type
|
|
295
|
+
- Add tests for new functionality
|
|
296
|
+
- Add `data-testid` for testable elements
|
|
297
|
+
|
|
298
|
+
### 3. Commit Changes
|
|
299
|
+
|
|
300
|
+
Use conventional commit messages for individual commits:
|
|
301
|
+
|
|
302
|
+
```bash
|
|
303
|
+
git add .
|
|
304
|
+
git commit -m "feat(tasks): add DueDateReminder component"
|
|
305
|
+
git commit -m "feat(tasks): add reminder notification logic"
|
|
306
|
+
git commit -m "test(tasks): add due date reminder tests"
|
|
307
|
+
```
|
|
308
|
+
|
|
309
|
+
### 4. Push and Create PR
|
|
310
|
+
|
|
311
|
+
```bash
|
|
312
|
+
git push origin feature/tasks/add-due-date-reminder
|
|
313
|
+
```
|
|
314
|
+
|
|
315
|
+
Then create PR on GitHub with:
|
|
316
|
+
|
|
317
|
+
- Title: `feat(tasks): add due date reminder notifications`
|
|
318
|
+
- Description: Use the PR template, have Agent fill it out
|
|
319
|
+
|
|
320
|
+
### 5. Address Review Feedback
|
|
321
|
+
|
|
322
|
+
```bash
|
|
323
|
+
# Make changes based on feedback
|
|
324
|
+
git add .
|
|
325
|
+
git commit -m "fix(tasks): address review feedback on reminder logic"
|
|
326
|
+
git push
|
|
327
|
+
```
|
|
328
|
+
|
|
329
|
+
### 6. Merge
|
|
330
|
+
|
|
331
|
+
Once approved:
|
|
332
|
+
|
|
333
|
+
- **Squash and merge** for feature/bugfix branches (cleaner history)
|
|
334
|
+
- **Merge commit** for hotfixes (preserve full context)
|
|
335
|
+
|
|
336
|
+
### 7. Clean Up
|
|
337
|
+
|
|
338
|
+
```bash
|
|
339
|
+
# After merge, delete local branch
|
|
340
|
+
git checkout main
|
|
341
|
+
git pull origin main
|
|
342
|
+
git branch -d feature/tasks/add-due-date-reminder
|
|
343
|
+
```
|
|
344
|
+
|
|
345
|
+
---
|
|
346
|
+
|
|
347
|
+
## Hotfix Workflow
|
|
348
|
+
|
|
349
|
+
For urgent production issues that cannot wait for a release cycle:
|
|
350
|
+
|
|
351
|
+
```
|
|
352
|
+
hotfix/auth/critical-fix ─────────────────────► main ──► Production
|
|
353
|
+
```
|
|
354
|
+
|
|
355
|
+
> **Note**: Hotfixes bypass the release branch and merge directly to `main`. Use sparingly.
|
|
356
|
+
|
|
357
|
+
```bash
|
|
358
|
+
# 1. Create hotfix branch from main
|
|
359
|
+
git checkout main
|
|
360
|
+
git pull origin main
|
|
361
|
+
git checkout -b hotfix/auth/fix-login-crash
|
|
362
|
+
|
|
363
|
+
# 2. Make minimal fix
|
|
364
|
+
# ... fix the issue ...
|
|
365
|
+
|
|
366
|
+
# 3. Commit with urgency context
|
|
367
|
+
git add .
|
|
368
|
+
git commit -m "fix(auth): resolve crash on login with expired token"
|
|
369
|
+
|
|
370
|
+
# 4. Push and create PR to main
|
|
371
|
+
git push origin hotfix/auth/fix-login-crash
|
|
372
|
+
|
|
373
|
+
# 5. Request expedited review
|
|
374
|
+
# Tag reviewers, mark as urgent in PR description
|
|
375
|
+
|
|
376
|
+
# 6. Merge with merge commit (not squash)
|
|
377
|
+
# This preserves the hotfix commit for easy tracking
|
|
378
|
+
|
|
379
|
+
# 7. Monitor deployment
|
|
380
|
+
# Watch Vercel deployment and production logs
|
|
381
|
+
```
|
|
382
|
+
|
|
383
|
+
---
|
|
384
|
+
|
|
385
|
+
## Release Notes
|
|
386
|
+
|
|
387
|
+
When features are released, the conventional commit format enables automatic changelog generation:
|
|
388
|
+
|
|
389
|
+
```markdown
|
|
390
|
+
## [1.2.0] - 2026-01-08
|
|
391
|
+
|
|
392
|
+
### Features
|
|
393
|
+
|
|
394
|
+
- **tasks**: add due date reminder notifications (#123)
|
|
395
|
+
- **boards**: enable column reordering (#124)
|
|
396
|
+
|
|
397
|
+
### Bug Fixes
|
|
398
|
+
|
|
399
|
+
- **auth**: resolve session expiry on page refresh (#125)
|
|
400
|
+
- **notifications**: fix missing toast on task delete (#126)
|
|
401
|
+
|
|
402
|
+
### Refactoring
|
|
403
|
+
|
|
404
|
+
- **boards**: simplify column drag-drop logic (#127)
|
|
405
|
+
```
|
|
406
|
+
|
|
407
|
+
---
|
|
408
|
+
|
|
409
|
+
## Quick Reference
|
|
410
|
+
|
|
411
|
+
### Branch Creation
|
|
412
|
+
|
|
413
|
+
```bash
|
|
414
|
+
git checkout -b <type>/<scope>/<description>
|
|
415
|
+
```
|
|
416
|
+
|
|
417
|
+
### PR Title
|
|
418
|
+
|
|
419
|
+
```
|
|
420
|
+
<type>(<scope>): <description>
|
|
421
|
+
```
|
|
422
|
+
|
|
423
|
+
### Types
|
|
424
|
+
|
|
425
|
+
| Type | Use For |
|
|
426
|
+
| ---------- | ----------------------------- |
|
|
427
|
+
| `feat` | New features |
|
|
428
|
+
| `fix` | Bug fixes |
|
|
429
|
+
| `refactor` | Code refactoring |
|
|
430
|
+
| `chore` | Maintenance |
|
|
431
|
+
| `docs` | Documentation |
|
|
432
|
+
| `test` | Tests |
|
|
433
|
+
| `perf` | Performance |
|
|
434
|
+
| `style` | Code style (no logic changes) |
|
|
435
|
+
|
|
436
|
+
---
|
|
437
|
+
|
|
438
|
+
## Related Documents
|
|
439
|
+
|
|
440
|
+
- [AGENT_EDITING_INSTRUCTIONS.md](AGENT_EDITING_INSTRUCTIONS.md) - Editing rules
|
|
441
|
+
- [TESTING_STRATEGY.md](TESTING_STRATEGY.md) - Testing requirements
|
|
442
|
+
- [../.github/PULL_REQUEST_TEMPLATE.md](../.github/PULL_REQUEST_TEMPLATE.md) - PR template
|