@diffpal/lintpal-darwin-arm64 0.2.0 → 0.3.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.
Files changed (3) hide show
  1. package/README.md +114 -56
  2. package/bin/lintpal +0 -0
  3. package/package.json +2 -2
package/README.md CHANGED
@@ -1,77 +1,135 @@
1
1
  # lintpal
2
2
 
3
- `lintpal` reviews a **committed Git comparison** with declarative rules and a
4
- selected System One provider. It prints a deterministic report of diagnostics
5
- anchored to changed lines. The current MVP reads committed blobs only; save and
6
- commit the revision you want to inspect before running it.
3
+ [![Test](https://github.com/diffpal/lintpal/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/diffpal/lintpal/actions/workflows/test.yml)
4
+ [![Lint](https://github.com/diffpal/lintpal/actions/workflows/lint.yml/badge.svg?branch=main)](https://github.com/diffpal/lintpal/actions/workflows/lint.yml)
5
+ [![Security](https://github.com/diffpal/lintpal/actions/workflows/security.yml/badge.svg?branch=main)](https://github.com/diffpal/lintpal/actions/workflows/security.yml)
6
+ [![Latest release](https://img.shields.io/github/v/release/diffpal/lintpal)](https://github.com/diffpal/lintpal/releases/latest)
7
+ [![npm version](https://img.shields.io/npm/v/lintpal)](https://www.npmjs.com/package/lintpal)
8
+ [![License: MIT](https://img.shields.io/github/license/diffpal/lintpal)](LICENSE)
7
9
 
8
- The first lintpal release is planned as `v0.2.0` under the [MIT license](LICENSE).
9
- Once publication is verified, users will be able to install either npm identity:
10
+ **Review committed code changes with questions you control.** lintpal compares
11
+ two Git revisions, asks a selected System One provider focused questions, and
12
+ reports findings on changed lines. Rules are declarative YAML, so a team can
13
+ keep review policy beside its code, pin imported rule packs, and revisit the
14
+ same committed inputs.
10
15
 
11
- ```bash
12
- npm install -g lintpal@0.2.0
13
- # or
14
- npm install -g @diffpal/lintpal@0.2.0
15
- lintpal version
16
- ```
16
+ lintpal is a CLI for review, not an auto-fixer. It reads committed Git objects;
17
+ unsaved and uncommitted working-tree changes are outside the comparison.
17
18
 
18
- These registry commands become available only after the release Story finishes;
19
- the local build below works now.
19
+ ## Start in a few commands
20
20
 
21
- The earlier `jevlint` v0.1.0 tag and six scoped npm packages remain available
22
- for existing installs. npm rejected the unscoped `jevlint` name, so that release
23
- did not receive a GitHub release.
21
+ Install the current public release through npm:
24
22
 
25
- ## Build and try locally
23
+ ```bash
24
+ npm install -g lintpal
25
+ lintpal version
26
+ ```
26
27
 
27
- Go 1.26.6 or newer is required by `go.mod`. From the repository root:
28
+ To use features from this source revision before they reach npm, build it with
29
+ Go 1.26.6 or newer:
28
30
 
29
31
  ```bash
30
32
  go build -o ./lintpal ./cmd/lintpal
31
33
  ./lintpal version
32
- ./lintpal --help
33
- go test ./cmd/lintpal -run TestProcessExitAndStreams -count=1
34
34
  ```
35
35
 
36
- The process test creates temporary committed Git repositories and a local fake
37
- System One server, so the last command needs no provider secret or network
38
- account. A plain local build reports version `dev`. Omnidist staging can embed
39
- an explicit version; see [distribution staging](docs/distribution.md).
40
-
41
- To lint a real comparison, run these commands **inside the repository being
42
- reviewed** after both revisions are committed:
36
+ Choose a provider credential. For the default `jev` provider, set
37
+ `TYPESAFE_API_KEY` in your environment or copy [`.env.example`](.env.example)
38
+ to `.env` and fill in the key. The local `doctor` check does not contact the
39
+ provider:
43
40
 
44
41
  ```bash
45
- export TYPESAFE_API_KEY='your-token'
46
42
  ./lintpal doctor --provider jev
47
43
  mkdir -p .artifacts/lintpal
48
- ./lintpal lint --base origin/main --head HEAD --provider jev \
44
+ ./lintpal lint --base HEAD~1 --head HEAD --provider jev \
49
45
  --format json --fail-on high --out .artifacts/lintpal/report.json
50
46
  ```
51
47
 
52
- Use an absolute path to the built executable when linting another repository.
53
- The default provider is `jev`; `openrouter` reads `OPENROUTER_API_KEY`, and
54
- `custom` reads `LINTPAL_TOKEN` by default and requires `--base-url`. `doctor`
55
- checks the local Git repository and presence of the selected credential; it
56
- does not contact the provider. A real `lint` sends bounded committed source
57
- context and rule questions to the selected provider. See the [CLI guide](docs/cli.md)
58
- for flags, environment settings, output formats, and exit codes. Exit code `10`
59
- means the complete report was written and a finding met `--fail-on`; it can be
60
- used as a CI gate.
61
-
62
- ## CI and reports
63
-
64
- The checked-in [CI workflow](.github/workflows/ci.yml) builds and tests on
65
- Linux, macOS, and Windows without provider credentials. For a repository using
66
- `lintpal` as a quality gate, install a locally built or separately approved
67
- binary in the job, fetch the base revision, provide the selected credential as
68
- a CI secret, then run the `lint` command above with `--base` and `--head` set to
69
- commits available in that checkout. Handle exit code `10` as a lint failure;
70
- other nonzero codes indicate setup, provider, or export failure. Never print
71
- the credential or enable shell tracing around it.
72
-
73
- The [report reference](docs/report.md) defines the versioned JSON and human
74
- formats. [Privacy and limitations](docs/privacy.md) explains source transfer,
75
- local metrics, bounded inputs, and the current quality evidence. The
76
- [evaluation guide](docs/evaluation.md) describes the offline corpus and an
77
- optional, explicit live procedure.
48
+ Both revisions must be available commits in the repository where you run
49
+ lintpal. Use an absolute path to the built binary when reviewing another
50
+ repository. The report is printed to stdout and written to the artifact path;
51
+ exit code `10` means a finding met the gate **after** the complete report was
52
+ written. See [getting started](docs/getting-started.md) for shallow clones,
53
+ other providers, and error handling. See [distribution](docs/distribution.md)
54
+ for the published package layout and release status.
55
+
56
+ ## Make the review yours
57
+
58
+ A rule pairs a question with a decision threshold and fixed diagnostic text.
59
+ For example, a `noul` rule can ask whether changed Go code drops a meaningful
60
+ error:
61
+
62
+ ```yaml
63
+ schema: lintpal.rules.v1
64
+ rules:
65
+ - id: go.unchecked-error
66
+ type: noul
67
+ instructions: Does the changed Go code discard an error whose failure should be handled?
68
+ threshold: 0.95
69
+ severity: high
70
+ title: Possible unchecked error
71
+ message: Review whether this error needs handling.
72
+ paths: ['*.go']
73
+ sides: [RIGHT]
74
+ ```
75
+
76
+ The checked-in [Go review pack](examples/rules/go-review/rules.yaml) also shows
77
+ `choice` and `score` rules. The
78
+ [documentation review pack](examples/rules/docs-review/rules.yaml) shows a
79
+ focused Markdown rule. These are authoring examples, not claims of measured
80
+ model accuracy. See [rule authoring](docs/rule-authoring.md) to write and
81
+ calibrate rules.
82
+
83
+ Import a pack explicitly from a local directory, verify its lockfile, and
84
+ select it for a review:
85
+
86
+ ```bash
87
+ ./lintpal pack import go-review ./examples/rules/go-review
88
+ ./lintpal pack verify go-review
89
+ ./lintpal lint --base HEAD~1 --head HEAD --rules @go-review
90
+ ```
91
+
92
+ GitHub imports require an explicit ref. lintpal resolves it to a commit,
93
+ stores a local copy, and records the exact content hash in
94
+ `.lintpal/packs.lock.json`. Normal lint runs use the local copy offline; see
95
+ [rule packs](docs/rule-packs.md) for source syntax and updates.
96
+
97
+ ## Use it in development
98
+
99
+ [Task](https://taskfile.dev/docs/installation) runs routine checks from
100
+ `Taskfile.yml`:
101
+
102
+ ```bash
103
+ task --list
104
+ task check
105
+ task self-review-smoke
106
+ ```
107
+
108
+ `task check` builds, tests, vets, checks formatting, evaluates the frozen
109
+ offline corpus, and verifies docs and installed packs without a provider key.
110
+ The [test workflow](.github/workflows/test.yml) keeps these checks credential-free
111
+ on Linux, macOS, and Windows as appropriate. To review lintpal itself with a
112
+ real provider, use explicit committed refs:
113
+
114
+ ```bash
115
+ BASE=origin/main HEAD=HEAD task self-review
116
+ ```
117
+
118
+ This opt-in command writes `.artifacts/lintpal/self-review.json`. Read the
119
+ [self-review guide](docs/self-review.md) for provider setup, rule selection,
120
+ and gate behavior.
121
+
122
+ ## Documentation
123
+
124
+ Start at the [documentation index](docs/index.md), or jump to:
125
+
126
+ | Use lintpal | Extend and maintain it |
127
+ | --- | --- |
128
+ | [Getting started](docs/getting-started.md) · [Configuration](docs/configuration.md) · [CLI](docs/cli.md) | [Rule authoring](docs/rule-authoring.md) · [Rule packs](docs/rule-packs.md) |
129
+ | [Reports](docs/report.md) · [Privacy and limits](docs/privacy.md) | [Development tasks](docs/development.md) · [Self-review](docs/self-review.md) · [Evaluation](docs/evaluation.md) |
130
+
131
+ When a remote provider is selected, lintpal sends bounded committed source
132
+ context and rule questions to it. Review the [privacy guide](docs/privacy.md)
133
+ before running a live review. The current CLI does not inspect uncommitted
134
+ changes, apply fixes, or report measured model precision. lintpal is available
135
+ under the [MIT license](LICENSE).
package/bin/lintpal CHANGED
Binary file
package/package.json CHANGED
@@ -15,7 +15,7 @@
15
15
  ],
16
16
  "repository": {
17
17
  "type": "git",
18
- "url": "https://github.com/diffpal/lintpal"
18
+ "url": "git+https://github.com/diffpal/lintpal.git"
19
19
  },
20
- "version": "0.2.0"
20
+ "version": "0.3.0"
21
21
  }