@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.
@@ -11,6 +11,7 @@ Real-world Atomize template examples. Each file is a working template you can va
11
11
  | [`fullstack.yaml`](#fullstackyaml) | Combined backend + frontend with a branching task graph |
12
12
  | [`conditional-dependencies-template.yaml`](#conditional-dependencies-templateyaml) | Conditional tasks — tasks that only appear when a story meets specific criteria |
13
13
  | [`conditional-percentage-template.yaml`](#conditional-percentage-templateyaml) | Conditional estimation — task weights that adapt to story size and tags |
14
+ | [`advanced-filtering.yaml`](#advanced-filteringyaml) | Full filter criteria showcase: state exclusion, historical states, area/iteration hierarchy, date filters, team override |
14
15
 
15
16
  ---
16
17
 
@@ -159,6 +160,36 @@ atomize generate examples/conditional-percentage-template.yaml --platform mock -
159
160
 
160
161
  ---
161
162
 
163
+ ## advanced-filtering.yaml
164
+
165
+ A reference template that demonstrates every available filter option. Use it as a starting point when you need precise control over which work items Atomize processes.
166
+
167
+ **Key features shown:**
168
+
169
+ | Filter | What it does |
170
+ |--------|-------------|
171
+ | `team` | Overrides the `AZURE_DEVOPS_TEAM` env var for this template |
172
+ | `statesExclude` | Excludes items in `Done`, `Removed`, or `Won't Fix` |
173
+ | `statesWereEver` | Matches items that passed through `In Review` historically |
174
+ | `areaPathsUnder` | Matches `MyProject\Backend` **and all sub-areas** (hierarchy traversal) |
175
+ | `iterationsUnder` | Matches all sprints under `Release 3` (not just one sprint) |
176
+ | `changedAfter` | Only items touched in the last 14 days (`@Today-14`) |
177
+ | `createdAfter` | Only items created in the last 90 days (`@Today-90`) |
178
+
179
+ **Supported `@Today` macro syntax:**
180
+ - `@Today` — start of today
181
+ - `@Today-N` — N days in the past (e.g. `@Today-7`)
182
+ - `@Today+N` — N days in the future
183
+ - Also: `@StartOfWeek`, `@StartOfMonth`, `@StartOfYear` (with optional offsets)
184
+
185
+ **Try it:**
186
+ ```bash
187
+ atomize validate examples/advanced-filtering.yaml
188
+ atomize generate examples/advanced-filtering.yaml --platform mock --dry-run
189
+ ```
190
+
191
+ ---
192
+
162
193
  ## Running All Examples
163
194
 
164
195
  ```bash
@@ -0,0 +1,113 @@
1
+ version: "1.0"
2
+ name: "Advanced Filtering Demo"
3
+ description: |
4
+ Demonstrates the full range of filter criteria: state exclusion, historical
5
+ state matching, area/iteration hierarchy traversal, date-based filters, and
6
+ team override.
7
+ author: "Atomize"
8
+ tags: ["demo", "filtering", "advanced"]
9
+
10
+ # Each option below is independent — in a real template you would only use
11
+ # the subset that makes sense for your workflow.
12
+ filter:
13
+ # Override the team configured in AZURE_DEVOPS_TEAM env var
14
+ team: "Backend Team"
15
+
16
+ workItemTypes:
17
+ - "User Story"
18
+
19
+ # Items currently in these states
20
+ states:
21
+ - "Active"
22
+ - "In Progress"
23
+
24
+ # Exclude items in these states (complements `states`)
25
+ statesExclude:
26
+ - "Done"
27
+ - "Removed"
28
+ - "Won't Fix"
29
+
30
+ # Items that passed through code review at some point (historical match)
31
+ statesWereEver:
32
+ - "In Review"
33
+
34
+ tags:
35
+ include:
36
+ - "backend"
37
+ exclude:
38
+ - "deprecated"
39
+ - "on-hold"
40
+
41
+ # Match items under "MyProject\Backend" and ALL its sub-areas
42
+ areaPathsUnder:
43
+ - "MyProject\\Backend"
44
+
45
+ # Match items in the current sprint or any sprint under the current release
46
+ iterations:
47
+ - "@CurrentIteration"
48
+ iterationsUnder:
49
+ - "MyProject\\Release 3"
50
+
51
+ # Only items assigned to the person running the command
52
+ assignedTo:
53
+ - "@Me"
54
+
55
+ # Only items touched in the last 14 days
56
+ changedAfter: "@Today-14"
57
+
58
+ # Only items created in the last 90 days
59
+ createdAfter: "@Today-90"
60
+
61
+ priority:
62
+ min: 1
63
+ max: 2
64
+
65
+ excludeIfHasTasks: true
66
+
67
+ tasks:
68
+ - id: "design"
69
+ title: "Design: ${story.title}"
70
+ description: "Technical design and approach"
71
+ estimationPercent: 15
72
+ activity: "Design"
73
+ assignTo: "@ParentAssignee"
74
+
75
+ - id: "implement"
76
+ title: "Implement: ${story.title}"
77
+ description: "Core implementation"
78
+ estimationPercent: 55
79
+ activity: "Development"
80
+ assignTo: "@ParentAssignee"
81
+ dependsOn:
82
+ - "design"
83
+
84
+ - id: "tests"
85
+ title: "Tests"
86
+ description: "Unit and integration tests"
87
+ estimationPercent: 20
88
+ activity: "Testing"
89
+ dependsOn:
90
+ - "implement"
91
+
92
+ - id: "review"
93
+ title: "Code Review & Documentation"
94
+ estimationPercent: 10
95
+ activity: "Documentation"
96
+ dependsOn:
97
+ - "tests"
98
+
99
+ estimation:
100
+ strategy: "percentage"
101
+ rounding: "nearest"
102
+ minimumTaskPoints: 0.5
103
+
104
+ validation:
105
+ totalEstimationMustBe: 100
106
+ minTasks: 3
107
+
108
+ metadata:
109
+ category: "Demo"
110
+ difficulty: "beginner"
111
+ recommendedFor:
112
+ - "Learning Atomize filter options"
113
+ estimationGuidelines: "Tasks here are illustrative — adjust percentages to fit your team's workflow."
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sppg2001/atomize",
3
- "version": "1.1.0",
3
+ "version": "1.2.1",
4
4
  "description": "Automatically generate tasks from user stories with smart templates",
5
5
  "type": "module",
6
6
  "main": "./dist/cli/index.js",
@@ -24,7 +24,7 @@
24
24
  "dev": "ATOMIZE_DEV=true bun run src/cli/index.ts",
25
25
  "build": "bun run typecheck && bun run build:bun",
26
26
  "postbuild": "node make-executable.js",
27
- "build:bun": "bun build ./src/cli/index.ts --outdir ./dist/cli --target node --format esm",
27
+ "build:bun": "node ./scripts/prepare-dist.mjs && bun build ./src/cli/index.ts --outdir ./dist/cli --target node --format esm --external keytar",
28
28
  "build:standalone": "bun build src/cli/index.ts --compile --outfile atomize",
29
29
  "prepublishOnly": "npm run build",
30
30
  "test": "bun test",
@@ -34,7 +34,7 @@
34
34
  "test:coverage": "bun test --coverage --coverage-reporter=lcov",
35
35
  "typecheck": "tsc --noEmit",
36
36
  "validate": "bun run src/cli/index.ts validate",
37
- "validate:package": "test -d dist && test -f dist/cli/index.js && test -d templates/presets",
37
+ "validate:package": "node ./scripts/validate-package.mjs",
38
38
  "check": "bun typecheck && bun test",
39
39
  "lint": "bunx biome check --max-diagnostics 100",
40
40
  "lint:fix": "bunx biome check --fix --max-diagnostics 100",
@@ -64,7 +64,9 @@
64
64
  "devDependencies": {
65
65
  "@biomejs/biome": "2.3.11",
66
66
  "@types/bun": "1.3.5",
67
+ "@types/keytar": "^4.4.2",
67
68
  "@types/node": "^25.0.3",
69
+ "@types/update-notifier": "^6.0.8",
68
70
  "mitata": "^1.0.34"
69
71
  },
70
72
  "peerDependencies": {
@@ -72,12 +74,12 @@
72
74
  },
73
75
  "dependencies": {
74
76
  "@clack/prompts": "^1.1.0",
75
- "@google/generative-ai": "^0.24.1",
76
77
  "azure-devops-node-api": "^15.1.2",
77
78
  "chalk": "^5.6.2",
78
79
  "commander": "^14.0.2",
79
- "dotenv": "^17.2.3",
80
+ "keytar": "^7.9.0",
80
81
  "ts-pattern": "^5.9.0",
82
+ "update-notifier": "^7.3.1",
81
83
  "winston": "^3.19.0",
82
84
  "yaml": "^2.8.2",
83
85
  "zod": "^4.3.5"
@@ -1,6 +1,6 @@
1
1
  version: "1.0"
2
2
  name: " Custom Example"
3
- description: "Example template for an Agile project"
3
+ description: "Example template for an Agile project. Handles dev stories, mixed dev+test stories, and test-only stories in a single template using conditional tasks and conditional estimation."
4
4
  author: "Atomize"
5
5
  tags: []
6
6
 
@@ -8,13 +8,13 @@ filter:
8
8
  workItemTypes: ["User Story"]
9
9
  states: ["Ready for Sprint"]
10
10
  tags:
11
- include:
12
- - "Candidate S117"
11
+ exclude:
12
+ - "TestGen"
13
13
  excludeIfHasTasks: true
14
14
  areaPaths:
15
15
  - EA-RSP-Platform\Release 2 Team
16
16
  iterations:
17
- - EA-RSP-Platform\SOW-7-2026-JAN-MARCH\Sprint 117
17
+ - "@CurrentIteration"
18
18
 
19
19
  tasks:
20
20
  - title: "Analysis & Playback"
@@ -22,52 +22,55 @@ tasks:
22
22
  activity: "Development"
23
23
  tags: []
24
24
  assignTo: "@ParentAssignee"
25
- condition: '${story.tags} NOT CONTAINS "Testing Only"'
25
+ condition: '${story.tags} NOT CONTAINS "Testing Only" AND ${story.tags} NOT CONTAINS "Test Only"'
26
26
 
27
27
  - title: "Build"
28
28
  estimationPercent: 50
29
29
  activity: "Development"
30
30
  tags: []
31
31
  assignTo: "@ParentAssignee"
32
- condition: '${story.tags} NOT CONTAINS "Testing Only"'
32
+ condition: '${story.tags} NOT CONTAINS "Testing Only" AND ${story.tags} NOT CONTAINS "Test Only"'
33
33
 
34
34
  - title: "Developer Test"
35
35
  estimationPercent: 25
36
36
  activity: "Development"
37
37
  tags: []
38
38
  assignTo: "@ParentAssignee"
39
- condition: '${story.tags} NOT CONTAINS "Testing Only"'
39
+ condition: '${story.tags} NOT CONTAINS "Testing Only" AND ${story.tags} NOT CONTAINS "Test Only"'
40
40
 
41
41
  - title: "QA Smoke Test"
42
42
  estimationPercent: 0
43
43
  activity: "Development"
44
44
  tags: []
45
45
  assignTo: "@ParentAssignee"
46
- condition: '${story.tags} NOT CONTAINS "Testing Only"'
46
+ condition: '${story.tags} NOT CONTAINS "Testing Only" AND ${story.tags} NOT CONTAINS "Test Only"'
47
47
 
48
48
  - title: "Wiki"
49
49
  estimationPercent: 5
50
50
  activity: "Development"
51
51
  tags: []
52
52
  assignTo: "@ParentAssignee"
53
- condition: '${story.tags} NOT CONTAINS "Testing Only"'
53
+ condition: '${story.tags} NOT CONTAINS "Testing Only" AND ${story.tags} NOT CONTAINS "Test Only"'
54
54
 
55
55
  - title: "Code Review "
56
56
  estimationPercent: 0
57
57
  activity: "Development"
58
58
  tags: []
59
59
  assignTo: "@Unassigned"
60
- condition: '${story.tags} NOT CONTAINS "Testing Only"'
60
+ condition: '${story.tags} NOT CONTAINS "Testing Only" AND ${story.tags} NOT CONTAINS "Test Only"'
61
61
 
62
62
  - title: "Physical Data Model Updated"
63
63
  estimationPercent: 0
64
64
  activity: "Development"
65
65
  tags: []
66
66
  assignTo: "@ParentAssignee"
67
- condition: '${story.tags} NOT CONTAINS "Testing Only"'
67
+ condition: '${story.tags} NOT CONTAINS "Testing Only" AND ${story.tags} NOT CONTAINS "Test Only"'
68
68
 
69
69
  - title: "Test Preparation"
70
70
  estimationPercent: 40
71
+ estimationPercentCondition:
72
+ - condition: '${story.tags} CONTAINS "Testing Only" OR ${story.tags} CONTAINS "Test Only"'
73
+ percent: 59.70
71
74
  activity: "Testing"
72
75
  tags: []
73
76
  condition: '${story.tags} NOT CONTAINS "Dev Only"'
@@ -75,6 +78,9 @@ tasks:
75
78
 
76
79
  - title: "Test Execution"
77
80
  estimationPercent: 27
81
+ estimationPercentCondition:
82
+ - condition: '${story.tags} CONTAINS "Testing Only" OR ${story.tags} CONTAINS "Test Only"'
83
+ percent: 40.30
78
84
  activity: "Testing"
79
85
  tags: []
80
86
  condition: '${story.tags} NOT CONTAINS "Dev Only"'
@@ -106,7 +112,7 @@ tasks:
106
112
  activity: "Development"
107
113
  tags: []
108
114
  assignTo: "@ParentAssignee"
109
- condition: '${story.tags} NOT CONTAINS "Testing Only"'
115
+ condition: '${story.tags} NOT CONTAINS "Testing Only" AND ${story.tags} NOT CONTAINS "Test Only"'
110
116
 
111
117
  estimation:
112
118
  strategy: "percentage"
@@ -116,4 +122,9 @@ estimation:
116
122
  metadata:
117
123
  category: "Agile Project"
118
124
  recommendedFor: []
119
- estimationGuidelines: "Based on possible Agile project workflow"
125
+ estimationGuidelines: |
126
+ Handles three story archetypes in one template:
127
+ - Dev and Test story (no special tag): dev tasks + test tasks, base percentages apply.
128
+ - Testing Only / Test Only story: dev tasks skipped; Test Preparation gets 59.70%
129
+ and Test Execution gets 40.30%.
130
+ - Dev Only story: test tasks skipped
@@ -1,65 +0,0 @@
1
- version: "1.0"
2
- name: "Custom Example - Test Only"
3
- description: "Example template containing only test tasks (percentages normalized to 100)"
4
- author: "Atomize"
5
- tags: []
6
-
7
- filter:
8
- workItemTypes: ["User Story"]
9
- states: ["Ready for Sprint"]
10
- tags:
11
- include:
12
- - "Test Only"
13
- exclude:
14
- - "TestGen"
15
- excludeIfHasTasks: false
16
- areaPaths:
17
- - EA-RSP-Platform\Release 2 Team
18
- iterations:
19
- - EA-RSP-Platform\SOW-7-2026-JAN-MARCH\Sprint 116
20
-
21
- tasks:
22
- - title: "Test Preparation"
23
- estimationPercent: 59.7014925373
24
- activity: "Testing"
25
- tags: []
26
- condition: '${story.tags} NOT CONTAINS "Dev Only"'
27
- assignTo: "@Unassigned"
28
-
29
- - title: "Test Execution"
30
- estimationPercent: 40.2985074627
31
- activity: "Testing"
32
- tags: []
33
- condition: '${story.tags} NOT CONTAINS "Dev Only"'
34
- assignTo: "@Unassigned"
35
-
36
- - title: "Automation Testing"
37
- estimationPercent: 0
38
- activity: "Test Automation"
39
- tags: []
40
- condition: '${story.tags} NOT CONTAINS "Dev Only"'
41
- assignTo: "@Unassigned"
42
-
43
- - title: "Test Review"
44
- estimationPercent: 0
45
- activity: "Testing"
46
- tags: []
47
- condition: '${story.tags} NOT CONTAINS "Dev Only"'
48
- assignTo: "@Unassigned"
49
-
50
- - title: "Release Notes"
51
- estimationPercent: 0
52
- activity: "Testing"
53
- tags: []
54
- condition: '${story.tags} NOT CONTAINS "Dev Only"'
55
- assignTo: "@Unassigned"
56
-
57
- estimation:
58
- strategy: "percentage"
59
- rounding: "none"
60
- minimumTaskPoints: 0
61
-
62
- metadata:
63
- category: "Agile Project"
64
- recommendedFor: []
65
- estimationGuidelines: "Test-only workflow; percentages normalized from original template"