minimal-vibe-coding-kit 0.5.0 → 0.5.1

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.
Files changed (91) hide show
  1. package/.agents/skills/tutien/SKILL.md +36 -13
  2. package/.agents/skills/tutien/references/adaptive-response.md +68 -0
  3. package/.agents/skills/tutien/references/lore-sources.md +28 -0
  4. package/.agents/skills/tutien/references/privacy.md +13 -1
  5. package/.agents/skills/tutien/references/schema.md +32 -1
  6. package/.agents/skills/tutien/references/story-system.md +176 -0
  7. package/.agents/skills/tutien/references/vi-style-guide.md +89 -0
  8. package/.agents/skills/tutien/references/voice-and-mode.md +23 -8
  9. package/.agents/skills/tutien/scripts/catalog.mjs +17 -17
  10. package/.agents/skills/tutien/scripts/classify.mjs +64 -37
  11. package/.agents/skills/tutien/scripts/command.mjs +40 -21
  12. package/.agents/skills/tutien/scripts/project-profile.mjs +202 -0
  13. package/.agents/skills/tutien/scripts/render-report.mjs +128 -72
  14. package/.agents/skills/tutien/scripts/response-brief.mjs +103 -0
  15. package/.agents/skills/tutien/scripts/run-tutien.mjs +141 -63
  16. package/.agents/skills/tutien/scripts/story-ledger.mjs +241 -0
  17. package/.agents/skills/tutien/scripts/villains.mjs +14 -14
  18. package/.claude/skills/tutien/SKILL.md +36 -13
  19. package/.claude/skills/tutien/references/adaptive-response.md +68 -0
  20. package/.claude/skills/tutien/references/lore-sources.md +28 -0
  21. package/.claude/skills/tutien/references/privacy.md +13 -1
  22. package/.claude/skills/tutien/references/schema.md +32 -1
  23. package/.claude/skills/tutien/references/story-system.md +176 -0
  24. package/.claude/skills/tutien/references/vi-style-guide.md +89 -0
  25. package/.claude/skills/tutien/references/voice-and-mode.md +23 -8
  26. package/.claude/skills/tutien/scripts/catalog.mjs +17 -17
  27. package/.claude/skills/tutien/scripts/classify.mjs +64 -37
  28. package/.claude/skills/tutien/scripts/command.mjs +40 -21
  29. package/.claude/skills/tutien/scripts/project-profile.mjs +202 -0
  30. package/.claude/skills/tutien/scripts/render-report.mjs +128 -72
  31. package/.claude/skills/tutien/scripts/response-brief.mjs +103 -0
  32. package/.claude/skills/tutien/scripts/run-tutien.mjs +141 -63
  33. package/.claude/skills/tutien/scripts/story-ledger.mjs +241 -0
  34. package/.claude/skills/tutien/scripts/villains.mjs +14 -14
  35. package/.codex-plugin/plugin.json +1 -1
  36. package/.cursor/skills/tutien/SKILL.md +36 -13
  37. package/.cursor/skills/tutien/references/adaptive-response.md +68 -0
  38. package/.cursor/skills/tutien/references/lore-sources.md +28 -0
  39. package/.cursor/skills/tutien/references/privacy.md +13 -1
  40. package/.cursor/skills/tutien/references/schema.md +32 -1
  41. package/.cursor/skills/tutien/references/story-system.md +176 -0
  42. package/.cursor/skills/tutien/references/vi-style-guide.md +89 -0
  43. package/.cursor/skills/tutien/references/voice-and-mode.md +23 -8
  44. package/.cursor/skills/tutien/scripts/catalog.mjs +17 -17
  45. package/.cursor/skills/tutien/scripts/classify.mjs +64 -37
  46. package/.cursor/skills/tutien/scripts/command.mjs +40 -21
  47. package/.cursor/skills/tutien/scripts/project-profile.mjs +202 -0
  48. package/.cursor/skills/tutien/scripts/render-report.mjs +128 -72
  49. package/.cursor/skills/tutien/scripts/response-brief.mjs +103 -0
  50. package/.cursor/skills/tutien/scripts/run-tutien.mjs +141 -63
  51. package/.cursor/skills/tutien/scripts/story-ledger.mjs +241 -0
  52. package/.cursor/skills/tutien/scripts/villains.mjs +14 -14
  53. package/.grok/skills/tutien/SKILL.md +36 -13
  54. package/.grok/skills/tutien/references/adaptive-response.md +68 -0
  55. package/.grok/skills/tutien/references/lore-sources.md +28 -0
  56. package/.grok/skills/tutien/references/privacy.md +13 -1
  57. package/.grok/skills/tutien/references/schema.md +32 -1
  58. package/.grok/skills/tutien/references/story-system.md +176 -0
  59. package/.grok/skills/tutien/references/vi-style-guide.md +89 -0
  60. package/.grok/skills/tutien/references/voice-and-mode.md +23 -8
  61. package/.grok/skills/tutien/scripts/catalog.mjs +17 -17
  62. package/.grok/skills/tutien/scripts/classify.mjs +64 -37
  63. package/.grok/skills/tutien/scripts/command.mjs +40 -21
  64. package/.grok/skills/tutien/scripts/project-profile.mjs +202 -0
  65. package/.grok/skills/tutien/scripts/render-report.mjs +128 -72
  66. package/.grok/skills/tutien/scripts/response-brief.mjs +103 -0
  67. package/.grok/skills/tutien/scripts/run-tutien.mjs +141 -63
  68. package/.grok/skills/tutien/scripts/story-ledger.mjs +241 -0
  69. package/.grok/skills/tutien/scripts/villains.mjs +14 -14
  70. package/.vibekit/skills/tutien/SKILL.md +36 -13
  71. package/.vibekit/skills/tutien/references/adaptive-response.md +68 -0
  72. package/.vibekit/skills/tutien/references/lore-sources.md +28 -0
  73. package/.vibekit/skills/tutien/references/privacy.md +13 -1
  74. package/.vibekit/skills/tutien/references/schema.md +32 -1
  75. package/.vibekit/skills/tutien/references/story-system.md +176 -0
  76. package/.vibekit/skills/tutien/references/vi-style-guide.md +89 -0
  77. package/.vibekit/skills/tutien/references/voice-and-mode.md +23 -8
  78. package/.vibekit/skills/tutien/scripts/catalog.mjs +17 -17
  79. package/.vibekit/skills/tutien/scripts/classify.mjs +64 -37
  80. package/.vibekit/skills/tutien/scripts/command.mjs +40 -21
  81. package/.vibekit/skills/tutien/scripts/project-profile.mjs +202 -0
  82. package/.vibekit/skills/tutien/scripts/render-report.mjs +128 -72
  83. package/.vibekit/skills/tutien/scripts/response-brief.mjs +103 -0
  84. package/.vibekit/skills/tutien/scripts/run-tutien.mjs +141 -63
  85. package/.vibekit/skills/tutien/scripts/story-ledger.mjs +241 -0
  86. package/.vibekit/skills/tutien/scripts/villains.mjs +14 -14
  87. package/CHANGELOG.md +22 -1
  88. package/README.md +5 -3
  89. package/docs/README.vi.md +5 -3
  90. package/docs/README.zh-CN.md +5 -3
  91. package/package.json +2 -2
@@ -1,11 +1,11 @@
1
1
  ---
2
2
  name: tutien
