asciidoc-pubkit 0.1.1 → 0.6.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 +4 -4
- data/CHANGELOG.md +34 -0
- data/README.md +210 -17
- data/data/review-rules.ja.yml +271 -0
- data/data/writing/ja/criteria.md +178 -0
- data/lib/asciidoc_pubkit/cli.rb +44 -10
- data/lib/asciidoc_pubkit/document.rb +5 -0
- data/lib/asciidoc_pubkit/language.rb +16 -0
- data/lib/asciidoc_pubkit/rule_set.rb +57 -0
- data/lib/asciidoc_pubkit/rules.rb +50 -45
- data/lib/asciidoc_pubkit/session.rb +85 -17
- data/lib/asciidoc_pubkit/settings.rb +7 -4
- data/lib/asciidoc_pubkit/writing.rb +33 -0
- data/lib/asciidoc_pubkit.rb +4 -1
- metadata +10 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 40d5596e5b8145d6e367ec2301955cfed5997a79732eaaecf7fcd69509e9c12a
|
|
4
|
+
data.tar.gz: 9bfedb0f4c451c6c175f04721935281c37394f17c10b8c08c9eb836e83340a86
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0416faaaddc07dc7ac062c0c06393165d88c4e95e8bab97e62e775f4ae78c08817354c69119c4e96ac0f65d8db17576bd254825babe848f10e07917ac45c9a38
|
|
7
|
+
data.tar.gz: df1a01d62c8a625921347536303ea7dbba2659e56ecbb546e7abcffcf9f3c57b005e5add24460702ac9413ad18192b130aeb4a092c7ba6d52927cad84b4a81cf
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,39 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## Unreleased
|
|
4
|
+
|
|
5
|
+
## 0.6.0 — 2026-09-30
|
|
6
|
+
|
|
7
|
+
- Add `writing criteria` and `writing prompt` commands backed by one packaged
|
|
8
|
+
Japanese technical prose guide. Include that guide in saved review prompts.
|
|
9
|
+
- Organize the CLI into `writing` and `review` groups and accept `--lang ja` on
|
|
10
|
+
both. Reject unsupported languages explicitly, including document attributes.
|
|
11
|
+
- Save the shared criteria and language with each review session, and update the
|
|
12
|
+
book writing and review skills to use the generated prompts.
|
|
13
|
+
- Refine Japanese review questions for redundant qualifications and generic
|
|
14
|
+
recaps, and document the editorial sources and contextual limits.
|
|
15
|
+
|
|
16
|
+
## 0.1.3 — 2026-09-29
|
|
17
|
+
|
|
18
|
+
- Consolidate Japanese review candidates for terminology, compressed noun
|
|
19
|
+
relationships, operations, and negative qualifications in the packaged rules.
|
|
20
|
+
- Suppress literal candidates contained in longer matched terms, preserving
|
|
21
|
+
allow-list handling, and recognize sahen potential forms before noun rules.
|
|
22
|
+
- Reduce single-file review prompts by emitting each paragraph once, sharing
|
|
23
|
+
context metadata, and compacting JSON; retain all candidates and review settings.
|
|
24
|
+
- Confirm replacement of existing review sessions in interactive scans.
|
|
25
|
+
- Add `review scan --yes` (`-y`) and `--no-input` for batch execution.
|
|
26
|
+
- Preserve previous sessions until replacement scan artifacts are ready.
|
|
27
|
+
|
|
28
|
+
## 0.1.2 — Released
|
|
29
|
+
|
|
30
|
+
- Package default Japanese review rules as a validated UTF-8 YAML file.
|
|
31
|
+
- Support custom rule files through `review scan --rules` and `review.rules`.
|
|
32
|
+
- Save resolved rules in sessions for reproducible prompts and verification.
|
|
33
|
+
- Add concept, distinction, and negative meaning review candidates.
|
|
34
|
+
- Add a Make target for running a local checkout with arbitrary CLI arguments.
|
|
35
|
+
- Require a new review session when upgrading from earlier tool versions.
|
|
36
|
+
|
|
3
37
|
## 0.1.1 — Released
|
|
4
38
|
|
|
5
39
|
- Add contextual phrases, compound nouns, and potential and causative verb forms.
|
data/README.md
CHANGED
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|

|
|
2
2
|

