edit-docs
Edit MadGraph documentation with parallel review: style, quality, and factual verification. Revises until all checks pass or max rounds reached.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Edit MadGraph documentation with parallel review: style, quality, and factual verification. Revises until all checks pass or max rounds reached.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Install the MadAgents agent system into a folder on this machine, to be run without a container. Use when the user wants MadAgents outside Apptainer — in a project folder, on a login node, or anywhere they already have MadGraph — or wants to refresh an existing install.
Find documentation problems that caused agent mistakes — gaps, inaccuracies, or ambiguities. Uses grade context to guide diagnosis.
Generate evaluation questions about MadGraph and related tools with verified reference answers, using web research for real-world use cases.
Get a writable copy of the MadGraph documentation.
Run one iteration of the doc improvement loop: generate or accept questions, answer them in parallel, verify, grade, diagnose, fix the docs, and re-evaluate until convergence.
Extract factual claims from text and verify each one using execution, source inspection, or physics reasoning.
| name | edit-docs |
| description | Edit MadGraph documentation with parallel review: style, quality, and factual verification. Revises until all checks pass or max rounds reached. |
Guided workflow for editing the MadGraph documentation with parallel review and revision.
$ARGUMENTS
If no task was given, ask the user what they want to change.
If a draft already exists from a previous edit, skip setup — reuse it.
Otherwise, call the get_doc_draft MCP tool to create a writable copy:
get_doc_draft("/workspace/docs_draft")
Invoke the doc-editor agent with the task. It edits the draft files at /workspace/docs_draft.
After it finishes, generate a diff using the MCP tool (this correctly handles the overview file which lives outside /madgraph_docs/):
get_doc_diff("/workspace/docs_draft")
Save the diff output to /workspace/docs_changes.diff.
Invoke ALL THREE reviews simultaneously — do not run them sequentially:
doc-style-reviewer agent — review the changed files for style and formatting
doc-quality-reviewer agent — review the changed files for structure, placement, duplication
verifier agent — extract and verify factual claims from the changed content. Dispatch with:
Extract and verify all factual claims from the documentation changes.
- Diff of changes:
/workspace/docs_changes.diff- Updated docs:
/workspace/docs_draft/Read the diff to understand what was changed, then read the relevant files for full context. Only extract claims from new or changed content — do not extract claims from unchanged parts of the documentation.
Doc-specific extraction rules:
- Extract both factual claims AND executable code blocks.
- Any fenced code block tagged as
mg5,madgraph,mg5_amc,bash, orpythonthat involves MadGraph commands must be extracted. For each, include the source file and section for context, what the code block accomplishes, and the full code block content.Doc-specific verification rules:
- MG5 code blocks must be executed to confirm they run without errors.
- Default values must be verified by reading source code (e.g.,
banner.py, template card files) — not by trusting existing documentation.- Check that claims do not contradict each other within the document.
- Do NOT verify: general physics concepts, high-level descriptions, cross-references, formatting, or style choices.
- If you discover pre-existing errors in the existing documentation (under
/madgraph_docs/) while verifying, report them separately as incidental errors.Write verdicts to
/workspace/verify/verdicts.json.
Wait for all three to complete.
If all three checks pass (style: PASS, quality: PASS, no incorrect claims), proceed to step "Discuss with user."
If ANY check fails, collect all feedback and continue to "Revise."
Send ALL feedback to the doc-editor agent in a single message:
Your previous changes had issues. Please revise the files at
/workspace/docs_draft.Factual issues: [list incorrect claims with evidence] Style issues: [list style problems] Quality issues: [list quality problems]
Address ALL issues in this revision.
After revision, regenerate the diff (call get_doc_diff("/workspace/docs_draft") and save to /workspace/docs_changes.diff) and run the parallel review again (all three checks simultaneously).
Repeat up to 5 rounds total. If checks still fail after 5 rounds, proceed to "Discuss with user" anyway — note which issues remain unresolved.
Present the diff to the user (call get_doc_diff("/workspace/docs_draft") and show the output) and summarize:
Wait for the user's feedback. If they request changes, go back to "Edit" with their instructions.
Only apply changes if the user explicitly asks you to. If in doubt, ask. Only apply changes where all factual claims have been verified.
apply_doc_changes("/workspace/docs_draft")