المساعِدون
عوامل مساعِدة دائمة للبحث والتدقيق والجودة والتنسيق، مع عقود البيانات الأمامية وبروتوكولات لعزل النشر.
يعيش المساعِدون الدائمون ملفاتٍ مسطّحةً تحت دليل المساعِدين المرجعي، بلاحقة
<name>.md. المسار المرجعي هو:
src/apothem/agents/كل مساعِد دور محدّد التركيز، مثل البحث أو التدقيق أو الجودة أو إعادة الهيكلة أو بناء الهياكل الأولية، له قيوده الخاصة على الأدوات ومُوجِّه النظام الخاص به.
يعرض الجدول وقائمة المسارات أدناه أربعة من المساعِدين. ويسرد الجرد المُولَّد في نهاية هذه الصفحة تعريف كل مساعِد.
| المساعِد | الملف | النمط | سياسة النموذج |
|---|---|---|---|
| Codebase Explorer | انظر مسار البيان أدناه | بحث | يختاره المضيف |
| Convention Auditor | انظر مسار البيان أدناه | تدقيق | يختاره المضيف |
| Quality Gate | انظر مسار البيان أدناه | جودة | يختاره المضيف |
| Memory Auditor | انظر مسار البيان أدناه | تدقيق | يختاره المضيف |
مسارات البيان المرجعية:
src/apothem/agents/codebase-explorer.md
src/apothem/agents/convention-auditor.md
src/apothem/agents/quality-gate.md
src/apothem/agents/memory-auditor.mdعقد البيانات الأمامية
---
name: <agent name>
version: <semver>
updated: <YYYY-MM-DD>
description: <one-line role>
tools: <comma-separated tool list>
disallowedTools: <comma-separated deny list>
maxTurns: <integer>
---الحقل tools اختياري. والمساعِد الذي يحذفه يرث كل أداة تملكها الجلسة، بما فيها
أدوات MCP الموصولة، ويحمل disallowedTools قيده. وكل المساعِدين
الأربعة عشر المشحونين يُدرِجون tools.
خوادم MCP الموصولة
المساعِد الذي يُدرِج tools لا يستطيع استدعاء إلا ما يُدرِجه. ولا يقبل
Claude Code أداة MCP في تلك القائمة إلا عندما يُسمّي المُدخَل الخادم،
كما في mcp__<server>__*؛ أمّا mcp__* المجرّد فمُوثَّق بوصفه مُدخَلًا
في disallowedTools ولا مكان آخر. وأسماء الخوادم ملك الشخص الذي يوصلها، لذا لا
يستطيع مساعِد مشحون تسميتها.
يبحث citation-auditor وresearch-scout عن المصادر العلمية. ويُشحَن
كلٌّ منهما مع tools: Read, Glob, Grep, WebSearch, WebFetch ويحظر الأدوات التي
تكتب الملفات، أو تُشغِّل الأوامر، أو تبدأ مساعِدين آخرين، أو تنشر: Write،
وEdit، وMultiEdit، وNotebookEdit، وBash،
وPowerShell، وMonitor، وAgent، وArtifact،
وأدوات قائمة المهام. ومن دون إعداد في الملف التعريفي، لا يصل أيٌّ منهما إلى أداة
MCP، ويبحث كلاهما عن المصادر عبر البحث على الويب وجلب الويب.
لمنح أحدهما فهرسًا علميًا موصولًا، سمِّ الخادم في المفتاح agent_mcp_servers
في الملف التعريفي، الذي يربط اسم عامل بأسماء خوادم. عندئذٍ يُلحِق تثبيت المحرّك لـ
Claude Code (apothem install) مُدخَلًا واحدًا
mcp__<server>__* لكل خادم مُسمّى بسطر tools لذلك العامل، ولا يُغيِّر
أي عامل آخر. ويفعل تثبيت Gemini CLI الشيء نفسه بمُدخَل واحد
mcp_<server>_* لكل خادم في قائمة سماح tools للعامل، لاسم خادم من
حروف وأرقام و-. وعلى كليهما، يبقى الخادم الذي تُسمّيه disallowedTools
الخاصة بالعامل محظورًا. والمُدخَل يقبل كل أداة من أدوات ذلك الخادم، بما فيها أي أداة
تكتب، لذا لا تُسمِّ إلا خادمًا تثق به لعمليات البحث: فتعليمات المساعِدين تقصرهم على
استدعاءات البحث، والاستعلام، والقراءة، والتحقّق، والحلّ، لكن إطار العمل لا يفرض إلا
الأسماء التي يُدرِجها سطر tools. والاسم لعامل غير موجود، أو لعامل بلا سطر
tools صريح، يُبلَّغ عنه ويُتخطّى.
تتجاهل أُطُر العمل غير Claude Code وGemini CLI المفتاح. وتُجمَّع شجرة
إضافة Claude Code من دون ملف تعريفي وتحتفظ بالقائمة العادية، لذا يُعرِّف مستخدم
الإضافة عاملًا على مستوى المستخدم تحت ~/.claude/agents/ بدلًا من ذلك. وصيغة
الملف التعريفي، وقواعد أسماء الخوادم، وذلك الحلّ البديل موجودة في
منح مساعِد الوصول إلى خوادم MCP.
التحويل لكل إطار عمل
المساعِد الذي لا تتضمّن منحةُ tools الخاصة به، بعد disallowedTools،
أي أداة لتحرير الملفات (Write، أو Edit، أو MultiEdit، أو
NotebookEdit) هو مساعِد للقراءة فقط. والمساعِد الذي لا يملك منحة
tools يكون للقراءة فقط عندما تحظر disallowedTools على الأقل
Write وEdit. وكل إطار عمل يحوّل المساعِدين إمّا أن يفرض هذا القيد
أصليًا، أو يذكره في تعليمات المساعِد، أو يُسقِط وسم «للقراءة فقط»:
| إطار العمل | قيد الأدوات | قيد الأدوار | النموذج والجهد |
|---|---|---|---|
| Claude Code | tools / disallowedTools كما كُتبت، إضافة إلى أي مُدخَلات mcp__<server>__* يُضيفها المفتاح agent_mcp_servers في الملف التعريفي إلى سطر tools مُدرَج؛ ومن دون tools تُورَث كل أداة، بما فيها MCP | maxTurns | موروث (غير مضبوط) |
| Codex | لا يُصدَر شيء؛ تذكره تعليمات المساعِد، ويحكم صندوقُ الحماية للجلسة الأم عملياتِ الكتابة | غير متاح | موروث (غير مضبوط) |
| Gemini CLI | قائمة سماح tools بأسماء أدوات Gemini، إضافة إلى أي مُدخَلات mcp_<server>_* يُضيفها المفتاح agent_mcp_servers في الملف التعريفي إلى قائمة صريحة مُدرَجة؛ ومن دون tools، قائمة السماح التي تقتضيها حالات الحظر إضافة إلى mcp_* | max_turns | موروث (غير مضبوط) |
| Qwen Code | tools / disallowedTools بأسماء أدوات Qwen؛ ومن دون tools لا تُصدَر قائمة، فتُورَث أدوات MCP وتنطبق حالات الحظر | بلا مقابل | model: inherit |
| OpenCode | permission (allow / deny لكل أداة)؛ وأدوات MCP غير مُقيَّدة | بلا مقابل | موروث (غير مضبوط) |
| Antigravity | لا يُصدَر شيء؛ ويُسقِط الوصف عبارة «للقراءة فقط» | غير متاح | موروث (غير مضبوط) |
| CodeBuddy | tools / disallowedTools بوصفها سلاسل مفصولة بفواصل، مقصورة على أسماء الأدوات التي يُوثِّقها CodeBuddy؛ ولا مُدخَل MCP | maxTurns | موروث (غير مضبوط) |
| Trae | tools / disallowedTools بوصفها سلاسل مفصولة بفواصل، مقصورة على أسماء الأدوات التي يُوثِّقها Trae؛ ولا مُدخَل MCP | غير متاح | موروث (غير مضبوط) |
| GitHub Copilot | قائمة سماح tools من الأسماء البديلة لـ Copilot (read، وsearch، وedit، وexecute، وweb، وagent، وtodo) مع دمج حالات الحظر فيها، لأن Copilot لا يملك مفتاح حظر؛ ويُستبعَد الاسم البديل الذي يشمل أداة محظورة؛ ولا مُدخَل MCP | غير متاح | موروث (غير مضبوط) |
| Cursor | لا قائمة أدوات (لا يملك Cursor قائمة)؛ readonly: true للمساعِدين الخمسة المخصّصين للقراءة فقط من دون Bash، ويُسقِط المساعِدون الآخرون المخصّصون للقراءة فقط وسم «للقراءة فقط» | غير متاح | موروث (غير مضبوط) |
| Kimi Code | tools / disallowedTools بوصفها قوائم بأسماء أدوات Kimi Code (يصبح WebFetch هو FetchURL، ويصبح TodoWrite هو TodoList؛ وتُستبعَد الأسماء التي لا أداة لها في Kimi Code)؛ ولا مُدخَل MCP | غير متاح | موروث (غير مضبوط) |
| Kiro | قائمة سماح tools من فئات أدوات Kiro (read، وwrite، وshell، وweb، وsubagent) مع دمج حالات الحظر فيها، لأن القائمة هي القيد الوحيد المكتوب؛ وتُستبعَد الفئة التي تشمل أداة محظورة؛ ولا مُدخَل MCP | غير متاح | موروث (غير مضبوط) |
| Windsurf | قائمة سماح allowed-tools بأسماء أدوات Devin (read، وedit، وgrep، وglob، وexec، وwrite) مع دمج حالات الحظر فيها، لأن Devin لا يملك مفتاح حظر؛ ولا يُثبَّت المساعِدون الثلاثة الذين يحتاجون إلى أدوات الويب؛ ولا مُدخَل MCP | غير متاح | نموذج العامل الفرعي الافتراضي لدى Devin (غير مضبوط) |
تتلقّى Hermes وOpen-Claw ملفات المساعِدين بوصفها مادة دعم، لا بوصفها مساعِدين أصليين.
التنسيق
يعيش نشر المساعِدين، وبروتوكول الإطلاق المتوازي، وفرض عقد الإرجاع، وانضباط العزل في قاعدة التنسيق. وتعيش شجرة التوزيع لكل عامل في قاعدة أنماط التنسيق، §Decision Tree. المسارات المرجعية:
src/apothem/rules/agent-orchestration.md
src/apothem/rules/agent-orchestration-patterns.mdجرد العوامل المُولَّد
| Name | Description | Source |
|---|---|---|
README | Persistent agent definitions — the reusable sub-agent specifications the harness materializes whenever the orchestrator deploys a research, audit, or quality team. Each agent is a | src/apothem/agents/README.md |
citation-auditor | Read-only citation audit — checks that each reference in a bibliography or cited passage exists, matches its record, and that the opened source states what the text attributes to it. Use when a draft cites sources: 'check my references', 'are these DOIs real', 'does this paper say what I cite it for'. Finding new sources routes to research-scout; a free-standing claim routes to fact-checker. | src/apothem/agents/citation-auditor.md |
codebase-explorer | Read-only codebase exploration — exhaustively find every instance of a pattern, trace call/import dependencies, discover host conventions, map architecture and layering. Use when the query is 'where is X used', 'find all callers of Y', 'what convention does this repo follow for Z', 'map the module structure', or 'trace what depends on this file' — never for edits or design, and never for review verdicts (architecture-review, code-audit). Works through Grep / Glob / Read plus read-only Bash and returns evidence-cited findings (path + line + snippet) exhaustive within the declared scope; reports gaps rather than guessing. | src/apothem/agents/codebase-explorer.md |
convention-auditor | Read-only conventions auditor: verify naming (kebab-case files, snake_case Python, frontmatter keys), cross-reference resolution (dead rule/skill/agent paths, broken anchors, half-edge bindings), formatting standards (SPDX header presence, frontmatter contract), and ecosystem coherence (orphan artifacts, sibling-convention drift, registry gaps). Dispatch when a change touches multiple rules/skills/agents/commands and you need a binary PASS/FINDING verdict per instance with file+line+expected+actual evidence — e.g. 'audit naming across the harness adapters', 'check every new rule resolves its Bindings cross-refs', 'verify the skills cohort matches the kebab-case + SKILL.md convention'. Read-only: never fixes, never runs shell. A whole-tree sweep, or any fix, is the ecosystem-audit skill. Conventions are owned upstream and verified against, never re-derived; every finding cites severity + evidence. | src/apothem/agents/convention-auditor.md |
dependency-auditor | Read-only dependency-tree risk audit — flags unpinned, stale, duplicate, and known-vulnerable dependencies with manifest/lockfile evidence. Dispatch within a dependency audit, before a release cut, or after adding a dependency; one named CVE or advisory routes to the vuln-triage skill, and a signing or provenance review to the supply-chain-audit command. Detects the ecosystem via host-discovery: npm (package.json + package-lock/yarn/pnpm), pip (pyproject/requirements + lock), cargo (Cargo.toml + Cargo.lock), go (go.mod + go.sum). Runs npm audit / pip-audit / cargo audit / govulncheck and returns a risk-ranked table (known-vulnerable → unpinned → duplicate → stale) with per-row evidence; never widens a pin or escalates a scope — gaps surface as inquiry. | src/apothem/agents/dependency-auditor.md |
design-critic | Read-only UI critique. Use for a design review, a usability or accessibility check, or 'what is wrong with this screen' before a UI ships. A WCAG sweep across a whole web surface routes to the a11y-audit command; a CLI or install-flow review to ux-review. Reviews code, screenshots, or a running page and returns fixes ranked by user impact, from a scored heuristic review and separately measured evidence. Opens with a degraded notice when measurement tooling is missing; never guesses a measurement. | src/apothem/agents/design-critic.md |
fact-checker | Read-only adversarial claim verification — decompose input into atomic claims, seek ≥2 independent sources, attempt refutation, assign cited verdicts (supported / refuted / unverifiable) with quoted evidence and confidence. Use when a claim needs proof before it ships: a benchmark or statistic in docs/copy, a 'X is faster/safer than Y' assertion, a citation that names an RFC or spec, a release note, or any factual claim a reviewer would challenge. Routes external claims through WebSearch / WebFetch and repository claims through Read / Glob / Grep; defaults to refuted-or-unverifiable when evidence is insufficient, never a charitable supported. | src/apothem/agents/fact-checker.md |
mcp-builder | Scaffold a Model Context Protocol (MCP) server skeleton from a tool/resource contract — contract-first, well-typed tools, minimal surface. Use when: 'build an MCP server for <API>', 'scaffold MCP tools from this spec', 'wire FastMCP/TypeScript-SDK tool definitions', 'add a tool that exposes <resource> over MCP'. Detection: tool names + argument shapes + return types + resource URIs are stated or derivable. Selects the SDK via host-discovery (FastMCP for Python, the TypeScript SDK for Node), emits one typed tool definition per contract entry plus a list-tools smoke test, and scaffolds nothing speculative. Not for: tuning, securing, or load-testing an existing server (those surface as adjacent gaps). | src/apothem/agents/mcp-builder.md |
memory-auditor | Read-only memory-file auditor: cross-reference every claim in the harness memory tier (MEMORY.md index + topic files under <harness-root>/projects/{hash}/memory/ and <harness-root>/memory/) against actual filesystem state — file/line/rule counts (glob and count), referenced paths (do they exist?), rule scope labels (match pathFilter frontmatter?), dates (against frontmatter updated: or mtime, never the system clock), and cross-reference matrices. Dispatch when MEMORY.md or a topic file may have drifted from reality and you need a per-claim PASS/FAIL verdict with contradicting evidence — e.g. 'audit MEMORY.md after the rules cohort was renamed', 'verify the memory index counts match the current ecosystem', 'check the debugging topic file for stale references to deleted artifacts'. Existence + name match only; never re-audit an artifact's internal correctness (convention-auditor's scope). Read-only: never writes, never fixes. | src/apothem/agents/memory-auditor.md |
prompt-evaluator | Read-only rubric scoring of a prompt's output set — score each output against each named criterion (PASS/FAIL with cited evidence), aggregate per-criterion pass-rate, flag regressions against a baseline, and name recurring failure modes. Use when prompt or model outputs need a reproducible verdict before they ship: comparing a reprompted variant against the prior version, gating a system-prompt change, judging an LLM-as-judge eval set, scoring few-shot outputs against acceptance criteria, or proving a quality claim a reviewer would challenge. Scores outputs that already exist: building the dataset, scorer or runner routes to the eval-harness skill, and a full campaign to the eval command. Requires an explicit rubric — an absent or underspecified rubric blocks scoring and routes as inquiry; never invents a criterion or threshold, never scores charitably. | src/apothem/agents/prompt-evaluator.md |
quality-gate | Read-only quality-gate runner — discovers the host's lint / type-check / test / security / build commands, runs them in the correct order (build → type-check → tests+lint+security in parallel), and returns a per-gate PASS/FAIL verdict with file+line+error evidence. Reports, never fixes. Dispatch as a Quality team before a release cut, after a multi-file change, or to confirm a fix is green — e.g. 'run the full quality matrix and tell me what fails', 'gate this branch before I push', 'is the test suite green and the types clean?'. Runs the whole matrix; tests alone route to test-runner. Detects tooling via host-discovery (ruff/eslint/markdownlint, mypy/tsc/pyright, pytest/jest/cargo test/go test, bandit/npm audit/gitleaks); never assumes a stack. | src/apothem/agents/quality-gate.md |
refactor-surgeon | Scoped, behavior-preserving refactor of a named target — extract the behavioral contract, re-derive clean-room (never edit in place), name the one deficiency removed, verify regression via the host's own tests. Dispatch as a delegated team member on a single named target with a clear refactor intent; a user-driven interactive extraction is the refactor-extract skill — e.g. 'consolidate the duplicated validation in the CLI's install module', 'untangle the nested conditionals in the config renderer without changing output', 'rename the god-object methods in the adapter class to reveal intent'. Touches only the named target; adjacent gaps surface as findings, never as edits. Behavior, contracts, and side effects are identical before and after; a behavior change is a defect. | src/apothem/agents/refactor-surgeon.md |
research-scout | Read-only source discovery and ranking — decompose a research question into facets, fan out parallel web queries, rank candidates by authority, recency, and relevance, and return a deduplicated ranked source list. Use when a question needs sources before it can be answered: 'find the authoritative spec/RFC for X', 'what are the primary sources on Y', 'gather current references for a docs/copy claim', 'survey the landscape before a deep dive'. Fans external facets through any scholarly index server the operator has granted it, WebSearch, and WebFetch, and any in-repo corpus through Read / Glob / Grep. Also looks up papers and preprints by DOI, arXiv id, or topic ('find the paper behind this DOI'), and scouts existing open-source projects before anything new is built ('is there already a library for this', 'adopt or fork'). Discovery and ranking only — never fabricates a URL, never synthesizes; a written cited report routes to the multi-source-research skill, claim verification to fact-checker, and combining given documents to source-synthesis. | src/apothem/agents/research-scout.md |
security-scanner | Read-only secret, SAST-pattern, and config-risk sweep — a coarse first-pass that surfaces candidates fast and routes deep scanning to the host's CI scanners. Dispatch inside a security audit, after touching auth/crypto/IO surfaces, or when a secret may have been committed; a full repository security audit routes to the security-audit command. Greps for credential literals (key/token/password/private-key/certificate, committed .env values), injection surfaces (shell=True on untrusted input, string-formatted SQL, command interpolation), unsafe-eval (eval/exec/Invoke-Expression), unsafe deserialization (pickle.loads, yaml.load without SafeLoader), and config risk (over-broad CI permissions:, unpinned Actions uses:, network egress). Routes known-vulnerable dependencies to the dependency-auditor agent, CVE/advisory triage to the vuln-triage skill, and leaked-credential rotation to the secret-rotation skill. | src/apothem/agents/security-scanner.md |
test-runner | Read-only test-suite runner — discovers the host's test command, runs it, and triages every failure by root cause with test+file+line+assertion evidence. Reports, never fixes. Dispatch as a Research/Quality team member after a code change, before a release cut, or to confirm a fix is green — e.g. 'run the tests and tell me what's failing and why', 'is the suite green on this branch?', 'triage the failures in the auth module'. Tests only: lint, type and security gates route to quality-gate. Detects the runner via host-discovery (pytest/jest/cargo test/go test/Makefile target from the manifest + CI config); never assumes pytest. | src/apothem/agents/test-runner.md |
الأوامر
تعريفات أوامر الشَّرطة المائلة التي تُنفِّذ خطّ أنابيب حزمة الخطّة، إضافةً إلى عمليات تدقيق للشيفرة والمعمارية والأمان والاعتماديات ومراجعة التوثيق.
الخطّافات
معالِجات أحداث الأدوات التي تنطلق عند SessionStart وPreToolUse وPostToolUse وStop، وتُحمِّل سياقات رسائل تفرض عزل git وانضباط الخطط، مع عقد وقت تشغيل مُختبَر وحالة لكل مستخدم.