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
@@ -1,438 +1,22 @@
1
1
  # Recovery Points
2
2
 
3
- **Purpose**: Document where implementation can be paused and resumed without losing context or creating inconsistencies.
4
-
5
- **Use When**: Work needs to be paused, passed to another developer, or interrupted by higher priority work.
6
-
7
- ---
8
-
9
- ## Quick Reference: Current Recovery Points
10
-
11
- | Phase | Status | Resumption File | Last Updated |
12
- |-------|--------|-----------------|--------------|
13
- | Planning | ✓ Complete | `.codebase/CURRENT_STATE.md` | _date_ |
14
- | Design | ✓ Complete | IMPLEMENTATION_HANDOFF.md | _date_ |
15
- | Contracts | ✓ Complete | `.codebase/API_CONTRACTS.md` | _date_ |
16
- | Tests | ⏸️ In Progress | `tests/auth.test.ts` | _date_ |
17
- | Implementation | ⏸️ In Progress | `src/auth/` | _date_ |
18
- | Documentation | ⏸️ Pending | `docs/AUTH.md` | _date_ |
19
-
20
- ---
21
-
22
- ## Phase: Planning
23
-
24
- **Status**: ✓ Complete
25
- **Start Date**: _date_
26
- **End Date**: _date_
27
- **Resumption**: Not needed
28
-
29
- ### What Happened
30
-
31
- All requirements gathered, validated, and documented.
32
-
33
- ### To Resume (If Needed)
34
-
35
- Not applicable - planning is complete and locked.
36
-
37
- ---
38
-
39
- ## Phase: Design & Architecture
40
-
41
- **Status**: ✓ Complete
42
- **Start Date**: _date_
43
- **End Date**: _date_
44
- **Resumption**: Not needed
45
-
46
- ### What Happened
47
-
48
- System design completed, contracts defined, technology choices made.
49
-
50
- ### Artifacts
51
-
52
- - `.codebase/ARCHITECTURE.md` - Final design
53
- - `.codebase/API_CONTRACTS.md` - API specifications
54
- - `IMPLEMENTATION_HANDOFF.md` - Design decisions
55
-
56
- ### To Resume (If Needed)
57
-
58
- Not applicable - design is frozen and approved.
3
+ A reverse-chronological log of stable states to return to if the current task corrupts the project.
59
4
 
60
5
  ---
61
6
 
