-
Notifications
You must be signed in to change notification settings - Fork 470
Add CLI and improve documentation #170
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
1f74034
1b64979
48f1fb6
b456918
d955c86
7b5ccc2
80f7892
48a2bac
e3a713a
1f9ce0f
8028fcc
14117e1
4c7615e
454d90c
81fc09a
21f9ca5
6895636
e524557
dff681d
52f6880
a7b90bc
aa683c4
65a3e02
d85032f
6bc4efe
d6802bf
25a7c62
5465e2f
c946f70
5d0a18e
9014f2b
fdb1d06
cd2d056
5360474
0f8161d
50ae6f2
6899e78
9c7cb49
d654e7e
f59f632
f757b29
c7e1d3a
c05c970
d96f641
fb57fd5
539b722
600827f
203d20a
8cffda9
107e658
dd1b8ca
28f3bdf
7fe37a8
76adb43
5944f9b
e29fc94
c8b1f4c
b724bd0
69835d5
c4a83a7
032faaf
f5477c3
f69cdd8
8973fba
893b5b4
2ea4543
41254b6
637b162
38a51ff
27231e3
05fd0a6
a069150
fd97641
7cac4a2
fc0f14e
ada7887
7415f77
f2c07ea
6477d6a
7c51dd9
c099dc5
3f175d7
2e30c85
90e35df
8b138db
7beb98e
7df6c4a
760899e
acaada9
3e44946
bf090fa
3da771c
733c706
02e2ade
6a9d42d
b5d06e6
3ac2d24
bf28827
506d856
e11a5a2
9abfc58
225427e
b103e50
db43928
134a318
40a32cf
db8bac1
2475cee
84f2c08
f4ce3c6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -55,6 +55,10 @@ gh issue edit $ARGUMENTS --body-file {updated_task_file} | |||||||||||||||||||||||
|
||||||||||||||||||||||||
If labels changed: | ||||||||||||||||||||||||
```bash | ||||||||||||||||||||||||
# Ensure labels exist | ||||||||||||||||||||||||
for label in {new_labels}; do | ||||||||||||||||||||||||
gh label create "$label" --force 2>/dev/null || true | ||||||||||||||||||||||||
done | ||||||||||||||||||||||||
Comment on lines
+58
to
+61
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. π οΈ Refactor suggestion Handle multi-label values and spaces safely when creating labels
-# Ensure labels exist
-for label in {new_labels}; do
- gh label create "$label" --force 2>/dev/null || true
-done
+# Ensure labels exist (comma-separated), robust to spaces in labels
+IFS=, read -ra __labels__ <<< "{new_labels}"
+for raw in "${__labels__[@]}"; do
+ label="$(echo "$raw" | sed -E 's/^[[:space:]]+|[[:space:]]+$//g')"
+ [ -n "$label" ] || continue
+ gh label create "$label" --force 2>/dev/null || true
+done π Committable suggestion
Suggested change
π€ Prompt for AI Agents
|
||||||||||||||||||||||||
gh issue edit $ARGUMENTS --add-label "{new_labels}" | ||||||||||||||||||||||||
gh issue edit $ARGUMENTS --remove-label "{removed_labels}" | ||||||||||||||||||||||||
``` | ||||||||||||||||||||||||
|
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -55,12 +55,18 @@ gh issue view {number} --json state,title,labels,body | |||||||||||||||||||||||
### Create Issue | ||||||||||||||||||||||||
```bash | ||||||||||||||||||||||||
# ALWAYS check remote origin first! | ||||||||||||||||||||||||
# Ensure labels exist (force create if needed) | ||||||||||||||||||||||||
for label in {labels}; do | ||||||||||||||||||||||||
gh label create "$label" --force 2>/dev/null || true | ||||||||||||||||||||||||
done | ||||||||||||||||||||||||
Comment on lines
+58
to
+61
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. π οΈ Refactor suggestion Create-all-labels loop should split by comma and trim whitespace As written, labels with spaces break and comma lists arenβt split. Use a comma-aware parse and trim each label before creation. -# Ensure labels exist (force create if needed)
-for label in {labels}; do
- gh label create "$label" --force 2>/dev/null || true
-done
+# Ensure labels exist (force create if needed)
+IFS=, read -ra __labels__ <<< "{labels}"
+for raw in "${__labels__[@]}"; do
+ label="$(echo "$raw" | sed -E 's/^[[:space:]]+|[[:space:]]+$//g')"
+ [ -n "$label" ] || continue
+ gh label create "$label" --force 2>/dev/null || true
+done π Committable suggestion
Suggested change
π€ Prompt for AI Agents
|
||||||||||||||||||||||||
gh issue create --title "{title}" --body-file {file} --label "{labels}" | ||||||||||||||||||||||||
``` | ||||||||||||||||||||||||
|
||||||||||||||||||||||||
### Update Issue | ||||||||||||||||||||||||
```bash | ||||||||||||||||||||||||
# ALWAYS check remote origin first! | ||||||||||||||||||||||||
# Ensure label exists (force create if needed) | ||||||||||||||||||||||||
gh label create "{label}" --force 2>/dev/null || true | ||||||||||||||||||||||||
gh issue edit {number} --add-label "{label}" --add-assignee @me | ||||||||||||||||||||||||
``` | ||||||||||||||||||||||||
|
||||||||||||||||||||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
#!/bin/bash | ||
set -euo pipefail | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. π οΈ Refactor suggestion set -euo pipefail introduces hard failures via grep|sed pipelines (empty matches exit nonβzero). Fix parsing to be non-fatal. With Apply: -set -euo pipefail
+set -euo pipefail - status=$(grep "^status:" "$task_file" | head -1 | sed 's/^status: *//')
+ # Extract first status value; no-fail if absent
+ status=$(awk -F': *' '/^status:/ {print $2; exit}' "$task_file") - deps=$(grep "^depends_on:" "$task_file" | head -1 | sed 's/^depends_on: *\[//' | sed 's/\]//' | sed 's/,/ /g')
+ # Extract deps; normalize delimiters to spaces; no-fail if absent
+ deps=$(awk -F': *' '/^depends_on:/ {gsub(/\[|\]|,/, " "); print $2; exit}' "$task_file") - if [ -n "$deps" ] && [ "$deps" != "depends_on:" ]; then
+ if [ -n "$deps" ]; then
- task_name=$(grep "^name:" "$task_file" | head -1 | sed 's/^name: *//')
+ task_name=$(awk -F': *' '/^name:/ {print $2; exit}' "$task_file") - dep_status=$(grep "^status:" "$dep_file" | head -1 | sed 's/^status: *//')
+ dep_status=$(awk -F': *' '/^status:/ {print $2; exit}' "$dep_file") Also applies to: 21-26, 28-28, 36-42 π€ Prompt for AI Agents
|
||
echo "Getting tasks..." | ||
echo "" | ||
echo "" | ||
|
||
echo "π« Blocked Tasks" | ||
echo "[BLOCKED] Blocked Tasks" | ||
echo "================" | ||
echo "" | ||
|
||
|
@@ -27,7 +28,7 @@ for epic_dir in .claude/epics/*/; do | |
task_name=$(grep "^name:" "$task_file" | head -1 | sed 's/^name: *//') | ||
task_num=$(basename "$task_file" .md) | ||
|
||
echo "βΈοΈ Task #$task_num - $task_name" | ||
echo "[PAUSED] Task #$task_num - $task_name" | ||
echo " Epic: $epic_name" | ||
echo " Blocked by: [$deps]" | ||
|
||
|
@@ -43,17 +44,17 @@ for epic_dir in .claude/epics/*/; do | |
|
||
[ -n "$open_deps" ] && echo " Waiting for:$open_deps" | ||
echo "" | ||
((found++)) | ||
found=$((found + 1)) | ||
fi | ||
done | ||
done | ||
|
||
if [ $found -eq 0 ]; then | ||
echo "No blocked tasks found!" | ||
echo "" | ||
echo "π‘ All tasks with dependencies are either completed or in progress." | ||
echo "TIP All tasks with dependencies are either completed or in progress." | ||
else | ||
echo "π Total blocked: $found tasks" | ||
echo "STATUS Total blocked: $found tasks" | ||
fi | ||
|
||
exit 0 |
Original file line number | Diff line number | Diff line change | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -1,12 +1,13 @@ | ||||||||||||||||||
#!/bin/bash | ||||||||||||||||||
set -euo pipefail | ||||||||||||||||||
echo "Getting epics..." | ||||||||||||||||||
echo "" | ||||||||||||||||||
echo "" | ||||||||||||||||||
|
||||||||||||||||||
[ ! -d ".claude/epics" ] && echo "π No epics directory found. Create your first epic with: /pm:prd-parse <feature-name>" && exit 0 | ||||||||||||||||||
[ -z "$(ls -d .claude/epics/*/ 2>/dev/null)" ] && echo "π No epics found. Create your first epic with: /pm:prd-parse <feature-name>" && exit 0 | ||||||||||||||||||
[ ! -d ".claude/epics" ] && echo "No epics directory found. Create your first epic with: /pm:prd-parse <feature-name>" && exit 0 | ||||||||||||||||||
[ -z "$(ls -d .claude/epics/*/ 2>/dev/null)" ] && echo "No epics found. Create your first epic with: /pm:prd-parse <feature-name>" && exit 0 | ||||||||||||||||||
Comment on lines
+7
to
+8
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Avoid ls in command substitutions under set -euo pipefail. ls + globs can fail and abort the script. Use compgen or find. -[ ! -d ".claude/epics" ] && echo "No epics directory found. Create your first epic with: /pm:prd-parse <feature-name>" && exit 0
-[ -z "$(ls -d .claude/epics/*/ 2>/dev/null)" ] && echo "No epics found. Create your first epic with: /pm:prd-parse <feature-name>" && exit 0
+[ ! -d ".claude/epics" ] && echo "No epics directory found. Create your first epic with: /pm:prd-parse <feature-name>" && exit 0
+if ! compgen -G ".claude/epics/*/" > /dev/null; then
+ echo "No epics found. Create your first epic with: /pm:prd-parse <feature-name>"
+ exit 0
+fi π€ Prompt for AI Agents
|
||||||||||||||||||
|
||||||||||||||||||
echo "π Project Epics" | ||||||||||||||||||
echo "EPIC Project Epics" | ||||||||||||||||||
echo "================" | ||||||||||||||||||
echo "" | ||||||||||||||||||
|
||||||||||||||||||
|
@@ -21,24 +22,24 @@ for dir in .claude/epics/*/; do | |||||||||||||||||
[ -f "$dir/epic.md" ] || continue | ||||||||||||||||||
|
||||||||||||||||||
# Extract metadata | ||||||||||||||||||
n=$(grep "^name:" "$dir/epic.md" | head -1 | sed 's/^name: *//') | ||||||||||||||||||
s=$(grep "^status:" "$dir/epic.md" | head -1 | sed 's/^status: *//' | tr '[:upper:]' '[:lower:]') | ||||||||||||||||||
p=$(grep "^progress:" "$dir/epic.md" | head -1 | sed 's/^progress: *//') | ||||||||||||||||||
g=$(grep "^github:" "$dir/epic.md" | head -1 | sed 's/^github: *//') | ||||||||||||||||||
n=$(grep "^name:" "$dir/epic.md" | head -1 | sed 's/^name: *//' || true) | ||||||||||||||||||
s=$(grep "^status:" "$dir/epic.md" | head -1 | sed 's/^status: *//' | tr '[:upper:]' '[:lower:]' || true) | ||||||||||||||||||
p=$(grep "^progress:" "$dir/epic.md" | head -1 | sed 's/^progress: *//' || true) | ||||||||||||||||||
g=$(grep "^github:" "$dir/epic.md" | head -1 | sed 's/^github: *//' || true) | ||||||||||||||||||
|
||||||||||||||||||
# Defaults | ||||||||||||||||||
[ -z "$n" ] && n=$(basename "$dir") | ||||||||||||||||||
[ -z "$p" ] && p="0%" | ||||||||||||||||||
|
||||||||||||||||||
# Count tasks | ||||||||||||||||||
t=$(ls "$dir"[0-9]*.md 2>/dev/null | wc -l) | ||||||||||||||||||
t=$(ls "$dir"[0-9]*.md 2>/dev/null | wc -l || echo "0") | ||||||||||||||||||
|
||||||||||||||||||
Comment on lines
+35
to
36
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. π οΈ Refactor suggestion Robust task counting and portability. Avoid ls in pipelines; use find with -type f. - t=$(ls "$dir"[0-9]*.md 2>/dev/null | wc -l || echo "0")
+ t=$(find "$dir" -maxdepth 1 -type f -name "[0-9]*.md" 2>/dev/null | wc -l || echo "0") π Committable suggestion
Suggested change
π€ Prompt for AI Agents
|
||||||||||||||||||
# Format output with GitHub issue number if available | ||||||||||||||||||
if [ -n "$g" ]; then | ||||||||||||||||||
i=$(echo "$g" | grep -o '/[0-9]*$' | tr -d '/') | ||||||||||||||||||
entry=" π ${dir}epic.md (#$i) - $p complete ($t tasks)" | ||||||||||||||||||
i=$(echo "$g" | grep -o '/[0-9]*$' | tr -d '/' || true) | ||||||||||||||||||
entry=" TASK ${dir}epic.md (#$i) - $p complete ($t tasks)" | ||||||||||||||||||
else | ||||||||||||||||||
entry=" π ${dir}epic.md - $p complete ($t tasks)" | ||||||||||||||||||
entry=" TASK ${dir}epic.md - $p complete ($t tasks)" | ||||||||||||||||||
fi | ||||||||||||||||||
|
||||||||||||||||||
# Categorize by status (handle various status values) | ||||||||||||||||||
|
@@ -60,23 +61,23 @@ for dir in .claude/epics/*/; do | |||||||||||||||||
done | ||||||||||||||||||
|
||||||||||||||||||
# Display categorized epics | ||||||||||||||||||
echo "π Planning:" | ||||||||||||||||||
echo "NOTE Planning:" | ||||||||||||||||||
if [ -n "$planning_epics" ]; then | ||||||||||||||||||
echo -e "$planning_epics" | sed '/^$/d' | ||||||||||||||||||
else | ||||||||||||||||||
echo " (none)" | ||||||||||||||||||
fi | ||||||||||||||||||
|
||||||||||||||||||
echo "" | ||||||||||||||||||
echo "π In Progress:" | ||||||||||||||||||
echo "LAUNCH In Progress:" | ||||||||||||||||||
if [ -n "$in_progress_epics" ]; then | ||||||||||||||||||
echo -e "$in_progress_epics" | sed '/^$/d' | ||||||||||||||||||
else | ||||||||||||||||||
echo " (none)" | ||||||||||||||||||
fi | ||||||||||||||||||
|
||||||||||||||||||
echo "" | ||||||||||||||||||
echo "β Completed:" | ||||||||||||||||||
echo "OK Completed:" | ||||||||||||||||||
if [ -n "$completed_epics" ]; then | ||||||||||||||||||
echo -e "$completed_epics" | sed '/^$/d' | ||||||||||||||||||
else | ||||||||||||||||||
|
@@ -85,9 +86,9 @@ fi | |||||||||||||||||
|
||||||||||||||||||
# Summary | ||||||||||||||||||
echo "" | ||||||||||||||||||
echo "π Summary" | ||||||||||||||||||
total=$(ls -d .claude/epics/*/ 2>/dev/null | wc -l) | ||||||||||||||||||
tasks=$(find .claude/epics -name "[0-9]*.md" 2>/dev/null | wc -l) | ||||||||||||||||||
echo "STATUS Summary" | ||||||||||||||||||
total=$(ls -d .claude/epics/*/ 2>/dev/null | wc -l || echo "0") | ||||||||||||||||||
tasks=$(find .claude/epics -name "[0-9]*.md" 2>/dev/null | wc -l || echo "0") | ||||||||||||||||||
echo " Total epics: $total" | ||||||||||||||||||
echo " Total tasks: $tasks" | ||||||||||||||||||
Comment on lines
+90
to
93
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. π οΈ Refactor suggestion Summary counters should avoid ls and include -type filters. More reliable directory/file counts. -total=$(ls -d .claude/epics/*/ 2>/dev/null | wc -l || echo "0")
-tasks=$(find .claude/epics -name "[0-9]*.md" 2>/dev/null | wc -l || echo "0")
+total=$(find .claude/epics -mindepth 1 -maxdepth 1 -type d 2>/dev/null | wc -l || echo "0")
+tasks=$(find .claude/epics -type f -name "[0-9]*.md" 2>/dev/null | wc -l || echo "0") π Committable suggestion
Suggested change
|
||||||||||||||||||
|
||||||||||||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
π οΈ Refactor suggestion
Guard sourcing utils.sh to avoid hard failures; provide fallback
If
.claude/scripts/utils.sh
is missing, the script will fail. Add a safe guard and fallback tosed -i.bak
.π Committable suggestion
π€ Prompt for AI Agents