@zibby/workflow-templates 0.7.1 → 0.9.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.
- package/browser-test-automation/icon.png +0 -0
- package/code-analysis/icon.png +0 -0
- package/generate-test-cases/icon.png +0 -0
- package/index.js +353 -3
- package/notify-lark/icon.png +0 -0
- package/notify-lark/package.json +2 -1
- package/notify-notion/icon.png +0 -0
- package/notify-slack/icon.png +0 -0
- package/notify-slack/package.json +2 -1
- package/package.json +4 -1
- package/pipeline-supervisor/README.md +51 -0
- package/pipeline-supervisor/graph.mjs +75 -0
- package/pipeline-supervisor/icon.png +0 -0
- package/pipeline-supervisor/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +1 -0
- package/pipeline-supervisor/nodes/notify-node.js +162 -0
- package/pipeline-supervisor/nodes/propose-node.js +91 -0
- package/pipeline-supervisor/nodes/scan-pipelines-node.js +316 -0
- package/pipeline-supervisor/package.json +19 -0
- package/pipeline-supervisor/state.js +151 -0
- package/sentry-triage/graph.mjs +25 -18
- package/sentry-triage/icon.png +0 -0
- package/sentry-triage/nodes/dispatch-node.js +120 -59
- package/browser-test-automation/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +0 -1
- package/code-analysis/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +0 -1
|
Binary file
|
package/code-analysis/icon.png
CHANGED
|
Binary file
|
|
Binary file
|
package/index.js
CHANGED
|
@@ -173,7 +173,7 @@ export const TEMPLATES = {
|
|
|
173
173
|
description: 'Reusable child workflow — posts a structured Block Kit alert to a Slack channel. Dispatched by other workflows (Sentry triage, autofix, incident) via sub-graph.',
|
|
174
174
|
path: join(__dirname, 'notify-slack'),
|
|
175
175
|
defaultSlug: 'alert-slack',
|
|
176
|
-
deps: { zod: '^3.23.0' },
|
|
176
|
+
deps: { zod: '^3.23.0 || ^4.0.0', '@zibby/skills': '^0.1.28' },
|
|
177
177
|
features: [
|
|
178
178
|
'Single-node, no LLM — deterministic ~500ms post',
|
|
179
179
|
'Block Kit message with severity-coded color + emoji',
|
|
@@ -215,7 +215,7 @@ export const TEMPLATES = {
|
|
|
215
215
|
description: 'Reusable child workflow — posts a structured Interactive Card to a Lark / Feishu chat. Dispatched by other workflows via sub-graph.',
|
|
216
216
|
path: join(__dirname, 'notify-lark'),
|
|
217
217
|
defaultSlug: 'alert-lark',
|
|
218
|
-
deps: { zod: '^3.23.0' },
|
|
218
|
+
deps: { zod: '^3.23.0 || ^4.0.0', '@zibby/skills': '^0.1.28' },
|
|
219
219
|
features: [
|
|
220
220
|
'Single-node, no LLM',
|
|
221
221
|
'Lark Interactive Card with severity template (red/orange/yellow/grey)',
|
|
@@ -387,7 +387,357 @@ export const TEMPLATES = {
|
|
|
387
387
|
'Post the digest to our #leadership Lark group + #eng Slack channel',
|
|
388
388
|
],
|
|
389
389
|
},
|
|
390
|
-
}
|
|
390
|
+
},
|
|
391
|
+
|
|
392
|
+
// ── pipeline-supervisor: Zibby managing Zibby (read + propose + notify) ─
|
|
393
|
+
'pipeline-supervisor': {
|
|
394
|
+
name: 'pipeline-supervisor',
|
|
395
|
+
displayName: 'Pipeline Supervisor',
|
|
396
|
+
description: 'Zibby managing Zibby — a scheduled supervisor that scans the project\'s other pipelines, flags the ones failing or running slow, and posts human-reviewable improvement proposals (add a test gate / tweak a prompt / add an approval gate / drop a redundant step) to Slack or Lark. Read + propose + notify only; it never edits another workflow.',
|
|
397
|
+
path: join(__dirname, 'pipeline-supervisor'),
|
|
398
|
+
defaultSlug: 'pipeline-supervisor',
|
|
399
|
+
deps: { zod: '^3.23.0', '@zibby/skills': '^0.1.26' },
|
|
400
|
+
features: [
|
|
401
|
+
'3-node graph: scan_pipelines → propose_improvements → notify',
|
|
402
|
+
'Reads other pipelines\' executions via the Zibby REST API (user-PAT authed)',
|
|
403
|
+
'Per-pipeline health rollup: fail-rate, median duration, worst recent run',
|
|
404
|
+
'LLM proposes ONE concrete, evidence-backed change per flagged pipeline',
|
|
405
|
+
'Posts a review card to Slack OR Lark (chat_notify OR-group)',
|
|
406
|
+
'Read + propose + notify only — never edits another workflow\'s graph (safe L3)',
|
|
407
|
+
'Cron-friendly: e.g. daily, default lookbackHours=24 / minFailRate=0.4',
|
|
408
|
+
],
|
|
409
|
+
marketplace: {
|
|
410
|
+
slug: 'pipeline-supervisor',
|
|
411
|
+
tagline: 'Zibby watching Zibby — find your flaky pipelines and propose the fix.',
|
|
412
|
+
iconPrompt: [
|
|
413
|
+
'Hand-painted storybook illustration in a warm gouache style with soft brushwork and gentle painterly texture, featuring a friendly round robot-supervisor mascot character with two big kindly eyes and a rosy blush, wearing a tiny site-foreman hard hat in soft violet (#7553FF), standing on a little mint-green platform and holding a small glowing clipboard with a checkmark.',
|
|
414
|
+
'In front of the mascot float three small rounded pipeline-segment shapes connected left-to-right like a little assembly line: the first two glow calm green, the third glows a gentle warning amber with a tiny magnifier-free spotlight on it — reinforcing the "watch the pipelines, spot the broken one, suggest a fix" idea WITHOUT any literal magnifying glass.',
|
|
415
|
+
'Background is a soft sunrise gradient of pale peach at the top blending through buttercream into a wash of dusty lavender at the base, tying the warm scene to the violet hard hat; a few small fluffy pastel clouds float in for friendliness.',
|
|
416
|
+
'Centered composition with the robot-supervisor as the focal point, the three pipeline segments arrayed below-front; plenty of breathing room so the silhouette reads at 64×64.',
|
|
417
|
+
'Mood is warm, reassuring, helpful — a friendly watchful helper, NOT tactical or corporate or alarming.',
|
|
418
|
+
'Soft rounded square 1024×1024 canvas with a subtle paper-grain texture.',
|
|
419
|
+
'NO text, NO letters, NO photo-realism, NO sleek 3D render, NO magnifying glass, NO speech bubbles, NO dark navy or near-black backgrounds, NO literal Slack / Lark / Zibby wordmark.',
|
|
420
|
+
].join('\n'),
|
|
421
|
+
tags: ['On-call', 'Bug Triage', 'Notifications'],
|
|
422
|
+
capabilities: [
|
|
423
|
+
'Scheduled scan of every pipeline\'s recent run history',
|
|
424
|
+
'Flags pipelines by failure rate and slow-outlier duration',
|
|
425
|
+
'LLM proposes a specific, evidence-backed improvement per problem pipeline',
|
|
426
|
+
'Posts a review card to Slack or Lark — whichever your project has connected',
|
|
427
|
+
'Proposal-only: a human reviews and applies; the supervisor changes nothing',
|
|
428
|
+
],
|
|
429
|
+
conversationStarters: [
|
|
430
|
+
'Scan my pipelines from the last 24h and flag the ones failing 40%+ of runs',
|
|
431
|
+
'Which of my workflows is the flakiest, and what should I change?',
|
|
432
|
+
'Propose a fix for any pipeline that keeps failing on the same step',
|
|
433
|
+
'Only supervise my deploy pipelines and post proposals to #eng',
|
|
434
|
+
],
|
|
435
|
+
},
|
|
436
|
+
},
|
|
437
|
+
|
|
438
|
+
// ── ticket-triage: tracker-neutral triage building block ──────────
|
|
439
|
+
'ticket-triage': {
|
|
440
|
+
name: 'ticket-triage',
|
|
441
|
+
displayName: 'Ticket Triage',
|
|
442
|
+
description: 'Tracker-neutral triage building block — LLM-classifies one ticket (from any tracker) into a severity (CRITICAL…NOISE), a shouldAutofix decision, and a human summary. The first block of the bug-autofix pipeline; usable on its own.',
|
|
443
|
+
path: join(__dirname, 'ticket-triage'),
|
|
444
|
+
defaultSlug: 'ticket-triage',
|
|
445
|
+
deps: { zod: '^3.23.0' },
|
|
446
|
+
features: [
|
|
447
|
+
'Single LLM node: classify → { severity, shouldAutofix, summary }',
|
|
448
|
+
'Tracker-neutral input (Jira today; GitHub / Linear are extension points)',
|
|
449
|
+
'Severity rubric adapted from sentry-triage, with auditable reasoning',
|
|
450
|
+
'Tunable SEVERITY_THRESHOLD + free-form AUTOFIX_RULES per deploy',
|
|
451
|
+
'Designed to be dispatched as a sub-graph by the bug-autofix orchestrator',
|
|
452
|
+
],
|
|
453
|
+
marketplace: {
|
|
454
|
+
slug: 'ticket-triage',
|
|
455
|
+
tagline: 'Triage any ticket: how bad is it, and should a bot fix it?',
|
|
456
|
+
iconPrompt: [
|
|
457
|
+
'A clean, friendly flat-design app icon for "Ticket Triage" — a workflow that sorts incoming tickets by severity.',
|
|
458
|
+
'Subject: a single rounded paper ticket/tag shape (like a luggage tag) centered on the canvas, tilted slightly, with three small colored signal dots stacked along its right edge — one green, one amber, one red — reading top-to-bottom as a severity scale.',
|
|
459
|
+
'Background: a soft rounded square with a gentle teal-to-sky gradient (#2DD4BF → #38BDF8). Subtle long shadow under the ticket for depth.',
|
|
460
|
+
'Style: modern flat illustration with soft gradients, the family of Linear / Height product icons. Crisp at 64×64.',
|
|
461
|
+
'NO text, NO letters, NO photorealism, NO mascot, NO trademarked Jira/Linear logos.',
|
|
462
|
+
].join('\n'),
|
|
463
|
+
tags: ['Bug Triage', 'child-workflow'],
|
|
464
|
+
capabilities: [
|
|
465
|
+
'Classifies one ticket into a severity bucket with auditable reasoning',
|
|
466
|
+
'Decides shouldAutofix — is this concrete enough for an agent to fix?',
|
|
467
|
+
'Tracker-agnostic input; only Jira flows end-to-end in v1',
|
|
468
|
+
'Composable: the bug-autofix orchestrator calls it as a sub-graph',
|
|
469
|
+
],
|
|
470
|
+
conversationStarters: [
|
|
471
|
+
'Triage this bug ticket and tell me if a bot could fix it',
|
|
472
|
+
'How severe is PROJ-123, and should we auto-fix it?',
|
|
473
|
+
'Never mark auth tickets as auto-fixable',
|
|
474
|
+
],
|
|
475
|
+
},
|
|
476
|
+
},
|
|
477
|
+
|
|
478
|
+
// ── code-fix: clone → agent fix + inline test-gate → PR ───────────
|
|
479
|
+
'code-fix': {
|
|
480
|
+
name: 'code-fix',
|
|
481
|
+
displayName: 'Code Fix (clone → fix → PR)',
|
|
482
|
+
description: 'Clones a repo into an isolated workspace, has an agent fix one ticket with an inline test-gate (run the tests, feed failures back for one retry), and opens a PR. Output: { pr_url, branch }. The "do the work" block of the bug-autofix pipeline.',
|
|
483
|
+
path: join(__dirname, 'code-fix'),
|
|
484
|
+
defaultSlug: 'code-fix',
|
|
485
|
+
deps: { zod: '^3.23.0', axios: '^1.6.0' },
|
|
486
|
+
features: [
|
|
487
|
+
'3-node graph: setup (clone) → fix_code (agent + inline test-gate) → create_pr',
|
|
488
|
+
'Agent edits in an isolated Fargate workspace; SKILLS.GIT auto-auth clone',
|
|
489
|
+
'Inline test-gate: run npm test / pytest, feed failures back for ONE retry',
|
|
490
|
+
'Opens a GitHub PR off the pushed branch → { pr_url, branch }',
|
|
491
|
+
'Stops at the PR — a human reviews + merges (no auto-merge, no in-engine approval)',
|
|
492
|
+
'Auto-detects the test command (or override via TEST_COMMAND)',
|
|
493
|
+
],
|
|
494
|
+
marketplace: {
|
|
495
|
+
slug: 'code-fix',
|
|
496
|
+
tagline: 'Hand it a ticket + a repo; get back a tested fix PR.',
|
|
497
|
+
iconPrompt: [
|
|
498
|
+
'A bold, modern app icon for "Code Fix" — a workflow that fixes a bug and opens a pull request.',
|
|
499
|
+
'Subject: a rounded wrench crossed subtly behind a git-branch / pull-request glyph (two nodes joined by a curved line), with a small green checkmark badge in the lower-right indicating tests passed.',
|
|
500
|
+
'Background: a soft rounded square with a deep indigo-to-violet gradient (#4F46E5 → #7C3AED). Soft inner glow behind the glyph.',
|
|
501
|
+
'Style: clean flat-with-depth product illustration, glossy but not skeuomorphic; the family of GitHub / Linear product marks. Crisp at 64×64.',
|
|
502
|
+
'NO text, NO letters, NO photorealism, NO mascot, NO trademarked GitHub/GitLab logos.',
|
|
503
|
+
].join('\n'),
|
|
504
|
+
tags: ['Bug Triage', 'Testing', 'child-workflow'],
|
|
505
|
+
capabilities: [
|
|
506
|
+
'Clones the target repo into an isolated per-run workspace',
|
|
507
|
+
'Agent makes the smallest correct change to fix the ticket',
|
|
508
|
+
'Inline test-gate runs the suite and retries once on failure',
|
|
509
|
+
'Opens a GitHub PR with the diff, test status, and ticket link',
|
|
510
|
+
'Composable: the bug-autofix orchestrator calls it as a sub-graph',
|
|
511
|
+
],
|
|
512
|
+
conversationStarters: [
|
|
513
|
+
'Fix PROJ-123 in the web repo and open a PR',
|
|
514
|
+
'Run the tests after fixing and retry once if they fail',
|
|
515
|
+
'Use pytest -q as the test command',
|
|
516
|
+
],
|
|
517
|
+
},
|
|
518
|
+
},
|
|
519
|
+
|
|
520
|
+
// ── tracker-writeback: transition + comment + chat notify ─────────
|
|
521
|
+
'tracker-writeback': {
|
|
522
|
+
name: 'tracker-writeback',
|
|
523
|
+
displayName: 'Tracker Writeback',
|
|
524
|
+
description: 'Closes the loop after triage/fix — transitions the tracker issue (Jira → In Review when a PR opened), comments the PR link + verdict, and posts a Slack or Lark note. The writeback block of the bug-autofix pipeline (Jira in v1; GitHub / Linear are extension points).',
|
|
525
|
+
path: join(__dirname, 'tracker-writeback'),
|
|
526
|
+
defaultSlug: 'tracker-writeback',
|
|
527
|
+
deps: { zod: '^3.23.0', '@zibby/skills': '^0.1.26' },
|
|
528
|
+
features: [
|
|
529
|
+
'Single LLM node with SKILLS.JIRA + SKILLS.CHAT_NOTIFY',
|
|
530
|
+
'Jira: transition (fuzzy status match, reused) + comment the PR link/verdict',
|
|
531
|
+
'PR link rides in a comment (no Jira remote-link tool) — documented v1 fallback',
|
|
532
|
+
'Posts a short Slack OR Lark note (chat_notify, like notify-slack)',
|
|
533
|
+
'Runs on both branches: autofixed (PR up for review) and notify-only',
|
|
534
|
+
'jiraFetch is now exported so the remote-link extension point can reuse it',
|
|
535
|
+
],
|
|
536
|
+
marketplace: {
|
|
537
|
+
slug: 'tracker-writeback',
|
|
538
|
+
tagline: 'Update the ticket, link the PR, ping the channel — done.',
|
|
539
|
+
iconPrompt: [
|
|
540
|
+
'A clean, friendly flat-design app icon for "Tracker Writeback" — a workflow that updates a ticket and notifies a chat channel.',
|
|
541
|
+
'Subject: a rounded ticket/card shape with a small curved "return" arrow looping back into it, and a tiny speech-bubble badge in the upper-right (the chat notification).',
|
|
542
|
+
'Background: a soft rounded square with a warm coral-to-amber gradient (#FB7185 → #FBBF24). Subtle drop shadow for depth.',
|
|
543
|
+
'Style: modern flat illustration with soft gradients, the family of Linear / Slack product icons. Crisp at 64×64.',
|
|
544
|
+
'NO text, NO letters, NO photorealism, NO mascot, NO trademarked Jira/Slack/Lark logos.',
|
|
545
|
+
].join('\n'),
|
|
546
|
+
tags: ['Notifications', 'child-workflow'],
|
|
547
|
+
capabilities: [
|
|
548
|
+
'Transitions the Jira issue to a review/triage status (fuzzy-matched)',
|
|
549
|
+
'Comments the triage summary + the PR link on the ticket',
|
|
550
|
+
'Posts a short Slack or Lark note — whichever the project has connected',
|
|
551
|
+
'Runs on both the autofixed and notify-only branches',
|
|
552
|
+
'Composable: the bug-autofix orchestrator calls it as a sub-graph',
|
|
553
|
+
],
|
|
554
|
+
conversationStarters: [
|
|
555
|
+
'Move PROJ-123 to In Review and comment the PR link',
|
|
556
|
+
'Post to #eng when a fix PR is opened',
|
|
557
|
+
'When a ticket can\'t be auto-fixed, comment why and ping a human',
|
|
558
|
+
],
|
|
559
|
+
},
|
|
560
|
+
},
|
|
561
|
+
|
|
562
|
+
// ── bug-autofix: the ⭐ orchestrator (poll → triage → fix → writeback) ─
|
|
563
|
+
'bug-autofix': {
|
|
564
|
+
name: 'bug-autofix',
|
|
565
|
+
displayName: 'Bug Autofix Pipeline',
|
|
566
|
+
description: 'The composable bug-autofix SDLC pipeline. Polls a tracker, then connects three reusable building blocks via sub-graph dispatch: ticket-triage → (autofixable?) → code-fix → tracker-writeback. High-severity autofixable bugs get a tested fix PR opened and the ticket moved to In Review; everything else is triaged and a human is notified. Stops at the PR — a human merges.',
|
|
567
|
+
path: join(__dirname, 'bug-autofix'),
|
|
568
|
+
defaultSlug: 'bug-autofix',
|
|
569
|
+
deps: { zod: '^3.23.0', '@zibby/skills': '^0.1.26' },
|
|
570
|
+
features: [
|
|
571
|
+
'Orchestrator: poll → ticket-triage → code-fix → tracker-writeback',
|
|
572
|
+
'Composes 3 marketplace templates via Zibby sub-graph dispatch ({ workflow: slug })',
|
|
573
|
+
'Routes on triage: severity ≥ floor AND shouldAutofix → fix; else notify-only',
|
|
574
|
+
'Cron-poll of the tracker, or per-ticket webhook (ticketKey)',
|
|
575
|
+
'Each child is a separate linked execution (parentExecutionId tree-view)',
|
|
576
|
+
'Stops at PR opened + tracker written back — human merges (no in-engine approval)',
|
|
577
|
+
],
|
|
578
|
+
marketplace: {
|
|
579
|
+
slug: 'bug-autofix',
|
|
580
|
+
tagline: 'Poll bugs, triage, open a tested fix PR, write the ticket back — on autopilot.',
|
|
581
|
+
iconPrompt: [
|
|
582
|
+
'A premium, hi-fi app icon for "Bug Autofix" — an orchestrator that turns a bug ticket into a reviewed fix PR automatically.',
|
|
583
|
+
'Visual style: 3D-rendered hero object floating in space, in the style of Apple Vision Pro icons or a Stripe product render. Glossy, dimensional, soft rim-light.',
|
|
584
|
+
'Subject: a friendly 3D ladybug-style bug figure being lifted/healed by a glowing violet loop-arrow that circles it (the autofix cycle), with three small connected glossy nodes orbiting around — suggesting a pipeline of stages. A tiny green checkmark spark where the loop closes.',
|
|
585
|
+
'Background: a deep midnight-navy gradient (#0F172A → #1E1B4B) with a soft violet glow (#7C3AED) behind the subject and a few faint star specks. Square 1024×1024.',
|
|
586
|
+
'Composition: subject centered, subtle drop shadow. Mood: confident, premium, "it just handles it" — the flagship of the set.',
|
|
587
|
+
'NO text, NO letters, NO flat sticker style, NO trademarked logos. This one is DEEP and 3D-rendered, distinct from the three flat building-block icons.',
|
|
588
|
+
].join('\n'),
|
|
589
|
+
tags: ['Bug Triage', 'Incidents'],
|
|
590
|
+
capabilities: [
|
|
591
|
+
'Polls your tracker for candidate bugs (JQL) or runs per-ticket via webhook',
|
|
592
|
+
'Triages each ticket, then routes autofixable ones to an agent fix',
|
|
593
|
+
'Opens a tested fix PR and moves the ticket to In Review',
|
|
594
|
+
'Notifies a human for anything it shouldn\'t auto-fix',
|
|
595
|
+
'Composes three reusable templates — swap or reuse the blocks independently',
|
|
596
|
+
],
|
|
597
|
+
conversationStarters: [
|
|
598
|
+
'Poll my open bugs and auto-fix the autofixable ones',
|
|
599
|
+
'When a P1 bug comes in, open a fix PR and move it to In Review',
|
|
600
|
+
'Only auto-fix HIGH+ severity bugs; notify a human for the rest',
|
|
601
|
+
'Run the bug-autofix pipeline on PROJ-123',
|
|
602
|
+
],
|
|
603
|
+
},
|
|
604
|
+
},
|
|
605
|
+
|
|
606
|
+
// ── github-ai-scout: daily AI-project discovery → Slack shortlist ─
|
|
607
|
+
'github-ai-scout': {
|
|
608
|
+
name: 'github-ai-scout',
|
|
609
|
+
displayName: 'Daily GitHub AI Scout',
|
|
610
|
+
description: 'A daily scout that searches GitHub for new/trending AI projects, scores them against YOUR configurable rubric with an LLM, and posts a Slack shortlist for a human to review. General + config-driven — the query, recency/star thresholds, and rubric are all deploy-time inputs. Proposes a shortlist; never stars, forks, or auto-adds anything.',
|
|
611
|
+
path: join(__dirname, 'github-ai-scout'),
|
|
612
|
+
defaultSlug: 'github-ai-scout',
|
|
613
|
+
deps: { zod: '^3.23.0', '@zibby/skills': '^0.1.25' },
|
|
614
|
+
features: [
|
|
615
|
+
'3-node graph: scan (GitHub search API) → score (LLM rubric) → digest (Slack)',
|
|
616
|
+
'Cron-friendly: daily schedule, default daysBack=30 / minStars=30',
|
|
617
|
+
'Configurable query + rubric — point it at any topic + taste, nothing is hard-coded',
|
|
618
|
+
'LLM ranks + filters candidates; only ever picks from the scanned repos (no invented repos)',
|
|
619
|
+
'excludeRepos allow-list dedups against projects you already track',
|
|
620
|
+
'Renders a native Slack Block-Kit card via the notify-slack sub-graph',
|
|
621
|
+
'Proposes a shortlist — a human reviews, the scout never auto-acts',
|
|
622
|
+
],
|
|
623
|
+
marketplace: {
|
|
624
|
+
slug: 'github-ai-scout',
|
|
625
|
+
tagline: 'Scout new AI projects on GitHub every morning — scored to your taste, shortlisted in Slack.',
|
|
626
|
+
iconPrompt: [
|
|
627
|
+
'A premium, hi-fi app icon for "Daily GitHub AI Scout" — a workflow that scans GitHub for new AI projects and shortlists the best ones.',
|
|
628
|
+
'Visual style: 3D-rendered hero object floating in space, in the style of Apple Vision Pro icons or a Stripe product render. Glossy, dimensional, with subtle reflections and a soft rim-light.',
|
|
629
|
+
'Subject: a sleek 3D-rendered pair of binoculars (or a small telescope) tilted up in three-quarter perspective, its glossy violet body catching a soft rim-light, sweeping a thin glowing scan-beam across a small cluster of glossy golden five-pointed STARS — two or three stars caught bright in the beam, a few fainter ones drifting past. A single tiny AI spark — a small four-point sparkle in soft cyan — glints near the lens to signal the smart-scoring step, and one small rounded code-bracket glyph "{ }" floats subtly in the lower corner to hint at "code repositories" WITHOUT any logo.',
|
|
630
|
+
'Background: a deep midnight-navy gradient (#0F172A at the top, #1E1B4B at the bottom) with a single soft violet glow (#7553FF) behind the binoculars and a scatter of faint star-like specks across the canvas. Square format, 1024×1024.',
|
|
631
|
+
'Composition: binoculars centered and slightly raised, scan-beam angled up-right toward the brightest star, subtle drop shadow on the canvas. Mood: curious, premium, "always watching the frontier".',
|
|
632
|
+
'NO text, NO letters, NO numbers, NO flat sticker style, NO mascot face, NO magnifying glass, NO trademarked GitHub octocat / Slack / OpenAI logos — this one is DEEP and 3D-rendered.',
|
|
633
|
+
].join('\n'),
|
|
634
|
+
tags: ['Reports', 'Notifications'],
|
|
635
|
+
capabilities: [
|
|
636
|
+
'Searches GitHub daily for newly-created, trending repositories matching your query',
|
|
637
|
+
'Filters by recency (created within N days) and a minimum star count',
|
|
638
|
+
'Scores every candidate 1-5 against your plain-English rubric with an LLM',
|
|
639
|
+
'Keeps a tight shortlist of the best finds — drops abandoned demos and trivial wrappers',
|
|
640
|
+
'Dedups against repos you already track via an excludeRepos allow-list',
|
|
641
|
+
'Posts a numbered Block-Kit shortlist to Slack — stars, language, license, one-line reason, link',
|
|
642
|
+
],
|
|
643
|
+
conversationStarters: [
|
|
644
|
+
'Scout new AI agent frameworks on GitHub every morning',
|
|
645
|
+
'Find trending RAG and LLM repos created this month and shortlist the best 8',
|
|
646
|
+
'Only surface repos with 100+ stars and a real README; skip the ones I already track',
|
|
647
|
+
'Post a daily GitHub AI radar to our #ai-radar Slack channel',
|
|
648
|
+
],
|
|
649
|
+
},
|
|
650
|
+
},
|
|
651
|
+
|
|
652
|
+
// ── github-code-review: review a GitHub PR → post the review back ─
|
|
653
|
+
'github-code-review': {
|
|
654
|
+
name: 'github-code-review',
|
|
655
|
+
displayName: 'GitHub Code Review',
|
|
656
|
+
description: 'Reviews a GitHub pull request with an LLM and posts the review back to the PR — a summary plus inline comments and an APPROVE / COMMENT / REQUEST_CHANGES verdict. If the PR is linked to a Jira or Linear ticket (and that integration is connected), it ALSO validates the change against the ticket\'s acceptance criteria and renders an objectives-met table, the way CodeRabbit does. GitHub required; Jira/Linear optional (ticket context only).',
|
|
657
|
+
path: join(__dirname, 'github-code-review'),
|
|
658
|
+
defaultSlug: 'github-code-review',
|
|
659
|
+
deps: { zod: '^3.23.0', '@zibby/skills': '^0.1.33' },
|
|
660
|
+
features: [
|
|
661
|
+
'3-node graph: fetch_pr (github) → fetch_ticket (optional) → review (LLM)',
|
|
662
|
+
'Posts a real PR review via github_create_review — summary body + inline comments + verdict',
|
|
663
|
+
'DYNAMIC prompt: linked ticket → objectives-met table vs ticket acceptance criteria; no ticket → standalone diff review (never mentions a ticket)',
|
|
664
|
+
'Jira/Linear are OPTIONAL — fetched via direct tool calls so they don\'t gate deploy',
|
|
665
|
+
'Webhook-triggered on a PR: { owner, repo, prNumber }',
|
|
666
|
+
'Reviews + comments only — never merges, closes, or pushes',
|
|
667
|
+
],
|
|
668
|
+
marketplace: {
|
|
669
|
+
slug: 'github-code-review',
|
|
670
|
+
tagline: 'Auto-review every GitHub PR — inline comments, a verdict, and objectives checked against the linked ticket.',
|
|
671
|
+
iconPrompt: [
|
|
672
|
+
'A premium, hi-fi app icon for "GitHub Code Review" — a workflow that reviews a GitHub pull request and posts the review back inline.',
|
|
673
|
+
'Visual style: 3D-rendered hero object floating in space, in the style of Apple Vision Pro icons or a Stripe product render. Glossy, dimensional, with subtle reflections and a soft rim-light.',
|
|
674
|
+
'Subject: a sleek 3D-rendered DARK octocat-style cat-with-tentacles silhouette (an original friendly cephalopod-cat creature, NOT the literal trademarked GitHub Octocat logo) rendered in glossy obsidian-black with a soft violet rim-light, holding a small glowing magnifier over a floating diff card; on the diff card two short code lines glow — one soft red (a removed line), one soft green (an added line) — and a small cyan check-mark sparkle sits at the corner to signal "reviewed". The whole motif reads "dark code-review".',
|
|
675
|
+
'Background: a deep charcoal-to-midnight gradient (#0D1117 at the top — GitHub\'s dark canvas — to #161B22 at the bottom) with a single soft violet glow (#7C3AED) behind the creature and a scatter of faint specks. Square format, 1024×1024.',
|
|
676
|
+
'Composition: creature centered and slightly raised, magnifier angled toward the diff card, subtle drop shadow. Mood: focused, premium, "nothing ships unreviewed".',
|
|
677
|
+
'NO text, NO letters, NO numbers, NO flat sticker style, NO the real trademarked GitHub Octocat logo or GitHub wordmark — make it an ORIGINAL dark cephalopod-cat. This one is DEEP and 3D-rendered.',
|
|
678
|
+
].join('\n'),
|
|
679
|
+
tags: ['Code Review'],
|
|
680
|
+
capabilities: [
|
|
681
|
+
'Reads the PR diff + changed files and reviews correctness, bugs, security, tests, design, and style',
|
|
682
|
+
'Posts the review back to the PR: a summary, inline comments on specific lines, and a verdict',
|
|
683
|
+
'When a ticket is linked, validates the change against its acceptance criteria with an objectives-met table',
|
|
684
|
+
'Optionally pulls ticket context from Jira or Linear — but neither is required to run',
|
|
685
|
+
'Webhook-driven: point a PR-opened/synchronize hook at it',
|
|
686
|
+
'Proposes feedback only — a human still decides and merges',
|
|
687
|
+
],
|
|
688
|
+
conversationStarters: [
|
|
689
|
+
'Review pull request #412 in acme/web-app',
|
|
690
|
+
'Auto-review every new PR and post inline comments',
|
|
691
|
+
'Review this PR and check it against the linked Jira ticket\'s acceptance criteria',
|
|
692
|
+
'Block the merge if a PR introduces a security or missing-test issue',
|
|
693
|
+
],
|
|
694
|
+
},
|
|
695
|
+
},
|
|
696
|
+
|
|
697
|
+
// ── gitlab-code-review: review a GitLab MR → post the review back ─
|
|
698
|
+
'gitlab-code-review': {
|
|
699
|
+
name: 'gitlab-code-review',
|
|
700
|
+
displayName: 'GitLab Code Review',
|
|
701
|
+
description: 'Reviews a GitLab merge request with an LLM and posts the review back to the MR — a summary note plus inline discussion comments and a clear verdict. If the MR is linked to a Jira or Linear ticket (and that integration is connected), it ALSO validates the change against the ticket\'s acceptance criteria and renders an objectives-met table, the way CodeRabbit does. GitLab required; Jira/Linear optional (ticket context only).',
|
|
702
|
+
path: join(__dirname, 'gitlab-code-review'),
|
|
703
|
+
defaultSlug: 'gitlab-code-review',
|
|
704
|
+
deps: { zod: '^3.23.0', '@zibby/skills': '^0.1.33' },
|
|
705
|
+
features: [
|
|
706
|
+
'3-node graph: fetch_mr (gitlab) → fetch_ticket (optional) → review (LLM)',
|
|
707
|
+
'Posts a real MR review via gitlab_create_mr_review — summary note + inline discussions',
|
|
708
|
+
'DYNAMIC prompt: linked ticket → objectives-met table vs ticket acceptance criteria; no ticket → standalone diff review (never mentions a ticket)',
|
|
709
|
+
'Jira/Linear are OPTIONAL — fetched via direct tool calls so they don\'t gate deploy',
|
|
710
|
+
'Webhook-triggered on an MR: { projectId, mrIid }',
|
|
711
|
+
'Works against gitlab.com and self-hosted instances',
|
|
712
|
+
],
|
|
713
|
+
marketplace: {
|
|
714
|
+
slug: 'gitlab-code-review',
|
|
715
|
+
tagline: 'Auto-review every GitLab MR — inline discussions, a verdict, and objectives checked against the linked ticket.',
|
|
716
|
+
iconPrompt: [
|
|
717
|
+
'A premium, hi-fi app icon for "GitLab Code Review" — a workflow that reviews a GitLab merge request and posts the review back inline.',
|
|
718
|
+
'Visual style: 3D-rendered hero object floating in space, in the style of Apple Vision Pro icons or a Stripe product render. Glossy, dimensional, with subtle reflections and a soft rim-light.',
|
|
719
|
+
'Subject: a sleek 3D-rendered ORANGE FOX head (an original friendly fox character evoking GitLab\'s tanuki-fox spirit WITHOUT copying the literal trademarked GitLab logo), rendered in glossy gradient orange (#FC6D26 → #E24329) with a soft rim-light, peering over a floating merge-request card; on the card two short code lines glow — one soft red (a removed line), one soft green (an added line) — and two small branch lines MERGE into one with a glowing node at the join to signal "merge request". A tiny cyan check-mark sparkle sits at the corner for "reviewed".',
|
|
720
|
+
'Background: a deep midnight-navy gradient (#1F1B3A at the top to #2E2150 at the bottom) that makes the orange fox POP, with a soft warm-orange glow behind the fox and a scatter of faint specks. Square format, 1024×1024.',
|
|
721
|
+
'Composition: fox centered and slightly raised, peering down at the merge-request card, subtle drop shadow. Mood: clever, warm, premium — clearly ORANGE-FOX so it is instantly distinguishable from the dark GitHub review icon.',
|
|
722
|
+
'NO text, NO letters, NO numbers, NO flat sticker style, NO the real trademarked GitLab tanuki logo or wordmark — make it an ORIGINAL orange fox. This one is DEEP and 3D-rendered.',
|
|
723
|
+
].join('\n'),
|
|
724
|
+
tags: ['Code Review'],
|
|
725
|
+
capabilities: [
|
|
726
|
+
'Reads the MR diff + changed files and reviews correctness, bugs, security, tests, design, and style',
|
|
727
|
+
'Posts the review back to the MR: a summary note, inline discussion comments on specific lines, and a verdict',
|
|
728
|
+
'When a ticket is linked, validates the change against its acceptance criteria with an objectives-met table',
|
|
729
|
+
'Optionally pulls ticket context from Jira or Linear — but neither is required to run',
|
|
730
|
+
'Works against gitlab.com and self-hosted GitLab instances',
|
|
731
|
+
'Proposes feedback only — a human still decides, approves, and merges',
|
|
732
|
+
],
|
|
733
|
+
conversationStarters: [
|
|
734
|
+
'Review merge request !73 in acme/web-app',
|
|
735
|
+
'Auto-review every new MR and post inline discussions',
|
|
736
|
+
'Review this MR and check it against the linked Jira ticket\'s acceptance criteria',
|
|
737
|
+
'Flag any MR that introduces a security or missing-test issue',
|
|
738
|
+
],
|
|
739
|
+
},
|
|
740
|
+
},
|
|
391
741
|
};
|
|
392
742
|
|
|
393
743
|
export class TemplateFactory {
|
package/notify-lark/icon.png
CHANGED
|
Binary file
|
package/notify-lark/package.json
CHANGED
package/notify-notion/icon.png
CHANGED
|
Binary file
|
package/notify-slack/icon.png
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zibby/workflow-templates",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.1",
|
|
4
4
|
"description": "Built-in workflow templates for Zibby — browser-test-automation, code-analysis, generate-test-cases, notify-slack, notify-lark, notify-notion, sentry-triage.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.js",
|
|
@@ -25,6 +25,8 @@
|
|
|
25
25
|
"./sentry-triage/*": "./sentry-triage/*",
|
|
26
26
|
"./ai-spend-weekly-digest": "./ai-spend-weekly-digest/graph.mjs",
|
|
27
27
|
"./ai-spend-weekly-digest/*": "./ai-spend-weekly-digest/*",
|
|
28
|
+
"./pipeline-supervisor": "./pipeline-supervisor/graph.mjs",
|
|
29
|
+
"./pipeline-supervisor/*": "./pipeline-supervisor/*",
|
|
28
30
|
"./package.json": "./package.json"
|
|
29
31
|
},
|
|
30
32
|
"scripts": {
|
|
@@ -56,6 +58,7 @@
|
|
|
56
58
|
"notify-lark/",
|
|
57
59
|
"notify-notion/",
|
|
58
60
|
"sentry-triage/",
|
|
61
|
+
"pipeline-supervisor/",
|
|
59
62
|
"index.js",
|
|
60
63
|
"register-nodes.js",
|
|
61
64
|
"global-setup.js",
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# pipeline-supervisor
|
|
2
|
+
|
|
3
|
+
**Zibby managing Zibby.** A scheduled "监工 / supervisor" workflow that watches
|
|
4
|
+
the project's *other* pipelines, finds the ones that are failing or slow, and
|
|
5
|
+
posts a human-reviewable improvement proposal to Slack or Lark.
|
|
6
|
+
|
|
7
|
+
v1 is strictly **READ → PROPOSE → NOTIFY**. It never edits another workflow's
|
|
8
|
+
graph — that's the safe L3 starting point. The auto-PATCH step is a marked TODO
|
|
9
|
+
in `nodes/propose-node.js`, deliberately not implemented.
|
|
10
|
+
|
|
11
|
+
## Graph
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
scan_pipelines (deterministic + Zibby REST API, PAT-authed)
|
|
15
|
+
→ propose_improvements (LLM — one proposal per flagged pipeline)
|
|
16
|
+
→ notify (LLM + SKILLS.CHAT_NOTIFY — one review card)
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
If `scan_pipelines` flags nothing, the graph short-circuits straight to
|
|
20
|
+
`notify` (which posts/skips without a Claude call on the proposer).
|
|
21
|
+
|
|
22
|
+
## How it reads other pipelines
|
|
23
|
+
|
|
24
|
+
A direct authed `GET /executions?projectId=<id>&limit=200` against the Zibby
|
|
25
|
+
REST API (the same route the dashboard + remote MCP server use), carrying a
|
|
26
|
+
**user personal access token** in `Authorization: Bearer`.
|
|
27
|
+
|
|
28
|
+
It must be a USER PAT (`zby_pat_…`), **not** the Fargate-injected
|
|
29
|
+
`PROJECT_API_TOKEN`: every cross-pipeline read route (`/executions`, `/jobs`,
|
|
30
|
+
`/all`) requires a `userId` from the authorizer, and a project token carries
|
|
31
|
+
none — so it 401s. See the header comment in `nodes/scan-pipelines-node.js`
|
|
32
|
+
for the full rationale.
|
|
33
|
+
|
|
34
|
+
## Config (ENV tab)
|
|
35
|
+
|
|
36
|
+
Required:
|
|
37
|
+
- `ZIBBY_PAT` — user personal access token the supervisor reads executions with.
|
|
38
|
+
- `SLACK_CHANNEL` **or** `LARK_RECEIVE_ID` — where the review card goes.
|
|
39
|
+
|
|
40
|
+
Optional:
|
|
41
|
+
- `SUPERVISOR_PROJECT_ID` — project to supervise (defaults to the running project).
|
|
42
|
+
- `SLACK_MENTIONS` / `LARK_MENTIONS` — JSON array of mentions on the card.
|
|
43
|
+
|
|
44
|
+
## Input (per-run dials)
|
|
45
|
+
|
|
46
|
+
| field | default | meaning |
|
|
47
|
+
|---|---|---|
|
|
48
|
+
| `lookbackHours` | 24 | hours of execution history to scan |
|
|
49
|
+
| `minFailRate` | 0.4 | flag a pipeline failing ≥ this fraction of recent runs |
|
|
50
|
+
| `targetWorkflowTypes` | — | optional name filter (case-insensitive substring) |
|
|
51
|
+
| `maxPipelines` | 25 | cap on distinct pipelines analyzed per run |
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* pipeline-supervisor — Zibby's flagship "监工 / supervisor" workflow.
|
|
3
|
+
* "Zibby managing Zibby": a scheduled run that watches the project's OTHER
|
|
4
|
+
* pipelines and PROPOSES improvements. v1 is strictly READ + PROPOSE +
|
|
5
|
+
* NOTIFY — it never edits another workflow's graph (the safe L3 boundary).
|
|
6
|
+
*
|
|
7
|
+
* scan_pipelines (deterministic + Zibby REST) → pull recent
|
|
8
|
+
* executions across pipelines (PAT-authed), roll
|
|
9
|
+
* up per-pipeline health, flag failing/slow ones.
|
|
10
|
+
* ↓
|
|
11
|
+
* propose_improvements (LLM) → one concrete,
|
|
12
|
+
* reviewable proposal per flagged pipeline
|
|
13
|
+
* (add test gate / tweak prompt / add approval
|
|
14
|
+
* gate / drop redundant step).
|
|
15
|
+
* ↓
|
|
16
|
+
* notify (LLM + SKILLS.CHAT_NOTIFY) → ONE review card
|
|
17
|
+
* to Slack OR Lark: "Pipeline X failed 4/5 on step
|
|
18
|
+
* Y. I'd suggest <change>. (review)".
|
|
19
|
+
*
|
|
20
|
+
* Short-circuit: if scan_pipelines flags nothing, skip the LLM proposer and
|
|
21
|
+
* route straight to notify (which posts a green "all healthy" no-op). The
|
|
22
|
+
* idle path is the common case — most runs find nothing wrong — so we don't
|
|
23
|
+
* spend a Claude call manufacturing proposals from an empty list.
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
import { WorkflowAgent, WorkflowGraph } from '@zibby/core';
|
|
27
|
+
|
|
28
|
+
import { scanPipelinesNode } from './nodes/scan-pipelines-node.js';
|
|
29
|
+
import { proposeNode } from './nodes/propose-node.js';
|
|
30
|
+
import { notifyNode } from './nodes/notify-node.js';
|
|
31
|
+
|
|
32
|
+
import {
|
|
33
|
+
pipelineSupervisorInputSchema,
|
|
34
|
+
pipelineSupervisorContextSchema,
|
|
35
|
+
} from './state.js';
|
|
36
|
+
|
|
37
|
+
export class PipelineSupervisorAgent extends WorkflowAgent {
|
|
38
|
+
buildGraph() {
|
|
39
|
+
const graph = new WorkflowGraph();
|
|
40
|
+
graph
|
|
41
|
+
.setInputSchema(pipelineSupervisorInputSchema)
|
|
42
|
+
.setContextSchema(pipelineSupervisorContextSchema);
|
|
43
|
+
|
|
44
|
+
graph.addNode('scan_pipelines', scanPipelinesNode);
|
|
45
|
+
graph.addNode('propose_improvements', proposeNode);
|
|
46
|
+
graph.addNode('notify', notifyNode);
|
|
47
|
+
|
|
48
|
+
graph.setEntryPoint('scan_pipelines');
|
|
49
|
+
|
|
50
|
+
// No flagged pipelines → skip the proposer, go straight to notify. The
|
|
51
|
+
// notify node's no-op short-circuit posts (or skips) without a model
|
|
52
|
+
// round-trip, so an all-healthy scan costs one Claude call at most.
|
|
53
|
+
graph.addConditionalEdges('scan_pipelines', (state) => {
|
|
54
|
+
const flagged = (state?.scan_pipelines?.pipelines || []).filter((p) => p.flagged);
|
|
55
|
+
return flagged.length === 0 ? 'notify' : 'propose_improvements';
|
|
56
|
+
});
|
|
57
|
+
graph.addEdge('propose_improvements', 'notify');
|
|
58
|
+
graph.addEdge('notify', 'END');
|
|
59
|
+
|
|
60
|
+
return graph;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
async onComplete(result) {
|
|
64
|
+
const pipelines = result?.state?.scan_pipelines?.pipelines || [];
|
|
65
|
+
const flagged = pipelines.filter((p) => p.flagged).length;
|
|
66
|
+
const proposals = result?.state?.propose_improvements?.proposals?.length || 0;
|
|
67
|
+
const s = result?.state?.notify?.summary || {};
|
|
68
|
+
console.log(
|
|
69
|
+
`[pipeline-supervisor] complete — pipelines=${pipelines.length}, flagged=${flagged}, ` +
|
|
70
|
+
`proposals=${proposals}, sent=${s.sent || 0}, skipped=${s.skipped || 0}, failed=${s.failed || 0}`,
|
|
71
|
+
);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export default PipelineSupervisorAgent;
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":"4.1.7","results":[[":__tests__/graph.integration.test.js",{"duration":7.337875000000054,"failed":false}]]}
|