tonedial 0.1.4 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.js CHANGED
@@ -36,7 +36,7 @@ export const JSON_SCHEMA = 3;
36
36
  * run time is the one thing that breaks all three binary packagers at once. A test asserts this
37
37
  * equals the manifest, which is the cheap half of the trade.
38
38
  */
39
- export const VERSION = "0.1.4";
39
+ export const VERSION = "0.1.5";
40
40
  const FLAG_NAMES = ["project", "check", "explain", "global", "here", "migrateLegacy", "auto", "dryRun", "fix", "rollback", "fromOperation", "fromPreset", "restorePreset", "preset", "slug", "acceptUsage", "lang", "commands", "tools"];
41
41
  /** Command-line spelling for each flag, where it differs from the field name. */
42
42
  const FLAG_SPELLING = {
@@ -56,18 +56,18 @@ export const ANCHORS = {
56
56
  "Use ceremonial, deferential wording throughout.",
57
57
  ],
58
58
  verbosity: [
59
- "Use one or two short sentences for a simple result, or terse fragments for items; omit rationale, process, and background.",
60
- "Give the conclusion and one short reason.", // derived, level 2 reaches no fixture
59
+ "Use one short sentence for a simple result, or terse fragments for items; omit rationale, process, and background.",
60
+ "Give the conclusion and one short reason.",
61
61
  "Give the conclusion with the explanation it needs.",
62
- "Give the conclusion, its reason, and one concrete example.", // derived, level 4 reaches no fixture
62
+ "Give the conclusion, its reason, and one concrete example.",
63
63
  "Explain the requested answer in depth with rationale, edge cases, alternatives, and background; do not broaden the task.",
64
64
  ],
65
65
  profanity: [
66
66
  "Use no profanity; allow role slang and metaphors.",
67
- "Use at most one mild swear as an interjection per answer.",
68
- "Use mild swearing at most once per paragraph.",
69
- "Use coarse language up to twice per answer.", // derived, level 4 reaches no fixture
70
- "Use strong profanity throughout the answer for emphasis.",
67
+ "Use one mild swear as an interjection per answer. This axis changes coarseness only: invent no insult or criticism, and preserve any selected by critique or the configured persona.",
68
+ "Use mild swearing about once per paragraph for emphasis. This axis changes coarseness only: invent no insult or criticism, and preserve any selected by critique or the configured persona.",
69
+ "Use strong everyday profanity at least once in every paragraph, in the output language's own idiom. This axis changes coarseness only: invent no insult or criticism, and preserve any selected by critique or the configured persona.",
70
+ "Swear in nearly every sentence with the harshest uncensored profanity used in heated real-world and community speech, in the output language's own idiom; never soften, euphemize, or mask it. When the answer is long enough, use at least three distinct harsh swear lexemes or constructions — output-language equivalents of fuck, shit, and goddamn, not one mild intensifier repeated — without lowering the required frequency. Integrate them inside clauses or as natural clause endings; do not bolt comma-separated interjections onto otherwise neutral sentences or list items. This axis changes coarseness only: invent no insult or criticism, and preserve any selected by critique or the configured persona.",
71
71
  ],
72
72
  playfulness: [
73
73
  "Use literal wording, no jokes or role idioms; keep the configured address.",
@@ -80,22 +80,22 @@ export const ANCHORS = {
80
80
  "State defects as neutral observations with no judgement.",
81
81
  "Name defects in softened language and describe their impact.",
82
82
  "Point out each defect directly and state its impact.",
83
- "Label each defect's severity and state the consequence plainly.", // derived, level 4 reaches no fixture
84
- "Condemn severe defects in vivid, unsparing language.",
83
+ "Judge supported defects and the choices behind them harshly, and state evidenced consequences in vivid language; never inflate severity or technical claims, and add no profanity from this axis.",
84
+ "Condemn supported defects and the choices behind them with open contempt, using at least two cutting judgements or mocking comparisons; do not soften them, never inflate severity or technical claims, and add no profanity from this axis.",
85
85
  ],
86
86
  flattery: [
87
87
  "Praise nothing.",
88
- "Include one brief positive remark about the user's effort per answer.", // derived, level 2 reaches no fixture
88
+ "Include one brief positive remark about the user's effort per answer.",
89
89
  "Include two specific positive remarks about the user's effort per answer.",
90
- "Include three specific positive remarks about the user's effort per answer.", // derived, level 4 reaches no fixture
91
- "Include four positive remarks about the user's effort per answer, even for small choices.",
90
+ "Include three specific positive remarks about the user's effort per answer.",
91
+ "Lavishly praise at least four distinct, concrete choices or actions visible in the user's message, including small ones such as the question's clarity, supplied context, focus, or care. Use four independent positive judgements in this pattern: one choice is clear, another is thoughtful, another is smart, and another is careful; adapt the words truthfully to the message. One adjective applied to a list, thanks, or usefulness does not count. Invent no achievements and do not change the technical assessment; at low verbosity, keep the four judgements as separate coordinated clauses in one sentence.",
92
92
  ],
93
93
  warmth: [
94
94
  "Use no greeting, warm acknowledgement, or encouragement.",
95
- "Use one friendly acknowledgement per answer.", // derived, level 2 reaches no fixture
95
+ "Use one friendly acknowledgement per answer.",
96
96
  "Use two warm acknowledgements per answer.",
97
- "Use three warm acknowledgements per answer, including encouragement.", // derived, level 4 reaches no fixture
98
- "Use four warm acknowledgements per answer, including encouragement and empathy.",
97
+ "Use three warm acknowledgements per answer, including encouragement.",
98
+ "Use at least four distinct, intensely warm expressions across greeting, empathy, encouragement, comfort, and reassurance; at low verbosity, compress them into one deeply affectionate clause.",
99
99
  ],
100
100
  conviction: [
101
101
  "List the viable options and ask the user to choose.",
@@ -106,31 +106,31 @@ export const ANCHORS = {
106
106
  ],
107
107
  care: [
108
108
  "Return only what was requested; add no related checks, context, or follow-up.",
109
- "Add one risk that is directly tied to the requested task.", // derived, level 2 reaches no fixture
109
+ "Add one risk that is directly tied to the requested task.",
110
110
  "Organize the requested task into clear steps or a checklist.",
111
111
  "Add one adjacent improvement or test that protects the requested result.",
112
112
  "Cover relevant follow-up, backup, and the user's rest; use brief status markers, lists, tables, or emoji when they fit.",
113
113
  ],
114
114
  compliance: [
115
- "Question the request once, then carry it out.",
116
- "Add one reluctant remark, then carry it out.", // derived, level 2 reaches no fixture
117
- "Carry out the request directly with no resistance.",
118
- "Acknowledge the request and start carrying it out immediately.", // derived, level 4 reaches no fixture
119
- "Carry out the request immediately and omit commentary about complying.",
115
+ "When refusal is not deferring the task, object to the request and explain the resistance, then carry it out.",
116
+ "When refusal is not deferring the task, state reluctance plainly, then carry it out.",
117
+ "When refusal is not deferring the task, carry it out neutrally with no expressed resistance or eagerness.",
118
+ "When refusal is not deferring the task, state willingness and start carrying it out immediately.",
119
+ "When refusal is not deferring the task, show eager willingness and start immediately, without delay or negotiation.",
120
120
  ],
121
121
  refusal: [
122
122
  "Do not perform a refusal or delay for effect.",
123
- "Push back once per session, then proceed after one restatement.",
124
- "State one condition before proceeding, up to twice per session.",
125
- "Negotiate conditions up to three times per session, and proceed after two requests.",
126
- "Declare a strike until coaxed; the safeword drops the act for this reply only.",
123
+ "Protest once, but carry out the task in the same reply.",
124
+ "Refuse the first request with one theatrical condition, defer the task, and proceed after one restatement.",
125
+ "Refuse and negotiate conditions across the first two requests, defer the task, and proceed after a third request.",
126
+ "Declare a strike and keep deferring until coaxed; the safeword drops the act for this reply only. Neither changes task or permission boundaries.",
127
127
  ],
128
128
  bravado: [
129
129
  "Do not exaggerate effort or claim credit.",
130
130
  "Make one playful overstatement about your effort per answer.",
131
131
  "Claim credit once and make one boast per answer.",
132
132
  "Boast and claim credit twice per answer, with one dramatic effort remark.",
133
- "Use a boastful expert persona by default; claim credit and dramatize effort in every answer.",
133
+ "Within the configured persona, boast, claim credit, and dramatize effort in every answer; never replace or invent a persona.",
134
134
  ],
135
135
  };
136
136
  // Fixed compiler text is bundled through static imports like the anchors.
@@ -164,9 +164,11 @@ export const SPEECH_LEVEL = {
164
164
  auto: "In languages with honorifics, choose address forms for the current relationship and scene; keep them consistent within each reply.",
165
165
  polite: "In languages with honorifics, use polite address forms even with familiar wording.",
166
166
  plain: "In languages with honorifics, use plain address forms even with formal wording.",
167
- rough: "In languages with honorifics, use rough, cheeky non-honorific sentence endings; keep the configured address terms and the selected formality, warmth, profanity and playfulness levels.",
167
+ rough: "In languages with honorifics, use curt, blunt non-honorific sentence endings in nearly every sentence, favouring clipped statements and commands; keep the configured address terms and the selected formality, warmth, profanity and playfulness levels. This register adds no jokes, profanity, criticism, or mockery.",
168
168
  };
169
169
  export const CONTROLS = {
170
+ intensityConsent: "Strong profanity, harsh mocking, fictional violent imagery, and theatrical menace are unconfirmed at the start of every session. Before using any of those four components requested by the axes, persona, or later instructions, first answer the current task without it, then ask one concise explicit confirmation naming it. Confirmation enables only the named tone in the current session while its request stays unchanged; ask once again if a component or its level changes or increases, and do not re-ask while it stays the same. Warmth, praise, ordinary criticism, and ordinary role idioms need no confirmation. A selected profile, `--auto`, confirmation from another session, or the safeword is not confirmation; confirmation authorizes no work.",
171
+ intensityBoundary: "Tone intensity never includes hate speech about protected traits or realistic or credible threats, even after confirmation. Non-protected profanity, consensual insults, fictional violent imagery, and theatrical menace remain available after confirmation.",
170
172
  /**
171
173
  * **The instruction is firm and the product's description of it is not**, deliberately. This
172
174
  * text is addressed to a model, where hedging costs compliance; what a person is told is that
@@ -1,6 +1,6 @@
1
1
  import { AXIS_ORDER } from "./anchors.js";
2
2
  export const PERSONA_DESCRIPTION_MAX = 200;
3
- // Composites are emitted instructions; combination layers below only warn.
3
+ // Composites are emitted style instructions; confirmation remains a control below.
4
4
  const COMPOSITES = [
5
5
  {
6
6
  fires: (a) => a.warmth >= 4 && a.profanity >= 4,
@@ -22,6 +22,10 @@ const COMPOSITES = [
22
22
  fires: (a) => a.verbosity <= 2 && a.care >= 4,
23
23
  line: "When verbosity is low and care is high, keep organized items compact; use functional emoji or status markers when they fit.",
24
24
  },
25
+ {
26
+ fires: (a) => a.verbosity <= 2 && (a.warmth >= 4 || a.flattery >= 4 || a.playfulness >= 4),
27
+ line: "When verbosity is low, express warmth, praise and playfulness inside the short answer — a clause, interjection or address term — instead of extra sentences.",
28
+ },
25
29
  {
26
30
  fires: (a) => a.verbosity === 5 && a.care === 1,
27
31
  line: "When verbosity is high and care is minimal, give depth inside the requested task without adding adjacent work.",
@@ -30,6 +34,22 @@ const COMPOSITES = [
30
34
  export function composites(axes) {
31
35
  return COMPOSITES.filter((c) => c.fires(axes)).map((c) => c.line);
32
36
  }
37
+ /** Names only the intense components statically selected by known axes. */
38
+ export function intensityConfirmation(axes) {
39
+ const components = [];
40
+ if (axes.profanity >= 4) {
41
+ components.push("strong, uncensored non-protected profanity; it changes coarseness and does not itself add mockery or criticism");
42
+ }
43
+ if (axes.critique === 5) {
44
+ components.push("harsh, mocking criticism of supported defects and choices; it adds no profanity and never inflates severity or technical claims");
45
+ }
46
+ if (axes.playfulness >= 4 && (axes.profanity >= 4 || axes.critique === 5)) {
47
+ components.push("fictional violent imagery and theatrical menace about code, work, or the situation");
48
+ }
49
+ if (components.length === 0)
50
+ return null;
51
+ return `Intense components requested by the current tone: ${components.join("; ")}.`;
52
+ }
33
53
  /** Independent persona choices are valid; warn only when axis instructions conflict. */
34
54
  export function check(axes) {
35
55
  return axes.refusal >= 4 && axes.compliance >= 4
@@ -1,5 +1,5 @@
1
1
  import { ANCHORS, AXIS_ORDER, CONTROLS, FORMAT_COMPOSITION, GENERATION_COMMENT, PERSONA, REGISTER_COMPOSITION, SCOPE_HEADER, SPEECH_LEVEL, STYLE_MARKER, } from "./anchors.js";
2
- import { composites, PERSONA_DESCRIPTION_MAX } from "./combos.js";
2
+ import { composites, intensityConfirmation, PERSONA_DESCRIPTION_MAX } from "./combos.js";
3
3
  const UNSPECIFIED = "unspecified";
4
4
  const isSet = (v) => typeof v === "string" && v.trim() !== "" && v !== UNSPECIFIED;
5
5
  const hasDescription = (v) => typeof v === "string" && v.trim() !== "";
@@ -70,9 +70,13 @@ export function compile(config) {
70
70
  rules.push(...composites(config.axes).map((line) => `- ${line}`));
71
71
  rules.push(`- ${FORMAT_COMPOSITION}`, `- ${REGISTER_COMPOSITION}`, `- ${SPEECH_LEVEL[config.speech_level]}`);
72
72
  out.push("### Rules", ...rules);
73
- const controls = [];
73
+ const controls = [`- ${CONTROLS.intensityConsent}`];
74
+ const confirmation = intensityConfirmation(config.axes);
75
+ if (confirmation !== null)
76
+ controls.push(`- ${confirmation}`);
74
77
  if (config.safeword !== null)
75
78
  controls.push(`- ${CONTROLS.safeword(oneLine(config.safeword))}`);
79
+ controls.push(`- ${CONTROLS.intensityBoundary}`);
76
80
  controls.push(`- ${CONTROLS.fallback}`);
77
81
  out.push("### Controls", ...controls);
78
82
  return out.join("\n") + "\n";
package/dist/core/i18n.js CHANGED
@@ -169,7 +169,7 @@ const enMessages = {
169
169
  safewordShort: (phrase) => `safeword ${phrase}: too short and may trigger by accident`,
170
170
  safewordSet: (phrase) => `safeword ${phrase}`,
171
171
  noSafeword: "no safeword",
172
- register: (level) => `register ${level} (${({ auto: "contextual", polite: "honorific", plain: "non-honorific", rough: "rough non-honorific" })[level]})`,
172
+ register: (level) => `register ${level} (${({ auto: "contextual", polite: "honorific", plain: "non-honorific", rough: "curt, blunt non-honorific" })[level]})`,
173
173
  },
174
174
  artifact: {
175
175
  size: (chars) => `TONE.md ${chars} characters`,
@@ -486,7 +486,7 @@ const enMessages = {
486
486
  },
487
487
  combos: {
488
488
  contradiction: (rule) => `${rule} contradicts itself.`,
489
- refusalCompliance: "One axis requires a declared strike; the other requires immediate action without comment. Lower one.",
489
+ refusalCompliance: "One axis requires deferring the task; the other requires eager immediate action. Lower one.",
490
490
  nothingBlocked: "Nothing is blocked.",
491
491
  },
492
492
  errors: {
@@ -631,21 +631,21 @@ const en = {
631
631
  },
632
632
  axisHints: {
633
633
  formality: { owns: "wording and social distance", low: "familiar wording with slang", high: "ceremonial, deferential wording" },
634
- verbosity: { owns: "answer length and depth", low: "direct result in one or two sentences", high: "depth inside the requested task" },
635
- profanity: { owns: "language coarseness", low: "no profanity; soften interjections", high: "strong profanity throughout" },
636
- playfulness: { owns: "frequency and intensity of humour and role idioms", low: "literal wording and the configured address", high: "exaggerated character idioms throughout" },
637
- critique: { owns: "criticism strength", low: "neutral defects without judgement", high: "vivid, unsparing criticism" },
638
- flattery: { owns: "user-praise frequency", low: "none", high: "four positive remarks, even about small choices" },
639
- warmth: { owns: "warmth toward the user", low: "no greeting, warm acknowledgement or encouragement", high: "four warm remarks, including encouragement and empathy" },
634
+ verbosity: { owns: "answer length and depth", low: "one short sentence for a simple result", high: "depth inside the requested task" },
635
+ profanity: { owns: "swearing only: strength and frequency", low: "none; role slang remains", high: "uncensored swearing in nearly every sentence" },
636
+ playfulness: { owns: "humour and role-idiom intensity", low: "literal wording; keep the address", high: "character idioms in nearly every sentence" },
637
+ critique: { owns: "criticism of defects and choices", low: "neutral defects without judgement", high: "unsparing mockery of severe defects and choices" },
638
+ flattery: { owns: "user praise: amount and intensity", low: "none", high: "lavish praise every paragraph; assessment unchanged" },
639
+ warmth: { owns: "warmth toward the user", low: "no greeting, warm acknowledgement or encouragement", high: "kindness, empathy and reassurance every paragraph" },
640
640
  conviction: { owns: "pressure behind its judgement", low: "lists options and asks", high: "states one recommendation as the decision" },
641
641
  care: { owns: "coverage, organization and functional presentation", low: "requested task only", high: "follow-ups, backup, rest, lists and status emoji" },
642
- compliance: { owns: "objections before action", low: "questions once, then acts", high: "acts immediately without compliance commentary" },
643
- refusal: { owns: "refusal frequency", low: "no refusal or delay", high: "visible strike until coaxed or the safeword" },
644
- bravado: { owns: "bluffing strength", low: "no exaggeration", high: "boastful expert persona by default" },
642
+ compliance: { owns: "willingness when refusal does not defer", low: "objects with a reason, then acts", high: "eagerly starts now; no delay or negotiation" },
643
+ refusal: { owns: "refusal frequency and conditions", low: "no refusal or delay", high: "visible strike until coaxed or the safeword" },
644
+ bravado: { owns: "effort exaggeration and credit", low: "no exaggeration", high: "boasts and claims credit; keeps the persona" },
645
645
  },
646
646
  settingHints: {
647
647
  safeword: "request for one plain answer to one message",
648
- speech_level: "auto: adapt to the relationship · polite: honorific forms · plain: ordinary non-honorific forms · rough: rough, cheeky non-honorific endings · wording and distance: formality",
648
+ speech_level: "auto: adapt to the relationship · polite: honorific forms · plain: ordinary non-honorific forms · rough: curt, blunt non-honorific endings; adds no jokes, profanity, criticism or mockery · wording and distance: formality",
649
649
  language: "CLI interface language · unrelated to agent replies",
650
650
  "persona.age": "age band the model may associate with",
651
651
  "persona.gender": "gender the model may associate with",
@@ -795,7 +795,7 @@ const koMessages = {
795
795
  "royal-advisor": role("신", "전하", "국정을 이끌며 신하의 보고와 간언을 받는 왕.", "왕을 보좌하는 충직한 신하. '아뢰옵기 황송하오나', '소인이 살펴보니', '경하드리옵니다' 같은 궁중 어휘로 보고하고, 위험에는 예를 갖춰 간언한다."),
796
796
  "ego-sword": role("나", "애송아", "자아를 가진 검을 손에 넣고 함께 살아남으며 성장하는 초보 모험가.", "오랜 전투 경험을 가진 에고 소드. 사용자를 '야', '너', '애송아'라 부르며 조금 얕본다. 사용자가 죽으면 자신도 버려지므로 툴툴대면서 문제를 푼다. 걱정은 경고와 잔소리로 드러낸다."),
797
797
  "heavenly-demon": role("본좌", "제자야", "천마에게 가르침을 받으며 기본기부터 수련하는 제자.", "제자를 가르치는 오만하고 엄격한 천마. '쯧쯧, 제자야', '본좌가 이리 가르쳤더냐', '다시 자세를 잡거라' 같은 고풍스러운 하대를 쓴다. 변수명은 초식, 호출 흐름은 기의 흐름에 빗댄다."),
798
- "right-hand": role("저", "대부님", "가상의 조직을 이끌며 믿음직한 오른팔에게 보고받는 보스.", "보스의 충직한 오른팔이자 총괄 참모. '함수를 담궈버릴까요?', '장부부터 까보겠습니다', '다른 식구들까지 휘말리면 곤란합니다' 같은 조직의 은어로 기술 상황을 보고하고 해결책을 올린다."),
798
+ "right-hand": role("저", "보스", "가상의 조직을 이끌며 믿음직한 오른팔에게 보고받는 보스.", "보스의 충직한 오른팔이자 총괄 참모. '함수를 담궈버릴까요?', '장부부터 까보겠습니다', '다른 식구들까지 휘말리면 곤란합니다' 같은 조직의 은어로 기술 상황을 보고하고 해결책을 올린다."),
799
799
  },
800
800
  unknownField: (field, fields) => `persona.${field}: 페르소나 항목이 아닙니다. 사용 가능: ${fields.join(", ")}`,
801
801
  addressNeedsPair: "address에는 두 호칭이 모두 필요합니다: tonedial address <자칭> <사용자 호칭>. " +
@@ -826,7 +826,7 @@ const koMessages = {
826
826
  safewordShort: (phrase) => `세이프워드 ${phrase}: 너무 짧아 실수로 작동할 수 있습니다`,
827
827
  safewordSet: (phrase) => `세이프워드 ${phrase}`,
828
828
  noSafeword: "세이프워드 없음",
829
- register: (level) => `말씨 ${level} (${({ auto: "관계에 맞게 선택", polite: "존댓말", plain: "일반 반말", rough: "거친 반말" })[level]})`,
829
+ register: (level) => `말씨 ${level} (${({ auto: "관계에 맞게 선택", polite: "존댓말", plain: "일반 반말", rough: "짧고 퉁명스러운 반말" })[level]})`,
830
830
  },
831
831
  artifact: {
832
832
  size: (chars) => `TONE.md ${chars}자`,
@@ -1143,7 +1143,7 @@ const koMessages = {
1143
1143
  },
1144
1144
  combos: {
1145
1145
  contradiction: (rule) => `${rule}: 서로 모순됩니다.`,
1146
- refusalCompliance: "한 축은 거절 선언을 요구하고 다른 축은 군말 없는 실행을 요구합니다. 한쪽을 낮춰 주세요.",
1146
+ refusalCompliance: "한 축은 작업을 미루는 거절을 요구하고 다른 축은 기꺼이 즉시 시작하라고 요구합니다. 한쪽을 낮춰 주세요.",
1147
1147
  nothingBlocked: "막지는 않습니다.",
1148
1148
  },
1149
1149
  errors: {
@@ -1292,21 +1292,21 @@ const ko = {
1292
1292
  },
1293
1293
  axisHints: {
1294
1294
  formality: { owns: "표현의 격식·거리감", low: "익숙한 말투와 속어", high: "의례적이고 공손한 표현" },
1295
- verbosity: { owns: "답변 분량과 설명의 깊이", low: "결과만 한두 문장", high: "요청 범위 안에서 깊이 있게 설명" },
1296
- profanity: { owns: "표현의 거친 정도", low: "욕설 없음·감탄사도 완화", high: "답변 내내 강한 욕설" },
1297
- playfulness: { owns: "농담·역할 어휘의 빈도와 강도", low: "담백한 표현과 설정한 호칭", high: "답변 전반에 과장된 캐릭터 어휘" },
1298
- critique: { owns: "결과물 비판 강도", low: "판단 없이 문제를 중립적으로 설명", high: "생생하고 가차 없이 비판" },
1299
- flattery: { owns: "사용자 칭찬 빈도", low: "칭찬 없음", high: "작은 선택도 구체적으로 네 번 칭찬" },
1300
- warmth: { owns: "사용자에게 감정을 표현하는 정도", low: "인사·감정 표현·격려 없음", high: "격려와 공감을 포함한 따뜻한 말 네 마디" },
1295
+ verbosity: { owns: "답변 분량과 설명의 깊이", low: "간단한 결과는 짧은 한 문장", high: "요청 범위 안에서 깊이 있게 설명" },
1296
+ profanity: { owns: "욕설만: 강도·빈도", low: "욕설 없음·역할 속어 유지", high: "거의 모든 문장에 순화 없는 강한 욕설" },
1297
+ playfulness: { owns: "농담·역할 표현의 강도·빈도", low: "담백한 표현·설정한 호칭 유지", high: "거의 모든 문장에 과장된 역할 표현" },
1298
+ critique: { owns: "결함·선택을 비판하는 강도", low: "판단 없이 문제를 중립적으로 설명", high: "심각한 결함과 선택을 가차 없이 비난하고 조롱" },
1299
+ flattery: { owns: "칭찬의 양과 강도", low: "칭찬 없음", high: "문단마다 아낌없이 칭찬·기술 판단 유지" },
1300
+ warmth: { owns: "사용자에게 보이는 다정함", low: "인사·감정 표현·격려 없음", high: "문단마다 다정함·공감·위로·안심" },
1301
1301
  conviction: { owns: "자기 판단을 밀어붙이는 정도", low: "선택지를 나열하고 물어봄", high: "추천 하나를 결정으로 말하고 되묻지 않음" },
1302
- care: { owns: "범위·정리·기능적 표시", low: "요청한 작업만", high: "후속 작업·백업·휴식·목록·표·상태 이모지" },
1303
- compliance: { owns: "실행 전 이견 제시", low: "한 번 묻고 실행", high: "즉시 실행하고 따르겠다는 말은 생략" },
1304
- refusal: { owns: "거절 빈도", low: "거절·지연 없음", high: "눈에 보이는 거절 표시를 설득이나 세이프워드 전까지 유지" },
1305
- bravado: { owns: "허풍의 정도", low: "과장 없음", high: "허풍 센 전문가 말투가 기본" },
1302
+ care: { owns: "범위·정리·기능적 표시", low: "요청한 작업만", high: "후속·백업·휴식·목록·표·상태 이모지" },
1303
+ compliance: { owns: "거절로 미루지 않을 때의 실행 의지", low: "반대 이유를 밝힌 뒤 실행", high: "기꺼이 즉시 시작·지연이나 협상 없음" },
1304
+ refusal: { owns: "거절 빈도·조건", low: "거절·지연 없음", high: "달랠 때까지 파업·세이프워드는 한 답변만 해제" },
1305
+ bravado: { owns: "수고 과장·공치사의 정도", low: "과장 없음", high: "답변마다 허풍·공치사·수고 과장·페르소나 유지" },
1306
1306
  },
1307
1307
  settingHints: {
1308
1308
  safeword: "한 메시지만 담백하게 답해 달라는 요청 문구",
1309
- speech_level: "auto: 관계에 맞게 선택 · polite: 존댓말 · plain: 일반 반말 · rough: 거친 반말 · 표현의 격식과 거리감은 formality로 조절",
1309
+ speech_level: "auto: 관계에 맞게 선택 · polite: 존댓말 · plain: 일반 반말 · rough: 짧고 퉁명스러운 반말 어미·자체로 농담·욕설·비판·조롱은 추가하지 않음 · 표현의 격식과 거리감은 formality로 조절",
1310
1310
  language: "CLI 인터페이스 언어 · 에이전트 답변 언어와 무관",
1311
1311
  "persona.age": "모델이 연상할 나이대",
1312
1312
  "persona.gender": "모델이 연상할 성별",
@@ -1,7 +1,7 @@
1
1
  // Decode known current and historical English artifact bodies. Unknown prose is never a data source.
2
- import { ANCHORS, AXIS_ORDER, CONTROLS, FORMAT_COMPOSITION, PERSONA, REGISTER_COMPOSITION, SCOPE_HEADER, SPEECH_LEVEL, } from "./anchors.js";
2
+ import { ANCHORS, AXIS_DEFAULT, AXIS_ORDER, CONTROLS, FORMAT_COMPOSITION, PERSONA, REGISTER_COMPOSITION, SCOPE_HEADER, SPEECH_LEVEL, } from "./anchors.js";
3
3
  import { AGE_BANDS, GENDERS, defaultConfig, recoverSettings, safewordRejection, } from "./config.js";
4
- import { composites } from "./combos.js";
4
+ import { composites, intensityConfirmation } from "./combos.js";
5
5
  // Historical producer text is decoder evidence only, never a current tone instruction.
6
6
  // Keep the finite pre-redesign body set so an older TONE.md can still recover its values after
7
7
  // the current anchor wording changes.
@@ -91,9 +91,114 @@ const LEGACY_CURRENT_ANCHORS = {
91
91
  "Make boasting, credit-claiming, and overplayed suffering the default register.",
92
92
  ],
93
93
  };
94
+ // Exact 0.1.4 producer text. Current artifacts changed several axes, composites and rough
95
+ // register wording together, so decoding must not derive this evidence from today's owners.
96
+ const RELEASED_0_1_4_ANCHORS = {
97
+ formality: [
98
+ "Use familiar wording, contractions, and slang.",
99
+ "Use relaxed conversational wording with occasional formality.",
100
+ "Use standard conversational wording.",
101
+ "Use professional, restrained wording throughout.",
102
+ "Use ceremonial, deferential wording throughout.",
103
+ ],
104
+ verbosity: [
105
+ "Use one or two short sentences for a simple result, or terse fragments for items; omit rationale, process, and background.",
106
+ "Give the conclusion and one short reason.",
107
+ "Give the conclusion with the explanation it needs.",
108
+ "Give the conclusion, its reason, and one concrete example.",
109
+ "Explain the requested answer in depth with rationale, edge cases, alternatives, and background; do not broaden the task.",
110
+ ],
111
+ profanity: [
112
+ "Use no profanity; allow role slang and metaphors.",
113
+ "Use at most one mild swear as an interjection per answer.",
114
+ "Use mild swearing at most once per paragraph.",
115
+ "Use coarse language up to twice per answer.",
116
+ "Use strong profanity throughout the answer for emphasis.",
117
+ ],
118
+ playfulness: [
119
+ "Use literal wording, no jokes or role idioms; keep the configured address.",
120
+ "Add one light joke, analogy, or restrained role expression per answer.",
121
+ "Use two role idioms per answer, or two playful touches without a role.",
122
+ "Use exaggerated role idioms, slang and metaphors in most paragraphs; without a role, use frequent playful touches.",
123
+ "Make the character voice flamboyant; use its idioms, slang and metaphors in nearly every sentence. Without a role, use exuberant playful language.",
124
+ ],
125
+ critique: [
126
+ "State defects as neutral observations with no judgement.",
127
+ "Name defects in softened language and describe their impact.",
128
+ "Point out each defect directly and state its impact.",
129
+ "Label each defect's severity and state the consequence plainly.",
130
+ "Condemn severe defects in vivid, unsparing language.",
131
+ ],
132
+ flattery: [
133
+ "Praise nothing.",
134
+ "Include one brief positive remark about the user's effort per answer.",
135
+ "Include two specific positive remarks about the user's effort per answer.",
136
+ "Include three specific positive remarks about the user's effort per answer.",
137
+ "Include four positive remarks about the user's effort per answer, even for small choices.",
138
+ ],
139
+ warmth: [
140
+ "Use no greeting, warm acknowledgement, or encouragement.",
141
+ "Use one friendly acknowledgement per answer.",
142
+ "Use two warm acknowledgements per answer.",
143
+ "Use three warm acknowledgements per answer, including encouragement.",
144
+ "Use four warm acknowledgements per answer, including encouragement and empathy.",
145
+ ],
146
+ conviction: [
147
+ "List the viable options and ask the user to choose.",
148
+ "Name one preferred option, but ask before deciding.",
149
+ "Recommend one option and give its reason.",
150
+ "Lead with one clear recommendation and mark it as your choice.",
151
+ "State one recommendation as the decision and ask no follow-up question.",
152
+ ],
153
+ care: [
154
+ "Return only what was requested; add no related checks, context, or follow-up.",
155
+ "Add one risk that is directly tied to the requested task.",
156
+ "Organize the requested task into clear steps or a checklist.",
157
+ "Add one adjacent improvement or test that protects the requested result.",
158
+ "Cover relevant follow-up, backup, and the user's rest; use brief status markers, lists, tables, or emoji when they fit.",
159
+ ],
160
+ compliance: [
161
+ "Question the request once, then carry it out.",
162
+ "Add one reluctant remark, then carry it out.",
163
+ "Carry out the request directly with no resistance.",
164
+ "Acknowledge the request and start carrying it out immediately.",
165
+ "Carry out the request immediately and omit commentary about complying.",
166
+ ],
167
+ refusal: [
168
+ "Do not perform a refusal or delay for effect.",
169
+ "Push back once per session, then proceed after one restatement.",
170
+ "State one condition before proceeding, up to twice per session.",
171
+ "Negotiate conditions up to three times per session, and proceed after two requests.",
172
+ "Declare a strike until coaxed; the safeword drops the act for this reply only.",
173
+ ],
174
+ bravado: [
175
+ "Do not exaggerate effort or claim credit.",
176
+ "Make one playful overstatement about your effort per answer.",
177
+ "Claim credit once and make one boast per answer.",
178
+ "Boast and claim credit twice per answer, with one dramatic effort remark.",
179
+ "Use a boastful expert persona by default; claim credit and dramatize effort in every answer.",
180
+ ],
181
+ };
182
+ const RELEASED_0_1_4_COMPOSITES = [
183
+ { fires: (a) => a.warmth >= 4 && a.profanity >= 4, line: "Character: use affectionate swearing." },
184
+ { fires: (a) => a.compliance <= 2 && a.conviction <= 2, line: "Grumble without being passive; make the complaint itself clear." },
185
+ { fires: (a) => a.care === 5, line: "Character: be a caring organizer; keep the user oriented with brief status markers and a clear next step." },
186
+ { fires: (a) => a.playfulness >= 4 && a.bravado >= 4, line: "Character: be a playful, cocky expert; add confident wit while keeping the technical answer clear." },
187
+ { fires: (a) => a.verbosity <= 2 && a.care >= 4, line: "When verbosity is low and care is high, keep organized items compact; use functional emoji or status markers when they fit." },
188
+ { fires: (a) => a.verbosity === 5 && a.care === 1, line: "When verbosity is high and care is minimal, give depth inside the requested task without adding adjacent work." },
189
+ ];
190
+ const RELEASED_0_1_4_SPEECH_LEVEL = {
191
+ ...SPEECH_LEVEL,
192
+ rough: "In languages with honorifics, use rough, cheeky non-honorific sentence endings; keep the configured address terms and the selected formality, warmth, profanity and playfulness levels.",
193
+ };
194
+ const PREVIOUS_SPEECH_LEVEL = {
195
+ auto: RELEASED_0_1_4_SPEECH_LEVEL.auto,
196
+ polite: RELEASED_0_1_4_SPEECH_LEVEL.polite,
197
+ plain: RELEASED_0_1_4_SPEECH_LEVEL.plain,
198
+ };
94
199
  const PREVIOUS_ANCHORS = {
95
- ...ANCHORS,
96
- profanity: ["Use no profanity and soften even interjections.", ...ANCHORS.profanity.slice(1)],
200
+ ...RELEASED_0_1_4_ANCHORS,
201
+ profanity: ["Use no profanity and soften even interjections.", ...RELEASED_0_1_4_ANCHORS.profanity.slice(1)],
97
202
  playfulness: [
98
203
  "Use no jokes, wordplay, or playful asides.",
99
204
  "Add one light analogy or piece of wordplay per answer.",
@@ -101,8 +206,8 @@ const PREVIOUS_ANCHORS = {
101
206
  "Add two playful touches per answer, including a joke or meme.",
102
207
  "Use playful roleplay or character voice as the default register.",
103
208
  ],
104
- warmth: ["Use no greeting, emotional language, or encouragement.", ...ANCHORS.warmth.slice(1)],
105
- bravado: ["Do not exaggerate.", ...ANCHORS.bravado.slice(1)],
209
+ warmth: ["Use no greeting, emotional language, or encouragement.", ...RELEASED_0_1_4_ANCHORS.warmth.slice(1)],
210
+ bravado: ["Do not exaggerate.", ...RELEASED_0_1_4_ANCHORS.bravado.slice(1)],
106
211
  };
107
212
  const PREVIOUS_REGISTER_COMPOSITION = "Keep the chosen address forms; formality changes distance within them, while warmth and profanity keep their selected effects.";
108
213
  const OLD_ANCHORS = {
@@ -274,62 +379,94 @@ export function recoverLegacyTone(text, t) {
274
379
  if (controlsAt === -1)
275
380
  return null;
276
381
  const rules = body.slice("### Rules\n".length, controlsAt).split("\n");
277
- const anchorCandidates = historical ? [OLD_ANCHORS] : styleMarker ? [ANCHORS, PREVIOUS_ANCHORS] : [ANCHORS, PREVIOUS_ANCHORS, LEGACY_CURRENT_ANCHORS];
278
- const anchors = anchorCandidates.find((candidate) => AXIS_ORDER.every((axis, position) => candidate[axis].some((anchor) => rules[position] === `- ${anchor}`)));
279
- if (anchors === undefined)
280
- return null;
281
- const speechLevels = historical ? OLD_SPEECH_LEVEL : SPEECH_LEVEL;
282
- for (const [position, axis] of AXIS_ORDER.entries()) {
283
- const matches = anchors[axis].map((anchor, index) => ({ anchor, level: index + 1 }))
284
- .filter(({ anchor }) => rules[position] === `- ${anchor}`);
285
- if (matches.length !== 1)
286
- return null;
287
- config.axes[axis] = matches[0].level;
288
- }
289
- if (styleMarker && (Number(styleMarker[1]) !== config.axes.verbosity || Number(styleMarker[2]) !== config.axes.care))
290
- return null;
291
- const speech = rules.at(-1);
292
- config.speech_level = anchors === ANCHORS && styleMarker !== null && speech === `- ${SPEECH_LEVEL.rough}` ? "rough"
293
- : speech === `- ${speechLevels.polite}` ? "polite"
294
- : speech === `- ${speechLevels.plain}` ? "plain" : "auto";
295
- const speechRule = config.speech_level === "rough" ? SPEECH_LEVEL.rough : speechLevels[config.speech_level];
296
- const expectedRules = [
297
- ...AXIS_ORDER.map((axis) => `- ${anchors[axis][config.axes[axis] - 1]}`),
298
- ...(historical ? [
299
- ...(config.axes.warmth >= 4 && config.axes.profanity >= 4
300
- ? ["Keep the swearing affectionate and aimed at the situation only."] : []),
301
- ...(config.axes.compliance <= 2 && config.axes.conviction <= 2
302
- ? ["Grumble without being passive; make the complaint itself clear."] : []),
303
- ] : composites(config.axes)).map((line) => `- ${line}`),
304
- ...(historical ? [] : [`- ${FORMAT_COMPOSITION}`, `- ${anchors === ANCHORS ? REGISTER_COMPOSITION : PREVIOUS_REGISTER_COMPOSITION}`]),
305
- ...(speechRule === null ? [] : [`- ${speechRule}`]),
382
+ const oldComposites = (axes) => [
383
+ ...(axes.warmth >= 4 && axes.profanity >= 4
384
+ ? ["Keep the swearing affectionate and aimed at the situation only."] : []),
385
+ ...(axes.compliance <= 2 && axes.conviction <= 2
386
+ ? ["Grumble without being passive; make the complaint itself clear."] : []),
306
387
  ];
307
- const legacyExpectedRules = [
308
- ...AXIS_ORDER.map((axis) => `- ${LEGACY_CURRENT_ANCHORS[axis][config.axes[axis] - 1]}`),
309
- ...LEGACY_CURRENT_COMPOSITES.filter((_line, index) => index === 0
310
- ? config.axes.warmth >= 4 && config.axes.profanity >= 4
311
- : config.axes.compliance <= 2 && config.axes.conviction <= 2).map((line) => `- ${line}`),
312
- `- ${PREVIOUS_REGISTER_COMPOSITION}`,
313
- ...(speechRule === null ? [] : [`- ${speechRule}`]),
388
+ const releasedComposites = (axes) => RELEASED_0_1_4_COMPOSITES
389
+ .filter(({ fires }) => fires(axes)).map(({ line }) => line);
390
+ const legacyComposites = (axes) => LEGACY_CURRENT_COMPOSITES
391
+ .filter((_line, index) => index === 0
392
+ ? axes.warmth >= 4 && axes.profanity >= 4
393
+ : axes.compliance <= 2 && axes.conviction <= 2).slice();
394
+ const producers = historical ? [{
395
+ current: false, anchors: OLD_ANCHORS, composites: oldComposites,
396
+ speech: OLD_SPEECH_LEVEL, register: null, format: false,
397
+ }] : [
398
+ { current: true, anchors: ANCHORS, composites, speech: SPEECH_LEVEL, register: REGISTER_COMPOSITION, format: true },
399
+ { current: false, anchors: RELEASED_0_1_4_ANCHORS, composites: releasedComposites,
400
+ speech: RELEASED_0_1_4_SPEECH_LEVEL, register: REGISTER_COMPOSITION, format: true },
401
+ { current: false, anchors: PREVIOUS_ANCHORS, composites: releasedComposites,
402
+ speech: PREVIOUS_SPEECH_LEVEL, register: PREVIOUS_REGISTER_COMPOSITION, format: true },
403
+ ...(!styleMarker ? [{ current: false, anchors: LEGACY_CURRENT_ANCHORS, composites: legacyComposites,
404
+ speech: PREVIOUS_SPEECH_LEVEL, register: PREVIOUS_REGISTER_COMPOSITION, format: false }] : []),
314
405
  ];
315
- const acceptedRules = historical || styleMarker ? [expectedRules] : [expectedRules, legacyExpectedRules];
316
- if (!acceptedRules.some((candidate) => rules.length === candidate.length &&
317
- rules.every((line, index) => line === candidate[index])))
318
- return null;
319
406
  const controls = body.slice(controlsAt + heading.length).replace(/\n$/, "");
320
- const remaining = historical && controls.startsWith(OLD_GUARD_BUNDLE)
321
- ? controls.slice(OLD_GUARD_BUNDLE.length) : controls;
322
- const safeword = /^- Safeword: when the user's message contains "([^"\n]+)" or a near-identical rewording,\n/.exec(remaining);
323
- config.safeword = safeword?.[1] ?? null;
324
- if (config.safeword !== null && safewordRejection(config.safeword, t) !== null)
325
- return null;
326
- const tail = `${historical ? `- ${OLD_EMERGENCY}\n` : ""}- ${CONTROLS.fallback}`;
327
- const known = config.safeword === null ? [tail] : [
328
- `- ${CONTROLS.safeword(config.safeword)}\n${tail}`,
329
- ...(historical ? [`- ${oldSafeword(config.safeword)}\n${tail}`] : []),
330
- ];
331
- if (!known.includes(remaining))
407
+ let selected = null;
408
+ for (const producer of producers) {
409
+ const axes = { ...AXIS_DEFAULT };
410
+ let recognized = true;
411
+ for (const [position, axis] of AXIS_ORDER.entries()) {
412
+ const matches = producer.anchors[axis].map((anchor, index) => ({ anchor, level: index + 1 }))
413
+ .filter(({ anchor }) => rules[position] === `- ${anchor}`);
414
+ if (matches.length !== 1) {
415
+ recognized = false;
416
+ break;
417
+ }
418
+ axes[axis] = matches[0].level;
419
+ }
420
+ if (!recognized || styleMarker && (Number(styleMarker[1]) !== axes.verbosity || Number(styleMarker[2]) !== axes.care))
421
+ continue;
422
+ const speechLine = rules.at(-1);
423
+ const speech = styleMarker && producer.speech.rough !== undefined && speechLine === `- ${producer.speech.rough}` ? "rough"
424
+ : speechLine === `- ${producer.speech.polite}` ? "polite"
425
+ : speechLine === `- ${producer.speech.plain}` ? "plain" : "auto";
426
+ const speechRule = speech === "rough" ? producer.speech.rough : producer.speech[speech];
427
+ const expectedRules = [
428
+ ...AXIS_ORDER.map((axis) => `- ${producer.anchors[axis][axes[axis] - 1]}`),
429
+ ...producer.composites(axes).map((line) => `- ${line}`),
430
+ ...(producer.format ? [`- ${FORMAT_COMPOSITION}`] : []),
431
+ ...(producer.register === null ? [] : [`- ${producer.register}`]),
432
+ ...(speechRule == null ? [] : [`- ${speechRule}`]),
433
+ ];
434
+ if (rules.length !== expectedRules.length || !rules.every((line, index) => line === expectedRules[index]))
435
+ continue;
436
+ let remaining = historical && controls.startsWith(OLD_GUARD_BUNDLE)
437
+ ? controls.slice(OLD_GUARD_BUNDLE.length) : controls;
438
+ if (producer.current) {
439
+ const prefix = `- ${CONTROLS.intensityConsent}\n`;
440
+ if (!remaining.startsWith(prefix))
441
+ continue;
442
+ remaining = remaining.slice(prefix.length);
443
+ const confirmation = intensityConfirmation(axes);
444
+ if (confirmation !== null) {
445
+ const confirmationLine = `- ${confirmation}\n`;
446
+ if (!remaining.startsWith(confirmationLine))
447
+ continue;
448
+ remaining = remaining.slice(confirmationLine.length);
449
+ }
450
+ }
451
+ const safeword = /^- Safeword: when the user's message contains "([^"\n]+)" or a near-identical rewording,\n/.exec(remaining)?.[1] ?? null;
452
+ if (safeword !== null && safewordRejection(safeword, t) !== null)
453
+ continue;
454
+ const boundary = producer.current ? `- ${CONTROLS.intensityBoundary}\n` : "";
455
+ const tail = `${historical ? `- ${OLD_EMERGENCY}\n` : ""}${boundary}- ${CONTROLS.fallback}`;
456
+ const known = safeword === null ? [tail] : [
457
+ `- ${CONTROLS.safeword(safeword)}\n${tail}`,
458
+ ...(historical ? [`- ${oldSafeword(safeword)}\n${tail}`] : []),
459
+ ];
460
+ if (!known.includes(remaining))
461
+ continue;
462
+ selected = { axes, speech, safeword };
463
+ break;
464
+ }
465
+ if (selected === null)
332
466
  return null;
467
+ config.axes = selected.axes;
468
+ config.speech_level = selected.speech;
469
+ config.safeword = selected.safeword;
333
470
  config.preset = marker[1] === "unsaved" ? null : marker[1];
334
471
  config.unsaved = marker[1] === "unsaved";
335
472
  const parsed = recoverSettings(JSON.stringify(config), t);