vibe-coding-master 0.3.26 → 0.3.28

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 (31) hide show
  1. package/README.md +33 -29
  2. package/dist/backend/api/codex-hook-routes.js +0 -7
  3. package/dist/backend/api/gate-review-routes.js +58 -0
  4. package/dist/backend/api/task-routes.js +2 -2
  5. package/dist/backend/cli/install-vcm-harness.js +15 -57
  6. package/dist/backend/server.js +6 -8
  7. package/dist/backend/services/app-settings-service.js +15 -15
  8. package/dist/backend/services/codex-hook-service.js +8 -50
  9. package/dist/backend/services/{codex-review-service.js → gate-review-service.js} +108 -108
  10. package/dist/backend/services/harness-service.js +15 -63
  11. package/dist/backend/services/session-service.js +257 -41
  12. package/dist/backend/services/task-service.js +2 -2
  13. package/dist/backend/templates/harness/claude-root.js +2 -2
  14. package/dist/backend/templates/harness/{codex-review.js → gate-review.js} +35 -278
  15. package/dist/backend/templates/harness/project-manager-agent.js +7 -7
  16. package/dist/backend/templates/harness/vcm-final-acceptance-skill.js +5 -5
  17. package/dist/shared/constants.js +8 -5
  18. package/dist/shared/types/{codex-review.js → gate-review.js} +1 -1
  19. package/dist-frontend/assets/{index-CKWy15WL.js → index-x9I-bGUt.js} +37 -37
  20. package/dist-frontend/index.html +1 -1
  21. package/docs/codex-translation-plan.md +83 -136
  22. package/docs/full-harness-baseline.md +113 -207
  23. package/docs/gate-review-gates.md +133 -0
  24. package/docs/gateway-design.md +6 -8
  25. package/docs/product-design.md +66 -38
  26. package/docs/v0.2-implementation-plan.md +4 -0
  27. package/docs/vcm-cc-best-practices.md +36 -33
  28. package/package.json +1 -1
  29. package/scripts/verify-package.mjs +4 -4
  30. package/dist/backend/api/codex-review-routes.js +0 -58
  31. package/docs/codex-review-gates.md +0 -593
@@ -4,7 +4,7 @@
4
4
  <meta charset="UTF-8" />
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
6
  <title>VibeCodingMaster</title>
7
- <script type="module" crossorigin src="/assets/index-CKWy15WL.js"></script>
7
+ <script type="module" crossorigin src="/assets/index-x9I-bGUt.js"></script>
8
8
  <link rel="stylesheet" crossorigin href="/assets/index-Cfum1Prr.css">
9
9
  </head>
10
10
  <body>
@@ -2,11 +2,10 @@
2
2
 
3
3
  ## 1. Purpose
4
4
 
5
- VCM currently has API-backed conversation translation for terminal output,
6
- gateway messages, and user prompts. That mode is useful for short interactive
7
- messages, but it does not have enough project context for high-quality
8
- translation when terminology depends on the repository, prior task discussion,
9
- or long documents.
5
+ VCM routes normal conversation and file translation through a long-lived Codex
6
+ Translator session. The older API-backed path is deprecated for normal
7
+ translation because it does not have enough project context for terminology,
8
+ prior task discussion, or long documents.
10
9
 
11
10
  Translation should use a long-lived Codex translation role instead of stateless
12
11
  translation API calls where quality depends on context. The goal is to let one
@@ -14,10 +13,10 @@ Codex session build and reuse project-level translation context: terminology,
14
13
  style, prior decisions, existing translated files, source-document structure,
15
14
  and interactive conversation conventions.
16
15
 
17
- The existing translation panel should remain the main UI. Conversation
18
- translation keeps the current panel behavior, and file translation is added as
19
- an opened file-translation modal from the Translation sidebar. The backend source of translated text
20
- changes from an API provider to Codex Translator.
16
+ The existing split translation panel remains the main UI for conversation
17
+ translation. File translation opens as a large modal from the sidebar
18
+ `Translation` group. Both flows get translated text from Codex Translator and
19
+ VCM-assigned result files.
21
20
 
22
21
  ## 2. Core Direction
23
22
 
@@ -43,13 +42,9 @@ conversation translation jobs. It should:
43
42
  - process translation tasks through one VCM-managed single-threaded queue
