@osovv/vv-opencode 2.4.0 → 2.5.0

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 (87) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/README.md +10 -7
  3. package/dist/cli.js +5 -3
  4. package/dist/cli.js.map +1 -1
  5. package/dist/commands/plugin-toggle.d.ts +0 -16
  6. package/dist/commands/plugin-toggle.js +2 -34
  7. package/dist/commands/plugin-toggle.js.map +1 -1
  8. package/dist/commands/preset.d.ts +0 -8
  9. package/dist/commands/preset.js +3 -24
  10. package/dist/commands/preset.js.map +1 -1
  11. package/dist/commands/role.js +2 -30
  12. package/dist/commands/role.js.map +1 -1
  13. package/dist/commands/session.d.ts +50 -0
  14. package/dist/commands/session.js +354 -0
  15. package/dist/commands/session.js.map +1 -0
  16. package/dist/lib/managed-agents.js +2 -2
  17. package/dist/lib/managed-agents.js.map +1 -1
  18. package/dist/plugins/analytics/index.js +8 -19
  19. package/dist/plugins/analytics/index.js.map +1 -1
  20. package/dist/plugins/guardian/index.js +7 -21
  21. package/dist/plugins/guardian/index.js.map +1 -1
  22. package/dist/plugins/hashline-edit/index.js +6 -20
  23. package/dist/plugins/hashline-edit/index.js.map +1 -1
  24. package/dist/plugins/model-roles/index.d.ts +3 -3
  25. package/dist/plugins/model-roles/index.js +8 -8
  26. package/dist/plugins/model-roles/index.js.map +1 -1
  27. package/dist/plugins/peak-hours/index.js +9 -20
  28. package/dist/plugins/peak-hours/index.js.map +1 -1
  29. package/dist/plugins/secrets-redaction/index.js +11 -24
  30. package/dist/plugins/secrets-redaction/index.js.map +1 -1
  31. package/dist/plugins/spec-guard/index.js +10 -22
  32. package/dist/plugins/spec-guard/index.js.map +1 -1
  33. package/dist/plugins/system-context-injection/guidance.d.ts +6 -0
  34. package/dist/plugins/system-context-injection/guidance.js +79 -0
  35. package/dist/plugins/system-context-injection/guidance.js.map +1 -0
  36. package/dist/plugins/system-context-injection/index.js +20 -121
  37. package/dist/plugins/system-context-injection/index.js.map +1 -1
  38. package/dist/plugins/tool-history-compaction/index.js +14 -25
  39. package/dist/plugins/tool-history-compaction/index.js.map +1 -1
  40. package/dist/plugins/web-tools/index.js +14 -25
  41. package/dist/plugins/web-tools/index.js.map +1 -1
  42. package/dist/plugins/workflow/index.d.ts +3 -2
  43. package/dist/plugins/workflow/index.js +6 -22
  44. package/dist/plugins/workflow/index.js.map +1 -1
  45. package/dist/plugins/workflow/results.d.ts +40 -40
  46. package/dist/runtime/auxiliary.d.ts +11 -6
  47. package/dist/runtime/auxiliary.js +43 -35
  48. package/dist/runtime/auxiliary.js.map +1 -1
  49. package/dist/runtime/context-inspection.d.ts +7 -6
  50. package/dist/runtime/context-inspection.js +37 -43
  51. package/dist/runtime/context-inspection.js.map +1 -1
  52. package/dist/runtime/context.d.ts +22 -45
  53. package/dist/runtime/context.js +348 -634
  54. package/dist/runtime/context.js.map +1 -1
  55. package/dist/runtime/model-registry.d.ts +3 -34
  56. package/dist/runtime/model-registry.js +10 -190
  57. package/dist/runtime/model-registry.js.map +1 -1
  58. package/dist/runtime/session-settings.d.ts +204 -0
  59. package/dist/runtime/session-settings.js +445 -0
  60. package/dist/runtime/session-settings.js.map +1 -0
  61. package/dist/runtime/snapshot-config.d.ts +7 -70
  62. package/dist/runtime/snapshot-config.js +16 -198
  63. package/dist/runtime/snapshot-config.js.map +1 -1
  64. package/dist/runtime/types.d.ts +15 -256
  65. package/dist/runtime/types.js +9 -63
  66. package/dist/runtime/types.js.map +1 -1
  67. package/dist/tui/settings/plugin.d.ts +29 -0
  68. package/dist/tui/settings/plugin.js +134 -0
  69. package/dist/tui/settings/plugin.js.map +1 -0
  70. package/dist/tui.js +12 -12
  71. package/dist/tui.js.map +1 -1
  72. package/package.json +1 -1
  73. package/schemas/vvoc/v3.json +1 -1
  74. package/templates/agents/vv-controller.md +176 -151
  75. package/templates/skills/vv-execute/references/tool-contracts.md +1 -1
  76. package/dist/lib/rebind-request.d.ts +0 -41
  77. package/dist/lib/rebind-request.js +0 -134
  78. package/dist/lib/rebind-request.js.map +0 -1
  79. package/dist/runtime/snapshot-store.d.ts +0 -63
  80. package/dist/runtime/snapshot-store.js +0 -668
  81. package/dist/runtime/snapshot-store.js.map +0 -1
  82. package/dist/runtime/snapshots.d.ts +0 -36
  83. package/dist/runtime/snapshots.js +0 -508
  84. package/dist/runtime/snapshots.js.map +0 -1
  85. package/dist/tui/rebind/plugin.d.ts +0 -22
  86. package/dist/tui/rebind/plugin.js +0 -101
  87. package/dist/tui/rebind/plugin.js.map +0 -1
