opencode-codegraph 0.1.28 → 0.1.30

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.30 - 2026-03-21
4
+
5
+ - align git-oriented guidance and workflow-transition rendering with the shared workflow guidance block
6
+
7
+ ## 0.1.29 - 2026-03-21
8
+
9
+ - align workflow-transition formatting with the shared guidance block so git-oriented guidance uses the same normalized renderer as other status surfaces
10
+
3
11
  ## 0.1.28 - 2026-03-21
4
12
 
5
13
  - surface primary issue and recovery sequence in plugin workflow summaries so competing blockers are shown in a prioritized order
package/README.md CHANGED
@@ -127,6 +127,8 @@ Place in `.opencode/commands/`:
127
127
  Across status-oriented surfaces, the plugin is converging on one shared summary contract:
128
128
 
129
129
  - workflow state
130
+ - primary issue
131
+ - recovery sequence
130
132
  - blockers
131
133
  - warnings
132
134
  - what improved
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-codegraph",
3
- "version": "0.1.28",
3
+ "version": "0.1.30",
4
4
  "description": "OpenCode plugin for CodeGraph CPG-powered code analysis",
5
5
  "type": "module",
6
6
  "main": "src/index.ts",
package/src/index.ts CHANGED
@@ -68,8 +68,8 @@ const codegraphPlugin: Plugin = async (input) => {
68
68
  }
69
69
 
70
70
  const workflowTransition = (status: Record<string, unknown>) => {
71
- const { workflowState, nextAction, nextCommand } = workflowFields(status)
72
- const message = formatWorkflowStateTransition(lastWorkflowState, workflowState, nextAction, nextCommand)
71
+ const message = formatWorkflowStateTransition(lastWorkflowState, status as any)
72
+ const { workflowState } = workflowFields(status)
73
73
  if (workflowState) {
74
74
  lastWorkflowState = workflowState
75
75
  }
package/src/util.ts CHANGED
@@ -119,6 +119,14 @@ function workflowSummaryLines(snapshot: DogfoodStatusSnapshot): string[] {
119
119
  }
120
120
  return lines
121
121
  }
122
+
123
+ function formatSummaryBlock(title: string, snapshot: DogfoodStatusSnapshot): string | null {
124
+ const lines = workflowSummaryLines(snapshot)
125
+ if (!lines.length) {
126
+ return null
127
+ }
128
+ return [title, "", ...lines].join("\n")
129
+ }
122
130
 
123
131
  /**
124
132
  * Extract file references from message parts.
@@ -515,37 +523,42 @@ export function formatDogfoodStatusSummary(snapshot: DogfoodStatusSnapshot): str
515
523
  }
516
524
 
517
525
  export function formatWorkflowGuidanceBlock(snapshot: DogfoodStatusSnapshot): string | null {
518
- const lines = workflowSummaryLines(snapshot)
519
-
520
- if (!lines.length) {
521
- return null
522
- }
523
-
524
- return ["## CodeGraph Workflow Guidance", "", ...lines].join("\n")
526
+ return formatSummaryBlock("## CodeGraph Workflow Guidance", snapshot)
525
527
  }
526
528
 
527
529
  export function formatWorkflowStateTransition(
528
530
  previousState: string | null,
529
- currentState: string | null,
530
- nextAction: string | undefined,
531
- nextCommand: string | undefined,
531
+ snapshot: DogfoodStatusSnapshot,
532
532
  ): string | null {
533
+ const currentState = snapshot.workflow_state || null
533
534
  if (!previousState || !currentState || previousState === currentState) {
534
535
  return null
535
536
  }
536
537
 
538
+ const nextAction = snapshot.recommended_next_action
539
+ const nextCommand = snapshot.recommended_command
540
+ const primaryIssue = snapshot.primary_issue
541
+ const blockers = Array.isArray(snapshot.blockers) ? snapshot.blockers.filter(Boolean) : []
542
+
537
543
  const lines = [
538
544
  "## CodeGraph Workflow Update",
539
545
  "",
540
546
  `- Workflow state changed: ${previousState} -> ${currentState}`,
541
547
  ]
542
548
 
549
+ if (primaryIssue) {
550
+ lines.push(`- Primary issue: ${primaryIssue}`)
551
+ }
552
+
543
553
  if (nextAction) {
544
554
  lines.push(`- Next action: ${nextAction}`)
545
555
  }
546
556
  if (nextCommand) {
547
557
  lines.push(`- Suggested command: ${nextCommand}`)
548
558
  }
559
+ if (blockers.length) {
560
+ lines.push(`- Blockers: ${blockers.join("; ")}`)
561
+ }
549
562
  return lines.join("\n")
550
563
  }
551
564
 
@@ -568,8 +581,7 @@ export function formatAfterTestGuidance(
568
581
  lines.push("- Suggested command: rerun the failing tests after you fix them")
569
582
  return lines.join("\n")
570
583
  }
571
- lines.push(...workflowSummaryLines(snapshot))
572
- return lines.join("\n")
584
+ return formatSummaryBlock("## CodeGraph After-Test Guidance", snapshot)
573
585
  }
574
586
 
575
587
  // File extensions recognized as source code