Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

feat(apps): add slash-do agent operations panel to app detail pages

Adam Eivy278625922962
diff --git a/.changelog/NEXT.md b/.changelog/NEXT.md
index 3dbb5e781b..7c6f71f167 100644
--- a/.changelog/NEXT.md
+++ b/.changelog/NEXT.md
@@ -2,6 +2,9 @@
## Added
+- Slash-do agent operations panel on app detail Overview tab — buttons for `/do:push`, `/do:review`, `/do:release`, `/do:better`, and `/do:better-swift` that queue CoS agent tasks with the full command instructions
+- Multi-line task context now renders as a dedicated `### Task Context` section in agent prompts instead of inline
+
## Changed
## Fixed
diff --git a/client/src/components/apps/SlashDoPanel.jsx b/client/src/components/apps/SlashDoPanel.jsx
new file mode 100644
index 0000000000..9bd977555f
--- /dev/null
+++ b/client/src/components/apps/SlashDoPanel.jsx
@@ -0,0 +1,56 @@
+import { useState } from 'react';
+import { Terminal, Loader2 } from 'lucide-react';
+import toast from '../ui/Toast';
+import { NON_PM2_TYPES } from './constants';
+import * as api from '../../services/api';
+
+const SLASHDO_COMMANDS = [
+ { id: 'push', label: '/do:push', description: 'Commit and push all work', classes: 'bg-port-success/20 text-port-success hover:bg-port-success/30 border-port-success/30' },
+ { id: 'review', label: '/do:review', description: 'Deep code review', classes: 'bg-port-accent/20 text-port-accent hover:bg-port-accent/30 border-port-accent/30' },
+ { id: 'release', label: '/do:release', description: 'Create a release PR', classes: 'bg-purple-500/20 text-purple-400 hover:bg-purple-500/30 border-purple-500/30' },
+ { id: 'better', label: '/do:better', description: 'DevSecOps audit', classes: 'bg-port-warning/20 text-port-warning hover:bg-port-warning/30 border-port-warning/30', hideForSwift: true },
+ { id: 'better-swift', label: '/do:better-swift', description: 'SwiftUI DevSecOps audit', classes: 'bg-port-warning/20 text-port-warning hover:bg-port-warning/30 border-port-warning/30', swiftOnly: true }
+];
+
+export default function SlashDoPanel({ appId, appType }) {
+ const [loading, setLoading] = useState(null);
+ const isXcodeApp = NON_PM2_TYPES.has(appType);
+
+ const commands = SLASHDO_COMMANDS.filter(cmd => {
+ if (cmd.swiftOnly && !isXcodeApp) return false;
+ if (cmd.hideForSwift && isXcodeApp) return false;
+ return true;
+ });
+
+ const handleRun = async (command) => {
+ setLoading(command.id);
+ const result = await api.createSlashdoTask(command.id, appId).catch(err => {
+ toast.error(err.message || `Failed to queue ${command.label}`);
+ return null;
+ });
+ setLoading(null);
+ if (result) {
+ toast.success(`Queued ${command.label} agent task`);
+ }
+ };
+
+ return (
+ <div>
+ <div className="text-xs text-gray-500 uppercase tracking-wide mb-2">Agent Operations</div>
+ <div className="flex flex-wrap gap-2">
+ {commands.map(cmd => (
+ <button
+ key={cmd.id}
+ onClick={() => handleRun(cmd)}
+ disabled={!!loading}
+ title={cmd.description}
+ className={`px-3 py-1.5 ${cmd.classes} rounded-lg text-xs flex items-center gap-1.5 disabled:opacity-50 transition-colors border`}
+ >
+ {loading === cmd.id ? <Loader2 size={14} className="animate-spin" /> : <Terminal size={14} />}
+ {cmd.label}
+ </button>
+ ))}
+ </div>
+ </div>
+ );
+}
diff --git a/client/src/components/apps/tabs/OverviewTab.jsx b/client/src/components/apps/tabs/OverviewTab.jsx
index 41e882d87a..ec5ffe7104 100644
--- a/client/src/components/apps/tabs/OverviewTab.jsx
+++ b/client/src/components/apps/tabs/OverviewTab.jsx
@@ -6,6 +6,7 @@ import BrailleSpinner from '../../BrailleSpinner';
import KanbanBoard from '../../KanbanBoard';
import EditAppModal from '../EditAppModal';
import ActivityLog from '../ActivityLog';
+import SlashDoPanel from '../SlashDoPanel';
import { useAppOperation } from '../../../hooks/useAppOperation';
import * as api from '../../../services/api';
@@ -176,6 +177,9 @@ export default function OverviewTab({ app, onRefresh }) {
</div>
)}
+ {/* Agent Operations */}
+ <SlashDoPanel appId={app.id} appType={app.type} />
+
{/* Quick Actions */}
<div className="flex flex-wrap gap-2 pt-2">
<button
diff --git a/client/src/services/apiAgents.js b/client/src/services/apiAgents.js
index c8be819ab0..4b08e8b2d3 100644
--- a/client/src/services/apiAgents.js
+++ b/client/src/services/apiAgents.js
@@ -54,6 +54,10 @@ export const addCosTask = (task) => request('/cos/tasks', {
method: 'POST',
body: JSON.stringify(task)
});
+export const createSlashdoTask = (command, app) => request('/cos/tasks/slashdo', {
+ method: 'POST',
+ body: JSON.stringify({ command, app })
+});
export const enhanceCosTaskPrompt = (data) => request('/cos/tasks/enhance', {
method: 'POST',
body: JSON.stringify(data)
diff --git a/server/routes/cosTaskRoutes.js b/server/routes/cosTaskRoutes.js
index dc400a6d04..15e216cc5e 100644
--- a/server/routes/cosTaskRoutes.js
+++ b/server/routes/cosTaskRoutes.js
@@ -6,8 +6,17 @@ import { Router } from 'express';
import * as cos from '../services/cos.js';
import * as taskWatcher from '../services/taskWatcher.js';
import { enhanceTaskPrompt } from '../services/taskEnhancer.js';
+import { loadSlashdoCommand } from '../services/subAgentSpawner.js';
import { asyncHandler, ServerError } from '../lib/errorHandler.js';
+const SLASHDO_COMMANDS = {
+ push: { label: 'Push', description: 'Commit and push all work with changelog' },
+ review: { label: 'Review', description: 'Deep code review of changed files' },
+ release: { label: 'Release', description: 'Create a release PR' },
+ better: { label: 'Better', description: 'Unified DevSecOps audit and remediation' },
+ 'better-swift': { label: 'Better Swift', description: 'SwiftUI DevSecOps audit and remediation' }
+};
+
const router = Router();
// GET /api/cos/tasks - Get all tasks
@@ -58,6 +67,34 @@ router.post('/tasks/enhance', asyncHandler(async (req, res) => {
res.json(result);
}));
+// POST /api/cos/tasks/slashdo - Create a task from a slashdo command
+router.post('/tasks/slashdo', asyncHandler(async (req, res) => {
+ const { command, app } = req.body;
+
+ if (!command || !SLASHDO_COMMANDS[command]) {
+ throw new ServerError(`Invalid slashdo command. Allowed: ${Object.keys(SLASHDO_COMMANDS).join(', ')}`, { status: 400, code: 'VALIDATION_ERROR' });
+ }
+ if (!app) {
+ throw new ServerError('App ID is required', { status: 400, code: 'VALIDATION_ERROR' });
+ }
+
+ const content = await loadSlashdoCommand(command);
+ if (!content) {
+ throw new ServerError(`Failed to load slashdo command: ${command}`, { status: 500, code: 'COMMAND_LOAD_FAILED' });
+ }
+
+ const meta = SLASHDO_COMMANDS[command];
+ const description = `Run /do:${command} — ${meta.description}`;
+ const taskData = { description, app, context: content, useWorktree: true, openPR: true, simplify: false, reviewLoop: false };
+ const result = await cos.addTask(taskData, 'user');
+
+ if (result?.duplicate) {
+ throw new ServerError(`A task with this description is already ${result.status}`, { status: 409, code: 'DUPLICATE_TASK' });
+ }
+
+ res.json(result);
+}));
+
// POST /api/cos/tasks - Add a new task
router.post('/tasks', asyncHandler(async (req, res) => {
const { description, priority, context, model, provider, app, type = 'user', approvalRequired, screenshots, attachments, position = 'bottom', createJiraTicket, jiraTicketId, jiraTicketUrl, useWorktree, openPR, simplify, reviewLoop } = req.body;
diff --git a/server/services/agentPromptBuilder.js b/server/services/agentPromptBuilder.js
index c97dd3015f..3c8bae6c31 100644
--- a/server/services/agentPromptBuilder.js
+++ b/server/services/agentPromptBuilder.js
@@ -291,7 +291,7 @@ You are an autonomous agent working on behalf of the Chief of Staff.
- **ID**: ${task.id}
- **Priority**: ${task.priority}
- **Description**: ${task.description}
-${task.metadata?.context ? `- **Context**: ${task.metadata.context}` : ''}
+${task.metadata?.context ? (task.metadata.context.includes('\n') ? `\n### Task Context\n\n${task.metadata.context}` : `- **Context**: ${task.metadata.context}`) : ''}
${task.metadata?.app ? `- **Target App**: ${task.metadata.app}\n- **Target App Directory**: ${workspaceDir}` : ''}
${Array.isArray(task.metadata?.screenshots) && task.metadata.screenshots.length > 0 ? `- **Screenshots**: ${task.metadata.screenshots.join(', ')}` : ''}
${worktreeSection}