CommunityWriting & Editinggithub.com

tsuzuri

A skill for structured Japanese writing: first define requirements and design, then write sentence by sentence with recorded pre-writing intent and sentence function tags. Supports review of your own or others' text, weak-sentence correction, and classification for reading only core sentences.

What is tsuzuri?

tsuzuri is a writing skill designed for AI coding agents (Claude Code, Codex, Antigravity) to produce high-quality Japanese text by enforcing a rigorous pre-writing and post-writing process. The skill separates planning from execution: before writing a single sentence, you must define a requirements document and a design document for the text. Each sentence is then written one by one, preceded by recording its writing intent (`memo`) and followed by tagging it with five sentence function tags: connection, importance, role, technique, and place. This structured approach allows reviewers (including other AI agents or humans) to verify that each sentence fulfills its intended purpose, correct weak sentences, and even classify sentences so that verbose articles can be read by selecting only the core ('nuclear') sentences. The skill also supports reviewing text written by humans by inferring and adding sentence function tags. Recorded writing intents and tags are saved in a dedicated folder next to the draft file, and can be compiled into a shared file (.tsz) for collaboration. The workflow includes separate 'finger-pointing review' and 'improvement review' phases, a built-in script for term unification, and a pass through `yomiyasu` for wording polishing. Supported agents: Claude Code, Codex, Antigravity.

Works with✓Claude Code✓Codex CLI~Cursor✓Antigravity
npx skills add https://github.com/MaryCache/tsuzuri/tree/HEAD/skills/tsuzuri

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 tsuzuri do?

This skill writes Japanese text by first determining a requirements document and a design document, then writing sentence by sentence, recording both the pre-writing intent and the sentence function tag for each sentence. After writing is complete, the text is passed through review, term unification, yomiyasu, and a 'context-free reader' check before being delivered to the user. After receiving user comments, the text is corrected in a new version. It can also review text written by humans by adding sentence function tags to their sentences. This SKILL.md is organized as follows: common rules, location of records, three workflows (write, correct, read others' text), and the vocabulary of sentence function tags.

First things to follow

Create records only with the bundled script; do not directly rewrite record files with file editing tools. This is because the script ensures that writing intent comes before the sentence, finalized versions are not rewritten, and the finalization procedure is followed.

Write in this order: requirements document, design document, then the body text sentence by sentence. For each sentence, follow this order: determine the writing intent with memo, think of the sentence, re-read the writing intent, the previous sentence, the requirements document, and the design document to determine the sentence function tags, then finalize with write. If you create multiple sentences first and only later add the writing intent, you will lose the pre-writing intent.

The writing intent (memo in the record) is the purpose decided before writing the sentence: what you intend to do to the reader with this sentence. Do not describe reasoning processes or moments of hesitation; describe only the decided purpose (an example is given in step 1 of "Write sentence by sentence"). If the written sentence deviates from the writing intent, do not correct the writing intent; instead, describe the deviation and how you corrected the intent in write --deviation.

Sentence function tags are five judgments (connection, importance, role, technique, corresponding requirement) assigned to each sentence. They are not "correct" answers; they are guidelines that the user can correct if they find them inconsistent. Since even humans rarely agree on these judgments, do not be definitive; apply them in a way that allows the user to correct them.

During writing, do not inspect vocabulary or correct phrasing; focus on sentence function and writing intent. Vocabulary and phrasing are corrected after writing, in the "unify terms" and "pass through yomiyasu" steps.

In a single request, complete the text, review, check, and hand it over; do not ask for approval from the user midway. However, if the user requests "stop at requirements" or "stop at design," stop after registering the requirements document or design document in the record, and ask the user to add comments via the app.

Execute CLI operations on the same record serially, because they assume a single writer. Only the viewing app (app/server.py) writes to comments/; do not ghostwrite, edit, or delete comments.

Prerequisites and record location

Use a skill-compatible AI coding agent (Claude Code, Codex, Antigravity) and Python 3.10+. The scripts run on the standard library alone. Replace <this skill's folder> below with the parent folder of this loaded SKILL.md, and always call scripts using the form python3 "<this skill's folder>/scripts/tsuzuri.py" ... so they do not depend on the working directory.

The record for the document draft.md is placed in the adjacent draft.md.tsuzuri/ folder. init takes the document path as an argument; all other commands take the record folder path as an argument.

init adds *.tsuzuri/ to the .gitignore of the git repository root (if any) to exclude records from git by default, and adds the record folder to the viewing app's library file (~/.config/tsuzuri/records.json). Users who want to keep records in git can disable the exclude setting themselves. Inform the user that if they include the record folder in git and publish it, writing intents will also be published, and if they delete the record folder (which is excluded from git), it cannot be restored from git.

The contents of the record folder are as follows:

ContentLocation
Requirements documentrequirements/rNNN.md
Design documentdesign/dNNN.md
Writing intents and sentence versionssentences/sNNNN/
Blocks such as headings and codeblocks/bNNNN/
Title and tags (frontmatter)meta/mNNN.md
Review pointsreviews/
Commentscomments/
Sentence order and split/merge destinationsorder.json

You may refer to these, but do not directly rewrite them.

1. Write

Add the requirements document

If there is no requirements document, fill in the following nine items from the request and write them to requirements.md outside the record folder.

  1. Request
  2. Reason for writing
  3. Publication location and audience
  4. Scope and out of scope
  5. Constraints
  6. After reading
  7. Writer's position
  8. What you want to say
  9. Text form

If something is unclear, state it as an assumption and proceed to first set the text's purpose. Use an existing requirements document or design document if available. Before starting to write, use examples to review the before and after of sentences that the user previously corrected via comments, and write in a way that matches their correction style. Before starting to write, list the templates (heading skeletons for the body) with templates. If the user specified a template name in the request, use that template; otherwise, choose the one closest to the request (if none is close, do not use a template).

python3 "<this skill's folder>/scripts/tsuzuri.py" templates
python3 "<this skill's folder>/scripts/tsuzuri.py" templates README

Record the chosen template name (in the form Template "README") and the content of the "## Default text form" section of the template in the requirements document's "9. Text form" (otherwise, checklist will not add the template's check items). Create the design document's paragraph and heading blocks following the template's skeleton. Templates are read by overlaying the bundled references/templates/ and the user's ~/.config/tsuzuri/templates/. If a name matches, the user's template is used, so users should add company- or medium-specific skeletons to their own save location.