62
- ## Phase: Test Contracts & Fixtures
63
-
64
- **Status**: Complete
65
- **Start Date**: _date_
66
- **End Date**: _date_
67
- **Resumption**: Not needed
68
-
69
- ### What Happened
70
-
71
- Test contracts created, fixtures built, test infrastructure ready.
72
-
73
- ### Artifacts
74
-
75
- ```
76
- tests/
77
- ├── contracts/
78
- │ ├── auth-api.contract.json
79
- │ └── session-manager.contract.json
80
- ├── fixtures/
81
- │ ├── oauth-responses.json
82
- │ └── user-data.json
83
- └── setup/
84
- ├── test-db-init.sql
85
- └── mock-providers.ts
86
- ```
87
-
88
- ### To Resume (If Needed)
89
-
90
- Not applicable - test infrastructure is ready.
91
-
92
- ---
93
-
94
- ## Phase: Core Implementation (CURRENT PAUSE POINT)
95
-
96
- **Status**: ⏸️ In Progress (50% complete)
97
- **Start Date**: _date_
98
- **Current Date**: _YYYY-MM-DD_
99
- **Estimated Completion**: _date_
100
-
101
- ### What Was Done (Completed)
102
-
103
- ```
104
- ✓ src/auth/oauth-provider.ts
105
- - OAuth 2.0 flow implementation
106
- - Provider callback handling
107
- - Token management
108
-
109
- ✓ src/db/migrations/
110
- - New users table fields
111
- - oauth_provider, oauth_id columns
112
-
113
- ✓ tests/auth.test.ts
114
- - 15 tests written and passing
115
- - 90% coverage of oauth-provider.ts
116
- ```
117
-
118
- ### What Remains (To Do)
119
-
120
- ```
121
- ⏳ src/auth/session-manager.ts
122
- - Session creation and validation
123
- - Session timeout handling
124
- - Concurrent session management
125
-
126
- ⏳ src/ui/pages/
127
- - Login component
128
- - Registration component
129
- - Error handling UI
130
-
131
- ⏳ API endpoints
132
- - POST /auth/login
133
- - POST /auth/register
134
- - POST /auth/logout
135
-
136
- ⏳ Integration tests
137
- - End-to-end OAuth flow
138
- - Database state consistency
139
- ```
140
-
141
- ### Pause State
142
-
143
- **What's Safe to Pause Here:**
144
-
145
- The OAuth provider module is isolated and complete. Can pause safely at this point.
146
-
147
- **Before Pausing:**
148
-
149
- ```bash
150
- # 1. Commit current progress
151
- git add -A
152
- git commit -m "feat: OAuth provider implementation (50% complete)"
153
-
154
- # 2. Verify tests pass
155
- npm test
156
-
157
- # 3. Document pause point
158
- # (You are reading this file!)
159
-
160
- # 4. Create recovery checklist
161
- # (See section below)
162
- ```
163
-
164
- ### To Resume From Here
165
-
166
- **Step 1: Environment Setup** (5 min)
167
-
168
- ```bash
169
- # Pull latest changes
170
- git pull origin main
171
-
172
- # Verify you're on the right branch
173
- git branch -v
174
-
175
- # Install dependencies
176
- npm install
177
-
178
- # Check database is migrated
179
- npm run db:status
180
- ```
181
-
182
- **Step 2: Verify Previous Work** (5 min)
183
-
184
- ```bash
185
- # Run existing tests
186
- npm test -- auth.test.ts
187
- # Expected: 15 passing
188
-
189
- # Check module compiles
190
- npm run build
191
-
192
- # Verify no uncommitted changes
193
- git status
194
- ```
195
-
196
- **Step 3: Review What's Next** (10 min)
197
-
198
- ```bash
199
- # Read the handoff document
200
- cat IMPLEMENTATION_HANDOFF.md
201
-
202
- # Check what was planned next
203
- cat .codebase/CURRENT_STATE.md
204
-
205
- # Review test contract
206
- cat tests/contracts/auth-api.contract.json
207
- ```
208
-
209
- **Step 4: Resume Implementation** (30 min+)
210
-
211
- Start with session-manager.ts:
7
+ ## 2026-06-03T09:55:00+07:00: Full Score Harness Fix (110/110)
8
+ - **Status**: Stable
9
+ - **Git State**: Everything committed + new features added.
10
+ - **Why it's stable**: All tests (`tests/unit/*.test.js`), `verify.sh`, `run-evals.sh`, and `cold-start-check.js` pass with exit code 0.
11
+ - **How to recover**: `git reset --hard HEAD` (assuming commit happens immediately after this)
12
+ - **Files added**: `features/REGISTRY.md`, `scripts/cold-start-check.js`, `scripts/check-scope.sh`, observability schemas/samples.
212
13
 
