Removes the last Anthropic-model usage from the agent registry.
XAI_API_KEY was already provisioned as an org secret; wire it into
the run-agent step and update every doc/comment that referenced
ANTHROPIC_API_KEY or claude-opus-4-8.
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>
- publish.sh: resolve_prs matches ai/issue-N AND ai/issue-N-<slug> split branches
(exact-only silently stalled DELEGATE:@qa and autopilot MERGE_PR on slugged
work); qa hand-off lists all open PRs; autopilot refuses to merge multi-PR
issues (drops the label, hands to the human) — merging one of several open
PRs is half a change deployed. Retro's state=all resolve matches slugs too.
- fetch-thread.sh: paginate and keep the NEWEST 100 comments — a bare limit=100
kept the OLDEST page and dropped recent decisions on long threads.
- route.sh: word-boundary mention matching ("@internal" no longer routes to
@intern); a comment with no real agent mention now SKIPS gracefully
(mode=skip outputs + step guards in agent.yml) instead of a red run.
- run-agent.sh: LEARNINGS.md cap is line-aware and keeps the NEWEST entries
(retros append at the bottom; the old head -c cut the latest lessons first).
- agents.json/README: @pm gemma4 -> minimax-m3 — the retro rule demands an
investigating PM, and gemma4 posted 0 tool calls on every run; minimax is the
model @qa demonstrably uses tools with.
- agent.yml: document the PR-thread concurrency-group caveat.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
A stalled local-ollama generate on a trivial @intern question held the single
runner slot for ~1h, queueing every agent run instance-wide (homelab run 869).
- run-agent.sh: each opencode attempt wrapped in `timeout -k 30 $AGENT_TIMEOUT`
(default 1200s). rc=124 is not retried — a hung backend stays hung; fail fast
and free the runner.
- agent.yml: job-level timeout-minutes: 45 as backstop.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
TOKEN_OPS re-minted with write:package (was 403 on package endpoints despite ops
being site admin — token scopes gate admins too). Document package↔repo linking
and the registry auth constraints in the skill.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The dropdown summary carried dynamic numbers, so every comment's collapsed line
looked different. Now the label is literally 'details' everywhere; the headline
numbers moved to the first body line.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Comments looked different depending on the run: tool-using agents got a
collapsed <details> report while text-only replies got a bare one-line <sub>
footer. Every comment now gets the SAME dropdown — summary '🔧 N tool calls ·
in X · out Y · <cost>', body = the tool list (or '(no tool calls)') plus the
full token/cost breakdown.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Seen on issue #83: qa's approval pasted whitespace-nit detail into the issue
thread. The issue is for the creator/orchestration; review internals belong on
the PR. On APPROVE the full reply (+run report) now posts to the PR and the
issue gets exactly '✅ Reviewed PR #N — looks good.' (falls back to the issue
only if no PR could be resolved).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
New learning step: ask @pm for a retrospective on any issue and the system
turns what happened into prompt-visible rules for future runs.
- run-agent.sh: @pm gains a RETRO marker (emit only when the maintainer asks);
LEARNINGS.md (caller repo root, capped at 4KB) is injected into EVERY agent's
prompt as "TEAM LEARNINGS" — the feedback loop that makes delegation more
robust over time.
- publish.sh: on @pm's RETRO marker, open a "retro: issue #N" issue pointing at
the issue + its PR (state=all resolve, works after merge) and trigger @senior
on it (has gitea-api to read both threads). The retro produces a LEARNINGS.md
PR through the NORMAL choreography (senior → pm → qa), so retros are reviewed
like any change. Strip the RETRO marker from visible replies.
- publish.sh: bounce counter now counts only @qa-authored comments matching the
exact trigger template — on PR #84 it jumped 1/3 → 3/3 because a qa review
QUOTED our own "(fix attempt …)" template from the diff, halving the fix
budget. Template + regex pinned together with a sync note.
- README: document the retro loop.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The fixed trigger templates referred to their own author in the third person —
e.g. @qa posting 'please address @qa's review above' (seen on PR #80) or a dev
posting 'the dev has pushed an update'. Reworded to first person ('my review',
'I have pushed', 'per my plan'), which also makes routing order-independent:
each trigger now mentions ONLY its target agent.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Fixes from a full repo review:
- fetch-thread.sh: attribute every comment to its REAL author (@pm/@qa/… —
agents post as their own users now); the old "🤖 @name line at the top" hint
pointed at headers we removed, leaving every teammate comment anonymous. Also
strip the hidden loop-prevention marker from bodies (prompt noise).
- agent.yml: per-issue concurrency group (queued, no cancel) — two quick
comments on one issue no longer race the same ai/issue-N branch.
- rescue-pr.sh: after opening a rescue PR, hand it back into the flow with an
unmarked @pm trigger (the pm→qa choreography previously stalled silently on
any rescued run); drop the old "🤖 **@name**" header style; add ops to the
token case; mark the status note with the hidden marker.
- README: token table said "@qa merges / TOKEN_QA needs write:repository" —
inverted since the PM-orchestrated flow (@pm merges, autopilot only; @qa is
read-only). Updated the agent table (descs, node1-ssh moved to homelab) and
added a "How a task flows" section.
- agents.json: pm/qa descs now describe the orchestrator/reviewer roles (these
feed the roster prompt agents route by).
- NEW ci.yml: bash -n + shellcheck(-S error) on every script, YAML-parse on
every workflow, agents.json schema check — the ${x:-{}} brace bug would have
been caught here before it shipped.
- install-opencode.sh: pin opencode (default 1.17.13, override via
OPENCODE_VERSION) — a breaking release no longer takes down every agent.
- build-activity-log.sh: ollama/ollama-cloud models are subscription-billed
(no $/token exists) — label the footer "subscription" instead of a
misleading $0.0000; metered (anthropic) models keep the real dollar cost.
- route.sh: document that mention-priority is list-order and load-bearing for
the flow's trigger comments.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Each run now appends a report to the agent's reply: the tool calls it made plus
input/output token totals and the dollar cost. opencode's --format json emits
per-step `tokens` and `cost` (USD, priced from the model) on step_finish events;
build-activity-log.sh sums them across the run.
- build-activity-log.sh: compute for EVERY agent (not just devs — @pm/@qa also
call tools and cost money); output a collapsed <details> report (summary line
shows "N tool calls · in X · out Y · $Z"; body lists the tools + a token/cost
breakdown). Zero-tool runs get a one-line "$Z · in X · out Y" footer.
- publish.sh: build $activity once (near the top) and append it to every agent's
reply — @pm plan/finalize, @qa verdict/recommendations, and dev PR comments.
- agent.yml: rename the step accordingly.
Models without pricing (self-hosted ollama) report cost $0.0000.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Rework the delegation/trigger choreography so @pm orchestrates end-to-end from
the issue thread while @qa reviews on the PR and never merges.
Flow: issue → @pm plans (asks creator; autopilot skips) → dev builds PR → dev
pings @pm on the issue → @pm hands to @qa → @qa reviews ON THE PR (recommends /
BOUNCE:@dev, direct qa↔dev loop, 3 max) → @qa APPROVEs → verdict on the ISSUE →
@pm → normal: tells creator "ready to merge" (human merges); autopilot: @pm
MERGE_PR. @pm never reads or comments on the PR (small context); @qa never merges.
- run-agent.sh: @pm prompt = 3 phases (plan / hand PR to @qa / finalize),
autopilot only drops the approval gate + adds @pm MERGE_PR. @qa prompt =
reviewer, ends with APPROVE / BOUNCE:@dev / HALT; identical in both flows.
- publish.sh: shared post_to()/trig()/resolve_pr() helpers + ISSN; @qa routes
reply to PR (bounce) vs issue (approve) and fires @pm/@dev; @pm handles
DELEGATE:@dev, DELEGATE:@qa (resolves the PR), and autopilot MERGE_PR; dev
NEW=true fires @pm on the issue, NEW=false fires @qa on the PR. Strip
APPROVE/HALT markers.
Tokens re-minted to match: TOKEN_PM gains write:repository (it merges now),
TOKEN_QA drops to read:repository (never merges).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
`${VAR:-{}}` appends a stray '}' when VAR is set (bash brace-matching), so the
JSON handed to a caller skill's setup.sh was corrupted and its jq failed with
"Unmatched '}'" — install-caller-skills.sh then caught the non-zero exit and
skipped the skill. Default SECRETS_JSON in two safe steps and pass it as a plain
var. This is why node1-ssh never installed.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>