release: v0.20 Codex-ready skill-driven core
This commit is contained in:
+12
-1
@@ -33,6 +33,7 @@ from scripts.lib.markdown_chunker import (
|
||||
split_by_headers,
|
||||
)
|
||||
from scripts.lib.zenmux_client import ZenMuxClient, ZenMuxError, load_secrets
|
||||
from scripts.runtime.skills import SkillRegistry
|
||||
|
||||
DEFAULT_MODEL = "anthropic/claude-sonnet-4.6"
|
||||
MODEL_MAX_TOKENS = {
|
||||
@@ -43,6 +44,16 @@ MODEL_MAX_TOKENS = {
|
||||
"anthropic/claude-haiku-4.5": 16000,
|
||||
}
|
||||
PROMPT_FILE = Path(__file__).parent / "prompts" / "polish_system.txt"
|
||||
POLISH_SKILLS = ("humanizer-cn", "output-hygiene")
|
||||
|
||||
|
||||
def build_polish_system_prompt(skill_registry: SkillRegistry | None = None) -> str:
|
||||
"""Build the Phase 4 polish prompt with canonical writing skills attached."""
|
||||
registry = skill_registry or SkillRegistry()
|
||||
parts = [PROMPT_FILE.read_text(encoding="utf-8").rstrip()]
|
||||
for skill_name in POLISH_SKILLS:
|
||||
parts.append(f"# Skill: {skill_name}\n\n{registry.read(skill_name).rstrip()}")
|
||||
return "\n\n".join(parts) + "\n"
|
||||
|
||||
|
||||
def resolve_project(arg: str) -> Path:
|
||||
@@ -163,7 +174,7 @@ def main() -> int:
|
||||
log_file = logs_dir / "polish.jsonl"
|
||||
notes_file = project_root / "phase4" / "polish_notes.jsonl"
|
||||
|
||||
system_prompt = PROMPT_FILE.read_text(encoding="utf-8")
|
||||
system_prompt = build_polish_system_prompt()
|
||||
text = src_path.read_text(encoding="utf-8")
|
||||
blocks = split_by_headers(text, max_level=2)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user