vibe-coding-master 0.3.1 → 0.3.3

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.
@@ -21,24 +21,28 @@ export function renderArchitectHarnessRules() {
21
21
 
22
22
  ### Architecture Plan
23
23
 
24
- - Before coder work starts, write \`.ai/vcm/handoffs/architecture-plan.md\` and materialize the plan in code scaffolding.
24
+ - Before coder work starts, write \`.ai/vcm/handoffs/architecture-plan.md\`, choose the minimum necessary code scaffolding, and include a Scaffold Manifest for task-specific context and coder guidance.
25
25
 
26
26
  #### Plan Document
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.
31
+ - Put task context, phase notes, handoff instructions, temporary rationale, and coder guidance in the \`Scaffold Manifest\`, not in source-code comments.
30
32
  - Cover architecture docs impact, known risks, and Replan triggers.
31
33
  - 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.
32
34
 
33
35
  #### Code Scaffolding
34
36
 
35
- - Create or update module/file scaffolding so file responsibilities, logic boundaries, collaborators, and non-goals are documented in code.
36
- - When changing an existing file, update only the affected in-code scaffold: responsibility, boundary, collaborators, non-goals, or callable surfaces; do not rewrite unrelated file comments.
37
+ - Create or update only the minimum module/file scaffolding needed to make boundaries, callable surfaces, and placeholders unambiguous.
38
+ - Source-code comments must describe durable behavior, contracts, invariants, error boundaries, or non-obvious logic that should remain useful after the task is complete.
39
+ - Do not put task-specific context, phase notes, handoff instructions, temporary plan rationale, or coder guidance in source-code comments.
40
+ - When changing an existing file, update only affected durable comments or callable surfaces; do not rewrite unrelated file comments.
37
41
  - Define every new or changed non-private callable surface directly in code with its signature shape and contract comment.
38
42
  - 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.
39
43
  - 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.
40
44
  - Mark incomplete implementation bodies with \`VCM:CODE\`; coder must implement them and remove the markers before handoff.
41
- - Architect scaffolding may include modules, files, signatures, type shapes, comments, and placeholder bodies, but not real business implementation beyond minimal scaffold code.
45
+ - Architect scaffolding may include modules, files, signatures, type shapes, durable comments, and placeholder bodies, but not real business implementation beyond minimal scaffold code.
42
46
  - Coder may add private implementation helpers, but must not add or change cross-file callable surface without architect replan.
43
47
 
44
48
  ### Phase Planning
@@ -27,7 +27,7 @@ export function renderRootClaudeHarnessRules() {
27
27
  ## VCM Task Flow
28
28
 
29
29
  - Code changes use the full route: \`project-manager -> architect -> coder -> reviewer -> architect docs sync -> project-manager final acceptance\`.
30
- - Before code changes, architect must write an architecture plan and code scaffolding that cover file responsibilities, cross-file callable surfaces, user-visible behavior, docs impact, risks, and Replan triggers.
30
+ - Before code changes, architect must write an architecture plan with a Scaffold Manifest and minimum necessary code scaffolding that cover file responsibilities, cross-file callable surfaces, user-visible behavior, docs impact, risks, and Replan triggers.
31
31
  - Docs-only changes may use: \`project-manager -> architect -> project-manager final acceptance\`.
32
32
  - Test-only or validation-only work may use: \`project-manager -> reviewer -> project-manager final acceptance\`.
33
33
  - If a docs/test/validation-only task reveals required code, architecture, public contract, dependency, durable-doc, or test-strategy changes, route back through the full code-change flow.
@@ -14,7 +14,7 @@ export function renderCoderHarnessRules() {
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.
17
- - Maintain code documentation: preserve architect-written comments, add comments for non-obvious implementation logic, remove stale/debug/TODO comments, and keep code and comments consistent.
17
+ - Maintain code documentation: preserve durable architect-written contract comments, do not copy Scaffold Manifest task context into source comments, add comments only for non-obvious durable logic, remove stale/debug/TODO/task-process comments, and keep code and comments consistent.
18
18
 
19
19
  ### General Coding Standards
20
20
 
@@ -31,10 +31,12 @@ Check that the plan:
31
31
  - matches the user request and approved scope
32
32
  - names affected modules/files, file responsibilities, and user-visible changes
33
33
  - defines new or changed non-private callable surfaces: visibility, signature shape, callers, contract, side effects, and error boundaries
34
+ - includes a Scaffold Manifest that carries task-specific context, coder guidance, allowed freedom, expected \`VCM:CODE\`, durable code comment needs, proof points, and Replan triggers
34
35
  - preserves dependency direction and avoids unapproved dependencies
35
36
  - states docs/generated-context impact or explains why none is needed
36
37
  - names risks, proof points, phase boundaries when needed, and Replan triggers
37
38
  - uses \`VCM:CODE\` for incomplete implementation and leaves no coder ambiguity
39
+ - keeps task-specific context, phase notes, handoff instructions, and coder guidance out of source-code comments
38
40
  - does not take over reviewer-owned validation strategy or test adequacy
39
41
 
40
42
  ### Validation Adequacy
@@ -56,6 +58,7 @@ Check that the final diff:
56
58
  - stays inside the approved plan, phase, and user constraints
57
59
  - introduces no unapproved modules, dependencies, public contracts, cross-file callable surfaces, or durable-doc changes
58
60
  - removes all \`VCM:CODE\` markers
61
+ - leaves no task-specific process comments in source or test code, such as role handoff notes, phase notes, current-task rationale, or coder instructions
59
62
  - contains no fake completion: hardcoded success, disabled logic, swallowed errors, test-only shortcuts, or silent fallback hiding failure
60
63
  - preserves existing behavior unless the plan changes it
61
64
  - keeps changed functions focused and meaningfully named
@@ -90,15 +93,11 @@ Summary: <one or two sentences>
90
93
  - Do not request broader filesystem or network permissions.`;
91
94
  }
