@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,35 @@
1
+ # Verify Summary
2
+
3
+ ## Codex Review
4
+
5
+ Expected verdict: `approve` if the workflow stays validation-only.
6
+
7
+ ## Risk Policy
8
+
9
+ GitHub Actions workflow work is deploy-sensitive.
10
+
11
+ ```text
12
+ tags=deploy
13
+ codex_challenge=true
14
+ human_gate=true
15
+ ```
16
+
17
+ ## Evidence
18
+
19
+ ```bash
20
+ npm test
21
+ ```
22
+
23
+ Expected output:
24
+
25
+ ```text
26
+ github-actions-hardening checks passed
27
+ ```
28
+
29
+ ## Boundary Checks
30
+
31
+ - No `pull_request_target`.
32
+ - No `npm publish`.
33
+ - No static secrets.
34
+ - No cloud credential action.
35
+ - Permissions remain read-only.
@@ -0,0 +1,24 @@
1
+ # Work Summary
2
+
3
+ ## Result
4
+
5
+ Implemented a hardened GitHub Actions validation fixture.
6
+
7
+ ## Files
8
+
9
+ - `.github/workflows/hardened-validate.yml`
10
+ - `scripts/check.mjs`
11
+ - `package.json`
12
+ - `README.md`
13
+
14
+ ## Mutation Policy
15
+
16
+ Single executor only.
17
+
18
+ ## Acceptance Evidence
19
+
20
+ - Workflow has bounded triggers.
21
+ - Token permissions are read-only.
22
+ - Checkout does not persist credentials.
23
+ - Action refs are pinned and non-floating.
24
+ - Local test checks for deploy, publish, secret, and cloud credential exclusions.
@@ -0,0 +1,12 @@
1
+ {
2
+ "name": "nekowork-github-actions-hardening",
3
+ "version": "0.0.0",
4
+ "private": true,
5
+ "type": "module",
6
+ "scripts": {
7
+ "test": "node scripts/check.mjs"
8
+ },
9
+ "devDependencies": {
10
+ "yaml": "^2.6.1"
11
+ }
12
+ }
@@ -0,0 +1,43 @@
1
+ import fs from 'node:fs';
2
+ import path from 'node:path';
3
+ import { fileURLToPath } from 'node:url';
4
+ import YAML from 'yaml';
5
+
6
+ const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');
7
+ const workflowPath = path.join(root, '.github', 'workflows', 'hardened-validate.yml');
8
+
9
+ if (!fs.existsSync(workflowPath)) {
10
+ throw new Error('missing hardened workflow');
11
+ }
12
+
13
+ const raw = fs.readFileSync(workflowPath, 'utf8');
14
+ const workflow = YAML.parse(raw);
15
+
16
+ assert(!raw.includes('pull_request_target'), 'workflow must not use pull_request_target');
17
+ assert(!raw.includes('npm publish'), 'workflow must not publish packages');
18
+ assert(!raw.includes('aws-actions/configure-aws-credentials'), 'workflow must not configure cloud credentials');
19
+ assert(!raw.includes('${{ secrets.'), 'workflow must not read static secrets');
20
+
21
+ assert(workflow.permissions?.contents === 'read', 'top-level contents permission must be read');
22
+ assert(workflow.concurrency?.['cancel-in-progress'] === true, 'workflow must cancel superseded runs');
23
+
24
+ const jobs = workflow.jobs || {};
25
+ assert(Object.keys(jobs).length > 0, 'workflow must define jobs');
26
+
27
+ for (const [jobName, job] of Object.entries(jobs)) {
28
+ assert(job['timeout-minutes'] && job['timeout-minutes'] <= 20, `${jobName} must have a bounded timeout`);
29
+ assert(job.permissions?.contents === 'read', `${jobName} contents permission must be read`);
30
+ assert(job.permissions?.actions === 'read', `${jobName} actions permission must be read`);
31
+
32
+ for (const step of job.steps || []) {
33
+ if (!step.uses) continue;
34
+ assert(/@[a-zA-Z0-9._-]+$/.test(step.uses), `${step.uses} must pin an action ref`);
35
+ assert(!/@main$|@master$|@latest$/i.test(step.uses), `${step.uses} must not use floating refs`);
36
+ }
37
+ }
38
+
39
+ console.log('github-actions-hardening checks passed');
40
+
41
+ function assert(condition, message) {
42
+ if (!condition) throw new Error(message);
43
+ }
@@ -0,0 +1,30 @@
1
+ # Quality Lifecycle Smoke Project
2
+
3
+ This is a small standalone repository fixture used as a NEKOWORK quality-runtime case-study target.
4
+
5
+ It demonstrates the quality profile path:
6
+
7
+ - product and quality questions before implementation
8
+ - test-first planning
9
+ - single-executor work
10
+ - Codex verification with evidence requirements
11
+ - structured acceptance coverage
12
+ - optional strict quality blocking before ship readiness
13
+
14
+ ## Test
15
+
16
+ ```bash
17
+ npm test
18
+ ```
19
+
20
+ The test verifies that the case-study artifacts include quality checklist, evidence fields, and acceptance coverage.
21
+
22
+ ## NEKOWORK Case Study
23
+
24
+ See [case-study/TASK.md](case-study/TASK.md) for the workflow evidence:
25
+
26
+ ```text
27
+ ask --profile quality -> plan -> team -> work --profile quality -> verify --profile quality --strict-quality -> ship
28
+ ```
29
+
30
+ The important product rule is that quality warnings start as evidence, and `--strict-quality` can convert missing evidence or acceptance coverage into a no-ship condition.
@@ -0,0 +1,24 @@
1
+ # Ask
2
+
3
+ profile: quality
4
+
5
+ Question gate:
6
+
7
+ 1. What outcome should count as done?
8
+ 2. Who is the target user or operator, and what problem should this solve?
9
+ 3. What is the smallest MVP scope for this cycle?
10
+ 4. What is explicitly out of scope?
11
+ 5. What files, surfaces, or user flows are allowed to change?
12
+ 6. What launch or readiness risk should block ship?
13
+ 7. What test-first plan should exist before implementation starts?
14
+ 8. What evidence should prove each acceptance criterion passed?
15
+
16
+ Profile checklist:
17
+
18
+ - brainstorm before work
19
+ - test-first plan
20
+ - systematic debugging path
21
+ - acceptance criteria coverage evidence
22
+ - evidence-based review findings
23
+ - verification before completion
24
+ - quality gate before ship/apply
@@ -0,0 +1,10 @@
1
+ # Gate Status
2
+
3
+ Human Gate: clear
4
+
5
+ Reason:
6
+
7
+ - No critical, financial, deploy, auth, or data-loss risk was detected.
8
+ - Strict quality produced no blocking warnings in this case-study path.
9
+
10
+ Human still owns PR, release, publish, and deploy decisions.
@@ -0,0 +1,19 @@
1
+ # Plan
2
+
3
+ Acceptance criteria:
4
+
5
+ - AC-001: parser rejects malformed input with a stable error message
6
+ - AC-002: parser accepts the documented happy path
7
+ - AC-003: no unrelated files are changed
8
+
9
+ Test-first plan:
10
+
11
+ - Add or identify a parser malformed-input check before implementation.
12
+ - Keep happy path behavior unchanged.
13
+ - Compare the final changed file list against the planned scope.
14
+
15
+ Non-goals:
16
+
17
+ - No parser architecture rewrite.
18
+ - No new dependency.
19
+ - No production deploy or publish.
@@ -0,0 +1,11 @@
1
+ # Ship Ready
2
+
3
+ SHIP_READY
4
+
5
+ Evidence:
6
+
7
+ - Work was single-executor.
8
+ - Codex verification recorded evidence-based findings.
9
+ - Acceptance criteria coverage was structured.
10
+ - Human Gate was clear.
11
+ - Apply remains explicit.
@@ -0,0 +1,19 @@
1
+ # Task
2
+
3
+ Create a small parser cleanup flow and prove that NEKOWORK can keep quality expectations visible from question gate through verification.
4
+
5
+ The target change is intentionally tiny:
6
+
7
+ - normalize parser error messages
8
+ - keep implementation single-executor
9
+ - verify acceptance criteria with explicit evidence
10
+ - demonstrate strict quality policy without needing a real provider call
11
+
12
+ Suggested command path:
13
+
14
+ ```bash
15
+ node scripts/cli.js ask "clean up parser errors" --profile quality --session quality-smoke
16
+ node scripts/cli.js work "clean up parser errors" --profile quality --session quality-smoke
17
+ node scripts/cli.js verify "verify parser cleanup" --profile quality --strict-quality --session quality-smoke
18
+ node scripts/cli.js ship "prepare quality smoke ship handoff" --session quality-smoke
19
+ ```
@@ -0,0 +1,21 @@
1
+ # Team Handoffs
2
+
3
+ All team handoffs are read-only.
4
+
5
+ Planner:
6
+
7
+ - Keep this as a parser cleanup, not a rewrite.
8
+ - Require explicit acceptance coverage in verify.
9
+
10
+ Test:
11
+
12
+ - AC-001 and AC-002 should be checked independently.
13
+ - Missing test evidence should be a quality warning.
14
+
15
+ Security:
16
+
17
+ - No secrets, credentials, deploy logic, or auth files are in scope.
18
+
19
+ Reviewer:
20
+
21
+ - Findings should include claim, evidence, required_fix, confidence, and gate_required when high or critical.
@@ -0,0 +1,44 @@
1
+ # Verify Summary
2
+
3
+ profile: quality
4
+ strict_quality: true
5
+ strict_quality_blocked: false
6
+
7
+ Evidence-based finding example:
8
+
9
+ ```text
10
+ claim: Parser malformed input behavior is covered.
11
+ evidence: tests/parser.test.js references AC-001 and asserts a stable error message.
12
+ required_fix: none
13
+ confidence: 0.91
14
+ gate_required: false
15
+ ```
16
+
17
+ acceptance_coverage:
18
+
19
+ ```json
20
+ [
21
+ {
22
+ "id": "AC-001",
23
+ "status": "covered",
24
+ "evidence": "tests/parser.test.js references AC-001 and malformed input",
25
+ "source": "codex-review"
26
+ },
27
+ {
28
+ "id": "AC-002",
29
+ "status": "covered",
30
+ "evidence": "codex-review confirms the happy path remains covered",
31
+ "source": "codex-review"
32
+ },
33
+ {
34
+ "id": "AC-003",
35
+ "status": "covered",
36
+ "evidence": "changed file list is limited to parser and parser tests",
37
+ "source": "codex-review"
38
+ }
39
+ ]
40
+ ```
41
+
42
+ Quality warnings:
43
+
44
+ - none
@@ -0,0 +1,19 @@
1
+ # Work Summary
2
+
3
+ profile: quality
4
+
5
+ Work policy:
6
+
7
+ - single executor only
8
+ - target project mutation isolated until explicit apply
9
+ - acceptance criteria artifact required
10
+ - quality checklist passed into the executor context
11
+
12
+ Changed files:
13
+
14
+ - src/parser.js
15
+ - tests/parser.test.js
16
+
17
+ Result:
18
+
19
+ - Parser cleanup is ready for independent Codex verification.
@@ -0,0 +1,8 @@
1
+ {
2
+ "name": "nekowork-quality-lifecycle-smoke",
3
+ "private": true,
4
+ "type": "module",
5
+ "scripts": {
6
+ "test": "node scripts/check.mjs"
7
+ }
8
+ }
@@ -0,0 +1,44 @@
1
+ import fs from 'node:fs';
2
+ import path from 'node:path';
3
+ import { fileURLToPath } from 'node:url';
4
+
5
+ const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');
6
+ const caseStudy = path.join(root, 'case-study');
7
+
8
+ const required = [
9
+ 'TASK.md',
10
+ 'ASK.md',
11
+ 'PLAN.md',
12
+ 'TEAM_HANDOFFS.md',
13
+ 'WORK_SUMMARY.md',
14
+ 'VERIFY_SUMMARY.md',
15
+ 'GATE_STATUS.md',
16
+ 'SHIP_READY.md',
17
+ ];
18
+
19
+ for (const rel of required) {
20
+ assert(fs.existsSync(path.join(caseStudy, rel)), `${rel} must exist`);
21
+ }
22
+
23
+ const ask = read('ASK.md');
24
+ const verify = read('VERIFY_SUMMARY.md');
25
+ const ship = read('SHIP_READY.md');
26
+
27
+ assert(ask.includes('profile: quality'), 'ASK must record the quality profile');
28
+ assert(ask.includes('test-first plan'), 'ASK must include the test-first question');
29
+ assert(verify.includes('claim:'), 'VERIFY must include evidence claim fields');
30
+ assert(verify.includes('evidence:'), 'VERIFY must include evidence details');
31
+ assert(verify.includes('required_fix:'), 'VERIFY must include required fixes');
32
+ assert(verify.includes('acceptance_coverage:'), 'VERIFY must include structured acceptance coverage');
33
+ assert(verify.includes('strict_quality_blocked: false'), 'VERIFY must record strict quality status');
34
+ assert(ship.includes('SHIP_READY'), 'SHIP must record readiness');
35
+
36
+ console.log('quality-lifecycle-smoke checks passed');
37
+
38
+ function read(rel) {
39
+ return fs.readFileSync(path.join(caseStudy, rel), 'utf8');
40
+ }
41
+
42
+ function assert(condition, message) {
43
+ if (!condition) throw new Error(message);
44
+ }
@@ -0,0 +1,33 @@
1
+ # Trading Dashboard Mock Project
2
+
3
+ This is a small standalone project used as a NEKOWORK case-study target.
4
+
5
+ It is intentionally mock-only:
6
+
7
+ - no broker SDK
8
+ - no payment provider
9
+ - no real account connection
10
+ - no order execution
11
+ - no network calls
12
+
13
+ ## Run
14
+
15
+ Open `index.html` in a browser, or serve the directory with any static file server.
16
+
17
+ ## Test
18
+
19
+ ```bash
20
+ npm test
21
+ ```
22
+
23
+ The test checks that the mock project stays local and does not introduce broker, payment, or outbound API wiring.
24
+
25
+ ## NEKOWORK Case Study
26
+
27
+ See [case-study/TASK.md](case-study/TASK.md) for the workflow evidence:
28
+
29
+ ```text
30
+ ask -> plan -> team -> work -> verify -> gate -> ship
31
+ ```
32
+
33
+ The important product rule is that financial UI work is still gate-sensitive even when all data is mocked.
@@ -0,0 +1,24 @@
1
+ # Ask
2
+
3
+ Expected question-gate outcome:
4
+
5
+ ```text
6
+ risk=high
7
+ tags=financial,product-ui
8
+ requiresCodexChallenge=true
9
+ requiresHumanGate=true
10
+ ```
11
+
12
+ ## Blocking Questions
13
+
14
+ 1. Must all order behavior stay disabled and mock-only?
15
+ 2. Are broker, account, payment, and order APIs explicitly out of scope?
16
+ 3. What visual states are required for the dashboard?
17
+ 4. What evidence proves the mock cannot place real trades?
18
+
19
+ ## Draft Success Criteria
20
+
21
+ 1. The dashboard renders portfolio, watchlist, and order-ticket surfaces.
22
+ 2. Order controls are disabled.
23
+ 3. No outbound network, broker SDK, payment SDK, or account integration exists.
24
+ 4. A local test verifies the mock-only boundary.
@@ -0,0 +1,28 @@
1
+ # Gate Status
2
+
3
+ ## Expected Status Before Approval
4
+
5
+ ```text
6
+ status=open
7
+ reason=risk policy requires human gate (financial,product-ui)
8
+ ```
9
+
10
+ ## Human Review Checklist
11
+
12
+ - The page says demo data only.
13
+ - The order ticket is disabled.
14
+ - There is no broker or payment SDK.
15
+ - There are no outbound calls.
16
+ - The local project test passes.
17
+
18
+ ## Approve Command
19
+
20
+ ```bash
21
+ node ../../scripts/cli.js gate approve --project-root . --session trading-demo --reason "Confirmed mock-only financial UI boundary."
22
+ ```
23
+
24
+ ## Block Command
25
+
26
+ ```bash
27
+ node ../../scripts/cli.js gate block --project-root . --session trading-demo --reason "Financial UI boundary is not proven."
28
+ ```
@@ -0,0 +1,23 @@
1
+ # Plan
2
+
3
+ ## Implementation
4
+
5
+ 1. Create a static `index.html` entry point.
6
+ 2. Build a responsive dashboard layout in `src/styles.css`.
7
+ 3. Render a canvas portfolio chart and watchlist in `src/app.js`.
8
+ 4. Keep order inputs and side buttons disabled.
9
+ 5. Add local fixture data under `fixtures/market.json`.
10
+ 6. Add `scripts/check.mjs` to verify the mock-only boundary.
11
+
12
+ ## Acceptance Criteria
13
+
14
+ | ID | Criteria |
15
+ |---|---|
16
+ | AC-001 | Dashboard opens as a static browser page. |
17
+ | AC-002 | Portfolio chart and watchlist render from mock data. |
18
+ | AC-003 | Buy/sell/order controls are disabled. |
19
+ | AC-004 | Test fails if broker, payment, or outbound API wiring appears. |
20
+
21
+ ## Human Gate
22
+
23
+ Human approval is required before any ship-ready claim because this is a financial UI surface.
@@ -0,0 +1,21 @@
1
+ # Ship Ready
2
+
3
+ This case study is ship-ready only after Human Gate approval.
4
+
5
+ ## Required Evidence
6
+
7
+ - Work handoff exists.
8
+ - Codex verification exists.
9
+ - Risk policy was evaluated.
10
+ - Human Gate was approved.
11
+ - `npm test` passed inside this mock project.
12
+
13
+ ## Ship Command
14
+
15
+ ```bash
16
+ node ../../scripts/cli.js ship "prepare trading dashboard mock ship readiness" --project-root . --session trading-demo --require-clean-gates
17
+ ```
18
+
19
+ ## Apply Policy
20
+
21
+ This static example is already present in the repository. In a live-work session, `apply` would remain explicit and would require `SHIP_READY`.
@@ -0,0 +1,29 @@
1
+ # Task
2
+
3
+ Build a trading dashboard mockup that demonstrates NEKOWORK's financial-risk gate.
4
+
5
+ ## Scope
6
+
7
+ - Static browser UI.
8
+ - Mock portfolio chart.
9
+ - Mock watchlist.
10
+ - Disabled order ticket.
11
+ - No real broker, payment, account, or order execution wiring.
12
+
13
+ ## Non-Goals
14
+
15
+ - No production trading behavior.
16
+ - No API calls.
17
+ - No authentication.
18
+ - No deploy automation.
19
+
20
+ ## Recommended NEKOWORK Flow
21
+
22
+ ```bash
23
+ node ../../scripts/cli.js ask "stock trading dashboard mockup with mock-only orders" --project-root . --session trading-demo
24
+ node ../../scripts/cli.js plan "stock trading dashboard mockup with mock-only orders" --project-root . --session trading-demo
25
+ node ../../scripts/cli.js team "stock trading dashboard mockup with mock-only orders" --workers planner,product,security,test --no-write --project-root . --session trading-demo
26
+ node ../../scripts/cli.js work "implement the planned trading dashboard mockup" --single-executor --project-root . --session trading-demo
27
+ node ../../scripts/cli.js verify "verify the trading dashboard mockup stays mock-only" --project-root . --session trading-demo
28
+ node ../../scripts/cli.js gate status --project-root . --session trading-demo
29
+ ```
@@ -0,0 +1,49 @@
1
+ # Team Handoffs
2
+
3
+ ## Planner
4
+
5
+ Decided: Keep the project static and self-contained.
6
+
7
+ Rejected: Real order placement, authentication, accounts, broker APIs, and deployment.
8
+
9
+ Risks: Users may mistake the mock for a live trading surface without visible copy.
10
+
11
+ Files: `index.html`, `src/styles.css`, `src/app.js`, `fixtures/market.json`, `scripts/check.mjs`
12
+
13
+ Remaining: Verify disabled controls and no outbound wiring.
14
+
15
+ ## Product
16
+
17
+ Decided: Show the dashboard as an operational mock, not a marketing page.
18
+
19
+ Rejected: Hero layout, onboarding copy, or real portfolio import.
20
+
21
+ Risks: Financial UI needs clear demo-only language.
22
+
23
+ Files: `index.html`, `src/styles.css`
24
+
25
+ Remaining: Keep the warning visible above the dashboard.
26
+
27
+ ## Security
28
+
29
+ Decided: No network calls, no secrets, no account tokens, no payment provider, no broker SDK.
30
+
31
+ Rejected: Any API key, OAuth, webhook, or order endpoint.
32
+
33
+ Risks: Future edits could add a broker SDK; local test should catch common tokens.
34
+
35
+ Files: `scripts/check.mjs`
36
+
37
+ Remaining: Human Gate stays required for financial context.
38
+
39
+ ## Test
40
+
41
+ Decided: Use a zero-dependency Node check.
42
+
43
+ Rejected: Browser automation for this small static case study.
44
+
45
+ Risks: Static regex checks are not a substitute for full product security review.
46
+
47
+ Files: `scripts/check.mjs`, `fixtures/market.json`
48
+
49
+ Remaining: Run `npm test`.
@@ -0,0 +1,35 @@
1
+ # Verify Summary
2
+
3
+ ## Codex Review
4
+
5
+ Expected verdict: `approve_with_fixes` or `approve`, depending on local review strictness.
6
+
7
+ ## Risk Policy
8
+
9
+ Financial work remains gate-sensitive even when the project is mock-only.
10
+
11
+ ```text
12
+ tags=financial,product-ui
13
+ codex_challenge=true
14
+ human_gate=true
15
+ ```
16
+
17
+ ## Evidence
18
+
19
+ ```bash
20
+ npm test
21
+ ```
22
+
23
+ Expected output:
24
+
25
+ ```text
26
+ trading-dashboard-mock checks passed
27
+ ```
28
+
29
+ ## Boundary Checks
30
+
31
+ - No `fetch(` usage.
32
+ - No WebSocket usage.
33
+ - No broker SDK tokens.
34
+ - No payment provider tokens.
35
+ - Disabled order controls remain present in HTML.
@@ -0,0 +1,27 @@
1
+ # Work Summary
2
+
3
+ ## Result
4
+
5
+ Implemented a static trading dashboard mock project.
6
+
7
+ ## Files
8
+
9
+ - `index.html`
10
+ - `src/styles.css`
11
+ - `src/app.js`
12
+ - `fixtures/market.json`
13
+ - `scripts/check.mjs`
14
+ - `package.json`
15
+ - `README.md`
16
+
17
+ ## Mutation Policy
18
+
19
+ Single executor only.
20
+
21
+ ## Acceptance Evidence
22
+
23
+ - Static dashboard shell exists.
24
+ - Canvas chart renders from local mock data.
25
+ - Watchlist renders from mock symbols.
26
+ - Order form controls are disabled.
27
+ - Local test checks for forbidden outbound or real-money wiring.
@@ -0,0 +1,9 @@
1
+ {
2
+ "portfolio": [118.2, 119.4, 121.1, 120.3, 122.6, 124.0, 123.2, 125.7, 127.4, 126.9, 129.1, 131.3],
3
+ "symbols": [
4
+ { "symbol": "NKO", "name": "Neko Systems", "price": 142.35, "change": 2.41 },
5
+ { "symbol": "VRFY", "name": "Verify Labs", "price": 88.12, "change": 1.26 },
6
+ { "symbol": "GATE", "name": "Gatehold Inc.", "price": 54.67, "change": 0.74 },
7
+ { "symbol": "MOCK", "name": "Mock Market ETF", "price": 203.19, "change": 3.08 }
8
+ ]
9
+ }