methodology-framework 0.1.2__tar.gz → 0.2.0__tar.gz

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.
Files changed (33) hide show
  1. {methodology_framework-0.1.2/src/methodology_framework.egg-info → methodology_framework-0.2.0}/PKG-INFO +58 -24
  2. {methodology_framework-0.1.2 → methodology_framework-0.2.0}/README.md +55 -23
  3. {methodology_framework-0.1.2 → methodology_framework-0.2.0}/pyproject.toml +3 -1
  4. methodology_framework-0.2.0/src/methodology_framework/bootstrap_jira.py +702 -0
  5. {methodology_framework-0.1.2 → methodology_framework-0.2.0/src/methodology_framework.egg-info}/PKG-INFO +58 -24
  6. {methodology_framework-0.1.2 → methodology_framework-0.2.0}/src/methodology_framework.egg-info/requires.txt +2 -0
  7. methodology_framework-0.2.0/tests/test_bootstrap_jira.py +719 -0
  8. methodology_framework-0.1.2/src/methodology_framework/bootstrap_jira.py +0 -618
  9. methodology_framework-0.1.2/tests/test_bootstrap_jira.py +0 -392
  10. {methodology_framework-0.1.2 → methodology_framework-0.2.0}/LICENSE +0 -0
  11. {methodology_framework-0.1.2 → methodology_framework-0.2.0}/setup.cfg +0 -0
  12. {methodology_framework-0.1.2 → methodology_framework-0.2.0}/src/methodology_framework/__init__.py +0 -0
  13. {methodology_framework-0.1.2 → methodology_framework-0.2.0}/src/methodology_framework/__main__.py +0 -0
  14. {methodology_framework-0.1.2 → methodology_framework-0.2.0}/src/methodology_framework/build_playbook.py +0 -0
  15. {methodology_framework-0.1.2 → methodology_framework-0.2.0}/src/methodology_framework/jira_shapes/__init__.py +0 -0
  16. {methodology_framework-0.1.2 → methodology_framework-0.2.0}/src/methodology_framework/jira_shapes/automation_rules.yaml +0 -0
  17. {methodology_framework-0.1.2 → methodology_framework-0.2.0}/src/methodology_framework/jira_shapes/custom_fields.yaml +0 -0
  18. {methodology_framework-0.1.2 → methodology_framework-0.2.0}/src/methodology_framework/jira_shapes/workflow.yaml +0 -0
  19. {methodology_framework-0.1.2 → methodology_framework-0.2.0}/src/methodology_framework/playbooks/scrum-router.body.md +0 -0
  20. {methodology_framework-0.1.2 → methodology_framework-0.2.0}/src/methodology_framework/populate_acus.py +0 -0
  21. {methodology_framework-0.1.2 → methodology_framework-0.2.0}/src/methodology_framework/register_playbook_with_devin.py +0 -0
  22. {methodology_framework-0.1.2 → methodology_framework-0.2.0}/src/methodology_framework/specs/devin-story-format.md +0 -0
  23. {methodology_framework-0.1.2 → methodology_framework-0.2.0}/src/methodology_framework/sync_stories_to_jira.py +0 -0
  24. {methodology_framework-0.1.2 → methodology_framework-0.2.0}/src/methodology_framework/templates/github_workflows/populate-story-acus-caller.yml +0 -0
  25. {methodology_framework-0.1.2 → methodology_framework-0.2.0}/src/methodology_framework/templates/story.md +0 -0
  26. {methodology_framework-0.1.2 → methodology_framework-0.2.0}/src/methodology_framework.egg-info/SOURCES.txt +0 -0
  27. {methodology_framework-0.1.2 → methodology_framework-0.2.0}/src/methodology_framework.egg-info/dependency_links.txt +0 -0
  28. {methodology_framework-0.1.2 → methodology_framework-0.2.0}/src/methodology_framework.egg-info/top_level.txt +0 -0
  29. {methodology_framework-0.1.2 → methodology_framework-0.2.0}/tests/test_build_playbook.py +0 -0
  30. {methodology_framework-0.1.2 → methodology_framework-0.2.0}/tests/test_populate_acus.py +0 -0
  31. {methodology_framework-0.1.2 → methodology_framework-0.2.0}/tests/test_register_playbook_with_devin.py +0 -0
  32. {methodology_framework-0.1.2 → methodology_framework-0.2.0}/tests/test_sync_stories_to_jira.py +0 -0
  33. {methodology_framework-0.1.2 → methodology_framework-0.2.0}/tests/test_workflows.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: methodology-framework
