workforge 2.4.1__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 (46) hide show
  1. workforge-2.4.1/.github/workflows/ci.yml +55 -0
  2. workforge-2.4.1/.github/workflows/release.yml +145 -0
  3. workforge-2.4.1/.gitignore +32 -0
  4. workforge-2.4.1/AGENTS.md +135 -0
  5. workforge-2.4.1/CHANGELOG.md +125 -0
  6. workforge-2.4.1/LICENSE +21 -0
  7. workforge-2.4.1/PKG-INFO +515 -0
  8. workforge-2.4.1/README.md +483 -0
  9. workforge-2.4.1/_config.yml +1 -0
  10. workforge-2.4.1/docs/distribution.md +204 -0
  11. workforge-2.4.1/docs/github-provider-design.md +78 -0
  12. workforge-2.4.1/docs/jira-provider-design.md +77 -0
  13. workforge-2.4.1/docs/trello-provider-design.md +69 -0
  14. workforge-2.4.1/pyproject.toml +53 -0
  15. workforge-2.4.1/src/workforge/__init__.py +5 -0
  16. workforge-2.4.1/src/workforge/cli.py +733 -0
  17. workforge-2.4.1/src/workforge/config.py +47 -0
  18. workforge-2.4.1/src/workforge/core/__init__.py +1 -0
  19. workforge-2.4.1/src/workforge/core/parser.py +97 -0
  20. workforge-2.4.1/src/workforge/models.py +54 -0
  21. workforge-2.4.1/src/workforge/providers/__init__.py +1 -0
  22. workforge-2.4.1/src/workforge/providers/base.py +48 -0
  23. workforge-2.4.1/src/workforge/providers/github.py +606 -0
  24. workforge-2.4.1/src/workforge/providers/jira.py +509 -0
  25. workforge-2.4.1/src/workforge/providers/registry.py +17 -0
  26. workforge-2.4.1/src/workforge/providers/trello.py +469 -0
  27. workforge-2.4.1/tests/test_agent_context.py +138 -0
  28. workforge-2.4.1/tests/test_cli_output.py +30 -0
  29. workforge-2.4.1/tests/test_github_provider.py +520 -0
  30. workforge-2.4.1/tests/test_init_workspace.py +122 -0
  31. workforge-2.4.1/tests/test_jira_provider.py +464 -0
  32. workforge-2.4.1/tests/test_parser.py +45 -0
  33. workforge-2.4.1/tests/test_trello_provider.py +290 -0
  34. workforge-2.4.1/tests/test_workspace_runtime.py +37 -0
  35. workforge-2.4.1/workspaces/github-projects-example/.env.example +1 -0
  36. workforge-2.4.1/workspaces/github-projects-example/inbox/sample-requirements.md +25 -0
  37. workforge-2.4.1/workspaces/github-projects-example/output/.gitkeep +1 -0
  38. workforge-2.4.1/workspaces/github-projects-example/workforge.yaml +23 -0
  39. workforge-2.4.1/workspaces/jira-example/.env.example +2 -0
  40. workforge-2.4.1/workspaces/jira-example/inbox/sample-requirements.md +13 -0
  41. workforge-2.4.1/workspaces/jira-example/output/.gitkeep +1 -0
  42. workforge-2.4.1/workspaces/jira-example/workforge.yaml +23 -0
  43. workforge-2.4.1/workspaces/trello-example/.env.example +2 -0
  44. workforge-2.4.1/workspaces/trello-example/inbox/sample-requirements.md +25 -0
  45. workforge-2.4.1/workspaces/trello-example/output/.gitkeep +1 -0
  46. workforge-2.4.1/workspaces/trello-example/workforge.yaml +17 -0