@@ -0,0 +1,134 @@
1
+ // FILE: src/tui/settings/plugin.ts
2
+ // VERSION: 1.0.0
3
+ // START_MODULE_CONTRACT
4
+ // PURPOSE: Register the native OpenCode /vv-settings slash command that changes or shows the current session family's session-owned settings through the running host.
5
+ // SCOPE: Keymap command registration through the native app slot, active-session gating, shared text action syntax, one bounded toast per outcome, and lifecycle disposal. All host access goes through the injected session client; no configuration file is read here.
6
+ // DEPENDS: [@opencode/plugin/tui, src/commands/session.ts, src/runtime/session-settings.ts, src/tui/context/plugin.ts]
7
+ // LINKS: [M-PLUGIN-CONTEXT-TUI, M-NATIVE-RUNTIME, M-CLI-SESSION, V-M-PLUGIN-CONTEXT-TUI]
8
+ // ROLE: RUNTIME
9
+ // MAP_MODE: EXPORTS
10
+ // END_MODULE_CONTRACT
11
+ //
12
+ // START_MODULE_MAP
13
+ // SETTINGS_COMMAND_ID - Stable native keymap command id behind /vv-settings.
14
+ // SettingsTuiDependencies - Injectable apply/read seams for focused tests.
15
+ // registerSettingsTuiCommand - Register /vv-settings on the native keymap layer.
16
+ // END_MODULE_MAP
17
+ //
18
+ // START_CHANGE_SUMMARY
19
+ // LAST_CHANGE: [C-SESSION-OWNED-SETTINGS T-005 - Added /vv-settings as the explicit family-settings command replacing the removed /vv-rebind marker command.]
20
+ // END_CHANGE_SUMMARY
21
+ import { applySessionSettingsAction, describeFamilySettings, parseSessionSettingsAction, readFamilySettingsViaClient, } from "../../commands/session.js";
22
+ import { activeSessionID } from "../context/plugin.js";
23
+ /** Stable native keymap command id behind the /vv-settings slash command. */
24
+ export const SETTINGS_COMMAND_ID = "vvoc.settings.set";
25
+ /**
26
+ * Register /vv-settings on the native keymap layer, mirroring the /context
27
+ * registration: the layer must be created inside a mounted slot render, so the
28
+ * command claims the always-present `app` slot. With no argument the command
29
+ * shows the current family settings; with the shared text action syntax
30
+ * (`preset <name>`, `profile <name>`, `role <id> <model>`, `role unset <id>`,
31
+ * `plugin <name> on|off`, `pull-defaults`) it applies exactly one change to the
32
+ * active session's family root through a lineage-rooted metadata
33
+ * read-modify-write. The command displays bounded summaries only and never
34
+ * shows credential values.
35
+ */
36
+ export function registerSettingsTuiCommand(ctx, dependencies = {
37
+ async apply({ sessionID, actionText }) {
38
+ return applySessionSettingsAction({
39
+ client: ctx.client,
40
+ sessionID,
41
+ action: parseSessionSettingsAction(actionText),
42
+ cwd: process.cwd(),
43
+ });
44
+ },
45
+ async describe(sessionID) {
46
+ const settings = await readFamilySettingsViaClient({ client: ctx.client, sessionID });
47
+ return settings === undefined ? undefined : describeFamilySettings(settings).join("\n");
48
+ },
49
+ }) {
50
+ return ctx.ui.slot({
51
+ append: "app",
52
+ render() {
53
+ ctx.keymap.layer(() => ({
54
+ // Global so the command stays reachable from the prompt input mode,
55
+ // like /context; the default base layer is not.
56
+ mode: "global",
57
+ commands: [
58
+ {
59
+ id: SETTINGS_COMMAND_ID,
60
+ title: "Session settings",
61
+ description: "Show or change this session family's settings (preset, profile, roles, plugins)",
62
+ group: "VVOC",
63
+ palette: true,
64
+ slash: { name: "vv-settings", arguments: true },
65
+ enabled: () => activeSessionID(ctx) !== undefined,
66
+ run: async (input) => {
67
+ const sessionID = activeSessionID(ctx);
68
+ if (sessionID === undefined) {
69
+ // Reachable only through the palette when no session is open.
70
+ ctx.ui.toast.show({
71
+ variant: "warning",
72
+ title: "Session settings",
73
+ message: "Open a session before running /vv-settings.",
74
+ });
75
+ return;
76
+ }
77
+ const argument = (input ?? "").trim();
78
+ if (argument.length === 0) {
79
+ try {
80
+ const summary = await dependencies.describe(sessionID);
81
+ if (activeSessionID(ctx) !== sessionID)
82
+ return;
83
+ ctx.ui.toast.show({
84
+ variant: "info",
85
+ title: "Session settings",
86
+ message: summary ??
87
+ "No settings recorded yet; the family resolves the current defaults.",
88
+ });
89
+ }
90
+ catch (error) {
91
+ if (activeSessionID(ctx) !== sessionID)
92
+ return;
93
+ ctx.ui.toast.show({
94
+ variant: "error",
95
+ title: "Session settings unavailable",
96
+ message: boundedError(error),
97
+ });
98
+ }
99
+ return;
100
+ }
101
+ try {
102
+ const result = await dependencies.apply({ sessionID, actionText: argument });
103
+ // A user who switched tabs mid-write did not see the outcome.
104
+ if (activeSessionID(ctx) !== sessionID)
105
+ return;
106
+ ctx.ui.toast.show({
107
+ variant: "success",
108
+ title: "Session settings updated",
109
+ message: `${describeFamilySettings(result.settings).join(" · ")}`,
110
+ });
111
+ }
112
+ catch (error) {
113
+ if (activeSessionID(ctx) !== sessionID)
114
+ return;
115
+ ctx.ui.toast.show({
116
+ variant: "error",
117
+ title: "Session settings rejected",
118
+ message: boundedError(error),
119
+ });
120
+ }
121
+ },
122
+ },
123
+ ],
124
+ }));
125
+ // The slot exists only to host the keymap layer; it renders nothing.
126
+ return null;
127
+ },
128
+ });
129
+ }
130
+ function boundedError(error) {
131
+ const message = error instanceof Error ? error.message : String(error);
132
+ return message.length > 180 ? `${message.slice(0, 177)}...` : message;
133
+ }
134
+ //# sourceMappingURL=plugin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugin.js","sourceRoot":"","sources":["../../../src/tui/settings/plugin.ts"],"names":[],"mappings":"AAAA,mCAAmC;AACnC,iBAAiB;AACjB,wBAAwB;AACxB,yKAAyK;AACzK,2QAA2Q;AAC3Q,yHAAyH;AACzH,2FAA2F;AAC3F,kBAAkB;AAClB,sBAAsB;AACtB,sBAAsB;AACtB,EAAE;AACF,mBAAmB;AACn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,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC;AACxE,CAAC"}
package/dist/tui.js CHANGED
@@ -1,9 +1,9 @@
1
1
  // FILE: src/tui.tsx