3
- Version: 0.1.2
3
+ Version: 0.2.0
4
4
  Summary: Portable process tooling for agent-driven delivery — scripts, playbooks, templates, and specs.
5
5
  Author: whiteout59
6
6
  License-Expression: Apache-2.0
@@ -10,6 +10,7 @@ License-File: LICENSE
10
10
  Requires-Dist: requests<3,>=2.31
11
11
  Requires-Dist: python-frontmatter<2,>=1.1
12
12
  Requires-Dist: pyyaml<7,>=6.0
13
+ Requires-Dist: colorama<1,>=0.4
13
14
  Provides-Extra: dev
14
15
  Requires-Dist: pytest<9,>=8.0; extra == "dev"
15
16
  Requires-Dist: requests-mock<2,>=1.12; extra == "dev"
@@ -17,6 +18,7 @@ Requires-Dist: ruff==0.15.14; extra == "dev"
17
18
  Requires-Dist: mypy<2,>=1.10; extra == "dev"
18
19
  Requires-Dist: types-requests<3,>=2.31; extra == "dev"
19
20
  Requires-Dist: types-PyYAML<7,>=6.0; extra == "dev"
21
+ Requires-Dist: types-colorama<1,>=0.4; extra == "dev"
20
22
  Requires-Dist: vcrpy<9,>=7.0; extra == "dev"
21
23
  Dynamic: license-file
22
24
 
@@ -38,69 +40,101 @@ pip install -e .
38
40
  - `methodology_framework/playbooks/` -- parameterized playbook bodies (package data)
39
41
  - `methodology_framework/templates/` -- story and process templates (package data)
40
42
  - `methodology_framework/specs/` -- format specs (package data)
41
- - `methodology_framework.bootstrap_jira` -- bootstrap a Jira project with the canonical workflow, custom fields, and automation rules
43
+ - `methodology_framework.bootstrap_jira` -- verify a Jira project matches the canonical shape (read-only spec-compliance checker)
42
44
  - `methodology_framework/jira_shapes/` -- canonical Jira shape definitions (YAML, package data)
43
45
 
44
- ## Jira Bootstrap
46
+ ## Jira Bootstrap (Verify Mode)
45
47
 
46
- Adopting projects provision their Jira project shape from a single CLI command
47
- instead of manually configuring 30+ admin UI screens.
48
+ The CLI checks whether a Jira project matches the methodology-framework's
49
+ canonical shape and reports gaps. It does **not** provision — operators apply
50
+ gaps via the Jira UI. This read-only design lets the tool run in CI as a gate.
51
+
52
+ > **v0.2.0 breaking change:** `--apply` and `--dry-run` were removed.
53
+ > The CLI is now a spec-compliance verifier. See `operator-verify-runbook.md`
54
+ > for the operator workflow.
48
55
 
49
56
  ### Prerequisites
50
57
 
51
58
  - Python 3.12+
52
59
  - `pip install methodology-framework` (or `pip install -e .` from source)
53
- - For `--apply` mode: `JIRA_ADMIN_TOKEN` environment variable set to a Jira
54
- admin API token, and `JIRA_USER_EMAIL` set to the email of the Atlassian
55
- account that owns that token
60
+ - For `--verify` mode: `JIRA_ADMIN_TOKEN` environment variable set to a Jira
61
+ API token (admin scope is **not** required; a regular user token with read
62
+ access is sufficient), and `JIRA_USER_EMAIL` set to the email of the
63
+ Atlassian account that owns the token
56
64
 
57
65
  ### Usage
58
66
 
