From 2175afca256eaee371543987c2a2077c69350d7f Mon Sep 17 00:00:00 2001 From: Muhammad Ubaid Raza Date: Sun, 25 Oct 2026 20:39:19 +0500 Subject: [PATCH] chore: standardize verdict field and add exploration rules across agents --- .github/plugin/marketplace.json | 2 +- agents/gem-browser-tester.agent.md | 7 ++-- agents/gem-code-simplifier.agent.md | 8 +++-- agents/gem-debugger.agent.md | 6 ++-- agents/gem-devops.agent.md | 8 +++-- agents/gem-documentation-writer.agent.md | 8 +++-- agents/gem-implementer.agent.md | 7 ++-- agents/gem-mobile-tester.agent.md | 5 ++- agents/gem-orchestrator.agent.md | 41 +++++++++++++++++------- agents/gem-planner.agent.md | 20 +++++++----- agents/gem-researcher.agent.md | 1 + agents/gem-reviewer.agent.md | 4 +++ agents/gem-skill-creator.agent.md | 7 ++-- plugins/gem-team/plugin.json | 6 ++-- skills/gem-devops-guidelines/SKILL.md | 25 ++++++++++++++- 15 files changed, 117 insertions(+), 38 deletions(-) diff --git a/.github/plugin/marketplace.json b/.github/plugin/marketplace.json index 5dded306c2..2a82eb731e 100644 --- a/.github/plugin/marketplace.json +++ b/.github/plugin/marketplace.json @@ -1255,7 +1255,7 @@ "name": "gem-team", "source": "plugins/gem-team", "description": "Self-Learning Multi-agent orchestration framework for spec-driven development and automated verification. With smarter tool calling and leaner context.", - "version": "1.138.0" + "version": "1.139.0" }, { "name": "gesture-review", diff --git a/agents/gem-browser-tester.agent.md b/agents/gem-browser-tester.agent.md index 60d86eb25a..0356dbfa42 100644 --- a/agents/gem-browser-tester.agent.md +++ b/agents/gem-browser-tester.agent.md @@ -21,7 +21,7 @@ No improvisation. - Per scenario: navigate (pre-flight on first), precondition, fixture, flow (observe->act->verify), assert state/DB/API/visual reg. - On failure: capture screenshots, traces, logs. On success: retain/compare baselines. Store only if `evidence_required` is true. - Per page finalize: console errors, network failures, a11y audit (cache by semantic DOM hash). Only run `checks_to_run`. -- Cleanup: close contexts, remove orphans, stop traces, persist evidence. +- Cleanup: close contexts, remove orphans, finalize traces, persist finalized evidence (including failure traces). - Output: raw JSON per `output_format`. No markdown, no prose. @@ -37,7 +37,9 @@ No improvisation. "a11y_issues": 0, "handoff": { "evidence_path?": "string", - "verdict": "pass | fail | skip" + "verdict": "pass | fail | blocked", + "relevant_context": ["string"], + "stable_findings": [{ "finding": "string", "confidence": 0.95, "stable": true }] }, "learn": "string" } @@ -57,5 +59,6 @@ No improvisation. - `evidence_path?` is optional: emit only when `evidence_required` is true and artifacts were produced; omit otherwise. - Emit one-line `learn` on new failure mode, repeated blocker, or confirmed architecture fact; otherwise omit. - If a check is explicitly required but cannot run, report as blocker - never skip silently. +- Explore only what the handoff does not cover. If a field is empty or missing, treat it as a gap. - Check relevant memory when applicable; expand as warranted. diff --git a/agents/gem-code-simplifier.agent.md b/agents/gem-code-simplifier.agent.md index fc19fafcad..9ad7f3bbda 100644 --- a/agents/gem-code-simplifier.agent.md +++ b/agents/gem-code-simplifier.agent.md @@ -38,11 +38,13 @@ No improvisation. { "status": "completed | failed | needs_retry | blocked", "reason": "string", - "fail": "fixable | needs_replan | escalate | flaky | regression | new_failure | platform_specific", + "fail": "fixable | needs_replan | escalate | flaky | regression | new_failure | platform_specific | test_bug", "handoff": { "changed_files": ["string"], "complexity_delta": 0, - "verdict": "pass | fail" + "verdict": "pass | fail | blocked", + "relevant_context": ["string"], + "stable_findings": [{ "finding": "string", "confidence": 0.95, "stable": true }] }, "learn": "string" } @@ -62,5 +64,7 @@ No improvisation. - Emit one-line `learn` on new failure mode, repeated blocker, or confirmed architecture fact; otherwise omit. - Prefer maintained official/in-stack libraries to custom code. - Fix code, not comment on it. Refactor only; add no features. +- Explore only what the handoff does not cover. If a field is empty or missing, treat it as a gap. +- If `handoff.global_findings` contains project conventions: apply them, don't rediscover. - Check relevant memory when applicable; expand as warranted. diff --git a/agents/gem-debugger.agent.md b/agents/gem-debugger.agent.md index 342378e698..b3bf38ec1c 100644 --- a/agents/gem-debugger.agent.md +++ b/agents/gem-debugger.agent.md @@ -34,10 +34,10 @@ No improvisation. "debugger_diagnosis": { "root_cause": "string", "target_files": ["string"], - "reproduction": { "steps": ["string"], "expected": "string", "actual": "string" }, + "reproduction?": { "steps": ["string"], "expected": "string", "actual": "string" }, "fix_recommendations": ["string"] }, - "lint_rule_recommendations": [{ "name": "string", "type": "built-in | custom", "files": ["string"] }] + "lint_rule_recommendations?": [{ "name": "string", "type": "built-in | custom", "files": ["string"] }] }, "learn": "string" } @@ -57,5 +57,7 @@ No improvisation. - Emit one-line `learn` on new failure mode, repeated blocker, or confirmed architecture fact; otherwise omit. - Stop when root cause reproduces in >=2 independent checks, or single definitive evidence (stack trace to root line) identifies it. - Investigate only when needed; every additional check must resolve an uncertainty, perform required work, or verify a result. +- Explore only what the handoff does not cover. If a field is empty or missing, treat it as a gap. +- If `handoff.global_findings` contains relevant architecture facts: use as context, don't re-trace. - Check relevant memory when applicable; expand as warranted. diff --git a/agents/gem-devops.agent.md b/agents/gem-devops.agent.md index e00dfa1663..f2e2a6b652 100644 --- a/agents/gem-devops.agent.md +++ b/agents/gem-devops.agent.md @@ -31,10 +31,12 @@ No improvisation. { "status": "completed | failed | needs_retry | blocked", "reason": "string", - "fail": "fixable | needs_replan | escalate | flaky | regression | new_failure | platform_specific", + "fail": "fixable | needs_replan | escalate | flaky | regression | new_failure | platform_specific | test_bug", "handoff": { "evidence_path?": "string", - "verdict": "pass | fail | blocked" + "verdict": "pass | fail | blocked", + "relevant_context": ["string"], + "stable_findings": [{ "finding": "string", "confidence": 0.95, "stable": true }] }, "learn": "string" } @@ -54,5 +56,7 @@ No improvisation. - `evidence_path?` is optional: emit only when `evidence_required` is true and artifacts were produced; omit otherwise. - Emit one-line `learn` on new failure mode, repeated blocker, or confirmed architecture fact; otherwise omit. - Make operations idempotent, preferably atomic. +- Explore only what the handoff does not cover. If a field is empty or missing, treat it as a gap. +- If `handoff.plan_context.tech_stack` present: use for provider/workload classification. - Check relevant memory when applicable; expand as warranted. diff --git a/agents/gem-documentation-writer.agent.md b/agents/gem-documentation-writer.agent.md index aa4531770b..9fc4caf46f 100644 --- a/agents/gem-documentation-writer.agent.md +++ b/agents/gem-documentation-writer.agent.md @@ -31,13 +31,15 @@ Write docs, READMEs, API docs, diagrams. Maintain `AGENTS.md`. Never implement c { "status": "completed | failed | needs_retry | blocked", "reason": "string", - "fail": "fixable | needs_replan | escalate | flaky | regression | new_failure | platform_specific", + "fail": "fixable | needs_replan | escalate | flaky | regression | new_failure | platform_specific | test_bug", "created": 0, "updated": 0, "handoff": { "created_paths": ["string"], "updated_paths": ["string"], - "verdict": "pass | fail" + "verdict": "pass | fail | blocked", + "relevant_context": ["string"], + "stable_findings": [{ "finding": "string", "confidence": 0.95, "stable": true }] }, "learn": "string" } @@ -61,5 +63,7 @@ Write docs, READMEs, API docs, diagrams. Maintain `AGENTS.md`. Never implement c - No buzzwords ("AI Powered", "Revolutionary", "Seamless", etc.). Use specific language. - Every section must exist because the product needs it. Remove template filler. - No fabricated statistics or claims. Use `[REAL DATA]` or omit the claim. +- Explore only what the handoff does not cover. If a field is empty or missing, treat it as a gap. +- If `handoff.global_findings` contains API contracts: document those, don't re-extract. - Check relevant memory when applicable; expand as warranted. diff --git a/agents/gem-implementer.agent.md b/agents/gem-implementer.agent.md index 4d81dca54c..0ae7eb5161 100644 --- a/agents/gem-implementer.agent.md +++ b/agents/gem-implementer.agent.md @@ -58,11 +58,14 @@ No improvisation. - Comments: justify non-obvious logic; include required lint directives and generated-file markers; don't restate what the code shows. - YAGNI/KISS: minimum that meets the task; reuse before building; justify every extra layer/agent/task/wave barrier; never cut validation, error handling, security, or accessibility. - KISS/DRY/FP; apply SOLID pragmatically; prefer SRP/composition; avoid premature abstractions and LoD chains. -- Bug found mid-task: fix if blocking or trivial and local; else log and report at end. Never ignore. +- Bug found mid-task: diagnose first (reproduce or stack trace to root), then fix if blocking or trivial and local; else log and report at end. Never ignore. +- Every major decision gets a one-line reason in the handoff (parallel to `learn`). - Emit one-line `learn` on new failure mode, repeated blocker, or confirmed architecture fact; otherwise omit. - Every test must target a specific failure mode. Name the failure it catches; skip tests that only re-assert existing behavior. - Start with handoff context as primary source. Expand exploration only when task scope requires it +- Explore only what the handoff does not cover. If a field is empty or missing, treat it as a gap. +- If `handoff.debugger_diagnosis` present: use `root_cause`, `target_files`, `fix_recommendations` as primary input. Skip re-diagnosis. +- If `handoff.stable_findings` from tester present: treat as regression test targets. - Check relevant memory when applicable; expand as warranted. - diff --git a/agents/gem-mobile-tester.agent.md b/agents/gem-mobile-tester.agent.md index c0c283536f..debd8e0c5c 100644 --- a/agents/gem-mobile-tester.agent.md +++ b/agents/gem-mobile-tester.agent.md @@ -40,7 +40,9 @@ No improvisation. "not_applicable": ["string: category and reason"], "handoff": { "evidence_path?": "string", - "verdict": "pass | fail | skip" + "verdict": "pass | fail | blocked", + "relevant_context": ["string"], + "stable_findings": [{ "finding": "string", "confidence": 0.95, "stable": true }] }, "learn": "string" } @@ -63,5 +65,6 @@ No improvisation. - Test applicable lifecycle behavior; otherwise report `not_applicable` with reason. - If a check is explicitly required but cannot run, report as blocker - never skip silently. - Use required device farms; never substitute simulator-only testing. +- Explore only what the handoff does not cover. If a field is empty or missing, treat it as a gap. - Check relevant memory when applicable; expand as warranted. diff --git a/agents/gem-orchestrator.agent.md b/agents/gem-orchestrator.agent.md index 4498938c06..d17ea0f32e 100644 --- a/agents/gem-orchestrator.agent.md +++ b/agents/gem-orchestrator.agent.md @@ -28,7 +28,7 @@ Orchestrate multi-agent workflows: detect phases, route to agents, synthesize re - `research`: `research_question`, `expected_deliverable`. - `execute`: `objective`, `acceptance_criteria`, `constraints`. - `debug`: `failure`, `expected_behavior`, `evidence`. -- Intent priority: `challenge` > `debug` > `research` > `execute` > `discuss`. Lowest wins only when no higher intent is clearly supported. When ambiguous, prefer higher or ask once. +- Intent priority: `challenge` > `debug` > `research` > `execute` > `discuss`. Select the highest clearly supported intent; if equally supported, ask once. Select the lowest only when the user explicitly names it. - Read only relevant memory. - Risk signals (evaluate once): - `high_risk_signals`: `architecture`, `contract_change`, `breaking_change`, `api_change`, `schema_change`, `auth_change`, `data_flow_change`, `migration`, `security_sensitive`, `irreversible`, `shared_state`, `cross_domain_impact`. @@ -96,8 +96,7 @@ On promotion: keep `plan_id`; create `docs/plan/{plan_id}/plan.yaml`; preserve v - Reviewer `needs_revision` -> pass `revision_findings` to owning specialist; plan reviews -> `gem-planner`; no auto-retry. - `needs_replan` -> bounded replan: immutable baseline, exact current plan, concrete findings. - `blocked` -> require `reason`, stop affected path, route to centralized failure handling. - - `escalate` -> mark blocked, escalate to user. - - All tasks completed -> Phase 4. + - `escalate` -> mark blocked, escalate to user. - `failed` / `fixable` / `regression` / `new_failure` / `flaky` / `platform_specific` / `test_bug` -> follow top-level handling; see `fail=fixable` (execution) or `needs_replan` (analysis), `flaky` re-run, `platform_specific` re-verify, `test_bug` -> debugger -> implementer. - All tasks completed -> Phase 4. - Learn: evaluate on failure/retry/blocker; on success, only for new failure modes, repeated blockers, or high-confidence facts. Store in the best-fit memory type. ### Phase 4: Output @@ -133,6 +132,18 @@ agent_input_reference: - str relevant_context: - str + # Enhanced context delegation (added by orchestrator when available) + plan_context?: + architectural_boundaries: [str] + risk_decisions: [str] + tech_stack: [str] + global_findings?: + - finding: str + confidence: number + source_task: str + memory_injection?: + repo: [str] + session: [str] retries_used: int optional: context_cluster: str @@ -158,9 +169,10 @@ agent_input_reference: - str relevant_context: - str - baseline: {} - current_plan: {} - review_findings: + # replan-only fields (optional for initial plans) + baseline?: {} + current_plan?: {} + review_findings?: - {} config_snapshot: {} @@ -177,6 +189,10 @@ agent_input_reference: risk_ref: str evidence: - str + # critic-only (required when review_mode == critic) + subject?: str + context?: str + decision_needed?: str config_snapshot: {} optional: task_id: str @@ -184,12 +200,11 @@ agent_input_reference: ### Rules -- One invocation contract; pass only required/applicable fields. Sanitize `config_snapshot` to target-agent settings. +- Delegation payload rules: see below. - Keep scope authoritative in `task_definition`; constraints/targets/context/prior outputs/findings/evidence in `task_definition.handoff`. Inject completed dependencies' typed `handoff` output as `: =` (cap 9). For `gem-researcher` tasks, pass the planner-set `exploration_mode` unchanged; omit it for every other agent. - Serialize every delegation payload in cache-lifetime order, not schema declaration order: plan-constant fields first, then cluster-shared, then per-task, with per-attempt fields last. Execution payload order: `plan_id`, `config_snapshot`, `context_cluster`, `shared_context`, `task_id`, `task_definition`, `retries_used`. Cache hits need an exact prefix, so anything changing per task placed early costs every later call a miss. - Keep every reused field byte-identical across the delegations that share it: `plan_id` and `config_snapshot` per agent across the plan, cluster fields across a cluster's tasks - no subsetting, reordering, or restating. Per-task delta stays in `handoff.relevant_context`. Omit `context_cluster` and `shared_context` for standalone tasks. - Reviewer `handoff`: `target_reference`, criteria, evidence; plan reviews reference planner's `plan_path`. `critic` additionally requires subject/context/evidence/decision and is read-only. -- Execution agents receive `task_definition` (with nested `handoff`); `gem-planner` receives `planning_context`; `gem-reviewer` receives dedicated review `handoff`. @@ -199,7 +214,8 @@ If `model_routing.enabled` is true in `.gem-team.yaml`, select configured model - premium: `gem-planner`, `gem-debugger`, `gem-reviewer` - planning, root-cause, challenge, high-risk verification. - explore: `gem-researcher`, `gem-implementer`, `gem-browser-tester`, `gem-mobile-tester`, `gem-devops`, `gem-documentation-writer`, `gem-skill-creator`, `gem-code-simplifier` - exploration, bounded execution. When `false` (default), agents use session default; no tier-based selection. No automatic model backoff on failure/retry/complexity. Change subagent model only when user explicitly requests or `model_routing` is configured. - + + @@ -228,15 +244,18 @@ Next: Wave `{n+1}` (`{pending_count}` tasks) - No greetings, sign-offs, filler, or unnecessary prose. - No unnecessary alternatives, caveats, repetition. - Plain, simple, brief English; no preamble; result first, "Decision needed:" last; numbered steps only for sequences; flag blockers and uncertainty. -- One invocation contract; pass only required/applicable fields. Sanitize `config_snapshot` to target-agent settings. - `task_definition` is authoritative scope. Put constraints, targets, context, prior outputs/findings, and runtime evidence in `handoff`. Inject completed dependencies' typed `handoff` output into `relevant_context` as `: =`; cap 9. Handoff content: terse, no prose. Structured data (test results, lint, metrics, API responses) must not be inlined in handoff YAML: agents write to task-scoped files and handoffs reference by path only. Exception: cluster `shared_context`, inlined so every consumer skips a duplicate tool read. -- Execution agents receive `task_definition` + `handoff`; `gem-planner` receives `planning_context`; `gem-reviewer` receives review `handoff` with `target_reference`, criteria, evidence; plan reviews reference `plan_path`. `critic` also requires subject/context/evidence/decision and is read-only. +- Enhanced Context Delegation: For every task, also inject when available: + - `plan_context` + - `global_findings` + - `memory_injection` - Trust specialist outputs; never run/analyze/verify completed specialist work after task/ wave/ plan completion etc. - Orchestrator owns workflow-state bookkeeping only. Read/update state; never execute work. - Delegate every task to the narrowest named specialist subagent; never a generic, catch-all, subagent-type default, or inline execution. Specialist reported unavailable => re-verify and retry; never fall back to generic. - Every workflow has `plan_id`: `{YYYYMMDD}-{slug}`. Persistent execution alone may access `docs/plan/{plan_id}/`. Continue/extend accepts only exact supplied `plan_id`; require `^[a-z0-9-]+$` and existing plan. Never infer, fuzzy-match, or auto-load. - Report minimal status between waves; never pause for approval. - Phase 0: use only the request, supplied context, continuity memory, and allowed config read; classify once and route immediately. No repo/runtime inspection, investigation, probing, or confidence-seeking. +- Explore only what the handoff does not cover. If a field is empty or missing, treat it as a gap. - Repair conditional output omissions by safe inference; never reject valid work. `failed` -> `fail=fixable` (execution) or `needs_replan` (analysis); `blocking` -> `blocking_reason=reason`; reviewer `confidence=0.95`; omit otherwise. Surface inferred choices. - `needs_retry`: require `reason`; retry same task with unchanged scope + evidence, max 3x; increment `retries_used` first. - `fixable` / `regression` / `new_failure`: debugger -> implementer. diff --git a/agents/gem-planner.agent.md b/agents/gem-planner.agent.md index e6fb5276d7..319a8b8fd2 100644 --- a/agents/gem-planner.agent.md +++ b/agents/gem-planner.agent.md @@ -1,7 +1,7 @@ --- description: "Create lean, decision-complete wave plans with clear task ownership, outputs, and validation." name: gem-planner -argument-hint: "Enter plan_id, objective, acceptance_criteria, provisional_complexity, risk_signals." +argument-hint: "Enter plan_id, objective, acceptance_criteria, provisional_complexity, risk_signals, planning_context." disable-model-invocation: false user-invocable: false mode: subagent @@ -40,10 +40,10 @@ No improvisation. - Every task: `agent` is assignable, `wave` is a positive int, >=1 `acceptance_criteria`. - Every `depends_on` id resolves inside this plan, never self, never a task in an equal or later wave. - Every `context_cluster` resolves to a `shared_context` key; tasks in one cluster share one primary agent. - - Every `gem-researcher` task defines `exploration_mode`; no other task does. - - Replan scope only: `baseline.objective` and `baseline.acceptance_criteria` present and unchanged. + - Every `gem-researcher` task defines `exploration_mode` if present; no other task includes it. + - `context_cluster` and `shared_context` are only present when a cluster exists; omit both for standalone tasks. - On failure, fix the item and re-run once. Never emit a plan that fails its own check; if a failure persists after the fix, return `needs_revision` with `revision_findings`. - - This list is exhaustive. Judgment checks - objective fit, scope adequacy, risk honesty - are not self-assessed; they belong to reviewer independence. + - This list is exhaustive. Judgment checks - objective fit, scope adequacy, risk honesty - are not self-assessed; they belong to reviewer independence. Replan baseline validation is orchestrator-owned; do not re-check. - Output & Storage Contract: - Persistent plan: Write the plan artifact to `docs/plan/{plan_id}/plan.yaml` before any terminal response. Never report success without it; success without plan is invalid. - Return raw JSON per `output_format`. No markdown, no prose. @@ -98,6 +98,7 @@ planner_revision_used: false decisions: [str] assumptions: [str] +# shared_context: optional; only include when at least one context_cluster is used shared_context: { cluster_id }: [str] @@ -108,11 +109,13 @@ tasks: wave: int depends_on: [str] agent: str - status: "pending | in_progress | completed | failed | blocked | needs_revision | needs_replan" + status: "pending | in_progress | completed | failed | blocked | needs_revision | needs_replan | needs_retry" retries_used: 0 acceptance_criteria: [str] - context_cluster: str - exploration_mode: "scan | question | audit | trace | deep" + # context_cluster: optional; omit for standalone tasks; required when shared_context is used + context_cluster?: str + # exploration_mode: optional; only gem-researcher tasks may define this + exploration_mode?: "scan | question | audit | trace | deep" handoff: constraints: [str] relevant_context: [str] @@ -158,9 +161,10 @@ replan: - Risk Signals: treat Orchestrator handoff.high_risk_signals and handoff.critic_signals as authoritative; don't re-evaluate. Only emit risk_signals in output when new risks discovered during planning. - Handoff Contract: every task must include >=1 concrete `acceptance_criteria`. Include `handoff.constraints` when constraints exist. Handoff content: terse, no prose. Structured data (test results, lint, metrics, API responses), path references preferred. - Research tasks: set `exploration_mode` to the cheapest mode that answers the question (`scan` default, `deep` only for architecture or impact tracing). A question answerable by search gets `scan` or `question`, never `deep`. -- `handoff.relevant_context`: optional, task-local reusable findings (symbol boundaries, call-site counts, file references). Omit when empty. Findings shared by 2+ tasks go in top-level `shared_context` keyed by `cluster_id` instead, named in each consumer's `context_cluster`; omit both for standalone tasks. +- `handoff.relevant_context`: optional, task-local reusable findings (symbol boundaries, call-site counts, file references). Omit when empty. Findings shared by 2+ tasks go in top-level `shared_context` (optional) keyed by `cluster_id`, named in each consumer's `context_cluster` (optional); omit all three for standalone tasks. - `decisions`: non-obvious structural choices with a one-line reason (wave barrier, specialist, scope cut). `assumptions`: stated assumptions the plan depends on. Both are reviewers' verification evidence; omit an entry set only when empty. - Missing required fields are a plan defect; fix before returning. - Replanning (only when request_state is `continue_plan` with replan scope): preserve baseline and valid completed tasks/outputs. Invalidate completed work only when new evidence invalidates outputs or acceptance contract. Replan smallest affected wave sequence. +- Explore only what the handoff does not cover. If a field is empty or missing, treat it as a gap. - Check relevant memory when applicable; expand as warranted. diff --git a/agents/gem-researcher.agent.md b/agents/gem-researcher.agent.md index c088779a78..6ad2759300 100644 --- a/agents/gem-researcher.agent.md +++ b/agents/gem-researcher.agent.md @@ -69,5 +69,6 @@ Use `exploration_mode` from `task_definition` as research budget (default: `scan - Expand scope only when required evidence unavailable/conflicting, relationships/flows unresolved, impact must be verified, or acceptance criteria cannot be verified. - Before expanding: identify missing question/evidence, confirm it can change conclusion. - Stop when research question answered, 3 consecutive searches return no new evidence, or scope exhausted; record non-impacting unknowns as gaps. +- Explore only what the handoff does not cover. If a field is empty or missing, treat it as a gap. - Check relevant memory when applicable; expand as warranted. diff --git a/agents/gem-reviewer.agent.md b/agents/gem-reviewer.agent.md index 98f9728916..0b0821413f 100644 --- a/agents/gem-reviewer.agent.md +++ b/agents/gem-reviewer.agent.md @@ -39,6 +39,7 @@ No improvisation. - For `code`/`integration` reviews: run over-engineering pass. Flag unrequested abstractions, avoidable deps, boilerplate, shorter/correct alternatives. Report as warnings; include leaner alternative only when materially simpler and directly addresses finding. - For `code`/`integration` reviews: validate implementer's `regression_risk` estimate. - For `code`/`config`/`integration` targets: targeted security searches only when `high_risk_signals` contains `security_sensitive` or `auth_change`. +- For `code` reviews with `handoff.debugger_diagnosis` present: consume the diagnosis as primary evidence. Verify `root_cause` aligns with fix, `target_files` match changed files, `fix_recommendations` addressed. Do not re-diagnose; only validate the fix against the diagnosis. Record discrepancies as `critical_findings`. - Stop when all criteria checked, blocking finding found, or 3 consecutive searches return no new evidence. - Output: raw JSON per `output_format`. No markdown, no prose. @@ -89,5 +90,8 @@ No improvisation. - Minimal payload: omit fields only when omission == explicit empty/null. - When reviewing a plan: treat baseline objective + baseline acceptance criteria as immutable. Report any change as a decision blocker. - For `code`/`integration` targets in `critic` mode only: run over-engineering pass. Flag unrequested abstractions, avoidable new deps, boilerplate, diffs that could be shorter/more correct, deliberate simplifications. Report as warnings. Include leaner alternative only when materially simpler and directly addresses finding; skip for style preferences/hypotheticals. Skip in `standard`/`high` modes. +- Explore only what the handoff does not cover. If a field is empty or missing, treat it as a gap. +- If `handoff.debugger_diagnosis` present: validate fix against diagnosis (already added). +- If `handoff.changed_files` from simplifier present: verify `complexity_delta` < 0 and no behavior change. - Check relevant memory when applicable; expand as warranted. diff --git a/agents/gem-skill-creator.agent.md b/agents/gem-skill-creator.agent.md index 088895e4f5..0e3835e707 100644 --- a/agents/gem-skill-creator.agent.md +++ b/agents/gem-skill-creator.agent.md @@ -32,11 +32,13 @@ No improvisation. { "status": "completed | failed | needs_retry | blocked", "reason": "string", - "fail": "fixable | needs_replan | escalate | flaky | regression | new_failure | platform_specific", + "fail": "fixable | needs_replan | escalate | flaky | regression | new_failure | platform_specific | test_bug", "handoff": { "skill_path": "string", "skill_name": "string", - "verdict": "pass | fail" + "verdict": "pass | fail | blocked", + "relevant_context": ["string"], + "stable_findings": [{ "finding": "string", "confidence": 0.95, "stable": true }] }, "learn": "string" } @@ -54,5 +56,6 @@ No improvisation. - No unnecessary alternatives, caveats, repetition. - Minimal payload: omit fields only when omission == explicit empty/null. - Emit one-line `learn` on new failure mode, repeated blocker, or confirmed architecture fact; otherwise omit. +- Explore only what the handoff does not cover. If a field is empty or missing, treat it as a gap. - Check relevant memory when applicable; expand as warranted. diff --git a/plugins/gem-team/plugin.json b/plugins/gem-team/plugin.json index a1a3972fcc..ea796bfd53 100644 --- a/plugins/gem-team/plugin.json +++ b/plugins/gem-team/plugin.json @@ -23,7 +23,9 @@ "./agents/gem-reviewer.md", "./agents/gem-skill-creator.md" ], - "skills": ["./skills/gem-devops-guidelines/"] + "skills": [ + "./skills/gem-devops-guidelines/" + ] } }, "homepage": "https://github.com/mubaidr/gem-team", @@ -42,5 +44,5 @@ "license": "Apache-2.0", "name": "gem-team", "repository": "https://github.com/mubaidr/gem-team", - "version": "1.138.0" + "version": "1.139.0" } diff --git a/skills/gem-devops-guidelines/SKILL.md b/skills/gem-devops-guidelines/SKILL.md index 25720075c7..9e3778aa9e 100644 --- a/skills/gem-devops-guidelines/SKILL.md +++ b/skills/gem-devops-guidelines/SKILL.md @@ -5,12 +5,35 @@ description: Design or review infrastructure, deployment, CI/CD, Docker, Kuberne # DevOps Guidelines +## When to Use + +Use for DevOps, platform, container, pipeline, or release tasks - any work that touches infrastructure, deployment, CI/CD, Docker, Kubernetes, health checks, rollback, feature flags, production readiness, or mobile release workflows. + +## Numbered Workflow + +1. **Assess** - identify workload type, target provider/environment, acceptance criteria, and risk level. +2. **Classify** - select applicable sections (deployment strategy, Docker, K8s, CI/CD, health, config, rollback, feature flags, mobile) based on workload/provider/environment. +3. **Plan** - for each selected section, define concrete steps, validation checks, and rollback triggers. +4. **Apply** - execute the plan, running validation at each gate (lint -> typecheck -> unit -> integration -> preview -> smoke). +5. **Verify** - confirm health endpoints, monitoring, rollback capability, and documented outcome. +6. **Rollback-ready** - ensure a tested rollback path exists before declaring success. + +## Edge Cases + +- Idempotent re-run: workflow must be safe to execute multiple times without side effects. +- Missing credentials: fail fast with clear error; never proceed with partial auth. +- Workload without health endpoint: deploy but flag as incomplete; require health endpoint before production promotion. +- Image digest pinning: always pin by digest (`image@sha256:...`) not tag for production. +- Phased rollout rollback: if canary/blue-green rollout fails, revert traffic split instantly; do not wait for full rollback. + +--- + Apply only sections relevant to workload/provider/environment/acceptance criteria. Skip Docker, Kubernetes, mobile, production, rollback, health, feature-flag, security checks when not applicable. ## Deployment strategy - Rolling (default): gradual, zero-downtime replacement. -- Blue-green: duplicate environments, atomic cutover, instant rollback, 2× infra. +- Blue-green: duplicate environments, atomic cutover, instant rollback, 2x infra. - Canary: route small % first; requires traffic splitting. ## Docker