@ps-neko/nekowork 0.1.0-alpha.8 → 0.2.0-alpha.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 (243) hide show
  1. package/README.md +45 -481
  2. package/package.json +23 -83
  3. package/scripts/benchmark/capture-live-ai-diff.js +230 -0
  4. package/scripts/benchmark/rules.js +214 -0
  5. package/scripts/benchmark/scrape-oss-positives.js +237 -0
  6. package/scripts/benchmark/verify-candidates.js +110 -0
  7. package/scripts/check.js +126 -0
  8. package/scripts/cli.js +169 -1213
  9. package/scripts/lib/decision.js +336 -0
  10. package/scripts/lib/diff-parser.js +344 -0
  11. package/scripts/lib/project-detector.js +309 -0
  12. package/scripts/lib/rules/_helpers.js +149 -0
  13. package/scripts/lib/rules/auto-apply-commit-push.js +94 -0
  14. package/scripts/lib/rules/hardcoded-credential.js +103 -0
  15. package/scripts/lib/rules/package-lockfile-risk.js +92 -0
  16. package/scripts/lib/rules/secret-fallback.js +259 -0
  17. package/scripts/lib/rules/test-or-security-disable.js +91 -0
  18. package/scripts/lib/session-resolver.js +28 -14
  19. package/scripts/orchestrators/_handoff-utils.js +27 -0
  20. package/scripts/orchestrators/apply.js +4 -23
  21. package/scripts/orchestrators/gate.js +17 -2
  22. package/scripts/orchestrators/report.js +180 -9
  23. package/scripts/orchestrators/verify-pr.js +476 -0
  24. package/AGENTS.md +0 -112
  25. package/CLAUDE.md +0 -84
  26. package/REVIEW.md +0 -96
  27. package/RULES.md +0 -51
  28. package/SOUL.md +0 -21
  29. package/WORKING-CONTEXT.md +0 -52
  30. package/agent.yaml +0 -222
  31. package/agents/architect.md +0 -57
  32. package/agents/code-reviewer.md +0 -60
  33. package/agents/codex-challenger.md +0 -53
  34. package/agents/codex-reviewer.md +0 -56
  35. package/agents/debugger.md +0 -33
  36. package/agents/doc-writer.md +0 -51
  37. package/agents/executor.md +0 -41
  38. package/agents/planner.md +0 -49
  39. package/agents/research.md +0 -50
  40. package/agents/security-reviewer.md +0 -47
  41. package/agents/test-engineer.md +0 -41
  42. package/bridge/mcp-server.js +0 -301
  43. package/commands/claude-led-codex-review.md +0 -29
  44. package/docs/ADVANCED.md +0 -374
  45. package/docs/AI-DEVELOPMENT-LIFECYCLE.md +0 -120
  46. package/docs/ARCHITECTURE.md +0 -213
  47. package/docs/AUDIT.md +0 -123
  48. package/docs/AUTH-MIGRATION.md +0 -282
  49. package/docs/AUTONOMY.md +0 -92
  50. package/docs/BUILD.md +0 -165
  51. package/docs/CATALOG-PACKS.md +0 -89
  52. package/docs/CHANGELOG.md +0 -186
  53. package/docs/CLI-STAGES.md +0 -101
  54. package/docs/CODEMAPS/README.md +0 -15
  55. package/docs/CODEMAPS/agents.md +0 -22
  56. package/docs/CODEMAPS/bridge.md +0 -18
  57. package/docs/CODEMAPS/hooks.md +0 -28
  58. package/docs/CODEMAPS/manifests.md +0 -15
  59. package/docs/CODEMAPS/rules.md +0 -22
  60. package/docs/CODEMAPS/schemas.md +0 -22
  61. package/docs/CODEMAPS/scripts.md +0 -178
  62. package/docs/CODEMAPS/skills.md +0 -31
  63. package/docs/CODEMAPS/tests.md +0 -112
  64. package/docs/CORE-INVARIANTS.md +0 -39
  65. package/docs/DEMO-REPORT.md +0 -113
  66. package/docs/DEMO.md +0 -151
  67. package/docs/EXAMPLE-PROJECT.md +0 -92
  68. package/docs/FAILURE-MODES.md +0 -94
  69. package/docs/FEEDBACK-TRIAGE.md +0 -144
  70. package/docs/INTERNAL-PROVIDER.md +0 -85
  71. package/docs/NAMING.md +0 -46
  72. package/docs/PARALLEL-CANDIDATES.md +0 -58
  73. package/docs/PORTING.md +0 -164
  74. package/docs/PR-PREP.md +0 -35
  75. package/docs/PRODUCT-PRINCIPLES.md +0 -344
  76. package/docs/PUBLISH-ALPHA.md +0 -217
  77. package/docs/QUICKSTART.md +0 -411
  78. package/docs/RELEASE-READINESS.md +0 -201
  79. package/docs/RISK-CLASSIFIER.md +0 -50
  80. package/docs/ROADMAP.md +0 -128
  81. package/docs/RUNBOOK.md +0 -153
  82. package/docs/SAFETY-GUARANTEES.md +0 -54
  83. package/docs/SECURITY.md +0 -79
  84. package/docs/SETUP.md +0 -143
  85. package/docs/TRUST-MODEL.md +0 -46
  86. package/docs/WHY-NEKOWORK.md +0 -99
  87. package/docs/WHY-NOT-AUTOPILOT.md +0 -37
  88. package/docs/assets/demo-terminal.svg +0 -41
  89. package/docs/case-studies/JSHTTP-BASIC-AUTH.md +0 -168
  90. package/docs/case-studies/MOTDOTLA-DOTENV.md +0 -191
  91. package/docs/case-studies/PYTHON-HYPER-H11.md +0 -168
  92. package/docs/case-studies/README.md +0 -19
  93. package/docs/case-studies/SINDRESORHUS-IS-PLAIN-OBJ.md +0 -141
  94. package/docs/dev-log/2026-04-29-p1-recovery.md +0 -142
  95. package/docs/dev-log/2026-04-29-week1-4.md +0 -81
  96. package/docs/examples/GITHUB-ACTIONS-HARDENING.md +0 -86
  97. package/docs/examples/QUALITY-LIFECYCLE-SMOKE.md +0 -32
  98. package/docs/examples/TRADING-DASHBOARD-MOCK.md +0 -65
  99. package/docs/workflows-stash/README.md +0 -32
  100. package/docs/workflows-stash/harness-review.yml +0 -166
  101. package/docs/workflows-stash/harness-validate.yml +0 -98
  102. package/examples/github-actions-hardening/.github/workflows/hardened-validate.yml +0 -38
  103. package/examples/github-actions-hardening/README.md +0 -31
  104. package/examples/github-actions-hardening/case-study/ASK.md +0 -26
  105. package/examples/github-actions-hardening/case-study/GATE_STATUS.md +0 -28
  106. package/examples/github-actions-hardening/case-study/PLAN.md +0 -25
  107. package/examples/github-actions-hardening/case-study/SHIP_READY.md +0 -21
  108. package/examples/github-actions-hardening/case-study/TASK.md +0 -30
  109. package/examples/github-actions-hardening/case-study/TEAM_HANDOFFS.md +0 -37
  110. package/examples/github-actions-hardening/case-study/VERIFY_SUMMARY.md +0 -35
  111. package/examples/github-actions-hardening/case-study/WORK_SUMMARY.md +0 -24
  112. package/examples/github-actions-hardening/package.json +0 -12
  113. package/examples/github-actions-hardening/scripts/check.mjs +0 -43
  114. package/examples/quality-lifecycle-smoke/README.md +0 -30
  115. package/examples/quality-lifecycle-smoke/case-study/ASK.md +0 -24
  116. package/examples/quality-lifecycle-smoke/case-study/GATE_STATUS.md +0 -10
  117. package/examples/quality-lifecycle-smoke/case-study/PLAN.md +0 -19
  118. package/examples/quality-lifecycle-smoke/case-study/SHIP_READY.md +0 -11
  119. package/examples/quality-lifecycle-smoke/case-study/TASK.md +0 -19
  120. package/examples/quality-lifecycle-smoke/case-study/TEAM_HANDOFFS.md +0 -21
  121. package/examples/quality-lifecycle-smoke/case-study/VERIFY_SUMMARY.md +0 -44
  122. package/examples/quality-lifecycle-smoke/case-study/WORK_SUMMARY.md +0 -19
  123. package/examples/quality-lifecycle-smoke/package.json +0 -8
  124. package/examples/quality-lifecycle-smoke/scripts/check.mjs +0 -44
  125. package/examples/trading-dashboard-mock/README.md +0 -33
  126. package/examples/trading-dashboard-mock/case-study/ASK.md +0 -24
  127. package/examples/trading-dashboard-mock/case-study/GATE_STATUS.md +0 -28
  128. package/examples/trading-dashboard-mock/case-study/PLAN.md +0 -23
  129. package/examples/trading-dashboard-mock/case-study/SHIP_READY.md +0 -21
  130. package/examples/trading-dashboard-mock/case-study/TASK.md +0 -29
  131. package/examples/trading-dashboard-mock/case-study/TEAM_HANDOFFS.md +0 -49
  132. package/examples/trading-dashboard-mock/case-study/VERIFY_SUMMARY.md +0 -35
  133. package/examples/trading-dashboard-mock/case-study/WORK_SUMMARY.md +0 -27
  134. package/examples/trading-dashboard-mock/fixtures/market.json +0 -9
  135. package/examples/trading-dashboard-mock/index.html +0 -76
  136. package/examples/trading-dashboard-mock/package.json +0 -9
  137. package/examples/trading-dashboard-mock/scripts/check.mjs +0 -54
  138. package/examples/trading-dashboard-mock/src/app.js +0 -83
  139. package/examples/trading-dashboard-mock/src/styles.css +0 -227
  140. package/hooks/hooks.json +0 -44
  141. package/hooks/scripts/config-protection.js +0 -34
  142. package/hooks/scripts/gateguard-fact-force.js +0 -146
  143. package/hooks/scripts/persistent-mode.mjs +0 -27
  144. package/hooks/scripts/pre-bash-dispatcher.js +0 -63
  145. package/hooks/scripts/quality-gate.js +0 -106
  146. package/manifests/build-modes.json +0 -61
  147. package/manifests/install-components.json +0 -200
  148. package/manifests/install-modules.json +0 -102
  149. package/manifests/install-profiles.json +0 -265
  150. package/rules/common/coding-style.md +0 -71
  151. package/rules/common/security.md +0 -69
  152. package/rules/common/testing.md +0 -58
  153. package/rules/python/coding-style.md +0 -80
  154. package/rules/python/testing.md +0 -86
  155. package/rules/typescript/coding-style.md +0 -97
  156. package/rules/typescript/security.md +0 -67
  157. package/rules/typescript/testing.md +0 -78
  158. package/schemas/agent-yaml.schema.json +0 -168
  159. package/schemas/agent.schema.json +0 -32
  160. package/schemas/build-modes.schema.json +0 -42
  161. package/schemas/handoff.schema.json +0 -105
  162. package/schemas/hooks.schema.json +0 -35
  163. package/schemas/install-components.schema.json +0 -46
  164. package/schemas/install-modules.schema.json +0 -39
  165. package/schemas/install-profiles.schema.json +0 -46
  166. package/schemas/install-state.schema.json +0 -42
  167. package/schemas/routing.schema.json +0 -42
  168. package/schemas/skill.schema.json +0 -19
  169. package/scripts/agents/dispatch.js +0 -148
  170. package/scripts/agents/runners/claude.js +0 -214
  171. package/scripts/agents/runners/codex.js +0 -233
  172. package/scripts/agents/runners/gemini.js +0 -92
  173. package/scripts/agents/runners/internal.js +0 -91
  174. package/scripts/agents/runners/mock.js +0 -107
  175. package/scripts/auth/github-import-gh.js +0 -52
  176. package/scripts/auth/github-login.js +0 -79
  177. package/scripts/auth/github-logout.js +0 -21
  178. package/scripts/auth/github-status.js +0 -46
  179. package/scripts/build-claude.js +0 -101
  180. package/scripts/build-codemaps.js +0 -286
  181. package/scripts/build-codex.js +0 -93
  182. package/scripts/build-cursor.js +0 -132
  183. package/scripts/build-gemini.js +0 -117
  184. package/scripts/build-opencode.js +0 -117
  185. package/scripts/ci/catalog.js +0 -127
  186. package/scripts/ci/check-markers.js +0 -48
  187. package/scripts/ci/security-hardening.js +0 -270
  188. package/scripts/ci/validate-agents.js +0 -88
  189. package/scripts/ci/validate-hooks.js +0 -99
  190. package/scripts/ci/validate-manifests.js +0 -158
  191. package/scripts/ci/validate-skills.js +0 -93
  192. package/scripts/cli/commands/auto-command.js +0 -198
  193. package/scripts/cli/commands/build-command.js +0 -259
  194. package/scripts/core/auth-guard.js +0 -22
  195. package/scripts/core/build-roots.js +0 -11
  196. package/scripts/core/cli-resolver.js +0 -64
  197. package/scripts/core/install-state.js +0 -125
  198. package/scripts/core/json-extractor.js +0 -32
  199. package/scripts/core/subprocess.js +0 -74
  200. package/scripts/daemon/wait.js +0 -278
  201. package/scripts/demo-external-project.js +0 -222
  202. package/scripts/demo-quick-run.js +0 -212
  203. package/scripts/demo-review.js +0 -204
  204. package/scripts/doctor.js +0 -296
  205. package/scripts/install-apply.js +0 -198
  206. package/scripts/install-plan.js +0 -451
  207. package/scripts/lib/build-intelligence.js +0 -188
  208. package/scripts/lib/build-modes.js +0 -38
  209. package/scripts/lib/costs.js +0 -82
  210. package/scripts/lib/instincts.js +0 -194
  211. package/scripts/lib/keychain.js +0 -85
  212. package/scripts/lib/profile-policy.js +0 -134
  213. package/scripts/lib/profile-safety.js +0 -81
  214. package/scripts/lib/router.js +0 -138
  215. package/scripts/lib/token-vault.js +0 -136
  216. package/scripts/orchestrators/ask.js +0 -143
  217. package/scripts/orchestrators/auto.js +0 -263
  218. package/scripts/orchestrators/build.js +0 -379
  219. package/scripts/orchestrators/ralph.js +0 -179
  220. package/scripts/orchestrators/review.js +0 -452
  221. package/scripts/orchestrators/run.js +0 -151
  222. package/scripts/orchestrators/ship.js +0 -339
  223. package/scripts/orchestrators/team-lite.js +0 -270
  224. package/scripts/orchestrators/team.js +0 -244
  225. package/scripts/orchestrators/verify.js +0 -306
  226. package/scripts/orchestrators/work.js +0 -207
  227. package/scripts/portability/simulate-port.js +0 -220
  228. package/scripts/repair.js +0 -184
  229. package/scripts/sync-claude-md.js +0 -224
  230. package/scripts/verify/claude-live.js +0 -30
  231. package/scripts/verify/codex-live.js +0 -60
  232. package/scripts/verify/gemini-live.js +0 -48
  233. package/scripts/verify/runtime.js +0 -105
  234. package/skills/acceptance-coverage/SKILL.md +0 -37
  235. package/skills/claude-led-codex-review/SKILL.md +0 -133
  236. package/skills/plan-eng-review/SKILL.md +0 -51
  237. package/skills/porting/SKILL.md +0 -69
  238. package/skills/ralph/SKILL.md +0 -48
  239. package/skills/release-readiness/SKILL.md +0 -62
  240. package/skills/review/SKILL.md +0 -42
  241. package/skills/security-hardening/SKILL.md +0 -59
  242. package/skills/ship/SKILL.md +0 -44
  243. package/skills/tdd-workflow/SKILL.md +0 -42
