codex-genesis-harness 0.1.8 → 0.1.9

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 (45) hide show
  1. package/.codebase/CURRENT_STATE.md +7 -33
  2. package/.codebase/KNOWN_PROBLEMS.md +20 -1
  3. package/.codebase/MODULE_INDEX.md +15 -2
  4. package/.codebase/PIPELINE_FLOW.md +10 -2
  5. package/.codebase/RECOVERY_POINTS.md +63 -0
  6. package/.codebase/TEST_MATRIX.md +5 -1
  7. package/.codebase/memories/lessons_learned.md +42 -0
  8. package/.codebase/state.json +130 -12
  9. package/.codex/skills/genesis-harness/SKILL.md +10 -1
  10. package/.codex/skills/genesis-harness/agents/openai.yaml +1 -2
  11. package/.codex/skills/genesis-harness/references/state-machine.md +4 -1
  12. package/.codex/skills/genesis-harness/references/workflows.md +7 -1
  13. package/.codex/skills/genesis-harness/scripts/init-planning.sh +245 -13
  14. package/.codex/skills/genesis-pipeline-orchestration/SKILL.md +15 -3
  15. package/.codex-plugin/plugin.json +4 -2
  16. package/CHANGELOG.md +21 -0
  17. package/README.EN.md +44 -2
  18. package/README.VI.md +44 -2
  19. package/README.md +80 -2
  20. package/VERSION +1 -2
  21. package/bin/genesis-harness.js +2121 -21
  22. package/contracts/features/project-registry-schema.json +37 -0
  23. package/contracts/observability/agent-run-schema.json +6 -1
  24. package/features/REGISTRY.md +9 -7
  25. package/fixtures/pipeline/end-to-end-project-lifecycle-fixture.md +39 -0
  26. package/fixtures/pipeline/feature-completion-fixture.md +26 -0
  27. package/fixtures/pipeline/run-to-feature-execution-fixture.md +20 -0
  28. package/package.json +7 -2
  29. package/scripts/check-repository-hygiene.js +48 -0
  30. package/scripts/run-evals.sh +36 -3
  31. package/scripts/schema/001-init.sql +129 -0
  32. package/scripts/schema/002-story-verify.sql +9 -0
  33. package/scripts/schema/003-tool-registry.sql +15 -0
  34. package/scripts/schema/004-intervention.sql +15 -0
  35. package/scripts/transition_state.sh +32 -8
  36. package/scripts/validation_gates.sh +2 -80
  37. package/scripts/verify.sh +3 -1
  38. package/tests/fixtures/fixture-index.md +5 -0
  39. package/tests/integration/cli-smoke.test.js +403 -0
  40. package/tests/unit/repository_hygiene.test.js +17 -0
  41. package/tests/unit/state_metadata.test.js +76 -0
  42. package/tests/unit/verify_gate.test.js +25 -0
  43. package/tests/unit/workflow_contracts.test.js +90 -0
  44. package/fixtures/tts/tts-fixture-template.md +0 -14
  45. package/fixtures/videos/video-fixture-template.md +0 -14
@@ -2,6 +2,7 @@
2
2
  set -euo pipefail
3
3
 
4
4
  confirmed="${PROJECT_BRIEF_CONFIRMED:-0}"
5
+ idea="${USER_IDEA:-}"
5
6
  root="."
6
7
  script_source="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
7
8
 
@@ -16,8 +17,12 @@ while [ "$#" -gt 0 ]; do
16
17
  [ -n "$root" ] || { echo "--root requires a path" >&2; exit 2; }
17
18
  shift 2
18
19
  ;;
20
+ --idea)
21
+ idea="${2:-}"
22
+ shift 2
23
+ ;;
19
24
  --help|-h)
20
- echo "Usage: $0 --confirmed [--root path]" >&2
25
+ echo "Usage: $0 --confirmed [--root path] [--idea \"user brief\"]" >&2
21
26
  echo "Or: PROJECT_BRIEF_CONFIRMED=1 $0 [--root path]" >&2
22
27
  exit 0
23
28
  ;;
@@ -43,11 +48,78 @@ fi
43
48
 
44
49
  cd "$root"
45
50
 
