agents: discussion mode — devs talk in threads; building starts only on explicit signal
ci / lint (push) Skipped
ci / lint (pull_request) Successful in 11s
ci / lint (push) Skipped
ci / lint (pull_request) Successful in 11s
Mentioning a dev agent no longer spawns a branch + PR machinery. It is a
CONVERSATION by default: the dev reads what it needs and replies in-thread.
- route.sh: workmode=build|discuss for mode=pr agents. Build ONLY on the
explicit signals: PR-thread comments (resume), the pm delegation template
("please proceed with issue …" — a human can write it too), or the qa bounce
("please address my review …"). Everything else = discuss: no branch prep,
no "🔨 Building" notice.
- run-agent.sh: discussion ACTION for devs (read-only consult, no edits/
commits/markers). @pm gains 'ASK: @<dev> <question>' to consult devs before
planning — gather feasibility/effort input, then DELEGATE when enough is
known. One ASK per reply; never ASK+DELEGATE together.
- publish.sh: pm ASK handler posts the question as a discussion trigger; dev
discuss path posts the reply (+run report) and skips ALL git/PR machinery
(stray edits discarded). ASK marker stripped from visible replies.
- agent.yml: WORKMODE threaded to Run-agent + Publish. README documents it.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
63d9147cd7
commit
ef43d69309
@@ -73,6 +73,7 @@ reply=$(awk '
|
||||
/^[[:space:]]*BEGIN_SUBTASKS/{s=1}
|
||||
/^[[:space:]]*BEGIN_PR_DESCRIPTION/{p=1}
|
||||
/^[[:space:]]*DELEGATE:[[:space:]]*@/{next}
|
||||
/^[[:space:]]*ASK:[[:space:]]*@/{next}
|
||||
/^[[:space:]]*CLOSE_ISSUE[[:space:]]*$/{next}
|
||||
/^[[:space:]]*MERGE_PR[[:space:]]*$/{next}
|
||||
/^[[:space:]]*RETRO[[:space:]]*$/{next}
|
||||
@@ -246,6 +247,18 @@ if [ "$MODE" != "pr" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# --- @pm ASK: consult a dev in the thread WITHOUT starting a build ---
|
||||
# 'ASK: @<dev> <question>' fires the dev in DISCUSSION mode (route.sh: the trigger below does not
|
||||
# match any build phrase, so the dev replies in-thread — no branch, no PR). @pm gathers input this
|
||||
# way, then DELEGATEs when enough is known.
|
||||
ask_line=$(grep -oiE '^[[:space:]]*ASK:[[:space:]]*@(junior|senior|lead|intern)[[:space:]]+.*$' /tmp/agent_out.md 2>/dev/null | head -1)
|
||||
if [ "$NAME" = "pm" ] && [ -n "$ask_line" ]; then
|
||||
ask_dev=$(printf '%s' "$ask_line" | grep -oiE '@(junior|senior|lead|intern)' | head -1 | tr -d '@' | tr '[:upper:]' '[:lower:]')
|
||||
ask_q=$(printf '%s' "$ask_line" | sed -E 's/^[[:space:]]*ASK:[[:space:]]*@[A-Za-z]+[[:space:]]+//')
|
||||
trig "$ISSN" "@$ask_dev $ask_q — this is a discussion: reply in this thread with your assessment; do not start any work."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# --- @pm delegation: hand the build to a dev, or hand the finished PR to @qa for review ---
|
||||
# Only an explicit 'DELEGATE: @<agent>' line acts (never a prose mention). Fires via the PAT (TTOK)
|
||||
# so a new run starts; the built-in token cannot. Everything posts on the ISSUE — @pm never touches
|
||||
@@ -269,6 +282,15 @@ if [ "$MODE" != "pr" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# --- dev DISCUSSION mode: consulted for expertise, no build (route.sh workmode=discuss) ---
|
||||
# The reply is a comment on the thread — discard any stray file edits, skip ALL git/PR machinery.
|
||||
if [ "${WORKMODE:-build}" = "discuss" ]; then
|
||||
git checkout -- . 2>/dev/null || true
|
||||
git clean -fd 2>/dev/null || true
|
||||
post "$(printf '%s%s' "$reply" "$activity")"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Scrub the runtime scripts checkout (.agents-workflow) from the tree so it never lands in a
|
||||
# commit/PR and never confuses the git ops below (issue #33). The scripts we run live outside the
|
||||
# workspace ($SCRIPTS -> runner.temp), so removing this in-tree copy is always safe. Handle every
|
||||
|
||||
Reference in New Issue
Block a user