213
- ```bash
214
- # Create new branch (if needed)
215
- git checkout -b continue/auth-session
216
-
217
- # Open the next module
218
- code src/auth/session-manager.ts
219
-
220
- # Reference the test contract
221
- code tests/contracts/session-manager.contract.json
222
-
223
- # Start implementing...
224
- ```
225
-
226
- ---
227
-
228
- ## Phase: Session Management (NEXT PHASE)
229
-
230
- **Status**: ⏳ Ready to start
231
- **Estimated Start**: _date_
232
- **Estimated Duration**: 4-6 hours
233
- **Estimator**: Original developer
234
-
235
- ### What Needs to Happen
236
-
237
- 1. **Implement session-manager.ts**
238
- - Create session on login
239
- - Validate session on requests
240
- - Handle timeout
241
-
242
- 2. **Write session tests**
243
- - Session creation tests
244
- - Validation tests
245
- - Timeout tests
246
- - Concurrent session tests
247
-
248
- 3. **Update database**
249
- - Add sessions table migration
250
- - Add indexes for performance
251
-
252
- ### Acceptance Criteria
253
-
254
- ```
255
- - [ ] Session manager module complete
256
- - [ ] 12+ session tests written and passing
257
- - [ ] Coverage ≥ 85%
258
- - [ ] No performance regressions
259
- - [ ] Integrated with OAuth provider
260
- ```
261
-
262
- ### Dependencies
263
-
264
- - ✓ OAuth provider complete (already done)
265
- - ✓ Database migrations (already done)
266
- - ⏳ Needs: Node.js session library installed
267
-
268
- ### Blockers
269
-
270
- None identified. Ready to proceed.
271
-
272
- ---
273
-
274
- ## Phase: UI Components (AFTER SESSION)
275
-
276
- **Status**: ⏳ Ready to start
277
- **Estimated Start**: _date_ (after session phase)
278
- **Estimated Duration**: 6-8 hours
279
-
280
- ### What Needs to Happen
281
-
282
- 1. **Build Login Page**
283
- - OAuth provider buttons
284
- - Error messaging
285
- - Loading states
286
-
287
- 2. **Build Register Page**
288
- - Form validation
289
- - Provider linking
290
- - Success messaging
291
-
292
- 3. **Update Layout**
293
- - Add auth header
294
- - Add logout button
295
- - Add user menu
296
-
297
- ### Files to Modify
298
-
299
- ```
300
- src/ui/pages/
301
- ├── login.tsx (new)
302
- ├── register.tsx (new)
303
- └── layout.tsx (modify)
304
-
305
- src/ui/components/
306
- ├── oauth-button.tsx (new)
307
- ├── auth-error.tsx (new)
308
- └── user-menu.tsx (modify)
309
-
310
- styles/
311
- ├── auth.css (new)
312
- ```
313
-
314
- ### Acceptance Criteria
315
-
316
- ```
317
- - [ ] Login page working
318
- - [ ] Register page working
319
- - [ ] OAuth provider flow works E2E
320
- - [ ] Error messages display correctly
321
- - [ ] Mobile responsive
322
- - [ ] Browser compatibility tested
323
- ```
324
-
325
- ---
326
-
327
- ## Phase: Documentation & Testing (FINAL PHASE)
328
-
329
- **Status**: ⏳ Ready to start
330
- **Estimated Start**: _date_ (after UI phase)
331
- **Estimated Duration**: 4 hours
332
-
333
- ### What Needs to Happen
334
-
335
- 1. **Update Documentation**
336
- - README auth section
337
- - Setup guide
338
- - API documentation
339
- - Troubleshooting guide
340
-
341
- 2. **Final Testing**
342
- - Full E2E test suite
343
- - Performance testing
344
- - Security testing
345
- - Browser compatibility
346
-
347
- 3. **Code Review & QA**
348
- - Team code review
349
- - QA testing
350
- - Security review
351
-
352
- ### Acceptance Criteria
353
-
354
- ```
355
- - [ ] All documentation complete
356
- - [ ] All E2E tests passing
357
- - [ ] Code review approved
358
- - [ ] No security issues
359
- - [ ] Performance acceptable
360
- - [ ] Ready for production
361
- ```
362
-
363
- ---
364
-
365
- ## Rollback Points
366
-
367
- ### If Implementation Gets Stuck
368
-
369
- **Rollback Level 1: Last Commit**
370
- ```bash
371
- git reset --hard HEAD
372
- npm install
373
- npm test # Should pass
374
- ```
375
-
376
- **Rollback Level 2: Before This Feature**
377
- ```bash
378
- git checkout main
379
- npm install
380
- npm test
381
- # Verify everything works on main
382
- ```
383
-
384
- **Rollback Level 3: Database Rollback**
385
- ```bash
386
- npm run db:rollback -- auth-v1
387
- # Removes auth tables/fields
388
- # App reverts to state before auth changes
389
- ```
390
-
391
- ---
392
-
393
- ## Checklist: Before Pausing Work
394
-
395
- - [ ] All current tests passing
396
- - [ ] Code builds without errors
397
- - [ ] No uncommitted changes
398
- - [ ] Commit message written (describe state)
399
- - [ ] This Recovery Points file updated
400
- - [ ] Next developer notified
401
- - [ ] Slack message sent with status
402
-
403
- ---
404
-
405
- ## Checklist: When Resuming Work
406
-
407
- - [ ] Pull latest git changes
408
- - [ ] Run `npm install` (if dependencies changed)
409
- - [ ] Run existing tests (verify they still pass)
410
- - [ ] Read IMPLEMENTATION_HANDOFF.md
411
- - [ ] Read this Recovery Points file
412
- - [ ] Update status in this file (what phase are you on?)
413
- - [ ] Begin implementation from current phase
414
-
415
- ---
416
-
417
- ## Known Issues That Might Affect Resumption
418
-
419
- | Issue | Severity | Workaround | Fixed? |
420
- |-------|----------|-----------|--------|
421
- | OAuth token refresh timing | Low | Add 5s buffer | ⏳ TODO |
422
- | Database connection pooling | Medium | Use pool size 10 | ✓ Fixed |
423
- | Rate limiting missing | Low | Not blocking | ⏳ TODO |
424
-
425
- ---
426
-
427
- ## Contact For Questions
428
-
429
- **Original Developer**: _Name_ (_email_)
430
- **Current Owner**: _Name_ (_email_)
431
- **Slack Channel**: #auth-feature
432
-
433
- ---
14
+ ## 2026-06-03T09:30:00+07:00: LeanCTX + CLI Postinstall Seed
15
+ - **Status**: Stable
16
+ - **Why it's stable**: `npm run verify` and `npm run eval` pass. `context-policy.json` successfully bootstrapped.
17
+ - **How to recover**: Return to commit before the evaluation score fixes.
434
18
 