When a user provides a reference text and requests template creation, read from that text: its purpose, style and length, heading skeleton, and repeatedly observed rules. Create the template at ~/.config/tsuzuri/templates/<name>.md with the same sections as the standard templates (purpose at the top, "## Default text form", "## Skeleton", and "## Checklist items" if necessary). Show it to the user.

For what to write and not write in each item, and the boundary between the requirements document and the design document (the requirements document defines what, for whom, and why; the design document determines how to arrange it), refer to What to write in the requirements and design documents before writing. Add a heading in the form ## <number>. <item name> (e.g., ## 8. What you want to say) for each item. If the heading format differs, req will not accept it, and the app will not be able to extract items by heading.

Use only the experience stated in the materials as the writer's experience. Do not write about the writing process itself (unrelated behind-the-scenes details, such as tools used or things that could not be verified in the work environment) in the body text (see "Separate the writer from the one doing the writing work" in the same reference). For each item of the content you are writing, ask "When I write this item, what does the reader gain?" and if you cannot answer, correct the item here. The reason for this question is in Checking writing intent quality under "Question at the requirements document stage: Who arrives?"

For a new record, execute the steps in this order: create the requirements document, init, then req. req requires an initialized record.

python3 "<this skill's folder>/scripts/tsuzuri.py" init draft.md
python3 "<this skill's folder>/scripts/tsuzuri.py" req draft.md.tsuzuri --file requirements.md

Note the version returned by req (first time is r001).

Add the design document

Once the requirements document is finalized, determine the claim and order of each paragraph, and write them to design.md outside the record folder.

  • In the first line, write the version of the requirements document it is based on, in the form Requirements document: r001.
  • Give each paragraph a heading in the form ## p<number> <claim of that paragraph>, numbering sequentially from p1.
  • Below the heading, describe the relationship with the previous paragraph and the number of the requirements document item that this paragraph covers.

For what to write and what not to write, and what to check before writing, see What to write in the requirements and design documents under "Design document" and "Checking for omissions and excesses." Texts that consist of a single paragraph may omit the design document, but even then, determine the order of sentences before starting to write (see "When you can omit the design document" in the same reference). Register the design document in the record using design. design will not accept a design document with a different heading format, or a design document that lacks the first line, or whose first line points to a requirements document version not in the record.

python3 "<this skill's folder>/scripts/tsuzuri.py" design draft.md.tsuzuri --file design.md

Note the version returned by design (first time is d001).

When revising the requirements or design document

To revise the requirements document, correct the external requirements.md, add a new version with req, then immediately correct the first line of the design document to point to the new version and add it with design. If an older version of the design document based on an outdated requirements document remains, check will warn. If you feel the need to change the requirements document while writing the design document, interrupt the design document work and revise the requirements document first. Older versions are not deleted and remain, so you can later trace which version a sentence's tags were evaluated against.

Write sentence by sentence