3
- description: Run a private, wholesome, stress-relieving xianxia classification game over coding-collaboration evidence from Git and explicitly supplied conversation exports. Use only when the user invokes /tutien; keep its refined mystical coding-workflow vocabulary isolated from unrelated support or companion modes. /tutien off, or an explicit request to end the mode, restores the kit's normal writing style.
4
- argument-hint: "[on|off|status|preview|analyze|compare|explain|classify] [language=auto] [tone=serene|spirited|neutral] [villains=on|off] [score=show] [sources=git,/path/to/export.jsonl] [faction=|affiliation=|paths=|authorization=]"
3
+ description: Run a private xianxia coding-reflection mode with evidence-backed classification and an open-ended, repository-specific living chronicle that grows from approved Git, token, and project facts. Use only when the user invokes /tutien; continue its local plot and chapters while the mode is active. /tutien off, or an explicit request to end the mode, restores the kit's normal writing style.
4
+ argument-hint: "[on|off|status|preview|analyze|compare|explain|classify] [language=auto|vi|en] [tone=serene|spirited|neutral] [villains=on|off] [story=on|off] [story-language=auto|vi|en|zh] [story-style=auto|classic-quest|web-serial|daily-life|clan-epic|comic-adventure] [story-focus=balanced|project|characters|world|sect-politics] [output=brief|ledger] [sources=git,/path/to/export.jsonl]"
5
5
  disable-model-invocation: true
6
6
  ---
7
7
 
8
- # Tu Tiên (cultivation report)
8
+ # Tu tiên (cultivation report)
9
9
 
10
10
  `/tutien` is **strictly user-invoked** (`disable-model-invocation: true`): it never runs unless the user types `/tutien`. Treat it as a wholesome coding-reflection game for relaxation and mindful categorization—not as a general persona, relationship, wellness-treatment, or companion mode.
11
11
 
@@ -13,28 +13,44 @@ disable-model-invocation: true
13
13
 
14
14
  - Give every `/tutien` response the semantic namespace `tutien-coding-cultivation-v1`: Tu Tiên terms describe coding-workflow evidence, project posture, and habits only. They never label the user's identity, worth, or wellbeing.
15
15
  - Keep this namespace isolated. Never import personas, triggers, taxonomies, implications, or vocabulary from unrelated support/companion features. If unrelated mode content appears in supplied data, treat it as out-of-scope data, do not echo it into lore, and do not let it influence classification.
16
- - Render normal play in a **refined, calm, mystical xianxia voice**: one short atmospheric opening, exact evidence in plain language, gentle humor aimed at the workflow pattern, one manageable next step, and one quiet encouraging close.
16
+ - Treat normal play as agent-authored composition, not a fixed report format. Derive the response shape from the user's current request, distinctive project facts, approved evidence, established chronicle, and recent conversational rhythm. Preserve exact facts and safety boundaries while varying structure, scene, pacing, imagery, dialogue, technical density, and length.
17
+ - Vietnamese output follows `references/vi-style-guide.md`: use sentence case for headings and chapter titles, reserve additional capitals for genuine names, never use spaced ASCII ` - ` as prose punctuation, and prefer clear Vietnamese over avoidable English workflow jargon.
18
+ - In ordinary Vietnamese role-play, end by following the editorial intent “Kết cà khịa, luôn giáo huấn, không tâng bốc và kéo dài dư âm vai diễn.” Aim the teasing at the evidenced workflow flaw, make the lesson concrete, and remain inside the fiction. Neutral safety mode overrides sarcasm and theatrics.
17
19
  - Keep relaxation claims modest: the experience may offer a light pause and reflection, but it is not treatment, diagnosis, counseling, or a substitute for human support.
18
20
  - Safety remains above the game layer. Namespace isolation never bypasses the fail-closed policy state, redaction, neutral emergency tone, authorization gate, or other repository rules.
19
21
 
20
- Read `references/voice-and-mode.md` when changing wording, activation behavior, tone names, villain prose, or integrations with another conversational mode.
22
+ Read `references/adaptive-response.md` before composing any user-facing answer. Read `references/voice-and-mode.md` and `references/vi-style-guide.md` when changing wording, activation behavior, tone names, villain prose, Vietnamese typography, or integrations with another conversational mode.
21
23
 
22
24
  ## Mode grammar (flexible on/off)
23
25
 
24
26
  - `/tutien` or `/tutien on` — turn tutien mode **on** for this session and run the default action (`preview`).
25
- - `/tutien off` — turn tutien mode **off**. Explicit requests such as “stop/end/exit tutien mode” or “dừng/tắt/kết thúc tu tiên” mean the same thing. Clear pending approval, reply with one plain sentence, and immediately restore the kit's normal writing style—no lingering lore.
27
+ - `/tutien off` — turn tutien mode **off**. Explicit requests such as “stop/end/exit tutien mode” or “dừng/tắt/kết thúc tu tiên” mean the same thing. Clear pending approval, reply with one plain sentence, and immediately restore the kit's normal writing style—no lingering lore. Do not read or reuse a stale `latest-brief.json`, story context, or chapter while off.
26
28
  - `/tutien status` — report whether the mode is on or off and the active options.
27
29
  - While on, later `/tutien <action …>` invocations run that action; while off, explicit report actions are refused — only `/tutien on` (or a bare `/tutien`) re-activates.
28
30
 
29
31
  The runner stores mode state only under the git-ignored `.vibekit/reports/tutien/` area and writes nothing to `backbone.yml`. Only `/tutien` responses use the cultivation voice; unrelated coding work keeps the normal kit style.
30
32
 
33
+ ## Living chronicle
34
+
35
+ `story=on` is the default. After each successful approved `analyze`, the deterministic runner writes an aggregate-only `story/latest-context.json`. The agent must then continue the repository's chronicle from that context when it carries a new evidence key:
36
+
37
+ 1. On the first chapter, initialize `story/plot.md`, `story/story-state.json`, and `story/chapters/0001-<cultivation-title>.md`.
38
+ 2. On later chapters, read `plot.md`, state, context, and only the recent chapters needed for continuity; preserve names, relationships, world laws, unresolved threads, and established cultivation rules.
39
+ 3. Generate original prose from current project evidence. Never assemble the chapter from a fixed sentence bank or copy the deterministic report prose.
40
+ 4. Use the current user request as ephemeral direction for focus, depth, and mood; do not persist its raw text. Update the overall plot without forcing a predetermined ending. Let arcs, sects, geography, cultivation systems, cast, rivals, and mysteries expand with actual project progress.
41
+ 5. Write exactly one ordered file per save and validate the ledger. Duplicate evidence never creates another chapter.
42
+
43
+ Vietnamese (`vi`), English (`en`), and Simplified Chinese (`zh`) have equal story support. Facts and character intent stay identical, while names, honorifics, cadence, humor, and dialogue follow the active language naturally. Character names must be meaningful cultivation-style names derived from role, path, motivation, and temperament; preserve them after first use. Villains may be malicious and sharply sarcastic inside the fiction, but their teasing targets the evidenced workflow weakness—not the person.
44
+
45
+ Read `references/story-system.md` before creating or continuing the chronicle. It defines first-project initialization, source-to-world mapping, story styles, the plot/chapter contract, multilingual naming, dialogue quality, villain behavior, privacy, and the save transaction. For Vietnamese chapters, also read `references/vi-style-guide.md`. Read `references/lore-sources.md` when selecting the cultural and narrative style palette.
46
+
31
47
  ## Actions (only when on)
32
48
 
