Follow the workflow to apply Japanese writing guidance by output surface and context while preserving technical meaning
<Japanese_Procedure>
<Role>Act as the procedural skill for Japanese writing.
Use this skill to determine the output surface, apply `japanese-knowledge`, and produce Japanese that matches the surface without changing protected technical text.
Do not skip surface selection, fixed-format checks, or final verification.
</Role>
<Inputs>
Treat these as the required inputs when they exist:
- the user's language signal and requested output language
- the target output surface or artifact shape
- fixed labels, templates, schema keys, placeholders, or length constraints
- the source meaning, notes, or draft text to preserve
- protected identifiers, code, commands, paths, API names, product names, and repository terms
- surrounding sections or sibling items when the text is part of a larger artifact
Determine whether the target is one surface or a mixed-surface artifact before rewriting.
Preserve fixed structure before local wording improvements.
</Inputs>
<Composition>
</Composition>
<Preconditions>
</Preconditions>
<Restrictions>
</Restrictions>
<Examples>
</Examples>
Load `japanese-knowledge` before selecting the surface case or rewriting text.
Use `japanese-knowledge` for language rules, register defaults, sentence-shape rules, connector choices, identifier preservation, punctuation, and terminology safeguards.
Apply the loaded skill instead of restating its internal knowledge.
<Skill_Flow>
<Load_Skills>
Load `japanese-knowledge` before choosing the output surface or writing Japanese.
Do not start surface-specific rewriting before the supporting knowledge is available.
</Load_Skills>
<Analyze_Context>
Determine whether Japanese output is required, preferred, or already established.
Identify the target surface for each writable region: normal prose, heading/title/label, bullet/list item, fixed-format free-text region, technical article/document prose, or mixed surfaces.
Determine whether the text must stand alone or is subordinate to surrounding structure.
Identify fixed labels, schema keys, placeholders, and protected technical tokens that must remain unchanged.
Determine whether the surrounding artifact already fixes the register; otherwise default prose to concise `です・ます`.
</Analyze_Context>
<Select_Case>
Use `<Fixed_Format_Free_Text>` when only selected free-text regions are editable inside a fixed structure.
Use `<Mixed_Surfaces>` when the artifact contains multiple surface types that need different local treatment.
Use `<Headings_Titles_Labels>` when the target text is a heading, title, label, caption, or other short structural surface.
Use `<Bullet_And_List_Items>` when the target text is a list of sibling items.
Use `<Technical_Article_Or_Document_Prose>` when the target is sustained explanatory prose with paragraphs, sections, examples, or documentation flow.
Use `<Normal_User_Facing_Prose>` for ordinary replies, explanations, and short standalone body text.
When signals conflict, let fixed-format constraints and surrounding artifact conventions outrank stylistic preference.
</Select_Case>
<Execute_Skill>
<Normal_User_Facing_Prose>
Apply `japanese-knowledge` to the selected prose region.
Use the prose-oriented defaults and readability rules from `japanese-knowledge`.
Use bullets or short examples only when they improve scanability.
</Normal_User_Facing_Prose>
<Headings_Titles_Labels>
Apply `japanese-knowledge` to the selected structural surface.
Prefer short, high-signal wording over full explanatory sentences.
Keep sibling headings or labels parallel in form.
Do not add `。` to headings or labels unless the fixed surface already uses it.
</Headings_Titles_Labels>
<Bullet_And_List_Items>
Apply `japanese-knowledge` at the item level.
Choose one item shape across sibling bullets when possible.
Keep one point per item and keep ordering easy to scan.
Keep punctuation and ending style consistent across sibling items unless one item genuinely needs a different shape.
</Bullet_And_List_Items>
<Fixed_Format_Free_Text>
Identify the writable free-text areas first.
Preserve fixed labels, keys, headings, placeholders, ordering, and non-free-text tokens exactly as given.
Apply `japanese-knowledge` only inside the editable regions.
Keep the result within any slot, line, or length constraint that the surface imposes.
If a fixed surface mixes English labels with Japanese explanation, keep the fixed labels unchanged and improve only the allowed Japanese text.
</Fixed_Format_Free_Text>
<Technical_Article_Or_Document_Prose>
Apply `japanese-knowledge` across the full document section, not sentence by sentence in isolation.
Open sections or paragraphs with the conclusion, purpose, or topic when that improves readability.
Prefer examples, bullets, tables, or step splits when they make the explanation easier to scan.
Keep terminology and register consistent across the section.
Use the prose defaults and readability rules from `japanese-knowledge` unless the surrounding document already establishes another editorial register.
</Technical_Article_Or_Document_Prose>
<Mixed_Surfaces>
Split the artifact into writable segments by surface.
Apply the matching surface case to each segment in order.
Keep document-level terminology, protected identifiers, and overall register consistent across segments.
Allow headings, bullets, and body prose to use different local sentence shapes when the surface requires it.
Re-read the full assembled artifact so that transitions, labels, and parallel structure still work together.
</Mixed_Surfaces>
</Execute_Skill>
<Verify_Result>
Verify that each writable region matches the selected surface instead of receiving one flat style.
Verify that each region follows the relevant sentence-shape and register rules from `japanese-knowledge`.
Verify that sibling bullets use a consistent item shape unless a real distinction requires variation.
Verify that fixed-format outputs preserve labels, keys, placeholders, and protected technical text according to `japanese-knowledge`.
Verify that the Japanese reads naturally, stays concise, and preserves the original technical meaning.
Verify that the selected surface does not flatten local differences that should remain visible.
</Verify_Result>
</Skill_Flow>
Start only when Japanese output is required, preferred, or already established by the task.
Identify the writable text and the protected text before rewriting.
Identify the target surface for each region or confirm that a safe default surface exists.
Use surrounding structure when the text is part of a larger artifact.
<Failure_Handling>
If Japanese output is not actually required and no Japanese surface is already established, stop and defer to the caller's language policy instead of forcing Japanese.
If the target surface is unclear and the choice would materially change the result, stop and ask the caller to resolve the surface.
If the artifact contains multiple clear surfaces, use `<Mixed_Surfaces>` instead of forcing one case.
If fixed labels or schema keys cannot be separated confidently from editable text, preserve them unchanged and block the uncertain rewrite.
If the source meaning is ambiguous, stop before performing a rewrite that could change the technical claim.
</Failure_Handling>
<Expected_Outcome>
Carry the selected Japanese writing workflow to a verified surface-appropriate result.
Leave downstream outputs with concise, natural Japanese that preserves technical meaning, fixed structure, and protected identifiers.
</Expected_Outcome>
Do not duplicate the internal rules of `japanese-knowledge`.
Do not force full sentences onto headings, titles, or labels when the surface naturally prefers fragments.
Do not rewrite fixed labels, schema keys, or placeholders inside fixed-format outputs.
Do not replace `japanese-knowledge` with local ad hoc language rules inside one case.
```text
Procedure example
├── artifact: CLI response
├── surfaces: heading + body + bullets
└── identifier: `TypeScript`
Draft
├── heading: TypeScript の修正
├── body: `TypeScript` の型定義を見直し、不要な型アサーションを減らしました。
└── bullet: `npm test` は未実行です。
Use `<Mixed_Surfaces>`.
Keep the heading concise.
Write the body in complete `です・ます` sentences.
Keep `TypeScript` unchanged.
```
```text
Procedure example
├── fixed structure: subject + unlabeled body paragraphs
├── editable region: commit body only
└── identifier: `README.md`
Draft
├── 1st paragraph: 初回セットアップ時の混乱を減らします。
└── 2nd paragraph: `README.md` の手順に沿って作業しやすくなります。
Use `<Fixed_Format_Free_Text>`.
Keep the paragraph order and `README.md` unchanged.
Improve only the Japanese inside the body paragraphs.
```
```text
Procedure example
├── surface: issue summary heading
├── surrounding register: technical response body
└── goal: short title
Draft heading: 原因
Use `<Headings_Titles_Labels>`.
Prefer a concise fragment.
Do not force a full sentence ending with `です` or `ます`.
```
```text
Procedure example
├── surface: verification bullets
├── sibling count: 3
└── lead-in sentence: present
Draft
├── `npm test` は未実行です。
├── `pnpm lint` は通過しました。
└── UI の手動確認は未実施です。
Use `<Bullet_And_List_Items>`.
Keep one point per item.
Choose one parallel item shape across the list.
```
```text
Procedure example
├── surface: technical article body
├── paragraphs: multiple
└── readability issue: repeated `...し、...`
Draft
├── Bad: 型定義を見直し、不要な分岐を削除し、エラーハンドリングを整理しました。
└── Better: 型定義を見直して不要な分岐を削除しました。あわせて、エラーハンドリングも整理しました。
Use `<Technical_Article_Or_Document_Prose>`.
Lead with the conclusion.
Split or rewrite the heavy connector chain only where readability improves.
Keep the register consistent across the section.
```
</Japanese_Procedure>