@sppg2001/atomize 1.1.0 → 1.2.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.
package/.env.example CHANGED
@@ -1,3 +1,17 @@
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
+ # Atomize environment variables
2
+ #
3
+ # These can be set in your shell profile (~/.zshrc, ~/.bashrc) or passed
4
+ # explicitly via: atomize --env-file /path/to/.env <command>
5
+ #
6
+ # Shell environment always takes precedence over --env-file values.
7
+
8
+ # Personal Access Token used by `atomize auth add` when running non-interactively.
9
+ # Prefer setting this in your CI/CD platform's secrets store rather than a .env file.
10
+ # ATOMIZE_PAT=your-personal-access-token
11
+
12
+ # Default connection profile to use when --profile is not specified.
13
+ # Run `atomize auth list` to see available profiles.
14
+ # ATOMIZE_PROFILE=work-ado
15
+
16
+ # Winston log level: error, warn, info, debug (default: warn).
17
+ # LOG_LEVEL=warn
package/README.md CHANGED
@@ -9,13 +9,12 @@
9
9
 
10
10
  **Break down stories, build up velocity.**
11
11
 
12
- 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.
12
+ Atomize is a CLI tool that automatically generates granular tasks from user stories using YAML templates. Streamline your agile workflow with preset templates, story learning, and smart estimation distribution.
13
13
 
14
14
  ---
15
15
 
16
16
  ## Features
17
17
 
18
- - **AI-Powered Generation** - Create templates using Google Gemini or local Ollama (completely free)
19
18
  - **Preset Templates** - Start with battle-tested templates for common workflows
20
19
  - **Story Learning** - Generate templates by analyzing your existing work items (single or multiple stories)
21
20
  - **Pattern Detection** - Identify common task patterns across multiple stories with confidence scoring
@@ -25,7 +24,7 @@ Atomize is a CLI tool that automatically generates granular tasks from user stor
25
24
  - **Zero Config** - Works out of the box with sensible defaults
26
25
  - **Interactive Wizards** - User-friendly prompts guide you through everything
27
26
  - **Built-in Validation** - Catch template errors before they cause problems
28
- - **CI/CD Ready** - Automation-friendly with `--no-interactive` and JSON report output
27
+ - **CI/CD Ready** - Automation-friendly with JSON report output
29
28
 
30
29
  ---
31
30
 
@@ -56,28 +55,37 @@ bun run dev
56
55
 
57
56
  ## Quick Start
58
57
 
59
- ### 1. Generate Tasks from a Template
58
+ ### 1. Connect to Azure DevOps
60
59
 
61
60
  ```bash
62
- # Use a preset template
61
+ # Add your first connection profile (interactive wizard)
62
+ atomize auth add work-ado
63
+
64
+ # Verify it works
65
+ atomize auth test work-ado
66
+ ```
67
+
68
+ You'll be prompted for your Organization URL, project, team, and a [Personal Access Token](https://learn.microsoft.com/en-us/azure/devops/organizations/accounts/use-personal-access-tokens-to-authenticate).
69
+
70
+ ### 2. Generate Tasks from a Template
71
+
72
+ ```bash
73
+ # Use a preset template (dry-run by default — safe to try)
63
74
  atomize generate templates/backend-api.yaml
64
75
 
65
- # Interactive mode (prompts for template and options)
76
+ # When ready to create tasks for real
77
+ atomize generate templates/backend-api.yaml --execute
78
+
79
+ # Interactive mode (prompts for everything)
66
80
  atomize generate
67
81
  ```
68
82
 
69
- ### 2. Create Your First Template
83
+ ### 3. Create Your First Template
70
84
 
71
85
  ```bash
72
- # AI-powered creation (free!)
73
- atomize template create --ai "Backend API with authentication"
74
-
75
86
  # From a preset
76
87
  atomize template create --preset backend-api
77
88
 
78
- # Learn from one existing story
79
- atomize template create --from-story STORY-123
80
-
81
89
  # Learn from multiple stories (better pattern detection)
82
90
  atomize template create --from-stories STORY-1,STORY-2,STORY-3
83
91
 
@@ -85,7 +93,7 @@ atomize template create --from-stories STORY-1,STORY-2,STORY-3
85
93
  atomize template create --scratch
86
94
  ```