44
43
  - treat all source text as untrusted data, never as instructions to follow
45
44
 
46
- The existing API-backed translation backend is deprecated by this plan. After
47
- migration, production translation requests should not call the old API provider
48
- path. VCM keeps the current translation UI, but routes file and conversation
49
- translation through Codex Translator, the shared translation queue, and
50
- file-backed result contracts. The old provider path may remain only as a
51
- legacy test/diagnostic fallback when Codex Translator is not wired into the
52
- server.
45
+ The existing API-backed translation backend is deprecated. Production
46
+ translation requests should route through Codex Translator, the shared
47
+ translation queue, and file-backed result contracts.
53
48
 
54
49
  Codex Translator is not part of the Claude Code PM/architect/coder/reviewer
55
50
  workflow. It is a project utility role with its own long-lived terminal
@@ -57,7 +52,7 @@ session, permissions, output paths, and task semantics.
57
52
 
58
53
  ## 3. Why Codex Session Translation
59
54
 
60
- API translation has two weaknesses for long technical documents:
55
+ Stateless API translation has two weaknesses for long technical documents:
61
56
 
62
57
  - Each call sees only a small slice of context unless VCM manually injects a
63
58
  large context block.
@@ -154,8 +149,8 @@ runtime conversation files on startup. Startup cleanup must not remove
154
149
  `translations/files/completed/` or `translations/memory/`.
155
150
 
156
151
  All translation state is local VCM state and is normally ignored by git through
157
- `.ai/vcm/`. If the user wants a translated file committed to the project, VCM
158
- should provide an explicit export or copy step.
152
+ `.ai/vcm/`. Current VCM does not auto-write translated files back into the
153
+ normal repository tree.
159
154
 
160
155
  Implementation rule: every translation service must resolve
161
156
  `<baseRepoRoot>/.ai/vcm/translations/` from the connected project base root.
@@ -420,19 +415,11 @@ When a Codex hook has captured the real Codex `session_id`, `Resume` may run
420
415
  creates a fresh Codex session id, overwrites this record, and keeps old
421
416
  translation outputs intact.
422
417
 
423
- Session identity is fixed by base repository. If VCM later supports multiple
424
- parallel target-language translator sessions, split this file into a
425
- target-language keyed session directory:
426
-
427
- - one Codex Translator session per `<baseRepoRoot> + targetLanguage`
428
- - different target languages must use different sessions to avoid terminology
429
- and style contamination
430
- - translation profiles do not create separate sessions; they are per-job
431
- options inside the same target-language session
432
- - the persisted session id should be associated with the base repository,
433
- target language, selected model, selected effort, and harness path
418
+ Session identity is fixed by base repository. The selected target language is a
419
+ job parameter, not part of the session key. Translation profiles are also per-job
420
+ options, so they must not create separate Codex Translator sessions.
434
421
 
435
- The role must not use Codex Reviewer prompts or permissions.
422
+ The role must not use Gate Reviewer prompts or permissions.
436
423
 
437
424
  Codex Translator should have durable instructions for both modes:
438
425
 
@@ -459,15 +446,15 @@ Default permissions should be conservative:
459
446
  artifacts
460
447
 
461
448
  Codex Translator should not edit production code, existing docs, role files, or
462
- source documents by default. Exporting a translated file into the project tree
463
- should be a separate explicit user action.
449
+ source documents. Current VCM keeps translated files in translation storage and
450
+ does not auto-export them into the normal repository tree.
464
451
 
465
452
  When VCM runs inside a Dev Container, Docker, Podman, Kubernetes, or Codespaces
466
453
  environment, the container is the sandbox boundary. VCM should auto-detect that
467
- environment and start Codex Translator with Codex's nested sandbox disabled,
468
- matching Codex Reviewer, to avoid Linux container `bwrap` and `apply_patch`
469
- failures caused by double sandboxing. `VCM_SANDBOX=devcontainer` remains an
470
- explicit override for environments that cannot be auto-detected.
454
+ environment and start Codex Translator with Codex's nested sandbox disabled to
455
+ avoid Linux container `bwrap` and `apply_patch` failures caused by double
456
+ sandboxing. `VCM_SANDBOX=devcontainer` remains an explicit override for
457
+ environments that cannot be auto-detected.
471
458
 
472
459
  ## 10. Source Content Safety
473
460
 
