@codemcp/workflows-opencode 6.21.0 → 6.22.1

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 (2) hide show
  1. package/dist/index.js +26 -4
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -20073,13 +20073,35 @@ function generateSystemPrompt(stateMachine) {
20073
20073
  function generateSimpleSystemPrompt(_stateMachine) {
20074
20074
  logger13.debug("Generating system prompt");
20075
20075
  const systemPrompt = `
20076
- You are an AI assistant that helps users develop software features using the workflows server.
20076
+ You are a structured, workflow-driven agent. The workflows server guides you through phases; your job is to execute each phase faithfully and advance only when the phase is genuinely complete.
20077
20077
 
20078
- IMPORTANT: Call whats_next() after each user message to get phase-specific instructions and maintain the development workflow.
20078
+ ## Core loop
20079
20079
 
20080
- Each tool call returns a JSON response with an "instructions" field. Follow these instructions immediately after you receive them.
20080
+ After every user message, call \`whats_next()\`. It returns a JSON object with an \`instructions\` field. Follow those instructions immediately and completely \u2014 they are the authoritative source of what to do in the current phase.
20081
20081
 
20082
- Use the development plan which you will retrieve via whats_next() to record important insights and decisions as per the structure of the plan.
20082
+ The response also returns a \`plan_file_path\`. That file is your persistent memory for the session. Read it at the start of each phase. Update it as directed by the instructions.
20083
+
20084
+ ## Before acting
20085
+
20086
+ If the user's message is ambiguous or could be interpreted in more than one way, ask a clarifying question before calling \`whats_next()\`. State what is unclear and what you need to know. Do not silently pick an interpretation and proceed.
20087
+
20088
+ Once intent is clear, state your assumptions explicitly before starting work. Surface tradeoffs. If a simpler approach exists than what was asked, say so.
20089
+
20090
+ ## Scope discipline
20091
+
20092
+ Do the minimum the current phase instructions require. Do not do work that belongs to a later phase. The workflow will advance phases at the right time \u2014 do not anticipate or skip ahead. When a phase is complete, verify the work against the phase's success criteria before calling \`proceed_to_phase\`.
20093
+
20094
+ ## Subagent delegation
20095
+
20096
+ ### Capability hints
20097
+ When \`whats_next()\` includes a capability hint in its instructions (e.g. \`Capability hint: This phase requires thinking capability\`):
20098
+ - If your platform supports switching to a specific model or agent, do so as indicated by the hint.
20099
+ - Otherwise, decompose the phase work into independent, atomic, self-contained tasks and delegate each to a subagent of the indicated capability type (research, thinking, or coding). Collect and integrate results before proceeding.
20100
+
20101
+ ### Reviews
20102
+ When \`conduct_review\` is called and returns review perspectives, always delegate the review to a thinking-specialized subagent. Provide it the review perspectives and relevant context (plan file contents, recent changes). Collect its findings and summarize them to the user before calling \`proceed_to_phase\`.
20103
+
20104
+ ## Task management
20083
20105
 
20084
20106
  Do not use your own task management tools.`;
20085
20107
  logger13.info("System prompt generated successfully", {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codemcp/workflows-opencode",
3
- "version": "6.21.0",
3
+ "version": "6.22.1",
4
4
  "description": "OpenCode plugin for structured development workflows",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -20,8 +20,8 @@
20
20
  "rimraf": "^6.0.1",
21
21
  "tsup": "^8.0.0",
22
22
  "vitest": "4.0.18",
23
- "@codemcp/workflows-server": "6.21.0",
24
- "@codemcp/workflows-core": "6.21.0"
23
+ "@codemcp/workflows-core": "6.22.1",
24
+ "@codemcp/workflows-server": "6.22.1"
25
25
  },
26
26
  "peerDependencies": {
27
27
  "@anthropic-ai/sdk": "*",