Commit Graph

16 Commits

Author SHA1 Message Date
Jim Liu 宝玉 31994be0e1 refactor(baoyu-translate): simplify translation prompts and workflow
Condense 15+ verbose translation principles to 7 concise ones.
Consolidate analysis from 8 sections to 4, review from 8 to 3.
Simplify subagent prompt template accordingly.
2026-03-26 23:02:28 -05:00
Jim Liu 宝玉 39a97678bb feat(baoyu-translate): enrich translation prompt with full analysis context
Restructure 02-prompt.md template to better leverage analysis results:
- Add source voice assessment alongside target style preset
- Extract figurative language mapping into dedicated structured table
- Include reasoning in comprehension challenges for annotation depth
- Add translation challenges section for structural/creative issues
- Provide chunk position context in subagent spawn prompts
2026-03-25 20:09:30 -05:00
Jim Liu 宝玉 7e07c1bb84 refactor(baoyu-translate): replace remark/unified with markdown-it for chunk parsing
Simplifies dependencies and adds main.ts CLI entry point with exported
functions for programmatic reuse.
2026-03-13 15:27:25 -05:00
Jim Liu 宝玉 79ca378229 fix(baoyu-translate): improve annotation density and style preset passing
- Add short text (<5 sentences) annotation reduction rule to translator's notes
- Explicitly pass resolved style preset to 02-prompt.md assembly in all modes
2026-03-11 16:45:51 -05:00
Jim Liu 宝玉 88b433d565 docs: improve skill documentation clarity
- Fix Provider Selection: default to Replicate when multiple keys available (matches code)
- Add Replicate column to Quality Presets table (normal→1K, 2k→2K)
- Add Replicate aspect ratio behavior (match_input_image when --ref without --ar)
- Remove stale Google Imagen reference from Aspect Ratios
- Add batch file format example with JSON schema to SKILL.md
- Note that batch paths resolve relative to batch file directory
- Move batch execution strategy in article-illustrator before numbered steps
- Fix translate image-language reminder to use standard markdown syntax
  with note to match article's own image syntax convention
2026-03-09 00:43:05 -05:00
Jim Liu 宝玉 5acef7151b feat: add batch parallel image generation and provider-level throttling
- Add --batchfile and --jobs flags for multi-image parallel generation
  with per-provider concurrency control and rate limiting
- Refactor main.ts into prepareSingleTask/prepareBatchTasks/runBatchTasks
  with worker pool pattern and up to 3 retries per image
- Fix Replicate provider: use image_input array (nano-banana-pro schema),
  add match_input_image aspect ratio, add quality-to-resolution mapping
- Improve OpenAI error message for missing API key (Codex auth hint)
- Expand non-retryable error detection (4xx codes, disabled models)
- Add batch config to EXTEND.md schema (max_workers, provider_limits)
- Add build-batch.ts for article-illustrator batch workflow integration
- Add image-language awareness pass to baoyu-translate

Co-authored-by: 敖氏 <aoshi@MacBook-Air.local>
2026-03-09 00:07:45 -05:00
Jim Liu 宝玉 c43ed57ffc
Merge pull request #69 from liby/feat/xdg-config-path
feat: add XDG config path support for EXTEND.md
2026-03-08 22:19:52 -05:00
Jim Liu 宝玉 154ccfe3ff refactor: add openclaw metadata and rename SKILL_DIR to baseDir across all skills 2026-03-08 19:22:24 -05:00
Bryan Lee a702513487
feat: add XDG config path support for EXTEND.md
Add $XDG_CONFIG_HOME/baoyu-skills/<skill>/EXTEND.md as second priority
path between project-level and legacy $HOME/.baoyu-skills/ paths.

Priority order:
1. .baoyu-skills/<skill>/EXTEND.md (project)
2. $XDG_CONFIG_HOME/baoyu-skills/<skill>/EXTEND.md (XDG, new)
3. $HOME/.baoyu-skills/<skill>/EXTEND.md (legacy fallback)

Updated: CLAUDE.md template, 16 SKILL.md files, 2 workflow.md
references, and 2 extend-config.ts runtime loaders.
2026-03-09 04:54:26 +08:00
Jim Liu 宝玉 5771e6d8c5 feat(baoyu-translate): add external glossary files and frontmatter transformation
Support glossary_files in EXTEND.md for loading glossaries from external
markdown tables or YAML files. Add frontmatter transformation rules to
rename source metadata fields with source prefix during translation.
2026-03-06 23:38:27 -06:00
Jim Liu 宝玉 be2cbecfb0 feat(baoyu-translate): expand translation style presets from 4 to 9 with CLI flag support
Add 5 new style presets (academic, business, humorous, conversational,
elegant) to existing options. Wire --style CLI flag, update subagent
prompt template with style section, and document in both READMEs.
2026-03-06 02:33:25 -06:00
Jim Liu 宝玉 fe404c493d feat(baoyu-translate): extract workflow mechanics, expand triggers, and save frontmatter in chunks
- Extract Step 2 materialization details to references/workflow-mechanics.md
- Expand description trigger keywords (改成中文, 快翻, 本地化, etc.)
- Add proactive warning for long content in quick mode
- Save frontmatter to chunks/frontmatter.md in chunk.ts
- Fix step number references in upgrade prompt
- Simplify refined-workflow draft step to reference SKILL.md principles
2026-03-06 01:55:18 -06:00
Jim Liu 宝玉 b25eb87bb4 feat(baoyu-translate): add figurative language & emotional fidelity checks to refined workflow and quick mode 2026-03-06 00:01:07 -06:00
Jim Liu 宝玉 bc878e5157 feat(baoyu-translate): add figurative language analysis and meaning-first translation principles 2026-03-05 23:35:08 -06:00
Jim Liu 宝玉 f2c914887a feat(baoyu-translate): add --output-dir to chunk.ts and improve refined workflow
- chunk.ts: add --output-dir option so chunks write to output directory instead of source directory
- Refined workflow: split Review into Critical Review + Revision (5→6 steps)
- Add Europeanized language diagnosis for CJK targets

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 20:53:54 -06:00
Jim Liu 宝玉 5b4ba3ac3f feat(baoyu-translate): add three-mode translation skill with glossary support
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 19:32:27 -06:00