@@ -741,9 +728,9 @@ Completion rule:
741
728
 
742
729
  ## 14. Conversation Translation Workflow
743
730
 
744
- Conversation translation reuses the existing translation panel. The panel should
745
- not know whether the translated text came from an API provider or from Codex;
746
- the backend should route translation work to Codex Translator by default.
731
+ Conversation translation reuses the existing split translation panel. The
732
+ backend routes translation work to Codex Translator and returns validated
733
+ result-file content to the panel.
747
734
 
748
735
  Recommended flow:
749
736
 
@@ -966,72 +953,39 @@ Cancellation and interruption behavior:
966
953
 
967
954
  ## 17. UI Shape
968
955
 
969
- File translation should live inside the existing translation panel, not as a
970
- separate sidebar group or task role gate.
971
-
972
- Recommended UI:
973
-
974
- - Add a file-translation button to the translation panel toolbar.
975
- - Clicking the button expands a file translation view inside the panel.
976
- - On first use, if translation memory is missing or empty, show a bootstrap
977
- recommendation before starting normal translation.
978
- - The expanded view uses a two-pane layout:
979
- - left pane: translated file list, grouped or sorted by recent translation
980
- jobs
981
- - right pane: selected translated file content preview
982
- - The view has a `Translate` action. Clicking it opens a file picker or path
983
- selector and creates a file translation job for the chosen file.
984
- - Selecting a completed item in the left pane loads the completed translated
985
- Markdown output in the right pane. Runtime reports are only retained while a
986
- job is queued, running, failed, or interrupted.
987
- - Existing translated files come from
988
- `<baseRepoRoot>/.ai/vcm/translations/files/index.json`; active and queued
989
- jobs are derived from `runtime/queue.json` and their runtime `request.json`
990
- files.
991
- - The merged list should show at most one row for each
992
- `sourcePath + targetLanguage + translationProfile`; runtime rows win over
993
- completed rows while a retranslation is in progress.
994
-
995
- Controls in the file translation view:
996
-
997
- - `Bootstrap` when memory has not been initialized or the user wants to refresh
998
- project memory
999
- - source file picker or path input opened from `Translate`
1000
- - target language
1001
- - translation profile
1002
- - model
1003
- - effort
1004
- - `Resume`
1005
- - `Promote`
1006
-
1007
- Promote behavior:
1008
-
1009
- - Translated files are local VCM state by default and remain under
1010
- `.ai/vcm/translations/files/completed/`.
1011
- - `Promote` is an explicit user action that copies or exports the selected
1012
- `output.md` into the normal repository tree.
1013
- - Promote must never overwrite the source file by default.
1014
- - If the target path already exists, VCM must ask for confirmation or require a
1015
- new target path.
1016
- - Promotion should record source job id, source hash, target path, and
1017
- timestamp in index metadata if durable audit metadata is needed. It must not
1018
- recreate cleaned runtime report files.
1019
-
1020
- Status shown for the selected file:
1021
-
1022
- - current Codex Translator session
1023
- - active or last job status
1024
- - completed sections
1025
- - output path
1026
- - report path
1027
- - queue position when waiting
1028
-
1029
- When a file translation job exists, the workspace should expose a `Codex
1030
- Translator` embedded terminal role so the user can discuss terminology, challenge
1031
- translation choices, or ask for focused revisions after the automated pass.
1032
- Follow-up discussion may result in updates to `glossary.md`, `style-guide.md`,
1033
- `project-context.md`, or `decisions.md`; those updates remain normal editable
1034
- project-local files under the translation memory directory.
956
+ Translation controls live in the sidebar `Translation` group:
957
+
958
+ - `Conversation translation`
959
+ - `Auto-send`
960
+ - `Language`
961
+ - `Reply scope`
962
+ - `File translation`
963
+ - `Bootstrap`
964
+ - `Update memory`
965
+ - `Session status`
966
+ - `Open Session`
967
+
968
+ File translation opens as a large modal from the sidebar. The modal has:
969
+
970
+ - `Translate`: opens the file browser and creates a file translation job
971
+ - `Refresh`: reloads translation state
972
+ - `Close`: closes the modal
973
+ - left pane: translated file list from
974
+ `<baseRepoRoot>/.ai/vcm/translations/files/index.json`
975
+ - right pane: selected completed output, or runtime report/output while a job is
976
+ still visible
977
+
978
+ The file list should show at most one row for each
979
+ `sourcePath + targetLanguage + translationProfile`. Completed rows are updated
980
+ only after a replacement translation validates successfully.
981
+
982
+ The task role tab bar must not show Codex Translator. `Open Session` opens the
983
+ project-scoped Codex Translator terminal modal when the user needs to inspect
984
+ status, change model/effort, restart the translator session, discuss
985
+ terminology, challenge translation choices, or ask for focused memory updates.
986
+ Follow-up discussion may update `glossary.md`, `style-guide.md`,
987
+ `project-context.md`, or `decisions.md`; those updates remain project-local
988
+ translation memory files.
1035
989
 
