@logickernel/agileflow 0.17.0 → 0.17.1

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.
@@ -1,252 +0,0 @@
1
- # Conventional Commits
2
-
3
- AgileFlow uses [Conventional Commits](https://www.conventionalcommits.org/) to automatically determine version bumps and generate release notes.
4
-
5
- ## What are Conventional Commits?
6
-
7
- The Conventional Commits specification is a lightweight convention on top of commit messages. It provides an easy set of rules for creating an explicit commit history, which makes it easier to write automated tools on top of. This convention dovetails with [SemVer](https://semver.org/), by describing the features, fixes, and breaking changes made in commit messages.
8
-
9
- The commit message should be structured as follows:
10
-
11
- ```
12
- <type>[optional scope]: <description>
13
-
14
- [optional body]
15
-
16
- [optional footer(s)]
17
- ```
18
-
19
- The commit contains the following structural elements, to communicate intent to the consumers of your library:
20
-
21
- - **`fix:`** — A commit of the type `fix` patches a bug in your codebase (this correlates with **PATCH** in Semantic Versioning).
22
- - **`feat:`** — A commit of the type `feat` introduces a new feature to the codebase (this correlates with **MINOR** in Semantic Versioning).
23
- - **`BREAKING CHANGE:`** — A commit that has a footer `BREAKING CHANGE:`, or appends a `!` after the type/scope, introduces a breaking API change (correlating with **MAJOR** in Semantic Versioning). A `BREAKING CHANGE` can be part of commits of any type.
24
- - **Other types** — Types other than `fix:` and `feat:` are allowed (e.g., `build:`, `chore:`, `ci:`, `docs:`, `style:`, `refactor:`, `perf:`, `test:`, and others). These have no implicit effect in Semantic Versioning (unless they include a `BREAKING CHANGE`).
25
- - **Scope** — A scope may be provided to a commit's type, to provide additional contextual information and is contained within parenthesis, e.g., `feat(parser): add ability to parse arrays`.
26
- - **Footers** — Footers other than `BREAKING CHANGE: <description>` may be provided and follow a convention similar to git trailer format.
27
-
28
- ---
29
-
30
- ## How to Choose a Commit Type
31
-
32
- Use this decision flow to choose the right commit type:
33
-
34
- ```mermaid
35
- flowchart TD
36
- Start([Start]) --> A{Does it add functionality?}
37
-
38
- A -- "yes" --> F[feat:]
39
- A -- "no" --> B{Does it fix functionality?}
40
-
41
- B -- "yes" --> X[fix:]
42
- B -- "no" --> C{Is it worth an entry in the changelog?}
43
-
44
- C -- "yes" --> W[Choose best: docs, ci, style, etc.]
45
- C -- "no" --> D[chore:]
46
-
47
- W --> E{Is it a breaking change?}
48
- F --> E
49
- X --> E
50
- D --> E
51
-
52
- E -- "no" --> Z([Commit])
53
- E -- "yes" --> G[Add ! to type/scope or BREAKING CHANGE: in body]
54
- G --> Z
55
- ```
56
-
57
- ### Quick Decision Guide
58
-
59
- 1. **Adds new functionality?** → `feat:`
60
- 2. **Fixes broken functionality?** → `fix:`
61
- 3. **Work in progress?** → `wip:` (not included in releases)
62
- 4. **Otherwise?** → Choose the most appropriate:
63
- - `docs:` — Documentation changes
64
- - `ci:` — CI/CD changes
65
- - `style:` — Code style (formatting, whitespace)
66
- - `chore:` — Maintenance tasks
67
- - `test:` — Test changes
68
- - `refactor:` — Code refactoring
69
- - `perf:` — Performance improvements
70
- - `build:` — Build system changes
71
- - `revert:` — Revert previous commits
72
- 5. **Breaking change?** → Add `!` after type/scope or include `BREAKING CHANGE:` in body
73
-
74
- ### Examples
75
-
76
- ```bash
77
- # Adds functionality
78
- feat: add user authentication
79
- feat(auth): add OAuth2 support
80
-
81
- # Fixes functionality
82
- fix: resolve login validation error
83
- fix(api): handle timeout errors
84
-
85
- # Work in progress
86
- wip: implement user authentication
87
-
88
- # Other types
89
- docs: update API reference
90
- ci: update GitHub Actions workflow
91
- style: format code with prettier
92
- chore: update dependencies
93
-
94
- # Breaking changes
95
- feat!: remove deprecated API endpoints
96
- feat: change response format
97
-
98
- BREAKING CHANGE: Response now uses camelCase
99
- ```
100
-
101
- ---
102
-
103
- ## Commit Types and Version Impact
104
-
105
- | Type | Description | 0.x.x | 1.0.0+ |
106
- |------|-------------|--------|-------|
107
- | BREAKING CHANGE | Changes that break backward compatibility <br> (e.g., removed APIs, changed function signatures, modified response formats) | Minor | Major |
108
- | `feat` | New features | Minor | Minor |
109
- | `fix` | Bug fixes | Patch | Patch |
110
- | | Any other type of commit | None | None |
111
-
112
- When multiple commits exist, the highest priority wins.
113
-
114
- ### Breaking Changes
115
-
116
- Breaking changes trigger a major version bump (or minor for 0.x.x):
117
-
118
- ```bash
119
- # Using ! suffix
120
- feat!: remove deprecated API
121
-
122
- # Using footer
123
- feat: change response format
124
-
125
- BREAKING CHANGE: Response now uses camelCase
126
- ```
127
-
128
- ---
129
-
130
- ## Release Notes Generation
131
-
132
- AgileFlow groups commits by type for release notes:
133
-
134
- ```
135
- v1.2.4
136
-
137
- ### Features
138
- - add user dashboard
139
- - implement API rate limiting
140
-
141
- ### Bug fixes
142
- - resolve login validation error
143
- - fix timeout on large uploads
144
-
145
- ### Performance improvements
146
- - optimize database queries
147
-
148
- ### Documentation
149
- - update API reference
150
- ```
151
-
152
- Chore commits are omitted from release notes unless they include a breaking change.
153
-
154
- ### Breaking Changes in Notes
155
-
156
- Breaking changes are highlighted:
157
-
158
- ```
159
- v2.0.0
160
-
161
- ### Features
162
- - BREAKING: remove deprecated API endpoints
163
- - BREAKING: change authentication flow
164
- ```
165
-
166
-
167
- ---
168
-
169
- ## Non-Conventional Commits
170
-
171
- Commits not following the format:
172
- - Trigger **no bump** by default
173
- - Appear under "Other changes" in release notes
174
-
175
- ---
176
-
177
- ## Best Practices
178
-
179
- 1. Use Clear Types
180
-
181
- ```bash
182
- # ✅ Correct type
183
- feat: add login feature
184
- fix: resolve crash on startup
185
-
186
- # ❌ Wrong type
187
- fix: add login feature # Should be feat
188
- feat: fix crash # Should be fix
189
- ```
190
-
191
-
192
- 2. Write Clear Descriptions
193
-
194
- ```bash
195
- # ✅ Clear and specific
196
- feat: add two-factor authentication via SMS
197
- fix: prevent timeout on uploads larger than 100MB
198
-
199
- # ❌ Vague
200
- feat: add 2fa
201
- fix: fix timeout
202
- ```
203
-
204
- 3. Mark Breaking Changes
205
-
206
- ```bash
207
- # ✅ Properly marked
208
- feat!: remove deprecated endpoints
209
-
210
- # ❌ Breaking change not marked
211
- feat: remove deprecated endpoints
212
- ```
213
-
214
- 4. Use Present Tense
215
-
216
- ```bash
217
- # ✅ Present tense
218
- feat: add user authentication
219
-
220
- # ❌ Past tense
221
- feat: added user authentication
222
- ```
223
-
224
- 5. Use Chore for *work in progress*
225
-
226
- ```bash
227
- # ✅ Use chore so an entry is not added to the changelog
228
- chore: add framework for form validation
229
-
230
- # ❌ Used something else that will add a meaningless entry to the changelog
231
- refactor: add framework for form validation
232
- ```
233
-
234
- 6. Add Meaningful Scopes when applicable
235
-
236
- ```bash
237
- # ✅ Helpful scope
238
- feat(auth): add OAuth2 support
239
- fix(api): handle timeout errors
240
-
241
- # ✅ Also fine without scope
242
- feat: add OAuth2 support
243
- fix: handle timeout errors
244
- ```
245
-
246
- ---
247
-
248
- ## Related Documentation
249
-
250
- - [Getting Started](./getting-started.md) — Quick start
251
- - [Release Management](./release-management.md) — Version management
252
- - [Branching Strategy](./branching-strategy.md) — Git workflow
@@ -1,231 +0,0 @@
1
- # Getting Started
2
-
3
- Get up and running with AgileFlow in minutes. This guide covers local usage and CI/CD integration.
4
-
5
- ## What You'll Learn
6
-
7
- - How to preview your next version locally
8
- - How to set up automatic versioning in CI/CD
9
- - How conventional commits affect version bumps
10
-
11
- ## Prerequisites
12
-
13
- - Node.js 14+ (for local usage)
14
- - A Git repository with commit history
15
- - Basic understanding of conventional commits
16
-
17
- ---
18
-
19
- ## Quick Start
20
-
21
- ### 1. Preview Your Next Version
22
-
23
- Run AgileFlow in any Git repository:
24
-
25
- ```bash
26
- npx @logickernel/agileflow
27
- ```
28
-
29
- Example output:
30
- ```
31
- Current version: v1.2.3
32
- Next version: v1.2.4
33
-
34
- Changelog:
35
- ### fix
36
- - resolve authentication issue
37
- - correct null handling in user lookup
38
-
39
- ### docs
40
- - update README with usage examples
41
- ```
42
-
43
- ### 2. Get Just the Version
44
-
45
- Use `--quiet` to output only the version (useful for scripts):
46
-
47
- ```bash
48
- VERSION=$(npx @logickernel/agileflow --quiet)
49
- echo "Next version: $VERSION"
50
- ```
51
-
52
- ---
53
-
54
- ## CI/CD Integration
55
-
56
- AgileFlow uses a **decoupled architecture**:
57
-
58
- 1. **AgileFlow creates a version tag** (on merge to main)
59
- 2. **Your pipelines trigger on the tag** (build, deploy, etc.)
60
-
61
- ```
62
- Merge to main ──▶ AgileFlow ──▶ Tag v1.2.3 ──▶ Your build/deploy
63
- ```
64
-
65
- ### GitHub Actions
66
-
67
- **Step 1**: Add a secret `AGILEFLOW_TOKEN` with a Personal Access Token (`contents: write` permission).
68
-
69
- **Step 2**: Create `.github/workflows/version.yml`:
70
-
71
- ```yaml
72
- name: Version
73
- on:
74
- push:
75
- branches: [main]
76
-
77
- jobs:
78
- version:
79
- runs-on: ubuntu-latest
80
- steps:
81
- - uses: actions/checkout@v4
82
- with:
83
- fetch-depth: 0
84
-
85
- - uses: actions/setup-node@v4
86
- with:
87
- node-version: '20'
88
-
89
- - name: Create version tag
90
- env:
91
- AGILEFLOW_TOKEN: ${{ secrets.AGILEFLOW_TOKEN }}
92
- run: npx @logickernel/agileflow github
93
- ```
94
-
95
- **Step 3**: Create `.github/workflows/release.yml` for builds:
96
-
97
- ```yaml
98
- name: Release
99
- on:
100
- push:
101
- tags:
102
- - 'v*'
103
-
104
- jobs:
105
- build:
106
- runs-on: ubuntu-latest
107
- steps:
108
- - uses: actions/checkout@v4
109
- - run: |
110
- VERSION=${GITHUB_REF#refs/tags/}
111
- echo "Building $VERSION"
112
- docker build -t myapp:$VERSION .
113
- ```
114
-
115
- ### GitLab CI
116
-
117
- **Step 1**: Add a CI/CD variable `AGILEFLOW_TOKEN` with a Project Access Token (`api` scope, `Maintainer` role).
118
-
119
- **Step 2**: Update `.gitlab-ci.yml`:
120
-
121
- ```yaml
122
- # Runs on merge to main - creates the tag
123
- agileflow:
124
- image: node:20
125
- script:
126
- - npm install -g @logickernel/agileflow
127
- - npx @logickernel/agileflow gitlab
128
- rules:
129
- - if: '$CI_COMMIT_BRANCH == "main"'
130
-
131
- # Runs on tag creation - builds the release
132
- build:
133
- stage: build
134
- script:
135
- - echo "Building $CI_COMMIT_TAG"
136
- - docker build -t myapp:$CI_COMMIT_TAG .
137
- rules:
138
- - if: '$CI_COMMIT_TAG =~ /^v/'
139
- ```
140
-
141
- ### Native Git Push
142
-
143
- For other platforms:
144
-
145
- ```bash
146
- npx @logickernel/agileflow push
147
- ```
148
-
149
- This creates an annotated tag and pushes it. Configure your CI to trigger on tags.
150
-
151
- ---
152
-
153
- ## How Version Bumps Work
154
-
155
- AgileFlow analyzes commit messages to determine the bump:
156
-
157
- | Commit Type | Example | 0.x.x | 1.0.0+ |
158
- |-------------|---------|-------|--------|
159
- | Breaking change | `feat!: redesign API` | **Minor** (0.1.0 → 0.2.0) | **Major** (1.0.0 → 2.0.0) |
160
- | Feature | `feat: add login` | **Minor** | **Minor** |
161
- | Fix | `fix: resolve crash` | **Patch** | **Patch** |
162
- | Everything else | `docs: update README` | No bump | No bump |
163
-
164
- ### No Bump Needed
165
-
166
- If all commits are docs/chore/style types, AgileFlow skips tag creation.
167
-
168
- ---
169
-
170
- ## Your First Release
171
-
172
- ### Starting Fresh
173
-
174
- No version tags? AgileFlow starts from v0.0.0:
175
-
176
- ```bash
177
- git commit -m "feat: initial project setup"
178
- # → Creates v0.0.1
179
- ```
180
-
181
- ### Creating v1.0.0
182
-
183
- Version 1.0.0 is your first stable release. Create it manually when ready:
184
-
185
- ```bash
186
- git tag -a v1.0.0 -m "First stable release"
187
- git push origin v1.0.0
188
- ```
189
-
190
- After v1.0.0, AgileFlow continues with standard semantic versioning.
191
-
192
- ---
193
-
194
- ## Common Questions
195
-
196
- **How does the decoupled approach work?**
197
-
198
- AgileFlow only creates version tags. Your build/deploy pipelines are separate workflows that trigger on tag creation. This keeps versioning independent from your build process.
199
-
200
- **What if no version bump is needed?**
201
-
202
- AgileFlow skips tag creation. No tag means no build/deploy triggered.
203
-
204
- **Can I preview without creating tags?**
205
-
206
- Yes! Running `npx @logickernel/agileflow` without a command shows the next version without creating anything.
207
-
208
- ---
209
-
210
- ## Troubleshooting
211
-
212
- ### "AGILEFLOW_TOKEN not set" Error
213
- - Verify the environment variable is configured
214
- - Check token permissions (GitHub: `contents: write`, GitLab: `api` scope)
215
-
216
- ### Tag Created but Build Didn't Run
217
- - Ensure your release workflow triggers on `tags: ['v*']`
218
- - Check the tag pattern in your CI configuration
219
-
220
- ### No Version Bump Detected
221
- - Use conventional commit format (`type: description`)
222
- - Include bump-triggering types: `feat` (minor) or `fix` (patch)
223
-
224
- ---
225
-
226
- ## Next Steps
227
-
228
- - [CLI Reference](./cli-reference.md) — All commands and options
229
- - [Installation Guide](./installation.md) — Detailed setup
230
- - [Conventional Commits](./conventional-commits.md) — Commit format
231
- - [Version-Centric CI/CD](./version-centric-cicd.md) — The methodology