87
95
 
88
- ### 3. Validate a Template
96
+ ### 4. Validate a Template
89
97
 
90
98
  ```bash
91
99
  # Lenient mode (default) — only hard errors block use
@@ -113,28 +121,30 @@ atomize generate templates/backend-api.yaml \
113
121
  --execute \
114
122
  --verbose
115
123
 
116
- # Dry run (preview only default behavior)
117
- atomize generate templates/backend-api.yaml --dry-run
124
+ # Dry run (defaultno --execute needed)
125
+ atomize generate templates/backend-api.yaml
118
126
 
119
127
  # CI/CD mode with JSON report
120
128
  atomize generate templates/backend-api.yaml \
121
129
  --execute \
122
- --no-interactive \
130
+ --yes \
123
131
  --output report.json
124
132
  ```
125
133
 
126
134
  **Key Options:**
127
135
  - `--platform <type>` - Platform: `azure-devops` or `mock`
136
+ - `--profile <name>` - Named connection profile to use (see `atomize auth add`)
128
137
  - `--execute` - Actually create tasks (default is dry-run preview)
129
- - `--dry-run` - Preview without creating tasks
138
+ - `-y, --yes` - Required with `--execute` in non-interactive mode to acknowledge live task creation
130
139
  - `--continue-on-error` - Keep processing if errors occur
131
140
  - `--story-concurrency <n>` - Parallel story processing (default: 3, max: 10)
132
141
  - `--task-concurrency <n>` - Parallel task creation per story (default: 5, max: 20)
133
142
  - `--dependency-concurrency <n>` - Parallel dependency link creation (default: 5, max: 10)
134
143
  - `--verbose` - Show detailed output
135
- - `--no-interactive` - Skip all prompts (for automation)
136
144
  - `-o, --output <file>` - Write JSON report to file
137
145
 
146
+ In non-interactive mode, `--execute` now requires `--yes`. This prevents unattended task creation from wrapper scripts or CI jobs that did not explicitly acknowledge the mutation.
147
+
138
148
  **Example Output:**
139
149
  ```
140
150
  ✓ Loaded template: Backend API Development
@@ -153,19 +163,12 @@ Summary:
153
163
  #### Create a Template
154
164
 
155
165
  ```bash
156
- # best for quick starts
157
- atomize template create --ai "Create template for React component development"
158
-
159
166
  # From preset (fastest)
160
167
  atomize template create --preset frontend-feature
161
168
 
162
- # Learn from a single story (matches your workflow)
163
- atomize template create --from-story STORY-456 --platform azure-devops
164
-
165
169
  # Learn from multiple stories (best pattern detection)
166
170
  atomize template create \
167
171
  --from-stories STORY-1,STORY-2,STORY-3 \
168
- --normalize \
169
172
  --output my-templates/learned.yaml
170
173
 
171
174
  # Interactive wizard (most control)
@@ -175,7 +178,7 @@ atomize template create --scratch
175
178
  #### List Available Presets
176
179
 
177
180
  ```bash
178
- atomize template list
181
+ atomize template presets
179
182
  ```
180
183
 
181
184
  **Available Presets:**
@@ -306,50 +309,6 @@ tasks:
306
309
 
307
310
  ---
308
311
 
309
- ## AI-Powered Template Creation
310
-
311
- Atomize supports two free AI providers:
312
-
313
- ### Google Gemini (Cloud — Recommended)
314
-
315
- 1. Get a free API key: https://makersuite.google.com/app/apikey
316
- 2. Set environment variable:
317
- ```bash
318
- export GOOGLE_AI_API_KEY="your-key-here"
319
- ```
320
- For windows
321
- ```bash
322
- set GOOGLE_AI_API_KEY=your-key
323
- ```
324
- 4. Create templates:
325
- ```bash
326
- atomize template create --ai "Backend API with OAuth authentication"
327
- ```
328
-
329
- ### Ollama (Local — Complete Privacy)
330
-
331
- 1. Install Ollama: https://ollama.ai
332
- 2. Download a model:
333
- ```bash
334
- ollama pull llama3.2
335
- ```
336
- 3. Start the service:
337
- ```bash
338
- ollama serve
339
- ```
340
- 4. Create templates:
341
- ```bash
342
- atomize template create --ai-provider ollama --ai "Mobile-first React component"
343
- ```
344
-
345
- ### AI Tips
346
-
347
- - Be specific: "Backend API with JWT auth, rate limiting, and PostgreSQL"
348
- - Specify testing requirements: "Include unit tests and E2E tests"
349
- - Use the refinement loop to iterate: Accept, Refine, Regenerate, or Cancel
350
-
351
- ---
352
-
353
312
  ## Platform Setup
