本文へ移動
cccskills
無料GitHub で公開

speculative-multi-draft-synthesizer

Expert guide for speculative multi-agent drafting, parallel hypothesis generation, AST-aware consensus arbitration, and multi-model code reconciliation / Panduan ahli penyusunan draf multi-agen spekulatif, generasi hipotesis paralel, arbitrase konsensus sadar-AST, dan rekonsiliasi kode multi-model.

インストール方法を見る

含まれるファイル(1)

  • SKILL.md10.8 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

speculative-multi-draft-synthesizer — vibes-plug Skill

English | Bahasa Indonesia


<a name="english"></a>

English

Orchestration & Integration

Connects and orchestrates with brainstorming, zero-to-prod-orchestrator, multi-agent-orchestration, frontier-ai-models-expert, test-time-compute-optimizer, and living-codebase-ast-graph to coordinate speculative multi-draft generation and frontier model consensus arbitration.

Description

Production guide for architecting speculative multi-draft code synthesis pipelines. Dispatches high-concurrency, fast-draft subagents (powered by Gemini Flash or lightweight models) to generate competing implementation hypotheses in parallel, then feeds these candidates into a frontier arbiter model (Gemini 4 Pro, Claude Opus 5.5, or GPT Astra 6). The arbiter performs semantic AST reconciliation, extracting optimal algorithms, error boundaries, and type safety into a single superior implementation.

Trigger Conditions

Activate this skill when:

  • Solving complex, ambiguous algorithmic challenges where multiple valid architectural approaches exist.
  • Designing high-scale microservices or critical algorithms where relying on a single model output risks blind spots.
  • Combining strengths of multiple model families (e.g. Gemini long-context structural view + Claude rigorous type precision).
  • Synthesizing large refactoring proposals submitted by concurrent swarm subagents.

Core Concepts & Patterns

1. Speculative Synthesis Swarm Topology

User Intent / Spec
       │
       ├───────────────────┬───────────────────┐
       ▼                   ▼                   ▼
Draft Agent A       Draft Agent B       Draft Agent C
(Algorithmic Focus) (Error Resilience)  (Type Rigor)
       │                   │                   │
       └───────────────────┼───────────────────┘
                           ▼
                  [FRONTIER ARBITER]
            (Gemini 4 Pro / Claude Opus 5.5)
                           │
                           ▼
              AST Reconciliation & Scoring
                           │
                           ▼
             Optimal Synthesized Solution

2. Multi-Draft Arbiter Engine (TypeScript Implementation)

export interface CandidateDraft {
  agentId: string;
  model: string;
  code: string;
  rationale: string;
}

export interface SynthesisEvaluation {
  selectedAlgorithmSource: string;
  selectedErrorStrategySource: string;
  selectedTypingSource: string;
  synthesizedCode: string;
  synthesisRationale: string;
}

export class SpeculativeDraftSynthesizer {
  public static buildArbiterPrompt(spec: string, drafts: CandidateDraft[]): string {
    const formattedDrafts = drafts
      .map(
        (draft, index) =>
          `### DRAFT ${index + 1} (From ${draft.agentId} using ${draft.model}):\n` +
          `Rationale: ${draft.rationale}\n\n` +
          `\`\`\`typescript\n${draft.code}\n\`\`\``
      )
      .join('\n\n---\n\n');

    return [
      'You are the Master Frontier Arbiter in an autonomous AI swarm.',
      'Your task is to analyze the following candidate code drafts for the given specification, identify their individual strengths, and synthesize a single, flawless, production-ready implementation.',
      '',
      'SPECIFICATION:',
      spec,
      '',
      'CANDIDATE DRAFTS:',
      formattedDrafts,
      '',
      'SYNTHESIS MANDATES:',
      '1. Take the highest-performance algorithmic core from the best candidate.',
      '2. Take the most exhaustive, error-resilient boundary handling from the best candidate.',
      '3. Enforce the strictest, most accurate TypeScript types without using "any".',
      '4. Output 100% complete, working production code without ellipses or placeholders.'
    ].join('\n');
  }

  public static reconcileDrafts(evalResult: SynthesisEvaluation): string {
    return evalResult.synthesizedCode;
  }
}

3. Arbiter Selection Criteria

The arbiter reconciles drafts using four quantitative metrics:

  • Type Soundness: Zero type assertions (as unknown), zero any, strict null safety.
  • Complexity Bound: Minimal cyclomatic complexity and optimal Big-O time/space bounds.
  • Failure Resilience: Complete error coverage, explicit domain error classes, no unhandled rejections.
  • Resource Footprint: Minimal heap allocation, zero memory leaks, idiomatic resource cleanup.