435
- **Last Updated**: _YYYY-MM-DD HH:MM_
436
- **Updated By**: _Name_
437
- **Next Review**: _YYYY-MM-DD_
438
- **Paused At**: _Phase: Core Implementation_
19
+ ## 2026-06-03T08:35:00+07:00: Harness Drift Gate Hardening
20
+ - **Status**: Stable
21
+ - **Why it's stable**: `npm run verify`, `npm run eval`, and `npm run pack:check` all pass.
22
+ - **How to recover**: Revert to branch state before LeanCTX introduction.
@@ -0,0 +1,6 @@
1
+ # Tech Debt Ledger
2
+
3
+ This file logs structural rule violations, skipped tests, and out-of-scope modifications that were bypassed using `VIBE_MODE`.
4
+ The AI and developers should periodically review this file to pay down technical debt.
5
+
6
+ ---
@@ -2,10 +2,11 @@
2
2
 
3
3
  Required checks:
4
4
 
5
- - `scripts/verify.sh`: repository harness structure, skill metadata, contracts, fixtures, and harness smoke test.
6
- - `scripts/run-evals.sh`: install/verify/uninstall regression checks.
5
+ - `scripts/verify.sh`: repository harness structure, skill metadata, contracts, fixtures, harness smoke test, and `SKILL.md` progressive-disclosure line limit.
6
+ - `scripts/run-evals.sh`: install/verify/uninstall regression checks, manifest route checks, sync-generated Mermaid relationship checks, hook docs-gate checks, LeanCTX policy checks, handoff/state freshness checks, `tests/unit/*.test.js`, and `tests/integration/*.test.js`.
7
+ - `tests/integration/cli-smoke.test.js`: package CLI smoke for install/postinstall LeanCTX seeding, `path`, `status`, `docs`, `docs-gate`, `leanctx`, `prime`, and `sync` in temporary fixture repositories.
8
+ - `tests/unit/prompt_sentinel.test.js`: LeanCTX-backed prompt sentinel threshold and truncation behavior.
7
9
  - `npm run pack:check`: package contents dry-run.
8
10
  - Skill validation: run `quick_validate.py` for changed skills when available.
9
11
 
10
12
  Feature rule: add or update fixtures and expected output before implementation.