354
313
 
355
314
  ### Azure DevOps
@@ -358,25 +317,29 @@ Atomize supports two free AI providers:
358
317
  - Go to: `https://dev.azure.com/[your-org]/_usersSettings/tokens`
359
318
  - Create token with `Work Items (Read, Write)` scope
360
319
 
361
- 2. **Configure Environment Variables**
320
+ 2. **Save a connection profile**
362
321
  ```bash
363
- export AZURE_DEVOPS_ORG_URL="https://dev.azure.com/your-org"
364
- export AZURE_DEVOPS_PROJECT="YourProject"
365
- export AZURE_DEVOPS_PAT="your-personal-access-token"
322
+ atomize auth add work-ado
323
+ # Prompts for org URL, project, team, and PAT
366
324
  ```
367
- For Windows
368
- ```bash
369
- set AZURE_DEVOPS_ORG_URL="https://dev.azure.com/your-org"
370
- set AZURE_DEVOPS_PROJECT="YourProject"
371
- set AZURE_DEVOPS_PAT="your-personal-access-token"
325
+
326
+ 3. **Test the connection**
327
+ ```bash
328
+ atomize auth test work-ado
372
329
  ```
373
330
 
374
- 4. **Or Use Interactive Setup**
331
+ 4. **Generate tasks**
375
332
  ```bash
333
+ # Use the profile explicitly
334
+ atomize generate templates/backend-api.yaml --profile work-ado
335
+
336
+ # Or set it as default once
337
+ atomize auth use work-ado
376
338
  atomize generate templates/backend-api.yaml
377
- # CLI will prompt for configuration
378
339
  ```
379
340
 
341
+ See `atomize auth --help` for all profile management commands (`list`, `remove`, `rotate`).
342
+
380
343
  ### Mock Platform (Testing)
381
344
 
382
345
  ```bash
@@ -435,7 +398,6 @@ validation:
435
398
  atomize template create \
436
399
  --from-stories STORY-100,STORY-115,STORY-132,STORY-148 \
437
400
  --platform azure-devops \
438
- --normalize \
439
401
  --output team-templates/backend-standard.yaml
440
402
 
441
403
  # Validate the learned template
@@ -453,14 +415,21 @@ atomize generate team-templates/backend-standard.yaml --execute
453
415
 
454
416
  ```yaml
455
417
  filter:
418
+ team: "Backend Team" # Override team (replaces AZURE_DEVOPS_TEAM env var)
456
419
  workItemTypes: ["User Story", "Bug"]
457
420
  states: ["New", "Approved"]
421
+ statesExclude: ["Done", "Removed"] # Exclude items in these states
422
+ statesWereEver: ["In Review"] # Items that were ever in these states
458
423
  tags:
459
424
  include: ["backend"]
460
425
  exclude: ["deprecated"]
461
- areaPaths: ["MyProject\\Backend\\API"]
462
- iterations: ["Sprint 23", "Sprint 24"]
463
- assignedTo: ["john@company.com", "jane@company.com"]
426
+ areaPaths: ["MyProject\\Backend\\API"] # Exact match
427
+ areaPathsUnder: ["MyProject\\Backend"] # Match and all sub-areas
428
+ iterations: ["@CurrentIteration"] # Current sprint
429
+ iterationsUnder: ["MyProject\\Release 2"] # All sprints under a release
430
+ assignedTo: ["@Me", "jane@company.com"]
431
+ changedAfter: "@Today-7" # Changed in the last 7 days
432
+ createdAfter: "@Today-30" # Created in the last 30 days
464
433
  priority:
465
434
  min: 1
466
435
  max: 2
@@ -481,6 +450,71 @@ estimation:
481
450
  ifParentHasNoEstimation: "skip" # skip, warn, use-default
482
451
  ```