Best Practices

  1. Vary System Prompts Across Drafters: Instruct Draft A to prioritize raw algorithmic speed, Draft B to prioritize error resilience, and Draft C to prioritize minimal memory footprint.
  2. Never Simply Pick One Winner: Direct the arbiter to extract and fuse the best aspects of each draft into a unified hybrid AST.
  3. Run Ephemeral Sandbox Verification: Before finalizing the synthesis, run the candidate through ephemeral-wasm-sandbox-executor to verify that all unit tests pass.
  4. Enforce Complete Implementations: The arbiter must never emit truncated blocks; output must be fully executable on first compilation.

Common Pitfalls to Avoid

Anti-PatternOperational RiskEngineering Remedy
Asking one model to draft and critique itselfShared blind spots and self-affirming hallucinationSpawn diverse model drafts (e.g. Gemini + Claude)
Naive text concatenation of code blocksSyntax errors, duplicate variables, broken importsPerform AST-level node reconciliation in arbiter
Discarding failed drafts without inspectionLost insight into novel edge casesAllow arbiter to review why certain edge branches were formed

Integration with Other Skills (MANDATORY)

  • multi-agent-orchestration — Dispatch and monitor concurrent draft subagents.
  • frontier-ai-models-expert — Configure frontier arbiter parameters across Gemini 4 Pro and Claude 5.5.
  • test-time-compute-optimizer — Allocate elevated reasoning tokens for the final arbitration step.
  • living-codebase-ast-graph — Ensure synthesized output complies with existing codebase dependency graphs.

Referenced By Orchestrators (MANDATORY)

  • brainstorming — Added to "Integrasi AI & LLM" and "Frontier AI & Simulation" matrix rows.
  • zero-to-prod-orchestrator — Integrated in Phase 1 (Discovery & PRD) and Phase 4 (Backend APIs & AI Agents).

<a name="bahasa-indonesia"></a>

Bahasa Indonesia

Integrasi Orkestrasi

Terhubung dan mengorkestrasi dengan brainstorming, zero-to-prod-orchestrator, multi-agent-orchestration, frontier-ai-models-expert, test-time-compute-optimizer, dan living-codebase-ast-graph untuk mengoordinasikan pembuatan draf spekulatif multi-agen dan arbitrase konsensus model frontier.

Deskripsi

Panduan produksi untuk merancang pipeline sintesis kode berbasis draf spekulatif (speculative multi-draft). Menugaskan subagent berkecepatan tinggi secara paralel (seperti Gemini Flash atau model ringan) untuk menyusun beberapa hipotesis implementasi alternatif, kemudian menyerahkan draf-draf tersebut kepada model arbiter frontier (Gemini 4 Pro, Claude Opus 5.5, atau GPT Astra 6). Arbiter melakukan rekonsiliasi AST semantik guna menyatukan algoritma tercepat, penanganan error terkuat, dan ketepatan tipe terbaik menjadi satu solusi unggul.

Kondisi Pemicu

Aktifkan skill ini ketika:

  • Menyelesaikan masalah algoritma kompleks atau ambigu yang memiliki beberapa pendekatan arsitektur valid.
  • Merancang microservices skala besar yang berisiko jika hanya mengandalkan perspektif satu model AI.
  • Menggabungkan keunggulan keluarga model yang berbeda (misalnya konteks luas Gemini dengan ketelitian tipe Claude).
  • Menyintesis proposal refaktor besar yang dikirimkan oleh beberapa sub-agen secara bersamaan.

Konsep Inti & Pola Praktik

1. Topologi Swarm Sintesis Spekulatif

  1. Penyebaran Draf (Fan-Out): Tiga sub-agen menghasilkan draf dengan fokus berbeda (Draf 1: performa algoritma, Draf 2: ketahanan error & edge cases, Draf 3: tipe data dan kesederhanaan arsitektur).
  2. Evaluasi Arbiter (Consensus Arbitration): Model frontier membedah kelebihan dan kekurangan dari setiap draf.
  3. Penyatuan Hibrida (AST Reconciliation): Arbiter mengambil bagian-bagian terbaik dari setiap kandidat untuk menghasilkan kode akhir yang lengkap.

2. Kriteria Seleksi Arbiter

  • Ketelitian Tipe: Nol tipe any, penanganan null/undefined yang ketat.
  • Kompleksitas Algoritma: Kompleksitas waktu dan memori (Big-O) yang paling optimal.
  • Ketahanan Kegagalan: Penanganan error menyeluruh tanpa unhandled promise rejections.

Praktik Terbaik

  1. Variasikan Fokus Instruksi Draf: Berikan peran yang berbeda pada tiap pembuat draf (kecepatan vs keamanan vs kesederhanaan).
  2. Jangan Hanya Memilih Satu Pemenang: Perintahkan arbiter untuk memadukan modul-modul terbaik dari berbagai draf.
  3. Verifikasi dengan Sandbox: Jalankan draf yang disintesis di ephemeral-wasm-sandbox-executor untuk membuktikan fungsionalitasnya.
  4. Keluaran 100% Lengkap: Pastikan hasil akhir berupa kode produksi siap pakai tanpa placeholder.