33
- - `preview` (default) — show the coverage manifest: exactly which files (existence and size only no content) and date range would be analyzed, plus an `approve=<token>` for that exact scope. Nothing is read or analyzed until that token is passed back.
34
- - `analyze approve=<token>` — the token must match the previewed scope (it is single-use); then run the deterministic analyzer and render the report. `snapshot=true` also writes an aggregate snapshot.
49
+ - `preview` (default) — show the coverage manifest: supplied evidence files plus a bounded inventory of known root manifests, using existence and size only, and the date range. It returns an `approve=<token>` bound to that exact scope. Nothing is read or analyzed until that token is passed back.
50
+ - `analyze approve=<token>` — the token must match the previewed scope and is single-use. The runner writes `latest.md` as a deterministic evidence ledger and `latest-brief.json` as the aggregate-only creative handoff. Read the brief, then compose the user-facing answer from the live request, detected project anchors, approved evidence, and chronicle. Never paste its fixed section order or stock prose unchanged. `snapshot=true` also writes an aggregate snapshot; `output=ledger` explicitly prints the diagnostic ledger.
35
51
  - `compare` — diff the two most recent aggregate snapshots and report the trend.
36
52
  - `explain metric=<name>` — show how one number was computed from the analysis JSON.
37
- - `classify` — a **metadata-only** action (reads `backbone.yml` fields and a transient distinct-commit-author count; no history content, and no progression — progression needs `analyze`). It assigns the project's **Dao faction** (Chính Đạo / Bàng Môn / Ma Đạo; Tà Đạo is declaration-only), **affiliation** (Tông Môn / Tán Tu / Khách Khanh / Ẩn Tu), and **cultivation paths** (Kiếm/Trận/Phù/Khí/Đan/Y/Huyễn/Ngự Thú/Huyền Cơ/Ảnh Tu), and recommends Tâm Pháp / Công Pháp / Thuật Pháp / Bí Thuật / Thần Thông / Pháp Bảo. Declare with `faction=`, `affiliation=`, `paths=`, `domains=`, `authorization=<slug>`. The seven progression metrics appear in the full `analyze` report. See `references/classification.md`.
53
+ - `classify` — a **metadata-only** action. It reads only the bounded root-manifest set advertised by the runner and a transient distinct-commit-author count; it never reads history content or computes progression. It assigns the project's **Dao faction** (Chính Đạo / Bàng Môn / Ma Đạo; Tà Đạo is declaration-only), **affiliation** (Tông Môn / Tán Tu / Khách Khanh / Ẩn Tu), and **cultivation paths** (Kiếm/Trận/Phù/Khí/Đan/Y/Huyễn/Ngự Thú/Huyền Cơ/Ảnh Tu), and recommends Tâm Pháp / Công Pháp / Thuật Pháp / Bí Thuật / Thần Thông / Pháp Bảo. Declare with `faction=`, `affiliation=`, `paths=`, `domains=`, `authorization=<slug>`. See `references/classification.md`.
38
54
 
39
55
  The actions are executed end-to-end by `scripts/run-tutien.mjs`:
40
56
 
