@sppg2001/atomize 0.0.1 โ†’ 1.0.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/.env.example CHANGED
@@ -1,3 +1,3 @@
1
- AZURE_DEVOPS_ORG_URL=https://dev.azure.com/your-org
2
- AZURE_DEVOPS_PROJECT=YourProject
3
- AZURE_DEVOPS_PAT=your-personal-access-token
1
+ AZURE_DEVOPS_ORG_URL=https://dev.azure.com/your-org
2
+ AZURE_DEVOPS_PROJECT=YourProject
3
+ AZURE_DEVOPS_PAT=your-personal-access-token
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2025 Simao-Pereira-Gomes
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Simao-Pereira-Gomes
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,17 +1,501 @@
1
- # Atomize
2
- Atomic task generation for agile teams
3
-
4
- ## Getting Started
5
- To install dependencies:
6
-
7
- ```bash
8
- bun install
9
- ```
10
-
11
- To run:
12
-
13
- ```bash
14
- bun run index.ts
15
- ```
16
-
17
- This project was created using `bun init` in bun v1.3.4. [Bun](https://bun.com) is a fast all-in-one JavaScript runtime.
1
+ # Atomize
2
+
3
+ **Break down stories, build up velocity.**
4
+
5
+ Atomize is a CLI tool that automatically generates granular tasks from user stories using YAML templates. Streamline your agile workflow with AI-powered task breakdowns, preset templates, and smart estimation distribution.
6
+
7
+ [![npm version](https://img.shields.io/npm/v/@sppg2001/atomize.svg)](https://www.npmjs.com/package/@sppg2001/atomize)
8
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
9
+ [![TypeScript](https://img.shields.io/badge/TypeScript-5.9-blue.svg)](https://www.typescriptlang.org/)
10
+
11
+ ---
12
+
13
+ ## Features
14
+
15
+ - **๐Ÿค– AI-Powered Generation** - Create templates using Google Gemini or local Ollama (completely free)
16
+ - **๐Ÿ“‹ Preset Templates** - Start with battle-tested templates for common workflows
17
+ - **๐Ÿง  Story Learning** - Generate templates by analyzing your existing work items
18
+ - **๐ŸŽฏ Smart Estimation** - Automatically distribute story points across tasks
19
+ - **๐Ÿ”— Azure DevOps Integration** - Native support with more platforms coming soon
20
+ - **โšก Zero Config** - Works out of the box with sensible defaults
21
+ - **๐ŸŽจ Interactive Wizards** - User-friendly prompts guide you through everything
22
+ - **โœ… Built-in Validation** - Catch template errors before they cause problems
23
+
24
+ ---
25
+
26
+ ## ๐Ÿ“ฆ Installation
27
+
28
+ ### Global Installation (Recommended)
29
+
30
+ ```bash
31
+ npm install -g @sppg2001/atomize
32
+ ```
33
+
34
+ ### Using npx (No Installation)
35
+
36
+ ```bash
37
+ npx @sppg2001/atomize --help
38
+ ```
39
+
40
+ ### Local Development
41
+
42
+ ```bash
43
+ git clone https://github.com/Simao-Pereira-Gomes/atomize.git
44
+ cd atomize
45
+ bun install
46
+ bun run dev
47
+ ```
48
+
49
+ ---
50
+
51
+ ## ๐ŸŽฏ Quick Start
52
+
53
+ ### 1. Generate Tasks from a Template
54
+
55
+ ```bash
56
+ # Use a preset template
57
+ atomize generate templates/backend-api.yaml
58
+
59
+ # Interactive mode
60
+ atomize generate
61
+ ```
62
+
63
+ ### 2. Create Your First Template
64
+
65
+ ```bash
66
+ # AI-powered creation (free!)
67
+ atomize template create --ai "Backend API with authentication"
68
+
69
+ # From a preset
70
+ atomize template create --preset backend-api
71
+
72
+ # Learn from an existing story
73
+ atomize template create --from-story STORY-123
74
+
75
+ # Step-by-step wizard
76
+ atomize template create --scratch
77
+ ```
78
+
79
+ ### 3. Validate a Template
80
+
81
+ ```bash
82
+ atomize validate templates/my-template.yaml
83
+ ```
84
+
85
+ ---
86
+
87
+ ## ๐Ÿ“– Usage Guide
88
+
89
+ ### Generate Command
90
+
91
+ The `generate` command creates tasks in your work item management system based on a template.
92
+
93
+ ```bash
94
+ # Basic usage
95
+ atomize generate templates/backend-api.yaml
96
+
97
+ # With options
98
+ atomize generate templates/backend-api.yaml \
99
+ --platform azure-devops \
100
+ --execute \
101
+ --verbose
102
+
103
+ # Dry run (preview only)
104
+ atomize generate templates/backend-api.yaml --dry-run
105
+ ```
106
+
107
+ **Options:**
108
+ - `--platform <type>` - Platform to use (azure-devops, mock)
109
+ - `--execute` - Actually create tasks (default is dry-run)
110
+ - `--dry-run` - Preview without creating tasks
111
+ - `--continue-on-error` - Keep processing if errors occur
112
+ - `--verbose` - Show detailed output
113
+
114
+ **Example Output:**
115
+ ```
116
+ โœ“ Loaded template: Backend API Development
117
+ โœ“ Found 3 matching user stories
118
+ โœ“ Generated 18 tasks (6 per story)
119
+ โœ“ Created 18 tasks in Azure DevOps
120
+
121
+ Summary:
122
+ Stories processed: 3
123
+ Tasks created: 18
124
+ Execution time: 2.3s
125
+ ```
126
+
127
+ ### Template Commands
128
+
129
+ #### Create a Template
130
+
131
+ ```bash
132
+ # AI-powered (best for quick starts)
133
+ atomize template create --ai "Create template for React component development"
134
+
135
+ # From preset (fastest)
136
+ atomize template create --preset frontend-feature
137
+
138
+ # Learn from story (best for matching your workflow)
139
+ atomize template create --from-story STORY-456 --platform azure-devops
140
+
141
+ # Interactive wizard (most control)
142
+ atomize template create --scratch
143
+ ```
144
+
145
+ #### List Available Presets
146
+
147
+ ```bash
148
+ atomize template list
149
+ ```
150
+
151
+ **Available Presets:**
152
+ - `backend-api` - Backend API with database integration
153
+ - `frontend-feature` - React/Vue UI component development
154
+ - `bug-fix` - Bug investigation and resolution workflow
155
+ - `fullstack` - Complete full-stack feature
156
+
157
+ #### Validate a Template
158
+
159
+ ```bash
160
+ atomize validate templates/my-template.yaml
161
+
162
+ # With detailed output
163
+ atomize validate templates/my-template.yaml --verbose
164
+ ```
165
+
166
+ ---
167
+
168
+ ## ๐Ÿ—๏ธ Template Structure
169
+
170
+ Templates are YAML files that define how to break down user stories into tasks.
171
+
172
+ ### Basic Template
173
+
174
+ ```yaml
175
+ version: "1.0"
176
+ name: "Backend API Development"
177
+ description: "Standard backend API workflow"
178
+
179
+ # Which stories to process
180
+ filter:
181
+ workItemTypes: ["User Story"]
182
+ states: ["New", "Active"]
183
+ tags:
184
+ include: ["backend", "api"]
185
+ excludeIfHasTasks: true
186
+
187
+ # Task breakdown
188
+ tasks:
189
+ - title: "Design API Endpoints: ${story.title}"
190
+ description: "Design REST API endpoints and schemas"
191
+ estimationPercent: 15
192
+ activity: "Design"
193
+ tags: ["design", "api"]
194
+
195
+ - title: "Implement Core Logic: ${story.title}"
196
+ description: "Implement business logic and validation"
197
+ estimationPercent: 40
198
+ activity: "Development"
199
+ tags: ["implementation"]
200
+
201
+ - title: "Write Tests"
202
+ description: "Unit and integration tests"
203
+ estimationPercent: 30
204
+ activity: "Testing"
205
+ tags: ["testing"]
206
+
207
+ - title: "Code Review & Documentation"
208
+ description: "Review and document the implementation"
209
+ estimationPercent: 15
210
+ activity: "Documentation"
211
+ tags: ["review", "docs"]
212
+
213
+ # Estimation settings
214
+ estimation:
215
+ strategy: "percentage"
216
+ rounding: "nearest"
217
+ minimumTaskPoints: 0.5
218
+
219
+ # Validation rules
220
+ validation:
221
+ totalEstimationMustBe: 100
222
+ minTasks: 3
223
+ maxTasks: 10
224
+ ```
225
+
226
+ ### Template Features
227
+
228
+ #### Variable Interpolation
229
+ Use story data in task titles and descriptions:
230
+ - `${story.title}` - Story title
231
+ - `${story.id}` - Story ID
232
+ - `${story.description}` - Story description
233
+
234
+ #### Task Assignment
235
+ ```yaml
236
+ assignTo: "@ParentAssignee" # Inherit from story
237
+ assignTo: "@Me" # Current user
238
+ assignTo: "user@email.com" # Specific user
239
+ ```
240
+
241
+ #### Conditional Tasks
242
+ ```yaml
243
+ - title: "Security Review"
244
+ estimationPercent: 10
245
+ condition: '${story.tags} CONTAINS "security"'
246
+ ```
247
+
248
+ #### Task Dependencies
249
+ ```yaml
250
+ tasks:
251
+ - id: "design"
252
+ title: "Design Phase"
253
+ estimationPercent: 20
254
+
255
+ - id: "implement"
256
+ title: "Implementation"
257
+ estimationPercent: 60
258
+ dependsOn: ["design"] # Must complete design first
259
+ ```
260
+
261
+ ---
262
+
263
+ ## ๐Ÿค– AI-Powered Template Creation
264
+
265
+ Atomize supports two free AI providers for template generation:
266
+
267
+ ### Google Gemini (Cloud - Recommended)
268
+
269
+ 1. Get a free API key: https://makersuite.google.com/app/apikey
270
+ 2. Set environment variable:
271
+ ```bash
272
+ export GOOGLE_AI_API_KEY="your-key-here"
273
+ ```
274
+ 3. Create templates:
275
+ ```bash
276
+ atomize template create --ai "Backend API with OAuth authentication"
277
+ ```
278
+
279
+ ### Ollama (Local - Complete Privacy)
280
+
281
+ 1. Install Ollama: https://ollama.ai
282
+ 2. Download a model:
283
+ ```bash
284
+ ollama pull llama3.2
285
+ ```
286
+ 3. Start the service:
287
+ ```bash
288
+ ollama serve
289
+ ```
290
+ 4. Create templates:
291
+ ```bash
292
+ atomize template create --ai-provider ollama --ai "Mobile-first React component"
293
+ ```
294
+
295
+ ### AI Tips
296
+
297
+ - Be specific: "Backend API with JWT auth, rate limiting, and PostgreSQL"
298
+ - Mention your tech stack: "React component with TypeScript and Tailwind CSS"
299
+ - Specify testing requirements: "Include unit tests and E2E tests"
300
+ - Refine iteratively: Use the refine option to adjust the generated template
301
+
302
+ ---
303
+
304
+ ## ๐Ÿ”— Platform Setup
305
+
306
+ ### Azure DevOps
307
+
308
+ 1. **Get a Personal Access Token (PAT)**
309
+ - Go to: `https://dev.azure.com/[your-org]/_usersSettings/tokens`
310
+ - Create token with `Work Items (Read, Write)` scope
311
+
312
+ 2. **Configure Environment Variables**
313
+ ```bash
314
+ export AZURE_DEVOPS_ORG_URL="https://dev.azure.com/your-org"
315
+ export AZURE_DEVOPS_PROJECT="YourProject"
316
+ export AZURE_DEVOPS_PAT="your-personal-access-token"
317
+ ```
318
+
319
+ 3. **Or Use Interactive Setup**
320
+ ```bash
321
+ atomize generate templates/backend-api.yaml
322
+ # CLI will prompt for configuration
323
+ ```
324
+
325
+ ### Mock Platform (Testing)
326
+
327
+ ```bash
328
+ atomize generate templates/backend-api.yaml --platform mock
329
+ ```
330
+
331
+ ---
332
+
333
+ ## Real-World Examples
334
+
335
+ ### Example 1: Backend API Feature
336
+
337
+ **Story:** "As a user, I want to reset my password via email"
338
+
339
+ **Generated Tasks:**
340
+ 1. Design password reset flow and email templates (1.5 pts)
341
+ 2. Implement password reset endpoint (3.5 pts)
342
+ 3. Create email service integration (1.5 pts)
343
+ 4. Write unit and integration tests (2 pts)
344
+ 5. Add API documentation (0.5 pts)
345
+ 6. Security review and rate limiting (1 pt)
346
+
347
+ **Total:** 10 story points perfectly distributed
348
+
349
+ ## ๐Ÿ› ๏ธ Advanced Usage
350
+
351
+ ### Custom Filters
352
+
353
+ Filter stories with precise criteria:
354
+
355
+ ```yaml
356
+ filter:
357
+ workItemTypes: ["User Story", "Bug"]
358
+ states: ["New", "Approved"]
359
+ tags:
360
+ include: ["backend"]
361
+ exclude: ["deprecated"]
362
+ areaPaths: ["MyProject\\Backend\\API"]
363
+ iterations: ["Sprint 23", "Sprint 24"]
364
+ assignedTo: ["john@company.com", "jane@company.com"]
365
+ priority:
366
+ min: 1
367
+ max: 2
368
+ excludeIfHasTasks: true
369
+ ```
370
+
371
+ ### Estimation Strategies
372
+
373
+ ```yaml
374
+ estimation:
375
+ strategy: "percentage" # Distribute story points by percentage
376
+ rounding: "nearest" # nearest, up, down, none
377
+ minimumTaskPoints: 0.5 # Minimum points per task
378
+ ```
379
+
380
+ ### Learning from Existing Stories
381
+
382
+ ```bash
383
+ # Analyze a story and create a template
384
+ atomize template create --from-story STORY-123
385
+
386
+ # With percentage normalization
387
+ atomize template create --from-story STORY-123 --normalize
388
+
389
+ # Keep original percentages
390
+ atomize template create --from-story STORY-123 --no-normalize
391
+ ```
392
+
393
+ ---
394
+
395
+ ## ๐Ÿงช Testing
396
+
397
+ ```bash
398
+ # Run all tests
399
+ bun test
400
+
401
+ # Run specific test suite
402
+ bun test tests/unit/atomizer.test.ts
403
+
404
+ # Run with coverage
405
+ bun test --coverage
406
+
407
+ # Watch mode
408
+ bun test --watch
409
+ ```
410
+
411
+ ### Development Setup
412
+
413
+ ```bash
414
+ # Clone the repository
415
+ git clone https://github.com/Simao-Pereira-Gomes/atomize.git
416
+ cd atomize
417
+
418
+ # Install dependencies
419
+ bun install
420
+
421
+ # Run in development mode
422
+ bun run dev
423
+
424
+ # Run tests
425
+ bun test
426
+
427
+ # Build
428
+ bun run build
429
+ ```
430
+
431
+ ---
432
+
433
+ ## ๐Ÿ“ Roadmap
434
+
435
+ ### v0.1.0 - Initial Release โœ…
436
+ - [x] Core task generation engine
437
+ - [x] Azure DevOps integration
438
+ - [x] AI-powered template creation
439
+ - [x] Preset templates
440
+ - [x] Story learning
441
+ - [x] Interactive wizards
442
+
443
+ ### v0.2.0 - Enhanced Features
444
+ - [ ] GitHub Issues integration
445
+ - [ ] Jira integration
446
+ - [ ] VS Code extension
447
+
448
+ ### v0.3.0 - Advanced Capabilities
449
+ - [ ] Multi-story batch processing
450
+ - [ ] Custom estimation formulas
451
+ - [ ] Template inheritance
452
+ - [ ] Workflow automation
453
+ - [ ] Analytics dashboard
454
+
455
+ ---
456
+
457
+ ## ๐Ÿ› Troubleshooting
458
+
459
+ ### Common Issues
460
+
461
+ **"Not authenticated" error**
462
+ ```bash
463
+ # Make sure environment variables are set
464
+ echo $AZURE_DEVOPS_PAT
465
+
466
+ # Or use interactive mode
467
+ atomize generate --interactive
468
+ ```
469
+
470
+ **"Template validation failed"**
471
+ ```bash
472
+ # Check your template
473
+ atomize validate templates/my-template.yaml --verbose
474
+
475
+ # Common issues:
476
+ # - Total estimation must equal 100%
477
+ # - Task dependencies reference non-existent IDs
478
+ # - Missing required fields
479
+ ```
480
+
481
+ **AI provider not available**
482
+ ```bash
483
+ # For Gemini
484
+ export GOOGLE_AI_API_KEY="your-key"
485
+
486
+ # For Ollama
487
+ ollama serve # Must be running
488
+ ollama pull llama3.2 # Model must be downloaded
489
+ ```
490
+
491
+ ---
492
+
493
+ ## ๐Ÿ“„ License
494
+
495
+ MIT License - see [LICENSE](LICENSE) file for details
496
+
497
+ ## ๐Ÿ“ง Support
498
+
499
+ - ๐Ÿ› [Report a Bug](https://github.com/Simao-Pereira-Gomes/atomize/issues)
500
+ - ๐Ÿ’ก [Request a Feature](https://github.com/Simao-Pereira-Gomes/atomize/issues)
501
+ - ๐Ÿ’ฌ [Discussions](https://github.com/Simao-Pereira-Gomes/atomize/discussions)