59
67
  ```bash
60
- # Dry-run (default) print what would be applied, no side-effects
68
+ # Verifyquery Jira and report spec-compliance gaps (read-only)
69
+ export JIRA_ADMIN_TOKEN="<your-token>"
70
+ export JIRA_USER_EMAIL="<your-email>"
61
71
  python -m methodology_framework bootstrap-jira \
62
72
  --project-key=MYPROJ \
63
73
  --jira-host=myorg.atlassian.net \
64
- --dry-run
74
+ --verify
65
75
 
66
- # Export emit an importable config bundle (YAML); no API calls
76
+ # JSON output (stable schema safe for CI parsing)
67
77
  python -m methodology_framework bootstrap-jira \
68
78
  --project-key=MYPROJ \
69
79
  --jira-host=myorg.atlassian.net \
70
- --export /tmp/jira-bundle.yaml
80
+ --verify --output=json
71
81
 
72
- # Apply — provision the Jira project via admin API
73
- export JIRA_ADMIN_TOKEN="<your-token>"
74
- export JIRA_USER_EMAIL="<your-email>"
82
+ # Markdown output
75
83
  python -m methodology_framework bootstrap-jira \
76
84
  --project-key=MYPROJ \
77
85
  --jira-host=myorg.atlassian.net \
78
- --apply
86
+ --verify --output=markdown
79
87
 
80
- # Apply with --force to skip confirmation prompts
88
+ # Export emit an importable config bundle (YAML); no API calls
81
89
  python -m methodology_framework bootstrap-jira \
82
90
  --project-key=MYPROJ \
83
91
  --jira-host=myorg.atlassian.net \
84
- --apply --force
92
+ --export /tmp/jira-bundle.yaml
85
93
  ```
86
94
 
95
+ ### Exit codes
96
+
97
+ | Code | Meaning |
98
+ |------|---------|
99
+ | `0` | All spec items verified OK |
100
+ | `1` | One or more items missing (gaps found) |
101
+ | `2` | One or more items unverifiable (API limitation; operator must inspect manually) |
102
+ | `3` | Error (connectivity, auth, or runtime failure) |
103
+
87
104
  ### Flags
88
105
 
89
106
  | Flag | Required | Description |
90
107
  |------|----------|-------------|
91
108
  | `--project-key` | Yes | Jira project key (e.g. `SCRUM`). Substituted for `{{PROJECT_KEY}}` in shape defs. |
92
109
  | `--jira-host` | Yes | Jira Cloud host (e.g. `myorg.atlassian.net`). No `https://` prefix. |
93
- | `--dry-run` | No | Print what would be applied (default if no mode specified). |
94
- | `--apply` | No | POST/PUT to Jira admin API. Requires `JIRA_ADMIN_TOKEN` env var. |
95
- | `--export <path>` | No | Emit importable config bundle at `<path>`. |
96
- | `--force` | No | Skip confirmation prompts during `--apply`. |
110
+ | `--verify` | No | Query Jira and report spec-compliance gaps (read-only). |
111
+ | `--export <path>` | No | Emit importable config bundle at `<path>`. No API calls. |
112
+ | `--output` | No | Output format for `--verify`: `text` (default), `json`, `markdown`. |
97
113
 
98
114
  ### Environment variables
99
115
 
100
116
  | Variable | When needed | Description |
101
117
  |----------|-------------|-------------|
102
- | `JIRA_ADMIN_TOKEN` | `--apply` mode | Jira admin API token. **Never** accepted as a CLI flag. |
103
- | `JIRA_USER_EMAIL` | `--apply` mode | Email of the Atlassian account that owns the API token. Used with the token for HTTP Basic auth. **Never** accepted as a CLI flag. |
118
+ | `JIRA_ADMIN_TOKEN` | `--verify` mode | Jira API token. Admin scope is **not** required; a regular user token with read access is sufficient. **Never** accepted as a CLI flag. |
119
+ | `JIRA_USER_EMAIL` | `--verify` mode | Email of the Atlassian account that owns the API token. Used with the token for HTTP Basic auth. **Never** accepted as a CLI flag. |
120
+
121
+ ### JSON output schema (v0.2.0)
122
+
123
+ ```json
124
+ {
125
+ "spec_version": "0.2.0",
126
+ "project_key": "METH",
127
+ "verified_at": "2025-05-31T00:00:00Z",
128
+ "items": [
129
+ {"resource_type": "status", "name": "To Do", "result": "ok", "details": null},
130
+ {"resource_type": "custom_field", "name": "Story File", "result": "missing", "details": "Operator must create via Settings → Custom fields → Create"}
131
+ ],
132
+ "summary": {"total": 14, "ok": 12, "missing": 1, "unverifiable": 1},
133
+ "exit_code": 1
134
+ }
135
+ ```
136
+
137
+ Any breaking change to this schema requires a MAJOR version bump.
104
138
 
