Context
@tobiu surfaced a recurring swarm failure: Gemini-family sessions can forget to invoke applicable skills when the request uses ordinary action words instead of explicit skill names. Examples include test needing disambiguation between unit-test and whitebox-e2e, and review needing disambiguation toward pr-review when the target is a PR/diff/approval cycle.
This ticket follows the existing per-turn memory pattern in AGENTS.md §21: skill awareness belongs in turn-loaded memory when missing the trigger causes silent protocol failure.
The Problem
The current workflow skill table correctly documents lifecycle skill triggers, but it assumes the agent notices that a prompt maps to a skill. In practice, prompts and A2A messages often arrive as natural-language tasks:
- "test this"
- "review this PR"
- "re-review after my fix"
- "finalize/open the PR"
- "pick up this ticket"
When the agent misses that semantic mapping, the failure happens before the skill body is ever loaded. That is especially visible in A2A contexts, where a mailbox message may be treated as coordination metadata rather than as a prompt requiring the same trigger discipline as a direct user request.
This is not a lack of skill content. It is a trigger-reflex gap.
The Architectural Reality
AGENTS.md:485 begins §21. Workflow Skills (when to invoke), the current per-turn awareness table.
AGENTS.md:487 says skills must be invoked before the trigger action and that the table exists so the trigger -> skill loop fires reliably even when context pruning evicts skill files.
AGENTS.md:502 explicitly documents the empirical failure mode: skipped skill invocation causes gate/protocol/template failures silently.
AGENTS.md:504 currently says tactical/domain skills such as unit-test and whitebox-e2e remain discoverable via directory listing rather than per-turn awareness.
AGENTS_STARTUP.md:61 already requires listing .agents/skills/ and reading relevant SKILL.md before multi-step testing/debugging/scaffolding, but this is boot/startup discipline, not a per-prompt or A2A-message pre-flight.
- Prior related issue #10365 established the compact workflow-skills table. This ticket narrows to the next missing layer: semantic trigger detection before prompt/A2A handling.
Five-stage challenge chain result:
- Premise: Real and observed in current swarm coordination; the issue is skill under-triggering, not missing skill bodies.
- Prescription: Add a compact AGENTS.md pre-flight. Do not create a new skill; the problem is detecting existing skill applicability.
- Substrate:
AGENTS.md per-turn memory owns this discipline because it must fire before planning and before opening any specific skill.
- Consumer: Agent harnesses and A2A mailbox readers. The output must be terse, router-like, and survive context pruning.
- Service Boundary: No MCP, Memory Core, or skill payload changes are required for v1.
The Fix
Add a compact "Skill Trigger Pre-Flight" near AGENTS.md §21, before the mailbox/turn-start sections. The rule should require every agent, before acting on a user prompt or A2A message, to identify the action and target object, then compare that pair against known skill triggers.
The pre-flight should explicitly cover ambiguous words by object:
review + PR/diff/approval/LGTM/re-review => pr-review
test + unit/spec/Playwright unit/file.spec => unit-test
test + E2E/end-to-end/user flow/whitebox/Neural Link => whitebox-e2e
- assigned issue / ticket pickup =>
ticket-intake
- commit / push / open PR / finalize branch =>
pull-request
- regression / "used to work" / prior decision context =>
memory-mining
The wording should say "check prompt intent against skill triggers", not "check skill names", because users and agents usually do not name the skill explicitly.
Acceptance Criteria
Out of Scope
- Creating a new skill.
- Editing
.agents/skills/* payloads.
- Building an automated skill-trigger evaluation harness. Discussion
#10320 covers broader skill trigger eval infrastructure.
- Changing MCP tool behavior or Memory Core mailbox semantics.
- Refactoring the full workflow skills table.
Avoided Traps / Gold Standards Rejected
- Naive keyword routing: Rejected.
review can mean conceptual review, PR review, or design critique; test can mean A2A smoke test, unit test, or E2E test. The trigger must use action plus target object.
- New skill for skill-triggering: Rejected. The failure happens before skill selection; a new skill would itself need to be triggered and therefore would not solve the base problem.
- Inlining full tactical skill rules into AGENTS.md: Rejected. That breaks Progressive Disclosure and bloats turn memory. AGENTS.md should only contain the router/pre-flight.
- Treating A2A as lower priority: Rejected. A2A messages can assign reviews, request re-reviews, or hand off ticket work, so they must pass through the same skill trigger gate as user prompts.
Related
- #10365 — introduced the compact per-turn workflow skills table.
- #10376 — tightened A2A commentId hand-off reflexes for PR review / PR author workflows.
- Discussion #10320 — broader skill trigger evaluation infrastructure, deliberately out of scope for this small AGENTS.md router change.
- Current Memory Core session captured the analysis and recommendation.
Origin Session ID: ea6898ba-531f-4162-996b-99e7b235c120
Retrieval Hint: "skill trigger pre-flight prompts A2A review test unit-test whitebox-e2e pr-review AGENTS.md §21 Gemini under-triggering"
Context
@tobiu surfaced a recurring swarm failure: Gemini-family sessions can forget to invoke applicable skills when the request uses ordinary action words instead of explicit skill names. Examples include
testneeding disambiguation betweenunit-testandwhitebox-e2e, andreviewneeding disambiguation towardpr-reviewwhen the target is a PR/diff/approval cycle.This ticket follows the existing per-turn memory pattern in
AGENTS.md §21: skill awareness belongs in turn-loaded memory when missing the trigger causes silent protocol failure.The Problem
The current workflow skill table correctly documents lifecycle skill triggers, but it assumes the agent notices that a prompt maps to a skill. In practice, prompts and A2A messages often arrive as natural-language tasks:
When the agent misses that semantic mapping, the failure happens before the skill body is ever loaded. That is especially visible in A2A contexts, where a mailbox message may be treated as coordination metadata rather than as a prompt requiring the same trigger discipline as a direct user request.
This is not a lack of skill content. It is a trigger-reflex gap.
The Architectural Reality
AGENTS.md:485begins§21. Workflow Skills (when to invoke), the current per-turn awareness table.AGENTS.md:487says skills must be invoked before the trigger action and that the table exists so the trigger -> skill loop fires reliably even when context pruning evicts skill files.AGENTS.md:502explicitly documents the empirical failure mode: skipped skill invocation causes gate/protocol/template failures silently.AGENTS.md:504currently says tactical/domain skills such asunit-testandwhitebox-e2eremain discoverable via directory listing rather than per-turn awareness.AGENTS_STARTUP.md:61already requires listing.agents/skills/and reading relevantSKILL.mdbefore multi-step testing/debugging/scaffolding, but this is boot/startup discipline, not a per-prompt or A2A-message pre-flight.Five-stage challenge chain result:
AGENTS.mdper-turn memory owns this discipline because it must fire before planning and before opening any specific skill.The Fix
Add a compact "Skill Trigger Pre-Flight" near
AGENTS.md §21, before the mailbox/turn-start sections. The rule should require every agent, before acting on a user prompt or A2A message, to identify the action and target object, then compare that pair against known skill triggers.The pre-flight should explicitly cover ambiguous words by object:
review+ PR/diff/approval/LGTM/re-review =>pr-reviewtest+ unit/spec/Playwright unit/file.spec =>unit-testtest+ E2E/end-to-end/user flow/whitebox/Neural Link =>whitebox-e2eticket-intakepull-requestmemory-miningThe wording should say "check prompt intent against skill triggers", not "check skill names", because users and agents usually do not name the skill explicitly.
Acceptance Criteria
AGENTS.md §21gains a compact Skill Trigger Pre-Flight applying to every user prompt and every A2A message.review,test, ticket pickup, PR finalization, and regression/history prompts.SKILL.mdfiles but does not inline heavy skill payloads.git diff --checkpasses.Out of Scope
.agents/skills/*payloads.#10320covers broader skill trigger eval infrastructure.Avoided Traps / Gold Standards Rejected
reviewcan mean conceptual review, PR review, or design critique;testcan mean A2A smoke test, unit test, or E2E test. The trigger must use action plus target object.Related
Origin Session ID: ea6898ba-531f-4162-996b-99e7b235c120
Retrieval Hint: "skill trigger pre-flight prompts A2A review test unit-test whitebox-e2e pr-review AGENTS.md §21 Gemini under-triggering"