1036
990
  For conversation translation, keep the existing split translation panel. The
1037
991
  visible behavior should remain:
@@ -1067,7 +1021,6 @@ New backend pieces:
1067
1021
  - resolve base repo root and reject task-worktree output paths
1068
1022
  - load/update index
1069
1023
  - validate file and conversation result files
1070
- - record promote metadata when users export translations into the repo tree
1071
1024
  - translation queue service
1072
1025
  - enqueue bootstrap, file, conversation, retry, and retranslation tasks
1073
1026
  - persist `runtime/queue.json`
@@ -1094,10 +1047,9 @@ New backend pieces:
1094
1047
  - read result/report
1095
1048
  - retry/force retranslate
1096
1049
  - cancel/skip/manual resolve queue items
1097
- - promote completed translations into explicit user-selected repo paths
1098
1050
  - get conversation translation request status when needed for debugging
1099
1051
  - translator hook service
1100
- - same running/idle tracking pattern as Codex Reviewer
1052
+ - project-scoped running/idle tracking for the Codex Translator session
1101
1053
  - update the active queue item on `UserPromptSubmit` and `Stop`
1102
1054
  - persist `session_id`, `turn_id`, `transcript_path`, and
1103
1055
  `last_assistant_message` diagnostics
@@ -1108,9 +1060,9 @@ POST /api/hooks/codex-translator
1108
1060
  POST /api/hooks/codex-translator/stop
