chore: improve agent harness skills (#1378)
This commit is contained in:
+28
-3
@@ -25,6 +25,7 @@
|
||||
# - unresolved_review_thread_count: <N>
|
||||
# - filtered_review_thread_count: <N>
|
||||
# - unresolved_threads: [{ thread_id, comment_id, author, path, body_preview }]
|
||||
# - summary_notes: [<short human-readable notes>]
|
||||
# - errors: [{ source, message }]
|
||||
#
|
||||
# By default, comments/reviews/review threads are limited to items created after
|
||||
@@ -42,6 +43,7 @@ usage() {
|
||||
|
||||
INCLUDE_ALL=0
|
||||
SUMMARY=0
|
||||
PR=''
|
||||
while [[ $# -gt 0 ]]; do
|
||||
case "$1" in
|
||||
--all)
|
||||
@@ -57,19 +59,26 @@ while [[ $# -gt 0 ]]; do
|
||||
;;
|
||||
--)
|
||||
shift
|
||||
if [[ $# -gt 0 ]]; then
|
||||
[[ -z "${PR:-}" && $# -eq 1 ]] || usage
|
||||
PR=$1
|
||||
shift
|
||||
fi
|
||||
break
|
||||
;;
|
||||
-*)
|
||||
usage 1
|
||||
;;
|
||||
*)
|
||||
break
|
||||
[[ -z "${PR:-}" ]] || usage
|
||||
PR=$1
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
[ $# -eq 1 ] || usage
|
||||
PR=$1
|
||||
[ -n "${PR:-}" ] || usage
|
||||
[ $# -eq 0 ] || usage
|
||||
|
||||
errors='[]'
|
||||
pr_json='{}'
|
||||
@@ -214,6 +223,22 @@ summarize_state_json() {
|
||||
| select(.is_resolved == false)
|
||||
| {thread_id, comment_id, author, path, body_preview}
|
||||
],
|
||||
summary_notes: (
|
||||
[
|
||||
if (
|
||||
(.unresolved_review_thread_count | type) == "number"
|
||||
and .unresolved_review_thread_count > 0
|
||||
and ([
|
||||
.review_threads[]
|
||||
| select(.is_resolved == false)
|
||||
] | length) == 0
|
||||
) then
|
||||
"unresolved threads exist outside current-head filter; run `scripts/pr-resolve list <PR>` for full list"
|
||||
else
|
||||
empty
|
||||
end
|
||||
]
|
||||
),
|
||||
errors
|
||||
}
|
||||
'
|
||||
|
||||
Reference in New Issue
Block a user