team-toon-tack 2.1.0 → 2.3.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/.claude-plugin/marketplace.json +19 -0
- package/.claude-plugin/plugin.json +18 -0
- package/README.md +52 -8
- package/README.zh-TW.md +52 -8
- package/commands/ttt-done.md +62 -0
- package/commands/ttt-get-issue.md +71 -0
- package/commands/ttt-status.md +65 -0
- package/commands/ttt-sync.md +51 -0
- package/commands/ttt-work-on.md +48 -0
- package/dist/bin/cli.js +15 -8
- package/dist/scripts/config/teams.js +1 -1
- package/dist/scripts/get-issue.d.ts +1 -0
- package/dist/scripts/get-issue.js +61 -0
- package/dist/scripts/init.js +33 -149
- package/dist/scripts/lib/config-builder.d.ts +1 -1
- package/dist/scripts/lib/sync.d.ts +8 -0
- package/dist/scripts/lib/sync.js +41 -29
- package/dist/scripts/sync.js +1 -1
- package/dist/scripts/work-on.js +1 -1
- package/package.json +5 -3
- package/skills/linear-task-manager/SKILL.md +170 -0
- package/templates/claude-code-commands/done-job.md +0 -45
- package/templates/claude-code-commands/sync-linear.md +0 -32
- package/templates/claude-code-commands/work-on.md +0 -62
- package/templates/config.example.toon +0 -37
- package/templates/local.example.toon +0 -16
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "ttt-marketplace",
|
|
3
|
+
"owner": {
|
|
4
|
+
"name": "wayne930242",
|
|
5
|
+
"email": "wayne930242@gmail.com"
|
|
6
|
+
},
|
|
7
|
+
"metadata": {
|
|
8
|
+
"description": "Linear task management tools for Claude Code - efficient workflow without MCP overhead",
|
|
9
|
+
"version": "1.0.0"
|
|
10
|
+
},
|
|
11
|
+
"plugins": [
|
|
12
|
+
{
|
|
13
|
+
"name": "team-toon-tack",
|
|
14
|
+
"source": "./",
|
|
15
|
+
"description": "Linear task sync & management CLI with commands and skills",
|
|
16
|
+
"version": "2.3.0"
|
|
17
|
+
}
|
|
18
|
+
]
|
|
19
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "team-toon-tack",
|
|
3
|
+
"description": "Linear task sync & management CLI for Claude Code - saves tokens vs MCP",
|
|
4
|
+
"version": "2.3.0",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "wayne930242",
|
|
7
|
+
"email": "wayne930242@gmail.com"
|
|
8
|
+
},
|
|
9
|
+
"repository": "https://github.com/wayne930242/team-toon-tack",
|
|
10
|
+
"license": "MIT",
|
|
11
|
+
"keywords": [
|
|
12
|
+
"claude-code",
|
|
13
|
+
"linear",
|
|
14
|
+
"task-management",
|
|
15
|
+
"workflow",
|
|
16
|
+
"productivity"
|
|
17
|
+
]
|
|
18
|
+
}
|
package/README.md
CHANGED
|
@@ -14,7 +14,7 @@ Optimized Linear workflow for Claude Code — saves significant tokens compared
|
|
|
14
14
|
- **QA Team Support** — Auto-update parent issues in QA team to "Testing" when completing dev tasks
|
|
15
15
|
- **Attachment Download** — Auto-download Linear images and files to local `.ttt/output/` for AI vision analysis
|
|
16
16
|
- **Blocked Status** — Set tasks as blocked when waiting on external dependencies
|
|
17
|
-
- **
|
|
17
|
+
- **Claude Code Plugin** — Install plugin for `/ttt-*` commands and auto-activated skills
|
|
18
18
|
- **Cycle History** — Local `.toon` files preserve cycle data for AI context
|
|
19
19
|
- **User Filtering** — Only see issues assigned to you or unassigned
|
|
20
20
|
|
|
@@ -36,7 +36,6 @@ During init, you'll configure:
|
|
|
36
36
|
- **QA team(s)**: For cross-team parent issue updates, each with its own testing status (optional)
|
|
37
37
|
- **Completion mode**: How task completion is handled (see below)
|
|
38
38
|
- **Status source**: `remote` (update Linear immediately) or `local` (work offline, sync with `ttt sync --update`)
|
|
39
|
-
- **Claude Code commands**: Auto-install with optional prefix (e.g., `/ttt:work-on`)
|
|
40
39
|
|
|
41
40
|
### Completion Modes
|
|
42
41
|
|
|
@@ -47,17 +46,30 @@ During init, you'll configure:
|
|
|
47
46
|
| `upstream_strict` | Mark task as Done + parent to Testing. Falls back to dev testing if no parent. Default when QA team configured. |
|
|
48
47
|
| `upstream_not_strict` | Mark task as Done + parent to Testing. No fallback if no parent. |
|
|
49
48
|
|
|
50
|
-
### 2.
|
|
49
|
+
### 2. Install Claude Code Plugin (Optional)
|
|
51
50
|
|
|
52
|
-
|
|
51
|
+
```
|
|
52
|
+
/plugin marketplace add wayne930242/team-toon-tack
|
|
53
|
+
/plugin install team-toon-tack@wayne930242
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### 3. Daily Workflow
|
|
57
|
+
|
|
58
|
+
In Claude Code (with plugin installed):
|
|
53
59
|
|
|
54
60
|
```
|
|
55
|
-
/sync # Fetch all Linear issues for current cycle
|
|
56
|
-
/work-on next # Pick highest priority task & start working
|
|
57
|
-
/done
|
|
61
|
+
/ttt-sync # Fetch all Linear issues for current cycle
|
|
62
|
+
/ttt-work-on next # Pick highest priority task & start working
|
|
63
|
+
/ttt-done # Complete task with AI-generated summary
|
|
58
64
|
```
|
|
59
65
|
|
|
60
|
-
|
|
66
|
+
Or using CLI directly:
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
ttt sync
|
|
70
|
+
ttt work-on next
|
|
71
|
+
ttt done -m "Completed the task"
|
|
72
|
+
```
|
|
61
73
|
|
|
62
74
|
---
|
|
63
75
|
|
|
@@ -116,6 +128,15 @@ ttt status MP-123 --set done # Mark as done
|
|
|
116
128
|
ttt status MP-123 --set blocked # Set as blocked (waiting on dependency)
|
|
117
129
|
```
|
|
118
130
|
|
|
131
|
+
### `ttt get-issue`
|
|
132
|
+
|
|
133
|
+
Fetch and display issue details from Linear.
|
|
134
|
+
|
|
135
|
+
```bash
|
|
136
|
+
ttt get-issue MP-123 # Fetch from Linear and display
|
|
137
|
+
ttt get-issue MP-123 --local # Show from local data only
|
|
138
|
+
```
|
|
139
|
+
|
|
119
140
|
### `ttt config`
|
|
120
141
|
|
|
121
142
|
Configure settings.
|
|
@@ -147,6 +168,29 @@ your-project/
|
|
|
147
168
|
| `LINEAR_API_KEY` | **Required.** Your Linear API key |
|
|
148
169
|
| `TOON_DIR` | Config directory (default: `.ttt`) |
|
|
149
170
|
|
|
171
|
+
## Claude Code Plugin
|
|
172
|
+
|
|
173
|
+
Install the plugin for Claude Code integration:
|
|
174
|
+
|
|
175
|
+
```
|
|
176
|
+
/plugin marketplace add wayne930242/team-toon-tack
|
|
177
|
+
/plugin install team-toon-tack@wayne930242
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
### Available Commands
|
|
181
|
+
|
|
182
|
+
| Command | Description |
|
|
183
|
+
|---------|-------------|
|
|
184
|
+
| `/ttt-sync` | Sync Linear issues to local cycle data |
|
|
185
|
+
| `/ttt-work-on` | Start working on a task |
|
|
186
|
+
| `/ttt-done` | Mark current task as completed |
|
|
187
|
+
| `/ttt-status` | Show or modify task status |
|
|
188
|
+
| `/ttt-get-issue` | Fetch and display issue details |
|
|
189
|
+
|
|
190
|
+
### Auto-Activated Skill
|
|
191
|
+
|
|
192
|
+
The plugin includes a `linear-task-manager` skill that automatically activates when working with Linear tasks, providing workflow guidance and best practices.
|
|
193
|
+
|
|
150
194
|
## License
|
|
151
195
|
|
|
152
196
|
MIT
|
package/README.zh-TW.md
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
- **QA 團隊支援** — 完成開發任務時自動將 QA 團隊的 parent issue 更新為「Testing」
|
|
15
15
|
- **附件下載** — 自動下載 Linear 圖片和檔案到本地 `.ttt/output/`,供 AI 視覺分析
|
|
16
16
|
- **阻塞狀態** — 等待外部依賴時可設定任務為 blocked
|
|
17
|
-
-
|
|
17
|
+
- **Claude Code Plugin** — 安裝 plugin 即可使用 `/ttt-*` 指令和自動啟用的技能
|
|
18
18
|
- **Cycle 歷史保存** — 本地 `.toon` 檔案保留 cycle 資料,方便 AI 檢閱
|
|
19
19
|
- **使用者過濾** — 只顯示指派給你或未指派的工作
|
|
20
20
|
|
|
@@ -36,7 +36,6 @@ ttt init
|
|
|
36
36
|
- **QA 團隊**:跨團隊 parent issue 更新,各自設定 testing 狀態(可選)
|
|
37
37
|
- **完成模式**:任務完成時的處理方式(見下方說明)
|
|
38
38
|
- **狀態來源**:`remote`(即時更新 Linear)或 `local`(離線工作,用 `ttt sync --update` 同步)
|
|
39
|
-
- **Claude Code commands**:自動安裝,可選前綴(如 `/ttt:work-on`)
|
|
40
39
|
|
|
41
40
|
### 完成模式
|
|
42
41
|
|
|
@@ -47,17 +46,30 @@ ttt init
|
|
|
47
46
|
| `upstream_strict` | 任務標記為 Done,parent 移動到 Testing。若無 parent,fallback 到開發團隊的 testing 狀態。設定 QA 團隊時的預設值。 |
|
|
48
47
|
| `upstream_not_strict` | 任務標記為 Done,parent 移動到 Testing。若無 parent 不做 fallback。 |
|
|
49
48
|
|
|
50
|
-
### 2.
|
|
49
|
+
### 2. 安裝 Claude Code Plugin(選擇性)
|
|
51
50
|
|
|
52
|
-
|
|
51
|
+
```
|
|
52
|
+
/plugin marketplace add wayne930242/team-toon-tack
|
|
53
|
+
/plugin install team-toon-tack@wayne930242
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### 3. 每日工作流
|
|
57
|
+
|
|
58
|
+
在 Claude Code 中(安裝 plugin 後):
|
|
53
59
|
|
|
54
60
|
```
|
|
55
|
-
/sync # 從 Linear 取得當前 cycle 所有 issue
|
|
56
|
-
/work-on next # 挑選最高優先級任務並開始工作
|
|
57
|
-
/done
|
|
61
|
+
/ttt-sync # 從 Linear 取得當前 cycle 所有 issue
|
|
62
|
+
/ttt-work-on next # 挑選最高優先級任務並開始工作
|
|
63
|
+
/ttt-done # 完成任務,附上 AI 生成的摘要
|
|
58
64
|
```
|
|
59
65
|
|
|
60
|
-
|
|
66
|
+
或直接使用 CLI:
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
ttt sync
|
|
70
|
+
ttt work-on next
|
|
71
|
+
ttt done -m "完成任務"
|
|
72
|
+
```
|
|
61
73
|
|
|
62
74
|
---
|
|
63
75
|
|
|
@@ -116,6 +128,15 @@ ttt status MP-123 --set done # 標記為完成
|
|
|
116
128
|
ttt status MP-123 --set blocked # 設為阻塞(等待外部依賴)
|
|
117
129
|
```
|
|
118
130
|
|
|
131
|
+
### `ttt get-issue`
|
|
132
|
+
|
|
133
|
+
從 Linear 取得並顯示 issue 詳細資訊。
|
|
134
|
+
|
|
135
|
+
```bash
|
|
136
|
+
ttt get-issue MP-123 # 從 Linear 取得並顯示
|
|
137
|
+
ttt get-issue MP-123 --local # 只從本地資料顯示
|
|
138
|
+
```
|
|
139
|
+
|
|
119
140
|
### `ttt config`
|
|
120
141
|
|
|
121
142
|
配置設定。
|
|
@@ -147,6 +168,29 @@ your-project/
|
|
|
147
168
|
| `LINEAR_API_KEY` | **必填**。你的 Linear API 金鑰 |
|
|
148
169
|
| `TOON_DIR` | 配置目錄(預設:`.ttt`) |
|
|
149
170
|
|
|
171
|
+
## Claude Code Plugin
|
|
172
|
+
|
|
173
|
+
安裝 plugin 以整合 Claude Code:
|
|
174
|
+
|
|
175
|
+
```
|
|
176
|
+
/plugin marketplace add wayne930242/team-toon-tack
|
|
177
|
+
/plugin install team-toon-tack@wayne930242
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
### 可用指令
|
|
181
|
+
|
|
182
|
+
| 指令 | 說明 |
|
|
183
|
+
|------|------|
|
|
184
|
+
| `/ttt-sync` | 同步 Linear issue 到本地 |
|
|
185
|
+
| `/ttt-work-on` | 開始處理任務 |
|
|
186
|
+
| `/ttt-done` | 標記當前任務完成 |
|
|
187
|
+
| `/ttt-status` | 顯示或修改任務狀態 |
|
|
188
|
+
| `/ttt-get-issue` | 取得並顯示 issue 詳情 |
|
|
189
|
+
|
|
190
|
+
### 自動啟用技能
|
|
191
|
+
|
|
192
|
+
Plugin 包含 `linear-task-manager` 技能,在處理 Linear 任務時會自動啟用,提供工作流程指導和最佳實踐。
|
|
193
|
+
|
|
150
194
|
## 授權
|
|
151
195
|
|
|
152
196
|
MIT
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ttt-done
|
|
3
|
+
description: Mark current task as completed
|
|
4
|
+
arguments:
|
|
5
|
+
- name: issue-id
|
|
6
|
+
description: Optional issue ID if multiple tasks in progress
|
|
7
|
+
required: false
|
|
8
|
+
- name: message
|
|
9
|
+
description: Completion message (use -m flag)
|
|
10
|
+
required: false
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# TTT Done Command
|
|
14
|
+
|
|
15
|
+
Mark the current in-progress task as completed.
|
|
16
|
+
|
|
17
|
+
## Usage
|
|
18
|
+
|
|
19
|
+
### Auto-Select (single in-progress task)
|
|
20
|
+
```bash
|
|
21
|
+
ttt done
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
### Specific Issue
|
|
25
|
+
If `issue-id` is provided:
|
|
26
|
+
```bash
|
|
27
|
+
ttt done {{ issue-id }}
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
### With Completion Message
|
|
31
|
+
If `message` is provided:
|
|
32
|
+
```bash
|
|
33
|
+
ttt done -m "{{ message }}"
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### Combined
|
|
37
|
+
```bash
|
|
38
|
+
ttt done {{ issue-id }} -m "{{ message }}"
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## What This Does
|
|
42
|
+
|
|
43
|
+
Based on configured completion mode:
|
|
44
|
+
|
|
45
|
+
| Mode | Behavior |
|
|
46
|
+
|------|----------|
|
|
47
|
+
| `simple` | Task → Done, Parent → Done |
|
|
48
|
+
| `strict_review` | Task → Testing, Parent → QA Testing |
|
|
49
|
+
| `upstream_strict` | Task → Done, Parent → Testing |
|
|
50
|
+
| `upstream_not_strict` | Task → Done, Parent → Testing (no fallback) |
|
|
51
|
+
|
|
52
|
+
Also:
|
|
53
|
+
1. Gets latest git commit info
|
|
54
|
+
2. Adds completion comment to Linear with commit details
|
|
55
|
+
3. Syncs task back from Linear to update local status
|
|
56
|
+
|
|
57
|
+
## Before Running
|
|
58
|
+
|
|
59
|
+
Ensure you have:
|
|
60
|
+
1. Committed your changes with a meaningful message
|
|
61
|
+
2. Run tests and lint checks
|
|
62
|
+
3. Pushed to remote branch (if applicable)
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ttt-get-issue
|
|
3
|
+
description: Fetch and display issue details from Linear
|
|
4
|
+
arguments:
|
|
5
|
+
- name: issue-id
|
|
6
|
+
description: Issue ID to fetch (e.g., MP-624)
|
|
7
|
+
required: true
|
|
8
|
+
- name: local
|
|
9
|
+
description: Only show from local data (add --local flag)
|
|
10
|
+
required: false
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# TTT Get-Issue Command
|
|
14
|
+
|
|
15
|
+
Fetch and display full issue details from Linear.
|
|
16
|
+
|
|
17
|
+
## Usage
|
|
18
|
+
|
|
19
|
+
### Fetch from Linear
|
|
20
|
+
```bash
|
|
21
|
+
ttt get-issue {{ issue-id }}
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
### Show from Local Data Only
|
|
25
|
+
If `local` is "true" or "--local":
|
|
26
|
+
```bash
|
|
27
|
+
ttt get-issue {{ issue-id }} --local
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## What This Does
|
|
31
|
+
|
|
32
|
+
1. Fetches full issue details from Linear API (or local cache if --local)
|
|
33
|
+
2. Displays comprehensive information:
|
|
34
|
+
- Title and description
|
|
35
|
+
- Status (both Linear and local)
|
|
36
|
+
- Priority level
|
|
37
|
+
- Labels
|
|
38
|
+
- Assignee
|
|
39
|
+
- Branch name
|
|
40
|
+
- Parent issue (if subtask)
|
|
41
|
+
- Attachments with local paths
|
|
42
|
+
- Comments with timestamps
|
|
43
|
+
|
|
44
|
+
## Use Cases
|
|
45
|
+
|
|
46
|
+
- Review issue details before starting work
|
|
47
|
+
- Check requirements and acceptance criteria
|
|
48
|
+
- View attachments and mockups
|
|
49
|
+
- Read comment history and discussions
|
|
50
|
+
- Verify issue status without full sync
|
|
51
|
+
|
|
52
|
+
## Output Format
|
|
53
|
+
|
|
54
|
+
```
|
|
55
|
+
📋 MP-624: Issue Title
|
|
56
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
57
|
+
Status: In Progress | Local: in-progress
|
|
58
|
+
Priority: 🔴 Urgent
|
|
59
|
+
Labels: frontend, bug
|
|
60
|
+
Assignee: developer@example.com
|
|
61
|
+
Branch: feature/mp-624-fix-bug
|
|
62
|
+
|
|
63
|
+
Description:
|
|
64
|
+
[Full description content]
|
|
65
|
+
|
|
66
|
+
Attachments:
|
|
67
|
+
- screenshot.png (local: .ttt/output/MP-624/...)
|
|
68
|
+
|
|
69
|
+
Comments:
|
|
70
|
+
[Comment history]
|
|
71
|
+
```
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ttt-status
|
|
3
|
+
description: Show or modify task status
|
|
4
|
+
arguments:
|
|
5
|
+
- name: issue-id
|
|
6
|
+
description: Issue ID to check/modify (omit for current in-progress task)
|
|
7
|
+
required: false
|
|
8
|
+
- name: set
|
|
9
|
+
description: New status to set (+1, -1, pending, in-progress, completed, blocked, done)
|
|
10
|
+
required: false
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# TTT Status Command
|
|
14
|
+
|
|
15
|
+
Show or modify the status of a task.
|
|
16
|
+
|
|
17
|
+
## Usage
|
|
18
|
+
|
|
19
|
+
### Show Current In-Progress Task
|
|
20
|
+
```bash
|
|
21
|
+
ttt status
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
### Show Specific Issue
|
|
25
|
+
If `issue-id` is provided:
|
|
26
|
+
```bash
|
|
27
|
+
ttt status {{ issue-id }}
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
### Set Status
|
|
31
|
+
If `set` is provided:
|
|
32
|
+
```bash
|
|
33
|
+
ttt status {{ issue-id }} --set {{ set }}
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Status Values
|
|
37
|
+
|
|
38
|
+
| Value | Description |
|
|
39
|
+
|-------|-------------|
|
|
40
|
+
| `+1` | Move to next status (pending → in-progress → completed) |
|
|
41
|
+
| `-1` | Move to previous status |
|
|
42
|
+
| `+2` | Skip two statuses forward |
|
|
43
|
+
| `-2` | Skip two statuses backward |
|
|
44
|
+
| `pending` | Set to pending |
|
|
45
|
+
| `in-progress` | Set to in-progress |
|
|
46
|
+
| `completed` | Set to completed |
|
|
47
|
+
| `blocked` | Set to blocked (waiting on dependency) |
|
|
48
|
+
| `todo` | Set Linear to Todo status |
|
|
49
|
+
| `done` | Set Linear to Done status |
|
|
50
|
+
|
|
51
|
+
## Examples
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
ttt status MP-624 --set +1 # Move to next status
|
|
55
|
+
ttt status MP-624 --set blocked # Mark as blocked
|
|
56
|
+
ttt status --set pending # Reset current task
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Output
|
|
60
|
+
|
|
61
|
+
Displays:
|
|
62
|
+
- Task ID and title
|
|
63
|
+
- Local status vs Linear status
|
|
64
|
+
- Priority and labels
|
|
65
|
+
- Assignee information
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ttt-sync
|
|
3
|
+
description: Sync Linear issues to local cycle data
|
|
4
|
+
arguments:
|
|
5
|
+
- name: issue-id
|
|
6
|
+
description: Optional specific issue ID to sync (e.g., MP-624)
|
|
7
|
+
required: false
|
|
8
|
+
- name: update
|
|
9
|
+
description: Push local status changes to Linear (add --update flag)
|
|
10
|
+
required: false
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# TTT Sync Command
|
|
14
|
+
|
|
15
|
+
Sync issues from Linear to local `.ttt/cycle.toon` file.
|
|
16
|
+
|
|
17
|
+
## Usage
|
|
18
|
+
|
|
19
|
+
Run the sync command based on arguments provided:
|
|
20
|
+
|
|
21
|
+
### Default Sync (all matching issues)
|
|
22
|
+
```bash
|
|
23
|
+
ttt sync
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
### Sync Specific Issue
|
|
27
|
+
If `issue-id` is provided:
|
|
28
|
+
```bash
|
|
29
|
+
ttt sync {{ issue-id }}
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
### Push Local Changes
|
|
33
|
+
If `update` is "true" or "--update":
|
|
34
|
+
```bash
|
|
35
|
+
ttt sync --update
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## What This Does
|
|
39
|
+
|
|
40
|
+
1. Fetches active cycle from Linear
|
|
41
|
+
2. Downloads all issues matching configured filters (team, status, labels)
|
|
42
|
+
3. Preserves local status for existing tasks
|
|
43
|
+
4. Downloads Linear images to `.ttt/output/`
|
|
44
|
+
5. Updates `cycle.toon` with fresh data
|
|
45
|
+
|
|
46
|
+
## Output
|
|
47
|
+
|
|
48
|
+
After running, report:
|
|
49
|
+
- Number of tasks synced
|
|
50
|
+
- Current cycle name
|
|
51
|
+
- Any status updates pushed to Linear (if --update used)
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ttt-work-on
|
|
3
|
+
description: Start working on a Linear task
|
|
4
|
+
arguments:
|
|
5
|
+
- name: issue-id
|
|
6
|
+
description: Issue ID (e.g., MP-624), 'next' for auto-select, or omit for interactive
|
|
7
|
+
required: false
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# TTT Work-On Command
|
|
11
|
+
|
|
12
|
+
Start working on a task from the current cycle.
|
|
13
|
+
|
|
14
|
+
## Usage
|
|
15
|
+
|
|
16
|
+
### Interactive Selection
|
|
17
|
+
```bash
|
|
18
|
+
ttt work-on
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
### Specific Issue
|
|
22
|
+
If `issue-id` is provided (e.g., MP-624):
|
|
23
|
+
```bash
|
|
24
|
+
ttt work-on {{ issue-id }}
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### Auto-Select Highest Priority
|
|
28
|
+
If `issue-id` is "next":
|
|
29
|
+
```bash
|
|
30
|
+
ttt work-on next
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## What This Does
|
|
34
|
+
|
|
35
|
+
1. Marks the task as `in-progress` locally
|
|
36
|
+
2. Updates Linear status to "In Progress" (if status_source is remote)
|
|
37
|
+
3. Displays full task details including:
|
|
38
|
+
- Title and description
|
|
39
|
+
- Priority and labels
|
|
40
|
+
- Attachments and comments
|
|
41
|
+
- Branch name for checkout
|
|
42
|
+
|
|
43
|
+
## After Running
|
|
44
|
+
|
|
45
|
+
1. Read the task description and requirements
|
|
46
|
+
2. Check out the suggested branch: `git checkout -b <branch-name>`
|
|
47
|
+
3. Run type-check and lint before starting: `bun type-check && bun lint`
|
|
48
|
+
4. Begin implementation
|
package/dist/bin/cli.js
CHANGED
|
@@ -12,6 +12,7 @@ const COMMANDS = [
|
|
|
12
12
|
"work-on",
|
|
13
13
|
"done",
|
|
14
14
|
"status",
|
|
15
|
+
"get-issue",
|
|
15
16
|
"config",
|
|
16
17
|
"help",
|
|
17
18
|
"version",
|
|
@@ -24,14 +25,15 @@ USAGE:
|
|
|
24
25
|
ttt <command> [options]
|
|
25
26
|
|
|
26
27
|
COMMANDS:
|
|
27
|
-
init
|
|
28
|
-
sync
|
|
29
|
-
work-on
|
|
30
|
-
done
|
|
31
|
-
status
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
28
|
+
init Initialize config files in current directory
|
|
29
|
+
sync Sync issues from Linear to local cycle.ttt
|
|
30
|
+
work-on Start working on a task (interactive or by ID)
|
|
31
|
+
done Mark current task as completed
|
|
32
|
+
status Show or modify task status
|
|
33
|
+
get-issue Fetch and display issue details from Linear
|
|
34
|
+
config Configure settings (status mappings, filters)
|
|
35
|
+
help Show this help message
|
|
36
|
+
version Show version
|
|
35
37
|
|
|
36
38
|
GLOBAL OPTIONS:
|
|
37
39
|
-d, --dir <path> Config directory (default: .ttt)
|
|
@@ -46,6 +48,7 @@ EXAMPLES:
|
|
|
46
48
|
ttt work-on next # Auto-select highest priority
|
|
47
49
|
ttt done # Complete current task
|
|
48
50
|
ttt done -m "Fixed the bug" # With completion message
|
|
51
|
+
ttt get-issue MP-123 # Fetch issue details from Linear
|
|
49
52
|
|
|
50
53
|
ENVIRONMENT:
|
|
51
54
|
LINEAR_API_KEY Required. Your Linear API key
|
|
@@ -117,6 +120,10 @@ async function main() {
|
|
|
117
120
|
process.argv = ["node", "status.js", ...commandArgs];
|
|
118
121
|
await import(`${scriptDir}status.js`);
|
|
119
122
|
break;
|
|
123
|
+
case "get-issue":
|
|
124
|
+
process.argv = ["node", "get-issue.js", ...commandArgs];
|
|
125
|
+
await import(`${scriptDir}get-issue.js`);
|
|
126
|
+
break;
|
|
120
127
|
case "config":
|
|
121
128
|
process.argv = ["node", "config.js", ...commandArgs];
|
|
122
129
|
await import(`${scriptDir}config.js`);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import prompts from "prompts";
|
|
2
|
-
import { getLinearClient, saveLocalConfig, } from "../utils.js";
|
|
3
2
|
import { getDefaultStatusTransitions } from "../lib/config-builder.js";
|
|
3
|
+
import { getLinearClient, saveLocalConfig, } from "../utils.js";
|
|
4
4
|
export async function configureTeams(_config, localConfig) {
|
|
5
5
|
console.log("👥 Configure Teams\n");
|
|
6
6
|
const client = getLinearClient();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { displayTaskFull } from "./lib/display.js";
|
|
2
|
+
import { fetchIssueDetail } from "./lib/sync.js";
|
|
3
|
+
import { loadCycleData } from "./utils.js";
|
|
4
|
+
async function getIssue() {
|
|
5
|
+
const args = process.argv.slice(2);
|
|
6
|
+
if (args.includes("--help") || args.includes("-h")) {
|
|
7
|
+
console.log(`Usage: ttt get-issue <issue-id> [--local]
|
|
8
|
+
|
|
9
|
+
Fetch and display issue details from Linear.
|
|
10
|
+
|
|
11
|
+
Arguments:
|
|
12
|
+
issue-id Issue ID (e.g., MP-624). Required.
|
|
13
|
+
|
|
14
|
+
Options:
|
|
15
|
+
--local Only show from local cycle data, don't fetch from Linear
|
|
16
|
+
|
|
17
|
+
Examples:
|
|
18
|
+
ttt get-issue MP-624 # Fetch from Linear and display
|
|
19
|
+
ttt get-issue MP-624 --local # Show from local data only`);
|
|
20
|
+
process.exit(0);
|
|
21
|
+
}
|
|
22
|
+
const localOnly = args.includes("--local");
|
|
23
|
+
const issueId = args.find((arg) => !arg.startsWith("-"));
|
|
24
|
+
if (!issueId) {
|
|
25
|
+
console.error("Issue ID is required.");
|
|
26
|
+
console.error("Usage: ttt get-issue <issue-id>");
|
|
27
|
+
process.exit(1);
|
|
28
|
+
}
|
|
29
|
+
// If local only, get from cycle data
|
|
30
|
+
if (localOnly) {
|
|
31
|
+
const data = await loadCycleData();
|
|
32
|
+
if (!data) {
|
|
33
|
+
console.error("No cycle data found. Run ttt sync first.");
|
|
34
|
+
process.exit(1);
|
|
35
|
+
}
|
|
36
|
+
const task = data.tasks.find((t) => t.id === issueId || t.id === `MP-${issueId}`);
|
|
37
|
+
if (!task) {
|
|
38
|
+
console.error(`Issue ${issueId} not found in local data.`);
|
|
39
|
+
process.exit(1);
|
|
40
|
+
}
|
|
41
|
+
displayTaskFull(task, "📋");
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
// Fetch from Linear
|
|
45
|
+
console.log(`Fetching ${issueId} from Linear...`);
|
|
46
|
+
const task = await fetchIssueDetail(issueId);
|
|
47
|
+
if (!task) {
|
|
48
|
+
console.error(`Issue ${issueId} not found in Linear.`);
|
|
49
|
+
process.exit(1);
|
|
50
|
+
}
|
|
51
|
+
// Check local data for local status
|
|
52
|
+
const data = await loadCycleData();
|
|
53
|
+
if (data) {
|
|
54
|
+
const localTask = data.tasks.find((t) => t.id === issueId);
|
|
55
|
+
if (localTask) {
|
|
56
|
+
task.localStatus = localTask.localStatus;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
displayTaskFull(task, "📋");
|
|
60
|
+
}
|
|
61
|
+
getIssue().catch(console.error);
|