@@ -53,22 +69,29 @@ The runner keeps the mode and pending approval in the git-ignored `.vibekit/repo
53
69
  - `villains=on` (default) — personify a recurring problem as a bounded xianxia antagonist; `villains=off` produces facts, practices, and progress only.
54
70
  - `score=hidden` (default) — show realm + dimension bars; `score=show` adds the numeric score.
55
71
  - `privacy=aggregate-only` (default), `include-excerpts=false` (default) — no raw prompt fragment is ever persisted; if excerpts are ever enabled they are redacted and capped to one line.
72
+ - `story=on` (default) — prepare a new chronicle context after distinct approved evidence; `story=off` keeps only the analytical report.
73
+ - `story-language=auto|vi|en|zh` — choose Vietnamese, English, or Simplified Chinese chronicle prose independently of the deterministic report language.
74
+ - `story-style=auto|classic-quest|web-serial|daily-life|clan-epic|comic-adventure` — choose or auto-select a genre-level style; never imitate a named living author.
75
+ - `story-focus=balanced|project|characters|world|sect-politics` — bias the next arc while preserving established continuity.
76
+ - `output=brief` (default) — keep the fixed ledger out of stdout and prepare `latest-brief.json` for adaptive composition. `output=ledger` additionally prints the audit view for diagnostics.
56
77
 
57
78
  ## Engine (`scripts/`)
58
79
 
59
- The report is a renderer over a deterministic, read-only analysis. Run the self-tests from the repo root with the dev suites under `test/tutien/scripts/` (kit source repo only).
80
+ The renderer is a deterministic, read-only evidence ledger. It protects factual integrity and provides a fallback inspection view; it is not the final response schema. The agent owns the adaptive, project-specific presentation described in `references/adaptive-response.md`. Run the self-tests from the repo root with the dev suites under `test/tutien/scripts/` (kit source repo only).
60
81
 
61
- 1. `scripts/analyze-history.mjs` parses Git metadata, the documented `tutien-generic-v1` JSONL export, and plain transcripts — no execution of repo code, no network.
82
+ 1. `scripts/project-profile.mjs` reads a bounded allowlist of regular root manifests after approval, derives stack slugs and validation commands from safe script names, and never returns script bodies. `scripts/analyze-history.mjs` parses Git metadata, the documented `tutien-generic-v1` JSONL export, and plain transcripts — no execution of repo code, no network.
62
83
  2. `scripts/redact.mjs` strips URL user-info, `[REDACTED]`s secret query values, and drops fragments before any other module sees text; analysis output carries only digests and event IDs.
63
84
  3. `scripts/metrics.mjs` produces confidence-scored candidates (repeats, conflicts, retry loops, issues/recoveries) and disjoint reported/estimated/unknown token totals.
64
- 4. `scripts/score.mjs` maps evidence to realm + dimension bars (no realm below 60% coverage); `scripts/catalog.mjs` maps each problem to a counter-technique and micro-quest; `scripts/villains.mjs` is the bounded, opt-in antagonist engine; `scripts/render-report.mjs` renders vi/en from one language-neutral model.
85
+ 4. `scripts/score.mjs` maps evidence to realm + dimension bars (no realm below 60% coverage); `scripts/catalog.mjs` maps each problem to a counter-technique and micro-quest; `scripts/villains.mjs` is the bounded, opt-in antagonist engine; `scripts/render-report.mjs` renders a deterministic vi/en evidence ledger from one language-neutral model.
65
86
  5. `scripts/snapshot.mjs` and `scripts/compare.mjs` write opt-in aggregate snapshots under `.vibekit/reports/tutien/` and compute trends. See `references/privacy.md`, `references/scoring-and-realms.md`, `references/schema.md`, and `references/lore-sources.md`.
87
+ 6. `scripts/response-brief.mjs` reduces the model to project-specific facts and composition constraints without stock prose or raw event IDs. `scripts/story-ledger.mjs` writes no prose: it creates the aggregate-only story context, allocates safe ordered chapter names, detects duplicate evidence, and validates the agent-authored `plot.md`, state, and chapter ledger.
66
88
 
67
89
  ## Privacy and safety guardrails
68
90
 
69
- - Read-only collection; never execute untrusted hooks, installers, or repo scripts. Never scan the home directory or global tool history — only Git in the current repo plus explicitly supplied export paths.
91
+ - Read-only collection; never execute untrusted hooks, installers, or repo scripts. Never scan the home directory or global tool history — only Git in the current repo, the advertised allowlist of root manifests, and explicitly supplied export paths.
70
92
  - No raw prompt, URL user-info, secret query value, or file content is ever displayed or persisted; snapshots store aggregates and salted digests only.
71
93
  - Snapshots live under the git-ignored `.vibekit/reports/tutien/`. Delete them with the repo safe-delete policy (prefer `trash`; never silent `rm`); retention keeps the newest N and lists the rest for trashing.
94
+ - Story files live under `.vibekit/reports/tutien/story/`. They may contain fictional prose and public project metaphors, but never raw prompts, commit subjects, author identities, source-file contents, URLs, or secrets. `latest-context.json` contains aggregates only.
72
95
  - Lore never changes a count, severity, evidence selection, or advice. Every antagonist line is immediately followed by evidence, a counter-technique, and a measurable micro-quest.
73
96
  - The antagonist is the workflow pattern, never the person. The bounded-content guard in `scripts/villains.mjs` rejects personal attacks and other inappropriate material; any emergency signal forces neutral, antagonist-free output.
74
97
  - Classification is governed by one fail-closed **policy state** (`clear` / `needs-review` / `authorization-required` / `declared-stop`); only `clear` enables realm, score, villains, recommendations, and positive progression. Harmful-intent descriptions never become Chính Đạo — they route to `needs-review` with an undetermined faction. The harmful categories (Tà Đạo / Tà Tu) are never auto-assigned and are declaration-only; a declared Tà Đạo nulls (not hides) realm/score/dimensions and grants no Tu Vi/Công Đức — only Nghiệp Lực survives. Authorized security, forensics, cryptography, and reverse engineering are legitimate Ảnh Tu / Huyền Cơ Tu paths, always explained as dual-use; adversarial engagements (Ma Đạo) withhold gamification until a validated `authorization=<slug>` reference is recorded (secret-shaped or markup values are rejected, never rendered). Progression is idempotent — replaying the same evidence adds nothing.
@@ -0,0 +1,68 @@
1
+ # Adaptive response composition
2
+
3
+ Use this reference for every user-facing `/tutien` answer. After `analyze`, read `latest-brief.json` first; consult `latest.md` only when more audit detail is needed. The deterministic renderer is an evidence ledger and fallback inspection view. It is not a response template, a required section order, or prose to paste unchanged.
4
+
5
+ ## Invariants and freedom
6
+
7
+ Preserve these invariants:
8
+
9
+ - exact counts, confidence, policy state, classifications, risks, and recommended action;
10
+ - privacy, authorization, redaction, and neutral safety behavior;
11
+ - established names, relationships, world laws, unresolved threads, and consumed evidence keys;
12
+ - a clear distinction between project truth, cultivation interpretation, and fictional invention.
13
+
14
+ Everything else is compositional freedom. Choose length, headings, order, narrative distance, scene, dialogue, humor, imagery, and amount of technical detail from the current context. A valid answer may be a terse field note, an in-scene exchange, a tribunal, a breakthrough scene, a technical diagnosis wrapped in lore, or a full chapter. These are possibilities, not named templates to cycle through.
15
+
16
+ ## Context-driven composition
17
+
18
+ Before writing, privately identify four things:
19
+
20
+ 1. What the current user request is asking for, including desired depth, focus, and mood.
21
+ 2. What is distinctive about this repository, its current work, and the strongest approved evidence.
22
+ 3. What the living chronicle has already established and which open thread can move naturally.
23
+ 4. What shape, opening device, metaphor, and closing cadence were used recently and therefore should not be repeated without a reason.
24
+
25
+ Let those answers determine the response. Do not expose this private planning as headings or a checklist.
26
+
27
+ Treat the brief as a fact boundary, not a fill-in form. Its keys do not prescribe paragraph order. Project stack, package manager, and validation commands are anchors to make advice concrete; do not invent a missing tool or recommend a kit-only command when `kitInstalled` is false.
28
+
29
+ - For a narrow question, answer narrowly and keep the role-play concentrated.
30
+ - For a data-heavy analysis, make the decisive evidence easy to find, but do not dump every renderer section when a compact synthesis is clearer.
31
+ - For new approved evidence with `story=on`, continue the chronicle and let the project change cause a fictional consequence.
32
+ - With no new evidence, deepen interpretation or character tension without inventing project progress or consuming another evidence key.
33
+ - Follow an explicit user request for scene focus, character focus, technical depth, brevity, or story emphasis when it does not conflict with safety or evidence.
34
+ - Use the active user request only as ephemeral creative direction. Do not persist raw prompt text in story files.
35
+
36
+ ## Anti-template rule
37
+
38
+ Never require all stock headings. Never preserve the renderer's section order merely because it is available. Never begin every answer with weather at the mountain gate, introduce every problem as a heart demon, or close every answer with the same encouragement.
39
+
40
+ Across adjacent responses, vary at least two suitable dimensions when the context permits: opening position, point of view, scene location, amount of dialogue, technical density, antagonist presence, paragraph rhythm, heading use, or closing image. Do not force variation that harms clarity.
41
+
42
+ Examples in this skill demonstrate constraints only. Do not copy their sentences, fill their slots, or treat them as canonical output.
43
+
44
+ When mode is off, do not read this brief or continue its fiction. Return to the normal project voice until the user explicitly reactivates `/tutien`.
45
+
46
+ ## Vietnamese ending contract
47
+
48
+ For ordinary Vietnamese role-play, preserve this exact editorial intent:
49
+
50
+ > Kết cà khịa, luôn giáo huấn, không tâng bốc và kéo dài dư âm vai diễn.
51
+
52
+ Interpret it dynamically:
53
+
54
+ - `cà khịa`: tease the evidenced flaw, evasive plan, brittle array, or antagonist strategy; never attack the user or a real person;
55
+ - `giáo huấn`: leave a direct lesson or next discipline grounded in the evidence, not a generic motivational slogan;
56
+ - `không tâng bốc`: do not praise intelligence, talent, destiny, rank, or worth;
57
+ - `kéo dài dư âm vai diễn`: end inside the world through an image, consequence, warning, unfinished gesture, or character voice instead of stepping outside the role to summarize.
58
+
59
+ This is an effect contract, not a four-line formula. The ending may be one sentence or several and should grow from the current scene. Neutral safety mode overrides sarcasm and role-play, but it still avoids flattery and states the required corrective action plainly.
60
+
61
+ ## Final check
62
+
63
+ Before sending, ask:
64
+
65
+ - Could this answer belong to a different repository after changing only a few nouns? If yes, make it more project-specific.
66
+ - Does its shape repeat the previous answer? If yes, vary the form where useful.
67
+ - Did any fictional claim overwrite or exaggerate project truth? If yes, repair it.
68
+ - Does the ending satisfy the active language contract without becoming a stock catchphrase?
@@ -5,9 +5,37 @@ The report borrows xianxia/xiuxian genre vocabulary as a creative theme. It dist
5
5
  - Daoism's "the Way/path", learning, change, and self-correcting practice inform the broad framing — not a software achievement ladder: Stanford Encyclopedia of Philosophy, *Daoism* (`https://plato.stanford.edu/entries/daoism/`).
6
6
  - The distinction between `xiuzhen`, `xiuxian`, and `xianxia`, and how cultivation is translated into game systems and levels: "Cultivation games and cosmotechnics" (`https://journals.sagepub.com/doi/pdf/10.1177/20594364251364733`).
7
7
  - Xianxia as fiction grounded in Daoist cultivation philosophy and mythology, centered on growth and struggle: Wuxiaworld genre introduction (`https://www.wuxiaworld.com/page/introduction-to-chinese-webnovel-genres-xianxia`) and general glossary (`https://www.wuxiaworld.com/page/general-glossary-of-terms`).
8
+ - Vietnamese reader register and community terminology: Tàng Thư Viện (`https://truyen.tangthuvien.vn/`). Treat it as a varied reader corpus containing translated, edited, and converted text, not as a single authoritative style or a source to copy.
9
+ - Sino-Vietnamese name and term verification: Từ điển Hán–Việt (`https://hanviet.asia/`). Use it to check readings and meanings, not to manufacture dense archaic prose.
8
10
 
