CommunityWriting & Editinggithub.com

muracoco/gyosei-jp

A research project that analyzes large-scale corpora of official documents to implement a domain-neutral Japanese text refinement skill that preserves content.

What is gyosei-jp?

gyosei-jp is a specialized AI agent skill designed to transform input text into the written style of Japanese government agencies without altering facts. It leverages a registry of validated conditional rules (adopted-experimental or higher) and genre profiles to ensure only officially supported document types are processed. The skill operates in two layers: first removing typical AI-generated phrasing patterns, then restructuring the text to adhere to administrative Japanese conventions—adjusting information order, subject references, conditions, deadlines, and procedures using rule-based transformations. A built-in validation step checks against invariants for semantic preservation, fact accuracy, and the elimination of Pink Elephant (literal, semantic, rationale, and attention) issues, reconstructing the text from a clean brief if critical failures are detected. It supports platforms like Claude Code and Cursor, and is optimized for developers and document processors who need to generate official-grade Japanese text from any source while maintaining domain neutrality and verifiable traceability to applied rules.

Works with~Claude Code~Codex CLI~Cursor
npx skills add muracoco/gyosei-jp

Installed? Explore more Writing & Editing skills: steipete/notion, langchain-ai/langchain, bytedance/podcast-generation · View all 6 →

Ask in your favorite AI

Open a new chat with this agent skill pre-loaded.

Documentation

What does gyosei-jp do?

Transform input into the written language of government agencies without altering facts, using only validated conditional rules.

Items to Check First

  1. Read references/rule_registry.json and consider only rules whose status is adopted-experimental or higher.
  2. Read references/genre_profiles.json and confirm that the input document type is supported.
  3. Read references/invariants.md and lock down constraints on text quality, meaning preservation, and Pink Elephant.

Do not independently add unadopted candidates, high-frequency terms, or words that merely look official.

Organize the Input

To the extent possible, identify purpose, audience, document type, issuing entity, facts, figures, dates, conditions, exceptions, tense, certainty, and required actions.

Only confirm critical omissions that would change meaning. Do not invent information where none exists.

If there is a correction or deletion history, separate the currently valid content as TARGET_STATE, previous versions as REJECTED_HISTORY, and any comparisons or disclosures required for the final output as VISIBLE_EXCEPTIONS. The Clean Brief used for generation should contain only TARGET_STATE and VISIBLE_EXCEPTIONS.

Transform

Transformation is divided into two layers.

1. Remove AI Default Phrasing

Check the rules in the registry whose family is ai_removal. Apply them only when the rule's trigger is satisfied and contraindications do not apply.

Do not leave behind traces of deletion, change explanations, or negations. Reconstruct sentences from the facts needed to explain the content.

2. Restructure into Administrative Japanese

Check the registry's administrative structure rules and the document type profile. Adjust the placement of information order, subject, official names, conditions, exceptions, deadlines, procedures, required documents, action instructions, and inquiries.

Do not increase official-sounding vocabulary by simple word substitution. Internally map each rule's application reason to the corresponding rule_id.

Validate

Validate the final draft according to references/invariants.md.

  • Compare meaning, facts, figures, dates, proper nouns, conditions, exceptions, tense, and certainty against the input.
  • Confirm that obligations, prohibitions, permissions, recommendations, and legal/institutional effects are neither strengthened nor weakened.
  • Check for omissions in Pink Elephant: Literal, Semantic, Rationale, and Attention.
  • If there are omissions or serious preservation failures, do not fix them with local deletions; reconstruct from the Clean Brief.
  • For unsupported document types, do not forcefully generalize adopted rules; prioritize meaning preservation and ordinary clear Japanese.

If the user requests only the final draft, do not mix rule IDs, research explanations, change histories, or validation reports into the body; return only the final draft.

Related Skills