105
139
  ### Shape definitions
106
140
 
@@ -16,69 +16,101 @@ pip install -e .
16
16
  - `methodology_framework/playbooks/` -- parameterized playbook bodies (package data)
17
17
  - `methodology_framework/templates/` -- story and process templates (package data)
18
18
  - `methodology_framework/specs/` -- format specs (package data)
19
- - `methodology_framework.bootstrap_jira` -- bootstrap a Jira project with the canonical workflow, custom fields, and automation rules
19
+ - `methodology_framework.bootstrap_jira` -- verify a Jira project matches the canonical shape (read-only spec-compliance checker)
20
20
  - `methodology_framework/jira_shapes/` -- canonical Jira shape definitions (YAML, package data)
21
21
 
22
- ## Jira Bootstrap
22
+ ## Jira Bootstrap (Verify Mode)
23
23
 
24
- Adopting projects provision their Jira project shape from a single CLI command
25
- instead of manually configuring 30+ admin UI screens.
24
+ The CLI checks whether a Jira project matches the methodology-framework's
25
+ canonical shape and reports gaps. It does **not** provision — operators apply
26
+ gaps via the Jira UI. This read-only design lets the tool run in CI as a gate.
27
+
28
+ > **v0.2.0 breaking change:** `--apply` and `--dry-run` were removed.
29
+ > The CLI is now a spec-compliance verifier. See `operator-verify-runbook.md`
30
+ > for the operator workflow.
26
31
 
27
32
  ### Prerequisites
28
33
 
29
34
  - Python 3.12+
30
35
  - `pip install methodology-framework` (or `pip install -e .` from source)
31
- - For `--apply` mode: `JIRA_ADMIN_TOKEN` environment variable set to a Jira
32
- admin API token, and `JIRA_USER_EMAIL` set to the email of the Atlassian
33
- account that owns that token
36
+ - For `--verify` mode: `JIRA_ADMIN_TOKEN` environment variable set to a Jira
37
+ API token (admin scope is **not** required; a regular user token with read
38
+ access is sufficient), and `JIRA_USER_EMAIL` set to the email of the
39
+ Atlassian account that owns the token
34
40
 
35
41
  ### Usage
36
42
 
37
43
  ```bash
38
- # Dry-run (default) print what would be applied, no side-effects
44
+ # Verifyquery Jira and report spec-compliance gaps (read-only)
45
+ export JIRA_ADMIN_TOKEN="<your-token>"
46
+ export JIRA_USER_EMAIL="<your-email>"
39
47
  python -m methodology_framework bootstrap-jira \
40
48
  --project-key=MYPROJ \
41
49
  --jira-host=myorg.atlassian.net \
42
- --dry-run
50
+ --verify
43
51
 
44
- # Export emit an importable config bundle (YAML); no API calls
52
+ # JSON output (stable schema safe for CI parsing)
45
53
  python -m methodology_framework bootstrap-jira \
46
54
  --project-key=MYPROJ \
47
55
  --jira-host=myorg.atlassian.net \
48
- --export /tmp/jira-bundle.yaml
56
+ --verify --output=json
49
57
 
50
- # Apply — provision the Jira project via admin API
51
- export JIRA_ADMIN_TOKEN="<your-token>"
52
- export JIRA_USER_EMAIL="<your-email>"
58
+ # Markdown output
53
59
  python -m methodology_framework bootstrap-jira \
54
60
  --project-key=MYPROJ \
55
61
  --jira-host=myorg.atlassian.net \
56
- --apply
62
+ --verify --output=markdown
57
63
 
58
- # Apply with --force to skip confirmation prompts
64
+ # Export emit an importable config bundle (YAML); no API calls
59
65
  python -m methodology_framework bootstrap-jira \
60
66
  --project-key=MYPROJ \
61
67
  --jira-host=myorg.atlassian.net \
62
- --apply --force
68
+ --export /tmp/jira-bundle.yaml
63
69
  ```