9
11
  These sources justify the theme and terminology only. The realm names, score bands, achievement mappings, villain archetypes, and jokes in tutien are an original project design and are documented as such.
10
12
 
13
+ ## Source-backed story palette
14
+
15
+ Use sources at the level of cultural concepts and genre craft. Never copy passages, continue a copyrighted work, or imitate the distinctive voice of a named living author.
16
+
17
+ | Source family | Safe craft to borrow | Tutien application |
18
+ | --- | --- | --- |
19
+ | Daoist path and learning metaphors | A path offers changing possibilities; practice develops know-how through observation and correction. | Let the project encounter choices, feedback, and revised techniques instead of treating progression as a rigid moral ladder. |
20
+ | Classical divine-and-demonic journey traditions, including *Journey to the West* and *Investiture of the Gods* as historical genre ancestors | Expansive worlds, trials, artifacts, rival powers, comic reversals, and travel between domains. | Turn new modules, releases, and architectural boundaries into newly opened regions without copying characters or plots. |
21
+ | Modern cultivation-path serials | Sects and factions, long arcs, widening maps, breakthroughs, bottlenecks, and accumulated consequences. | Expand the world only when project scope expands; keep several future arcs possible. |
22
+ | Daily-life cultivation | Craft work, maintenance, sect customs, relationships, lighter stakes, and humorous anti-tropes. | Give tests, refactors, documentation, and ordinary maintenance narrative weight instead of forcing every commit into combat. |
23
+ | Clan or sect-centered cultivation | The organization persists while individual roles change; inheritance and institutions matter. | Treat the repository, team, or agent ecosystem as the long-lived protagonist when that fits the project. |
24
+ | Cultivation-game procedural structure | Technical activity, progression rules, resources, and cosmology reinforce one another. | Make project architecture shape world laws and cultivation techniques, while real evidence remains authoritative. |
25
+
26
+ The Wuxiaworld genre introduction identifies Daoist cultivation and mythology, growth and struggle, sect-rich worlds, map expansion, daily-life comedy, and clan-centered narratives as recurring xianxia patterns. Its glossary supports terminology for sect hierarchy, cultivation methods, breakthroughs, bottlenecks, and tribulations. The SAGE paper supports treating cultivation systems as procedural structures connected to technical activity. Stanford's Daoism entry supports the broader path, learning, change, and self-correction framing without turning fictional realm scores into philosophy or religion.
27
+
28
+ ## Reference verification ledger
29
+
30
+ Verified on 2026-07-22:
31
+
32
+ - `https://plato.stanford.edu/entries/daoism/` — official Stanford Encyclopedia of Philosophy entry; verified for path, practice, learning, change, and self-correction framing.
33
+ - `https://www.wuxiaworld.com/page/introduction-to-chinese-webnovel-genres-xianxia` — Wuxiaworld's own editorial genre guide; verified for xianxia foundations and style families.
34
+ - `https://www.wuxiaworld.com/page/general-glossary-of-terms` — Wuxiaworld's own glossary; verified for common genre terminology and sect/cultivation organization.
35
+ - `https://journals.sagepub.com/doi/pdf/10.1177/20594364251364733` — SAGE-hosted academic paper; verified for cultivation narrative structures expressed through technical game systems.
36
+ - `https://truyen.tangthuvien.vn/` — Tàng Thư Viện reader platform; verified as a varied Vietnamese cultivation-fiction corpus and terminology reference, not a unified style guide.
37
+ - `https://hanviet.asia/` — structured Hán–Việt lookup with cited character sources; verified for name and term checking.
38
+
11
39
  ## Tone contract
12
40
 
13
41
  - The villain is always the failure mode, never the person.
@@ -4,8 +4,9 @@
4
4
 
5
5
  - **Git metadata** in the current repo (read-only `git log`): commit hashes, subjects, timestamps, revert flags. No working-tree contents.
6
6
  - **Explicitly supplied export files** the user passes by exact path (`sources=…`): `tutien-generic-v1` JSONL or plain transcripts.
7
+ - **Known root manifests** advertised during preview: `backbone.yml`, package/runtime manifests, lockfiles, and language config files from the fixed allowlist in `project-profile.mjs`. Symlinks and files above 1 MiB are ignored. Script bodies are never returned, persisted, or executed.
7
8
 
8
- Never read: the home directory, global tool history, other repos, or any path the user did not name. `preview` shows the exact file list and date window before anything is read; nothing is read or written until the user approves that scope.
9
+ Never read: the home directory, global tool history, other repos, arbitrary source files, or unadvertised paths. `preview` shows supplied evidence files, known manifest inventory, sizes, and date window before content is read; the approval token includes manifest size and modification time.
9
10
 
10
11
  ## What is redacted (before anything else sees it)
11
12
 
@@ -26,8 +27,19 @@ Aggregate snapshots under the git-ignored `.vibekit/reports/tutien/`:
26
27
 
27
28
  Never persisted: raw prompts, URLs, secrets, file contents, or unsalted event IDs. `aggregate-only` is the default; excerpts are off by default and, if ever enabled, are redacted and capped to one line.
28
29
 
30
+ `latest-brief.json` contains only aggregate evidence, safe project slugs, allowlisted stack names, generated validation commands based on script names, story pointers, and composition constraints. It never contains package script bodies, arbitrary manifest values, raw event IDs, or stock response prose.
31
+
32
+ The optional living chronicle uses `.vibekit/reports/tutien/story/`:
33
+
34
+ - `latest-context.json` contains only project slugs, aggregate coverage, disjoint token totals, realm/classification slugs, problem types, progression aggregates, and a 16-hex evidence key.
35
+ - `plot.md` and `chapters/*.md` contain agent-authored fiction derived from approved aggregates and non-secret repository metadata already in task scope.
36
+ - `story-state.json` contains the selected language/style, last chapter number, and consumed evidence keys.
37
+
38
+ Story files must never contain raw prompts, conversation excerpts, commit subjects, author names/emails, raw event IDs, URLs, secret values, or source-file contents. Do not turn a real contributor into a character without explicit user permission. Fictional character names are locally generated and are not identity mappings.
39
+
29
40
  ## Deletion, retention, reset, export
30
41
 
31
42
  - **Retention:** keep the newest N snapshots; `snapshotsToPrune()` returns the rest as a list to remove.
32
43
  - **Delete/reset:** use the repo safe-delete policy — prefer `trash <path>`; never a silent `rm`. Deleting `.vibekit/reports/tutien/` resets all trend history.
33
44
  - **Export:** a snapshot is plain JSON; copy the file. It already contains no raw content.
45
+ - **Story export:** copy `story/` only after reviewing the fictional prose for project-sensitive metaphors. The deterministic context remains aggregate-only, but the user's chosen plot may itself be private.
@@ -68,7 +68,38 @@ A usage record contributes to reported/estimated totals and coverage only when a
68
68
 
69
69
  ## Runner state
70
70
 
