team-toon-tack 1.7.0 → 2.0.0
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.
- package/LICENSE +21 -0
- package/README.md +44 -145
- package/README.zh-TW.md +65 -451
- package/dist/scripts/done-job.js +23 -3
- package/dist/scripts/init.js +346 -15
- package/dist/scripts/lib/config-builder.d.ts +1 -1
- package/dist/scripts/lib/config-builder.js +5 -1
- package/dist/scripts/lib/display.js +14 -3
- package/dist/scripts/lib/images.d.ts +9 -0
- package/dist/scripts/lib/images.js +107 -0
- package/dist/scripts/lib/linear.d.ts +1 -1
- package/dist/scripts/lib/linear.js +2 -0
- package/dist/scripts/status.js +15 -15
- package/dist/scripts/sync.js +100 -9
- package/dist/scripts/utils.d.ts +6 -1
- package/dist/scripts/utils.js +2 -0
- package/dist/scripts/work-on.js +8 -2
- package/package.json +1 -1
- package/templates/claude-code-commands/work-on.md +12 -2
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Wei Hung
|
|
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.
|
package/README.md
CHANGED
|
@@ -2,54 +2,63 @@
|
|
|
2
2
|
|
|
3
3
|
[繁體中文](./README.zh-TW.md) | English
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Optimized Linear workflow for Claude Code — saves significant tokens compared to MCP.
|
|
6
6
|
|
|
7
|
-
##
|
|
7
|
+
## Features
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
# Short alias after global install
|
|
21
|
-
ttt <command>
|
|
22
|
-
```
|
|
9
|
+
- **Token Efficient** — Local cycle cache eliminates repeated API calls, saving significant tokens vs Linear MCP
|
|
10
|
+
- **Smart Task Selection** — Auto-pick highest priority unassigned work with `/work-on next`
|
|
11
|
+
- **Multi-team Support** — Sync and filter issues across multiple teams
|
|
12
|
+
- **Flexible Sync Modes** — Choose between remote (immediate Linear sync) or local (offline-first, sync later with `--update`)
|
|
13
|
+
- **QA/PM Team Support** — Auto-update parent issues in QA/PM team to "Testing" when completing dev tasks
|
|
14
|
+
- **Attachment Download** — Auto-download Linear images and files to local `.ttt/output/` for AI vision analysis
|
|
15
|
+
- **Blocked Status** — Set tasks as blocked when waiting on external dependencies
|
|
16
|
+
- **Auto Command Setup** — `ttt init` can install Claude Code commands with custom prefix
|
|
17
|
+
- **Cycle History** — Local `.toon` files preserve cycle data for AI context
|
|
18
|
+
- **User Filtering** — Only see issues assigned to you or unassigned
|
|
23
19
|
|
|
24
20
|
## Quick Start
|
|
25
21
|
|
|
22
|
+
### 1. Install & Initialize
|
|
23
|
+
|
|
26
24
|
```bash
|
|
27
|
-
|
|
25
|
+
npm install -g team-toon-tack
|
|
28
26
|
export LINEAR_API_KEY="lin_api_xxxxx"
|
|
29
27
|
|
|
30
|
-
# 2. Initialize in your project
|
|
31
28
|
cd your-project
|
|
32
29
|
ttt init
|
|
30
|
+
```
|
|
33
31
|
|
|
34
|
-
|
|
35
|
-
ttt sync
|
|
32
|
+
During init, you'll configure:
|
|
33
|
+
- **Status source**: `remote` (update Linear immediately) or `local` (work offline, sync with `ttt sync --update`)
|
|
34
|
+
- **QA/PM team**: For cross-team parent issue updates (parent must be set in Linear)
|
|
35
|
+
- **Claude Code commands**: Auto-install with optional prefix (e.g., `/ttt:work-on`)
|
|
36
36
|
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
### 2. Daily Workflow
|
|
38
|
+
|
|
39
|
+
In Claude Code:
|
|
40
|
+
|
|
41
|
+
```
|
|
42
|
+
/sync # Fetch all Linear issues for current cycle
|
|
43
|
+
/work-on next # Pick highest priority task & start working
|
|
44
|
+
/done-job # Complete task with AI-generated summary
|
|
39
45
|
```
|
|
40
46
|
|
|
41
|
-
|
|
47
|
+
That's it.
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## CLI Reference
|
|
42
52
|
|
|
43
53
|
### `ttt init`
|
|
44
54
|
|
|
45
|
-
Initialize configuration
|
|
55
|
+
Initialize configuration in current directory.
|
|
46
56
|
|
|
47
57
|
```bash
|
|
48
58
|
ttt init # Interactive mode
|
|
49
59
|
ttt init --user alice@example.com # Pre-select user
|
|
50
60
|
ttt init --label Frontend # Set default label
|
|
51
61
|
ttt init --force # Overwrite existing config
|
|
52
|
-
ttt init -y # Non-interactive mode
|
|
53
62
|
```
|
|
54
63
|
|
|
55
64
|
### `ttt sync`
|
|
@@ -58,7 +67,8 @@ Sync current cycle issues from Linear.
|
|
|
58
67
|
|
|
59
68
|
```bash
|
|
60
69
|
ttt sync # Sync all matching issues
|
|
61
|
-
ttt sync MP-123 # Sync
|
|
70
|
+
ttt sync MP-123 # Sync specific issue only
|
|
71
|
+
ttt sync --update # Push local status changes to Linear (for local mode)
|
|
62
72
|
```
|
|
63
73
|
|
|
64
74
|
### `ttt work-on`
|
|
@@ -90,11 +100,9 @@ ttt status # Show current in-progress task
|
|
|
90
100
|
ttt status MP-123 # Show specific issue status
|
|
91
101
|
ttt status MP-123 --set +1 # Move to next status
|
|
92
102
|
ttt status MP-123 --set done # Mark as done
|
|
93
|
-
ttt status --set
|
|
103
|
+
ttt status MP-123 --set blocked # Set as blocked (waiting on dependency)
|
|
94
104
|
```
|
|
95
105
|
|
|
96
|
-
Status options: `+1`, `-1`, `+2`, `-2`, `pending`, `in-progress`, `completed`, `blocked`, `todo`, `done`, `testing`
|
|
97
|
-
|
|
98
106
|
### `ttt config`
|
|
99
107
|
|
|
100
108
|
Configure settings.
|
|
@@ -110,130 +118,21 @@ ttt config teams # Configure multi-team selection
|
|
|
110
118
|
|
|
111
119
|
### Directory Structure
|
|
112
120
|
|
|
113
|
-
After `ttt init`, your project will have:
|
|
114
|
-
|
|
115
121
|
```
|
|
116
122
|
your-project/
|
|
117
|
-
└── .ttt/
|
|
118
|
-
├── config.toon
|
|
119
|
-
├── local.toon
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
### Custom Config Directory
|
|
124
|
-
|
|
125
|
-
```bash
|
|
126
|
-
# Use -d flag
|
|
127
|
-
ttt sync -d ./team
|
|
128
|
-
|
|
129
|
-
# Or set environment variable
|
|
130
|
-
export TOON_DIR=./team
|
|
131
|
-
ttt sync
|
|
123
|
+
└── .ttt/
|
|
124
|
+
├── config.toon # Team config (gitignore recommended)
|
|
125
|
+
├── local.toon # Personal settings (gitignore)
|
|
126
|
+
├── cycle.toon # Current cycle data (auto-generated)
|
|
127
|
+
└── output/ # Downloaded attachments (images, files)
|
|
132
128
|
```
|
|
133
129
|
|
|
134
|
-
###
|
|
135
|
-
|
|
136
|
-
Team-wide configuration (fetched from Linear):
|
|
137
|
-
|
|
138
|
-
```toon
|
|
139
|
-
teams:
|
|
140
|
-
main:
|
|
141
|
-
id: TEAM_UUID
|
|
142
|
-
name: Team Name
|
|
143
|
-
|
|
144
|
-
users:
|
|
145
|
-
alice:
|
|
146
|
-
id: USER_UUID
|
|
147
|
-
email: alice@example.com
|
|
148
|
-
displayName: Alice
|
|
149
|
-
|
|
150
|
-
labels:
|
|
151
|
-
frontend:
|
|
152
|
-
id: LABEL_UUID
|
|
153
|
-
name: Frontend
|
|
154
|
-
|
|
155
|
-
current_cycle:
|
|
156
|
-
id: CYCLE_UUID
|
|
157
|
-
name: Cycle #1
|
|
158
|
-
```
|
|
159
|
-
|
|
160
|
-
### local.toon
|
|
161
|
-
|
|
162
|
-
Personal settings:
|
|
163
|
-
|
|
164
|
-
```toon
|
|
165
|
-
current_user: alice
|
|
166
|
-
team: frontend
|
|
167
|
-
teams[2]:
|
|
168
|
-
- frontend
|
|
169
|
-
- backend
|
|
170
|
-
label: Frontend
|
|
171
|
-
exclude_labels[1]:
|
|
172
|
-
- Bug
|
|
173
|
-
exclude_assignees[1]:
|
|
174
|
-
- bob
|
|
175
|
-
```
|
|
176
|
-
|
|
177
|
-
| Field | Description |
|
|
178
|
-
|-------|-------------|
|
|
179
|
-
| `current_user` | Your user key from config.toon |
|
|
180
|
-
| `team` | Primary team key |
|
|
181
|
-
| `teams` | Multiple teams to sync (optional) |
|
|
182
|
-
| `label` | Filter issues by label (optional) |
|
|
183
|
-
| `exclude_labels` | Exclude issues with these labels (optional) |
|
|
184
|
-
| `exclude_assignees` | Hide issues from these users (optional) |
|
|
185
|
-
|
|
186
|
-
### config.toon - Status Mappings
|
|
187
|
-
|
|
188
|
-
Configure which Linear statuses map to local states:
|
|
189
|
-
|
|
190
|
-
```toon
|
|
191
|
-
status_transitions:
|
|
192
|
-
todo: Todo
|
|
193
|
-
in_progress: In Progress
|
|
194
|
-
done: Done
|
|
195
|
-
testing: Testing
|
|
196
|
-
```
|
|
197
|
-
|
|
198
|
-
Run `ttt config status` to configure interactively.
|
|
199
|
-
|
|
200
|
-
## Environment Variables
|
|
130
|
+
### Environment Variables
|
|
201
131
|
|
|
202
132
|
| Variable | Description |
|
|
203
133
|
|----------|-------------|
|
|
204
134
|
| `LINEAR_API_KEY` | **Required.** Your Linear API key |
|
|
205
|
-
| `TOON_DIR` | Config directory (default:
|
|
206
|
-
|
|
207
|
-
## Integration Examples
|
|
208
|
-
|
|
209
|
-
### With Claude Code
|
|
210
|
-
|
|
211
|
-
```yaml
|
|
212
|
-
# .claude/commands/sync.md
|
|
213
|
-
---
|
|
214
|
-
description: Sync Linear issues
|
|
215
|
-
---
|
|
216
|
-
ttt sync -d team
|
|
217
|
-
```
|
|
218
|
-
|
|
219
|
-
### As Git Submodule
|
|
220
|
-
|
|
221
|
-
```bash
|
|
222
|
-
# Add config directory as submodule
|
|
223
|
-
git submodule add https://github.com/your-org/team-config.git team
|
|
224
|
-
cd team && ttt sync
|
|
225
|
-
```
|
|
226
|
-
|
|
227
|
-
### In package.json
|
|
228
|
-
|
|
229
|
-
```json
|
|
230
|
-
{
|
|
231
|
-
"scripts": {
|
|
232
|
-
"sync": "ttt sync -d team",
|
|
233
|
-
"work": "ttt work-on -d team"
|
|
234
|
-
}
|
|
235
|
-
}
|
|
236
|
-
```
|
|
135
|
+
| `TOON_DIR` | Config directory (default: `.ttt`) |
|
|
237
136
|
|
|
238
137
|
## License
|
|
239
138
|
|