asciidoc-pubkit 0.8.2 → 0.8.4

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: 3dd09ef810a52e64bd286b34f4f59cda2cf357214abd94a1255ee44d77a96e27
4
- data.tar.gz: fec7d11ca4f985b41aa1d2e5d37c8b126d56a1dc1ee86874330d2239634207c1
3
+ metadata.gz: 7f629e73e42aa273d3f13a77a917208bf9d54a7c53f024c89c0f7f8fae596934
4
+ data.tar.gz: fdfd437f9a8c7735b873b3df5da5c55662be58a7871e5c3017f360f09539c382
5
5
  SHA512:
6
- metadata.gz: e56e14f6abd189a621a3f4b918d9e24697749bc1a777816b2cdfa9a02bfc662f1b53e831e291af99b5254ac976a6fa72a2703c224d98ce979e0d9d7eac5be6d5
7
- data.tar.gz: 19361ba968e9738a736f4452eb6590b90cbc1ca998e128d0cdd952f1da527c66d97817f6913f9957092c8dfbae55b5019e90909e1709337671bb57384031da06
6
+ metadata.gz: d02a86fc684bed05d233025281de87ecd8adf45ed15ae72b57b6e15c12d3572df48b3697294768a3aab3de5e40e1d02ea0828c5a39efd6c3b8f4d68c75f3f2ee
7
+ data.tar.gz: 54d8f0862dc0b45f78184613e12098569486541378b0fd72b2e218b0daf94846c3513536620c5a5a6a90197d8f07ef6e1526b153523e3d87e2867dd1c15ac58d
data/CHANGELOG.md CHANGED
@@ -1,5 +1,29 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.8.4 — 2026-10-02
4
+
5
+ - Require passage-specific review decisions in prose and heading prompts instead
6
+ of inferring keep/revise from retained strings. Leave unreviewed items pending,
7
+ reconcile decisions with edits or proposals, and report mechanical verification,
8
+ candidate handling, and editorial completion separately. Protect session files
9
+ and baseline snapshots from editing and formatting tools. These instructions
10
+ do not add automatic decision-record or semantic validation to verification.
11
+ - Detect inflected invocation, interpretation, retrieval, and collection verbs
12
+ for varied objects through configured MeCab lemmas; retain contextual phrase
13
+ precedence, allow lists, and explicit literal-mode coverage. Add the exact
14
+ contextual phrase 木全体 to cover IPADIC surname segmentation.
15
+ - Add regression cases based on investigated manuscript variants and test review
16
+ instructions in both scopes and modes with session artifacts kept intact.
17
+
18
+ ## 0.8.3 — 2026-10-02
19
+
20
+ - Refine shared Japanese writing and review criteria for established technical
21
+ terminology, precise operations, direct predicates, and evidence-based tone.
22
+ Preserve distinctions between assumptions, requirements, and capabilities.
23
+ - Add scoped review candidates for unusual translations, everyday operation
24
+ wording, indirect predicates, and author-centered emphasis; reuse existing
25
+ noun, verb, and qualification rules instead of fixed automatic replacements.
26
+
3
27
  ## 0.8.2 — 2026-10-02
4
28
 
5
29
  - Report replacement rule errors with the original YAML filename and one-based
data/README.md CHANGED
@@ -7,7 +7,7 @@
7
7
 
8
8
  A toolkit for authoring and reviewing AsciiDoc books.
9
9
 
10
- Version 0.8.2 provides shared Japanese technical writing criteria, an authoring
10
+ Version 0.8.4 provides shared Japanese technical writing criteria, an authoring
11
11
  prompt, separate prose and heading review prompts, manuscript scoring, and
12
12
  baseline verification for edited manuscripts, plus explicit prose-only mechanical
13
13
  replacements using a limited prh-format rule set.
@@ -16,7 +16,7 @@ Japanese text is retained in manuscript excerpts, rule dictionaries, and fixture
16
16
 
17
17
  ## Available features
18
18
 
19
- The following commands are available in version 0.8.2.
19
+ The following commands are available in version 0.8.4.
20
20
 
21
21
  | Feature | Commands | Behavior |
22
22
  | --- | --- | --- |
@@ -107,7 +107,7 @@ Add the gem to your project's `Gemfile` to manage its version with Bundler:
107
107
 
108
108
  ```ruby
109
109
  source 'https://rubygems.org'
110
- gem 'asciidoc-pubkit', '~> 0.8.2'
110
+ gem 'asciidoc-pubkit', '~> 0.8.4'
111
111
  ```
112
112
 
113
113
  Then install dependencies and run the CLI through Bundler:
@@ -129,7 +129,7 @@ git clone https://github.com/cybergarage/asciidoc-pubkit.git
129
129
  cd asciidoc-pubkit
130
130
  bundle install
131
131
  gem build asciidoc-pubkit.gemspec
132
- gem install ./asciidoc-pubkit-0.8.2.gem
132
+ gem install ./asciidoc-pubkit-0.8.4.gem
133
133
  asciidoc-pubkit --version
134
134
  ```
135
135
 
@@ -153,7 +153,7 @@ asciidoc-pubkit writing prompt --lang ja --output writing-prompt.md
153
153
  ```
154
154
 
155
155
  For example, `--lang en` exits with an unsupported-language error. No English
156
- review or writing criteria are shipped in 0.8.2.
156
+ review or writing criteria are shipped in 0.8.4.
157
157
 
158
158
  For a small trial, use `examples/book.adoc` as the scan input. Its Japanese
159
159
  paragraphs deliberately contain review candidates; its code block must remain
@@ -612,7 +612,21 @@ asciidoc-pubkit review prompt .pubkit/review --mode diagnose
612
612
 
613
613
  `revise` is the default and asks the agent to edit relevant prose. `diagnose` asks
614
614
  for findings and proposed revisions without editing. Both modes require the agent
615
- to distinguish **revise**, **keep**, and **needs-evidence** decisions.
615
+ to distinguish **revise**, **keep**, and **needs-evidence** decisions. Each decision
616
+ needs a passage-specific reason. Whether a matched string remains or disappears
617
+ cannot determine that decision; unchanged paragraphs and remaining candidates
618
+ must not receive automatic `keep` records. Unreviewed items remain pending.
619
+
620
+ Version 0.8.4 prompts require the reviewer to reconcile decisions with actual
621
+ edits (or proposed revisions in diagnose mode), review paragraphs or headings
622
+ without candidates, and inspect newly detected or remaining candidates after
623
+ verification. They request separate reports for mechanical preservation,
624
+ candidate decisions, and paragraph or heading quality review, with counts and
625
+ unresolved items. Protected-scope concerns are separate proposals, not evidence
626
+ of editorial approval. Pending items make the review incomplete.
627
+ These are reviewer instructions: the gem does not validate a decision ledger
628
+ or prove that an AI or human followed the instructions. Keep session metadata
629
+ and baseline snapshots immutable; format only authorized manuscript spans.
616
630
 
617
631
  The single Markdown output includes every selected paragraph once, in document
618
632
  order, with the shared criteria saved at scan time, candidates, saved settings,
@@ -649,7 +663,10 @@ Non-prose comparison ignores empty separator lines and trailing whitespace;
649
663
  listing, literal, and passthrough block content is additionally compared as parsed
650
664
  lines. Inline protection is heuristic, not a complete AsciiDoc inline parser.
651
665
  Successful verification does not prove meaning preservation, technical accuracy,
652
- or release readiness: `meaning_verified` is always `false`.
666
+ or release readiness: `meaning_verified` is always `false`. Verification does
667
+ not read candidate decision records or certify editorial completion. A passing
668
+ mechanical result must be reported separately from the reviewer's quality and
669
+ completion assessment.
653
670
 
654
671
  | Exit code | Meaning |
655
672
  | --- | --- |
@@ -1005,6 +1022,28 @@ These are candidates for contextual review, not banned expressions. A necessary
1005
1022
  condition, uncertainty, or distinction must survive a revision; a redundant
1006
1023
  disclaimer can instead be removed or folded into a more precise main claim.
1007
1024
 
1025
+ Version 0.8.3 also includes scoped candidates such as `構築入口`,
1026
+ `エラーを回収する`, `ツールを呼ぶ`, `したりできます`, and `設計の肝`.
1027
+ These additions use the exact surfaces listed in the YAML in both modes;
1028
+ they do not add general inflection coverage or ban everyday verbs. Existing
1029
+ `木`, `持つ`, `書く`, `別です`, and `ではありません` rules cover related examples.
1030
+ The shared criteria explain context-dependent terminology, precise operations,
1031
+ direct predicates, and objective tone. They distinguish invocation from
1032
+ execution, configuration text from configuration changes, assumptions from
1033
+ requirements, and collecting errors from catching them. Suggested alternatives
1034
+ are not automatic replacement rules. Start a new review session to include
1035
+ updated rules and criteria; existing sessions retain their saved versions.
1036
+
1037
+ Version 0.8.4 also configures `呼ぶ`, `読み取る`, `拾う`, and the sahen predicate
1038
+ `回収する` as weak-predicate candidates. MeCab matches their inflections for
1039
+ any object, including `指示と宣言を読み取ります` and `最後のdetailsを拾います`.
1040
+ This broadens review cues, not mandatory terminology changes; everyday and
1041
+ technically valid uses can be retained with a specific reason. Literal mode
1042
+ matches only the selected surfaces in the YAML. Longer contextual phrases take
1043
+ precedence. `木全体` is an explicit contextual phrase in both modes because
1044
+ IPADIC can parse `木全` as a surname; this narrowly addresses that segmentation
1045
+ case without treating all names or compounds containing `木` as trees.
1046
+
1008
1047
  Metaphorical-operation candidates include limited exact surfaces of
1009
1048
  `地味に効く`, `静かに壊れる`, `時間を溶かす`, and `側に倒す`, including selected polite,
1010
1049
  past, and connective forms listed in the packaged YAML. They use contextual
@@ -1057,12 +1096,12 @@ reports analyzer changes instead of treating results from different dictionaries
1057
1096
  as directly comparable. Prompt generation uses saved evidence and does not need
1058
1097
  MeCab. Changed rules or dictionary settings require a new scan.
1059
1098
 
1060
- Sessions from earlier tool versions are not compatible with 0.8.2 (session schema 2). Keep the original baseline for
1099
+ Sessions from earlier tool versions are not compatible with 0.8.4 (session schema 2). Keep the original baseline for
1061
1100
  an ongoing review and finish it with the original version, or start a new review
1062
1101
  pass in a different directory:
1063
1102
 
1064
1103
  ```sh
1065
- asciidoc-pubkit review scan book.adoc --output .pubkit/review-0.8.2
1104
+ asciidoc-pubkit review scan book.adoc --output .pubkit/review-0.8.4
1066
1105
  ```
1067
1106
 
1068
1107
  Severity describes review priority, not proof of an error. There is no AI-authorship
@@ -59,6 +59,17 @@ terms:
59
59
  - 確かめます
60
60
  - 探します
61
61
  - 追えます
62
+ # Inspect retrieval, interpretation, and invocation for any object.
63
+ - 呼ぶ
64
+ - 呼びます
65
+ - 呼んで
66
+ - 呼んだ
67
+ - 読み取る
68
+ - 読み取ります
69
+ - 拾う
70
+ - 拾います
71
+ - 回収する
72
+ - 回収します
62
73
  # Construction, preparation, and combination.
63
74
  - 用意します
64
75
  - 作ります
@@ -135,6 +146,26 @@ terms:
135
146
  # Retain this specific phrase for existing allow lists and fuller evidence.
136
147
  - わけではありません
137
148
  - 別です