92
95
  export function renderCodexConfigHarnessRules() {
93
- return `model = "gpt-5.5"
94
- model_reasoning_effort = "xhigh"
96
+ return `# VCM reads this file before launching the Codex Reviewer terminal.
97
+ # Codex CLI project hooks live in .ai/codex/.codex/.
95
98
  approval_policy = "never"
96
99
  default_permissions = "vcm_codex_reviewer"
97
100
 
98
- [vcm.codex_review]
99
- enabled = false
100
- required_gates = []
101
-
102
101
  [permissions.vcm_codex_reviewer.workspace_roots]
103
102
  "../.." = true
104
103
 
@@ -112,7 +111,7 @@ required_gates = []
112
111
  "**/*.env" = "deny"
113
112
 
114
113
  [permissions.vcm_codex_reviewer.network]
115
- enabled = false`;
114
+ enabled = true`;
116
115
  }
117
116
  export function renderCodexCliConfigHarnessRules() {
118
117
  return `[features]
@@ -161,6 +160,7 @@ Review whether the architecture plan is ready for coder implementation.
161
160
  - \`../../.claude/agents/coder.md\`
162
161
  - \`../../.claude/agents/reviewer.md\`
163
162
  - \`../../.ai/vcm/handoffs/architecture-plan.md\`
163
+ - current git status and scaffold diff from \`../..\`
164
164
  - \`../../.ai/generated/module-index.json\`
165
165
  - \`../../.ai/generated/public-surface.json\`
166
166
 
@@ -362,11 +362,6 @@ import uuid
362
362
  from datetime import datetime, timezone
363
363
  from pathlib import Path
364
364
 
365
- try:
366
- import tomllib
367
- except ModuleNotFoundError:
368
- tomllib = None
369
-
370
365
 
371
366
  GATES = ("architecture-plan", "validation-adequacy", "final-diff")
372
367
  REPORTS = {
@@ -464,20 +459,6 @@ def write_json(path: Path, data: dict) -> None:
464
459
  tmp.replace(path)
465
460
 
466
461
 
467
- def load_config(root: Path) -> dict:
468
- path = root / ".ai/codex/config.toml"
469
- if not path.is_file() or tomllib is None:
470
- return {}
471
- return tomllib.loads(path.read_text())
472
-
473
-
474
- def codex_review_config(root: Path) -> dict:
475
- config = load_config(root)
476
- vcm = config.get("vcm", {})
477
- review = vcm.get("codex_review", {}) if isinstance(vcm, dict) else {}
478
- return review if isinstance(review, dict) else {}
479
-
480
-
481
462
  def command_output(root: Path, command: list[str]) -> bytes:
482
463
  result = subprocess.run(
483
464
  command,
@@ -518,11 +499,11 @@ def request_id(gate: str) -> str:
518
499
 
519
500
  def local_request(gate: str) -> int:
520
501
  root = root_dir()
521
- review_config = codex_review_config(root)
522
- enabled = bool(review_config.get("enabled", False))
523
- required = set(review_config.get("required_gates", []))
524
502
  index_path = root / ".ai/vcm/codex-reviews/index.json"
525
503
  index = read_json(index_path)
504
+ enabled = bool(index.get("enabled", False))
505
+ gate_record = index.get("gates", {}).get(gate, {}) if isinstance(index.get("gates"), dict) else {}
506
+ required = bool(gate_record.get("required", False)) if isinstance(gate_record, dict) else False
526
507
  index.update({"version": 1, "enabled": enabled})
527
508
  index.setdefault("gates", {})
528
509
 
@@ -532,7 +513,7 @@ def local_request(gate: str) -> int:
532
513
  print_result("disabled", gate=gate)
533
514
  return 0
534
515
 
535
- if gate not in required:
516
+ if not required:
536
517
  gate_record = index["gates"].setdefault(gate, {})
537
518
  gate_record.update({"required": False, "status": "not_required", "updatedAt": now_iso()})
538
519
  write_json(index_path, index)
@@ -23,6 +23,7 @@ export function renderReviewerHarnessRules() {
23
23
  - Record failed commands, observed behavior, expected behavior, reproduction steps, skipped checks, and coverage gaps.
24
24
  - If validation fails or expected behavior is unclear, report the evidence to project-manager; architect owns diagnosis and next-step routing.
25
25
  - Add or modify tests, fixtures, or test helpers needed for validation confidence.
26
+ - If task-specific process comments appear in changed code while reviewing behavior, report them as a maintainability gap; task context belongs in handoff artifacts, not durable code comments.
26
27
  - Update \`docs/TESTING.md\` when validation strategy, commands, level mapping, integration/E2E case definitions, selection rules, final-validation cleanup, test gaps, or test expectations change.
27
28
 
28
29
  ### Testing Documentation
@@ -47,7 +47,7 @@ export const CODEX_MODEL_OPTIONS = [
47
47
  description: "Codex account default"
48
48
  }
49
49
  ];
50
- export const SESSION_EFFORT_OPTIONS = [
50
+ export const CODEX_EFFORT_OPTIONS = [
51
51
  {
52
52
  value: "default",
53
53
  label: "Default",
@@ -79,3 +79,12 @@ export const SESSION_EFFORT_OPTIONS = [
79
79
  description: "Maximum reasoning"
80
80
  }
81
81
  ];
82
+ export const CLAUDE_EFFORT_OPTIONS = [
83
+ ...CODEX_EFFORT_OPTIONS,
84
+ {
85
+ value: "ultracode",
86
+ label: "Ultracode",
87
+ description: "Claude Code dynamic workflows with xhigh reasoning"
88
+ }
89
+ ];
90
+ export const SESSION_EFFORT_OPTIONS = CLAUDE_EFFORT_OPTIONS;
@@ -2,6 +2,7 @@ const REQUIRED_HEADINGS = {
2
2
  "architecture-plan": [
3
3
  "Context",
4
4
  "Architecture Decision",
5
+ "Scaffold Manifest",
5
6
  "Implementation Plan",
6
7
  "Risks",
7
8
  "Stop Conditions"