sonecheck 0.0.1 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.md +21 -69
- package/index.js +2 -2
- package/package.json +16 -8
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -1,89 +1,43 @@
|
|
|
1
1
|
# SoneCheck
|
|
2
2
|
|
|
3
|
-
**The sub-second System-1 AI code risk inspector for VS Code
|
|
3
|
+
**The sub-second System-1 AI code risk inspector for VS Code.**
|
|
4
4
|
|
|
5
5
|
SoneCheck reads your staged diff, splits it into hunks, scores each hunk with a
|
|
6
6
|
System-1 decision model, and surfaces only the one to three changes that actually
|
|
7
7
|
deserve your eyes before you commit.
|
|
8
8
|
|
|
9
|
-
> **Project documentation is written in Chinese**: see [`docs/`](docs/) for the
|
|
10
|
-
> full product requirements, technical spec, system design, contracts, UI design,
|
|
11
|
-
> roadmap and observability plan.
|
|
12
|
-
|
|
13
9
|
---
|
|
14
10
|
|
|
15
11
|
## Status: `0.0.1` is a name reservation
|
|
16
12
|
|
|
17
|
-
**This release contains no functional implementation.** It
|
|
18
|
-
`sonecheck` package name ahead of the first working version.
|
|
19
|
-
|
|
20
|
-
Installing it will not give you a working tool. Every exported API throws a
|
|
21
|
-
descriptive `SONECHECK_NOT_IMPLEMENTED` error rather than failing silently:
|
|
13
|
+
**This release contains no functional implementation.** It reserves the
|
|
14
|
+
`sonecheck` package name ahead of the first working version, `0.1.0`. Every
|
|
15
|
+
exported API throws a descriptive error rather than failing silently:
|
|
22
16
|
|
|
23
17
|
```js
|
|
24
18
|
const { inspectStaged } = require('sonecheck');
|
|
25
|
-
|
|
26
19
|
inspectStaged();
|
|
27
20
|
// Error: sonecheck@0.0.1 does not implement "inspectStaged" yet. ...
|
|
28
|
-
// code: 'SONECHECK_NOT_IMPLEMENTED'
|
|
29
21
|
```
|
|
30
22
|
|
|
31
|
-
The first functional release will be **`0.1.0`**. This placeholder exists only so
|
|
32
|
-
that the name is not taken by an unrelated project in the meantime.
|
|
33
|
-
|
|
34
23
|
---
|
|
35
24
|
|
|
36
|
-
##
|
|
37
|
-
|
|
38
|
-
AI coding tools made code *generation* far faster than code *review*. A single
|
|
39
|
-
commit can now span dozens of hunks across many files, and nobody reads all of
|
|
40
|
-
them. Review queues back up and low-quality changes get waved through.
|
|
25
|
+
## How it works
|
|
41
26
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
27
|
+
A single commit can span dozens of hunks across many files, and nobody reads all
|
|
28
|
+
of them. SoneCheck scores each hunk and shows only the top few, so review effort
|
|
29
|
+
lands where it matters.
|
|
45
30
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
fraction of a second, costs next to nothing, and cannot hallucinate code.
|
|
31
|
+
Scoring uses a System-1 decision model, which returns structured scores instead
|
|
32
|
+
of prose — fast, cheap, and incapable of hallucinating code.
|
|
49
33
|
|
|
50
|
-
|
|
34
|
+
The implementation must always:
|
|
51
35
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
| M2 — distributable | `.vsix` package and a documented install path |
|
|
58
|
-
| M3 — trustworthy | Better context assembly, tunable thresholds, false-positive feedback |
|
|
59
|
-
| M4 — team-ready | Hosted option, shared team rules, audit trail |
|
|
60
|
-
|
|
61
|
-
Design principles the implementation must hold to:
|
|
62
|
-
|
|
63
|
-
- **Never block a commit.** If the decision service is unreachable, the check is
|
|
64
|
-
skipped and the developer is told once. Failures always resolve to "let it pass".
|
|
65
|
-
- **Never upload a whole file.** Only diff hunks plus bounded local context
|
|
66
|
-
(≤ 2KB per hunk) leave the machine.
|
|
67
|
-
- **Never touch your workspace.** The check is strictly read-only.
|
|
68
|
-
- **Never nag.** All-clear runs silently, with no popup.
|
|
69
|
-
|
|
70
|
-
These are recorded as testable invariants in
|
|
71
|
-
[`docs/03_CONTRACTS_AND_API.md`](docs/03_CONTRACTS_AND_API.md).
|
|
72
|
-
|
|
73
|
-
---
|
|
74
|
-
|
|
75
|
-
## Privacy boundary
|
|
76
|
-
|
|
77
|
-
SoneCheck is designed so that sensitive source never leaves the machine wholesale:
|
|
78
|
-
|
|
79
|
-
- Only the hunks you have staged, plus a bounded slice of surrounding context,
|
|
80
|
-
are sent for scoring.
|
|
81
|
-
- Your API key is stored in the OS-level secret store, never in a plain file, and
|
|
82
|
-
never written to logs.
|
|
83
|
-
- The extension never modifies, stages, formats or deletes your files.
|
|
84
|
-
|
|
85
|
-
The full payload boundary is specified in
|
|
86
|
-
[`docs/03_CONTRACTS_AND_API.md`](docs/03_CONTRACTS_AND_API.md) §1.
|
|
36
|
+
- **never block a commit** — if the decision service is unreachable, the check is
|
|
37
|
+
skipped and you are told once;
|
|
38
|
+
- **never upload a whole file** — only diff hunks plus bounded local context;
|
|
39
|
+
- **never touch your workspace** — the check is strictly read-only;
|
|
40
|
+
- **never nag** — an all-clear produces no popup.
|
|
87
41
|
|
|
88
42
|
---
|
|
89
43
|
|
|
@@ -96,13 +50,11 @@ here only to describe a technical dependency.
|
|
|
96
50
|
|
|
97
51
|
---
|
|
98
52
|
|
|
99
|
-
## Contributing
|
|
100
|
-
|
|
101
|
-
The project is at the design stage. Issues and discussions are welcome via
|
|
102
|
-
[GitHub Issues](https://github.com/aifuun/sonecheck/issues).
|
|
103
|
-
|
|
104
|
-
---
|
|
105
|
-
|
|
106
53
|
## License
|
|
107
54
|
|
|
108
55
|
[MIT](LICENSE)
|
|
56
|
+
|
|
57
|
+
> Design documents are written in Chinese and live in the
|
|
58
|
+
> [`docs/` directory](https://github.com/rolligen/sonecheck/tree/main/docs).
|
|
59
|
+
> Issues and discussions are welcome via
|
|
60
|
+
> [GitHub Issues](https://github.com/rolligen/sonecheck/issues).
|
package/index.js
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* silently, so that anyone who installs this version learns immediately where
|
|
11
11
|
* the real implementation lives.
|
|
12
12
|
*
|
|
13
|
-
* Roadmap and design documents: https://github.com/
|
|
13
|
+
* Roadmap and design documents: https://github.com/rolligen/sonecheck
|
|
14
14
|
*
|
|
15
15
|
* @see README.md
|
|
16
16
|
*/
|
|
@@ -35,7 +35,7 @@ function createNotImplementedError(apiName) {
|
|
|
35
35
|
`sonecheck@${RESERVED_VERSION} does not implement "${apiName}" yet. ` +
|
|
36
36
|
`This version only reserves the package name. ` +
|
|
37
37
|
`The first functional release is ${FIRST_FUNCTIONAL_VERSION}. ` +
|
|
38
|
-
`Status: https://github.com/
|
|
38
|
+
`Status: https://github.com/rolligen/sonecheck`
|
|
39
39
|
);
|
|
40
40
|
error.code = NOT_IMPLEMENTED;
|
|
41
41
|
return error;
|
package/package.json
CHANGED
|
@@ -1,26 +1,34 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sonecheck",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.0.4",
|
|
4
|
+
"description": "Sub-second System-1 AI code risk inspector for VS Code. Name-reservation release; the first functional release is 0.1.0.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"vscode",
|
|
7
7
|
"vscode-extension",
|
|
8
8
|
"git-diff",
|
|
9
|
+
"diff",
|
|
10
|
+
"git-hooks",
|
|
11
|
+
"pre-commit",
|
|
9
12
|
"code-review",
|
|
13
|
+
"code-quality",
|
|
10
14
|
"static-analysis",
|
|
11
15
|
"risk-analysis",
|
|
12
|
-
"
|
|
13
|
-
"system-1"
|
|
16
|
+
"jev",
|
|
17
|
+
"system-1",
|
|
18
|
+
"developer-tools"
|
|
14
19
|
],
|
|
15
20
|
"license": "MIT",
|
|
16
|
-
"author":
|
|
17
|
-
|
|
21
|
+
"author": {
|
|
22
|
+
"name": "ROLLIGEN",
|
|
23
|
+
"url": "https://github.com/rolligen"
|
|
24
|
+
},
|
|
25
|
+
"homepage": "https://github.com/rolligen/sonecheck#readme",
|
|
18
26
|
"repository": {
|
|
19
27
|
"type": "git",
|
|
20
|
-
"url": "git+https://github.com/
|
|
28
|
+
"url": "git+https://github.com/rolligen/sonecheck.git"
|
|
21
29
|
},
|
|
22
30
|
"bugs": {
|
|
23
|
-
"url": "https://github.com/
|
|
31
|
+
"url": "https://github.com/rolligen/sonecheck/issues"
|
|
24
32
|
},
|
|
25
33
|
"main": "./index.js",
|
|
26
34
|
"types": "./index.d.ts",
|