workdash 0.1.0__tar.gz → 0.3.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 (50) hide show
  1. {workdash-0.1.0 → workdash-0.3.0}/PKG-INFO +113 -26
  2. workdash-0.3.0/README.md +270 -0
  3. {workdash-0.1.0 → workdash-0.3.0}/pyproject.toml +2 -1
  4. {workdash-0.1.0 → workdash-0.3.0}/src/workdash/backend.py +41 -28
  5. workdash-0.3.0/src/workdash/config.py +608 -0
  6. workdash-0.3.0/src/workdash/control.py +717 -0
  7. {workdash-0.1.0 → workdash-0.3.0}/src/workdash/github_client.py +63 -93
  8. {workdash-0.1.0 → workdash-0.3.0}/src/workdash/launcher.py +271 -18
  9. {workdash-0.1.0 → workdash-0.3.0}/src/workdash/repo_worktree.py +173 -103
  10. {workdash-0.1.0 → workdash-0.3.0}/src/workdash/tui.py +143 -69
  11. workdash-0.3.0/src/workdash/workdash.py +727 -0
  12. {workdash-0.1.0 → workdash-0.3.0}/src/workdash.egg-info/PKG-INFO +113 -26
  13. {workdash-0.1.0 → workdash-0.3.0}/src/workdash.egg-info/SOURCES.txt +2 -0
  14. {workdash-0.1.0 → workdash-0.3.0}/src/workdash.egg-info/requires.txt +1 -0
  15. {workdash-0.1.0 → workdash-0.3.0}/tests/test_backend.py +154 -1
  16. workdash-0.3.0/tests/test_config.py +635 -0
  17. workdash-0.3.0/tests/test_control.py +171 -0
  18. {workdash-0.1.0 → workdash-0.3.0}/tests/test_github_client.py +57 -0
  19. {workdash-0.1.0 → workdash-0.3.0}/tests/test_launcher.py +322 -9
  20. {workdash-0.1.0 → workdash-0.3.0}/tests/test_repo_worktree.py +389 -8
  21. {workdash-0.1.0 → workdash-0.3.0}/tests/test_tui.py +470 -29
  22. workdash-0.3.0/tests/test_workdash.py +1325 -0
  23. workdash-0.1.0/README.md +0 -184
  24. workdash-0.1.0/src/workdash/config.py +0 -207
  25. workdash-0.1.0/src/workdash/workdash.py +0 -207
  26. workdash-0.1.0/tests/test_config.py +0 -259
  27. workdash-0.1.0/tests/test_workdash.py +0 -270
  28. {workdash-0.1.0 → workdash-0.3.0}/LICENSE +0 -0
  29. {workdash-0.1.0 → workdash-0.3.0}/setup.cfg +0 -0
  30. {workdash-0.1.0 → workdash-0.3.0}/src/workdash/__init__.py +0 -0
  31. {workdash-0.1.0 → workdash-0.3.0}/src/workdash/__main__.py +0 -0
  32. {workdash-0.1.0 → workdash-0.3.0}/src/workdash/analysis_cache.py +0 -0
  33. {workdash-0.1.0 → workdash-0.3.0}/src/workdash/analyzer.py +0 -0
  34. {workdash-0.1.0 → workdash-0.3.0}/src/workdash/included_items.py +0 -0
  35. {workdash-0.1.0 → workdash-0.3.0}/src/workdash/models.py +0 -0
  36. {workdash-0.1.0 → workdash-0.3.0}/src/workdash/prompts/__init__.py +0 -0
  37. {workdash-0.1.0 → workdash-0.3.0}/src/workdash/prompts/analyze_issue.txt +0 -0
  38. {workdash-0.1.0 → workdash-0.3.0}/src/workdash/prompts/analyze_pr.txt +0 -0
  39. {workdash-0.1.0 → workdash-0.3.0}/src/workdash/prompts/launch_issue.txt +0 -0
  40. {workdash-0.1.0 → workdash-0.3.0}/src/workdash/prompts/launch_pr.txt +0 -0
  41. {workdash-0.1.0 → workdash-0.3.0}/src/workdash/prompts/launch_review.txt +0 -0
  42. {workdash-0.1.0 → workdash-0.3.0}/src/workdash/repo_resolver.py +0 -0
  43. {workdash-0.1.0 → workdash-0.3.0}/src/workdash.egg-info/dependency_links.txt +0 -0
  44. {workdash-0.1.0 → workdash-0.3.0}/src/workdash.egg-info/entry_points.txt +0 -0
  45. {workdash-0.1.0 → workdash-0.3.0}/src/workdash.egg-info/top_level.txt +0 -0
  46. {workdash-0.1.0 → workdash-0.3.0}/tests/test_analysis_cache.py +0 -0
  47. {workdash-0.1.0 → workdash-0.3.0}/tests/test_analyzer.py +0 -0
  48. {workdash-0.1.0 → workdash-0.3.0}/tests/test_included_items.py +0 -0
  49. {workdash-0.1.0 → workdash-0.3.0}/tests/test_normalization.py +0 -0
  50. {workdash-0.1.0 → workdash-0.3.0}/tests/test_repo_resolver.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: workdash
