Files
songforge/plugins/README.md
T
swlandCursor 6d79ab93a2
selftest / selftest (push) Canceled after 0s
Add align/recheck/compare, plugins, and refresh Agent docs.
Wire deliver_report/listen_pack/retry hooks; gen --auto-retry and intro light check; make AGENTS_MIN the up-to-date agent entry with full command map.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-10 13:03:44 +08:00

1.2 KiB
Raw Blame History

plugins — 扩展目录(微内核外挂)

Agent / 开发者:新能力优先写插件,少改 core/ / rules/ / cli/。

路径 用途
hooks.py 钩子总线(内核只 emit)
builtin/ 随仓内置(如 intro_guard)
<name>/plugin.py 包式插件(推荐)
<name>.py 单文件插件

钩子

钩子 何时 典型用途
before_build_tags assemble 前 改风格参数
after_assemble tags/歌词就绪 守卫、改写
after_gen gen/dry-run 写完 manifest deliver_report
after_qc qc 渲染结束 deliver_report / listen_pack / retry_on_intro_fail

当前插件

插件 作用
builtin/intro_guard tags 禁止点名衬词音节
deliver_report 写 data/runs/.../report.md
listen_pack QC PASS 后截 listen/intro.wav + chorus_approx.wav
retry_on_intro_fail 写 retry_hint.json;配合 gen --auto-retry

最小插件示例

# plugins/hello/plugin.py
from ..hooks import bus

@bus.on("after_gen")
def _hi(run_dir=None, **kw):
    print("[hello]", run_dir)