Merge other-review and self-review
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
|
||||
Skills in `skills/`.
|
||||
|
||||
Available: `translation`, `terms-search`, `self-review`, `other-review`, `chinese-text-normalize`, `pptx-translate`, `pdf-to-docx-conversion`.
|
||||
Available: `translation`, `terms-search`, `translation-review`, `chinese-text-normalize`, `pptx-translate`, `pdf-to-docx-conversion`.
|
||||
|
||||
## Terms Database
|
||||
|
||||
@@ -18,11 +18,14 @@ See `terms-search` skill. Quick reference:
|
||||
```
|
||||
translate-files/<topic>/<article>/
|
||||
source.dj — Chinese original
|
||||
target.dj — English translation (match source line count)
|
||||
target.dj — English translation (line count matches source)
|
||||
bilingual.dj — interleaved (source line, blank, target line, blank)
|
||||
Generated by `../../scripts/gen-bilingual.py source.dj target.dj`;
|
||||
do not edit or commit.
|
||||
```
|
||||
|
||||
Put `.docx` output in `/tmp/`. Don't commit binaries.
|
||||
Generated files (`bilingual.dj`) are not committed either.
|
||||
|
||||
---
|
||||
|
||||
@@ -58,8 +61,8 @@ States:
|
||||
| `idle` | Waiting for source or an existing bilingual file. | — |
|
||||
| `translating` | Agent loads `translation` + `terms-search` skills and drafts `target.dj`. | `target.dj` |
|
||||
| `bilingual_ready` | `bilingual.dj` generated from `source.dj` + `target.dj`. | `bilingual.dj` |
|
||||
| `self_reviewing` | Three-pass review: terminology → mechanical → flow. | `commented.dj`, `translation-findings.dj` |
|
||||
| `other_reviewing` | Peer review of someone else's translation. | `review-comments.dj` |
|
||||
| `self_reviewing` | Self-review with unified ruleset (self mode). Edit target.dj. | `target.dj` (edited) |
|
||||
| `other_reviewing` | Peer review with unified ruleset (other mode). Write review-comments.dj. | `review-comments.dj` |
|
||||
| `approved` | Translation accepted. May typeset or finish. | — |
|
||||
| `typesetting` | Producing PDF/DOCX from approved bilingual content. | `.pdf` / `.docx` |
|
||||
| `done` | Complete. | — |
|
||||
@@ -68,6 +71,10 @@ States:
|
||||
|
||||
Translate Chinese source into English. The agent IS the model — no external APIs. This workflow covers the state machine path `idle` → `translating` → `bilingual_ready` → `self_reviewing`.
|
||||
|
||||
### Source context
|
||||
|
||||
Before translating, the agent must understand the source's format and delivery context. If the source is a transcript of an oral talk, a book excerpt, a guided meditation script, a Q&A, a written article, or any other genre, that register shapes the translation. If this context is not clear from the file path or source content, ask the user before proceeding.
|
||||
|
||||
### Input
|
||||
|
||||
Source text in `.dj` or `.docx` (Chinese only).
|
||||
@@ -76,7 +83,9 @@ Source text in `.dj` or `.docx` (Chinese only).
|
||||
|
||||
- `source.dj` — extracted/cleaned Chinese
|
||||
- `target.dj` — English translation, line count matches source
|
||||
- `bilingual.dj` — interleaved (source line, target line adjacent, blank between pairs)
|
||||
- `bilingual.dj` — interleaved (source line, target line adjacent, blank between pairs).
|
||||
Generated by `../../scripts/gen-bilingual.py source.dj target.dj > bilingual.dj`.
|
||||
Do not create or edit by hand; do not commit.
|
||||
- `edit-suggestions.dj` — terminology/consistency issues flagged for review
|
||||
|
||||
### Rules
|
||||
@@ -92,7 +101,8 @@ Source text in `.dj` or `.docx` (Chinese only).
|
||||
|
||||
### Review
|
||||
|
||||
After translating, run `self-review` skill to check:
|
||||
After translating, load `translation-review` (self mode) to check:
|
||||
- Full detection rules (three passes + R1–R14 editorial polish)
|
||||
- Terminology consistency against terms DB
|
||||
- Grammar, fluency, calques
|
||||
- Missing content (mid-paragraph truncation)
|
||||
@@ -102,28 +112,48 @@ After translating, run `self-review` skill to check:
|
||||
|
||||
## Workflow B: Proofread / Review(校对/审阅)
|
||||
|
||||
Two distinct sub-workflows depending on WHO did the translation. Both follow the review portion of the translation state machine (`self_reviewing` and `other_reviewing`).
|
||||
Both self-review and other-review use the unified `translation-review` skill.
|
||||
The **same detection rules** apply to both. The only difference: self mode edits
|
||||
`target.dj` directly; other mode writes `review-comments.dj` with collaborative tone.
|
||||
|
||||
A third mode — **Direct Edit Review** — applies when the user explicitly says to
|
||||
edit the `.dj` files directly and skip any comments file.
|
||||
|
||||
### B1: Self-Review(自审)
|
||||
|
||||
You translated it. You own the English. Load `self-review` skill.
|
||||
You translated it. You own the English. Load `translation-review` skill (self mode).
|
||||
|
||||
1. Extract `bilingual.dj` — never edit
|
||||
2. `cp bilingual.dj commented.dj`
|
||||
3. Apply inline fixes + `{% %}` annotations
|
||||
4. Three-pass review: terminology → mechanical → flow
|
||||
5. Can edit freely with `patch`
|
||||
1. Read `source.dj` + `target.dj` fully.
|
||||
2. Apply all detection rules (three passes + R1–R14 editorial polish).
|
||||
3. Edit `target.dj` directly with `patch` (mode='replace').
|
||||
4. Record non-obvious choices in `translation-findings.dj` if needed.
|
||||
5. Regenerate `bilingual.dj` with `../../scripts/gen-bilingual.py source.dj target.dj > bilingual.dj`.
|
||||
6. Verify line counts: `source.dj` and `target.dj` must match.
|
||||
|
||||
### B2: Other-Review(审他稿)
|
||||
|
||||
Someone else translated it (volunteer, etc.). Load `other-review` +
|
||||
`self-review` skills.
|
||||
Someone else translated it (volunteer, etc.). Load `translation-review` skill (other mode).
|
||||
|
||||
1. Extract `bilingual.dj` — never edit
|
||||
2. Review — do NOT edit bilingual.dj or create commented.dj
|
||||
3. Write `review-comments.dj` with exact quoted text + suggestions
|
||||
4. Follow deliberation protocol: 随喜 first, questions not commands
|
||||
5. Address translator by name
|
||||
1. Read `source.dj` + `target.dj` fully.
|
||||
2. Apply all detection rules (three passes + R1–R14 editorial polish).
|
||||
3. Do NOT edit `target.dj` — write `review-comments.dj` instead.
|
||||
4. Follow deliberation protocol: 随喜 first, questions not commands.
|
||||
5. Address translator by name.
|
||||
6. Ask the user whether to apply the findings. If yes, switch to Direct Edit Mode.
|
||||
|
||||
### B3: Direct Edit Review(直接修改稿)
|
||||
|
||||
The user wants fixes applied directly, no separate comments file. This can follow
|
||||
self-review or other-review, or be a standalone polish pass.
|
||||
|
||||
1. Read full `target.dj` + `source.dj` in one pass.
|
||||
2. Collect every issue using the full detection rules.
|
||||
3. Batch all fixes into one set of exact-string replacements. Apply with `patch`.
|
||||
4. Regenerate `bilingual.dj` with `../../scripts/gen-bilingual.py source.dj target.dj > bilingual.dj`.
|
||||
5. Verify line counts match.
|
||||
|
||||
Avoid iterative "find a few more, edit again" loops. If the user asks "anything
|
||||
else?" after a direct-edit pass, do one more full systematic read and batch again.
|
||||
|
||||
---
|
||||
|
||||
@@ -157,8 +187,9 @@ regenerating the same Python in execute_code each turn.
|
||||
- `scripts/split-bilingual.fish <combined.dj>` — split into source.dj (CN) + target.dj (EN)
|
||||
- `scripts/dj2docx.fish <target.dj>` — pandoc .dj → .docx in `/tmp/`
|
||||
- `scripts/proofread-pdf.py <docx> <pdf>` — word-level diff between manuscript and typeset PDF
|
||||
- `scripts/gen-bilingual.fish <dir>` — produce `bilingual.dj` from `source.dj` + `target.dj`
|
||||
- `scripts/gen-bilingual-<name>-<hash>.py` — article-specific extraction from DOCX
|
||||
- `scripts/gen-bilingual.py <source.dj> <target.dj>` — produce `bilingual.dj` on stdout; run as `gen-bilingual.py source.dj target.dj > bilingual.dj`
|
||||
- `scripts/gen-bilingual-<name>-<hash>.py` — article-specific extraction from DOCX or source/target pairing
|
||||
- `scripts/compile-typst.fish <typ>` — compile a Typst file to PDF
|
||||
|
||||
Article-specific scripts (including Typst compile helpers) should be placed in
|
||||
the article directory itself, named with a short hash: e.g.
|
||||
|
||||
Reference in New Issue
Block a user