64
70
 
71
+ ### Exit codes
72
+
73
+ | Code | Meaning |
74
+ |------|---------|
75
+ | `0` | All spec items verified OK |
76
+ | `1` | One or more items missing (gaps found) |
77
+ | `2` | One or more items unverifiable (API limitation; operator must inspect manually) |
78
+ | `3` | Error (connectivity, auth, or runtime failure) |
79
+
65
80
  ### Flags
66
81
 
67
82
  | Flag | Required | Description |
68
83
  |------|----------|-------------|
69
84
  | `--project-key` | Yes | Jira project key (e.g. `SCRUM`). Substituted for `{{PROJECT_KEY}}` in shape defs. |
70
85
  | `--jira-host` | Yes | Jira Cloud host (e.g. `myorg.atlassian.net`). No `https://` prefix. |
71
- | `--dry-run` | No | Print what would be applied (default if no mode specified). |
72
- | `--apply` | No | POST/PUT to Jira admin API. Requires `JIRA_ADMIN_TOKEN` env var. |
73
- | `--export <path>` | No | Emit importable config bundle at `<path>`. |
74
- | `--force` | No | Skip confirmation prompts during `--apply`. |
86
+ | `--verify` | No | Query Jira and report spec-compliance gaps (read-only). |
87
+ | `--export <path>` | No | Emit importable config bundle at `<path>`. No API calls. |
88
+ | `--output` | No | Output format for `--verify`: `text` (default), `json`, `markdown`. |
75
89
 
76
90
  ### Environment variables
77
91
 
78
92
  | Variable | When needed | Description |
79
93
  |----------|-------------|-------------|
80
- | `JIRA_ADMIN_TOKEN` | `--apply` mode | Jira admin API token. **Never** accepted as a CLI flag. |
81
- | `JIRA_USER_EMAIL` | `--apply` mode | Email of the Atlassian account that owns the API token. Used with the token for HTTP Basic auth. **Never** accepted as a CLI flag. |
94
+ | `JIRA_ADMIN_TOKEN` | `--verify` mode | Jira API token. Admin scope is **not** required; a regular user token with read access is sufficient. **Never** accepted as a CLI flag. |
95
+ | `JIRA_USER_EMAIL` | `--verify` mode | Email of the Atlassian account that owns the API token. Used with the token for HTTP Basic auth. **Never** accepted as a CLI flag. |
96
+
97
+ ### JSON output schema (v0.2.0)
98
+
99
+ ```json
100
+ {
101
+ "spec_version": "0.2.0",
102
+ "project_key": "METH",
103
+ "verified_at": "2025-05-31T00:00:00Z",
104
+ "items": [
105
+ {"resource_type": "status", "name": "To Do", "result": "ok", "details": null},
106
+ {"resource_type": "custom_field", "name": "Story File", "result": "missing", "details": "Operator must create via Settings → Custom fields → Create"}
107
+ ],
108
+ "summary": {"total": 14, "ok": 12, "missing": 1, "unverifiable": 1},
109
+ "exit_code": 1
110
+ }
111
+ ```
112
+
113
+ Any breaking change to this schema requires a MAJOR version bump.
82
114
 
83
115
  ### Shape definitions
84
116
 
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "methodology-framework"
7
- version = "0.1.2"
7
+ version = "0.2.0"
8
8
  description = "Portable process tooling for agent-driven delivery — scripts, playbooks, templates, and specs."
9
9
  readme = "README.md"
10
10
  license = "Apache-2.0"
@@ -16,6 +16,7 @@ dependencies = [
16
16
  "requests>=2.31,<3",
17
17
  "python-frontmatter>=1.1,<2",
18
18
  "pyyaml>=6.0,<7",
19
+ "colorama>=0.4,<1",
19
20
  ]
20
21
 
21
22
  [project.optional-dependencies]
@@ -26,6 +27,7 @@ dev = [
26
27
  "mypy>=1.10,<2",
27
28
  "types-requests>=2.31,<3",
28
29
  "types-PyYAML>=6.0,<7",
30
+ "types-colorama>=0.4,<1",
29
31
  "vcrpy>=7.0,<9",
30
32
  ]
31
33