codex-genesis-harness 0.1.6 → 0.1.8

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 (136) hide show
  1. package/.codebase/COMPRESSED_CONTEXT.md +80 -0
  2. package/.codebase/CURRENT_STATE.md +35 -8
  3. package/.codebase/DEPENDENCY_GRAPH.md +14 -1
  4. package/.codebase/IMPLEMENTATION_HANDOFF.md +34 -336
  5. package/.codebase/KNOWN_PROBLEMS.md +54 -3
  6. package/.codebase/MODULE_INDEX.md +8 -0
  7. package/.codebase/PIPELINE_FLOW.md +7 -5
  8. package/.codebase/RECOVERY_POINTS.md +15 -431
  9. package/.codebase/TECH_DEBT.md +6 -0
  10. package/.codebase/TEST_MATRIX.md +4 -3
  11. package/.codebase/VISUAL_GRAPH.md +127 -0
  12. package/.codebase/beads.json +16 -0
  13. package/.codebase/context-policy.json +68 -0
  14. package/.codebase/memories/lessons_learned.md +21 -0
  15. package/.codebase/memories/preferences.md +17 -0
  16. package/.codebase/state.json +45 -24
  17. package/.codex/skills/genesis-ai-provider/SKILL.md +1 -1
  18. package/.codex/skills/genesis-api-contract/SKILL.md +1 -1
  19. package/.codex/skills/genesis-api-sync/SKILL.md +1 -1
  20. package/.codex/skills/genesis-architecture/SKILL.md +6 -1
  21. package/.codex/skills/genesis-codebase-map/SKILL.md +1 -1
  22. package/.codex/skills/genesis-debug-guide/SKILL.md +11 -5
  23. package/.codex/skills/genesis-design-spec/SKILL.md +3 -3
  24. package/.codex/skills/genesis-docs-automation/SKILL.md +52 -973
  25. package/.codex/skills/genesis-executing-plans/SKILL.md +54 -0
  26. package/.codex/skills/genesis-executing-plans/agents/openai.yaml +6 -0
  27. package/.codex/skills/genesis-executing-plans/checklists/.gitkeep +0 -0
  28. package/.codex/skills/genesis-executing-plans/examples/.gitkeep +0 -0
  29. package/.codex/skills/genesis-executing-plans/templates/.gitkeep +0 -0
  30. package/.codex/skills/genesis-harness/SKILL.md +64 -1384
  31. package/.codex/skills/genesis-harness/scripts/check-docs-sync.sh +3 -3
  32. package/.codex/skills/genesis-harness/scripts/init-planning.sh +1 -1
  33. package/.codex/skills/genesis-harness-engineering/SKILL.md +1 -1
  34. package/.codex/skills/genesis-new-design/SKILL.md +6 -2
  35. package/.codex/skills/genesis-new-design/agents/openai.yaml +2 -0
  36. package/.codex/skills/genesis-observability-automation/SKILL.md +69 -303
  37. package/.codex/skills/genesis-observability-automation/references/common-mistakes-and-recovery.md +84 -0
  38. package/.codex/skills/genesis-observability-automation/references/workflow-phases.md +78 -0
  39. package/.codex/skills/genesis-performance-profiling/SKILL.md +1 -22
  40. package/.codex/skills/genesis-performance-profiling/agents/openai.yaml +1 -1
  41. package/.codex/skills/genesis-pipeline-orchestration/SKILL.md +1 -1
  42. package/.codex/skills/genesis-planning/SKILL.md +31 -1
  43. package/.codex/skills/genesis-release/SKILL.md +29 -1
  44. package/.codex/skills/genesis-research-first/SKILL.md +6 -0
  45. package/.codex/skills/genesis-spec-propagation/SKILL.md +52 -504
  46. package/.codex/skills/genesis-test-driven-development/SKILL.md +55 -0
  47. package/.codex/skills/genesis-test-driven-development/agents/openai.yaml +6 -0
  48. package/.codex/skills/genesis-test-driven-development/checklists/.gitkeep +0 -0
  49. package/.codex/skills/genesis-test-driven-development/examples/.gitkeep +0 -0
  50. package/.codex/skills/genesis-test-driven-development/templates/.gitkeep +0 -0
  51. package/.codex/skills/{ui-ux-test-skill → genesis-ui-ux-test}/SKILL.md +1 -1
  52. package/.codex/skills/genesis-upgrade-design/SKILL.md +4 -2
  53. package/.codex/skills/genesis-upgrade-design/agents/openai.yaml +2 -0
  54. package/.codex/skills/genesis-using-git-worktrees/SKILL.md +54 -0
  55. package/.codex/skills/genesis-using-git-worktrees/agents/openai.yaml +6 -0
  56. package/.codex/skills/genesis-using-git-worktrees/checklists/.gitkeep +0 -0
  57. package/.codex/skills/genesis-using-git-worktrees/examples/.gitkeep +0 -0
  58. package/.codex/skills/genesis-using-git-worktrees/templates/.gitkeep +0 -0
  59. package/.codex/skills/genesis-verification-before-completion/SKILL.md +53 -0
  60. package/.codex/skills/genesis-verification-before-completion/agents/openai.yaml +6 -0
  61. package/.codex/skills/genesis-verification-before-completion/checklists/.gitkeep +0 -0
  62. package/.codex/skills/genesis-verification-before-completion/examples/.gitkeep +0 -0
  63. package/.codex/skills/genesis-verification-before-completion/templates/.gitkeep +0 -0
  64. package/.codex/skills/spec-impact-engine/SKILL.md +77 -500
  65. package/.codex/skills/spec-impact-engine/checklists/checklist.md +10 -0
  66. package/.codex-plugin/plugin.json +3 -4
  67. package/CHANGELOG.md +17 -0
  68. package/README.EN.md +33 -22
  69. package/README.VI.md +36 -24
  70. package/README.md +46 -8
  71. package/VERSION +1 -1
  72. package/bin/genesis-harness.js +1337 -7
  73. package/contracts/features/registry-schema.json +15 -0
  74. package/contracts/observability/agent-run-schema.json +34 -0
  75. package/contracts/observability/failure-schema.json +35 -0
  76. package/contracts/ui/auth/login-screen-contract.json +43 -0
  77. package/features/REGISTRY.md +63 -0
  78. package/features/SCOPE-template.md +65 -0
  79. package/fixtures/planning/MOCKUP_PROMPT_TEMPLATE.md +16 -0
  80. package/observability/agent-runs/sample-run.json +13 -0
  81. package/observability/decision-logs/sample-decision.md +43 -0
  82. package/observability/failures/sample-failure.json +12 -0
  83. package/package.json +9 -3
  84. package/playwright/e2e/app-template.spec.js +37 -0
  85. package/playwright/e2e/auth/login-screen.spec.js +65 -0
  86. package/playwright/e2e/web-template.spec.js +28 -0
  87. package/scripts/check-scope.sh +100 -0
  88. package/scripts/cold-start-check.js +133 -0
  89. package/scripts/install.sh +6 -6
  90. package/scripts/prompt_sentinel.js +35 -4
  91. package/scripts/run-evals.sh +137 -26
  92. package/scripts/scratch_parser.js +49 -0
  93. package/scripts/spec_visual_sync.js +1 -1
  94. package/scripts/test_generator.js +2 -2
  95. package/scripts/uninstall.sh +6 -6
  96. package/scripts/verify.sh +21 -66
  97. package/tests/integration/cli-smoke.test.js +103 -0
  98. package/tests/unit/feature_registry.test.js +152 -0
  99. package/tests/unit/prompt_sentinel.test.js +1 -1
  100. package/tests/unit/spec_visual_sync.test.js +1 -1
  101. package/tests/unit/test_generator.test.js +1 -1
  102. package/.codex/skills/genesis-docs/SKILL.md +0 -46
  103. package/.codex/skills/genesis-docs/agents/openai.yaml +0 -7
  104. package/.codex/skills/genesis-mvp-planning/SKILL.md +0 -114
  105. package/.codex/skills/genesis-mvp-planning/agents/openai.yaml +0 -6
  106. package/.codex/skills/genesis-release-orchestration/SKILL.md +0 -653
  107. package/.codex/skills/genesis-release-orchestration/agents/openai.yaml +0 -7
  108. package/.codex/skills/genesis-research/SKILL.md +0 -46
  109. package/.codex/skills/genesis-research/agents/openai.yaml +0 -7
  110. package/playwright/e2e/e2e-template.md +0 -4
  111. /package/.codex/skills/{genesis-docs/checklists/checklist.md → genesis-docs-automation/checklists/manual-docs-checklist.md} +0 -0
  112. /package/.codex/skills/{genesis-docs/examples/example.md → genesis-docs-automation/examples/manual-docs-example.md} +0 -0
  113. /package/.codex/skills/{genesis-docs → genesis-docs-automation}/templates/docs-update-template.md +0 -0
  114. /package/.codex/skills/{genesis-state-machine/SKILL.md → genesis-harness/references/state-machine.md} +0 -0
  115. /package/.codex/skills/{genesis-mvp-planning → genesis-planning}/checklists/mvp-readiness.md +0 -0
  116. /package/.codex/skills/{genesis-mvp-planning → genesis-planning}/examples/5-phase-roadmap-example.md +0 -0
  117. /package/.codex/skills/{genesis-mvp-planning → genesis-planning}/templates/phase-1-core.md +0 -0
  118. /package/.codex/skills/{genesis-mvp-planning → genesis-planning}/templates/phase-2-auth.md +0 -0
  119. /package/.codex/skills/{genesis-mvp-planning → genesis-planning}/templates/phase-3-features.md +0 -0
  120. /package/.codex/skills/{genesis-mvp-planning → genesis-planning}/templates/phase-4-integrations.md +0 -0
  121. /package/.codex/skills/{genesis-mvp-planning → genesis-planning}/templates/phase-5-readiness.md +0 -0
  122. /package/.codex/skills/{genesis-release-orchestration → genesis-release}/checklists/post-deployment-verification.md +0 -0
  123. /package/.codex/skills/{genesis-release-orchestration → genesis-release}/checklists/pre-release-validation.md +0 -0
  124. /package/.codex/skills/{genesis-release-orchestration/examples/example.md → genesis-release/examples/orchestration-example.md} +0 -0
  125. /package/.codex/skills/{genesis-release-orchestration → genesis-release}/observability/release-tracking.md +0 -0
  126. /package/.codex/skills/{genesis-release-orchestration → genesis-release}/playbooks/canary-deployment-orchestration.md +0 -0
  127. /package/.codex/skills/{genesis-release-orchestration → genesis-release}/playbooks/semantic-versioning-automation.md +0 -0
  128. /package/.codex/skills/{genesis-release-orchestration → genesis-release}/templates/deployment-strategy-template.md +0 -0
  129. /package/.codex/skills/{genesis-release-orchestration → genesis-release}/templates/release-runbook-template.md +0 -0
  130. /package/.codex/skills/{genesis-research → genesis-research-first}/checklists/checklist.md +0 -0
  131. /package/.codex/skills/{genesis-research/examples/example.md → genesis-research-first/examples/manual-research-example.md} +0 -0
  132. /package/.codex/skills/{genesis-research → genesis-research-first}/templates/research-note-template.md +0 -0
  133. /package/.codex/skills/{ui-ux-test-skill → genesis-ui-ux-test}/agents/openai.yaml +0 -0
  134. /package/.codex/skills/{ui-ux-test-skill → genesis-ui-ux-test}/checklists/checklist.md +0 -0
  135. /package/.codex/skills/{ui-ux-test-skill → genesis-ui-ux-test}/examples/example.md +0 -0
  136. /package/.codex/skills/{ui-ux-test-skill → genesis-ui-ux-test}/templates/playwright-test-template.md +0 -0