|
|
3
3
|
[](https://rubygems.org/gems/asciidoc-pubkit)
|
|
4
|
+
[](https://github.com/cybergarage/asciidoc-pubkit/actions/workflows/test.yml)
|
|
4
5
|
|
|
5
6
|
# asciidoc-pubkit
|
|
6
7
|
|
|
7
|
-
A toolkit for authoring
|
|
8
|
+
A toolkit for authoring and reviewing AsciiDoc books.
|
|
8
9
|
|
|
9
|
-
|
|
10
|
-
|
|
10
|
+
Version 0.6.0 provides shared Japanese technical writing criteria, an authoring
|
|
11
|
+
prompt, contextual review prompts, and baseline verification for edited manuscripts.
|
|
11
12
|
The CLI, diagnostics, documentation, and generated instructions are in English.
|
|
12
13
|
Japanese text is retained in manuscript excerpts, rule dictionaries, and fixtures.
|
|
13
14
|
|
|
14
15
|
## Status
|
|
15
16
|
|
|
16
|
-
This
|
|
17
|
+
This release does not invoke an AI service, automatically
|
|
17
18
|
rewrite manuscripts, or publish books. EPUB, image, and book scaffolding commands
|
|
18
19
|
are planned extensions, not available features.
|
|
19
20
|
|
|
@@ -22,7 +23,15 @@ Starting with version 0.1.1, the default review backend requires the external Me
|
|
|
22
23
|
command and a UTF-8 IPADIC dictionary. Node.js and textlint are not required.
|
|
23
24
|
Explicit `--tokenizer literal` mode provides limited phrase matching without MeCab.
|
|
24
25
|
|
|
25
|
-
Version 0.1.1
|
|
26
|
+
Version 0.1.1 added morphological analysis. Version 0.1.0 used literal matching.
|
|
27
|
+
|
|
28
|
+
The CLI has `writing` and `review` command groups. Both default to `--lang ja`.
|
|
29
|
+
Language-specific criteria live under `data/writing/<language>/`; review rules
|
|
30
|
+
use `data/review-rules.<language>.yml`. Writing and review have separate lists
|
|
31
|
+
of supported languages, so a future writing language need not imply review
|
|
32
|
+
support. Other languages are reserved for future implementations and now
|
|
33
|
+
return an explicit error. A review session saves its language and the criteria
|
|
34
|
+
used to generate its prompt.
|
|
26
35
|
|
|
27
36
|
## Install from RubyGems
|
|
28
37
|
|
|
@@ -38,6 +47,13 @@ Ruby 3.2 or later is required. RubyGems installs the required Ruby dependencies;
|
|
|
38
47
|
no repository clone or Node.js installation is needed. MeCab and IPADIC must be
|
|
39
48
|
installed separately when using version 0.1.1 or later in the default mode.
|
|
40
49
|
|
|
50
|
+
Generate a writing prompt without an existing manuscript:
|
|
51
|
+
|
|
52
|
+
```sh
|
|
53
|
+
asciidoc-pubkit writing criteria --lang ja
|
|
54
|
+
asciidoc-pubkit writing prompt --lang ja --output writing-prompt.md
|
|
55
|
+
```
|
|
56
|
+
|
|
41
57
|
Run the review workflow from your manuscript directory:
|
|
42
58
|
|
|
43
59
|
```sh
|
|
@@ -59,7 +75,7 @@ Add the gem to your project's `Gemfile` to manage its version with Bundler:
|
|
|
59
75
|
|
|
60
76
|
```ruby
|
|
61
77
|
source 'https://rubygems.org'
|
|
62
|
-
gem 'asciidoc-pubkit', '~> 0.
|
|
78
|
+
gem 'asciidoc-pubkit', '~> 0.6.0'
|
|
63
79
|
```
|
|
64
80
|
|
|
65
81
|
Then install dependencies and run the CLI through Bundler:
|
|
@@ -81,17 +97,64 @@ git clone https://github.com/cybergarage/asciidoc-pubkit.git
|
|
|
81
97
|
cd asciidoc-pubkit
|
|
82
98
|
bundle install
|
|
83
99
|
gem build asciidoc-pubkit.gemspec
|
|
84
|
-
gem install ./asciidoc-pubkit-0.
|
|
100
|
+
gem install ./asciidoc-pubkit-0.6.0.gem
|
|
85
101
|
asciidoc-pubkit --version
|
|
86
102
|
```
|
|
87
103
|
|
|
88
104
|
The gem name and CLI name are `asciidoc-pubkit`; the Ruby require path is
|
|
89
105
|
`asciidoc_pubkit`, and the namespace is `AsciidocPubkit`.
|
|
90
106
|
|
|
107
|
+
## Writing commands
|
|
108
|
+
|
|
109
|
+
`writing criteria` prints the packaged common criteria. `writing prompt` adds
|
|
110
|
+
task instructions around those same criteria. Neither command needs an AsciiDoc
|
|
111
|
+
file, a review session, MeCab, or network access. Both accept `--lang ja` and
|
|
112
|
+
`--output FILE`; output defaults to stdout, and an existing output file is never
|
|
113
|
+
overwritten. The prompt asks the agent to read project instructions and evidence;
|
|
114
|
+
it does not supply source facts or authorize edits. Book-specific voice and
|
|
115
|
+
format still come from the book. The OSS-only prose style profile remains with
|
|
116
|
+
the book workflow, not the shared default.
|
|
117
|
+
|
|
118
|
+
```sh
|
|
119
|
+
asciidoc-pubkit writing criteria --lang ja
|
|
120
|
+
asciidoc-pubkit writing prompt --lang ja --output writing-prompt.md
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
For example, `--lang en` exits with an unsupported-language error. No English
|
|
124
|
+
review or writing criteria are shipped in 0.6.0.
|
|
125
|
+
|
|
91
126
|
For a small trial, use `examples/book.adoc` as the scan input. Its Japanese
|
|
92
127
|
paragraphs deliberately contain review candidates; its code block must remain
|
|
93
128
|
unchanged.
|
|
94
129
|
|
|
130
|
+
## Run from a local checkout
|
|
131
|
+
|
|
132
|
+
Use the `run` Make target to execute the checkout without installing the
|
|
133
|
+
asciidoc-pubkit gem. Ruby dependencies and, for the default tokenizer, MeCab and
|
|
134
|
+
UTF-8 IPADIC must already be installed.
|
|
135
|
+
|
|
136
|
+
```sh
|
|
137
|
+
make run ARGS="--version"
|
|
138
|
+
make run ARGS="review scan examples/book.adoc"
|
|
139
|
+
make run ARGS='review scan "manuscripts/my book.adoc"'
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
With no `ARGS`, `make run` displays CLI help. Set `RUBY` to choose another Ruby
|
|
143
|
+
executable. `ARGS` is shell command-line text; quote paths containing spaces and
|
|
144
|
+
use only trusted arguments.
|
|
145
|
+
|
|
146
|
+
To run from a manuscript directory, select the checkout's Makefile with `-f`.
|
|
147
|
+
Relative manuscript paths and output paths remain relative to your current
|
|
148
|
+
working directory:
|
|
149
|
+
|
|
150
|
+
```sh
|
|
151
|
+
make -f "$HOME/Src/asciidoc-pubkit/Makefile" run ARGS="review scan book.adoc"
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
Use `ARGS` instead of `make review scan book.adoc`: Make interprets positional
|
|
155
|
+
words as build targets, not CLI arguments. Avoid `make -C` when manuscript paths
|
|
156
|
+
should remain relative to the current directory, because it changes directories.
|
|
157
|
+
|
|
95
158
|
## Install the morphological analyzer (0.1.1 and later)
|
|
96
159
|
|
|
97
160
|
On macOS with Homebrew:
|
|
@@ -134,7 +197,7 @@ asciidoc-pubkit review verify .pubkit/review --output verification.json
|
|
|
134
197
|
```
|
|
135
198
|
|
|
136
199
|
All three commands leave manuscript files unchanged. Only the agent edits them.
|
|
137
|
-
|
|
200
|
+
`prompt` and `verify` output files must not already exist.
|
|
138
201
|
Without `--output`, `prompt` writes Markdown and `verify` writes JSON to stdout.
|
|
139
202
|
`scan` defaults to `.pubkit/review` and prints a short summary.
|
|
140
203
|
|
|
@@ -146,6 +209,27 @@ asciidoc-pubkit review scan chapter.adoc --style desu-masu
|
|
|
146
209
|
asciidoc-pubkit review scan book.adoc --attribute edition=print --base-dir .
|
|
147
210
|
```
|
|
148
211
|
|
|
212
|
+
If the session directory already exists, an interactive terminal asks
|
|
213
|
+
`Replace it? [y/N]`. Only `y` or `yes` (case-insensitive) replaces it; any other
|
|
214
|
+
answer or end of input cancels with exit status 2. Replacement resets the review
|
|
215
|
+
baseline and removes old session contents. Use a different `--output` path to
|
|
216
|
+
keep the previous review pass. The old session remains intact if scanning fails
|
|
217
|
+
before the replacement is installed.
|
|
218
|
+
|
|
219
|
+
For batch execution:
|
|
220
|
+
|
|
221
|
+
```sh
|
|
222
|
+
# Answer yes automatically and replace an existing review session.
|
|
223
|
+
asciidoc-pubkit review scan book.adoc --yes # short form: -y
|
|
224
|
+
# Never ask; exit with status 2 if the output already exists.
|
|
225
|
+
asciidoc-pubkit review scan book.adoc --no-input
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
Non-terminal stdin also disables prompting. `--yes --no-input` permits
|
|
229
|
+
replacement without reading stdin. These options apply to `scan` only;
|
|
230
|
+
regular files, symlinks, directories without a review session layout, and
|
|
231
|
+
sessions containing the current manuscript sources cannot be replaced.
|
|
232
|
+
|
|
149
233
|
An entrypoint or a standalone chapter can be scanned. Includes and conditionals
|
|
150
234
|
are processed by Asciidoctor. Match the publishing build's attributes and base
|
|
151
235
|
directory to review the intended edition. `--only` selects one included source
|
|
@@ -184,13 +268,24 @@ asciidoc-pubkit review prompt .pubkit/review --mode diagnose
|
|
|
184
268
|
for findings and proposed revisions without editing. Both modes require the agent
|
|
185
269
|
to distinguish **revise**, **keep**, and **needs-evidence** decisions.
|
|
186
270
|
|
|
187
|
-
The Markdown includes every selected paragraph,
|
|
188
|
-
|
|
189
|
-
|
|
271
|
+
The single Markdown output includes every selected paragraph once, in document
|
|
272
|
+
order, with the shared criteria saved at scan time, candidates, saved settings,
|
|
273
|
+
and preservation instructions. Paragraph
|
|
274
|
+
text uses fenced text blocks; metadata uses compact JSON. File and heading context
|
|
275
|
+
is shared by consecutive paragraphs, and candidates inherit their file and
|
|
276
|
+
paragraph ID. Adjacent entries provide neighboring context without repeating text.
|
|
277
|
+
The prompt asks the agent to read manageable ranges with neighboring paragraphs
|
|
278
|
+
at boundaries and track completed paragraph IDs and candidate decisions. It also
|
|
279
|
+
requires review of paragraphs with no machine matches. Large manuscripts can
|
|
280
|
+
still exceed a context window if the entire prompt is loaded at once. Initial
|
|
190
281
|
support is for local prose correction, not chapter reorganization.
|
|
191
282
|
|
|
192
283
|
Source hashes are checked before generating a prompt. Modified sources, modified
|
|
193
284
|
session artifacts, and incompatible session versions require a fresh scan.
|
|
285
|
+
`review scan`, `review prompt`, and `review verify` accept `--lang ja`; prompt and
|
|
286
|
+
verify check the value against the session language. A non-Japanese language in
|
|
287
|
+
`--lang`, `review.language`, or an explicit AsciiDoc `:lang:` attribute is rejected.
|
|
288
|
+
An omitted `:lang:` attribute uses the selected review language.
|
|
194
289
|
|
|
195
290
|
### Verify
|
|
196
291
|
|
|
@@ -268,16 +363,17 @@ use an absolute path for an explicit executable override.
|
|
|
268
363
|
| --- | --- | --- |
|
|
269
364
|
| `abstract-reference` | hint | Ask what an abstract noun refers to |
|
|
270
365
|
| `weak-predicate` | hint | Ask whether an operation's purpose or result is clear |
|
|
271
|
-
| `contextual-phrase` | hint |
|
|
272
|
-
| `generic-framing` | hint |
|
|
366
|
+
| `contextual-phrase` | hint | Check whether a qualification changes interpretation or action; preserve necessary negation |
|
|
367
|
+
| `generic-framing` | hint | Check whether an introduction or recap adds a claim, scope, or consequence |
|
|
273
368
|
| `vague-degree` | hint | Ask what depth, level, scope, or comparison is intended |
|
|
274
369
|
| `repeated-ending` | info | Identify three consecutive sentences with the same detected ending |
|
|
275
370
|
| `glossary-variant` | warning | Identify project-specific terminology variants |
|
|
276
371
|
| `style-candidate` | hint | Check selected polite/plain endings against an explicit style |
|
|
277
372
|
|
|
278
373
|
MeCab mode matches noun and adjective tokens and dictionary forms of verbs.
|
|
279
|
-
Sahen predicates are matched as a noun followed by
|
|
280
|
-
sahen nouns are not treated as verbal predicates.
|
|
374
|
+
Sahen predicates are matched as a noun followed by `する` or the potential
|
|
375
|
+
`できる`; standalone sahen nouns are not treated as verbal predicates. A configured
|
|
376
|
+
sahen predicate takes precedence over a matching standalone noun rule. Auxiliary sequences retain
|
|
281
377
|
negation, past tense, passive forms, and progressive forms in the reported surface.
|
|
282
378
|
The added reach predicate is negative-only; the existing handling predicate is
|
|
283
379
|
reviewed in both affirmative and negative forms. Glossary variants and generic
|
|
@@ -286,6 +382,37 @@ literal matching and suppress overlapping morphological candidates. Compound
|
|
|
286
382
|
nouns are matched across adjacent noun tokens. Selection and narrowing verbs
|
|
287
383
|
include potential forms; predicate surfaces also preserve causative auxiliaries.
|
|
288
384
|
|
|
385
|
+
Default terms group components, actors, relationships, and resources under
|
|
386
|
+
`abstract-reference`; operations under `weak-predicate`; and compressed noun
|
|
387
|
+
relationships, referents, sufficiency, and negative qualifications under
|
|
388
|
+
`contextual-phrase`. `木` and `余白` invite a context-dependent katakana terminology
|
|
389
|
+
review, not mandatory replacement. `明示選択` and `欠落理由` invite checking whether
|
|
390
|
+
`明示的選択` and `欠落した理由` clarify the intended relationship. Shared phrases such
|
|
391
|
+
as `ではありません` cover longer qualifications without listing every sentence.
|
|
392
|
+
`generic-framing` also flags `このように` and `要するに` as possible recaps.
|
|
393
|
+
These are candidates for contextual review, not banned expressions. A necessary
|
|
394
|
+
condition, uncertainty, or distinction must survive a revision; a redundant
|
|
395
|
+
disclaimer can instead be removed or folded into a more precise main claim.
|
|
396
|
+
|
|
397
|
+
### Editorial sources for the shared criteria and default candidates
|
|
398
|
+
|
|
399
|
+
The shared criteria and default questions draw on [natural-japanese](https://github.com/coji/natural-japanese)
|
|
400
|
+
for separating mechanical detection from contextual judgment and for spotting
|
|
401
|
+
repetitive framing; [日本語技術文書の文章規範](https://gist.github.com/k16shikano/fd287c3133457c4fd8f5601d34aa817d)
|
|
402
|
+
for paragraph logic, evidence scope, and preserving meaningful uncertainty; and
|
|
403
|
+
[AI臭い文章とは何なのか](https://speakerdeck.com/nasuvitz/ai-kusai-bunshou-toha-nanina-no-ka)
|
|
404
|
+
for the examples of unnecessary contrast, abstract referents, and paired short
|
|
405
|
+
sentences. These sources differ on stylistic choices such as whether a heading
|
|
406
|
+
should state its conclusion. The packaged rules therefore report candidate
|
|
407
|
+
phrases and leave document structure, genre conventions, and final edits to the
|
|
408
|
+
reviewer.
|
|
409
|
+
|
|
410
|
+
Literal term matching suppresses matches strictly contained in a longer matched
|
|
411
|
+
term, across categories. The longer term also suppresses contained matches when
|
|
412
|
+
it is allowed; separate occurrences remain candidates. Glossary and style checks
|
|
413
|
+
are independent. In MeCab mode, predicates outside a contextual phrase can still
|
|
414
|
+
be reported separately.
|
|
415
|
+
|
|
289
416
|
Morphological candidates include `lemma`, `part_of_speech`, `negative`, and
|
|
290
417
|
`detector` alongside the original `match`, line, and column. Negation detection
|
|
291
418
|
covers common IPADIC negative auxiliaries; it is not full semantic analysis of
|
|
@@ -298,12 +425,12 @@ reports analyzer changes instead of treating results from different dictionaries
|
|
|
298
425
|
as directly comparable. Prompt generation uses saved evidence and does not need
|
|
299
426
|
MeCab. Changed rules or dictionary settings require a new scan.
|
|
300
427
|
|
|
301
|
-
Sessions from
|
|
428
|
+
Sessions from earlier tool versions are not compatible with 0.6.0. Keep the original baseline for
|
|
302
429
|
an ongoing review and finish it with the original version, or start a new review
|
|
303
430
|
pass in a different directory:
|
|
304
431
|
|
|
305
432
|
```sh
|
|
306
|
-
asciidoc-pubkit review scan book.adoc --output .pubkit/review-0.
|
|
433
|
+
asciidoc-pubkit review scan book.adoc --output .pubkit/review-0.6.0
|
|
307
434
|
```
|
|
308
435
|
|
|
309
436
|
Severity describes review priority, not proof of an error. There is no AI-authorship
|
|
@@ -341,3 +468,69 @@ GitHub Actions is configured for Ruby 3.2, 3.3, 3.4, and 4.0 on Linux.
|
|
|
341
468
|
Copyright 2026 CyberGarage.
|
|
342
469
|
|
|
343
470
|
Licensed under the Apache License, Version 2.0. See [LICENSE](LICENSE).
|
|
471
|
+
|
|
472
|
+
## Customize review rules
|
|
473
|
+
|
|
474
|
+
The UTF-8 YAML file [`data/review-rules.ja.yml`](data/review-rules.ja.yml) is
|
|
475
|
+
included in the gem and loaded by default. Edit that file when running a local
|
|
476
|
+
checkout, or copy it to a project-owned file for custom rules. No Ruby changes
|
|
477
|
+
are required to update candidate terms.
|
|
478
|
+
|
|
479
|
+
```sh
|
|
480
|
+
asciidoc-pubkit review scan book.adoc --rules ./review-rules.yml
|
|
481
|
+
make run ARGS="review scan book.adoc --rules ./review-rules.yml"
|
|
482
|
+
```
|
|
483
|
+
|
|
484
|
+
For an installed gem, copy the default file with:
|
|
485
|
+
|
|
486
|
+
```sh
|
|
487
|
+
ruby -rasciidoc_pubkit -e 'puts File.read(AsciidocPubkit::RuleSet::DEFAULT_PATH)' > review-rules.yml
|
|
488
|
+
```
|
|
489
|
+
|
|
490
|
+
Alternatively, configure a path in `.asciidoc-pubkit.yml`:
|
|
491
|
+
|
|
492
|
+
```yaml
|
|
493
|
+
review:
|
|
494
|
+
rules: review-rules.yml
|
|
495
|
+
```
|
|
496
|
+
|
|
497
|
+
Precedence is `--rules`, then `review.rules`, then the packaged default.
|
|
498
|
+
CLI paths are relative to the current working directory; configuration paths
|
|
499
|
+
are relative to the configuration file. A custom file replaces the entire rule
|
|
500
|
+
set; it is not merged with defaults. Start by copying the standard file.
|
|
501
|
+
|
|
502
|
+
### Rule file format (schema version 1)
|
|
503
|
+
|
|
504
|
+
All top-level fields below are required. Unknown keys and invalid types are
|
|
505
|
+
rejected. YAML aliases and object tags are not supported.
|
|
506
|
+
|
|
507
|
+
| Field | Format and behavior |
|
|
508
|
+
| --- | --- |
|
|
509
|
+
| `schema_version` | Integer `1` |
|
|
510
|
+
| `terms` | Mapping containing all five categories listed below |
|
|
511
|
+
| `verbs` | Mapping from canonical verb forms to nonempty arrays of MeCab/IPADIC dictionary forms; each dictionary form belongs to only one canonical form |
|
|
512
|
+
| `sahen` | Array of nouns matched with a following `する` or potential `できる` verb |
|
|
513
|
+
| `negative_only` | Array of canonical predicates restricted to negative forms; use the noun plus `する` for sahen predicates |
|
|
514
|
+
| `compound_nouns` | Array of terms matched across contiguous noun tokens; each must also appear in `abstract-reference.terms` |
|
|
515
|
+
|
|
516
|
+
Each `terms` category must contain `terms` (an array of unique nonempty strings)
|
|
517
|
+
and `question` (a nonempty review instruction string). The required categories
|
|
518
|
+
are `abstract-reference`, `weak-predicate`, `vague-degree`, `contextual-phrase`,
|
|
519
|
+
and `generic-framing`. Empty term arrays disable that category's literal
|
|
520
|
+
candidates. Empty `verbs`, `sahen`, and `compound_nouns` collections disable their
|
|
521
|
+
respective morphological matchers. Keep `negative_only` consistent with the
|
|
522
|
+
configured predicates.
|
|
523
|
+
|
|
524
|
+
In literal mode, all category term lists use exact phrase matching. In MeCab
|
|
525
|
+
mode, abstract nouns and degree adjectives use dictionary forms, while predicates
|
|
526
|
+
use `verbs` and `sahen`; add a predicate's desired literal surface to
|
|
527
|
+
`weak-predicate.terms` as well if literal mode should detect it. Contextual and
|
|
528
|
+
generic framing phrases use literal matching in both modes. Questions apply to
|
|
529
|
+
both detectors. Glossary, style, repeated-ending checks, inline exclusions, and
|
|
530
|
+
morphological suffix handling remain implemented in Ruby.
|
|
531
|
+
|
|
532
|
+
A scan saves the resolved rule contents and source path in `manifest.json`.
|
|
533
|
+
Prompt generation and verification use the saved contents, even if the original
|
|
534
|
+
YAML file is subsequently edited or removed. Start a new session to apply rule
|
|
535
|
+
changes. Older sessions without a rule snapshot fall back to the currently
|
|
536
|
+
installed default file; start a new session for reproducible custom-rule reviews.
|
|
@@ -0,0 +1,271 @@
|
|
|
1
|
+
---
|
|
2
|
+
schema_version: 1
|
|
3
|
+
terms:
|
|
4
|
+
abstract-reference:
|
|
5
|
+
terms:
|
|
6
|
+
# Concepts, evidence, and explanatory frames.
|
|
7
|
+
- 契約
|
|
8
|
+
- 観点
|
|
9
|
+
- 意図
|
|
10
|
+
- 役割
|
|
11
|
+
- 根拠
|
|
12
|
+
- 概念
|
|
13
|
+
- 記述
|
|
14
|
+
# Components, actors, and hierarchical relationships.
|
|
15
|
+
- 構成要素
|
|
16
|
+
- 部品
|
|
17
|
+
- 開発者
|
|
18
|
+
- 祖先
|
|
19
|
+
- 子孫
|
|
20
|
+
# Scope, separation, and organization.
|
|
21
|
+
- 境界
|
|
22
|
+
- 土台
|
|
23
|
+
- 橋渡し
|
|
24
|
+
- 入口
|
|
25
|
+
- 場所
|
|
26
|
+
- 一続き
|
|
27
|
+
- 区別
|
|
28
|
+
- 単発
|
|
29
|
+
- 別枠
|
|
30
|
+
# Resources and preparation.
|
|
31
|
+
- コスト
|
|
32
|
+
- 予算
|
|
33
|
+
- 準備
|
|
34
|
+
# Review context before choosing a katakana technical term.
|
|
35
|
+
- 木
|
|
36
|
+
- 余白
|
|
37
|
+
question: Identify the concrete referent, components, or measurable work. Keep
|
|
38
|
+
established technical meanings. For 木 and 余白, consider a context-appropriate
|
|
39
|
+
katakana term (such as ツリー or マージン) only when it names the intended concept.
|
|
40
|
+
weak-predicate:
|
|
41
|
+
terms:
|
|
42
|
+
# Use, interpretation, and understanding (literal-mode surfaces).
|
|
43
|
+
- 利用します
|
|
44
|
+
- 扱います
|
|
45
|
+
- 扱いません
|
|
46
|
+
- 意味しません
|
|
47
|
+
- 把握します
|
|
48
|
+
- 捉えます
|
|
49
|
+
# Writing, representation, and inspection.
|
|
50
|
+
- 記述します
|
|
51
|
+
- 記述できます
|
|
52
|
+
- 書きます
|
|
53
|
+
- 示します
|
|
54
|
+
- 表します
|
|
55
|
+
- 表しません
|
|
56
|
+
- 読みます
|
|
57
|
+
- 調べます
|
|
58
|
+
- 調べられます
|
|
59
|
+
- 確かめます
|
|
60
|
+
- 探します
|
|
61
|
+
- 追えます
|
|
62
|
+
# Construction, preparation, and combination.
|
|
63
|
+
- 用意します
|
|
64
|
+
- 作ります
|
|
65
|
+
- 組み立てられます
|
|
66
|
+
- 組み合わせます
|
|
67
|
+
- 成り立たせています
|
|
68
|
+
# Organization, comparison, and selection.
|
|
69
|
+
- 整理します
|
|
70
|
+
- 分ける
|
|
71
|
+
- 分けて
|
|
72
|
+
- 分けています
|
|
73
|
+
- 分けません
|
|
74
|
+
- 分けられます
|
|
75
|
+
- 区別します
|
|
76
|
+
- 区別できます
|
|
77
|
+
- 混同しません
|
|
78
|
+
- 混ぜません
|
|
79
|
+
- そろえます
|
|
80
|
+
- そろいます
|
|
81
|
+
- まとまっています
|
|
82
|
+
- 選びます
|
|
83
|
+
- 選べます
|
|
84
|
+
- 絞れます
|
|
85
|
+
- 決まります
|
|
86
|
+
# Change, transfer, and retention.
|
|
87
|
+
- 変わります
|
|
88
|
+
- 書き換える
|
|
89
|
+
- 置き換えます
|
|
90
|
+
- 加えます
|
|
91
|
+
- 加わります
|
|
92
|
+
- 付けます
|
|
93
|
+
- 返す
|
|
94
|
+
- 返します
|
|
95
|
+
- 渡します
|
|
96
|
+
- 送れます
|
|
97
|
+
- 残します
|
|
98
|
+
- 持ちます
|
|
99
|
+
- 消しません
|
|
100
|
+
# Existence, sufficiency, requirements, and completion.
|
|
101
|
+
- あります
|
|
102
|
+
- 足りません
|
|
103
|
+
- 求めます
|
|
104
|
+
- 到達しません
|
|
105
|
+
- 避けられます
|
|
106
|
+
- 終えられます
|
|
107
|
+
- 抜けられます
|
|
108
|
+
- 解消する
|
|
109
|
+
question: Check whether the purpose, operation, or result is clear from the surrounding
|
|
110
|
+
paragraph. Preserve negation and conditions.
|
|
111
|
+
vague-degree:
|
|
112
|
+
terms:
|
|
113
|
+
- 浅い
|
|
114
|
+
- 深い
|
|
115
|
+
question: Identify the concrete depth, level, scope, or comparison. Keep literal
|
|
116
|
+
measurements and established technical meanings.
|
|
117
|
+
contextual-phrase:
|
|
118
|
+
terms:
|
|
119
|
+
- これらを
|
|
120
|
+
- であることだけでは
|
|
121
|
+
- あるものとします
|
|
122
|
+
# Retain this specific phrase for existing allow lists and fuller evidence.
|
|
123
|
+
- わけではありません
|
|
124
|
+
- 別です
|
|
125
|
+
# Compressed noun relationships; suggestions are not automatic replacements.
|
|
126
|
+
- 明示選択
|
|
127
|
+
- 欠落理由
|
|
128
|
+
# Referents, separation, evaluation, and sufficiency.
|
|
129
|
+
- よいこと
|
|
130
|
+
- おそれ
|
|
131
|
+
- 別の
|
|
132
|
+
- 別に
|
|
133
|
+
- 空の
|
|
134
|
+
- 別々に
|
|
135
|
+
- ことだけで
|
|
136
|
+
- 目安です
|
|
137
|
+
- 必要がありません
|
|
138
|
+
# Shared qualifications cover longer expressions without enumerating them.
|
|
139
|
+
- ではありません
|
|
140
|
+
- にはなりません
|
|
141
|
+
- にはできません
|
|
142
|
+
- にはしません
|
|
143
|
+
- ことはしません
|
|
144
|
+
- 代用にしません
|
|
145
|
+
- でもありません
|
|
146
|
+
- してはいけません
|
|
147
|
+
- 表してはいません
|
|
148
|
+
question: Check whether the phrase adds a condition that changes the reader's
|
|
149
|
+
interpretation or action. If it only denies an overbroad reading already
|
|
150
|
+
excluded by the main claim, revise that claim or remove the qualification.
|
|
151
|
+
Preserve necessary negation, uncertainty, and technical boundaries. For
|
|
152
|
+
明示選択 and 欠落理由, consider making the relationship explicit (明示的選択 and
|
|
153
|
+
欠落した理由) if that preserves the meaning.
|
|
154
|
+
generic-framing:
|
|
155
|
+
terms:
|
|
156
|
+
- 重要なのは
|
|
157
|
+
- ポイントは
|
|
158
|
+
- 本章では
|
|
159
|
+
- ここでは
|
|
160
|
+
- まとめると
|
|
161
|
+
- このように
|
|
162
|
+
- 要するに
|
|
163
|
+
question: Check whether this opening or recap adds a claim, scope, or consequence
|
|
164
|
+
beyond the surrounding prose. Keep useful framing; otherwise state the
|
|
165
|
+
substantive claim directly. Do not force a uniform sentence pattern.
|
|
166
|
+
verbs:
|
|
167
|
+
扱う:
|
|
168
|
+
- 扱う
|
|
169
|
+
示す:
|
|
170
|
+
- 示す
|
|
171
|
+
変わる:
|
|
172
|
+
- 変わる
|
|
173
|
+
分ける:
|
|
174
|
+
- 分ける
|
|
175
|
+
そろえる:
|
|
176
|
+
- そろえる
|
|
177
|
+
- 揃える
|
|
178
|
+
まとまる:
|
|
179
|
+
- まとまる
|
|
180
|
+
- 纏まる
|
|
181
|
+
加える:
|
|
182
|
+
- 加える
|
|
183
|
+
探す:
|
|
184
|
+
- 探す
|
|
185
|
+
そろう:
|
|
186
|
+
- そろう
|
|
187
|
+
- 揃う
|
|
188
|
+
選ぶ:
|
|
189
|
+
- 選ぶ
|
|
190
|
+
- 選べる
|
|
191
|
+
成り立つ:
|
|
192
|
+
- 成り立つ
|
|
193
|
+
確かめる:
|
|
194
|
+
- 確かめる
|
|
195
|
+
書き換える:
|
|
196
|
+
- 書き換える
|
|
197
|
+
絞る:
|
|
198
|
+
- 絞る
|
|
199
|
+
- 絞れる
|
|
200
|
+
渡す:
|
|
201
|
+
- 渡す
|
|
202
|
+
決まる:
|
|
203
|
+
- 決まる
|
|
204
|
+
組み立てる:
|
|
205
|
+
- 組み立てる
|
|
206
|
+
組み合わせる:
|
|
207
|
+
- 組み合わせる
|
|
208
|
+
足りる:
|
|
209
|
+
- 足りる
|
|
210
|
+
置き換える:
|
|
211
|
+
- 置き換える
|
|
212
|
+
加わる:
|
|
213
|
+
- 加わる
|
|
214
|
+
返す:
|
|
215
|
+
- 返す
|
|
216
|
+
避ける:
|
|
217
|
+
- 避ける
|
|
218
|
+
求める:
|
|
219
|
+
- 求める
|
|
220
|
+
送る:
|
|
221
|
+
- 送る
|
|
222
|
+
- 送れる
|
|
223
|
+
読む:
|
|
224
|
+
- 読む
|
|
225
|
+
付ける:
|
|
226
|
+
- 付ける
|
|
227
|
+
残す:
|
|
228
|
+
- 残す
|
|
229
|
+
持つ:
|
|
230
|
+
- 持つ
|
|
231
|
+
表す:
|
|
232
|
+
- 表す
|
|
233
|
+
終える:
|
|
234
|
+
- 終える
|
|
235
|
+
消す:
|
|
236
|
+
- 消す
|
|
237
|
+
調べる:
|
|
238
|
+
- 調べる
|
|
239
|
+
作る:
|
|
240
|
+
- 作る
|
|
241
|
+
抜ける:
|
|
242
|
+
- 抜ける
|
|
243
|
+
捉える:
|
|
244
|
+
- 捉える
|
|
245
|
+
書く:
|
|
246
|
+
- 書く
|
|
247
|
+
混ぜる:
|
|
248
|
+
- 混ぜる
|
|
249
|
+
追う:
|
|
250
|
+
- 追う
|
|
251
|
+
- 追える
|
|
252
|
+
ある:
|
|
253
|
+
- ある
|
|
254
|
+
sahen:
|
|
255
|
+
- 利用
|
|
256
|
+
- 整理
|
|
257
|
+
- 把握
|
|
258
|
+
- 到達
|
|
259
|
+
- 意味
|
|
260
|
+
- 記述
|
|
261
|
+
- 用意
|
|
262
|
+
- 区別
|
|
263
|
+
- 解消
|
|
264
|
+
- 混同
|
|
265
|
+
negative_only:
|
|
266
|
+
- 到達する
|
|
267
|
+
- 意味する
|
|
268
|
+
compound_nouns:
|
|
269
|
+
- 一続き
|
|
270
|
+
- 開発者
|
|
271
|
+
- 構成要素
|