Feat v0.3.6 demo workflows + interactive demo
Four example workflow packages proving the engine end-to-end: - Bug Report Triage: public entry, branch routing, SLA timer - Employee Onboarding: Starlark automated stages, signoff gate - Content Approval: multi-party signoff, revision cycle loop - Webhook Notifier: http.post, connections fallback, delivery logging Demo surface at /s/workflow-demo with cards, stage diagrams, Starlark viewer, API examples, active/published status, and copyable public links. Engine fixes: started_by in automated context, sla_seconds in package installer, parseSnapshotStages for wrapped/legacy formats. Platform fixes: extension SDK boot in base.html (Preact globals + boot()), admin teams paginated response extraction, workflow adoption endpoint (POST /teams/:teamId/workflows/:id/adopt), team-admin copyable link. Review pass remains on roadmap for remaining UI polish. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
50
packages/bug-report-triage/README.md
Normal file
50
packages/bug-report-triage/README.md
Normal file
@@ -0,0 +1,50 @@
|
||||
# Bug Report Triage
|
||||
|
||||
Public bug report submission with severity-based routing and SLA timers.
|
||||
|
||||
## Features
|
||||
|
||||
- **Public entry** — anyone with the link can submit a bug report (no auth)
|
||||
- **Progressive fieldsets** — two-step form (Report Details + Reproduction)
|
||||
- **Branch rules** — severity=critical routes to senior queue, otherwise standard queue
|
||||
- **SLA timer** — critical fixes have a 1-hour SLA (fires `workflow.sla_breach` event)
|
||||
- **Team assignment** — classify, fix, and verify stages are team-scoped
|
||||
|
||||
## Stage Flow
|
||||
|
||||
```
|
||||
[submit] → [classify] → [fix-critical] → [verify]
|
||||
public team ↘ [fix-normal] ↗ team
|
||||
team
|
||||
```
|
||||
|
||||
## Installation
|
||||
|
||||
```bash
|
||||
# Via admin API
|
||||
curl -X POST $BASE/api/v1/admin/packages/install \
|
||||
-H "Authorization: Bearer $TOKEN" \
|
||||
-F "file=@packages/bug-report-triage"
|
||||
```
|
||||
|
||||
## API Walkthrough
|
||||
|
||||
```bash
|
||||
# 1. Start public instance (no auth)
|
||||
curl -X POST $BASE/api/v1/public/workflows/$WF_ID/start \
|
||||
-H 'Content-Type: application/json' \
|
||||
-d '{"data": {"reporter_email": "user@example.com", "summary": "Login broken", "component": "ui", "severity": "critical", "steps": "1. Click login", "expected": "Login page", "actual": "500 error"}}'
|
||||
|
||||
# 2. Resume (check status)
|
||||
curl $BASE/api/v1/public/workflows/resume/$ENTRY_TOKEN
|
||||
|
||||
# 3. Team claims classify assignment
|
||||
curl -X POST $BASE/api/v1/teams/$TEAM/assignments/$ASSIGN_ID/claim \
|
||||
-H "Authorization: Bearer $TOKEN"
|
||||
|
||||
# 4. Advance classify (triggers branch rule)
|
||||
curl -X POST $BASE/api/v1/teams/$TEAM/instances/$INST/advance \
|
||||
-H "Authorization: Bearer $TOKEN" \
|
||||
-H 'Content-Type: application/json' \
|
||||
-d '{"data": {"severity": "critical", "notes": "Confirmed production issue"}}'
|
||||
```
|
||||
129
packages/bug-report-triage/manifest.json
Normal file
129
packages/bug-report-triage/manifest.json
Normal file
@@ -0,0 +1,129 @@
|
||||
{
|
||||
"id": "bug-report-triage",
|
||||
"title": "Bug Report Triage",
|
||||
"type": "workflow",
|
||||
"version": "0.1.0",
|
||||
"tier": "browser",
|
||||
"icon": "🐛",
|
||||
"author": "Switchboard Core",
|
||||
"description": "Public bug report submission with severity-based routing, team assignment, and SLA timers.",
|
||||
"permissions": [],
|
||||
|
||||
"workflow_definition": {
|
||||
"name": "Bug Report Triage",
|
||||
"slug": "bug-report-triage",
|
||||
"entry_mode": "public_link",
|
||||
"stages": [
|
||||
{
|
||||
"name": "submit",
|
||||
"ordinal": 0,
|
||||
"stage_mode": "form",
|
||||
"audience": "public",
|
||||
"stage_type": "simple",
|
||||
"auto_transition": false,
|
||||
"form_template": {
|
||||
"fieldsets": [
|
||||
{
|
||||
"label": "Report Details",
|
||||
"fields": [
|
||||
{ "key": "reporter_email", "label": "Your Email", "type": "text", "required": true },
|
||||
{ "key": "summary", "label": "Summary", "type": "text", "required": true },
|
||||
{ "key": "component", "label": "Component", "type": "select", "options": ["ui", "api", "database", "auth", "other"], "required": true },
|
||||
{ "key": "severity", "label": "Severity", "type": "select", "options": ["critical", "high", "medium", "low"], "required": true }
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": "Reproduction",
|
||||
"fields": [
|
||||
{ "key": "steps", "label": "Steps to Reproduce", "type": "textarea", "required": true },
|
||||
{ "key": "expected", "label": "Expected Behavior", "type": "textarea", "required": true },
|
||||
{ "key": "actual", "label": "Actual Behavior", "type": "textarea", "required": true }
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "classify",
|
||||
"ordinal": 1,
|
||||
"stage_mode": "form",
|
||||
"audience": "team",
|
||||
"stage_type": "simple",
|
||||
"auto_transition": false,
|
||||
"form_template": {
|
||||
"fieldsets": [
|
||||
{
|
||||
"label": "Classification",
|
||||
"fields": [
|
||||
{ "key": "severity", "label": "Confirmed Severity", "type": "select", "options": ["critical", "high", "medium", "low"], "required": true },
|
||||
{ "key": "notes", "label": "Triage Notes", "type": "textarea" }
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"branch_rules": [
|
||||
{ "field": "severity", "op": "eq", "value": "critical", "target_stage": "fix-critical" },
|
||||
{ "field": "severity", "op": "neq", "value": "critical", "target_stage": "fix-normal" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "fix-critical",
|
||||
"ordinal": 2,
|
||||
"stage_mode": "form",
|
||||
"audience": "team",
|
||||
"stage_type": "simple",
|
||||
"auto_transition": false,
|
||||
"sla_seconds": 3600,
|
||||
"form_template": {
|
||||
"fieldsets": [
|
||||
{
|
||||
"label": "Critical Fix",
|
||||
"fields": [
|
||||
{ "key": "fix_description", "label": "Fix Description", "type": "textarea", "required": true },
|
||||
{ "key": "commit_ref", "label": "Commit / PR Reference", "type": "text" }
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "fix-normal",
|
||||
"ordinal": 3,
|
||||
"stage_mode": "form",
|
||||
"audience": "team",
|
||||
"stage_type": "simple",
|
||||
"auto_transition": false,
|
||||
"form_template": {
|
||||
"fieldsets": [
|
||||
{
|
||||
"label": "Fix",
|
||||
"fields": [
|
||||
{ "key": "fix_description", "label": "Fix Description", "type": "textarea", "required": true },
|
||||
{ "key": "commit_ref", "label": "Commit / PR Reference", "type": "text" }
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "verify",
|
||||
"ordinal": 4,
|
||||
"stage_mode": "review",
|
||||
"audience": "team",
|
||||
"stage_type": "simple",
|
||||
"auto_transition": false,
|
||||
"form_template": {
|
||||
"fieldsets": [
|
||||
{
|
||||
"label": "Verification",
|
||||
"fields": [
|
||||
{ "key": "verified", "label": "Fix Verified?", "type": "select", "options": ["yes", "no"], "required": true },
|
||||
{ "key": "verification_notes", "label": "Notes", "type": "textarea" }
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user