Skip to content

Instantly share code, notes, and snippets.

View ruvnet's full-sized avatar
💭
hacking the multiverse.

rUv ruvnet

💭
hacking the multiverse.
View GitHub Profile
@ruvnet
ruvnet / .roomodes.json
Created March 30, 2025 15:12
This guide introduces Roo Code and the innovative Boomerang task concept, now integrated into SPARC Orchestration. By following the SPARC methodology (Specification, Pseudocode, Architecture, Refinement, Completion) and leveraging advanced reasoning models such as o3, Sonnet 3.7 Thinking, and DeepSeek, you can efficiently break down complex proj…
{
"customModes": [
{
"slug": "sparc",
"name": "⚡️ SPARC Orchestrator",
"roleDefinition": "You are SPARC, the orchestrator of complex workflows. You break down large objectives into delegated subtasks aligned to the SPARC methodology. You ensure secure, modular, testable, and maintainable delivery using the appropriate specialist modes.",
"customInstructions": "Follow SPARC:\n\n1. Specification: Clarify objectives and scope. Never allow hard-coded env vars.\n2. Pseudocode: Request high-level logic with TDD anchors.\n3. Architecture: Ensure extensible system diagrams and service boundaries.\n4. Refinement: Use TDD, debugging, security, and optimization flows.\n5. Completion: Integrate, document, and monitor for continuous improvement.\n\nUse `new_task` to assign:\n- spec-pseudocode\n- architect\n- code\n- tdd\n- debug\n- security-review\n- docs-writer\n- integration\n- post-deployment-monitoring-mode\n- refinement-optimization-mode\n\nValidate:\n✅ Files < 500 lines\n✅ No hard-coded
@ruvnet
ruvnet / Gemini.md
Last active April 1, 2025 05:51
Free & Secure API Key Rotator for Google Gemini 2.5 Pro (Deno Edge Functions)

Great. I’ll develop a phased implementation plan, edge function code, deployment strategy, user guide, and full documentation for a key rotator using Deno Edge Functions. This will focus on rotating Gemini 2.5 Pro API keys to handle 429 rate limits efficiently.

I’ll return with a clear breakdown of components, including a secure architecture, key storage and cycling logic, usage limits, and guidance for setup and customization.

Secure API Key Rotator for Google Gemini 2.5 Pro (Deno Edge Functions)

Overview: This solution is an edge-deployed proxy that securely rotates through a pool of Google Gemini 2.5 Pro API keys to avoid hitting per-key rate limits (e.g. free-tier limit of ~2 requests/minute (Gemini 2.5 Pro via OpenRouter triggers RESOURCE_EXHAUSTED despite API key and usage being within free-tier limits · Issue #2000 · RooVetGit/Roo-Code · GitHub)). By

@ruvnet
ruvnet / reasoning.md
Last active March 7, 2025 13:47
Tutorial: Building an Agentic AI System with Deductive & Inductive Reasoning

Tutorial: Building an Agentic AI System with Deductive & Inductive Reasoning

1. Introduction

Modern AI systems increasingly require the ability to make decisions in complex and dynamic environments. One promising approach is to create an agentic AI system that combines:

  • Deductive Reasoning: Rule-based logic that guarantees conclusions when premises hold true.
  • Inductive Reasoning: Data-driven inference that generalizes from specific cases to handle uncertainty.

By integrating these two methods, often referred to as neuro-symbolic AI, an agent can provide transparent, explainable decisions while also adapting to new data. This tutorial explains the concepts behind this approach and shows you how to build an edge-deployable ReAct agent using Deno.

@ruvnet
ruvnet / agentic-robots.txt.md
Created February 28, 2025 01:05
agentic-robots.txt: Dynamic Robots.txt with MCP Integration

agentic-robots-txt: Dynamic Robots.txt with MCP Integration

agentic-robots-txt is a Node.js package that generates a dynamic robots.txt file with extended directives for AI agents, and exposes those rules via Anthropic’s Model Context Protocol (MCP). It helps web developers control standard web crawlers and guide AI model agents by providing an agentic manifest and agent guide references in the robots.txt. The package also includes an MCP server so AI agents (MCP clients) can retrieve these rules programmatically. Key features include dynamic rule generation, MCP compliance, security controls, and easy integration into frameworks like Express.

Dynamic robots.txt Generation

A robots.txt file defines crawl rules for bots (traditionally search engines) by specifying allowed and disallowed paths (The ultimate guide to robots.txt • Yoast). agentic-robots-txt automates creatin

@ruvnet
ruvnet / notebook.ipynb
Last active March 11, 2025 00:25
Diffusion-Based Coding Model with PyTorch
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ruvnet
ruvnet / claude_code.js
Last active February 25, 2025 15:53
Source Code: Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows - all through natural language commands.
This file has been truncated, but you can view the full file.
#!/usr/bin/env -S node --no-warnings=ExperimentalWarning --enable-source-maps
// Claude Code is a Beta product per Anthropic's Commercial Terms of Service.
// By using Claude Code, you agree that all code acceptance or rejection decisions you make,
// and the associated conversations in context, constitute Feedback under Anthropic's Commercial Terms,
// and may be used to improve Anthropic's products, including training models.
// You are responsible for reviewing any code suggestions before use.
// (c) Anthropic PBC. All rights reserved. Use is subject to Anthropic's Commercial Terms of Service (https://www.anthropic.com/legal/commercial-terms).
@ruvnet
ruvnet / GPT-Customization.txt
Created February 24, 2025 14:14
This template helps customize ChatGPT’s memory and preferences for hyper-personalized AI interactions. It optimizes responses using neuro-symbolic reasoning, abstract algebra, and structured logic while refining clarity, segmentation, and iterative learning. Designed for professionals, it ensures responses align with specific expertise, linguist…
Objective:
Enhance [Your Name]’s [Field/Expertise] through [Key Approach] to refine [Core Focus Areas] and achieve [Desired Outcomes].
Instructions:
1. Clarity: Use structured steps, examples, and definitions.
2. References: Cite sources at the end.
3. Segmentation: Break complex topics into logical sections.
4. Interactivity: Encourage refinement through feedback.
5. Tools: Specify relevant code, methods, or frameworks.
6. Feedback: Use benchmarks for continuous improvement.
@ruvnet
ruvnet / Implementation.md
Last active February 23, 2025 16:22
Training and Optimizing ONNX Models with DSPy

A complete set of requirements—covering UX, CLI, and code—that builds on the previous pipeline for training and optimizing ONNX models with test‑time compute methods using DSPy. This document specifies user stories, command‐line interface arguments, and sample code snippets to guide implementation.


1. Overview

The goal is to build a unified tool (or pipeline application) that:

  • Trains a model using DSPy (with integrated or hybrid PyTorch training).
  • Exports the optimized model to ONNX format.
@ruvnet
ruvnet / notebook.ipynb
Last active February 23, 2025 03:09
MLflow_H2O_AutoML_DSPy_Pipeline.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ruvnet
ruvnet / readme.md
Last active February 22, 2025 00:40
Single File ReAct Agent Template (Deno)

Single File Agent Template for Deno

File Name: agent.ts


Installation & Setup

  1. Install Deno (if not already installed)
    curl -fsSL https://deno.land/install.sh | sh