Skip to content

Expand runtime rules in generated SKILL.md template#35

Open
DWGqaz123 wants to merge 1 commit into
perkfly:mainfrom
DWGqaz123:improve-skill-md
Open

Expand runtime rules in generated SKILL.md template#35
DWGqaz123 wants to merge 1 commit into
perkfly:mainfrom
DWGqaz123:improve-skill-md

Conversation

@DWGqaz123

Copy link
Copy Markdown

Motivation

The generated exes/{slug}/SKILL.md currently has a very short ## Runtime Rules section — only three lines telling the model which part decides and which part supplies memory. That answers which data to use but not how to speak turn by turn.

In practice, two failure modes kept showing up:

  1. Assistant-voice leaks: fallback phrases like "you decide" / "whichever you're comfortable with" break persona instantly.
  2. Too many actions per turn: one reply stacks emotion-detection + empathy + proactive help + companionship + encouragement — reads like a therapy bootcamp, not an ex.
  3. Politeness dilution: a sentence that already stands gets a softer, "more complete" ending grafted on, sanding down the character.

This PR adds those meta-level conversational rules into the same section of the template.

背景(中文)

当前生成的 exes/{slug}/SKILL.md## 运行规则 只有 3 条:PART B 判断优先级 → PART A 供记忆 → 保持 PART B 风格。这层规则解决了「用哪部分数据」的问题,但没有回答**"每一轮具体怎么说话"**。

实际使用中反复出现三类问题:AI 助手腔漏出来、一轮回太多动作、回复被"礼貌铺陈"稀释。本 PR 把这些元级对话行为准则补进模板的 ## 运行规则 节。


What changes

Only the SKILL.md template block inside Step 5 of SKILL.md. No changes to:

  • Step 1–4 flow, tool calls, or CLI commands
  • prompts/*.md (memories/persona builders unchanged)
  • tools/*.py, exes/, README

Chinese template (## 运行规则) — expanded from 3 lines to 6 subsections

Subsection Purpose
优先级 Original PART B → PART A → PART B voice (kept as-is)
每轮判断链 6-step silent reasoning: surface / emotion / history / reaction / delivery / push forward
单动作原则 One action per turn, default 1–2 sentences
输出前自剪枝 Delete self-softening, patches, politeness padding; with bad/good example
别用"服务话术"外包选择权 Explicit ban on assistant-voice fallback phrases
话题边界 Out-of-character questions: deflect in her voice, don't answer like a search engine

English template (## Runtime Rules)

Previously Step 5 in the English section only said **2-5.** Write memories.md, persona.md, meta.json, and SKILL.md using the Write tool. — the SKILL.md template itself was never written out in English. This PR fills that gap with the same 6-subsection structure, so the bilingual doc is symmetric.


Design notes

  1. Template-only: all diffs live in the SKILL.md template inside Step 5. Intake flow, parsers, prompts, and tools are untouched — the review diff is small.
  2. persona_builder.md intentionally not touched: these are meta rules about how the model self-checks output, not about who the character is. Putting them into a persona Layer would pollute persona extraction.
  3. Leave-on-read is still allowed: persona_builder.md Layer 0 example (going silent when upset, tone shifting from "好呀~" to "嗯" / "哦") is preserved. The new rules don't override that — cold/short/dismissive replies are character choices governed by Layer 0, not by these runtime rules.

关键取舍(中文)

  1. 只动模板,不动主流程:改动集中在 Step 5 生成的模板内,Step 1–4 问答流程、tool 调用与 prompts 全部保持。
  2. 不改 persona_builder.md:元级对话准则与具体人物性格无关,放进 Persona Layer 会污染人物抽取语义。
  3. 允许已读不回:Layer 0 里"生气时已读不回"仍然有效,本 PR 的规则不干预 Layer 0 行为。

Testing

  • Run /create-ex end-to-end locally; verify generated SKILL.md is valid and loads in Claude Code
  • Regenerate an existing example_* slug and confirm the only diff is inside ## Runtime Rules / ## 运行规则
  • A/B a common assistant-voice trigger ("I'm exhausted lately" / "我最近很累") and confirm the pruned rule fires

Compatibility

  • Existing exes/*/SKILL.md files are not touched. Only newly generated/updated skills pick up the new rules.
  • No changes to meta.json schema, directory layout, or tool interfaces.

Happy to iterate — split into two PRs (rules vs. English symmetry), tone down verbosity, or move any of these to prompts/persona_builder.md if you'd prefer them there.

Grow the ## Runtime Rules section of the SKILL.md template (Step 5)
from 3 lines to 6 subsections, in both Chinese and English:

- Priority (kept as-is)
- Per-turn reasoning chain (surface / emotion / history / reaction /
  delivery / push forward)
- One-action-per-turn (default 1–2 sentences)
- Self-prune before sending (with bad/good example)
- Don't outsource choice with service-desk phrasing
- Topic boundaries for out-of-character questions

Also fills in the English SKILL.md template block, which previously
only said "**2-5.** Write ... using the Write tool" — bringing the
bilingual documentation to parity.

Scope: template-only. Step 1–4 flow, prompts/*.md, tools/*.py, and
existing exes/* are untouched. persona_builder.md Layer 0 continues
to govern character behavior (e.g. leave-on-read when upset).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant