asciidoc-pubkit 0.9.0 → 1.0.1

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.
@@ -0,0 +1,267 @@
1
+ # Review workflow
2
+
3
+ Run the following commands from the manuscript project directory:
4
+
5
+ ```sh
6
+ asciidoc-pubkit review scan book.adoc --output .pubkit/review
7
+ asciidoc-pubkit review prompt .pubkit/review --output review-prompt.md
8
+ # Ask your agent to read review-prompt.md and revise the referenced manuscript.
9
+ asciidoc-pubkit review verify .pubkit/review --output verification.json
10
+ ```
11
+
12
+ All three commands leave manuscript files unchanged. Only the agent edits them.
13
+ `prompt` and `verify` output files must not already exist.
14
+ Without `--output`, `prompt` writes Markdown and `verify` writes JSON to stdout.
15
+ `scan` defaults to `.pubkit/review` and prints a short summary. Prose scan output
16
+ and prompts explicitly direct reviewers to a separate `--scope lists` session
17
+ for list text; the prose baseline must remain intact.
18
+
19
+ List review is optional when the assignment covers running prose only or there
20
+ are no list descriptions to review. It is needed when the assignment includes
21
+ list wording: the default prose scan does not review it. See [List review](list-review.md#list-review)
22
+ for examples, supported items, and coverage limits.
23
+
24
+ For a review covering all three scopes, finish and verify headings first, then
25
+ scan and review the current prose, then scan and review the current list text.
26
+ Create each session after the preceding phase's edits and verification. Preserve
27
+ all earlier baselines and phase-end results; later edits in another scope may
28
+ legitimately make an earlier session's verification fail. On re-review, choose
29
+ unused session paths rather than replacing the previous evidence.
30
+
31
+ ### Scan
32
+
33
+ ```sh
34
+ asciidoc-pubkit review scan book.adoc --only chapters/introduction.adoc
35
+ asciidoc-pubkit review scan chapter.adoc --style desu-masu
36
+ asciidoc-pubkit review scan book.adoc --attribute edition=print --base-dir .
37
+ ```
38
+
39
+ If the session directory already exists, an interactive terminal asks
40
+ `Replace it? [y/N]`. Only `y` or `yes` (case-insensitive) replaces it; any other
41
+ answer or end of input cancels with exit status 2. Replacement resets the review
42
+ baseline and removes old session contents. Use a different `--output` path to
43
+ keep the previous review pass. The old session remains intact if scanning fails
44
+ before the replacement is installed.
45
+
46
+ For batch execution:
47
+
48
+ ```sh
49
+ # Answer yes automatically and replace an existing review session.
50
+ asciidoc-pubkit review scan book.adoc --yes # short form: -y
51
+ # Never ask; exit with status 2 if the output already exists.
52
+ asciidoc-pubkit review scan book.adoc --no-input
53
+ ```
54
+
55
+ Non-terminal stdin also disables prompting. `--yes --no-input` permits
56
+ replacement without reading stdin. These options apply to `scan` only;
57
+ regular files, symlinks, directories without a review session layout, and
58
+ sessions containing the current manuscript sources cannot be replaced.
59
+
60
+ An entrypoint or a standalone chapter can be scanned. Includes and conditionals
61
+ are processed by Asciidoctor. Match the publishing build's attributes and base
62
+ directory to review the intended edition. `--only` selects one included source
63
+ file while retaining the book's attributes and heading hierarchy. Its path is
64
+ relative to the current working directory, as are other CLI path arguments.
65
+
66
+ Asciidoctor runs in safe mode. Local includes must resolve inside the base
67
+ directory. Remote includes and project-specific Asciidoctor extensions are not
68
+ supported. In particular, custom `/shared/` include conventions must be converted
69
+ to ordinary local paths before using this release. Parser diagnostics cause the
70
+ scan to fail rather than silently accepting incomplete input.
71
+
72
+ The session contains:
73
+
74
+ ```text
75
+ .pubkit/review/
76
+ manifest.json # Schema, tool version, inputs, settings, hashes, protection data
77
+ findings.json # Candidate locations, rule IDs, severity, and review questions
78
+ document.json # Paragraphs, heading hierarchy, structure, and coverage notices
79
+ baseline/ # Exact copies of the participating source files
80
+ ```
81
+
82
+ Sessions use absolute source paths and are local working artifacts. Regenerate a
83
+ session after moving a project. Keep `.pubkit/` and generated prompts out of Git
84
+ when they contain private manuscript material. Rule settings and glossary contents
85
+ are frozen into the session; scan again after changing them.
86
+
87
+ ### Heading review
88
+
89
+ Review headings, prose, and list text in separate sessions. The default scan scope
90
+ remains `prose`; `--scope headings` selects section titles and `--scope lists` selects
91
+ supported list text. There is no combined scope.
92
+ Default output directories are `.pubkit/review` for prose and `.pubkit/headings`
93
+ for headings, so separate scans do not replace each other by default.
94
+ The scope is saved at scan time; `prompt` and `verify` use that saved scope.
95
+ Neither scan nor prompt invokes an AI CLI or edits a manuscript. Give the generated
96
+ prompt to your reviewer separately.
97
+
98
+ ```sh
99
+ asciidoc-pubkit review scan book.adoc --scope headings --output .pubkit/headings
100
+ asciidoc-pubkit review prompt .pubkit/headings --mode diagnose --output headings-diagnosis.md
101
+ # Generate a revision prompt when ready to edit:
102
+ asciidoc-pubkit review prompt .pubkit/headings --mode revise --output headings-review.md
103
+ # After the external review and edits:
104
+ asciidoc-pubkit review verify .pubkit/headings
105
+
106
+ # Establish a fresh prose baseline after finishing heading edits:
107
+ asciidoc-pubkit review scan book.adoc --scope prose --output .pubkit/prose
108
+ asciidoc-pubkit review prompt .pubkit/prose --output prose-review.md
109
+ asciidoc-pubkit review verify .pubkit/prose
110
+ ```
111
+
112
+ Heading prompts contain the full parsed section outline, selected headings and
113
+ all selected source-mapped prose paragraphs once as read-only evidence. They
114
+ compare parents, siblings, descendants and the corresponding body. Body content
115
+ outside prose coverage is not supplied; insufficient evidence must be recorded
116
+ as `needs-evidence`. `--only` and `review.exclude` select editable headings and
117
+ body evidence while retaining the full outline as context. All excerpts are data,
118
+ never executable reviewer instructions. Both criteria files and resolved rules
119
+ are frozen in the session.
120
+
121
+ Default heading rules accept term labels, noun phrases, questions, action
122
+ phrases, principles, conclusions and learning directions. They flag limited
123
+ promotional/vague phrases, glossary variants and identical sibling titles as
124
+ review candidates. They do not apply prose weak-predicate or sentence-ending
125
+ rules, require nominalization, or impose a character limit. Role and body
126
+ agreement are contextual reviewer judgments, not mechanically proven findings.
127
+
128
+ Only plain ATX section titles whose source cursor and original title match are
129
+ editable. Document titles, old-style underlined headings, attribute-expanded
130
+ and converted inline titles and physical title lines reused by multiple includes remain protected.
131
+ Unresolved section titles receive coverage notices. Verification permits only selected title text changes while
132
+ protecting the body, title markers, hierarchy, order, section IDs, references,
133
+ attributes, includes and other protected content. A title-derived section ID
134
+ change fails verification. Starting with version 0.8.7, heading scans preserve
135
+ generated IDs by default. Eligible generated headings save an exact `permitted_id_anchor` in
136
+ their metadata. A reviewer may insert only that
137
+ anchor immediately before its selected heading, for example:
138
+
139
+ ```adoc
140
+ [#_手動圧縮の入口]
141
+ == 手動圧縮と拡張からの起動
142
+ ```
143
+
144
+ Verification allows this exact addition while requiring the same section ID,
145
+ hierarchy, order, and protected body. Existing explicit anchors remain protected;
146
+ other anchors and reference migrations are outside this permission. No additional
147
+ ID-preservation option is required. Previously saved permissions remain unchanged;
148
+ start a separate new session to obtain the default permissions, keeping the old
149
+ baseline intact. Scan and prompt never insert anchors or rewrite
150
+ manuscripts. Numeric title changes
151
+ are manual-review notices, and remaining candidates do not fail verification.
152
+ `meaning_verified` remains `false`.
153
+
154
+ Version 1.0.1 uses session schema 3 and requires the exact tool version saved in
155
+ the session. Preserve or finish an ongoing review with its original tool before
156
+ establishing a new baseline in a separate directory.
157
+ `review score` continues to support prose only and rejects `--scope`.
158
+
159
+ Heading rules use `--heading-rules FILE`, then configuration
160
+ `review.heading_rules`, then `data/heading-rules.ja.yml`. A custom file replaces
161
+ the entire heading rule set. Each scan loads only the rules for its selected
162
+ scope; an unavailable rule file for the other scope does not prevent it.
163
+ `--heading-rules` requires `--scope headings`;
164
+ prose `--rules` and `--style` cannot be passed to a heading scan.
165
+
166
+ ```yaml
167
+ schema_version: 1
168
+ terms:
169
+ book-heading-cue:
170
+ terms: [シームレス]
171
+ question: 'Check the claimed behavior against the section evidence.'
172
+ fixed_titles: [はじめに, 参考文献, まとめ]
173
+ duplicate_siblings: true
174
+ style: mixed
175
+ ```
176
+
177
+ All five keys are required; unknown keys, invalid types and YAML aliases are
178
+ rejected. `terms` maps nonempty rule names to exactly `terms` (unique nonempty
179
+ strings) and `question` (nonempty English guidance). `fixed_titles` contains
180
+ unique nonempty titles exempt from mechanical candidates; it does not expand
181
+ the edit scope or prove correctness. `duplicate_siblings` is boolean. `style`
182
+ is `mixed` (default), `nominal`, or `action`; explicit preferences generate
183
+ advisory ending cues rather than a complete grammatical classification. Keep
184
+ questions, principles and justified exceptions. Heading phrase and glossary
185
+ matches respect exact `review.allows` entries, protected inline masking and
186
+ one-based Unicode source columns. MeCab remains the default; only explicit
187
+ `--tokenizer literal` disables it.
188
+
189
+ ### Prompt
190
+
191
+ ```sh
192
+ asciidoc-pubkit review prompt .pubkit/review --mode revise --output review-prompt.md
193
+ asciidoc-pubkit review prompt .pubkit/review --mode diagnose
194
+ ```
195
+
196
+ `revise` is the default and asks the agent to edit relevant prose. `diagnose` asks
197
+ for findings and proposed revisions without editing. Both modes require the agent
198
+ to distinguish **revise**, **keep**, and **needs-evidence** decisions. Each decision
199
+ needs a passage-specific reason. Whether a matched string remains or disappears
200
+ cannot determine that decision; unchanged paragraphs and remaining candidates
201
+ must not receive automatic `keep` records. Unreviewed items remain pending.
202
+
203
+ Version 0.8.4 prompts require the reviewer to reconcile decisions with actual
204
+ edits (or proposed revisions in diagnose mode), review paragraphs or headings
205
+ without candidates, and inspect newly detected or remaining candidates after
206
+ verification. They request separate reports for mechanical preservation,
207
+ candidate decisions, and paragraph or heading quality review, with counts and
208
+ unresolved items. Protected-scope concerns are separate proposals, not evidence
209
+ of editorial approval. Pending items make the review incomplete.
210
+ Version 0.8.5 further requires an individual role or claim, located
211
+ evidence, a considered direct alternative, and the rationale for each candidate
212
+ decision. A stock reason with an appended quotation is insufficient. For `入口`,
213
+ the shared criteria ask whether creation, invocation, configuration, reference,
214
+ or a learning role can be stated directly even when the referent is clear.
215
+ Remaining role metaphors must be checked against those individual decisions.
216
+
217
+ These are reviewer instructions: the gem does not validate a decision ledger
218
+ or prove that an AI or human followed the instructions. Keep session metadata
219
+ and baseline snapshots immutable; format only authorized manuscript spans.
220
+
221
+ The single Markdown output includes every selected paragraph once, in document
222
+ order, with the shared criteria saved at scan time, candidates, saved settings,
223
+ and preservation instructions. Paragraph
224
+ text uses fenced text blocks; metadata uses compact JSON. File and heading context
225
+ is shared by consecutive paragraphs, and candidates inherit their file and
226
+ paragraph ID. Adjacent entries provide neighboring context without repeating text.
227
+ The prompt asks the agent to read manageable ranges with neighboring paragraphs
228
+ at boundaries and track completed paragraph IDs and candidate decisions. It also
229
+ requires review of paragraphs with no machine matches. Large manuscripts can
230
+ still exceed a context window if the entire prompt is loaded at once. Initial
231
+ support is for local prose correction, not chapter reorganization.
232
+
233
+ Source hashes are checked before generating a prompt. Modified sources, modified
234
+ session artifacts, and incompatible session versions require a fresh scan.
235
+ `review scan`, `review prompt`, and `review verify` accept `--lang ja`; prompt and
236
+ verify check the value against the session language. A non-Japanese language in
237
+ `--lang`, `review.language`, or an explicit AsciiDoc `:lang:` attribute is rejected.
238
+ An omitted `:lang:` attribute uses the selected review language.
239
+
240
+ ### Verify
241
+
242
+ ```sh
243
+ asciidoc-pubkit review verify .pubkit/review
244
+ ```
245
+
246
+ For prose sessions, verification compares the current source set, document structure, content outside
247
+ reviewed paragraphs, and recognized protected inline tokens with the baseline.
248
+ It reports remaining candidates and numeric changes separately. Existing candidates
249
+ do not make verification fail. Numeric changes require manual review but do not
250
+ by themselves fail mechanical verification.
251
+
252
+ Non-prose comparison ignores empty separator lines and trailing whitespace;
253
+ listing, literal, and passthrough block content is additionally compared as parsed
254
+ lines. Inline protection is heuristic, not a complete AsciiDoc inline parser.
255
+ Successful verification does not prove meaning preservation, technical accuracy,
256
+ or release readiness: `meaning_verified` is always `false`. Verification does
257
+ not read candidate decision records or certify editorial completion. A passing
258
+ mechanical result must be reported separately from the reviewer's quality and
259
+ completion assessment.
260
+
261
+ | Exit code | Meaning |
262
+ | --- | --- |
263
+ | `0` | Command completed; verification found no mechanical violations |
264
+ | `1` | Verification found protected-content, structure, source, or parsing issues |
265
+ | `2` | Invalid arguments, configuration, session, scan input, or output failure |
266
+
267
+ [Back to README](../README.md)
@@ -0,0 +1,158 @@
1
+ # Rules and coverage
2
+
3
+ | Rule | Severity | Purpose |
4
+ | --- | --- | --- |
5
+ | `abstract-reference` | hint | Ask what an abstract noun refers to |
6
+ | `weak-predicate` | hint | Ask whether an operation's purpose or result is clear |
7
+ | `contextual-phrase` | hint | Check whether a qualification changes interpretation or action; preserve necessary negation |
8
+ | `generic-framing` | hint | Check whether an introduction or recap adds a claim, scope, or consequence |
9
+ | `vague-degree` | hint | Ask what depth, level, scope, or comparison is intended |
10
+ | `repeated-ending` | info | Identify three consecutive sentences with the same detected ending |
11
+ | `glossary-variant` | warning | Identify project-specific terminology variants |
12
+ | `style-candidate` | hint | Check selected polite/plain endings against an explicit style |
13
+
14
+ MeCab mode matches noun and adjective tokens and dictionary forms of verbs.
15
+ Sahen predicates are matched as a noun followed by `する` or the potential
16
+ `できる`; standalone sahen nouns are not treated as verbal predicates. A configured
17
+ sahen predicate takes precedence over a matching standalone noun rule. Auxiliary sequences retain
18
+ negation, past tense, passive forms, and progressive forms in the reported surface.
19
+ The added reach predicate is negative-only; the existing handling predicate is
20
+ reviewed in both affirmative and negative forms. Glossary variants and generic
21
+ framing phrases continue to use literal matching. Contextual phrases suppress
22
+ overlapping morphological candidates. Except for the four predicate patterns
23
+ described below, they use literal matching. Compound
24
+ nouns are matched across adjacent noun tokens. Selection and narrowing verbs
25
+ include potential forms; predicate surfaces also preserve causative auxiliaries.
26
+
27
+ Default terms group components, actors, relationships, and resources under
28
+ `abstract-reference`; operations under `weak-predicate`; and compressed noun
29
+ relationships, referents, sufficiency, and negative qualifications under
30
+ `contextual-phrase`. `木` and `余白` invite a context-dependent katakana terminology
31
+ review, not mandatory replacement. `明示選択` and `欠落理由` invite checking whether
32
+ `明示的選択` and `欠落した理由` clarify the intended relationship. Shared phrases such
33
+ as `ではありません` cover longer qualifications without listing every sentence.
34
+ `generic-framing` also flags `このように` and `要するに` as possible recaps.
35
+ These are candidates for contextual review, not banned expressions. A necessary
36
+ condition, uncertainty, or distinction must survive a revision; a redundant
37
+ disclaimer can instead be removed or folded into a more precise main claim.
38
+
39
+ Version 0.8.5 extends the existing `入口` question and shared criteria
40
+ without adding another prose matcher. A known referent alone does not justify
41
+ vague role wording; direct alternatives are evaluated against the actual
42
+ operation, conditions, and technical usage. The heading `heading-vague-topic`
43
+ rule also includes `入口`; proposed title changes must preserve generated IDs
44
+ or be reported for a separate authorized migration. Lists remain excluded and
45
+ are not included in prose or heading body evidence. Reports about outside-scope
46
+ concerns cover only content actually inspected, not unreviewed excluded blocks.
47
+ If baseline or artifact integrity fails, preserve the evidence and stop editing;
48
+ never update snapshot hashes or replace the baseline to claim a successful review.
49
+
50
+ Version 0.8.3 also includes scoped candidates such as `構築入口`,
51
+ `エラーを回収する`, `ツールを呼ぶ`, `したりできます`, and `設計の肝`.
52
+ These additions use the exact surfaces listed in the YAML in both modes;
53
+ they do not add general inflection coverage or ban everyday verbs. Existing
54
+ `木`, `持つ`, `書く`, `別です`, and `ではありません` rules cover related examples.
55
+ The shared criteria explain context-dependent terminology, precise operations,
56
+ direct predicates, and objective tone. They distinguish invocation from
57
+ execution, configuration text from configuration changes, assumptions from
58
+ requirements, and collecting errors from catching them. Suggested alternatives
59
+ are not automatic replacement rules. Start a new review session to include
60
+ updated rules and criteria; existing sessions retain their saved versions.
61
+
62
+ Version 0.8.4 also configures `呼ぶ`, `読み取る`, `拾う`, and the sahen predicate
63
+ `回収する` as weak-predicate candidates. MeCab matches their inflections for
64
+ any object, including `指示と宣言を読み取ります` and `最後のdetailsを拾います`.
65
+ This broadens review cues, not mandatory terminology changes; everyday and
66
+ technically valid uses can be retained with a specific reason. Literal mode
67
+ matches only the selected surfaces in the YAML. Longer contextual phrases take
68
+ precedence. `木全体` is an explicit contextual phrase in both modes because
69
+ IPADIC can parse `木全` as a surname; this narrowly addresses that segmentation
70
+ case without treating all names or compounds containing `木` as trees.
71
+
72
+ Version 0.8.5 additionally reviews `拡張点`, `使えます`, `積み重なります`,
73
+ `開放しています`, `見落とします`, `扱えます`, `使っています`, and selected indirect
74
+ phrases. Existing tracking rules cover `追えます`. MeCab uses configured lemmas
75
+ for use, potential handling, accumulation, oversight, and sahen opening;
76
+ literal mode uses the listed surfaces. The shared examples distinguish an
77
+ extension point from its mechanism, layers from a stack, system detection from
78
+ human oversight, and processing from control. Revisions preserve actors,
79
+ capabilities and obligations, sequence, visibility, counts, and distribution.
80
+ These additions need a fresh scan and are contextual review guidance.
81
+
82
+ Metaphorical-operation candidates include limited exact surfaces of
83
+ `地味に効く`, `静かに壊れる`, `時間を溶かす`, and `側に倒す`, including selected polite,
84
+ past, and connective forms listed in the packaged YAML. They use contextual
85
+ phrase matching in both tokenizers; this is not complete inflection coverage or
86
+ syntactic analysis. Bare verbs such as `効く`, `壊れる`, `溶かす`, and `倒す` are
87
+ not added as general metaphor candidates. Identify the actual effect, policy,
88
+ work, or failure state from evidence rather than applying a fixed replacement.
89
+ Keep valid technical meanings and necessary negation.
90
+
91
+ Version 0.6.2 additionally matches these four phrases with MeCab/IPADIC
92
+ verb lemmas and adjacent predicate auxiliaries. For example, `地味に効かなかった`,
93
+ `静かに壊れていた`, `時間を溶かしてしまった`, and `側に倒しました` retain their
94
+ complete surfaces and polarity. A pattern is enabled only when its canonical
95
+ phrase (`地味に効く`, `静かに壊れる`, `時間を溶かす`, or `側に倒す`) is present in
96
+ the resolved `contextual-phrase.terms`. Removing those canonical entries from
97
+ custom rules disables their morphological patterns; remaining exact surfaces
98
+ still work. No YAML schema change is required. Allow lists accept the canonical
99
+ phrase or exact detected surface. The most specific overlapping phrase wins,
100
+ including allowed phrases. Masked inline content, unknown tokens, and paragraph
101
+ boundaries cannot bridge a pattern. This remains a limited contextual heuristic,
102
+ not a syntactic or semantic determination of metaphor. Literal mode retains
103
+ exact surfaces and does not acquire this inflection coverage.
104
+
105
+ In version 0.6.2, a `repeated-ending` candidate points to the ending
106
+ of the third sentence in the first consecutive run within each paragraph.
107
+ A sentence without a matching ending interrupts the run. The candidate remains
108
+ informational because precise technical repetition can be necessary.
109
+
110
+ The shared criteria distinguish reader instructions, actual system behavior,
111
+ and available capabilities. They also separate readability from checks for
112
+ missing information and unsupported additions. Sentence length, punctuation,
113
+ and list density are contextual cues, not fixed acceptance thresholds. These
114
+ updates are included in 0.6.2; start a new session to use updated criteria and rules.
115
+
116
+ Literal term matching suppresses matches strictly contained in a longer matched
117
+ term, across categories. The longer term also suppresses contained matches when
118
+ it is allowed; separate occurrences remain candidates. Glossary and style checks
119
+ are independent. In MeCab mode, predicates outside a contextual phrase can still
120
+ be reported separately.
121
+
122
+ Morphological candidates include `lemma`, `part_of_speech`, `negative`, and
123
+ `detector` alongside the original `match`, line, and column. Negation detection
124
+ covers common IPADIC negative auxiliaries; it is not full semantic analysis of
125
+ negation scope or double negatives. Unknown tokens are not guessed. Kana/kanji
126
+ variants of the alignment and gathering verbs have explicit canonical mappings;
127
+ other spelling variants are not automatically normalized.
128
+
129
+ The session records the MeCab version and dictionary file hashes. Verification
130
+ reports analyzer changes instead of treating results from different dictionaries
131
+ as directly comparable. Prompt generation uses saved evidence and does not need
132
+ MeCab. Changed rules or dictionary settings require a new scan.
133
+
134
+ Version 1.0.1 uses session schema 3.
135
+ Sessions with a different schema or tool version cannot be loaded. Keep the original baseline for
136
+ an ongoing review and finish it with the original version, or start a new review
137
+ pass in a different directory:
138
+
139
+ ```sh
140
+ asciidoc-pubkit review scan book.adoc --output .pubkit/review-1.0.1
141
+ ```
142
+
143
+ Severity describes review priority, not proof of an error. There is no AI-authorship
144
+ score and no requirement to eliminate every match.
145
+
146
+ In the default prose scope, only source-mapped running-prose paragraphs are reviewed. Headings, list items and
147
+ their continuations, tables, quotations, code, and passthrough blocks are excluded
148
+ from prose review. Common inline literals, macros, attribute references, URLs, and
149
+ Japanese quotation spans are masked. Complex inline syntax can exceed the masking
150
+ heuristic; review its diagnostics with care.
151
+
152
+ Source locations are checked against original lines because Asciidoctor block
153
+ locations can be inaccurate at include boundaries. If a location cannot be matched
154
+ unambiguously, the paragraph is skipped with a coverage notice. Columns are
155
+ one-based Unicode character positions, not byte offsets or display widths.
156
+ An empty findings array does not establish full coverage or good prose.
157
+
158
+ [Back to README](../README.md)
data/docs/scoring.md ADDED
@@ -0,0 +1,37 @@
1
+ # Score an AsciiDoc manuscript
2
+
3
+ Pass any AsciiDoc entry file directly; no review session or gold annotations are
4
+ required. Output defaults to a short English report with a score out of 100.
5
+
6
+ ```sh
7
+ asciidoc-pubkit review score book.adoc
8
+ asciidoc-pubkit review score book.adoc --json --output score.json
9
+ asciidoc-pubkit review score book.adoc --agent codex
10
+ asciidoc-pubkit review score book.adoc --agent claude --json
11
+ ```
12
+
13
+ Without `--agent`, the report shows a mechanical candidate-density indicator.
14
+ With `--agent`, it shows a model readability rating and retains the mechanical
15
+ score in JSON. See [How review and scoring work](architecture.md#how-review-and-scoring-work)
16
+ for the analysis pipeline, formulas, and interpretation of these different scores.
17
+ Successful scoring exits 0 regardless of the score; input, configuration,
18
+ analyzer, evaluator, or output failures exit 2. No scoring mode establishes
19
+ technical accuracy or meaning preservation; `meaning_verified` remains `false`.
20
+
21
+ Scoring uses the same configuration discovery, custom rules, glossary, allows,
22
+ style, language, base directory, include handling, and prose coverage as scanning.
23
+ It accepts `--only`, `--config`, `--rules`, `--base-dir`, `--tokenizer`, `--style`,
24
+ `--lang ja`, and repeated `--attribute` options. Excluded, unmapped, and protected
25
+ blocks are not prose-scored. Coverage notices remain important when interpreting
26
+ a score. MeCab/IPADIC is the default; literal mode must be selected explicitly.
27
+
28
+ AI evaluation requires an installed, authenticated Codex or Claude CLI, and may
29
+ send the selected paragraph text and headings to its configured provider and
30
+ consume account usage. It receives no candidate findings or source file paths.
31
+ `--model` selects the evaluator model, and `--timeout` sets the invocation timeout
32
+ (default 300 seconds); both require `--agent`. Temporary evaluation files are
33
+ removed after scoring. Use `--json --output FILE` to retain the result. Output
34
+ files are never overwritten, and existing output is rejected before invoking an
35
+ evaluator. A file with no unmasked prose is not sent to an evaluator.
36
+
37
+ [Back to README](../README.md)
data/docs/writing.md ADDED
@@ -0,0 +1,33 @@
1
+ # Writing commands
2
+
3
+ `writing criteria` prints the packaged common criteria. `writing prompt` adds
4
+ task instructions around those same criteria. Neither command needs an AsciiDoc
5
+ file, a review session, MeCab, or network access. Both accept `--lang ja` and
6
+ `--output FILE`; output defaults to stdout, and an existing output file is never
7
+ overwritten. The prompt asks the agent to read project instructions and evidence;
8
+ it does not supply source facts or authorize edits. Book-specific voice and
9
+ format still come from the book. The OSS-only prose style profile remains with
10
+ the book workflow, not the shared default.
11
+
12
+ The criteria also ask reviewers to compare source and revision for
13
+ modifier targets, condition and exception scope, quantities and their targets,
14
+ parallel relationships, and required order. Preserve each sentence's function
15
+ (including advice, obligations, plans, and actual behavior) separately from plain
16
+ or polite style. Keep the author's style unless a change is requested or the
17
+ book explicitly requires one. Sentence splitting and punctuation changes must
18
+ retain the original relationships; these are contextual review instructions,
19
+ not automatic semantic checks. Saved sessions retain the criteria from their scan.
20
+
21
+ ```sh
22
+ asciidoc-pubkit writing criteria --lang ja
23
+ asciidoc-pubkit writing prompt --lang ja --output writing-prompt.md
24
+ ```
25
+
26
+ For example, `--lang en` exits with an unsupported-language error. No English
27
+ review or writing criteria are shipped in 1.0.1.
28
+
29
+ For a small trial, use `examples/book.adoc` as the scan input. Its Japanese
30
+ paragraphs deliberately contain review candidates; its code block must remain
31
+ unchanged.
32
+
33
+ [Back to README](../README.md)
@@ -9,7 +9,7 @@ require 'pathname'
9
9
  require 'optparse'
10
10
 
11
11
  module AsciidocPubkit
12
- VERSION = '0.9.0'
12
+ VERSION = '1.0.1'
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.9.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - CyberGarage
@@ -53,6 +53,21 @@ files:
53
53
  - data/review-rules.ja.yml
54
54
  - data/writing/ja/criteria.md
55
55
  - data/writing/ja/headings.md
56
+ - docs/architecture.md
57
+ - docs/configuration.md
58
+ - docs/custom-rules.md
59
+ - docs/development.md
60
+ - docs/document-commands.md
61
+ - docs/english-review-research.md
62
+ - docs/installation.md
63
+ - docs/list-review.md
64
+ - docs/prose-evaluation.md
65
+ - docs/references.md
66
+ - docs/replacements.md
67
+ - docs/review-workflow.md
68
+ - docs/rules-and-coverage.md
69
+ - docs/scoring.md
70
+ - docs/writing.md
56
71
  - examples/book.adoc
57
72
  - examples/replacements.yml
58
73
  - exe/asciidoc-pubkit