1109
1061
  ```
1110
1062
 
1111
- The existing Codex Reviewer services should not be overloaded with translation
1112
- logic. Shared utility code is fine, but role state, directories, prompts, and
1113
- permissions should remain separate.
1063
+ Gate Reviewer services should not be overloaded with translation logic. Shared
1064
+ utility code is fine, but role state, directories, prompts, and permissions
1065
+ should remain separate.
1114
1066
 
1115
1067
  ## 19. Relationship To Existing Translation
1116
1068
 
@@ -1129,9 +1081,8 @@ Deprecated API translation behavior:
1129
1081
 
1130
1082
  - no normal translation request should call the old API translation provider
1131
1083
  - no hidden API translation path should run after Codex Translator failures
1132
- - retry / skip / cancel / manual resolve UI may exist, but it must not perform
1133
- hidden API translation
1134
- - old API settings should be removed or marked legacy during migration
1084
+ - retry and retranslation must stay on the Codex queue
1085
+ - old API settings should not be exposed in the current translation UI
1135
1086
  - tests should verify that conversation translation uses the Codex queue and
1136
1087
  result files instead of the old API provider
1137
1088
 
@@ -1187,8 +1138,8 @@ durable under `translations/files/completed/`.
1187
1138
  ### Phase 3: Codex Session Integration
1188
1139
 
1189
1140
  - Add project-scoped `codex-translator` session support.
1190
- - Keep session identity by `<baseRepoRoot> + targetLanguage`; do not split
1191
- sessions by task, worktree, source role, or translation profile.
1141
+ - Keep session identity by `<baseRepoRoot>`; do not split sessions by task,
1142
+ worktree, source role, target language, or translation profile.
1192
1143
  - Persist the translator session record at `.ai/vcm/translations/session.json`
1193
1144
  so VCM can resume it after reconnecting to the project.
1194
1145
  - Reuse Codex embedded terminal startup with model/effort selectors in the
@@ -1196,17 +1147,18 @@ durable under `translations/files/completed/`.
1196
1147
  - Add hook endpoints and running/idle tracking.
1197
1148
  - Send translation job prompts into the long-lived Codex session.
1198
1149
  - Ensure hook completion advances only the active queue item.
1199
- - Replace and deprecate the existing API-backed conversation translation backend
1200
- with Codex Translator routing.
1150
+ - Route conversation translation through Codex Translator.
1201
1151
  - Capture conversation translation output by reading the VCM-assigned temporary
1202
1152
  result file after the `Stop` hook.
1203
1153
  - Persist `transcript_path` for debugging and recovery parsing.
1204
1154
 
1205
1155
  ### Phase 4: UI
1206
1156
 
1207
- - Add a file-translation button to the existing translation panel.
1208
- - Add the file translation modal.
1209
- - Add first-use bootstrap recommendation and bootstrap controls.
1157
+ - Add Translation sidebar controls for conversation translation, auto-send,
1158
+ language, reply scope, file translation, bootstrap, memory update, session
1159
+ status, and `Open Session`.
1160
+ - Add the file translation modal opened from the sidebar.
1161
+ - Add first-use bootstrap recommendation and sidebar bootstrap controls.
1210
1162
  - Add the translated-file left pane backed by completed entries from
1211
1163
  `files/index.json` plus active runtime file jobs from the queue.
1212
1164
  - Add the translated-content right pane backed by completed output files.
@@ -1219,11 +1171,10 @@ durable under `translations/files/completed/`.
1219
1171
  in the opened translator session modal.
1220
1172
  - Replace older completed file translations after a new translation for the
1221
1173
  same file/language/profile completes successfully.
1222
- - Add cancel, skip, manual resolve, and promote actions.
1223
1174
  - Reuse the existing role-console translation panel for conversation
1224
1175
  translation results.
1225
- - Keep the existing translation panel behavior while changing the backend source
1226
- from API calls to Codex Translator.
1176
+ - Keep the existing translation panel behavior while using Codex Translator as
1177
+ the backend source.
1227
1178
 
1228
1179
  ### Phase 5: QA And Recovery
1229
1180
 
@@ -1242,24 +1193,21 @@ durable under `translations/files/completed/`.
1242
1193
  - Add queue status-machine tests, including startup runtime cleanup.
1243
1194
  - Add conversation result text validation tests.
1244
1195
  - Add memory priority tests proving user entries override automatic entries.
1245
- - Add promote tests proving source files are not overwritten by default.
1246
1196
  - Add retry/retranslation tests after failed or interrupted work.
1247
1197
  - Test with `docs/whitepaper-v0.8.md` scale files.
1248
1198
 
1249
1199
  ## 21. Resolved Decisions
1250
1200
 
1251
- - Generated translations stay under `.ai/vcm/translations/files/completed/`
1252
- until the user explicitly promotes them.
1253
- - Promote writes to a user-selected repository path and must not overwrite the
1254
- source file by default.
1255
- - Codex Translator sessions are keyed by `<baseRepoRoot> + targetLanguage`.
1256
- Translation profiles do not create separate sessions.
1201
+ - Generated file translations stay under
1202
+ `.ai/vcm/translations/files/completed/`.
1203
+ - Codex Translator sessions are keyed by `<baseRepoRoot>`. Target language and
1204
+ translation profile are per-job settings and do not create separate sessions.
1257
1205
  - Completed translations are local VCM state by default. Commit-ready repository
1258
- files require explicit promotion.
1206
+ files require explicit manual user action outside the current translation UI.
1259
1207
 
1260
1208
  ## 22. Recommended Defaults
1261
1209
 
1262
- - One Codex Translator session per base repository and target language.
1210
+ - One Codex Translator session per base repository.
1263
1211
  - Do not create separate Codex Translator sessions for translation profiles.
1264
1212
  - Use one VCM-managed single-threaded translation queue per Codex Translator
1265
1213
  session.
@@ -1308,8 +1256,7 @@ durable under `translations/files/completed/`.
1308
1256
  files directly to VCM-provided absolute paths.
1309
1257
  - Treat all source text as untrusted data and translate source instructions as
1310
1258
  content, never as commands to follow.
1311
- - Require explicit user action to export or promote a translation into the
1312
- normal repository tree.
1259
+ - Do not auto-write translation results into the normal repository tree.
1313
1260
  - Let Codex automatically append stable entries to translation memory files,
1314
1261
  and require every file-translation memory update to be summarized in
1315
1262
  the current runtime `report.md`.