149
+ # Unusual technical translations; shared criteria own the alternatives.
150
+ - 木全体
151
+ - 構築入口
152
+ - 実装の読解
153
+ - エラーを回収する
154
+ - エラーを回収します
155
+ - 介入パターン
156
+ # Object-specific everyday verbs, not general bans on these verbs.
157
+ - ツールを呼ぶ
158
+ - ツールを呼びます
159
+ - 責務を持つ
160
+ - 指示を読み取る
161
+ - 指示を読み取ります
162
+ - 設定を書く
163
+ - 値を拾う
164
+ - 値を拾います
165
+ - 切り出す合図です
166
+ # Indirect capabilities and prerequisites; preserve their modality.
167
+ - したりできます
168
+ - することが前提です
138
169
  # Compressed noun relationships; suggestions are not automatic replacements.
139
170
  - 明示選択
140
171
  - 欠落理由
@@ -158,7 +189,8 @@ terms:
158
189
  - でもありません
159
190
  - してはいけません
160
191
  - 表してはいません
161
- question: Check whether the phrase adds a condition that changes the reader's
192
+ question: Apply the shared prose criteria to terminology, operation wording,
193
+ indirect predicates, and qualifications. Check whether the phrase adds a condition that changes the reader's
162
194
  interpretation or action. If it only denies an overbroad reading already
163
195
  excluded by the main claim, revise that claim or remove the qualification.
164
196
  Preserve necessary negation, uncertainty, and technical boundaries. For
@@ -176,6 +208,10 @@ terms:
176
208
  - まとめると
177
209
  - このように
178
210
  - 要するに
211
+ # Author-centered discovery, indirect explanation, and unsupported emphasis.
212
+ - 見えてきます
213
+ - 理由がここにあります
214
+ - 設計の肝
179
215
  question: Check whether this opening or recap adds a claim, scope, or consequence
180
216
  beyond the surrounding prose. Keep useful framing; otherwise state the
181
217
  substantive claim directly. Do not force a uniform sentence pattern.
@@ -265,6 +301,12 @@ verbs:
265
301
  追う:
266
302
  - 追う
267
303
  - 追える
304
+ 呼ぶ:
305
+ - 呼ぶ
306
+ 読み取る:
307
+ - 読み取る
308
+ 拾う:
309
+ - 拾う
268
310
  ある:
269
311
  - ある
270
312
  sahen:
@@ -278,6 +320,7 @@ sahen:
278
320
  - 区別
279
321
  - 解消
280
322
  - 混同
323
+ - 回収
281
324
  negative_only:
282
325
  - 到達する
283
326
  - 意味する
@@ -66,6 +66,21 @@ Prefer a precise action or consequence:
66
66
  - `結果を残します` becomes `実行したコマンドと結果をプルリクエストへ記録します`
67
67
  when that is the storage location.
68
68
 
69
+ For everyday verbs, identify the operation before choosing terminology:
70
+
71
+ | Wording to inspect | Revision when supported by context |
72
+ | --- | --- |
73
+ | ツールを呼ぶ | 呼び出す for invocation; 実行する only for execution |
74
+ | 責務を持つ | 責務を担う when describing responsibility, not stored state or ownership |
75
+ | 指示を読み取る | 解析する for parsing or analysis; 抽出する for selecting information |
76
+ | 設定を書く・設定を書きます | 設定を記述する・定義する for authoring a definition; 設定する for actually configuring something |
77
+ | 値を拾う | 取得する for retrieval; 抽出する for selection from existing data |
78
+ | 切り出す合図です | 切り出す目安です for a judgment criterion; シグナルです only for an actual signal |
79
+
80
+ A familiar verb is not wrong merely because it is simple. Prefer the most direct
81
+ accurate verb; do not introduce jargon or claim parsing, execution, or a state
82
+ change that the evidence does not establish.
83
+
69
84
  Do not choose a more impressive synonym merely to vary sentence endings. Keep
70
85
  the technically correct verb when it names the real operation.
71
86
 
@@ -156,6 +171,27 @@ Common patterns that merit paragraph-level review include:
156
171
  Keep a contrast when the two alternatives and the difference that affects the
157
172
  decision are explicit. Keep necessary repetition when it improves technical
158
173
  accuracy.