3
- Version: 0.1.0
3
+ Version: 0.3.0
4
4
  Summary: Text-based GitHub work triage dashboard.
5
5
  Author-email: Alessandro Molina <alessandro@molina.fyi>
6
6
  License: GNU GENERAL PUBLIC LICENSE
@@ -698,6 +698,7 @@ Requires-Python: >=3.12
698
698
  Description-Content-Type: text/markdown
699
699
  License-File: LICENSE
700
700
  Requires-Dist: markdown>=3.6
701
+ Requires-Dist: TurboGears2>=2.5.0
701
702
  Requires-Dist: textual>=0.58
702
703
  Provides-Extra: test
703
704
  Requires-Dist: pytest>=8; extra == "test"
@@ -724,20 +725,18 @@ been tested on Windows.
724
725
  ## Requirements
725
726
 
726
727
  - Python `>=3.12`.
727
- - [`gh`](https://cli.github.com/) installed and authenticated (`gh auth status`
728
- must succeed). The authenticated account should have access to the repositories
729
- you want to track; if GitHub requires additional repository authorization for a
730
- repository while loading a specific work source, `workdash` warns, skips that
731
- inaccessible repository or item, and still loads the others.
728
+ - Authenticated [`gh`](https://cli.github.com/) for GitHub access.
729
+ `workdash --configure` installs a local copy when `gh` is not available.
732
730
  - `xdg-open` or `open` for opening links and rendered analyses in your browser.
733
731
  - `zellij` for the interactive dashboard, terminal panes, and agent sessions.
734
- When `workdash` starts outside Zellij, it replaces itself with a Zellij
735
- process that starts a fresh `workdash-<random>` session and runs the
736
- dashboard inside it.
732
+ `workdash --configure` installs a local copy when `zellij` is not available.
733
+ - Global `gh` and `zellij` binaries are preferred; configured local copies are
734
+ used as fallbacks.
737
735
  - Optional, depending on which actions you use from the TUI:
738
736
  - `claude` — to analyze or launch a Claude coding session.
739
737
  - `codex` — to analyze or launch a ChatGPT Codex session.
740
738
  - `code` — to launch a VSCode + Copilot coding session.
739
+ - `pi` — to launch a pi coding agent session.
741
740
 
742
741
  ## Installation
743
742
 
@@ -766,13 +765,23 @@ workdash --configure
766
765
  The wizard fills in:
767
766
 
768
767
  - Your GitHub username.
768
+ - Zellij availability. If `zellij` is not on `PATH`, the wizard downloads the
769
+ latest release binary into the workdash configuration directory.
770
+ - GitHub CLI availability. If `gh` is not on `PATH`, the wizard downloads the
771
+ latest release binary into the workdash configuration directory. Authentication
772
+ is still handled by `gh`; run `gh auth login` if startup reports that `gh` is
773
+ not authenticated.
769
774
  - The list of repositories to track (see *Repository selectors* below).
770
775
  - A working directory where per-item git worktrees will live.
771
776
  - The analyze and launch commands for Claude and Codex (auto-detected when the
772
777
  tools are on your `PATH`).
773
778
 
774
779
  You can edit `~/.config/workdash/config.json` by hand at any time. Re-running
775
- `--configure` only prompts for fields that are still empty.
780
+ `--configure` only prompts for fields that are still empty, except for Zellij:
781
+ the wizard always checks for a global `zellij` first and downloads a fresh
782
+ local binary when no global binary exists. It does the same for `gh`, checking
783
+ for a global GitHub CLI first and downloading a fresh local copy when none is
784
+ available.
776
785
 
777
786
  ## Usage
778
787
 
@@ -782,15 +791,23 @@ Launch the TUI:
782
791
  workdash
783
792
  ```
784
793
 
785
- Useful flags:
794
+ Useful commands and flags:
786
795
 
787
796
  ```bash
788
- workdash --print # list items as plain text, no TUI
789
- workdash --refresh # force a refresh from GitHub
790
- workdash --debug # verbose logging
791
- workdash --configure # run the interactive setup wizard
792
- workdash --direct # start without the automatic Zellij wrapper
793
- workdash --version # print version and exit
797
+ workdash --server # start the TUI plus localhost JSON control API
798
+ workdash list # list server-backed dashboard items as plain text
799
+ workdash list --refresh # ask the server to refresh items before listing
800
+ workdash list --json # list items as machine-readable JSON
801
+ workdash info [--all] [--json] # report live Workdash-owned Zellij panes
802
+ workdash analyze ITEM [--agent NAME] [--json] # analyze a current server item
803
+ workdash code ITEM [--agent NAME] [--json] # launch a terminal-backed coding agent
804
+ workdash read PANE_ID [--full] [--json] # read text from a live pane
805
+ workdash write PANE_ID TEXT [--raw] [--json] # send text to a live pane
806
+ workdash show-config [--json] # show configured agents and fixed server address
807
+ workdash --debug # verbose logging
808
+ workdash --configure # run the interactive setup wizard
809
+ workdash --direct # start without the automatic Zellij wrapper
810
+ workdash --version # print version and exit
794
811
  ```
795
812
 
796
813
  ## What gets shown
@@ -821,7 +838,7 @@ The `repositories` list in `config.json` accepts:
821
838
  (if any), or run a fresh analysis with Claude or Codex. Fresh analyses are
822
839
  cached and rendered as HTML in your browser.
823
840
  - `c` — launch a coding session on the selected item. Opens a dialog to pick
824
- Claude, Codex, or VSCode Copilot. `workdash` prepares a dedicated git
841
+ Claude, Codex, VSCode Copilot, or pi. `workdash` prepares a dedicated git
825
842
  worktree for the item and starts the chosen tool in it, preloaded with
826
843
  context about the issue or PR.
827
844
  - `t` — open a terminal in the selected item's worktree (no agent launched).
@@ -834,24 +851,93 @@ configured `workdir`. Each tracked repository gets a local clone, and each work
834
851
  item gets its own worktree alongside it, so you can hop between items without
835
852
  disturbing other in-progress work.
836
853
 
837
- ## Print mode
854
+ ## Local control server
838
855
 
839
- `--print` emits one row per item, sorted by last update (most recent first):
856
+ `workdash --server` starts the normal TUI and a localhost JSON control API in the
857
+ same process. V0 listens on `127.0.0.1:8765`, accepts JSON only, and stops when
858
+ the TUI exits. Client commands such as `list`, `info`, `analyze`, `code`,
859
+ `read`, and `write` connect to this server instead of loading GitHub or Zellij
860
+ state themselves.
861
+
862
+ ## List command
863
+
864
+ `workdash list` requires a running `workdash --server` session and emits one row
865
+ per server-known item, sorted by last update (most recent first):
840
866
 
841
867
  ```
842
- TYPE repo#number YYYY-MM-DD title
868
+ TYPE repo#TYPE-N YYYY-MM-DD title
843
869
  ```
844
870
 
845
- `TYPE` is `ISSUE`, `PR`, or `REVIEW` (for review-requested PRs). The suggested
871
+ `TYPE` is `ISSUE`, `PR`, or `REVIEW` (for review-requested PRs). The row ID is
872
+ copy/paste-friendly: `repo#ISSUE-N`, `repo#PR-N`, or `repo#REVIEW-N`. The suggested
846
873
  item's title is prefixed with `* `. If nothing matches, the output is
847
874
  `No work items found.`.
848
875
 
876
+ Use `workdash list --refresh` to ask the server to refresh GitHub data before
877
+ listing. Use `workdash list --json` to emit the same list as JSON records with
878
+ item ID, type, kind, repository, number, title, URL, timestamps, and suggested
879
+ status.
880
+
881
+ ## Info command
882
+
883
+ `workdash info [--json]` requires a running `workdash --server` session and
884
+ reports live Workdash-owned Zellij panes for terminal-backed work actions,
885
+ including pane title, cwd, command, tab, state, and mapped Workdash item. It maps
886
+ each live pane's current working directory to the matching Workdash item ID when
887
+ the pane is inside a known worktree, or reports `unknown` when no mapping is
888
+ known. Add `--all` to include other live non-plugin panes from the server-backed
889
+ Workdash session as `kind=unknown` with unknown item mapping.
890
+
891
+ ## Analyze command
892
+
893
+ `workdash analyze ITEM [--agent NAME] [--json]` requires a running
894
+ `workdash --server` session and analyzes a current server-known Workdash item.
895
+ `ITEM` can be a row ID from `workdash list` (such as `owner/repo#ISSUE-123`) or a
896
+ GitHub issue/PR URL that is already in the current dashboard data. It reuses a
897
+ fresh cached analysis when available, otherwise the server prepares the item's
898
+ worktree and runs the selected configured analysis agent.
899
+
900
+ The server analyze response includes `content_type` (`text/markdown`), `file_name`,
901
+ and base64 `file_content` so clients do not need filesystem access to the server
902
+ cache. The CLI writes that content to a secure temporary local file and reports it
903
+ as `analysis_path`. `--json` emits the same client-side result without the raw
904
+ base64 content.
905
+
906
+ ## Code command
907
+
908
+ `workdash code ITEM [--agent NAME] [--json]` requires a running
909
+ `workdash --server` session and launches a configured terminal-backed coding
910
+ agent (`claude`, `codex`, or `pi`) for a current server-known Workdash item.
911
+ `ITEM` accepts the same row IDs and GitHub URLs as `workdash analyze`.
912
+
913
+ Human output reports the item, agent, selected session, cwd, pane title, and pane
914
+ id when available. `--json` emits the same result as machine-readable JSON.
915
+
916
+ ## Read and write commands
917
+
918
+ `workdash read PANE_ID [--full] [--json]` requires a running `workdash --server`
919
+ session and reads pane text through the server-backed pane content API. Human
920
+ output prints the pane text directly. Add `--full` to request full scrollback.
921
+
922
+ `workdash write PANE_ID TEXT [--raw] [--json]` requires a running
923
+ `workdash --server` session and sends pane input through the server-backed pane
924
+ send API. By default Workdash appends Enter; `--raw` or `--no-enter` sends the
925
+ text exactly. Human output confirms that the pane accepted the input.
926
+
927
+ ## Show-config command
928
+
929
+ `workdash show-config [--json]` reports configured analysis agents, configured
930
+ terminal-backed coding agents, and the fixed V0 server address. It does not
931
+ require a running server. The same information is also available from the JSON
932
+ API for HTTP clients.
933
+
849
934
  ## Analysis cache
850
935
 
851
- Analyses produced with `a` are cached under `~/.config/workdash/cache/` so that
852
- re-opening an item is instant. The cache is keyed by the item's GitHub
936
+ Analyses produced with `a` or `workdash analyze` are cached under
937
+ `~/.config/workdash/cache/` so that re-opening an item is instant. The cache is
938
+ keyed by the item's GitHub
853
939
  `updated_at` timestamp, so any change on GitHub automatically invalidates the
854
- cached analysis and the next `a` will re-run it.
940
+ cached analysis and the next analyze action will re-run it.
855
941
 
856
942
  ## Product behavior
857
943
 
@@ -859,7 +945,8 @@ Canonical product behavior is described in [`features/`](features/).
859
945
 
860
946
  The `.feature` files are the source of truth for what the software does. They are product specifications first and executable BDD scenarios second.
861
947
 
862
- Implementation progress can be tracked separately, for example in `PROJECT_PLAN.md`, by referencing stable feature and scenario IDs.
948
+ Implementation progress can be tracked separately.
949
+ BDD is the integration point between humans and agents collaborating on the project as Workdash relied hevily on agents during its initial development cycle.
863
950
 
864
951
  ### BDD-first development (mandatory)
865
952
 
@@ -0,0 +1,270 @@
1
+ # workdash
2
+
3
+ Text-based GitHub work triage dashboard ( <https://alessandro.molina.fyi/workdash/> )
4
+
5
+ `workdash` pulls together the issues and pull requests that matter to you across
6
+ your GitHub repositories, suggests what to pick up next, and makes it easy to
7
+ jump into a work item — either for a quick review, a deeper AI-assisted
8
+ analysis, or a full coding session in a dedicated worktree.
9
+
10
+ ![workdash screenshot](site/workdash.png)
11
+
12
+ ## Platform
13
+
14
+ Linux and macOS. `workdash` relies on `xdg-open` or `open` and expects `zellij`
15
+ for the interactive dashboard and terminal-backed work actions. It has not
16
+ been tested on Windows.
17
+
18
+ ## Requirements
19
+
20
+ - Python `>=3.12`.
21
+ - Authenticated [`gh`](https://cli.github.com/) for GitHub access.
22
+ `workdash --configure` installs a local copy when `gh` is not available.
23
+ - `xdg-open` or `open` for opening links and rendered analyses in your browser.
24
+ - `zellij` for the interactive dashboard, terminal panes, and agent sessions.
25
+ `workdash --configure` installs a local copy when `zellij` is not available.
26
+ - Global `gh` and `zellij` binaries are preferred; configured local copies are
27
+ used as fallbacks.
28
+ - Optional, depending on which actions you use from the TUI:
29
+ - `claude` — to analyze or launch a Claude coding session.
30
+ - `codex` — to analyze or launch a ChatGPT Codex session.
31
+ - `code` — to launch a VSCode + Copilot coding session.
32
+ - `pi` — to launch a pi coding agent session.
33
+
34
+ ## Installation
35
+
36
+ With [`uv`](https://docs.astral.sh/uv/) — one isolated install, `workdash` on
37
+ your `PATH`:
38
+
39
+ ```bash
40
+ uv tool install workdash
41
+ ```
42
+
43
+ For development install:
44
+
45
+ ```bash
46
+ pip install -e '.[test]'
47
+ ```
48
+
49
+ ## First-time setup
50
+
51
+ On the first run you need a configuration file at
52
+ `~/.config/workdash/config.json`. Generate it interactively with:
53
+
54
+ ```bash
55
+ workdash --configure
56
+ ```
57
+
58
+ The wizard fills in:
59
+
60
+ - Your GitHub username.
61
+ - Zellij availability. If `zellij` is not on `PATH`, the wizard downloads the
62
+ latest release binary into the workdash configuration directory.
63
+ - GitHub CLI availability. If `gh` is not on `PATH`, the wizard downloads the
64
+ latest release binary into the workdash configuration directory. Authentication
65
+ is still handled by `gh`; run `gh auth login` if startup reports that `gh` is
66
+ not authenticated.
67
+ - The list of repositories to track (see *Repository selectors* below).
68
+ - A working directory where per-item git worktrees will live.
69
+ - The analyze and launch commands for Claude and Codex (auto-detected when the
70
+ tools are on your `PATH`).
71
+
72
+ You can edit `~/.config/workdash/config.json` by hand at any time. Re-running
73
+ `--configure` only prompts for fields that are still empty, except for Zellij:
74
+ the wizard always checks for a global `zellij` first and downloads a fresh
75
+ local binary when no global binary exists. It does the same for `gh`, checking
76
+ for a global GitHub CLI first and downloading a fresh local copy when none is
77
+ available.
78
+
79
+ ## Usage
80
+
81
+ Launch the TUI:
82
+
83
+ ```bash
84
+ workdash
85
+ ```
86
+
87
+ Useful commands and flags:
88
+
89
+ ```bash
90
+ workdash --server # start the TUI plus localhost JSON control API
91
+ workdash list # list server-backed dashboard items as plain text
92
+ workdash list --refresh # ask the server to refresh items before listing
93
+ workdash list --json # list items as machine-readable JSON
94
+ workdash info [--all] [--json] # report live Workdash-owned Zellij panes
95
+ workdash analyze ITEM [--agent NAME] [--json] # analyze a current server item
96
+ workdash code ITEM [--agent NAME] [--json] # launch a terminal-backed coding agent
97
+ workdash read PANE_ID [--full] [--json] # read text from a live pane
98
+ workdash write PANE_ID TEXT [--raw] [--json] # send text to a live pane
99
+ workdash show-config [--json] # show configured agents and fixed server address
100
+ workdash --debug # verbose logging
101
+ workdash --configure # run the interactive setup wizard
102
+ workdash --direct # start without the automatic Zellij wrapper
103
+ workdash --version # print version and exit
104
+ ```
105
+
106
+ ## What gets shown
107
+
108
+ `workdash` gathers the following for your configured GitHub username:
109
+
110
+ - Open pull requests you authored.
111
+ - Open pull requests where you are a requested reviewer, plus open pull
112
+ requests you have already reviewed (shown as `REVIEW`).
113
+ - Open issues assigned to you.
114
+ - Open issues and pull requests across the tracked repositories.
115
+
116
+ Items are merged, deduplicated, and sorted by last update. One item is marked
117
+ with `*` as the suggested next thing to pick up.
118
+
119
+ ### Repository selectors
120
+
121
+ The `repositories` list in `config.json` accepts:
122
+
123
+ - `owner/repo` — a specific repository.
124
+ - `owner/*` — every repository accessible to you under that owner.
125
+
126
+ ## TUI keybindings
127
+
128
+ - `o` — open the selected item in your browser.
129
+ - `r` — refresh the list from GitHub.
130
+ - `a` — analyze the selected item. Opens a dialog to open the cached analysis
131
+ (if any), or run a fresh analysis with Claude or Codex. Fresh analyses are
132
+ cached and rendered as HTML in your browser.
133
+ - `c` — launch a coding session on the selected item. Opens a dialog to pick
134
+ Claude, Codex, VSCode Copilot, or pi. `workdash` prepares a dedicated git
135
+ worktree for the item and starts the chosen tool in it, preloaded with
136
+ context about the issue or PR.
137
+ - `t` — open a terminal in the selected item's worktree (no agent launched).
138
+ - `q` — quit.
139
+
140
+ ## Worktrees
141
+
142
+ Coding and analysis actions operate on a per-item git worktree rooted under the
143
+ configured `workdir`. Each tracked repository gets a local clone, and each work
144
+ item gets its own worktree alongside it, so you can hop between items without
145
+ disturbing other in-progress work.
146
+
147
+ ## Local control server
148
+
149
+ `workdash --server` starts the normal TUI and a localhost JSON control API in the
150
+ same process. V0 listens on `127.0.0.1:8765`, accepts JSON only, and stops when
151
+ the TUI exits. Client commands such as `list`, `info`, `analyze`, `code`,
152
+ `read`, and `write` connect to this server instead of loading GitHub or Zellij
153
+ state themselves.
154
+
155
+ ## List command
156
+
157
+ `workdash list` requires a running `workdash --server` session and emits one row
158
+ per server-known item, sorted by last update (most recent first):
159
+
160
+ ```
161
+ TYPE repo#TYPE-N YYYY-MM-DD title
162
+ ```
163
+
164
+ `TYPE` is `ISSUE`, `PR`, or `REVIEW` (for review-requested PRs). The row ID is
165
+ copy/paste-friendly: `repo#ISSUE-N`, `repo#PR-N`, or `repo#REVIEW-N`. The suggested
166
+ item's title is prefixed with `* `. If nothing matches, the output is
167
+ `No work items found.`.
168
+
169
+ Use `workdash list --refresh` to ask the server to refresh GitHub data before
170
+ listing. Use `workdash list --json` to emit the same list as JSON records with
171
+ item ID, type, kind, repository, number, title, URL, timestamps, and suggested
172
+ status.
173
+
174
+ ## Info command
175
+
176
+ `workdash info [--json]` requires a running `workdash --server` session and
177
+ reports live Workdash-owned Zellij panes for terminal-backed work actions,
178
+ including pane title, cwd, command, tab, state, and mapped Workdash item. It maps
179
+ each live pane's current working directory to the matching Workdash item ID when
180
+ the pane is inside a known worktree, or reports `unknown` when no mapping is
181
+ known. Add `--all` to include other live non-plugin panes from the server-backed
182
+ Workdash session as `kind=unknown` with unknown item mapping.
183
+
184
+ ## Analyze command
185
+
186
+ `workdash analyze ITEM [--agent NAME] [--json]` requires a running
187
+ `workdash --server` session and analyzes a current server-known Workdash item.
188
+ `ITEM` can be a row ID from `workdash list` (such as `owner/repo#ISSUE-123`) or a
189
+ GitHub issue/PR URL that is already in the current dashboard data. It reuses a
190
+ fresh cached analysis when available, otherwise the server prepares the item's
191
+ worktree and runs the selected configured analysis agent.
192
+
193
+ The server analyze response includes `content_type` (`text/markdown`), `file_name`,
194
+ and base64 `file_content` so clients do not need filesystem access to the server
195
+ cache. The CLI writes that content to a secure temporary local file and reports it
196
+ as `analysis_path`. `--json` emits the same client-side result without the raw
197
+ base64 content.
198
+
199
+ ## Code command
200
+
201
+ `workdash code ITEM [--agent NAME] [--json]` requires a running
202
+ `workdash --server` session and launches a configured terminal-backed coding
203
+ agent (`claude`, `codex`, or `pi`) for a current server-known Workdash item.
204
+ `ITEM` accepts the same row IDs and GitHub URLs as `workdash analyze`.
205
+
206
+ Human output reports the item, agent, selected session, cwd, pane title, and pane
207
+ id when available. `--json` emits the same result as machine-readable JSON.
208
+
209
+ ## Read and write commands
210
+
211
+ `workdash read PANE_ID [--full] [--json]` requires a running `workdash --server`
212
+ session and reads pane text through the server-backed pane content API. Human
213
+ output prints the pane text directly. Add `--full` to request full scrollback.
214
+
215
+ `workdash write PANE_ID TEXT [--raw] [--json]` requires a running
216
+ `workdash --server` session and sends pane input through the server-backed pane
217
+ send API. By default Workdash appends Enter; `--raw` or `--no-enter` sends the
218
+ text exactly. Human output confirms that the pane accepted the input.
219
+
220
+ ## Show-config command
221
+
222
+ `workdash show-config [--json]` reports configured analysis agents, configured
223
+ terminal-backed coding agents, and the fixed V0 server address. It does not
224
+ require a running server. The same information is also available from the JSON
225
+ API for HTTP clients.
226
+
227
+ ## Analysis cache
228
+
229
+ Analyses produced with `a` or `workdash analyze` are cached under
230
+ `~/.config/workdash/cache/` so that re-opening an item is instant. The cache is
231
+ keyed by the item's GitHub
232
+ `updated_at` timestamp, so any change on GitHub automatically invalidates the
233
+ cached analysis and the next analyze action will re-run it.
234
+
235
+ ## Product behavior
236
+
237
+ Canonical product behavior is described in [`features/`](features/).
238
+
239
+ The `.feature` files are the source of truth for what the software does. They are product specifications first and executable BDD scenarios second.
240
+
241
+ Implementation progress can be tracked separately.
242
+ BDD is the integration point between humans and agents collaborating on the project as Workdash relied hevily on agents during its initial development cycle.
243
+
244
+ ### BDD-first development (mandatory)
245
+
246
+ Every new feature **must** start with a BDD definition under [`features/`](features/), and every change to existing behavior **must** update the relevant `.feature` file **before** any implementation or test code is modified. The `.feature` files are the contract; code follows them, not the other way around.
247
+
248
+ This applies to agents and humans alike. A change that lands code without a matching `features/` update is incomplete.
249
+
250
+ ## Tests
251
+
252
+ From the repository root:
253
+
254
+ ```bash
255
+ PYTHONPATH=src pytest
256
+ ```
257
+
258
+ ### BDD suite
259
+
260
+ `tests/bdd/` drives development from the `.feature` files in `features/`.
261
+ `pytest_bdd.scenarios(...)` auto-generates one pytest test per `Scenario`,
262
+ so adding a scenario to `features/` is enough to pull it into the suite.
263
+ Step definitions live under `tests/bdd/steps/`; scenarios whose steps are
264
+ not yet implemented fail with `StepDefinitionNotFoundError`, which is the
265
+ intended TDD signal for BDD-first development.
266
+
267
+ ## License
268
+
269
+ `workdash` is distributed under the terms of the GNU General Public License
270
+ version 3. See [LICENSE](LICENSE) for the full text.
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "workdash"
7
- version = "0.1.0"
7
+ version = "0.3.0"
8
8
  description = "Text-based GitHub work triage dashboard."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.12"
@@ -29,6 +29,7 @@ classifiers = [
29
29
  ]
30
30
  dependencies = [
31
31
  "markdown>=3.6",
32
+ "TurboGears2>=2.5.0",
32
33
  "textual>=0.58",
33
34
  ]
34
35
 
@@ -2,8 +2,8 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
- import shlex
6
5
  from collections.abc import Callable
6
+ from concurrent.futures import ThreadPoolExecutor
7
7
  from dataclasses import dataclass
8
8
  from pathlib import Path
9
9
 
@@ -106,28 +106,43 @@ class WorkdashBackend:
106
106
  for repository in repositories:
107
107
  report_progress(f" - {repository}")
108
108
  github_username = self.config.github_username
109
- report_progress("Fetching open authored pull requests...")
110
- authored_pull_requests = self.github_client.list_open_authored_prs(github_username)
111
- report_progress(f"Fetched {len(authored_pull_requests)} open authored pull request(s).")
112
- report_progress("Fetching open review-requested pull requests...")
113
- review_requested_pull_requests = self.github_client.list_open_review_requested_prs(
114
- github_username,
115
- progress_callback=report_progress,
116
- )
117
- report_progress(
118
- f"Fetched {len(review_requested_pull_requests)} open review-requested pull request(s)."
119
- )
120
- report_progress("Fetching open reviewed pull requests...")
121
- reviewed_pull_requests = self.github_client.list_open_reviewed_prs(github_username)
122
- report_progress(f"Fetched {len(reviewed_pull_requests)} open reviewed pull request(s).")
123
- report_progress("Fetching open assigned issues...")
124
- assigned_issues = self.github_client.list_open_assigned_issues(github_username)
125
- report_progress(f"Fetched {len(assigned_issues)} open assigned issue(s).")
126
- report_progress("Fetching tracked issues and pull requests...")
127
- recent_tracked_items = self.github_client.list_recent_tracked_items(
128
- repositories,
129
- progress_callback=report_progress,
130
- )
109
+ with ThreadPoolExecutor(max_workers=5) as executor:
110
+ report_progress("Fetching open authored pull requests...")
111
+ authored_future = executor.submit(
112
+ self.github_client.list_open_authored_prs, github_username
113
+ )
114
+ report_progress("Fetching open review-requested pull requests...")
115
+ review_requested_future = executor.submit(
116
+ self.github_client.list_open_review_requested_prs,
117
+ github_username,
118
+ progress_callback=report_progress,
119
+ )
120
+ report_progress("Fetching open reviewed pull requests...")
121
+ reviewed_future = executor.submit(
122
+ self.github_client.list_open_reviewed_prs, github_username
123
+ )
124
+ report_progress("Fetching open assigned issues...")
125
+ assigned_future = executor.submit(
126
+ self.github_client.list_open_assigned_issues, github_username
127
+ )
128
+ report_progress("Fetching tracked issues and pull requests...")
129
+ tracked_future = executor.submit(
130
+ self.github_client.list_recent_tracked_items,
131
+ repositories,
132
+ progress_callback=report_progress,
133
+ )
134
+
135
+ authored_pull_requests = authored_future.result()
136
+ report_progress(f"Fetched {len(authored_pull_requests)} open authored pull request(s).")
137
+ review_requested_pull_requests = review_requested_future.result()
138
+ report_progress(
139
+ f"Fetched {len(review_requested_pull_requests)} open review-requested pull request(s)."
140
+ )
141
+ reviewed_pull_requests = reviewed_future.result()
142
+ report_progress(f"Fetched {len(reviewed_pull_requests)} open reviewed pull request(s).")
143
+ assigned_issues = assigned_future.result()
144
+ report_progress(f"Fetched {len(assigned_issues)} open assigned issue(s).")
145
+ recent_tracked_items = tracked_future.result()
131
146
  merged_review_items = merge_normalized_work_items(
132
147
  normalize_review_requested_pull_requests(review_requested_pull_requests),
133
148
  normalize_review_requested_pull_requests(reviewed_pull_requests),
@@ -220,10 +235,8 @@ class WorkdashBackend:
220
235
  self.included_items_store.add(parsed.canonical_url)
221
236
  return IncludeResult(fetched_item=item)
222
237
 
223
- def _resolve_command_tokens(self, tool: str) -> list[str]:
224
- if tool == "claude":
225
- return shlex.split(self.config.claude.analyze)
226
- return shlex.split(self.config.codex.analyze)
238
+ def resolve_analyze_command_tokens(self, tool: str) -> list[str]:
239
+ return self.config.analyze_agent_command_tokens(tool)
227
240
 
228
241
  def analyze_item(self, item: WorkItem, tool: str = "codex") -> str | None:
229
242
  """Generate or retrieve analysis, returning the markdown file path.
@@ -238,7 +251,7 @@ class WorkdashBackend:
238
251
  item.analysis = cached_analysis
239
252
  return str(self.analysis_cache.build_analysis_path(item))
240
253
  return None
241
- command_tokens = self._resolve_command_tokens(tool)
254
+ command_tokens = self.resolve_analyze_command_tokens(tool)
242
255
  analysis_content = self.analyzer.analyze(item, command_tokens=command_tokens)
243
256
  if analysis_content is None:
244
257
  return None