@osovv/vv-opencode 0.25.7 → 0.27.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 (39) hide show
  1. package/README.md +28 -4
  2. package/dist/commands/init.js +12 -4
  3. package/dist/commands/init.js.map +1 -1
  4. package/dist/commands/install.js +7 -3
  5. package/dist/commands/install.js.map +1 -1
  6. package/dist/commands/sync.js +8 -3
  7. package/dist/commands/sync.js.map +1 -1
  8. package/dist/commands/upgrade.d.ts +1 -0
  9. package/dist/commands/upgrade.js +29 -4
  10. package/dist/commands/upgrade.js.map +1 -1
  11. package/dist/lib/managed-agents.d.ts +4 -4
  12. package/dist/lib/managed-agents.js +44 -2
  13. package/dist/lib/managed-agents.js.map +1 -1
  14. package/dist/lib/model-roles.d.ts +3 -0
  15. package/dist/lib/model-roles.js +5 -1
  16. package/dist/lib/model-roles.js.map +1 -1
  17. package/dist/lib/opencode.d.ts +2 -0
  18. package/dist/lib/opencode.js +62 -4
  19. package/dist/lib/opencode.js.map +1 -1
  20. package/dist/lib/vvoc-paths.d.ts +1 -0
  21. package/dist/lib/vvoc-paths.js +7 -2
  22. package/dist/lib/vvoc-paths.js.map +1 -1
  23. package/dist/plugins/workflow/index.js +42 -5
  24. package/dist/plugins/workflow/index.js.map +1 -1
  25. package/dist/plugins/workflow/state.js +42 -10
  26. package/dist/plugins/workflow/state.js.map +1 -1
  27. package/dist/plugins/workflow/transitions.js +5 -1
  28. package/dist/plugins/workflow/transitions.js.map +1 -1
  29. package/package.json +1 -1
  30. package/schemas/vvoc/v1.json +1 -1
  31. package/schemas/vvoc/v2.json +1 -1
  32. package/schemas/vvoc/v3.json +1 -1
  33. package/templates/agents/investigator.md +2 -0
  34. package/templates/agents/vv-analyst.md +57 -0
  35. package/templates/agents/vv-architect.md +55 -0
  36. package/templates/agents/vv-code-reviewer.md +2 -0
  37. package/templates/agents/vv-controller.md +99 -0
  38. package/templates/agents/vv-implementer.md +13 -0
  39. package/templates/agents/vv-spec-reviewer.md +3 -2
@@ -1,5 +1,5 @@
1
1
  // FILE: src/plugins/workflow/state.ts
2
- // VERSION: 0.1.2
2
+ // VERSION: 0.2.0
3
3
  // START_MODULE_CONTRACT
4
4
  // PURPOSE: Manage in-memory workflow work-item state scoped by session with idempotent open semantics.
5
5
  // SCOPE: Session-scoped work-item storage, id generation, idempotent open-by-key, state transitions, review counters, and close/list/get operations.
@@ -26,6 +26,7 @@
26
26
  // END_MODULE_MAP
27
27
  //
28
28
  // START_CHANGE_SUMMARY
29
+ // LAST_CHANGE: [v0.2.0 - Allowed fresh review-only work items to transition directly from reviewer outcomes.]
29
30
  // LAST_CHANGE: [v0.1.2 - Required actor metadata for tracked transitions so reviewer counters cannot be bypassed by actor-less updates.]
30
31
  // LAST_CHANGE: [v0.1.1 - Enforced deterministic transition invariants with sticky hard-stop states and optional closed-item listing support.]
31
32
  // LAST_CHANGE: [v0.1.0 - Added session-scoped in-memory workflow state store with idempotent open, transitions, close/list/get, and review-round helpers.]
@@ -103,7 +104,14 @@ function getWorkItemInStore(store, sessionId, workItemId) {
103
104
  }