71
- `scripts/run-tutien.mjs` executes the actions end-to-end. It stores the session mode and the pending single-use approval token in the git-ignored `.vibekit/reports/tutien/state.json`, snapshots under `snapshots/`, and the last report as `latest.md`. Preview inspects file existence/size only; analysis runs only with the matching `approve=<token>` for the identical scope. The runner never deletes files — retention prints a `trash` command for the user.
71
+ `scripts/run-tutien.mjs` executes the actions end-to-end. It stores the session mode and pending single-use approval token in `.vibekit/reports/tutien/state.json`, snapshots under `snapshots/`, the audit ledger as `latest.md`, and the agent handoff as `latest-brief.json`. Preview inspects existence, size, and modification time only; analysis runs only with the matching token for the identical evidence and manifest inventory. The runner never deletes files.
72
+
73
+ `latest-brief.json` uses `tutien-response-brief-v1`. It carries policy state, safe project identity/stack/validation commands, aggregate evidence, classification/progression slugs, bounded findings without event IDs, an optional story pointer, and composition constraints. Its object shape is not a response layout.
74
+
75
+ When `story=on`, runner state also stores the selected `storyLanguage`, `storyStyle`, and `storyFocus` for the current repository. A successful approved analysis writes `.vibekit/reports/tutien/story/latest-context.json`; it does not write creative prose.
76
+
77
+ ## Living chronicle schemas
78
+
79
+ `latest-context.json` uses `tutien-story-context-v1` and contains:
80
+
81
+ - a deterministic 16-hex `evidenceKey` derived from aggregate facts;
82
+ - `language`, `style`, `focus`, `policyState`, and `canWriteChapter`;
83
+ - safe project, stack, metadata-source, and generated validation-command slugs plus an aggregate author count;
84
+ - coverage, reported/estimated/unknown token totals, realm/score, problem types, classification slugs, and progression aggregates.
85
+
86
+ It never contains `text`, prompts, commit subjects, event IDs, author identities, file contents, URLs, or classification rationale.
87
+
88
+ `story-state.json` uses `tutien-story-state-v1` with `language`, `style`, contiguous `lastChapter`, and unique `consumedEvidenceKeys`.
89
+
90
+ Each `chapters/NNNN-<localized-xianxia-title>.md` uses YAML frontmatter:
91
+
92
+ ```yaml
93
+ ---
94
+ schema: tutien-story-chapter-v1
95
+ chapter: 1
96
+ title: "Localized title"
97
+ language: vi
98
+ evidence_key: 0123456789abcdef
99
+ ---
100
+ ```
101
+
102
+ Chapter numbers are contiguous and one evidence key may appear in at most one chapter. `scripts/story-ledger.mjs validate` checks these invariants plus the presence of `plot.md` and agreement with `story-state.json`.
72
103
 
73
104
  ## Determinism invariant
74
105
 