11
-
@@ -0,0 +1,127 @@
1
+ # Visual Project Graph
2
+
3
+ ## Harness Relationship Map
4
+
5
+ ```mermaid
6
+ flowchart LR
7
+ manifest[".codex-plugin/plugin.json"] --> skills[".codex/skills/*"]
8
+ package["package.json"] --> cli["bin/genesis-harness.js"]
9
+ package --> verify["scripts/verify.sh"]
10
+ package --> evals["scripts/run-evals.sh"]
11
+ cli --> install["install / postinstall"]
12
+ cli --> hooks["setup-hooks"]
13
+ hooks --> docsgate["genesis-harness docs-gate"]
14
+ docsgate --> docsync["check-docs-sync.sh"]
15
+ docsgate --> specsync["check-spec-changelog.sh"]
16
+ skills --> contracts["contracts/"]
17
+ skills --> fixtures["fixtures/"]
18
+ skills --> tests["tests/ + playwright/"]
19
+ skills --> memory[".codebase/"]
20
+ verify --> skills
21
+ verify --> contracts
22
+ verify --> fixtures
23
+ verify --> memory
24
+ evals --> install
25
+ evals --> cli
26
+ evals --> unit["tests/unit/*.test.js"]
27
+ evals --> integration["tests/integration/*.test.js"]
28
+ evals --> pack["npm pack smoke"]
29
+ ```
30
+
31
+ ## Skill Workflow Relationships
32
+
33
+ ```mermaid
34
+ flowchart TD
35
+ harness["genesis-harness"] --> planning["genesis-planning"]
36
+ harness --> research["genesis-research-first"]
37
+ planning --> architecture["genesis-architecture"]
38
+ planning --> api["genesis-api-contract"]
39
+ planning --> design["genesis-design-spec"]
40
+ api --> apisync["genesis-api-sync"]
41
+ design --> ui["genesis-ui-ux-test"]
42
+ api --> specimpact["spec-impact-engine"]
43
+ specimpact --> specprop["genesis-spec-propagation"]
44
+ specprop --> docs["genesis-docs-automation"]
45
+ ui --> verifybefore["genesis-verification-before-completion"]
46
+ apisync --> verifybefore
47
+ docs --> verifybefore
48
+ verifybefore --> release["genesis-release"]
49
+ harness --> memorymap["genesis-codebase-map"]
50
+ harness --> observability["genesis-observability-automation"]
51
+ ```
52
+
53
+ ## Code Dependency Hints
54
+
55
+ ```mermaid
56
+ flowchart TD
57
+ "tests/integration/cli-smoke.test.js" --> "assert"
58
+ "tests/integration/cli-smoke.test.js" --> "fs"
59
+ "tests/integration/cli-smoke.test.js" --> "os"
60
+ "tests/integration/cli-smoke.test.js" --> "path"
61
+ "tests/integration/cli-smoke.test.js" --> "child_process"
62
+ "tests/unit/contract_integrity_gate.test.js" --> "assert"
63
+ "tests/unit/contract_integrity_gate.test.js" --> "fs"
64
+ "tests/unit/contract_integrity_gate.test.js" --> "path"
65
+ "tests/unit/contract_integrity_gate.test.js" --> "child_process"
66
+ "tests/unit/healing_telemetry.test.js" --> "assert"
67
+ "tests/unit/healing_telemetry.test.js" --> "fs"
68
+ "tests/unit/healing_telemetry.test.js" --> "path"
69
+ "tests/unit/healing_telemetry.test.js" --> "child_process"
70
+ "tests/unit/prompt_sentinel.test.js" --> "assert"
71
+ "tests/unit/prompt_sentinel.test.js" --> "fs"
72
+ "tests/unit/prompt_sentinel.test.js" --> "path"
73
+ "tests/unit/prompt_sentinel.test.js" --> "child_process"
74
+ "tests/unit/spec_visual_sync.test.js" --> "assert"
75
+ "tests/unit/spec_visual_sync.test.js" --> "fs"
76
+ "tests/unit/spec_visual_sync.test.js" --> "path"
77
+ "tests/unit/spec_visual_sync.test.js" --> "child_process"
78
+ "tests/unit/test_generator.test.js" --> "assert"
79
+ "tests/unit/test_generator.test.js" --> "fs"
80
+ "tests/unit/test_generator.test.js" --> "path"
81
+ "tests/unit/test_generator.test.js" --> "child_process"
82
+ "bin/genesis-harness.js" --> "fs"
83
+ "bin/genesis-harness.js" --> "path"
84
+ "bin/genesis-harness.js" --> "child_process"
85
+ "bin/genesis-harness.js" --> "@babel/parser"
86
+ "bin/genesis-harness.js" --> "@babel/traverse"
87
+ "bin/genesis-harness.js" --> "child_process"
88
+ ```
89
+
90
+ ## .planning/ROADMAP.md Derived Feature Status
91
+
92
+ ```mermaid
93
+ graph TD
94
+ classDef completed fill:#d4edda,stroke:#28a745,stroke-width:2px;
95
+ classDef inprogress fill:#fff3cd,stroke:#ffc107,stroke-width:2px;
96
+ classDef pending fill:#e2e3e5,stroke:#6c757d,stroke-width:2px;
97
+ subgraph Role_0 ["Role: User"]
98
+ Task0["Roadmap task 0"]
99
+ class Task0 completed;
100
+ Task1["Roadmap task 1"]
101
+ class Task1 inprogress;
102
+ Task2["Roadmap task 2"]
103
+ class Task2 pending;
104
+ end
105
+ subgraph Role_1 ["Role: Admin"]
106
+ Task3["Roadmap task 3"]
107
+ class Task3 completed;
108
+ Task4["Roadmap task 4"]
109
+ class Task4 pending;
110
+ Task5["Roadmap task 5"]
111
+ class Task5 inprogress;
112
+ end
113
+ subgraph Role_2 ["Role: Analytics"]
114
+ Task6["Roadmap task 6"]
115
+ class Task6 pending;
116
+ Task7["Roadmap task 7"]
117
+ class Task7 pending;
118
+ Task8["Roadmap task 8"]
119
+ class Task8 inprogress;
120
+ end
121
+ Task0 --> Task1
122
+ Task0 --> Task2
123
+ Task2 --> Task4
124
+ Task2 --> Task5
125
+ Task4 --> Task6
126
+ ```
127
+
@@ -0,0 +1,16 @@
1
+ [
2
+ {
3
+ "id": "212329",
4
+ "category": "general",
5
+ "fact": "Always use PORT 8080 when running development servers locally.",
6
+ "timestamp": "2026-06-01T07:22:12.428Z",
7
+ "git_commit": "92d8138"
8
+ },
9
+ {
10
+ "id": "25d72a",
11
+ "category": "api",
12
+ "fact": "Verify request.json schema before running visual regression tests.",
13
+ "timestamp": "2026-06-01T07:22:33.273Z",
14
+ "git_commit": "92d8138"
15
+ }
16
+ ]
@@ -0,0 +1,68 @@
1
+ {
2
+ "name": "leanctx-default",
3
+ "token_budget": 12000,
4
+ "_comment_token_budget": "Default conservative budget. Override in project .codebase/context-policy.json. For 128k-context models, set to 40000.",
5
+ "auto_scale": {
6
+ "enabled": false,
7
+ "note": "Set enabled=true and provide model_context_window to auto-calculate budgets. Formula: token_budget = model_context_window * 0.09 (9% for harness context leaves 91% for generation).",
8
+ "model_context_window": null,
9
+ "scale_factor": 0.09
10
+ },
11
+ "warn_at": 0.6,
12
+ "compact_at": 0.7,
13
+ "hard_stop_at": 0.85,
14
+ "layers": [
15
+ {
16
+ "name": "core",
17
+ "max_tokens": 2500,
18
+ "include": [
19
+ "AGENTS.md",
20
+ ".codex/SOUL.md",
21
+ ".codebase/CURRENT_STATE.md",
22
+ ".codebase/MODULE_INDEX.md",
23
+ ".codebase/TEST_MATRIX.md"
24
+ ]
25
+ },
26
+ {
27
+ "name": "active_context",
28
+ "max_tokens": 6500,
29
+ "include": [
30
+ ".codebase/COMPRESSED_CONTEXT.md",
31
+ ".codebase/VISUAL_GRAPH.md",
32
+ ".planning/STATE.md",
33
+ ".planning/ROADMAP.md",
34
+ "contracts/",
35
+ "fixtures/"
36
+ ]
37
+ },
38
+ {
39
+ "name": "deferred_reference",
40
+ "max_tokens": 3000,
41
+ "include": [
42
+ ".codex/skills/*/references/",
43
+ ".codex/skills/*/playbooks/",
44
+ ".codex/skills/*/checklists/",
45
+ "README*.md"
46
+ ]
47
+ }
48
+ ],
49
+ "defer_patterns": [
50
+ ".codex/skills/*/templates/**",
51
+ ".codex/skills/*/examples/**",
52
+ "playwright/**",
53
+ "observability/**",
54
+ "node_modules/**",
55
+ "dist/**",
56
+ "coverage/**"
57
+ ],
58
+ "portable_commands": [
59
+ "genesis-harness leanctx",
60
+ "genesis-harness sync",
61
+ "genesis-harness docs-gate",
62
+ "genesis-harness verify-gate",
63
+ "npm run verify",
64
+ "npm run eval",
65
+ "node scripts/cold-start-check.js"
66
+ ],
67
+ "wrapper_policy": "rtk optional when installed locally; public docs and CI must use portable commands."
68
+ }