Jebakan Umum yang Harus Dihindari

Praktik BurukDampak BurukSolusi Rekayasa
Model mengkritik dan memperbaiki kodenya sendiriBias yang sama berulang (shared blind spot)Gunakan model frontier yang berbeda sebagai arbiter independen
Penggabungan teks kode secara mentahKerusakan sintaksis dan deklarasi variabel gandaLakukan rekonsiliasi berbasis AST oleh arbiter
Membuang draf yang salah totalKehilangan informasi tentang kemungkinan kegagalanBerikan draf tersebut ke arbiter sebagai panduan apa yang harus dihindari

Integrasi dengan Skill Lain (WAJIB)

  • multi-agent-orchestration — Mengatur eksekusi paralel sub-agen pembuat draf.
  • frontier-ai-models-expert — Konfigurasi parameter arbiter frontier pada Gemini 4 Pro dan Claude 5.5.
  • test-time-compute-optimizer — Mengalokasikan token penalaran tinggi untuk tahap arbitrase akhir.
  • living-codebase-ast-graph — Menjaga agar hasil sintesis selaras dengan graf dependensi proyek.

Direferensikan oleh Orchestrator (WAJIB)

  • brainstorming — Tambahkan ke baris "Integrasi AI & LLM" dan "Frontier AI & Simulation" pada Matriks Orkestrasi.
  • zero-to-prod-orchestrator — Tambahkan ke Fase 1 (Discovery & PRD) dan Fase 4 (Backend APIs & AI Agents).

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

Expert guide for automated and manual Web Accessibility (a11y) testing — axe-core, Pa11y, Playwright a11y, screen reader testing, and WCAG 2.2 Level AA/AAA compliance / Panduan ahli pengujian aksesibilitas web.

日本語の概要は準備中です。原文の説明を表示しています。

roedyrustam/vibes-plug752026年10月9日 更新

Expert guide for intelligent model cascading and routing — complexity-scored task routing from Flash/Haiku to Sonnet/Opus/Astra, dynamic escalation with quality gates, 40-60% token cost reduction while maintaining output quality / Panduan ahli untuk kaskade dan routing model cerdas — routing tugas berbasis skor kompleksitas dari Flash/Haiku ke Sonnet/Opus/Astra, eskalasi dinamis dengan gerbang kualitas, pengurangan biaya token 40-60% dengan kualitas output terjaga.

日本語の概要は準備中です。原文の説明を表示しています。

roedyrustam/vibes-plug752026年10月9日 更新

Expert guide for Affective Computing, emotional AI, and real-time sentiment analysis through native multimodal tokens (voice intonation and facial micro-expressions) / Panduan ahli komputasi afektif, AI emosional, dan analisis sentimen real-time melalui token multimodal native.

日本語の概要は準備中です。原文の説明を表示しています。

roedyrustam/vibes-plug752026年10月9日 更新

Expert guide for AI-assisted coding workflows — agentic code generation, multi-agent code swarms, self-healing CI/CD, automated PR review, spec-to-code pipelines, codebase knowledge graphs, and human-in-the-loop approval gates / Panduan ahli untuk workflow pengkodean berbasis AI — generasi kode agentic, code swarm multi-agen, CI/CD self-healing, review PR otomatis, pipeline spec-to-code, knowledge graph codebase, dan gate persetujuan human-in-the-loop.

日本語の概要は準備中です。原文の説明を表示しています。

roedyrustam/vibes-plug752026年10月9日 更新

Expert guide for long-term episodic memory integration (Mem0 v2, Letta/MemGPT, Zep v2), memory tier architecture, pgvector HNSW storage, and unified context management for autonomous AI agents / Panduan ahli untuk integrasi memori episodik jangka panjang (Mem0 v2, Letta/MemGPT, Zep v2), arsitektur tier memori, penyimpanan pgvector HNSW, dan manajemen konteks terpadu untuk agen AI otonom.

日本語の概要は準備中です。原文の説明を表示しています。

roedyrustam/vibes-plug752026年10月9日 更新

Expert guide for designing Machine-to-Machine (M2M) micro-economies, autonomous agent wallets, and swarm budget allocation / Panduan ahli merancang ekonomi mikro antar-agen (M2M), dompet agen otonom, dan alokasi anggaran swarm.

日本語の概要は準備中です。原文の説明を表示しています。

roedyrustam/vibes-plug752026年10月9日 更新

roedyrustam のスキルをすべて見る

このスキルの問題を報告する