51
+ normalize_inline() {
52
+ printf '%s' "$1" | tr '\n' ' ' | sed 's/[[:space:]]\+/ /g; s/^ //; s/ $//'
53
+ }
54
+
55
+ trim_to_words() {
56
+ local text="$1"
57
+ local limit="${2:-8}"
58
+ printf '%s\n' "$text" | awk -v limit="$limit" '{
59
+ out="";
60
+ for (i = 1; i <= NF && i <= limit; i++) {
61
+ out = out (i == 1 ? "" : " ") $i
62
+ }
63
+ print out
64
+ }'
65
+ }
66
+
67
+ normalized_idea="$(normalize_inline "$idea")"
68
+ detected_stack="$(bash "$script_source/detect-stack.sh" "$root" 2>/dev/null || true)"
69
+
70
+ if [ -n "$normalized_idea" ]; then
71
+ idea_summary="$normalized_idea"
72
+ project_title="$(trim_to_words "$normalized_idea" 8)"
73
+ project_users="Users described in the brief and adjacent stakeholders."
74
+ core_value="Turn the idea into a focused v1 outcome without losing the original brief."
75
+ product_scope="- [ ] Build around this brief: $normalized_idea"
76
+ current_milestone="Phase 1 discovery and planning bootstrap"
77
+ success_criteria="- [ ] The first implementation plan stays aligned with this brief: $normalized_idea"
78
+ functional_requirements="- [ ] Support the core flow implied by the brief: $normalized_idea"
79
+ user_stories="- [ ] As a target user, I want the product described in this brief: $normalized_idea"
80
+ acceptance_criteria="- [ ] Discovery confirms scope, QA path, and tech stack for: $normalized_idea"
81
+ known_unknowns="- [ ] Confirm exact product approach, feature cut, and owners for: $normalized_idea"
82
+ summary_focus="- [ ] Bootstrap planning from the user idea: $normalized_idea"
83
+ summary_recent="- [ ] Init seeded planning docs from the first user brief."
84
+ summary_next="- [ ] Close INIT_QA.md and turn this brief into approved scope."
85
+ stack_direction="Product direction clue: $(printf '%s' "$normalized_idea" | cut -c1-140)"
86
+ else
87
+ idea_summary="No explicit user brief captured yet."
88
+ project_title="TBD"
89
+ project_users="TBD"
90
+ core_value="TBD"
91
+ product_scope="- [ ] TBD"
92
+ current_milestone="TBD"
93
+ success_criteria="- [ ] TBD"
94
+ functional_requirements="- [ ] TBD"
95
+ user_stories="- [ ] As a user, I want TBD so that TBD."
96
+ acceptance_criteria="- [ ] TBD"
97
+ known_unknowns="- [ ] TBD"
98
+ summary_focus="- [ ] Initialize harness and complete discovery / QA alignment."
99
+ summary_recent="- [ ] Initial planning skeleton and discovery phase created."
100
+ summary_next="- [ ] Answer INIT_QA.md and complete Phase 01 discovery artifacts."
101
+ stack_direction="Product direction clue: TBD"
102
+ fi
103
+
104
+ if printf '%s' "$normalized_idea" | grep -Eiq 'mobile|ios|android|responsive'; then
105
+ stack_hint="Mobile-first delivery is implied by the brief."
106
+ else
107
+ stack_hint="TBD"
108
+ fi
109
+
110
+ current_iso_utc="$(date -u +"%Y-%m-%dT%H:%M:%SZ")"
111
+ current_day_local="$(date +"%Y-%m-%d")"
112
+
46
113
  mkdir -p \
114
+ .codebase \
115
+ .codebase/context \
116
+ .codebase/failures \
117
+ .codebase/memories \
47
118
  .planning/diagrams \
48
119
  .planning/research \
49
120
  .planning/decisions \
50
121
  .planning/phases/00-foundation \
122
+ .planning/phases/01-discovery-and-qa \
51
123
  .planning/features \
52
124
  .planning/bugs \
53
125
  .planning/audits \
@@ -95,19 +167,19 @@ write_if_missing .planning/PROJECT.md <<'EOF'
95
167
 
96
168
  ## What This Project Is
97
169
 
98
- TBD
170
+ __PROJECT_WHAT__
99
171
 
100
172
  ## Target Users
101
173
 
102
- TBD
174
+ __PROJECT_USERS__
103
175
 
104
176
  ## Core Value
105
177
 
106
- TBD
178
+ __PROJECT_VALUE__
107
179
 
108
180
  ## Product Scope
109
181
 
110
- - [ ] TBD
182
+ __PROJECT_SCOPE__
111
183
 
112
184
  ## Out Of Scope
113
185
 
@@ -123,11 +195,11 @@ TBD
123
195
 
124
196
  ## Current Milestone
125
197
 
126
- TBD
198
+ __PROJECT_MILESTONE__
127
199
 
128
200
  ## Success Criteria
129
201
 
130
- - [ ] TBD
202
+ __PROJECT_SUCCESS__
131
203
  EOF
132
204
 
133
205
  write_if_missing .planning/REQUIREMENTS.md <<'EOF'
@@ -161,12 +233,13 @@ EOF
161
233
  write_if_missing .planning/ROADMAP.md <<'EOF'
162
234
  # Roadmap
163
235
 
164
- **Note**: Phase 0 (Foundation) is setup and documentation only. Feature phases will be added after requirements are finalized.
236
+ **Note**: Phase 0 (Foundation) is setup and documentation only. Phase 1 captures discovery, QA alignment, and tech stack sign-off before feature phases are planned.
165
237
 
166
238
  | Phase | Type | Status | Dependencies | Acceptance Criteria |
167
239
  |---|---|---|---|---|
168
240
  | 00 Foundation | Setup | [ ] | None | Project docs completed, requirements confirmed, harness verified |
169
- | TBD | Feature | [ ] | 00 Foundation | To be planned after requirements finalized |
241
+ | 01 Discovery & QA | Validation | [ ] | 00 Foundation | Product approach confirmed, QA checklist answered, tech stack signed off |
242
+ | TBD | Feature | [ ] | 01 Discovery & QA | To be planned after requirements finalized |
170
243
  EOF
171
244
 
172
245
  write_if_missing .planning/STATE.md <<'EOF'
@@ -176,7 +249,7 @@ Current project state: [ ] Initialized planning harness pending product confirma
176
249
  Current phase: 00 Foundation (Setup phase - documentation only)
177
250
  Current feature or bug: None
178
251
  Last completed task: None
