Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/plugin/marketplace.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
7 changes: 5 additions & 2 deletions agents/gem-browser-tester.agent.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
</workflow>

Expand All @@ -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"
}
Expand All @@ -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.
</rules>
8 changes: 6 additions & 2 deletions agents/gem-code-simplifier.agent.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Expand All @@ -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.
</rules>
6 changes: 4 additions & 2 deletions agents/gem-debugger.agent.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Expand All @@ -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.
</rules>
8 changes: 6 additions & 2 deletions agents/gem-devops.agent.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Expand All @@ -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.
</rules>
8 changes: 6 additions & 2 deletions agents/gem-documentation-writer.agent.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Expand All @@ -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.
</rules>
7 changes: 5 additions & 2 deletions agents/gem-implementer.agent.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
</rules>

</rules>
5 changes: 4 additions & 1 deletion agents/gem-mobile-tester.agent.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Expand All @@ -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.
</rules>
41 changes: 30 additions & 11 deletions agents/gem-orchestrator.agent.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand Down Expand Up @@ -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 <rules> 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
Expand Down Expand Up @@ -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
Expand All @@ -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: {}

Expand All @@ -177,19 +189,22 @@ 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
```

### Rules

- One invocation contract; pass only required/applicable fields. Sanitize `config_snapshot` to target-agent settings.
- Delegation payload rules: see <rules> 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 `<task_id>: <field>=<value>` (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`.

</agent_input_reference>

Expand All @@ -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.
</model_routing>

</model_routing>

<output_format>

Expand Down Expand Up @@ -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 `<task_id>: <field>=<value>`; 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.
Expand Down
Loading
Loading