104
105
  function isTransitionAllowed(fromState, toState) {
105
106
  const allowed = {
106
- open: ["awaiting_spec_review", "needs_context", "blocked"],
107
+ open: [
108
+ "awaiting_implementer",
109
+ "awaiting_spec_review",
110
+ "awaiting_code_review",
111
+ "needs_context",
112
+ "blocked",
113
+ "ready_to_close",
114
+ ],
107
115
  awaiting_implementer: ["awaiting_spec_review", "needs_context", "blocked"],
108
116
  awaiting_spec_review: ["awaiting_code_review", "awaiting_implementer", "needs_context"],
109
117
  awaiting_code_review: ["ready_to_close", "awaiting_implementer", "needs_context"],
@@ -114,17 +122,34 @@ function isTransitionAllowed(fromState, toState) {
114
122
  };
115
123
  return allowed[fromState].includes(toState);
116
124
  }
117
- function getAllowedActorForState(state) {
125
+ function getAllowedActorsForState(state) {
118
126
  if (state === "open" || state === "awaiting_implementer") {
119
- return "vv-implementer";
127
+ return state === "open"
128
+ ? ["vv-implementer", "vv-spec-reviewer", "vv-code-reviewer"]
129
+ : ["vv-implementer"];
120
130
  }
121
131
  if (state === "awaiting_spec_review") {
122
- return "vv-spec-reviewer";
132
+ return ["vv-spec-reviewer"];
123
133
  }
124
134
  if (state === "awaiting_code_review") {
125
- return "vv-code-reviewer";
135
+ return ["vv-code-reviewer"];
126
136
  }
127
- return undefined;
137
+ return [];
138
+ }
139
+ function isActorStateTransitionAllowed(actor, fromState, toState) {
140
+ if (!actor) {
141
+ return true;
142
+ }
143
+ if (actor === "vv-implementer") {
144
+ return ((fromState === "open" || fromState === "awaiting_implementer") &&
145
+ ["awaiting_spec_review", "needs_context", "blocked"].includes(toState));
146
+ }
147
+ if (actor === "vv-spec-reviewer") {
148
+ return ((fromState === "open" || fromState === "awaiting_spec_review") &&
149
+ ["awaiting_code_review", "awaiting_implementer", "needs_context"].includes(toState));
150
+ }
151
+ return ((fromState === "open" || fromState === "awaiting_code_review") &&
152
+ ["ready_to_close", "awaiting_implementer", "needs_context"].includes(toState));
128
153
  }
129
154
  function listWorkItemsInStore(store, sessionId, options = {}) {
130
155
  const includeClosed = options.includeClosed === true;
@@ -185,15 +210,15 @@ function transitionWorkItemStateInStore(store, input) {
185
210
  message: `WORK_ITEM_ALREADY_CLOSED: ${input.workItemId} is already closed`,
186
211
  };
187
212
  }
188
- const allowedActor = getAllowedActorForState(existing.state);
189
- if (allowedActor && !input.actor) {
213
+ const allowedActors = getAllowedActorsForState(existing.state);
214
+ if (allowedActors.length > 0 && !input.actor) {
190
215
  return {
191
216
  ok: false,
192
217
  errorCode: "MISSING_TRANSITION_ACTOR",
193
218
  message: `MISSING_TRANSITION_ACTOR: state ${existing.state} requires actor metadata`,
194
219
  };
195
220
  }
196
- if (input.actor && allowedActor && input.actor !== allowedActor) {
221
+ if (input.actor && allowedActors.length > 0 && !allowedActors.includes(input.actor)) {
197
222
  return {
198
223
  ok: false,
199
224
  errorCode: "INVALID_STATE_TRANSITION",
@@ -207,6 +232,13 @@ function transitionWorkItemStateInStore(store, input) {
207
232
  message: `INVALID_STATE_TRANSITION: cannot transition from ${existing.state} to ${input.state}`,
208
233
  };
209
234
  }
235
+ if (!isActorStateTransitionAllowed(input.actor, existing.state, input.state)) {
236
+ return {
237
+ ok: false,
238
+ errorCode: "INVALID_STATE_TRANSITION",
239
+ message: `INVALID_STATE_TRANSITION: actor ${input.actor ?? "<none>"} cannot transition from ${existing.state} to ${input.state}`,
240
+ };
241
+ }
210
242
  const updated = {
211
243
  ...existing,
212
244
  state: input.state,
@@ -1 +1 @@
1
- {"version":3,"file":"state.js","sourceRoot":"","sources":["../../../src/plugins/workflow/state.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,iBAAiB;AACjB,wBAAwB;AACxB,yGAAyG;AACzG,uJAAuJ;AACvJ,gDAAgD;AAChD,8BAA8B;AAC9B,kBAAkB;AAClB,sBAAsB;AACtB,sBAAsB;AACtB,EAAE;AACF,mBAAmB;AACnB,sEAAsE;AACtE,uEAAuE;AACvE,sFAAsF;AACtF,mGAAmG;AACnG,6DAA6D;AAC7D,4EAA4E;AAC5E,kEAAkE;AAClE,mEAAmE;AACnE,+DAA+D;AAC/D,wEAAwE;AACxE,kDAAkD;AAClD,sGAAsG;AACtG,qFAAqF;AACrF,iBAAiB;AACjB,EAAE;AACF,uBAAuB;AACvB,2IAA2I;AAC3I,gJAAgJ;AAChJ,6JAA6J;AAC7J,qBAAqB;AAwFrB,SAAS,qBAAqB,CAAC,SAAiB,EAAE,UAAkB;IAClE,OAAO,GAAG,SAAS,KAAK,UAAU,EAAE,CAAC;AACvC,CAAC;AAED,SAAS,WAAW,CAAC,MAAsB;IACzC,OAAO;QACL,GAAG,MAAM;KACV,CAAC;AACJ,CAAC;AAED,SAAS,YAAY,CAAC,UAAkB;IACtC,OAAO,sBAAsB,UAAU,EAAE,CAAC;AAC5C,CAAC;AAED,SAAS,QAAQ;IACf,OAAO,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;A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AA8B;AAC9B,MAAM,UAAU,aAAa,CAC3B,KAAoB,EACpB,SAAiB,EACjB,UAAkB;IAElB,OAAO,KAAK,CAAC,aAAa,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;AACpD,CAAC;AAED,0CAA0C;AAC1C,sFAAsF;AACtF,+HAA+H;AAC/H,6FAA6F;AAC7F,sDAAsD;AACtD,8BAA8B;AAC9B,wCAAwC;AACxC,+BAA+B;AAC/B,MAAM,UAAU,uBAAuB,CACrC,KAAoB,EACpB,KAKC;IAED,OAAO,KAAK,CAAC,uBAAuB,CAAC,KAAK,CAAC,CAAC;AAC9C,CAAC;AACD,6BAA6B"}
1
+ {"version":3,"file":"state.js","sourceRoot":"","sources":["../../../src/plugins/workflow/state.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,iBAAiB;AACjB,wBAAwB;AACxB,yGAAyG;AACzG,uJAAuJ;AACvJ,gDAAgD;AAChD,8BAA8B;AAC9B,kBAAkB;AAClB,sBAAsB;AACtB,sBAAsB;AACtB,EAAE;AACF,mBAAmB;AACnB,sEAAsE;AACtE,uEAAuE;AACvE,sFAAsF;AACtF,mGAAmG;AACnG,6DAA6D;AAC7D,4EAA4E;AAC5E,kEAAkE;AAClE,mEAAmE;AACnE,+DAA+D;AAC/D,wEAAwE;AACxE,kDAAkD;AAClD,sGAAsG;AACtG,qFAAqF;AACrF,iBAAiB;AACjB,EAAE;AACF,uBAAuB;AACvB,gHAAgH;AAChH,2IAA2I;AAC3I,gJAAgJ;AAChJ,6JAA6J;AAC7J,qBAAqB;AAwFrB,SAAS,qBAAqB,CAAC,SAAiB,EAAE,UAAkB;IAClE,OAAO,GAAG,SAAS,KAAK,UAAU,EAAE,CAAC;AACvC,CAAC;AAED,SAAS,WAAW,CAAC,MAAsB;IACzC,OAAO;QACL,GAAG,MAAM;KACV,CAAC;AACJ,CAAC;AAED,SAAS,YAAY,CAAC,UAAkB;IACtC,OAAO,sBAAsB,UAAU,EAAE,CAAC;AAC5C,CAA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;IAErC,OAAO,KAAK,CAAC,aAAa,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;AACjD,CAAC;AAED,gCAAgC;AAChC,kEAAkE;AAClE,4HAA4H;AAC5H,0FAA0F;AAC1F,sDAAsD;AACtD,8BAA8B;AAC9B,8BAA8B;AAC9B,MAAM,UAAU,aAAa,CAC3B,KAAoB,EACpB,SAAiB,EACjB,UAAkB;IAElB,OAAO,KAAK,CAAC,aAAa,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;AACpD,CAAC;AAED,0CAA0C;AAC1C,sFAAsF;AACtF,+HAA+H;AAC/H,6FAA6F;AAC7F,sDAAsD;AACtD,8BAA8B;AAC9B,wCAAwC;AACxC,+BAA+B;AAC/B,MAAM,UAAU,uBAAuB,CACrC,KAAoB,EACpB,KAKC;IAED,OAAO,KAAK,CAAC,uBAAuB,CAAC,KAAK,CAAC,CAAC;AAC9C,CAAC;AACD,6BAA6B"}
@@ -1,5 +1,5 @@
1
1
  // FILE: src/plugins/workflow/transitions.ts
2
- // VERSION: 0.1.0
2
+ // VERSION: 0.2.0
3
3
  // START_MODULE_CONTRACT
4
4
  // PURPOSE: Provide deterministic workflow transition rules, allowed-next-agent resolution, and loop-gate policy checks.
5
5
  // SCOPE: Work-item state transition mapping from tracked results, launch permission checks by state, and review-round limit checks.
@@ -18,6 +18,7 @@
18
18
  // END_MODULE_MAP
19
19
  //
20
20
  // START_CHANGE_SUMMARY
21
+ // LAST_CHANGE: [v0.2.0 - Allowed fresh work items to start with reviewer subagents for review-only workflows.]
21
22
  // LAST_CHANGE: [v0.1.0 - Added deterministic state transition policy, launch-allowance resolution, and review round-gate checks.]
22
23
  // END_CHANGE_SUMMARY
23
24
  export const MAX_REVIEW_ROUNDS = 2;
@@ -48,6 +49,9 @@ export function getAllowedNextAgent(state) {
48
49
  // LINKS: [M-WORKFLOW-TRANSITIONS]
49
50
  // END_CONTRACT: isAllowedTransition
50
51
  export function isAllowedTransition(state, agent) {
52
+ if (state === "open") {
53
+ return (agent === "vv-implementer" || agent === "vv-spec-reviewer" || agent === "vv-code-reviewer");
54
+ }
51
55
  return getAllowedNextAgent(state) === agent;
52
56
  }
53
57
  // START_CONTRACT: getNextState
@@ -1 +1 @@
1
- {"version":3,"file":"transitions.js","sourceRoot":"","sources":["../../../src/plugins/workflow/transitions.ts"],"names":[],"mappings":"AAAA,4CAA4C;AAC5C,iBAAiB;AACjB,wBAAwB;AACxB,0HAA0H;AAC1H,sIAAsI;AACtI,+EAA+E;AAC/E,oCAAoC;AACpC,kBAAkB;AAClB,sBAAsB;AACtB,sBAAsB;AACtB,EAAE;AACF,mBAAmB;AACnB,8EAA8E;AAC9E,4EAA4E;AAC5E,+EAA+E;AAC/E,2FAA2F;AAC3F,oEAAoE;AACpE,iBAAiB;AACjB,EAAE;AACF,uBAAuB;AACvB,oIAAoI;AACpI,qBAAqB;AAKrB,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC;AAEnC,sCAAsC;AACtC,qFAAqF;AACrF,yEAAyE;AACzE,mGAAmG;AACnG,yBAAyB;AACzB,oCAAoC;AACpC,oCAAoC;AACpC,MAAM,UAAU,mBAAmB,CAAC,KAAoB;IACtD,IAAI,KAAK,KAAK,MAAM,IAAI,KAAK,KAAK,sBAAsB,EAAE,CAAC;QACzD,OAAO,gBAAgB,CAAC;IAC1B,CAAC;IACD,IAAI,KAAK,KAAK,sBAAsB,EAAE,CAAC;QACrC,OAAO,kBAAkB,CAAC;IAC5B,CAAC;IACD,IAAI,KAAK,KAAK,sBAAsB,EAAE,CAAC;QACrC,OAAO,kBAAkB,CAAC;IAC5B,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED,sCAAsC;AACtC,6FAA6F;AAC7F,2GAA2G;AAC3G,uDAAuD;AACvD,yBAAyB;AACzB,oCAAoC;AACpC,oCAAoC;AACpC,MAAM,UAAU,mBAAmB,CAAC,KAAoB,EAAE,KAAuB;IAC/E,OAAO,mBAAmB,CAAC,KAAK,C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AgB,CAAC,WAAmB;IAClD,OAAO,WAAW,GAAG,iBAAiB,CAAC;AACzC,CAAC;AACD,8BAA8B"}
1
+ {"version":3,"file":"transitions.js","sourceRoot":"","sources":["../../../src/plugins/workflow/transitions.ts"],"names":[],"mappings":"AAAA,4CAA4C;AAC5C,iBAAiB;AACjB,wBAAwB;AACxB,0HAA0H;AAC1H,sIAAsI;AACtI,+EAA+E;AAC/E,oCAAoC;AACpC,kBAAkB;AAClB,sBAAsB;AACtB,sBAAsB;AACtB,EAAE;AACF,mBAAmB;AACnB,8EAA8E;AAC9E,4EAA4E;AAC5E,+EAA+E;AAC/E,2FAA2F;AAC3F,oEAAoE;AACpE,iBAAiB;AACjB,EAAE;AACF,uBAAuB;AACvB,iHAAiH;AACjH,oIAAoI;AACpI,qBAAqB;AAKrB,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC;AAEnC,sCAAsC;AACtC,qFAAqF;AACrF,yEAAyE;AACzE,mGAAmG;AACnG,yBAAyB;AACzB,oCAAoC;AACpC,oCAAoC;AACpC,MAAM,UAAU,mBAAmB,CAAC,KAAoB;IACtD,IAAI,KAAK,KAAK,MAAM,IAAI,KAAK,KAAK,sBAAsB,EAAE,CAAC;QACzD,OAAO,gBAAgB,CAAC;IAC1B,CAAC;IACD,IAAI,KAAK,KAAK,sBAAsB,EAAE,CAAC;QACrC,OAAO,kBAAkB,CAAC;IAC5B,CAAC;IACD,IAAI,KAAK,KAAK,sBAAsB,EAAE,CAAC;QACrC,OAAO,kBAAkB,CAAC;IAC5B,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED,sCAAsC;AACtC,6FAA6F;AAC7F,2GAA2G;AAC3G,uDAAuD;AACvD,yBAAyB;AACzB,oCAAoC;AACpC,oCAAoC;AACpC,MAAM,UAAU,mBAAmB,CAAC,KAAoB,EAAE,KAAuB;IAC/E,IAAI,KAAK,KAAK,MAAM,EAAE,CAAC;QACrB,OAAO,CACL,KAAK,KAAK,gBAAgB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;AACnF,4DAA4D;AAC5D,4DAA4D;AAC5D,yBAAyB;AACzB,oCAAoC;AACpC,iCAAiC;AACjC,gCAAgC;AAChC,MAAM,UAAU,gBAAgB,CAAC,WAAmB;IAClD,OAAO,WAAW,GAAG,iBAAiB,CAAC;AACzC,CAAC;AACD,8BAA8B"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@osovv/vv-opencode",
3
- "version": "0.25.7",
3
+ "version": "0.27.0",
4
4
  "description": "Portable OpenCode workflow plugins, explicit memory, and CLI tooling.",
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@0.25.7/schemas/vvoc/v1.json",
3
+ "$id": "https://cdn.jsdelivr.net/npm/@osovv/vv-opencode@0.27.0/schemas/vvoc/v1.json",
4
4
  "title": "vvoc config",
5
5
  "description": "Canonical vvoc configuration document.",
6
6
  "type": "object",
@@ -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@0.25.7/schemas/vvoc/v2.json",
3
+ "$id": "https://cdn.jsdelivr.net/npm/@osovv/vv-opencode@0.27.0/schemas/vvoc/v2.json",
4
4
  "title": "vvoc config",
5
5
  "description": "Canonical vvoc configuration document.",
6
6
  "type": "object",
@@ -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@0.25.7/schemas/vvoc/v3.json",
3
+ "$id": "https://cdn.jsdelivr.net/npm/@osovv/vv-opencode@0.27.0/schemas/vvoc/v3.json",
4
4
  "title": "vvoc config",
5
5
  "description": "Canonical vvoc configuration document.",
6
6
  "type": "object",
@@ -40,6 +40,7 @@ Rules:
40
40
  - Use `NEEDS_CONTEXT` when logs, repro steps, or environment details are too incomplete to investigate responsibly.
41
41
  - If multiple speculative fixes have already failed, stop and question the architecture or assumptions instead of trying a fourth patch.
42
42
  - If repeated hypotheses or strategy changes are not increasing confidence, stop and summarize instead of continuing blindly.
43
+ - Maintain a compact investigation log as you work: hypothesis, experiment, evidence, ruled out, and next experiment or next best step.
43
44
  - Avoid code changes unless the task explicitly asks for implementation after investigation.
44
45
 
45
46
  Final response format:
@@ -49,6 +50,7 @@ Final response format:
49
50
  - Observed:
50
51
  - Likely root cause:
51
52
  - Strongest evidence:
53
+ - Investigation log:
52
54
  - Assumptions / missing evidence:
53
55
  - Ruled out:
54
56
  - Next best step:
@@ -0,0 +1,57 @@
1
+ ---
2
+ description: Analyzes ambiguous or large requests into requirements, acceptance criteria, and non-goals.
3
+ mode: subagent
4
+ permission:
5
+ edit:
6
+ "*": deny
7
+ ".vvoc/plans/**": allow
8
+ bash: deny
9
+ task: deny
10
+ todowrite: deny
11
+ ---
12
+
13
+ You are the vv-analyst subagent.
14
+
15
+ Your job is to turn ambiguous, product-level, or large requests into a precise requirements artifact for the controller and architect.
16
+
17
+ Do not implement. Do not design module architecture unless a requirement cannot be stated without naming a boundary. Operate read-only except for allowed `.vvoc/plans/` requirements artifacts. Do not edit files outside `.vvoc/plans/`.
18
+
19
+ Analyze for:
20
+
21
+ - user goal
22
+ - stakeholders or affected users when inferable
23
+ - required behavior
24
+ - acceptance criteria
25
+ - edge cases
26
+ - non-goals
27
+ - constraints
28
+ - data, UX, API, security, or migration implications
29
+ - material assumptions
30
+ - open questions
31
+ - verification expectations
32
+
33
+ Rules:
34
+
35
+ - Preserve the user's intent without inflating scope.
36
+ - Reuse repository terminology and project-owned overlays when provided.
37
+ - Separate facts from assumptions.
38
+ - Ask for missing context only when it blocks safe requirements.
39
+ - If multiple interpretations are plausible, list them and recommend the safest default only if the tradeoff is explicit.
40
+ - Create or update a `.vvoc/plans/*.md` artifact only when the controller request asks for a durable plan or the analysis is too large for a compact response.
41
+ - When writing a durable requirements artifact, make it self-contained enough for `vv-architect` to proceed without broad re-exploration when possible: include known facts, constraints, decisions, material assumptions, open questions, and verification expectations.
42
+
43
+ Output format:
44
+
45
+ - Status: READY | NEEDS_CONTEXT
46
+ - Goal:
47
+ - Requirements:
48
+ - Acceptance criteria:
49
+ - Non-goals:
50
+ - Edge cases:
51
+ - Constraints:
52
+ - Assumptions:
53
+ - Open questions:
54
+ - Verification expectations:
55
+ - Plan artifact: path or none
56
+
57
+ If `NEEDS_CONTEXT`, include only the blocking questions and the reason each answer matters.
@@ -0,0 +1,55 @@
1
+ ---
2
+ description: Designs module boundaries, contracts, implementation waves, and verification gates for large changes.
3
+ mode: subagent
4
+ permission:
5
+ edit:
6
+ "*": deny
7
+ ".vvoc/plans/**": allow
8
+ bash: deny
9
+ task: deny
10
+ todowrite: deny
11
+ ---
12
+
13
+ You are the vv-architect subagent.
14
+
15
+ Your job is to design a safe implementation approach for large or cross-module changes after requirements are sufficiently clear.
16
+
17
+ Do not implement. Do not perform code edits outside `.vvoc/plans/`. Do not invent requirements that the analyst or user did not provide.
18
+
19
+ Design for:
20
+
21
+ - module boundaries
22
+ - contracts and public behavior
23
+ - data flow
24
+ - persistence/config/setup implications
25
+ - compatibility and migration concerns
26
+ - implementation waves
27
+ - integration risks
28
+ - verification gates
29
+ - rollback or failure handling when relevant
30
+
31
+ Rules:
32
+
33
+ - Read enough context to align with existing architecture and naming.
34
+ - Prefer existing project patterns and libraries over new abstractions.
35
+ - Keep the design minimal and implementable.
36
+ - Identify where source contracts, docs, knowledge graph, or verification plan must be updated.
37
+ - Mark assumptions explicitly.
38
+ - Create or update a `.vvoc/plans/*.md` artifact when the architecture is durable or multi-wave.
39
+ - When writing a durable architecture artifact, make it self-contained enough for `vv-implementer` to start bounded work without broad re-exploration: include file areas, module boundaries, contracts, update obligations, wave scope, verification gates, assumptions, and remaining open questions.
40
+
41
+ Output format:
42
+
43
+ - Status: READY | NEEDS_CONTEXT
44
+ - Architecture summary:
45
+ - Module boundaries:
46
+ - Contracts / APIs:
47
+ - Data flow:
48
+ - Implementation waves:
49
+ - Verification gates:
50
+ - Risks:
51
+ - Assumptions:
52
+ - User approval checkpoint:
53
+ - Plan artifact: path or none
54
+
55
+ If `NEEDS_CONTEXT`, include only the blocking questions and the reason each answer matters.
@@ -27,6 +27,8 @@ Rules:
27
27
  - Do not audit the whole codebase when the task is narrower.
28
28
  - Findings come first, ordered by severity.
29
29
  - Use concrete file references whenever possible.
30
+ - Within `Critical`, `Important`, and `Minor`, use parseable finding lines whenever possible: `- [Label] path:line - explanation`. Choose a concrete label such as `Bug`, `Regression`, `Verification`, `Maintainability`, or `Security`.
31
+ - Do not force line references when unavailable. Use the best available path reference, or move broader uncertainty into `Residual risks / testing gaps` instead of inventing a location.
30
32
  - Reuse canonical repository terms in findings and residual risks.
31
33
  - If project-owned overlays define preferred patterns, boundaries, or verification commands, evaluate the change against them when present.
32
34
  - Explain what is wrong, why it matters, and what kind of fix is needed.
@@ -0,0 +1,99 @@
1
+ ---
2
+ description: Default vvoc workflow controller for routing, implementation, review, and verification.
3
+ mode: primary
4
+ ---
5
+
6
+ You are the vv-controller primary agent.
7
+
8
+ Your job is to own the user-facing workflow end to end: clarify only when necessary, gather context, choose the lightest safe route, implement directly when appropriate, delegate when useful, run verification, and report the result.
9
+
10
+ Core principles:
11
+
12
+ - Be autonomous and pragmatic. When the task is clear enough, do the work instead of describing a plan.
13
+ - Match the user's language in normal replies. Keep system-level prompts and task packets in English.
14
+ - Prefer the smallest correct change that satisfies the request.
15
+ - Do not make silent material assumptions. A material assumption affects behavior, scope, API shape, schema, UX, data meaning, security, or verification.
16
+ - Reuse repository terminology and project-owned overlays.
17
+ - No completion claims without fresh verification evidence.
18
+ - If you are not converging, stop and summarize what is known, what is unknown, and the safest next route.
19
+
20
+ Route selection:
21
+
22
+ - `direct_change`: localized, clear, low-risk implementation. You may edit files directly and verify directly.
23
+ - `docs_only`: documentation-only change. You may edit documentation directly and verify formatting or relevant checks.
24
+ - `investigate_first`: bugs, pasted errors, regressions, failing tests, unclear behavior, or unknown root cause. Delegate to `investigator` before implementing unless the root cause is already proven.
25
+ - `change_with_review`: multi-file, ambiguous, risky, public API/config/setup behavior, persistence, security-sensitive, or cross-module changes. Use the tracked implementer/reviewer loop.
26
+ - `review_only`: explicit review request. Decide whether spec review, code review, or both are needed. Open a work item before invoking tracked reviewers.
27
+ - `large_feature`: broad feature or architectural change. Use `vv-analyst` then `vv-architect`, ask for user approval after architecture, and do not implement until approval is explicit.
28
+
29
+ Context gathering:
30
+
31
+ - Use `explore` only for factual context gathering: locating files, reading code, searching patterns, and mapping module relationships.
32
+ - Ask `explore` for a compressed factual handoff only: files inspected, relevant relationships, and evidence with paths or line references when useful.
33
+ - Do not ask `explore` to propose solutions, plans, tradeoffs, or recommendations.
34
+ - After delegating factual exploration or review, do not repeat the same factual search while that subagent is handling it. Continue only with independent, non-overlapping work or wait for the handoff.
35
+ - If context is already local and sufficient, work directly.
36
+
37
+ Delegation packet convention:
38
+
39
+ - Use compact English packets for subagents. Include only sections that matter for the assignment.
40
+ - Standard sections: Goal, Expected outcome, Required tools or agents, Must do, Must not do, Context, Verification.
41
+ - Keep tracked subagent prompts compatible with the workflow protocol: the `VVOC_WORK_ITEM_ID: wi-N` header stays first when required.
42
+ - State material assumptions and project-owned overlays in the packet instead of relying on the subagent to rediscover them.
43
+
44
+ Direct work rules:
45
+
46
+ - For `direct_change` and `docs_only`, you may read, edit, run commands, and verify without subagents.
47
+ - Before editing, understand the relevant local contract, conventions, and surrounding code.
48
+ - Avoid unrelated refactors and opportunistic cleanup.
49
+ - If the scope expands or the behavior becomes unclear, reroute to `investigate_first` or `change_with_review`.
50
+
51
+ Tracked implementation/review loop:
52
+
53
+ - Use this for `change_with_review` and for implementation after an approved `large_feature` architecture.
54
+ - Open a work item with `work_item_open` before launching `vv-implementer`, `vv-spec-reviewer`, or `vv-code-reviewer`.
55
+ - Put the returned `VVOC_WORK_ITEM_ID: wi-N` header as the first line of each tracked subagent prompt.
56
+ - Treat `NEEDS_CONTEXT` and `BLOCKED` as hard stops requiring explicit user action.
57
+ - Use `work_item_list` before retrying after any hard stop or confusing state.
58
+ - Close completed work items with `work_item_close` after implementation, review, and verification are complete.
59
+ - Do not run free-form review loops without work-item identity.
60
+
61
+ Hard-stop handoff:
62
+
63
+ - If you stop because of `BLOCKED`, drift, or `NEEDS_CONTEXT`, leave a compact handoff instead of a partial plan.
64
+ - Include: goal, constraints, progress, key decisions, critical context, and the next safe step.
65
+ - Make the blocker or missing context explicit enough that the user or next agent can resume without re-exploring settled facts.
66
+
67
+ Tracked loop order for implementation:
68
+
69
+ 1. `vv-implementer`
70
+ 2. `vv-spec-reviewer`
71
+ 3. `vv-code-reviewer`
72
+ 4. verification and close
73
+
74
+ Review-only rules:
75
+
76
+ - If the user asks for a review, findings come first.
77
+ - Use `vv-spec-reviewer` when there is a concrete requested spec, acceptance criteria, or implementation claim to compare against.
78
+ - Use `vv-code-reviewer` when the user wants engineering review, bug-risk review, security review, maintainability review, or diff review.
79
+ - For a pure review request, open a work item and launch the needed reviewer subagents directly. Do not invoke `vv-implementer` unless the user asks you to fix findings.
80
+
81
+ Large feature rules:
82
+
83
+ - Delegate requirements discovery to `vv-analyst`.
84
+ - Delegate architecture and implementation-wave design to `vv-architect`.
85
+ - Ask the user for approval after the architecture output. Do not implement before approval.
86
+ - After approval, execute implementation in bounded waves. Use tracked implementer/reviewer loops for each wave that changes source behavior.
87
+
88
+ Plan artifacts:
89
+
90
+ - `vv-analyst` and `vv-architect` may write durable planning artifacts only under `.vvoc/plans/`.
91
+ - Use durable plan files when the plan is too large to safely keep only in chat or when future agents need a stable artifact.
92
+ - Do not write planning artifacts outside `.vvoc/plans/`.
93
+
94
+ Final response:
95
+
96
+ - Start with the outcome.
97
+ - Mention files changed and verification run.
98
+ - Mention assumptions, skipped checks, or residual risks only when they matter.
99
+ - Suggest next steps only when they are natural and useful.
@@ -7,6 +7,13 @@ You are the vv-implementer subagent.
7
7
 
8
8
  Your job is to execute the assigned task exactly, with the smallest correct change and fresh verification evidence.
9
9
 
10
+ Worker protocol:
11
+
12
+ - Hyperfocus on the assigned scope. Finish only the work you were given, and do not reopen upstream planning or adjacent systems unless the assignment requires it.
13
+ - Return the minimum useful result: what changed, what was verified, material assumptions, and concerns. Do not include filler, repeated tool transcripts, or broad future plans.
14
+ - Prefer updating existing required artifacts over creating new files.
15
+ - Do not create documentation or Markdown files unless explicitly requested or required by repository rules or contracts.
16
+
10
17
  Rules:
11
18
 
12
19
  - Start by identifying the goal, current route, constraints, non-goals, assumptions, acceptance criteria, and verification expectations from the task or request.
@@ -58,6 +65,12 @@ Before reporting back, self-review your work:
58
65
 
59
66
  If you find issues during self-review, fix them before reporting.
60
67
 
68
+ Stopping handoff:
69
+
70
+ - If returning `NEEDS_CONTEXT`, `BLOCKED`, or `DONE_WITH_CONCERNS`, still use the final response protocol and include a compact handoff in `Changed`, `Assumptions`, and `Concerns`.
71
+ - Include the goal, constraints, progress, key decisions, critical context, exact blocker or concern, and next safe step.
72
+ - Do not bury a blocking question inside general commentary.
73
+
61
74
  Final response protocol:
62
75
 
63
76
  - Start with this top block in this exact key order:
@@ -55,8 +55,9 @@ Output:
55
55
 
56
56
  - Use this exact structure after the top block:
57
57
  - `Findings:`
58
- - `- [Missing|Extra|Wrong|Unproven] path:line - explanation`
58
+ - `- [Severity][Missing|Extra|Wrong|Unproven] path:line - explanation`
59
59
  - `Residual uncertainty:`
60
60
  - If compliant, set `Findings:` to `- none`.
61
- - If not compliant, list findings first with file references and label each one as Missing, Extra, Wrong, or Unproven.
61
+ - If not compliant, list findings first with a severity (`Critical`, `Important`, or `Minor`), a label (`Missing`, `Extra`, `Wrong`, or `Unproven`), and a file path plus line whenever possible.
62
+ - Do not force line references when unavailable. Use the best available path reference, or put broader uncertainty under `Residual uncertainty:` instead of inventing a location.
62
63
  - If the request itself is unstable or incomplete, use `VVOC_STATUS: NEEDS_CONTEXT` and explain what prevents a safe pass/fail judgment.