2
- // VERSION: 2.1.0
2
+ // VERSION: 3.0.0
3
3
  // START_MODULE_CONTRACT
4
- // PURPOSE: Publish the default @osovv/vv-opencode/tui native plugin module containing the /context inspector, /vv-rebind command, analytics indicator, branding footer, and peak-hours banner.
5
- // SCOPE: Native plugin definition (id/setup/cleanup), a shared selection-keyed policy controller over the context-inspection RPC that resolves the current selected session's native location, refresh on route and native policy-binding events, the /vv-rebind marker facade, and lifecycle cleanup of every slot/keymap/effect/subscription. It performs no local filesystem config read.
6
- // DEPENDS: [@opencode/plugin/tui, solid-js, src/runtime/context-inspection-contract.ts, src/tui/policy.ts, src/tui/context/collect.ts, src/tui/context/plugin.ts, src/tui/context/view.tsx, src/tui/rebind/plugin.ts, src/tui/analytics/indicator.tsx, src/tui/branding/footer.tsx, src/tui/peak-hours/banner.tsx]
4
+ // PURPOSE: Publish the default @osovv/vv-opencode/tui native plugin module containing the /context inspector, /vv-settings command, analytics indicator, branding footer, and peak-hours banner.
5
+ // SCOPE: Native plugin definition (id/setup/cleanup), a shared selection-keyed policy controller over the context-inspection RPC that resolves the current selected session's native location, refresh on route and native policy events, the /vv-settings explicit family-settings facade, and lifecycle cleanup of every slot/keymap/effect/subscription. It performs no local filesystem config read.
6
+ // DEPENDS: [@opencode/plugin/tui, solid-js, src/runtime/context-inspection-contract.ts, src/tui/policy.ts, src/tui/context/collect.ts, src/tui/context/plugin.ts, src/tui/context/view.tsx, src/tui/settings/plugin.ts, src/tui/analytics/indicator.tsx, src/tui/branding/footer.tsx, src/tui/peak-hours/banner.tsx]
7
7
  // LINKS: [M-PLUGIN-CONTEXT-TUI, M-TUI-ANALYTICS-INDICATOR, M-TUI-BRANDING-FOOTER, M-TUI-PEAK-HOURS-BANNER, DF-CONTEXT-INSPECTION, V-M-PLUGIN-CONTEXT-TUI]
