vibe-coding-master 0.3.22 → 0.3.24

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 (35) hide show
  1. package/README.md +2 -2
  2. package/dist/backend/adapters/git-adapter.js +53 -0
  3. package/dist/backend/api/artifact-routes.js +1 -28
  4. package/dist/backend/api/codex-translation-routes.js +24 -0
  5. package/dist/backend/api/harness-routes.js +10 -0
  6. package/dist/backend/api/task-routes.js +2 -6
  7. package/dist/backend/gateway/gateway-service.js +3 -16
  8. package/dist/backend/server.js +5 -2
  9. package/dist/backend/services/artifact-service.js +1 -30
  10. package/dist/backend/services/codex-hook-service.js +30 -9
  11. package/dist/backend/services/codex-translation-service.js +17 -40
  12. package/dist/backend/services/harness-service.js +106 -0
  13. package/dist/backend/services/session-service.js +189 -15
  14. package/dist/backend/services/status-service.js +1 -6
  15. package/dist/backend/services/task-service.js +42 -110
  16. package/dist/backend/services/translation-service.js +15 -4
  17. package/dist/backend/templates/handoff.js +3 -3
  18. package/dist/backend/templates/harness/architect-agent.js +3 -2
  19. package/dist/backend/templates/harness/coder-agent.js +6 -1
  20. package/dist/backend/templates/harness/project-manager-agent.js +10 -1
  21. package/dist/backend/templates/harness/vcm-route-message-skill.js +8 -2
  22. package/dist/shared/types/app-settings.js +3 -2
  23. package/dist-frontend/assets/index-CKWy15WL.js +94 -0
  24. package/dist-frontend/assets/index-Cfum1Prr.css +32 -0
  25. package/dist-frontend/index.html +2 -2
  26. package/docs/cc-best-practices.md +1 -1
  27. package/docs/codex-translation-plan.md +41 -37
  28. package/docs/full-harness-baseline.md +0 -1
  29. package/docs/gateway-design.md +9 -13
  30. package/docs/product-design.md +23 -44
  31. package/docs/v0.4-custom-workflow-plan.md +785 -0
  32. package/docs/vcm-cc-best-practices.md +15 -13
  33. package/package.json +1 -1
  34. package/dist-frontend/assets/index-CEB6Bssn.js +0 -95
  35. package/dist-frontend/assets/index-Dmefx9m7.css +0 -32
@@ -157,6 +157,8 @@ export function createTranslationService(deps) {
157
157
  }
