vibe-coding-master 0.7.41 → 0.7.42

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.
@@ -64,7 +64,8 @@ const VCM_HOOK_DEFINITIONS = [
64
64
  ];
65
65
  const AGENT_FRONTMATTER = {
66
66
  "project-manager": {
67
- description: "User-facing VCM orchestration role for task clarification, role routing, handoffs, acceptance, and PR preparation."
67
+ description: "User-facing VCM orchestration role for task clarification, role routing, handoffs, acceptance, and PR preparation.",
68
+ tools: "Read, Grep, Glob, Bash, Edit, Write, Skill"
68
69
  },
69
70
  architect: {
70
71
  description: "VCM architecture role for plans, module boundaries, public contracts, verifiable behavior, and docs sync.",
@@ -77,7 +78,8 @@ const AGENT_FRONTMATTER = {
77
78
  skills: ["vcm-code-navigation"]
78
79
  },
79
80
  tester: {
80
- description: "VCM testing role for validation, test adequacy, approved-scope validation, and risk findings."
81
+ description: "VCM testing role for validation, test adequacy, approved-scope validation, and risk findings.",
82
+ tools: "Read, Grep, Glob, Bash, Edit, Write, Skill"
81
83
  },
82
84
  reviewer: {
83
85
  description: "VCM independent gate review role for architecture plans, validation adequacy, and code diffs.",
@@ -88,7 +90,8 @@ const AGENT_FRONTMATTER = {
88
90
  description: "VCM task-scoped translation tool role for conversation translation, file translation, bootstrap, and memory updates."
89
91
  },
90
92
  "harness-engineer": {
91
- description: "VCM task-scoped harness maintenance role for harness diagnosis, diff proposals, and VCM issue drafts."
93
+ description: "VCM task-scoped harness maintenance role for harness diagnosis, diff proposals, and VCM issue drafts.",
94
+ tools: "Read, Grep, Glob, Bash, Edit, Write, Skill"
92
95
  },
93
96
  "vcm-coder-worker": {
94
97
  description: "Bounded VCM implementation worker for assigned modules, files, and VCM:CODE markers from Coder.",
@@ -105,6 +108,11 @@ const REQUIRED_AGENT_DISALLOWED_TOOLS = {
105
108
  coder: CODE_ROLE_DISALLOWED_TOOLS,
106
109
  reviewer: REVIEWER_DISALLOWED_TOOLS
107
110
  };
111
+ const REQUIRED_AGENT_TOOLS = {
112
+ "project-manager": ["Skill"],
113
+ tester: ["Skill"],
114
+ "harness-engineer": ["Skill"]
115
+ };
108
116
  const REQUIRED_AGENT_SKILLS = {
109
117
  architect: ["vcm-code-navigation"],
110
118
  coder: ["vcm-code-navigation"],
@@ -693,6 +701,9 @@ async function installManagedFile({ projectRoot, definition, dryRun, operations
693
701
  if (definition.memoryBlock) {
694
702
  nextContent = ensureVcmMemoryBlock(nextContent);
695
703
  }
704
+ for (const requiredTool of REQUIRED_AGENT_TOOLS[definition.agentName] ?? []) {
705
+ nextContent = ensureAgentAllowedTool(nextContent, requiredTool);
706
+ }
696
707
  const requiredDisallowedTools = REQUIRED_AGENT_DISALLOWED_TOOLS[definition.agentName];
697
708
  if (requiredDisallowedTools) {
698
709
  nextContent = ensureAgentDisallowedTools(nextContent, requiredDisallowedTools);
@@ -768,6 +779,36 @@ function ensureAgentDisallowedTools(content, requiredTools) {
768
779
  : withoutAllowedTools.replace(/\r?\n---$/, `\ndisallowedTools: ${disallowedTools}\n---`);
769
780
  return content.replace(frontmatterMatch[0], nextFrontmatter);
770
781
  }
782
+ function ensureAgentAllowedTool(content, requiredTool) {
783
+ const frontmatterMatch = content.match(/^---\r?\n[\s\S]*?\r?\n---/);
784
+ if (!frontmatterMatch) {
785
+ return content;
786
+ }
787
+ const frontmatter = frontmatterMatch[0];
788
+ const toolsMatch = frontmatter.match(/^tools:\s*(.*)$/m);
789
+ if (toolsMatch) {
790
+ const existing = toolsMatch[1]
791
+ .split(",")
792
+ .map((tool) => tool.trim())
793
+ .filter(Boolean);
794
+ if (existing.includes(requiredTool)) {
795
+ return content;
796
+ }
797
+ return content.replace(frontmatter, frontmatter.replace(toolsMatch[0], `tools: ${[...existing, requiredTool].join(", ")}`));
798
+ }
799
+ const disallowedMatch = frontmatter.match(/^disallowedTools:\s*(.*)$/m);
800
+ if (!disallowedMatch) {
801
+ return content;
802
+ }
803
+ const disallowedTools = disallowedMatch[1]
804
+ .split(",")
805
+ .map((tool) => tool.trim())
806
+ .filter((tool) => tool && tool !== requiredTool);
807
+ const nextFrontmatter = disallowedTools.length > 0
808
+ ? frontmatter.replace(disallowedMatch[0], `disallowedTools: ${disallowedTools.join(", ")}`)
809
+ : frontmatter.replace(/^disallowedTools:\s*.*\r?\n?/m, "");
810
+ return content.replace(frontmatter, nextFrontmatter);
811
+ }
771
812
  function ensureAgentSkill(content, requiredSkill) {
772
813
  const frontmatterMatch = content.match(/^---\r?\n[\s\S]*?\r?\n---/);
773
814
  if (!frontmatterMatch) {
@@ -21,7 +21,6 @@ const NON_VCM_ROLE_RUNTIME_TOOLS = [
21
21
  "ReportFindings",
22
22
  "ScheduleWakeup",
23
23
  "SendMessage",
24
- "Skill",
25
24
  "TaskCreate",
26
25
  "TaskGet",
27
26
  "TaskList",
@@ -225,7 +225,8 @@ const HARNESS_FILES = [
225
225
  path: ".claude/agents/harness-engineer.md",
226
226
  title: "Harness Engineer Agent",
227
227
  memoryBlock: true,
228
- frontmatter: renderAgentFrontmatter("harness-engineer", "VCM task-scoped harness maintenance role for harness diagnosis, diff proposals, and VCM issue drafts."),
228
+ requiredTools: ["Skill"],
229
+ frontmatter: renderAgentFrontmatter("harness-engineer", "VCM task-scoped harness maintenance role for harness diagnosis, diff proposals, and VCM issue drafts.", { tools: "Read, Grep, Glob, Bash, Edit, Write, Skill" }),
229
230
  renderRules: renderHarnessEngineerHarnessRules
230
231
  },
231
232
  {
@@ -275,7 +276,8 @@ const HARNESS_FILES = [
275
276
  path: ".claude/agents/project-manager.md",
276
277
  title: "Project Manager Agent",
277
278
  memoryBlock: true,
278
- frontmatter: renderAgentFrontmatter("project-manager", "User-facing VCM orchestration role for task clarification, role routing, handoffs, acceptance, and PR preparation."),
279
+ requiredTools: ["Skill"],
280
+ frontmatter: renderAgentFrontmatter("project-manager", "User-facing VCM orchestration role for task clarification, role routing, handoffs, acceptance, and PR preparation.", { tools: "Read, Grep, Glob, Bash, Edit, Write, Skill" }),
279
281
  renderRules: renderProjectManagerHarnessRules
280
282
  },
281
283
  {
@@ -304,7 +306,8 @@ const HARNESS_FILES = [
304
306
  path: ".claude/agents/tester.md",
305
307
  title: "Tester Agent",
306
308
  memoryBlock: true,
307
- frontmatter: renderAgentFrontmatter("tester", "VCM testing role for validation, test adequacy, approved-scope validation, and risk findings."),
309
+ requiredTools: ["Skill"],
310
+ frontmatter: renderAgentFrontmatter("tester", "VCM testing role for validation, test adequacy, approved-scope validation, and risk findings.", { tools: "Read, Grep, Glob, Bash, Edit, Write, Skill" }),
308
311
  renderRules: renderTesterHarnessRules
309
312
  }
310
313
  ];
@@ -1407,9 +1410,41 @@ function ensureAgentDisallowedTools(content, requiredTools) {
1407
1410
  : withoutAllowedTools.replace(/\r?\n---$/, `\ndisallowedTools: ${disallowedTools}\n---`);
1408
1411
  return content.replace(frontmatterMatch[0], nextFrontmatter);
1409
1412
  }
1413
+ function ensureAgentAllowedTool(content, requiredTool) {
1414
+ const frontmatterMatch = content.match(/^---\r?\n[\s\S]*?\r?\n---/);
1415
+ if (!frontmatterMatch) {
1416
+ return content;
1417
+ }
1418
+ const frontmatter = frontmatterMatch[0];
1419
+ const toolsMatch = frontmatter.match(/^tools:\s*(.*)$/m);
1420
+ if (toolsMatch) {
1421
+ const existing = toolsMatch[1]
1422
+ .split(",")
1423
+ .map((tool) => tool.trim())
1424
+ .filter(Boolean);
1425
+ if (existing.includes(requiredTool)) {
1426
+ return content;
1427
+ }
1428
+ const tools = [...existing, requiredTool].join(", ");
1429
+ return content.replace(frontmatter, frontmatter.replace(toolsMatch[0], `tools: ${tools}`));
1430
+ }
1431
+ const disallowedMatch = frontmatter.match(/^disallowedTools:\s*(.*)$/m);
1432
+ if (!disallowedMatch) {
1433
+ return content;
1434
+ }
1435
+ const disallowedTools = disallowedMatch[1]
1436
+ .split(",")
1437
+ .map((tool) => tool.trim())
1438
+ .filter((tool) => tool && tool !== requiredTool);
1439
+ const nextFrontmatter = disallowedTools.length > 0
1440
+ ? frontmatter.replace(disallowedMatch[0], `disallowedTools: ${disallowedTools.join(", ")}`)
1441
+ : frontmatter.replace(/^disallowedTools:\s*.*\r?\n?/m, "");
1442
+ return content.replace(frontmatter, nextFrontmatter);
1443
+ }
1410
1444
  function normalizeAgentFrontmatter(content, definition) {
1411
- const toolsUpdated = ensureAgentDisallowedTools(content, definition.requiredDisallowedTools);
1412
- return (definition.requiredSkills ?? []).reduce(ensureAgentSkill, toolsUpdated);
1445
+ const allowedToolsUpdated = (definition.requiredTools ?? []).reduce(ensureAgentAllowedTool, content);
1446
+ const disallowedToolsUpdated = ensureAgentDisallowedTools(allowedToolsUpdated, definition.requiredDisallowedTools);
1447
+ return (definition.requiredSkills ?? []).reduce(ensureAgentSkill, disallowedToolsUpdated);
1413
1448
  }
1414
1449
  function ensureAgentSkill(content, requiredSkill) {
1415
1450
  const frontmatterMatch = content.match(/^---\r?\n[\s\S]*?\r?\n---/);
@@ -104,7 +104,12 @@ export function createSessionService(deps) {
104
104
  VCM_RUNTIME_SESSION_TOKEN: runtimeSessionToken
105
105
  }, modelEnvironment, {
106
106
  ...buildUsageTelemetryEnvironment(deps.apiUrl, role, model),
107
- ...(roleUsesLsp(role) ? { ENABLE_LSP_TOOL: "true" } : {})
107
+ ...(roleUsesLsp(role)
108
+ ? {
109
+ ENABLE_LSP_TOOL: "true",
110
+ ENABLE_TOOL_SEARCH: "false"
111
+ }
112
+ : {})
108
113
  }),
109
114
  cols: input.cols,
110
115
  rows: input.rows
@@ -22,8 +22,11 @@ ${renderRoleMemoryRules("architect")}
22
22
  ### Semantic Code Navigation
23
23
 
24
24
  - Follow the preloaded \`vcm-code-navigation\` skill whenever work requires code definitions, implementations, references, callers, callees, or behavior paths. This applies in every Architect mode and in direct user communication.
25
- - Use LSP for semantic relationships. Use Glob to locate files, Read to inspect complete code, and generated context, architecture documents, or runtime evidence for boundaries LSP does not model.
26
- - LSP startup or indexing time is not a reason to replace a required semantic query with text matching. Wait for the role-session LSP and follow the skill's bounded retry procedure.
25
+ - LSP is mandatory and directly available for navigating project source code. Start source-code navigation with LSP. If it is unavailable, report a VCM LSP configuration failure; do not substitute source text search.
26
+ - Use LSP definitions, implementations, references, document or workspace symbols, and incoming or outgoing calls for all source-code symbol and relationship queries.
27
+ - Do not use the built-in \`Grep\` tool or shell text-search commands such as \`grep\`, \`rg\`, \`git grep\`, \`ag\`, or \`ack\` to search project source code, test code, or executable scripts. This prohibition includes locating or inferring definitions, implementations, references, callers, callees, symbols, and behavior paths.
28
+ - Use Glob to locate files and Read to inspect complete code. Text search is allowed only for non-source artifacts that LSP does not model, such as documentation, configuration or data files, generated context, and logs. To inspect source comments, locate the source through LSP or Glob and use Read.
29
+ - Cost, latency, round trips, batching, parallelism, or an expectation of equivalent results never permits source-code text search. Wait for the role-session LSP and follow the skill's bounded retry procedure.
27
30
  - If LSP cannot resolve a required project-owned relationship, record it as unresolved. Do not replace semantic evidence with text matches.
28
31
 
29
32
  ### Work Persistence
@@ -6,7 +6,7 @@ Use this skill when Architect, Coder, or Reviewer must establish symbol definiti
6
6
  ## Navigation Order
7
7
 
8
8
  1. Define the affected feature or module boundary and locate entry symbols with \`.ai/generated/module-index.json\` and \`.ai/generated/public-surface.json\` when available.
9
- 2. If \`LSP\` is not listed initially, call \`ToolSearch\` with query \`select:LSP\` to load the deferred plugin tool. Then start each navigation run with LSP \`documentSymbol\` on a known affected project source file. This initializes the actual role-session language server and proves that it can parse that file; an executable version probe is not workspace readiness.
9
+ 2. Start each navigation run with LSP \`documentSymbol\` on a known affected project source file. This initializes the actual role-session language server and proves that it can parse that file; an executable version probe is not workspace readiness. If \`LSP\` is unavailable, report a VCM LSP configuration failure instead of substituting text search.
10
10
  3. Use LSP workspace or file symbols, definitions, implementations, references, and incoming or outgoing call hierarchy to resolve project-owned relationships.
11
11
  4. If an initial workspace-symbol request is empty or reports indexing, wait and retry; startup or indexing time does not permit replacing a required semantic query with text matching. After a successful file-symbol request, retry the same bounded workspace query at most two more times. If it still cannot resolve, record the operation and result as unresolved.
12
12
  5. Read the complete project-owned callable unit at every resolved location.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vibe-coding-master",
3
- "version": "0.7.41",
3
+ "version": "0.7.42",
4
4
  "description": "Local GUI session cockpit for Claude Code role sessions.",
5
5
  "type": "module",
6
6
  "files": [