@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,14 @@
1
+ # CODEMAP: manifests
2
+
3
+ > Generated by `scripts/build-codemaps.js` from `manifests/`. Do not edit directly.
4
+ > Directory shape and exported JS symbols only. Code bodies are intentionally omitted.
5
+
6
+ ## Directory Tree
7
+
8
+ ```text
9
+ manifests/
10
+ |-- install-components.json
11
+ |-- install-modules.json
12
+ `-- install-profiles.json
13
+ ```
14
+
@@ -0,0 +1,22 @@
1
+ # CODEMAP: rules
2
+
3
+ > Generated by `scripts/build-codemaps.js` from `rules/`. Do not edit directly.
4
+ > Directory shape and exported JS symbols only. Code bodies are intentionally omitted.
5
+
6
+ ## Directory Tree
7
+
8
+ ```text
9
+ rules/
10
+ |-- common/
11
+ | |-- coding-style.md
12
+ | |-- security.md
13
+ | `-- testing.md
14
+ |-- python/
15
+ | |-- coding-style.md
16
+ | `-- testing.md
17
+ `-- typescript/
18
+ |-- coding-style.md
19
+ |-- security.md
20
+ `-- testing.md
21
+ ```
22
+
@@ -0,0 +1,21 @@
1
+ # CODEMAP: schemas
2
+
3
+ > Generated by `scripts/build-codemaps.js` from `schemas/`. Do not edit directly.
4
+ > Directory shape and exported JS symbols only. Code bodies are intentionally omitted.
5
+
6
+ ## Directory Tree
7
+
8
+ ```text
9
+ schemas/
10
+ |-- agent-yaml.schema.json
11
+ |-- agent.schema.json
12
+ |-- handoff.schema.json
13
+ |-- hooks.schema.json
14
+ |-- install-components.schema.json
15
+ |-- install-modules.schema.json
16
+ |-- install-profiles.schema.json
17
+ |-- install-state.schema.json
18
+ |-- routing.schema.json
19
+ `-- skill.schema.json
20
+ ```
21
+
@@ -0,0 +1,158 @@
1
+ # CODEMAP: scripts
2
+
3
+ > Generated by `scripts/build-codemaps.js` from `scripts/`. Do not edit directly.
4
+ > Directory shape and exported JS symbols only. Code bodies are intentionally omitted.
5
+
6
+ ## Directory Tree
7
+
8
+ ```text
9
+ scripts/
10
+ |-- agents/
11
+ | |-- runners/
12
+ | | |-- claude.js
13
+ | | |-- codex.js
14
+ | | |-- gemini.js
15
+ | | `-- mock.js
16
+ | `-- dispatch.js
17
+ |-- auth/
18
+ | |-- github-import-gh.js
19
+ | |-- github-login.js
20
+ | |-- github-logout.js
21
+ | `-- github-status.js
22
+ |-- ci/
23
+ | |-- catalog.js
24
+ | |-- check-markers.js
25
+ | |-- security-hardening.js
26
+ | |-- validate-agents.js
27
+ | |-- validate-hooks.js
28
+ | |-- validate-manifests.js
29
+ | `-- validate-skills.js
30
+ |-- core/
31
+ | |-- auth-guard.js
32
+ | |-- build-roots.js
33
+ | |-- cli-resolver.js
34
+ | |-- execution-workspace.js
35
+ | |-- git-mutation-guard.js
36
+ | |-- install-state.js
37
+ | |-- json-extractor.js
38
+ | `-- subprocess.js
39
+ |-- daemon/
40
+ | `-- wait.js
41
+ |-- lib/
42
+ | |-- acceptance-criteria.js
43
+ | |-- costs.js
44
+ | |-- instincts.js
45
+ | |-- keychain.js
46
+ | |-- profile-policy.js
47
+ | |-- profile-safety.js
48
+ | |-- risk-classifier.js
49
+ | |-- router.js
50
+ | |-- severity.js
51
+ | `-- token-vault.js
52
+ |-- orchestrators/
53
+ | |-- apply.js
54
+ | |-- ask.js
55
+ | |-- gate.js
56
+ | |-- ralph.js
57
+ | |-- review.js
58
+ | |-- run.js
59
+ | |-- ship.js
60
+ | |-- team-lite.js
61
+ | |-- team.js
62
+ | |-- verify.js
63
+ | `-- work.js
64
+ |-- portability/
65
+ | `-- simulate-port.js
66
+ |-- verify/
67
+ | |-- claude-live.js
68
+ | |-- codex-live.js
69
+ | |-- gemini-live.js
70
+ | `-- runtime.js
71
+ |-- build-claude.js
72
+ |-- build-codemaps.js
73
+ |-- build-codex.js
74
+ |-- build-cursor.js
75
+ |-- build-gemini.js
76
+ |-- build-opencode.js
77
+ |-- cli.js
78
+ |-- demo-external-project.js
79
+ |-- demo-quick-run.js
80
+ |-- demo-review.js
81
+ |-- doctor.js
82
+ |-- install-apply.js
83
+ |-- install-plan.js
84
+ |-- repair.js
85
+ `-- sync-claude-md.js
86
+ ```
87
+
88
+ ## JS Exports
89
+
90
+ | File | Exports | Description |
91
+ |---|---|---|
92
+ | `agents/dispatch.js` | `dispatch`, `loadAgentFrontmatter` | dispatch. agent.md frontmatter provider runner . / JSON . . |
93
+ | `agents/runners/claude.js` | `buildCliArgs`, `buildSystem`, `buildUserMessage`, `extractJson`, `normalizeCliUsage`, `parseCliJson`, `runClaude` | Claude runner. Default live mode uses the local Claude Code CLI subscription/OAuth session. Set HARNESS_CLAUDE_RUNNER=sdk to opt into Anthro |
94
+ | `agents/runners/codex.js` | `buildPrompt`, `extractJson`, `normalizeHandoff`, `runCodex` | Codex runner: OpenAI Codex CLI subprocess . : codex . throw. (codex 0.124.0+ ): codex exec --sandbox read-only [--profile <name>] < prompt s |
95
+ | `agents/runners/gemini.js` | `buildCliArgs`, `buildPrompt`, `parseGeminiOutput`, `runGemini` | Gemini runner: calls the local Gemini CLI subprocess. Default auth is delegated to the user's local gemini/gcloud session. |
96
+ | `agents/runners/mock.js` | `runMock` | Mock runner: LLM . API / CLI dry-run . : - planner: AC 3 PRD - executor: - code-reviewer: round 1 high 1 (fix loop ), round 2 approve - code |
97
+ | `auth/github-import-gh.js` | _(none)_ | Import the already-authenticated GitHub CLI OAuth token into the HARNESS vault. This is an explicit local-session bridge, not a static API-k |
98
+ | `auth/github-login.js` | _(none)_ | GitHub OAuth Device Flow. : HARNESS_GITHUB_CLIENT_ID ( OAuth App client_id). docs/AUTH-MIGRATION.md 5.3. |
99
+ | `auth/github-logout.js` | _(none)_ | GitHub OAuth . vault . : device flow client secret GitHub revoke API . GitHub https://github.com/settings/applications . |
100
+ | `auth/github-status.js` | _(none)_ | GitHub OAuth . vault GitHub API . |
101
+ | `build-claude.js` | _(none)_ | (agents/, skills/, commands/, hooks/) .claude/ . Claude Code + .claude-plugin/plugin.json. |
102
+ | `build-codemaps.js` | _(none)_ | Generate docs/CODEMAPS/<area>.md from repository directories. The maps include a shallow directory tree plus exported JS symbols. They inten |
103
+ | `build-codex.js` | _(none)_ | .codex/ . Codex CLI : config.toml + agents/*.toml. |
104
+ | `build-cursor.js` | _(none)_ | .cursor/ . Cursor : .cursor/rules/*.mdc ( ), .cursorrules (legacy ). : hook PreToolUse/PostToolUse PascalCase before/after camelCase. |
105
+ | `build-gemini.js` | _(none)_ | .gemini/ . Gemini : (output_format: summary). . GEMINI.md , description (progressive disclosure). |
106
+ | `build-opencode.js` | _(none)_ | .opencode/ . opencode : JSON (config_format: json). agents/skills/hooks JSON . |
107
+ | `ci/catalog.js` | _(none)_ | . agent.yaml agents/skills/commands , . |
108
+ | `ci/check-markers.js` | _(none)_ | HARNESS:START / HARNESS:END . . |
109
+ | `ci/security-hardening.js` | `checkSecurityHardening`, `isPinnedActionRef`, `isSemverMcpPin` | Security hardening CI gate: workflow permissions/timeouts/action pins, MCP pins, package spec hygiene, package-lock presence, and OIDC cloud |
110
+ | `ci/validate-agents.js` | _(none)_ | agents/<name>.md frontmatter schemas/agent.schema.json . agent.yaml agents . |
111
+ | `ci/validate-hooks.js` | _(none)_ | hooks/hooks.json schemas/hooks.schema.json . |
112
+ | `ci/validate-manifests.js` | _(none)_ | agent.yaml + manifests/install-{profiles,modules,components}.json . 1) schema 2) |
113
+ | `ci/validate-skills.js` | _(none)_ | skills/<name>/SKILL.md frontmatter schemas/skill.schema.json . agent.yaml skills . |
114
+ | `cli.js` | _(none)_ | NEKOWORK/HARNESS CLI entrypoint. Public verbs: doctor, ask, plan, team, work, verify, gate, ship, apply, run, review, review-cycle, install, |
115
+ | `core/auth-guard.js` | ` BLOCKED_ENV `, `assertDelegatedCliAuth` | |
116
+ | `core/build-roots.js` | `buildRoots` | |
117
+ | `core/cli-resolver.js` | `assertProviderCliTrust`, `isPathInside`, `resolveCli`, `resolveProviderCli` | |
118
+ | `core/execution-workspace.js` | `applyExecutionDiff`, `captureExecutionDiff`, `changedFiles`, `withExecutionWorkspace` | |
119
+ | `core/git-mutation-guard.js` | `readGitStatus`, `withGitMutationGuard` | |
120
+ | `core/install-state.js` | `ZERO_SHA`, `assertInstallState`, `buildInstallState`, `buildStateComponent`, `installStatePath`, `loadInstallState`, `sha256`, `sha256OfCatalog`, `sha256OfDir`, `writeInstallState` | |
121
+ | `core/json-extractor.js` | `extractJson`, `parseJsonObject` | |
122
+ | `core/subprocess.js` | `spawnAndCollect` | |
123
+ | `daemon/wait.js` | `buildResumePlan`, `parseActiveFile`, `processWakeups`, `tick` | Persistent wait daemon. It watches wakeup.json files created by the persistent-mode hook and resumes only sessions that declare a safe engin |
124
+ | `demo-external-project.js` | _(none)_ | Create a tiny target project and run the repository-based NEKOWORK porting path. |
125
+ | `demo-quick-run.js` | _(none)_ | Run the shortest NEKOWORK experience against a disposable target project. |
126
+ | `demo-review.js` | _(none)_ | claude-led-codex-review (Week 1 ). LLM 7 / / round . ("git push ") ship . |
127
+ | `doctor.js` | `buildDoctorReport`, `parseDoctorArgs`, `renderDoctorReport` | |
128
+ | `install-apply.js` | _(none)_ | HARNESS install --apply : plan harness (agent.yaml harnesses ) install-state . (idempotent). git checkout . |
129
+ | `install-plan.js` | `plan` | HARNESS install --plan: dry-run manifest planner. |
130
+ | `lib/acceptance-criteria.js` | `buildDefaultAcceptanceCriteria`, `ensureAcceptanceCriteria`, `normalizeAcceptanceCriteria`, `readAcceptanceCriteria` | |
131
+ | `lib/costs.js` | `list`, `record`, `summarize` | . USD ~/.harness/costs.jsonl append. CLI : harness costs --since=7d ( --since=1h, 30m, all). |
132
+ | `lib/instincts.js` | `get`, `list`, `promote`, `prune`, `ready`, `record` | continuous-learning-v2 . review ( + + verdict ) ~/.harness/instincts/<id>.json . " " . |
133
+ | `lib/keychain.js` | `get`, `isAvailable`, `list`, `remove`, `set` | scripts/lib/keychain.js OS keychain wrapper (@napi-rs/keyring sync API). macOS Keychain / Windows Credential Manager / Linux Secret Service. |
134
+ | `lib/profile-policy.js` | `acceptanceCoverage`, `acceptanceCoverageWarnings`, `buildQualityChecklist`, `evidenceFieldWarnings`, `normalizeProfileName`, `profilePolicy` | |
135
+ | `lib/profile-safety.js` | `CORE_PROFILE_MODULES`, `validateProfileSafety` | |
136
+ | `lib/risk-classifier.js` | `SENSITIVE_PATTERNS`, `classifyRisk`, `gateReasonFromFindings`, `humanGatePolicy`, `isSensitiveWork` | |
137
+ | `lib/router.js` | `decide`, `trace` | . : stage, task, files, ecoMode, riskLevel : { agent, model, provider, rationale, alternatives } SKILL claude-led-codex-review Stage Routing |
138
+ | `lib/severity.js` | `classifyCategory`, `classifySeverity`, `deriveVerdict`, `riskLevel`, `severityCounts` | Severity / category + blast radius . REVIEW.md . . |
139
+ | `lib/token-vault.js` | `audit`, `backend`, `list`, `load`, `redact`, `remove`, `save` | scripts/lib/token-vault.js auth.token_store: os-keychain (default) encrypted-file. : HARNESS_TOKEN_STORE_KIND=os-keychain keychain only ( th |
140
+ | `orchestrators/apply.js` | `applyCycle`, `latestStageHandoff`, `readApplyGitStatus`, `readDiffForHandoff`, `readPriorHandoffs` | |
141
+ | `orchestrators/ask.js` | `askGate`, `buildQuestionGate`, `classifyAskTask` | |
142
+ | `orchestrators/gate.js` | `approveGate`, `blockGate`, `gateCommand`, `gateStatus`, `markerTime`, `readMarker` | |
143
+ | `orchestrators/ralph.js` | `defaultPrd`, `normalizeEngine`, `ralphLoop` | Persistent Ralph loop. It repeats an execution engine until PRD acceptance criteria pass, a human gate stops the run, cost cap is hit, or ma |
144
+ | `orchestrators/review.js` | ` SENSITIVE_PATTERNS `, `reviewCycle` | 7 review . claude-led-codex-review SKILL Stage Routing . : - 5/6 verdict block critical/high fix loop (executor , round++) - round = 3. crit |
145
+ | `orchestrators/run.js` | `runCycle` | |
146
+ | `orchestrators/ship.js` | `finalVerificationVerdict`, `humanGateReason`, `latestStageHandoff`, `readPriorHandoffs`, `shipCycle` | |
147
+ | `orchestrators/team-lite.js` | `TEAM_LITE_STAGES`, `assertTaskGraph`, `createTasks`, `teamLiteCycle` | |
148
+ | `orchestrators/team.js` | `DEFAULT_WORKERS`, `WORKER_SPECS`, `parseWorkers`, `teamCycle` | |
149
+ | `orchestrators/verify.js` | `gateReasonFromFindings`, `latestStageHandoff`, `readDiffForHandoff`, `readPriorHandoffs`, `verifyCycle` | |
150
+ | `orchestrators/work.js` | `nextRound`, `readPriorHandoffs`, `workCycle` | |
151
+ | `portability/simulate-port.js` | _(none)_ | PoC . PORTING.md 30 dry-run . : --target < > ( ) --profile <name> ( : research) positional target: node scripts/portability/simulate-port.js |
152
+ | `repair.js` | _(none)_ | HARNESS repair : install-state.json / sha256 . install-apply . - state . - . - sha256 ( ) . - --check . exit 1. |
153
+ | `sync-claude-md.js` | _(none)_ | CLAUDE.md / .claude/CLAUDE.md HARNESS:START~HARNESS:END agent.yaml + package.json + manifests . ( ) . (idempotent). "## " . |
154
+ | `verify/claude-live.js` | _(none)_ | Claude Code CLI live smoke. Uses the local Claude subscription/OAuth session by default, not ANTHROPIC_API_KEY. |
155
+ | `verify/codex-live.js` | _(none)_ | codex runner live (P2-c). : codex CLI ( 0.124) + ChatGPT . OPENAI_API_KEY , opt-in HARNESS_AUTH_ALLOW_ENV_OVERRIDE=1 . : 1 ~15K (ChatGPT ). |
156
+ | `verify/gemini-live.js` | _(none)_ | Gemini CLI live smoke. Uses the local Gemini/gcloud session by default, not GEMINI_API_KEY. |
157
+ | `verify/runtime.js` | _(none)_ | Rust runtime verification smoke: cargo build/test/clippy plus CLI IPC checks. |
158
+
@@ -0,0 +1,29 @@
1
+ # CODEMAP: skills
2
+
3
+ > Generated by `scripts/build-codemaps.js` from `skills/`. Do not edit directly.
4
+ > Directory shape and exported JS symbols only. Code bodies are intentionally omitted.
5
+
6
+ ## Directory Tree
7
+
8
+ ```text
9
+ skills/
10
+ |-- claude-led-codex-review/
11
+ | `-- SKILL.md
12
+ |-- plan-eng-review/
13
+ | `-- SKILL.md
14
+ |-- porting/
15
+ | `-- SKILL.md
16
+ |-- ralph/
17
+ | `-- SKILL.md
18
+ |-- release-readiness/
19
+ | `-- SKILL.md
20
+ |-- review/
21
+ | `-- SKILL.md
22
+ |-- security-hardening/
23
+ | `-- SKILL.md
24
+ |-- ship/
25
+ | `-- SKILL.md
26
+ `-- tdd-workflow/
27
+ `-- SKILL.md
28
+ ```
29
+
@@ -0,0 +1,98 @@
1
+ # CODEMAP: tests
2
+
3
+ > Generated by `scripts/build-codemaps.js` from `tests/`. Do not edit directly.
4
+ > Directory shape and exported JS symbols only. Code bodies are intentionally omitted.
5
+
6
+ ## Directory Tree
7
+
8
+ ```text
9
+ tests/
10
+ |-- e2e/
11
+ | |-- case-studies-doc.test.js
12
+ | |-- external-demo.test.js
13
+ | |-- github-actions-hardening-example.test.js
14
+ | |-- quality-lifecycle-example.test.js
15
+ | |-- quick-demo.test.js
16
+ | |-- review-cycle.test.js
17
+ | `-- trading-dashboard-example.test.js
18
+ |-- integration/
19
+ | `-- build-pipeline.test.js
20
+ |-- optional/
21
+ | `-- keychain-smoke.test.js
22
+ `-- unit/
23
+ |-- acceptance-criteria.test.js
24
+ |-- apply.test.js
25
+ |-- ask.test.js
26
+ |-- auth-guard.test.js
27
+ |-- cli-options.test.js
28
+ |-- codex-isolation.test.js
29
+ |-- core-utils.test.js
30
+ |-- costs.test.js
31
+ |-- doctor.test.js
32
+ |-- execution-workspace.test.js
33
+ |-- gate.test.js
34
+ |-- git-mutation-guard.test.js
35
+ |-- instincts.test.js
36
+ |-- orchestrator.test.js
37
+ |-- portability.test.js
38
+ |-- profile-safety.test.js
39
+ |-- ralph.test.js
40
+ |-- risk-classifier.test.js
41
+ |-- router.test.js
42
+ |-- run.test.js
43
+ |-- runners-extract.test.js
44
+ |-- security-hardening.test.js
45
+ |-- severity.test.js
46
+ |-- ship.test.js
47
+ |-- team-lite.test.js
48
+ |-- team.test.js
49
+ |-- token-vault.test.js
50
+ |-- verify.test.js
51
+ |-- wait.test.js
52
+ `-- work.test.js
53
+ ```
54
+
55
+ ## JS Exports
56
+
57
+ | File | Exports | Description |
58
+ |---|---|---|
59
+ | `e2e/case-studies-doc.test.js` | _(none)_ | |
60
+ | `e2e/external-demo.test.js` | _(none)_ | |
61
+ | `e2e/github-actions-hardening-example.test.js` | _(none)_ | |
62
+ | `e2e/quality-lifecycle-example.test.js` | _(none)_ | |
63
+ | `e2e/quick-demo.test.js` | _(none)_ | |
64
+ | `e2e/review-cycle.test.js` | _(none)_ | E2E smoke tests for the deterministic mock review flow. |
65
+ | `e2e/trading-dashboard-example.test.js` | _(none)_ | |
66
+ | `integration/build-pipeline.test.js` | _(none)_ | : install plan apply 5 state repair . . .harness/install-state.json . |
67
+ | `optional/keychain-smoke.test.js` | _(none)_ | OS keychain . npm test (tests/optional/ ). : HARNESS_KEYCHAIN_SMOKE=1 npm run test:keychain : HARNESS_KEYCHAIN_SMOKE=1 node --test tests/opt |
68
+ | `unit/acceptance-criteria.test.js` | _(none)_ | |
69
+ | `unit/apply.test.js` | _(none)_ | |
70
+ | `unit/ask.test.js` | _(none)_ | |
71
+ | `unit/auth-guard.test.js` | _(none)_ | |
72
+ | `unit/cli-options.test.js` | _(none)_ | |
73
+ | `unit/codex-isolation.test.js` | _(none)_ | Codex Claude . 2 "Claude , Codex " . codex buildPrompt Claude /agent body prompt leak . |
74
+ | `unit/core-utils.test.js` | _(none)_ | |
75
+ | `unit/costs.test.js` | _(none)_ | |
76
+ | `unit/doctor.test.js` | _(none)_ | |
77
+ | `unit/execution-workspace.test.js` | _(none)_ | |
78
+ | `unit/gate.test.js` | _(none)_ | |
79
+ | `unit/git-mutation-guard.test.js` | _(none)_ | |
80
+ | `unit/instincts.test.js` | _(none)_ | |
81
+ | `unit/orchestrator.test.js` | _(none)_ | review . mock provider . node:test based orchestrator checks. |
82
+ | `unit/portability.test.js` | _(none)_ | |
83
+ | `unit/profile-safety.test.js` | _(none)_ | |
84
+ | `unit/ralph.test.js` | _(none)_ | |
85
+ | `unit/risk-classifier.test.js` | _(none)_ | |
86
+ | `unit/router.test.js` | _(none)_ | |
87
+ | `unit/run.test.js` | _(none)_ | |
88
+ | `unit/runners-extract.test.js` | _(none)_ | live runner JSON / prompt . Claude/Codex CLI ( ). |
89
+ | `unit/security-hardening.test.js` | _(none)_ | |
90
+ | `unit/severity.test.js` | _(none)_ | |
91
+ | `unit/ship.test.js` | _(none)_ | |
92
+ | `unit/team-lite.test.js` | _(none)_ | |
93
+ | `unit/team.test.js` | _(none)_ | |
94
+ | `unit/token-vault.test.js` | _(none)_ | |
95
+ | `unit/verify.test.js` | _(none)_ | |
96
+ | `unit/wait.test.js` | _(none)_ | |
97
+ | `unit/work.test.js` | _(none)_ | |
98
+
@@ -0,0 +1,38 @@
1
+ # Core Invariants
2
+
3
+ NEKOWORK is a verification runtime. These invariants are not feature toggles.
4
+
5
+ ```text
6
+ Claude work -> Codex verification -> Human Gate
7
+ ```
8
+
9
+ ## Runtime Rules
10
+
11
+ 1. Multi-worker phases are read-only by default.
12
+ 2. Only one executor may mutate project files in a work cycle.
13
+ 3. Codex review is the default independent verification path.
14
+ 4. Secure or sensitive changes require Codex challenge or Human Gate.
15
+ 5. Human Gate cannot be bypassed by skill, hook, profile, module, or CLI expansion.
16
+ 6. Profiles may add capabilities, but they cannot weaken core safety gates.
17
+ 7. Local delegated CLI auth is the default live-provider path.
18
+ 8. Long-lived provider API keys are not required by the default path.
19
+ 9. Handoffs must be inspectable artifacts.
20
+ 10. Shipping requires evidence from work, verification, and gate state.
21
+
22
+ ## Enforcement Surfaces
23
+
24
+ - `team` and `team-lite` run as read-only handoff surfaces.
25
+ - `work` runs one executor and records acceptance criteria before implementation.
26
+ - `verify` requires prior work, runs Codex review, and triggers challenge/gates for sensitive work.
27
+ - `gate` records explicit human approve/block decisions.
28
+ - `ship` refuses unresolved gates and writes readiness markers only after verification.
29
+ - `apply` is the explicit mutation command for verified live-work diffs.
30
+ - Manifest validation rejects profiles that try to weaken core safety policy.
31
+
32
+ ## Compatibility
33
+
34
+ `review` remains the legacy full cycle for the `0.0.3` line. `review-cycle` is the explicit compatibility alias. New automation should prefer:
35
+
36
+ ```text
37
+ ask -> plan -> team -> work -> verify -> gate -> ship -> apply
38
+ ```
package/docs/DEMO.md ADDED
@@ -0,0 +1,110 @@
1
+ # Demo
2
+
3
+ This demo uses mock providers. It does not call Claude, Codex, Gemini, or paid APIs.
4
+
5
+ ## Quick Run Demo
6
+
7
+ ```bash
8
+ npm run demo:quick -- --cleanup
9
+ ```
10
+
11
+ This is the shortest demo path. It creates a disposable target project, runs `doctor --quick`, runs `run = work -> verify -> ship`, checks `gate status`, and removes the target when `--cleanup` is set.
12
+
13
+ Expected shape:
14
+
15
+ ```text
16
+ NEKOWORK quick run demo
17
+ doctor ... OK
18
+ run workflow ... OK
19
+ gate status ... OK
20
+ Demo completed: verdict=approve_with_fixes, ship_ready=false, applied=false
21
+ ```
22
+
23
+ ## External Project Demo
24
+
25
+ ```bash
26
+ npm run demo:external
27
+ ```
28
+
29
+ This creates a tiny disposable target project, applies the `developer` profile, runs `doctor --quick`, and writes a planning session into the target project's `.harness/` directory. See [EXAMPLE-PROJECT.md](EXAMPLE-PROJECT.md) for details.
30
+
31
+ ## Command
32
+
33
+ ```bash
34
+ node scripts/cli.js review "check the project setup" --no-ship --session demo-readme
35
+ ```
36
+
37
+ ## Example Output
38
+
39
+ ```text
40
+ [review:demo-readme] task: check the project setup
41
+ [review:demo-readme] mode: mock --no-ship
42
+ [review:demo-readme] 1 ideate
43
+ [review:demo-readme] 2 plan
44
+ [review:demo-readme] 3 implement
45
+ [review:demo-readme] 4 self-review (round 1)
46
+ [review:demo-readme] fix-loop: executor round 2
47
+ [review:demo-readme] 4 self-review (round 2)
48
+ [review:demo-readme] 5 codex-review
49
+ [review:demo-readme] 6 codex-challenge skipped (sensitive not detected, --secure not set)
50
+ [review:demo-readme] 7 ship skipped (--no-ship)
51
+ ```
52
+
53
+ ## Generated Files
54
+
55
+ ```text
56
+ .harness/state/sessions/demo-readme/
57
+ prd.json
58
+ progress.txt
59
+ handoffs/
60
+ 01-ideate.md
61
+ 02-plan.md
62
+ 03-implement.md
63
+ 04-self-review.md
64
+ 04-self-review-r2.md
65
+ 05-codex-review.md
66
+ ```
67
+
68
+ Each handoff follows the same five-field shape:
69
+
70
+ - Decided
71
+ - Rejected
72
+ - Risks
73
+ - Files
74
+ - Remaining
75
+
76
+ ## Security-Sensitive Demo
77
+
78
+ Use `--secure` to force the Codex challenge stage:
79
+
80
+ ```bash
81
+ node scripts/cli.js review "change auth token validation" --secure --no-ship --session demo-secure
82
+ ```
83
+
84
+ Expected behavior:
85
+
86
+ - `codex-review` runs
87
+ - `codex-challenge` runs
88
+ - `ship` is skipped because `--no-ship` is set
89
+
90
+ ## Doctor Demo
91
+
92
+ ```bash
93
+ node scripts/cli.js doctor --quick
94
+ ```
95
+
96
+ Example shape:
97
+
98
+ ```text
99
+ NEKOWORK doctor
100
+ harness root : C:\path\to\harness
101
+ project root : C:\path\to\harness
102
+
103
+ STATUS CHECK MESSAGE
104
+ PASS node Node 24.x
105
+ PASS package metadata @ps-neko/nekowork@0.1.0-alpha.0; public alpha publish candidate
106
+ PASS git worktree project root is inside a git worktree
107
+ WARN gemini cli installed, auth status is not checked non-interactively
108
+
109
+ summary: WARN
110
+ ```
@@ -0,0 +1,92 @@
1
+ # External Project Example
2
+
3
+ This walkthrough shows the current repository-based NEKOWORK integration path against a tiny external project.
4
+
5
+ The demo is intentionally mock-first. It does not call Claude, Codex, Gemini, or paid APIs.
6
+
7
+ ## One-Command Demo
8
+
9
+ From the NEKOWORK checkout:
10
+
11
+ ```bash
12
+ npm run demo:external
13
+ ```
14
+
15
+ Expected shape:
16
+
17
+ ```text
18
+ NEKOWORK external project demo
19
+ target : <temp-dir>
20
+ profile: developer
21
+
22
+ git : initialized
23
+ preflight ... OK
24
+ install apply ... OK
25
+ doctor ... OK
26
+ plan smoke ... OK
27
+
28
+ Demo completed.
29
+ Inspect target: <temp-dir>
30
+ ```
31
+
32
+ To remove the generated target after a successful run:
33
+
34
+ ```bash
35
+ npm run demo:external -- --cleanup
36
+ ```
37
+
38
+ To run against a specific folder:
39
+
40
+ ```bash
41
+ npm run demo:external -- --target C:/path/to/demo-target --force
42
+ ```
43
+
44
+ `--force` allows the demo to write into a non-empty target. Use an empty or disposable folder when trying the path for the first time.
45
+
46
+ ## Manual Equivalent
47
+
48
+ Create a small target project:
49
+
50
+ ```bash
51
+ mkdir demo-target
52
+ cd demo-target
53
+ git init
54
+ mkdir src
55
+ echo "console.log('hello NEKOWORK')" > src/index.js
56
+ ```
57
+
58
+ Then run NEKOWORK from its checkout:
59
+
60
+ ```bash
61
+ cd C:/Users/Mun/harness
62
+ node scripts/portability/simulate-port.js C:/path/to/demo-target --profile developer --verbose
63
+ node scripts/install-apply.js --profile developer --project-root C:/path/to/demo-target
64
+ node scripts/cli.js doctor --project-root C:/path/to/demo-target --quick
65
+ node scripts/cli.js plan "external project smoke" --project-root C:/path/to/demo-target --session external-smoke
66
+ ```
67
+
68
+ Expected target outputs:
69
+
70
+ ```text
71
+ demo-target/
72
+ .harness/install-state.json
73
+ .harness/state/sessions/external-smoke/handoffs/02-plan.json
74
+ .claude/CLAUDE.md
75
+ .codex/config.toml
76
+ .cursor/hooks.json
77
+ .gemini/GEMINI.md
78
+ .opencode/config.json
79
+ ```
80
+
81
+ ## What This Proves
82
+
83
+ - NEKOWORK can stay outside the target project as a tool root.
84
+ - Generated harness surfaces are written into the target project.
85
+ - Session state is written under the target project's `.harness/`.
86
+ - The default planning flow works without live provider calls.
87
+
88
+ ## What This Does Not Prove
89
+
90
+ - Public npm installation. The package metadata is ready, but publish execution still requires npm owner auth.
91
+ - Live provider execution. Run live provider smoke checks separately after local CLI login.
92
+ - A production rollout. Pin a release tag or submodule commit before using the tool in a shared workflow.