@@ -0,0 +1,55 @@
1
+ name: CI
2
+
3
+ on:
4
+ pull_request:
5
+ push:
6
+ branches:
7
+ - main
8
+
9
+ jobs:
10
+ test:
11
+ name: Test Python ${{ matrix.python-version }}
12
+ runs-on: ubuntu-latest
13
+ strategy:
14
+ fail-fast: false
15
+ matrix:
16
+ python-version:
17
+ - "3.11"
18
+ - "3.12"
19
+ - "3.13"
20
+
21
+ steps:
22
+ - name: Check out repository
23
+ uses: actions/checkout@v4
24
+
25
+ - name: Set up Python
26
+ uses: actions/setup-python@v5
27
+ with:
28
+ python-version: ${{ matrix.python-version }}
29
+ cache: pip
30
+
31
+ - name: Install package
32
+ run: python -m pip install -e ".[dev]"
33
+
34
+ - name: Run tests
35
+ run: python -m pytest
36
+
37
+ build:
38
+ name: Build package
39
+ runs-on: ubuntu-latest
40
+
41
+ steps:
42
+ - name: Check out repository
43
+ uses: actions/checkout@v4
44
+
45
+ - name: Set up Python
46
+ uses: actions/setup-python@v5
47
+ with:
48
+ python-version: "3.13"
49
+ cache: pip
50
+
51
+ - name: Install build dependencies
52
+ run: python -m pip install -e ".[dev]"
53
+
54
+ - name: Build distribution
55
+ run: python -m build
@@ -0,0 +1,145 @@
1
+ name: Release
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ inputs:
6
+ bump:
7
+ description: Version bump type
8
+ required: true
9
+ default: patch
10
+ type: choice
11
+ options:
12
+ - major
13
+ - minor
14
+ - patch
15
+
16
+ jobs:
17
+ release:
18
+ name: Build and release
19
+ if: github.ref == 'refs/heads/main'
20
+ runs-on: ubuntu-latest
21
+ permissions:
22
+ contents: write
23
+
24
+ steps:
25
+ - name: Check out repository
26
+ uses: actions/checkout@v4
27
+ with:
28
+ fetch-depth: 0
29
+
30
+ - name: Set up Python
31
+ uses: actions/setup-python@v5
32
+ with:
33
+ python-version: "3.13"
34
+ cache: pip
35
+
36
+ - name: Install package and release tools
37
+ run: python -m pip install -e ".[dev]"
38
+
39
+ - name: Run tests
40
+ run: python -m pytest
41
+
42
+ - name: Install git-cliff
43
+ uses: taiki-e/install-action@v2
44
+ with:
45
+ tool: git-cliff
46
+
47
+ - name: Read current version
48
+ id: version
49
+ run: |
50
+ VERSION=$(sed -n 's/^version = "\([0-9]*\.[0-9]*\.[0-9]*\)"/\1/p' pyproject.toml)
51
+ if [ -z "$VERSION" ]; then
52
+ echo "Could not read the project version from pyproject.toml."
53
+ exit 1
54
+ fi
55
+ echo "current=$VERSION" >> "$GITHUB_OUTPUT"
56
+
57
+ - name: Calculate next version
58
+ id: bump
59
+ env:
60
+ CURRENT_VERSION: ${{ steps.version.outputs.current }}
61
+ BUMP: ${{ inputs.bump }}
62
+ run: |
63
+ IFS='.' read -r MAJOR MINOR PATCH <<< "$CURRENT_VERSION"
64
+
65
+ case "$BUMP" in
66
+ major)
67
+ MAJOR=$((MAJOR + 1))
68
+ MINOR=0
69
+ PATCH=0
70
+ ;;
71
+ minor)
72
+ MINOR=$((MINOR + 1))
73
+ PATCH=0
74
+ ;;
75
+ patch)
76
+ PATCH=$((PATCH + 1))
77
+ ;;
78
+ esac
79
+
80
+ NEW_VERSION="$MAJOR.$MINOR.$PATCH"
81
+ if git rev-parse "v$NEW_VERSION" >/dev/null 2>&1; then
82
+ echo "Tag v$NEW_VERSION already exists."
83
+ exit 1
84
+ fi
85
+ echo "new_version=$NEW_VERSION" >> "$GITHUB_OUTPUT"
86
+
87
+ - name: Update version and changelog
88
+ env:
89
+ NEW_VERSION: ${{ steps.bump.outputs.new_version }}
90
+ run: |
91
+ sed -i "s/^version = \"[0-9]*\.[0-9]*\.[0-9]*\"/version = \"$NEW_VERSION\"/" pyproject.toml
92
+ git-cliff --tag "v$NEW_VERSION" > CHANGELOG.md
93
+
94
+ - name: Build distributions
95
+ run: python -m build
96
+
97
+ - name: Verify distribution metadata
98
+ run: |
99
+ python -m pip install --upgrade twine
100
+ python -m twine check dist/*
101
+
102
+ - name: Store distributions
103
+ uses: actions/upload-artifact@v4
104
+ with:
105
+ name: python-package-distributions
106
+ path: dist/
107
+
108
+ - name: Commit version and tag
109
+ env:
110
+ NEW_VERSION: ${{ steps.bump.outputs.new_version }}
111
+ run: |
112
+ git config user.name "github-actions[bot]"
113
+ git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
114
+ git add pyproject.toml CHANGELOG.md
115
+ git commit -m "chore: release $NEW_VERSION"
116
+ git tag -a "v$NEW_VERSION" -m "v$NEW_VERSION"
117
+ git push origin HEAD:main --follow-tags
118
+
119
+ - name: Create GitHub Release
120
+ uses: softprops/action-gh-release@v2
121
+ with:
122
+ tag_name: v${{ steps.bump.outputs.new_version }}
123
+ name: v${{ steps.bump.outputs.new_version }}
124
+ body_path: CHANGELOG.md
125
+ files: dist/*
126
+
127
+ publish:
128
+ name: Publish to PyPI
129
+ needs: release
130
+ runs-on: ubuntu-latest
131
+ environment:
132
+ name: pypi
133
+ url: https://pypi.org/p/workforge
134
+ permissions:
135
+ id-token: write
136
+
137
+ steps:
138
+ - name: Download distributions
139
+ uses: actions/download-artifact@v4
140
+ with:
141
+ name: python-package-distributions
142
+ path: dist/
143
+
144
+ - name: Publish distributions
145
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,32 @@
1
+ .venv/
2
+ __pycache__/
3
+ *.py[cod]
4
+ .pytest_cache/
5
+ .mypy_cache/
6
+ .ruff_cache/
7
+ dist/
8
+ build/
9
+ *.egg-info/
10
+
11
+ # Local secrets and shell helpers
12
+ .env
13
+ .env.*
14
+ !.env.example
15
+ *.local
16
+ set_env*.fish
17
+
18
+ # Personal workspaces are local by default. Keep shared examples explicitly.
19
+ workspaces/*
20
+ !workspaces/trello-example/
21
+ !workspaces/trello-example/**
22
+ !workspaces/github-projects-example/
23
+ !workspaces/github-projects-example/**
24
+ workspaces/github-projects-example/.env
25
+ !workspaces/jira-example/
26
+ !workspaces/jira-example/**
27
+ workspaces/jira-example/.env
28
+
29
+ # Workspace generated artifacts
30
+ workspaces/*/output/**
31
+ !workspaces/*/output/
32
+ !workspaces/*/output/.gitkeep
@@ -0,0 +1,135 @@
1
+ # WorkForge Agent Guide
2
+
3
+ ## Project overview
4
+
5
+ WorkForge is a Python CLI that parses Markdown requirements into provider-neutral planning items and synchronizes them with planning systems such as Trello, GitHub Projects, and Jira.
6
+
7
+ The project prioritizes:
8
+
9
+ - provider-neutral domain models;
10
+ - isolated, project-specific workspace configuration and credentials;
11
+ - safe previews before external writes;
12
+ - small provider adapters with consistent behavior;
13
+ - backward-compatible CLI and saved-output contracts within a major version.
14
+
15
+ Python 3.11 is the minimum supported version. The package uses Typer for the CLI, Pydantic for models and configuration, HTTPX for provider requests, PyYAML for workspace files, and pytest for tests.
16
+
17
+ ## Repository map
18
+
19
+ - `src/workforge/cli.py`: Typer commands and application orchestration.
20
+ - `src/workforge/models.py`: provider-neutral domain and status models.
21
+ - `src/workforge/config.py`: workspace configuration and isolated `.env` loading.
22
+ - `src/workforge/core/parser.py`: Markdown-to-requirement parsing.
23
+ - `src/workforge/providers/base.py`: provider contract.
24
+ - `src/workforge/providers/registry.py`: provider construction.
25
+ - `src/workforge/providers/{trello,github,jira}.py`: provider-specific API logic.
26
+ - `tests/`: behavior-focused unit tests, including mocked HTTP provider tests.
27
+ - `workspaces/*-example/`: committed examples only; generated output and real credentials remain local.
28
+ - `docs/`: provider designs and other decisions that need more detail than the README.
29
+ - `.github/workflows/`: CI and manual SemVer release automation.
30
+
31
+ The main flow is:
32
+
33
+ 1. `load_workspace` reads `workforge.yaml` and a workspace-local `.env` without mutating the process environment.
34
+ 2. `parse_markdown_requirements` produces provider-neutral `Requirement` models.
35
+ 3. `build_provider` selects a `PlanningProvider` adapter.
36
+ 4. CLI orchestration calls the adapter and optionally saves provider-neutral JSON or Markdown context under the workspace output directory.
37
+
38
+ ## Working rules
39
+
40
+ - Read the relevant implementation, callers, tests, and local diff before editing.
41
+ - Preserve unrelated and pre-existing working-tree changes. Never discard, overwrite, stage, or commit them.
42
+ - Make the smallest complete change. Reuse existing patterns and dependencies; do not add speculative abstractions or dependencies.
43
+ - Keep provider-specific concepts inside provider modules. Shared models, parser output, CLI terminology, and saved formats must remain provider-neutral.
44
+ - Extend `PlanningProvider` and `build_provider` together when adding a provider capability, then cover every concrete provider as required by the contract.
45
+ - Keep CLI commands thin: parsing/configuration, provider selection, orchestration, output, and persistence belong there; provider API details do not.
46
+ - Preserve async provider methods and inject `httpx.MockTransport` in tests. Tests must not call live external services.
47
+ - Validate configuration before network requests and turn provider failures into useful, secret-safe errors.
48
+ - Never expose tokens, credentials, authorization headers, or `.env` contents in output, exceptions, fixtures, logs, or commits.
49
+ - Do not mutate external planning systems unless the user explicitly authorizes it. Prefer preview, provider checks, and mocked tests while developing.
50
+ - WorkForge dogfoods its GitHub provider: create this repository's tracking issues through the `workspaces/workforge` workspace and WorkForge CLI, previewing first and using `--execute` only when the user explicitly authorizes the external write. Use `gh` or the GitHub UI only when that workflow cannot perform the requested operation.
51
+ - When the user authorizes work on a tracked issue, claim it with `workforge claim-item ... --assignee @me` and move it to `doing` before implementation. This applies to existing issues and issues created for a new requirement.
52
+ - Treat the issue's managed tasks as the implementation checklist. Complete each task through `workforge complete-task` as soon as its behavior is implemented and its relevant check passes; leave unfinished or unverified tasks open and report them at handoff.
53
+ - If implementation changes the checklist scope, update the workspace requirement and synchronize it through WorkForge before continuing task tracking.
54
+ - Do not close a tracked issue or move it to `done` when implementation finishes. Leave it in `doing` while the pull request is open; the pull request or project automation closes it and moves it to `done` on merge.
55
+ - Keep workspace secrets in `.env`, commit only `.env.example`, and preserve workspace isolation by passing the runtime environment explicitly.
56
+ - Treat CLI names, options, JSON fields, output paths, provider contracts, and workspace configuration as public interfaces. Breaking changes require explicit approval and a major release plan.
57
+ - Update README examples or design docs when user-facing commands, configuration, provider behavior, or output contracts change.
58
+ - Do not manually edit release versions or generated changelog entries as part of ordinary feature work; the release workflow owns them.
59
+
60
+ ## Tests and verification
61
+
62
+ Install the development environment with:
63
+
64
+ ```bash
65
+ python -m venv .venv
66
+ source .venv/bin/activate
67
+ python -m pip install -e ".[dev]"
68
+ ```
69
+
70
+ For a focused change, run the smallest relevant test first:
71
+
72
+ ```bash
73
+ python -m pytest tests/test_<area>.py
74
+ ```
75
+
76
+ Before handing off a completed code change, run the full local CI equivalent:
77
+
78
+ ```bash
79
+ python -m pytest
80
+ python -m build
81
+ ```
82
+
83
+ Add or update tests for every behavior change and regression fix. Prefer observable behavior over implementation-detail assertions. Provider tests should assert request paths and payloads, success mapping, configuration validation, error handling, and secret redaction where relevant.
84
+
85
+ If a required check cannot run, state exactly which check was skipped and why. Do not claim verification that was not performed.
86
+
87
+ ## Git and commits
88
+
89
+ - Use Conventional Commits: `<type>(<optional-scope>): <imperative summary>`.
90
+ - Allowed common types are `feat`, `fix`, `refactor`, `test`, `docs`, `chore`, `build`, `ci`, and `perf`.
91
+ - Keep the subject concise, lowercase after the colon, and free of a trailing period.
92
+ - Use a scope when it adds useful precision, such as `github`, `trello`, `jira`, `cli`, `parser`, or `workspace`.
93
+ - Mark breaking changes with `!` and explain them in a `BREAKING CHANGE:` footer.
94
+ - Keep commits atomic: one coherent change plus its tests and documentation.
95
+ - Do not create a commit, push, or open a PR unless the user asks. Before committing, inspect the staged diff and ensure it contains only intended files.
96
+
97
+ Examples:
98
+
99
+ ```text
100
+ feat(jira): create issues from requirements
101
+ fix(cli): preserve workspace output on provider failure
102
+ docs: document provider configuration
103
+ feat(cli)!: rename card commands to item commands
104
+ ```
105
+
106
+ ## Pull request handoff
107
+
108
+ Always provide a ready-to-paste PR title and summary when handing off a completed change, even if no PR is created.
109
+
110
+ Use a Conventional Commit-style PR title and this body:
111
+
112
+ ```markdown
113
+ ## Summary
114
+
115
+ - <what changed>
116
+ - <why it changed>
117
+
118
+ ## Verification
119
+
120
+ - `<command>`
121
+ - <manual check, or `Not run (reason)`>
122
+
123
+ ## Risks
124
+
125
+ - <compatibility, migration, external side-effect, or operational risk>
126
+ - None identified
127
+
128
+ Closes #<issue-number>
129
+ ```
130
+
131
+ Include the `Closes` line only when the work is associated with a tracked issue. Mention user-visible CLI/configuration/output changes, deferred work, and breaking or migration implications. Keep the summary factual; never claim tests passed unless they were run successfully.
132
+
133
+ ## Definition of done
134
+
135
+ A change is complete only when the requested behavior is implemented, relevant tests cover it, applicable tests pass, documentation is updated when needed, no secrets or unrelated changes are included, and the handoff contains the changed files, verification results, and PR-ready summary.
@@ -0,0 +1,125 @@
1
+ ## [2.4.1] - 2026-08-21
2
+
3
+ ### ๐Ÿ’ผ Other
4
+
5
+ - Publish releases to PyPI
6
+
7
+ ### ๐Ÿ“š Documentation
8
+
9
+ - Document public distribution workflow
10
+ - License WorkForge under MIT
11
+
12
+ ### โš™๏ธ Miscellaneous Tasks
13
+
14
+ - *(github pages)* Create theme configuration file
15
+ - Updates documentation
16
+ ## [2.4.0] - 2026-08-21
17
+
18
+ ### ๐Ÿš€ Features
19
+
20
+ - *(cli)* Synchronize requirement task lists
21
+
22
+ ### ๐Ÿ“š Documentation
23
+
24
+ - Complete provider design documentation
25
+ - Define tracked issue workflow
26
+
27
+ ### โš™๏ธ Miscellaneous Tasks
28
+
29
+ - Release 2.4.0
30
+ ## [2.3.0] - 2026-08-21
31
+
32
+ ### ๐Ÿš€ Features
33
+
34
+ - *(cli)* Claim existing provider items
35
+
36
+ ### โš™๏ธ Miscellaneous Tasks
37
+
38
+ - Release 2.3.0
39
+ ## [2.2.0] - 2026-08-21
40
+
41
+ ### ๐Ÿš€ Features
42
+
43
+ - *(jira)* Add provider connectivity
44
+ - *(jira)* Create issues from requirements
45
+ - *(jira)* Track and complete issue tasks
46
+ - *(jira)* Comment on and transition issues
47
+ - *(jira)* Discover issues with JQL filters
48
+ - *(jira)* Harden provider for release
49
+
50
+ ### ๐Ÿ“š Documentation
51
+
52
+ - Add project agent guidelines
53
+
54
+ ### โš™๏ธ Miscellaneous Tasks
55
+
56
+ - Release 2.2.0
57
+ ## [2.1.0] - 2026-08-21
58
+
59
+ ### ๐Ÿš€ Features
60
+
61
+ - Filter GitHub discovery by assignee and status
62
+ - Filter Trello discovery by member and list
63
+
64
+ ### โš™๏ธ Miscellaneous Tasks
65
+
66
+ - Release 2.1.0
67
+ ## [2.0.0] - 2026-08-20
68
+
69
+ ### ๐Ÿš€ Features
70
+
71
+ - Add GitHub provider connectivity check
72
+ - Create GitHub issues from requirements
73
+ - Add created issues to GitHub Projects
74
+ - Read GitHub issue task status
75
+ - Complete GitHub issue tasks
76
+ - Update GitHub Project item status
77
+ - Discover GitHub Project issues
78
+ - Comment on GitHub issues
79
+ - Assign GitHub milestones to requirements
80
+
81
+ ### ๐Ÿ› Bug Fixes
82
+
83
+ - Harden GitHub provider failures
84
+
85
+ ### ๐Ÿšœ Refactor
86
+
87
+ - Store provider output as items
88
+ - Use provider-neutral item terminology
89
+
90
+ ### ๐Ÿ“š Documentation
91
+
92
+ - Document GitHub Projects provider
93
+ - Add GitHub Projects example workspace
94
+ - Add v2 migration guide
95
+
96
+ ### โš™๏ธ Miscellaneous Tasks
97
+
98
+ - Release 2.0.0
99
+ ## [1.0.0] - 2026-08-05
100
+
101
+ ### ๐Ÿš€ Features
102
+
103
+ - Add trello workflow sync commands
104
+ - Add workspace init command
105
+ - Discover trello cards by label
106
+ - Add focused card context command
107
+ - Add Trello card action commands
108
+
109
+ ### ๐Ÿ“š Documentation
110
+
111
+ - Include Trello lists and labels in example workspace
112
+
113
+ ### ๐Ÿงช Testing
114
+
115
+ - Decouple shared tests from project fixtures
116
+
117
+ ### โš™๏ธ Miscellaneous Tasks
118
+
119
+ - Scaffold workforge cli
120
+ - Scope workspace runtime environment
121
+ - Refine workspace gitignore rules
122
+ - Add test and build workflow
123
+ - Rename the Trello example workspace
124
+ - Add Python release workflow
125
+ - Release 1.0.0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Daniel Ramirez
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.