@unbrained/pm-lint 2026.10.13 → 2026.10.29
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.
- package/CHANGELOG.md +9 -1
- package/README.md +122 -9
- package/dist/index.d.ts +13 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +11 -2
- package/dist/index.js.map +1 -1
- package/dist/src/baseline-file.d.ts.map +1 -1
- package/dist/src/baseline-file.js +26 -10
- package/dist/src/baseline-file.js.map +1 -1
- package/dist/src/baseline.d.ts +3 -4
- package/dist/src/baseline.d.ts.map +1 -1
- package/dist/src/baseline.js +2 -2
- package/dist/src/baseline.js.map +1 -1
- package/dist/src/commands.js +1 -1
- package/dist/src/commands.js.map +1 -1
- package/dist/src/engine.d.ts +12 -3
- package/dist/src/engine.d.ts.map +1 -1
- package/dist/src/engine.js +28 -14
- package/dist/src/engine.js.map +1 -1
- package/dist/src/incremental-command.d.ts +6 -0
- package/dist/src/incremental-command.d.ts.map +1 -0
- package/dist/src/incremental-command.js +27 -0
- package/dist/src/incremental-command.js.map +1 -0
- package/dist/src/incremental-contract.d.ts +72 -0
- package/dist/src/incremental-contract.d.ts.map +1 -0
- package/dist/src/incremental-contract.js +142 -0
- package/dist/src/incremental-contract.js.map +1 -0
- package/dist/src/incremental-file.d.ts +13 -0
- package/dist/src/incremental-file.d.ts.map +1 -0
- package/dist/src/incremental-file.js +119 -0
- package/dist/src/incremental-file.js.map +1 -0
- package/dist/src/incremental.d.ts +41 -0
- package/dist/src/incremental.d.ts.map +1 -0
- package/dist/src/incremental.js +116 -0
- package/dist/src/incremental.js.map +1 -0
- package/dist/src/rule-pack-command.d.ts.map +1 -1
- package/dist/src/rule-pack-command.js +10 -4
- package/dist/src/rule-pack-command.js.map +1 -1
- package/dist/src/rule-pack-conflicts.d.ts +22 -0
- package/dist/src/rule-pack-conflicts.d.ts.map +1 -0
- package/dist/src/rule-pack-conflicts.js +75 -0
- package/dist/src/rule-pack-conflicts.js.map +1 -0
- package/dist/src/rule-pack-contract.d.ts +59 -0
- package/dist/src/rule-pack-contract.d.ts.map +1 -0
- package/dist/src/rule-pack-contract.js +161 -0
- package/dist/src/rule-pack-contract.js.map +1 -0
- package/dist/src/rule-pack.d.ts +4 -54
- package/dist/src/rule-pack.d.ts.map +1 -1
- package/dist/src/rule-pack.js +23 -136
- package/dist/src/rule-pack.js.map +1 -1
- package/dist/src/rules.d.ts +2 -0
- package/dist/src/rules.d.ts.map +1 -1
- package/dist/src/rules.js +4 -1
- package/dist/src/rules.js.map +1 -1
- package/dist/src/sidecar-publication.d.ts +39 -0
- package/dist/src/sidecar-publication.d.ts.map +1 -0
- package/dist/src/sidecar-publication.js +105 -0
- package/dist/src/sidecar-publication.js.map +1 -0
- package/dist/src/statuses.d.ts +8 -0
- package/dist/src/statuses.d.ts.map +1 -0
- package/dist/src/statuses.js +10 -0
- package/dist/src/statuses.js.map +1 -0
- package/docs/conflicting-rule-packs.md +106 -0
- package/docs/incremental-example.md +64 -0
- package/docs/incremental-validation.md +99 -0
- package/examples/conflicting-rules.json +21 -0
- package/manifest.json +2 -2
- package/package.json +27 -14
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
# Conflicting organization rules
|
|
2
|
+
|
|
3
|
+
```sh
|
|
4
|
+
pm lint conflicts --pack examples/conflicting-rules.json --json
|
|
5
|
+
pm lint conflicts --pack examples/conflicting-rules.json
|
|
6
|
+
```
|
|
7
|
+
|
|
8
|
+
The example requires and forbids `reviewed` in the same scope. Both renderers
|
|
9
|
+
return the declared rule IDs `ORG.forbid-review` and `ORG.require-review` as the
|
|
10
|
+
smallest witness, with `status: conflict` and exit 1. No tracker read is needed.
|
|
11
|
+
|
|
12
|
+
```ts
|
|
13
|
+
import { analyzeRulePack, readRulePack } from '@unbrained/pm-lint';
|
|
14
|
+
|
|
15
|
+
const pack = await readRulePack('examples/conflicting-rules.json');
|
|
16
|
+
const analysis = analyzeRulePack(pack);
|
|
17
|
+
console.log(analysis.status, analysis.witness?.rule_ids, analysis.remedy);
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
The additive version 1 grammar supports these field/operator pairs:
|
|
21
|
+
|
|
22
|
+
| Field | Predicate | Domain |
|
|
23
|
+
| --- | --- | --- |
|
|
24
|
+
| `tags` | `required_tag`, `forbidden_tag` with a string `value` | One literal tag, normalized by the SDK's `toImportTags` on both inputs and stored rows |
|
|
25
|
+
| `priority` | `min_value`, `max_value` with an integer `value` | Inclusive native priorities 0 through 4 |
|
|
26
|
+
| Existing text fields | `present`, `min_length`, `max_length` | UTF-16 length 0 through 65,536; a native title is nonempty |
|
|
27
|
+
|
|
28
|
+
For example, `priority >= 3` and `priority <= 2` form a two-rule witness.
|
|
29
|
+
Equal bounds are compatible. `present` and `max_length: 0` conflict; a title
|
|
30
|
+
`max_length: 0` is impossible alone because native titles cannot be empty.
|
|
31
|
+
All severities participate: advisory assertions can contradict one another too.
|
|
32
|
+
|
|
33
|
+
The 512-unit literal ceiling applies to both the supplied and canonical UTF-16
|
|
34
|
+
tag. Unicode lowercasing can expand text: 256 repetitions of U+0130 normalize
|
|
35
|
+
to exactly 512 units and remain valid; 257 or 300 repetitions refuse with
|
|
36
|
+
`limit_exceeded` before analysis or tracker access. File reads, repeated SDK
|
|
37
|
+
parsing, policy evaluation and JSON/TOON commands use this same boundary.
|
|
38
|
+
|
|
39
|
+
Each `when.statuses` and `when.types` list is an exact OR selector; dimensions
|
|
40
|
+
are ANDed. A witness includes their nonempty intersection. Disjoint selectors
|
|
41
|
+
cannot conflict. Status names are exact configured identities, with no lifecycle
|
|
42
|
+
interpretation. Rename selectors when the configured identities change.
|
|
43
|
+
Policy admission examines every potentially applicable selector intersection,
|
|
44
|
+
even if the current tracker has no matching item.
|
|
45
|
+
|
|
46
|
+
`compatible` means the supported conjunction is satisfiable in its documented
|
|
47
|
+
domain. `contains`, `not_contains` and `starts_with` remain valid for policy
|
|
48
|
+
evaluation but are outside this analyzer's proof fragment. They produce
|
|
49
|
+
`unknown` and `unknown_rule_ids` when no supported contradiction exists. A
|
|
50
|
+
supported conflict remains a proof even when other rules are unknown. Unknown
|
|
51
|
+
operator names, executable predicates and malformed packs remain typed refusals;
|
|
52
|
+
they are not silently accepted as an expanded grammar.
|
|
53
|
+
|
|
54
|
+
Witnesses have minimum cardinality within the documented proof fragment, across
|
|
55
|
+
the whole pack, rather than just being irreducible after greedy removal. Every
|
|
56
|
+
supported core has one or two rules. Singletons win over pairs; ties choose the
|
|
57
|
+
lexicographically first sorted rule-ID tuple, independently of input ordering
|
|
58
|
+
or locale. IDs are the pack's unique, declared identities; no random IDs or
|
|
59
|
+
content-derived replacements are generated. Unknown predicates cannot conceal
|
|
60
|
+
a smaller singleton contradiction in this grammar. A witness does not claim
|
|
61
|
+
to enumerate every contradiction involving predicates outside the fragment.
|
|
62
|
+
|
|
63
|
+
The analyzer uses the same strict parser and preflight as `pm lint pack`.
|
|
64
|
+
Applying a proven inconsistent pack returns `conflicting_pack`, its rule IDs and
|
|
65
|
+
a remedy before any SDK corpus read. An unknown analysis permits the existing
|
|
66
|
+
literal evaluator to inspect item compliance; it does not assert satisfiability.
|
|
67
|
+
The analysis command exits 0 for compatible, 1 for conflict, and 2 for unknown
|
|
68
|
+
or a typed refusal. The policy command retains its finding exit codes and
|
|
69
|
+
returns 2 for a proven contradictory policy.
|
|
70
|
+
|
|
71
|
+
Existing version 1 producers, IDs, text semantics and serialization order remain
|
|
72
|
+
valid. Sparse SDK arrays and incompatible field/operator combinations refuse.
|
|
73
|
+
The common 64-rule, 64-KiB, finite-integer and selector bounds apply before
|
|
74
|
+
analysis. Output contains only bounded IDs, selectors, counts and remedies, with
|
|
75
|
+
no item bodies; host TOON/JSON transport applies normally. Analysis costs at
|
|
76
|
+
most 2,016 pair checks plus a singleton pass. Every emitted count is an exact
|
|
77
|
+
bounded integer. The feature creates no items, state files, journals, replay
|
|
78
|
+
keys, leases or shared mutable state, and introduces no import/export/sync
|
|
79
|
+
mutation path.
|
|
80
|
+
|
|
81
|
+
The seeded model regression executes 500 operation sequences including old
|
|
82
|
+
pack/document replays, JSON/TOON and Markdown storage, whitespace/CRLF variants,
|
|
83
|
+
relationships, ambient focus and every native field selected by the grammar.
|
|
84
|
+
An independent finite-domain oracle checks global minimum witnesses; two real
|
|
85
|
+
non-git SDK trackers supply normalization and native read-back. It also covers
|
|
86
|
+
producer/parser round trips. The finite oracle is exhaustive for its generated
|
|
87
|
+
tag and bounded-integer domain; it makes no claim about arbitrary text programs.
|
|
88
|
+
|
|
89
|
+
## Public tracker validation
|
|
90
|
+
|
|
91
|
+
The validation command is `node test/public-conflict-validation.ts <copy>`.
|
|
92
|
+
Use an immutable, read-only public tracker copy outside git. The receipt reports
|
|
93
|
+
corpus/rule/check/finding counts, both witness sizes, JSON/TOON bytes, reordered
|
|
94
|
+
result equality and a before/after inventory hash. Aggregate measurements and
|
|
95
|
+
the exact public source revision are recorded in the PR and package tracker.
|
|
96
|
+
|
|
97
|
+
Measured against public pm-lint main revision
|
|
98
|
+
`57a49b5b9e2b4d69f2a80b4b9f1da33af7ef9b0e`: 23 items, 3 rules,
|
|
99
|
+
69 checks and 24 findings (23 missing reviewed tags, 1 below the lower priority
|
|
100
|
+
bound, 0 above the upper bound). Both conflict fixtures returned size-2
|
|
101
|
+
witnesses. The tag-conflict receipt occupied 334 JSON bytes / 313 TOON bytes
|
|
102
|
+
(84 / 79 estimated tokens at four UTF-8 bytes per token). Rule reordering
|
|
103
|
+
preserved the complete result. The read-only snapshot inventory stayed
|
|
104
|
+
`aeef29c3eeaa99af5eb146a43a8fa90b5cd88defc50a5c363ee6dfe500447912`.
|
|
105
|
+
This is policy diagnosis on one public corpus, not a judgment that its items
|
|
106
|
+
must follow the synthetic reviewed-tag policy.
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# Complete incremental lint through the SDK
|
|
2
|
+
|
|
3
|
+
```ts
|
|
4
|
+
import {
|
|
5
|
+
filesystemLintSource, lintIncrementalFile,
|
|
6
|
+
lintIncremental, parseIncrementalCheckpoint,
|
|
7
|
+
} from '@unbrained/pm-lint';
|
|
8
|
+
import type { IncrementalLintSource } from '@unbrained/pm-lint';
|
|
9
|
+
|
|
10
|
+
const source = filesystemLintSource('.agents/pm');
|
|
11
|
+
const first = await lintIncrementalFile(source, 'lint.local.json', true);
|
|
12
|
+
const next = await lintIncrementalFile(source, 'lint.local.json');
|
|
13
|
+
console.log(next.result.count, next.incremental.evaluated, next.incremental.reused);
|
|
14
|
+
|
|
15
|
+
// A service supplies native SDK capabilities and a stable workspace identity.
|
|
16
|
+
const serviceSource: IncrementalLintSource = source;
|
|
17
|
+
const scan = await lintIncremental(serviceSource, {
|
|
18
|
+
checkpoint: parseIncrementalCheckpoint(first.checkpoint),
|
|
19
|
+
});
|
|
20
|
+
// Persist scan.checkpoint with the service's revision-based compare-and-set.
|
|
21
|
+
// On conflict, read the winner and rerun against CURRENT SDK state.
|
|
22
|
+
console.log(scan.result.findings);
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
`lintIncremental` performs no native item writes or checkpoint I/O. The caller
|
|
26
|
+
owns checkpoint persistence. Read its previous checkpoint inside a lease or
|
|
27
|
+
compare-and-set loop, revalidate source revisions before publication and release
|
|
28
|
+
ownership last. Never replay an old saved result as an item mutation plan.
|
|
29
|
+
`lintIncrementalFile` provides these checks for local storage and uses core's
|
|
30
|
+
owned lease and a guarded atomic publisher. State must be a regular file in an existing
|
|
31
|
+
writable directory; peers using directory aliases share the same lock.
|
|
32
|
+
|
|
33
|
+
The CLI returns the normal complete lint verdict plus an `incremental` receipt:
|
|
34
|
+
|
|
35
|
+
```json
|
|
36
|
+
{"mode":"update","changed_items":1,"evaluated":30003,"reused":49997}
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
This excerpt omits the full receipt's SDK event/page counts and ten `by_rule`
|
|
40
|
+
rows. The 10,000-item fixture uses all default rules: three applicable global
|
|
41
|
+
checks run for every active item, three title-sensitive local pairs rerun, and
|
|
42
|
+
49,997 local pairs are reused. PML004 and PML009 are out of scope in that fixture.
|
|
43
|
+
|
|
44
|
+
Expected refusals throw `IncrementalRefusal` in the SDK; the CLI renders
|
|
45
|
+
`{ok:false, refusal:{code,message,remedy}}` with exit 2. Ordinary findings retain
|
|
46
|
+
lint's severity policy and exit 0/1. Resource exhaustion, policy drift and cursor
|
|
47
|
+
loss never become a passing partial scan. Whole-corpus SDK certification errors
|
|
48
|
+
retain the host diagnostic.
|
|
49
|
+
|
|
50
|
+
Dependency declarations are public via `RULE_DEPENDENCIES`. Whenever predicate
|
|
51
|
+
semantics change, increment `RULE_VERSION`; its digest and the dependency table
|
|
52
|
+
bind each checkpoint. Source identity, complete native metadata and status-role
|
|
53
|
+
policy are also bound. Saved excerpts are limited to the existing 160-character
|
|
54
|
+
finding ceiling and are reused only with identical declared predicate inputs.
|
|
55
|
+
|
|
56
|
+
The feature works without git. It neither launches git nor writes native item
|
|
57
|
+
fields, scope, relationships, claims or journals. `--since`, item filters and
|
|
58
|
+
baseline acknowledgments remain available on the ordinary lint command.
|
|
59
|
+
|
|
60
|
+
Local checkpoint and baseline updates use one publisher: private staging,
|
|
61
|
+
permission/ownership preservation and a final synchronous target-generation
|
|
62
|
+
check immediately before replacement. A competing replacement during an SDK
|
|
63
|
+
read, stage write, sync, close or lease-fence preparation is refused and retained.
|
|
64
|
+
Callers and other writer processes must honor the sidecar's lease/lock protocol.
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
# Incremental lint validation
|
|
2
|
+
|
|
3
|
+
The implementation is checked against fresh certified full scans, genuine SDK
|
|
4
|
+
trackers outside git, checkpoint transport properties and concurrent writers.
|
|
5
|
+
Results and measured numbers are recorded here before review.
|
|
6
|
+
|
|
7
|
+
Public source: `unbraind/pm-lint` at `a813e56`, exported from `origin/main`.
|
|
8
|
+
Authoritative source SHA-256:
|
|
9
|
+
`16b7a56ee139b2681ce3ece7e468d9caea102b1cd32a38f9aee4ee638ffaa7d1`.
|
|
10
|
+
|
|
11
|
+
| Dataset / transition | Items | Findings | Predicates evaluated | Pairs reused | Complete equality |
|
|
12
|
+
| --- | ---: | ---: | ---: | ---: | --- |
|
|
13
|
+
| Immutable public copy, no-op | 21 | 0 | 12 | 54 | yes |
|
|
14
|
+
| Public derivative, one title edit | 21 | 0 | 15 | 51 | yes |
|
|
15
|
+
| Synthetic active corpus, one title edit | 10,000 | 0 | 30,003 | 49,997 | yes |
|
|
16
|
+
|
|
17
|
+
On the shared host, the public-copy rebuild took 3,650 ms, no-op 694 ms,
|
|
18
|
+
title edit 288 ms and warm full scan 98 ms. Its checkpoint was 13,121 bytes.
|
|
19
|
+
The synthetic run under coverage measured 29,761 ms for rebuild and 6,864 ms
|
|
20
|
+
for update, with a 5,959,530-byte checkpoint. These are observations under
|
|
21
|
+
load, not speed guarantees. Public authoritative file names and bytes were
|
|
22
|
+
unchanged; the title edit occurred only in the disposable derivative.
|
|
23
|
+
|
|
24
|
+
The read-only public-data harness is `test/public-incremental-validation.ts`.
|
|
25
|
+
It copies a public tracker into a non-git scratch directory, makes authoritative
|
|
26
|
+
files read only, compares rebuild/no-op results with full lint and fingerprints
|
|
27
|
+
all authoritative names and bytes before/after. A separate disposable derivative
|
|
28
|
+
receives one SDK title edit and is compared with a fresh scan. SDK caches remain
|
|
29
|
+
disposable and are excluded from the authoritative fingerprint.
|
|
30
|
+
|
|
31
|
+
The 10,000-item fixture uses native SDK serialization for seeding and the SDK for
|
|
32
|
+
the title edit and all reads. It asserts complete result equality and exact
|
|
33
|
+
per-rule predicate counts. Performance figures include complete reads and SDK
|
|
34
|
+
certification; they do not assert a universal wall-time speedup.
|
|
35
|
+
|
|
36
|
+
`test/incremental-model.test.ts` uses seed `0x1ace2026` for 500 sequences of native
|
|
37
|
+
document imports, old input/checkpoint replays, JSON/TOON exports, whitespace/CRLF
|
|
38
|
+
variants, complete scans and retry. An independent SDK-read tracker is the
|
|
39
|
+
normalization oracle. Each observational step is an identity transition on
|
|
40
|
+
native state; every result is compared with a fresh full scan. Relationships,
|
|
41
|
+
native authoring fields and bounded excerpts remain covered. A second seeded
|
|
42
|
+
property checks 500 randomly named custom status registries against role-equivalent
|
|
43
|
+
built-in statuses.
|
|
44
|
+
|
|
45
|
+
The interleaving test injects a real competing file writer at all eleven exposed
|
|
46
|
+
boundaries on one non-git tracker, including publication and release. Another
|
|
47
|
+
injects SDK source edits at all nine prepublication boundaries. A lost actual
|
|
48
|
+
core lease cannot publish, a changed source cannot advance the saved checkpoint,
|
|
49
|
+
and foreign or peer state remains untouched. No SDK mocks are used.
|
|
50
|
+
|
|
51
|
+
Review follow-up audits both durable sidecar writers, including baseline
|
|
52
|
+
acknowledgments. `test/publication.test.ts` injects a foreign target after every
|
|
53
|
+
actual SDK read and each staging await, including the final SDK policy read and
|
|
54
|
+
durable sync. It covers staging-inode replacement, identical-byte replacement,
|
|
55
|
+
creation/deletion/mode drift, in-place foreign staging edits, torn reads, owner/group preservation and private
|
|
56
|
+
creation in a traversable directory under a permissive umask. Both JSON and TOON
|
|
57
|
+
CLI paths and packed npm/Bun consumers check that `0600` stays `0600`.
|
|
58
|
+
|
|
59
|
+
Function-only revert proofs fail for each writer: the old checkpoint publisher
|
|
60
|
+
overwrites a final-policy replacement and creates `0666` under umask `000`; the
|
|
61
|
+
old baseline publisher overwrites a replacement during sync and changes an
|
|
62
|
+
existing `0400` file to `0600`. No original regressions were weakened or removed.
|
|
63
|
+
Restoring only inode-based staging cleanup also deletes the in-place foreign
|
|
64
|
+
payload; the corrected cleanup retains it. The final focused set includes all
|
|
65
|
+
original incremental regressions and adapter metadata-failure checks: 31/31
|
|
66
|
+
passed, with 100/100/100/100 measured for both writer adapters and the shared
|
|
67
|
+
publisher.
|
|
68
|
+
|
|
69
|
+
The complete local release gates passed serially at source commit `208f70f`,
|
|
70
|
+
using isolated home directories and Git configuration, Node 24.19.0, npm 11.17.0
|
|
71
|
+
and Bun 1.3.5. Test concurrency remained at most two; thresholds were unchanged.
|
|
72
|
+
|
|
73
|
+
| Command | Main tests | Packed acceptance | Coverage | Total measured time |
|
|
74
|
+
| --- | ---: | ---: | --- | ---: |
|
|
75
|
+
| `npm run release:check` | 179/179 | 1/1 | 100/100/100/100 | 1,804,238 ms |
|
|
76
|
+
| `bun run release:check` | 179/179 | 1/1 | 100/100/100/100 | 2,292,750 ms |
|
|
77
|
+
|
|
78
|
+
Both runs had zero failures, skips, cancellations or todo cases. All 30 measured
|
|
79
|
+
source files met every coverage threshold. Typecheck, lint, zero-duplication,
|
|
80
|
+
docstrings, identity, production audit, dry packing, changelog and publication
|
|
81
|
+
attestation checks passed. Packed acceptance covers npm and Bun global hosts,
|
|
82
|
+
npx/native bunx, direct project-local CLI entrypoints and the packed incremental
|
|
83
|
+
SDK. Its final-policy replacement and permission assertions use the packed SDK;
|
|
84
|
+
the two packed runs took 454,550 ms and 424,134 ms respectively.
|
|
85
|
+
|
|
86
|
+
The subsequent merge of `815ec63` changes only another tracker item's closure
|
|
87
|
+
evidence. Product source, tests, scripts and dependency files remain identical
|
|
88
|
+
to the full-gate source commit. Final tracker/docs receipts are checked with
|
|
89
|
+
tracker health, identity, changelog and diff validation. Pushed-head CI results
|
|
90
|
+
are linked from [PR 32 checks](https://github.com/unbraind/pm-lint/pull/32/checks);
|
|
91
|
+
local source-gate results and CI results are separate receipts.
|
|
92
|
+
|
|
93
|
+
The bounded CI watch at `74774ab` reached approximately 30 minutes with both
|
|
94
|
+
Node 22 and Node 26 jobs still queued and zero executed steps in
|
|
95
|
+
[run 40499927461](https://github.com/unbraind/pm-lint/actions/runs/40499927461).
|
|
96
|
+
[CodeQL](https://github.com/unbraind/pm-lint/actions/runs/40499927369) was also
|
|
97
|
+
queued. No new CI gate pass is claimed. This final tracker/docs receipt does
|
|
98
|
+
not change implementation or tests; its own CI remains separate at PR checks.
|
|
99
|
+
The orchestrator pipeline continues final-head checks and re-review.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 1,
|
|
3
|
+
"rules": [
|
|
4
|
+
{
|
|
5
|
+
"id": "ORG.require-review",
|
|
6
|
+
"field": "tags",
|
|
7
|
+
"predicate": { "op": "required_tag", "value": "reviewed" },
|
|
8
|
+
"severity": "error",
|
|
9
|
+
"explanation": "Work must be reviewed.",
|
|
10
|
+
"remedy": "Add the reviewed tag."
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"id": "ORG.forbid-review",
|
|
14
|
+
"field": "tags",
|
|
15
|
+
"predicate": { "op": "forbidden_tag", "value": "reviewed" },
|
|
16
|
+
"severity": "error",
|
|
17
|
+
"explanation": "This scope excludes reviewed work.",
|
|
18
|
+
"remedy": "Remove the reviewed tag or narrow the policy scope."
|
|
19
|
+
}
|
|
20
|
+
]
|
|
21
|
+
}
|
package/manifest.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pm-lint",
|
|
3
|
-
"version": "2026.10.
|
|
3
|
+
"version": "2026.10.29",
|
|
4
4
|
"description": "Authoring-quality lint rules for useful pm item context",
|
|
5
5
|
"author": "@unbraind",
|
|
6
6
|
"entry": "./dist/index.js",
|
|
7
|
-
"pm_min_version": "2026.10.
|
|
7
|
+
"pm_min_version": "2026.10.23",
|
|
8
8
|
"priority": 90,
|
|
9
9
|
"capabilities": [
|
|
10
10
|
"commands",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unbrained/pm-lint",
|
|
3
|
-
"version": "2026.10.
|
|
3
|
+
"version": "2026.10.29",
|
|
4
4
|
"description": "Authoring-quality lint rules for useful pm item context",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -22,13 +22,16 @@
|
|
|
22
22
|
"LICENSE",
|
|
23
23
|
"CHANGELOG.md",
|
|
24
24
|
"docs/repair-preview-example.md",
|
|
25
|
-
"docs/repair-preview-validation.md"
|
|
25
|
+
"docs/repair-preview-validation.md",
|
|
26
|
+
"docs/incremental-example.md",
|
|
27
|
+
"docs/incremental-validation.md",
|
|
28
|
+
"docs/conflicting-rule-packs.md"
|
|
26
29
|
],
|
|
27
30
|
"scripts": {
|
|
28
31
|
"build": "tsc",
|
|
29
32
|
"build:test": "tsc -p tsconfig.test.json",
|
|
30
|
-
"test": "npm run build && npm run build:test && node --test test/*.test.ts",
|
|
31
|
-
"test:install": "npm run build && node --test --test-reporter=spec test/install.acceptance.ts",
|
|
33
|
+
"test": "npm run build && npm run build:test && node --test --test-concurrency=2 test/*.test.ts",
|
|
34
|
+
"test:install": "npm run build && node --test --test-concurrency=2 --test-reporter=spec test/install.acceptance.ts",
|
|
32
35
|
"prepack": "npm run build",
|
|
33
36
|
"typecheck": "tsc --noEmit && tsc -p tsconfig.test.json",
|
|
34
37
|
"check": "npm run typecheck",
|
|
@@ -50,19 +53,20 @@
|
|
|
50
53
|
"identity:check": "node scripts/identity-gate.ts"
|
|
51
54
|
},
|
|
52
55
|
"peerDependencies": {
|
|
53
|
-
"@unbrained/pm-cli": ">=2026.10.
|
|
56
|
+
"@unbrained/pm-cli": ">=2026.10.23"
|
|
54
57
|
},
|
|
55
58
|
"devDependencies": {
|
|
56
59
|
"@babel/eslint-parser": "8.0.7",
|
|
57
60
|
"@babel/plugin-syntax-typescript": "8.0.3",
|
|
58
61
|
"@types/node": "26.6.5",
|
|
59
|
-
"@unbrained/pm-cli": "2026.10.
|
|
62
|
+
"@unbrained/pm-cli": "2026.10.26",
|
|
60
63
|
"c8": "^12.0.0",
|
|
61
64
|
"eslint": "10.13.0",
|
|
62
|
-
"jscpd": "5.4.
|
|
63
|
-
"pm-changelog": "2026.10.
|
|
64
|
-
"pm-ops": "2026.10.
|
|
65
|
-
"typescript": "7.0.2"
|
|
65
|
+
"jscpd": "5.4.2",
|
|
66
|
+
"pm-changelog": "2026.10.25",
|
|
67
|
+
"pm-ops": "2026.10.25",
|
|
68
|
+
"typescript": "7.0.2",
|
|
69
|
+
"yaml": "2.9.1"
|
|
66
70
|
},
|
|
67
71
|
"keywords": [
|
|
68
72
|
"pm-cli",
|
|
@@ -75,7 +79,10 @@
|
|
|
75
79
|
"engines": {
|
|
76
80
|
"node": ">=22.18.0"
|
|
77
81
|
},
|
|
78
|
-
"author":
|
|
82
|
+
"author": {
|
|
83
|
+
"name": "unbrained",
|
|
84
|
+
"url": "https://unbrained.dev/about"
|
|
85
|
+
},
|
|
79
86
|
"pm": {
|
|
80
87
|
"aliases": [
|
|
81
88
|
"lint"
|
|
@@ -103,16 +110,22 @@
|
|
|
103
110
|
"README.md",
|
|
104
111
|
"CHANGELOG.md",
|
|
105
112
|
"docs/repair-preview-example.md",
|
|
106
|
-
"docs/repair-preview-validation.md"
|
|
113
|
+
"docs/repair-preview-validation.md",
|
|
114
|
+
"docs/incremental-example.md",
|
|
115
|
+
"docs/incremental-validation.md",
|
|
116
|
+
"docs/conflicting-rule-packs.md"
|
|
107
117
|
],
|
|
108
118
|
"examples": [
|
|
109
119
|
"README.md",
|
|
110
120
|
"examples/authoring-rules.json",
|
|
111
|
-
"docs/repair-preview-example.md"
|
|
121
|
+
"docs/repair-preview-example.md",
|
|
122
|
+
"docs/incremental-example.md",
|
|
123
|
+
"examples/conflicting-rules.json"
|
|
112
124
|
]
|
|
113
125
|
},
|
|
114
126
|
"publishConfig": {
|
|
115
|
-
"access": "public"
|
|
127
|
+
"access": "public",
|
|
128
|
+
"provenance": true
|
|
116
129
|
},
|
|
117
130
|
"coverageGate": {
|
|
118
131
|
"sources": [
|