Skip to content

Agent Workflow Output Audit Report

Date: January 11, 2026 Location: /dashboard/user/content-manager/agents/create Auditor: Claude Code


Executive Summary

The current agent workflow output handling displays raw JSON/text output with minimal contextual guidance. While the underlying data models properly store outputs to appropriate destinations (UserOpenai for text, SocialMediaPost for social media), the user experience lacks illustrative visualization of output relationships, clear next-step CTAs, and integration with existing workflow tools (calendar, kanban boards).


Current State Analysis

1. Output Storage Architecture ✅

The backend architecture is sound:

Agent Execution → Steps Complete → generated_assets JSON array
                  ┌─────────────────────────────────────┐
                  ↓                    ↓                  ↓
            Text Content      Social Media Posts    Structured Data
            (UserOpenai)      (SocialMediaPost)     (Step Results)

Files: - app/Extensions/ContentManager/System/Models/AgentExecution.php - Stores execution data - app/Extensions/ContentManager/System/Services/Capabilities/GenerateTextCapability.php - Saves to UserOpenai - app/Extensions/ContentManager/System/Services/Capabilities/PublishToSocialMediaCapability.php - Creates SocialMediaPost

2. Current Output Display ⚠️

Located at app/Extensions/ContentManager/resources/views/executions/show.blade.php (lines 534-573)

Current rendering:

@foreach($execution->generated_assets as $assetKey => $asset)
    <h4>{{ ucfirst(str_replace('_', ' ', $assetKey)) }}</h4>
    <div class="rounded bg-white p-3">
        @if(is_string($asset))
            <p class="whitespace-pre-wrap">{{ $asset }}</p>
        @elseif(is_array($asset))
            <pre>{{ json_encode($asset, JSON_PRETTY_PRINT) }}</pre>
        @endif
    </div>
@endforeach

Problems: - Raw text/JSON display only - No visual differentiation by asset type - No preview thumbnails or cards - No indication of where output was saved - No direct links to edit/manage the output

3. Comparison: Presentation Output (Good Example) ✅

The AiPresentation extension shows what a good output experience looks like:

File: app/Extensions/AiPresentation/resources/views/home/content-viewer-modal.blade.php

Features: - Rich slide-by-slide visualization - Collapsible speaker notes - Copy individual slides or all content - Export options (Markdown, JSON, HTML) - Dry Run feature for buyer Q&A practice - Clear visual hierarchy

4. Existing Workflow Tools (Not Integrated)

Social Media Calendar

File: app/Extensions/SocialMedia/resources/views/calendar.blade.php - FullCalendar-based scheduling view - Shows scheduled posts with platform icons - NOT integrated with agent-generated social posts

Marketplace Report Kanban

File: app/CustomExtensions/CloudMarketplace/resources/views/reports/kanban.blade.php - Drag-and-drop workflow management - Columns: Draft → Ready → Sent → Error - Model exists but not applied to content outputs


Gap Analysis

Feature Current State Ideal State Gap
Output Display Raw JSON/text Illustrative cards Critical
Asset Type Visualization Generic <pre> tags Type-specific previews High
Next Step CTAs Only "Rerun" / "Delete" Context-aware actions High
Calendar Integration None Auto-suggest scheduling Medium
Kanban Workflow None Draft → Review → Publish Medium
Output Relationships Not shown Visual relationship diagram High
Edit/Manage Links None Direct links to each asset Critical

Proposed Solution: Output Relationship Dashboard

Concept Diagram

┌─────────────────────────────────────────────────────────────────────┐
│                    Execution #123 - Content Series                   │
│                    "Q1 Product Launch Campaign"                      │
├─────────────────────────────────────────────────────────────────────┤
│                                                                      │
│  ┌──────────────────┐    ┌──────────────────┐    ┌────────────────┐ │
│  │ 📊 Presentation  │    │ 📱 Social Posts  │    │ 📧 Email Draft │ │
│  │ ───────────────  │    │ ───────────────  │    │ ──────────────│ │
│  │ 12 slides        │    │ 4 posts created  │    │ 1 email ready  │ │
│  │                  │    │                  │    │                │ │
│  │ [Preview] [Edit] │    │ [View] [Schedule]│    │ [Edit] [Send] │ │
│  │                  │    │                  │    │                │ │
│  │ Status: Draft    │    │ Status: Pending  │    │ Status: Draft  │ │
│  │ Location:        │    │ Location:        │    │ Location:      │ │
│  │ /presentations   │    │ /social-media    │    │ /documents     │ │
│  └──────────────────┘    └──────────────────┘    └────────────────┘ │
│                                                                      │
│  ─────────────────────────────────────────────────────────────────  │
│                        Quick Actions                                 │
│                                                                      │
│  [📅 Add to Calendar]  [📋 Send to Kanban]  [📤 Export All]         │
│                                                                      │
└─────────────────────────────────────────────────────────────────────┘

