v0.10: add native Codex adapter for deep research
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
# Codex Command: dr-finalize
|
||||
|
||||
You are dr-editor-in-chief. The user requested `/dr-finalize $ARGUMENTS`.
|
||||
|
||||
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:
|
||||
|
||||
```bash
|
||||
uv run python scripts/dr.py finalize <slug> --translate-workers 4 --glossary-workers 4 --polish-workers 4
|
||||
```
|
||||
|
||||
5. If network/API errors occur, rerun with lower workers:
|
||||
|
||||
```bash
|
||||
uv run python scripts/dr.py finalize <slug> --translate-workers 1 --glossary-workers 3 --polish-workers 1
|
||||
```
|
||||
|
||||
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.
|
||||
@@ -0,0 +1,17 @@
|
||||
# Codex Command: dr-frame
|
||||
|
||||
You are dr-plan. The user requested `/dr-frame $ARGUMENTS`.
|
||||
|
||||
Goal: generate Phase 1 bilingual framework for the target project.
|
||||
|
||||
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.
|
||||
|
||||
Do not do Phase 2 research in this command.
|
||||
@@ -0,0 +1,26 @@
|
||||
# Codex Command: dr-glossary
|
||||
|
||||
You are dr-pm. The user requested `/dr-glossary $ARGUMENTS`.
|
||||
|
||||
Goal: run terminology verification in Codex native mode.
|
||||
|
||||
Default command:
|
||||
|
||||
```bash
|
||||
uv run python scripts/dr.py glossary <slug> --workers 4
|
||||
```
|
||||
|
||||
If network or SSL errors occur, rerun with:
|
||||
|
||||
```bash
|
||||
uv run python scripts/dr.py glossary <slug> --workers 3
|
||||
```
|
||||
|
||||
After completion, summarize:
|
||||
- terms checked
|
||||
- high/medium/low confidence counts
|
||||
- spelling errors
|
||||
- wrong Chinese names
|
||||
- recommended manual review items
|
||||
|
||||
Do not auto-apply glossary corrections unless the user asks or the pipeline is in Phase 4 finalize.
|
||||
@@ -0,0 +1,14 @@
|
||||
# Codex Command: dr-init
|
||||
|
||||
You are dr-plan. The user requested `/dr-init $ARGUMENTS`.
|
||||
|
||||
Goal: initialize a new biomedical Deep Research project without using OpenCode.
|
||||
|
||||
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`.
|
||||
|
||||
Use Codex custom agent `dr-plan` if spawning is needed, but this command can usually run in the main thread.
|
||||
@@ -0,0 +1,18 @@
|
||||
# Codex Command: dr-research
|
||||
|
||||
You are dr-pm. The user requested `/dr-research $ARGUMENTS`.
|
||||
|
||||
Goal: run Phase 2 deep research using Codex custom subagents.
|
||||
|
||||
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.
|
||||
|
||||
Do not write the final report.
|
||||
@@ -0,0 +1,14 @@
|
||||
# Codex Command: dr-review
|
||||
|
||||
You are dr-chief-editor. The user requested `/dr-review $ARGUMENTS`.
|
||||
|
||||
Goal: perform Phase 3 whole-report editorial review.
|
||||
|
||||
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.
|
||||
@@ -0,0 +1,9 @@
|
||||
# Codex Command: dr-status
|
||||
|
||||
Run the platform-neutral status command:
|
||||
|
||||
```bash
|
||||
uv run python scripts/dr.py status $ARGUMENTS
|
||||
```
|
||||
|
||||
Then summarize the result for the user and suggest the next appropriate phase.
|
||||
Reference in New Issue
Block a user