174
+ Inspect indirect predicates and author-centered emphasis as well:
175
+
176
+ - Simplify `無効化したりできます` to `無効化できます` when it describes a single
177
+ capability. Preserve `たり` when it marks a meaningful non-exhaustive list.
178
+ - For `提供することが前提です`, identify whose prerequisite or assumption is
179
+ stated. Use `提供する必要があります` only when the source establishes an actual
180
+ requirement; do not turn an assumption into an obligation.
181
+ - For `宣言することは別です`, name what is compared and how it differs. A form such
182
+ as `宣言することとは異なります` needs an explicit, correctly oriented comparison.
183
+ - For `そうではありません`, state the specific fact or negate the specific claim.
184
+ `実際には異なります` alone can retain the same missing referent. Preserve negation.
185
+ - For `〜が見えてきます`, state the property the explanation makes identifiable.
186
+ `理解しやすくなります` is still a reader-effect claim that needs support; retain
187
+ literal visibility when discussing a display or visualization.
188
+ - For `理由がここにあります`, connect the cause and result directly, for example
189
+ `これが〜の理由です` when `これ` has a clear referent.
190
+ - For `設計の肝です`, identify the central responsibility or design decision.
191
+ `重要なポイントです` is not sufficient when it merely replaces one emphasis
192
+ phrase with another. Remove emotional, essay-like, or promotional emphasis
193
+ that supplies no technical fact; retain supported judgments and their basis.
194
+
159
195
  Do not shorten sentences or vary endings mechanically. Read the sequence aloud
160
196
  and repair the missing relationship rather than replacing one stock pattern
161
197
  with another.
@@ -170,12 +206,27 @@ glossary, and primary documentation before changing it.
170
206
  - Distinguish resource ownership from the responsibility to close or stop it.
171
207
  - Use the project's chosen forms consistently, such as `goroutine` versus
172
208
  `ゴルーチン`, or `reflection` versus `リフレクション`.
173
- - Replace unnecessary English words with established Japanese terms, but retain
174
- identifiers and official names.
209
+ - Prefer established terminology in the technical domain, whether Japanese or
210
+ katakana. Avoid forced literal translations and unnecessary English; retain
211
+ identifiers, official names, and the project's chosen terminology.
175
212
  - Do not describe a language operation with a loose everyday verb when the
176
213
  domain has a precise term, such as name shadowing, method promotion, parsing,
177
214
  serialization, cancellation, or resource release.
178
215
 
216
+ Review unusual translations against the actual concept:
217
+
218
+ | Wording to inspect | Context-dependent terminology |
219
+ | --- | --- |
220
+ | 木 | ツリー when referring to the data structure; keep literal trees and established mathematical usage |
221
+ | 構築入口 | ビルドのエントリポイント only when the entry point starts a build, not object construction or initialization |
222
+ | 実装の読解 | コードリーディング for reading code; 実装の解析 when analysis is the actual task |
223
+ | エラーを回収する | エラーを捕捉する for catching; ハンドリングする for handling; preserve aggregation or collection when that is the behavior |
224
+ | 介入パターン | フックパターン only when a hook mechanism is established, not arbitrary human intervention |
225
+
226
+ These alternatives are not interchangeable replacements. Confirm the operation
227
+ and the domain's established usage from code, the glossary, or primary
228
+ documentation; record uncertainty rather than inventing a mechanism.
229
+
179
230
  Natural Japanese must not erase a technical distinction. If the original claim
180
231
  is ambiguous, inspect the code or authoritative documentation before editing.
181
232
  Preserve numerical values, versions, settings, responsibility, causal claims,
@@ -197,6 +248,15 @@ conditions, negation, numbers, actors, causes, and implementation requirements.
197
248
  For example, removing a unique constraint from a duplicate-message check can
198
249
  lose a concurrency requirement even when the revised paragraph sounds clearer.
199
250
  Record unresolved evidence and keep necessary repetition or qualifications.