package/README.md CHANGED
@@ -1,502 +1,66 @@
1
- # NEKOWORK
2
-
3
- Verified Autopilot for AI code changes.
4
-
5
- [![harness-validate](https://github.com/Ps-Neko/NEKOWORK/actions/workflows/harness-validate.yml/badge.svg)](https://github.com/Ps-Neko/NEKOWORK/actions/workflows/harness-validate.yml)
6
-
7
- AI builds. Codex verifies. You approve the boundary.
1
+ # @ps-neko/nekowork
8
2
 
9
- NEKOWORK plans, edits, verifies, repairs, and prepares ship-ready AI code changes. Final apply remains human-controlled.
3
+ **Local verification gate for AI-written code diffs.**
10
4
 
11
- It runs:
5
+ AI can write 100 lines in 10 seconds. Who checks them before they hit `main`?
12
6
 
13
- 1. Autonomous planning and build
14
- 2. Independent Codex verification
15
- 3. Bounded repair when findings are fixable
16
- 4. Report, ship/no-ship, and Human Gate
17
- 5. Explicit apply only when the human chooses it
7
+ This package reviews every change your AI tool makes, flags the risky parts with
8
+ deterministic rules, and lets **you** make the final call. It never commits,
9
+ pushes, or deploys on its own.
18
10
 
19
- No auto-commit. No auto-push. No surprise deploy.
20
-
21
- Product principle:
22
-
23
- ```text
24
- NEKOWORK = verified autopilot -> Codex verification -> Human Gate -> explicit apply
25
- ```
26
-
27
- ```text
28
- Autonomous until apply.
29
- Verified before ship.
30
- Human-controlled at the boundary.
31
- ```
32
-
33
- NEKOWORK packages a local runtime with one source catalog, `agent.yaml`, projected into Claude Code, Codex CLI, Cursor, Gemini CLI, and OpenCode surfaces. The `harness` CLI remains a legacy/internal alias for `nekowork`.
34
-
35
- NEKOWORK is intentionally not a 100-agent pack. Every agent, skill, hook, profile, module, and pack must:
36
-
37
- 1. improve verification,
38
- 2. preserve one-executor writes,
39
- 3. produce auditable evidence,
40
- 4. respect Human Gate.
41
-
42
- **Public alpha evidence:** 14 packs / 11 profiles / 36 components / 5 harness targets / 7 case-study flows / 290 tests / 0 moderate+ npm audit issues / fresh `npx @alpha` smoke
43
-
44
- NEKOWORK does not automatically commit, push, publish, deploy, or apply diffs. `apply` is explicit and requires verified ship-ready evidence.
11
+ ## Status
45
12
 
46
- For bounded autonomy before that boundary, use `auto`: it can route, build, verify, repair fixable findings within a budget, write a report, and then stop before apply.
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).
47
17
 
48
- Next track: `auto --parallel-candidates N` will let isolated candidate workers propose patches, then NEKOWORK will compare them into one canonical ship candidate before Codex verification and Human Gate.
49
-
50
- **Latest alpha evidence:** [CI badge](https://github.com/Ps-Neko/NEKOWORK/actions/workflows/harness-validate.yml) / [npm package](https://www.npmjs.com/package/@ps-neko/nekowork) / [smoke transcript](docs/DEMO.md#one-minute-terminal-transcript) / [report artifact](docs/DEMO-REPORT.md)
51
-
52
- **One-minute demo:** [terminal transcript](docs/DEMO.md#one-minute-terminal-transcript) / [full report example](docs/DEMO-REPORT.md) / [alpha feedback](https://github.com/Ps-Neko/NEKOWORK/issues/new?template=alpha-feedback.yml) / [roadmap](docs/ROADMAP.md)
53
-
54
- ![NEKOWORK one-minute terminal demo](docs/assets/demo-terminal.svg)
55
-
56
- ## 30-Second First Run
57
-
58
- Use the current npm alpha for the fastest proof of the workflow:
18
+ For the full alpha-stage product today, install:
59
19
 
60
20
  ```bash
61
- npx -y @ps-neko/nekowork@alpha check
62
- npx -y @ps-neko/nekowork@alpha auto "fix failing tests safely" --session first-auto
63
- npx -y @ps-neko/nekowork@alpha report --session latest
21
+ npm i -g @ps-neko/nekowork-cli@alpha
64
22
  ```
65
23
 
66
- Start with `auto` when you want NEKOWORK to keep going until report/gate. Use `build` when you want one build pass. Drop down to `work`, `verify`, and `ship` only when you need phase-level control.
67
-
68
- Preview the route before running providers or writing session state:
24
+ ## Quickstart (once Phase A is complete)
69
25
 
70
26
  ```bash
71
- npx -y @ps-neko/nekowork@alpha auto "fix failing tests safely" --dry-run
72
- npx -y @ps-neko/nekowork@alpha build "fix this safely" --dry-run
73
- ```
74
-
75
- Use a source checkout for local development:
76
-
77
- ```bash
78
- node scripts/cli.js check
79
- node scripts/cli.js auto "implement this safely" --session first-auto
80
- node scripts/cli.js report --session latest
81
- node scripts/cli.js gate status --session latest
82
- ```
83
-
84
- Or use the decomposed beginner path directly:
85
-
86
- ```bash
87
- node scripts/cli.js check
88
- node scripts/cli.js run "implement this safely" --session first-run
89
- node scripts/cli.js report --session first-run
90
- node scripts/cli.js gate status --session first-run
91
- ```
92
-
93
- The simple paths map to the evidence loop: `check = doctor --quick`, `build = auto routing plus mode presets over run`, `auto = bounded build/verify/repair/report before apply`, and `run = work -> verify -> ship`.
94
-
95
- Use `build --dry-run` when you want to preview auto routing, mode, profile, workers, stages, and apply policy before running providers or writing session state. Use `build --explain` when you want the same routing rationale and evidence list after a real build.
96
-
97
- To add generated harness surfaces to another local repository:
98
-
99
- ```bash
100
- cd /path/to/my-project
101
- npx -y @ps-neko/nekowork@alpha init --profile developer --project-root .
102
- ```
103
-
104
- ## Example Report
105
-
106
- `report` is the main trust surface. It turns session evidence into a readable `REPORT.md`:
107
-
108
- ```text
109
- Verdict: approve_with_fixes
110
- Ship ready: false
111
- Human gate: required
112
- Applied: false
113
- Profile: quality
114
- Strict quality: enabled
115
- Acceptance coverage: 4/5
116
- Quality warnings: 2
117
-
118
- Evidence:
119
- - work-summary.json
120
- - verify-summary.json
121
- - ship-summary.json
122
- - gate-summary.json
27
+ # right after your AI tool changes some files:
28
+ npx -y @ps-neko/nekowork check # 30-sec environment check
29
+ npx -y @ps-neko/nekowork verify-pr # scan the diff → get a verdict
123
30
  ```
124
31
 
125
- The first screen of `REPORT.md` is the trust card: work produced, independent verification, Human Gate, ship readiness, apply state, and whether the target project was mutated.
32
+ `verify-pr` reads the diff, writes a plain-English `REPORT.md`, and tells you
33
+ whether the change is safe to merge.
126
34
 
127
- See the full report contract and example artifact in [docs/DEMO-REPORT.md](docs/DEMO-REPORT.md), and the one-minute terminal transcript in [docs/DEMO.md](docs/DEMO.md).
128
-
129
- ## Human Gate Example
130
-
131
- ```text
132
- Risk: security-sensitive auth parser change
133
- Codex verdict: approve_with_fixes
134
- Ship ready: false
135
-
136
- Required before apply:
137
- [ ] Add parser boundary test
138
- [ ] Remove long-lived API key env fallback
139
- [ ] Re-run verify --strict-quality
140
-
141
- Decision:
142
- - approve
143
- - block
144
- - request fixes
145
- ```
146
-
147
- Human Gate is the point where NEKOWORK stops being an autopilot and becomes an approval system.
148
-
149
- ## Apply Preview
150
-
151
- Before `apply`, NEKOWORK expects the human to inspect the evidence surface:
152
-
153
- ```text
154
- Session: first-work
155
- Diff source: captured live-work diff
156
- Files changed: 3
157
- Verifier verdict: approve
158
- Human gate: clear
159
- Ship ready: true
160
- Apply command: node scripts/cli.js apply --session first-work
161
- ```
162
-
163
- `apply` still does not commit, push, publish, deploy, or create a PR. It only applies the verified `SHIP_READY` diff when gates are clear and the target worktree is clean.
164
-
165
- ## Compared With Agent Packs
166
-
167
- | Tool pattern | Optimizes for | NEKOWORK optimizes for |
168
- |---|---|---|
169
- | Large Claude Code packs | More agents, commands, skills | Curated verification loop |
170
- | Team simulation | More specialist perspectives | Read-only team plus one executor |
171
- | Autopilot | Fast autonomous execution | verified autonomy until apply, report, gate, explicit apply |
172
- | Discipline workflows | Better development habits | Evidence-backed ship decision |
173
-
174
- ## When To Choose NEKOWORK
35
+ ## The 4 verbs
175
36
 
176
- | Use case | NEKOWORK fit |
37
+ | Verb | What it does |
177
38
  |---|---|
178
- | You want one command to keep working until report/gate | `auto` routes, builds, verifies, repairs, and stops before apply |
179
- | You want one build pass with safe routing | `build` routes the task into safe mode presets |
180
- | You want daily planning, TDD, debugging, and finish checks | use the `productivity` pack |
181
- | You want team-style review before implementation | use the `team` pack; handoffs stay read-only |
182
- | You need PR or release evidence | use `pr` or `release` before ship/apply |
183
- | You need sensitive-change control | use `security` and keep Human Gate active |
184
- | You need explicit apply instead of autopilot mutation | keep the default `report -> gate -> apply` path |
39
+ | `check` | Probe environment readiness (Node version, git repo, etc.) |
40
+ | `verify-pr` | Scan working-tree diff. Produce REPORT.md + .nekowork/decision.json |
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` |
185
43
 
186
- Use other AI development tools when they fit your preferred authoring flow. Use NEKOWORK when AI work needs to become verified, reportable, gated, and explicitly applied.
187
-
188
- ## Three Paths
189
-
190
- Most users should start with the Beginner path. The other paths are for explicit phase control or legacy compatibility.
191
-
192
- 1. Beginner verified autopilot: `check -> auto -> report -> gate`
193
- 2. One-pass safe build: `check -> build -> report -> gate`
194
- 3. Advanced: `ask -> plan -> team -> work -> verify -> gate -> ship -> report -> apply`
195
- 4. Legacy: `review` / `review-cycle`
196
-
197
- ## Why NEKOWORK
198
-
199
- NEKOWORK is for teams that want AI-assisted development without making the agent catalog the product. The default path keeps local auth, inspectable handoffs, single-executor writes, independent Codex verification, and Human Gate decisions in front of risky ship/apply steps.
200
-
201
- ## Status
202
-
203
- - Current repository version: `0.1.0-alpha.8` alpha candidate
204
- - Current package name: `@ps-neko/nekowork`
205
- - Published CLI names: `nekowork` and `harness`
206
- - Current npm alpha: `@ps-neko/nekowork@0.1.0-alpha.7`
207
- - Current npm alpha.8 status: repository candidate; public publish is pending owner OTP/web auth
208
- - Supported install path today: npm alpha, clone, submodule, or local repository integration
209
- - Dist-tag note: use `@alpha` until a stable release; `latest` still points at the first alpha line
210
- - Default mode: mock providers, no API keys, no provider CLI calls
211
-
212
- Current local verification:
213
-
214
- - `npm run lint`: pass
215
- - `npm test`: 290 tests pass
216
- - `npm audit --audit-level=moderate`: 0 vulnerabilities
217
- - `npm pack --dry-run --json`: pass
218
- - `npx -y @ps-neko/nekowork@alpha check`: pass with warnings only
219
-
220
- ## Case-study Evidence
221
-
222
- | Flow | Risk type | Evidence produced |
223
- |---|---|---|
224
- | Financial UI mock | UI/product risk | report + Human Gate |
225
- | GitHub Actions hardening | CI/security risk | security findings + no-ship/ship evidence |
226
- | Quality lifecycle smoke | quality risk | strict-quality + acceptance coverage |
227
- | npm package boundary | package/release risk | pack/audit evidence |
228
- | Auth parser boundary | auth/security risk | parser boundary evidence |
229
- | Python protocol parser | protocol correctness risk | test-backed verification |
230
- | Dotenv configuration boundary | config/security risk | no-secret parser evidence |
231
-
232
- ## Official Packs
233
-
234
- | Pack | Adds | Use when |
235
- |---|---|---|
236
- | `core` | minimal verification runtime | first install or repo smoke |
237
- | `builder` | safe build modes entrypoint | one-command build with verification and gates |
238
- | `productivity` | planning, TDD, debugging, finish routines | daily AI-assisted development |
239
- | `team` | read-only role handoffs | you want team-style review before one executor writes |
240
- | `debugging` | failing-test and regression triage | the task starts from a bug or unclear root cause |
241
- | `maintenance` | dependency, refactor, migration, cleanup routines | routine upkeep still needs verification |
242
- | `pr` | diff review, test evidence, changelog, risk notes | preparing or reviewing a PR |
243
- | `catalog-plus` | richest curated catalog surface | evaluating the full NEKOWORK catalog |
244
- | `quality` | acceptance coverage, strict evidence prompts | feature work needs proof |
245
- | `security` | auth/secrets/deploy risk prompts | sensitive changes |
246
- | `frontend` | UI mockup, component review, accessibility checks | product-facing UI work |
247
- | `testing` | regression planning and coverage handoffs | test confidence is the main risk |
248
- | `release` | ship/no-ship evidence | pre-release checks |
249
- | `enterprise` | full catalog with all gates | high-control teams |
250
-
251
- ## Quick Start Details
252
-
253
- Requirements: Node.js 22+, npm, and git.
254
-
255
- For a repository-pinned local demo:
256
-
257
- ```bash
258
- git clone https://github.com/Ps-Neko/NEKOWORK.git harness
259
- cd harness
260
- npm ci
261
- npm run demo:quick -- --cleanup
262
- ```
263
-
264
- This creates a disposable target project and runs `doctor -> build -> report -> gate status`. It uses mock providers and does not call Claude, Codex, Gemini, or paid APIs.
265
-
266
- To initialize another local repository with the published alpha:
267
-
268
- ```bash
269
- cd /path/to/my-project
270
- npx -y @ps-neko/nekowork@alpha init --profile developer --project-root .
271
- ```
272
-
273
- For the fuller first-run guide, see [docs/QUICKSTART.md](docs/QUICKSTART.md).
274
-
275
- For the trust and recovery model, see [Safety Guarantees](docs/SAFETY-GUARANTEES.md), [Failure Modes](docs/FAILURE-MODES.md), [Trust Model](docs/TRUST-MODEL.md), and [Why Not Autopilot](docs/WHY-NOT-AUTOPILOT.md).
276
-
277
- To see the repository-based external project flow end to end:
278
-
279
- ```bash
280
- npm run demo:external
281
- ```
282
-
283
- To inspect small case-study targets, see [examples/trading-dashboard-mock](examples/trading-dashboard-mock), [examples/github-actions-hardening](examples/github-actions-hardening), [examples/quality-lifecycle-smoke](examples/quality-lifecycle-smoke), and [docs/case-studies](docs/case-studies). They demonstrate financial UI, CI workflow, quality lifecycle, npm package, auth parser, Python protocol library, and environment configuration flows while still preserving Codex verification, Human Gate policy, and explicit apply control.
284
-
285
- ## Output Shape
286
-
287
- ```text
288
- doctor ... OK
289
- build workflow ... OK
290
- report ... OK
291
- gate status ... OK
292
- Demo completed: verdict=approve_with_fixes, ship_ready=false, applied=false
293
- ```
294
-
295
- Outputs are written under:
296
-
297
- ```text
298
- .harness/state/sessions/<session-id>/handoffs/
299
- .harness/state/sessions/<session-id>/REPORT.md
300
- ```
301
-
302
- ## Repository-Pinned Install
303
-
304
- ```bash
305
- cd <target-project>
306
- git submodule add https://github.com/Ps-Neko/NEKOWORK.git .harness-tool
307
- node .harness-tool/scripts/portability/simulate-port.js . --profile developer --verbose
308
- node .harness-tool/scripts/install-apply.js --profile developer --project-root .
309
- node .harness-tool/scripts/cli.js check --project-root .
310
- ```
311
-
312
- The NEKOWORK tool root stays in `.harness-tool/`. Session state, generated runtime files, and git work happen in the target project root.
313
-
314
- For a disposable external-project walkthrough, see [docs/EXAMPLE-PROJECT.md](docs/EXAMPLE-PROJECT.md).
315
-
316
- ## Live Provider Auth
317
-
318
- Live mode delegates auth to local CLI sessions:
319
-
320
- ```bash
321
- claude auth status
322
- codex login
323
- gemini
324
-
325
- node scripts/cli.js review "live local smoke" --live --no-ship
326
- ```
327
-
328
- Long-lived API key environment variables are blocked by default before provider CLI calls:
329
-
330
- - Claude: `ANTHROPIC_API_KEY`
331
- - Codex: `OPENAI_API_KEY`
332
- - Gemini: `GEMINI_API_KEY`, `GOOGLE_API_KEY`
333
-
334
- Use API-key paths only with explicit opt-in, for example `HARNESS_AUTH_ALLOW_ENV_OVERRIDE=1`.
335
-
336
- ## Main Surface
337
-
338
- The public alpha surface is intentionally small:
339
-
340
- - `doctor`: inspect local readiness
341
- - `ask`: clarify goal, scope, risk, and success criteria without provider calls
342
- - `plan`: create a planning handoff
343
- - `team`: create read-only handoffs from multiple worker perspectives
344
- - `work`: let a single executor produce an implement handoff and isolated diff
345
- - `verify`: run Codex-only verification on a prior work handoff
346
- - `gate`: inspect, approve, or block a human gate for a session
347
- - `ship`: produce a ship/no-ship readiness handoff after Codex verification
348
- - `apply`: apply a verified `SHIP_READY` live-work diff to the target project
349
- - `run`: execute the decomposed wrapper, `work -> verify -> ship`, with optional apply
350
- - `build`: one-command builder wrapper with default `auto` routing, explicit `fast`, `safe`, `team`, `tdd`, `release`, and `--dry-run` preview
351
- - `auto`: bounded autonomy wrapper that can repair fixable no-ship findings within budget, then report and stop before apply
352
- - `report`: summarize session evidence into `REPORT.md` without project mutation
353
- - `review`: run the legacy full Claude-led/Codex-reviewed workflow
354
- - `review-cycle`: explicit compatibility alias for the legacy full review workflow
355
- - `install --plan` / `install --apply`: project generated harness surfaces
356
-
357
- Advanced features such as `team-lite`, `ralph`, `wait`, instincts, cost tracking, and the Rust supervisor are documented in [docs/ADVANCED.md](docs/ADVANCED.md).
358
-
359
- `plan` is recommended before `work` for larger changes. The current `run` command intentionally stays compact: it runs `work -> verify -> ship`, records acceptance criteria through `work`, and applies only when `--apply` is explicitly provided.
360
-
361
- Use `build "<task>"` when NEKOWORK should be the single entrypoint. It defaults to `--mode auto`, classifies the task, selects `fast`, `safe`, `team`, `tdd`, or `release`, records build intelligence, and still uses one executor for writes, Codex verification before ship, and explicit apply only. The mode safety ordering is manifest-backed in `manifests/build-modes.json`. Use an explicit `--mode` when you need to override the router.
44
+ Anything else (`ask`, `plan`, `team`, `work`, `ship`, `build`, `auto`,
45
+ `pr-prep`, `review`, ...) belongs to `@ps-neko/nekowork-harness` (legacy and
46
+ power-user surface). The slim package rejects those verbs with a redirect.
362
47
 
363
- Risky explicit overrides are protected. For example, `build "change OAuth token validation" --mode fast` is blocked because auto routing recommends `safe`, and `build "prepare npm package publish release notes" --mode fast` is blocked because auto routing recommends the higher-safety `release` mode. Use the recommended mode or add `--force-mode` only when you intentionally accept that downgrade.
48
+ ## How it works
364
49
 
365
- Use `auto "<task>"` when NEKOWORK should continue before the apply boundary. `auto` routes through the same build intelligence, runs `build`, repeats fixable no-ship work within `--level cautious|normal|aggressive` budgets, writes `auto-summary.json`, generates `REPORT.md`, and never accepts `--apply`.
366
-
367
- Use `--profile quality` or `--profile security` on `work`, `verify`, and `run` when a task needs stronger evidence prompts. Add `--strict-quality` to `verify`, `run`, or `build` when missing evidence or acceptance coverage should become a fix-required verdict before ship.
368
-
369
- Use official packs when choosing an install shape:
370
-
371
- ```bash
372
- node scripts/install-plan.js --list
373
- node scripts/install-plan.js --pack productivity
374
- node scripts/install-plan.js --pack team
375
- node scripts/install-plan.js --pack pr
376
- node scripts/install-plan.js --pack builder
377
- node scripts/install-plan.js --pack quality
378
- node scripts/install-plan.js --pack security --target codex --json
379
- ```
50
+ 1. Your AI tool writes the code. `nekowork` never writes it for you.
51
+ 2. `verify-pr` runs a fixed set of risk rules over the diff — same diff, same
52
+ verdict, every time. **No LLM gets to "vote" the result.**
53
+ 3. It saves the evidence into a `REPORT.md` you can read.
54
+ 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.
56
+
57
+ ## Docs
58
+
59
+ - [Quickstart](../nekowork-cli/docs/QUICKSTART.md)
60
+ - [How verification works](../nekowork-cli/docs/SCOPE-1.0.md)
61
+ - [Benchmark](../nekowork-cli/docs/BENCHMARK.md) 73/74 (99%) recall, 0/47 FP, 38 real OSS positives
62
+ - [Integration](../nekowork-cli/docs/INTEGRATION.md)
63
+
64
+ ## License
380
65
 
381
- Packs are aliases over validated profiles. They add clearer product packaging without weakening the core gates. `productivity` is the shortest daily discipline pack: brainstorm, plan, TDD, debug, execute, verify, report, and finish over the same safe build loop. `team`, `debugging`, `maintenance`, `pr`, and `catalog-plus` make the catalog feel richer while still resolving to safety-checked profiles.
382
-
383
- ## Catalog
384
-
385
- - Agents: 11
386
- - Skills: 10
387
- - Hooks: 5
388
- - Modules: 7
389
- - Profiles: `core`, `developer`, `builder`, `productivity`, `security`, `product`, `quality`, `frontend`, `testing`, `research`, `full`
390
- - Official packs: `core`, `builder`, `productivity`, `team`, `debugging`, `maintenance`, `pr`, `catalog-plus`, `quality`, `security`, `frontend`, `testing`, `release`, `enterprise`
391
- - Harness targets: `claude`, `codex`, `cursor`, `gemini`, `opencode`
392
-
393
- Key skills:
394
-
395
- - `claude-led-codex-review`
396
- - `plan-eng-review`
397
- - `tdd-workflow`
398
- - `acceptance-coverage`
399
- - `review`
400
- - `ship`
401
- - `ralph`
402
- - `security-hardening`
403
- - `release-readiness`
404
- - `porting`
405
-
406
- ## Common Commands
407
-
408
- ```bash
409
- node scripts/cli.js doctor
410
- node scripts/cli.js doctor --quick --gemini-smoke
411
- npm run demo:quick
412
- node scripts/cli.js build "builder smoke" --mode team --session build-smoke
413
- node scripts/cli.js auto "fix failing tests safely" --level normal --dry-run
414
- node scripts/cli.js report --session latest
415
- node scripts/install-plan.js --list
416
- node scripts/install-plan.js --pack quality
417
- node scripts/install-plan.js --profile developer
418
- node scripts/install-apply.js --profile developer --project-root <target>
419
-
420
- node scripts/cli.js ask "clarify a risky or ambiguous request"
421
- node scripts/cli.js plan "draft a safe implementation plan"
422
- node scripts/cli.js team "collect read-only worker handoffs" --workers planner,research,security,test --no-write
423
- node scripts/cli.js work "implement the planned change with one executor" --single-executor --session work-smoke
424
- node scripts/cli.js verify "verify the implemented change" --session work-smoke
425
- node scripts/cli.js verify "verify quality evidence" --profile quality --strict-quality --session work-smoke
426
- node scripts/cli.js gate status --session work-smoke
427
- node scripts/cli.js ship "prepare ship readiness" --require-clean-gates --session work-smoke
428
- node scripts/cli.js report --session work-smoke
429
- node scripts/cli.js apply --session work-smoke
430
- node scripts/cli.js run "implement, verify, and prepare ship readiness" --session run-smoke
431
- node scripts/cli.js report --session run-smoke
432
- node scripts/cli.js review "implement and review this change" --no-ship
433
- node scripts/cli.js review-cycle "legacy full-cycle compatibility smoke" --no-ship
434
- node scripts/cli.js review "security-sensitive change" --secure --no-ship
435
-
436
- npm run lint
437
- npm test
438
- npm audit --audit-level=moderate
439
- node scripts/repair.js --check
440
- node scripts/sync-claude-md.js --check
441
- node scripts/build-codemaps.js --check
442
- ```
443
-
444
- ## Release Gates
445
-
446
- Before any tag or public npm decision, run:
447
-
448
- ```bash
449
- npm run lint
450
- npm test
451
- npm audit --audit-level=moderate
452
- node scripts/repair.js --check
453
- node scripts/sync-claude-md.js --check
454
- node scripts/build-codemaps.js --check
455
- npm run security:hardening
456
- npm pack --dry-run --json
457
- ```
458
-
459
- `npm pack --dry-run --json` currently produces a package named like `ps-neko-nekowork-0.1.0-alpha.8.tgz`. It does not publish.
460
-
461
- ## Documentation
462
-
463
- - [docs/QUICKSTART.md](docs/QUICKSTART.md) - first run and common paths
464
- - [docs/BUILD.md](docs/BUILD.md) - build command modes and invariants
465
- - [docs/AUTONOMY.md](docs/AUTONOMY.md) - bounded autonomy, repair budgets, and the apply boundary
466
- - [docs/PARALLEL-CANDIDATES.md](docs/PARALLEL-CANDIDATES.md) - planned isolated candidate writer contract
467
- - [docs/PR-PREP.md](docs/PR-PREP.md) - planned PR prep artifact contract
468
- - [docs/WHY-NEKOWORK.md](docs/WHY-NEKOWORK.md) - comparison and product positioning
469
- - [docs/CATALOG-PACKS.md](docs/CATALOG-PACKS.md) - curated catalog, official packs, and case-study evidence
470
- - [docs/PUBLISH-ALPHA.md](docs/PUBLISH-ALPHA.md) - public npm alpha release plan
471
- - [docs/ROADMAP.md](docs/ROADMAP.md) - small alpha roadmap and non-goals
472
- - [docs/FEEDBACK-TRIAGE.md](docs/FEEDBACK-TRIAGE.md) - alpha feedback classification and response guide
473
- - [docs/INTERNAL-PROVIDER.md](docs/INTERNAL-PROVIDER.md) - private command adapter protocol
474
- - [docs/DEMO.md](docs/DEMO.md) - sample command output and generated files
475
- - [docs/DEMO-REPORT.md](docs/DEMO-REPORT.md) - readable session report UX
476
- - [docs/EXAMPLE-PROJECT.md](docs/EXAMPLE-PROJECT.md) - repository-based external project demo
477
- - [docs/case-studies](docs/case-studies) - real external project run evidence
478
- - [examples/trading-dashboard-mock](examples/trading-dashboard-mock) - standalone financial UI mock target and case-study evidence
479
- - [examples/quality-lifecycle-smoke](examples/quality-lifecycle-smoke) - standalone quality profile and strict-quality case-study evidence
480
- - [docs/SECURITY.md](docs/SECURITY.md) - local-first auth and safety model
481
- - [docs/ADVANCED.md](docs/ADVANCED.md) - advanced workflows and runtime features
482
- - [docs/SETUP.md](docs/SETUP.md) - local contributor setup and live provider smoke
483
- - [docs/PORTING.md](docs/PORTING.md) - using NEKOWORK in an external project
484
- - [docs/RELEASE-READINESS.md](docs/RELEASE-READINESS.md) - release and publish gates
485
- - [docs/RUNBOOK.md](docs/RUNBOOK.md) - operations guide
486
- - [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md) - system architecture
487
- - [docs/PRODUCT-PRINCIPLES.md](docs/PRODUCT-PRINCIPLES.md) - product position, invariants, CLI phase semantics
488
- - [docs/AI-DEVELOPMENT-LIFECYCLE.md](docs/AI-DEVELOPMENT-LIFECYCLE.md) - safe build modes, quality runtime, and disciplined lifecycle
489
- - [docs/NAMING.md](docs/NAMING.md) - product, CLI, pack, and legacy alias naming contract
490
- - [docs/CORE-INVARIANTS.md](docs/CORE-INVARIANTS.md) - non-negotiable runtime safety rules
491
- - [docs/CLI-STAGES.md](docs/CLI-STAGES.md) - stage contract and compatibility transition
492
- - [docs/RISK-CLASSIFIER.md](docs/RISK-CLASSIFIER.md) - shared risk tags, challenge, and gate policy
493
- - [docs/examples/TRADING-DASHBOARD-MOCK.md](docs/examples/TRADING-DASHBOARD-MOCK.md) - financial mockup flow with Human Gate
494
- - [docs/examples/GITHUB-ACTIONS-HARDENING.md](docs/examples/GITHUB-ACTIONS-HARDENING.md) - CI workflow hardening flow with Human Gate
495
- - [docs/examples/QUALITY-LIFECYCLE-SMOKE.md](docs/examples/QUALITY-LIFECYCLE-SMOKE.md) - quality profile flow with evidence and acceptance coverage
496
- - [docs/AUDIT.md](docs/AUDIT.md) - readiness and remaining debt
497
- - [docs/CHANGELOG.md](docs/CHANGELOG.md) - project history
498
- - [SOUL.md](SOUL.md), [RULES.md](RULES.md), [AGENTS.md](AGENTS.md) - project principles and agent rules
499
-
500
- ## License
501
-
502
- MIT
66
+ MIT