@ps-neko/nekowork 0.2.0-alpha.0 → 0.2.0-alpha.2

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/README.md CHANGED
@@ -10,18 +10,18 @@ pushes, or deploys on its own.
10
10
 
11
11
  ## Status
12
12
 
13
- **Phase A skeleton** (2026-05-27). The 4 public verbs work via delegation to
14
- `@ps-neko/nekowork-cli` in the monorepo. To publish this package
15
- independently, the verify-pr code path needs to be moved into this package —
16
- see [HANDOFF-PACKAGE-SPLIT.md](./HANDOFF-PACKAGE-SPLIT.md).
17
-
18
- For the full alpha-stage product today, install:
13
+ **Published alpha** (`@ps-neko/nekowork`, alpha dist-tag). This package is the
14
+ published slim verification gate. Install with:
19
15
 
20
16
  ```bash
21
- npm i -g @ps-neko/nekowork-cli@alpha
17
+ npm i -g @ps-neko/nekowork
22
18
  ```
23
19
 
24
- ## Quickstart (once Phase A is complete)
20
+ The fuller legacy and power-user surface lives in the internal
21
+ `@ps-neko/nekowork-harness` package (not separately published). See
22
+ [HANDOFF-PACKAGE-SPLIT.md](./HANDOFF-PACKAGE-SPLIT.md) for the split history.
23
+
24
+ ## Quickstart
25
25
 
26
26
  ```bash
27
27
  # right after your AI tool changes some files:
@@ -39,7 +39,7 @@ whether the change is safe to merge.
39
39
  | `check` | Probe environment readiness (Node version, git repo, etc.) |
40
40
  | `verify-pr` | Scan working-tree diff. Produce REPORT.md + .nekowork/decision.json |
41
41
  | `report` | Render an existing decision.json to a human-readable REPORT.md |
42
- | `apply` | Apply a stored .diff iff decision.json says `apply_allowed: true` |
42
+ | `apply` | Session-based compatibility apply. Requires a completed work cycle (SHIP_READY marker + cleared Human Gate). NOT driven by verify-pr's decision.json. See [ADVANCED.md](../nekowork-cli/docs/ADVANCED.md). |
43
43
 
44
44
  Anything else (`ask`, `plan`, `team`, `work`, `ship`, `build`, `auto`,
45
45
  `pr-prep`, `review`, ...) belongs to `@ps-neko/nekowork-harness` (legacy and
@@ -50,9 +50,16 @@ power-user surface). The slim package rejects those verbs with a redirect.
50
50
  1. Your AI tool writes the code. `nekowork` never writes it for you.
51
51
  2. `verify-pr` runs a fixed set of risk rules over the diff — same diff, same
52
52
  verdict, every time. **No LLM gets to "vote" the result.**
53
- 3. It saves the evidence into a `REPORT.md` you can read.
53
+ 3. It saves the evidence into a `REPORT.md` you can read, and writes
54
+ `.nekowork/decision.json` with informational verdict fields (`merge_allowed`,
55
+ `apply_allowed`). **verify-pr itself does not apply changes.**
54
56
  4. You decide at the Human Gate — approve, or don't.
55
- 5. Only then can `apply` apply the diff. No auto-commit. No auto-push.
57
+
58
+ > verify-pr itself does not apply changes. Session-based apply is part of the
59
+ > compatibility workflow and requires SHIP_READY and a cleared Human Gate.
60
+
61
+ No auto-commit. No auto-push. `apply` is a separate, session-based compatibility
62
+ step — it is not triggered by `decision.json`.
56
63
 
57
64
  ## Docs
58
65
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ps-neko/nekowork",
3
- "version": "0.2.0-alpha.0",
3
+ "version": "0.2.0-alpha.2",
4
4
  "description": "Local verification gate for AI-written code diffs. Deterministic rules decide the verdict, never the LLM. No auto-commit, push, or deploy — you decide at the Human Gate.",
5
5
  "keywords": [
6
6
  "ai-code-review",
@@ -38,11 +38,11 @@
38
38
  "README.md",
39
39
  "LICENSE"
40
40
  ],
41
- "dependencies": {},
42
41
  "scripts": {
43
42
  "smoke": "node scripts/cli.js --version && node scripts/cli.js verify-pr --help",
44
43
  "smoke:reject": "! node scripts/cli.js team 2>/dev/null",
45
44
  "test": "node --test tests/unit/*.test.js",
46
45
  "bench:rules": "node scripts/benchmark/rules.js"
47
- }
48
- }
46
+ },
47
+ "dependencies": {}
48
+ }
@@ -208,7 +208,7 @@ export function getGitDiff(opts = {}) {
208
208
  if (ls.status !== 0) {
209
209
  throw new Error(`git ls-files exited ${ls.status}: ${ls.stderr || ''}`);
210
210
  }
211
- const tracked = (ls.stdout || '').split('\n').map(s => s.trim()).filter(Boolean);
211
+ const tracked = (ls.stdout || '').split('\n').map(s => s.trim()).filter(Boolean).filter(p => !isSelfOutput(p));
212
212
  let stdout = synthesizeFilesAsDiff(cwd, tracked);
213
213
  if (includeUntracked) stdout += synthesizeUntrackedDiff(cwd);
214
214
  return parseDiff(appendIncluded(stdout));
@@ -248,10 +248,20 @@ export function getGitDiff(opts = {}) {
248
248
  return parseDiff(appendIncluded(stdout));
249
249
  }
250
250
 
251
+ /**
252
+ * verify-pr writes its own output to `REPORT.md` and `.nekowork/**`. Those are
253
+ * the tool's product, not "changes to verify" — scanning them would re-flag the
254
+ * secret/risk text stored in its own evidence on the next run (self-
255
+ * contamination). Exclude them from every synthesized diff.
256
+ */
257
+ function isSelfOutput(relPath) {
258
+ return relPath === 'REPORT.md' || relPath.startsWith('.nekowork/');
259
+ }
260
+
251
261
  function synthesizeUntrackedDiff(cwd) {
252
262
  const ls = spawnSync('git', ['ls-files', '--others', '--exclude-standard'], { cwd, encoding: 'utf8', windowsHide: true });
253
263
  if (ls.status !== 0 || !ls.stdout) return '';
254
- const files = ls.stdout.split('\n').map(s => s.trim()).filter(Boolean);
264
+ const files = ls.stdout.split('\n').map(s => s.trim()).filter(Boolean).filter(p => !isSelfOutput(p));
255
265
  return synthesizeFilesAsDiff(cwd, files);
256
266
  }
257
267
 
package/LICENSE DELETED
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 HARNESS contributors
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.