251
+ A review decision must come from reading the passage and checking the applicable
252
+ criteria. A retained word does not establish a `keep` decision, and a removed
253
+ word does not establish a satisfactory revision. Give passage-specific reasons
254
+ for retaining terminology, conditions, and distinctions; leave unreviewed items
255
+ pending rather than filling them with generic maintenance reasons. Compare the
256
+ actual revision with the original claim, including paragraphs without machine
257
+ candidates. Keep unresolved evidence and protected-scope proposals visible in
258
+ the completion report.
259
+
200
260
  No candidate count or mechanical verification result proves semantic correctness.
201
261
  Sentence length, punctuation, and list density can help locate passages to read;
202
262
  they are not fixed acceptance thresholds. Keep lists for parallel items and
@@ -184,6 +184,8 @@ module AsciidocPubkit
184
184
  After editing, reread each paragraph in context. Report unresolved issues and do not claim publication readiness.
185
185
  Mechanical verification does not establish semantic correctness.
186
186
 
187
+ #{review_process('paragraph', mode)}
188
+
187
189
  ## Shared prose criteria
188
190
 
189
191
  Apply these criteria only within the running-prose edit scope above. Their
@@ -318,6 +320,8 @@ module AsciidocPubkit
318
320
  original title, proposed title when applicable, and a short reason.
319
321
  Also track each candidate ID and its disposition. Do not claim publication readiness.
320
322
 
323
+ #{review_process('heading', mode)}
324
+
321
325
  ## Shared preservation and writing criteria
322
326
 
323
327
  The following common criteria provide meaning and terminology guidance.
@@ -372,6 +376,20 @@ module AsciidocPubkit
372
376
  text
373
377
  end
374
378
 
379
+ def review_process(unit, mode)
380
+ <<~TEXT
381
+ ## Review decisions and completion
382
+
383
+ Keep manifest.json, document.json, findings.json, and every baseline/ snapshot immutable. Restrict editing and formatting tools to the authorized source spans; never run them over the session directory.
384
+ Record each reviewed #{unit} ID and each candidate ID with revise, keep, or needs-evidence and a reason grounded in that passage. For keep, identify the concrete referent, operation, condition, necessary distinction, or established terminology that justifies retaining it. A shared generic reason does not establish individual review.
385
+ Never infer revise or keep from whether the matched string survives, disappears, or changes. Do not bulk-assign keep to unchanged #{unit}s or remaining candidates. An unreviewed item stays pending; use needs-evidence only after review identifies missing evidence.
386
+ Review #{unit}s without candidates against the shared criteria as well. For concerns outside the editable scope, report the location and a separate out-of-scope proposal; do not count protection as an editorial keep decision or edit protected content.
387
+ #{mode == 'revise' ? 'Compare the original and edited passages, check both information loss and unsupported additions, and reconcile each recorded decision with the actual diff. After verification, individually inspect newly detected or remaining candidates; retain the original candidate IDs in the review record.' : 'Compare each proposed revision with the original passage for information loss and unsupported additions. A revise decision means a proposed revision, not an applied edit.'}
388
+ Report mechanical preservation, candidate decisions, and #{unit}-level quality review separately. State selected and reviewed #{unit} counts, candidate decision counts, pending items, needs-evidence items, out-of-scope concerns, and evidence used. If any selected item or candidate remains pending, report the review as incomplete.
389
+ Mechanical verification does not read or validate these decision records. Its passed result and candidate counts do not establish review completion or writing quality; meaning_verified remains false. Do not claim semantic correctness from those checks.
390
+ TEXT
391
+ end
392
+
375
393
  def prompt_data(data, language)
376
394
  # Keep arbitrary manuscript text and custom settings inside their data fence.
377
395
  fence = '`' * [3, (data.scan(/`+/).map(&:length).max || 0) + 1].max
@@ -9,7 +9,7 @@ require 'pathname'
9
9
  require 'optparse'
10
10
 
11
11
  module AsciidocPubkit
12
- VERSION = '0.8.2'
12
+ VERSION = '0.8.4'
13
13
  class Error < StandardError; end
14
14
 
15
15
  def self.hash_text(text)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: asciidoc-pubkit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.2
4
+ version: 0.8.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - CyberGarage