Repeat the following four steps (headings 1 through 4) until the last sentence. The IDs and versions in the examples are for illustration; use the values returned by memo in practice. Also, do not skip intermediate decisions by executing multiple commands at once.

1. First determine the writing intent with memo

Determine the purpose of what you intend to do to the reader with the next sentence, and finalize it with memo.

python3 "<this skill's folder>/scripts/tsuzuri.py" memo draft.md.tsuzuri --text '<What you intend to do to the reader with this sentence>'

Think of the sentence after deciding the writing intent. Sentence function tag evaluation and review are performed against this writing intent. Decide the writing intent using these questions:

  • Given the text up to the previous sentence, what does this sentence advance?
  • How do you want the reader to receive it? How is the reader likely to respond?
  • What would break if this sentence were missing?

You do not need to answer all of them. Briefly describe the most important purpose of that sentence, as a decided result. For the decided writing intent, ask "When I fulfill this writing intent, what does the reader gain?" If you cannot answer, re-decide the writing intent before thinking of the sentence. The reason and the path to take when you cannot answer are in Checking writing intent quality. Do not describe reasoning processes, moments of hesitation, or thought drafts; describe only the decided purpose. A writing intent that is merely a summary of the sentence content ("State the overview of the new system.") or a step name ("Write the reason.") does not preserve why that sentence is placed there, and you will not be able to trace the intent later.

2. Think of one sentence

Think of only one sentence that aligns with the writing intent. Do not yet create the next sentence.

3. Determine the sentence function tags

Review the writing intent, sentence function tags, and paragraph of the previous sentence using show. Refer to the requirements document at requirements/rNNN.md and the design document at design/dNNN.md in the record folder.

python3 "<this skill's folder>/scripts/tsuzuri.py" show draft.md.tsuzuri

show does not display the body of the requirements or design document, so refer to the files directly. Determine the sentence function tags against the writing intent as follows:

  • Determine the role and connection from the writing intent (what this sentence does, and what it advances given the previous sentence).
  • Determine importance from "What would break if this sentence were missing?"
  • Use the surface words of the sentence and the relationship with surrounding sentences to check if they conflict with the writing intent. If the sentence itself deviates, describe it in write --deviation.
  • If the writing intent does not match any term in the vocabulary, do not force a close match; instead, record that fact with review.

4. Finalize with write

Finalize the sentence and its function tags with write. The JSON for the sentence function tags must include relation, importance, role (array), technique (array), and place. If there is no technique, set technique to []. Assigning techniques of a different genre (e.g., a fictional technique to a sentence with an explanatory role) will cause write to warn. For place, describe the requirements document item you referenced, using the same number and item name as the heading (e.g., 8. What you want to say). For records that have a design document, point to the paragraph number the sentence belongs to with --para (if omitted, write will not accept it).

python3 "<this skill's folder>/scripts/tsuzuri.py" write draft.md.tsuzuri --sid s0001 --ver v001 --para p1 --text '<one sentence>' --tags '{"relation":"paragraph start","importance":"nuclear","role":["claim"],"technique":[],"place":"8. What you want to say"}' --requirements r001 --deviation '<How it deviated from the writing intent and how you corrected the intent>'

If there is no deviation from the writing intent, omit --deviation. If --requirements is omitted, it ties to the latest requirements document; if --design is omitted, it ties to the latest design document. When you revise the requirements or design document, check that each sentence's requirements and design version references are updated, and review sentence function tags and paragraphs that point to old versions. Even when correcting only the sentence function tags, add a new version with memo and write. From the second sentence onward, repeat steps 1 through 4 in the same order.

python3 "<this skill's folder>/scripts/tsuzuri.py" memo draft.md.tsuzuri --text '<What you intend to do to the reader with this sentence>'
python3 "<this skill's folder>/scripts/tsuzuri.py" show draft.md.tsuzuri
python3 "<this skill's folder>/scripts/tsuzuri.py" write draft.md.tsuzuri --sid s0002 --ver v001 --para p1 --text '<one sentence>' --tags '{"relation":"supplement","importance":"satellite","role":["reason"],"technique":[],"place":"2. Reason for writing"}'

Write headings, code, and containers

Headings, code, images, and tables are recorded as blocks, not sentences. Note containers, lists, quotes, and footnotes are container blocks that contain sentences. If you assemble the order of headings and blocks outside the record, their writing intents cannot be reviewed in the app. Like sentences, blocks also require first determining the writing intent with memo --block, then writing the content with write --block. For a block's writing intent, describe what the reader gains by that block being placed there. Use the same question as in step 1 of "Write sentence by sentence."

