@sppg2001/atomize 1.2.4 → 2.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.
@@ -0,0 +1,540 @@
1
+ # Getting Started with Atomize
2
+
3
+ Welcome to Atomize! This guide will help you get up and running in minutes.
4
+
5
+ ## Table of Contents
6
+
7
+ - [What is Atomize?](#what-is-atomize)
8
+ - [Installation](#installation)
9
+ - [Quick Start](#quick-start)
10
+ - [Your First Template](#your-first-template)
11
+ - [Generating Tasks](#generating-tasks)
12
+ - [Understanding Validation](#understanding-validation)
13
+ - [Common Workflows](#common-workflows)
14
+ - [Next Steps](#next-steps)
15
+ - [Troubleshooting](#troubleshooting)
16
+
17
+ ---
18
+
19
+ ## What is Atomize?
20
+
21
+ Atomize automatically generates sub-tasks from user stories using smart YAML templates. Instead of manually breaking down each story into tasks, Atomize:
22
+
23
+ - **Creates consistent task breakdowns** across your team
24
+ - **Saves time** on repetitive planning work
25
+ - **Distributes estimation** intelligently across tasks
26
+ - **Works with** Azure DevOps (Jira & GitHub coming soon)
27
+
28
+ ### How It Works
29
+
30
+ ```
31
+ User Story (8 points)
32
+ ↓
33
+ Atomize + Template
34
+ ↓
35
+ ├─ Design API (1.2 points)
36
+ ├─ Database Schema (1.2 points)
37
+ ├─ Core Implementation (2.8 points)
38
+ ├─ Unit Tests (1.2 points)
39
+ ├─ Integration Tests (0.8 points)
40
+ └─ Code Review (0.8 points)
41
+ ```
42
+
43
+ ---
44
+
45
+ ## Installation
46
+
47
+ ### Prerequisites
48
+
49
+ - Node.js 18+ or Bun runtime
50
+ - Azure DevOps account (or use mock platform for testing)
51
+
52
+ ### Install Globally
53
+
54
+ ```bash
55
+ npm install -g @sppg2001/atomize
56
+ ```
57
+
58
+ ### Verify Installation
59
+
60
+ ```bash
61
+ atomize --version
62
+ atomize --help
63
+ ```
64
+
65
+ ### Alternative: Use without Installing
66
+
67
+ ```bash
68
+ npx @sppg2001/atomize generate template:backend-api
69
+ ```
70
+
71
+ ---
72
+
73
+ ## Quick Start
74
+
75
+ Let's generate tasks for some user stories in **5 minutes**!
76
+
77
+ ### Step 1: Test with Mock Data
78
+
79
+ ```bash
80
+ # Preview without connecting to any platform (templates are bundled)
81
+ atomize generate template:backend-api --platform mock
82
+ ```
83
+
84
+ You'll see:
85
+
86
+ ```
87
+ ATOMIZATION RESULTS
88
+ ========================================
89
+
90
+ Stories processed: 3
91
+ Tasks calculated: 18
92
+ Tasks created: 0 (dry run)
93
+
94
+ ✓ STORY-001: Implement user authentication API
95
+ Estimation: 8 points
96
+ Tasks: 6
97
+
98
+ ✓ STORY-003: Implement payment processing
99
+ Estimation: 13 points
100
+ Tasks: 6
101
+ ```
102
+
103
+ ### Step 2: Connect to Azure DevOps
104
+
105
+ Save your credentials as a named profile:
106
+
107
+ ```bash
108
+ atomize auth add work-ado
109
+ # Prompts for org URL, project, team, and PAT
110
+ # Set as default when prompted
111
+ ```
112
+
113
+ **Get a PAT:** `https://dev.azure.com/[your-org]/_usersSettings/tokens`
114
+ **Scopes needed:** Work Items (Read, Write)
115
+
116
+ Test the connection before generating:
117
+
118
+ ```bash
119
+ atomize auth test work-ado
120
+ ```
121
+
122
+ ### Step 3: Generate Real Tasks
123
+
124
+ ```bash
125
+ # Dry run (default — no --execute)
126
+ atomize generate template:backend-api
127
+
128
+ # Execute for real
129
+ atomize generate template:backend-api --execute
130
+ ```
131
+
132
+ That's it! You've generated your first batch of tasks.
133
+
134
+ ---
135
+
136
+ ## Your First Template
137
+
138
+ Let's create a custom template for your team's workflow.
139
+
140
+ ### Option 1: Start from Preset
141
+
142
+ ```bash
143
+ # List available templates
144
+ atomize template list
145
+
146
+ # Create from an existing template
147
+ atomize template create --from backend-api
148
+ ```
149
+
150
+ Built-in templates include `backend-api`, `feature`, `bug`, `custom`, and `custom-saved-query`.
151
+
152
+ ### Option 2: Interactive Wizard
153
+
154
+ ```bash
155
+ atomize template create --scratch
156
+ ```
157
+
158
+ Follow the step-by-step wizard:
159
+ 1. Basic info (name, description)
160
+ 2. Filter criteria (which stories to match)
161
+ 3. Tasks (what to create)
162
+ 4. Estimation settings
163
+ 5. Validation rules (optional)
164
+ 6. Metadata (optional)
165
+
166
+ ### Option 3: Learn from Existing Work
167
+
168
+ ```bash
169
+ # Learn from multiple stories for pattern detection
170
+ atomize template create \
171
+ --from-stories STORY-100,STORY-115,STORY-132 \
172
+ --platform azure-devops
173
+ ```
174
+
175
+ Atomize analyzes the story's existing tasks and generates a reusable template. When using multiple stories, it detects patterns, scores confidence, and filters outliers. See [Story Learner](./Story-Learner.md) for details.
176
+
177
+ ---
178
+
179
+ ## Generating Tasks
180
+
181
+ ### Basic Generation
182
+
183
+ ```bash
184
+ # Preview first (always recommended)
185
+ atomize generate my-template.yaml
186
+
187
+ # Execute when satisfied
188
+ atomize generate my-template.yaml --execute
189
+ ```
190
+
191
+ ### With Options
192
+
193
+ ```bash
194
+ # Continue on errors (process all stories)
195
+ atomize generate my-template.yaml --execute --continue-on-error
196
+
197
+ # Verbose output (see details per story)
198
+ atomize generate my-template.yaml --execute --verbose
199
+
200
+ # Mock platform (testing, no credentials needed)
201
+ atomize generate my-template.yaml --platform mock
202
+
203
+ # Increase concurrency for large backlogs
204
+ atomize generate my-template.yaml --execute --story-concurrency 8
205
+ ```
206
+
207
+ ### Understanding Output
208
+
209
+ ```
210
+ ATOMIZATION RESULTS
211
+ ===========================================
212
+
213
+ Summary:
214
+ Template: Backend API Development
215
+ Stories processed: 5
216
+ Stories success: 5
217
+ Stories failed: 0
218
+ Tasks calculated: 30
219
+ Tasks created: 30
220
+ Execution time: 3421ms
221
+
222
+ Details:
223
+
224
+ ✓ STORY-001: Implement user authentication API
225
+ Estimation: 8 points
226
+ Tasks: 6
227
+ Distribution: 8 points (100%)
228
+ ```
229
+
230
+ **Key metrics:**
231
+ - **Stories processed** — Total stories matching your filter
232
+ - **Tasks calculated** — Total tasks that would be / were created
233
+ - **Distribution** — How estimation was split across tasks
234
+
235
+ ---
236
+
237
+ ## Understanding Validation
238
+
239
+ Always validate templates before using them:
240
+
241
+ ```bash
242
+ # Basic validation
243
+ atomize validate my-template.yaml
244
+
245
+ # Strict mode — warnings become errors (good for team templates)
246
+ atomize validate my-template.yaml --strict
247
+
248
+ # Validate custom fields and saved queries against ADO
249
+ atomize validate my-template.yaml --profile work-ado
250
+ ```
251
+
252
+ **Valid template:**
253
+ ```
254
+ Template is valid!
255
+
256
+ Summary:
257
+ Name: Backend API Development
258
+ Tasks: 6
259
+ Total Estimation: 100%
260
+ Custom Fields: 2 (verified against ADO)
261
+
262
+ Ready to use with: atomize generate my-template.yaml
263
+ ```
264
+
265
+ **Invalid template:**
266
+ ```
267
+ Template validation failed
268
+
269
+ Errors:
270
+ ✗ tasks: Total estimation is 70%, but must be 100%
271
+ ✗ tasks[2].dependsOn: Task depends on non-existent task ID
272
+
273
+ Fix the errors above and try again.
274
+ ```
275
+
276
+ ### Strict vs Lenient Mode
277
+
278
+ - **Lenient** (default) — Only hard errors block the template. Warnings are shown but non-blocking. Good for development.
279
+ - **Strict** — Warnings are treated as errors. Best for production templates and CI/CD.
280
+
281
+ See [Validation Modes](./Validation-Modes.md) for the full guide.
282
+
283
+ ---
284
+
285
+ ## Template Anatomy
286
+
287
+ Understanding a basic template:
288
+
289
+ ```yaml
290
+ version: "1.0"
291
+ name: "Backend API Development"
292
+ description: "Standard backend API workflow"
293
+
294
+ # Which stories to match
295
+ filter:
296
+ workItemTypes: ["User Story"]
297
+ states: ["New", "Active"]
298
+ tags:
299
+ include: ["backend"]
300
+ excludeIfHasTasks: true # Skip stories that already have tasks
301
+
302
+ # What tasks to create
303
+ tasks:
304
+ - title: "Design API: ${story.title}" # ${story.title} = story's title
305
+ estimationPercent: 15 # 15% of story points
306
+ activity: "Design"
307
+
308
+ - title: "Implement: ${story.title}"
309
+ estimationPercent: 50
310
+ activity: "Development"
311
+ assignTo: "@ParentAssignee" # Inherit from story
312
+
313
+ - title: "Unit Tests"
314
+ estimationPercent: 20
315
+ activity: "Testing"
316
+
317
+ - title: "Code Review"
318
+ estimationPercent: 15
319
+ activity: "Documentation"
320
+
321
+ # How to calculate estimations
322
+ estimation:
323
+ strategy: "percentage"
324
+ rounding: "nearest"
325
+ minimumTaskPoints: 0.5
326
+ ```
327
+
328
+ ### Key Concepts
329
+
330
+ **Variables**
331
+ ```yaml
332
+ - title: "Implement: ${story.title}" # Inserts story title
333
+ - description: "Story ${story.id}" # Inserts story ID
334
+ ```
335
+
336
+ **Assignment Patterns**
337
+ ```yaml
338
+ - assignTo: "@ParentAssignee" # Inherit from story
339
+ - assignTo: "@Me" # Current user
340
+ - assignTo: "dev@company.com" # Specific user
341
+ ```
342
+
343
+ **Estimation**
344
+ ```yaml
345
+ - estimationPercent: 30 # 30% of parent story points
346
+ - estimationFixed: 2 # Always 2 points (ignores parent estimation)
347
+ ```
348
+
349
+ **Conditional Tasks**
350
+ ```yaml
351
+ - title: "Security Review"
352
+ estimationPercent: 10
353
+ condition:
354
+ field: "tags"
355
+ operator: "contains"
356
+ value: "security" # Only created if story has "security" tag
357
+ ```
358
+
359
+ **Conditional Estimation** (v1.1)
360
+ ```yaml
361
+ - title: "Implementation"
362
+ estimationPercent: 50 # Default
363
+ estimationPercentCondition:
364
+ - condition:
365
+ field: "tags"
366
+ operator: "contains"
367
+ value: "critical"
368
+ percent: 60 # Higher weight for critical stories
369
+ - condition:
370
+ field: "estimation"
371
+ operator: "gte"
372
+ value: 13
373
+ percent: 55 # More work for large stories
374
+ ```
375
+
376
+ **Task Custom Fields**
377
+ ```yaml
378
+ - title: "Backend Implementation"
379
+ customFields:
380
+ Custom.ClientTier: "Enterprise"
381
+ Custom.ReleaseVersion: "{{ story.customFields['Custom.ReleaseVersion'] }}"
382
+ ```
383
+
384
+ Use `atomize fields list --type Task` to browse the available field names before authoring templates.
385
+
386
+ ---
387
+
388
+ ## Common Workflows
389
+
390
+ ### Daily Usage
391
+
392
+ ```bash
393
+ # Generate tasks for new stories
394
+ atomize generate template:backend-api --execute
395
+
396
+ # Create a custom template for a special case
397
+ atomize template create --scratch
398
+
399
+ # Test the new template
400
+ atomize validate my-new-template.yaml
401
+ atomize generate my-new-template.yaml
402
+
403
+ # Apply it
404
+ atomize generate my-new-template.yaml --execute
405
+ ```
406
+
407
+ ### Team Workflow
408
+
409
+ ```
410
+ templates/
411
+ ├── backend-api.yaml # API development
412
+ ├── feature.yaml # Feature work
413
+ ├── bug.yaml # Bug fixes
414
+ └── database-change.yaml # Schema changes
415
+ ```
416
+
417
+ ```bash
418
+ atomize generate template:backend-api --execute
419
+ atomize generate template:bug --execute
420
+ ```
421
+
422
+ ### CI/CD Integration
423
+
424
+ ```yaml
425
+ # .github/workflows/atomize.yml
426
+ name: Generate Tasks
427
+
428
+ on:
429
+ schedule:
430
+ - cron: '0 9 * * 1' # Every Monday at 9am
431
+
432
+ jobs:
433
+ generate:
434
+ runs-on: ubuntu-latest
435
+ steps:
436
+ - uses: actions/checkout@v4
437
+
438
+ - name: Install Atomize
439
+ run: npm install -g @sppg2001/atomize
440
+
441
+ - name: Validate Templates
442
+ run: |
443
+ for template in templates/*.yaml; do
444
+ atomize validate "$template" --strict --quiet
445
+ done
446
+
447
+ - name: Save connection profile
448
+ env:
449
+ ATOMIZE_PAT: ${{ secrets.AZURE_DEVOPS_PAT }}
450
+ run: |
451
+ atomize auth add ci \
452
+ --org-url "${{ secrets.AZURE_DEVOPS_ORG_URL }}" \
453
+ --project "${{ secrets.AZURE_DEVOPS_PROJECT }}" \
454
+ --team "${{ secrets.AZURE_DEVOPS_TEAM }}" \
455
+ --default \
456
+ --insecure-storage
457
+
458
+ - name: Generate Tasks
459
+ run: |
460
+ atomize generate template:backend-api \
461
+ --execute \
462
+ --auto-approve \
463
+ --continue-on-error
464
+ ```
465
+
466
+ ---
467
+
468
+ ## Troubleshooting
469
+
470
+ ### "No stories found"
471
+
472
+ **Solutions:**
473
+ 1. Test with mock platform first:
474
+ ```bash
475
+ atomize generate my-template.yaml --platform mock
476
+ ```
477
+
478
+ 2. Make the filter less restrictive:
479
+ ```yaml
480
+ filter:
481
+ workItemTypes: ["User Story", "Product Backlog Item"] # Add more types
482
+ states: ["New", "Active", "Approved"] # Add more states
483
+ # Remove or broaden tag filters
484
+ ```
485
+
486
+ ### "Authentication failed"
487
+
488
+ **Solutions:**
489
+ 1. Check what profiles are saved:
490
+ ```bash
491
+ atomize auth list
492
+ ```
493
+
494
+ 2. Test the profile:
495
+ ```bash
496
+ atomize auth test work-ado
497
+ ```
498
+
499
+ 3. If the PAT has expired, rotate it:
500
+ ```bash
501
+ atomize auth rotate work-ado
502
+ ```
503
+
504
+ 4. Verify PAT has Work Items (Read, Write) scope
505
+
506
+ ### "Validation failed"
507
+
508
+ **Solutions:**
509
+ 1. Run validation in strict mode for detailed error output:
510
+ ```bash
511
+ atomize validate my-template.yaml --strict
512
+ ```
513
+
514
+ 2. Common issues:
515
+ - Total estimation not 100%: Adjust task percentages
516
+ - Missing required fields: Add `title` to all tasks
517
+ - Invalid dependencies: Ensure task IDs exist
518
+ - Custom fields not verified offline: Re-run with `--profile <name>`
519
+
520
+ ---
521
+
522
+ ## Next Steps
523
+
524
+ - [CLI Reference](./Cli-Reference.md) - Complete command and flag reference
525
+ - [Template Reference](./Template-Reference.md) - Full template schema documentation
526
+ - [Validation Modes](./Validation-Modes.md) - Strict vs lenient validation explained
527
+ - [Story Learner](./Story-Learner.md) - Generate templates from existing work items
528
+ - [Common Validation Errors](./Common-Validation-Errors.md) - Fix validation failures
529
+ - [Platform Guide](./Platform-Guide.md) - Azure DevOps setup and configuration
530
+ - [Template Wizard Guide](./template-wizard-guide.md) - Interactive wizard walkthrough
531
+ - [Examples](../examples/) - Real-world template examples
532
+
533
+ ---
534
+
535
+ ## Need Help?
536
+
537
+ - Read the [CLI Reference](./Cli-Reference.md)
538
+ - Search [GitHub Issues](https://github.com/Simao-Pereira-Gomes/atomize/issues)
539
+ - Start a [Discussion](https://github.com/Simao-Pereira-Gomes/atomize/discussions)
540
+ - [Report a Bug](https://github.com/Simao-Pereira-Gomes/atomize/issues/new)