asciidoc-pubkit 1.3.0 → 1.4.0

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 76657216ce0978c381ceed09efd606ad78449339d0fe5953ce08e6e8ba05c815
4
- data.tar.gz: de0607fd98535903b60eb9c2c18231bd9980281ebd0e57c4ee54d02efe45d6ea
3
+ metadata.gz: 386d3aa0d4d50c3413fdbc1d647af5957d0529e7c1e484e18910f2fa2b9eb64f
4
+ data.tar.gz: a241475ff78f45aaecfe9f357a038fc0b38a088e7e1b2a081854c8d881eb610a
5
5
  SHA512:
6
- metadata.gz: f16857753f4fbf879325bf1b44c8672d7aabf940b3b1e50a1e92b5888b9df23834a52090c833d6df7b02886e60458c33847a182dbc18e4bdeaec659afe6484d1
7
- data.tar.gz: 898fc0880b37e800a63cf921d522d8c56b98eccf710263a5e350677bc1b798b547f1f029d94c79c977f7fca73bf4810b09dd810bfcff389314ea60392858047e
6
+ metadata.gz: 39c17658ac33cd69084270a3b9c2091241542061658295c4b47acbd55bf8a69888cf6c21cbea06fe81a8e14f9480521aabce7f48fc77e9a3cb04c78e03dee840
7
+ data.tar.gz: aee406c8c0c1947f5c832a0861f617457f70b5ef3774720d05487cbbea8780894f419b2b758e30a356ead5aa6fcda86878ba56e655b96d19de9a69560c392cc9
data/CHANGELOG.md CHANGED
@@ -1,6 +1,60 @@
1
1
  # Changelog
2
2
 
