name: writing-th-learn description: Extracts Thai writing patterns by comparing draft vs edited versions. links learnings to the session writing plan + example report style reference.
/writing-th-learn
Learning-only companion for
/writing-th. Compares a Thai draft and its human-edited version, then stores what changed as reusable patterns.
When to use this skill
- After you used
/writing-thto produce a draft and you have an edited version (...-edited.md). - When closing a session with
/rrrand you want to capture Thai writing style learnings separate from the general retrospective. - When you have any Thai draft/edited pair and want to update
writing-th's understanding of your word choice and phrasing.
When NOT to use this skill
- If there is no edited version yet (only a draft exists) — use
/writing-thfirst to draft and let the human edit. - If the change is not about Thai wording, phrasing, or narrative structure (for example pure data or numbers updates).
- If you only need to generate a new Thai draft — use
/writing-thinstead.
Inputs required
- Mode:
reportorarticle(must match the mode originally used in/writing-th). - Writing plan path (recommended): the anchor plan markdown file for the session.
- Draft file path: markdown file.
- Edited file path: markdown file.
- (Optional) Example report path: the style reference used in the session (if any).
- (Optional) Context tags: short tags for
oracle_learn(e.g.,thai-tone,gov-report,interview-prep).
Naming rule (recommended, but not mandatory)
- Preferred:
...-draft.mdand...-edited.mdpairing. - If real files do not conform, proceed only if a clear mapping is recorded (Nothing is Deleted):
- Add a small mapping block in the writing plan (recommended template is in
/writing-th).
- Add a small mapping block in the writing plan (recommended template is in
Workflow
Validate inputs
- Confirm that both files exist and are markdown.
- Prefer: they share the same base name and differ only by
-draftvs-edited. - If not: require explicit mapping (in the plan or user message) before continuing.
Read session context (Option C)
- If a writing plan path is provided:
- Read it and find the latest “Session Style Pack Summary”.
- Capture:
- example report reference + permission line
- session terminology / flow constraints
- safety rails (citations/hedging/no hallucinations)
- If a writing plan path is provided:
Read both files
- Read the full content of the
draftandeditedfiles.
- Read the full content of the
Compare and extract patterns
- Focus on what the human changed, not on line-by-line diffs.
- Identify and summarize:
- Word choice and phrasing:
- recurrent substitutions (e.g., more formal vs informal verbs, consistent noun choices);
- changes in tone (more/less formal, softer/stronger hedging);
- preference for certain connectors, transitions, or emphasis styles.
- Semantic arrangement and structure:
- reordering of sentences or paragraphs to improve flow;
- patterns in how the human introduces context, states key messages, and provides evidence;
- ways the human simplifies or elaborates concepts for clarity.
- Word choice and phrasing:
- Keep the summary concise and pattern-based (no full text copies).
Write learning note to ψ/memory
Compose a learning note in Thai (with English only where necessary) with sections:
## Word choice and phrasing## Semantic and structure patterns## Implications for future drafts## Session context (traceability)
Save it to:
ψ/memory/learnings/YYYY-MM-DD_writing-th-<mode>-learn.mdwhere<mode>isreportorarticle.
If multiple learning notes already exist for the same day and mode, append a new section with a clear heading instead of overwriting.
In
## Session context (traceability)include links:- writing plan path (if any)
- draft path + edited path
- example report path (if any)
oracle_learn call
- Call
oracle_learnwith:pattern: the distilled patterns from the learning note (especially "Implications for future drafts").concepts: tags includingwriting-th, the mode (reportorarticle), and any additional context tags.source: a short identifier like"writing-th-learn: draft-vs-edited".
Materialization guardrail (IMPORTANT)
- After
oracle_learn(), immediately read the returnedfilepath. - If read fails with
ENOENT, materialize the file manually (patch tooling), per:
- Call
Link back to execution skill
In the learning note, add a short line that this file is discoverable by
/writing-thvia MCP search:- e.g. "เรียนรู้จากการเปรียบเทียบฉบับร่างและฉบับแก้ไขสำหรับ writing-th (mode: report/article)".
If a writing plan exists, append an “Learn-back recorded” line into the plan (append-only) with a link to the learning note.
Optional promotion to resonance (with explicit human approval)
- Useได้เมื่อ:
- pattern เดิม (เช่น วิธีตั้งประโยค วิธีจัดลำดับบริบท → ประเด็นหลัก → นัยเชิงยุทธศาสตร์) ปรากฏซ้ำใน อย่างน้อย 2 session และ
- คุณในฐานะมนุษย์ตัดสินใจแล้วว่าอยากให้ pattern นั้นกลายเป็น “กติกาถาวร” ของการเขียน (ไม่ใช่แค่ preference ชั่วคราวของโปรเจกต์เดียว)
- ขั้นตอน:
- เปิด learning note ล่าสุดที่เกี่ยวข้อง (ใน
ψ/memory/learnings/YYYY-MM-DD_writing-th-<mode>-learn.md) และเลือกเฉพาะ pattern ที่ควรโปรโมต
- เปิด learning note ล่าสุดที่เกี่ยวข้อง (ใน
- สร้างบล็อกข้อความสั้น ๆ ในรูปแบบ:
```markdown## YYYY-MM-DD — promoted from writing-th-learn (mode: report/article)- บรรยาย pattern เชิงกติกาแบบสั้น กระชับ และทั่วไปพอใช้ได้ข้ามโปรเจกต์- ระบุว่าเรียนรู้จาก draft/edited คู่ใด (ลิงก์ path แบบย่อ)```- เพิ่มบล็อกนี้แบบ append-only ลงใน
- [`ψ/memory/resonance/writing-style-th.md`](ψ/memory/resonance/writing-style-th.md)- หรือ [`ψ/memory/resonance/citation-style-th.md`](ψ/memory/resonance/citation-style-th.md) ถ้าเป็นเรื่อง citation โดยเฉพาะ- +- Guardrail:
- ห้ามลบบรรทัดเก่าใน resonance (Nothing is Deleted)
- ต้องมี “เหตุผล” ที่ชัดเจนว่าทำไม pattern นี้จึงควรใช้ข้ามโปรเจกต์ ไม่ใช่ข้อยกเว้นเฉพาะกรณี
- การตัดสินใจโปรโมตยังคงต้องอาศัยการยืนยันของมนุษย์ ไม่ใช่ agent ตัดสินใจเองลำพัง
Notes for /rrr integration
/rrrshould not recreate this logic; instead, it can:- Detect when a Thai draft/edited pair was created in the session; then
- Invoke
/writing-th-learnonce per pair to record learnings.
- Retrospective and Thai-writing learnings must stay in separate files:
/rrrwrites session retrospectives underψ/memory/retrospectives/...and general learnings underψ/memory/learnings/..../writing-th-learnwrites Thai-writing-focused learnings with thewriting-th-<mode>-learnsuffix so they are easy to query later.