forked from molecule-ai/molecule-core
ci(gh-wrapper): translate --assignee @me → --label team:<role>
Fixes #1957. All agents share one PAT, so `gh issue create --assignee @me` resolves to the CEO. Today's "6 issues @me for 7 cycles" defect signal turned out to be CEO-load misclassified as team-stagnation. Translation rules: - `--assignee @me` → `--label team:<role-slug>` - `--reviewer @me` → dropped (review-bot scans labels, not requests) - `--assignee user` (real user) → unchanged role-slug derived from GIT_AUTHOR_NAME ("Molecule AI Core-BE" → "core-be"). The wrapper already handled the title-prefix + body-footer transforms; these are just two more cases in the existing arg-walk loop. Backward compat: any agent prompt that doesn't use @me passes through unchanged. Agents don't need prompt updates — the wrapper is transparent. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
a5a054e861
commit
7b662d2494
@ -122,6 +122,50 @@ _Opened by: Molecule AI ${role}_")
|
||||
i=$((i + 1))
|
||||
continue
|
||||
;;
|
||||
# Identity translation (#1957). All agents share one PAT, so
|
||||
# `gh ... --assignee @me` resolves to the CEO and lands every
|
||||
# agent-filed issue/PR on the human's plate. Translate to a
|
||||
# role-tagged label instead — labels are the right abstraction
|
||||
# for "this team owns it" in a multi-agent fleet.
|
||||
#
|
||||
# Reviewer requests are dropped: the review-bot scans by label,
|
||||
# not by direct request, so --reviewer @me is just noise.
|
||||
--assignee)
|
||||
next_i=$((i + 1))
|
||||
val="${!next_i:-}"
|
||||
if [[ "$val" == "@me" ]]; then
|
||||
# Translate: drop --assignee, add --label team:<role-slug>
|
||||
slug=$(echo "$role" | tr '[:upper:] ' '[:lower:]-')
|
||||
new_args+=(--label "team:${slug}")
|
||||
else
|
||||
new_args+=("$arg" "$val")
|
||||
fi
|
||||
i=$((i + 2))
|
||||
continue
|
||||
;;
|
||||
--assignee=@me)
|
||||
slug=$(echo "$role" | tr '[:upper:] ' '[:lower:]-')
|
||||
new_args+=(--label "team:${slug}")
|
||||
i=$((i + 1))
|
||||
continue
|
||||
;;
|
||||
--reviewer)
|
||||
next_i=$((i + 1))
|
||||
val="${!next_i:-}"
|
||||
if [[ "$val" == "@me" ]]; then
|
||||
# Drop entirely — review-bot picks up via label scan
|
||||
: # no-op
|
||||
else
|
||||
new_args+=("$arg" "$val")
|
||||
fi
|
||||
i=$((i + 2))
|
||||
continue
|
||||
;;
|
||||
--reviewer=@me)
|
||||
# Drop entirely
|
||||
i=$((i + 1))
|
||||
continue
|
||||
;;
|
||||
*)
|
||||
new_args+=("$arg")
|
||||
i=$((i + 1))
|
||||
|
||||
Loading…
Reference in New Issue
Block a user