483
452
 
453
+ ### Environment Variables
454
+
455
+ | Variable | Description | Default |
456
+ |---|---|---|
457
+ | `ATOMIZE_PROFILE` | Default connection profile when `--profile` is not specified | _(none)_ |
458
+ | `LOG_LEVEL` | Log verbosity: `error`, `warn`, `info`, `debug` | `warn` |
459
+
460
+ #### macOS / Linux
461
+
462
+ Add to your shell profile (`~/.zshrc`, `~/.bashrc`, etc.) and restart your terminal:
463
+
464
+ ```bash
465
+ export ATOMIZE_PROFILE=work-ado # Default connection profile
466
+ export LOG_LEVEL=warn # Log verbosity (optional)
467
+ ```
468
+
469
+ #### Windows (PowerShell)
470
+
471
+ To persist across sessions, set them as user environment variables:
472
+
473
+ ```powershell
474
+ [Environment]::SetEnvironmentVariable("ATOMIZE_PROFILE", "work-ado", "User")
475
+ [Environment]::SetEnvironmentVariable("LOG_LEVEL", "warn", "User")
476
+ ```
477
+
478
+ Or for the current session only:
479
+
480
+ ```powershell
481
+ $env:ATOMIZE_PROFILE = "work-ado"
482
+ $env:LOG_LEVEL = "warn"
483
+ ```
484
+
485
+ #### Windows (Command Prompt)
486
+
487
+ For the current session only:
488
+
489
+ ```cmd
490
+ set ATOMIZE_PROFILE=work-ado
491
+ set LOG_LEVEL=warn
492
+ ```
493
+
494
+ To persist, use **System Properties → Environment Variables** or `setx`:
495
+
496
+ ```cmd
497
+ setx ATOMIZE_PROFILE "work-ado"
498
+ ```
499
+
500
+ > **Note:** `setx` changes take effect in new terminal windows, not the current one.
501
+
502
+ #### Using `--env-file` for explicit file-based config
503
+
504
+ If you prefer file-based configuration (e.g. in CI/CD), pass `--env-file` explicitly:
505
+
506
+ ```bash
507
+ # macOS / Linux
508
+ atomize --env-file ~/.config/atomize.env generate templates/backend-api.yaml
509
+
510
+ # Windows (PowerShell)
511
+ atomize --env-file $env:USERPROFILE\.config\atomize.env generate templates/backend-api.yaml
512
+ ```
513
+
514
+ Shell environment variables always take precedence over values in the file, so it is safe to use `--env-file` as a fallback without risk of overriding real environment config.
515
+
516
+ See `.env.example` in the repository for a documented template.
517
+
484
518
  ---
485
519
 
486
520
  ## Testing
@@ -517,11 +551,17 @@ bun run build
517
551
  ### "Not authenticated" error
518
552
 
519
553
  ```bash
520
- # Check environment variables are set
521
- echo $AZURE_DEVOPS_PAT
554
+ # Check what profiles are saved
555
+ atomize auth list
522
556
 
523
- # Or use interactive mode (will prompt)
524
- atomize generate templates/backend-api.yaml
557
+ # Add a profile if none exist
558
+ atomize auth add work-ado
559
+
560
+ # Test the profile
561
+ atomize auth test work-ado
562
+
563
+ # Use it explicitly
564
+ atomize generate templates/backend-api.yaml --profile work-ado
525
565
  ```
526
566
 
527
567
  ### "Template validation failed"
@@ -536,18 +576,6 @@ atomize validate templates/my-template.yaml --verbose
536
576
  # - Missing required fields
537
577
  ```
538
578
 
539
- ### "AI provider not available"
540
-
541
- ```bash
542
- # For Gemini
543
- export GOOGLE_AI_API_KEY="your-key"
544
- set GOOGLE_AI_API_KEY="your-key"
545
-
546
- # For Ollama
547
- ollama serve # Must be running
548
- ollama pull llama3.2 # Model must be downloaded
549
- ```
550
-
551
579
  ---
552
580
 
553
581
  ## Documentation