3
- ## Unreleased
3
+ ## 1.4.0 - 2026-10-22
4
+
5
+ - Add document-based `image list`, `image stats` and `image width`. Resolve active
6
+ AsciiDoc includes, attributes, conditionals and per-image `imagesdir`; collect
7
+ referenced local block images and deduplicate physical files. Exclude artwork
8
+ by default with configurable selection. Report dimensions, aspect ratios,
9
+ file sizes and source references; summarize unique image statistics.
10
+ - Calculate `scaledwidth` from a configurable height/width coefficient and width
11
+ bounds. Preview by default, support JSON and unified diffs, and require explicit
12
+ `--in-place` to update source macros. Preserve image pixels and unrelated source
13
+ text, reject ambiguous reused references, stage multi-file edits and roll back
14
+ failed replacements. Replace the unreleased `epub image-width` prototype.
15
+ - Require ImageMagick 7 or 6 for image inspection; no Python dependency remains.
16
+ Image-file processing planned for v1.4.1 is tracked in
17
+ [issue #1](https://github.com/cybergarage/asciidoc-pubkit/issues/1).
18
+
19
+ - Add Japanese and English JSON example/prose comparisons for keys, schema
20
+ keywords, fixed values, explanatory strings and request/result references.
21
+ Follow each project's notation and edit scope; no universal emphasis policy,
22
+ detector, automatic inventory command, replacement or scoring change. New
23
+ sessions save the guidance; existing sessions retain their recorded criteria.
24
+ Prompt-delivery tests do not measure AI editing or translation quality.
25
+
26
+ - Clarify Japanese `示す` comparisons by explanatory role, with direct
27
+ method/outcome explanations, retained artifact/state examples and explicit
28
+ continuation targets. Deliver the guidance through writing and saved review
29
+ prompts without changing detectors, replacements, scores or old sessions.
30
+ Prompt-delivery regressions do not measure AI editing quality.
31
+
32
+ - Extend Japanese actor comparisons to explicit but vague role names, separating
33
+ system, internal recipient, execution environment and communication peer from
34
+ verb accuracy. Add ten calibration pairs, qualify the retained-return example,
35
+ and test writing/saved-review delivery without changing historical sessions.
36
+ No detector, replacement or scoring changes; AI editing quality is unmeasured.
37
+
38
+ - Add contextual Japanese retention/inclusion/storage/assignment and
39
+ representation/state-indication comparisons, including valid retained wording
40
+ and evidence-strength limits. Add manual comparison fixtures and saved-prompt
41
+ delivery regressions. No new detector rules, automatic replacements, scoring
42
+ changes or AI proofreading-quality claims.
43
+
44
+ ## 1.3.1 - 2026-10-17
45
+
46
+ - Add Japanese-only selected-text before/after inventories and advisory lexical
47
+ negation, condition, certainty, capability and actor/topic change candidates
48
+ to verification. Save source/session/implementation fingerprints and compare
49
+ a successful saved report using `review verify --checked-report FILE`.
50
+ Stale records fail verification; lexical candidates do not. Preserve English
51
+ output, score formulas, baselines and `meaning_verified: false`.
52
+ - Add Japanese revision-comparison and explanation/procedure/warning guidance,
53
+ plus final-report comparison instructions for Japanese revision prompts.
54
+ Regression tests check implementation and prompt delivery; no AI editing
55
+ quality improvement or independent semantic validation is claimed.
56
+ - Sessions require their exact creating tool version. Preserve ongoing 1.3.0
57
+ baselines with 1.3.0 and create separate sessions for 1.3.1.
4
58
 
5
59
  ## 1.3.0 - 2026-10-17
6
60
 
data/README.md CHANGED
@@ -16,8 +16,9 @@ and books on health, exercise, and sports science published under
16
16
  The experience informs the toolkit's writing criteria, contextual review prompts,
17
17
  and checks for preserving manuscript content during revision.
18
18
 
19
- Version 1.3.0 provides document inspection, explicit prose-only mechanical
20
- replacements, and Japanese and English manuscript review. Inspect a book's outline,
19
+ Version 1.4.0 provides document-based image inspection and display sizing,
20
+ document inspection, explicit prose-only mechanical replacements, and Japanese
21
+ and English manuscript review. Inspect a book's outline,
21
22
  metadata, and local cross-references; preview and apply your replacement rules;
22
23
  then review and verify edits against a saved baseline.
23
24
 
@@ -30,6 +31,17 @@ Version 1.2.3 also compares `渡す` and `受け渡し` by their actual
30
31
  operation; see [input, transmission, and handoff](docs/writing.md#input-transmission-and-handoff-v123).
31
32
  These comparisons and skill routing do not automatically replace manuscript text.
32
33
 
34
+ Version 1.4.0 also compares explicit but vague actor names by their actual
35
+ responsibility; see [actor wording](docs/writing.md). This guidance adds no
36
+ detector or automatic replacement rules.
37
+
38
+ Version 1.4.0 adds document-based `image list`, `image stats`
39
+ and `image width`. Collect images referenced by `book.adoc`, summarize their
40
+ pixel dimensions and file sizes, or explicitly update source `scaledwidth`
41
+ attributes from aspect ratios. Image pixels are unchanged. See
42
+ [image commands](docs/image-commands.md) for selection, tuning, ImageMagick
43
+ requirements, preservation rules and Make integration.
44
+
33
45
  The CLI, diagnostics, documentation, and generated instructions are in English.
34
46
  Japanese manuscript excerpts and rule terms retain their original text.
35
47
 
@@ -49,12 +61,24 @@ for `わけではありません`; see [direct negation](docs/writing.md#direct-
49
61
  Existing sessions retain their saved rules and criteria. No automatic rewriting
50
62
  is added.
51
63
 
64
+ Version 1.4.0 also adds contextual Japanese comparisons for
65
+ retention, input inclusion, representation and state indication; see
66
+ [retention and representation wording](docs/writing.md#retention-and-representation-wording-v140).
67
+ These criteria do not add automatic replacements or change scoring.
68
+ Version 1.4.0 also compares `示す` by explanatory role; see
69
+ [explanation, presentation and state indication](docs/writing.md#explanation-presentation-and-state-indication-v140).
70
+
71
+ Version 1.4.0 Japanese and English criteria also compare JSON examples with their
72
+ prose explanations while preserving each project's notation and edit scope;
73
+ see [JSON identifiers and explanatory strings](docs/writing.md#json-identifiers-and-explanatory-strings-v140).
74
+
52
75
  ## Available features
53
76
 
54
- The following commands are available in version 1.3.0.
77
+ The following commands are available in version 1.4.0.
55
78
 
56
79
  | Feature | Commands | Behavior |
57
80
  | --- | --- | --- |
81
+ | [Document images](docs/image-commands.md) | `image list`, `image stats`, `image width` | Inspect referenced block images; preview or explicitly apply source display widths |
58
82
  | [Document outline](docs/document-commands.md#document-commands) | `document toc` | Print parsed section titles as text or JSON, including source locations, with optional depth and outline numbering |
59
83
  | [Book metadata](docs/document-commands.md#document-commands) | `document info` | Extract book attributes as text or JSON |
60
84
  | [Cross-reference checks](docs/document-commands.md#document-commands) | `document check-xrefs` | Report unresolved local cross-references with source locations |
@@ -70,6 +94,12 @@ The following commands are available in version 1.3.0.
70
94
  | [Writing criteria and prompts](docs/writing.md#writing-commands) | `writing criteria`, `writing prompt` | Print Japanese prose criteria or generate a writing prompt without a manuscript or MeCab |
71
95
  | [Skill registration](docs/skill-commands.md) | `skill list`, `skill install`, `skill status`, `skill upgrade` | Register bundled skills for Codex or Claude and inspect or upgrade managed copies while protecting local changes |
72
96
 
97
+ Version 1.3.1: Japanese verification also shows selected text before/after edits
98
+ and advisory lexical change candidates. Save a report with `--output`, inspect
99
+ the changes, then use `--checked-report FILE` to detect subsequent source,
100
+ session or implementation changes. English behavior and scoring are unchanged.
101
+ See [Japanese verification records](docs/review-workflow.md#japanese-change-review-and-final-source-records-131).
102
+
73
103
  The 1.2.0 [sentence-ending guidance](docs/writing.md#writing-commands)
74
104
  adds contextual revision and keep examples, preserving capabilities, uncertainty,
75
105
  comparison strength, and body sentences separately from heading form. It adds
@@ -215,7 +245,7 @@ asciidoc-pubkit writing prompt --lang ja --output writing-prompt.md
215
245
 
216
246
  Existing review sessions require the exact tool version that created them.
217
247
  Before upgrading, finish ongoing reviews with that version or preserve their
218
- baselines and start a new review in a separate directory with v1.3.0. A new
248
+ baselines and start a new review in a separate directory with v1.3.1. A new
219
249
  scan cannot verify preservation relative to an earlier baseline.
220
250
 
221
251
  ## Documentation
@@ -43,6 +43,39 @@ Words such as contract, boundary and robust can have specific technical meanings
43
43
  Do not infer AI authorship from vocabulary. A phrase candidate is an invitation
44
44
  to inspect, not a replacement instruction or a proven defect.
45
45
 
46
+ ## Preserve JSON identifiers and explanatory strings
47
+
48
+ When prose explains a JSON example, distinguish keys, JSON Schema keywords,
49
+ fixed protocol values, tool names and example IDs from natural-language strings.
50
+ For example, in `{"name":"fetch_record","description":"Read a record"}`,
51
+ `name` and `description` are keys, `fetch_record` is the example tool name, and
52
+ `Read a record` describes its purpose. A string's JSON type alone does not make
53
+ it translatable or immutable. Resolve that role from the example and its use.
54
+
55
+ Keep each technical literal's spelling, case and separators, including compound
56
+ references such as `function.parameters` and JSON-RPC method names. Distinguish
57
+ `type` as a JSON key from a language keyword or ordinary prose, and distinguish
58
+ a schema keyword from a user-defined property with the same spelling. Record
59
+ the owning API, specification, implementation or example; do not assign another
60
+ project's identifiers to the book's implementation.
61
+
62
+ Compare the example with adjacent explanations and authorized tables/lists:
63
+ which field contains which value, whether an argument is required, where it is
64
+ nested, whether it is a JSON string or object, and how request/result IDs match.
65
+ Include later unmarked mentions. An occurrence inventory can help locate uses;
66
+ it must not infer roles by spelling alone, insert unused example fields into
67
+ prose, or turn every string into a fixed term. Record corrections, retained
68
+ uses and unresolved referents within the assignment's existing review evidence.
69
+
70
+ Follow the project's inline notation; no universal bold or monospace policy is
71
+ implied. Do not insert prose markup inside JSON/code blocks or change protected
72
+ blocks during prose review. Where an assigned translation explicitly permits
73
+ localizing explanatory strings, keep keys, technical values, structure and prose
74
+ references aligned; otherwise preserve the block and report the proposed change.
75
+ Keep parsing/block-preservation checks separate from meaning and translation
76
+ review. These comparisons add no detector or automatic replacement rule and do
77
+ not expand the session's editable scope.
78
+
46
79
  ## Honor the book's conventions
47
80
 
48
81
  Preserve spelling variants unless the book specifies a locale. Follow its voice,
@@ -10,6 +10,9 @@
10
10
  - Distinguish stopping, cancellation requests, and non-execution
11
11
  - Distinguish decisions by the actual operation
12
12
  - Distinguish rules, definitions, and configured values
13
+ - Distinguish retention from inclusion, storage, and assignment
14
+ - Distinguish representation from evidence and state indication
15
+ - Distinguish explanation, presentation, and state indication
13
16
  - Distinguish receiving, returning, and their actual operations
14
17
  - Distinguish communication responses from function returns
15
18
  - Distinguish arrival wording by the actual operation
@@ -26,12 +29,39 @@
26
29
  - Keep source uncertainty separate from editorial questions
27
30
  - Remove generated-prose patterns without flattening the meaning
28
31
  - Preserve exact technical terminology
32
+ - Preserve JSON identifiers and explanatory strings
29
33
  - Revise the complete paragraph
34
+ - Compare revisions before delivery and respect passage roles
30
35
  - Headings and the relation to figures and code
31
36
 
32
37
  Apply these criteria in context. They identify patterns that deserve inspection,
33
38
  not words that must always be removed.
34
39
 
40
+ ## Compare revisions before delivery and respect passage roles
41
+
42
+ For each proposed revision, compare the topic and claim, affirmation and negation,
43
+ actor and recipient, scope and conditions, certainty and capability, and quantities,
44
+ names and timing with the original and supported context. Include relative weight,
45
+ units, per-item versus aggregate limits, and completed versus planned actions.
46
+ If a comparison fails, reject that alternative; consider a faithful alternative
47
+ or retain the original with a passage-specific reason. Deletion must retain any
48
+ unique claim or condition elsewhere in the authorized scope. Evidence-backed
49
+ factual corrections require separate author authorization and an explicit source;
50
+ do not silently treat them as stylistic revisions.
51
+
52
+ Identify each passage's role from its content. Explanations describe actual
53
+ behavior; procedures may repeat imperative endings and numbered steps; warnings
54
+ retain prohibition and requirement strength. Do not remove necessary repetition,
55
+ merge distinct steps, or soften warnings merely to vary style. Document genre
56
+ alone does not establish the actor, authority, or required sentence ending.
57
+
58
+ Inspect all edited passages against the original, including edits with no
59
+ detector candidates. Lexical counts can stay unchanged despite a reversed
60
+ condition, exchanged actors, or an invented fact. Keep automatic preservation,
61
+ execution of the final checks, and editorial judgments separate. If supporting
62
+ material suggests a missing fact, report the proposed addition with its exact
63
+ source and scope; do not insert it as part of an unrequested prose correction.
64
+
35
65
  ## Start with the paragraph's technical purpose
36
66
 
37
67
  Before rewriting sentences, summarize each paragraph in one sentence:
@@ -84,6 +114,37 @@ conditions, partial negation, capability, and the difference between a request
84
114
  and its completion. Record the original, faithful alternative, and specific reason
85
115
  for revising or retaining each assigned passage, even without detector candidates.
86
116
 
117
+ ### Compare explicit actor names with the actual responsibility
118
+
119
+ A written subject can still hide its owner or role. Compare terms such as
120
+ `実行側` and `処理側` with the evidenced system, internal component, execution
121
+ environment, or communication peer. Establish the level of responsibility from
122
+ the full paragraph and implementation evidence before choosing a name. A system
123
+ name can suit behavior shared across its components; a component name can suit
124
+ an internal handoff. Neither is universally more precise.
125
+
126
+ | Passage and supported context | Comparison |
127
+ | --- | --- |
128
+ | The agent validates tool requests: `実行側は対象への操作が許可されるかを判定します。` | Compare `エージェントは対象への操作が許可されるかを判定します。`; preserve the target and permission owner. |
129
+ | A request is delegated inside the agent: `エージェントは要求を実行側へ引き渡します。` | Compare `エージェントは要求をツール実行処理へ引き渡します。` when that internal recipient is established; replacing the recipient with the same agent obscures the handoff. |
130
+ | The benchmark's environment executes commands: `実行側がコマンドを実行します。` | Compare `環境側の実行処理がコマンドを実行します。`; do not assign environment execution to the evaluated model or agent without evidence. |
131
+ | A request recipient sends a response: `実行側が結果を応答として送信します。` | Compare `要求を受信した相手が結果を応答として送信します。`; do not narrow the peer to a server if either endpoint can receive requests. |
132
+ | A preceding definition names one component `実行側` | Compare repeating the component's name, and retain the defined role when it identifies the same responsibility clearly and no author terminology preference requires a change. |
133
+
134
+ Do not replace every occurrence with `エージェント`, a product name, or
135
+ `実行処理`. Name only roles established by the assigned passage; keep formal
136
+ identifiers, book-specific terms, and other systems' ownership. Compare actor
137
+ specificity separately from whether a verb such as `戻します` describes the
138
+ correct operation. A valid verb does not settle an ambiguous actor, and a clear
139
+ actor does not settle an imprecise verb.
140
+
141
+ Compare the complete revised sentence and its neighbors after changing a name.
142
+ Check subject-predicate and particle relationships, modifier targets, repeated
143
+ words and unintended self-handoffs. In particular, naming the component applying
144
+ a configured rule must not also make it the component that configured the rule.
145
+ Retain conditions, capability, permission ownership and processing order. Record
146
+ the actual alternative and reason; missing actor evidence remains unresolved.
147
+
87
148
  ## Identify human actors by their supported roles
88
149
 
89
150
  Treat `人` as a cue to identify the actor, not as a forbidden word or a
@@ -277,6 +338,97 @@ no detector candidate is emitted. Synchronize related authorized tables, figures
277
338
  and alternative text separately from protected review scopes. Existing sessions
278
339
  retain their saved criteria; these comparisons add no detector or replacement rule.
279
340
 
341
+ ## Distinguish retention from inclusion, storage, and assignment
342
+
343
+ Compare `保持する` with the operation actually described. Identify the owner,
344
+ container, lifetime and processing stage. Input construction, storing a newly
345
+ obtained value, assigning an attribute, and keeping existing state are different
346
+ operations; do not replace them with one universal verb.
347
+
348
+ | Context | Faithful comparison when supported |
349
+ | --- | --- |
350
+ | Input construction | `成否の情報も入力へ保持します` → `成否の情報も入力に含めます`; supplying input does not establish storage across calls. |
351
+ | Contents of a summary | `すべての情報を要約に保持する必要はありません` → `すべての情報を要約に含める必要はありません`; preserve the necessity and negation. |
352
+ | Putting a retrieved value in a container | `取得した名前を結果用の変数に保持します` → `取得した名前を結果用の変数に格納します` when the insertion is the subject. |
353
+ | Assigning an identifier | `結果へ識別子を付与します` describes assignment; retaining an existing identifier is a different operation. |
354
+ | Adding information to a record | Compare `ノートに時刻を記録します` or `検索結果に出典を添えます` when recording or attachment is established. |
355
+ | Keeping original data or state | Retain `元の応答を保持し、次の呼び出しへ引き継ぎます` and `ロックを終了まで保持します`; inclusion or insertion alone loses continuity or ownership. |
356
+
357
+ Compare complete sentences, including retained uses. `入力に含めます` does not
358
+ mean `モデルへ送信します`; `格納します` does not establish file persistence.
359
+ A type declaring fields does not itself execute storage or assignment. Use
360
+ `付与` for an established attribute or identifier assignment, not as a blanket
361
+ replacement for input inclusion. Keep original values, duration, negation,
362
+ conditions, ownership and capability; do not add persistence, delete history,
363
+ or shorten the lifetime of a lock or snapshot. Keeping source facts does not
364
+ require keeping the word `保持`; record the actual alternative and reason.
365
+
366
+ ## Distinguish representation from evidence and state indication
367
+
368
+ For `表す` and its inflections, identify whether the passage describes a
369
+ representation (notation, format, role or data model), contents, or a result
370
+ indicating a fact or state. Compare `示す` for the latter, honoring the author's
371
+ terminology preference without treating all uses of `表す` as unnatural.
372
+
373
+ | Context | Faithful comparison when supported |
374
+ | --- | --- |
375
+ | A result indicating failure | `失敗を表す結果` → `失敗を示す結果`; do not turn failure into an unknown outcome or vice versa. |
376
+ | Status information | `成否を表す情報` → `成否を示す情報` when information indicates success or failure. |
377
+ | What a record establishes | `要求の記録は、操作を要求したことを表します` → `要求の記録は、操作を要求したことを示します`; a request record alone does not establish execution. |
378
+ | Contents of a result | Compare `結果に含まれる情報` with `結果が表す情報` when describing included data rather than its interpretation. |
379
+ | Symbolic or structural representation | Retain `工程をノードで表します`, `引数をJSONで表します` and `利用者をUと表します`; `示す` is not required for notation or encoding. |
380
+
381
+ `裏付ける` may make a stronger evidence claim than `示す`. Use it only when the
382
+ source establishes that evidential role; do not upgrade a reported state into
383
+ proof, a correlation into causation, or request acceptance into successful work.
384
+ Preserve uncertainty, negation, conditions, actors and capability. Review the
385
+ whole paragraph and related authorized tables, figures and alternative text;
386
+ record each original, alternative and reason. These comparisons add no detector
387
+ or automatic replacement rule, do not change scoring or mechanical verification,
388
+ and do not measure AI proofreading quality. Existing sessions keep their saved
389
+ criteria; use a separate new session for updated guidance.
390
+
391
+ ## Distinguish explanation, presentation, and state indication
392
+
393
+ For `示す` and its inflections, identify the sentence's role before choosing
394
+ its predicate. A content guide, a technical explanation, a displayed output,
395
+ a figure or example being presented, and a value indicating a state are different
396
+ uses. Read the complete paragraph and the referenced content when available;
397
+ these comparisons do not prescribe a blanket change to `説明します`.
398
+
399
+ | Role and wording to inspect | Faithful comparison when supported |
400
+ | --- | --- |
401
+ | Announcing explanatory content: `反復を継続・終了する条件を示します。` | Compare `反復を継続・終了する条件を説明します。` when the section explains those conditions; keep both continuation and termination. |
402
+ | Repeating one explanatory action: `保存方法を説明し、再開する条件を示します。` | Compare `保存方法と再開する条件を説明します。` when both are explanatory subjects. Preserve a meaningful order, separate artifact or distinct presentation purpose instead of merging merely to vary endings. |
403
+ | Naming an unspecified aid: `判断材料を示します。` | Name what is being selected or checked and which information supports that judgment. Use only criteria evidenced in the paragraph; do not invent a fixed decision rule. |
404
+ | Describing a screen: `画面には、使用を停止する範囲を示します。` | Compare `画面には、使用を停止する範囲を表示します。` when screen output is the operation. Do not assign display to a service that only returns data. |
405
+ | Describing a definition: `ツール定義は、引数の入力条件を示します。` | Compare `ツール定義には、引数の入力条件を記述します。` for authoring a definition, or `記述されています` for its existing contents. Preserve the distinction between writing a definition and enforcing it. |
406
+ | Recording scope: `計測した区間を示します。` | Compare `計測した区間を記録します。` when the passage specifies what to record; keep the measured interval and clock conditions. |
407
+ | Presenting an actual artifact: `次の表に、検査対象と確認内容を示します。` or `設定ファイルの例を示します。` | Retain these when the table or following example actually presents that content. `説明します` would shift from presenting the artifact to describing it. |
408
+ | Indicating a state: `結果は、返答を記録したことを示します。` | Retain the indication when that is the result's meaning. Compare contents wording such as `結果に記録の成否が含まれます` only when included data is the subject; recorded acceptance does not establish successful execution. |
409
+ | Leaving the indicated target implicit: `結果が継続を示します。` | Compare `一回分の処理結果が、次の回へ進むことを示します。` when that is the continuation being described. Keeping `示します` can be the clearest revision. |
410
+
411
+ In the middle or at the end of a technical explanation, compare stating the
412
+ relationship directly instead of promising another explanation. For example,
413
+ `プロセス内の順序制御で防ぐ競合と、外部からの変更に備えて検査する競合を示します。`
414
+ can become `プロセス内の競合は、操作の順序を制御して防ぎます。外部からの変更による競合には、検査で確認する状態と検査のタイミングを明確にして備えます。`
415
+ when the surrounding paragraph establishes both methods. Preserve the scope of
416
+ the controlled operations; neither ordering nor checking guarantees prevention
417
+ of every external change. If the original also names the inspected state and
418
+ timing, retain them in the revised paragraph.
419
+
420
+ Compare the full paragraph before replacing the verb. Resolve vague subjects,
421
+ comparison axes, repeated guidance and the relationship between methods and
422
+ outcomes; exchanging `示します` for `説明します` alone may leave those problems
423
+ unchanged. Keep valid figure/table introductions and state indications after a
424
+ specific comparison, not because all occurrences must share one ending. Check
425
+ related authorized tables, figures and alternative text without inventing
426
+ actors, processing, evidence, guarantees or successful checks.
427
+
428
+ These criteria add no detector, automatic replacement or scoring change.
429
+ Existing sessions retain their saved criteria; mechanical verification remains
430
+ separate from meaning review and does not measure AI proofreading quality.
431
+
280
432
  ## Give weak predicates a concrete action or consequence
281
433
 
282
434
  Predicates such as `利用します`, `決めます`, `示します`, `扱います`, `整理します`,
@@ -621,8 +773,10 @@ outcome is not an established failure.
621
773
  `利用者は候補Aと候補Bから選択できます` retains that choice while using technical
622
774
  selection wording. Compare this faithful alternative before keeping the plain verb.
623
775
  `利用者は候補Aと候補Bから選びます` would instead assert that selection occurs. Retain
624
- `実行側はツール結果をモデルへ戻します` when it describes the transfer;
625
- `実行結果のフィードバック` would lose the sentence's actor and predicate.
776
+ the verb `戻します` in `実行側はツール結果をモデルへ戻します` when it
777
+ accurately describes the transfer; assess `実行側` separately using the actor
778
+ criteria above. `実行結果のフィードバック` would lose the sentence's actor
779
+ and predicate.
626
780
 
627
781
  Do not mechanically convert `別です` to `とは限りません`. For example,
628
782
  `AはJSONを、BはCSVを受け付けます。両者の入力形式は別です` establishes a
@@ -1049,6 +1203,39 @@ and implementation requirements. Do not add an actor, cause, mechanism, or
1049
1203
  effect that the source evidence does not establish. Making prose more specific
1050
1204
  requires evidence, not a guess.
1051
1205
 
1206
+ ## Preserve JSON identifiers and explanatory strings
1207
+
1208
+ When prose explains a JSON example, distinguish keys, JSON Schema keywords,
1209
+ fixed protocol values, tool names and example IDs from natural-language strings.
1210
+ For example, in `{"name":"fetch_record","description":"Read a record"}`,
1211
+ `name` and `description` are keys, `fetch_record` is the example tool name, and
1212
+ `Read a record` describes its purpose. A string's JSON type alone does not make
1213
+ it translatable or immutable. Resolve that role from the example and its use.
1214
+
1215
+ Keep each technical literal's spelling, case and separators, including compound
1216
+ references such as `function.parameters` and JSON-RPC method names. Distinguish
1217
+ `type` as a JSON key from a language keyword or ordinary prose, and distinguish
1218
+ a schema keyword from a user-defined property with the same spelling. Record
1219
+ the owning API, specification, implementation or example; do not assign another
1220
+ project's identifiers to the book's implementation.
1221
+
1222
+ Compare the example with adjacent explanations and authorized tables/lists:
1223
+ which field contains which value, whether an argument is required, where it is
1224
+ nested, whether it is a JSON string or object, and how request/result IDs match.
1225
+ Include later unmarked mentions. An occurrence inventory can help locate uses;
1226
+ it must not infer roles by spelling alone, insert unused example fields into
1227
+ prose, or turn every string into a fixed term. Record corrections, retained
1228
+ uses and unresolved referents within the assignment's existing review evidence.
1229
+
1230
+ Follow the project's inline notation; no universal bold or monospace policy is
1231
+ implied. Do not insert prose markup inside JSON/code blocks or change protected
1232
+ blocks during prose review. Where an assigned translation explicitly permits
1233
+ localizing explanatory strings, keep keys, technical values, structure and prose
1234
+ references aligned; otherwise preserve the block and report the proposed change.
1235
+ Keep parsing/block-preservation checks separate from meaning and translation
1236
+ review. These comparisons add no detector or automatic replacement rule and do
1237
+ not expand the session's editable scope.
1238
+
1052
1239
  ## Revise the complete paragraph
1053
1240
 
1054
1241
  Use a finding to understand the intended claim, then rewrite the paragraph so
@@ -0,0 +1,165 @@
1
+ # Document-based image commands (v1.4.0)
2
+
3
+ All commands take an AsciiDoc entry document, such as `book.adoc`. They do not
4
+ accept a standalone image file or scan an arbitrary directory. They require Ruby
5
+ 3.2 or later and ImageMagick 7 (`magick identify`) or 6 (`identify`) on PATH.
6
+ No Python, MeCab, AI, network fetch, or pixel modification is involved.
7
+
8
+ ```sh
9
+ asciidoc-pubkit image list book.adoc
10
+ asciidoc-pubkit image list book.adoc --json
11
+ asciidoc-pubkit image stats book.adoc --json
12
+ asciidoc-pubkit image width book.adoc
13
+ asciidoc-pubkit image width book.adoc --diff
14
+ asciidoc-pubkit image width book.adoc --in-place
15
+ ```
16
+
17
+ ## Discovery and selection
18
+
19
+ Asciidoctor resolves active includes, attributes, conditional directives, and the
20
+ `imagesdir` value at each block image. Paths are relative to the document's base
21
+ directory, as in Asciidoctor, rather than each included file. Only parsed block
22
+ `image::` macros are collected. Inline `image:` macros, image text inside code or
23
+ comments, cover attributes without a block reference, and unreferenced files are
24
+ outside the v1.4.0 collection scope. An AsciiDoc table's separate inner documents
25
+ are not traversed in this version.
26
+
27
+ The default boundary is the entry document's directory. `--base-dir DIR` changes
28
+ both the parsing base and the permitted source/image boundary. Includes and
29
+ images outside it, including symlink escapes, are rejected. Direct symlink source
30
+ files are rejected. Image symlinks within the boundary are resolved and deduplicated.
31
+ Remote image references are reported as excluded without fetching; remote
32
+ includes and `allow-uri-read` are rejected. Missing or unsupported selected
33
+ images fail the command with exit 2 before source writes.
34
+
35
+ By default, block images whose basenames match `cover*`, `chapter-*`, `part-*`,
36
+ or `profile*`, and block references to `front-cover-image`, `back-cover-image`,
37
+ or `title-logo-image` assets, are excluded. `--include-artwork` disables these
38
+ built-in artwork exclusions; it does not collect assets that only appear in
39
+ attributes. Use `--exclude` for artwork with other names. Patterns match an image
40
+ basename or its path relative to the base directory. Repeat the flag for multiple
41
+ patterns. `--only FILE` selects references from one included source; it does not
42
+ mean one image, and the file must be part of the parsed document.
43
+
44
+ ```sh
45
+ asciidoc-pubkit image list book.adoc --exclude 'special-*.png' --json
46
+ asciidoc-pubkit image width book.adoc --only chapters/intro.adoc --diff
47
+ asciidoc-pubkit image list book.adoc -a edition-en -a diagrams=1
48
+ ```
49
+
50
+ ## List and stats
51
+
52
+ `image list` reports each selected physical image once, in first-reference order:
53
+ absolute path, pixel width/height, full-precision width/height ratio, byte size,
54
+ and every reference's source file, line, target and current `scaledwidth`.
55
+ Text output rounds aspect ratios for display; JSON preserves the calculation
56
+ value. Source editability and exclusions are included in JSON.
57
+
58
+ `image stats` counts physical images and references separately. It reports the
59
+ sum of unique image bytes and minimum, maximum and arithmetic mean of width,
60
+ height, aspect ratio and bytes. Repeated references are not counted twice in
61
+ image statistics. With no selected images, totals are zero and min/max/mean are
62
+ null. Both commands are read-only; redirect stdout to save their reports.
63
+
64
+ ## Width calculation and source edits
65
+
66
+ ```text
67
+ raw width (%) = 100 × height-width-ratio × pixel width / pixel height
68
+ width (%) = clamp(raw width, min-width, max-width), rounded to one decimal
69
+ ```
70
+
71
+ Rounding is clamped again so it never crosses a bound. A fractional bound may
72
+ therefore retain more than one decimal place. Defaults are coefficient 0.8,
73
+ minimum 40%, maximum 100%. A square uses 80%, a 3:4 image 60%, and width/height
74
+ >= 1.25 reaches 100%. Until a bound applies, the displayed image height approaches
75
+ 0.8 times the text area's width. This is not a percentage of screen height.
76
+
77
+ | Option | Default | Behavior |
78
+ | --- | --- | --- |
79
+ | `--height-width-ratio NUMBER` | `0.8` | Display height / text-area width coefficient |
80
+ | `--min-width PERCENT` | `40` | Smallest permitted display width |
81
+ | `--max-width PERCENT` | `100` | Largest permitted display width |
82
+ | `--dry-run` | default behavior | Report planned changes without writing |
83
+ | `--diff` | off | Print a unified source diff without writing |
84
+ | `--in-place` | off | Explicitly update the source image references |
85
+ | `--json` | off | Structured inventory, settings and before/after changes |
86
+
87
+ Coefficients must be finite and positive, and widths must satisfy
88
+ `0 < min-width <= max-width <= 100`. `--in-place` cannot be combined with
89
+ `--dry-run` or `--diff`; `--diff` cannot be combined with `--json`.
90
+
91
+ ```sh
92
+ asciidoc-pubkit image width book.adoc --height-width-ratio 0.7 \
93
+ --min-width 50 --max-width 100 --exclude 'manual.png' --diff
94
+ ```
95
+
96
+ The result is written to the physical source macro, including included files:
97
+
98
+ ```adoc
99
+ image::diagram.png[Existing description,align=center,scaledwidth=87.9%]
100
+ ```
101
+
102
+ Existing `scaledwidth` is updated; otherwise it is appended. Alt text, target
103
+ attribute references, other attributes, line endings, surrounding text and image
104
+ bytes are preserved. Explicit pixel width/height attributes are retained.
105
+ Backends that honor `scaledwidth`, including asciidoctor-epub3, consume it during
106
+ conversion; this does not impose a universal CSS width on every backend.
107
+
108
+ Source provenance is attached only in the parser's memory before include
109
+ lookahead can lose its location. No internal metadata is written to source.
110
+ Unsupported or unmapped source forms are not guessed: list/stats can report them,
111
+ but width refuses an unsafe edit. Duplicate `scaledwidth` declarations are rejected.
112
+ A reused source macro can be edited once when all references request the same
113
+ result; conflicting expansions or an excluded reuse block the edit. Separate
114
+ attributes or macros across multiple lines are not reconstructed.
115
+
116
+ All edits and image inspections complete before writing. Changed files are
117
+ staged in their own directories with their modes preserved. Source snapshots
118
+ are checked for concurrent changes. A failed multi-file replacement rolls back
119
+ already installed changes, without overwriting a later concurrent writer's edits.
120
+ Repeated execution with the same inputs is idempotent. There is no `--output`
121
+ or `--output-dir` mode in v1.4.0; a single output file cannot represent updates
122
+ across several included files. Use preview/diff to review changes first.
123
+
124
+ Image whitespace is included in the pixel dimensions. At the minimum width a
125
+ very tall figure can still exceed a page, and text may require a larger width.
126
+ The coefficient and bounds are tuning values, not KDP requirements. Run the
127
+ book build, EPUBCheck and Kindle Previewer after applying source changes.
128
+
129
+ Successful commands, previews and empty collections return 0. Invalid arguments,
130
+ parse errors, missing images and unsafe/unwritable source edits return 2. This
131
+ does not replace manuscript review verification or establish publication readiness.
132
+
133
+ ## Make integration
134
+
135
+ Call width adjustment before the converter reads the source document:
136
+
137
+ ```make
138
+ ASCIIDOC_PUBKIT ?= asciidoc-pubkit
139
+ IMAGE_HEIGHT_WIDTH_RATIO ?= 0.8
140
+ IMAGE_MIN_WIDTH ?= 40
141
+ IMAGE_MAX_WIDTH ?= 100
142
+ IMAGE_SELECTION_OPTS ?=
143
+ IMAGE_WIDTH_OPTS = --height-width-ratio $(IMAGE_HEIGHT_WIDTH_RATIO) --min-width $(IMAGE_MIN_WIDTH) --max-width $(IMAGE_MAX_WIDTH) $(IMAGE_SELECTION_OPTS)
144
+
145
+ .PHONY: image-list image-stats image-width
146
+ image-list:
147
+ $(ASCIIDOC_PUBKIT) image list book.adoc $(IMAGE_SELECTION_OPTS)
148
+ image-stats:
149
+ $(ASCIIDOC_PUBKIT) image stats book.adoc $(IMAGE_SELECTION_OPTS)
150
+ image-width:
151
+ $(ASCIIDOC_PUBKIT) image width book.adoc $(IMAGE_WIDTH_OPTS) --in-place
152
+ ```
153
+
154
+ Use your build's pre-generation prerequisite hook to run `image-width`. It must
155
+ finish before conversion, rather than running alongside the converter. No EPUB
156
+ postprocessing is needed. The earlier unreleased `epub image-width` prototype is
157
+ replaced by this document-based interface; it was not a released public command.
158
+
159
+ ## Later scope
160
+
161
+ Image-file processing (`resize`, `trim`, `pad`, `quantize`, and possible composite
162
+ preparation) is planned for v1.4.1 and tracked in
163
+ [GitHub issue #1](https://github.com/cybergarage/asciidoc-pubkit/issues/1).
164
+ Those commands are not implemented in v1.4.0. Their input will also be the
165
+ AsciiDoc document, rather than a standalone image.
data/docs/installation.md CHANGED
@@ -8,6 +8,10 @@ asciidoc-pubkit --version
8
8
  asciidoc-pubkit --help
9
9
  ```
10
10
 
11
+ The v1.4.0 `image list`, `image stats` and `image width` commands additionally
12
+ require ImageMagick 7 (`magick`) or 6 (`identify`). They do not require Python or
13
+ MeCab. See [image commands](image-commands.md).
14
+
11
15
  Ruby 3.2 or later is required. RubyGems installs the required Ruby dependencies;
12
16
  no repository clone or Node.js installation is needed. MeCab and IPADIC must be
13
17
  installed separately when using Japanese review or scoring in the default mode.
@@ -41,7 +45,7 @@ Add the gem to your project's `Gemfile` to manage its version with Bundler:
41
45
 
42
46
  ```ruby
43
47
  source 'https://rubygems.org'
44
- gem 'asciidoc-pubkit', '~> 1.2.0'
48
+ gem 'asciidoc-pubkit', '~> 1.4.0'
45
49
  ```
46
50
 
47
51
  Then install dependencies and run the CLI through Bundler: