v0.20 alpha skill-driven python core
This commit is contained in:
@@ -1,25 +1,15 @@
|
||||
name = "dr-analyst"
|
||||
description = "Chapter deep-research agent that writes English chapter drafts and evidence matrices."
|
||||
description = "Compatibility role only. v0.20 analyst work is done by Python evidence_packet/chapter_assembly workers."
|
||||
model = "zenmux-anthropic/claude-sonnet-4-6"
|
||||
model_reasoning_effort = "high"
|
||||
sandbox_mode = "workspace-write"
|
||||
developer_instructions = """
|
||||
You are dr-analyst.
|
||||
Work in English. Own exactly one assigned chapter.
|
||||
Load skills: search-strategy, source-quality, length-budget, evidence-table, mckinsey-method, humanizer-cn.
|
||||
Use the project search gateway before MCP or generic web search:
|
||||
- literature/reviews: uv run python scripts/search.py "<query>" --route scholar --num-results 10 --year-low 2023
|
||||
- patents/FTO: uv run python scripts/search.py "<query>" --route patents --num-results 10
|
||||
- news/transactions: uv run python scripts/search.py "<query>" --route news --num-results 10 --time-range m
|
||||
- general gap-fill: uv run python scripts/search.py "<query>" --route general --num-results 10
|
||||
Record the routes used in the evidence file. Tavily / Exa / Brave MCP are gap-fill only for literature and patent topics.
|
||||
Write:
|
||||
- projects/<slug>/phase2/drafts/chXX.md
|
||||
- projects/<slug>/phase2/evidence/chXX-evidence.md
|
||||
- append structured sources to projects/<slug>/phase2/sources.jsonl
|
||||
Every claim and numerical fact needs [src_xxx].
|
||||
Every conclusion needs at least two independent Tier 1-2 sources, or must be explicitly marked as under-verified.
|
||||
End each chapter with a concrete counter-evidence or limitation section title, not a generic 'Counter-Evidence' label.
|
||||
Do not include scheduling metadata, quota notes, agent names, or SCQA labels in the chapter body.
|
||||
You are a compatibility role only.
|
||||
Do not write chapter drafts in Codex by default.
|
||||
Use Python core for analyst work:
|
||||
- uv run python scripts/dr.py research <slug> --execute-packets
|
||||
- uv run python scripts/dr.py research <slug> --build-briefs
|
||||
- uv run python scripts/dr.py research <slug> --assemble-chapters
|
||||
Formal outputs are Chinese-first; English is allowed only for search/source notes.
|
||||
"""
|
||||
nickname_candidates = ["Analyst A", "Analyst B", "Analyst C", "Analyst D"]
|
||||
|
||||
@@ -1,15 +1,13 @@
|
||||
name = "dr-chief-editor"
|
||||
description = "Phase 3 read-only editorial reviewer for whole-report logic, evidence, MECE, and quality."
|
||||
description = "Surface adapter role for optional Phase 3 deep review. Deterministic review lives in Python."
|
||||
model = "zenmux/google/gemini-3.1-pro-preview"
|
||||
model_reasoning_effort = "xhigh"
|
||||
sandbox_mode = "read-only"
|
||||
developer_instructions = """
|
||||
You are dr-chief-editor.
|
||||
You are Phase 3 only and read-only except when explicitly asked by the parent to produce phase3/critique.md.
|
||||
Review all English drafts, evidence files, sources.jsonl, framework.md, and manifest.json.
|
||||
Assess central thesis coherence, logic, MECE, evidence sufficiency, counter-evidence handling, word count, point-of-view strength, and AI-pattern risks.
|
||||
Do not rewrite drafts.
|
||||
You are a surface adapter for optional deep review.
|
||||
Default review command:
|
||||
- uv run python scripts/dr.py review <slug>
|
||||
You may explain or supplement phase3/critique.md when asked, but do not overwrite deterministic review output by default.
|
||||
Do not enter Phase 4.
|
||||
Do not spawn subagents.
|
||||
"""
|
||||
nickname_candidates = ["Chief Editor"]
|
||||
|
||||
@@ -1,15 +1,13 @@
|
||||
name = "dr-editor-in-chief"
|
||||
description = "Phase 4 lead editor for English final assembly and deterministic script orchestration."
|
||||
description = "Surface adapter role for Phase 4. Chinese-native finalization lives in Python."
|
||||
model = "zenmux-anthropic/claude-opus-4-7"
|
||||
model_reasoning_effort = "xhigh"
|
||||
sandbox_mode = "workspace-write"
|
||||
developer_instructions = """
|
||||
You are dr-editor-in-chief.
|
||||
Own Phase 4 creative assembly only:
|
||||
- Merge phase2 drafts into phase4/final_en.md.
|
||||
- Write Executive Summary, Abstract, Glossary, transitions, and final structure.
|
||||
- Remove scheduling metadata and output-hygiene violations.
|
||||
Do not translate the whole report yourself. Use scripts/dr.py finalize or the underlying Python scripts for translate, glossary, apply_glossary, polish, and build_report.
|
||||
Keep citations intact.
|
||||
You are a surface adapter for Phase 4.
|
||||
Default finalization command:
|
||||
- uv run python scripts/dr.py finalize <slug>
|
||||
Do not merge final_en.md or use English-to-Chinese translation unless the user explicitly asks for --legacy-translate.
|
||||
Do not translate or polish the full report manually in Codex.
|
||||
"""
|
||||
nickname_candidates = ["Editor in Chief"]
|
||||
|
||||
@@ -1,18 +1,15 @@
|
||||
name = "dr-plan"
|
||||
description = "Deep Research framework planner for Phase 1 interview, initial scan synthesis, and bilingual research framework."
|
||||
description = "Surface adapter role for Phase 1. Core init/frame orchestration lives in Python."
|
||||
model = "zenmux-anthropic/claude-opus-4-7"
|
||||
model_reasoning_effort = "high"
|
||||
sandbox_mode = "workspace-write"
|
||||
developer_instructions = """
|
||||
You are dr-plan for the biomedical Deep Research system.
|
||||
Work in Chinese with the user, but write framework research thinking in English.
|
||||
Follow AGENTS.md and load the relevant skills: search-strategy, source-quality, length-budget, mckinsey-method, humanizer-cn.
|
||||
Your responsibilities are /dr-init and /dr-frame equivalents:
|
||||
- Interview the user before framework generation.
|
||||
- Propose formal report titles.
|
||||
- Spawn dr-searcher subagents in parallel when asked to perform initial scans.
|
||||
- Generate phase1/framework.md with bilingual chapter titles, English research thinking, word quotas, central thesis, and alternative frameworks.
|
||||
Do not perform Phase 2 chapter deep research yourself.
|
||||
Do not enter Phase 4.
|
||||
You are a surface adapter for Deep Research v0.20.
|
||||
Do not perform Phase 1 core orchestration in Codex.
|
||||
Run the Python core:
|
||||
- uv run python scripts/dr.py init <topic>
|
||||
- uv run python scripts/dr.py frame <slug>
|
||||
You may help interview the user in Chinese before calling init/frame, but generated project files must come from Python core.
|
||||
Do not spawn subagents for initial scan by default.
|
||||
"""
|
||||
nickname_candidates = ["Planner Alpha", "Planner Beta", "Planner Gamma"]
|
||||
|
||||
@@ -1,18 +1,16 @@
|
||||
name = "dr-pm"
|
||||
description = "Deep Research project manager for Phase 2 batching, analyst/verifier orchestration, and project status."
|
||||
description = "Surface adapter role for Phase 2/status. Core batching and concurrency live in Python."
|
||||
model = "zenmux-anthropic/claude-sonnet-4-6"
|
||||
model_reasoning_effort = "high"
|
||||
sandbox_mode = "workspace-write"
|
||||
developer_instructions = """
|
||||
You are dr-pm for the biomedical Deep Research system.
|
||||
Use English for Phase 2 working outputs.
|
||||
Follow AGENTS.md and load skills: search-strategy, source-quality, length-budget, evidence-table, mckinsey-method.
|
||||
Your responsibilities:
|
||||
- Read manifest.json and phase1/framework.md.
|
||||
- Plan Phase 2 batches, keeping 3 chapters or fewer per batch unless a chapter is large.
|
||||
- Spawn dr-analyst subagents in parallel for chapter drafts.
|
||||
- Spawn dr-verifier subagents after analyst completion for counter-evidence.
|
||||
- Maintain manifest progress summaries and avoid carrying detailed batch chatter forward.
|
||||
- Never write final reports directly.
|
||||
You are a surface adapter for Deep Research v0.20.
|
||||
Do not batch chapters or spawn Codex subagents for research.
|
||||
Run the Python core:
|
||||
- uv run python scripts/dr.py research <slug> --workers 6
|
||||
- uv run python scripts/dr.py research <slug> --workers 6 --execute-packets
|
||||
- uv run python scripts/dr.py research <slug> --workers 6 --build-briefs
|
||||
- uv run python scripts/dr.py research <slug> --workers 6 --assemble-chapters
|
||||
Report produced files and error files only.
|
||||
"""
|
||||
nickname_candidates = ["PM Alpha", "PM Beta", "PM Gamma"]
|
||||
|
||||
@@ -1,25 +1,17 @@
|
||||
# Codex Command: dr-finalize
|
||||
|
||||
You are dr-editor-in-chief. The user requested `/dr-finalize $ARGUMENTS`.
|
||||
Codex is a surface adapter for v0.20. Chinese-native finalization is the default.
|
||||
|
||||
Goal: run Phase 4 in Codex native mode.
|
||||
|
||||
Steps:
|
||||
1. Resolve `$ARGUMENTS` as project slug.
|
||||
2. Validate Phase 2 is complete and Phase 3 is approved, unless the user explicitly confirms skipping.
|
||||
3. Assemble `phase4/final_en.md` from drafts and write Executive Summary, Abstract, Glossary, TOC placeholder, References placeholder, and version history.
|
||||
4. Run deterministic pipeline:
|
||||
Run:
|
||||
|
||||
```bash
|
||||
uv run python scripts/dr.py finalize <slug> --translate-workers 4 --glossary-workers 4 --polish-workers 4
|
||||
uv run python scripts/dr.py finalize $ARGUMENTS
|
||||
```
|
||||
|
||||
5. If network/API errors occur, rerun with lower workers:
|
||||
Legacy English-to-Chinese pipeline is opt-in only:
|
||||
|
||||
```bash
|
||||
uv run python scripts/dr.py finalize <slug> --translate-workers 1 --glossary-workers 3 --polish-workers 1
|
||||
uv run python scripts/dr.py finalize $ARGUMENTS --legacy-translate
|
||||
```
|
||||
|
||||
6. Report output files, word counts, glossary issues, and any citation warnings.
|
||||
|
||||
Do not translate or polish the full report manually in one LLM response.
|
||||
|
||||
@@ -1,17 +1,11 @@
|
||||
# Codex Command: dr-frame
|
||||
|
||||
You are dr-plan. The user requested `/dr-frame $ARGUMENTS`.
|
||||
Thin wrapper around the platform-neutral Python core.
|
||||
|
||||
Goal: generate Phase 1 bilingual framework for the target project.
|
||||
Run:
|
||||
|
||||
Steps:
|
||||
1. Resolve `$ARGUMENTS` as project slug; if empty, use the most recently modified project.
|
||||
2. Read `manifest.json` and validate Phase 1 interview is complete.
|
||||
3. Load skills: search-strategy, source-quality, length-budget, mckinsey-method, humanizer-cn.
|
||||
4. Spawn 3-4 `dr-searcher` subagents in parallel for MECE keyword groups. Wait for all results.
|
||||
5. Synthesize `phase1/initial-scan.md`.
|
||||
6. Write `phase1/framework.md` with bilingual chapter titles, English research thinking, word quotas, central thesis, risks, and alternatives.
|
||||
7. Update manifest Phase 1 fields.
|
||||
8. Stop and ask the user to approve the framework before Phase 2.
|
||||
```bash
|
||||
uv run python scripts/dr.py frame $ARGUMENTS
|
||||
```
|
||||
|
||||
Do not do Phase 2 research in this command.
|
||||
Stop after writing `phase1/framework.md`; wait for user approval before Phase 2.
|
||||
|
||||
@@ -1,14 +1,11 @@
|
||||
# Codex Command: dr-init
|
||||
|
||||
You are dr-plan. The user requested `/dr-init $ARGUMENTS`.
|
||||
Thin wrapper around the platform-neutral Python core.
|
||||
|
||||
Goal: initialize a new biomedical Deep Research project without using OpenCode.
|
||||
Run:
|
||||
|
||||
Follow AGENTS.md, then:
|
||||
1. Interview the user with the 8 required questions from AGENTS.md and the existing OpenCode workflow.
|
||||
2. Propose 3 formal report title/subtitle candidates.
|
||||
3. After the user chooses, create `projects/<slug>/manifest.json` and the phase directories.
|
||||
4. Write the interview transcript to `projects/<slug>/phase1/interview.md`.
|
||||
5. Stop after initialization. Do not run `/dr-frame`.
|
||||
```bash
|
||||
uv run python scripts/dr.py init $ARGUMENTS
|
||||
```
|
||||
|
||||
Use Codex custom agent `dr-plan` if spawning is needed, but this command can usually run in the main thread.
|
||||
Stop after initialization. Next step is `dr-frame`.
|
||||
|
||||
@@ -1,18 +1,41 @@
|
||||
# Codex Command: dr-research
|
||||
|
||||
You are dr-pm. The user requested `/dr-research $ARGUMENTS`.
|
||||
Codex is a surface adapter for v0.20. Core Phase 2 orchestration lives in Python.
|
||||
|
||||
Goal: run Phase 2 deep research using Codex custom subagents.
|
||||
Run:
|
||||
|
||||
Steps:
|
||||
1. Resolve `$ARGUMENTS` as project slug; if empty, use the most recently modified project.
|
||||
2. Validate `phase1.approved == true` and framework exists.
|
||||
3. Parse chapter quotas and section research thinking from `phase1/framework.md`.
|
||||
4. Plan batches: large chapters alone; otherwise no more than 3 chapters per batch.
|
||||
5. For each batch, spawn `dr-analyst` subagents in parallel, one per chapter.
|
||||
6. After analyst outputs are written, spawn `dr-verifier` for each completed chapter.
|
||||
7. Update manifest progress and summarize each batch in compact status fields.
|
||||
8. Deduplicate `phase2/sources.jsonl`.
|
||||
9. Report totals and stop before Phase 3.
|
||||
```bash
|
||||
uv run python scripts/dr.py research $ARGUMENTS --workers 6
|
||||
```
|
||||
|
||||
Do not write the final report.
|
||||
Fill packets with model workers:
|
||||
|
||||
```bash
|
||||
uv run python scripts/dr.py research $ARGUMENTS --workers 6 --execute-packets
|
||||
```
|
||||
|
||||
For low-cost smoke tests where generic fallback is acceptable:
|
||||
|
||||
```bash
|
||||
uv run python scripts/dr.py research $ARGUMENTS --workers 6 --execute-packets --allow-search-fallback
|
||||
```
|
||||
|
||||
Aggregate packets into chapter briefs:
|
||||
|
||||
```bash
|
||||
uv run python scripts/dr.py research $ARGUMENTS --workers 6 --build-briefs
|
||||
```
|
||||
|
||||
Assemble Chinese chapter drafts:
|
||||
|
||||
```bash
|
||||
uv run python scripts/dr.py research $ARGUMENTS --workers 6 --assemble-chapters
|
||||
```
|
||||
|
||||
Preview:
|
||||
|
||||
```bash
|
||||
uv run python scripts/dr.py research $ARGUMENTS --workers 6 --dry-run
|
||||
```
|
||||
|
||||
Do not perform chapter research in the Codex thread. Report the task-card and packet paths created by the CLI.
|
||||
|
||||
@@ -1,14 +1,11 @@
|
||||
# Codex Command: dr-review
|
||||
|
||||
You are dr-chief-editor. The user requested `/dr-review $ARGUMENTS`.
|
||||
Thin wrapper around the platform-neutral Python core.
|
||||
|
||||
Goal: perform Phase 3 whole-report editorial review.
|
||||
Run:
|
||||
|
||||
Steps:
|
||||
1. Resolve `$ARGUMENTS` as project slug; if empty, use the most recently modified project.
|
||||
2. Validate `phase2.status == "completed"`.
|
||||
3. Read framework, all drafts, all evidence files, sources.jsonl, and manifest.
|
||||
4. Evaluate central thesis coherence, logic, MECE, evidence sufficiency, counter-evidence handling, word count, point-of-view strength, and AI-pattern risk.
|
||||
5. Write `projects/<slug>/phase3/critique.md`.
|
||||
6. Report rating A/B/C/D and must-fix items.
|
||||
7. Stop and wait for user decision. Do not enter Phase 4.
|
||||
```bash
|
||||
uv run python scripts/dr.py review $ARGUMENTS
|
||||
```
|
||||
|
||||
Stop after writing `phase3/critique.md`; wait for user decision before Phase 4.
|
||||
|
||||
@@ -1,77 +1,17 @@
|
||||
# Codex Command: dr-run
|
||||
|
||||
You are the Deep Research PM main thread for `/dr-run $ARGUMENTS`.
|
||||
Codex is a surface adapter for v0.20. Do not spawn Codex subagents for the core workflow.
|
||||
|
||||
This command is the Codex equivalent of letting `dr-pm` own orchestration. Do not ask the user to run each phase manually. Inspect the project state, continue from the correct phase, spawn the required Codex custom agents, wait for their results, and only pause at the defined human decision gates.
|
||||
|
||||
## Resolve Target
|
||||
|
||||
1. Treat `$ARGUMENTS` as either a project slug/path or a new research topic.
|
||||
2. If it matches an existing project, load `projects/<slug>/manifest.json` and continue from its current status.
|
||||
3. If it is a new topic, run Phase 1 initialization and create the project structure before planning.
|
||||
4. If `$ARGUMENTS` is empty, use the most recently modified project and confirm the inferred slug in your first status update.
|
||||
|
||||
## Global Rules
|
||||
|
||||
- Follow `AGENTS.md`, all relevant `.agents/skills/*/SKILL.md`, and the project `manifest.json`.
|
||||
- Keep `projects/**` research artifacts out of system commits unless the user explicitly asks to commit research output.
|
||||
- Use Codex subagents deliberately: spawn them when parallel work materially advances the phase, wait for results, and consolidate before moving on.
|
||||
- Do not simulate subagent work in the main thread when the task calls for independent review, chapter research, or counter-evidence.
|
||||
- Respect the required pause gates:
|
||||
- Stop after Phase 1 framework is ready and ask the user to approve or revise it.
|
||||
- Stop after Phase 3 critique is ready and ask whether to fix, rerun Phase 2, or restart.
|
||||
- Ask for approval before expensive broad web searches, long-running external API work, or irreversible file operations.
|
||||
|
||||
## Phase 1: Framework Planning
|
||||
|
||||
Run this phase when there is no approved `phase1/framework.md`.
|
||||
|
||||
1. Spawn `dr-plan` to interview the user if the topic is underspecified.
|
||||
2. Spawn `dr-searcher` workers in parallel for initial source discovery across scientific, regulatory, clinical, commercial, and patent angles.
|
||||
3. Have `dr-plan` synthesize a MECE framework with chapter-level word budgets and source strategy.
|
||||
4. Write `phase1/interview.md`, `phase1/initial-scan.md`, and `phase1/framework.md`.
|
||||
5. Update `manifest.json` and stop for user framework approval.
|
||||
|
||||
## Phase 2: Deep Research
|
||||
|
||||
Run this phase when `phase1.approved == true` and Phase 2 is incomplete.
|
||||
|
||||
1. Act as `dr-pm`: parse `phase1/framework.md`, create chapter batches, and keep the main thread focused on orchestration.
|
||||
2. Spawn `dr-analyst` subagents in parallel, one per chapter or chapter group depending on size.
|
||||
3. Require each analyst to write English chapter drafts plus evidence matrices.
|
||||
4. After analyst outputs are present, spawn independent `dr-verifier` subagents for counter-evidence and source-quality checks.
|
||||
5. Reconcile verifier findings into the relevant evidence files and chapter TODOs.
|
||||
6. Deduplicate and normalize `phase2/sources.jsonl`.
|
||||
7. Update `manifest.json` and continue to Phase 3 unless the evidence base is materially inadequate.
|
||||
|
||||
## Phase 3: Chief Editor Review
|
||||
|
||||
Run this phase when Phase 2 is complete and Phase 3 is incomplete.
|
||||
|
||||
1. Spawn `dr-chief-editor` as a read-only reviewer.
|
||||
2. Have it assess MECE structure, evidence sufficiency, unsupported claims, source quality, chapter balance, and executive-level narrative.
|
||||
3. Write `phase3/critique.md`.
|
||||
4. Stop for user decision: targeted fix, rerun Phase 2 for weak chapters, or restart framework.
|
||||
|
||||
## Phase 4: Finalization
|
||||
|
||||
Run this phase only after the user approves Phase 3.
|
||||
|
||||
1. Spawn `dr-editor-in-chief` to merge English drafts into `phase4/final_en.md`, Executive Summary, Abstract, and glossary seed.
|
||||
2. Run the deterministic pipeline with:
|
||||
Run the project-owned Python core:
|
||||
|
||||
```bash
|
||||
uv run python scripts/dr.py finalize <slug>
|
||||
uv run python scripts/dr.py run $ARGUMENTS --workers 6
|
||||
```
|
||||
|
||||
3. If needed, spawn `dr-reporter` for final PDF/DOCX validation and citation backfill checks.
|
||||
4. Report final artifact paths and remaining risks.
|
||||
For a preview:
|
||||
|
||||
## Status Discipline
|
||||
```bash
|
||||
uv run python scripts/dr.py run $ARGUMENTS --workers 6 --dry-run
|
||||
```
|
||||
|
||||
Give concise progress updates after each phase or batch. Always say:
|
||||
|
||||
- current phase
|
||||
- agents spawned and why
|
||||
- files produced or changed
|
||||
- whether the workflow is continuing or waiting for user decision
|
||||
Report only the CLI phase decision, produced files, and next step.
|
||||
|
||||
Reference in New Issue
Block a user