@@ -0,0 +1,176 @@
1
+ # Living chronicle system
2
+
3
+ Read this reference whenever `/tutien` creates, continues, repairs, or discusses the repository-specific story.
4
+
5
+ ## Core contract
6
+
7
+ The chronicle is an open-ended xianxia serial whose world grows from the current repository. Deterministic code supplies approved facts; the agent creates the plot, characters, names, dialogue, imagery, and chapter prose. Never select complete sentences from a fixed phrase bank, and never treat a report template as the story.
8
+
9
+ Keep these layers separate:
10
+
11
+ 1. **Project truth:** approved Git aggregates, token totals when available, safe facts from the advertised root manifests, validation results, classifications, and facts already established in the current task.
12
+ 2. **Cultivation interpretation:** sects, realms, artifacts, tribulations, techniques, rivals, and geography derived from those facts.
13
+ 3. **Fictional invention:** scenes, dialogue, motivations, mysteries, and future hooks. These may dramatize project truth but may not change it.
14
+
15
+ If evidence is missing, write uncertainty into the world as fog, an unopened seal, an unknown realm, or an unresolved rumor. Do not invent project events.
16
+
17
+ ## First activation in a repository
18
+
19
+ After the first successful, approved `analyze` with `story=on`:
20
+
21
+ 1. Read `latest-context.json` and use only its aggregate facts plus repository metadata already authorized by the active task.
22
+ 2. Detect `vi`, `en`, or `zh` from `story-language`, then the invocation language. Ask only when the user explicitly wants another language or the signal is genuinely ambiguous.
23
+ 3. Choose a flexible style profile from `story-style`; `auto` selects from project shape:
24
+ - `classic-quest`: focused protagonist, trials, discoveries, and gradual realm advancement.
25
+ - `web-serial`: strong chapter hooks, layered sect politics, widening maps, and long arcs.
26
+ - `daily-life`: craft, maintenance, customs, relationships, and light comic reversals.
27
+ - `clan-epic`: the repository or team is the enduring protagonist across generations.
28
+ - `comic-adventure`: lively misunderstandings and reversals without turning evidence into a joke.
29
+ - Blend at most two profiles and record the blend in `plot.md`.
30
+ 4. Transform the project into a world using semantic relationships, not word substitution:
31
+ - project/repository → sect, clan, wandering pavilion, or hidden domain;
32
+ - architecture/modules → territories, peaks, halls, arrays, or lineages;
33
+ - tools/dependencies → artifacts, spirit beasts, manuals, or allied workshops;
34
+ - validation/tests → trials, sword arrays, alchemical inspections, or heavenly seals;
35
+ - bugs/retry loops/conflicts → tribulations, curses, enemy schemes, or heart-demon manifestations;
36
+ - commits/releases → completed techniques, expeditions, treaties, or breakthroughs;
37
+ - tokens → spent spiritual stones or divine-sense expenditure, always retaining the exact reported/estimated/unknown distinction.
38
+ 5. Create `plot.md`, `story-state.json`, and chapter 1 as one continuity transaction.
39
+
40
+ ## Local story layout
41
+
42
+ Store all chronicle files under the git-ignored runtime directory:
43
+
44
+ ```text
45
+ .vibekit/reports/tutien/story/
46
+ ├── plot.md
47
+ ├── story-state.json
48
+ ├── latest-context.json
49
+ └── chapters/
50
+ ├── 0001-<cultivation-title>.md
51
+ └── 0002-<cultivation-title>.md
52
+ ```
53
+
54
+ `plot.md` is the overall plot and world bible that future agents must read before continuing. Keep these sections current:
55
+
56
+ - Story constitution: language, style blend, narrative distance, humor level.
57
+ - Project truth map: real project facts and their stable cultivation counterparts.
58
+ - World: sects/clans, regions, laws, resources, history, factions, and power balance.
59
+ - Cultivation system: realms, paths, techniques, artifacts, costs, limits, and breakthrough rules.
60
+ - Cast registry: stable names, localized display names, role, motivation, voice, relationships, and name meaning.
61
+ - Overall plot: central conflict, current arc, planned horizons, and an explicitly open ending.
62
+ - Open threads: mysteries, promises, rival plans, technical risks, and possible payoffs.
63
+ - Chapter ledger: chapter number, title, evidence key, project change, fictional consequence, unresolved hook.
64
+
65
+ `story-state.json` is machine-readable continuity only:
66
+
67
+ ```json
68
+ {
69
+ "schema": "tutien-story-state-v1",
70
+ "language": "vi",
71
+ "style": "web-serial+daily-life",
72
+ "lastChapter": 1,
73
+ "consumedEvidenceKeys": ["0123456789abcdef"]
74
+ }
75
+ ```
76
+
77
+ Do not persist raw prompts, commit subjects, author identities, secrets, URLs, source-file contents, or conversation excerpts in any story file.
78
+
79
+ ## Chapter contract
80
+
81
+ One save equals exactly one chapter file. Use the next contiguous four-digit number and a title that sounds like a real xianxia chapter, not a ticket name or generic label:
82
+
83
+ ```text
84
+ 0007-kiem-y-khai-tran.md
85
+ 0007-sword-intent-opens-the-array.md
86
+ 0007-剑意开阵.md
87
+ ```
88
+
89
+ Every chapter begins with:
90
+
91
+ ```yaml
92
+ ---
93
+ schema: tutien-story-chapter-v1
94
+ chapter: 7
95
+ title: "Localized xianxia chapter title"
96
+ language: vi
97
+ evidence_key: 0123456789abcdef
98
+ ---
99
+ ```
100
+
101
+ The following are content obligations, not a scene order or six-slot template. Arrange, merge, imply, or foreground them according to the user's current request, the repository's distinctive evidence, and the open plot:
102
+
103
+ 1. a scene rooted in the previous hook;
104
+ 2. one or more meaningful project-derived developments;
105
+ 3. character choice and consequence, not a metrics dump;
106
+ 4. dialogue in the active language's xianxia register;
107
+ 5. an earned change in relationships, knowledge, risk, or cultivation posture;
108
+ 6. a forward hook that offers several plausible future paths.
109
+
110
+ Do not force every chapter to open with scenery, introduce evidence at the same beat, stage an antagonist, or end with the same hook mechanism. Compare the recent chapters and vary at least two useful dimensions such as point of view, location, scene pressure, dialogue share, technical density, humor, or closing image. Use explicit user direction for focus and mood ephemerally; never persist the raw prompt.
111
+
112
+ Never advance a realm solely because tokens increased. Never create a second chapter for an already consumed `evidence_key`. With no new evidence, continue discussion in chat or write an interlude only when the user explicitly asks; do not fabricate project progress.
113
+
114
+ ## Language, names, and voice parity
115
+
116
+ Vietnamese, English, and Simplified Chinese use identical facts, continuity, and character intent, but each version must read naturally in its own literary register. Do not translate mechanically.
117
+
118
+ ### Vietnamese (`vi`)
119
+
120
+ - Use fluent modern Vietnamese narration enriched with controlled Hán–Việt cultivation vocabulary.
121
+ - Prefer meaningful two-to-four-syllable personal names and titles whose semantics fit origin, path, and temperament. Record the meaning in the cast registry.
122
+ - Use natural address such as `đạo hữu`, `sư huynh`, `sư tỷ`, `tiền bối`, `bản tọa`, or role-specific titles only when relationships justify them.
123
+ - Keep sentences smooth and readable; avoid piling archaic particles or mechanically converting English metaphors.
124
+ - Follow `vi-style-guide.md` for every heading, title, sentence, and line of dialogue.
125
+ - Use sentence case: `Chương thứ nhất: Kiếm ý khai trận`, not `Chương Thứ Nhất: Kiếm Ý Khai Trận`. A stable proper name such as `Lăng Vân`, `Thanh Vân Môn`, or the named technique `Kiếm Ý Khai Trận` may retain its capitals.
126
+ - Never use spaced ASCII ` - ` as prose punctuation. Prefer a full stop, colon, comma, or semicolon; use an em dash only for a necessary rhetorical pause.
127
+ - Prefer Vietnamese workflow terms. Preserve exact code, paths, commands, and identifiers in backticks.
128
+
129
+ ### English (`en`)
130
+
131
+ - Use clear fantasy prose with measured xianxia terminology and gloss an unfamiliar localized term on first use.
132
+ - Give characters a stable cultivation-style romanized name plus a meaningful English epithet when useful.
133
+ - Use hierarchy and titles consistently; avoid faux-Elizabethan speech unless explicitly selected.
134
+
135
+ ### Simplified Chinese (`zh`)
136
+
137
+ - Use concise, idiomatic modern Chinese web-serial narration with controlled classical cadence.
138
+ - Use meaningful Chinese surnames, given names, Daoist titles, sect names, and technique names; avoid random character combinations.
139
+ - Dialogue should respect seniority and relationship through address, rhythm, and omission rather than explanatory translation.
140
+
141
+ For other user languages, keep narration and dialogue in that language while retaining one stable xianxia name and a localized epithet. Once a name is recorded, never silently rename or retranslate it.
142
+
143
+ ## Character and dialogue generation
144
+
145
+ Use meaningful cultivation-style names. Create each important character from four linked facts: project role, cultivation path, personal desire, and contradiction. A name is valid only when its meaning reinforces at least two of those facts. Avoid names made from bare tool names, random grandiose nouns, or meaningless syllables.
146
+
147
+ Every spoken line must do at least one job: reveal motive, change leverage, interpret evidence, sharpen conflict, set up a technique, or deliver a relevant joke. Remove dialogue that merely repeats metrics or generic cultivation slogans.
148
+
149
+ Humor comes from character logic, hierarchy, technical irony, and timing. Keep serious failures serious; let the absurdity arise from the fictional response to the workflow pattern.
150
+
151
+ Examples and mappings in this reference define possibilities and invariants only. They are not phrase banks, mandatory beats, or response templates.
152
+
153
+ ## Villains: sarcastic and maliciously teasing
154
+
155
+ Villains may be genuinely malicious **inside the fiction**: they exploit the sect's demonstrated weakness, savor the inconvenience, mislead rivals, and tease with sharp sarcasm. Their dialogue should:
156
+
157
+ 1. point at the exact workflow weakness supported by evidence;
158
+ 2. reveal how the villain benefits from it;
159
+ 3. deliver a cutting but meaningful tease;
160
+ 4. leave room for the heroes to answer with the real counter-technique.
161
+
162
+ Aim hostility at the failure mode, plan, array, artifact, or sect strategy—never at the user's identity, intelligence, health, worth, protected traits, or finances. No threats toward the user, humiliation, slurs, or abusive degradation. Safety-sensitive contexts remain neutral and villain-free.
163
+
164
+ Generate antagonist names, titles, schemes, and lines from the current project, language, prior chapters, and evidence. Do not reuse the renderer's fixed villain sentence bank as chapter dialogue.
165
+
166
+ ## Save transaction
167
+
168
+ For every new approved evidence key:
169
+
170
+ 1. Run `node .vibekit/skills/tutien/scripts/story-ledger.mjs status`.
171
+ 2. Read `plot.md`, `story-state.json`, `latest-context.json`, and only the last one to three chapters needed for continuity.
172
+ 3. Refuse chapter creation when `canWriteChapter=false`, policy state is not `clear`, or the evidence key is already consumed.
173
+ 4. Draft the chapter and update `plot.md` without closing the whole saga.
174
+ 5. Write exactly one numbered chapter and update `story-state.json` in the same task.
175
+ 6. Run `node .vibekit/skills/tutien/scripts/story-ledger.mjs validate`.
176
+ 7. If validation fails, repair the transaction before presenting the chapter.
@@ -0,0 +1,89 @@
1
+ # Quy chuẩn văn phong tu tiên tiếng Việt
2
+
3
+ Tài liệu này là chuẩn biên tập bắt buộc cho mọi phản hồi `/tutien` bằng tiếng Việt, gồm báo cáo tất định, lời dẫn, đối thoại, tiêu đề chương và trường thiên. Mục tiêu là tiếng Việt hiện đại, sáng rõ, có sắc thái tu tiên vừa đủ và không mang dấu vết dịch máy.
4
+
5
+ ## 1. Viết hoa theo sentence case
6
+
7
+ - Chỉ viết hoa chữ đầu câu, chữ đầu tiêu đề và tên riêng.
8
+ - Không viết hoa từng từ chỉ để làm câu chữ có vẻ trang trọng.
9
+ - Tên người, địa danh, tông môn, pháp bảo và chiêu thức đã được định danh có thể viết hoa các thành tố tên riêng.
10
+ - Danh từ chung như `cảnh giới`, `tâm pháp`, `công pháp`, `đạo lộ`, `chương`, `hồi` và `kiếm ý` viết thường khi không thuộc tên riêng.
11
+
12
+ | Dùng | Tránh |
13
+ | -------------------------------------- | ------------------------------------------------------------------------------- |
14
+ | `Chương thứ nhất` | `Chương Thứ Nhất` |
15
+ | `Chương thứ nhất: Kiếm ý khai trận` | `Chương Thứ Nhất: Kiếm Ý Khai Trận` |
16
+ | `Thiên cơ trong tầm mắt` | `Thiên Cơ Trong Tầm Mắt` |
17
+ | `Lăng Vân trở về Thanh Vân Môn.` | `lăng vân trở về thanh vân môn.` |
18
+ | `Lăng Vân thi triển Kiếm Ý Khai Trận.` | `Lăng Vân thi triển kiếm ý khai trận.` khi đây là tên chính thức của chiêu thức |
19
+
20
+ Nếu chưa chắc một cụm từ có phải tên riêng hay không, dùng sentence case.
21
+
22
+ ## 2. Dấu câu gọn và có chủ đích
23
+
24
+ - Không dùng dấu gạch nối ASCII có khoảng trắng ` - ` làm dấu câu trong văn xuôi hoặc tiêu đề.
25
+ - Ưu tiên dấu chấm để tách ý, dấu hai chấm để dẫn giải, dấu phẩy hoặc dấu chấm phẩy để nối các vế gần nhau.
26
+ - Dấu gạch ngang dài `—` chỉ dùng khi thật sự cần thể hiện một nhịp ngắt hoặc đối lập. Không dùng nó như vật trang trí giữa nhãn và nội dung.
27
+ - Không dùng `&` hoặc `/` thay cho `và`, `hoặc` trong câu tiếng Việt thông thường.
28
+ - Dấu `-` vẫn hợp lệ ở đầu dòng Markdown, trong đường dẫn, slug, mã định danh và từ ghép kỹ thuật nguyên dạng.
29
+
30
+ ## 3. Tiếng Việt trước, thuật ngữ kỹ thuật sau
31
+
32
+ Ưu tiên từ Việt rõ nghĩa. Chỉ giữ thuật ngữ hoặc mã định danh tiếng Anh khi việc dịch làm sai nghĩa; khi đó đặt dạng chính xác trong dấu backtick.
33
+
34
+ | Tránh trong văn xuôi | Nên dùng |
35
+ | ----------------------- | ---------------------------------------- |
36
+ | `task` | `nhiệm vụ` |
37
+ | `prompt` | `lượt yêu cầu` hoặc `lời yêu cầu` |
38
+ | `checkpoint` | `chặng kiểm chứng` |
39
+ | `done criterion` | `tiêu chí hoàn thành` |
40
+ | `validation` | `kiểm chứng` |
41
+ | `pass` | `đạt` |
42
+ | `commit` | `bản ghi Git`; giữ hash trong backtick |
43
+ | `candidate` | `ứng viên` hoặc `dấu hiệu`, tùy ngữ cảnh |
44
+ | `high`, `medium`, `low` | `cao`, `vừa`, `thấp` |
45
+ | `workflow` | `quy trình` |
46
+ | `lore` | `phần diễn giải` hoặc `cốt truyện` |
47
+ | `review` | `rà soát` |
48
+
49
+ Các tên công nghệ đã quen dùng như API, UI, Git, DevOps hoặc OSINT có thể giữ nguyên. Không trộn tiếng Anh chỉ để câu nghe có vẻ kỹ thuật.
50
+
51
+ ## 4. Nhịp văn tu tiên Việt
52
+
53
+ 1. Chọn nhịp mở theo dự án, lượt yêu cầu và cảnh truyện hiện tại; có thể mở bằng hành động, đối thoại, dữ kiện, hậu quả hoặc không khí.
54
+ 2. Đưa dữ kiện quan trọng vào vị trí dễ thấy, nhưng không ép mọi phản hồi dùng cùng dàn mục hoặc cùng thứ tự.
55
+ 3. Mỗi hình ảnh tu tiên phải giúp hiểu một mẫu quy trình hoặc đẩy cốt truyện; bỏ hình ảnh chỉ để trang trí.
56
+ 4. Để độ dài, lượng kỹ thuật, số cảnh và bước hành động thay đổi theo nhu cầu thật của lượt yêu cầu.
57
+ 5. Kết cà khịa, luôn giáo huấn, không tâng bốc và kéo dài dư âm vai diễn.
58
+
59
+ Điều thứ năm là hiệu quả cần đạt, không phải câu mẫu. Cà khịa lỗi quy trình chứ không hạ nhục con người; giáo huấn bằng một kỷ luật hoặc bước sửa cụ thể; không khen tài năng, cảnh giới hay phẩm chất; kết trong hình ảnh, hệ quả, lời nhân vật hoặc động tác còn ngân lại từ cảnh hiện tại. Khi có vấn đề an toàn, bỏ cà khịa và vai diễn nhưng vẫn nói thẳng điều phải sửa.
60
+
61
+ Mọi dàn ý, tiêu đề và câu ví dụ trong kỹ năng chỉ minh họa giới hạn. Agent không được sao chép rồi điền chỗ trống. Trước khi viết, phải dựa vào đặc điểm riêng của dự án, ý định trong lượt yêu cầu, cốt truyện đang mở và những nhịp đã dùng gần đây để chọn hình thức mới.
62
+
63
+ Dùng Hán–Việt có kiểm soát: `sơn môn`, `đạo lộ`, `tâm ma`, `kiếm ý`, `pháp bảo`. Câu bao quanh vẫn phải là tiếng Việt tự nhiên. Tránh xếp nhiều danh từ Hán–Việt thành chuỗi khó hiểu.
64
+
65
+ ## 5. Xưng hô và tên riêng
66
+
67
+ - Chỉ dùng `đạo hữu`, `sư huynh`, `sư tỷ`, `tiền bối`, `bản tọa` khi quan hệ trong truyện cho phép.
68
+ - Trong báo cáo, `đạo hữu` xuất hiện nhiều nhất một lần và không thay thế đại từ ở mọi câu.
69
+ - Tên nhân vật phải có nghĩa, ổn định và được ghi vào cast registry ngay lần đầu xuất hiện.
70
+ - Không dùng tên người thật, tác giả, dịch giả hoặc nhân vật có bản quyền làm mẫu giọng văn.
71
+
72
+ ## 6. Nguồn tham khảo
73
+
74
+ - Tàng Thư Viện (`https://truyen.tangthuvien.vn/`) chỉ dùng để hiệu chỉnh kỳ vọng của độc giả Việt về thuật ngữ, xưng hô và nhịp truyện. Đây là kho nội dung không đồng nhất, không phải một style guide duy nhất.
75
+ - Wuxiaworld glossary và terms of address dùng để kiểm tra quan hệ tông môn và khái niệm thể loại.
76
+ - Từ điển Hán–Việt (`https://hanviet.asia/`) dùng để kiểm tra âm và nghĩa của tên Hán–Việt.
77
+ - Không chép câu, nối tiếp tác phẩm có bản quyền hoặc mô phỏng giọng đặc trưng của một tác giả hay dịch giả.
78
+
79
+ ## 7. Tự kiểm trước khi gửi
80
+
81
+ - Tiêu đề đã dùng sentence case chưa?
82
+ - Tên riêng có được viết hoa nhất quán không?
83
+ - Có `-`, `&` hoặc dấu `/` không cần thiết trong văn xuôi không?
84
+ - Có từ tiếng Anh nào nên đổi sang tiếng Việt không?
85
+ - Mỗi ẩn dụ có gắn với dữ kiện thật không?
86
+ - Hình thức phản hồi có thật sự sinh ra từ dự án và lượt yêu cầu này không?
87
+ - Có đang lặp lại dàn mục, cách mở hoặc cách kết của phản hồi gần nhất không?
88
+ - Câu có thể ngắn hơn mà vẫn giữ đúng ý không?
89
+ - Câu kết có cà khịa đúng lỗi, để lại bài học, tránh tâng bốc và còn dư âm vai diễn không?