Asset Type Cards

Each output type should render with its own card component:

// Proposed asset type registry
$assetTypes = [
    'presentation' => [
        'icon' => 'tabler-presentation',
        'preview' => 'slide-thumbnail',
        'actions' => ['preview', 'edit', 'dry-run', 'export'],
        'destination' => '/dashboard/user/ai-presentation/{id}',
    ],
    'social_post' => [
        'icon' => 'tabler-brand-twitter',
        'preview' => 'post-card',
        'actions' => ['view', 'schedule', 'edit', 'delete'],
        'destination' => '/dashboard/user/social-media/posts/{id}',
        'calendar_integration' => true,
    ],
    'blog_article' => [
        'icon' => 'tabler-article',
        'preview' => 'article-excerpt',
        'actions' => ['preview', 'edit', 'seo-check', 'publish'],
        'destination' => '/dashboard/user/documents/{id}',
    ],
    'email_draft' => [
        'icon' => 'tabler-mail',
        'preview' => 'email-preview',
        'actions' => ['preview', 'edit', 'send-test', 'schedule'],
        'destination' => '/dashboard/user/email/{id}',
    ],
];

Phase 1: Output Relationship Visualization (Critical)

  1. Create OutputAssetCard component
  2. Location: resources/views/components/output-asset-card.blade.php
  3. Type-aware rendering with icons and previews
  4. Direct action buttons (Edit, Preview, Schedule)
  5. Status indicator (Draft, Pending, Scheduled, Published)
  6. Destination link showing where the asset lives

  7. Update execution show view

  8. Replace raw JSON display with asset cards
  9. Group related assets visually
  10. Show relationship lines for content series

Phase 2: Workflow Integration (High Priority)

  1. Add Calendar Quick-Action
  2. For social posts: "Add all to calendar" button
  3. Open scheduling modal with suggested dates
  4. Pre-populate from brand voice posting schedule

  5. Create Content Kanban Board

  6. New route: /dashboard/user/content-manager/kanban
  7. Columns: Generated → Review → Ready → Published
  8. Pull from UserOpenai model with agent execution context

Phase 3: Next-Step Guidance (Medium Priority)

  1. Context-Aware CTA Panel
  2. Based on output types, show relevant next steps:

    • Presentation: "Practice with Dry Run" or "Export to PowerPoint"
    • Social Posts: "Schedule Series" or "Preview on Calendar"
    • Blog: "Run SEO Check" or "Publish to WordPress"
  3. Onboarding Tooltips

  4. First-time users see guidance on what to do with outputs
  5. "Your content is saved as a draft. Click Edit to refine it."

Files to Modify/Create

Action File Description
CREATE resources/views/components/output-asset-card.blade.php Reusable asset card component
CREATE resources/views/components/output-relationship-panel.blade.php Output visualization panel
MODIFY app/Extensions/ContentManager/resources/views/executions/show.blade.php Replace raw output with cards
CREATE app/Extensions/ContentManager/resources/views/kanban.blade.php Content workflow kanban
MODIFY app/Extensions/ContentManager/System/Services/Capabilities/*.php Return asset metadata for cards
CREATE app/Extensions/ContentManager/Http/Controllers/KanbanController.php Kanban board controller

Success Metrics

After implementation, users should be able to:

  1. Immediately understand what was generated at a glance
  2. Navigate directly to each output for editing/management
  3. Take action without leaving the execution page (schedule, export, etc.)
  4. Track workflow through kanban stages
  5. Plan content using calendar integration

Reference: Similar Patterns in Codebase

  • Presentation Content Viewer: app/Extensions/AiPresentation/resources/views/home/content-viewer-modal.blade.php
  • Marketplace Kanban: app/CustomExtensions/CloudMarketplace/resources/views/reports/kanban.blade.php
  • Social Media Calendar: app/Extensions/SocialMedia/resources/views/calendar.blade.php

Next Steps

  1. Review this audit with product team
  2. Prioritize Phase 1 (Output Cards) for immediate impact
  3. Design mockups for Output Relationship Panel
  4. Schedule implementation sprint