python3 "<this skill's folder>/scripts/tsuzuri.py" memo draft.md.tsuzuri --block --text '<What you intend to do to the reader with this block>'
python3 "<this skill's folder>/scripts/tsuzuri.py" write draft.md.tsuzuri --sid b0001 --ver v001 --para p2 --block '{"kind":"heading","level":2}' --text '<Heading text>' --tags '{"place":"<Requirements document item>"}'

The types of --block are as follows:

Type--block--text
Heading{"kind":"heading","level":2} (level 1-4. Level 1 is the article title. For platforms like Qiita or Zenn that use frontmatter for the title, do not use level 1; instead, write it in meta)Heading text
Code{"kind":"code","lang":"css"} (language can be empty)The code itself
Image / Table{"kind":"image"} / {"kind":"table"}Markdown as-is
Note container{"kind":"note","type":"info"} (info/warn/alert. The platform's syntax determines the output)Empty string ''
List{"kind":"list","ordered":false}Empty string ''
Quote{"kind":"quote"}Empty string ''
Footnote{"kind":"footnote","label":"lms"} (label: alphanumeric, hyphen, underscore)Empty string ''

Sentences inside a container are written one by one with write --in <container ID> immediately after finalizing the container. In the order, they must follow directly after the container. For lists, write one item per sentence. If the sentences inside a container do not directly follow the container in the order, check will flag an error, and export will stop.

For footnotes, call them in the body sentence by writing [^label]. After finalizing that sentence, write the footnote block. Set --para of the footnote block and its contained sentences to the same paragraph as the calling sentence. Do not create a paragraph solely for footnotes in the design document. Footnotes do not break the body paragraph. export outputs all footnotes together at the end of the body in the form [^label]: content. check will flag an error if calls and labels do not correspond one-to-one (call with no footnote, unreferenced footnote, or duplicate labels), or if a footnote appears before its calling sentence.

For blocks, the sentence function tag is place only; do not assign role, connection, importance, or technique. This is because the vocabulary for sentence function tags was created for sentences, and there is no source to apply to blocks.

Titles and tags for the publication target (frontmatter) are not part of the text itself, so register them with meta. Pass a file that contains only the content, without --- lines.

python3 "<this skill's folder>/scripts/tsuzuri.py" meta draft.md.tsuzuri --file meta.yaml

Finger-pointing review and improvement review

After writing, perform a finger-pointing review and an improvement review, in that order, separately. Because writing intents exist, the review can focus on "Does this sentence fulfill its writing intent?" rather than "How do I feel when reading it?" Do not mix correction with finger-pointing, because that would leave no record of what was off, and the correction might drift toward the writer's personal preference. In the finger-pointing review, do not correct; only list deviations. Check the following aspects:

  • Quality of writing intent: Ask what the reader gains when the writing intent is fulfilled. If you cannot answer, trace back to see if the writing intent merely copied from the design document or requirements document, and add a review point to the source (read Checking writing intent quality before checking).
  • Writing intent vs. sentence: Check whether the sentence fulfills its writing intent, and whether a different sentence might be fulfilling that intent instead.
  • Sentence function tags vs. writing intent: Check whether the tags match the writing intent (truth of tags) and whether the first role listed is the sentence's strongest function.
  • Number of functions per sentence: For sentences with three or more explanatory roles, check if it can be split (write also warns).
  • Requirements coverage: Check whether any requirement lacks a corresponding sentence, or any sentence lacks a corresponding requirement.
  • Design document alignment: Use show's para to group sentences by paragraph. Extract what the paragraph actually says in one sentence, compare it with the claim in the design document (reverse outline). If they differ, write in the review point whether the sentence deviated or the design document should have been revised.
  • Importance and length: Check whether nuclear sentences are buried under long satellite explanations. For each satellite sentence listed in load's "Necessity of satellites," ask "If I remove this, what part of '6. After reading' in the requirements document can the reader not do?" For satellite sentences that cannot be named, issue a review point to remove them.
  • Reader burden: load offers candidates: paragraphs with many satellites, long sentences, sentences with many commas, and possible rephrasings of the previous paragraph. Read through to check for sentences that say the same thing twice (read Checking reader burden before checking. The candidates are in the order to review; they are not judgments to delete).
  • Connections: Check whether the connections work as described by the relation tag between sentences. For each conjunctive word or particle listed in load's "Connection check" (e.g., ~te mo, ~ga, ~node, sonotame, ippoude), ask whether you can verbally explain "Contrary to what, is it ~?" or "For what reason, is it ~?" If you cannot, issue a review point.
  • Subject: For sentences with omitted subjects, check whether the reader can uniquely identify the actor from reading top to bottom. Write the subject only at paragraph beginnings, right after headings, or when the actor changes from the immediately previous sentence (also look at sentences in load's "Changing actors mid-stream" that combine a first half with an omitted subject and a second half with a different subject. Do not write the same subject as the immediately previous sentence; when referring back to a listed item, "it" suffices. load's "Repeated nouns" offers candidates).
  • First-occurring terms: For sentences listed in load's "Topic of first-occurring terms," check whether a term unfamiliar to the reader is used as the topic with "wa" without introduction. If so, suggest introducing it with "~ga aru" before making it the topic.
  • Style and word choice: Check whether all sentences match the style (spoken or written) determined in "9. Text form" of the requirements document; for written-style documents, whether established Sino-Japanese compounds (執筆する, 理解する, 依頼する) are used instead of everyday native Japanese verbs (書く, 分かる, 頼む); whether sentences in load's "Short forms of potential verbs" (読める, 開けます) are changed to "〜することができる" or Sino-Japanese compounds; whether there are sentences of the form "XX no YY wa, ZZ no YY desu" listed in load's "Same word in topic and predicate"; and whether enclosing a long contiguous object in 「」 would improve readability.
  • Headings and titles: Refer to load's "Heading vs. claim and nuclear sentences below it." For each heading, write what you want to say in that section in one sentence (without worrying about length), prioritize the information in the claim and nuclear sentences for the reader, and check whether the heading starts with the highest-priority information and does not cram multiple pieces of information into a vague single word (差, 違い, 変化, etc.). For the title, cross-reference it with "8. What you want to say" in the requirements document.
  • Whether writing matched the intent: If there are deviations, check whether the deviation record and intent correction exist.

Record finger-pointing reviews with review, specifying the target sentence, version, and aspect. Prepend the aspect with "Finger-point: ". When you decide not to fix a finger-pointing, or when you fix it in a different sentence, record it on the version with the finger-pointing using `review --aspect 'Response: '". The app counts only finger-pointings on the current version without a response. For missing requirements, attach the review point to the sentence that should cover that content. If there are no finger-pointings, do not create them artificially. In the improvement review, for each finger-pointing, propose a correction that satisfies the writing intent.

  • The proposal should best fulfill the writing intent of that sentence, not cater to the writer's preferred phrasing.
  • If the writing intent itself is weak (does not connect to the overall requirements of the text, or overlaps with surrounding sentences' intents), also propose a revision to the writing intent.
  • For sentences whose function tags did not match any vocabulary term, propose either adding a term to the vocabulary, or splitting/merging the sentence.
  • For finger-pointings on headings and titles, propose 2-3 options centered on pushing the highest-priority information forward, with different goals (clearest claim, preserve original contrast, turn into a question). State which one you recommend and why.

Record improvement proposals with review, prepending the aspect with "Improvement: ". Within the writing request, implement the improvement proposals yourself and create new versions of the finger-pointed sentences following the same steps as "2. Correct." However, do not implement proposals that require facts not in the materials, or that change meaning, numbers, certainty, or strength. In those cases, record review --aspect 'Response: <Reason for not implementing>' on the finger-pointed version, and inform the user. After implementing, re-check the corrected sentences with a finger-pointing review. Limit implementation of finger-pointings from this re-check to one round. If issues remain, inform the user.

python3 "<this skill's folder>/scripts/tsuzuri.py" review draft.md.tsuzuri --sid s0002 --ver v001 --aspect 'Finger-point: truth of tags (role)' --text '<Deviation to list without correction>'
python3 "<this skill's folder>/scripts/tsuzuri.py" review draft.md.tsuzuri --sid s0002 --ver v001 --aspect 'Improvement: writing intent and sentence' --text '<How to correct to fulfill the writing intent and a proposed correction>'

Check record consistency with check, and regenerate the body text with export.

python3 "<this skill's folder>/scripts/tsuzuri.py" check draft.md.tsuzuri
python3 "<this skill's folder>/scripts/tsuzuri.py" export draft.md.tsuzuri

check's exit code: 0 for consistent, 1 for inconsistent, 2 for runtime error. Check both the display and the exit code. A clock skew warning appears when the PC clock resets, causing the writing intent timestamp to appear later than the sentence timestamp. This is just a notification; the exit code may still be 0. Do not report success while inconsistencies or runtime errors remain. Correct errors in your own records with a new version; if something cannot be corrected, inform the user. check does not evaluate the validity of meaning or function tags, so do not skip the tag review.

export regenerates text.md inside the record folder from the latest sentences and blocks as article Markdown. If meta exists, it prepends the frontmatter. It does not overwrite the original draft.md. Use --flavor to select the publication platform's dialect (gfm, qiita, zenn; default is GitHub Flavored Markdown gfm), matching the platform specified in "9. Text form" of the requirements document. The only thing that changes with the dialect is the notation for note containers; records are platform-independent. Paragraphs are split where para changes (if a design document exists), or where relation: "paragraph start" (if no design document), and also before and after blocks.

Unify terms

After review, before passing through yomiyasu, unify terms that hit the proofreading dictionary. Since yomiyasu does not change the original word choices, foreign words that are over-translated into Japanese, or terms that differ from what the user decided, will remain unless corrected here.

  1. Use words to apply the proofreading dictionary to the latest versions of sentences, writing intents, heading text, and container text. Output a list of hits (the dictionary is read by overlaying references/words.tsv from this skill and the user's ~/.config/tsuzuri/words.tsv if it exists).
  2. For each hit, read the surrounding context and only correct it when it is used in a meaning that matches the dictionary's supplement, in a way that makes the sentence natural (because the same string may have different meanings, do not blindly replace all hits).
  3. For each corrected sentence, create a new version with memo --sid. Pass the corrected writing intent if the word was also in the writing intent; otherwise, pass the current writing intent as-is. Use the same sentence function tags as the current version and finalize with write.
  4. Record on the pre-correction version using review --aspect 'Polish: term' describing which term was corrected how (the "Polish:" prefix indicates this is a record of term or phrasing correction, not a finger-pointing).
  5. For terms where the dictionary supplement says "consult", do not correct; instead, record as a finger-pointing in review and inform the user.
  6. After corrections, use drift to output sentences where terms for negation, numbers, certainty, or strength have changed compared to the pre-correction version. For such sentences, the change is not a term unification, so revert by writing the pre-correction sentence as-is as a new version with write.
  7. Reverted sentences will still appear as differences against the immediately previous version in the next drift. Compare the pre-correction version with the current state using drift --since <pre-correction version>. If no differences appear, the reversion is successful.

Pass through yomiyasu

After unifying terms, before delivering to the user, polish the body text with yomiyasu. Resolving phrasing hiccups in advance reduces the user's burden of reading and providing feedback.

  1. Prompt to run yomiyasu on the exported text. The user must have yomiyasu installed. (I cannot execute yomiyasu myself.)
  2. Receive the output from the user. yomiyasu outputs the original text, inspection results, and a rewritten version. Read the inspection results and the rewritten version.
  3. For parts where yomiyasu's inspection caught issues and the rewritten version resolves them, if it does not contradict the writing intent or the spirit of the text, adopt the rewritten version. If you adopt, do not apply the correction as a direct string replacement; follow the same procedure as term unification: memo -> write -> review --aspect 'Polish: phrasing'.
  4. For rewrites that contradict the writing intent or the spirit (e.g., yomiyasu changes a term or phrasing that the user intentionally chose, or flattens a rhythm that the writing intent was aiming for), do not adopt. Record the reason for not adopting on the relevant sentence version with review --aspect 'Response: <Reason for not adopting yomiyasu's rewrite>' and inform the user.

Hand over

After passing through yomiyasu, execute check and export one more time. When handing over to the user, present the text along with the following artifacts:

  • A pointer finger or pointer finger icon
  • The requirements document (latest version only)
  • The design document (latest version only)
  • A list of finger-pointings on the latest versions that have not been responded to

Do not force the user to read all of these. When asked "Read with tsuzuri," do not just present the text; read the writing intent and function tags alongside it, or classify sentences by function tags. When asked to summarize records into a shared file (.tsz), compile the record folder into that format using the script.

python3 "<this skill's folder>/scripts/tsuzuri.py" export draft.md.tsuzuri --tsz shared.tsz

You can also compile records from multiple documents into a single .tsz by repeating --record.

python3 "<this skill's folder>/scripts/tsuzuri.py" export draft.md.tsuzuri --tsz shared.tsz --record draft2.md.tsuzuri --record draft3.md.tsuzuri

If the user does not express intent to use a shared file, do not create it automatically.

2. Correct

Correct writing intents and text

When the user requests, or when you yourself detect, a correction to a written sentence or its writing intent, create a new version of the problematic sentence and its writing intent in the record. Do not correct by editing the file directly.

  1. memo --sid to decide the writing intent. For correct writing intent, do not add a new writing intent version; use the latest writing intent (the user was asked to confirm the sentence as it was, so the intent is considered to persist unless it changes).
  2. write to finalize the sentence and tags.
  3. Record the correction in the pre-correction version with review --aspect 'Polish: correction' or review --aspect 'Response: fixed'.
  4. Keep the writing intent version that the previous sentence pointed to. Even if the sentence changed, the purpose of that position in the text does not become invalid.
  5. Continue writing from the next sentence as far as needed. Do not rewrite versions after the correction.

When revising multiple places, execute corrections strictly serially. Each new version must be based on the immediately previous version, because order.json uses the latest version as the current state.

Correct in response to comments

Sentences with comments have unstable purposes. When you receive a user comment, check the following:

  1. Read the comment and understand what it is pointing at.
  2. Check whether the comment points at the sentence's content (e.g., "this fact is wrong"), its position (e.g., "this should be before the previous paragraph"), or its impression (e.g., "this sentence feels pushy").
  3. For a content comment, first check the requirements document. Is there a requirement that this sentence should meet? If the materials lack the fact mentioned in the comment, ask the user to supplement the materials.
  4. For a position comment, check the design document. Does this sentence's paragraph match the design? If the design needs to change, revise the design document first, then move the sentence (merge/split paragraphs).
  5. For an impression comment (e.g., "feels pushy"), the writing intent may be fulfilled but leave a bad impression. Ask the user for the specific intended impression, then adjust the wording while keeping the writing intent.
  6. After handling, record the handling with review --aspect 'Response: <Handling details>' on the commented version.

Revise in response to concrete materials

If materials with facts different from the current text are provided, or if the user provides feedback that includes specific corrections, revise the relevant sentences and their writing intents.

python3 "<this skill's folder>/scripts/tsuzuri.py" memo draft.md.tsuzuri --sid s0001 --text '<What you intend to do to the reader with this corrected sentence>'
python3 "<this skill's folder>/scripts/tsuzuri.py" write draft.md.tsuzuri --sid s0001 --ver v002 --para p1 --text '<Corrected sentence>' --tags '{"relation":"paragraph start","importance":"nuclear","role":["claim"],"technique":[],"place":"8. What you want to say"}' --requirements r001 --deviation '<If the writing intent changed due to new materials, describe the change>'
python3 "<this skill's folder>/scripts/tsuzuri.py" review draft.md.tsuzuri --sid s0001 --ver v001 --aspect 'Response: corrected based on new materials' --text '<Details of correction>'

3. Read others' sentences

Read and evaluate

This feature allows you to read text written by humans or other AI agents and add sentence function tags to it. It enables evaluation without relying on subjective impressions ("good" or "bad") by using tags.

  1. Read the entire text first to understand its overall structure and purpose.
  2. Segment the text into one sentence per line. If a sentence is long enough to span multiple lines, treat it as one sentence.
  3. For each sentence, determine the writing intent based on inference and finalize it with memo. For texts without a known writing intent, the writing intent is always an inference. Record it as an inference (prepend "Inferred: " to the intent). For a sentence where you cannot infer a writing intent, record "Inferred: (uninferable)" and the reason.
  4. Determine the sentence function tags and finalize them with write. The record structure is the same; the sentence ID is assigned with the first init when the record folder is created.
  5. After adding tags to all sentences, generate a report. Summarize patterns per tag (e.g., three out of five sentences are "nuclear") and highlight any unusual patterns.
  6. Present the report to the owner of the original text or to the user who requested the review, not as a judgment but as extracted data.

Assign to requirements and design

For reviewed text, if the requirements or design that the original author had in mind is known, you can also register a requirements document and design document to check coverage. However, you cannot force the original author to correct their text. The assignment is for the reviewer's understanding.

Vocabulary for sentence function tags

Use this vocabulary for role, technique, relation, importance, and place. Each tag must be selected from these words or combinations. For place, use the number and name from the requirements document headings (e.g., 8. What you want to say).

role

The role of the sentence in achieving the writing intent. Select one or more as an array. For explanatory text, the first role should be the most dominant function. If three or more roles are assigned, write warns.

  • claim: States the section's claim. Usually a paragraph's core sentence.
  • reason: States the reason for the claim.
  • evidence: States evidence (data, cases, citations) for the claim.
  • example: Provides a concrete example.
  • definition: Defines a term.
  • condition: States the premise or condition of the claim.
  • exception: States an exception or limitation to the claim.
  • comparison: Compares with something else.
  • transition: Connects to the previous or following paragraph.
  • summary: Summarizes what was stated.
  • supplement: Provides supplementary information.
  • reference: Points to an external source.

In the revision version, you can also use retraction (retracting a previous statement) or response (responding to a comment).

technique

Rhetorical techniques used in the sentence. Select zero or more as an array. If the genre of the text differs from the technique (e.g., assigning a novel technique to a sentence with an explanatory role), write warns.

  • metaphor: Use of metaphor or analogy.
  • question: Use of a question form.
  • contrast: Clear contrast.
  • repetition: Repetition of key phrases.
  • emphasis: Emphasis (bold, exclamation etc.).
  • enum: Explicit enumeration (e.g., first, second).
  • paraphrase: Same content restated in different words.
  • sandwich: Placing important information before and after in a sandwich structure.

relation

The connection type with the immediately previous sentence.

  • paragraph start: The first sentence of a paragraph. No relation to the previous sentence.
  • also: Adding a sentence that is parallel to the previous one.
  • contrast: Showing a contrasting aspect to the previous sentence.
  • reason: Stating the reason for the previous sentence's content.
  • result: Stating a result or consequence of the previous sentence.
  • detail: Adding more detail to the previous sentence's content.
  • rephrase: Rephrasing the previous sentence's content.
  • example: Providing a concrete example of the previous sentence's content.
  • supplement: Adding supplementary information to the previous sentence.
  • digression: Branches from the main flow.

importance

How important this sentence is for the text as a whole.

  • nuclear: The core of understanding. Removing it would break the chain of understanding.
  • satellite: Non-essential. Removing it reduces understanding or persuasiveness, but the core meaning remains.
  • footnote: Footnote or explanatory note that is outside the main flow.

place

Which requirement from the requirements document this sentence serves. Write the heading number and name (e.g., 8. What you want to say).

Checking writing intent quality

Question at the requirements document stage: Who arrives?

At the requirements document stage, the target is not the text but the reader. Ask "Who is the reader, and what state do I want them to be in after reading?" For each item, ask "What does the reader gain by reading this item?" If you cannot answer, the item is likely written from the writer's perspective.

Question at the writing intent stage: What does the reader gain?

When you have decided a writing intent, ask "If this writing intent is fulfilled, what state is the reader in?" If you can only answer "The reader knows XX," rethink until you can state what the reader becomes able to do or how they change.

When you cannot answer

  • Writing intent copied from the requirements document: The requirements document item wording is not the intent; describe what the reader gains by placing a sentence that corresponds to it.
  • Writing intent is output (write XX in 50 characters): A writing intent must be input (change the reader's state).
  • Writing intent is too abstract: Rely on "Who arrives?" and "What can the reader do?"

Checking reader burden

Satellite density

If a paragraph contains many satellite sentences, the reader loses sight of the core. Use load's "Necessity of satellites" per sentence.

Long sentences

Sentences longer than 150 characters (including punctuation) increase burden. Use load's "Long sentences" candidates.

Multiple commas

Sentences with more than 3 commas may be trying to include too much. Use load's "High comma count" candidates.

Repeated phrases

Check load's "Same thing twice" candidates for sentences that say the same thing as the previous sentence or a nearby sentence.

Appendices

yomiyasu usage (for reference)

yomiyasu reads a Markdown or plain text file and checks it for specific wording patterns (e.g., potential verbs, excessive passives, overly literal translations). It outputs a rewritten version.

The user must have yomiyasu installed. The skill cannot run yomiyasu. The user's workflow is:

yomiyasu path/to/text.md

yomiyasu's output usually includes:

  1. Original text (reproduced)
  2. Inspection results (list of caught items)
  3. Rewritten version (applied corrections)

The skill reads the inspection results and rewritten version, and adopts or does not adopt them.

Configuration file paths

FilePath
User's personal template~/.config/tsuzuri/templates/<name>.md
User's personal proofreading dictionary~/.config/tsuzuri/words.tsv
Bundled templates<skill folder>/references/templates/
Bundled proofreading dictionary<skill folder>/references/words.tsv
App server<skill folder>/app/server.py
Viewing app library~/.config/tsuzuri/records.json

The ~/.config/tsuzuri/ folder is automatically created on first init.

Shared file format (.tsz)

The .tsz file is a zip archive containing the record folder contents. The extension is .tsz but the format is zip. The archive contains the same directory structure as the record folder, allowing sharing with others. It can be extracted with standard unzip tools.

Paragraph management with order.json

order.json manages the order of sentences, paragraph positions, and the current reading version. Do not edit it directly.

Error cases for write

  • --sid that does not exist in the record: error
  • --ver that is not newer than the latest version: error
  • --para pointing to a paragraph that does not exist in the design document: error (when a design document exists)
  • Technique that does not match the genre of the sentence's role: warning (not an error; user can override)
  • Three or more roles: warning (user can override)

Error cases for drift

  • --since pointing to a non-existent version: error
  • No drift: exit code 0 with empty output

Error cases for check

  • Orphaned sentence (sentence that is not referenced from the beginning of any paragraph in order.json): error
  • Label/footnote mismatch: error
  • Block interrupted by a sentence: error

Error cases for export

  • Block contains non-finalized sentences: stop
  • Label/footnote mismatch: stop
  • --flavor with unsupported value: error

Related Skills