scopemate 0.1.0__py3-none-any.whl → 0.2.0__py3-none-any.whl
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.
- scopemate/__init__.py +1 -1
- scopemate/breakdown.py +30 -2
- scopemate/cli.py +57 -11
- scopemate/engine.py +188 -10
- scopemate/interaction.py +34 -4
- scopemate/llm.py +257 -38
- scopemate/models.py +63 -1
- scopemate/storage.py +218 -4
- scopemate/task_analysis.py +47 -6
- {scopemate-0.1.0.dist-info → scopemate-0.2.0.dist-info}/METADATA +143 -12
- scopemate-0.2.0.dist-info/RECORD +17 -0
- {scopemate-0.1.0.dist-info → scopemate-0.2.0.dist-info}/WHEEL +1 -1
- scopemate-0.1.0.dist-info/RECORD +0 -17
- {scopemate-0.1.0.dist-info → scopemate-0.2.0.dist-info}/entry_points.txt +0 -0
- {scopemate-0.1.0.dist-info → scopemate-0.2.0.dist-info}/licenses/LICENSE +0 -0
- {scopemate-0.1.0.dist-info → scopemate-0.2.0.dist-info}/top_level.txt +0 -0
scopemate/task_analysis.py
CHANGED
@@ -15,11 +15,30 @@ def check_and_update_parent_estimates(tasks: List[ScopeMateTask]) -> List[ScopeM
|
|
15
15
|
"""
|
16
16
|
Check and update parent task estimates based on child task complexity.
|
17
17
|
|
18
|
+
This function ensures consistency in the task hierarchy by making sure that
|
19
|
+
parent tasks have appropriate size and time estimates relative to their children.
|
20
|
+
If a child task has a higher complexity or longer time estimate than its parent,
|
21
|
+
the parent's estimates are automatically increased to maintain logical consistency.
|
22
|
+
|
23
|
+
The function works by:
|
24
|
+
1. Creating maps of task IDs to task objects and parent IDs
|
25
|
+
2. Computing complexity values for all tasks based on their size and time estimates
|
26
|
+
3. Identifying inconsistencies where child tasks have higher complexity than parents
|
27
|
+
4. Updating parent estimates to match or exceed their children's complexity
|
28
|
+
5. Recursively propagating updates up the task hierarchy to maintain consistency
|
29
|
+
|
18
30
|
Args:
|
19
|
-
tasks: List of ScopeMateTask objects
|
31
|
+
tasks: List of ScopeMateTask objects to analyze and update
|
20
32
|
|
21
33
|
Returns:
|
22
|
-
Updated list of ScopeMateTask objects
|
34
|
+
Updated list of ScopeMateTask objects with consistent parent-child estimates
|
35
|
+
|
36
|
+
Example:
|
37
|
+
```python
|
38
|
+
# Before: parent task has "straightforward" size but child has "complex" size
|
39
|
+
updated_tasks = check_and_update_parent_estimates(tasks)
|
40
|
+
# After: parent task is updated to "complex" or higher to maintain consistency
|
41
|
+
```
|
23
42
|
"""
|
24
43
|
# Create a map of tasks by ID for easy access
|
25
44
|
task_map = {t.id: t for t in tasks}
|
@@ -229,14 +248,36 @@ def should_decompose_task(task: ScopeMateTask, depth: int, max_depth: int, is_le
|
|
229
248
|
"""
|
230
249
|
Determine if a task should be broken down based on complexity and time estimates.
|
231
250
|
|
251
|
+
This function applies a set of heuristics to decide whether a task needs further
|
252
|
+
decomposition. The decision is based on multiple factors:
|
253
|
+
|
254
|
+
1. Task depth in the hierarchy - tasks at or beyond max_depth are never decomposed
|
255
|
+
2. Task complexity - "complex", "uncertain", or "pioneering" tasks should be broken down
|
256
|
+
3. Time estimate - tasks with long durations should be broken down into smaller units
|
257
|
+
4. Leaf status - whether the task already has subtasks
|
258
|
+
|
259
|
+
The breakdown logic implements a graduated approach where:
|
260
|
+
- Very complex tasks are always broken down (unless at max depth)
|
261
|
+
- Long duration tasks are broken down, especially if they're leaf tasks
|
262
|
+
- Tasks with "week" duration are broken down up to max_depth
|
263
|
+
- Tasks at depth 2+ with "sprint" duration aren't broken down (unless they're "multi-sprint")
|
264
|
+
|
232
265
|
Args:
|
233
266
|
task: The ScopeMateTask to evaluate
|
234
|
-
depth: Current depth in the task hierarchy
|
235
|
-
max_depth: Maximum allowed depth
|
236
|
-
is_leaf: Whether this
|
267
|
+
depth: Current depth in the task hierarchy (0 for root tasks)
|
268
|
+
max_depth: Maximum allowed depth for the task hierarchy
|
269
|
+
is_leaf: Whether this task currently has no children
|
237
270
|
|
238
271
|
Returns:
|
239
|
-
True if the task should be broken down, False otherwise
|
272
|
+
True if the task should be broken down into subtasks, False otherwise
|
273
|
+
|
274
|
+
Example:
|
275
|
+
```python
|
276
|
+
task = get_task_by_id("TASK-123")
|
277
|
+
depth = get_task_depth(task, task_depths, tasks)
|
278
|
+
if should_decompose_task(task, depth, max_depth=5, is_leaf=True):
|
279
|
+
subtasks = suggest_breakdown(task)
|
280
|
+
```
|
240
281
|
"""
|
241
282
|
# Always respect max depth limit
|
242
283
|
if depth >= max_depth:
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: scopemate
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.2.0
|
4
4
|
Summary: 🪜 A CLI tool for Purpose/Scope/Outcome planning
|
5
5
|
Author: Anoop Thomas Mathew
|
6
6
|
Author-email: Anoop Thomas Mathew <atmb4u@gmail.com>
|
@@ -24,6 +24,10 @@ License-File: LICENSE
|
|
24
24
|
Requires-Dist: openai>=1.0.0
|
25
25
|
Requires-Dist: pydantic>=2.0.0
|
26
26
|
Requires-Dist: twine>=6.1.0
|
27
|
+
Requires-Dist: google-generativeai>=0.3.0
|
28
|
+
Requires-Dist: anthropic>=0.12.0
|
29
|
+
Requires-Dist: ipython>=8.35.0
|
30
|
+
Requires-Dist: ipdb>=0.13.13
|
27
31
|
Dynamic: author
|
28
32
|
Dynamic: license-file
|
29
33
|
Dynamic: requires-python
|
@@ -78,11 +82,15 @@ Scopemate is built around a three-part framework for strategic decision making:
|
|
78
82
|
- Pydantic validation
|
79
83
|
- Cross-platform support (Windows, macOS, Linux)
|
80
84
|
- Works with Python 3.10 and above
|
85
|
+
- Automatic Markdown export of plans for easy sharing
|
81
86
|
|
82
87
|
## Requirements
|
83
88
|
|
84
89
|
- Python 3.10 or higher
|
85
|
-
-
|
90
|
+
- An API key for one of the supported LLM providers:
|
91
|
+
- OpenAI API key (default)
|
92
|
+
- Google AI (Gemini) API key
|
93
|
+
- Anthropic (Claude) API key
|
86
94
|
|
87
95
|
## Installation
|
88
96
|
|
@@ -133,26 +141,123 @@ cd scopemate
|
|
133
141
|
pip install -e .
|
134
142
|
```
|
135
143
|
|
136
|
-
### Setting up
|
144
|
+
### Setting up API Keys
|
137
145
|
|
138
|
-
scopemate
|
146
|
+
scopemate now supports multiple LLM providers. Set up the API key for your preferred provider:
|
139
147
|
|
140
|
-
####
|
148
|
+
#### OpenAI (Default)
|
149
|
+
|
150
|
+
Set the OpenAI API key as an environment variable:
|
151
|
+
|
152
|
+
##### macOS/Linux
|
141
153
|
```bash
|
142
154
|
export OPENAI_API_KEY=your-api-key-here
|
143
155
|
```
|
144
156
|
|
145
|
-
|
157
|
+
##### Windows Command Prompt
|
146
158
|
```cmd
|
147
159
|
set OPENAI_API_KEY=your-api-key-here
|
148
160
|
```
|
149
161
|
|
150
|
-
|
162
|
+
##### Windows PowerShell
|
151
163
|
```powershell
|
152
164
|
$env:OPENAI_API_KEY = "your-api-key-here"
|
153
165
|
```
|
154
166
|
|
155
|
-
|
167
|
+
#### Google AI (Gemini)
|
168
|
+
|
169
|
+
Set the Google AI API key as an environment variable:
|
170
|
+
|
171
|
+
##### macOS/Linux
|
172
|
+
```bash
|
173
|
+
export GEMINI_API_KEY=your-api-key-here
|
174
|
+
```
|
175
|
+
|
176
|
+
##### Windows Command Prompt
|
177
|
+
```cmd
|
178
|
+
set GEMINI_API_KEY=your-api-key-here
|
179
|
+
```
|
180
|
+
|
181
|
+
##### Windows PowerShell
|
182
|
+
```powershell
|
183
|
+
$env:GEMINI_API_KEY = "your-api-key-here"
|
184
|
+
```
|
185
|
+
|
186
|
+
#### Anthropic (Claude)
|
187
|
+
|
188
|
+
Set the Anthropic API key as an environment variable:
|
189
|
+
|
190
|
+
##### macOS/Linux
|
191
|
+
```bash
|
192
|
+
export ANTHROPIC_API_KEY=your-api-key-here
|
193
|
+
```
|
194
|
+
|
195
|
+
##### Windows Command Prompt
|
196
|
+
```cmd
|
197
|
+
set ANTHROPIC_API_KEY=your-api-key-here
|
198
|
+
```
|
199
|
+
|
200
|
+
##### Windows PowerShell
|
201
|
+
```powershell
|
202
|
+
$env:ANTHROPIC_API_KEY = "your-api-key-here"
|
203
|
+
```
|
204
|
+
|
205
|
+
### Selecting LLM Provider
|
206
|
+
|
207
|
+
You can select which LLM provider to use by setting the `SCOPEMATE_LLM_PROVIDER` environment variable:
|
208
|
+
|
209
|
+
#### macOS/Linux
|
210
|
+
```bash
|
211
|
+
# Use OpenAI (default)
|
212
|
+
export SCOPEMATE_LLM_PROVIDER=OPENAI
|
213
|
+
|
214
|
+
# Use Gemini
|
215
|
+
export SCOPEMATE_LLM_PROVIDER=GEMINI
|
216
|
+
|
217
|
+
# Use Claude
|
218
|
+
export SCOPEMATE_LLM_PROVIDER=CLAUDE
|
219
|
+
```
|
220
|
+
|
221
|
+
#### Windows Command Prompt
|
222
|
+
```cmd
|
223
|
+
# Use OpenAI (default)
|
224
|
+
set SCOPEMATE_LLM_PROVIDER=OPENAI
|
225
|
+
|
226
|
+
# Use Gemini
|
227
|
+
set SCOPEMATE_LLM_PROVIDER=GEMINI
|
228
|
+
|
229
|
+
# Use Claude
|
230
|
+
set SCOPEMATE_LLM_PROVIDER=CLAUDE
|
231
|
+
```
|
232
|
+
|
233
|
+
#### Windows PowerShell
|
234
|
+
```powershell
|
235
|
+
# Use OpenAI (default)
|
236
|
+
$env:SCOPEMATE_LLM_PROVIDER = "OPENAI"
|
237
|
+
|
238
|
+
# Use Gemini
|
239
|
+
$env:SCOPEMATE_LLM_PROVIDER = "GEMINI"
|
240
|
+
|
241
|
+
# Use Claude
|
242
|
+
$env:SCOPEMATE_LLM_PROVIDER = "CLAUDE"
|
243
|
+
```
|
244
|
+
|
245
|
+
### Selecting Model
|
246
|
+
|
247
|
+
You can also specify which model to use for each provider:
|
248
|
+
|
249
|
+
```bash
|
250
|
+
# OpenAI model (default is o4-mini)
|
251
|
+
export SCOPEMATE_OPENAI_MODEL=gpt-4-turbo
|
252
|
+
|
253
|
+
# Gemini model (default is gemini-flash)
|
254
|
+
export SCOPEMATE_GEMINI_MODEL=gemini-2.0-flash
|
255
|
+
|
256
|
+
# Claude model (default is claude-3-haiku-20240307)
|
257
|
+
export SCOPEMATE_CLAUDE_MODEL=claude-3-7-sonnet-20250219
|
258
|
+
```
|
259
|
+
|
260
|
+
For permanent setup, add these environment variables to your shell profile or system environment variables.
|
156
261
|
|
157
262
|
## Usage
|
158
263
|
|
@@ -171,11 +276,10 @@ scopemate --help
|
|
171
276
|
|
172
277
|
# Generate a project plan with purpose and outcome
|
173
278
|
scopemate --purpose="Build a REST API for user management" --outcome="A documented API with authentication and user CRUD operations" --output="project_plan.json"
|
174
|
-
|
175
|
-
# Fix inconsistent estimates in an existing plan
|
176
|
-
scopemate --fix-estimates --input="project_plan.json" --output="fixed_plan.json"
|
177
279
|
```
|
178
280
|
|
281
|
+
**Note:** A Markdown version of the output is automatically generated alongside the JSON file. For example, if you specify `--output="project_plan.json"`, a file named `project_plan.md` will also be created.
|
282
|
+
|
179
283
|
### Interactive Mode Workflow
|
180
284
|
|
181
285
|
The interactive mode (`scopemate --interactive`) will guide you through:
|
@@ -205,7 +309,9 @@ The interactive mode (`scopemate --interactive`) will guide you through:
|
|
205
309
|
|
206
310
|
### Output Format
|
207
311
|
|
208
|
-
scopemate generates
|
312
|
+
scopemate generates both JSON and Markdown output files:
|
313
|
+
|
314
|
+
1. **JSON Output** - Structured data format with the following structure:
|
209
315
|
|
210
316
|
```json
|
211
317
|
{
|
@@ -245,6 +351,14 @@ scopemate generates a structured JSON output with the following format:
|
|
245
351
|
}
|
246
352
|
```
|
247
353
|
|
354
|
+
2. **Markdown Output** - Human-readable format automatically generated with the same basename as the JSON file. The Markdown output includes:
|
355
|
+
- A summary of the plan with task counts and complexity breakdown
|
356
|
+
- Hierarchical task structure preserving parent-child relationships
|
357
|
+
- All relevant task details formatted for easy reading
|
358
|
+
- Properly formatted sections for purpose, scope, outcome, and metadata
|
359
|
+
|
360
|
+
This dual output approach makes it easy to both process the data programmatically (using the JSON) and share the plan with team members (using the Markdown).
|
361
|
+
|
248
362
|
### Integrating with Other Tools
|
249
363
|
|
250
364
|
You can use scopemate's JSON output with other project management tools:
|
@@ -295,6 +409,23 @@ uv pip install -r requirements-dev.txt
|
|
295
409
|
uv pip install -e .
|
296
410
|
```
|
297
411
|
|
412
|
+
#### Using pipx
|
413
|
+
|
414
|
+
[pipx](https://github.com/pypa/pipx) is useful for installing and running Python applications in isolated environments:
|
415
|
+
|
416
|
+
```bash
|
417
|
+
# Install pipx if you don't have it
|
418
|
+
pip install pipx
|
419
|
+
|
420
|
+
# Clone the repository
|
421
|
+
git clone https://github.com/atmb4u/scopemate.git
|
422
|
+
cd scopemate
|
423
|
+
|
424
|
+
# Install the package in development mode with force flag
|
425
|
+
# This is useful when making changes and wanting to test the CLI immediately
|
426
|
+
pipx install --force .
|
427
|
+
```
|
428
|
+
|
298
429
|
### Running Tests
|
299
430
|
|
300
431
|
```bash
|
@@ -0,0 +1,17 @@
|
|
1
|
+
scopemate/__init__.py,sha256=xp32RvKQnWl1JCBMwuDsSDYg8awCryN2iBWSpJVB2es,472
|
2
|
+
scopemate/__main__.py,sha256=nPNZe_QEoOHQ_hXf17w72BHz1UFPKuW2g3whTLwuM8E,195
|
3
|
+
scopemate/breakdown.py,sha256=mwIDzf7m2GHVkDrRmMyeS8v2pNd99U3vlcPCtOajvs0,21048
|
4
|
+
scopemate/cli.py,sha256=qh6iFleQc8Bld0iptyUgRm5Ga3GtZsvE6Y-q6vbm3dk,6891
|
5
|
+
scopemate/core.py,sha256=wpXCpb5Kdpqul9edNCx2Da94137XCc1w-3KQc9-Tf3s,700
|
6
|
+
scopemate/engine.py,sha256=8yQoxSECJCGuNSIwS-qFoaOGM1iaZ-y4Lo7k5Q6v-mk,16992
|
7
|
+
scopemate/interaction.py,sha256=SeqQVME0MATK-m-M7T9nNHkcJ_VCRhlqydL_vQaSMWk,10893
|
8
|
+
scopemate/llm.py,sha256=DLa2cL4pTYjnUG__gS_Lfifx3Mnpfm2QACpJSO9ooJo,23038
|
9
|
+
scopemate/models.py,sha256=Q3SUoHu_4RejDAocEr83I00wGvxhDoJ1COVqjPsr4DQ,7738
|
10
|
+
scopemate/storage.py,sha256=uV1-7IdwJwBENeNoO9Y3WwUUXd-jA2NvKdiERGGhmV8,11642
|
11
|
+
scopemate/task_analysis.py,sha256=Mic0FOOy_BWI1_5TQmh__39miOcZBZ7mTUcCkv1DvkI,14967
|
12
|
+
scopemate-0.2.0.dist-info/licenses/LICENSE,sha256=4fqQFK5AkkXmg6FBG9Wr06gCR7BMQl02TvsPYt-YL6s,1076
|
13
|
+
scopemate-0.2.0.dist-info/METADATA,sha256=35WLUUsU01syRayWxXrx5Lt-bOqHwY31FBplRN9wCJ8,13835
|
14
|
+
scopemate-0.2.0.dist-info/WHEEL,sha256=pxyMxgL8-pra_rKaQ4drOZAegBVuX-G_4nRHjjgWbmo,91
|
15
|
+
scopemate-0.2.0.dist-info/entry_points.txt,sha256=XXusGEDxI6NlrYmSBcPDtjV3QvsHWVWPSrt4zD4UcLg,49
|
16
|
+
scopemate-0.2.0.dist-info/top_level.txt,sha256=riMrI_jMCfZMb7-ecWBwqOBLdUsnPOxSu2Pgvqx7Too,10
|
17
|
+
scopemate-0.2.0.dist-info/RECORD,,
|
scopemate-0.1.0.dist-info/RECORD
DELETED
@@ -1,17 +0,0 @@
|
|
1
|
-
scopemate/__init__.py,sha256=3cyRjjI2wC2pG8VeXONVOrow_dJMKUCzre8EtYfrV0s,472
|
2
|
-
scopemate/__main__.py,sha256=nPNZe_QEoOHQ_hXf17w72BHz1UFPKuW2g3whTLwuM8E,195
|
3
|
-
scopemate/breakdown.py,sha256=lasv2Gt1yziE_GV4DgCBWVg3TIPuggT3Tf77ny5n7Iw,19650
|
4
|
-
scopemate/cli.py,sha256=o05Od9NEP76sQRegc3dqs-d-DCpYip2KC1GXjriiCZQ,5059
|
5
|
-
scopemate/core.py,sha256=wpXCpb5Kdpqul9edNCx2Da94137XCc1w-3KQc9-Tf3s,700
|
6
|
-
scopemate/engine.py,sha256=wlE39lzKoJthi6twestlyEqvEjqNEXQYvNTOfT4aGZw,9521
|
7
|
-
scopemate/interaction.py,sha256=qWFU3QM_KPwaGdh4Rw7ewCIeYiT6Wa_H9e6bnmNoJzw,9531
|
8
|
-
scopemate/llm.py,sha256=hD37Mk54kchdECKYmCNF3yxg0U-vW-h4y8tpNghlS3Q,14031
|
9
|
-
scopemate/models.py,sha256=ZvFn8iegMDgCgoLjvWxj7_C7XLDWrgkF8ySuktfRaqw,4962
|
10
|
-
scopemate/storage.py,sha256=lloD_2f2E3q_inHLiL9Kp8F_tyeerG45_rSLKXvGh4Y,3102
|
11
|
-
scopemate/task_analysis.py,sha256=I-tH62MfYAwlHbLonjlPKBGa-X_II9QqpWS_OsjLaxU,12644
|
12
|
-
scopemate-0.1.0.dist-info/licenses/LICENSE,sha256=4fqQFK5AkkXmg6FBG9Wr06gCR7BMQl02TvsPYt-YL6s,1076
|
13
|
-
scopemate-0.1.0.dist-info/METADATA,sha256=Wmb1wOEmCkigLUXIS0d1BujGzV0uTpx9IpNIvyrtIJI,10557
|
14
|
-
scopemate-0.1.0.dist-info/WHEEL,sha256=lTU6B6eIfYoiQJTZNc-fyaR6BpL6ehTzU3xGYxn2n8k,91
|
15
|
-
scopemate-0.1.0.dist-info/entry_points.txt,sha256=XXusGEDxI6NlrYmSBcPDtjV3QvsHWVWPSrt4zD4UcLg,49
|
16
|
-
scopemate-0.1.0.dist-info/top_level.txt,sha256=riMrI_jMCfZMb7-ecWBwqOBLdUsnPOxSu2Pgvqx7Too,10
|
17
|
-
scopemate-0.1.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|