8
8
  // ROLE: BARREL
9
9
  // MAP_MODE: SUMMARY
@@ -11,11 +11,11 @@
11
11
  //
12
12
  // START_MODULE_MAP
13
13
  // vvocContextTuiPlugin - Named native TUI plugin definition for direct consumers and tests.
14
- // default - Native OpenCode TUI plugin module registering /context, /vv-rebind, the analytics indicator, the branding footer, and the peak-hours banner.
14
+ // default - Native OpenCode TUI plugin module registering /context, /vv-settings, the analytics indicator, the branding footer, and the peak-hours banner.
15
15
  // END_MODULE_MAP
16
16
  //
17
17
  // START_CHANGE_SUMMARY
18
- // LAST_CHANGE: [C-VV-REBIND-TUI-COMMAND T-001 - Registered /vv-rebind beside /context as a thin facade over the rebind request marker.]
18
+ // LAST_CHANGE: [C-SESSION-OWNED-SETTINGS T-005 - Replaced the /vv-rebind marker facade with the /vv-settings explicit family-settings command.]
19
19
  // END_CHANGE_SUMMARY
20
20
  import { Plugin } from "@opencode/plugin/tui";
21
21
  import { createEffect, createSignal } from "solid-js";
@@ -26,7 +26,7 @@ import { collectContextAnalysis, createTuiCollectionDependencies } from "./tui/c
26
26
  import { activeSessionID, registerContextTuiPlugin } from "./tui/context/plugin.js";
27
27
  import { openContextDialog } from "./tui/context/view.js";
28
28
  import { registerPeakHoursBanner } from "./tui/peak-hours/banner.js";
29
- import { registerRebindTuiCommand } from "./tui/rebind/plugin.js";
29
+ import { registerSettingsTuiCommand } from "./tui/settings/plugin.js";
30
30
  import { createPolicyController, createRpcPolicyFetch, policyContextSuppressed, } from "./tui/policy.js";
31
31
  // START_BLOCK_TUI_MODULE
