@ps-neko/nekowork 0.1.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 (203) hide show
  1. package/AGENTS.md +112 -0
  2. package/CLAUDE.md +81 -0
  3. package/LICENSE +21 -0
  4. package/README.md +283 -0
  5. package/REVIEW.md +96 -0
  6. package/RULES.md +51 -0
  7. package/SOUL.md +21 -0
  8. package/WORKING-CONTEXT.md +52 -0
  9. package/agent.yaml +219 -0
  10. package/agents/architect.md +57 -0
  11. package/agents/code-reviewer.md +60 -0
  12. package/agents/codex-challenger.md +53 -0
  13. package/agents/codex-reviewer.md +56 -0
  14. package/agents/debugger.md +33 -0
  15. package/agents/doc-writer.md +51 -0
  16. package/agents/executor.md +41 -0
  17. package/agents/planner.md +49 -0
  18. package/agents/research.md +50 -0
  19. package/agents/security-reviewer.md +47 -0
  20. package/agents/test-engineer.md +41 -0
  21. package/bridge/mcp-server.js +301 -0
  22. package/commands/claude-led-codex-review.md +29 -0
  23. package/docs/ADVANCED.md +321 -0
  24. package/docs/AI-DEVELOPMENT-LIFECYCLE.md +105 -0
  25. package/docs/ARCHITECTURE.md +205 -0
  26. package/docs/AUDIT.md +114 -0
  27. package/docs/AUTH-MIGRATION.md +282 -0
  28. package/docs/CHANGELOG.md +97 -0
  29. package/docs/CLI-STAGES.md +89 -0
  30. package/docs/CODEMAPS/README.md +15 -0
  31. package/docs/CODEMAPS/agents.md +22 -0
  32. package/docs/CODEMAPS/bridge.md +18 -0
  33. package/docs/CODEMAPS/hooks.md +28 -0
  34. package/docs/CODEMAPS/manifests.md +14 -0
  35. package/docs/CODEMAPS/rules.md +22 -0
  36. package/docs/CODEMAPS/schemas.md +21 -0
  37. package/docs/CODEMAPS/scripts.md +158 -0
  38. package/docs/CODEMAPS/skills.md +29 -0
  39. package/docs/CODEMAPS/tests.md +98 -0
  40. package/docs/CORE-INVARIANTS.md +38 -0
  41. package/docs/DEMO.md +110 -0
  42. package/docs/EXAMPLE-PROJECT.md +92 -0
  43. package/docs/PORTING.md +154 -0
  44. package/docs/PRODUCT-PRINCIPLES.md +303 -0
  45. package/docs/PUBLISH-ALPHA.md +106 -0
  46. package/docs/QUICKSTART.md +344 -0
  47. package/docs/RELEASE-READINESS.md +140 -0
  48. package/docs/RISK-CLASSIFIER.md +50 -0
  49. package/docs/RUNBOOK.md +146 -0
  50. package/docs/SECURITY.md +79 -0
  51. package/docs/SETUP.md +142 -0
  52. package/docs/WHY-NEKOWORK.md +64 -0
  53. package/docs/case-studies/README.md +16 -0
  54. package/docs/case-studies/SINDRESORHUS-IS-PLAIN-OBJ.md +141 -0
  55. package/docs/dev-log/2026-04-29-p1-recovery.md +142 -0
  56. package/docs/dev-log/2026-04-29-week1-4.md +81 -0
  57. package/docs/examples/GITHUB-ACTIONS-HARDENING.md +86 -0
  58. package/docs/examples/QUALITY-LIFECYCLE-SMOKE.md +32 -0
  59. package/docs/examples/TRADING-DASHBOARD-MOCK.md +65 -0
  60. package/docs/workflows-stash/README.md +32 -0
  61. package/docs/workflows-stash/harness-review.yml +166 -0
  62. package/docs/workflows-stash/harness-validate.yml +48 -0
  63. package/examples/github-actions-hardening/.github/workflows/hardened-validate.yml +38 -0
  64. package/examples/github-actions-hardening/README.md +31 -0
  65. package/examples/github-actions-hardening/case-study/ASK.md +26 -0
  66. package/examples/github-actions-hardening/case-study/GATE_STATUS.md +28 -0
  67. package/examples/github-actions-hardening/case-study/PLAN.md +25 -0
  68. package/examples/github-actions-hardening/case-study/SHIP_READY.md +21 -0
  69. package/examples/github-actions-hardening/case-study/TASK.md +30 -0
  70. package/examples/github-actions-hardening/case-study/TEAM_HANDOFFS.md +37 -0
  71. package/examples/github-actions-hardening/case-study/VERIFY_SUMMARY.md +35 -0
  72. package/examples/github-actions-hardening/case-study/WORK_SUMMARY.md +24 -0
  73. package/examples/github-actions-hardening/package.json +12 -0
  74. package/examples/github-actions-hardening/scripts/check.mjs +43 -0
  75. package/examples/quality-lifecycle-smoke/README.md +30 -0
  76. package/examples/quality-lifecycle-smoke/case-study/ASK.md +24 -0
  77. package/examples/quality-lifecycle-smoke/case-study/GATE_STATUS.md +10 -0
  78. package/examples/quality-lifecycle-smoke/case-study/PLAN.md +19 -0
  79. package/examples/quality-lifecycle-smoke/case-study/SHIP_READY.md +11 -0
  80. package/examples/quality-lifecycle-smoke/case-study/TASK.md +19 -0
  81. package/examples/quality-lifecycle-smoke/case-study/TEAM_HANDOFFS.md +21 -0
  82. package/examples/quality-lifecycle-smoke/case-study/VERIFY_SUMMARY.md +44 -0
  83. package/examples/quality-lifecycle-smoke/case-study/WORK_SUMMARY.md +19 -0
  84. package/examples/quality-lifecycle-smoke/package.json +8 -0
  85. package/examples/quality-lifecycle-smoke/scripts/check.mjs +44 -0
  86. package/examples/trading-dashboard-mock/README.md +33 -0
  87. package/examples/trading-dashboard-mock/case-study/ASK.md +24 -0
  88. package/examples/trading-dashboard-mock/case-study/GATE_STATUS.md +28 -0
  89. package/examples/trading-dashboard-mock/case-study/PLAN.md +23 -0
  90. package/examples/trading-dashboard-mock/case-study/SHIP_READY.md +21 -0
  91. package/examples/trading-dashboard-mock/case-study/TASK.md +29 -0
  92. package/examples/trading-dashboard-mock/case-study/TEAM_HANDOFFS.md +49 -0
  93. package/examples/trading-dashboard-mock/case-study/VERIFY_SUMMARY.md +35 -0
  94. package/examples/trading-dashboard-mock/case-study/WORK_SUMMARY.md +27 -0
  95. package/examples/trading-dashboard-mock/fixtures/market.json +9 -0
  96. package/examples/trading-dashboard-mock/index.html +76 -0
  97. package/examples/trading-dashboard-mock/package.json +9 -0
  98. package/examples/trading-dashboard-mock/scripts/check.mjs +54 -0
  99. package/examples/trading-dashboard-mock/src/app.js +83 -0
  100. package/examples/trading-dashboard-mock/src/styles.css +227 -0
  101. package/hooks/hooks.json +44 -0
  102. package/hooks/scripts/config-protection.js +34 -0
  103. package/hooks/scripts/gateguard-fact-force.js +146 -0
  104. package/hooks/scripts/persistent-mode.mjs +27 -0
  105. package/hooks/scripts/pre-bash-dispatcher.js +63 -0
  106. package/hooks/scripts/quality-gate.js +106 -0
  107. package/manifests/install-components.json +195 -0
  108. package/manifests/install-modules.json +101 -0
  109. package/manifests/install-profiles.json +134 -0
  110. package/package.json +96 -0
  111. package/rules/common/coding-style.md +71 -0
  112. package/rules/common/security.md +69 -0
  113. package/rules/common/testing.md +58 -0
  114. package/rules/python/coding-style.md +80 -0
  115. package/rules/python/testing.md +86 -0
  116. package/rules/typescript/coding-style.md +97 -0
  117. package/rules/typescript/security.md +67 -0
  118. package/rules/typescript/testing.md +78 -0
  119. package/schemas/agent-yaml.schema.json +168 -0
  120. package/schemas/agent.schema.json +32 -0
  121. package/schemas/handoff.schema.json +105 -0
  122. package/schemas/hooks.schema.json +35 -0
  123. package/schemas/install-components.schema.json +46 -0
  124. package/schemas/install-modules.schema.json +39 -0
  125. package/schemas/install-profiles.schema.json +32 -0
  126. package/schemas/install-state.schema.json +42 -0
  127. package/schemas/routing.schema.json +42 -0
  128. package/schemas/skill.schema.json +19 -0
  129. package/scripts/agents/dispatch.js +144 -0
  130. package/scripts/agents/runners/claude.js +214 -0
  131. package/scripts/agents/runners/codex.js +233 -0
  132. package/scripts/agents/runners/gemini.js +92 -0
  133. package/scripts/agents/runners/mock.js +107 -0
  134. package/scripts/auth/github-import-gh.js +52 -0
  135. package/scripts/auth/github-login.js +79 -0
  136. package/scripts/auth/github-logout.js +21 -0
  137. package/scripts/auth/github-status.js +46 -0
  138. package/scripts/build-claude.js +101 -0
  139. package/scripts/build-codemaps.js +286 -0
  140. package/scripts/build-codex.js +93 -0
  141. package/scripts/build-cursor.js +132 -0
  142. package/scripts/build-gemini.js +117 -0
  143. package/scripts/build-opencode.js +117 -0
  144. package/scripts/ci/catalog.js +120 -0
  145. package/scripts/ci/check-markers.js +48 -0
  146. package/scripts/ci/security-hardening.js +270 -0
  147. package/scripts/ci/validate-agents.js +88 -0
  148. package/scripts/ci/validate-hooks.js +99 -0
  149. package/scripts/ci/validate-manifests.js +128 -0
  150. package/scripts/ci/validate-skills.js +93 -0
  151. package/scripts/cli.js +1134 -0
  152. package/scripts/core/auth-guard.js +22 -0
  153. package/scripts/core/build-roots.js +11 -0
  154. package/scripts/core/cli-resolver.js +64 -0
  155. package/scripts/core/execution-workspace.js +84 -0
  156. package/scripts/core/git-mutation-guard.js +79 -0
  157. package/scripts/core/install-state.js +125 -0
  158. package/scripts/core/json-extractor.js +32 -0
  159. package/scripts/core/subprocess.js +74 -0
  160. package/scripts/daemon/wait.js +278 -0
  161. package/scripts/demo-external-project.js +222 -0
  162. package/scripts/demo-quick-run.js +193 -0
  163. package/scripts/demo-review.js +204 -0
  164. package/scripts/doctor.js +296 -0
  165. package/scripts/install-apply.js +185 -0
  166. package/scripts/install-plan.js +411 -0
  167. package/scripts/lib/acceptance-criteria.js +105 -0
  168. package/scripts/lib/costs.js +82 -0
  169. package/scripts/lib/instincts.js +194 -0
  170. package/scripts/lib/keychain.js +85 -0
  171. package/scripts/lib/profile-policy.js +134 -0
  172. package/scripts/lib/profile-safety.js +81 -0
  173. package/scripts/lib/risk-classifier.js +145 -0
  174. package/scripts/lib/router.js +138 -0
  175. package/scripts/lib/severity.js +99 -0
  176. package/scripts/lib/token-vault.js +136 -0
  177. package/scripts/orchestrators/apply.js +225 -0
  178. package/scripts/orchestrators/ask.js +143 -0
  179. package/scripts/orchestrators/gate.js +179 -0
  180. package/scripts/orchestrators/ralph.js +179 -0
  181. package/scripts/orchestrators/review.js +452 -0
  182. package/scripts/orchestrators/run.js +151 -0
  183. package/scripts/orchestrators/ship.js +339 -0
  184. package/scripts/orchestrators/team-lite.js +270 -0
  185. package/scripts/orchestrators/team.js +244 -0
  186. package/scripts/orchestrators/verify.js +306 -0
  187. package/scripts/orchestrators/work.js +207 -0
  188. package/scripts/portability/simulate-port.js +220 -0
  189. package/scripts/repair.js +184 -0
  190. package/scripts/sync-claude-md.js +220 -0
  191. package/scripts/verify/claude-live.js +30 -0
  192. package/scripts/verify/codex-live.js +60 -0
  193. package/scripts/verify/gemini-live.js +48 -0
  194. package/scripts/verify/runtime.js +105 -0
  195. package/skills/claude-led-codex-review/SKILL.md +133 -0
  196. package/skills/plan-eng-review/SKILL.md +51 -0
  197. package/skills/porting/SKILL.md +69 -0
  198. package/skills/ralph/SKILL.md +48 -0
  199. package/skills/release-readiness/SKILL.md +62 -0
  200. package/skills/review/SKILL.md +42 -0
  201. package/skills/security-hardening/SKILL.md +59 -0
  202. package/skills/ship/SKILL.md +44 -0
  203. package/skills/tdd-workflow/SKILL.md +42 -0
