@mindfoldhq/trellis 0.1.8 → 0.2.1
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/dist/cli/index.js +2 -0
- package/dist/cli/index.js.map +1 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +12 -6
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/update.d.ts +1 -0
- package/dist/commands/update.d.ts.map +1 -1
- package/dist/commands/update.js +669 -38
- package/dist/commands/update.js.map +1 -1
- package/dist/configurators/opencode.js +1 -1
- package/dist/configurators/opencode.js.map +1 -1
- package/dist/configurators/workflow.d.ts +4 -3
- package/dist/configurators/workflow.d.ts.map +1 -1
- package/dist/configurators/workflow.js +23 -20
- package/dist/configurators/workflow.js.map +1 -1
- package/dist/constants/paths.d.ts +29 -30
- package/dist/constants/paths.d.ts.map +1 -1
- package/dist/constants/paths.js +32 -35
- package/dist/constants/paths.js.map +1 -1
- package/dist/migrations/index.d.ts +35 -0
- package/dist/migrations/index.d.ts.map +1 -0
- package/dist/migrations/index.js +124 -0
- package/dist/migrations/index.js.map +1 -0
- package/dist/migrations/manifests/0.1.9.json +30 -0
- package/dist/migrations/manifests/0.2.0.json +43 -0
- package/dist/templates/claude/agents/check.md +3 -3
- package/dist/templates/claude/agents/debug.md +1 -1
- package/dist/templates/claude/agents/dispatch.md +12 -12
- package/dist/templates/claude/agents/implement.md +6 -6
- package/dist/templates/claude/agents/plan.md +37 -37
- package/dist/templates/claude/agents/research.md +1 -1
- package/dist/templates/claude/commands/before-backend-dev.md +5 -5
- package/dist/templates/claude/commands/before-frontend-dev.md +5 -5
- package/dist/templates/claude/commands/break-loop.md +2 -2
- package/dist/templates/claude/commands/check-backend.md +6 -6
- package/dist/templates/claude/commands/check-cross-layer.md +5 -5
- package/dist/templates/claude/commands/check-frontend.md +6 -6
- package/dist/templates/claude/commands/create-command.md +3 -3
- package/dist/templates/claude/commands/finish-work.md +6 -6
- package/dist/templates/claude/commands/integrate-skill.md +11 -11
- package/dist/templates/claude/commands/{onboard-developer.md → onboard.md} +31 -28
- package/dist/templates/claude/commands/parallel.md +17 -17
- package/dist/templates/{cursor/commands/record-agent-flow.md → claude/commands/record-session.md} +7 -7
- package/dist/templates/claude/commands/start.md +184 -96
- package/dist/templates/claude/hooks/inject-subagent-context.py +77 -76
- package/dist/templates/claude/hooks/ralph-loop.py +18 -18
- package/dist/templates/claude/hooks/session-start.py +124 -0
- package/dist/templates/claude/settings.json +14 -1
- package/dist/templates/cursor/commands/before-backend-dev.md +5 -5
- package/dist/templates/cursor/commands/before-frontend-dev.md +5 -5
- package/dist/templates/cursor/commands/break-loop.md +2 -2
- package/dist/templates/cursor/commands/check-backend.md +6 -6
- package/dist/templates/cursor/commands/check-cross-layer.md +5 -5
- package/dist/templates/cursor/commands/check-frontend.md +6 -6
- package/dist/templates/cursor/commands/create-command.md +3 -3
- package/dist/templates/cursor/commands/finish-work.md +6 -6
- package/dist/templates/cursor/commands/integrate-skill.md +11 -11
- package/dist/templates/cursor/commands/{onboard-developer.md → onboard.md} +31 -28
- package/dist/templates/{claude/commands/record-agent-flow.md → cursor/commands/record-session.md} +7 -7
- package/dist/templates/cursor/commands/start.md +25 -25
- package/dist/templates/extract.d.ts +2 -2
- package/dist/templates/extract.js +2 -2
- package/dist/templates/markdown/agents.md +2 -2
- package/dist/templates/markdown/gitignore.txt +2 -2
- package/dist/templates/markdown/index.d.ts +1 -0
- package/dist/templates/markdown/index.d.ts.map +1 -1
- package/dist/templates/markdown/index.js +4 -2
- package/dist/templates/markdown/index.js.map +1 -1
- package/dist/templates/markdown/{agent-traces-index.md → workspace-index.md} +14 -14
- package/dist/templates/trellis/index.d.ts +7 -1
- package/dist/templates/trellis/index.d.ts.map +1 -1
- package/dist/templates/trellis/index.js +14 -2
- package/dist/templates/trellis/index.js.map +1 -1
- package/dist/templates/trellis/scripts/add-session.sh +26 -26
- package/dist/templates/trellis/scripts/common/developer.sh +20 -21
- package/dist/templates/trellis/scripts/common/git-context.sh +90 -115
- package/dist/templates/trellis/scripts/common/paths.sh +53 -63
- package/dist/templates/trellis/scripts/common/phase.sh +40 -40
- package/dist/templates/trellis/scripts/common/registry.sh +13 -13
- package/dist/templates/trellis/scripts/common/task-queue.sh +142 -0
- package/dist/templates/trellis/scripts/common/task-utils.sh +151 -0
- package/dist/templates/trellis/scripts/common/worktree.sh +3 -3
- package/dist/templates/trellis/scripts/create-bootstrap.sh +43 -42
- package/dist/templates/trellis/scripts/init-developer.sh +1 -1
- package/dist/templates/trellis/scripts/multi-agent/cleanup.sh +33 -33
- package/dist/templates/trellis/scripts/multi-agent/create-pr.sh +31 -31
- package/dist/templates/trellis/scripts/multi-agent/plan.sh +30 -56
- package/dist/templates/trellis/scripts/multi-agent/start.sh +59 -70
- package/dist/templates/trellis/scripts/multi-agent/status.sh +59 -59
- package/dist/templates/trellis/scripts/{feature.sh → task.sh} +236 -186
- package/dist/templates/trellis/workflow.md +71 -74
- package/dist/types/migration.d.ts +74 -0
- package/dist/types/migration.d.ts.map +1 -0
- package/dist/types/migration.js +8 -0
- package/dist/types/migration.js.map +1 -0
- package/dist/utils/template-hash.d.ts +78 -0
- package/dist/utils/template-hash.d.ts.map +1 -0
- package/dist/utils/template-hash.js +234 -0
- package/dist/utils/template-hash.js.map +1 -0
- package/package.json +1 -1
- package/README.md +0 -818
- package/dist/templates/trellis/scripts/common/backlog.sh +0 -220
- package/dist/templates/trellis/scripts/common/feature-utils.sh +0 -194
- /package/dist/templates/trellis/{backlog → tasks}/.gitkeep +0 -0
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
#!/bin/bash
|
|
2
|
-
#
|
|
2
|
+
# Task Management Script for Multi-Agent Pipeline
|
|
3
3
|
#
|
|
4
4
|
# Usage:
|
|
5
|
-
# ./.trellis/scripts/
|
|
6
|
-
# ./.trellis/scripts/
|
|
7
|
-
# ./.trellis/scripts/
|
|
8
|
-
# ./.trellis/scripts/
|
|
9
|
-
# ./.trellis/scripts/
|
|
10
|
-
# ./.trellis/scripts/
|
|
11
|
-
# ./.trellis/scripts/
|
|
12
|
-
# ./.trellis/scripts/
|
|
13
|
-
# ./.trellis/scripts/
|
|
14
|
-
# ./.trellis/scripts/
|
|
15
|
-
# ./.trellis/scripts/
|
|
16
|
-
# ./.trellis/scripts/
|
|
17
|
-
# ./.trellis/scripts/
|
|
5
|
+
# ./.trellis/scripts/task.sh create "<title>" [--slug <name>] [--assignee <dev>] [--priority P0|P1|P2|P3]
|
|
6
|
+
# ./.trellis/scripts/task.sh init-context <dir> <type> # Initialize jsonl files
|
|
7
|
+
# ./.trellis/scripts/task.sh add-context <dir> <file> <path> [reason] # Add jsonl entry
|
|
8
|
+
# ./.trellis/scripts/task.sh validate <dir> # Validate jsonl files
|
|
9
|
+
# ./.trellis/scripts/task.sh list-context <dir> # List jsonl entries
|
|
10
|
+
# ./.trellis/scripts/task.sh start <dir> # Set as current task
|
|
11
|
+
# ./.trellis/scripts/task.sh finish # Clear current task
|
|
12
|
+
# ./.trellis/scripts/task.sh set-branch <dir> <branch> # Set git branch
|
|
13
|
+
# ./.trellis/scripts/task.sh set-scope <dir> <scope> # Set scope for PR title
|
|
14
|
+
# ./.trellis/scripts/task.sh create-pr [dir] [--dry-run] # Create PR from task
|
|
15
|
+
# ./.trellis/scripts/task.sh archive <task-name> # Archive completed task
|
|
16
|
+
# ./.trellis/scripts/task.sh list # List active tasks
|
|
17
|
+
# ./.trellis/scripts/task.sh list-archive [month] # List archived tasks
|
|
18
18
|
#
|
|
19
|
-
#
|
|
20
|
-
#
|
|
21
|
-
# ├──
|
|
22
|
-
# │ ├──
|
|
19
|
+
# Task Directory Structure:
|
|
20
|
+
# tasks/
|
|
21
|
+
# ├── 01-21-my-task/
|
|
22
|
+
# │ ├── task.json # Metadata
|
|
23
23
|
# │ ├── prd.md # Requirements
|
|
24
24
|
# │ ├── info.md # Technical design (optional)
|
|
25
25
|
# │ ├── implement.jsonl # Implement agent context
|
|
@@ -27,15 +27,15 @@
|
|
|
27
27
|
# │ └── debug.jsonl # Debug agent context
|
|
28
28
|
# └── archive/
|
|
29
29
|
# └── 2026-01/
|
|
30
|
-
# └──
|
|
30
|
+
# └── 01-21-old-task/
|
|
31
31
|
|
|
32
32
|
set -e
|
|
33
33
|
|
|
34
34
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
35
35
|
source "$SCRIPT_DIR/common/paths.sh"
|
|
36
36
|
source "$SCRIPT_DIR/common/developer.sh"
|
|
37
|
-
source "$SCRIPT_DIR/common/
|
|
38
|
-
source "$SCRIPT_DIR/common/
|
|
37
|
+
source "$SCRIPT_DIR/common/task-queue.sh"
|
|
38
|
+
source "$SCRIPT_DIR/common/task-utils.sh"
|
|
39
39
|
|
|
40
40
|
# Colors
|
|
41
41
|
RED='\033[0;31m'
|
|
@@ -47,6 +47,16 @@ NC='\033[0m'
|
|
|
47
47
|
|
|
48
48
|
REPO_ROOT=$(get_repo_root)
|
|
49
49
|
|
|
50
|
+
# =============================================================================
|
|
51
|
+
# Helper Functions
|
|
52
|
+
# =============================================================================
|
|
53
|
+
|
|
54
|
+
# Convert title to slug (only works with ASCII)
|
|
55
|
+
_slugify() {
|
|
56
|
+
local result=$(echo "$1" | tr '[:upper:]' '[:lower:]' | sed 's/[^a-z0-9]/-/g' | sed 's/--*/-/g' | sed 's/^-//' | sed 's/-$//')
|
|
57
|
+
echo "$result"
|
|
58
|
+
}
|
|
59
|
+
|
|
50
60
|
# =============================================================================
|
|
51
61
|
# jsonl Default Content Generators
|
|
52
62
|
# =============================================================================
|
|
@@ -54,22 +64,22 @@ REPO_ROOT=$(get_repo_root)
|
|
|
54
64
|
get_implement_base() {
|
|
55
65
|
cat << EOF
|
|
56
66
|
{"file": "$DIR_WORKFLOW/workflow.md", "reason": "Project workflow and conventions"}
|
|
57
|
-
{"file": "$DIR_WORKFLOW/$
|
|
67
|
+
{"file": "$DIR_WORKFLOW/$DIR_SPEC/shared/index.md", "reason": "Shared coding standards"}
|
|
58
68
|
EOF
|
|
59
69
|
}
|
|
60
70
|
|
|
61
71
|
get_implement_backend() {
|
|
62
72
|
cat << EOF
|
|
63
|
-
{"file": "$DIR_WORKFLOW/$
|
|
64
|
-
{"file": "$DIR_WORKFLOW/$
|
|
65
|
-
{"file": "$DIR_WORKFLOW/$
|
|
73
|
+
{"file": "$DIR_WORKFLOW/$DIR_SPEC/backend/index.md", "reason": "Backend development guide"}
|
|
74
|
+
{"file": "$DIR_WORKFLOW/$DIR_SPEC/backend/api-module.md", "reason": "API module conventions"}
|
|
75
|
+
{"file": "$DIR_WORKFLOW/$DIR_SPEC/backend/quality.md", "reason": "Code quality requirements"}
|
|
66
76
|
EOF
|
|
67
77
|
}
|
|
68
78
|
|
|
69
79
|
get_implement_frontend() {
|
|
70
80
|
cat << EOF
|
|
71
|
-
{"file": "$DIR_WORKFLOW/$
|
|
72
|
-
{"file": "$DIR_WORKFLOW/$
|
|
81
|
+
{"file": "$DIR_WORKFLOW/$DIR_SPEC/frontend/index.md", "reason": "Frontend development guide"}
|
|
82
|
+
{"file": "$DIR_WORKFLOW/$DIR_SPEC/frontend/components.md", "reason": "Component conventions"}
|
|
73
83
|
EOF
|
|
74
84
|
}
|
|
75
85
|
|
|
@@ -78,7 +88,7 @@ get_check_context() {
|
|
|
78
88
|
|
|
79
89
|
cat << EOF
|
|
80
90
|
{"file": ".claude/commands/finish-work.md", "reason": "Finish work checklist"}
|
|
81
|
-
{"file": "$DIR_WORKFLOW/$
|
|
91
|
+
{"file": "$DIR_WORKFLOW/$DIR_SPEC/shared/index.md", "reason": "Shared coding standards"}
|
|
82
92
|
EOF
|
|
83
93
|
|
|
84
94
|
if [[ "$dev_type" == "backend" ]] || [[ "$dev_type" == "fullstack" ]]; then
|
|
@@ -92,7 +102,7 @@ EOF
|
|
|
92
102
|
get_debug_context() {
|
|
93
103
|
local dev_type="$1"
|
|
94
104
|
|
|
95
|
-
echo "{\"file\": \"$DIR_WORKFLOW/$
|
|
105
|
+
echo "{\"file\": \"$DIR_WORKFLOW/$DIR_SPEC/shared/index.md\", \"reason\": \"Shared coding standards\"}"
|
|
96
106
|
|
|
97
107
|
if [[ "$dev_type" == "backend" ]] || [[ "$dev_type" == "fullstack" ]]; then
|
|
98
108
|
echo '{"file": ".claude/commands/check-backend.md", "reason": "Backend check spec"}'
|
|
@@ -103,16 +113,16 @@ get_debug_context() {
|
|
|
103
113
|
}
|
|
104
114
|
|
|
105
115
|
# =============================================================================
|
|
106
|
-
#
|
|
116
|
+
# Task Operations
|
|
107
117
|
# =============================================================================
|
|
108
118
|
|
|
109
|
-
|
|
110
|
-
local
|
|
111
|
-
local archive_dir="$
|
|
119
|
+
ensure_tasks_dir() {
|
|
120
|
+
local tasks_dir=$(get_tasks_dir)
|
|
121
|
+
local archive_dir="$tasks_dir/archive"
|
|
112
122
|
|
|
113
|
-
if [[ ! -d "$
|
|
114
|
-
mkdir -p "$
|
|
115
|
-
echo -e "${GREEN}Created
|
|
123
|
+
if [[ ! -d "$tasks_dir" ]]; then
|
|
124
|
+
mkdir -p "$tasks_dir"
|
|
125
|
+
echo -e "${GREEN}Created tasks directory: $tasks_dir${NC}" >&2
|
|
116
126
|
fi
|
|
117
127
|
|
|
118
128
|
if [[ ! -d "$archive_dir" ]]; then
|
|
@@ -179,7 +189,7 @@ cmd_create() {
|
|
|
179
189
|
fi
|
|
180
190
|
fi
|
|
181
191
|
|
|
182
|
-
|
|
192
|
+
ensure_tasks_dir
|
|
183
193
|
|
|
184
194
|
# Get current developer as creator
|
|
185
195
|
local creator=$(get_developer "$REPO_ROOT")
|
|
@@ -187,48 +197,44 @@ cmd_create() {
|
|
|
187
197
|
creator="$assignee"
|
|
188
198
|
fi
|
|
189
199
|
|
|
190
|
-
#
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
echo -e "${RED}Error: Failed to create backlog issue${NC}" >&2
|
|
194
|
-
exit 1
|
|
200
|
+
# Generate slug if not provided
|
|
201
|
+
if [[ -z "$slug" ]]; then
|
|
202
|
+
slug=$(_slugify "$title")
|
|
195
203
|
fi
|
|
196
204
|
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
# Create feature directory
|
|
203
|
-
local features_dir="$REPO_ROOT/$DIR_WORKFLOW/$DIR_PROGRESS/$assignee/$DIR_FEATURES"
|
|
204
|
-
if [[ ! -d "$features_dir" ]]; then
|
|
205
|
-
mkdir -p "$features_dir"
|
|
205
|
+
# Validate slug
|
|
206
|
+
if [[ -z "$slug" ]]; then
|
|
207
|
+
echo -e "${RED}Error: could not generate slug from title${NC}" >&2
|
|
208
|
+
exit 1
|
|
206
209
|
fi
|
|
207
210
|
|
|
208
|
-
|
|
209
|
-
local
|
|
210
|
-
local
|
|
211
|
-
local
|
|
211
|
+
# Create task directory with MM-DD-slug format
|
|
212
|
+
local tasks_dir=$(get_tasks_dir)
|
|
213
|
+
local date_prefix=$(generate_task_date_prefix)
|
|
214
|
+
local dir_name="${date_prefix}-${slug}"
|
|
215
|
+
local task_dir="$tasks_dir/$dir_name"
|
|
216
|
+
local task_json="$task_dir/$FILE_TASK_JSON"
|
|
212
217
|
|
|
213
|
-
if [[ -d "$
|
|
214
|
-
echo -e "${YELLOW}Warning:
|
|
218
|
+
if [[ -d "$task_dir" ]]; then
|
|
219
|
+
echo -e "${YELLOW}Warning: Task directory already exists: $dir_name${NC}" >&2
|
|
215
220
|
else
|
|
216
|
-
mkdir -p "$
|
|
221
|
+
mkdir -p "$task_dir"
|
|
217
222
|
fi
|
|
218
223
|
|
|
219
224
|
local today=$(date +%Y-%m-%d)
|
|
220
|
-
local backlog_ref_json="\"${backlog_id}.json\""
|
|
221
225
|
|
|
222
|
-
cat > "$
|
|
226
|
+
cat > "$task_json" << EOF
|
|
223
227
|
{
|
|
224
|
-
"id": "$
|
|
225
|
-
"name": "$
|
|
228
|
+
"id": "$slug",
|
|
229
|
+
"name": "$slug",
|
|
230
|
+
"title": "$title",
|
|
226
231
|
"description": "$description",
|
|
227
232
|
"status": "planning",
|
|
228
233
|
"dev_type": null,
|
|
229
234
|
"scope": null,
|
|
230
235
|
"priority": "$priority",
|
|
231
|
-
"
|
|
236
|
+
"creator": "$creator",
|
|
237
|
+
"assignee": "$assignee",
|
|
232
238
|
"createdAt": "$today",
|
|
233
239
|
"completedAt": null,
|
|
234
240
|
"branch": null,
|
|
@@ -243,15 +249,13 @@ cmd_create() {
|
|
|
243
249
|
],
|
|
244
250
|
"commit": null,
|
|
245
251
|
"pr_url": null,
|
|
246
|
-
"backlog_ref": $backlog_ref_json,
|
|
247
252
|
"subtasks": [],
|
|
248
253
|
"relatedFiles": [],
|
|
249
254
|
"notes": ""
|
|
250
255
|
}
|
|
251
256
|
EOF
|
|
252
257
|
|
|
253
|
-
echo -e "${GREEN}Created
|
|
254
|
-
echo -e "${CYAN}Linked to backlog: $backlog_id${NC}" >&2
|
|
258
|
+
echo -e "${GREEN}Created task: $dir_name${NC}" >&2
|
|
255
259
|
echo -e "" >&2
|
|
256
260
|
echo -e "${BLUE}Next steps:${NC}" >&2
|
|
257
261
|
echo -e " 1. Create prd.md with requirements" >&2
|
|
@@ -260,7 +264,7 @@ EOF
|
|
|
260
264
|
echo "" >&2
|
|
261
265
|
|
|
262
266
|
# Output relative path for script chaining
|
|
263
|
-
echo "$DIR_WORKFLOW/$
|
|
267
|
+
echo "$DIR_WORKFLOW/$DIR_TASKS/$dir_name"
|
|
264
268
|
}
|
|
265
269
|
|
|
266
270
|
# =============================================================================
|
|
@@ -273,7 +277,7 @@ cmd_init_context() {
|
|
|
273
277
|
|
|
274
278
|
if [[ -z "$target_dir" ]] || [[ -z "$dev_type" ]]; then
|
|
275
279
|
echo -e "${RED}Error: Missing arguments${NC}"
|
|
276
|
-
echo "Usage: $0 init-context <
|
|
280
|
+
echo "Usage: $0 init-context <task-dir> <dev_type>"
|
|
277
281
|
echo " dev_type: backend | frontend | fullstack | test | docs"
|
|
278
282
|
exit 1
|
|
279
283
|
fi
|
|
@@ -341,7 +345,7 @@ cmd_add_context() {
|
|
|
341
345
|
|
|
342
346
|
if [[ -z "$target_dir" ]] || [[ -z "$jsonl_name" ]] || [[ -z "$path" ]]; then
|
|
343
347
|
echo -e "${RED}Error: Missing arguments${NC}"
|
|
344
|
-
echo "Usage: $0 add-context <
|
|
348
|
+
echo "Usage: $0 add-context <task-dir> <jsonl-file> <path> [reason]"
|
|
345
349
|
echo " jsonl-file: implement | check | debug (or full filename)"
|
|
346
350
|
exit 1
|
|
347
351
|
fi
|
|
@@ -445,7 +449,7 @@ cmd_validate() {
|
|
|
445
449
|
local target_dir="$1"
|
|
446
450
|
|
|
447
451
|
if [[ -z "$target_dir" ]]; then
|
|
448
|
-
echo -e "${RED}Error:
|
|
452
|
+
echo -e "${RED}Error: task directory required${NC}"
|
|
449
453
|
exit 1
|
|
450
454
|
fi
|
|
451
455
|
|
|
@@ -480,7 +484,7 @@ cmd_list_context() {
|
|
|
480
484
|
local target_dir="$1"
|
|
481
485
|
|
|
482
486
|
if [[ -z "$target_dir" ]]; then
|
|
483
|
-
echo -e "${RED}Error:
|
|
487
|
+
echo -e "${RED}Error: task directory required${NC}"
|
|
484
488
|
exit 1
|
|
485
489
|
fi
|
|
486
490
|
|
|
@@ -523,40 +527,40 @@ cmd_list_context() {
|
|
|
523
527
|
# =============================================================================
|
|
524
528
|
|
|
525
529
|
cmd_start() {
|
|
526
|
-
local
|
|
530
|
+
local task_dir="$1"
|
|
527
531
|
|
|
528
|
-
if [[ -z "$
|
|
529
|
-
echo -e "${RED}Error:
|
|
532
|
+
if [[ -z "$task_dir" ]]; then
|
|
533
|
+
echo -e "${RED}Error: task directory required${NC}"
|
|
530
534
|
exit 1
|
|
531
535
|
fi
|
|
532
536
|
|
|
533
537
|
# Convert to relative path
|
|
534
|
-
if [[ "$
|
|
535
|
-
|
|
538
|
+
if [[ "$task_dir" = /* ]]; then
|
|
539
|
+
task_dir="${task_dir#$REPO_ROOT/}"
|
|
536
540
|
fi
|
|
537
541
|
|
|
538
542
|
# Verify directory exists
|
|
539
|
-
if [[ ! -d "$REPO_ROOT/$
|
|
540
|
-
echo -e "${RED}Error:
|
|
543
|
+
if [[ ! -d "$REPO_ROOT/$task_dir" ]]; then
|
|
544
|
+
echo -e "${RED}Error: Task directory not found: $task_dir${NC}"
|
|
541
545
|
exit 1
|
|
542
546
|
fi
|
|
543
547
|
|
|
544
|
-
|
|
545
|
-
echo -e "${GREEN}✓ Current
|
|
548
|
+
set_current_task "$task_dir"
|
|
549
|
+
echo -e "${GREEN}✓ Current task set to: $task_dir${NC}"
|
|
546
550
|
echo ""
|
|
547
|
-
echo -e "${BLUE}The hook will now inject context from this
|
|
551
|
+
echo -e "${BLUE}The hook will now inject context from this task's jsonl files.${NC}"
|
|
548
552
|
}
|
|
549
553
|
|
|
550
554
|
cmd_finish() {
|
|
551
|
-
local current=$(
|
|
555
|
+
local current=$(get_current_task)
|
|
552
556
|
|
|
553
557
|
if [[ -z "$current" ]]; then
|
|
554
|
-
echo -e "${YELLOW}No current
|
|
558
|
+
echo -e "${YELLOW}No current task set${NC}"
|
|
555
559
|
exit 0
|
|
556
560
|
fi
|
|
557
561
|
|
|
558
|
-
|
|
559
|
-
echo -e "${GREEN}✓ Cleared current
|
|
562
|
+
clear_current_task
|
|
563
|
+
echo -e "${GREEN}✓ Cleared current task (was: $current)${NC}"
|
|
560
564
|
}
|
|
561
565
|
|
|
562
566
|
# =============================================================================
|
|
@@ -564,54 +568,49 @@ cmd_finish() {
|
|
|
564
568
|
# =============================================================================
|
|
565
569
|
|
|
566
570
|
cmd_archive() {
|
|
567
|
-
local
|
|
571
|
+
local task_name="$1"
|
|
568
572
|
|
|
569
|
-
if [[ -z "$
|
|
570
|
-
echo -e "${RED}Error:
|
|
571
|
-
echo "Usage: $0 archive <
|
|
573
|
+
if [[ -z "$task_name" ]]; then
|
|
574
|
+
echo -e "${RED}Error: Task name is required${NC}" >&2
|
|
575
|
+
echo "Usage: $0 archive <task-name>" >&2
|
|
572
576
|
exit 1
|
|
573
577
|
fi
|
|
574
578
|
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
local features_dir=$(get_features_dir)
|
|
579
|
+
local tasks_dir=$(get_tasks_dir)
|
|
578
580
|
|
|
579
|
-
# Find
|
|
580
|
-
local
|
|
581
|
+
# Find task directory using common function
|
|
582
|
+
local task_dir=$(find_task_by_name "$task_name" "$tasks_dir")
|
|
581
583
|
|
|
582
|
-
if [[ -z "$
|
|
583
|
-
echo -e "${RED}Error:
|
|
584
|
-
echo "Active
|
|
584
|
+
if [[ -z "$task_dir" ]] || [[ ! -d "$task_dir" ]]; then
|
|
585
|
+
echo -e "${RED}Error: Task not found: $task_name${NC}" >&2
|
|
586
|
+
echo "Active tasks:" >&2
|
|
585
587
|
cmd_list >&2
|
|
586
588
|
exit 1
|
|
587
589
|
fi
|
|
588
590
|
|
|
589
|
-
local dir_name=$(basename "$
|
|
590
|
-
local
|
|
591
|
+
local dir_name=$(basename "$task_dir")
|
|
592
|
+
local task_json="$task_dir/$FILE_TASK_JSON"
|
|
591
593
|
|
|
592
594
|
# Update status before archiving
|
|
593
595
|
local today=$(date +%Y-%m-%d)
|
|
594
|
-
if [[ -f "$
|
|
596
|
+
if [[ -f "$task_json" ]] && command -v jq &> /dev/null; then
|
|
595
597
|
local temp_file=$(mktemp)
|
|
596
|
-
jq --arg date "$today" '.status = "completed" | .completedAt = $date' "$
|
|
597
|
-
mv "$temp_file" "$
|
|
598
|
+
jq --arg date "$today" '.status = "completed" | .completedAt = $date' "$task_json" > "$temp_file"
|
|
599
|
+
mv "$temp_file" "$task_json"
|
|
598
600
|
fi
|
|
599
601
|
|
|
600
|
-
# Clear if current
|
|
601
|
-
local current=$(
|
|
602
|
+
# Clear if current task
|
|
603
|
+
local current=$(get_current_task)
|
|
602
604
|
if [[ "$current" == *"$dir_name"* ]]; then
|
|
603
|
-
|
|
605
|
+
clear_current_task
|
|
604
606
|
fi
|
|
605
607
|
|
|
606
|
-
# Use common archive function
|
|
607
|
-
local result=$(
|
|
608
|
+
# Use common archive function
|
|
609
|
+
local result=$(archive_task_complete "$task_dir" "$REPO_ROOT")
|
|
608
610
|
local archive_dest=""
|
|
609
611
|
|
|
610
612
|
echo "$result" | while IFS= read -r line; do
|
|
611
613
|
case "$line" in
|
|
612
|
-
backlog_completed:*)
|
|
613
|
-
echo -e "${CYAN}Completed linked backlog: ${line#backlog_completed:}${NC}" >&2
|
|
614
|
-
;;
|
|
615
614
|
archived_to:*)
|
|
616
615
|
archive_dest="${line#archived_to:}"
|
|
617
616
|
local year_month=$(basename "$(dirname "$archive_dest")")
|
|
@@ -622,7 +621,7 @@ cmd_archive() {
|
|
|
622
621
|
|
|
623
622
|
# Return the archive path
|
|
624
623
|
local year_month=$(date +%Y-%m)
|
|
625
|
-
echo "$DIR_WORKFLOW/$
|
|
624
|
+
echo "$DIR_WORKFLOW/$DIR_TASKS/$DIR_ARCHIVE/$year_month/$dir_name"
|
|
626
625
|
}
|
|
627
626
|
|
|
628
627
|
# =============================================================================
|
|
@@ -630,44 +629,90 @@ cmd_archive() {
|
|
|
630
629
|
# =============================================================================
|
|
631
630
|
|
|
632
631
|
cmd_list() {
|
|
633
|
-
|
|
632
|
+
local filter_mine=false
|
|
633
|
+
local filter_status=""
|
|
634
634
|
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
635
|
+
# Parse arguments
|
|
636
|
+
while [[ $# -gt 0 ]]; do
|
|
637
|
+
case "$1" in
|
|
638
|
+
--mine|-m)
|
|
639
|
+
filter_mine=true
|
|
640
|
+
shift
|
|
641
|
+
;;
|
|
642
|
+
--status|-s)
|
|
643
|
+
filter_status="$2"
|
|
644
|
+
shift 2
|
|
645
|
+
;;
|
|
646
|
+
*)
|
|
647
|
+
shift
|
|
648
|
+
;;
|
|
649
|
+
esac
|
|
650
|
+
done
|
|
638
651
|
|
|
639
|
-
|
|
652
|
+
local tasks_dir=$(get_tasks_dir)
|
|
653
|
+
local current_task=$(get_current_task)
|
|
654
|
+
local developer=$(get_developer "$REPO_ROOT")
|
|
655
|
+
|
|
656
|
+
if [[ "$filter_mine" == "true" ]]; then
|
|
657
|
+
if [[ -z "$developer" ]]; then
|
|
658
|
+
echo -e "${RED}Error: No developer set. Run init-developer.sh first${NC}" >&2
|
|
659
|
+
exit 1
|
|
660
|
+
fi
|
|
661
|
+
echo -e "${BLUE}My tasks (assignee: $developer):${NC}"
|
|
662
|
+
else
|
|
663
|
+
echo -e "${BLUE}All active tasks:${NC}"
|
|
664
|
+
fi
|
|
640
665
|
echo ""
|
|
641
666
|
|
|
642
667
|
local count=0
|
|
643
668
|
|
|
644
|
-
for d in "$
|
|
669
|
+
for d in "$tasks_dir"/*/; do
|
|
645
670
|
if [[ -d "$d" ]] && [[ "$(basename "$d")" != "archive" ]]; then
|
|
646
671
|
local dir_name=$(basename "$d")
|
|
647
|
-
local
|
|
672
|
+
local task_json="$d/$FILE_TASK_JSON"
|
|
648
673
|
local status="unknown"
|
|
649
|
-
local
|
|
674
|
+
local assignee="-"
|
|
675
|
+
local relative_path="$DIR_WORKFLOW/$DIR_TASKS/$dir_name"
|
|
676
|
+
|
|
677
|
+
if [[ -f "$task_json" ]] && command -v jq &> /dev/null; then
|
|
678
|
+
status=$(jq -r '.status // "unknown"' "$task_json")
|
|
679
|
+
assignee=$(jq -r '.assignee // "-"' "$task_json")
|
|
680
|
+
fi
|
|
650
681
|
|
|
651
|
-
|
|
652
|
-
|
|
682
|
+
# Apply --mine filter
|
|
683
|
+
if [[ "$filter_mine" == "true" ]] && [[ "$assignee" != "$developer" ]]; then
|
|
684
|
+
continue
|
|
685
|
+
fi
|
|
686
|
+
|
|
687
|
+
# Apply --status filter
|
|
688
|
+
if [[ -n "$filter_status" ]] && [[ "$status" != "$filter_status" ]]; then
|
|
689
|
+
continue
|
|
653
690
|
fi
|
|
654
691
|
|
|
655
692
|
local marker=""
|
|
656
|
-
if [[ "$relative_path" == "$
|
|
693
|
+
if [[ "$relative_path" == "$current_task" ]]; then
|
|
657
694
|
marker=" ${GREEN}<- current${NC}"
|
|
658
695
|
fi
|
|
659
696
|
|
|
660
|
-
|
|
697
|
+
if [[ "$filter_mine" == "true" ]]; then
|
|
698
|
+
echo -e " - $dir_name/ ($status)$marker"
|
|
699
|
+
else
|
|
700
|
+
echo -e " - $dir_name/ ($status) [${CYAN}$assignee${NC}]$marker"
|
|
701
|
+
fi
|
|
661
702
|
((count++))
|
|
662
703
|
fi
|
|
663
704
|
done
|
|
664
705
|
|
|
665
706
|
if [[ $count -eq 0 ]]; then
|
|
666
|
-
|
|
707
|
+
if [[ "$filter_mine" == "true" ]]; then
|
|
708
|
+
echo " (no tasks assigned to you)"
|
|
709
|
+
else
|
|
710
|
+
echo " (no active tasks)"
|
|
711
|
+
fi
|
|
667
712
|
fi
|
|
668
713
|
|
|
669
714
|
echo ""
|
|
670
|
-
echo "Total: $count
|
|
715
|
+
echo "Total: $count task(s)"
|
|
671
716
|
}
|
|
672
717
|
|
|
673
718
|
# =============================================================================
|
|
@@ -677,13 +722,10 @@ cmd_list() {
|
|
|
677
722
|
cmd_list_archive() {
|
|
678
723
|
local month="$1"
|
|
679
724
|
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
local features_dir=$(get_features_dir)
|
|
683
|
-
local archive_dir="$features_dir/archive"
|
|
684
|
-
local developer=$(get_developer)
|
|
725
|
+
local tasks_dir=$(get_tasks_dir)
|
|
726
|
+
local archive_dir="$tasks_dir/archive"
|
|
685
727
|
|
|
686
|
-
echo -e "${BLUE}Archived
|
|
728
|
+
echo -e "${BLUE}Archived tasks:${NC}"
|
|
687
729
|
echo ""
|
|
688
730
|
|
|
689
731
|
if [[ -n "$month" ]]; then
|
|
@@ -703,7 +745,7 @@ cmd_list_archive() {
|
|
|
703
745
|
if [[ -d "$month_dir" ]]; then
|
|
704
746
|
local month_name=$(basename "$month_dir")
|
|
705
747
|
local count=$(find "$month_dir" -maxdepth 1 -type d ! -name "$(basename "$month_dir")" | wc -l | tr -d ' ')
|
|
706
|
-
echo "[$month_name] - $count
|
|
748
|
+
echo "[$month_name] - $count task(s)"
|
|
707
749
|
fi
|
|
708
750
|
done
|
|
709
751
|
fi
|
|
@@ -719,8 +761,8 @@ cmd_set_branch() {
|
|
|
719
761
|
|
|
720
762
|
if [[ -z "$target_dir" ]] || [[ -z "$branch" ]]; then
|
|
721
763
|
echo -e "${RED}Error: Missing arguments${NC}"
|
|
722
|
-
echo "Usage: $0 set-branch <
|
|
723
|
-
echo "Example: $0 set-branch <dir> feature/my-
|
|
764
|
+
echo "Usage: $0 set-branch <task-dir> <branch-name>"
|
|
765
|
+
echo "Example: $0 set-branch <dir> feature/my-task"
|
|
724
766
|
exit 1
|
|
725
767
|
fi
|
|
726
768
|
|
|
@@ -729,15 +771,15 @@ cmd_set_branch() {
|
|
|
729
771
|
target_dir="$REPO_ROOT/$target_dir"
|
|
730
772
|
fi
|
|
731
773
|
|
|
732
|
-
local
|
|
733
|
-
if [[ ! -f "$
|
|
734
|
-
echo -e "${RED}Error:
|
|
774
|
+
local task_json="$target_dir/$FILE_TASK_JSON"
|
|
775
|
+
if [[ ! -f "$task_json" ]]; then
|
|
776
|
+
echo -e "${RED}Error: task.json not found at $target_dir${NC}"
|
|
735
777
|
exit 1
|
|
736
778
|
fi
|
|
737
779
|
|
|
738
780
|
# Update branch field
|
|
739
|
-
jq --arg branch "$branch" '.branch = $branch' "$
|
|
740
|
-
mv "${
|
|
781
|
+
jq --arg branch "$branch" '.branch = $branch' "$task_json" > "${task_json}.tmp"
|
|
782
|
+
mv "${task_json}.tmp" "$task_json"
|
|
741
783
|
|
|
742
784
|
echo -e "${GREEN}✓ Branch set to: $branch${NC}"
|
|
743
785
|
echo ""
|
|
@@ -755,7 +797,7 @@ cmd_set_scope() {
|
|
|
755
797
|
|
|
756
798
|
if [[ -z "$target_dir" ]] || [[ -z "$scope" ]]; then
|
|
757
799
|
echo -e "${RED}Error: Missing arguments${NC}"
|
|
758
|
-
echo "Usage: $0 set-scope <
|
|
800
|
+
echo "Usage: $0 set-scope <task-dir> <scope>"
|
|
759
801
|
echo "Example: $0 set-scope <dir> api"
|
|
760
802
|
exit 1
|
|
761
803
|
fi
|
|
@@ -765,15 +807,15 @@ cmd_set_scope() {
|
|
|
765
807
|
target_dir="$REPO_ROOT/$target_dir"
|
|
766
808
|
fi
|
|
767
809
|
|
|
768
|
-
local
|
|
769
|
-
if [[ ! -f "$
|
|
770
|
-
echo -e "${RED}Error:
|
|
810
|
+
local task_json="$target_dir/$FILE_TASK_JSON"
|
|
811
|
+
if [[ ! -f "$task_json" ]]; then
|
|
812
|
+
echo -e "${RED}Error: task.json not found at $target_dir${NC}"
|
|
771
813
|
exit 1
|
|
772
814
|
fi
|
|
773
815
|
|
|
774
816
|
# Update scope field
|
|
775
|
-
jq --arg scope "$scope" '.scope = $scope' "$
|
|
776
|
-
mv "${
|
|
817
|
+
jq --arg scope "$scope" '.scope = $scope' "$task_json" > "${task_json}.tmp"
|
|
818
|
+
mv "${task_json}.tmp" "$task_json"
|
|
777
819
|
|
|
778
820
|
echo -e "${GREEN}✓ Scope set to: $scope${NC}"
|
|
779
821
|
}
|
|
@@ -802,12 +844,12 @@ cmd_create_pr() {
|
|
|
802
844
|
esac
|
|
803
845
|
done
|
|
804
846
|
|
|
805
|
-
# Get
|
|
847
|
+
# Get task directory
|
|
806
848
|
if [[ -z "$target_dir" ]]; then
|
|
807
|
-
target_dir=$(
|
|
849
|
+
target_dir=$(get_current_task)
|
|
808
850
|
if [[ -z "$target_dir" ]]; then
|
|
809
|
-
echo -e "${RED}Error: No
|
|
810
|
-
echo "Usage: $0 create-pr [
|
|
851
|
+
echo -e "${RED}Error: No task directory specified and no current task set${NC}"
|
|
852
|
+
echo "Usage: $0 create-pr [task-dir] [--dry-run]"
|
|
811
853
|
exit 1
|
|
812
854
|
fi
|
|
813
855
|
fi
|
|
@@ -817,9 +859,9 @@ cmd_create_pr() {
|
|
|
817
859
|
target_dir="$REPO_ROOT/$target_dir"
|
|
818
860
|
fi
|
|
819
861
|
|
|
820
|
-
local
|
|
821
|
-
if [[ ! -f "$
|
|
822
|
-
echo -e "${RED}Error:
|
|
862
|
+
local task_json="$target_dir/$FILE_TASK_JSON"
|
|
863
|
+
if [[ ! -f "$task_json" ]]; then
|
|
864
|
+
echo -e "${RED}Error: task.json not found at $target_dir${NC}"
|
|
823
865
|
exit 1
|
|
824
866
|
fi
|
|
825
867
|
|
|
@@ -829,11 +871,11 @@ cmd_create_pr() {
|
|
|
829
871
|
fi
|
|
830
872
|
echo ""
|
|
831
873
|
|
|
832
|
-
# Read
|
|
833
|
-
local
|
|
834
|
-
local base_branch=$(jq -r '.base_branch // "main"' "$
|
|
835
|
-
local scope=$(jq -r '.scope // "core"' "$
|
|
836
|
-
local dev_type=$(jq -r '.dev_type // "feature"' "$
|
|
874
|
+
# Read task config
|
|
875
|
+
local task_name=$(jq -r '.name' "$task_json")
|
|
876
|
+
local base_branch=$(jq -r '.base_branch // "main"' "$task_json")
|
|
877
|
+
local scope=$(jq -r '.scope // "core"' "$task_json")
|
|
878
|
+
local dev_type=$(jq -r '.dev_type // "feature"' "$task_json")
|
|
837
879
|
|
|
838
880
|
# Map dev_type to commit prefix
|
|
839
881
|
local commit_prefix
|
|
@@ -846,7 +888,7 @@ cmd_create_pr() {
|
|
|
846
888
|
*) commit_prefix="feat" ;;
|
|
847
889
|
esac
|
|
848
890
|
|
|
849
|
-
echo -e "
|
|
891
|
+
echo -e "Task: ${task_name}"
|
|
850
892
|
echo -e "Base branch: ${base_branch}"
|
|
851
893
|
echo -e "Scope: ${scope}"
|
|
852
894
|
echo -e "Commit prefix: ${commit_prefix}"
|
|
@@ -861,9 +903,9 @@ cmd_create_pr() {
|
|
|
861
903
|
|
|
862
904
|
# Stage changes (even in dry-run to detect what would be committed)
|
|
863
905
|
git add -A
|
|
864
|
-
# Exclude
|
|
865
|
-
git reset "$DIR_WORKFLOW/$
|
|
866
|
-
git reset .agent-log .agent-
|
|
906
|
+
# Exclude workspace and temp files
|
|
907
|
+
git reset "$DIR_WORKFLOW/$DIR_WORKSPACE/" 2>/dev/null || true
|
|
908
|
+
git reset .agent-log .agent-runner.sh 2>/dev/null || true
|
|
867
909
|
|
|
868
910
|
# Check if there are staged changes
|
|
869
911
|
if git diff --cached --quiet 2>/dev/null; then
|
|
@@ -883,7 +925,7 @@ cmd_create_pr() {
|
|
|
883
925
|
else
|
|
884
926
|
# Commit changes
|
|
885
927
|
echo -e "${YELLOW}Committing changes...${NC}"
|
|
886
|
-
local commit_msg="${commit_prefix}(${scope}): ${
|
|
928
|
+
local commit_msg="${commit_prefix}(${scope}): ${task_name}"
|
|
887
929
|
|
|
888
930
|
if [[ "$dry_run" == "true" ]]; then
|
|
889
931
|
echo -e "[DRY-RUN] Would commit with message: ${commit_msg}"
|
|
@@ -906,7 +948,7 @@ cmd_create_pr() {
|
|
|
906
948
|
|
|
907
949
|
# Create PR
|
|
908
950
|
echo -e "${YELLOW}Creating PR...${NC}"
|
|
909
|
-
local pr_title="${commit_prefix}(${scope}): ${
|
|
951
|
+
local pr_title="${commit_prefix}(${scope}): ${task_name}"
|
|
910
952
|
local pr_url=""
|
|
911
953
|
|
|
912
954
|
if [[ "$dry_run" == "true" ]]; then
|
|
@@ -944,20 +986,20 @@ cmd_create_pr() {
|
|
|
944
986
|
fi
|
|
945
987
|
fi
|
|
946
988
|
|
|
947
|
-
# Update
|
|
948
|
-
echo -e "${YELLOW}Updating
|
|
989
|
+
# Update task.json
|
|
990
|
+
echo -e "${YELLOW}Updating task status...${NC}"
|
|
949
991
|
if [[ "$dry_run" == "true" ]]; then
|
|
950
|
-
echo -e "[DRY-RUN] Would update
|
|
992
|
+
echo -e "[DRY-RUN] Would update task.json:"
|
|
951
993
|
echo -e " status: review"
|
|
952
994
|
echo -e " pr_url: ${pr_url}"
|
|
953
995
|
echo -e " current_phase: (set to create-pr phase)"
|
|
954
996
|
else
|
|
955
997
|
# Find the phase number for create-pr action
|
|
956
|
-
local create_pr_phase=$(jq -r '.next_action[] | select(.action == "create-pr") | .phase // 4' "$
|
|
998
|
+
local create_pr_phase=$(jq -r '.next_action[] | select(.action == "create-pr") | .phase // 4' "$task_json")
|
|
957
999
|
jq --arg url "$pr_url" --argjson phase "$create_pr_phase" \
|
|
958
|
-
'.status = "review" | .pr_url = $url | .current_phase = $phase' "$
|
|
959
|
-
mv "${
|
|
960
|
-
echo -e "${GREEN}
|
|
1000
|
+
'.status = "review" | .pr_url = $url | .current_phase = $phase' "$task_json" > "${task_json}.tmp"
|
|
1001
|
+
mv "${task_json}.tmp" "$task_json"
|
|
1002
|
+
echo -e "${GREEN}Task status updated to 'review', phase ${create_pr_phase}${NC}"
|
|
961
1003
|
fi
|
|
962
1004
|
|
|
963
1005
|
# In dry-run, reset the staging area
|
|
@@ -978,36 +1020,43 @@ cmd_create_pr() {
|
|
|
978
1020
|
|
|
979
1021
|
show_usage() {
|
|
980
1022
|
cat << EOF
|
|
981
|
-
|
|
1023
|
+
Task Management Script for Multi-Agent Pipeline
|
|
982
1024
|
|
|
983
1025
|
Usage:
|
|
984
|
-
$0 create <
|
|
1026
|
+
$0 create <title> Create new task directory
|
|
985
1027
|
$0 init-context <dir> <dev_type> Initialize jsonl files
|
|
986
1028
|
$0 add-context <dir> <jsonl> <path> [reason] Add entry to jsonl
|
|
987
1029
|
$0 validate <dir> Validate jsonl files
|
|
988
1030
|
$0 list-context <dir> List jsonl entries
|
|
989
|
-
$0 start <dir> Set as current
|
|
990
|
-
$0 finish Clear current
|
|
1031
|
+
$0 start <dir> Set as current task
|
|
1032
|
+
$0 finish Clear current task
|
|
991
1033
|
$0 set-branch <dir> <branch> Set git branch for multi-agent
|
|
992
1034
|
$0 set-scope <dir> <scope> Set scope for PR title
|
|
993
|
-
$0 create-pr [dir] [--dry-run] Create PR from
|
|
994
|
-
$0 archive <
|
|
995
|
-
$0 list
|
|
996
|
-
$0 list-archive [YYYY-MM] List archived
|
|
1035
|
+
$0 create-pr [dir] [--dry-run] Create PR from task
|
|
1036
|
+
$0 archive <task-name> Archive completed task
|
|
1037
|
+
$0 list [--mine] [--status <status>] List tasks
|
|
1038
|
+
$0 list-archive [YYYY-MM] List archived tasks
|
|
997
1039
|
|
|
998
1040
|
Arguments:
|
|
999
1041
|
dev_type: backend | frontend | fullstack | test | docs
|
|
1000
1042
|
|
|
1043
|
+
List options:
|
|
1044
|
+
--mine, -m Show only tasks assigned to current developer
|
|
1045
|
+
--status, -s <s> Filter by status (planning, in_progress, review, completed)
|
|
1046
|
+
|
|
1001
1047
|
Examples:
|
|
1002
|
-
$0 create add-login
|
|
1003
|
-
$0 init-context .trellis/
|
|
1004
|
-
$0 add-context <dir> implement .trellis/
|
|
1005
|
-
$0 set-branch <dir> feature/add-login
|
|
1006
|
-
$0 start .trellis/
|
|
1007
|
-
$0 create-pr # Uses current
|
|
1048
|
+
$0 create "Add login feature" --slug add-login
|
|
1049
|
+
$0 init-context .trellis/tasks/01-21-add-login backend
|
|
1050
|
+
$0 add-context <dir> implement .trellis/spec/backend/auth.md "Auth guidelines"
|
|
1051
|
+
$0 set-branch <dir> feature/add-login
|
|
1052
|
+
$0 start .trellis/tasks/01-21-add-login
|
|
1053
|
+
$0 create-pr # Uses current task
|
|
1008
1054
|
$0 create-pr <dir> --dry-run # Preview without changes
|
|
1009
1055
|
$0 finish
|
|
1010
|
-
$0 archive add-login
|
|
1056
|
+
$0 archive add-login
|
|
1057
|
+
$0 list # List all active tasks
|
|
1058
|
+
$0 list --mine # List my tasks only
|
|
1059
|
+
$0 list --mine --status in_progress # List my in-progress tasks
|
|
1011
1060
|
EOF
|
|
1012
1061
|
}
|
|
1013
1062
|
|
|
@@ -1053,7 +1102,8 @@ case "${1:-}" in
|
|
|
1053
1102
|
cmd_archive "$2"
|
|
1054
1103
|
;;
|
|
1055
1104
|
list)
|
|
1056
|
-
|
|
1105
|
+
shift
|
|
1106
|
+
cmd_list "$@"
|
|
1057
1107
|
;;
|
|
1058
1108
|
list-archive)
|
|
1059
1109
|
cmd_list_archive "$2"
|