@@ -2,3 +2,5 @@ interface:
2
2
  display_name: "Genesis Upgrade Design"
3
3
  short_description: "— Nâng cấp UI/UX của giao diện Web có sẵn"
4
4
  default_prompt: "Use $genesis-upgrade-design to improve the existing frontend UI without changing behavior."
5
+ policy:
6
+ allow_implicit_invocation: true
@@ -0,0 +1,54 @@
1
+ ---
2
+ name: genesis-using-git-worktrees
3
+ description: Tạo và quản lý môi trường phân lập an toàn qua git worktrees khi thực hiện các thay đổi kiến trúc mang tính rủi ro cao.
4
+ ---
5
+
6
+ # Genesis Using Git Worktrees
7
+
8
+ ## Purpose
9
+ Đảm bảo an toàn tuyệt đối cho nhánh làm việc chính bằng cách thử nghiệm và refactor hệ thống ở một thư mục làm việc phụ (git worktree) được cách ly hoàn toàn. Kỹ năng này giúp developer hoặc AI không sợ làm hỏng repo gốc, dễ dàng xoá bỏ nếu kế hoạch thất bại.
10
+
11
+ ## When to use
12
+ Khi tiến hành refactor lớn, thay đổi thư viện cốt lõi, nâng cấp kiến trúc diện rộng, thử nghiệm framework mới, hoặc khi cần giữ nguyên bối cảnh (context) repo hiện tại để thực hiện một hotfix khẩn cấp sang một branch khác.
13
+
14
+ ## When NOT to use
15
+ Khi chỉ thay đổi nhỏ cục bộ (minor changes, typos, text updates, unit test fixes) không đe doạ đến kiến trúc hoặc sự ổn định toàn hệ thống.
16
+
17
+ ## Inputs required
18
+ - Yêu cầu thay đổi kiến trúc rủi ro cao từ `implementation_plan.md`.
19
+ - Vị trí an toàn để tạo worktree (ví dụ: một cấp bên ngoài thư mục project hiện tại như `../project-refactor`).
20
+
21
+ ## Outputs required
22
+ - Lệnh tạo worktree thành công (`git worktree add -b refactor-branch ../project-refactor`).
23
+ - Chuyển hướng context của AI sang thư mục worktree mới để làm việc.
24
+ - Dọn dẹp/xoá worktree sau khi hoàn tất hoặc merge thành công (`git worktree remove ...`).
25
+
26
+ ## Required tests
27
+ Chạy toàn bộ Regression Tests và Smoke Tests trên worktree để chứng minh tính đúng đắn trước khi xem xét tích hợp (merge) lại vào nhánh chính của repository gốc.
28
+
29
+ ## Required fixtures
30
+ N/A - Worktree dùng chung codebase repo gốc nhưng chia sẻ node_modules riêng rẽ hoặc tuỳ cấu hình.
31
+
32
+ ## Required contract updates
33
+ Trong môi trường worktree, hãy tuỳ ý chỉnh sửa hợp đồng (contracts) để thử nghiệm. Tuy nhiên trước khi merge, phải thông báo sự tương thích chéo.
34
+
35
+ ## Required codebase map updates
36
+ Đừng quên đồng bộ `CURRENT_STATE.md` để phản ánh nhánh/worktree đang thao tác nhằm tránh lạc đường.
37
+
38
+ ## Token saving rules
39
+ Quản lý tốt đường dẫn tương đối và tuyệt đối khi làm việc trong worktree để tránh nhầm lẫn với repo gốc, gây nhiễu cho luồng đọc file.
40
+
41
+ ## Acceptance criteria
42
+ 1. Không được phép chỉnh sửa các file thuộc cấu trúc nhánh chính khi mục tiêu là rủi ro. Mọi thay đổi đều phải thực hiện trên branch của worktree.
43
+ 2. Thử nghiệm trên worktree không được phá hỏng git index của repo gốc.
44
+ 3. Có quy trình merge an toàn hoặc gỡ bỏ (prune) sạch sẽ khi không còn sử dụng.
45
+
46
+ ## Common mistakes
47
+ - **Tạo worktree sai chỗ**: Tạo worktree *bên trong* thư mục làm việc gốc (ví dụ: `./my-worktree`) dẫn đến việc hệ thống git bị bối rối hoặc bị scan bởi linter/watcher. Phải luôn tạo ở cấp thư mục cha (ví dụ: `../my-worktree`).
48
+ - **Quên xoá worktree**: Làm rác hệ thống máy chủ, gây xung đột tài nguyên đĩa.
49
+ - **Thực thi lệnh nhầm thư mục**: Quên đổi thư mục làm việc (CWD) sang thư mục worktree mới, tiếp tục đập phá nhánh gốc.
50
+
51
+ ## Recovery workflow
52
+ 1. Nếu worktree gặp lỗi nghiêm trọng không thể cứu vãn: Chạy lệnh `git worktree remove -f <path>` và `git worktree prune`.
53
+ 2. Trở lại repository gốc với trạng thái nguyên vẹn 100%.
54
+ 3. Tạo worktree mới và bắt đầu lại.
@@ -0,0 +1,6 @@
1
+ interface:
2
+ display_name: "Genesis Git Worktrees"
3
+ short_description: "Làm việc an toàn qua worktree"
4
+ default_prompt: "Tạo và sử dụng git worktrees để cách ly rủi ro khi thực hiện các thay đổi kiến trúc lớn."
5
+ policy:
6
+ allow_implicit_invocation: true
@@ -0,0 +1,53 @@
1
+ ---
2
+ name: genesis-verification-before-completion
3
+ description: Bắt buộc cung cấp bằng chứng (evidence) của quá trình kiểm định trước khi tuyên bố hoàn thành task.
4
+ ---
5
+
6
+ # Genesis Verification Before Completion
7
+
8
+ ## Purpose
9
+ Chấm dứt triệt để việc AI "ảo giác" (hallucinate) kết quả làm việc hoặc tuyên bố xong việc khi chưa chạy test thực tế trên hệ thống. Kỹ năng này đảm bảo chất lượng mã nguồn bằng cách yêu cầu đưa ra bằng chứng (evidence) cụ thể, có thể xác minh được.
10
+
11
+ ## When to use
12
+ Sử dụng mỗi khi kết thúc một đầu mục công việc trong `task.md` hoặc trước khi thông báo với người dùng rằng toàn bộ kế hoạch (Implementation Plan) đã hoàn tất.
13
+
14
+ ## When NOT to use
15
+ Không sử dụng khi task chỉ đơn thuần là trả lời câu hỏi lý thuyết, vẽ sơ đồ, hoặc hướng dẫn cấu trúc mà không hề chạm vào code/hệ thống thực tế.
16
+
17
+ ## Inputs required
18
+ - Trạng thái công việc vừa thực hiện xong.
19
+ - Scripts kiểm tra có sẵn của dự án (`verify.sh`, `npm test`, `run-evals.sh`, linter, v.v.).
20
+
21
+ ## Outputs required
22
+ - Bằng chứng chạy lệnh (CLI output hoặc logs).
23
+ - Trạng thái cụ thể của các bài test (Pass/Fail) và giải thích ngắn gọn ý nghĩa của output đó (vd: "Toàn bộ 45 unit tests đã pass").
24
+
25
+ ## Required tests
26
+ Không tự ý viết thêm test ở bước này nếu không được yêu cầu. Tập trung vào việc **thực thi** (execute) các test suite đã được thiết lập bởi TDD ở các bước trước.
27
+
28
+ ## Required fixtures
29
+ Xác nhận rằng mọi script kiểm thử đã tiêu thụ (consume) đúng các mock data hoặc fixtures được quy định trong cấu trúc dự án.
30
+
31
+ ## Required contract updates
32
+ Nếu script verify phát hiện sự sai lệch giữa code và contract (ví dụ: JSON schema bị lỗi), báo cáo ngay lập tức để người dùng quyết định thay đổi code hay cập nhật contract.
33
+
34
+ ## Required codebase map updates
35
+ N/A - Việc cập nhật map nên được thực hiện trong quá trình code, kiểm định chỉ đóng vai trò xác thực.
36
+
37
+ ## Token saving rules
38
+ Nếu output của quá trình test hoặc linter quá dài (hàng nghìn dòng do log lỗi), hãy dùng các cờ (flags) để chỉ in ra summary (như `--silent` hoặc `tail -n 50`) để tránh tràn context.
39
+
40
+ ## Acceptance criteria
41
+ 1. Phải có bằng chứng rõ ràng (CLI stdout/stderr) chứng minh lệnh kiểm định đã thực sự được gọi trên Terminal.
42
+ 2. Không còn bất kỳ error hay warning nghiêm trọng nào bị bỏ sót chưa xử lý.
43
+ 3. Toàn bộ kịch bản kiểm thử (smoke, unit, integration) đã đạt chỉ tiêu 100% xanh (Green).
44
+
45
+ ## Common mistakes
46
+ - **Báo cáo suông**: Viết dòng chữ "Đã kiểm tra và mã hoạt động tốt" nhưng không hề đính kèm CLI output hoặc không cung cấp bằng chứng đã chạy script nào.
47
+ - **Bỏ qua Warning**: Chỉ nhìn thấy chữ "Pass" nhưng phớt lờ hàng loạt warning tiềm ẩn từ trình biên dịch (compiler) hoặc linter.
48
+ - **Kiểm định sai thư mục**: Chạy test ở thư mục root trong khi package nằm ở thư mục con.
49
+
50
+ ## Recovery workflow
51
+ 1. Nếu verify thất bại ở những phút cuối: Đánh dấu lại tiến độ vào `task.md` (chưa xong).
52
+ 2. Tái sử dụng TDD loop (skill: `genesis-test-driven-development`) để khoanh vùng và xử lý lỗi.
53
+ 3. Không cố gắng che giấu lỗi bằng cách phớt lờ thông báo thất bại.
@@ -0,0 +1,6 @@
1
+ interface:
2
+ display_name: "Genesis Verification"
3
+ short_description: "Bắt buộc kiểm định trước khi hoàn tất"
4
+ default_prompt: "Chạy các script kiểm định, smoke test và evaluation để đưa ra bằng chứng trước khi báo cáo hoàn tất."
5
+ policy:
6
+ allow_implicit_invocation: true