@@ -0,0 +1,154 @@
1
+ # Porting NEKOWORK Into Another Project
2
+
3
+ NEKOWORK `0.1.0-alpha.0` is prepared as a public alpha candidate. It is not published to npm yet, so use a submodule or local checkout until npm owner auth is available and the alpha is published.
4
+
5
+ ## Local Demo First
6
+
7
+ Before touching a real target project, run the disposable external-project demo from the NEKOWORK checkout:
8
+
9
+ ```bash
10
+ npm run demo:external
11
+ ```
12
+
13
+ The demo creates a tiny target project, runs the porting preflight, applies generated harness outputs, runs `doctor --quick`, and creates a planning session. Use `npm run demo:external -- --cleanup` when you want the generated target removed after success.
14
+
15
+ ## Recommended Shape
16
+
17
+ ```text
18
+ target-project/
19
+ .harness-tool/ # NEKOWORK checkout or submodule
20
+ .harness/ # generated install/session state
21
+ .claude/ # generated Claude Code surface
22
+ .codex/config.toml # generated Codex surface
23
+ .cursor/hooks.json # generated Cursor surface
24
+ .gemini/GEMINI.md # generated Gemini surface
25
+ .opencode/config.json # generated OpenCode surface
26
+ ```
27
+
28
+ The tool root stays in `.harness-tool/`. Generated harness files, session state, and git-aware execution target the project root.
29
+
30
+ ## Submodule Install
31
+
32
+ ```bash
33
+ cd <target-project>
34
+ git submodule add https://github.com/Ps-Neko/NEKOWORK.git .harness-tool
35
+ node .harness-tool/scripts/portability/simulate-port.js . --profile developer --verbose
36
+ node .harness-tool/scripts/install-apply.js --profile developer --project-root .
37
+ node .harness-tool/scripts/cli.js doctor --project-root . --quick
38
+ node .harness-tool/scripts/cli.js plan "target project smoke" --project-root . --session target-smoke
39
+ ```
40
+
41
+ ## Local Checkout Install
42
+
43
+ Use this when developing NEKOWORK and testing it against another project:
44
+
45
+ ```bash
46
+ cd C:/Users/Mun/harness
47
+ node scripts/portability/simulate-port.js <target-project> --profile developer --verbose
48
+ node scripts/install-apply.js --profile developer --project-root <target-project>
49
+ node scripts/cli.js doctor --project-root <target-project> --quick
50
+ node scripts/cli.js plan "target project smoke" --project-root <target-project> --session target-smoke
51
+ ```
52
+
53
+ ## What To Check
54
+
55
+ After `install-apply`, confirm these exist in the target project:
56
+
57
+ - `.harness/install-state.json`
58
+ - `.harness/state/sessions/`
59
+ - `.claude/`
60
+ - `.codex/config.toml`
61
+ - `.cursor/hooks.json`
62
+ - `.gemini/GEMINI.md`
63
+ - `.opencode/config.json`
64
+
65
+ The generated files are derived from `agent.yaml`, `agents/`, `skills/`, `hooks/`, `rules/`, and `manifests/` in the NEKOWORK tool root.
66
+
67
+ ## Live Provider Auth
68
+
69
+ Mock mode is the default and does not need provider CLIs. Live mode delegates to local CLI sessions:
70
+
71
+ ```bash
72
+ claude auth status
73
+ codex login status
74
+ gemini
75
+ ```
76
+
77
+ Then run:
78
+
79
+ ```bash
80
+ node .harness-tool/scripts/cli.js doctor --project-root . --quick --gemini-smoke
81
+ node .harness-tool/scripts/cli.js review "live smoke" --project-root . --live --no-ship
82
+ ```
83
+
84
+ Unset long-lived provider API keys unless you intentionally opt into metered API-key paths:
85
+
86
+ ```bash
87
+ unset ANTHROPIC_API_KEY
88
+ unset OPENAI_API_KEY
89
+ unset GEMINI_API_KEY
90
+ unset GOOGLE_API_KEY
91
+ ```
92
+
93
+ PowerShell:
94
+
95
+ ```powershell
96
+ Remove-Item Env:ANTHROPIC_API_KEY -ErrorAction SilentlyContinue
97
+ Remove-Item Env:OPENAI_API_KEY -ErrorAction SilentlyContinue
98
+ Remove-Item Env:GEMINI_API_KEY -ErrorAction SilentlyContinue
99
+ Remove-Item Env:GOOGLE_API_KEY -ErrorAction SilentlyContinue
100
+ ```
101
+
102
+ ## Profiles
103
+
104
+ - `core`: minimum rules, agents, hooks, and platform configs
105
+ - `developer`: default daily workflow profile
106
+ - `security`: security-focused review/challenge defaults
107
+ - `research`: research agent and Gemini-oriented surface
108
+ - `full`: all declared modules
109
+
110
+ Preview a profile before applying it:
111
+
112
+ ```bash
113
+ node .harness-tool/scripts/install-plan.js --profile developer --project-root .
114
+ node .harness-tool/scripts/install-plan.js --list
115
+ ```
116
+
117
+ ## Refresh After Catalog Changes
118
+
119
+ When NEKOWORK changes:
120
+
121
+ ```bash
122
+ git -C .harness-tool pull --ff-only
123
+ node .harness-tool/scripts/install-apply.js --profile developer --project-root .
124
+ node .harness-tool/scripts/repair.js --check
125
+ node .harness-tool/scripts/sync-claude-md.js --check
126
+ node .harness-tool/scripts/build-codemaps.js --check
127
+ ```
128
+
129
+ ## Troubleshooting
130
+
131
+ `simulate-port` reports high conflict:
132
+
133
+ - Inspect existing `.harness`, `.harness-tool`, `.mcp.json`, `CLAUDE.md`, and `AGENTS.md`.
134
+ - Prefer a dry run first and keep project-owned sections outside generated marker blocks.
135
+
136
+ `doctor` reports API key warnings:
137
+
138
+ - Unset provider API key variables.
139
+ - Use `HARNESS_AUTH_ALLOW_ENV_OVERRIDE=1` only for intentional metered calls.
140
+
141
+ `doctor --gemini-smoke` fails:
142
+
143
+ - Run interactive `gemini` once and choose Google login.
144
+ - Or configure Vertex/ADC auth for the local Gemini CLI.
145
+ - Re-run `npm run verify:gemini` from the NEKOWORK checkout.
146
+
147
+ Generated outputs are stale:
148
+
149
+ - Run `node .harness-tool/scripts/install-apply.js --profile developer --project-root .`.
150
+ - Re-run `node .harness-tool/scripts/cli.js doctor --project-root .`.
151
+
152
+ ## Version Pinning
153
+
154
+ For PoC work, pin the NEKOWORK submodule to a tag such as `v0.0.3`. Avoid `latest`-style moving references in production workflows.
@@ -0,0 +1,303 @@
1
+ # Product Principles
2
+
3
+ NEKOWORK is not a large agent pack. It is a local-first multi-AI development runtime where Claude produces work, Codex verifies it from a separate context, and human gates stop risky changes.
4
+
5
+ ## Position
6
+
7
+ ```text
8
+ NEKOWORK = Claude work -> Codex verification -> Human Gate
9
+ ```
10
+
11
+ Agent catalogs, skill packs, hooks, profiles, and team execution are useful only when they strengthen that verification loop.
12
+
13
+ NEKOWORK also acts as a local-first AI development quality runtime:
14
+
15
+ ```text
16
+ good development discipline
17
+ + product-aware scope control
18
+ + read-only multi-agent thinking
19
+ + evidence-based Codex verification
20
+ + Human Gate
21
+ + explicit apply
22
+ = gated AI development lifecycle
23
+ ```
24
+
25
+ See [AI-DEVELOPMENT-LIFECYCLE.md](AI-DEVELOPMENT-LIFECYCLE.md) for the lifecycle view.
26
+
27
+ ## Core Invariants
28
+
29
+ These rules are part of the product contract:
30
+
31
+ 1. Multi-worker phases are read-only by default.
32
+ 2. Only one executor may mutate project files in a work cycle.
33
+ 3. Codex review is the default independent verification path.
34
+ 4. Secure or sensitive changes require Codex challenge or human gate.
35
+ 5. Human gate cannot be bypassed by skill, hook, profile, or module expansion.
36
+ 6. Profiles may add capabilities, but they cannot weaken core safety gates.
37
+ 7. Live provider calls must use delegated local CLI auth unless the user explicitly opts into another path.
38
+ 8. Unexpected git mutation during read-only phases is a failure condition.
39
+
40
+ See [CORE-INVARIANTS.md](CORE-INVARIANTS.md) for the standalone invariant contract.
41
+
42
+ ## CLI Phase Semantics
43
+
44
+ The decomposed workflow is:
45
+
46
+ ```text
47
+ ask -> plan -> team -> work -> verify -> gate -> ship -> apply
48
+ ```
49
+
50
+ The phases mean:
51
+
52
+ | Phase | Meaning | Mutation |
53
+ |---|---|---|
54
+ | `ask` | Clarify goal, scope, risk, and success criteria. | No project mutation |
55
+ | `plan` | Produce an implementation plan and acceptance criteria. | No project mutation |
56
+ | `team` | Produce read-only handoffs from multiple worker perspectives. | No project mutation |
57
+ | `work` / `run` | Let a single executor implement the approved plan. | Single executor only |
58
+ | `verify` | Run Codex review, optional Codex challenge, and gate logic against prior work. | No project mutation |
59
+ | `gate` | Record explicit human approve/block decisions for `HUMAN_GATE`. | No project mutation |
60
+ | `review` | Compatibility full cycle for `ideate -> plan -> implement -> self-review -> codex-review -> codex-challenge -> ship`. | Legacy full loop |
61
+ | `review-cycle` | Explicit alias for the legacy `review` behavior during migration. | Legacy full loop |
62
+ | `ship` | Prepare a ship/no-ship readiness handoff after gates pass. | No project mutation |
63
+ | `apply` | Apply a verified `SHIP_READY` live-work diff to the target project. | Controlled project mutation |
64
+ | `run` | Convenience wrapper for `work -> verify -> ship`, optional `apply`. | Wrapper; mutation only with `--apply` |
65
+
66
+ For the `0.0.3` line, `review` remains the legacy full cycle, and `review-cycle` is an explicit compatibility alias:
67
+
68
+ ```text
69
+ ideate -> plan -> implement -> self-review -> codex-review -> codex-challenge -> ship
70
+ ```
71
+
72
+ Do not silently change that meaning. New wrappers and aliases should make the transition additive:
73
+
74
+ ```text
75
+ short term: ask + existing review cycle
76
+ mid term: work + verify + ship split mutation from verification and readiness
77
+ long term: ask -> plan -> team -> work -> verify -> gate -> ship -> apply
78
+ ```
79
+
80
+ See [CLI-STAGES.md](CLI-STAGES.md) for the standalone stage contract and compatibility window.
81
+
82
+ ## Profile Boundaries
83
+
84
+ Profiles group capabilities. They do not change safety invariants.
85
+
86
+ Current and target profile meanings:
87
+
88
+ | Profile | Boundary |
89
+ |---|---|
90
+ | `core` | Minimal rules, agents, hooks, platform configs, and safety gates. |
91
+ | `developer` | Daily development flow with quality workflow, Codex loop, and ops readiness. |
92
+ | `security` | Secure review defaults, network denial, critical human gates, and hardened checks. |
93
+ | `product` | Question gate, scope review, acceptance criteria, and product/design planning surfaces. |
94
+ | `quality` | Brainstorm, test-first planning, systematic debugging, evidence-based review, and verification before completion. |
95
+ | `frontend` | UI mockup, component review, accessibility, and front-end workflow surfaces. |
96
+ | `testing` | Test planning, regression checks, and coverage-oriented review surfaces. |
97
+ | `research` | Research-oriented handoffs and optional external knowledge surfaces. |
98
+ | `full` | All stable modules, still bounded by core safety invariants. |
99
+
100
+ ## Team Mode
101
+
102
+ Team mode should start as read-only handoff generation:
103
+
104
+ ```text
105
+ planner handoff
106
+ research handoff
107
+ design/product handoff
108
+ security handoff
109
+ test handoff
110
+ codex review handoff
111
+ ```
112
+
113
+ The public command is:
114
+
115
+ ```bash
116
+ harness team "<task>" --workers planner,research,product,security,test
117
+ harness team "<task>" --workers planner,research,product,security,test --no-write
118
+ ```
119
+
120
+ The initial rule is simple:
121
+
122
+ ```text
123
+ many workers may think
124
+ one executor may write
125
+ Codex must verify
126
+ Human Gate may stop
127
+ ```
128
+
129
+ Parallel write access is a later capability and requires stronger conflict tracking, ownership, audit logs, and rollback behavior.
130
+
131
+ Advanced `team-lite` remains a handoff and coordination surface. It records read-only intent and does not replace the single-executor `work`/`run` phase.
132
+
133
+ ## Work Mode
134
+
135
+ The public command is:
136
+
137
+ ```bash
138
+ harness work "<task>" --session <id>
139
+ harness work "<task>" --single-executor --session <id>
140
+ harness work "<task>" --profile quality --session <id>
141
+ ```
142
+
143
+ `work` is the single-executor mutation phase. In the `0.0.3` line it is deliberately conservative:
144
+
145
+ - only the `executor` agent runs
146
+ - mock mode writes an implement handoff only
147
+ - live mode writes in an isolated git worktree
148
+ - live diffs are persisted under the session
149
+ - the target project is not mutated directly
150
+ - Codex review and ship are not run
151
+
152
+ The next step after `work` is verification before any apply or ship path.
153
+
154
+ `work` writes `acceptance-criteria.json` for every session. It reuses `prd.json` acceptance criteria when present and otherwise records a task-derived minimum so verification and ship readiness always have a success artifact to reference.
155
+
156
+ ## Verify Mode
157
+
158
+ The public command is:
159
+
160
+ ```bash
161
+ harness verify "<task>" --session <id>
162
+ harness verify "<task>" --profile quality --strict-quality --session <id>
163
+ ```
164
+
165
+ `verify` is the Codex-only verification phase:
166
+
167
+ - requires a prior `work` handoff in the same session
168
+ - reads prior handoffs and any captured diff
169
+ - runs `codex-review`
170
+ - runs `codex-challenge` for `--secure` or sensitive work
171
+ - expects findings to include evidence whenever possible: claim, evidence, required fix, confidence, and gate requirement
172
+ - records quality/security evidence warnings when profile policy asks for them
173
+ - records structured `acceptance_coverage` for the `quality` profile
174
+ - can escalate quality warnings into a fix-required verdict with `--strict-quality`
175
+ - writes `HUMAN_GATE` for critical or blocking findings
176
+ - does not implement
177
+ - does not ship
178
+
179
+ ## Gate Mode
180
+
181
+ The public commands are:
182
+
183
+ ```bash
184
+ harness gate status --session <id>
185
+ harness gate approve --session <id> --reason "<why>"
186
+ harness gate block --session <id> --reason "<why>"
187
+ ```
188
+
189
+ `gate` is the explicit human decision phase:
190
+
191
+ - `status` reads the session gate markers
192
+ - `approve` requires an open `HUMAN_GATE`
193
+ - `block` creates an explicit no-ship block for the session
194
+ - approval writes `GATE_APPROVED` but keeps `HUMAN_GATE` for audit
195
+ - block writes `GATE_BLOCKED` and keeps `ship` stopped
196
+ - no project files are mutated
197
+
198
+ ## Ship Mode
199
+
200
+ The public command is:
201
+
202
+ ```bash
203
+ harness ship "<task>" --session <id>
204
+ harness ship "<task>" --require-clean-gates --session <id>
205
+ ```
206
+
207
+ `ship` is the readiness phase:
208
+
209
+ - requires a prior `work` handoff in the same session
210
+ - requires prior Codex verification in the same session
211
+ - refuses to bypass an unresolved `HUMAN_GATE`
212
+ - respects explicit `gate approve` and `gate block` markers
213
+ - writes `SHIP_READY` only after a fully approved verification verdict
214
+ - writes `NO_SHIP` when fixable Codex findings remain
215
+ - does not publish, deploy, create a PR, or mutate project files
216
+
217
+ ## Apply Mode
218
+
219
+ The public command is:
220
+
221
+ ```bash
222
+ harness apply --session <id>
223
+ ```
224
+
225
+ `apply` is the controlled mutation phase:
226
+
227
+ - requires a prior `work` handoff
228
+ - requires prior Codex verification
229
+ - requires `SHIP_READY`
230
+ - refuses newer `NO_SHIP`, open `HUMAN_GATE`, or `GATE_BLOCKED`
231
+ - requires a captured diff from `work --live`
232
+ - applies the diff with git
233
+ - records `APPLIED_DIFF`
234
+ - leaves commit, push, PR, release, publish, and deploy to the human
235
+
236
+ `apply` is never implicit in the default beginner path. It only runs when the user explicitly asks for it through `apply` or `run --apply`.
237
+
238
+ ## Run Mode
239
+
240
+ The public command is:
241
+
242
+ ```bash
243
+ harness run "<task>" --session <id>
244
+ ```
245
+
246
+ `run` is a convenience wrapper:
247
+
248
+ - runs `work -> verify -> ship`
249
+ - forwards `--secure` to `verify`
250
+ - forwards `--live` to each phase
251
+ - does not apply by default
252
+ - applies only with explicit `--apply`
253
+ - stops on human gates
254
+ - writes `run-summary.json`
255
+
256
+ `run` is the short safe wrapper for new users. It is intentionally narrower than the full long-term workflow: it does not run `plan` yet, but it records acceptance criteria through `work` and preserves the same Codex verification and Human Gate policy. `plan` remains recommended before `work` for larger changes and may become a required accepted artifact in a later release line.
257
+
258
+ ## Ralph Mode
259
+
260
+ The public command is:
261
+
262
+ ```bash
263
+ harness ralph "<task>" --engine review|run --max-iter <n>
264
+ ```
265
+
266
+ `ralph` is advanced and explicit:
267
+
268
+ - default `--engine review` preserves the legacy full-cycle behavior
269
+ - `--engine run` repeats `work -> verify -> ship`
270
+ - it never applies by default
271
+ - every iteration is a child session
272
+ - cost cap, human gate, and max-iteration limits stop the loop
273
+
274
+ ## Wait Mode
275
+
276
+ The public commands are:
277
+
278
+ ```bash
279
+ harness wait status
280
+ harness wait start
281
+ harness wait stop
282
+ ```
283
+
284
+ `wait` is an advanced persistent resume surface:
285
+
286
+ - it resumes only sessions that explicitly write an `active` contract
287
+ - supported active modes are `ralph`, `run`, and `review-cycle`
288
+ - it refuses to resume sessions with `HUMAN_GATE`
289
+ - it records `wait-summary.json` and `wait-events.jsonl`
290
+ - it may wake work back up, but it must not weaken Codex verification, Human Gate, or explicit apply rules
291
+
292
+ ## Sensitive Work
293
+
294
+ Treat these categories as gate-sensitive:
295
+
296
+ - auth, session, permission, OAuth, JWT, password, token, secret, crypto, TLS, CSRF, CORS, XSS, webhook
297
+ - payment, billing, broker/order execution, trading, financial automation
298
+ - production deploy, CI/CD workflow changes, cloud credentials, infrastructure changes
299
+ - database migrations, destructive data changes, personal data, rollback-sensitive work
300
+
301
+ Sensitive work may be planned, mocked, or reviewed, but it cannot bypass Codex verification and human gate policy.
302
+
303
+ See [RISK-CLASSIFIER.md](RISK-CLASSIFIER.md) for the shared classifier contract.
@@ -0,0 +1,106 @@
1
+ # Public Alpha Publish Plan
2
+
3
+ NEKOWORK `0.0.3` stays a private/local alpha. The first npm release is prepared as the public alpha candidate `0.1.0-alpha.0`.
4
+
5
+ Do not publish from the `0.0.3` line.
6
+
7
+ The repository metadata has been advanced to `0.1.0-alpha.0` with `private: false`. Actual publish is still blocked until `npm whoami` succeeds for an owner account.
8
+
9
+ ## Current Registry State
10
+
11
+ Checked on 2026-05-07:
12
+
13
+ ```text
14
+ npm view @ps-neko/nekowork version --json
15
+ -> E404 Not Found
16
+ ```
17
+
18
+ The package name is not publicly visible on npm from this environment. The machine is also not logged in:
19
+
20
+ ```text
21
+ npm whoami
22
+ -> ENEEDAUTH
23
+ ```
24
+
25
+ The publish package shape has been checked:
26
+
27
+ ```text
28
+ npm publish --dry-run --access public --tag alpha
29
+ -> pass
30
+ ```
31
+
32
+ Actual publish is still blocked by auth:
33
+
34
+ ```text
35
+ npm publish --access public --tag alpha
36
+ -> ENEEDAUTH
37
+ ```
38
+
39
+ ## Release Shape
40
+
41
+ Prepared first public package:
42
+
43
+ ```text
44
+ name: @ps-neko/nekowork
45
+ version: 0.1.0-alpha.0
46
+ dist-tag: alpha
47
+ bin: harness
48
+ ```
49
+
50
+ The alpha tag matters. It prevents accidental default installation before the owner decides the public package should become the stable install path.
51
+
52
+ ## Required Owner Decision
53
+
54
+ Before publishing, explicitly confirm:
55
+
56
+ - npm scope ownership for `@ps-neko`
57
+ - npm 2FA readiness
58
+ - package name `@ps-neko/nekowork`
59
+ - binary name `harness`
60
+ - public alpha version `0.1.0-alpha.0`
61
+ - `private` removed or set to `false`
62
+ - publish tag is `alpha`, not `latest`
63
+
64
+ ## Required Gates
65
+
66
+ Run:
67
+
68
+ ```bash
69
+ node scripts/cli.js doctor
70
+ node scripts/cli.js doctor --quick --gemini-smoke
71
+ npm run lint
72
+ npm test
73
+ npm run demo:quick -- --cleanup
74
+ npm run demo:external -- --cleanup
75
+ npm audit --audit-level=moderate
76
+ node scripts/repair.js --check
77
+ node scripts/sync-claude-md.js --check
78
+ node scripts/build-codemaps.js --check
79
+ npm pack --dry-run --json
80
+ npm publish --dry-run --access public --tag alpha
81
+ ```
82
+
83
+ Inspect the `npm pack --dry-run --json` file list before publishing.
84
+
85
+ ## Publish Commands
86
+
87
+ Only after npm owner auth is active:
88
+
89
+ ```bash
90
+ npm publish --access public --tag alpha
91
+ ```
92
+
93
+ Then smoke test from a fresh temporary directory:
94
+
95
+ ```bash
96
+ npx @ps-neko/nekowork@alpha doctor --quick
97
+ ```
98
+
99
+ If the `harness` bin cannot run correctly through `npx`, do not promote the package.
100
+
101
+ ## Post-Publish Work
102
+
103
+ - Add README npm install path.
104
+ - Add release notes.
105
+ - Tag the commit.
106
+ - Keep source/submodule install docs for users who want repository-pinned workflows.