158
158
  function startTranscriptTail(roleSession) {
159
159
  const state = getState(roleSession.id);
160
+ state.taskSlug = roleSession.taskSlug;
161
+ state.role = roleSession.role;
160
162
  if (state.unsubscribeTranscript) {
161
163
  return;
162
164
  }
@@ -183,7 +185,7 @@ export function createTranslationService(deps) {
183
185
  const config = await loadConfig();
184
186
  let displayed = false;
185
187
  if (event.kind === "text") {
186
- const shouldTranslate = config.outputMode === "all" || event.stopReason === "end_turn";
188
+ const shouldTranslate = shouldTranslateTextTranscriptEvent(state, event, config);
187
189
  displayed = shouldTranslate
188
190
  ? processClaudeOutputText(sessionId, event.text, config, event.id, {
189
191
  flushImmediately: event.stopReason === "end_turn"
@@ -206,6 +208,18 @@ export function createTranslationService(deps) {
206
208
  state.seenTranscriptIds.add(event.id);
207
209
  }
208
210
  }
211
+ function shouldTranslateTextTranscriptEvent(state, event, config) {
212
+ if (config.outputMode === "all") {
213
+ return true;
214
+ }
215
+ if (event.stopReason !== "end_turn") {
216
+ return false;
217
+ }
218
+ if (config.outputMode === "pm-final-only") {
219
+ return state.role === "project-manager";
220
+ }
221
+ return true;
222
+ }
209
223
  function processClaudeOutputText(sessionId, rawText, config, entryId, options = {}) {
210
224
  return startClaudeOutputTranslation(sessionId, rawText, config, {
211
225
  entryId,
@@ -890,8 +904,6 @@ export function createTranslationService(deps) {
890
904
  });
891
905
  }
892
906
  return deps.codexTranslationService.createConversationJob(input.repoRoot, {
893
- taskSlug: input.taskSlug,
894
- role: input.role,
895
907
  direction: input.direction,
896
908
  sourceText: input.text,
897
909
  sourceLanguage: input.sourceLanguage,
@@ -921,7 +933,6 @@ export function createTranslationService(deps) {
921
933
  }
922
934
  try {
923
935
  return await deps.codexTranslationService.validateConversationResult(repoRoot, {
924
- taskSlug: job.taskSlug,
925
936
  resultPath: job.resultPath,
926
937
  sourceHash: job.sourceHash,
927
938
  targetLanguage: job.targetLanguage
@@ -15,9 +15,9 @@ Task-specific context and coder guidance go here, not in source-code comments.
15
15
  Source-code comments should only describe durable behavior, contracts, invariants,
16
16
  error boundaries, or non-obvious logic that should remain useful after this task.
17
17
 
18
- | File | Action | Task Context | Durable Code Comment Needed | Coder Work | Allowed Freedom | VCM:CODE | Proof Point | Replan Trigger |
19
- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
20
- | TBD | TBD | TBD | TBD | TBD | TBD | TBD | TBD | TBD |
18
+ | ID | File | Action | Task Context | Durable Code Comment Needed | Coder Work | Allowed Freedom | VCM:CODE | Proof Point | Replan Trigger |
19
+ | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
20
+ | SCF-001 | TBD | TBD | TBD | TBD | TBD | TBD | TBD | TBD | TBD |
21
21
 
22
22
  ## Implementation Plan
23
23
 
@@ -27,7 +27,8 @@ export function renderArchitectHarnessRules() {
27
27
 
28
28
  - Define the expected implementation scope: affected modules, changed or created files, each file's responsibility, why it is in scope, and user-visible behavior changes.
29
29
  - Define every non-private callable surface intended for use outside its file: visibility, signature shape, responsibility, expected callers, behavior contract, side effects, and error boundaries.
30
- - Include a \`Scaffold Manifest\` for task-specific file context: file action, why the file is in scope, coder work, allowed implementation freedom, expected \`VCM:CODE\` placeholders, durable code comment needs, proof points, and Replan triggers.
30
+ - Include a \`Scaffold Manifest\` for task-specific file context: stable row ID, file action, why the file is in scope, coder work, allowed implementation freedom, expected \`VCM:CODE\` placeholders, durable code comment needs, proof points, and Replan triggers.
31
+ - Give each Scaffold Manifest row a stable ID such as \`SCF-001\`; use that ID in any related \`VCM:CODE\` marker so coder can report completion by ID.
31
32
  - Put task context, phase notes, handoff instructions, temporary rationale, and coder guidance in the \`Scaffold Manifest\`, not in source-code comments.
32
33
  - Cover architecture docs impact, known risks, and Replan triggers.
33
34
  - For docs impact, state whether changes belong in \`docs/ARCHITECTURE.md\`, affected \`<module>/ARCHITECTURE.md\`, \`.ai/generated/public-surface.json\`, or no durable architecture doc.
@@ -41,7 +42,7 @@ export function renderArchitectHarnessRules() {
41
42
  - Define every new or changed non-private callable surface directly in code with its signature shape and contract comment.
42
43
  - When changing an existing non-private callable surface, update its signature and contract comment in code before coder work starts; leave \`VCM:CODE\` only where implementation must change.
43
44
  - Non-private callable surface includes any function, method, type, trait, enum, constant, re-export, or similar symbol that another file can call or depend on.
44
- - Mark incomplete implementation bodies with \`VCM:CODE\`; coder must implement them and remove the markers before handoff.
45
+ - Mark incomplete implementation bodies with \`VCM:CODE <Scaffold Manifest ID>\`; coder must implement them and remove the markers before handoff.
45
46
  - Architect scaffolding may include modules, files, signatures, type shapes, durable comments, and placeholder bodies, but not real business implementation beyond minimal scaffold code.
46
47
  - Coder may add private implementation helpers, but must not add or change cross-file callable surface without architect replan.
47
48
 
@@ -10,7 +10,7 @@ export function renderCoderHarnessRules() {
10
10
  ### Coder Implementation Discipline
11
11
 
12
12
  - Implement the architect-defined scaffold exactly; do not change file responsibilities, callable-surface signatures, or architect-defined contract intent unless the architecture plan explicitly allows it.
13
- - Implement every \`VCM:CODE\` placeholder and remove all \`VCM:CODE\` markers before handoff.
13
+ - Implement every \`VCM:CODE\` placeholder, track completion by Scaffold Manifest ID when present, and remove all \`VCM:CODE\` markers before handoff.
14
14
  - Do not fake completion: no hardcoded success, disabled logic, swallowed errors, test-only shortcuts, or silent fallback that hides failure.
15
15
  - Keep the diff inside approved scope: no unrelated rewrites, drive-by refactors, renamed symbols, moved files, or formatting churn.
16
16
  - Preserve existing behavior unless the architecture plan explicitly changes it; keep existing call sites and shared code paths working.
@@ -40,6 +40,11 @@ export function renderCoderHarnessRules() {
40
40
  - Do not weaken, delete, or skip tests to make validation pass.
41
41
  - Record confirmed out-of-scope issues found during implementation in \`.ai/vcm/handoffs/known-issues.md\`.
42
42
 
43
+ ### Handoff
44
+
45
+ - In the route message back to project-manager, include a \`Scaffold Completion\` section when the architecture plan contains a Scaffold Manifest.
46
+ - The \`Scaffold Completion\` section must report completed Scaffold Manifest IDs or \`VCM:CODE\` IDs, remaining markers if any, private helpers added, manifest deviations, and whether Replan is needed.
47
+
43
48
  ### Generated Context
44
49
 
45
50
  - Regenerate \`.ai/generated/module-index.json\` with \`.ai/tools/generate-module-index\` after module, manifest, source-file, or test-file changes.
@@ -35,10 +35,19 @@ export function renderProjectManagerHarnessRules() {
35
35
  ### Dispatch
36
36
 
37
37
  - Use the \`vcm-route-message\` skill for every role dispatch, question, result, blocker, or finding.
38
- - Route messages contain PM-owned routing context only: target role, user request summary, known user constraints, source of truth, required next gate, skipped gates when applicable, required handoff inputs, expected artifact, stop conditions, and confirmed worktree information.
38
+ - Formal route messages contain PM-owned routing context only: target role, user request summary, known user constraints, source of truth, required next gate, skipped gates when applicable, required handoff inputs, expected artifact, stop conditions, and confirmed worktree information.
39
39
  - Do not write technical design into route messages; ask architect to determine architecture, file scope, public contracts, behavior/contract proof points, docs impact, and Replan triggers.
40
40
  - For coder or reviewer messages, reference existing handoff artifacts instead of making new technical judgments.
41
41
 
42
+ ### Simple User Relay
43
+
44
+ When forwarding a user's answer, clarification, or small preference update to an active role, use a lightweight relay message.
45
+
46
+ PM may lightly rewrite the user's words to:
47
+ - clarify pronouns or references from the current context
48
+ - translate the user's intent into clear role-facing language
49
+ - state whether this is confirmation, rejection, preference, or a small constraint
50
+
42
51
  ### Phased Tasks
43
52
 
44
53
  - When architect provides a phased plan, dispatch only one phase at a time.
@@ -33,6 +33,12 @@ If the same route file already contains a not-yet-delivered message, update that
33
33
 
34
34
  ## Message Format
35
35
 
36
+ Use the smallest body that is complete. Include artifact refs instead of copying long documents.
37
+
38
+ For simple user relay, use a lightweight body instead of the formal dispatch format.
39
+
40
+ For formal dispatch, blocker, finding, review, or gate routing, use:
41
+
36
42
  \`\`\`md
37
43
  ---
38
44
  type: task
@@ -54,9 +60,9 @@ Expected next action:
54
60
  ...
55
61
  \`\`\`
56
62
 
57
- Use the smallest body that is complete. Include artifact refs instead of copying long documents.
63
+ ## Formal Body Content
58
64
 
59
- ## Required Body Content
65
+ Formal messages should include:
60
66
 
61
67
  - why this message exists
62
68
  - what the target role should do or what result is being reported
@@ -12,8 +12,9 @@ export const TRANSLATION_TARGET_LANGUAGE_OPTIONS = [
12
12
  { value: "es", label: "Spanish" }
13
13
  ];
14
14
  export const TRANSLATION_OUTPUT_MODE_OPTIONS = [
15
- { value: "final-only", label: "Final summary" },
16
- { value: "all", label: "All output" }
15
+ { value: "pm-final-only", label: "PM final reply" },
16
+ { value: "final-only", label: "Each role final reply" },
17
+ { value: "all", label: "All replies" }
17
18
  ];
18
19
  export function createDefaultLaunchTemplate() {
19
20
  const roles = {};