Skip to content
research_to_code_pipeline logo

Research-to-Code Pipeline Orchestrator

research_to_code_pipeline

Orchestrates the full research pipeline from problem specification through theory, design, implementation, benchmarking, to final report. Tracks dependencies and feedback loops. Use for end-to-end research projects.

SKILL.md

Full skill instructions

Research-to-Code Pipeline Orchestrator

Purpose

Coordinate the complete research workflow, ensuring each stage builds on previous results and maintains consistency.

Pipeline Stages

Stage 1: Problem Definition

Skills: problem_specification Output: Formal spec with types, constraints, invariants Checkpoint: Spec reviewed and approved

Stage 2: Theoretical Analysis

Skills: algorithmic_analysis, comparative_complexity Output: Complexity analysis, design comparison table Checkpoint: Theory sound, alternatives evaluated

Stage 2.5: Optimization Loop (Optional)

Skills: iterative_optimizer Output: Improved algorithm or confirmation of optimality Checkpoint: User satisfied or proven optimal Mode: User-enabled via "aggressive optimization" or "can we do better?" Loop: Repeats Stage 2 with challenges until user stops

Stage 3: Design Selection

Skills: systems_design_patterns, microarchitectural_modeling, language_comparative_runtime Output: Design decision with justification Checkpoint: Design choice documented and justified

Stage 4: Implementation

Skills: multi_language_codegen, safety_invariants Output: Working code in Java, C++, Rust Checkpoint: Code compiles, passes basic tests

Stage 5: Testing

Skills: unit_test_generation Output: Comprehensive test suites Checkpoint: All tests pass, coverage ≥90%

Stage 6: Benchmarking

Skills: test_data_design (FIRST), benchmark_design, performance_interpretation Output: Test data catalog, performance measurements, and analysis Checkpoint: Comprehensive test data covers edge cases; results match theoretical predictions (within ±20%)

Stage 7: Reporting

Skills: reporting_visualization, technical_exposition, pedagogical_reflection, temporal_style_adapter Output: Complete technical report Checkpoint: Document ready for review

Stage 8: Consistency Check

Skills: self_consistency_checker Output: Verification report Checkpoint: No contradictions detected

Orchestration Logic

Sequential Dependencies

problem_specification
    ↓
algorithmic_analysis + comparative_complexity
    ↓
[OPTIONAL LOOP: iterative_optimizer]
    ↓ (if improvements found)
    ↑ (re-run analysis with new approach)
    ↓ (user stops or proven optimal)
systems_design_patterns + microarchitectural_modeling
    ↓
multi_language_codegen + safety_invariants
    ↓
unit_test_generation
    ↓
benchmark_design → performance_interpretation
    ↓
reporting_visualization + technical_exposition
    ↓
pedagogical_reflection
    ↓
self_consistency_checker

Feedback Loops

  • Optimization loop (Stage 2.5): iterative_optimizer challenges solution → re-run Stage 2 with improvements
  • Benchmarks contradict theory: Revisit analysis or modeling
  • Tests fail: Revisit implementation or specification
  • Consistency check fails: Revisit affected stages

Execution Strategy

Automatic Mode

  1. Execute stages sequentially
  2. Use skill_context_cache to pass results forward
  3. Halt on checkpoint failures
  4. Generate final report automatically
  5. Optimization loop disabled by default (enables on "aggressive optimization" keyword)

Interactive Mode

  1. Execute stage, present results
  2. User approves or requests revision
  3. Continue to next stage
  4. User can jump back to any stage
  5. Optimization loop: After Stage 2, ask "Optimize further or continue?" If optimize → Stage 2.5

Aggressive Optimization Mode

  1. After Stage 2, automatically activate iterative_optimizer
  2. Challenge current solution with 3-5 improvements
  3. User selects challenge or stops
  4. If challenge selected: re-run Stage 2 with new approach
  5. Loop until user satisfied or proven optimal
  6. Trigger: User says "aggressive optimization", "find optimal", "can we do better?"

Parallel Opportunities

  • Implement Java, C++, Rust in parallel (after design)
  • Run benchmarks in parallel (after all implementations)
  • Generate sections of report in parallel (after benchmarks)

Context Handoff

Use skill_context_cache to pass:

  • Spec → Analysis: Types, constraints, invariants
  • Analysis → Design: Complexity, operations profile
  • Design → Implementation: Data structures, algorithms
  • Implementation → Testing: Code structure, edge cases
  • Testing → Benchmarking: Validated implementations
  • Benchmarking → Reporting: Measurements, analysis

Pipeline Invocation

Full Pipeline:

"Research optimal k-way merge, implement in all languages, benchmark, and write CS500 report"

Partial Pipeline:

"Implement heap-based merge from existing spec"
→ Starts at Stage 4

Resume Pipeline:

"Benchmarks showed unexpected results; re-analyze and update report"
→ Loops back to Stage 2, continues to Stage 7

Optimization Loop:

"Research k-way merge with aggressive optimization"
→ Runs Stage 1-2
→ Stage 2.5: "O(nk) found. Can we do better?" → Challenge with heap O(n log k)
→ Loop: User approves → re-run Stage 2 with heap
→ Stage 2.5: "O(n log k) achieved. Can we do better?" → Challenge with constants
→ Loop: User stops → Continue to Stage 3

Quality Gates

Each stage has acceptance criteria:

StageGateCriteria
1Spec CompleteAll invariants documented
2Theory SoundComplexity proven, alternatives compared
2.5Optimization CompleteUser satisfied or proven optimal (optional)
3Design JustifiedTrade-offs documented
4Code CorrectCompiles, no warnings
5Tests Pass100% pass, ≥90% coverage
6Results PlausibleWithin 2× of predictions
7Report CompleteAll sections present
8Consistency OKNo contradictions

Error Handling

Checkpoint Failure

  • Document issue
  • Identify root cause
  • Determine which stage to revisit
  • Re-execute from that stage

Unexpected Results

  • Treat as scientific finding, not error
  • Investigate cause (measurement issue vs model issue)
  • Update model or document limitation
  • Continue pipeline

Cross-Skill Integration

Coordinates: All 19 other skills (including iterative_optimizer) Uses: skill_context_cache for state management Feeds into: Final deliverable (complete research artifact) Optional loop: iterative_optimizer challenges solutions after Stage 2

More Productivity & Planning skills

brainstorming logo
Productivity & Planning

brainstorming

Structured design dialogue that validates ideas before implementation begins.

295.4K 385.7K
View
ui-ux-pro-max logo
Productivity & Planning

ui-ux-pro-max

Comprehensive design intelligence for web and mobile UI/UX across 10 technology stacks.

133.1K 383.9K
View
writing-plans logo
Productivity & Planning

writing-plans

Comprehensive implementation plans for multi-step tasks, breaking down specs into bite-sized, testable steps.

295.4K 268K
View
using-superpowers logo
Productivity & Planning

using-superpowers

Introduction to the obra skills system with mandatory skill invocation rules and best practices.

295.4K 259.8K
View
executing-plans logo
Productivity & Planning

executing-plans

Execute a written implementation plan with critical review and task checkpoints.

295.4K 229.1K
View
dispatching-parallel-agents logo
Productivity & Planning

dispatching-parallel-agents

Delegate independent tasks to specialized agents working concurrently with isolated context.

295.4K 206.3K
View
using-git-worktrees logo
Productivity & Planning

using-git-worktrees

Isolated git worktrees with smart directory selection and safety verification.

295.4K 205.2K
View
webapp-testing logo
Productivity & Planning

webapp-testing

Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.

179.7K 170.6K
View
content-strategy logo
Productivity & Planning

content-strategy

Plan searchable and shareable content that drives traffic, builds authority, and generates leads.

53.3K 150.9K
View
repo-intake-and-plan logo
Productivity & Planning

repo-intake-and-plan

README-first repository scanner that extracts commands and classifies reproduction candidates without executing them.

497 139.6K
View
marketing-ideas logo
Productivity & Planning

marketing-ideas

Brainstorm and prioritize marketing strategies tailored to your SaaS stage, budget, and goals.

53.3K 137.2K
View
site-architecture logo
Productivity & Planning

site-architecture

Plan and optimize your website's page hierarchy, navigation, URL structure, and internal linking.

53.3K 112.8K
View

Productivity AI tools

Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View
SaveDay logo
Productivity

SaveDay

Capture, organize, and utilize your knowledge effortlessly.

Free
View
A
Productivity

Any Summary

Instant Summaries of Audio & Video Interviews with AnySummary

Freemium
View
M
Productivity

Map This

Transform PDFs into engaging mind maps.

Freemium
View
ChatPDF logo
Productivity

ChatPDF

Chat with any PDF instantly

Free
View
I
Productivity

intellisay

Create an optimal daily plan using your voice

Paid
View
A
Productivity

Aurora AI

A productivity platform to centralize organizational knowledge and workflows with contextual AI assistance.

Paid
View
AskYourPDF logo
Productivity

AskYourPDF

AskYourPDF Pricing Plans: Tailored to Your Needs

Free
View