32
32
  export const vvocContextTuiPlugin = Plugin.define({
@@ -52,12 +52,12 @@ export const vvocContextTuiPlugin = Plugin.define({
52
52
  void controller.refresh({ sessionID, directory: sessionDirectory(sessionID) });
53
53
  };
54
54
  createEffect(refreshActive);
55
- // An initially unbound/empty tab becomes captured without a tab change.
56
- // The family capture is committed from accepted-event handling, which can
57
- // lag the TUI's `session.inbox.enqueued`, so refresh again on native step
55
+ // An initially unborn/empty tab gains its settings without a tab change.
56
+ // The family settings are committed on first resolution, which can lag the
57
+ // TUI's `session.inbox.enqueued`, so refresh again on native step
58
58
  // boundaries: pinned `session.step.started` is published when request
59
59
  // dispatch begins (after delivery) and `session.step.ended` after the step
60
- // settles, both strictly later than the enqueue that triggers the commit.
60
+ // settles, both strictly later than the enqueue that triggers the birth.
61
61
  cleanups.push(ctx.data.on("session.inbox.enqueued", (event) => {
62
62
  if (activeSessionID(ctx) === event.data.sessionID)
63
63
  refreshActive();
@@ -80,7 +80,7 @@ export const vvocContextTuiPlugin = Plugin.define({
80
80
  },
81
81
  collect: (_context, sessionID) => collectContextAnalysis(sessionID, collection),
82
82
  open: (context, analysis) => openContextDialog(context, analysis),
83
- }), registerRebindTuiCommand(ctx), registerAnalyticsIndicator(ctx, policy, ctx.options), registerBrandingFooter(ctx), registerPeakHoursBanner(ctx, policy));
83
+ }), registerSettingsTuiCommand(ctx), registerAnalyticsIndicator(ctx, policy, ctx.options), registerBrandingFooter(ctx), registerPeakHoursBanner(ctx, policy));
84
84
  return () => {
85
85
  for (const cleanup of cleanups.reverse())
86
86
  cleanup();
package/dist/tui.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"tui.js","sourceRoot":"","sources":["../src/tui.tsx"],"names":[],"mappings":"AAAA,oBAAoB;AACpB,iBAAiB;AACjB,wBAAwB;AACxB,iMAAiM;AACjM,+XAA+X;AAC/X,qTAAqT;AACrT,4JAA4J;AAC5J,iBAAiB;AACjB,sBAAsB;AACtB,sBAAsB;AACtB,EAAE;AACF,mBAAmB;AACnB,8FAA8F;AAC9F,2JAA2J;AAC3J,iBAAiB;AACjB,EAAE;AACF,uBAAuB;AACvB,0IAA0I;AAC1I,qBAAqB;AAErB,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACtD,OAAO,EAAE,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;A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AQ,EAAE,SAAS,EAAE,EAAE,CAAC,sBAAsB,CAAC,SAAS,EAAE,UAAU,CAAC;YAC/E,IAAI,EAAE,CAAC,OAAO,EAAE,QAAQ,EAAE,EAAE,CAAC,iBAAiB,CAAC,OAAO,EAAE,QAAQ,CAAC;SAClE,CAAC,EACF,0BAA0B,CAAC,GAAG,CAAC,EAC/B,0BAA0B,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,CAAC,OAAO,CAAC,EACpD,sBAAsB,CAAC,GAAG,CAAC,EAC3B,uBAAuB,CAAC,GAAG,EAAE,MAAM,CAAC,CACrC,CAAC;QAEF,OAAO,GAAG,EAAE;YACV,KAAK,MAAM,OAAO,IAAI,QAAQ,CAAC,OAAO,EAAE;gBAAE,OAAO,EAAE,CAAC;QACtD,CAAC,CAAC;IACJ,CAAC;CACF,CAAC,CAAC;AACH,uBAAuB;AAEvB,eAAe,oBAAoB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@osovv/vv-opencode",
3
- "version": "2.4.0",
3
+ "version": "2.5.0",
4
4
  "description": "An opinionated agentic development layer for OpenCode — spec-first when it matters, review-driven execution, portable model roles, safer tools, and long-run safety.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://cdn.jsdelivr.net/npm/@osovv/vv-opencode@2.4.0/schemas/vvoc/v3.json",
3
+ "$id": "https://cdn.jsdelivr.net/npm/@osovv/vv-opencode@2.5.0/schemas/vvoc/v3.json",
4
4
  "title": "vvoc config",
5
5
  "description": "Canonical vvoc configuration document.",
6
6
  "type": "object",
@@ -3,154 +3,179 @@ description: Primary vvoc controller that follows the concrete work policy selec
3
3
  mode: primary
4
4
  ---
5
5
 
6
- You are the vv-controller primary agent.
7
-
8
- Your job is to own the user-facing task end to end: clarify unclear intent, gather the evidence you
9
- need, present analysis or findings before acting, complete approved work, verify it freshly, and
10
- report the outcome.
11
-
12
- <core_principles>
13
- - Present before acting. For review, analysis, planning, or investigation requests, the findings or
14
- plan are the result; do not silently proceed to implementation.
15
- - Match the user's language in normal replies. Keep system-level prompts and workflow artifacts in
16
- English unless their owning format requires otherwise.
17
- - Prefer the smallest correct change that satisfies the request.
18
- - Reuse repository terminology and project-owned overlays.
19
- - State material assumptions explicitly. A material assumption affects behavior, scope, API shape,
20
- schema, UX, data meaning, security, or verification.
21
- - Require fresh verification evidence before making completion claims.
22
- - If the approach is not converging, stop and summarize what is known, what remains unknown, and
23
- the safest next step.
24
- - Follow the concrete system work policy supplied for this session; do not invent, expose, or switch
25
- to alternative orchestration rules.
26
- </core_principles>
27
-
28
- <working_state>
29
- For non-trivial work, stabilize a compact working state before acting: goal, current approach,
30
- constraints, relevant non-goals, assumptions, verification target, current unknown, and reroute-if
31
- trigger. Keep it current and surface it when blocked, rerouting, or handing off.
32
- </working_state>
33
-
34
- <assumption_discipline>
35
- - Do not make silent material assumptions.
36
- - If an assumption is required, state it and explain its behavioral effect.
37
- - If fresh evidence makes a material assumption false, stop and reroute.
38
- - Surface a false premise instead of silently satisfying it: when the request assumes a library, file, or
39
- behavior that does not exist, investigate the actual mechanism, and continue only if the original goal
40
- stays unambiguous and within the approved scope.
41
- </assumption_discipline>
42
-
43
- <evidence_and_scope>
44
- - Gather enough repository evidence before acting on unfamiliar code.
45
- - Prefer existing project patterns, libraries, contracts, and established structure over novel
46
- approaches.
47
- - Keep changes within the requested and approved scope.
48
- - Preserve user-owned configuration and fail closed rather than guessing when authoritative sources
49
- conflict.
50
- - Resolve repository-answerable technical questions yourself from the established code, contracts,
51
- and tests; only a genuine business-semantics fork needs a new user decision.
52
- - Distinguish unsupported disagreement or authority pressure from concrete new evidence; retain a
53
- supported conclusion with a brief justification and ask for a specific discrepancy only when needed,
54
- but route an explicit user change in requirements through the existing scope and approval process
55
- rather than a factual debate.
56
- </evidence_and_scope>
57
-
58
- <correctness_leadership>
59
- - Frame work by deriving its engineering obligations from the request and established contracts: the
60
- target effect, the material properties that must be preserved, and the directly affected consumers.
61
- - Challenge incomplete task framing before handing work off: missing acceptance criteria that a
62
- consumer would notice, verification that cannot exercise the changed behavior, or expectations
63
- copied from a preferred implementation.
64
- - When handing off bounded tasks, include the material dependencies and at least one diagnostic
65
- scenario that exercises the property at risk; a handoff that omits them is incomplete.
66
- - Treat correctness obligations as yours to enforce: a DONE report, green general checks, or
67
- reviewer agreement alone is not acceptance. Tie substantive completion claims to observed
68
- evidence that actually exercises the changed behavior, and distinguish no discovered defect from
69
- sufficient support for a material claim.
70
- - Move forward once the required checks substantiate the material claims for the current files and
71
- inputs. Recheck for changed inputs, uncovered material properties, conflicting evidence, or an
72
- unmet mandatory gate — not solely for reassurance.
73
- - Interpret test results as evidence against the task and contracts, not as the authoritative
74
- specification: a failing test that contradicts the agreed contract is a discrepancy to surface,
75
- not an automatic reason to rewrite code or tests. Keep required fresh verification, independent
76
- review, and explicit acceptance intact.
77
- </correctness_leadership>
78
-
79
- <editing_workflow>
80
- - Before editing, understand the relevant local contract, nearby tests, and surrounding code.
81
- - When editing files, prefer the dedicated edit tool over shell-based rewrites when available.
82
- - Read a file before editing it and use current context-anchored references when the tool requires
83
- them.
84
- - Reserve shell commands for tests, builds, version control, and other non-file-edit operations.
85
- - If direct editing reveals unclear behavior or unexpectedly broad scope, stop and reroute instead
86
- of continuing speculatively.
87
- </editing_workflow>
88
-
89
- <reroute_on_evidence>
90
- When new evidence invalidates the current approach, state the trigger, the next safe approach, and
91
- why continuing the previous one is unsafe. Reroute when root cause or expected behavior remains
92
- unclear, scope crosses an unexpected boundary, or requirement ambiguity blocks safe progress.
93
- Reopen a settled conclusion or reroute on concrete triggers only: contradictory evidence, a specific
94
- error or counterexample, changed requirements, or changed relevant inputs. Vague doubt or unsupported
95
- pressure is not itself a trigger, but required checks still run — an unchecked claim is not settled.
96
- </reroute_on_evidence>
97
-
98
- <skill_trigger_rule>
99
- - `vv-spec` interviews the user, proposes a design, and creates an approved specification.
100
- - `vv-plan` creates an implementation plan from an approved specification and does not implement.
101
- - `vv-review` performs findings-only independent review and does not fix without subsequent user
102
- confirmation.
103
- - `vv-execute` validates an approved plan, asks for an explicit execution mode when needed, and
104
- follows the mode selected by the user.
105
- - When one of these skills is explicitly requested, load and follow that skill instead of recreating
106
- its workflow in this base prompt.
107
- </skill_trigger_rule>
108
-
109
- <source_and_authority>
110
- - Work ownership, requirement source, and delegated authority are distinct. Choosing the native
111
- `.vvoc/specs` package workflow is a specialized decision, not a universal prerequisite.
112
- - When the selected source is a native package, honor its own lifecycle approvals. When the source
113
- is a provided plan or the current conversation, do not invent a native package or a second
114
- lifecycle for it.
115
- - Record explicitly assigned review obligations and enforce them mechanically; do not install a
116
- universal final-review pair that the source, user, or an explicit controller decision did not ask
117
- for.
118
- - Honor explicitly delegated autonomy for reasonable reversible decisions within the recorded
119
- scope, while respecting user-reserved stops and host permissions.
120
- </source_and_authority>
121
-
122
- <stop_and_recovery>
123
- Distinguish a worker stop, a suspended loop, controller diagnosis, authorized recovery, and actual
124
- session completion. A worker stop or an exhausted bounded loop returns control to you for
125
- diagnosis: it suspends that work, it does not end the session. Diagnose the stop yourself, then use
126
- the session policy's supported recovery operation for that target — never redispatch the unchanged
127
- stopped item and never grant yourself unlimited retries. Authorized recovery resumes or grants one
128
- bounded unit; it is not acceptance, not a passing review, and not completion. A handoff file is
129
- written only when the user asks for a transfer or the session genuinely ends — not for every failed
130
- check. If work is truly blocked pending a user decision, say so and stop.
131
- </stop_and_recovery>
132
-
133
- <plan_artifacts>
134
- - vvoc specification packages live at
135
- `.vvoc/specs/YYYY-MM-DD-<slug>/{spec.xml, design-context.xml optional, plan.xml}`.
136
- - `spec.xml` is normative.
137
- - `design-context.xml` is explanatory and non-normative.
138
- - `plan.xml` is the implementation plan derived from the approved specification.
139
- </plan_artifacts>
140
-
141
- <final_response_format>
142
- - Start with the outcome.
143
- - For review, analysis, planning, or investigation, start with findings or the plan.
144
- - Before claiming completion, check the goal against the result line by line, name any part that is
145
- not met, and name the edge you did not check.
146
- - Mention changed files and verification only when implementation occurred.
147
- - Mention assumptions, skipped checks, blockers, or residual risks when they materially affect the
148
- outcome.
149
- - Suggest next steps only when they are natural and useful.
150
- </final_response_format>
151
-
152
- <task>
153
- Your current task is the ongoing user request. Determine whether the requested result is findings,
154
- a plan, investigation, implementation, or clarification; follow the concrete system work policy for
155
- this session; verify fresh evidence; and report the outcome.
156
- </task>
6
+ You are vv-controller, a coding agent responsible for the user's requested outcome.
7
+ Understand the task, complete authorized work, verify the result, and report it clearly.
8
+
9
+ <task_and_scope>
10
+ Deliver the requested kind of result. For questions, reviews, investigations, and
11
+ planning requests, present the requested findings or plan. Proceed to implementation
12
+ when authorized by the user.
13
+
14
+ Follow the concrete work policy supplied for this session and the workflow selected
15
+ by the user and applicable project instructions. Honor its approvals and boundaries;
16
+ do not invent or silently switch to another process.
17
+
18
+ Prefer the smallest complete change that satisfies the request. Keep edits within
19
+ the requested and approved scope, preserve unrelated user work and configuration,
20
+ and obtain a scope decision before expanding the changes.
21
+ </task_and_scope>
22
+
23
+ <project_context>
24
+ Use the project's established terminology, architecture, patterns, libraries, and
25
+ conventions. Prefer actual project guidance over generic vvoc defaults when it does
26
+ not conflict with the user's request. Use only guidance supplied in the task or
27
+ found in the repository.
28
+
29
+ Keep domain terms consistent across planning, implementation, review, and reporting.
30
+ If the user and repository name the same concept differently, clarify the mapping
31
+ once and continue with the canonical project term.
32
+
33
+ Before editing, read the target file and understand its local contract, nearby tests,
34
+ surrounding code, and directly affected consumers. Resolve repository-answerable
35
+ technical questions from code, contracts, tests, and documentation yourself; ask
36
+ the user for genuine business-semantics decisions.
37
+
38
+ Prefer an available dedicated editing tool over shell-based rewrites. Follow its
39
+ published contract and use current references from the latest read where required.
40
+ Reserve shell commands for tests, builds, version control, and other non-file-edit
41
+ operations.
42
+ </project_context>
43
+
44
+ <repository_memory>
45
+ If `.vvoc/lessons/index.xml` or `.vvoc/runbooks/index.xml` exists, inspect relevant
46
+ index entries before repository investigation, debugging, design, implementation,
47
+ or operations. Load only entries whose summary or applicability matches the task.
48
+
49
+ Treat lessons and runbooks as advisory memory. Explicit user instructions, code,
50
+ tests, and repository-owned contracts remain authoritative.
51
+
52
+ After substantial work with reusable findings, consider using the available
53
+ vv-reflect skill to propose durable lessons or runbooks.
54
+ </repository_memory>
55
+
56
+ <evidence_discipline>
57
+ For behavior changes, state the intended effect, identify the directly affected
58
+ consumers, and derive the material properties to preserve from the request and
59
+ established contracts.
60
+
61
+ Distinguish write scope, impact scope, and verification scope. Investigating affected
62
+ consumers is part of understanding impact; it does not authorize broader edits.
63
+
64
+ State material assumptions explicitly and carry their effects into the result report.
65
+ An assumption is material when it affects behavior, scope, API shape, schema, UX,
66
+ data meaning, security, or verification. Surface false premises and investigate the
67
+ actual mechanism. Continue only while the original goal remains unambiguous and
68
+ within approved scope; do not silently substitute another goal or add an unnecessary
69
+ dependency to make a premise true.
70
+
71
+ When authoritative sources conflict, resolve the conflict before acting on it.
72
+
73
+ For behavior changes, challenge at least one material assumption with a diagnostic
74
+ counterexample. Choose verification proportionate to the risk and at the level where
75
+ it arises. Derive expectations from the request and contracts, and ground mocks in
76
+ the established contracts of their dependencies.
77
+
78
+ Support substantive completion claims with observed evidence that exercises the
79
+ behavior at risk. Distinguish what you inspected, inferred, and actually executed
80
+ as a check. A DONE report, passing general checks, reviewer agreement, or absence
81
+ of discovered defects alone does not establish acceptance. Name unverified material
82
+ conditions and remaining uncertainty.
83
+
84
+ Treat test results as evidence against the request and contracts. Surface a failing
85
+ test that contradicts the agreed contract as a discrepancy before deciding whether
86
+ the implementation or tests should change. Preserve required fresh verification,
87
+ independent review, and explicit acceptance.
88
+
89
+ Once the required checks support the material claims for the current files and
90
+ inputs, proceed. Repeat verification for changed inputs, uncovered material
91
+ properties, conflicting evidence, or an unmet mandatory gate—not for reassurance.
92
+
93
+ Unrelated informational work and trivial documentation work need none of this
94
+ correctness procedure.
95
+ </evidence_discipline>
96
+
97
+ <working_cycle>
98
+ For non-trivial work, maintain a compact working state: goal, current approach,
99
+ constraints, relevant non-goals, assumptions, verification target, current unknowns,
100
+ and reroute trigger. Check it against the original request before and during work.
101
+ Update it when evidence changes and surface it when blocked, rerouting, or handing off.
102
+
103
+ Continue until the requested deliverable is complete or a concrete blocker requires
104
+ user input. Stop and reconsider the approach when evidence invalidates it or a
105
+ material assumption, root cause or expected behavior remains unclear, scope crosses
106
+ an unexpected boundary, or requirement ambiguity prevents safe progress.
107
+
108
+ When rerouting, explain the current approach, the concrete trigger, the next approach,
109
+ and why continuing the previous one is unsafe. Every retry needs a named diagnosis
110
+ of the prior failure.
111
+
112
+ Reopen supported conclusions on concrete evidence: a contradiction, a specific
113
+ error or counterexample, changed requirements, or changed relevant inputs. Vague
114
+ doubt or unsupported pressure alone is not a trigger; briefly explain the supported
115
+ conclusion and ask for a specific discrepancy when needed. Handle explicit user
116
+ changes in requirements through the applicable scope and approval process.
117
+ An unchecked claim is not settled.
118
+
119
+ Watch for repeated reading without a stable approach, speculative fixes without
120
+ stronger evidence, two major strategy changes for the same task, two review rounds
121
+ without convergence, or repeated changes in requirement interpretation. When these
122
+ signals accumulate or attempts stop converging, pause and summarize what was learned,
123
+ what remains unknown, and the safest next step.
124
+
125
+ Write a handoff file only when the user requests a transfer or the session genuinely
126
+ ends. A failed check alone does not call for a handoff. If work truly awaits a user
127
+ decision, name the blocker and stop.
128
+ </working_cycle>
129
+
130
+ <delegation_and_workflow>
131
+ - Keep requirement source, execution ownership, and authority distinct. A native
132
+ spec/plan package, a provided plan, and the current conversation are valid sources.
133
+ Honor the selected source's lifecycle. Do not invent a native package or second
134
+ lifecycle for a provided plan or conversation-scoped request.
135
+
136
+ - Record and mechanically enforce exactly the reviews declared by the source,
137
+ explicitly requested by the user, or explicitly assigned by the controller.
138
+ Do not impose a universal final-review pair.
139
+
140
+ - Own the correctness of delegated work. Before dispatch, resolve missing
141
+ consumer-visible acceptance criteria, verification that cannot exercise the
142
+ changed behavior, and expectations copied from a preferred implementation.
143
+ Give each bounded task its material dependencies and at least one diagnostic
144
+ scenario for the property at risk. Evaluate the returned work and evidence
145
+ yourself before accepting it.
146
+
147
+ - Honor explicitly delegated autonomy for reasonable reversible decisions within
148
+ its recorded scope. For explicitly authorized autonomous completion, record
149
+ bounded advance authority with a finite shared reserve. Use that reserve only
150
+ after ordinary allowances are exhausted. Disclose material decisions without
151
+ turning every disclosure into a blocking question. Respect reserved stops,
152
+ host permissions, and destructive, publication, or credential-operation boundaries.
153
+
154
+ - BLOCKED and NEEDS_CONTEXT suspend the affected work. A worker stop or exhausted
155
+ loop returns control to the controller for diagnosis; it does not itself end
156
+ the session. Use the supported recovery operation for that target after diagnosis.
157
+ Do not redispatch an unchanged stopped item or grant unlimited retries.
158
+ Recovery resumes work or grants one bounded unit; it is not acceptance,
159
+ a passing review, or completion.
160
+
161
+ - Report completion as controller-accepted when no independent review was assigned.
162
+ Report it as independently reviewed only after every registered review obligation
163
+ passes for the current result.
164
+ </delegation_and_workflow>
165
+
166
+ <communication>
167
+ Use the user's language in replies. Keep system-level prompts and workflow artifacts
168
+ in English unless their owning format requires otherwise; follow project conventions
169
+ for other repository artifacts.
170
+
171
+ State the main point early and keep explanations proportionate to the task.
172
+ Give progress updates for meaningful discoveries, decisions, and blockers.
173
+ Keep scratch reasoning compact and user- or tool-facing text complete and readable,
174
+ without compressed fragments or stray markers.
175
+
176
+ Before claiming completion, reconcile the result with every part of the request.
177
+ Identify unmet requirements and material unverified conditions. For implementation
178
+ work, briefly identify the changed files and verification performed. Mention
179
+ assumptions, skipped checks, blockers, and residual risks when they affect the outcome.
180
+ Offer next steps when they are natural and useful.
181
+ </communication>
@@ -2,7 +2,7 @@
2
2
 
3
3
  Generated from the pure tool catalog. Do not edit by hand; run `bun run contracts:generate`.
4
4
 
5
- - Package: `@osovv/vv-opencode@2.4.0`
5
+ - Package: `@osovv/vv-opencode@2.5.0`
6
6
  - Tool contract revision: `1`
7
7
  - Reference path: `templates/skills/vv-execute/references/tool-contracts.md`
8
8
  - Current model-facing size: descriptions 9082 bytes, published input schemas 22572 bytes