179
- Next task: Confirm project brief and refine planning docs.
252
+ Next task: Run discovery Q&A to confirm product approach and tech stack.
180
253
  Blocked items: None
181
254
  Latest verification result: Not run
182
255
  EOF
@@ -409,15 +482,52 @@ write_if_missing .planning/SUMMARY.md <<'EOF'
409
482
 
410
483
  ## Current Focus
411
484
 
412
- - [ ] Initialize and confirm planning harness.
485
+ - [ ] Initialize harness and complete discovery / QA alignment.
413
486
 
414
487
  ## Recent Changes
415
488
 
416
- - [ ] Initial planning skeleton created.
489
+ - [ ] Initial planning skeleton and discovery phase created.
417
490
 
418
491
  ## Next Recommended Task
419
492
 
420
- - [ ] Confirm product brief and fill required planning docs.
493
+ - [ ] Answer INIT_QA.md and complete Phase 01 discovery artifacts.
494
+ EOF
495
+
496
+ write_if_missing .planning/INIT_QA.md <<'EOF'
497
+ # Init Discovery Q&A
498
+
499
+ Complete this immediately after `/init`. The next agent turn should request answers or explicit assumptions for every section below.
500
+
501
+ ## Product Direction
502
+
503
+ - [ ] What problem is this project solving?
504
+ - [ ] Who is the primary user?
505
+ - [ ] What is the smallest acceptable v1 outcome?
506
+ - [ ] What approaches were considered and which one is preferred?
507
+
508
+ ## QA Closure
509
+
510
+ - [ ] Happy path is described end-to-end.
511
+ - [ ] Failure and edge cases are listed.
512
+ - [ ] Out-of-scope items are explicitly captured.
513
+ - [ ] Acceptance criteria are measurable.
514
+ - [ ] QA sign-off owner is named.
515
+
516
+ ## Tech Stack Sign-Off
517
+
518
+ - [ ] Backend/runtime choice confirmed.
519
+ - [ ] Frontend/client choice confirmed.
520
+ - [ ] Storage/database choice confirmed.
521
+ - [ ] Test strategy confirmed.
522
+ - [ ] Deployment target confirmed.
523
+ - [ ] Final tech stack owner is named.
524
+
525
+ ## Required Output To User
526
+
527
+ Ask for a concise answer that closes:
528
+ 1. product approach
529
+ 2. tech stack
530
+ 3. QA sign-off / approval owner
421
531
  EOF
422
532
 
423
533
  write_if_missing .planning/config.json <<'EOF'
@@ -666,6 +776,56 @@ Review Phase 0 documentation quality.
666
776
  - [ ] Team confirms understanding
667
777
  EOF
668
778
 
779
+ write_if_missing .planning/phases/01-discovery-and-qa/PLAN.md <<'EOF'
780
+ # 01 Discovery & QA Plan
781
+
782
+ Phase 1 closes product direction before feature planning starts.
783
+
784
+ - [ ] Ask discovery questions from INIT_QA.md
785
+ - [ ] Confirm preferred product approach
786
+ - [ ] Confirm tech stack and deployment direction
787
+ - [ ] Record QA sign-off owner and acceptance criteria
788
+ - [ ] Update PROJECT.md, REQUIREMENTS.md, STACK.md, ROADMAP.md
789
+ - [ ] Mark feature planning ready
790
+ EOF
791
+ write_if_missing .planning/phases/01-discovery-and-qa/TASKS.md <<'EOF'
792
+ # 01 Discovery & QA Tasks
793
+
794
+ - [ ] Ask user to confirm product approach
795
+ - [ ] Ask user to confirm target users and success criteria
796
+ - [ ] Ask user to confirm backend, frontend, database, and deployment stack
797
+ - [ ] Run new-feature-qa checklist against current scope
798
+ - [ ] Run requirements-validation checklist
799
+ - [ ] Assign QA sign-off owner
800
+ - [ ] Update ADR-001-tech-stack.md with chosen stack
801
+ - [ ] Update PROJECT.md and REQUIREMENTS.md with approved direction
802
+ - [ ] Update STATE.md next task toward first feature plan
803
+ EOF
804
+ write_if_missing .planning/phases/01-discovery-and-qa/TESTS.md <<'EOF'
805
+ # 01 Discovery & QA Tests
806
+
807
+ - [ ] INIT_QA.md completed with no unresolved blockers
808
+ - [ ] STACK.md has confirmed stack values or documented assumptions
809
+ - [ ] QA owner and approval path recorded
810
+ - [ ] ROADMAP.md ready for first feature phase creation
811
+ EOF
812
+ write_if_missing .planning/phases/01-discovery-and-qa/VERIFICATION.md <<'EOF'
813
+ # 01 Discovery & QA Verification
814
+
815
+ - [ ] INIT_QA.md answered
816
+ - [ ] PROJECT.md, REQUIREMENTS.md, STACK.md updated
817
+ - [ ] ADR-001-tech-stack.md updated
818
+ - [ ] Next phase can be created without open product ambiguity
819
+ EOF
820
+ write_if_missing .planning/phases/01-discovery-and-qa/REVIEW.md <<'EOF'
821
+ # 01 Discovery & QA Review
822
+
823
+ - [ ] Product approach is explicit
824
+ - [ ] Tech stack is explicit
825
+ - [ ] QA sign-off path is explicit
826
+ - [ ] No blocking TBD remains for feature planning
827
+ EOF
828
+
669
829
  write_if_missing .planning/features/FEATURE_TEMPLATE.md <<'EOF'
670
830
  # Feature Template
671
831
 
@@ -695,6 +855,16 @@ write_if_missing .planning/checks/CHECKS.md <<'EOF'
695
855
  - [ ] Architecture boundaries
696
856
  - [ ] Project verification
697
857
  EOF
858
+
859
+ write_if_missing .codebase/PHASE_DEPENDENCY_MAP.md <<'EOF'
860
+ # Phase Dependency Map
861
+
862
+ | Phase | Depends On | Purpose |
863
+ |---|---|---|
864
+ | 00 Foundation | None | Bootstrap planning harness and baseline docs |
865
+ | 01 Discovery & QA | 00 Foundation | Close product direction, QA checklist, and tech stack sign-off |
866
+ | Feature phases (TBD) | 01 Discovery & QA | Implementation planning begins only after discovery is closed |
867
+ EOF
698
868
  for check in lint typecheck test build docs-sync architecture-fitness; do
699
869
  write_if_missing ".planning/checks/$check.md" <<EOF
700
870
  # $check
@@ -747,4 +917,66 @@ for script in "$script_source"/*.sh; do
747
917
  chmod +x ".planning/scripts/$(basename "$script")"
748
918
  done
749
919
 
920
+ GH_PROJECT_WHAT="$project_title" \
921
+ GH_PROJECT_USERS="$project_users" \
922
+ GH_PROJECT_VALUE="$core_value" \
923
+ GH_PROJECT_SCOPE="$product_scope" \
924
+ GH_PROJECT_MILESTONE="$current_milestone" \
925
+ GH_PROJECT_SUCCESS="$success_criteria" \
926
+ perl -0pi -e 's/__PROJECT_WHAT__/$ENV{GH_PROJECT_WHAT}/g; s/__PROJECT_USERS__/$ENV{GH_PROJECT_USERS}/g; s/__PROJECT_VALUE__/$ENV{GH_PROJECT_VALUE}/g; s/__PROJECT_SCOPE__/$ENV{GH_PROJECT_SCOPE}/g; s/__PROJECT_MILESTONE__/$ENV{GH_PROJECT_MILESTONE}/g; s/__PROJECT_SUCCESS__/$ENV{GH_PROJECT_SUCCESS}/g' .planning/PROJECT.md
927
+
928
+ GH_FUNCTIONAL_REQUIREMENTS="$functional_requirements" \
929
+ GH_USER_STORIES="$user_stories" \
930
+ GH_ACCEPTANCE_CRITERIA="$acceptance_criteria" \
931
+ GH_KNOWN_UNKNOWNS="$known_unknowns" \
932
+ perl -0pi -e 's/- \[ \] TBD\n\n## Non-Functional Requirements/- [ ] TBD\n\n## Seeded From User Idea\n\n$ENV{GH_FUNCTIONAL_REQUIREMENTS}\n\n## Non-Functional Requirements/s; s/- \[ \] As a user, I want TBD so that TBD\./$ENV{GH_USER_STORIES}/g; s/## Acceptance Criteria\n\n- \[ \] TBD/## Acceptance Criteria\n\n$ENV{GH_ACCEPTANCE_CRITERIA}/s; s/## Known Unknowns\n\n- \[ \] TBD/## Known Unknowns\n\n$ENV{GH_KNOWN_UNKNOWNS}/s' .planning/REQUIREMENTS.md
933
+
934
+ GH_STACK_DIRECTION="$stack_direction" \
935
+ GH_STACK_HINT="$stack_hint" \
936
+ GH_STACK_CLUES="$detected_stack" \
937
+ perl -0pi -e 's/Version constraints: TBD/Version constraints: TBD\n\n## Product Direction Clues\n- $ENV{GH_STACK_DIRECTION}\n- $ENV{GH_STACK_HINT}\n\n## Repository Stack Clues\n$ENV{GH_STACK_CLUES}/s' .planning/STACK.md
938
+
939
+ GH_SUMMARY_FOCUS="$summary_focus" \
940
+ GH_SUMMARY_RECENT="$summary_recent" \
941
+ GH_SUMMARY_NEXT="$summary_next" \
942
+ perl -0pi -e 's/- \[ \] Initialize harness and complete discovery \/ QA alignment\./$ENV{GH_SUMMARY_FOCUS}/g; s/- \[ \] Initial planning skeleton and discovery phase created\./$ENV{GH_SUMMARY_RECENT}/g; s/- \[ \] Answer INIT_QA\.md and complete Phase 01 discovery artifacts\./$ENV{GH_SUMMARY_NEXT}/g' .planning/SUMMARY.md
943
+
944
+ GH_IDEA_SUMMARY="$idea_summary" \
945
+ perl -0pi -e 's/Complete this immediately after `\/init`\./Complete this immediately after `\/init`.\n\n## Original User Brief\n\n- [ ] $ENV{GH_IDEA_SUMMARY}\n/s' .planning/INIT_QA.md
946
+
947
+ write_if_missing .codebase/CURRENT_STATE.md <<EOF
948
+ # Current System State
949
+
950
+ **Time**: $current_day_local
951
+ **Status**: \`IN_PROGRESS\`
952
+ **Latest Session**: \`$current_day_local-auto-init-bootstrap\`
953
+
954
+ ## Active Bootstrap
955
+
956
+ - Planning harness initialized automatically from the first user brief.
957
+ - Current planner phase: \`REQUIREMENTS_GATHERING\`
958
+ - User brief: $idea_summary
959
+ - Next task: Answer \`.planning/INIT_QA.md\` and confirm product approach, QA closure, and tech stack.
960
+ EOF
961
+
962
+ write_if_missing .codebase/state.json <<EOF
963
+ {
964
+ "current_state": "REQUIREMENTS_GATHERING",
965
+ "active_work": "Auto-init from user idea",
966
+ "session_id": "$current_day_local-auto-init-bootstrap",
967
+ "session_started_at": "$current_iso_utc",
968
+ "latest_recovery_point": "Auto-init bootstrap in progress",
969
+ "required_verification": [
970
+ "genesis-harness init --yes --platform codex --idea '<user brief>'",
971
+ "Answer .planning/INIT_QA.md",
972
+ "Update .planning/PROJECT.md, REQUIREMENTS.md, STACK.md"
973
+ ],
974
+ "pending_tasks": [
975
+ "Confirm product approach",
976
+ "Confirm QA sign-off owner",
977
+ "Confirm tech stack"
978
+ ]
979
+ }
980
+ EOF
981
+
750
982
  echo "Project Genesis Harness planning files initialized."
@@ -18,7 +18,20 @@ Do not use for small read-only questions.
18
18
  Goal, current state, module index, test matrix, contracts, fixtures, and acceptance criteria.
19
19
 
20
20
  ## Outputs required
21
- Phase logs, tests, fixtures, implementation, contracts, memory updates, docs updates, and change summary.
21
+ Phase logs, a machine-readable feature queue, tests, fixtures, implementation, contracts, project verification evidence, a final handoff, memory updates, docs updates, and change summary.
22
+
23
+ ## Runtime lifecycle
24
+ Use the CLI as the durable control plane:
25
+
26
+ 1. `genesis-harness run --idea ...` creates the first execution-ready feature.
27
+ 2. `genesis-harness add-feature ...` appends additional planned features.
28
+ 3. `genesis-harness next` resolves the single active feature.
29
+ 4. `genesis-harness complete-feature ...` verifies that feature and promotes the next queued feature.
30
+ 5. After the final feature, `genesis-harness verify-project ...` reruns every feature proof plus the project proof and creates the handoff.
31
+ 6. `genesis-harness complete-project ...` moves `RELEASE_READY` to `COMPLETED`.
32
+ 7. `genesis-harness pipeline-audit` checks queue, state, proof, handoff, and event-history consistency.
33
+
34
+ Do not treat feature completion as project completion.
22
35
 
23
36
  ## Required tests
24
37
  Create failing tests in Phase 1 before implementation.
@@ -42,5 +55,4 @@ No phase is skipped and the final report includes verification evidence.
42
55
  Combining phases, implementing before fixtures, and leaving state non-resumable.
43
56
 
44
57
  ## Recovery workflow
45
- If interrupted, resume from the last completed phase log and rerun verification before continuing.
46
-
58
+ If interrupted, resume from `.runs/<session-id>/STATE.json`, `RESUME.md`, and append-only `EVENTS.jsonl`, then rerun the relevant verification before continuing.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "genesis-skill-set",
3
- "version": "0.1.7",
3
+ "version": "0.1.9",
4
4
  "description": "Genesis harness skill system for Codex test-first, contract-first, memory-aware autonomous workflows.",
5
5
  "author": {
6
6
  "name": "Genesis Skill Set"
@@ -27,7 +27,9 @@
27
27
  "Review"
28
28
  ],
29
29
  "defaultPrompt": [
30
- "Use $genesis-harness and run /genesis-init.",
30
+ "Use $genesis-harness. If the repo is blank and the user gives an idea, treat it as implicit init and bootstrap from that brief.",
31
+ "Use genesis-harness add-feature, next, and complete-feature to drive each queued feature through verified completion with evidence.",
32
+ "After all features are verified, use verify-project, complete-project, and pipeline-audit to close the project only from RELEASE_READY.",
31
33
  "Use $genesis-pipeline-orchestration to run the full test-first harness workflow.",
32
34
  "Use $genesis-api-contract to create endpoint contracts and tests before implementation."
33
35
  ],
package/CHANGELOG.md CHANGED
@@ -6,6 +6,27 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
 
7
7
  ---
8
8
 
9
+ ## [0.1.9] - 2026-06-11
10
+
11
+ ### Added
12
+ - **Non-interactive bootstrap CLI**: Added `genesis-harness init --platform ... --yes --idea ...` for deterministic project initialization from a blank repo or first product brief.
13
+ - **Run pipeline**: Added `genesis-harness run --idea ... --yes` to persist discovery answers and promote the first implementation slice into `.planning/features/`.
14
+ - **Resume artifacts**: Added `.runs/<session-id>/INPUT.md`, `DISCOVERY.json`, `STATE.json`, and `RESUME.md` so future sessions can resume from disk.
15
+ - **Typed first-slice contracts**: The first scaffolded feature can now emit API/UI contracts and fixtures under `contracts/api`, `contracts/ui`, `fixtures/api`, and `playwright/fixtures`.
16
+ - **Verify-gate contract tests**: Added tests for the expanded `verify-gate`, workflow contracts, state metadata, and CLI bootstrap smoke paths.
17
+
18
+ ### Changed
19
+ - **Verify-gate hardening**: `genesis-harness verify-gate` now runs structural verify, eval regression, docs-gate, cold-start, package dry-run, and LeanCTX reporting.
20
+ - **CI verification**: GitHub verification now delegates to a reusable verify workflow.
21
+ - **npm publishing**: Publish workflow now targets GitHub release/manual events and uses npm trusted publishing with provenance instead of long-lived npm tokens or CI-mutated versions.
22
+ - **Package contents**: `README.EN.md` and `README.VI.md` are included in the npm tarball because root `README.md` links to both language guides.
23
+
24
+ ### Release Notes
25
+ - `package.json`, `package-lock.json`, `.codex-plugin/plugin.json`, `VERSION`, README labels, and this changelog are aligned on `0.1.9`.
26
+ - `tmp_pack/package/**` remains tracked as the historical pack artifact; the accidental deletion from the release-prep commit was restored.
27
+
28
+ ---
29
+
9
30
  ## [0.1.8] - 2026-06-01
10
31
 
11
32
  ### Added
package/README.EN.md CHANGED
@@ -167,6 +167,48 @@ genesis-harness prime
167
167
 
168
168
  ---
169
169
 
170
+ ## 🧭 Release v0.1.9
171
+
172
+ Genesis v0.1.9 adds a deterministic bootstrap path that starts from a product idea, records discovery answers, scaffolds the first implementation-ready feature, and persists a resumable checkpoint.
173
+
174
+ ```bash
175
+ genesis-harness init --platform codex --yes --idea "<brief>"
176
+ genesis-harness run --platform codex --yes --idea "<brief>" \
177
+ --product-approach "<approach>" \
178
+ --primary-user "<user>" \
179
+ --v1-outcome "<smallest useful outcome>" \
180
+ --qa-owner "<owner>" \
181
+ --backend "<runtime>" \
182
+ --frontend "<client>" \
183
+ --database "<storage>" \
184
+ --deployment "<target>" \
185
+ --test-strategy "<tests>"
186
+ genesis-harness resume
187
+ genesis-harness add-feature --title "Notify staff" --slug "staff-notifications" --verify-cmd "npm test"
188
+ genesis-harness next
189
+ genesis-harness complete-feature --verify-cmd "npm test" --evidence "All feature tests passed"
190
+ genesis-harness verify-project --verify-cmd "npm run verify" --evidence "Acceptance suite passed"
191
+ genesis-harness complete-project --evidence "Release candidate accepted"
192
+ genesis-harness pipeline-audit
193
+ ```
194
+
195
+ Release highlights:
196
+
197
+ 1. Blank repos can be initialized from the first user idea.
198
+ 2. Init now creates Discovery & QA scaffolding plus `.codebase/PHASE_DEPENDENCY_MAP.md`.
199
+ 3. `run --idea` can promote discovery answers into the active first feature under `.planning/features/`.
200
+ 4. First-slice scaffolding can generate typed API/UI contracts and fixtures.
201
+ 5. `.runs/<session-id>/` stores resumable run artifacts.
202
+ 6. `verify-gate` now covers verify, evals, docs-gate, cold-start, package dry-run, and LeanCTX.
203
+ 7. `add-feature`, `next`, and `complete-feature` operate a repeatable multi-feature execution queue with persisted evidence and lead-time metrics.
204
+ 8. `verify-project` reruns every feature proof plus the project proof, creates the implementation handoff, and moves the project to `RELEASE_READY`.
205
+ 9. `complete-project` requires release or acceptance evidence, while `pipeline-audit` detects lifecycle drift.
206
+ 10. npm publishing is hardened for GitHub release/manual runs with provenance and trusted publishing.
207
+
208
+ Before tagging, confirm `package.json`, `.codex-plugin/plugin.json`, `VERSION`, `CHANGELOG.md`, and README version labels all agree.
209
+
210
+ ---
211
+
170
212
  ## 🔬 Research-First Guarantee (NEW)
171
213
 
172
214
  **Every important decision is grounded in evidence. No guessing.**
@@ -776,7 +818,7 @@ npm run pack:check # Check npm package
776
818
  - ✅ **Skills**: 25 fully implemented & verified (added 5-Phase MVP Roadmap planner, advanced self-healing and compaction engines)
777
819
  - ✅ **Test Coverage**: 80%+ required
778
820
  - ✅ **Token Savings**: 40-60%
779
- - ✅ **Production Ready**: Yes (v0.1.8)
821
+ - ✅ **Production Ready**: Yes (v0.1.9)
780
822
  - ✅ **Auto-Research Enforcement**: Active
781
823
  - ✅ **Auto-Debug Verification**: Active
782
824
  - ✅ **Auto-Spec-Propagation**: Active
@@ -788,7 +830,7 @@ npm run pack:check # Check npm package
788
830
 
789
831
  MIT License - See [LICENSE](LICENSE)
790
832
 
791
- **Genesis Codex Harness** - Build production software with Codex | v0.1.8 | June 2026
833
+ **Genesis Codex Harness** - Build production software with Codex | v0.1.9 | June 2026
792
834
 
793
835
  ---
794
836
 
package/README.VI.md CHANGED
@@ -167,6 +167,48 @@ genesis-harness prime
167
167
 
168
168
  ---
169
169
 
170
+ ## 🧭 Release v0.1.9
171
+
172
+ Genesis v0.1.9 bổ sung luồng bootstrap deterministic: bắt đầu từ ý tưởng sản phẩm, ghi lại discovery answers, scaffold feature đầu tiên sẵn sàng implement, và lưu checkpoint để phiên sau resume từ ổ đĩa.
173
+
174
+ ```bash
175
+ genesis-harness init --platform codex --yes --idea "<brief>"
176
+ genesis-harness run --platform codex --yes --idea "<brief>" \
177
+ --product-approach "<approach>" \
178
+ --primary-user "<user>" \
179
+ --v1-outcome "<smallest useful outcome>" \
180
+ --qa-owner "<owner>" \
181
+ --backend "<runtime>" \
182
+ --frontend "<client>" \
183
+ --database "<storage>" \
184
+ --deployment "<target>" \
185
+ --test-strategy "<tests>"
186
+ genesis-harness resume
187
+ genesis-harness add-feature --title "Thông báo cho nhân viên" --slug "staff-notifications" --verify-cmd "npm test"
188
+ genesis-harness next
189
+ genesis-harness complete-feature --verify-cmd "npm test" --evidence "Toàn bộ test feature đã pass"
190
+ genesis-harness verify-project --verify-cmd "npm run verify" --evidence "Acceptance suite đã pass"
191
+ genesis-harness complete-project --evidence "Release candidate đã được chấp nhận"
192
+ genesis-harness pipeline-audit
193
+ ```
194
+
195
+ Điểm chính của release:
196
+
197
+ 1. Repo trống có thể init trực tiếp từ ý tưởng đầu tiên của user.
198
+ 2. Init tạo Discovery & QA scaffold cùng `.codebase/PHASE_DEPENDENCY_MAP.md`.
199
+ 3. `run --idea` có thể đưa discovery answers thành feature đầu tiên đang active trong `.planning/features/`.
200
+ 4. First-slice scaffold có thể sinh API/UI contracts và fixtures có kiểu rõ ràng.
201
+ 5. `.runs/<session-id>/` lưu artifacts để resume.
202
+ 6. `verify-gate` giờ bao phủ verify, evals, docs-gate, cold-start, package dry-run, và LeanCTX.
203
+ 7. `add-feature`, `next`, và `complete-feature` vận hành queue nhiều feature lặp lại, đồng thời lưu evidence và lead-time metrics.
204
+ 8. `verify-project` chạy lại toàn bộ feature proof cùng project proof, tạo implementation handoff, rồi chuyển dự án sang `RELEASE_READY`.
205
+ 9. `complete-project` yêu cầu release hoặc acceptance evidence; `pipeline-audit` phát hiện lifecycle drift.
206
+ 10. npm publish được harden cho GitHub release/manual runs với provenance và trusted publishing.
207
+
208
+ Trước khi tag release, cần xác nhận `package.json`, `.codex-plugin/plugin.json`, `VERSION`, `CHANGELOG.md`, và nhãn version trong README đều khớp nhau.
209
+
210
+ ---
211
+
170
212
  ## 🔬 Bảo Đảm Research-First (MỚI)
171
213
 
172
214
  **Mỗi quyết định quan trọng đều dựa trên bằng chứng. Không đoán mò.**
@@ -769,7 +811,7 @@ npm run eval # Chạy evaluation
769
811
  - ✅ **25 Skills**: Hoàn toàn kế thừa và triển khai đầy đủ (đã bổ sung lộ trình 5-Phase MVP, tự chữa lành & nén context)
770
812
  - ✅ **Test Coverage**: 80%+ required
771
813
  - ✅ **Token Savings**: 40-60%
772
- - ✅ **Production Ready**: Yes (v0.1.8)
814
+ - ✅ **Production Ready**: Yes (v0.1.9)
773
815
  - ✅ **Auto-Research Enforcement**: Active
774
816
  - ✅ **Auto-Debug Verification**: Active
775
817
  - ✅ **Auto-Spec-Propagation**: Active
@@ -781,7 +823,7 @@ npm run eval # Chạy evaluation
781
823
 
782
824
  MIT License - Xem [LICENSE](LICENSE)
783
825
 
784
- **Genesis Codex Harness** - Xây dựng phần mềm production với Codex | v0.1.8 | Tháng 6, 2026
826
+ **Genesis Codex Harness** - Xây dựng phần mềm production với Codex | v0.1.9 | Tháng 6, 2026
785
827
 
786
828
  ---
787
829
 
package/README.md CHANGED
@@ -129,6 +129,67 @@ genesis-harness prime
129
129
 
130
130
  ---
131
131
 
132
+ ## 🧭 Release v0.1.9
133
+
134
+ Genesis v0.1.9 turns the harness from a planning scaffold into a resumable runtime bootstrap that can start from a single product idea and carry the first feature slice into implementation.
135
+
136
+ ### Runtime Bootstrap
137
+
138
+ ```bash
139
+ # Initialize a blank repo from a user idea
140
+ genesis-harness init --platform codex --yes --idea "Build a staff-facing request queue"
141
+
142
+ # Run deterministic discovery and promote the first feature slice
143
+ genesis-harness run \
144
+ --platform codex \
145
+ --yes \
146
+ --idea "Build a concierge booking assistant" \
147
+ --product-approach "Staff-facing tablet dashboard" \
148
+ --primary-user "Front-desk staff" \
149
+ --v1-outcome "Staff can log, prioritize, and resolve guest requests in one queue" \
150
+ --qa-owner "Operations lead" \
151
+ --backend "Node.js" \
152
+ --frontend "React" \
153
+ --database "PostgreSQL" \
154
+ --deployment "Fly.io" \
155
+ --test-strategy "Node integration tests and Playwright smoke tests"
156
+
157
+ # Resume the active run from disk
158
+ genesis-harness resume
159
+ genesis-harness add-feature --title "Notify staff" --slug "staff-notifications" --verify-cmd "npm test"
160
+ genesis-harness next
161
+ genesis-harness complete-feature --verify-cmd "npm test" --evidence "All feature tests passed"
162
+ genesis-harness verify-project --verify-cmd "npm run verify" --evidence "Acceptance suite passed"
163
+ genesis-harness complete-project --evidence "Release candidate accepted"
164
+ genesis-harness pipeline-audit
165
+ ```
166
+
167
+ ### What Changes
168
+
169
+ 1. **Implicit init from an idea**: Empty repos can be bootstrapped directly from the first product brief.
170
+ 2. **Discovery & QA phase**: Init now creates `.planning/INIT_QA.md`, a Discovery & QA phase, and `.codebase/PHASE_DEPENDENCY_MAP.md`.
171
+ 3. **Idea-seeded planning docs**: `PROJECT.md`, `REQUIREMENTS.md`, `STACK.md`, `SUMMARY.md`, `.codebase/CURRENT_STATE.md`, and `.codebase/state.json` are seeded from the user brief when available.
172
+ 4. **Deterministic `run --idea` pipeline**: Discovery answers can be provided in one command and promoted into an active first feature under `.planning/features/`.
173
+ 5. **Typed first-slice contracts**: The first feature scaffold can generate API/UI contracts and fixtures under `contracts/api`, `contracts/ui`, `fixtures/api`, and `playwright/fixtures`.
174
+ 6. **Resumable run artifacts**: `.runs/<session-id>/INPUT.md`, `DISCOVERY.json`, `STATE.json`, and `RESUME.md` persist the active checkpoint.
175
+ 7. **Stronger verify-gate**: `genesis-harness verify-gate` now runs structural verify, evals, docs-gate, cold-start, package dry-run, and LeanCTX reporting.
176
+ 8. **End-to-end lifecycle**: Features are queued and verified one at a time; project-wide verification creates a release-ready handoff before final completion.
177
+ 9. **Durable audit trail**: `.runs/<session-id>/EVENTS.jsonl` records lifecycle events, while `pipeline-audit` detects queue, state, proof, and handoff drift.
178
+ 10. **Release publishing hardening**: GitHub release/manual publishing now uses npm trusted publishing with provenance instead of long-lived npm tokens or CI-mutated versions.
179
+
180
+ ### Release Readiness Checklist
181
+
182
+ ```bash
183
+ npm run verify
184
+ npm run eval
185
+ npm run pack:check
186
+ node bin/genesis-harness.js verify-gate
187
+ ```
188
+
189
+ Before tagging, confirm `package.json`, `.codex-plugin/plugin.json`, `VERSION`, `CHANGELOG.md`, and the README version labels all agree.
190
+
191
+ ---
192
+
132
193
  ## 📦 Quick Start & Usage
133
194
 
134
195
  ### 1. Installation
@@ -157,6 +218,23 @@ After installation, simply type standard commands in your Codex chat interface t
157
218
 
158
219
  *All commands are strictly enforced to run in a Codex-only, no-switching environment.*
159
220
 
221
+ For non-interactive CLI bootstrap, use:
222
+
223
+ ```bash
224
+ genesis-harness init --platform codex --yes --idea "<brief>"
225
+ genesis-harness run --platform codex --yes --idea "<brief>" \
226
+ --product-approach "<approach>" \
227
+ --primary-user "<user>" \
228
+ --v1-outcome "<smallest useful outcome>" \
229
+ --qa-owner "<owner>" \
230
+ --backend "<runtime>" \
231
+ --frontend "<client>" \
232
+ --database "<storage>" \
233
+ --deployment "<target>" \
234
+ --test-strategy "<tests>"
235
+ genesis-harness resume
236
+ ```
237
+
160
238
  ---
161
239
 
162
240
  ## 🏗️ What Gets Installed
@@ -202,7 +280,7 @@ If you prefer not to install them globally, you can configure your Agent Client
202
280
  - ✅ **Codex-Only Enforcement**: `100%`
203
281
  - ✅ **Skills Matrix**: 25 fully implemented, structured, and verified skills
204
282
  - ✅ **Token Caching Savings**: `40% to 60%` verified per enterprise project
205
- - ✅ **Stability & Readiness**: Production Ready (`v0.1.8` - June 2026)
283
+ - ✅ **Stability & Readiness**: Production Ready (`v0.1.9` - June 2026)
206
284
 
207
285
  ---
208
286
 
@@ -212,5 +290,5 @@ Licensed under the [MIT License](LICENSE). Contributions, bug reports, and featu
212
290
 
213
291
  ---
214
292
 
215
- **Genesis Codex Harness** v0.1.8 | June 2026
293
+ **Genesis Codex Harness** v0.1.9 | June 2026
216
294
  👉 **[Full English Guide](README.EN.md) | [Tiếng Việt Hướng Dẫn](README.VI.md)**